@12-apps/ui 6.67.0 → 6.69.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.
Files changed (148) hide show
  1. package/dist/_internal/components/data-display/Chip/Chip.js +3 -3
  2. package/dist/_internal/components/data-display/Chip/Chip.metrics.js +5 -1
  3. package/dist/_internal/components/data-display/Chip/Chip.styles.js +2 -2
  4. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +12 -12
  5. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +13 -13
  6. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +4 -4
  7. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +11 -11
  8. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +6 -6
  9. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +3 -3
  10. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +4 -4
  11. package/dist/_internal/components/data-display/DataViews/data-views-overflow-costs.js +1 -1
  12. package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js +2 -2
  13. package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +3 -3
  14. package/dist/_internal/components/data-display/index.js +3 -3
  15. package/dist/_internal/components/feedback/StackedModal/StackedModal.js +3 -3
  16. package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
  17. package/dist/_internal/components/feedback/StackedModal/StackedModal.styles.js +1 -1
  18. package/dist/_internal/components/feedback/index.js +3 -3
  19. package/dist/_internal/components/index.js +14 -14
  20. package/dist/_internal/components/layout/SettingCard/SettingCard.js +6 -6
  21. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +4 -4
  22. package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +5 -5
  23. package/dist/_internal/components/layout/SettingCard/SettingGrid.js +5 -5
  24. package/dist/_internal/components/layout/SettingCard/SettingGroup.js +7 -7
  25. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +6 -6
  26. package/dist/_internal/components/layout/SettingCard/SettingToggle.js +7 -7
  27. package/dist/_internal/components/layout/index.js +10 -10
  28. package/dist/_internal/components/navigation/Tabs/Tabs.js +1 -1
  29. package/dist/_internal/components/navigation/index.js +1 -1
  30. package/dist/{chunk-AAXLQFC7.js → chunk-3FIIMP7I.js} +2 -2
  31. package/dist/{chunk-6A6GZRXD.js → chunk-3VXS7O3X.js} +2 -2
  32. package/dist/{chunk-P3USTYIO.js → chunk-62YHJAWM.js} +2 -2
  33. package/dist/chunk-62YHJAWM.js.map +1 -0
  34. package/dist/{chunk-GCYGVWOI.js → chunk-AMT7IJYV.js} +2 -2
  35. package/dist/{chunk-HYQJJLBC.js → chunk-DHAXUVMR.js} +27 -3
  36. package/dist/chunk-DHAXUVMR.js.map +1 -0
  37. package/dist/{chunk-AHNEEFK6.js → chunk-E5GYHN4X.js} +3 -3
  38. package/dist/{chunk-KU6VHNRV.js → chunk-E5I776YW.js} +6 -2
  39. package/dist/{chunk-KU6VHNRV.js.map → chunk-E5I776YW.js.map} +1 -1
  40. package/dist/{chunk-T7ZERP7A.js → chunk-EYW6KXUC.js} +2 -2
  41. package/dist/{chunk-DNT5PZLF.js → chunk-GZOW6HNN.js} +4 -3
  42. package/dist/{chunk-DNT5PZLF.js.map → chunk-GZOW6HNN.js.map} +1 -1
  43. package/dist/{chunk-SAJDNO43.js → chunk-IGMD6S76.js} +3 -3
  44. package/dist/{chunk-EZFQO77P.js → chunk-IPYV7BLH.js} +2 -2
  45. package/dist/{chunk-QAZLQYSD.js → chunk-JCHJYBDG.js} +2 -2
  46. package/dist/{chunk-QAZLQYSD.js.map → chunk-JCHJYBDG.js.map} +1 -1
  47. package/dist/{chunk-TNVO3EVF.js → chunk-KT3TF2LT.js} +5 -3
  48. package/dist/chunk-KT3TF2LT.js.map +1 -0
  49. package/dist/{chunk-7JS2SPRW.js → chunk-LKRXLWCC.js} +3 -3
  50. package/dist/{chunk-5RC7WAHH.js → chunk-LY6L3DMB.js} +13 -9
  51. package/dist/chunk-LY6L3DMB.js.map +1 -0
  52. package/dist/{chunk-EWTSQTVR.js → chunk-NI67M453.js} +6 -5
  53. package/dist/chunk-NI67M453.js.map +1 -0
  54. package/dist/{chunk-CMLIWUBW.js → chunk-QPCHABOZ.js} +24 -1
  55. package/dist/chunk-QPCHABOZ.js.map +1 -0
  56. package/dist/{chunk-WTGIW7LX.js → chunk-SAXALTRL.js} +2 -2
  57. package/dist/{chunk-CSLBRJ7N.js → chunk-SOQIWXFO.js} +9 -9
  58. package/dist/chunk-SOQIWXFO.js.map +1 -0
  59. package/dist/{chunk-TQXB2OHP.js → chunk-TLPFSA55.js} +3 -3
  60. package/dist/{chunk-KUFDUXYB.js → chunk-U6ODZJCH.js} +2 -2
  61. package/dist/{chunk-3PGY4UL4.js → chunk-YKQA4NPM.js} +37 -7
  62. package/dist/chunk-YKQA4NPM.js.map +1 -0
  63. package/dist/{chunk-XMVPNCYM.js → chunk-YQGVO3ZU.js} +3 -3
  64. package/dist/{chunk-OJFE5PK6.js → chunk-ZZO5MRMV.js} +2 -2
  65. package/dist/data-display/Chip.js +3 -3
  66. package/dist/data-display/DataViews.js +13 -13
  67. package/dist/feedback/StackedModal.js +3 -3
  68. package/dist/layout/SettingCard.js +10 -10
  69. package/dist/native/data-display/Chip.js +20 -1
  70. package/dist/native/data-display/Chip.js.map +1 -1
  71. package/dist/navigation/Tabs.js +1 -1
  72. package/dist/types/components/data-display/Chip/Chip.base.d.ts +5 -1
  73. package/dist/types/components/data-display/Chip/Chip.base.d.ts.map +1 -1
  74. package/dist/types/components/data-display/Chip/Chip.d.ts.map +1 -1
  75. package/dist/types/components/data-display/Chip/Chip.metrics.d.ts +4 -0
  76. package/dist/types/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
  77. package/dist/types/components/data-display/Chip/Chip.styles.d.ts +2 -7
  78. package/dist/types/components/data-display/Chip/Chip.styles.d.ts.map +1 -1
  79. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +7 -0
  80. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
  81. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +2 -0
  82. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
  83. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +2 -0
  84. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
  85. package/dist/types/components/data-display/DataViews/data-views-overflow-costs.d.ts +6 -2
  86. package/dist/types/components/data-display/DataViews/data-views-overflow-costs.d.ts.map +1 -1
  87. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts +1 -1
  88. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
  89. package/dist/types/components/feedback/StackedModal/StackedModal.d.ts.map +1 -1
  90. package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts +2 -1
  91. package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts.map +1 -1
  92. package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts +17 -0
  93. package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts.map +1 -1
  94. package/dist/types/components/feedback/StackedModal/index.d.ts +1 -1
  95. package/dist/types/components/feedback/StackedModal/index.d.ts.map +1 -1
  96. package/dist/types/components/navigation/Tabs/Tabs.d.ts.map +1 -1
  97. package/dist/types/components/navigation/Tabs/Tabs.types.d.ts +12 -0
  98. package/dist/types/components/navigation/Tabs/Tabs.types.d.ts.map +1 -1
  99. package/dist/types/components/navigation/Tabs/index.d.ts +1 -1
  100. package/dist/types/components/navigation/Tabs/index.d.ts.map +1 -1
  101. package/dist/types-native/components/data-display/Chip/Chip.base.d.ts +5 -1
  102. package/dist/types-native/components/data-display/Chip/Chip.base.d.ts.map +1 -1
  103. package/dist/types-native/components/data-display/Chip/Chip.look.native.d.ts.map +1 -1
  104. package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts +4 -0
  105. package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
  106. package/package.json +1 -1
  107. package/src/components/data-display/Chip/Chip.base.ts +5 -1
  108. package/src/components/data-display/Chip/Chip.look.native.ts +22 -1
  109. package/src/components/data-display/Chip/Chip.metrics.ts +5 -0
  110. package/src/components/data-display/Chip/Chip.styles.tsx +38 -1
  111. package/src/components/data-display/Chip/Chip.tsx +6 -2
  112. package/src/components/data-display/Chip/chip.md +2 -2
  113. package/src/components/data-display/DataViews/DataViewsGrid.tsx +7 -0
  114. package/src/components/data-display/DataViews/DataViewsTableBase.tsx +2 -0
  115. package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +10 -0
  116. package/src/components/data-display/DataViews/data-views-grid-parts.tsx +11 -1
  117. package/src/components/data-display/DataViews/data-views-overflow-costs.ts +8 -3
  118. package/src/components/data-display/DataViews/data-views-overflow.ts +6 -4
  119. package/src/components/feedback/StackedModal/StackedModal.md +1 -0
  120. package/src/components/feedback/StackedModal/StackedModal.styles.ts +53 -6
  121. package/src/components/feedback/StackedModal/StackedModal.tsx +2 -1
  122. package/src/components/feedback/StackedModal/StackedModal.types.ts +17 -0
  123. package/src/components/feedback/StackedModal/index.ts +1 -1
  124. package/src/components/navigation/Tabs/Tabs.md +1 -0
  125. package/src/components/navigation/Tabs/Tabs.tsx +30 -1
  126. package/src/components/navigation/Tabs/Tabs.types.ts +14 -0
  127. package/src/components/navigation/Tabs/index.ts +1 -1
  128. package/dist/chunk-3PGY4UL4.js.map +0 -1
  129. package/dist/chunk-5RC7WAHH.js.map +0 -1
  130. package/dist/chunk-CMLIWUBW.js.map +0 -1
  131. package/dist/chunk-CSLBRJ7N.js.map +0 -1
  132. package/dist/chunk-EWTSQTVR.js.map +0 -1
  133. package/dist/chunk-HYQJJLBC.js.map +0 -1
  134. package/dist/chunk-P3USTYIO.js.map +0 -1
  135. package/dist/chunk-TNVO3EVF.js.map +0 -1
  136. /package/dist/{chunk-AAXLQFC7.js.map → chunk-3FIIMP7I.js.map} +0 -0
  137. /package/dist/{chunk-6A6GZRXD.js.map → chunk-3VXS7O3X.js.map} +0 -0
  138. /package/dist/{chunk-GCYGVWOI.js.map → chunk-AMT7IJYV.js.map} +0 -0
  139. /package/dist/{chunk-AHNEEFK6.js.map → chunk-E5GYHN4X.js.map} +0 -0
  140. /package/dist/{chunk-T7ZERP7A.js.map → chunk-EYW6KXUC.js.map} +0 -0
  141. /package/dist/{chunk-SAJDNO43.js.map → chunk-IGMD6S76.js.map} +0 -0
  142. /package/dist/{chunk-EZFQO77P.js.map → chunk-IPYV7BLH.js.map} +0 -0
  143. /package/dist/{chunk-7JS2SPRW.js.map → chunk-LKRXLWCC.js.map} +0 -0
  144. /package/dist/{chunk-WTGIW7LX.js.map → chunk-SAXALTRL.js.map} +0 -0
  145. /package/dist/{chunk-TQXB2OHP.js.map → chunk-TLPFSA55.js.map} +0 -0
  146. /package/dist/{chunk-KUFDUXYB.js.map → chunk-U6ODZJCH.js.map} +0 -0
  147. /package/dist/{chunk-XMVPNCYM.js.map → chunk-YQGVO3ZU.js.map} +0 -0
  148. /package/dist/{chunk-OJFE5PK6.js.map → chunk-ZZO5MRMV.js.map} +0 -0
@@ -2,22 +2,22 @@ import "../../../chunk-AEMD6JHZ.js";
2
2
  import "../../../chunk-QGUNUXTT.js";
3
3
  import {
4
4
  SettingToggle
5
- } from "../../../chunk-EZFQO77P.js";
5
+ } from "../../../chunk-IPYV7BLH.js";
6
6
  import {
7
7
  SettingGroup
8
- } from "../../../chunk-SAJDNO43.js";
9
- import "../../../chunk-7JS2SPRW.js";
8
+ } from "../../../chunk-IGMD6S76.js";
9
+ import "../../../chunk-LKRXLWCC.js";
10
10
  import "../../../chunk-XJQNSMGA.js";
11
11
  import {
12
12
  SETTING_GRID_CONTAINER,
13
13
  SettingGrid
14
- } from "../../../chunk-KUFDUXYB.js";
14
+ } from "../../../chunk-U6ODZJCH.js";
15
15
  import {
16
16
  SettingCard
17
- } from "../../../chunk-XMVPNCYM.js";
17
+ } from "../../../chunk-YQGVO3ZU.js";
18
18
  import "../../../chunk-SALQ65SM.js";
19
- import "../../../chunk-AAXLQFC7.js";
20
- import "../../../chunk-OJFE5PK6.js";
19
+ import "../../../chunk-3FIIMP7I.js";
20
+ import "../../../chunk-ZZO5MRMV.js";
21
21
  import "../../../chunk-IQWPVPV5.js";
22
22
  import "../../../chunk-BFRVMCQM.js";
23
23
  import "../../../chunk-AY7LXHAJ.js";
@@ -90,9 +90,9 @@ import "../../../chunk-G3JFESKD.js";
90
90
  import "../../../chunk-QYJ25FWM.js";
91
91
  import "../../../chunk-BCWL7HUO.js";
