@12-apps/ui 6.66.2 → 6.68.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 (291) hide show
  1. package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
  2. package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
  3. package/dist/_internal/components/data-display/Carousel/Carousel.js +2 -2
  4. package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
  5. package/dist/_internal/components/data-display/Chart/SpecChart.js +6 -6
  6. package/dist/_internal/components/data-display/Chart/chart-renderers.js +2 -2
  7. package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
  8. package/dist/_internal/components/data-display/Chip/Chip.js +3 -3
  9. package/dist/_internal/components/data-display/Chip/Chip.metrics.js +5 -1
  10. package/dist/_internal/components/data-display/Chip/Chip.styles.js +2 -2
  11. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
  12. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +34 -31
  13. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +36 -33
  14. package/dist/_internal/components/data-display/DataViews/base-card.js +2 -2
  15. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +5 -5
  16. package/dist/_internal/components/data-display/DataViews/base-list-card-layout.js +6 -6
  17. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +4 -4
  18. package/dist/_internal/components/data-display/DataViews/base-list-card.js +8 -8
  19. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +4 -4
  20. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +3 -3
  21. package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -3
  22. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +6 -6
  23. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +7 -6
  24. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +31 -28
  25. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +11 -5
  26. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
  27. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -3
  28. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +7 -4
  29. package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js +18 -0
  30. package/dist/_internal/components/data-display/DataViews/data-views-overflow-fields.js.map +1 -0
  31. package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +6 -2
  32. package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js +20 -0
  33. package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js.map +1 -0
  34. package/dist/_internal/components/data-display/DataViews/data-views-quick-types.js +1 -0
  35. package/dist/_internal/components/data-display/DataViews/data-views-quick-types.js.map +1 -0
  36. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
  37. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +3 -3
  38. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +8 -7
  39. package/dist/_internal/components/data-display/DataViews/data-views-sticky-head.js +21 -0
  40. package/dist/_internal/components/data-display/DataViews/data-views-sticky-head.js.map +1 -0
  41. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +7 -6
  42. package/dist/_internal/components/data-display/DataViews/data-views-types.js +1 -1
  43. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
  44. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +3 -3
  45. package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
  46. package/dist/_internal/components/data-display/index.js +22 -22
  47. package/dist/_internal/components/feedback/StackedModal/StackedModal.js +3 -3
  48. package/dist/_internal/components/feedback/StackedModal/StackedModal.parts.js +2 -2
  49. package/dist/_internal/components/feedback/StackedModal/StackedModal.styles.js +1 -1
  50. package/dist/_internal/components/feedback/index.js +3 -3
  51. package/dist/_internal/components/index.js +33 -33
  52. package/dist/_internal/components/layout/SettingCard/SettingCard.js +6 -6
  53. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +4 -4
  54. package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +5 -5
  55. package/dist/_internal/components/layout/SettingCard/SettingGrid.js +5 -5
  56. package/dist/_internal/components/layout/SettingCard/SettingGroup.js +7 -7
  57. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +6 -6
  58. package/dist/_internal/components/layout/SettingCard/SettingToggle.js +7 -7
  59. package/dist/_internal/components/layout/index.js +10 -10
  60. package/dist/_internal/components/navigation/Tabs/Tabs.js +1 -1
  61. package/dist/_internal/components/navigation/index.js +1 -1
  62. package/dist/_internal/user-avatar/user-avatar.js +5 -5
  63. package/dist/charts.js +11 -11
  64. package/dist/{chunk-35L5YMYQ.js → chunk-2QB4WIU5.js} +6 -6
  65. package/dist/{chunk-AAXLQFC7.js → chunk-3FIIMP7I.js} +2 -2
  66. package/dist/{chunk-6A6GZRXD.js → chunk-3VXS7O3X.js} +2 -2
  67. package/dist/chunk-4IE66GY2.js +89 -0
  68. package/dist/chunk-4IE66GY2.js.map +1 -0
  69. package/dist/{chunk-JYMXYSDP.js → chunk-5CAWRMDX.js} +2 -2
  70. package/dist/{chunk-647DEGIU.js → chunk-5WJFCQFN.js} +7 -7
  71. package/dist/{chunk-M6V7Y7CP.js → chunk-6CZC5S6O.js} +3 -3
  72. package/dist/chunk-6CZC5S6O.js.map +1 -0
  73. package/dist/{chunk-K6KBASL2.js → chunk-72L5C74V.js} +2 -2
  74. package/dist/chunk-AT6UKTH4.js +129 -0
  75. package/dist/chunk-AT6UKTH4.js.map +1 -0
  76. package/dist/{chunk-BI7YMVKZ.js → chunk-B2JSUFDX.js} +2 -2
  77. package/dist/{chunk-7J5JR33K.js → chunk-BBBHPK2Q.js} +2 -2
  78. package/dist/{chunk-UZ2CEJOO.js → chunk-CSJ7WNXU.js} +2 -2
  79. package/dist/{chunk-6QYKZMEE.js → chunk-CSLBRJ7N.js} +40 -25
  80. package/dist/chunk-CSLBRJ7N.js.map +1 -0
  81. package/dist/{chunk-LMIOWP6H.js → chunk-D34PZJH3.js} +2 -2
  82. package/dist/{chunk-HYQJJLBC.js → chunk-DHAXUVMR.js} +27 -3
  83. package/dist/chunk-DHAXUVMR.js.map +1 -0
  84. package/dist/{chunk-TKLPPAS5.js → chunk-E5GYHN4X.js} +4 -4
  85. package/dist/{chunk-KU6VHNRV.js → chunk-E5I776YW.js} +6 -2
  86. package/dist/{chunk-KU6VHNRV.js.map → chunk-E5I776YW.js.map} +1 -1
  87. package/dist/{chunk-SUZLGB5I.js → chunk-E6K2UZGR.js} +3 -3
  88. package/dist/{chunk-7XSCEHGA.js → chunk-EOQ6EKTS.js} +7 -7
  89. package/dist/{chunk-L7OWFJUU.js → chunk-EZAQIEYB.js} +40 -34
  90. package/dist/chunk-EZAQIEYB.js.map +1 -0
  91. package/dist/chunk-GCYGVWOI.js +59 -0
  92. package/dist/chunk-GCYGVWOI.js.map +1 -0
  93. package/dist/{chunk-AMLHEKSV.js → chunk-HI7JPDD6.js} +5 -5
  94. package/dist/{chunk-O2P2KTKN.js → chunk-HLYYB4O5.js} +1 -1
  95. package/dist/chunk-HLYYB4O5.js.map +1 -0
  96. package/dist/{chunk-SAJDNO43.js → chunk-IGMD6S76.js} +3 -3
  97. package/dist/{chunk-EZFQO77P.js → chunk-IPYV7BLH.js} +2 -2
  98. package/dist/{chunk-KARMRTTM.js → chunk-J2RUDZVJ.js} +7 -7
  99. package/dist/{chunk-HQCZT6TO.js → chunk-JVOEVTCZ.js} +5 -5
  100. package/dist/{chunk-VJB63DUM.js → chunk-K3PMMW23.js} +2 -2
  101. package/dist/{chunk-TNVO3EVF.js → chunk-KT3TF2LT.js} +5 -3
  102. package/dist/chunk-KT3TF2LT.js.map +1 -0
  103. package/dist/{chunk-6S3S2K7O.js → chunk-L7HKMTKR.js} +3 -3
  104. package/dist/chunk-L7HKMTKR.js.map +1 -0
  105. package/dist/{chunk-J6DYHBID.js → chunk-LIN4A2BW.js} +7 -7
  106. package/dist/{chunk-7JS2SPRW.js → chunk-LKRXLWCC.js} +3 -3
  107. package/dist/{chunk-FXZUVZON.js → chunk-LWZ2K225.js} +6 -6
  108. package/dist/{chunk-EWTSQTVR.js → chunk-NI67M453.js} +6 -5
  109. package/dist/chunk-NI67M453.js.map +1 -0
  110. package/dist/{chunk-MJ6EAND6.js → chunk-Q7BGMLCX.js} +2 -2
  111. package/dist/{chunk-6ATXOJVQ.js → chunk-QADTI63U.js} +4 -4
  112. package/dist/{chunk-CMLIWUBW.js → chunk-QPCHABOZ.js} +24 -1
  113. package/dist/chunk-QPCHABOZ.js.map +1 -0
  114. package/dist/{chunk-L6MGAPBX.js → chunk-RCZ4KL2H.js} +5 -3
  115. package/dist/chunk-RCZ4KL2H.js.map +1 -0
  116. package/dist/{chunk-YLSSQJZM.js → chunk-T7ZERP7A.js} +30 -2
  117. package/dist/chunk-T7ZERP7A.js.map +1 -0
  118. package/dist/{chunk-SB2SEGR6.js → chunk-TIM4PXWN.js} +3 -3
  119. package/dist/{chunk-Y7YKIIYS.js → chunk-TQXB2OHP.js} +28 -4
  120. package/dist/chunk-TQXB2OHP.js.map +1 -0
  121. package/dist/{chunk-KUFDUXYB.js → chunk-U6ODZJCH.js} +2 -2
  122. package/dist/{chunk-3WLS7Z7D.js → chunk-UMOHHWXY.js} +3 -3
  123. package/dist/{chunk-S4JXSC4D.js → chunk-V6SRBQMN.js} +5 -5
  124. package/dist/{chunk-JY5YINUH.js → chunk-WQ32YFM5.js} +15 -7
  125. package/dist/chunk-WQ32YFM5.js.map +1 -0
  126. package/dist/{chunk-ERA3AEWU.js → chunk-WTGIW7LX.js} +12 -3
  127. package/dist/chunk-WTGIW7LX.js.map +1 -0
  128. package/dist/{chunk-2VMIHFMX.js → chunk-WVIJFS5Y.js} +9 -4
  129. package/dist/chunk-WVIJFS5Y.js.map +1 -0
  130. package/dist/{chunk-375HTCF2.js → chunk-Y2CCXB7R.js} +18 -2
  131. package/dist/chunk-Y2CCXB7R.js.map +1 -0
  132. package/dist/{chunk-33XGC4YU.js → chunk-YEGZIYVM.js} +2 -2
  133. package/dist/{chunk-3PGY4UL4.js → chunk-YKQA4NPM.js} +37 -7
  134. package/dist/chunk-YKQA4NPM.js.map +1 -0
  135. package/dist/{chunk-XMVPNCYM.js → chunk-YQGVO3ZU.js} +3 -3
  136. package/dist/{chunk-OJFE5PK6.js → chunk-ZZO5MRMV.js} +2 -2
  137. package/dist/data-display/Avatar.js +4 -4
  138. package/dist/data-display/CardKit.js +7 -7
  139. package/dist/data-display/Carousel.js +2 -2
  140. package/dist/data-display/Chart.js +11 -11
  141. package/dist/data-display/Chip.js +3 -3
  142. package/dist/data-display/DataGrid.js +2 -2
  143. package/dist/data-display/DataViews.js +45 -42
  144. package/dist/feedback/StackedModal.js +3 -3
  145. package/dist/layout/SettingCard.js +10 -10
  146. package/dist/native/data-display/Chip.js +20 -1
  147. package/dist/native/data-display/Chip.js.map +1 -1
  148. package/dist/navigation/Tabs.js +1 -1
  149. package/dist/types/components/data-display/Chip/Chip.base.d.ts +5 -1
  150. package/dist/types/components/data-display/Chip/Chip.base.d.ts.map +1 -1
  151. package/dist/types/components/data-display/Chip/Chip.d.ts.map +1 -1
  152. package/dist/types/components/data-display/Chip/Chip.metrics.d.ts +4 -0
  153. package/dist/types/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
  154. package/dist/types/components/data-display/Chip/Chip.styles.d.ts +2 -7
  155. package/dist/types/components/data-display/Chip/Chip.styles.d.ts.map +1 -1
  156. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts +15 -1
  157. package/dist/types/components/data-display/DataViews/DataViewsGrid.d.ts.map +1 -1
  158. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts +5 -1
  159. package/dist/types/components/data-display/DataViews/DataViewsTableBase.d.ts.map +1 -1
  160. package/dist/types/components/data-display/DataViews/data-views-empty.d.ts +10 -0
  161. package/dist/types/components/data-display/DataViews/data-views-empty.d.ts.map +1 -1
  162. package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts +2 -0
  163. package/dist/types/components/data-display/DataViews/data-views-grid-bodies.d.ts.map +1 -1
  164. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts +5 -1
  165. package/dist/types/components/data-display/DataViews/data-views-grid-parts.d.ts.map +1 -1
  166. package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts +4 -1
  167. package/dist/types/components/data-display/DataViews/data-views-inline-bar.d.ts.map +1 -1
  168. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +10 -1
  169. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
  170. package/dist/types/components/data-display/DataViews/data-views-more-filters.d.ts.map +1 -1
  171. package/dist/types/components/data-display/DataViews/data-views-overflow-fields.d.ts +56 -0
  172. package/dist/types/components/data-display/DataViews/data-views-overflow-fields.d.ts.map +1 -0
  173. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts +7 -5
  174. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
  175. package/dist/types/components/data-display/DataViews/data-views-quick-chip.d.ts +16 -0
  176. package/dist/types/components/data-display/DataViews/data-views-quick-chip.d.ts.map +1 -0
  177. package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts +33 -0
  178. package/dist/types/components/data-display/DataViews/data-views-quick-types.d.ts.map +1 -0
  179. package/dist/types/components/data-display/DataViews/data-views-range-types.d.ts +2 -0
  180. package/dist/types/components/data-display/DataViews/data-views-range-types.d.ts.map +1 -1
  181. package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts +11 -6
  182. package/dist/types/components/data-display/DataViews/data-views-shell-toolbar.d.ts.map +1 -1
  183. package/dist/types/components/data-display/DataViews/data-views-sticky-head.d.ts +45 -0
  184. package/dist/types/components/data-display/DataViews/data-views-sticky-head.d.ts.map +1 -0
  185. package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts +6 -0
  186. package/dist/types/components/data-display/DataViews/data-views-toolbar.d.ts.map +1 -1
  187. package/dist/types/components/data-display/DataViews/data-views-types.d.ts +7 -4
  188. package/dist/types/components/data-display/DataViews/data-views-types.d.ts.map +1 -1
  189. package/dist/types/components/data-display/DataViews/index.d.ts +1 -1
  190. package/dist/types/components/data-display/DataViews/index.d.ts.map +1 -1
  191. package/dist/types/components/feedback/StackedModal/StackedModal.d.ts.map +1 -1
  192. package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts +2 -1
  193. package/dist/types/components/feedback/StackedModal/StackedModal.styles.d.ts.map +1 -1
  194. package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts +17 -0
  195. package/dist/types/components/feedback/StackedModal/StackedModal.types.d.ts.map +1 -1
  196. package/dist/types/components/feedback/StackedModal/index.d.ts +1 -1
  197. package/dist/types/components/feedback/StackedModal/index.d.ts.map +1 -1
  198. package/dist/types/components/navigation/Tabs/Tabs.d.ts.map +1 -1
  199. package/dist/types/components/navigation/Tabs/Tabs.types.d.ts +12 -0
  200. package/dist/types/components/navigation/Tabs/Tabs.types.d.ts.map +1 -1
  201. package/dist/types/components/navigation/Tabs/index.d.ts +1 -1
  202. package/dist/types/components/navigation/Tabs/index.d.ts.map +1 -1
  203. package/dist/types-native/components/data-display/Chip/Chip.base.d.ts +5 -1
  204. package/dist/types-native/components/data-display/Chip/Chip.base.d.ts.map +1 -1
  205. package/dist/types-native/components/data-display/Chip/Chip.look.native.d.ts.map +1 -1
  206. package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts +4 -0
  207. package/dist/types-native/components/data-display/Chip/Chip.metrics.d.ts.map +1 -1
  208. package/dist/user-avatar.js +5 -5
  209. package/package.json +1 -1
  210. package/src/components/data-display/Chip/Chip.base.ts +5 -1
  211. package/src/components/data-display/Chip/Chip.look.native.ts +22 -1
  212. package/src/components/data-display/Chip/Chip.metrics.ts +5 -0
  213. package/src/components/data-display/Chip/Chip.styles.tsx +38 -1
  214. package/src/components/data-display/Chip/Chip.tsx +6 -2
  215. package/src/components/data-display/Chip/chip.md +2 -2
  216. package/src/components/data-display/DataViews/DataViewsGrid.tsx +15 -0
  217. package/src/components/data-display/DataViews/DataViewsTableBase.tsx +5 -0
  218. package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +50 -0
  219. package/src/components/data-display/DataViews/data-views-empty.tsx +25 -0
  220. package/src/components/data-display/DataViews/data-views-grid-bodies.tsx +11 -1
  221. package/src/components/data-display/DataViews/data-views-grid-parts.tsx +27 -15
  222. package/src/components/data-display/DataViews/data-views-inline-bar.tsx +24 -1
  223. package/src/components/data-display/DataViews/data-views-more-fields.tsx +34 -1
  224. package/src/components/data-display/DataViews/data-views-more-filters.tsx +20 -4
  225. package/src/components/data-display/DataViews/data-views-overflow-fields.ts +110 -0
  226. package/src/components/data-display/DataViews/data-views-overflow.ts +58 -36
  227. package/src/components/data-display/DataViews/data-views-quick-chip.tsx +143 -0
  228. package/src/components/data-display/DataViews/data-views-quick-types.ts +33 -0
  229. package/src/components/data-display/DataViews/data-views-range-types.ts +2 -0
  230. package/src/components/data-display/DataViews/data-views-shell-toolbar.tsx +31 -23
  231. package/src/components/data-display/DataViews/data-views-sticky-head.ts +132 -0
  232. package/src/components/data-display/DataViews/data-views-toolbar.tsx +9 -0
  233. package/src/components/data-display/DataViews/data-views-types.ts +7 -11
  234. package/src/components/data-display/DataViews/index.ts +1 -0
  235. package/src/components/feedback/StackedModal/StackedModal.md +1 -0
  236. package/src/components/feedback/StackedModal/StackedModal.styles.ts +53 -6
  237. package/src/components/feedback/StackedModal/StackedModal.tsx +2 -1
  238. package/src/components/feedback/StackedModal/StackedModal.types.ts +17 -0
  239. package/src/components/feedback/StackedModal/index.ts +1 -1
  240. package/src/components/navigation/Tabs/Tabs.md +1 -0
  241. package/src/components/navigation/Tabs/Tabs.tsx +30 -1
  242. package/src/components/navigation/Tabs/Tabs.types.ts +14 -0
  243. package/src/components/navigation/Tabs/index.ts +1 -1
  244. package/dist/chunk-2VMIHFMX.js.map +0 -1
  245. package/dist/chunk-375HTCF2.js.map +0 -1
  246. package/dist/chunk-3PGY4UL4.js.map +0 -1
  247. package/dist/chunk-6QYKZMEE.js.map +0 -1
  248. package/dist/chunk-6S3S2K7O.js.map +0 -1
  249. package/dist/chunk-CMLIWUBW.js.map +0 -1
  250. package/dist/chunk-ERA3AEWU.js.map +0 -1
  251. package/dist/chunk-EWTSQTVR.js.map +0 -1
  252. package/dist/chunk-HYQJJLBC.js.map +0 -1
  253. package/dist/chunk-JY5YINUH.js.map +0 -1
  254. package/dist/chunk-L6MGAPBX.js.map +0 -1
  255. package/dist/chunk-L7OWFJUU.js.map +0 -1
  256. package/dist/chunk-M6V7Y7CP.js.map +0 -1
  257. package/dist/chunk-O2P2KTKN.js.map +0 -1
  258. package/dist/chunk-TNVO3EVF.js.map +0 -1
  259. package/dist/chunk-Y7YKIIYS.js.map +0 -1
  260. package/dist/chunk-YLSSQJZM.js.map +0 -1
  261. /package/dist/{chunk-35L5YMYQ.js.map → chunk-2QB4WIU5.js.map} +0 -0
  262. /package/dist/{chunk-AAXLQFC7.js.map → chunk-3FIIMP7I.js.map} +0 -0
  263. /package/dist/{chunk-6A6GZRXD.js.map → chunk-3VXS7O3X.js.map} +0 -0
  264. /package/dist/{chunk-JYMXYSDP.js.map → chunk-5CAWRMDX.js.map} +0 -0
  265. /package/dist/{chunk-647DEGIU.js.map → chunk-5WJFCQFN.js.map} +0 -0
  266. /package/dist/{chunk-K6KBASL2.js.map → chunk-72L5C74V.js.map} +0 -0
  267. /package/dist/{chunk-BI7YMVKZ.js.map → chunk-B2JSUFDX.js.map} +0 -0
  268. /package/dist/{chunk-7J5JR33K.js.map → chunk-BBBHPK2Q.js.map} +0 -0
  269. /package/dist/{chunk-UZ2CEJOO.js.map → chunk-CSJ7WNXU.js.map} +0 -0
  270. /package/dist/{chunk-LMIOWP6H.js.map → chunk-D34PZJH3.js.map} +0 -0
  271. /package/dist/{chunk-TKLPPAS5.js.map → chunk-E5GYHN4X.js.map} +0 -0
  272. /package/dist/{chunk-SUZLGB5I.js.map → chunk-E6K2UZGR.js.map} +0 -0
  273. /package/dist/{chunk-7XSCEHGA.js.map → chunk-EOQ6EKTS.js.map} +0 -0
  274. /package/dist/{chunk-AMLHEKSV.js.map → chunk-HI7JPDD6.js.map} +0 -0
  275. /package/dist/{chunk-SAJDNO43.js.map → chunk-IGMD6S76.js.map} +0 -0
  276. /package/dist/{chunk-EZFQO77P.js.map → chunk-IPYV7BLH.js.map} +0 -0
  277. /package/dist/{chunk-KARMRTTM.js.map → chunk-J2RUDZVJ.js.map} +0 -0
  278. /package/dist/{chunk-HQCZT6TO.js.map → chunk-JVOEVTCZ.js.map} +0 -0
  279. /package/dist/{chunk-VJB63DUM.js.map → chunk-K3PMMW23.js.map} +0 -0
  280. /package/dist/{chunk-J6DYHBID.js.map → chunk-LIN4A2BW.js.map} +0 -0
  281. /package/dist/{chunk-7JS2SPRW.js.map → chunk-LKRXLWCC.js.map} +0 -0
  282. /package/dist/{chunk-FXZUVZON.js.map → chunk-LWZ2K225.js.map} +0 -0
  283. /package/dist/{chunk-MJ6EAND6.js.map → chunk-Q7BGMLCX.js.map} +0 -0
  284. /package/dist/{chunk-6ATXOJVQ.js.map → chunk-QADTI63U.js.map} +0 -0
  285. /package/dist/{chunk-SB2SEGR6.js.map → chunk-TIM4PXWN.js.map} +0 -0
  286. /package/dist/{chunk-KUFDUXYB.js.map → chunk-U6ODZJCH.js.map} +0 -0
  287. /package/dist/{chunk-3WLS7Z7D.js.map → chunk-UMOHHWXY.js.map} +0 -0
  288. /package/dist/{chunk-S4JXSC4D.js.map → chunk-V6SRBQMN.js.map} +0 -0
  289. /package/dist/{chunk-33XGC4YU.js.map → chunk-YEGZIYVM.js.map} +0 -0
  290. /package/dist/{chunk-XMVPNCYM.js.map → chunk-YQGVO3ZU.js.map} +0 -0
  291. /package/dist/{chunk-OJFE5PK6.js.map → chunk-ZZO5MRMV.js.map} +0 -0
