{"version":3,"file":"status-bar-xHE85pmc.cjs","names":["StatusBarChrome","Box","Typography","statsSlots","slots","Bar","items","stats","className","display","flexWrap","alignItems","gap","fontVariantNumeric","map","item","key","appearance","text","StatusBar","props","$","_c","t0","extendFeature","slotRender","STATUS_BAR","selectionStats","coreSelectionStats","statusBar","coreStatusBar","StatusBar","draws","props"],"sources":["../src/components/StatusBar.tsx","../src/status-bar.tsx"],"sourcesContent":["import {\n  StatusBarChrome,\n  type StatusBarChromeProps,\n  type StatusBarSlotProps,\n  type StatusBarSlots,\n} from \"@adapttable/react/adapter\";\nimport { Box, Typography } from \"@mui/material\";\n\nimport { statsSlots } from \"./SelectionStatsBar\";\n\nconst slots: StatusBarSlots = {\n  Bar: ({ items, stats, className }: StatusBarSlotProps) => (\n    <Box\n      className={className}\n      data-adapttable-part=\"status-bar\"\n      sx={{\n        display: \"flex\",\n        flexWrap: \"wrap\",\n        alignItems: \"center\",\n        gap: \"4px 16px\",\n        fontVariantNumeric: \"tabular-nums\",\n      }}\n    >\n      {items.map((item) => (\n        <Typography\n          component=\"span\"\n          key={item.key}\n          variant=\"caption\"\n          color=\"text.secondary\"\n          data-adapttable-part=\"status-item\"\n          data-status={item.key}\n          data-appearance={item.appearance}\n        >\n          {item.text}\n        </Typography>\n      ))}\n      {stats}\n    </Box>\n  ),\n  stats: statsSlots,\n};\n\n/** The kit's status bar: row counts, selection count, selection figures. */\nexport function StatusBar(\n  props: Readonly<Omit<StatusBarChromeProps, \"slots\">>\n) {\n  return <StatusBarChrome {...props} slots={slots} />;\n}\n","import {\n  extendFeature,\n  slotRender,\n  type StaticTableFeature,\n  STATUS_BAR,\n} from \"@adapttable/react/adapter\";\nimport {\n  selectionStats as coreSelectionStats,\n  statusBar as coreStatusBar,\n} from \"@adapttable/react/features\";\n\nimport { StatusBar } from \"./components/StatusBar\";\n\n/**\n * The MUI strip, offered by whichever of the two features is composed.\n *\n * One element serves both, so the slot is single and draws it once even when a\n * table composes the pair. Concatenate onto the core live renders — replacing\n * `renders` would drop `SELECTION_STATS_LIVE`.\n */\nconst draws = [\n  slotRender(STATUS_BAR, (props) => <StatusBar {...props} />),\n] as const;\n\n/**\n * A footer strip of row, page and selection figures.\n *\n * @public\n */\nexport function statusBar(): StaticTableFeature {\n  return extendFeature(coreStatusBar(), draws);\n}\n\n/**\n * Aggregate figures for a multi-cell selection, shown in that same strip.\n *\n * @public\n */\nexport function selectionStats(): StaticTableFeature {\n  return extendFeature(coreSelectionStats(), draws);\n}\n"],"mappings":";;;;;;;;AAUA,MAAMI,QAAwB;CAC5BC,MAAM,EAAEC,OAAOC,OAAOC,gBACpB,iBAAA,GAAA,kBAAA,KAAA,CAAC,cAAA,KAAD;EACaA;EACX,wBAAqB;EACrB,IAAI;GACFC,SAAS;GACTC,UAAU;GACVC,YAAY;GACZC,KAAK;GACLC,oBAAoB;EACtB;EATF,UAAA,CAWGP,MAAMQ,KAAKC,SACV,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAA,YAAD;GACE,WAAU;GAEV,SAAQ;GACR,OAAM;GACN,wBAAqB;GACrB,eAAaA,KAAKC;GAClB,mBAAiBD,KAAKE;GAErBF,UAAAA,KAAKG;EACI,GARLH,KAAKC,GAQA,CACb,GACAT,KACE;;CAEPA,OAAOJ,0BAAAA;AACT;;AAGA,SAAOgB,UAAAC,OAAA;CAAA,MAAAC,KAAAA,GAAAC,uBAAAA,EAAAA,CAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAD,OAAA;EAGEG,KAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAA,iBAAD;GAAgB,GAAKH;GAAchB;EAAK,CAAA;EAAIiB,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAA5CE;AAA4C;;;;;;;;;;AC1BrD,MAAMS,QAAQ,EAAA,GACZP,0BAAAA,WAAAA,CAAWC,0BAAAA,aAAaO,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAA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