92
92
  import "../../../chunk-2GTORM5E.js";
93
- import "../../../chunk-EWTSQTVR.js";
94
- import "../../../chunk-HYQJJLBC.js";
95
- import "../../../chunk-KU6VHNRV.js";
93
+ import "../../../chunk-NI67M453.js";
94
+ import "../../../chunk-DHAXUVMR.js";
95
+ import "../../../chunk-E5I776YW.js";
96
96
  import "../../../chunk-BF4FYOAR.js";
97
97
  import "../../../chunk-4NS4PJJH.js";
98
98
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Tabs
3
- } from "../../../../chunk-CMLIWUBW.js";
3
+ } from "../../../../chunk-QPCHABOZ.js";
4
4
  import "../../../../chunk-GNCSDUGY.js";
5
5
  import "../../../../chunk-QMHS6ZDI.js";
6
6
  import "../../../../chunk-RGVNXES5.js";
@@ -44,7 +44,7 @@ import "../../../chunk-P3GBXE73.js";
44
44
  import "../../../chunk-R445KMGG.js";
45
45
  import {
46
46
  Tabs
47
- } from "../../../chunk-CMLIWUBW.js";
47
+ } from "../../../chunk-QPCHABOZ.js";
48
48
  import "../../../chunk-GNCSDUGY.js";
49
49
  import "../../../chunk-QMHS6ZDI.js";
50
50
  import "../../../chunk-5CUKSNWG.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  partTestId
3
- } from "./chunk-OJFE5PK6.js";
3
+ } from "./chunk-ZZO5MRMV.js";
4
4
  import {
5
5
  SETTING_CARD
6
6
  } from "./chunk-BFRVMCQM.js";
@@ -92,4 +92,4 @@ export {
92
92
  SummaryInfo,
93
93
  useSummaryInfo
94
94
  };
95
- //# sourceMappingURL=chunk-AAXLQFC7.js.map
95
+ //# sourceMappingURL=chunk-3FIIMP7I.js.map
@@ -4,7 +4,7 @@ import {
4
4
  titleLeftStyles,
5
5
  titleRightStyles,
6
6
  titleStyles
7
- } from "./chunk-3PGY4UL4.js";
7
+ } from "./chunk-YKQA4NPM.js";
8
8
  import {
9
9
  safeAreaBottom
10
10
  } from "./chunk-AKZWDZCZ.js";
@@ -253,4 +253,4 @@ export {
253
253
  ModalFooter,
254
254
  ModalPanelContents
255
255
  };
256
- //# sourceMappingURL=chunk-6A6GZRXD.js.map
256
+ //# sourceMappingURL=chunk-3VXS7O3X.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-ZEVFMQAQ.js";
4
4
  import {
5
5
  DataViewsGrid
6
- } from "./chunk-QAZLQYSD.js";
6
+ } from "./chunk-JCHJYBDG.js";
7
7
  import {
8
8
  viewStateKey
9
9
  } from "./chunk-ZOLAYP2D.js";
@@ -166,4 +166,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
166
166
  export {
167
167
  DataViewsTableBase
168
168
  };
169
- //# sourceMappingURL=chunk-P3USTYIO.js.map
169
+ //# sourceMappingURL=chunk-62YHJAWM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/DataViewsTableBase.tsx"],"sourcesContent":["\"use client\";\n\nimport type { SortFieldDefinition } from \"../../layout/ContentToolbar\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport { DataViewsGrid } from \"./DataViewsGrid\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport { viewStateKey } from \"./data-views-dirty\";\nimport { DeleteViewDialog } from \"./DeleteViewDialog\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { ViewDialogs, ViewMutationErrorAlert } from \"./data-views-table-parts\";\nimport { useUrlEchoGuard, useUrlSyncState } from \"./data-views-url-echo\";\nimport {\n useSavedViewsController,\n type SavedViewsController,\n} from \"./use-saved-views-controller\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewPersistence,\n type DataViewRouter,\n type FilterFieldConfig,\n type QuickFilterConfig,\n type RangeFieldConfig,\n type DataViewCardSelection,\n type RowAction,\n type SavedViewSummary,\n} from \"./data-views-types\";\n\nexport interface DataViewsTableBaseProps<T extends Record<string, unknown>> {\n /** The applied-view id read from the URL (`?view=`) on load, or null. */\n initialViewId?: string | null;\n /** Injected saved-view persistence (create/update/delete). */\n persistence: DataViewPersistence;\n /** Injected router side-effects (URL sync + refresh). */\n router: DataViewRouter;\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** The user's + shared views for this table (from the server). */\n views: SavedViewSummary[];\n /** Big page title in the table header, beside the funnel + gear (GTA layout). */\n title?: string;\n /** Primary page actions (e.g. \"Novo produto\") rendered at the header's right. */\n headerActions?: React.ReactNode;\n /** Sort options for the toolbar's \"Sort By\" dropdown (defaults to sortable columns). */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /** Notified with the currently-visible (filtered) rows, so Export matches the view. */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Reusable row actions driving both the row \"⋮\" kebab and the bulk menu. */\n rowActions?: RowAction<T>[];\n /** Leading control in the auto kebab column (e.g. a favourite star). */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /** Low-level bulk-action override; prefer `rowActions`. */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /** A selection-widening control beside the count (e.g. \"select all matching\"). */\n selectionExtra?: SelectionExtraRender<T>;\n /** Bespoke per-row menu (an entity's self-contained 3-dots menu) instead of the auto kebab. */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Row selection, default `true`. `false` draws no checkbox in any layout and\n * no select-all, so the toolbar's selection mode can never hide the search,\n * the pills and Exportar — for a grid with no bulk action. Row click and the\n * row menu are unaffected.\n */\n selectable?: boolean;\n /** Opt-in expandable rows (table layout only) — see {@link DataViewRowDetail}. */\n rowDetail?: DataViewRowDetail<T>;\n /** Opt-in \"Grade\" (cards) layout — a card renderer per row; adds a Grade/Tabela toggle. */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** Opt-in \"Quadro\" (board) layout — the loaded page as columns of one field. Needs `renderCard`. */\n board?: BoardConfig<T>;\n /** Opt-in \"Lista\" layout — one full-width, entity-rendered row per record (FUT-733). */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /** The Lista's shared columns, so its rows line up by construction not convention. */\n listGroup?: ListGroupConfig<T>;\n /** The page-level partition rendered as tabs under the toolbar (server mode only). */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /** Opt into the responsive inline filter UX (collapsible row / modal). Default keeps the panel. */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /** One-click toggle chips at the head of the toolbar — see `QuickFilterConfig`. */\n quickFilters?: QuickFilterConfig[];\n /** Pin the toolbar and the table header while the page scrolls — see `DataViewsGrid`. */\n stickyToolbar?: boolean;\n /** Show the \"N de N\" counter (default `true`) — see `DataViewsGrid`. */\n showCounter?: boolean;\n /** Server-mode wiring (FUT-180): backend-driven rows/total + re-fetch. Omit for client mode. */\n server?: DataViewServer;\n /** Seed the initial view state (search/pills/ranges/sort) from the URL when no saved view applies. */\n initialState?: DataViewState;\n}\n\n/**\n * Resolve the initial applied view: a `?view=<id>` shortcut (FUT-90) wins, else\n * the user's default view, else none. Drives the seed state + trigger label.\n */\nfunction resolveInitialView(\n views: SavedViewSummary[],\n requestedId: string | null,\n): SavedViewSummary | undefined {\n const requested = requestedId ? views.find((view) => view.id === requestedId) : undefined;\n return requested ?? views.find((view) => view.isDefault);\n}\n\n/**\n * The Exibir panel's view chrome, assembled from the saved-views controller.\n * Extracted so {@link DataViewsTableBase} stays inside its size budget.\n */\nfunction buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete,\n}: {\n ctl: SavedViewsController;\n views: SavedViewSummary[];\n activeView: SavedViewSummary | undefined;\n dirty: boolean;\n /** Opens the confirmation; the delete itself happens on confirm. */\n onRequestDelete: (view: SavedViewSummary) => void;\n}): DisplayPanelView {\n return {\n activeViewName: ctl.activeViewName,\n dirty,\n onReset: () => (activeView ? ctl.applyView(activeView) : ctl.selectMain()),\n // Only offer \"Atualizar\" when there IS a view to update — otherwise the\n // single footer button is a plain \"Salvar visão\".\n onUpdate: activeView ? () => ctl.openEdit(activeView) : undefined,\n onSaveAs: ctl.openCreate,\n // The views themselves, not a dropdown: the panel renders them in its own\n // body (see `data-views-view-nav`), so there is no second popover to clip\n // the row actions.\n nav: {\n views,\n activeViewId: activeView?.id ?? null,\n onSelectView: (id) => {\n const next = id === null ? null : views.find((view) => view.id === id);\n if (next) ctl.applyView(next);\n else ctl.selectMain();\n },\n onEditView: ctl.openEdit,\n onPatchView: (view, changes) => void ctl.patchView(view, changes),\n onDeleteView: onRequestDelete,\n },\n };\n}\n\n/**\n * \"Are there unsaved changes?\" — the dot on Exibir, and whether Redefinir and\n * Salvar visão are live.\n *\n * Two things it gets right that the inline version did not. It compares\n * NORMALISED states (`viewStateKey`), so a filter applied and then removed is\n * clean again rather than clean-looking but flagged; and it re-baselines after\n * a SAVE, because the state just written is the clean one from that point.\n *\n * The baseline is the first state the grid emits for a view, not the view\n * itself: the grid normalises what it is handed — resolving visible columns,\n * filling in layout — so the applied view is never byte-identical to the state\n * it produces.\n */\nfunction useDirtyTracking(ctl: SavedViewsController): {\n dirty: boolean;\n noteState: (state: DataViewState) => void;\n markSaved: () => void;\n} {\n const [dirty, setDirty] = useState(false);\n const [savedAt, setSavedAt] = useState(0);\n const baseline = useRef<string | null>(null);\n const appliedKey = JSON.stringify(ctl.applied ?? null);\n\n useEffect(() => {\n baseline.current = null;\n setDirty(false);\n }, [appliedKey, savedAt]);\n\n return {\n dirty,\n noteState: (state) => {\n ctl.currentRef.current = state;\n const key = viewStateKey(state);\n if (baseline.current === null) {\n baseline.current = key;\n setDirty(false);\n return;\n }\n const next = key !== baseline.current;\n setDirty((prev) => (prev === next ? prev : next));\n },\n markSaved: () => setSavedAt((tick) => tick + 1),\n };\n}\n\n/**\n * The reusable admin table (FUT-89): the DataViews grid plus the full saved-views\n * experience — a views dropdown, a save/edit modal (with preview), and a manage\n * dialog. Framework-agnostic: saved-view persistence and router side-effects are\n * INJECTED (`persistence`, `router`, `initialViewId`) so the host app wires them\n * to its backend + framework router. A default view auto-applies on load; applying\n * a view restores its filters + columns + sort. Each table supplies its own columns\n * + filter fields; everything else is shared.\n */\nexport function DataViewsTableBase<T extends Record<string, unknown>>(\n props: DataViewsTableBaseProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice (as in\n // DataViewsGrid): this component only ADDS the saved-views chrome, and a\n // 30-name destructure repeated in the JSX is exactly where a newly added prop\n // silently stops being passed on.\n const {\n initialViewId = null,\n persistence,\n router,\n columns,\n fields,\n testIdPrefix = \"table\",\n views,\n server,\n initialState,\n } = props;\n const initialView = resolveInitialView(views, initialViewId);\n const columnIds = columns.map((col) => col.id);\n const ctl = useSavedViewsController(persistence, router, columnIds, views, initialView, initialState);\n // Unsaved-changes flag for the Exibir panel. Set from `onStateChange` rather\n // than derived in render because the live state lives in a REF (the grid owns\n // it); the equality bail-out in `setDirty` is what stops the update loop.\n const { dirty, noteState, markSaved } = useDirtyTracking(ctl);\n // Deleting a saved view is confirmed, not immediate — see `DeleteViewDialog`.\n const [pendingDelete, setPendingDelete] = useState<SavedViewSummary | null>(null);\n // The view the panel's \"Redefinir\" restores: the applied one, or the built-in\n // \"Visão principal\" when none is.\n const activeView = views.find((view) => view.name === ctl.activeViewName);\n const displayView = buildDisplayView({\n ctl,\n views,\n activeView,\n dirty,\n onRequestDelete: setPendingDelete,\n });\n // Server-mode lists re-apply URL-derived controls on back/forward (not just\n // the mount seed), but never the grid's own query echoing back through the URL.\n const echo = useUrlEchoGuard(server);\n const syncState = useUrlSyncState(echo.server, initialState, echo.consumeEcho);\n\n return (\n <>\n <ViewMutationErrorAlert error={ctl.mutationError} onClose={ctl.clearMutationError} testIdPrefix={testIdPrefix} />\n <DataViewsGrid<T>\n {...props}\n server={echo.server}\n testIdPrefix={testIdPrefix}\n appliedState={ctl.applied}\n syncState={syncState}\n onStateChange={noteState}\n // The saved-views menu is NOT a toolbar control any more: it lives in\n // the Exibir panel's VISÃO header, passed through `displayView`.\n displayView={displayView}\n />\n {renderViewDialogs(ctl, fields, columns, views, testIdPrefix, markSaved)}\n <DeleteViewDialog\n view={pendingDelete}\n onClose={() => setPendingDelete(null)}\n onConfirm={(view) => {\n void ctl.handleDelete(view);\n setPendingDelete(null);\n }}\n testIdPrefix={testIdPrefix}\n />\n </>\n );\n}\n\n/** The save + manage saved-view dialogs, split out to keep the base thin. */\nfunction renderViewDialogs<T extends Record<string, unknown>>(\n ctl: SavedViewsController,\n fields: DataViewsTableBaseProps<T>[\"fields\"],\n columns: DataViewsTableBaseProps<T>[\"columns\"],\n views: SavedViewSummary[],\n testIdPrefix: string,\n onSaved: () => void,\n): React.JSX.Element {\n return (\n <ViewDialogs<T>\n saveOpen={ctl.saveOpen}\n onCloseSave={ctl.closeSave}\n currentState={ctl.editing ? ctl.editing.state : ctl.currentRef.current}\n fields={fields}\n columns={columns}\n editing={ctl.editing}\n onSave={async (payload) => {\n await ctl.handleSave(payload);\n // The saved state is the clean one from here on.\n onSaved();\n }}\n manageOpen={ctl.manageOpen}\n onCloseManage={() => ctl.setManageOpen(false)}\n views={views}\n onEditFromManage={ctl.editFromManage}\n onDelete={(view) => void ctl.handleDelete(view)}\n testIdPrefix={testIdPrefix}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,WAAW,QAAQ,gBAAgB;AAyRxC,mBACE,KADF;AAtJJ,SAAS,mBACP,OACA,aAC8B;AAC9B,QAAM,YAAY,cAAc,MAAM,KAAK,CAAC,SAAS,KAAK,OAAO,WAAW,IAAI;AAChF,SAAO,aAAa,MAAM,KAAK,CAAC,SAAS,KAAK,SAAS;AACzD;AAMA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAOqB;AACnB,SAAO;AAAA,IACL,gBAAgB,IAAI;AAAA,IACpB;AAAA,IACA,SAAS,MAAO,aAAa,IAAI,UAAU,UAAU,IAAI,IAAI,WAAW;AAAA;AAAA;AAAA,IAGxE,UAAU,aAAa,MAAM,IAAI,SAAS,UAAU,IAAI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,QAAQ,QAAQ,IAAI,WAAW;AAAA,MAC/D;AAAA,MACA;AAAA,MACA,SAAS,IAAI;AAAA,MACb,QAAQ,OAAO,YAAY;AACzB,cAAM,IAAI,WAAW,OAAO;AAE5B,gBAAQ;AAAA,MACV;AAAA,MACA,YAAY,IAAI;AAAA,MAChB,eAAe,MAAM,IAAI,cAAc,KAAK;AAAA,MAC5C;AAAA,MACA,kBAAkB,IAAI;AAAA,MACtB,UAAU,CAAC,SAAS,KAAK,IAAI,aAAa,IAAI;AAAA,MAC9C;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isRangeSet
3
- } from "./chunk-DNT5PZLF.js";
3
+ } from "./chunk-GZOW6HNN.js";
4
4
 
