@12-apps/ui 6.60.0 → 6.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/components/data-display/Avatar/Avatar.js +3 -3
- package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +7 -7
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +25 -23
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +26 -24
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +6 -4
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +1 -1
- package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +7 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +11 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +14 -10
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +5 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +20 -18
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +5 -5
- package/dist/_internal/components/data-display/DataViews/list-card-breaks.js +12 -0
- package/dist/_internal/components/data-display/DataViews/list-card-breaks.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/list-card-cells.js +3 -1
- package/dist/_internal/components/data-display/DataViews/list-card-group-tracks.js +14 -0
- package/dist/_internal/components/data-display/DataViews/list-card-group-tracks.js.map +1 -0
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +4 -2
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +4 -4
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +1 -1
- package/dist/_internal/components/data-display/index.js +15 -15
- package/dist/_internal/components/index.js +22 -22
- package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +6 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +9 -9
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +5 -5
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +4 -4
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +4 -4
- package/dist/_internal/components/navigation/index.js +9 -9
- package/dist/_internal/en-US.data-display.js +1 -1
- package/dist/_internal/pt-BR.data-display.js +1 -1
- package/dist/_internal/user-avatar/user-avatar.js +4 -4
- package/dist/charts.js +10 -10
- package/dist/{chunk-V4V2N6YJ.js → chunk-36RYXV4R.js} +9 -6
- package/dist/chunk-36RYXV4R.js.map +1 -0
- package/dist/{chunk-W7N4ORCV.js → chunk-3JYCS7VO.js} +5 -5
- package/dist/{chunk-YIKFYWKD.js → chunk-46ZATLQV.js} +3 -3
- package/dist/{chunk-TF27Z27K.js → chunk-4JZ6XDVA.js} +2 -2
- package/dist/{chunk-EDBP62WG.js → chunk-53ACGKBW.js} +3 -3
- package/dist/{chunk-ZWBGQYVO.js → chunk-56PBNYXF.js} +8 -6
- package/dist/chunk-56PBNYXF.js.map +1 -0
- package/dist/{chunk-EWIKSTJV.js → chunk-5WJFCQFN.js} +7 -7
- package/dist/{chunk-WBDQSBLV.js → chunk-5XFJCWPY.js} +5 -5
- package/dist/{chunk-QKAYXAQE.js → chunk-6FAYTKXW.js} +24 -20
- package/dist/chunk-6FAYTKXW.js.map +1 -0
- package/dist/{chunk-HPO7PB4F.js → chunk-7AAJYWC3.js} +2 -2
- package/dist/{chunk-XW5SEW3H.js → chunk-AKC5GRJF.js} +2 -2
- package/dist/{chunk-NHVL2QPG.js → chunk-D7PVIC33.js} +2 -1
- package/dist/chunk-D7PVIC33.js.map +1 -0
- package/dist/{chunk-4QKS5Y35.js → chunk-EBSA4EYR.js} +2 -2
- package/dist/{chunk-2W2MWEP2.js → chunk-EFLRNSE6.js} +11 -11
- package/dist/{chunk-PC4H5LVB.js → chunk-EUPUEMFX.js} +7 -7
- package/dist/{chunk-COYGTEN5.js → chunk-F5S5UFGD.js} +8 -1
- package/dist/chunk-F5S5UFGD.js.map +1 -0
- package/dist/{chunk-4PPNCZWY.js → chunk-GS5EPYB4.js} +3 -3
- package/dist/{chunk-JVOEVTCZ.js → chunk-HQCZT6TO.js} +5 -5
- package/dist/{chunk-GK7JNSMK.js → chunk-IK2ZVV3M.js} +2 -2
- package/dist/{chunk-CMBZ3J6I.js → chunk-JA6GKU65.js} +2 -11
- package/dist/chunk-JA6GKU65.js.map +1 -0
- package/dist/{chunk-3FMWQQW6.js → chunk-L4Z7B7KL.js} +2 -2
- package/dist/{chunk-3K7WN2PO.js → chunk-NBM3YJ4P.js} +3 -3
- package/dist/{chunk-CTIMTEH7.js → chunk-NFCAXQ3F.js} +4 -4
- package/dist/{chunk-GYDUXL3D.js → chunk-NVXRV3PL.js} +7 -7
- package/dist/{chunk-6OSUK2C7.js → chunk-PJ5HXNBG.js} +11 -11
- package/dist/{chunk-6OSUK2C7.js.map → chunk-PJ5HXNBG.js.map} +1 -1
- package/dist/{chunk-ILNO4ZJ6.js → chunk-PKGBW7KS.js} +2 -2
- package/dist/{chunk-NTJUAPJM.js → chunk-PZPTTAO5.js} +7 -7
- package/dist/{chunk-HCYRCU4W.js → chunk-QJWIX4YZ.js} +2 -2
- package/dist/{chunk-IL4FCC54.js → chunk-RREWYOKS.js} +2 -2
- package/dist/{chunk-6D2PFC5C.js → chunk-SKOAJPOS.js} +2 -2
- package/dist/{chunk-PIIPEXRM.js → chunk-TVMSXL3R.js} +1 -1
- package/dist/chunk-TVMSXL3R.js.map +1 -0
- package/dist/chunk-U3HEYECF.js +68 -0
- package/dist/chunk-U3HEYECF.js.map +1 -0
- package/dist/{chunk-QHP5PZNC.js → chunk-U57NFQYE.js} +2 -1
- package/dist/chunk-U57NFQYE.js.map +1 -0
- package/dist/{chunk-6QBT5TPS.js → chunk-USZMUOI6.js} +3 -3
- package/dist/{chunk-ARJIKW56.js → chunk-UZCQHNXC.js} +2 -2
- package/dist/{chunk-ZYJZHXFU.js → chunk-VWW2EXH7.js} +4 -4
- package/dist/{chunk-PQ7RWH7L.js → chunk-VZCZAHMX.js} +5 -5
- package/dist/{chunk-I3CQBEKS.js → chunk-WF3P7GE5.js} +2 -2
- package/dist/{chunk-U47KRLEW.js → chunk-YP7SQ5DM.js} +22 -10
- package/dist/chunk-YP7SQ5DM.js.map +1 -0
- package/dist/chunk-ZMUXC3VB.js +11 -0
- package/dist/chunk-ZMUXC3VB.js.map +1 -0
- package/dist/{chunk-HH7PM5HT.js → chunk-ZUQX7XHJ.js} +2 -2
- package/dist/data-display/Avatar.js +3 -3
- package/dist/data-display/Badge.js +2 -2
- package/dist/data-display/CardKit.js +9 -9
- package/dist/data-display/Chart.js +10 -10
- package/dist/data-display/DataViews.js +38 -36
- package/dist/en-US.js +1 -1
- package/dist/locales.js +2 -2
- package/dist/navigation/SectionNav.js +9 -9
- package/dist/pt-BR.js +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-geometry.d.ts +9 -3
- package/dist/types/components/data-display/DataViews/base-list-card-geometry.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-gutters.d.ts +2 -2
- package/dist/types/components/data-display/DataViews/base-list-card-gutters.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-layout.d.ts +1 -0
- package/dist/types/components/data-display/DataViews/base-list-card-layout.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card-slots.d.ts +1 -10
- package/dist/types/components/data-display/DataViews/base-list-card-slots.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card.d.ts +1 -1
- package/dist/types/components/data-display/DataViews/base-list-card.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts +7 -0
- package/dist/types/components/data-display/DataViews/data-views-copy.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-export.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/list-card-breaks.d.ts +21 -0
- package/dist/types/components/data-display/DataViews/list-card-breaks.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/list-card-cells.d.ts +8 -0
- package/dist/types/components/data-display/DataViews/list-card-cells.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/list-card-group-tracks.d.ts +51 -0
- package/dist/types/components/data-display/DataViews/list-card-group-tracks.d.ts.map +1 -0
- package/dist/types/components/data-display/DataViews/list-card-rails.d.ts +33 -13
- package/dist/types/components/data-display/DataViews/list-card-rails.d.ts.map +1 -1
- package/dist/types/en-US.data-display.d.ts.map +1 -1
- package/dist/types/pt-BR.data-display.d.ts.map +1 -1
- package/dist/user-avatar.js +4 -4
- package/package.json +1 -1
- package/src/components/data-display/DataViews/base-list-card-geometry.tsx +22 -8
- package/src/components/data-display/DataViews/base-list-card-gutters.tsx +2 -2
- package/src/components/data-display/DataViews/base-list-card-layout.tsx +6 -3
- package/src/components/data-display/DataViews/base-list-card-slots.tsx +5 -5
- package/src/components/data-display/DataViews/base-list-card.tsx +3 -3
- package/src/components/data-display/DataViews/data-views-copy.ts +7 -0
- package/src/components/data-display/DataViews/data-views-export.tsx +1 -9
- package/src/components/data-display/DataViews/list-card-breaks.ts +21 -0
- package/src/components/data-display/DataViews/list-card-cells.tsx +16 -0
- package/src/components/data-display/DataViews/list-card-group-tracks.tsx +127 -0
- package/src/components/data-display/DataViews/list-card-rails.tsx +58 -30
- package/src/en-US.data-display.ts +4 -0
- package/src/pt-BR.data-display.ts +4 -0
- package/dist/chunk-CMBZ3J6I.js.map +0 -1
- package/dist/chunk-COYGTEN5.js.map +0 -1
- package/dist/chunk-NHVL2QPG.js.map +0 -1
- package/dist/chunk-PIIPEXRM.js.map +0 -1
- package/dist/chunk-QHP5PZNC.js.map +0 -1
- package/dist/chunk-QKAYXAQE.js.map +0 -1
- package/dist/chunk-U47KRLEW.js.map +0 -1
- package/dist/chunk-V4V2N6YJ.js.map +0 -1
- package/dist/chunk-ZWBGQYVO.js.map +0 -1
- /package/dist/{chunk-W7N4ORCV.js.map → chunk-3JYCS7VO.js.map} +0 -0
- /package/dist/{chunk-YIKFYWKD.js.map → chunk-46ZATLQV.js.map} +0 -0
- /package/dist/{chunk-TF27Z27K.js.map → chunk-4JZ6XDVA.js.map} +0 -0
- /package/dist/{chunk-EDBP62WG.js.map → chunk-53ACGKBW.js.map} +0 -0
- /package/dist/{chunk-EWIKSTJV.js.map → chunk-5WJFCQFN.js.map} +0 -0
- /package/dist/{chunk-WBDQSBLV.js.map → chunk-5XFJCWPY.js.map} +0 -0
- /package/dist/{chunk-HPO7PB4F.js.map → chunk-7AAJYWC3.js.map} +0 -0
- /package/dist/{chunk-XW5SEW3H.js.map → chunk-AKC5GRJF.js.map} +0 -0
- /package/dist/{chunk-4QKS5Y35.js.map → chunk-EBSA4EYR.js.map} +0 -0
- /package/dist/{chunk-2W2MWEP2.js.map → chunk-EFLRNSE6.js.map} +0 -0
- /package/dist/{chunk-PC4H5LVB.js.map → chunk-EUPUEMFX.js.map} +0 -0
- /package/dist/{chunk-4PPNCZWY.js.map → chunk-GS5EPYB4.js.map} +0 -0
- /package/dist/{chunk-JVOEVTCZ.js.map → chunk-HQCZT6TO.js.map} +0 -0
- /package/dist/{chunk-GK7JNSMK.js.map → chunk-IK2ZVV3M.js.map} +0 -0
- /package/dist/{chunk-3FMWQQW6.js.map → chunk-L4Z7B7KL.js.map} +0 -0
- /package/dist/{chunk-3K7WN2PO.js.map → chunk-NBM3YJ4P.js.map} +0 -0
- /package/dist/{chunk-CTIMTEH7.js.map → chunk-NFCAXQ3F.js.map} +0 -0
- /package/dist/{chunk-GYDUXL3D.js.map → chunk-NVXRV3PL.js.map} +0 -0
- /package/dist/{chunk-ILNO4ZJ6.js.map → chunk-PKGBW7KS.js.map} +0 -0
- /package/dist/{chunk-NTJUAPJM.js.map → chunk-PZPTTAO5.js.map} +0 -0
- /package/dist/{chunk-HCYRCU4W.js.map → chunk-QJWIX4YZ.js.map} +0 -0
- /package/dist/{chunk-IL4FCC54.js.map → chunk-RREWYOKS.js.map} +0 -0
- /package/dist/{chunk-6D2PFC5C.js.map → chunk-SKOAJPOS.js.map} +0 -0
- /package/dist/{chunk-6QBT5TPS.js.map → chunk-USZMUOI6.js.map} +0 -0
- /package/dist/{chunk-ARJIKW56.js.map → chunk-UZCQHNXC.js.map} +0 -0
- /package/dist/{chunk-ZYJZHXFU.js.map → chunk-VWW2EXH7.js.map} +0 -0
- /package/dist/{chunk-PQ7RWH7L.js.map → chunk-VZCZAHMX.js.map} +0 -0
- /package/dist/{chunk-I3CQBEKS.js.map → chunk-WF3P7GE5.js.map} +0 -0
- /package/dist/{chunk-HH7PM5HT.js.map → chunk-ZUQX7XHJ.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/list-card-cells.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, type ReactNode } from \"react\";\n\nimport { Box } from \"../../../mui/Box\";\nimport { sxRem } from \"../../../tokens/relative\";\n\n/**\n * THE CELL CONFIG — the list declares its columns once, every row obeys them.\n *\n * The row used to name its middle slots: a title, a subtitle beneath it, then\n * labelled `meta` pairs, then a value, then a status. That vocabulary was the\n * mistake twice over. It reads as a description of every list, and no list is\n * quite that shape — so a consumer wanting a date over a time, or an order\n * number over the client who placed it, had to pick whichever named slot was\n * least wrong and take its styling with it. And because each row decided its own\n * content, alignment across a list was a convention the rows could break.\n *\n * So cells are CONFIGURED, the way a data grid's columns are: the list declares\n * them once, and every card renders the same columns in the same tracks from its\n * own row. Two cards cannot disagree about the shape of the list, because\n * neither of them is deciding it.\n *\n * THE SECOND LINE IS AN OPTION, NOT A SUBTITLE. `secondary` is not \"the small\n * grey text under the title\" — it is the cell's second line, for whatever pairs\n * naturally in this list: date over time, name over e-mail, pedido over cliente.\n * It carries no meaning the config did not put there, and a cell that wants one\n * line simply omits it.\n */\nexport interface ListCardCellConfig<T extends Record<string, unknown> = Record<string, unknown>> {\n /** Stable key. Also the cell's `data-slot`, so a test can find it by name. */\n id: string;\n /** The cell's first line, from the row. */\n primary: (row: T) => ReactNode;\n /** An optional second line beneath it. Anything that pairs with the first. */\n secondary?: (row: T) => ReactNode;\n /**\n * Which edge the lines sit on. `end` is what a column of numbers wants, so its\n * digits line up with the values above and below it — and it switches the cell\n * to tabular figures, since nothing else ever asks for that alignment.\n */\n align?: \"start\" | \"center\" | \"end\";\n /**\n * This cell's track, as a `grid-template-columns` entry. Defaults to an even\n * share of the spare width.\n *\n * A cell holding a number usually wants `max-content`: the rail is then as\n * wide as the widest amount in the list and no wider, and its right edge does\n * not move when a longer row arrives.\n */\n width?: string;\n /** Emphasise the first line — for the one figure the row is really about. */\n strong?: boolean;\n}\n\nconst ALIGN_ITEMS = { start: \"flex-start\", center: \"center\", end: \"flex-end\" } as const;\nconst TEXT_ALIGN = { start: \"left\", center: \"center\", end: \"right\" } as const;\n\n/** The default track: an even share of whatever width the row has spare. */\nexport const DEFAULT_CELL_WIDTH = \"minmax(0, 1fr)\";\n\n/** The tracks a cell config asks for, in order. */\nexport function cellTracks(cells: readonly ListCardCellConfig<never>[] | undefined): string[] {\n return (cells ?? []).map((cell) => cell.width ?? DEFAULT_CELL_WIDTH);\n}\n\n/** The first cell's track in the compact band, when it left its width to us. */\nconst COMPACT_FIRST_CELL_WIDTH = \"minmax(0, 2fr)\";\n\n/**\n * The tracks in the COMPACT band (`COMPACT_BREAK`): the same, except that the\n * first cell — the one that names the record — takes a double share of the\n * spare width. Narrow, an even share left every name at \"Sab…\" beside a date\n * column with room to spare. A first cell that declared its own `width` keeps\n * it: the list asked for that track, and only the default is ours to change.\n */\nexport function compactCellTracks(cells: readonly ListCardCellConfig<never>[] | undefined): string[] {\n return cellTracks(cells).map((track, index) =>\n index === 0 && cells?.[0]?.width == null ? COMPACT_FIRST_CELL_WIDTH : track,\n );\n}\n\n/**\n * The config handed down by the list.\n *\n * A card inside a group takes its columns from here rather than from props, so\n * there is exactly one declaration of the list's shape and no way for a row to\n * hold a different one.\n */\nconst CellConfigContext = createContext<readonly ListCardCellConfig<never>[] | null>(null);\n\nexport function CellConfigProvider({\n cells,\n children,\n}: {\n cells: readonly ListCardCellConfig<never>[] | undefined;\n children: ReactNode;\n}): React.JSX.Element {\n return <CellConfigContext.Provider value={cells ?? null}>{children}</CellConfigContext.Provider>;\n}\n\n/** The list's cell config, if it declared one. */\nexport function useCellConfig(): readonly ListCardCellConfig<never>[] | null {\n return useContext(CellConfigContext);\n}\n\n/**\n * One cell rendered from its config.\n *\n * Both lines truncate rather than wrap: a row is a fixed-height scanning unit,\n * and a cell that grows to two lines because one name was long drags every rail\n * on that row down with it. Whatever does not fit belongs in the expandable\n * body, which is the entire reason the body exists.\n */\nfunction Cell<T extends Record<string, unknown>>({\n config,\n row,\n}: {\n config: ListCardCellConfig<T>;\n row: T;\n}): React.JSX.Element {\n const align = config.align ?? \"start\";\n const numeric = align === \"end\" ? { fontVariantNumeric: \"tabular-nums\" } : {};\n const clamp = {\n minWidth: 0,\n maxWidth: \"100%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n } as const;\n const secondary = config.secondary?.(row);\n return (\n <Box\n data-slot={`cell-${config.id}`}\n sx={{\n minWidth: 0,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: ALIGN_ITEMS[align],\n justifyContent: \"center\",\n textAlign: TEXT_ALIGN[align],\n }}\n >\n <Box\n component=\"span\"\n sx={{ ...clamp, fontSize: sxRem(14), fontWeight: config.strong ? 700 : 600, lineHeight: 1.25, ...numeric }}\n >\n {config.primary(row)}\n </Box>\n {secondary != null && (\n <Box\n component=\"span\"\n sx={{ ...clamp, fontSize: sxRem(12.5), lineHeight: 1.3, color: \"text.secondary\", ...numeric }}\n >\n {secondary}\n </Box>\n )}\n </Box>\n );\n}\n\n/** Every configured cell of a row, in the list's declared order. */\nexport function ListCardCells<T extends Record<string, unknown>>({\n cells,\n row,\n}: {\n cells: readonly ListCardCellConfig<T>[];\n row: T;\n}): React.JSX.Element {\n return (\n <>\n {cells.map((config) => (\n <Cell key={config.id} config={config} row={row} />\n ))}\n </>\n );\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,eAAe,kBAAkC;AAgGjD,SAwEL,UAxEK,KAkCL,YAlCK;AA3CT,IAAM,cAAc,EAAE,OAAO,cAAc,QAAQ,UAAU,KAAK,WAAW;AAC7E,IAAM,aAAa,EAAE,OAAO,QAAQ,QAAQ,UAAU,KAAK,QAAQ;AAG5D,IAAM,qBAAqB;AAG3B,SAAS,WAAW,OAAmE;AAC5F,UAAQ,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS,kBAAkB;AACrE;AAGA,IAAM,2BAA2B;AAS1B,SAAS,kBAAkB,OAAmE;AACnG,SAAO,WAAW,KAAK,EAAE;AAAA,IAAI,CAAC,OAAO,UACnC,UAAU,KAAK,QAAQ,CAAC,GAAG,SAAS,OAAO,2BAA2B;AAAA,EACxE;AACF;AASA,IAAM,oBAAoB,cAA2D,IAAI;AAElF,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA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AqB,QAAgB,OAA3B,OAAO,EAA8B,CACjD,GACH;AAEJ;","names":["default"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Chart
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5XFJCWPY.js";
|
|
4
4
|
import {
|
|
5
5
|
CHART_SEMANTIC_COLORS,
|
|
6
6
|
specToChartProps
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HQCZT6TO.js";
|
|
8
8
|
import {
|
|
9
9
|
accentFor
|
|
10
10
|
} from "./chunk-B7ZHEOQQ.js";
|
|
@@ -46,4 +46,4 @@ var SpecChart = ({
|
|
|
46
46
|
export {
|
|
47
47
|
SpecChart
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-GS5EPYB4.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getChartSpecRenderer,
|
|
3
|
-
getRegisteredChartSpecTypes
|
|
4
|
-
} from "./chunk-WKUA6P3W.js";
|
|
5
1
|
import {
|
|
6
2
|
chartAxisValueFormatter,
|
|
7
3
|
chartValueFormatter
|
|
8
4
|
} from "./chunk-6GPNZSAE.js";
|
|
5
|
+
import {
|
|
6
|
+
getChartSpecRenderer,
|
|
7
|
+
getRegisteredChartSpecTypes
|
|
8
|
+
} from "./chunk-WKUA6P3W.js";
|
|
9
9
|
|
|
10
10
|
// src/components/data-display/Chart/chart-spec.ts
|
|
11
11
|
var CHART_SEMANTIC_COLORS = [
|
|
@@ -151,4 +151,4 @@ export {
|
|
|
151
151
|
parseChartSpec,
|
|
152
152
|
specToChartProps
|
|
153
153
|
};
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-HQCZT6TO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-P3GBXE73.js";
|
|
4
4
|
import {
|
|
5
5
|
Badge
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EUPUEMFX.js";
|
|
7
7
|
import {
|
|
8
8
|
rem
|
|
9
9
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -99,4 +99,4 @@ export {
|
|
|
99
99
|
SlotIcon,
|
|
100
100
|
CONTROL_RESET
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-IK2ZVV3M.js.map
|
|
@@ -24,12 +24,6 @@ import { useTheme } from "@mui/material/styles/index.js";
|
|
|
24
24
|
import { useState } from "react";
|
|
25
25
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
26
26
|
var ALL_FORMATS = ["xlsx", "csv", "json"];
|
|
27
|
-
function scopeLabel(selected, total) {
|
|
28
|
-
if (selected > 0) {
|
|
29
|
-
return `${selected} ${selected === 1 ? "item selecionado" : "itens selecionados"}`;
|
|
30
|
-
}
|
|
31
|
-
return `${total} ${total === 1 ? "item filtrado" : "itens filtrados"}`;
|
|
32
|
-
}
|
|
33
27
|
function ExportTrigger({
|
|
34
28
|
busy,
|
|
35
29
|
onOpen,
|
|
@@ -102,10 +96,7 @@ function ExportPanel({
|
|
|
102
96
|
const copy = useDataViewsCopy();
|
|
103
97
|
return /* @__PURE__ */ jsxs(default2, { "data-testid": `${testIdPrefix}-export-panel`, children: [
|
|
104
98
|
/* @__PURE__ */ jsxs(default2, { sx: { px: 1.5, pt: 1, pb: 1, borderBottom: 1, borderColor: "divider" }, children: [
|
|
105
|
-
/* @__PURE__ */ jsx(Text, { variant: "caption", as: "p", children: /* @__PURE__ */
|
|
106
|
-
"Exportando ",
|
|
107
|
-
scopeLabel(selectedCount, totalCount)
|
|
108
|
-
] }) }),
|
|
99
|
+
/* @__PURE__ */ jsx(Text, { variant: "caption", as: "p", children: /* @__PURE__ */ jsx(default2, { component: "span", "data-testid": `${testIdPrefix}-export-scope`, children: copy.export.scopeLine(selectedCount, totalCount) }) }),
|
|
109
100
|
/* @__PURE__ */ jsx(Text, { variant: "caption", as: "p", children: /* @__PURE__ */ jsx(default2, { component: "span", sx: { color: "text.disabled" }, children: copy.export.visibleColumns(columnCount) }) })
|
|
110
101
|
] }),
|
|
111
102
|
formats.map((format) => /* @__PURE__ */ jsx(
|
|
@@ -176,4 +167,4 @@ function DataViewsExportMenu({
|
|
|
176
167
|
export {
|
|
177
168
|
DataViewsExportMenu
|
|
178
169
|
};
|
|
179
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-JA6GKU65.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-export.tsx"],"sourcesContent":["\"use client\";\n\nimport DownloadRoundedIcon from \"@mui/icons-material/DownloadRounded\";\nimport KeyboardArrowDownRoundedIcon from \"@mui/icons-material/KeyboardArrowDownRounded\";\nimport CircularProgress from \"@mui/material/CircularProgress/index.js\";\nimport Popover from \"@mui/material/Popover/index.js\";\nimport { useTheme, type Theme } from \"@mui/material/styles/index.js\";\nimport { useState } from \"react\";\n\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\nimport { Button } from \"../../form/Button\";\nimport { Box } from \"../../../mui/Box\";\nimport { Text } from \"../../typography/Text\";\n\nimport type { DataViewQuery } from \"./data-views-types\";\nimport { rem, sxRem } from \"../../../tokens/relative\";\n\n/**\n * EXPORT — the current QUERY, never the rendered page.\n *\n * Exporting what happens to be on screen is the single most common bug in an\n * admin table: the operator filtered 214 records, sees 25, exports, and gets\n * 25 — with nothing anywhere saying so. So this control does not touch the\n * loaded rows at all. It hands the host the same `DataViewQuery` the grid is\n * showing, unpaginated, and the HOST re-queries the backend — the same\n * division as everywhere else here: the component emits, the host fetches.\n *\n * The menu states the number it is about to export before the click, so the\n * two possible answers (the selection, or the whole filtered set) are never a\n * guess.\n */\n\n/** What a host can be asked to produce. */\nexport type DataViewExportFormat = \"xlsx\" | \"csv\" | \"json\";\n\n/** The request handed to the host when the operator picks a format. */\nexport interface DataViewExportRequest {\n format: DataViewExportFormat;\n /**\n * The live query with `page: 1` and `pageSize` set to the whole matched\n * total — i.e. \"everything this filter selects\", not this page.\n */\n query: DataViewQuery;\n /**\n * The selected row ids, when the operator has a selection. The host filters\n * the re-queried rows to these; absent means the whole filtered set.\n */\n selectedIds?: Array<string | number>;\n /** The visible columns, in the operator's current order. */\n columns: { id: string; label: string }[];\n}\n\n/** Injected export. Absent ⇒ no Exportar control, exactly like `renderCard`. */\nexport interface DataViewExport {\n /** Runs the export. Awaited, so the trigger can show it is working. */\n onExport: (request: DataViewExportRequest) => Promise<void> | void;\n /** Formats to offer, in menu order. Defaults to all three. */\n formats?: DataViewExportFormat[];\n}\n\n/** One line per format: what it is, and when to reach for it. */\n\nconst ALL_FORMATS: DataViewExportFormat[] = [\"xlsx\", \"csv\", \"json\"];\n\ninterface ExportMenuProps {\n config: DataViewExport;\n /** The live query — copied and unpaginated before it reaches the host. */\n query: DataViewQuery;\n /** The unpaginated total, so the label can state what \"tudo\" means. */\n totalCount: number;\n selectedIds: Array<string | number>;\n columns: { id: string; label: string }[];\n testIdPrefix: string;\n /** Render icon-only (measured upstream). */\n compact?: boolean;\n}\n\n/** The trigger. Shows a spinner while the host's export is still running. */\nfunction ExportTrigger({\n busy,\n onOpen,\n testIdPrefix,\n compact,\n}: {\n busy: boolean;\n onOpen: (anchor: HTMLElement) => void;\n testIdPrefix: string;\n /** Icon only — step 2 of the toolbar's degradation ladder. */\n compact?: boolean;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n const theme = useTheme();\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n color=\"neutral\"\n disabled={busy}\n onClick={(event) => onOpen(event.currentTarget as HTMLElement)}\n dataTestId={`${testIdPrefix}-export-trigger`}\n aria-label={copy.export.trigger}\n // The label is gone, so the tooltip is the only thing naming the control.\n title={compact ? copy.export.trigger : undefined}\n >\n <Box component=\"span\" sx={{ display: \"inline-flex\", alignItems: \"center\", gap: 0.5 }}>\n {busy ? <CircularProgress size={rem(theme, 14)} /> : <DownloadRoundedIcon fontSize=\"small\" />}\n {!compact && (\n <Box component=\"span\" sx={{ display: { xs: \"none\", sm: \"inline\" } }}>\n {copy.export.triggerLabel}\n </Box>\n )}\n {/* Dropped with the label — see the note on the Exibir trigger. */}\n {!compact && <KeyboardArrowDownRoundedIcon fontSize=\"small\" />}\n </Box>\n </Button>\n );\n}\n\n/** One format row: what it produces, and when to reach for it. */\nfunction FormatRow({\n format,\n onPick,\n testIdPrefix,\n}: {\n format: DataViewExportFormat;\n onPick: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box\n component=\"button\"\n type=\"button\"\n onClick={onPick}\n data-testid={`${testIdPrefix}-export-${format}`}\n sx={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n width: \"100%\",\n px: 1.5,\n py: 1,\n border: 0,\n background: \"none\",\n cursor: \"pointer\",\n font: \"inherit\",\n textAlign: \"left\",\n \"&:hover\": { bgcolor: \"action.hover\" },\n }}\n >\n <Box component=\"span\" sx={{ fontSize: sxRem(13) }}>\n {copy.export.formats[format]?.label ?? format}\n </Box>\n <Box component=\"span\" sx={{ fontSize: sxRem(11), color: \"text.disabled\" }}>\n {copy.export.formats[format]?.hint ?? \"\"}\n </Box>\n </Box>\n );\n}\n\n/** The panel: what is about to be exported, then the formats. */\nfunction ExportPanel({\n formats,\n selectedCount,\n totalCount,\n columnCount,\n onPick,\n testIdPrefix,\n}: {\n formats: DataViewExportFormat[];\n selectedCount: number;\n totalCount: number;\n columnCount: number;\n onPick: (format: DataViewExportFormat) => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box data-testid={`${testIdPrefix}-export-panel`}>\n <Box sx={{ px: 1.5, pt: 1, pb: 1, borderBottom: 1, borderColor: \"divider\" }}>\n <Text variant=\"caption\" as=\"p\">\n <Box component=\"span\" data-testid={`${testIdPrefix}-export-scope`}>\n {copy.export.scopeLine(selectedCount, totalCount)}\n </Box>\n </Text>\n <Text variant=\"caption\" as=\"p\">\n <Box component=\"span\" sx={{ color: \"text.disabled\" }}>\n {copy.export.visibleColumns(columnCount)}\n </Box>\n </Text>\n </Box>\n {formats.map((format) => (\n <FormatRow\n key={format}\n format={format}\n onPick={() => onPick(format)}\n testIdPrefix={testIdPrefix}\n />\n ))}\n </Box>\n );\n}\n\n/** The toolbar's Exportar control. Renders nothing when no host wired it. */\nexport function DataViewsExportMenu({\n config,\n query,\n totalCount,\n selectedIds,\n columns,\n testIdPrefix,\n compact,\n}: ExportMenuProps): React.JSX.Element {\n const [anchor, setAnchor] = useState<HTMLElement | null>(null);\n const [busy, setBusy] = useState(false);\n\n const run = async (format: DataViewExportFormat): Promise<void> => {\n setAnchor(null);\n setBusy(true);\n try {\n await config.onExport({\n format,\n // UNPAGINATED: page 1 of a page as large as the whole result. The host\n // re-queries with this; nothing here reads the loaded rows.\n query: { ...query, page: 1, pageSize: Math.max(1, totalCount) },\n selectedIds: selectedIds.length > 0 ? [...selectedIds] : undefined,\n columns,\n });\n } finally {\n setBusy(false);\n }\n };\n\n return (\n <>\n <ExportTrigger busy={busy} onOpen={setAnchor} testIdPrefix={testIdPrefix} compact={compact} />\n <Popover\n open={Boolean(anchor)}\n anchorEl={anchor}\n onClose={() => setAnchor(null)}\n anchorOrigin={{ vertical: \"bottom\", horizontal: \"right\" }}\n transformOrigin={{ vertical: \"top\", horizontal: \"right\" }}\n slotProps={{ paper: { sx: { width: sxRem(260), maxWidth: (theme: Theme) => `calc(100vw - ${rem(theme, 32)})` } } }}\n >\n <ExportPanel\n formats={config.formats ?? ALL_FORMATS}\n selectedCount={selectedIds.length}\n totalCount={totalCount}\n columnCount={columns.length}\n onPick={(format) => void run(format)}\n testIdPrefix={testIdPrefix}\n />\n </Popover>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAEA,OAAO,yBAAyB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AA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["default"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildChartContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3JYCS7VO.js";
|
|
4
4
|
import {
|
|
5
5
|
ChartLegendContent,
|
|
6
6
|
ChartTooltipContent
|
|
@@ -318,4 +318,4 @@ function renderChartByType(props, theme) {
|
|
|
318
318
|
export {
|
|
319
319
|
renderChartByType
|
|
320
320
|
};
|
|
321
|
-
//# sourceMappingURL=chunk-
|
|
321
|
+
//# sourceMappingURL=chunk-L4Z7B7KL.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-QLJU7UUI.js";
|
|
5
5
|
import {
|
|
6
6
|
MoreFilters
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QJWIX4YZ.js";
|
|
8
8
|
import {
|
|
9
9
|
PillControl
|
|
10
10
|
} from "./chunk-GWUJIO6Z.js";
|
|
11
11
|
import {
|
|
12
12
|
RangePill
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5WJFCQFN.js";
|
|
14
14
|
import {
|
|
15
15
|
CollapsedSearch,
|
|
16
16
|
InlineKeyword
|
|
@@ -220,4 +220,4 @@ function FilterSlots({
|
|
|
220
220
|
export {
|
|
221
221
|
InlineFilterControls
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-NBM3YJ4P.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ColumnsTab
|
|
3
|
-
} from "./chunk-WSAUWJFO.js";
|
|
4
1
|
import {
|
|
5
2
|
DisplayTab,
|
|
6
3
|
SortTab
|
|
7
4
|
} from "./chunk-TTIZUZ57.js";
|
|
5
|
+
import {
|
|
6
|
+
ColumnsTab
|
|
7
|
+
} from "./chunk-WSAUWJFO.js";
|
|
8
8
|
import {
|
|
9
9
|
ViewActions,
|
|
10
10
|
ViewFooter,
|
|
@@ -265,4 +265,4 @@ function DataViewsDisplayPanel({
|
|
|
265
265
|
export {
|
|
266
266
|
DataViewsDisplayPanel
|
|
267
267
|
};
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-NFCAXQ3F.js.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pulseAnimation,
|
|
3
|
+
rotateAnimation,
|
|
4
|
+
scaleInAnimation,
|
|
5
|
+
shimmerAnimation
|
|
6
|
+
} from "./chunk-MTEQEPNY.js";
|
|
1
7
|
import {
|
|
2
8
|
ACTIVE_SCALE,
|
|
3
9
|
AVATAR_SIZES,
|
|
@@ -17,12 +23,6 @@ import {
|
|
|
17
23
|
SPINNER,
|
|
18
24
|
STATUS_DOT
|
|
19
25
|
} from "./chunk-6ZZGK5DT.js";
|
|
20
|
-
import {
|
|
21
|
-
pulseAnimation,
|
|
22
|
-
rotateAnimation,
|
|
23
|
-
scaleInAnimation,
|
|
24
|
-
shimmerAnimation
|
|
25
|
-
} from "./chunk-MTEQEPNY.js";
|
|
26
26
|
import {
|
|
27
27
|
absoluteInk,
|
|
28
28
|
controlNeutral,
|
|
@@ -277,4 +277,4 @@ function AvatarView(props) {
|
|
|
277
277
|
export {
|
|
278
278
|
AvatarView
|
|
279
279
|
};
|
|
280
|
-
//# sourceMappingURL=chunk-
|
|
280
|
+
//# sourceMappingURL=chunk-NVXRV3PL.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useDisclosure
|
|
3
|
+
} from "./chunk-2JCRNWHE.js";
|
|
1
4
|
import {
|
|
2
5
|
StandaloneContainer,
|
|
3
6
|
useRowLayout
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-36RYXV4R.js";
|
|
5
8
|
import {
|
|
6
9
|
DiscloseSlot,
|
|
7
10
|
DragSlot,
|
|
8
11
|
SelectSlot
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TVMSXL3R.js";
|
|
10
13
|
import {
|
|
11
14
|
actionProps,
|
|
12
15
|
metaShape,
|
|
13
16
|
rowStyles,
|
|
14
17
|
useRowShell
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YP7SQ5DM.js";
|
|
16
19
|
import {
|
|
17
20
|
ListCardActions,
|
|
18
21
|
ListCardCaption,
|
|
19
22
|
ListCardMeta,
|
|
20
23
|
ListCardTail
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
useDisclosure
|
|
24
|
-
} from "./chunk-2JCRNWHE.js";
|
|
24
|
+
} from "./chunk-56PBNYXF.js";
|
|
25
25
|
import {
|
|
26
26
|
DropIndicator
|
|
27
27
|
} from "./chunk-K4EKTMTC.js";
|
|
28
28
|
import {
|
|
29
29
|
ListCardCells
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-F5S5UFGD.js";
|
|
31
31
|
import {
|
|
32
32
|
default as default2
|
|
33
33
|
} from "./chunk-6DPAWXZ3.js";
|
|
@@ -126,7 +126,7 @@ function BaseListCard(props) {
|
|
|
126
126
|
const { actionable, selectable, slot, drag, reserve, pad, padY, acts } = shell;
|
|
127
127
|
const meta = metaShape(props);
|
|
128
128
|
const disclosure = useDisclosure(props);
|
|
129
|
-
const { cells, configured, cellTemplate, opens, stack } = useRowLayout(props, shell, disclosure.expandable);
|
|
129
|
+
const { cells, configured, cellTemplate, compactTemplate, opens, stack } = useRowLayout(props, shell, disclosure.expandable);
|
|
130
130
|
return /* @__PURE__ */ jsx(StandaloneContainer, { inGroup: shell.group != null, children: /* @__PURE__ */ jsxs(
|
|
131
131
|
Card,
|
|
132
132
|
{
|
|
@@ -138,7 +138,7 @@ function BaseListCard(props) {
|
|
|
138
138
|
onContextMenu: props.onContextMenu,
|
|
139
139
|
...acts ? actionProps(onClick) : {},
|
|
140
140
|
...drag.itemProps,
|
|
141
|
-
sx: rowStyles(props, shell, cellTemplate, stack),
|
|
141
|
+
sx: rowStyles(props, shell, { cellTemplate, compactTemplate }, stack),
|
|
142
142
|
children: [
|
|
143
143
|
drag.dropEdge != null && /* @__PURE__ */ jsx(DropIndicator, { edge: drag.dropEdge }),
|
|
144
144
|
/* @__PURE__ */ jsx(
|
|
@@ -185,4 +185,4 @@ function BaseListCard(props) {
|
|
|
185
185
|
export {
|
|
186
186
|
BaseListCard
|
|
187
187
|
};
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-PJ5HXNBG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/DataViews/base-list-card.tsx"],"sourcesContent":["\"use client\";\n\nimport Collapse from \"@mui/material/Collapse/index.js\";\nimport { type ReactNode } from \"react\";\n\nimport { Card } from \"../../layout/Card\";\nimport type { DescriptionItemProps } from \"../DescriptionItem\";\nimport { Box } from \"../../../mui/Box\";\n\nimport { type CardSurfaceProps } from \"./card-surface\";\nimport { DropIndicator } from \"./data-views-drag\";\nimport { useDisclosure } from \"./base-list-card-disclosure\";\nimport { actionProps, metaShape, rowStyles, useRowShell } from \"./base-list-card-geometry\";\nimport { StandaloneContainer, useRowLayout } from \"./base-list-card-layout\";\nimport { DiscloseSlot, DragSlot, SelectSlot } from \"./base-list-card-gutters\";\nimport { type DataViewsDensity } from \"./data-views-layout-context\";\nimport { ListCardCells, type ListCardCellConfig } from \"./list-card-cells\";\nimport {\n ListCardActions,\n ListCardCaption,\n ListCardMeta,\n ListCardTail,\n} from \"./base-list-card-slots\";\n\n/**\n * THE \"LISTA\" LAYOUT'S CARD — {@link BaseCard}'s horizontal sibling.\n *\n * `ListBody` always described the shape it wanted (\"a marker, a title, a\n * subtitle and a value on the right\") and never provided it, so every host\n * hand-rolled a `<Box>` flex row: a tint for selection with no checkbox, fixed\n * `minWidth` columns that ignored density and never collapsed, no hover, no\n * focus ring, and a `borderBottom` fighting the gap between rows.\n *\n * THE LIST OWNS THE COLUMNS. Inside a {@link ListCardGroup} this card is\n * `grid-template-columns: subgrid` across the group's rails, so the value sits\n * on its own edge and cannot be shunted about by the width of the status chip\n * beside it. Standalone it falls back to the same template on its own. See\n * `list-card-rails`.\n *\n * IT ANSWERS ITS OWN WIDTH, not the viewport — a container query, because the\n * same row renders full-bleed on a phone, in a 300px board column, and beside a\n * filter panel that opens and closes. Below `STACK_BREAK` it leaves the shared\n * rails entirely and goes two-line, which is the standard mobile transaction\n * row and beats truncating everything: the title (with its subtitle) on line\n * 1, the value under it at the right edge.\n * A CONFIGURED row keeps the same two facts — its first cell in the title's\n * place, its `strong` (else last) cell in the value's — and drops the rest\n * into the expandable body's job. Standalone, the card renders inside a\n * wrapper that is the query container, since a row cannot query itself.\n *\n * A row that OPENS something (a click handler, or a link it renders) ends in a\n * chevron saying so, at every width — unless it expands, where the disclosure\n * chevron is the only arrow it carries.\n */\n\nexport interface BaseListCardProps extends CardSurfaceProps {\n /** A marker: avatar, thumbnail or status glyph. Earn the pixels — a generic\n * icon repeated down fifty rows is noise. */\n leading?: ReactNode;\n /** First-class title. Rendered as the link when `href` is set. */\n title?: ReactNode;\n /** Secondary line under the title. */\n subtitle?: ReactNode;\n /**\n * Middle columns as labelled pairs — {@link DescriptionItem}s, not free-form\n * nodes, so a screen reader reads \"Data, 05/08/2026\" rather than four\n * unrelated strings. Stacked (label above value) by default.\n *\n * The FIRST rung of the collapse ladder: the only slot whose absence does not\n * stop the row being identified or acted on.\n */\n meta?: DescriptionItemProps[];\n /** Escape hatch for a middle section these pairs cannot express. */\n metaSlot?: ReactNode;\n /** The number this row is about. Its own rail, tabular figures, never truncated. */\n value?: ReactNode;\n /**\n * Inline actions — the one or two things done often enough to deserve a\n * button. Revealed on hover and `:focus-within` by default, so fifty rows of\n * buttons are not the resting state of the page.\n */\n actions?: ReactNode;\n /** Always show the inline actions, rather than on hover/focus. */\n actionsAlwaysVisible?: boolean;\n /** The 3-dots overflow menu, pinned to the end. Also opens on right-click. */\n menu?: ReactNode;\n /** What opens the overflow menu on right-click / long-press. */\n onContextMenu?: (event: React.MouseEvent) => void;\n /**\n * THE EXPANDABLE BODY — and the whole reason this is a card and not a table\n * row.\n *\n * A summary row of labelled columns is a table row with a border round it: it\n * restates what the table already says and gives nobody a reason to switch to\n * it. What a card can do that a table cell cannot is OPEN — carry the record's\n * own detail underneath its summary, in whatever shape that record wants.\n *\n * So this container makes no claim about what goes in here. It spans every\n * rail and imposes nothing: an order puts its line items and a totals ledger\n * here, a cart adds its recovery actions, a role lists its permissions. The\n * design of that area belongs entirely to the consumer, and none of it is the\n * envelope's business.\n *\n * ABSENT ⇒ NO CHEVRON. A row given nothing to reveal renders no disclosure\n * control at all, rather than one that opens onto an empty box, so a column of\n * chevrons is a truthful index of which rows have more behind them.\n */\n children?: ReactNode;\n /** Open on first render, for an uncontrolled card. Ignored when `expanded` is set. */\n defaultExpanded?: boolean;\n /**\n * Open state, when the LIST wants to own it.\n *\n * Left unset the card keeps its own, and rows open independently — several at\n * once, which is what comparing two records requires. Pass this (with\n * `onExpandedChange`) to impose something else, an accordion being the usual\n * reason.\n */\n expanded?: boolean;\n /** Fired with the state the card is asking to move to. */\n onExpandedChange?: (expanded: boolean) => void;\n /** Toggle this row's selection. Receives the raw event so a list can range-select. */\n onToggleSelect?: (event?: React.MouseEvent) => void;\n /** How much air the row gets. Vertical only — a full-width row cannot narrow. */\n density?: DataViewsDensity;\n /**\n * Fine-grained size multiplier on top of `density` (1 = base).\n *\n * Applied as `zoom`, so it scales EVERYTHING the row draws — type, gutters,\n * gaps, padding, the checkbox, the grip, the chip and the menu — not just the\n * handful of font sizes it once multiplied.\n */\n scale?: number;\n /** Flush style: a bottom rule instead of an outline. Row-only. */\n divider?: boolean;\n /** This row's id for drag purposes. Inert outside a `DragContainerProvider`. */\n dragId?: string | number;\n /**\n * The record this row is about, read by the list's cell config.\n *\n * Required only when cells are configured — the config's `primary`/`secondary`\n * are functions of the row, so without one there is nothing to render them\n * from and the card falls back to its named slots.\n */\n row?: Record<string, unknown>;\n /**\n * A cell config for a STANDALONE card.\n *\n * Inside a `ListCardGroup` the list's config wins and this is ignored: one\n * declaration of the list's shape is the whole point, and a row permitted to\n * override it could put its columns somewhere no other row has them.\n */\n cells?: readonly ListCardCellConfig<never>[];\n}\n\n\n/**\n * The row's middle: either the list's configured cells, or the named slots.\n *\n * Split out because the branch is the only conditional shape the card has, and\n * inlined it pushed `BaseListCard` past both the line and the complexity gate.\n */\nfunction RowContent({\n card,\n cells,\n configured,\n slot,\n actionable,\n meta,\n opens,\n}: {\n card: BaseListCardProps;\n cells: readonly ListCardCellConfig<never>[] | null;\n configured: boolean;\n slot: (name: string) => string | undefined;\n actionable: boolean;\n meta: { columns: number; present: boolean };\n /** Whether the row ends in the \"this opens\" chevron. */\n opens: boolean;\n}): React.JSX.Element {\n if (configured && cells != null) {\n return (\n <>\n {/* The list's columns, rendered from this row. */}\n <ListCardCells cells={cells} row={card.row as never} />\n {/* THE MENU IS NOT PART OF THE CONFIG and never optional: it is where a\n * row's actions live, and a list that folded it into a cell would have\n * nowhere left to put them. So it brackets the cells on its own rail,\n * exactly as the gutters do at the other end. */}\n <ListCardActions\n actions={actionable ? card.actions : undefined}\n alwaysVisible={card.actionsAlwaysVisible}\n menu={card.menu}\n opens={opens}\n testId={slot}\n />\n </>\n );\n }\n return (\n <>\n <ListCardCaption\n title={card.title}\n subtitle={card.subtitle}\n href={card.href}\n target={card.target}\n testId={slot(\"title\")}\n />\n <ListCardMeta meta={card.meta} metaSlot={card.metaSlot} trailingRule={card.value != null} />\n <ListCardTail\n value={card.value}\n separated={meta.present}\n actions={actionable ? card.actions : undefined}\n actionsAlwaysVisible={card.actionsAlwaysVisible}\n menu={card.menu}\n opens={opens}\n testId={slot}\n />\n </>\n );\n}\n\n/**\n * The revealed body, and the rule that separates it from the summary.\n *\n * `gridColumn: 1 / -1` so it spans every rail: the summary's columns are the\n * LIST's, and nothing about them should constrain a detail area whose design\n * belongs to the consumer.\n *\n * Collapse rather than an unmount, so the body animates open and keeps its own\n * state between peeks — a consumer putting a form or a scrolled table in here\n * would otherwise have it reset on every toggle. `unmountOnExit` is deliberately\n * NOT set: fifty closed rows pay for fifty hidden subtrees, which is the trade\n * taken because the alternative re-runs every consumer's effects per toggle.\n */\nfunction ExpandableBody({\n disclosure,\n padY,\n pad,\n children,\n}: {\n disclosure: { expandable: boolean; expanded: boolean; regionId: string };\n padY: number;\n pad: number;\n children: ReactNode;\n}): React.JSX.Element {\n if (!disclosure.expandable) return <></>;\n return (\n <Box sx={{ gridColumn: \"1 / -1\", minWidth: 0 }}>\n <Collapse in={disclosure.expanded} timeout={150}>\n <Box\n id={disclosure.regionId}\n role=\"region\"\n sx={{\n minWidth: 0,\n // `padY`, not a fraction of the horizontal padding. The card's own\n // `py` wraps the summary AND the body, so once the body is in flow\n // the summary has no bottom padding of its own — at `comfortable`\n // the row visibly lost the height it had while closed.\n mt: padY,\n pt: padY,\n // A RULE BETWEEN SUMMARY AND BODY, bled through the row's horizontal\n // padding so it spans the card edge to edge. Inset, it reads as a\n // border around the content rather than a division of the card.\n borderTop: 1,\n borderColor: \"divider\",\n mx: -pad,\n px: pad,\n }}\n >\n {children}\n </Box>\n </Collapse>\n </Box>\n );\n}\n\nexport function BaseListCard(props: BaseListCardProps): React.JSX.Element {\n const { selected = false, onClick } = props;\n const shell = useRowShell(props);\n const { actionable, selectable, slot, drag, reserve, pad, padY, acts } = shell;\n const meta = metaShape(props);\n const disclosure = useDisclosure(props);\n const { cells, configured, cellTemplate, opens, stack } = useRowLayout(props, shell, disclosure.expandable);\n\n return (\n <StandaloneContainer inGroup={shell.group != null}>\n <Card\n variant=\"outlined\"\n className={props.className}\n dataTestId={props.testId}\n aria-label={props[\"aria-label\"]}\n aria-disabled={actionable ? undefined : true}\n onContextMenu={props.onContextMenu}\n {...(acts ? actionProps(onClick) : {})}\n {...drag.itemProps}\n // A PLAIN OBJECT: `Card` merges by spreading, so a function sx vanishes.\n sx={rowStyles(props, shell, cellTemplate, stack)}\n >\n {drag.dropEdge != null && <DropIndicator edge={drag.dropEdge} />}\n <DiscloseSlot\n expandable={disclosure.expandable}\n expanded={disclosure.expanded}\n reserve={reserve}\n onToggle={disclosure.toggle}\n controls={disclosure.regionId}\n testId={slot(\"disclose\")}\n />\n <DragSlot drag={drag} reserve={reserve} testId={slot(\"drag\")} />\n <SelectSlot\n selectable={selectable}\n selected={selected}\n reserve={reserve}\n onToggleSelect={props.onToggleSelect}\n testId={slot(\"checkbox\")}\n />\n <Box data-slot=\"leading\" sx={{ display: \"flex\", alignItems: \"center\" }}>\n {props.leading}\n </Box>\n <RowContent\n card={props}\n cells={cells}\n configured={configured}\n slot={slot}\n actionable={actionable}\n meta={meta}\n opens={opens}\n />\n <ExpandableBody disclosure={disclosure} padY={padY} pad={pad}>\n {props.children}\n </ExpandableBody>\n </Card>\n </StandaloneContainer>\n );\n}\n\nexport { META_BREAK, STACK_BREAK } from \"./base-list-card-slots\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,cAAc;AAoLf,mBAEE,KAFF;AApBN,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASsB;AACpB,MAAI,cAAc,SAAS,MAAM;AAC/B,WACE,iCAEE;AAAA,0BAAC,iBAAc,OAAc,KAAK,KAAK,KAAc;AAAA,MAKrD;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,aAAa,KAAK,UAAU;AAAA,UACrC,eAAe,KAAK;AAAA,UACpB,MAAM,KAAK;AAAA,UACX;AAAA,UACA,QAAQ;AAAA;AAAA,MACV;AAAA,OACF;AAAA,EAEJ;AACA,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,KAAK;AAAA,QACZ,UAAU,KAAK;AAAA,QACf,MAAM,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OAAO,OAAO,WAAW,UAAU;AAE1G,SACE,oBAAC,uBAAoB,SAAS,MAAM,SAAS,MAC3C;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAW,MAAM;AAAA,MACjB,YAAY,MAAM;AAAA,MAClB,cAAY,MAAM,YAAY;AAAA,MAC9B,iBAAe,aAAa,SAAY;AAAA,MACxC,eAAe,MAAM;AAAA,MACpB,GAAI,OAAO,YAAY,OAAO,IAAI,CAAC;AAAA,MACnC,GAAG,KAAK;AAAA,MAET,IAAI,UAAU,OAAO,OAAO,cAAc,KAAK;AAAA,MAE9C;AAAA,aAAK,YAAY,QAAQ,oBAAC,iBAAc,MAAM,KAAK,UAAU;AAAA,QAC9D;AAAA,UAAC;AAAA;AAAA,YACC,YAAY,WAAW;AAAA,YACvB,UAAU,WAAW;AAAA,YACrB;AAAA,YACA,UAAU,WAAW;AAAA,YACrB,UAAU,WAAW;AAAA,YACrB,QAAQ,KAAK,UAAU;AAAA;AAAA,QACzB;AAAA,QACA,oBAAC,YAAS,MAAY,SAAkB,QAAQ,KAAK,MAAM,GAAG;AAAA,QAC9D;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA,gBAAgB,MAAM;AAAA,YACtB,QAAQ,KAAK,UAAU;AAAA;AAAA,QACzB;AAAA,QACA,oBAACA,UAAA,EAAI,aAAU,WAAU,IAAI,EAAE,SAAS,QAAQ,YAAY,SAAS,GAClE,gBAAM,SACT;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,kBAAe,YAAwB,MAAY,KACjD,gBAAM,UACT;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":["default"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/base-list-card.tsx"],"sourcesContent":["\"use client\";\n\nimport Collapse from \"@mui/material/Collapse/index.js\";\nimport { type ReactNode } from \"react\";\n\nimport { Card } from \"../../layout/Card\";\nimport type { DescriptionItemProps } from \"../DescriptionItem\";\nimport { Box } from \"../../../mui/Box\";\n\nimport { type CardSurfaceProps } from \"./card-surface\";\nimport { DropIndicator } from \"./data-views-drag\";\nimport { useDisclosure } from \"./base-list-card-disclosure\";\nimport { actionProps, metaShape, rowStyles, useRowShell } from \"./base-list-card-geometry\";\nimport { StandaloneContainer, useRowLayout } from \"./base-list-card-layout\";\nimport { DiscloseSlot, DragSlot, SelectSlot } from \"./base-list-card-gutters\";\nimport { type DataViewsDensity } from \"./data-views-layout-context\";\nimport { ListCardCells, type ListCardCellConfig } from \"./list-card-cells\";\nimport {\n ListCardActions,\n ListCardCaption,\n ListCardMeta,\n ListCardTail,\n} from \"./base-list-card-slots\";\n\n/**\n * THE \"LISTA\" LAYOUT'S CARD — {@link BaseCard}'s horizontal sibling.\n *\n * `ListBody` always described the shape it wanted (\"a marker, a title, a\n * subtitle and a value on the right\") and never provided it, so every host\n * hand-rolled a `<Box>` flex row: a tint for selection with no checkbox, fixed\n * `minWidth` columns that ignored density and never collapsed, no hover, no\n * focus ring, and a `borderBottom` fighting the gap between rows.\n *\n * THE LIST OWNS THE COLUMNS. Inside a {@link ListCardGroup} this card is\n * `grid-template-columns: subgrid` across the group's rails, so the value sits\n * on its own edge and cannot be shunted about by the width of the status chip\n * beside it. Standalone it falls back to the same template on its own. See\n * `list-card-rails`.\n *\n * IT ANSWERS ITS OWN WIDTH, not the viewport — a container query, because the\n * same row renders full-bleed on a phone, in a 300px board column, and beside a\n * filter panel that opens and closes. Below `STACK_BREAK` it leaves the shared\n * rails entirely and goes two-line, which is the standard mobile transaction\n * row and beats truncating everything: the title (with its subtitle) on line\n * 1, the value under it at the right edge.\n * A CONFIGURED row keeps the same two facts — its first cell in the title's\n * place, its `strong` (else last) cell in the value's — and drops the rest\n * into the expandable body's job. Standalone, the card renders inside a\n * wrapper that is the query container, since a row cannot query itself.\n *\n * A row that OPENS something (a click handler, or a link it renders) ends in a\n * chevron saying so, at every width — unless it expands, where the disclosure\n * chevron is the only arrow it carries.\n */\n\nexport interface BaseListCardProps extends CardSurfaceProps {\n /** A marker: avatar, thumbnail or status glyph. Earn the pixels — a generic\n * icon repeated down fifty rows is noise. */\n leading?: ReactNode;\n /** First-class title. Rendered as the link when `href` is set. */\n title?: ReactNode;\n /** Secondary line under the title. */\n subtitle?: ReactNode;\n /**\n * Middle columns as labelled pairs — {@link DescriptionItem}s, not free-form\n * nodes, so a screen reader reads \"Data, 05/08/2026\" rather than four\n * unrelated strings. Stacked (label above value) by default.\n *\n * The FIRST rung of the collapse ladder: the only slot whose absence does not\n * stop the row being identified or acted on.\n */\n meta?: DescriptionItemProps[];\n /** Escape hatch for a middle section these pairs cannot express. */\n metaSlot?: ReactNode;\n /** The number this row is about. Its own rail, tabular figures, never truncated. */\n value?: ReactNode;\n /**\n * Inline actions — the one or two things done often enough to deserve a\n * button. Revealed on hover and `:focus-within` by default, so fifty rows of\n * buttons are not the resting state of the page.\n */\n actions?: ReactNode;\n /** Always show the inline actions, rather than on hover/focus. */\n actionsAlwaysVisible?: boolean;\n /** The 3-dots overflow menu, pinned to the end. Also opens on right-click. */\n menu?: ReactNode;\n /** What opens the overflow menu on right-click / long-press. */\n onContextMenu?: (event: React.MouseEvent) => void;\n /**\n * THE EXPANDABLE BODY — and the whole reason this is a card and not a table\n * row.\n *\n * A summary row of labelled columns is a table row with a border round it: it\n * restates what the table already says and gives nobody a reason to switch to\n * it. What a card can do that a table cell cannot is OPEN — carry the record's\n * own detail underneath its summary, in whatever shape that record wants.\n *\n * So this container makes no claim about what goes in here. It spans every\n * rail and imposes nothing: an order puts its line items and a totals ledger\n * here, a cart adds its recovery actions, a role lists its permissions. The\n * design of that area belongs entirely to the consumer, and none of it is the\n * envelope's business.\n *\n * ABSENT ⇒ NO CHEVRON. A row given nothing to reveal renders no disclosure\n * control at all, rather than one that opens onto an empty box, so a column of\n * chevrons is a truthful index of which rows have more behind them.\n */\n children?: ReactNode;\n /** Open on first render, for an uncontrolled card. Ignored when `expanded` is set. */\n defaultExpanded?: boolean;\n /**\n * Open state, when the LIST wants to own it.\n *\n * Left unset the card keeps its own, and rows open independently — several at\n * once, which is what comparing two records requires. Pass this (with\n * `onExpandedChange`) to impose something else, an accordion being the usual\n * reason.\n */\n expanded?: boolean;\n /** Fired with the state the card is asking to move to. */\n onExpandedChange?: (expanded: boolean) => void;\n /** Toggle this row's selection. Receives the raw event so a list can range-select. */\n onToggleSelect?: (event?: React.MouseEvent) => void;\n /** How much air the row gets. Vertical only — a full-width row cannot narrow. */\n density?: DataViewsDensity;\n /**\n * Fine-grained size multiplier on top of `density` (1 = base).\n *\n * Applied as `zoom`, so it scales EVERYTHING the row draws — type, gutters,\n * gaps, padding, the checkbox, the grip, the chip and the menu — not just the\n * handful of font sizes it once multiplied.\n */\n scale?: number;\n /** Flush style: a bottom rule instead of an outline. Row-only. */\n divider?: boolean;\n /** This row's id for drag purposes. Inert outside a `DragContainerProvider`. */\n dragId?: string | number;\n /**\n * The record this row is about, read by the list's cell config.\n *\n * Required only when cells are configured — the config's `primary`/`secondary`\n * are functions of the row, so without one there is nothing to render them\n * from and the card falls back to its named slots.\n */\n row?: Record<string, unknown>;\n /**\n * A cell config for a STANDALONE card.\n *\n * Inside a `ListCardGroup` the list's config wins and this is ignored: one\n * declaration of the list's shape is the whole point, and a row permitted to\n * override it could put its columns somewhere no other row has them.\n */\n cells?: readonly ListCardCellConfig<never>[];\n}\n\n\n/**\n * The row's middle: either the list's configured cells, or the named slots.\n *\n * Split out because the branch is the only conditional shape the card has, and\n * inlined it pushed `BaseListCard` past both the line and the complexity gate.\n */\nfunction RowContent({\n card,\n cells,\n configured,\n slot,\n actionable,\n meta,\n opens,\n}: {\n card: BaseListCardProps;\n cells: readonly ListCardCellConfig<never>[] | null;\n configured: boolean;\n slot: (name: string) => string | undefined;\n actionable: boolean;\n meta: { columns: number; present: boolean };\n /** Whether the row ends in the \"this opens\" chevron. */\n opens: boolean;\n}): React.JSX.Element {\n if (configured && cells != null) {\n return (\n <>\n {/* The list's columns, rendered from this row. */}\n <ListCardCells cells={cells} row={card.row as never} />\n {/* THE MENU IS NOT PART OF THE CONFIG and never optional: it is where a\n * row's actions live, and a list that folded it into a cell would have\n * nowhere left to put them. So it brackets the cells on its own rail,\n * exactly as the gutters do at the other end. */}\n <ListCardActions\n actions={actionable ? card.actions : undefined}\n alwaysVisible={card.actionsAlwaysVisible}\n menu={card.menu}\n opens={opens}\n testId={slot}\n />\n </>\n );\n }\n return (\n <>\n <ListCardCaption\n title={card.title}\n subtitle={card.subtitle}\n href={card.href}\n target={card.target}\n testId={slot(\"title\")}\n />\n <ListCardMeta meta={card.meta} metaSlot={card.metaSlot} trailingRule={card.value != null} />\n <ListCardTail\n value={card.value}\n separated={meta.present}\n actions={actionable ? card.actions : undefined}\n actionsAlwaysVisible={card.actionsAlwaysVisible}\n menu={card.menu}\n opens={opens}\n testId={slot}\n />\n </>\n );\n}\n\n/**\n * The revealed body, and the rule that separates it from the summary.\n *\n * `gridColumn: 1 / -1` so it spans every rail: the summary's columns are the\n * LIST's, and nothing about them should constrain a detail area whose design\n * belongs to the consumer.\n *\n * Collapse rather than an unmount, so the body animates open and keeps its own\n * state between peeks — a consumer putting a form or a scrolled table in here\n * would otherwise have it reset on every toggle. `unmountOnExit` is deliberately\n * NOT set: fifty closed rows pay for fifty hidden subtrees, which is the trade\n * taken because the alternative re-runs every consumer's effects per toggle.\n */\nfunction ExpandableBody({\n disclosure,\n padY,\n pad,\n children,\n}: {\n disclosure: { expandable: boolean; expanded: boolean; regionId: string };\n padY: number;\n pad: number;\n children: ReactNode;\n}): React.JSX.Element {\n if (!disclosure.expandable) return <></>;\n return (\n <Box sx={{ gridColumn: \"1 / -1\", minWidth: 0 }}>\n <Collapse in={disclosure.expanded} timeout={150}>\n <Box\n id={disclosure.regionId}\n role=\"region\"\n sx={{\n minWidth: 0,\n // `padY`, not a fraction of the horizontal padding. The card's own\n // `py` wraps the summary AND the body, so once the body is in flow\n // the summary has no bottom padding of its own — at `comfortable`\n // the row visibly lost the height it had while closed.\n mt: padY,\n pt: padY,\n // A RULE BETWEEN SUMMARY AND BODY, bled through the row's horizontal\n // padding so it spans the card edge to edge. Inset, it reads as a\n // border around the content rather than a division of the card.\n borderTop: 1,\n borderColor: \"divider\",\n mx: -pad,\n px: pad,\n }}\n >\n {children}\n </Box>\n </Collapse>\n </Box>\n );\n}\n\nexport function BaseListCard(props: BaseListCardProps): React.JSX.Element {\n const { selected = false, onClick } = props;\n const shell = useRowShell(props);\n const { actionable, selectable, slot, drag, reserve, pad, padY, acts } = shell;\n const meta = metaShape(props);\n const disclosure = useDisclosure(props);\n const { cells, configured, cellTemplate, compactTemplate, opens, stack } = useRowLayout(props, shell, disclosure.expandable);\n\n return (\n <StandaloneContainer inGroup={shell.group != null}>\n <Card\n variant=\"outlined\"\n className={props.className}\n dataTestId={props.testId}\n aria-label={props[\"aria-label\"]}\n aria-disabled={actionable ? undefined : true}\n onContextMenu={props.onContextMenu}\n {...(acts ? actionProps(onClick) : {})}\n {...drag.itemProps}\n // A PLAIN OBJECT: `Card` merges by spreading, so a function sx vanishes.\n sx={rowStyles(props, shell, { cellTemplate, compactTemplate }, stack)}\n >\n {drag.dropEdge != null && <DropIndicator edge={drag.dropEdge} />}\n <DiscloseSlot\n expandable={disclosure.expandable}\n expanded={disclosure.expanded}\n reserve={reserve}\n onToggle={disclosure.toggle}\n controls={disclosure.regionId}\n testId={slot(\"disclose\")}\n />\n <DragSlot drag={drag} reserve={reserve} testId={slot(\"drag\")} />\n <SelectSlot\n selectable={selectable}\n selected={selected}\n reserve={reserve}\n onToggleSelect={props.onToggleSelect}\n testId={slot(\"checkbox\")}\n />\n <Box data-slot=\"leading\" sx={{ display: \"flex\", alignItems: \"center\" }}>\n {props.leading}\n </Box>\n <RowContent\n card={props}\n cells={cells}\n configured={configured}\n slot={slot}\n actionable={actionable}\n meta={meta}\n opens={opens}\n />\n <ExpandableBody disclosure={disclosure} padY={padY} pad={pad}>\n {props.children}\n </ExpandableBody>\n </Card>\n </StandaloneContainer>\n );\n}\n\nexport { COMPACT_BREAK, META_BREAK, STACK_BREAK } from \"./base-list-card-slots\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,cAAc;AAoLf,mBAEE,KAFF;AApBN,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GASsB;AACpB,MAAI,cAAc,SAAS,MAAM;AAC/B,WACE,iCAEE;AAAA,0BAAC,iBAAc,OAAc,KAAK,KAAK,KAAc;AAAA,MAKrD;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,aAAa,KAAK,UAAU;AAAA,UACrC,eAAe,KAAK;AAAA,UACpB,MAAM,KAAK;AAAA,UACX;AAAA,UACA,QAAQ;AAAA;AAAA,MACV;AAAA,OACF;AAAA,EAEJ;AACA,SACE,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,KAAK;AAAA,QACZ,UAAU,KAAK;AAAA,QACf,MAAM,KAAK;AAAA,QACX,QAAQ,KAAK;AAAA,QACb,QAAQ,KAAK,OAAO;AAAA;AAAA,IACtB;AAAA,IACA,oBAAC,gBAAa,MAAM,KAAK,MAAM,UAAU,KAAK,UAAU,cAAc,KAAK,SAAS,MAAM;AAAA,IAC1F;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,KAAK;AAAA,QACZ,WAAW,KAAK;AAAA,QAChB,SAAS,aAAa,KAAK,UAAU;AAAA,QACrC,sBAAsB,KAAK;AAAA,QAC3B,MAAM,KAAK;AAAA,QACX;AAAA,QACA,QAAQ;AAAA;AAAA,IACV;AAAA,KACF;AAEJ;AAeA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKsB;A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A,QAC9D;AAAA,UAAC;AAAA;AAAA,YACC,YAAY,WAAW;AAAA,YACvB,UAAU,WAAW;AAAA,YACrB;AAAA,YACA,UAAU,WAAW;AAAA,YACrB,UAAU,WAAW;AAAA,YACrB,QAAQ,KAAK,UAAU;AAAA;AAAA,QACzB;AAAA,QACA,oBAAC,YAAS,MAAY,SAAkB,QAAQ,KAAK,MAAM,GAAG;AAAA,QAC9D;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA;AAAA,YACA,gBAAgB,MAAM;AAAA,YACtB,QAAQ,KAAK,UAAU;AAAA;AAAA,QACzB;AAAA,QACA,oBAACA,UAAA,EAAI,aAAU,WAAU,IAAI,EAAE,SAAS,QAAQ,YAAY,SAAS,GAClE,gBAAM,SACT;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,QACA,oBAAC,kBAAe,YAAwB,MAAY,KACjD,gBAAM,UACT;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":["default"]}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-NQZNV3VR.js";
|
|
13
13
|
import {
|
|
14
14
|
ListCardGroup
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6FAYTKXW.js";
|
|
16
16
|
import {
|
|
17
17
|
DENSITY_BOARD_SCALE,
|
|
18
18
|
DENSITY_ROW_PADDING,
|
|
@@ -274,4 +274,4 @@ function GridMain(props) {
|
|
|
274
274
|
export {
|
|
275
275
|
GridMain
|
|
276
276
|
};
|
|
277
|
-
//# sourceMappingURL=chunk-
|
|
277
|
+
//# sourceMappingURL=chunk-PKGBW7KS.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GridMain
|
|
3
|
+
} from "./chunk-PKGBW7KS.js";
|
|
1
4
|
import {
|
|
2
5
|
FilterDialog,
|
|
3
6
|
GridFilterPanel
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SKOAJPOS.js";
|
|
5
8
|
import {
|
|
6
9
|
DataViewsEmpty
|
|
7
10
|
} from "./chunk-6NWFX2XJ.js";
|
|
8
11
|
import {
|
|
9
12
|
InlineFilterControls
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NBM3YJ4P.js";
|
|
11
14
|
import {
|
|
12
15
|
GridHeaderRow
|
|
13
16
|
} from "./chunk-X3AFXHY5.js";
|
|
14
|
-
import {
|
|
15
|
-
GridMain
|
|
16
|
-
} from "./chunk-ILNO4ZJ6.js";
|
|
17
17
|
import {
|
|
18
18
|
DataViewsPagination
|
|
19
19
|
} from "./chunk-K6WY2CHG.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-5JWCNQSI.js";
|
|
31
31
|
import {
|
|
32
32
|
ShellToolbar
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-UZCQHNXC.js";
|
|
34
34
|
import {
|
|
35
35
|
togglePillValues
|
|
36
36
|
} from "./chunk-NQZNV3VR.js";
|
|
@@ -240,4 +240,4 @@ function GridShell(props) {
|
|
|
240
240
|
export {
|
|
241
241
|
GridShell
|
|
242
242
|
};
|
|
243
|
-
//# sourceMappingURL=chunk-
|
|
243
|
+
//# sourceMappingURL=chunk-PZPTTAO5.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MoreGroup,
|
|
3
3
|
fieldClearing
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EBSA4EYR.js";
|
|
5
5
|
import {
|
|
6
6
|
useDataViewsCopy
|
|
7
7
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -184,4 +184,4 @@ function MoreFilters({
|
|
|
184
184
|
export {
|
|
185
185
|
MoreFilters
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-QJWIX4YZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CountedIcon
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IK2ZVV3M.js";
|
|
4
4
|
import {
|
|
5
5
|
rem
|
|
6
6
|
} from "./chunk-YKCAJ2TN.js";
|
|
@@ -123,4 +123,4 @@ function RailCreateMenu({
|
|
|
123
123
|
export {
|
|
124
124
|
RailCreateMenu
|
|
125
125
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
126
|
+
//# sourceMappingURL=chunk-RREWYOKS.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-GWUJIO6Z.js";
|
|
4
4
|
import {
|
|
5
5
|
PanelRangeField
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5WJFCQFN.js";
|
|
7
7
|
import {
|
|
8
8
|
useDataViewsCopy
|
|
9
9
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
GridFilterPanel,
|
|
158
158
|
FilterDialog
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-SKOAJPOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/base-list-card-gutters.tsx"],"sourcesContent":["\"use client\";\n\nimport KeyboardArrowRightIcon from \"@mui/icons-material/KeyboardArrowRight\";\nimport IconButton from \"@mui/material/IconButton/index.js\";\n\nimport { Checkbox } from \"../../form/Checkbox\";\nimport { Box } from \"../../../mui/Box\";\nimport { sxRem } from \"../../../tokens/relative\";\n\nimport { DragHandle, useDragItem } from \"./data-views-drag\";\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\n\n/**\n * THE THREE GUTTERS AT THE HEAD OF A ROW — the disclosure chevron, the drag grip\n * and the select checkbox.\n *\n * Split from `base-list-card` at the size gate. All three answer the same\n * question in the same way: whether to occupy a rail, hold one open, or leave\n * the template altogether. See `railsTemplateFor` for why the third option has\n * to exist.\n */\n\n/**\n * MUI's Checkbox carries 9px of hit-area padding on every side.\n *\n * Left uncancelled, a row asking for 8px of padding puts the checkbox SQUARE 17px\n * in — and with the empty drag gutter's gap ahead of it, 46px in, which is what\n * made the left edge look like a mistake. The hit area is worth keeping; the\n * optical inset is not, so the padding is cancelled with a negative margin and\n * the glyph lands where the row's own padding says it should.\n */\nconst CHECKBOX_PAD = sxRem(-9);\n\n/** The grip. Inside a group its slot always renders, empty when unused. */\nexport function DragSlot({\n drag,\n reserve,\n testId,\n}: {\n drag: ReturnType<typeof useDragItem>;\n reserve: boolean;\n testId?: string;\n}): React.JSX.Element | null {\n if (!drag.draggable) return reserve ? <Box data-slot=\"drag\" /> : null;\n return (\n // display:flex, as on the checkbox below: the grip is an inline-grid, and in\n // a block parent an inline box sits on the text baseline — the line box adds\n // descender leading under it (21px glyph in a 31px slot) and drops the grip\n // 5px below the row's centre. A flex parent has no baseline to sit on.\n <Box\n data-slot=\"drag\"\n sx={{ position: \"relative\", zIndex: 1, display: \"flex\", alignItems: \"center\" }}\n >\n <DragHandle\n handleProps={drag.handleProps}\n gated={drag.handleProps !== undefined}\n testId={testId}\n />\n </Box>\n );\n}\n\n/** The select checkbox. Inside a group its slot always renders, empty when unused. */\nexport function SelectSlot({\n selectable,\n selected,\n reserve,\n onToggleSelect,\n testId,\n}: {\n selectable: boolean;\n selected: boolean;\n reserve: boolean;\n onToggleSelect?: (event?: React.MouseEvent) => void;\n testId?: string;\n}): React.JSX.Element | null {\n const copy = useDataViewsCopy();\n if (!selectable) return reserve ? <Box data-slot=\"select\" /> : null;\n return (\n // z-index 1: above the stretched link, or the anchor swallows the click.\n <Box\n data-slot=\"select\"\n sx={{ position: \"relative\", zIndex: 1, mx: CHECKBOX_PAD, display: \"flex\" }}\n >\n <Checkbox\n checked={selected}\n onChange={() => onToggleSelect?.()}\n onClick={(event) => {\n event.stopPropagation();\n onToggleSelect?.(event);\n }}\n size=\"small\"\n data-testid={testId}\n aria-label={copy.selection.selectRow}\n />\n </Box>\n );\n}\n\n/**\n * THE DISCLOSURE CHEVRON — the affordance that says this row has more.\n *\n * Rendered only when the card was given a body to reveal. A chevron on a row\n * that opens onto nothing is worse than no chevron: it is a promise the row\n * cannot keep, and an operator who presses it twice learns to stop trusting the\n * column. So `BaseListCard` passes `null` here when it has no children, the\n * slot returns nothing, and — standalone — the rail leaves the template\n * entirely.\n *\n * ROTATED, NOT SWAPPED. One glyph turned 90° rather than a right-chevron\n * exchanged for a down-chevron: the rotation is animatable and reads as the\n * same object moving, where a swap is two icons flickering. It also keeps the\n * button's box identical in both states, so the caption beside it cannot shift\n * as the row opens.\n *\n * `stopPropagation`, because a row is frequently clickable in its own right —\n * opening the record is not the same act as peeking at its detail, and without\n * this the chevron would do both at once.\n */\nexport function DiscloseSlot({\n expandable,\n expanded,\n reserve,\n onToggle,\n controls,\n testId,\n}: {\n expandable: boolean;\n expanded: boolean;\n reserve: boolean;\n onToggle: () => void;\n /** The id of the region this button opens, for `aria-controls`. */\n controls: string;\n testId?: string;\n}): React.JSX.Element | null {\n const copy = useDataViewsCopy();\n if (!expandable) return reserve ? <Box data-slot=\"disclose\" /> : null;\n return (\n // z-index 1 and flex for the same reasons the other two gutters use them:\n // above a stretched link that would otherwise swallow the click, and out of\n // a baseline that would drop the glyph below the row's centre.\n <Box\n data-slot=\"disclose\"\n sx={{ position: \"relative\", zIndex: 1, display: \"flex\", alignItems: \"center\" }}\n >\n <IconButton\n size=\"small\"\n aria-expanded={expanded}\n aria-controls={expanded ? controls : undefined}\n aria-label={expanded ? copy.selection.collapseRow : copy.selection.expandRow}\n data-testid={testId}\n onClick={(event) => {\n event.stopPropagation();\n onToggle();\n }}\n // The row's own keyboard handler treats Enter/Space as \"open the\n // record\"; the button already handles both, so the event must not reach\n // it and fire the second action too.\n onKeyDown={(event) => event.stopPropagation()}\n sx={{\n p: 0.25,\n transform: expanded ? \"rotate(90deg)\" : \"rotate(0deg)\",\n transition: \"transform 150ms ease\",\n // Honour a reduced-motion preference: the state is carried by the\n // angle, not by the animation, so dropping the tween loses nothing.\n \"@media (prefers-reduced-motion: reduce)\": { transition: \"none\" },\n }}\n >\n <KeyboardArrowRightIcon fontSize=\"small\" />\n </IconButton>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,OAAO,4BAA4B;AACnC,OAAO,gBAAgB;AAwCiB;AAZxC,IAAM,eAAe,MAAM,EAAE;AAGtB,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,GAI6B;AAC3B,MAAI,CAAC,KAAK,UAAW,QAAO,UAAU,oBAACA,UAAA,EAAI,aAAU,QAAO,IAAK;AACjE;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE;AAAA,MAACA;AAAA,MAAA;AAAA,QACC,aAAU;AAAA,QACV,IAAI,EAAE,UAAU,YAAY,QAAQ,GAAG,SAAS,QAAQ,YAAY,SAAS;AAAA,QAE7E;AAAA,UAAC;AAAA;AAAA,YACC,aAAa,KAAK;AAAA,YAClB,OAAO,KAAK,gBAAgB;AAAA,YAC5B;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA;AAEJ;AAGO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAM6B;AAC3B,QAAM,OAAO,iBAAiB;AAC9B,MAAI,CAAC,WAAY,QAAO,UAAU,oBAACA,UAAA,EAAI,aAAU,UAAS,IAAK;AAC/D;AAAA;AAAA,IAEE;AAAA,MAACA;AAAA,MAAA;AAAA,QACC,aAAU;AAAA,QACV,IAAI,EAAE,UAAU,YAAY,QAAQ,GAAG,IAAI,cAAc,SAAS,OAAO;AAAA,QAEzE;AAAA,UAAC;AAAA;AAAA,YACC,SAAS;AAAA,YACT,UAAU,MAAM,iBAAiB;AAAA,YACjC,SA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6DPAWXZ3.js";
|
|
7
|
+
import {
|
|
8
|
+
rem
|
|
9
|
+
} from "./chunk-YKCAJ2TN.js";
|
|
10
|
+
|
|
11
|
+
// src/components/data-display/DataViews/list-card-group-tracks.tsx
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var GUTTERS = ["disclose", "drag", "select"];
|
|
14
|
+
var filled = (gutter) => `> * > [data-slot="${gutter}"] > *`;
|
|
15
|
+
function subsets(gutters) {
|
|
16
|
+
const out = [];
|
|
17
|
+
for (let mask = 1; mask < 1 << gutters.length; mask += 1) {
|
|
18
|
+
out.push(gutters.filter((_, index) => (mask & 1 << index) !== 0));
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
function trackRules(template, railCount, candidates, compact) {
|
|
23
|
+
const rules = { gridTemplateColumns: template(/* @__PURE__ */ new Set(), compact) };
|
|
24
|
+
for (const empty of subsets(candidates)) {
|
|
25
|
+
const selector = candidates.map((gutter) => empty.includes(gutter) ? `:not(:has(${filled(gutter)}))` : `:has(${filled(gutter)})`).join("");
|
|
26
|
+
rules[`&${selector}`] = {
|
|
27
|
+
gridTemplateColumns: template(new Set(empty), compact),
|
|
28
|
+
// Every row spans what is left, or it adds an implicit track at the end.
|
|
29
|
+
// `> *`: every direct child of a group's grid is a row (DataViews renders
|
|
30
|
+
// them through fragments for exactly this reason).
|
|
31
|
+
"& > *": { gridColumn: `span ${railCount - empty.length}` },
|
|
32
|
+
...Object.fromEntries(empty.map((gutter) => [`& > * > [data-slot="${gutter}"]`, { display: "none" }]))
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return rules;
|
|
36
|
+
}
|
|
37
|
+
function groupTracksSx(theme, { template, railCount, reserveGutters }) {
|
|
38
|
+
return {
|
|
39
|
+
...trackRules(template, railCount, reserveGutters ? [] : GUTTERS, false),
|
|
40
|
+
[`@container (max-width: ${rem(theme, COMPACT_BREAK)})`]: trackRules(
|
|
41
|
+
template,
|
|
42
|
+
railCount,
|
|
43
|
+
reserveGutters ? ["drag"] : GUTTERS,
|
|
44
|
+
true
|
|
45
|
+
)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function GroupGrid({
|
|
49
|
+
dataTestId,
|
|
50
|
+
tracks,
|
|
51
|
+
rowGap,
|
|
52
|
+
children
|
|
53
|
+
}) {
|
|
54
|
+
return /* @__PURE__ */ jsx(default2, { sx: { containerType: "inline-size", width: "100%", minWidth: 0 }, children: /* @__PURE__ */ jsx(
|
|
55
|
+
default2,
|
|
56
|
+
{
|
|
57
|
+
"data-testid": dataTestId,
|
|
58
|
+
sx: (theme) => ({ display: "grid", ...groupTracksSx(theme, tracks), alignItems: "center", rowGap }),
|
|
59
|
+
children
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
groupTracksSx,
|
|
66
|
+
GroupGrid
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=chunk-U3HEYECF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/list-card-group-tracks.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Theme } from \"@mui/material/styles/index.js\";\nimport type { ReactNode } from \"react\";\n\nimport { Box } from \"../../../mui/Box\";\nimport { rem } from \"../../../tokens/relative\";\nimport { COMPACT_BREAK } from \"./list-card-breaks\";\n\n/**\n * A GROUP'S TRACKS, AND WHICH OF ITS HEAD GUTTERS GET ONE.\n *\n * Every row of a group is subgrid over one template, so the tracks cannot vary\n * per row — but the group does not render its rows' gutters and cannot count\n * which of them are in use. The rows answer that for it: inside a group every\n * gutter slot renders, as an EMPTY element when the row does not use it, and\n * the group asks with `:has()` whether any row's slot has content. A gutter no\n * row fills loses its track (and its rail gap) and its placeholders are hidden,\n * so auto-placement has nothing to put in the wrong column; one any row fills\n * is a track for every row, so the list still lines up.\n *\n * WHICH GUTTERS MAY LEAVE:\n * - `reserveGutters={false}`: any of the three, at every width.\n * - reserved (the default): only the drag gutter, and only in the compact\n * band. Held open it keeps a selectable list and a read-only one aligned\n * and stops drag mode shifting every row; on a phone-sized row, with no\n * row dragging, it is a rail gap spent on nothing.\n *\n * Each rule names every candidate gutter, empty or filled, so exactly one rule\n * matches a given list and none depends on another's specificity to lose.\n */\n\nexport type Gutter = \"disclose\" | \"drag\" | \"select\";\n\nconst GUTTERS: readonly Gutter[] = [\"disclose\", \"drag\", \"select\"];\n\n/** A `:has()` argument true when some row's `gutter` slot has content. */\nconst filled = (gutter: Gutter): string => `> * > [data-slot=\"${gutter}\"] > *`;\n\n/** Every non-empty subset of `gutters`, in a stable order. */\nfunction subsets(gutters: readonly Gutter[]): Gutter[][] {\n const out: Gutter[][] = [];\n for (let mask = 1; mask < 1 << gutters.length; mask += 1) {\n out.push(gutters.filter((_, index) => (mask & (1 << index)) !== 0));\n }\n return out;\n}\n\n/** The template for a list with `dropped` gutters, plain or compact. */\nexport type GroupTemplate = (dropped: ReadonlySet<Gutter>, compact: boolean) => string;\n\n/**\n * The rules for one width: the template with no gutter dropped, then one rule\n * per combination of empty candidate gutters.\n */\nfunction trackRules(\n template: GroupTemplate,\n railCount: number,\n candidates: readonly Gutter[],\n compact: boolean,\n): Record<string, unknown> {\n const rules: Record<string, unknown> = { gridTemplateColumns: template(new Set(), compact) };\n for (const empty of subsets(candidates)) {\n const selector = candidates\n .map((gutter) => (empty.includes(gutter) ? `:not(:has(${filled(gutter)}))` : `:has(${filled(gutter)})`))\n .join(\"\");\n rules[`&${selector}`] = {\n gridTemplateColumns: template(new Set(empty), compact),\n // Every row spans what is left, or it adds an implicit track at the end.\n // `> *`: every direct child of a group's grid is a row (DataViews renders\n // them through fragments for exactly this reason).\n \"& > *\": { gridColumn: `span ${railCount - empty.length}` },\n ...Object.fromEntries(empty.map((gutter) => [`& > * > [data-slot=\"${gutter}\"]`, { display: \"none\" }])),\n };\n }\n return rules;\n}\n\n/** The group grid's `grid-template-columns`, at every width it answers. */\nexport function groupTracksSx(\n theme: Theme,\n { template, railCount, reserveGutters }: { template: GroupTemplate; railCount: number; reserveGutters: boolean },\n): Record<string, unknown> {\n return {\n ...trackRules(template, railCount, reserveGutters ? [] : GUTTERS, false),\n [`@container (max-width: ${rem(theme, COMPACT_BREAK)})`]: trackRules(\n template,\n railCount,\n reserveGutters ? [\"drag\"] : GUTTERS,\n true,\n ),\n };\n}\n\n/**\n * The group's grid, inside its query container — the container for every row\n * in it: a row cannot be one itself and a subgrid at the same time\n * (containment drops subgrid), and every row in a list is the same width\n * anyway, so the group is the honest place to ask the question.\n *\n * A WRAPPER, not the grid: a container query matches an ancestor, never the\n * element itself, and the grid's own template has to answer the width (the\n * compact band, `list-card-group-tracks`). The rows stay the GRID's direct\n * children, which subgrid needs.\n */\nexport function GroupGrid({\n dataTestId,\n tracks,\n rowGap,\n children,\n}: {\n dataTestId?: string;\n tracks: Parameters<typeof groupTracksSx>[1];\n rowGap: number;\n children: ReactNode;\n}): React.JSX.Element {\n return (\n <Box sx={{ containerType: \"inline-size\", width: \"100%\", minWidth: 0 }}>\n <Box\n data-testid={dataTestId}\n sx={(theme) => ({ display: \"grid\", ...groupTracksSx(theme, tracks), alignItems: \"center\", rowGap })}\n >\n {children}\n </Box>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;AAsHM;AApFN,IAAM,UAA6B,CAAC,YAAY,QAAQ,QAAQ;AAGhE,IAAM,SAAS,CAAC,WAA2B,qBAAqB,MAAM;AAGtE,SAAS,QAAQ,SAAwC;AACvD,QAAM,MAAkB,CAAC;AACzB,WAAS,OAAO,GAAG,OAAO,KAAK,QAAQ,QAAQ,QAAQ,GAAG;AACxD,QAAI,KAAK,QAAQ,OAAO,CAAC,GAAG,WAAW,OAAQ,KAAK,WAAY,CAAC,CAAC;AAAA,EACpE;AACA,SAAO;AACT;AASA,SAAS,WACP,UACA,WACA,YACA,SACyB;AACzB,QAAM,QAAiC,EAAE,qBAAqB,SAAS,oBAAI,I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|
|
155
155
|
formats: {
|
|
156
156
|
json: { label: "JSON (.json)", hint: "Para integra\xE7\xF5es" }
|
|
157
157
|
},
|
|
158
|
+
scopeLine: (selectedCount, totalCount) => selectedCount > 0 ? `Exportando ${selectedCount} ${selectedCount === 1 ? "item selecionado" : "itens selecionados"}` : `Exportando ${totalCount} ${totalCount === 1 ? "item filtrado" : "itens filtrados"}`,
|
|
158
159
|
visibleColumns: (columnCount) => `${columnCount} colunas vis\xEDveis, na ordem atual`,
|
|
159
160
|
trigger: "Exportar",
|
|
160
161
|
triggerLabel: "Exportar"
|
|
@@ -248,4 +249,4 @@ export {
|
|
|
248
249
|
PT_BR_DATA_STATE_COPY,
|
|
249
250
|
PT_BR_DATA_VIEWS_COPY
|
|
250
251
|
};
|
|
251
|
-
//# sourceMappingURL=chunk-
|
|
252
|
+
//# sourceMappingURL=chunk-U57NFQYE.js.map
|