@@ -0,0 +1,143 @@
1
+ "use client";
2
+
3
+ /**
4
+ * A QUICK CHIP — the toolbar's one-click filter (see `QuickFilterConfig`).
5
+ *
6
+ * Its own module because it is drawn in two places: on the bar, as a
7
+ * pill-shaped toggle with its count, and inside "Mais" when the ladder had no
8
+ * room for it, as a toggle row with the same label and count. Both write the
9
+ * same state through `onToggleQuick`, so where the chip sits never changes what
10
+ * it does.
11
+ *
12
+ * Hand-drawn rather than `Toggle` (MUI ToggleButton), as the range preset chips
13
+ * beside it are: a ToggleButton is a squared group member with its own
14
+ * selected tint, and this is a standalone pill whose pressed state INVERTS —
15
+ * the approved Estoque prototype's chip, pill radius included.
16
+ */
17
+ import Checkbox from "@mui/material/Checkbox/index.js";
18
+ import type { Theme } from "@mui/material/styles/index.js";
19
+
20
+ import { Box } from "../../../mui/Box";
21
+ import { fieldHeight } from "../../../tokens/field-height";
22
+ import { fieldEdge } from "../../../tokens/field-edge";
23
+ import { sxRem } from "../../../tokens/relative";
24
+
25
+ import type { QuickFilterConfig } from "./data-views-types";
26
+
27
+ /** The count's colour: the attention the rows need, or neutral. */
28
+ function toneColor(theme: Theme, tone: QuickFilterConfig["tone"]): string {
29
+ return tone ? theme.palette[tone].main : theme.palette.text.secondary;
30
+ }
31
+
32
+ /** The chip on the toolbar: pressed reads as a filled, inverted pill. */
33
+ export function QuickChip({
34
+ quick,
35
+ active,
36
+ onToggle,
37
+ testIdPrefix,
38
+ }: {
39
+ quick: QuickFilterConfig;
40
+ active: boolean;
41
+ onToggle: () => void;
42
+ testIdPrefix: string;
43
+ }): React.JSX.Element {
44
+ return (
45
+ <Box
46
+ component="button"
47
+ type="button"
48
+ onClick={onToggle}
49
+ aria-pressed={active}
50
+ data-testid={`${testIdPrefix}-quick-${quick.id}`}
51
+ sx={{
52
+ display: "inline-flex",
53
+ alignItems: "center",
54
+ gap: 0.75,
55
+ minHeight: fieldHeight,
56
+ px: 1.5,
57
+ border: 1,
58
+ borderStyle: "solid",
59
+ borderColor: (theme: Theme) => (active ? theme.palette.text.primary : fieldEdge(theme)),
60
+ borderRadius: 999,
61
+ bgcolor: active ? "text.primary" : "background.paper",
62
+ color: active ? "background.paper" : "text.primary",
63
+ cursor: "pointer",
64
+ font: "inherit",
65
+ fontSize: sxRem(13),
66
+ fontWeight: 500,
67
+ whiteSpace: "nowrap",
68
+ "&:hover": { borderColor: "text.primary" },
69
+ "&:focus-visible": {
70
+ outlineWidth: sxRem(2),
71
+ outlineStyle: "solid",
72
+ outlineColor: "primary.main",
73
+ // Inset, as the scope tabs draw theirs: the chip is the bar's full
74
+ // field height, and an outset ring is clipped above and below.
75
+ outlineOffset: sxRem(-2),
76
+ },
77
+ }}
78
+ >
79
+ {quick.label}
80
+ {quick.count !== undefined && (
81
+ <Box
82
+ component="span"
83
+ sx={{
84
+ fontWeight: 400,
85
+ fontVariantNumeric: "tabular-nums",
86
+ color: (theme: Theme) => (active ? "inherit" : toneColor(theme, quick.tone)),
87
+ opacity: active ? 0.75 : 1,
88
+ }}
89
+ >
90
+ {quick.count}
91
+ </Box>
92
+ )}
93
+ </Box>
94
+ );
95
+ }
96
+
97
+ /** The same chip inside "Mais": a toggle row, label and count. */
98
+ export function QuickRow({
99
+ quick,
100
+ active,
101
+ onToggle,
102
+ testIdPrefix,
103
+ }: {
104
+ quick: QuickFilterConfig;
105
+ active: boolean;
106
+ onToggle: () => void;
107
+ testIdPrefix: string;
108
+ }): React.JSX.Element {
109
+ return (
110
+ <Box
111
+ component="label"
112
+ data-testid={`${testIdPrefix}-more-quick-${quick.id}`}
113
+ sx={{
114
+ display: "flex",
115
+ alignItems: "center",
116
+ gap: 0.25,
117
+ pr: 1,
118
+ minHeight: fieldHeight,
119
+ cursor: "pointer",
120
+ fontSize: sxRem(13),
121
+ color: active ? "primary.main" : "text.primary",
122
+ }}
123
+ >
124
+ <Checkbox
125
+ size="small"
126
+ checked={active}
127
+ onChange={onToggle}
128
+ inputProps={{ "aria-label": quick.label }}
129
+ />
130
+ <Box component="span" sx={{ flex: 1 }}>
131
+ {quick.label}
132
+ </Box>
133
+ {quick.count !== undefined && (
134
+ <Box
135
+ component="span"
136
+ sx={{ fontVariantNumeric: "tabular-nums", color: (theme: Theme) => toneColor(theme, quick.tone) }}
137
+ >
138
+ {quick.count}
139
+ </Box>
140
+ )}
141
+ </Box>
142
+ );
143
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The quick-chip model, split from `data-views-types` at the file-size gate.
3
+ */
4
+
5
+ /**
6
+ * A ONE-CLICK FILTER: a toggle chip on the toolbar that applies one value of a
7
+ * declared pill field.
8
+ *
9
+ * A pill is two clicks — open it, tick a value — which is right for a facet
10
+ * with many values and wrong for the one question a page exists to answer
11
+ * ("what is empty on the shelf?"). The chip writes the SAME state a pill would
12
+ * (`pills[fieldId] = [value]`), so the URL, saved views, the active count and
13
+ * "Limpar" treat it as the filter it is; the field it targets is not drawn as a
14
+ * pill anywhere, the chips stand in for it. Chips sharing a `fieldId` are
15
+ * mutually exclusive, and pressing the pressed chip clears it.
16
+ *
17
+ * Chips are on the overflow ladder like every control: they keep the bar ahead
18
+ * of idle pills, and on a row too narrow for them they move into "Mais" as a
19
+ * toggle rather than scrolling the bar sideways.
20
+ */
21
+ export interface QuickFilterConfig {
22
+ /** Stable id, for the test id and the React key. */
23
+ id: string;
24
+ label: string;
25
+ /** The pill field this chip writes to. Declare it in `fields` too. */
26
+ fieldId: string;
27
+ /** The single value the chip applies. */
28
+ value: string;
29
+ /** How many rows the chip would show, when the host knows. */
30
+ count?: number;
31
+ /** Colours the count: what kind of attention the rows need. */
32
+ tone?: "error" | "warning" | "info" | "success";
33
+ }
@@ -60,6 +60,8 @@ interface RangeFieldBase {
60
60
  * field to suppress the defaults.
61
61
  */
62
62
  presets?: RangePreset[];
63
+ /** Never on the bar — always behind "Mais". See `FilterFieldConfig.inMore`. */
64
+ inMore?: boolean;
63
65
  }
64
66
 
65
67
  /** "Filter by amount": price, stock, margin, order total. */
@@ -12,28 +12,11 @@ import { GridToolbar } from "./data-views-toolbar";
12
12
  import type { RowAction } from "./data-views-types";
13
13
  import type { DataViewsController } from "./use-data-views-state";
14
14
 
15
- /**
16
- * The toolbar band, fed from the controller. Split out of `GridShell` for that
17
- * function's size budget — it is ~25 props of pure forwarding and nothing else.
18
- */
19
- export function ShellToolbar<T extends Record<string, unknown>>({
20
- c,
21
- rows,
22
- testIdPrefix,
23
- rowActions,
24
- bulkActions,
25
- selectionExtra,
26
- allOnPageSelected,
27
- toolbarRightSlot,
28
- showInline,
29
- compactControls,
30
- counterHidden,
31
- sortKinds,
32
- displayView,
33
- exportConfig,
34
- filterControls,
35
- barRef,
36
- }: {
15
+ /** What the shell hands the toolbar band. */
16
+ interface ShellToolbarProps<T extends Record<string, unknown>> {
17
+
18
+ /** Pin the band to the top of the page's scroll area. */
19
+ sticky?: boolean;
37
20
  c: DataViewsController<T>;
38
21
  rows: T[];
39
22
  testIdPrefix: string;
@@ -55,7 +38,31 @@ export function ShellToolbar<T extends Record<string, unknown>>({
55
38
  compactControls?: boolean;
56
39
  /** Step 5, last resort: drop the counter so the row still fits one line. */
57
40
  counterHidden?: boolean;
58
- }): React.JSX.Element {
41
+ }
42
+
43
+ /**
44
+ * The toolbar band, fed from the controller. Split out of `GridShell` for that
45
+ * function's size budget — it is ~25 props of pure forwarding and nothing else.
46
+ */
47
+ export function ShellToolbar<T extends Record<string, unknown>>({
48
+ c,
49
+ rows,
50
+ testIdPrefix,
51
+ rowActions,
52
+ bulkActions,
53
+ selectionExtra,
54
+ allOnPageSelected,
55
+ toolbarRightSlot,
56
+ showInline,
57
+ compactControls,
58
+ counterHidden,
59
+ sortKinds,
60
+ displayView,
61
+ exportConfig,
62
+ filterControls,
63
+ barRef,
64
+ sticky = false,
65
+ }: ShellToolbarProps<T>): React.JSX.Element {
59
66
  const columnOptions: ColumnVisibilityOption[] = c.hideableColumns.map((col) => ({
60
67
  id: col.id,
61
68
  label: col.label,
@@ -69,6 +76,7 @@ export function ShellToolbar<T extends Record<string, unknown>>({
69
76
  exportConfig={exportConfig}
70
77
  filterControls={filterControls}
71
78
  barRef={barRef}
79
+ sticky={sticky}
72
80
  compactControls={compactControls}
73
81
  counterHidden={counterHidden}
74
82
  testIdPrefix={testIdPrefix}
@@ -0,0 +1,132 @@
1
+ "use client";
2
+
3
+ /**
4
+ * THE TABLE HEADER THAT FOLLOWS THE PAGE — for `stickyToolbar`.
5
+ *
6
+ * `position: sticky` cannot do this job. A sticky cell sticks inside its
7
+ * nearest scroll container, and the table's is its own wrapper: it scrolls
8
+ * SIDEWAYS (`overflow-x: auto`, so a wide table is never squeezed), which
9
+ * makes it a scroll container on both axes, and it never scrolls vertically —
10
+ * the page does. So the header would stick to a box that never moves. Taking
11
+ * the sideways scroll away to let it stick would trade one defect for another:
12
+ * columns clipped or crushed on every narrow screen.
13
+ *
14
+ * Instead the header cells are TRANSLATED down by however far the page has
15
+ * scrolled the table's top past the sticky toolbar's bottom edge, clamped so
16
+ * the header never leaves its own table. The translation stays inside the
17
+ * table's box, so the wrapper's overflow clips nothing.
18
+ *
19
+ * Driven by the page's scroll (any scroller: a capturing listener on `window`
20
+ * hears every element's scroll event) and by resizes, one frame at a time.
21
+ */
22
+ import { useEffect, type RefObject } from "react";
23
+
24
+ /** The attribute the shell root carries, so the head can find its own toolbar. */
25
+ export const SHELL_ATTR = "data-dv-shell";
26
+ /** The attribute the sticky toolbar carries. */
27
+ export const STICKY_BAR_ATTR = "data-dv-sticky-bar";
28
+ /** Spread on the shell root. */
29
+ export const SHELL_PROPS = { [SHELL_ATTR]: "" };
30
+
31
+ /** How far the header must move down to sit under `edge` (px), inside its table. */
32
+ export function headShift(tableTop: number, tableHeight: number, headHeight: number, edge: number): number {
33
+ return Math.max(0, Math.min(edge - tableTop, tableHeight - headHeight));
34
+ }
35
+
36
+ /** The top edge the header slides under: the sticky toolbar's bottom, else the viewport's top. */
37
+ function stickyEdge(wrapper: HTMLElement): number {
38
+ const bar = wrapper.closest(`[${SHELL_ATTR}]`)?.querySelector<HTMLElement>(`[${STICKY_BAR_ATTR}]`);
39
+ return bar ? bar.getBoundingClientRect().bottom : 0;
40
+ }
41
+
42
+ /** The element whose scrolling moves the page under the bar: the nearest scrolling ancestor. */
43
+ function scrollParent(element: HTMLElement): HTMLElement | null {
44
+ for (let node = element.parentElement; node; node = node.parentElement) {
45
+ const { overflowY } = getComputedStyle(node);
46
+ if (overflowY === "auto" || overflowY === "scroll") return node;
47
+ }
48
+ return null;
49
+ }
50
+
51
+ /**
52
+ * Stick the toolbar to the VISIBLE top of its scroll area.
53
+ *
54
+ * `top: 0` sticks to the scroll container's content edge, which sits inside
55
+ * its padding: a main pane padded 24px held the bar 24px below the app bar,
56
+ * with rows showing through the gap above it. The bar's `top` is therefore
57
+ * the negative of that padding, read from the live layout (the shell does not
58
+ * know which pane it is in, nor what padding the host gave it).
59
+ */
60
+ export function useStickyBarTop(ref: RefObject<HTMLElement | null>, enabled: boolean): void {
61
+ useEffect(() => {
62
+ const shell = ref.current;
63
+ const bar = shell?.querySelector<HTMLElement>(`[${STICKY_BAR_ATTR}]`);
64
+ if (!enabled || !shell || !bar) return undefined;
65
+ const apply = (): void => {
66
+ const parent = scrollParent(bar);
67
+ // The host's own computed length, passed through — never one of ours.
68
+ bar.style.top = parent ? `calc(-1 * ${getComputedStyle(parent).paddingTop})` : "";
69
+ };
70
+ apply();
71
+ window.addEventListener("resize", apply);
72
+ return () => {
73
+ window.removeEventListener("resize", apply);
74
+ bar.style.top = "";
75
+ };
76
+ }, [ref, enabled]);
77
+ }
78
+
79
+ /** Move every header cell down by `shift` px (0 puts them back), above the rows they cover. */
80
+ export function paint(head: HTMLElement, shift: number): void {
81
+ // A measured offset, so a matrix rather than a design length. No DOMMatrix
82
+ // (jsdom), no translation: the header simply stays in the table.
83
+ const transform =
84
+ shift > 0 && typeof DOMMatrixReadOnly !== "undefined"
85
+ ? new DOMMatrixReadOnly().translate(0, shift).toString()
86
+ : "";
87
+ head.querySelectorAll<HTMLElement>("th").forEach((cell) => {
88
+ cell.style.transform = transform;
89
+ // Above the rows it now covers, below the toolbar (z-index 3).
90
+ cell.style.zIndex = transform ? "2" : "";
91
+ });
92
+ }
93
+
94
+ /** Translate the header cells of the table inside `ref` so they follow the page. */
95
+ export function useStickyTableHead(ref: RefObject<HTMLElement | null>, enabled: boolean): void {
96
+ useEffect(() => {
97
+ const wrapper = ref.current;
98
+ if (!enabled || !wrapper) return undefined;
99
+ let frame = 0;
100
+ const apply = (): void => {
101
+ frame = 0;
102
+ const table = wrapper.querySelector("table");
103
+ const head = table?.querySelector("thead");
104
+ if (!table || !head) return;
105
+ const box = table.getBoundingClientRect();
106
+ const shift = headShift(box.top, box.height, head.getBoundingClientRect().height, stickyEdge(wrapper));
107
+ paint(head, shift);
108
+ };
109
+ const schedule = (): void => {
110
+ if (frame === 0) frame = requestAnimationFrame(apply);
111
+ };
112
+ window.addEventListener("scroll", schedule, { capture: true, passive: true });
113
+ window.addEventListener("resize", schedule);
114
+ const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
115
+ observer?.observe(wrapper);
116
+ // A header cell added while scrolled (a column shown from "Exibir") must
117
+ // follow too, not wait for the next scroll.
118
+ const mutations = typeof MutationObserver === "undefined" ? null : new MutationObserver(schedule);
119
+ mutations?.observe(wrapper, { childList: true, subtree: true });
120
+ schedule();
121
+ return () => {
122
+ window.removeEventListener("scroll", schedule, { capture: true });
123
+ window.removeEventListener("resize", schedule);
124
+ observer?.disconnect();
125
+ mutations?.disconnect();
126
+ if (frame !== 0) cancelAnimationFrame(frame);
127
+ // Turned off mid-scroll: the header goes back where it belongs.
128
+ const head = wrapper.querySelector("thead");
129
+ if (head) paint(head, 0);
130
+ };
131
+ }, [ref, enabled]);
132
+ }
@@ -18,6 +18,7 @@ import { renderBulkActions } from "./data-views-grid-helpers";
18
18
  import type { RowAction } from "./data-views-types";
19
19
  import type { DataViewsController } from "./use-data-views-state";
20
20
  import { sxRem } from "../../../tokens/relative";
21
+ import { STICKY_BAR_ATTR } from "./data-views-sticky-head";
21
22
 
22
23
  export interface GridToolbarProps<T extends Record<string, unknown>> {
23
24
  testIdPrefix: string;
@@ -72,6 +73,12 @@ export interface GridToolbarProps<T extends Record<string, unknown>> {
72
73
  * line instead of spilling outside the toolbar.
73
74
  */
74
75
  counterHidden?: boolean;
76
+ /**
77
+ * Pin the band to the top of the page's scroll area (`stickyToolbar`). It
78
+ * takes the page background so rows scrolling under it do not show through,
79
+ * and sits above the table header that follows it (`useStickyTableHead`).
80
+ */
81
+ sticky?: boolean;
75
82
  }
76
83
 
77
84
  /** The right-aligned toolbar controls: Sort By, the counter, zoom/layout/columns, filters. */
@@ -147,7 +154,9 @@ export function GridToolbar<T extends Record<string, unknown>>(props: GridToolba
147
154
  return (
148
155
  <Box
149
156
  ref={props.barRef}
157
+ {...(props.sticky ? { [STICKY_BAR_ATTR]: "" } : {})}
150
158
  sx={{
159
+ ...(props.sticky && { position: "sticky", top: 0, zIndex: 3, bgcolor: "background.default" }),
151
160
  borderTop: 1,
152
161
  borderBottom: 1,
153
162
  borderColor: "divider",
@@ -137,21 +137,17 @@ export interface FilterFieldConfig<T extends Record<string, unknown>> {
137
137
  * its values is selected. Defaults to `String(row[id])`.
138
138
  */
139
139
  accessor?: (row: T) => string | string[];
140
+ /** Never on the bar, always behind "Mais" (beside quick chips); still counted, saved, cleared. */
141
+ inMore?: boolean;
140
142
  }
141
143
 
142
144
  /**
143
- * The range types live in `data-views-range-types` (this file outgrew the
144
- * size gate); they are re-exported here so `data-views-types` stays the one
145
- * name every consumer imports the model from.
145
+ * The range and quick-chip types live in their own modules (this file outgrew
146
+ * the size gate); re-exported so `data-views-types` stays the one import.
146
147
  */
147
- export type {
148
- DayRangeFieldConfig,
149
- NumberRangeFieldConfig,
150
- RangeFieldConfig,
151
- RangeFieldKind,
152
- RangePreset,
153
- RangeValue,
154
- } from "./data-views-range-types";
148
+ export type { QuickFilterConfig } from "./data-views-quick-types";
149
+ export type { DayRangeFieldConfig, NumberRangeFieldConfig, RangeFieldConfig } from "./data-views-range-types";
150
+ export type { RangeFieldKind, RangePreset, RangeValue } from "./data-views-range-types";
155
151
 
156
152
  /** A grid column that can join the search scan and the column-visibility menu. */
157
153
  export interface DataViewColumn<T extends Record<string, unknown>> extends GridColumn<T> {
@@ -62,6 +62,7 @@ export type {
62
62
  DataViewsLayout,
63
63
  DataViewColumn,
64
64
  FilterFieldConfig,
65
+ QuickFilterConfig,
65
66
  RangeFieldConfig,
66
67
  RangeFieldKind,
67
68
  RangeValue,
@@ -138,6 +138,7 @@ new component that portals should too.
138
138
  | `fullScreen` | `boolean` | `false` | Full screen mode |
139
139
  | `maxWidth` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| false` | `'md'` | Maximum modal width |
140
140
  | `size` | `'default' \| 'wide'` | `'default'` | Viewport share of the top panel: default is 80vw (`sm`–`lg`), 60vw (`lg`+), 40vw (≥2200px); `wide` is 90vw up to `xl`, 75vw above, 60vw ≥2200px — for a dense two-column editor |
141
+ | `panelWidth` | `{ share: string; maxPx: number; fullBelowPx?: number }` | - | An exact width for the top panel: `min(share, maxPx)` of the viewport, the whole screen under `fullBelowPx`. Replaces `size` and `maxWidth`. Viewport only — nothing inside the panel feeds back into it |
141
142
  | `disableBackdrop` | `boolean` | `false` | Hide backdrop |
142
143
  | `disableFocusTrap` | `boolean` | `false` | Disable focus trapping |
143
144
  | `keepMounted` | `boolean` | `false` | Keep modal mounted when closed |
@@ -3,7 +3,7 @@ import type { CSSObject, Theme } from '@mui/material/styles/index.js';
3
3
  import { scrim } from '../../../tokens/ink';
4
4
  import { rem } from '../../../tokens/relative';
5
5
  import { dynamicViewportHeight } from '../../../utils/viewport';
6
- import type { ModalPanelRole, PanelMaxWidth, PanelSize } from './StackedModal.types';
6
+ import type { ModalPanelRole, PanelMaxWidth, PanelSize, PanelWidth } from './StackedModal.types';
7
7
 
8
8
  /** Props that drive the panel's look but must not reach the DOM. */
9
9
  export interface PanelStyleProps {
@@ -13,10 +13,11 @@ export interface PanelStyleProps {
13
13
  rtl?: boolean;
14
14
  customMaxWidth?: PanelMaxWidth;
15
15
  panelSize?: PanelSize;
16
+ panelWidth?: PanelWidth;
16
17
  }
17
18
 
18
19
  /** Style-only props, filtered out before they can land on a DOM node. */
19
- export const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth', 'panelSize'];
20
+ export const STYLE_ONLY_PROPS = ['modalRole', 'isAnimating', 'glass', 'rtl', 'customMaxWidth', 'panelSize', 'panelWidth'];
20
21
 
21
22
  /** MUI breakpoint names mapped to the pixel width they cap the panel at. */
22
23
  const MAX_WIDTH_PX: Record<Exclude<PanelMaxWidth, false>, number> = {
@@ -38,6 +39,15 @@ const ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {
38
39
  primary: 'contractModal 300ms ease-in-out forwards',
39
40
  };
40
41
 
42
+ /** The custom property an exact-width panel's width and keyframes share. */
43
+ const EXACT_WIDTH_VAR = '--stacked-modal-width';
44
+
45
+ /** An exact-width panel settles at its own width, so its keyframes read it too. */
46
+ const EXACT_ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {
47
+ secondary: 'expandModalExact 300ms ease-in-out forwards',
48
+ primary: 'contractModalExact 300ms ease-in-out forwards',
49
+ };
50
+
41
51
  /** A wide panel settles at 90vw, so its keyframes must end there too, or it snaps. */
42
52
  const WIDE_ANIMATION_BY_ROLE: Partial<Record<ModalPanelRole, string>> = {
43
53
  secondary: 'expandModalWide 300ms ease-in-out forwards',
@@ -63,6 +73,15 @@ const KEYFRAMES: CSSObject = {
63
73
  from: { width: '100vw', transform: 'translateX(0)' },
64
74
  to: { width: '90vw', transform: 'translateX(0)' },
65
75
  },
76
+ // An exact-width panel settles at its own width, carried by the custom property.
77
+ '@keyframes expandModalExact': {
78
+ from: { width: `var(${EXACT_WIDTH_VAR})`, transform: 'translateX(0)' },
79
+ to: { width: '100vw', transform: 'translateX(0)' },
80
+ },
81
+ '@keyframes contractModalExact': {
82
+ from: { width: '100vw', transform: 'translateX(0)' },
83
+ to: { width: `var(${EXACT_WIDTH_VAR})`, transform: 'translateX(0)' },
84
+ },
66
85
  };
67
86
 
68
87
  const cap = (customMaxWidth?: PanelMaxWidth): number | null =>
@@ -106,6 +125,22 @@ const widePrimaryPanelStyles = (theme: Theme, capPx: number | null): CSSObject =
106
125
  [theme.breakpoints.up(2200)]: panelWidth(theme, '60vw', capPx),
107
126
  });
108
127
 
128
+ /**
129
+ * `panelWidth`: `min(share, maxPx)` from `sm` up, the whole screen under `sm`
130
+ * and under `fullBelowPx`. Viewport media queries only — never the panel's size.
131
+ */
132
+ const exactPrimaryPanelStyles = (theme: Theme, exact: PanelWidth): CSSObject => {
133
+ const width = `min(${exact.share}, ${rem(theme, exact.maxPx)})`;
134
+ const full = { [EXACT_WIDTH_VAR]: '100%', width: '100%', maxWidth: '100%' };
135
+ return {
136
+ [EXACT_WIDTH_VAR]: width,
137
+ width: `var(${EXACT_WIDTH_VAR})`,
138
+ maxWidth: `var(${EXACT_WIDTH_VAR})`,
139
+ [theme.breakpoints.down('sm')]: full,
140
+ ...(exact.fullBelowPx ? { [theme.breakpoints.down(exact.fullBelowPx)]: full } : {}),
141
+ };
142
+ };
143
+
109
144
  /** Panels below the top one expand to full width, producing the GTM stacking effect. */
110
145
  const secondaryPanelStyles = (): CSSObject => ({
111
146
  width: '100vw !important',
@@ -123,8 +158,10 @@ const rolePanelStyles = (
123
158
  role: ModalPanelRole | undefined,
124
159
  capPx: number | null,
125
160
  size?: PanelSize,
161
+ exact?: PanelWidth,
126
162
  ): CSSObject => {
127
163
  if (role === 'primary') {
164
+ if (exact) return exactPrimaryPanelStyles(theme, exact);
128
165
  return size === 'wide' ? widePrimaryPanelStyles(theme, capPx) : primaryPanelStyles(theme, capPx);
129
166
  }
130
167
  if (role === 'secondary') return secondaryPanelStyles();
@@ -143,8 +180,18 @@ const glassStyles = (theme: Theme, glass?: boolean, role?: ModalPanelRole): CSSO
143
180
  }
144
181
  : {};
145
182
 
146
- const animationStyles = (isAnimating?: boolean, role?: ModalPanelRole, size?: PanelSize): CSSObject => {
147
- const byRole = size === 'wide' ? WIDE_ANIMATION_BY_ROLE : ANIMATION_BY_ROLE;
183
+ const animationByRole = (size?: PanelSize, exact?: PanelWidth): Partial<Record<ModalPanelRole, string>> => {
184
+ if (exact) return EXACT_ANIMATION_BY_ROLE;
185
+ return size === 'wide' ? WIDE_ANIMATION_BY_ROLE : ANIMATION_BY_ROLE;
186
+ };
187
+
188
+ const animationStyles = (
189
+ isAnimating?: boolean,
190
+ role?: ModalPanelRole,
191
+ size?: PanelSize,
192
+ exact?: PanelWidth,
193
+ ): CSSObject => {
194
+ const byRole = animationByRole(size, exact);
148
195
  return isAnimating ? { animation: (role && byRole[role]) ?? 'none' } : {};
149
196
  };
150
197
 
@@ -169,9 +216,9 @@ const panelStyles = (theme: Theme, props: PanelStyleProps): CSSObject => {
169
216
  const capPx = cap(props.customMaxWidth);
170
217
  return {
171
218
  ...panelBaseStyles(theme),
172
- ...rolePanelStyles(theme, props.modalRole, capPx, props.panelSize),
219
+ ...rolePanelStyles(theme, props.modalRole, capPx, props.panelSize, props.panelWidth),
173
220
  ...glassStyles(theme, props.glass, props.modalRole),
174
- ...animationStyles(props.isAnimating, props.modalRole, props.panelSize),
221
+ ...animationStyles(props.isAnimating, props.modalRole, props.panelSize, props.panelWidth),
175
222
  };
176
223
  };
177
224
 
@@ -79,7 +79,7 @@ const useUnnamedDialogWarning = (unnamed: boolean): void => {
79
79
  const StackedModalPanel: FC<ResolvedProps> = (props) => {
80
80
  const {
81
81
  open, onClose, glass, navigationTitle, backLabel, hideClose, hideHeader, children, actions, modalId,
82
- closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, size, disableBackdrop,
82
+ closeOnClickOutside, closeOnEsc, loading, loadingText, fullScreen, maxWidth, size, panelWidth, disableBackdrop,
83
83
  disableFocusTrap, keepMounted, rtl, dataTestId,
84
84
  'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps
85
85
  } = props;
@@ -114,6 +114,7 @@ const StackedModalPanel: FC<ResolvedProps> = (props) => {
114
114
  rtl={rtl}
115
115
  customMaxWidth={maxWidth}
116
116
  panelSize={size}
117
+ panelWidth={panelWidth}
117
118
  TransitionComponent={SlideTransition}
118
119
  maxWidth={maxWidth}
119
120
  disableEscapeKeyDown={!closeOnEsc}
@@ -12,6 +12,21 @@ export type PanelMaxWidth = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false;
12
12
  * 60vw starves on a laptop.
13
13
  */
14
14
  export type PanelSize = 'default' | 'wide';
15
+ /**
16
+ * An exact width for the top panel, for a screen whose owner set one: the
17
+ * panel takes `min(share, maxPx)` of the viewport, and the whole screen when
18
+ * the viewport is narrower than `fullBelowPx`. It replaces `size` and
19
+ * `maxWidth`. Everything here reads the VIEWPORT, never the panel, so nothing
20
+ * inside the panel can feed back into the width that laid it out.
21
+ */
22
+ export interface PanelWidth {
23
+ /** The viewport share, as a CSS length (`'72vw'`). */
24
+ share: string;
25
+ /** The cap, in px; converted to rem like every other size here. */
26
+ maxPx: number;
27
+ /** Under this viewport width (px) the panel takes the whole screen. */
28
+ fullBelowPx?: number;
29
+ }
15
30
 
16
31
  export interface StackedModalProps {
17
32
  /** The back arrow's accessible name — it carries a glyph only. REQUIRED. */
@@ -64,6 +79,8 @@ export interface StackedModalProps {
64
79
  maxWidth?: PanelMaxWidth;
65
80
  /** Viewport share of the top panel — `wide` gives a dense editor more room */
66
81
  size?: PanelSize;
82
+ /** An exact width for the top panel; replaces `size` and `maxWidth` (see `PanelWidth`). */
83
+ panelWidth?: PanelWidth;
67
84
  /** Disable the backdrop click behavior */
68
85
  disableBackdrop?: boolean;
69
86
  /** Disable focus trap functionality */
@@ -8,4 +8,4 @@ export {
8
8
  useModalStack as useStackedModal,
9
9
  } from './StackedModal';
10
10
 
11
- export type { PanelSize, StackedModalProps } from './StackedModal.types';
11
+ export type { PanelSize, PanelWidth, StackedModalProps } from './StackedModal.types';
@@ -50,6 +50,7 @@ The Tabs component provides an intuitive way to organize related content into se
50
50
  | `content` | `ReactNode` | Yes | Content to display in panel |
51
51
  | `icon` | `ReactNode` | No | Icon to display before label |
52
52
  | `badge` | `string \| number` | No | Badge content (notification count) |
53
+ | `count` | `{ value: string \| number; tone?: 'neutral' \| 'warning' \| 'danger' }` | No | A count said inside the tab, after its label, as a small pill (lines, events, charges); `tone` marks one asking for action |
53
54
  | `disabled` | `boolean` | No | Whether tab is disabled |
54
55
  | `closable` | `boolean` | No | Whether tab can be closed |
55
56
  | `className`| `string` | No | Custom CSS class for the tab |