5
5
  // src/components/data-display/DataViews/data-views-overflow-fields.ts
6
6
  function toOverflowFields(fields, rangeFields, quickFilters = []) {
@@ -56,4 +56,4 @@ export {
56
56
  keepChipsInOrder,
57
57
  toggleQuick
58
58
  };
59
- //# sourceMappingURL=chunk-GCYGVWOI.js.map
59
+ //# sourceMappingURL=chunk-AMT7IJYV.js.map
@@ -3,8 +3,10 @@ import {
3
3
  CHIP_TRANSITION_EASING,
4
4
  CHIP_TRANSITION_MS,
5
5
  HOVER_LIFT_PX,
6
- HOVER_SHADOW
7
- } from "./chunk-KU6VHNRV.js";
6
+ HOVER_SHADOW,
7
+ SOFT_GROUND_ALPHA,
8
+ SOFT_HOVER_ALPHA
9
+ } from "./chunk-E5I776YW.js";
8
10
  import {
9
11
  chipKeyAction
10
12
  } from "./chunk-BF4FYOAR.js";
@@ -20,6 +22,7 @@ import {
20
22
  // src/components/data-display/Chip/Chip.styles.tsx
21
23
  import Avatar from "@mui/material/Avatar/index.js";
22
24
  import React from "react";
25
+ import { alpha } from "@mui/material/styles/index.js";
23
26
  import { jsx } from "react/jsx-runtime";
24
27
  var makeKeyDownHandler = (args) => (event) => {
25
28
  const action = chipKeyAction(event.key, args);
@@ -45,14 +48,35 @@ var hoverShadow = (theme) => `0 ${rems(theme, HOVER_SHADOW.offsetY, HOVER_SHADOW
45
48
  theme,
46
49
  theme.palette.mode === "dark" ? HOVER_SHADOW.alphaDark : HOVER_SHADOW.alphaLight
47
50
  )}`;
51
+ var paletteKey = (color) => {
52
+ if (color === "neutral") return null;
53
+ return color === "danger" ? "error" : color;
54
+ };
55
+ var softStyles = (color) => {
56
+ const key = paletteKey(color);
57
+ const ground = (theme) => key ? alpha(theme.palette[key].main, SOFT_GROUND_ALPHA) : theme.palette.action.selected;
58
+ const ink = (theme) => key ? theme.palette[key].dark : theme.palette.text.secondary;
59
+ return {
60
+ backgroundColor: ground,
61
+ color: ink,
62
+ // A state is read at a glance: the label is set semibold.
63
+ fontWeight: 600,
64
+ "& .MuiChip-icon": { color: ink },
65
+ "&.MuiChip-clickable:hover": {
66
+ backgroundColor: (theme) => key ? alpha(theme.palette[key].main, SOFT_HOVER_ALPHA) : theme.palette.action.hover
67
+ }
68
+ };
69
+ };
48
70
  var chipStyles = ({
49
71
  variant,
72
+ color = "primary",
50
73
  selected,
51
74
  clickable,
52
75
  disabled
53
76
  }) => {
54
77
  const lifts = clickable && !disabled;
55
78
  return {
79
+ ...variant === "soft" ? softStyles(color) : {},
56
80
  // Enhanced styling for outlined variant
57
81
  ...variant === "outlined" && {
58
82
  borderWidth: "1px",
@@ -86,4 +110,4 @@ export {
86
110
  chipStyles,
87
111
  iconWithTestId
88
112
  };
89
- //# sourceMappingURL=chunk-HYQJJLBC.js.map
113
+ //# sourceMappingURL=chunk-DHAXUVMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/data-display/Chip/Chip.styles.tsx"],"sourcesContent":["import Avatar from '@mui/material/Avatar/index.js';\nimport type { SxProps, Theme } from '@mui/material/styles/index.js';\nimport type { KeyboardEvent, ReactElement } from 'react';\nimport React from 'react';\n\nimport { chipKeyAction, type ChipKeyArgs } from './Chip.helpers';\nimport { alpha } from '@mui/material/styles/index.js';\n\nimport {\n CHIP_SIZES,\n CHIP_TRANSITION_EASING,\n CHIP_TRANSITION_MS,\n HOVER_LIFT_PX,\n HOVER_SHADOW,\n SOFT_GROUND_ALPHA,\n SOFT_HOVER_ALPHA,\n} from './Chip.metrics';\nimport type { ChipProps } from './Chip.types';\nimport { shadowInk } from '../../../tokens/ink';\nimport { rem, rems, sxRem } from '../../../tokens/relative';\n\n/**\n * A chip is not a native control, so the two keyboard conventions it stands in\n * for are wired by hand: Delete/Backspace removes it, Enter/Space activates it.\n * The DECISION is `chipKeyAction`, which the native half reads too.\n */\nexport const makeKeyDownHandler =\n (args: ChipKeyArgs & { onClick?: () => void; onDelete?: () => void }) =>\n (event: KeyboardEvent): void => {\n const action = chipKeyAction(event.key, args);\n if (action === null) return;\n event.preventDefault();\n if (action === 'delete') {\n args.onDelete?.();\n return;\n }\n args.onClick?.();\n };\n\nexport const avatarFor = (\n avatar: ChipProps['avatar'],\n avatarSrc?: string,\n): ReactElement | undefined => {\n if (avatar && React.isValidElement(avatar)) {\n return avatar;\n }\n if (avatarSrc) {\n const { avatarSize } = CHIP_SIZES.medium;\n return <Avatar src={avatarSrc} sx={{ width: sxRem(avatarSize), height: sxRem(avatarSize) }} />;\n }\n return undefined;\n};\n\ninterface ChipStyleArgs {\n variant: ChipProps['variant'];\n color?: ChipProps['color'];\n selected?: boolean;\n clickable?: boolean;\n disabled?: boolean;\n}\n\n/** The lift's shadow, per mode — the same numbers the native chip reads. */\nconst hoverShadow = (theme: Theme): string =>\n `0 ${rems(theme, HOVER_SHADOW.offsetY, HOVER_SHADOW.blur)} ${shadowInk(\n theme,\n theme.palette.mode === 'dark' ? HOVER_SHADOW.alphaDark : HOVER_SHADOW.alphaLight,\n )}`;\n\n/**\n * Selection styling uses SEMANTIC palette tokens (not hardcoded rgba). A filled\n * selected chip keeps MUI's solid `color.main` + contrast text (clear active\n * state); an outlined selected chip gets a subtle theme-driven `action.selected`\n * tint so it reads as active without muddying the fill.\n */\n/** The palette entry a colour paints with; `neutral` has none and takes the ink. */\nconst paletteKey = (color: NonNullable<ChipProps['color']>): 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | null => {\n if (color === 'neutral') return null;\n return color === 'danger' ? 'error' : color;\n};\n\n/** `soft`: the colour's tint for a ground, its dark step for ink (and the icon). */\nconst softStyles = (color: NonNullable<ChipProps['color']>): SxProps<Theme> => {\n const key = paletteKey(color);\n const ground = (theme: Theme): string =>\n key ? alpha(theme.palette[key].main, SOFT_GROUND_ALPHA) : theme.palette.action.selected;\n const ink = (theme: Theme): string => (key ? theme.palette[key].dark : theme.palette.text.secondary);\n return {\n backgroundColor: ground,\n color: ink,\n // A state is read at a glance: the label is set semibold.\n fontWeight: 600,\n '& .MuiChip-icon': { color: ink },\n '&.MuiChip-clickable:hover': {\n backgroundColor: (theme: Theme) => (key ? alpha(theme.palette[key].main, SOFT_HOVER_ALPHA) : theme.palette.action.hover),\n },\n };\n};\n\nexport const chipStyles = ({\n variant,\n color = 'primary',\n selected,\n clickable,\n disabled,\n}: ChipStyleArgs): SxProps<Theme> => {\n const lifts = clickable && !disabled;\n\n return {\n ...(variant === 'soft' ? (softStyles(color) as object) : {}),\n // Enhanced styling for outlined variant\n ...(variant === 'outlined' && {\n borderWidth: '1px',\n borderStyle: 'solid',\n backgroundColor: 'transparent',\n }),\n ...(selected &&\n variant === 'outlined' && {\n backgroundColor: (theme: Theme) => theme.palette.action.selected,\n }),\n '&:hover': {\n ...(lifts && {\n transform: (theme: Theme) => `translateY(${rem(theme, -HOVER_LIFT_PX)})`,\n boxShadow: (theme: Theme) => hoverShadow(theme),\n }),\n },\n '&:active': {\n ...(lifts && {\n transform: 'translateY(0px)',\n }),\n },\n transition: `all ${CHIP_TRANSITION_MS / 1000}s ${CHIP_TRANSITION_EASING}`,\n };\n};\n\nexport const iconWithTestId = (\n icon: ChipProps['icon'],\n testId: string,\n): ReactElement | undefined =>\n icon && React.isValidElement(icon)\n ? React.cloneElement(icon as ReactElement, {\n 'data-testid': testId,\n } as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B,EAAE,OAAO,IAAI;AAAA,IAChC,6BAA6B;AAAA,MAC3B,iBAAiB,CAAC,UAAkB,MAAM,MAAM,MAAM,QAAQ,GAAG,EAAE,MAAM,gBAAgB,IAAI,MAAM,QAAQ,OAAO;AAAA,IACpH;AAAA,EACF;AACF;AAEO,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AACF,MAAqC;AACnC,QAAM,QAAQ,aAAa,CAAC;AAE5B,SAAO;AAAA,IACL,GAAI,YAAY,SAAU,WAAW,KAAK,IAAe,CAAC;AAAA;AAAA,IAE1D,GAAI,YAAY,cAAc;AAAA,MAC5B,aAAa;AAAA,MACb,aAAa;AAAA,MACb,iBAAiB;AAAA,IACnB;AAAA,IACA,GAAI,YACF,YAAY,cAAc;AAAA,MACxB,iBAAiB,CAAC,UAAiB,MAAM,QAAQ,OAAO;AAAA,IAC1D;AAAA,IACF,WAAW;AAAA,MACT,GAAI,SAAS;AAAA,QACX,WAAW,CAAC,UAAiB,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC;AAAA,QACrE,WAAW,CAAC,UAAiB,YAAY,KAAK;AAAA,MAChD;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,GAAI,SAAS;AAAA,QACX,WAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,YAAY,OAAO,qBAAqB,GAAI,KAAK,sBAAsB;AAAA,EACzE;AACF;AAEO,IAAM,iBAAiB,CAC5B,MACA,WAEA,QAAQ,MAAM,eAAe,IAAI,IAC7B,MAAM,aAAa,MAAsB;AAAA,EACvC,eAAe;AACjB,CAA4B,IAC5B;","names":[]}
@@ -12,10 +12,10 @@ import {
12
12
  } from "./chunk-7LOCLC24.js";
13
13
  import {
14
14
  StackedModal
15
- } from "./chunk-TNVO3EVF.js";
15
+ } from "./chunk-KT3TF2LT.js";
16
16
  import {
17
17
  StackedModalContent
18
- } from "./chunk-6A6GZRXD.js";
18
+ } from "./chunk-3VXS7O3X.js";
19
19
  import {
20
20
  sxRem
21
21
  } from "./chunk-YKCAJ2TN.js";
@@ -157,4 +157,4 @@ export {
157
157
  GridFilterPanel,
158
158
  FilterDialog
159
159
  };
160
- //# sourceMappingURL=chunk-AHNEEFK6.js.map
160
+ //# sourceMappingURL=chunk-E5GYHN4X.js.map
@@ -49,6 +49,8 @@ var HOVER_LIFT_PX = 1;
49
49
  var HOVER_SHADOW = { offsetY: 4, blur: 12, alphaLight: 0.15, alphaDark: 0.3 };
50
50
  var CHIP_TRANSITION_MS = 200;
51
51
  var CHIP_TRANSITION_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
52
+ var SOFT_GROUND_ALPHA = 0.14;
53
+ var SOFT_HOVER_ALPHA = 0.22;
52
54
 
53
55
  export {
54
56
  chipMuiSize,
@@ -63,6 +65,8 @@ export {
63
65
  HOVER_LIFT_PX,
64
66
  HOVER_SHADOW,
65
67
  CHIP_TRANSITION_MS,
66
- CHIP_TRANSITION_EASING
68
+ CHIP_TRANSITION_EASING,
69
+ SOFT_GROUND_ALPHA,
70
+ SOFT_HOVER_ALPHA
67
71
  };
68
- //# sourceMappingURL=chunk-KU6VHNRV.js.map
72
+ //# sourceMappingURL=chunk-E5I776YW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/data-display/Chip/Chip.metrics.ts"],"sourcesContent":["import type { ChipSize } from './Chip.base';\n\n/**\n * THE NUMBERS BOTH `Chip` RENDERERS DRAW WITH.\n *\n * Most of them are MUI's own `Chip` geometry rather than anything this package\n * writes — the 32px pill, the 13px label, the 5px/-6px icon tuck — because the\n * web half hands the drawing to `MuiChip` and the native half has to draw it.\n * Restated here once, read by both, so the two cannot disagree about a chip's\n * height. What THIS package adds (`Chip.styles.tsx`'s hover lift, its shadow\n * and its transition) is at the bottom, and the web derives its CSS from it.\n */\n\n/** MUI draws two chip sizes; ours are the house abbreviations for them. */\nexport type ChipMuiSize = 'small' | 'medium';\n\nexport const chipMuiSize = (size: ChipSize): ChipMuiSize =>\n size === 'xs' || size === 'sm' ? 'small' : 'medium';\n\nexport interface ChipSizeMetrics {\n height: number;\n /** The label's own side padding, filled and outlined (outlined is 1px tighter). */\n labelPadding: number;\n labelPaddingOutlined: number;\n /** The leading icon's box, and how far it tucks under the label. */\n iconSize: number;\n iconMarginLeft: number;\n iconMarginLeftOutlined: number;\n iconMarginRight: number;\n /** The avatar's round box and the type inside it. */\n avatarSize: number;\n avatarFontSize: number;\n avatarMarginLeft: number;\n avatarMarginLeftOutlined: number;\n avatarMarginRight: number;\n /** The delete glyph's box and its own tuck. */\n deleteSize: number;\n deleteMarginLeft: number;\n deleteMarginRight: number;\n deleteMarginRightOutlined: number;\n}\n\nexport const CHIP_SIZES: Record<ChipMuiSize, ChipSizeMetrics> = {\n medium: {\n height: 32,\n labelPadding: 12,\n labelPaddingOutlined: 11,\n iconSize: 24,\n iconMarginLeft: 5,\n iconMarginLeftOutlined: 4,\n iconMarginRight: -6,\n avatarSize: 24,\n avatarFontSize: 12,\n avatarMarginLeft: 5,\n avatarMarginLeftOutlined: 4,\n avatarMarginRight: -6,\n deleteSize: 22,\n deleteMarginLeft: -6,\n deleteMarginRight: 5,\n deleteMarginRightOutlined: 5,\n },\n small: {\n height: 24,\n labelPadding: 8,\n labelPaddingOutlined: 7,\n iconSize: 18,\n iconMarginLeft: 4,\n iconMarginLeftOutlined: 2,\n iconMarginRight: -4,\n avatarSize: 18,\n avatarFontSize: 10,\n avatarMarginLeft: 4,\n avatarMarginLeftOutlined: 2,\n avatarMarginRight: -4,\n deleteSize: 16,\n deleteMarginLeft: -4,\n deleteMarginRight: 4,\n deleteMarginRightOutlined: 3,\n },\n};\n\n/** MUI's `borderRadius: 32 / 2` — a pill at either height, since the box clamps it. */\nexport const CHIP_RADIUS = 16;\n/** The label's type, in px. MUI sets it on the root and the small size keeps it. */\nexport const CHIP_FONT_SIZE = 13;\n/** MUI's `palette.action.disabledOpacity`. */\nexport const CHIP_DISABLED_OPACITY = 0.38;\n/** An outlined chip's hairline: the hue at 0.7, or the grey ramp for `neutral`. */\nexport const OUTLINED_BORDER_ALPHA = 0.7;\n/** The delete glyph over an unaccented chip, and over a coloured one. */\nexport const DELETE_ICON_ALPHA = 0.26;\nexport const DELETE_ICON_ON_COLOR_ALPHA = 0.7;\n/** MUI's `action.hoverOpacity`, the wash a clickable outlined chip takes. */\nexport const OUTLINED_HOVER_ALPHA = 0.04;\n\n/* ── What this package adds on top of MUI's chip ──────────────────────────── */\n\n/** The lift a clickable chip takes on hover, and the shadow under it. */\nexport const HOVER_LIFT_PX = 1;\nexport const HOVER_SHADOW = { offsetY: 4, blur: 12, alphaLight: 0.15, alphaDark: 0.3 } as const;\nexport const CHIP_TRANSITION_MS = 200;\nexport const CHIP_TRANSITION_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n"],"mappings":";AAgBO,IAAM,cAAc,CAAC,SAC1B,SAAS,QAAQ,SAAS,OAAO,UAAU;AAyBtC,IAAM,aAAmD;AAAA,EAC9D,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,2BAA2B;AAAA,EAC7B;AAAA,EACA,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,2BAA2B;AAAA,EAC7B;AACF;AAGO,IAAM,cAAc;AAEpB,IAAM,iBAAiB;AAEvB,IAAM,wBAAwB;AAE9B,IAAM,wBAAwB;AAE9B,IAAM,oBAAoB;AAC1B,IAAM,6BAA6B;AAEnC,IAAM,uBAAuB;AAK7B,IAAM,gBAAgB;AACtB,IAAM,eAAe,EAAE,SAAS,GAAG,MAAM,IAAI,YAAY,MAAM,WAAW,IAAI;AAC9E,IAAM,qBAAqB;AAC3B,IAAM,yBAAyB;","names":[]}
1
+ {"version":3,"sources":["../src/components/data-display/Chip/Chip.metrics.ts"],"sourcesContent":["import type { ChipSize } from './Chip.base';\n\n/**\n * THE NUMBERS BOTH `Chip` RENDERERS DRAW WITH.\n *\n * Most of them are MUI's own `Chip` geometry rather than anything this package\n * writes — the 32px pill, the 13px label, the 5px/-6px icon tuck — because the\n * web half hands the drawing to `MuiChip` and the native half has to draw it.\n * Restated here once, read by both, so the two cannot disagree about a chip's\n * height. What THIS package adds (`Chip.styles.tsx`'s hover lift, its shadow\n * and its transition) is at the bottom, and the web derives its CSS from it.\n */\n\n/** MUI draws two chip sizes; ours are the house abbreviations for them. */\nexport type ChipMuiSize = 'small' | 'medium';\n\nexport const chipMuiSize = (size: ChipSize): ChipMuiSize =>\n size === 'xs' || size === 'sm' ? 'small' : 'medium';\n\nexport interface ChipSizeMetrics {\n height: number;\n /** The label's own side padding, filled and outlined (outlined is 1px tighter). */\n labelPadding: number;\n labelPaddingOutlined: number;\n /** The leading icon's box, and how far it tucks under the label. */\n iconSize: number;\n iconMarginLeft: number;\n iconMarginLeftOutlined: number;\n iconMarginRight: number;\n /** The avatar's round box and the type inside it. */\n avatarSize: number;\n avatarFontSize: number;\n avatarMarginLeft: number;\n avatarMarginLeftOutlined: number;\n avatarMarginRight: number;\n /** The delete glyph's box and its own tuck. */\n deleteSize: number;\n deleteMarginLeft: number;\n deleteMarginRight: number;\n deleteMarginRightOutlined: number;\n}\n\nexport const CHIP_SIZES: Record<ChipMuiSize, ChipSizeMetrics> = {\n medium: {\n height: 32,\n labelPadding: 12,\n labelPaddingOutlined: 11,\n iconSize: 24,\n iconMarginLeft: 5,\n iconMarginLeftOutlined: 4,\n iconMarginRight: -6,\n avatarSize: 24,\n avatarFontSize: 12,\n avatarMarginLeft: 5,\n avatarMarginLeftOutlined: 4,\n avatarMarginRight: -6,\n deleteSize: 22,\n deleteMarginLeft: -6,\n deleteMarginRight: 5,\n deleteMarginRightOutlined: 5,\n },\n small: {\n height: 24,\n labelPadding: 8,\n labelPaddingOutlined: 7,\n iconSize: 18,\n iconMarginLeft: 4,\n iconMarginLeftOutlined: 2,\n iconMarginRight: -4,\n avatarSize: 18,\n avatarFontSize: 10,\n avatarMarginLeft: 4,\n avatarMarginLeftOutlined: 2,\n avatarMarginRight: -4,\n deleteSize: 16,\n deleteMarginLeft: -4,\n deleteMarginRight: 4,\n deleteMarginRightOutlined: 3,\n },\n};\n\n/** MUI's `borderRadius: 32 / 2` — a pill at either height, since the box clamps it. */\nexport const CHIP_RADIUS = 16;\n/** The label's type, in px. MUI sets it on the root and the small size keeps it. */\nexport const CHIP_FONT_SIZE = 13;\n/** MUI's `palette.action.disabledOpacity`. */\nexport const CHIP_DISABLED_OPACITY = 0.38;\n/** An outlined chip's hairline: the hue at 0.7, or the grey ramp for `neutral`. */\nexport const OUTLINED_BORDER_ALPHA = 0.7;\n/** The delete glyph over an unaccented chip, and over a coloured one. */\nexport const DELETE_ICON_ALPHA = 0.26;\nexport const DELETE_ICON_ON_COLOR_ALPHA = 0.7;\n/** MUI's `action.hoverOpacity`, the wash a clickable outlined chip takes. */\nexport const OUTLINED_HOVER_ALPHA = 0.04;\n\n/* ── What this package adds on top of MUI's chip ──────────────────────────── */\n\n/** The lift a clickable chip takes on hover, and the shadow under it. */\nexport const HOVER_LIFT_PX = 1;\nexport const HOVER_SHADOW = { offsetY: 4, blur: 12, alphaLight: 0.15, alphaDark: 0.3 } as const;\nexport const CHIP_TRANSITION_MS = 200;\nexport const CHIP_TRANSITION_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** A soft chip's ground: the colour at this alpha over the page. */\nexport const SOFT_GROUND_ALPHA = 0.14;\n/** A soft chip's hover ground. */\nexport const SOFT_HOVER_ALPHA = 0.22;\n"],"mappings":";AAgBO,IAAM,cAAc,CAAC,SAC1B,SAAS,QAAQ,SAAS,OAAO,UAAU;AAyBtC,IAAM,aAAmD;AAAA,EAC9D,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,2BAA2B;AAAA,EAC7B;AAAA,EACA,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,IACxB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,0BAA0B;AAAA,IAC1B,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,kBAAkB;AAAA,IAClB,mBAAmB;AAAA,IACnB,2BAA2B;AAAA,EAC7B;AACF;AAGO,IAAM,cAAc;AAEpB,IAAM,iBAAiB;AAEvB,IAAM,wBAAwB;AAE9B,IAAM,wBAAwB;AAE9B,IAAM,oBAAoB;AAC1B,IAAM,6BAA6B;AAEnC,IAAM,uBAAuB;AAK7B,IAAM,gBAAgB;AACtB,IAAM,eAAe,EAAE,SAAS,GAAG,MAAM,IAAI,YAAY,MAAM,WAAW,IAAI;AAC9E,IAAM,qBAAqB;AAC3B,IAAM,yBAAyB;AAG/B,IAAM,oBAAoB;AAE1B,IAAM,mBAAmB;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RQF4NXDC.js";
4
4
  import {
5
5
  isQuickActive
6
- } from "./chunk-GCYGVWOI.js";
6
+ } from "./chunk-AMT7IJYV.js";
7
7
  import {
8
8
  RangeBounds
9
9
  } from "./chunk-5WJFCQFN.js";
@@ -227,4 +227,4 @@ export {
227
227
  MoreQuick,
228
228
  MoreGroup
229
229
  };
230
- //# sourceMappingURL=chunk-T7ZERP7A.js.map
230
+ //# sourceMappingURL=chunk-EYW6KXUC.js.map
@@ -97,9 +97,10 @@ var RESERVED = {
97
97
  /** The gap between two controls. */
98
98
  betweenControls: 8
99
99
  };
100
- function pricesFor(theme) {
100
+ function pricesFor(theme, showCounter = true) {
101
101
  const entries = Object.entries(RESERVED).map(([key, px]) => [key, remPx(theme, px)]);
102
- return Object.fromEntries(entries);
102
+ const prices = Object.fromEntries(entries);
103
+ return showCounter ? prices : { ...prices, counter: 0 };
103
104
  }
104
105
  function rightClusterCost(price, hasExport, compact) {
105
106
  const one = compact ? price.displayControlCompact : price.displayControl;
@@ -118,4 +119,4 @@ export {
118
119
  rightClusterCost,
119
120
  furnitureCost
120
121
  };
121
- //# sourceMappingURL=chunk-DNT5PZLF.js.map
122
+ //# sourceMappingURL=chunk-GZOW6HNN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow-costs.ts"],"sourcesContent":["/**\n * WHAT EACH THING ON THE TOOLBAR COSTS, IN PIXELS.\n *\n * The pricing half of the collapse ladder, split from `data-views-overflow` at\n * the file-size gate. Pure arithmetic and constants: no React, no measurement,\n * no decisions. `data-views-overflow` measures the row and spends what this\n * says it has.\n *\n * Every number here is either MEASURED in a browser (and says so) or\n * deliberately generous. Over-pricing sheds one control too early, which the\n * \"Mais\" button absorbs invisibly; under-pricing breaks the line.\n *\n * Every number is DESIGN px — measured at MUI's default type scale. The bar is\n * measured in real px, so a price reaches it through `remPx` (`estimateWidth`,\n * `pricesFor`): a theme that scales its type scales the controls, and so the\n * prices, together — a denser theme fits more pills on the same bar.\n */\nimport type { Theme } from \"@mui/material/styles/index.js\";\n\nimport { remPx } from \"../../../tokens/relative\";\n\nimport type { OverflowField } from \"./data-views-overflow\";\nimport type { RangeValue } from \"./data-views-types\";\n\n/**\n * Rough rendered width of a control, in px at `theme`'s type scale.\n *\n * An ESTIMATE from the label text rather than a real measurement, deliberately:\n * measuring the true width needs every control mounted first, and mounting them\n * to decide whether to mount them is the layout thrash this hook exists to\n * avoid. The estimate only has to rank controls and find the cut point — being\n * a few px out moves the cut by at most one control, and the overflow catches it.\n */\nexport function estimateWidth(theme: Theme, text: string, extra: number): number {\n /**\n * ~7.6px per character at the toolbar's font size, plus 76px of chrome:\n * horizontal padding, the border, and the dropdown chevron. The chrome used\n * to be 52, which under-priced every control by roughly a chevron's width —\n * six of them then \"fitted\" a row they overflowed, and because they are flex\n * children the row paid for it by squeezing labels to \"D…\" and \"V…\" rather\n * than by shedding a control into the overflow.\n *\n * Deliberately generous: over-pricing sheds one control too early, which the\n * \"Mais\" button absorbs invisibly. Under-pricing breaks the line.\n *\n * The chrome was 76, and generous had turned into wrong. MEASURED on the\n * Pedidos bar: \"Pagamento\" renders at 123px against an estimate of 144, and\n * \"Situação\" at 107 against 137 — every pill over-priced by ~22%, which on a\n * phone is the whole difference between one pill on the bar and none. 56 is\n * still above the ~50 measured, so the slack the comment above asks for is\n * intact; it is just slack rather than a second control's worth of budget.\n */\n return remPx(theme, Math.round(text.length * 7.6) + 56 + extra);\n}\n\n/** Is a range bounded at either end? */\nexport function isRangeSet(range: RangeValue | undefined): boolean {\n return Boolean(range && (range.min !== undefined || range.max !== undefined));\n}\n\n/** The label a pill actually renders, which is what decides its width. */\nexport function pillText<T extends Record<string, unknown>>(field: OverflowField<T>, values: string[]): string {\n if (values.length === 0) return field.label;\n if (values.length === 1) {\n const option = field.pill?.options.find((entry) => entry.value === values[0]);\n return `${field.label}: ${option?.label ?? values[0]}`;\n }\n return `${field.label}: ${values.length}`;\n}\n\n/** Fixed toolbar furniture the filters have to fit around, in design px. */\nexport const RESERVED = {\n /** The search box never shrinks below this. */\n search: 200,\n /**\n * The \"N de N\" counter.\n *\n * MEASURED at 35px, plus its divider and gap. The old 96 was priced for a\n * counter reading \"1.234 de 5.678\"; a phone shows \"3 de 3\", and charging\n * nearly triple its rendered width came straight out of the filter budget.\n */\n counter: 56,\n /**\n * ONE right-hand control (Exibir, or Exportar) WITH its text label.\n *\n * Priced per control rather than for the pair, because the pair is not what\n * every page renders: \"Exportar\" exists only when the host passes an\n * `exportConfig`, and several pages (Pedidos among them) put their export in\n * the PAGE HEADER instead. Charging 216 there billed the filters for a button\n * that was never on the bar — ~108px of budget spent on nothing, which on a\n * phone is the difference between one filter pill and none.\n */\n displayControl: 108,\n /**\n * The same control as an icon only — step 2 of the ladder.\n *\n * MEASURED at 133px for the PAIR (66 each: a Button's minimum tap target is\n * a good deal wider than the 20px glyph inside it); 70 keeps that total's\n * slack at one control's granularity.\n */\n displayControlCompact: 70,\n /**\n * What step 4 leaves behind: the search as a bare magnifier.\n *\n * MEASURED at 30px on the Pedidos bar (`…-search-all-collapsed`); 38 keeps a\n * tap target's worth of slack over it.\n */\n searchIcon: 38,\n /**\n * The narrowest keyword box still worth typing into — below it the operator\n * cannot read back what they wrote, and the box takes over the cluster\n * instead of sharing it (see `searchTakeover`).\n *\n * 120 rather than 140 because this is compared against the ESTIMATE, which\n * over-prices on purpose (see `estimateWidth`). At 140 a large phone took the\n * whole cluster to produce a box barely wider than the one it could have had\n * while keeping its filters — paying for nothing.\n */\n usableSearch: 120,\n /**\n * The \"Mais\" button, only charged when there IS an overflow — and priced by\n * the state it is actually in, like the right-hand cluster beside it.\n *\n * MEASURED: 128px with its label, badge and chevron; 69px once the ladder has\n * it down to icon + badge. One number for both was wrong in BOTH directions —\n * it under-priced the wide bar (the row's own failure mode) and over-priced\n * the narrow one by a whole pill.\n */\n overflowButton: 136,\n overflowButtonCompact: 80,\n /**\n * \"Limpar\", only charged when there IS something to clear.\n *\n * It appears exactly when the row is at its widest — every applied filter\n * has a longer label than the idle one it replaced — so leaving it unpriced\n * would break the line at the one moment the operator most needs it.\n * Measured at 64 as an icon; 72 with slack.\n */\n clearAll: 72,\n /**\n * The row's own padding, plus the gaps BETWEEN the fixed furniture.\n *\n * Not the per-control gaps — `splitFilters` already adds `betweenControls`\n * for every filter it keeps, so counting a fourth one here charged one gap twice.\n * MEASURED: 32px of padding (16 each side) + three 8px gaps between the\n * search, the counter and the right cluster.\n */\n chrome: 56,\n /** The gap between two controls. */\n betweenControls: 8,\n} as const;\n\n/** {@link RESERVED} at a theme's type scale — the px the measured bar is in. */\nexport type Prices = Record<keyof typeof RESERVED, number>;\n\n/** Price the furniture for `theme`: every {@link RESERVED} entry through `remPx`. */\nexport function pricesFor(theme: Theme): Prices {\n const entries = Object.entries(RESERVED).map(([key, px]) => [key, remPx(theme, px)]);\n return Object.fromEntries(entries) as Prices;\n}\n\n/** What the right-hand cluster costs, given what the host actually renders. */\nexport function rightClusterCost(price: Prices, hasExport: boolean, compact: boolean): number {\n const one = compact ? price.displayControlCompact : price.displayControl;\n return hasExport ? one * 2 : one;\n}\n\n/**\n * What the toolbar furniture costs at a given rung of the ladder — the budget\n * the filter controls have to fit AROUND.\n *\n * This exists because the two halves used to disagree. `splitFilters` priced\n * the furniture at its widest (search 200 + counter 96 + right 216) and shed\n * every filter to make room; the ladder then collapsed those very controls to\n * 44 + 0 + 140 and nobody handed the ~330px back. On a 428px phone that showed\n * as a bar carrying a magnifier, a \"Mais 5\" pill, and a band of nothing.\n */\nexport function furnitureCost(\n price: Prices,\n flags: { searchCollapsed: boolean; counterHidden: boolean; compactControls: boolean },\n hasExport: boolean,\n): number {\n return (\n (flags.searchCollapsed ? price.searchIcon : price.search) +\n (flags.counterHid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AAAA;AAAA,EAER,iBAAiB;AACnB;AAMO,SAAS,UAAU,OAAsB;AAC9C,QAAM,UAAU,OAAO,QAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,MAAM,OAAO,EAAE,CAAC,CAAC;AACnF,SAAO,OAAO,YAAY,OAAO;AACnC;AAGO,SAAS,iBAAiB,OAAe,WAAoB,SAA0B;AAC5F,QAAM,MAAM,UAAU,MAAM,wBAAwB,MAAM;AAC1D,SAAO,YAAY,MAAM,IAAI;AAC/B;AAYO,SAAS,cACd,OACA,OACA,WACQ;AACR,UACG,MAAM,kBAAkB,MAAM,aAAa,MAAM,WACjD,MAAM,gBAAgB,IAAI,MAAM,WACjC,iBAAiB,OAAO,WAAW,MAAM,eAAe,IACxD,MAAM;AAEV;","names":[]}
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/data-views-overflow-costs.ts"],"sourcesContent":["/**\n * WHAT EACH THING ON THE TOOLBAR COSTS, IN PIXELS.\n *\n * The pricing half of the collapse ladder, split from `data-views-overflow` at\n * the file-size gate. Pure arithmetic and constants: no React, no measurement,\n * no decisions. `data-views-overflow` measures the row and spends what this\n * says it has.\n *\n * Every number here is either MEASURED in a browser (and says so) or\n * deliberately generous. Over-pricing sheds one control too early, which the\n * \"Mais\" button absorbs invisibly; under-pricing breaks the line.\n *\n * Every number is DESIGN px — measured at MUI's default type scale. The bar is\n * measured in real px, so a price reaches it through `remPx` (`estimateWidth`,\n * `pricesFor`): a theme that scales its type scales the controls, and so the\n * prices, together — a denser theme fits more pills on the same bar.\n */\nimport type { Theme } from \"@mui/material/styles/index.js\";\n\nimport { remPx } from \"../../../tokens/relative\";\n\nimport type { OverflowField } from \"./data-views-overflow\";\nimport type { RangeValue } from \"./data-views-types\";\n\n/**\n * Rough rendered width of a control, in px at `theme`'s type scale.\n *\n * An ESTIMATE from the label text rather than a real measurement, deliberately:\n * measuring the true width needs every control mounted first, and mounting them\n * to decide whether to mount them is the layout thrash this hook exists to\n * avoid. The estimate only has to rank controls and find the cut point — being\n * a few px out moves the cut by at most one control, and the overflow catches it.\n */\nexport function estimateWidth(theme: Theme, text: string, extra: number): number {\n /**\n * ~7.6px per character at the toolbar's font size, plus 76px of chrome:\n * horizontal padding, the border, and the dropdown chevron. The chrome used\n * to be 52, which under-priced every control by roughly a chevron's width —\n * six of them then \"fitted\" a row they overflowed, and because they are flex\n * children the row paid for it by squeezing labels to \"D…\" and \"V…\" rather\n * than by shedding a control into the overflow.\n *\n * Deliberately generous: over-pricing sheds one control too early, which the\n * \"Mais\" button absorbs invisibly. Under-pricing breaks the line.\n *\n * The chrome was 76, and generous had turned into wrong. MEASURED on the\n * Pedidos bar: \"Pagamento\" renders at 123px against an estimate of 144, and\n * \"Situação\" at 107 against 137 — every pill over-priced by ~22%, which on a\n * phone is the whole difference between one pill on the bar and none. 56 is\n * still above the ~50 measured, so the slack the comment above asks for is\n * intact; it is just slack rather than a second control's worth of budget.\n */\n return remPx(theme, Math.round(text.length * 7.6) + 56 + extra);\n}\n\n/** Is a range bounded at either end? */\nexport function isRangeSet(range: RangeValue | undefined): boolean {\n return Boolean(range && (range.min !== undefined || range.max !== undefined));\n}\n\n/** The label a pill actually renders, which is what decides its width. */\nexport function pillText<T extends Record<string, unknown>>(field: OverflowField<T>, values: string[]): string {\n if (values.length === 0) return field.label;\n if (values.length === 1) {\n const option = field.pill?.options.find((entry) => entry.value === values[0]);\n return `${field.label}: ${option?.label ?? values[0]}`;\n }\n return `${field.label}: ${values.length}`;\n}\n\n/** Fixed toolbar furniture the filters have to fit around, in design px. */\nexport const RESERVED = {\n /** The search box never shrinks below this. */\n search: 200,\n /**\n * The \"N de N\" counter.\n *\n * MEASURED at 35px, plus its divider and gap. The old 96 was priced for a\n * counter reading \"1.234 de 5.678\"; a phone shows \"3 de 3\", and charging\n * nearly triple its rendered width came straight out of the filter budget.\n */\n counter: 56,\n /**\n * ONE right-hand control (Exibir, or Exportar) WITH its text label.\n *\n * Priced per control rather than for the pair, because the pair is not what\n * every page renders: \"Exportar\" exists only when the host passes an\n * `exportConfig`, and several pages (Pedidos among them) put their export in\n * the PAGE HEADER instead. Charging 216 there billed the filters for a button\n * that was never on the bar — ~108px of budget spent on nothing, which on a\n * phone is the difference between one filter pill and none.\n */\n displayControl: 108,\n /**\n * The same control as an icon only — step 2 of the ladder.\n *\n * MEASURED at 133px for the PAIR (66 each: a Button's minimum tap target is\n * a good deal wider than the 20px glyph inside it); 70 keeps that total's\n * slack at one control's granularity.\n */\n displayControlCompact: 70,\n /**\n * What step 4 leaves behind: the search as a bare magnifier.\n *\n * MEASURED at 30px on the Pedidos bar (`…-search-all-collapsed`); 38 keeps a\n * tap target's worth of slack over it.\n */\n searchIcon: 38,\n /**\n * The narrowest keyword box still worth typing into — below it the operator\n * cannot read back what they wrote, and the box takes over the cluster\n * instead of sharing it (see `searchTakeover`).\n *\n * 120 rather than 140 because this is compared against the ESTIMATE, which\n * over-prices on purpose (see `estimateWidth`). At 140 a large phone took the\n * whole cluster to produce a box barely wider than the one it could have had\n * while keeping its filters — paying for nothing.\n */\n usableSearch: 120,\n /**\n * The \"Mais\" button, only charged when there IS an overflow — and priced by\n * the state it is actually in, like the right-hand cluster beside it.\n *\n * MEASURED: 128px with its label, badge and chevron; 69px once the ladder has\n * it down to icon + badge. One number for both was wrong in BOTH directions —\n * it under-priced the wide bar (the row's own failure mode) and over-priced\n * the narrow one by a whole pill.\n */\n overflowButton: 136,\n overflowButtonCompact: 80,\n /**\n * \"Limpar\", only charged when there IS something to clear.\n *\n * It appears exactly when the row is at its widest — every applied filter\n * has a longer label than the idle one it replaced — so leaving it unpriced\n * would break the line at the one moment the operator most needs it.\n * Measured at 64 as an icon; 72 with slack.\n */\n clearAll: 72,\n /**\n * The row's own padding, plus the gaps BETWEEN the fixed furniture.\n *\n * Not the per-control gaps — `splitFilters` already adds `betweenControls`\n * for every filter it keeps, so counting a fourth one here charged one gap twice.\n * MEASURED: 32px of padding (16 each side) + three 8px gaps between the\n * search, the counter and the right cluster.\n */\n chrome: 56,\n /** The gap between two controls. */\n betweenControls: 8,\n} as const;\n\n/** {@link RESERVED} at a theme's type scale — the px the measured bar is in. */\nexport type Prices = Record<keyof typeof RESERVED, number>;\n\n/**\n * Price the furniture for `theme`: every {@link RESERVED} entry through `remPx`.\n * A counter the host turned off costs nothing at any rung: pricing it anyway\n * left a gap where it would have been, and shed controls for it.\n */\nexport function pricesFor(theme: Theme, showCounter = true): Prices {\n const entries = Object.entries(RESERVED).map(([key, px]) => [key, remPx(theme, px)]);\n const prices = Object.fromEntries(entries) as Prices;\n return showCounter ? prices : { ...prices, counter: 0 };\n}\n\n/** What the right-hand cluster costs, given what the host actually renders. */\nexport function rightClusterCost(price: Prices, hasExport: boolean, compact: boolean): number {\n const one = compact ? price.displayControlCompact : price.displayControl;\n return hasExport ? one * 2 : one;\n}\n\n/**\n * What the toolbar furniture costs at a given rung of the ladder — the budget\n * the filter controls have to fit AROUND.\n *\n * This exists because the two halves used to disagree. `splitFilters` priced\n * the furniture at its widest (search 200 + counter 96 + right 216) and shed\n * every filter to make room; the ladder then collapsed those very controls to\n * 44 + 0 + 140 and nobody handed the ~330px back. On a 428px phone that showed\n * as a bar carrying a magnifier, a \"Mais 5\" pill, and a band of nothing.\n */\nexport function furnitureCost(\n price: Prices,\n flags: { searchCollapsed: boolean; counterHidden: boolean; compactControls: boolean },\n hasExport: boolean,\n): number {\n return (\n (flags.searchCollapsed ? price.searchIcon : price.search) +\n (flags.counterHidden ? 0 : price.counter) +\n rightClusterCost(price, hasExport, flags.compactControls) +\n price.chrome\n );\n}\n"],"mappings":";;;;;AAiCO,SAAS,cAAc,OAAc,MAAc,OAAuB;AAmB/E,SAAO,MAAM,OAAO,KAAK,MAAM,KAAK,SAAS,GAAG,IAAI,KAAK,KAAK;AAChE;AAGO,SAAS,WAAW,OAAwC;AACjE,SAAO,QAAQ,UAAU,MAAM,QAAQ,UAAa,MAAM,QAAQ,OAAU;AAC9E;AAGO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iBAAiB,OAAe,WAAoB,SAA0B;AAC5F,QAAM,MAAM,UAAU,MAAM,wBAAwB,MAAM;AAC1D,SAAO,YAAY,MAAM,IAAI;AAC/B;AAYO,SAAS,cACd,OACA,OACA,WACQ;AACR,UACG,MAAM,kBAAkB,MAAM,aAAa,MAAM,WACjD,MAAM,gBAAgB,IAAI,MAAM,WACjC,iBAAiB,OAAO,WAAW,MAAM,eAAe,IACxD,MAAM;AAEV;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SettingSwitchBlock,
3
3
  useSettingSwitchIds
4
- } from "./chunk-7JS2SPRW.js";
4
+ } from "./chunk-LKRXLWCC.js";
5
5
  import {
6
6
  SettingGroupContext
7
7
  } from "./chunk-XJQNSMGA.js";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-SALQ65SM.js";
11
11
  import {
12
12
  partTestId
13
- } from "./chunk-OJFE5PK6.js";
13
+ } from "./chunk-ZZO5MRMV.js";
14
14
  import {
15
15
  dependentsStyles,
16
16
  hintStyles,
@@ -84,4 +84,4 @@ SettingGroup.displayName = "SettingGroup";
84
84
  export {
85
85
  SettingGroup
86
86
  };
87
- //# sourceMappingURL=chunk-SAJDNO43.js.map
87
+ //# sourceMappingURL=chunk-IGMD6S76.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SettingSwitchBlock,
3
3
  useSettingSwitchIds
4
- } from "./chunk-7JS2SPRW.js";
4
+ } from "./chunk-LKRXLWCC.js";
5
5
  import {
6
6
  useSettingGroup
7
7
  } from "./chunk-XJQNSMGA.js";
@@ -44,4 +44,4 @@ SettingToggle.displayName = "SettingToggle";
44
44
  export {
45
45
  SettingToggle
46
46
  };
47
- //# sourceMappingURL=chunk-EZFQO77P.js.map
47
+ //# sourceMappingURL=chunk-IPYV7BLH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-5RC7WAHH.js";
3
+ } from "./chunk-LY6L3DMB.js";
4
4
  import {
5
5
  useDataViewsState
6
6
  } from "./chunk-2QB4WIU5.js";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-QAZLQYSD.js.map
30
+ //# sourceMappingURL=chunk-JCHJYBDG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/DataViewsGrid.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport { type SortFieldDefinition } from \"../../layout/ContentToolbar\";\n\nimport { GridShell } from \"./data-views-grid-parts\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewCardSelection } from \"./data-views-types\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewSyncState,\n type FilterFieldConfig,\n type QuickFilterConfig,\n type RangeFieldConfig,\n type RowAction,\n} from \"./data-views-types\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { useDataViewsState } from \"./use-data-views-state\";\n\ninterface DataViewsGridProps<T extends Record<string, unknown>> {\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n /** Row click opens the row; clicks in the actions column are ignored. */\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** Seed/replace the view state. A NEW reference re-applies (used to apply a saved view). */\n appliedState?: DataViewState;\n /**\n * URL-driven controls (search/pills/ranges/sort) that RE-APPLY on reference\n * change while preserving column visibility — for server-mode lists that keep\n * their filter/sort/page in the address bar (see {@link DataViewSyncState}).\n */\n syncState?: DataViewSyncState;\n /** Notified on every view-state change (so a save-view modal can read it). */\n onStateChange?: (state: DataViewState) => void;\n /**\n * Notified with the currently-visible (search + filter matched) rows whenever\n * they change — so a page-level Export exports what the user sees, not the\n * full dataset.\n */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Saved-views UI injected into the toolbar (FUT-89). */\n toolbarRightSlot?: React.ReactNode;\n /**\n * The saved-view chrome for the Exibir panel: its VISÃO header (with the\n * views dropdown) and its Redefinir / Salvar visão footer. Supplied by\n * `DataViewsTableBase`; without it the panel is tabs only.\n */\n displayView?: DisplayPanelView;\n /** Big page title in the header row (next to the funnel + gear). */\n title?: string;\n /** Primary page actions rendered at the header's right. */\n headerActions?: React.ReactNode;\n /**\n * Sort options for the toolbar's \"Sort By\" dropdown. Defaults to the sortable\n * columns (asc/desc each) when omitted.\n */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /**\n * A single, reusable list of row actions that drives BOTH the per-row \"⋮\"\n * kebab AND the bulk-actions menu (tabwoah model). When provided, the grid\n * appends a kebab actions column automatically (unless the page already\n * defines one) and shows an \"Ações\" bulk menu when rows are selected.\n */\n rowActions?: RowAction<T>[];\n /**\n * Extra leading control rendered in the auto kebab column, before the \"⋮\"\n * (e.g. a favourite star). Only used when `rowActions` is set.\n */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /**\n * Low-level override for the selection bulk control. Prefer `rowActions`.\n * Receives the selected rows + a `clearSelection` callback.\n */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /**\n * A control rendered beside the \"N selected\" count, for changing WHAT is\n * selected rather than what happens to it — a \"select all N matching the\n * filter\" widening, above all.\n *\n * Called only while something is selected, and handed\n * {@link SelectionExtraContext.allOnPageSelected} so the control can follow\n * the convention operators already know: the widening appears once the whole\n * page is ticked, and not before.\n */\n selectionExtra?: SelectionExtraRender<T>;\n /**\n * Render a bespoke per-row menu in the actions column instead of the auto\n * kebab — typically an entity's self-contained 3-dots menu that owns its own\n * popups, so the SAME menu component drives both the table row and the card.\n * `rowActions`/`bulkActions` still drive the multi-row bulk menu.\n */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Row selection — on by default. `false` opts the grid out entirely: no\n * checkbox column in the table (and no width reserved for one), no checkbox\n * or checkbox gutter on cards and list rows, no select-all strip and no\n * count. With nothing selectable, the toolbar's selection mode never takes\n * over the search, the filter pills and Exportar. For a grid with no bulk\n * action, where a selection could only hide the toolbar. Row click and the\n * row menu are unaffected.\n */\n selectable?: boolean;\n /**\n * Opt-in expandable rows (table layout only): a chevron in a leading column\n * opens `render(row)` under the row. See {@link DataViewRowDetail}.\n */\n rowDetail?: DataViewRowDetail<T>;\n /**\n * Opt-in \"Grade\" (cards) layout. When provided, a Grade/Tabela toggle appears in\n * the toolbar and the cards body renders each visible row via this function\n * (reusing the same search/filter/sort). Omit ⇒ table only (unchanged).\n */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * Opt-in \"Quadro\" (board) layout: the loaded page laid out as columns of one\n * grouping field. Reuses `renderCard`, so supplying a board WITHOUT one simply\n * offers no board. Best when the groups are states in a state machine — derive\n * these groups and `scopes` from ONE definition so the two cannot drift.\n */\n board?: BoardConfig<T>;\n /**\n * Opt-in \"Lista\" layout (FUT-733): one FULL-WIDTH row per record, rendered by\n * the entity — a marker, a title, a subtitle and a value on the right. Sits\n * between the table (compare columns) and the cards (browse); omit ⇒ not\n * offered, exactly as `renderCard` gates the cards.\n */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * The Lista's SHARED COLUMNS — declared once for the list, obeyed by every row.\n *\n * This is what makes a list line up by construction rather than by convention.\n * Omit it and each row still resolves its own tracks from its own config,\n * which agrees with its neighbours right up until one row carries an unusually\n * wide value.\n */\n listGroup?: ListGroupConfig<T>;\n /**\n * The page-level partition rendered as an exclusive tab strip above the\n * toolbar, with server-supplied counts. Requires `server`: a scope is applied\n * at the backend, never in the browser.\n */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /**\n * Opt into the responsive inline filter UX (collapsible filter row on wide\n * screens, modal on narrow). Default `false` keeps the classic slide-in panel.\n */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /**\n * One-click filters drawn as toggle chips at the head of the toolbar, each\n * applying one value of a declared pill field. See {@link QuickFilterConfig}.\n */\n quickFilters?: QuickFilterConfig[];\n /**\n * Pin the toolbar to the top of the page's scroll area, and the table's\n * header row right under it, while the rows scroll past. For a list that IS\n * the page: what sits above the grid (title, summaries, notices) scrolls\n * away, and the controls and column names stay in reach. The table keeps its\n * own sideways scroll, which is why the header follows the page scroll\n * rather than relying on `position: sticky` (see `useStickyTableHead`).\n */\n stickyToolbar?: boolean;\n /** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */\n server?: DataViewServer;\n}\n\n/**\n * Surface the visible (filtered) rows so a page-level Export matches the view.\n *\n * Pages pass inline column/field arrays, so `matched` is a fresh reference on\n * every render even when its contents are unchanged. The guard is a signature\n * over the rows' *contents* (not just their ids), so the callback — and the\n * parent `useState` it usually drives — fires only when the visible data\n * actually changes. Ids alone are not enough: a server refresh can change a\n * visible row's values while keeping its id, and the export must reflect them.\n * Content-equal renders keep the same signature, so this never loops.\n */\nfunction useVisibleRowsNotifier<T>(matched: T[], onVisibleRowsChange?: (rows: T[]) => void): void {\n const visibleSignature = JSON.stringify(matched);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === visibleSignature) return;\n lastSignature.current = visibleSignature;\n onVisibleRowsChange?.(matched);\n }, [visibleSignature, matched, onVisibleRowsChange]);\n}\n\n/**\n * The reusable admin DataViews table (FUT-88): the shared ContentToolbar +\n * TableFilter panel over `@12-apps/ui` DataGrid. State + derived data live in\n * {@link useDataViewsState}; the render lives in `GridShell`. This component just\n * connects the two. Reused across every admin list page.\n */\nexport function DataViewsGrid<T extends Record<string, unknown>>(\n props: DataViewsGridProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice: this component\n // only ADDS the controller, and a 25-name destructure repeated in the JSX is\n // where a newly added prop silently stops being passed on.\n const { rangeFields = [], testIdPrefix = \"table\" } = props;\n const controller = useDataViewsState({ ...props, rangeFields, testIdPrefix });\n useVisibleRowsNotifier(controller.matched, props.onVisibleRowsChange);\n return <GridShell {...props} c={controller} rangeFields={rangeFields} testIdPrefix={testIdPrefix} />;\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,WAAW,cAAc;AA+OzB;AAzBT,SAAS,uBAA0B,SAAc,qBAAiD;AAChG,QAAM,mBAAmB,KAAK,UAAU,OAAO;AAC/C,QAAM,gBAAgB,OAAsB,IAAI;AAChD,YAAU,MAAM;AACd,QAAI,cAAc,YAAY,iBAAkB;AAChD,kBAAc,UAAU;AACxB,0BAAsB,OAAO;AAAA,EAC/B,GAAG,CAAC,kBAAkB,SAAS,mBAAmB,CAAC;AACrD;AAQO,SAAS,cACd,OACmB;AAInB,QAAM,EAAE,cAAc,CAAC,GAAG,eAAe,QAAQ,IAAI;AACrD,QAAM,aAAa,kBAAkB,EAAE,GAAG,OAAO,aAAa,aAAa,CAAC;AAC5E,yBAAuB,WAAW,SAAS,MAAM,mBAAmB;AACpE,SAAO,oBAAC,aAAW,GAAG,OAAO,GAAG,YAAY,aAA0B,cAA4B;AACpG;","names":[]}
1
+ {"version":3,"sources":["../src/components/data-display/DataViews/DataViewsGrid.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useRef } from \"react\";\n\nimport { type SortFieldDefinition } from \"../../layout/ContentToolbar\";\n\nimport { GridShell } from \"./data-views-grid-parts\";\nimport type { SelectionExtraRender } from \"./data-views-selection-extra\";\nimport type { ListGroupConfig } from \"./list-card-rails\";\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { BoardConfig } from \"./DataViewsBoard\";\nimport type { DataViewExport } from \"./data-views-export\";\nimport type { ScopeConfig } from \"./data-views-scopes\";\nimport type { DataViewCardSelection } from \"./data-views-types\";\nimport {\n type DataViewColumn,\n type DataViewsLayout,\n type DataViewServer,\n type DataViewState,\n type DataViewSyncState,\n type FilterFieldConfig,\n type QuickFilterConfig,\n type RangeFieldConfig,\n type RowAction,\n} from \"./data-views-types\";\nimport type { DataViewRowDetail } from \"./data-views-row-detail\";\nimport { useDataViewsState } from \"./use-data-views-state\";\n\ninterface DataViewsGridProps<T extends Record<string, unknown>> {\n rows: T[];\n columns: DataViewColumn<T>[];\n fields: FilterFieldConfig<T>[];\n /** Optional numeric min/max range filters (advanced \"filter by amount\"). */\n rangeFields?: RangeFieldConfig<T>[];\n getRowId: (row: T) => string | number;\n /** Row click opens the row; clicks in the actions column are ignored. */\n onRowClick?: (row: T) => void;\n emptyState?: React.ReactNode;\n dataTestId?: string;\n testIdPrefix?: string;\n /** Seed/replace the view state. A NEW reference re-applies (used to apply a saved view). */\n appliedState?: DataViewState;\n /**\n * URL-driven controls (search/pills/ranges/sort) that RE-APPLY on reference\n * change while preserving column visibility — for server-mode lists that keep\n * their filter/sort/page in the address bar (see {@link DataViewSyncState}).\n */\n syncState?: DataViewSyncState;\n /** Notified on every view-state change (so a save-view modal can read it). */\n onStateChange?: (state: DataViewState) => void;\n /**\n * Notified with the currently-visible (search + filter matched) rows whenever\n * they change — so a page-level Export exports what the user sees, not the\n * full dataset.\n */\n onVisibleRowsChange?: (rows: T[]) => void;\n /** Saved-views UI injected into the toolbar (FUT-89). */\n toolbarRightSlot?: React.ReactNode;\n /**\n * The saved-view chrome for the Exibir panel: its VISÃO header (with the\n * views dropdown) and its Redefinir / Salvar visão footer. Supplied by\n * `DataViewsTableBase`; without it the panel is tabs only.\n */\n displayView?: DisplayPanelView;\n /** Big page title in the header row (next to the funnel + gear). */\n title?: string;\n /** Primary page actions rendered at the header's right. */\n headerActions?: React.ReactNode;\n /**\n * Sort options for the toolbar's \"Sort By\" dropdown. Defaults to the sortable\n * columns (asc/desc each) when omitted.\n */\n sortFields?: SortFieldDefinition[];\n /**\n * Per-sort-field VALUE KIND (`\"currency\" | \"number\" | \"date\" | \"text\"`), so the\n * Exibir panel phrases the direction in that column's own terms. \"Crescente\"\n * on a currency column is a puzzle; \"Menor → maior\" is not. Defaults to text.\n */\n sortKinds?: Record<string, string>;\n /**\n * Opt-in \"Exportar\" control. The grid hands the host the current query,\n * UNPAGINATED, and the host re-queries — the grid never fetches, and an\n * export therefore follows the filters rather than the loaded page.\n */\n exportConfig?: DataViewExport;\n /**\n * A single, reusable list of row actions that drives BOTH the per-row \"⋮\"\n * kebab AND the bulk-actions menu (tabwoah model). When provided, the grid\n * appends a kebab actions column automatically (unless the page already\n * defines one) and shows an \"Ações\" bulk menu when rows are selected.\n */\n rowActions?: RowAction<T>[];\n /**\n * Extra leading control rendered in the auto kebab column, before the \"⋮\"\n * (e.g. a favourite star). Only used when `rowActions` is set.\n */\n rowActionsLeading?: (row: T) => React.ReactNode;\n /**\n * Low-level override for the selection bulk control. Prefer `rowActions`.\n * Receives the selected rows + a `clearSelection` callback.\n */\n bulkActions?: (selectedRows: T[], clearSelection: () => void) => React.ReactNode;\n /**\n * A control rendered beside the \"N selected\" count, for changing WHAT is\n * selected rather than what happens to it — a \"select all N matching the\n * filter\" widening, above all.\n *\n * Called only while something is selected, and handed\n * {@link SelectionExtraContext.allOnPageSelected} so the control can follow\n * the convention operators already know: the widening appears once the whole\n * page is ticked, and not before.\n */\n selectionExtra?: SelectionExtraRender<T>;\n /**\n * Render a bespoke per-row menu in the actions column instead of the auto\n * kebab — typically an entity's self-contained 3-dots menu that owns its own\n * popups, so the SAME menu component drives both the table row and the card.\n * `rowActions`/`bulkActions` still drive the multi-row bulk menu.\n */\n renderRowMenu?: (row: T) => React.ReactNode;\n /**\n * Row selection — on by default. `false` opts the grid out entirely: no\n * checkbox column in the table (and no width reserved for one), no checkbox\n * or checkbox gutter on cards and list rows, no select-all strip and no\n * count. With nothing selectable, the toolbar's selection mode never takes\n * over the search, the filter pills and Exportar. For a grid with no bulk\n * action, where a selection could only hide the toolbar. Row click and the\n * row menu are unaffected.\n */\n selectable?: boolean;\n /**\n * Opt-in expandable rows (table layout only): a chevron in a leading column\n * opens `render(row)` under the row. See {@link DataViewRowDetail}.\n */\n rowDetail?: DataViewRowDetail<T>;\n /**\n * Opt-in \"Grade\" (cards) layout. When provided, a Grade/Tabela toggle appears in\n * the toolbar and the cards body renders each visible row via this function\n * (reusing the same search/filter/sort). Omit ⇒ table only (unchanged).\n */\n renderCard?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * Opt-in \"Quadro\" (board) layout: the loaded page laid out as columns of one\n * grouping field. Reuses `renderCard`, so supplying a board WITHOUT one simply\n * offers no board. Best when the groups are states in a state machine — derive\n * these groups and `scopes` from ONE definition so the two cannot drift.\n */\n board?: BoardConfig<T>;\n /**\n * Opt-in \"Lista\" layout (FUT-733): one FULL-WIDTH row per record, rendered by\n * the entity — a marker, a title, a subtitle and a value on the right. Sits\n * between the table (compare columns) and the cards (browse); omit ⇒ not\n * offered, exactly as `renderCard` gates the cards.\n */\n renderListRow?: (row: T, selection: DataViewCardSelection) => React.ReactNode;\n /**\n * The Lista's SHARED COLUMNS — declared once for the list, obeyed by every row.\n *\n * This is what makes a list line up by construction rather than by convention.\n * Omit it and each row still resolves its own tracks from its own config,\n * which agrees with its neighbours right up until one row carries an unusually\n * wide value.\n */\n listGroup?: ListGroupConfig<T>;\n /**\n * The page-level partition rendered as an exclusive tab strip above the\n * toolbar, with server-supplied counts. Requires `server`: a scope is applied\n * at the backend, never in the browser.\n */\n scopes?: ScopeConfig[];\n /** The row field the scopes partition by — used only to reject a pill over the same field. */\n scopeFieldId?: string;\n /** Which layout to show first when the user has expressed no preference (default \"table\"). */\n defaultLayout?: DataViewsLayout;\n /**\n * Ignore the remembered cross-screen layout preference and pin to\n * `defaultLayout`. For tables that exist to SHOW a layout — stories, docs,\n * screenshots — not for real screens.\n */\n ignoreStoredLayout?: boolean;\n /**\n * Opt into the responsive inline filter UX (collapsible filter row on wide\n * screens, modal on narrow). Default `false` keeps the classic slide-in panel.\n */\n inlineFilters?: boolean;\n /** Keep the inline search visible with no filter fields and no active search. */\n alwaysShowSearch?: boolean;\n /**\n * One-click filters drawn as toggle chips at the head of the toolbar, each\n * applying one value of a declared pill field. See {@link QuickFilterConfig}.\n */\n quickFilters?: QuickFilterConfig[];\n /**\n * Pin the toolbar to the top of the page's scroll area, and the table's\n * header row right under it, while the rows scroll past. For a list that IS\n * the page: what sits above the grid (title, summaries, notices) scrolls\n * away, and the controls and column names stay in reach. The table keeps its\n * own sideways scroll, which is why the header follows the page scroll\n * rather than relying on `position: sticky` (see `useStickyTableHead`).\n */\n stickyToolbar?: boolean;\n /**\n * Show the \"N de N\" counter (default `true`). `false` removes it from the\n * bar AND from the ladder's budget, so nothing is shed to make room for it —\n * for a list whose rows are not all records (section headings handed in as\n * rows would be counted as results).\n */\n showCounter?: boolean;\n /** Server-mode wiring; when set the grid is backend-driven (no client filter/sort/paginate). */\n server?: DataViewServer;\n}\n\n/**\n * Surface the visible (filtered) rows so a page-level Export matches the view.\n *\n * Pages pass inline column/field arrays, so `matched` is a fresh reference on\n * every render even when its contents are unchanged. The guard is a signature\n * over the rows' *contents* (not just their ids), so the callback — and the\n * parent `useState` it usually drives — fires only when the visible data\n * actually changes. Ids alone are not enough: a server refresh can change a\n * visible row's values while keeping its id, and the export must reflect them.\n * Content-equal renders keep the same signature, so this never loops.\n */\nfunction useVisibleRowsNotifier<T>(matched: T[], onVisibleRowsChange?: (rows: T[]) => void): void {\n const visibleSignature = JSON.stringify(matched);\n const lastSignature = useRef<string | null>(null);\n useEffect(() => {\n if (lastSignature.current === visibleSignature) return;\n lastSignature.current = visibleSignature;\n onVisibleRowsChange?.(matched);\n }, [visibleSignature, matched, onVisibleRowsChange]);\n}\n\n/**\n * The reusable admin DataViews table (FUT-88): the shared ContentToolbar +\n * TableFilter panel over `@12-apps/ui` DataGrid. State + derived data live in\n * {@link useDataViewsState}; the render lives in `GridShell`. This component just\n * connects the two. Reused across every admin list page.\n */\nexport function DataViewsGrid<T extends Record<string, unknown>>(\n props: DataViewsGridProps<T>,\n): React.JSX.Element {\n // Forwarded as a whole rather than restated name-by-name twice: this component\n // only ADDS the controller, and a 25-name destructure repeated in the JSX is\n // where a newly added prop silently stops being passed on.\n const { rangeFields = [], testIdPrefix = \"table\" } = props;\n const controller = useDataViewsState({ ...props, rangeFields, testIdPrefix });\n useVisibleRowsNotifier(controller.matched, props.onVisibleRowsChange);\n return <GridShell {...props} c={controller} rangeFields={rangeFields} testIdPrefix={testIdPrefix} />;\n}\n"],"mappings":";;;;;;;;AAEA,SAAS,WAAW,cAAc;AAsPzB;AAzBT,SAAS,uBAA0B,SAAc,qBAAiD;AAChG,QAAM,mBAAmB,KAAK,UAAU,OAAO;AAC/C,QAAM,gBAAgB,OAAsB,IAAI;AAChD,YAAU,MAAM;AACd,QAAI,cAAc,YAAY,iBAAkB;AAChD,kBAAc,UAAU;AACxB,0BAAsB,OAAO;AAAA,EAC/B,GAAG,CAAC,kBAAkB,SAAS,mBAAmB,CAAC;AACrD;AAQO,SAAS,cACd,OACmB;AAInB,QAAM,EAAE,cAAc,CAAC,GAAG,eAAe,QAAQ,IAAI;AACrD,QAAM,aAAa,kBAAkB,EAAE,GAAG,OAAO,aAAa,aAAa,CAAC;AAC5E,yBAAuB,WAAW,SAAS,MAAM,mBAAmB;AACpE,SAAO,oBAAC,aAAW,GAAG,OAAO,GAAG,YAAY,aAA0B,cAA4B;AACpG;","names":[]}
@@ -2,11 +2,11 @@ import {
2
2
  ModalPanelContents,
3
3
  modalAriaIds,
4
4
  resolveModalContent
5
- } from "./chunk-6A6GZRXD.js";
5
+ } from "./chunk-3VXS7O3X.js";
6
6
  import {
7
7
  STYLE_ONLY_PROPS,
8
8
  dialogRootStyles
9
- } from "./chunk-3PGY4UL4.js";
9
+ } from "./chunk-YKQA4NPM.js";
10
10
  import {
11
11
  usePanelChrome
12
12
  } from "./chunk-TSMF7K37.js";
@@ -78,6 +78,7 @@ var StackedModalPanel = (props) => {
78
78
  fullScreen,
79
79
  maxWidth,
80
80
  size,
81
+ panelWidth,
81
82
  disableBackdrop,
82
83
  disableFocusTrap,
83
84
  keepMounted,
@@ -128,6 +129,7 @@ var StackedModalPanel = (props) => {
128
129
  rtl,
129
130
  customMaxWidth: maxWidth,
130
131
  panelSize: size,
132
+ panelWidth,
131
133
  TransitionComponent: SlideTransition,
132
134
  maxWidth,
133
135
  disableEscapeKeyDown: !closeOnEsc,
@@ -172,4 +174,4 @@ var StackedModal = (props) => {
172
174
  export {
173
175
  StackedModal
174
176
  };
175
- //# sourceMappingURL=chunk-TNVO3EVF.js.map
177
+ //# sourceMappingURL=chunk-KT3TF2LT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/feedback/StackedModal/StackedModal.tsx"],"sourcesContent":["import Dialog from '@mui/material/Dialog/index.js';\nimport Slide from '@mui/material/Slide/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport type { TransitionProps } from '@mui/material/transitions/index.js';\nimport type { FC } from 'react';\nimport React, { forwardRef, useEffect, useId } from 'react';\nimport { usePanelChrome } from './StackedModal.hooks';\nimport { modalAriaIds, ModalPanelContents, resolveModalContent } from './StackedModal.parts';\nimport type { PanelStyleProps } from './StackedModal.styles';\nimport { dialogRootStyles, STYLE_ONLY_PROPS } from './StackedModal.styles';\nimport type { StackedModalProps } from './StackedModal.types';\n\nconst StyledDialog = styled(Dialog, {\n shouldForwardProp: (prop) => !STYLE_ONLY_PROPS.includes(prop as string),\n})<PanelStyleProps>(({ theme, ...props }) => dialogRootStyles(theme, props));\n\n/** Panels slide in from the right on every device. */\nconst SlideTransition = forwardRef<HTMLDivElement, TransitionProps>(\n function SlideTransition(props, ref) {\n return (\n <Slide direction=\"left\" ref={ref} {...props}>\n {props.children as React.ReactElement}\n </Slide>\n );\n },\n);\n\nconst DEFAULTS: Partial<StackedModalProps> = {\n open: false,\n glass: false,\n navigationTitle: '',\n closeOnClickOutside: true,\n closeOnEsc: true,\n loading: false,\n loadingText: 'Loading...',\n maxWidth: false,\n disableBackdrop: false,\n disableFocusTrap: false,\n keepMounted: false,\n rtl: false,\n};\n\n/**\n * Fills in the defaults for props the caller left `undefined`. A table plus one\n * loop, rather than a default per destructured prop — each of those is a branch,\n * and fifteen of them put the component over the complexity bar on their own.\n */\nconst withDefaults = (props: StackedModalProps): StackedModalProps => {\n const resolved = { ...props };\n for (const [key, value] of Object.entries(DEFAULTS)) {\n const prop = key as keyof StackedModalProps;\n if (resolved[prop] === undefined) {\n Object.assign(resolved, { [prop]: value });\n }\n }\n return resolved;\n};\n\n/** The modal's props once defaults are applied and its stack identity is settled. */\ntype ResolvedProps = StackedModalProps & { modalId: string };\n\n/**\n * `hideHeader` removes the bar that names the dialog; without an\n * `aria-labelledby` of the caller's own, the dialog has no accessible name.\n */\nconst useUnnamedDialogWarning = (unnamed: boolean): void => {\n useEffect(() => {\n const development = typeof process !== 'undefined' && process.env?.NODE_ENV !== 'production';\n if (unnamed && development) {\n // eslint-disable-next-line no-console -- a config warning has no other channel.\n console.warn(\n 'StackedModal: `hideHeader` without `aria-labelledby` leaves the dialog unnamed. ' +\n \"Point `aria-labelledby` at your content header's title.\",\n );\n }\n }, [unnamed]);\n};\n\nconst StackedModalPanel: FC<ResolvedProps> = (props) => {\n const {\n open, onClose, glass, navigationTitle, backLabel, hideClose, hideHeader, children, actions, modalId,\n closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, size, panelWidth, disableBackdrop,\n disableFocusTrap, keepMounted, rtl, dataTestId,\n 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps\n } = props;\n\n const {\n dialogRef, modalRole, isAnimating, showSkeleton, zIndex, isMobile, canGoBack, isRoot,\n handleBack, handleClose,\n } = usePanelChrome({\n open, modalId, loading, closeOnEsc, closeOnClickOutside, disableFocusTrap, onClose,\n });\n\n // Don't render if in background (performance optimization)\n if (modalRole === 'background' && !keepMounted) return null;\n\n const { content, modalActions, headerActions, hasMobileActions } = resolveModalContent(\n children,\n actions,\n isMobile,\n );\n const { titleId, descId } = modalAriaIds(modalId, ariaLabelledBy, ariaDescribedBy);\n useUnnamedDialogWarning(Boolean(hideHeader) && !ariaLabelledBy);\n\n return (\n <StyledDialog\n ref={dialogRef}\n open={Boolean(open)}\n onClose={handleClose}\n fullScreen={fullScreen ?? isMobile}\n modalRole={modalRole}\n isAnimating={isAnimating}\n glass={glass}\n rtl={rtl}\n customMaxWidth={maxWidth}\n panelSize={size}\n panelWidth={panelWidth}\n TransitionComponent={SlideTransition}\n maxWidth={maxWidth}\n disableEscapeKeyDown={!closeOnEsc}\n hideBackdrop={disableBackdrop}\n keepMounted={keepMounted}\n aria-labelledby={titleId}\n aria-describedby={descId}\n data-testid={dataTestId}\n sx={{ zIndex }}\n {...otherProps}\n >\n <ModalPanelContents\n backLabel={backLabel}\n showSkeleton={showSkeleton}\n loadingText={loadingText}\n titleId={titleId}\n descId={descId}\n navigationTitle={navigationTitle}\n hideClose={hideClose}\n hideHeader={Boolean(hideHeader) && isRoot}\n canGoBack={canGoBack}\n onBack={handleBack}\n onClose={onClose}\n headerActions={headerActions}\n content={content}\n modalActions={modalActions}\n hasMobileActions={hasMobileActions}\n rtl={rtl}\n dataTestId={dataTestId}\n />\n </StyledDialog>\n );\n};\n\nexport const StackedModal: FC<StackedModalProps> = (props) => {\n // A modal with no caller-supplied id still needs a STABLE one — it keys this\n // panel's entry in the stack, so a value that changed per render (as a\n // `Math.random()` default does) would re-register it on every pass.\n const fallbackId = useId();\n const resolved = withDefaults(props);\n return <StackedModalPanel {...resolved} modalId={resolved.modalId ?? fallbackId} />;\n};\n\n// Re-exported so `./StackedModal` stays the single public entry point for the\n// component and its stack primitives, as the barrel and existing imports expect.\nexport {\n ModalStackProvider,\n ModalStackProvider as StackedModalProvider,\n useModalStack,\n useModalStack as useStackedModal,\n} from './modal-stack';\nexport { StackedModalActions, StackedModalContent } from './StackedModal.parts';\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,SAAS,cAAc;AAGvB,SAAgB,YAAY,WAAW,aAAa;AAe9C;AARN,IAAM,eAAe,OAAO,QAAQ;AAAA,EAClC,mBAAmB,CAAC,SAAS,CAAC,iBAAiB,SAAS,IAAc;AACxE,CAAC,EAAmB,CAAC,EAAE,OAAO,GAAG,MAAM,MAAM,iBAAiB,OAAO,KAAK,CAAC;AAG3E,IAAM,kBAAkB;AAAA,EACtB,SAASA,iBAAgB,OAAO,KAAK;AACnC,WACE,oBAAC,SAAM,WAAU,QAAO,KAAW,GAAG,OACnC,gBAAM,UACT;AAAA,EAEJ;AACF;AAEA,IAAM,WAAuC;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,KAAK;AACP;AAOA,IAAM,eAAe,CAA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e,iBAAiB,IAAI;AAAA,IACjE;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,QAAM,EAAE,SAAS,OAAO,IAAI,aAAa,SAAS,gBAAgB,eAAe;AACjF,0BAAwB,QAAQ,UAAU,KAAK,CAAC,cAAc;AAE9D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,MAAM,QAAQ,IAAI;AAAA,MAClB,SAAS;AAAA,MACT,YAAY,cAAc;AAAA,MAC1B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB;AAAA,MAChB,WAAW;AAAA,MACX;AAAA,MACA,qBAAqB;AAAA,MACrB;AAAA,MACA,sBAAsB,CAAC;AAAA,MACvB,cAAc;AAAA,MACd;AAAA,MACA,mBAAiB;AAAA,MACjB,oBAAkB;AAAA,MAClB,eAAa;AAAA,MACb,IAAI,EAAE,OAAO;AAAA,MACZ,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAY,QAAQ,UAAU,KAAK;AAAA,UACnC;AAAA,UACA,QAAQ;AAAA,UACR;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEO,IAAM,eAAsC,CAAC,UAAU;AAI5D,QAAM,aAAa,MAAM;AACzB,QAAM,WAAW,aAAa,KAAK;AACnC,SAAO,oBAAC,qBAAmB,GAAG,UAAU,SAAS,SAAS,WAAW,YAAY;AACnF;","names":["SlideTransition"]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useSummaryInfo
3
- } from "./chunk-AAXLQFC7.js";
3
+ } from "./chunk-3FIIMP7I.js";
4
4
  import {
5
5
  PendingSpinner,
6
6
  SaveError,
7
7
  SettingHeader,
8
8
  partTestId
9
- } from "./chunk-OJFE5PK6.js";
9
+ } from "./chunk-ZZO5MRMV.js";
10
10
  import {
11
11
  clampStyles,
12
12
  descriptionStyles
@@ -87,4 +87,4 @@ export {
87
87
  useSettingSwitchIds,
88
88
  SettingSwitchBlock
89
89
  };
90
- //# sourceMappingURL=chunk-7JS2SPRW.js.map
90
+ //# sourceMappingURL=chunk-LKRXLWCC.js.map