@12-apps/ui 6.48.1 → 6.49.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 (481) hide show
  1. package/NATIVE.md +1 -1
  2. package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +4 -4
  3. package/dist/_internal/components/data-display/Avatar/Avatar.js +4 -4
  4. package/dist/_internal/components/data-display/Avatar/Avatar.view.js +2 -2
  5. package/dist/_internal/components/data-display/Badge/Badge.js +8 -6
  6. package/dist/_internal/components/data-display/Badge/Badge.styles.js +6 -4
  7. package/dist/_internal/components/data-display/Badge/BadgeContent.js +7 -5
  8. package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
  9. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +3 -3
  10. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +3 -3
  11. package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +7 -5
  12. package/dist/_internal/components/data-display/Carousel/Carousel.js +10 -8
  13. package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +6 -4
  14. package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +6 -4
  15. package/dist/_internal/components/data-display/Chart/Chart.js +10 -8
  16. package/dist/_internal/components/data-display/Chart/SpecChart.js +14 -12
  17. package/dist/_internal/components/data-display/Chart/chart-context.js +7 -5
  18. package/dist/_internal/components/data-display/Chart/chart-internals.js +6 -4
  19. package/dist/_internal/components/data-display/Chart/chart-renderers.js +9 -7
  20. package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
  21. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +7 -5
  22. package/dist/_internal/components/data-display/DataGrid/DataGrid.model.js +5 -3
  23. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +48 -46
  24. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +60 -58
  25. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +3 -3
  26. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +4 -4
  27. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +5 -5
  28. package/dist/_internal/components/data-display/DataViews/base-card.js +2 -2
  29. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +9 -7
  30. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +8 -6
  31. package/dist/_internal/components/data-display/DataViews/base-list-card.js +11 -9
  32. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +8 -8
  33. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +4 -4
  34. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +11 -9
  35. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +7 -5
  36. package/dist/_internal/components/data-display/DataViews/data-views-empty.js +3 -3
  37. package/dist/_internal/components/data-display/DataViews/data-views-export.js +3 -3
  38. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +11 -11
  39. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +15 -13
  40. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +3 -3
  41. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +44 -42
  42. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +15 -15
  43. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +6 -4
  44. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +11 -11
  45. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +14 -14
  46. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +2 -2
  47. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +7 -5
  48. package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +3 -3
  49. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +18 -16
  50. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +11 -11
  51. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +17 -15
  52. package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +3 -3
  53. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +7 -5
  54. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
  55. package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
  56. package/dist/_internal/components/data-display/FleetMap/FleetBody.js +10 -10
  57. package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +5 -5
  58. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +17 -15
  59. package/dist/_internal/components/data-display/FleetMap/FleetRoster.js +4 -4
  60. package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
  61. package/dist/_internal/components/data-display/Lightbox/Lightbox.js +6 -6
  62. package/dist/_internal/components/data-display/Lightbox/LightboxControls.js +2 -2
  63. package/dist/_internal/components/data-display/Lightbox/LightboxOverlay.js +3 -3
  64. package/dist/_internal/components/data-display/Lightbox/LightboxThumbnails.js +2 -2
  65. package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -3
  66. package/dist/_internal/components/data-display/MapPreview/MapMarkers.js +2 -2
  67. package/dist/_internal/components/data-display/MapPreview/MapPreview.js +4 -4
  68. package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
  69. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +5 -3
  70. package/dist/_internal/components/data-display/Sheet/Sheet.js +9 -7
  71. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +6 -4
  72. package/dist/_internal/components/data-display/StatCard/StatCard.js +3 -3
  73. package/dist/_internal/components/data-display/Table/Table.js +7 -5
  74. package/dist/_internal/components/data-display/index.js +68 -66
  75. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +3 -3
  76. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +3 -3
  77. package/dist/_internal/components/feedback/index.js +4 -4
  78. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +2 -2
  79. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
  80. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +3 -3
  81. package/dist/_internal/components/form/Button/Button.js +2 -2
  82. package/dist/_internal/components/form/Calendar/Calendar.hooks.js +2 -2
  83. package/dist/_internal/components/form/Calendar/Calendar.js +6 -6
  84. package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
  85. package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
  86. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +2 -2
  87. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +4 -4
  88. package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
  89. package/dist/_internal/components/form/Command/Command.js +7 -5
  90. package/dist/_internal/components/form/Command/Command.styles.js +6 -4
  91. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
  92. package/dist/_internal/components/form/Label/Label.js +7 -5
  93. package/dist/_internal/components/form/Label/Label.styles.js +6 -4
  94. package/dist/_internal/components/form/Menubar/Menubar.item.js +7 -5
  95. package/dist/_internal/components/form/Menubar/Menubar.js +10 -8
  96. package/dist/_internal/components/form/Menubar/Menubar.styles.js +6 -4
  97. package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +8 -6
  98. package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
  99. package/dist/_internal/components/form/Switch/Switch.js +2 -2
  100. package/dist/_internal/components/form/index.js +37 -35
  101. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +5 -5
  102. package/dist/_internal/components/form/total-form/Fields/index.js +8 -8
  103. package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
  104. package/dist/_internal/components/index.js +142 -140
  105. package/dist/_internal/components/layout/Box/Box.js +8 -6
  106. package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +3 -3
  107. package/dist/_internal/components/layout/SettingCard/SettingCard.js +12 -10
  108. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +11 -9
  109. package/dist/_internal/components/layout/SettingCard/SettingGrid.js +12 -10
  110. package/dist/_internal/components/layout/SettingCard/SettingGroup.js +17 -15
  111. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +15 -13
  112. package/dist/_internal/components/layout/SettingCard/SettingToggle.js +17 -15
  113. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
  114. package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
  115. package/dist/_internal/components/layout/Stack/Stack.js +9 -7
  116. package/dist/_internal/components/layout/index.js +36 -34
  117. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +12 -10
  118. package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +6 -4
  119. package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
  120. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
  121. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
  122. package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
  123. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +12 -10
  124. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +14 -12
  125. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +9 -7
  126. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +10 -8
  127. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +10 -8
  128. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +10 -8
  129. package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +5 -3
  130. package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js.map +1 -1
  131. package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
  132. package/dist/_internal/components/navigation/index.js +31 -29
  133. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +5 -3
  134. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +5 -3
  135. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +5 -3
  136. package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +5 -3
  137. package/dist/_internal/components/utility/index.js +5 -3
  138. package/dist/_internal/icons/Icon.js +8 -6
  139. package/dist/_internal/provider/UiProvider.js +7 -5
  140. package/dist/_internal/provider/mui-bridge.js +6 -4
  141. package/dist/_internal/provider/use-ui-theme.js +7 -5
  142. package/dist/_internal/social-login-button/social-login-button.js +3 -3
  143. package/dist/_internal/tokens/density-overrides.js +20 -4
  144. package/dist/_internal/tokens/density-overrides.navigation.js +19 -0
  145. package/dist/_internal/tokens/density-overrides.navigation.js.map +1 -0
  146. package/dist/_internal/tokens/density-overrides.selection.js +11 -0
  147. package/dist/_internal/tokens/density-overrides.selection.js.map +1 -0
  148. package/dist/_internal/tokens/density.js +4 -2
  149. package/dist/_internal/user-avatar/user-avatar.js +7 -7
  150. package/dist/charts.js +22 -20
  151. package/dist/{chunk-ODFJTEIL.js → chunk-23YZEAUU.js} +4 -4
  152. package/dist/{chunk-OBID7SOG.js → chunk-2GAFEQ2T.js} +3 -3
  153. package/dist/{chunk-BIDPJNCG.js → chunk-2LQU7DRI.js} +25 -9
  154. package/dist/chunk-2LQU7DRI.js.map +1 -0
  155. package/dist/{chunk-NRSVI23L.js → chunk-2T7L6ZWF.js} +2 -2
  156. package/dist/{chunk-TMOC2XUE.js → chunk-2UPWKLHQ.js} +21 -5
  157. package/dist/chunk-2UPWKLHQ.js.map +1 -0
  158. package/dist/{chunk-2YKTB2IZ.js → chunk-32JMSHEA.js} +2 -2
  159. package/dist/{chunk-QFJ3JXXP.js → chunk-3IPPMWUA.js} +1 -1
  160. package/dist/{chunk-QFJ3JXXP.js.map → chunk-3IPPMWUA.js.map} +1 -1
  161. package/dist/{chunk-2NYVMLFQ.js → chunk-3YRPEZ3F.js} +2 -2
  162. package/dist/{chunk-CGL7R37P.js → chunk-43Q6CVPB.js} +4 -4
  163. package/dist/{chunk-G6II7SVX.js → chunk-44USLRMT.js} +4 -4
  164. package/dist/{chunk-E4GTZ26X.js → chunk-4CDZP6KD.js} +2 -2
  165. package/dist/{chunk-5D52CMNX.js → chunk-4ELI2MM3.js} +2 -52
  166. package/dist/chunk-4ELI2MM3.js.map +1 -0
  167. package/dist/{chunk-HISEWACT.js → chunk-4GRUNQNB.js} +2 -2
  168. package/dist/{chunk-AOKLEE64.js → chunk-4NDNV45Y.js} +2 -2
  169. package/dist/{chunk-LTJDZIYR.js → chunk-4O7X45T5.js} +7 -7
  170. package/dist/{chunk-H5XKBPKK.js → chunk-4UQY2DUN.js} +3 -3
  171. package/dist/{chunk-43UFSKEK.js → chunk-4WCYKU3S.js} +3 -3
  172. package/dist/{chunk-JAHWFJCW.js → chunk-5JCGBCFJ.js} +5 -5
  173. package/dist/{chunk-UJOFRJLX.js → chunk-5MW7OYBM.js} +2 -2
  174. package/dist/{chunk-4A7PSQB5.js → chunk-6EPXOVY3.js} +4 -4
  175. package/dist/{chunk-AQC67NQZ.js → chunk-6EXGL36F.js} +2 -2
  176. package/dist/{chunk-CMLIWUBW.js → chunk-6PPHALM3.js} +4 -4
  177. package/dist/{chunk-WHYVVKRS.js → chunk-6SI22JFV.js} +2 -2
  178. package/dist/{chunk-RZPYKTOG.js → chunk-6SM5ML75.js} +5 -5
  179. package/dist/{chunk-THCDUP6Q.js → chunk-6SXXW5GR.js} +6 -6
  180. package/dist/{chunk-5OX6KZIZ.js → chunk-6TLY2E24.js} +4 -4
  181. package/dist/{chunk-SAJ5H5VC.js → chunk-7JTTE4OY.js} +4 -4
  182. package/dist/{chunk-AG3DY5TH.js → chunk-ADSA76T7.js} +2 -2
  183. package/dist/{chunk-25OI5W6Y.js → chunk-AH4XGLE2.js} +2 -2
  184. package/dist/{chunk-CACBJ4CR.js → chunk-AJAPP56P.js} +2 -2
  185. package/dist/{chunk-GMC3F43L.js → chunk-AMSNWV7V.js} +3 -3
  186. package/dist/{chunk-MWPXKZ7O.js → chunk-AY5MY7HJ.js} +6 -6
  187. package/dist/{chunk-2LSJTQIL.js → chunk-B22NXESR.js} +2 -2
  188. package/dist/{chunk-E32YPPF5.js → chunk-B4Y6W3OU.js} +2 -2
  189. package/dist/{chunk-2K2B5QM2.js → chunk-BEGTLELZ.js} +5 -5
  190. package/dist/{chunk-QMSCRKR6.js → chunk-C7GYSLPO.js} +2 -2
  191. package/dist/{chunk-33NBMNTB.js → chunk-CF25EQFU.js} +2 -2
  192. package/dist/{chunk-WDAEYLT5.js → chunk-D6ROYZ6H.js} +2 -2
  193. package/dist/{chunk-ZVJSY2OV.js → chunk-EF5XUS44.js} +4 -4
  194. package/dist/{chunk-6PU3JYVY.js → chunk-F3AYISXT.js} +4 -4
  195. package/dist/{chunk-ST36ZSAN.js → chunk-FRIUYEXD.js} +2 -2
  196. package/dist/{chunk-K6LNHHSH.js → chunk-GC5XJ7YB.js} +4 -4
  197. package/dist/{chunk-JYLOCXMV.js → chunk-GI63FQEJ.js} +4 -4
  198. package/dist/{chunk-FVKBP3UX.js → chunk-GLKQT2DS.js} +2 -2
  199. package/dist/{chunk-MEYKNJNI.js → chunk-GT6HPOS2.js} +8 -8
  200. package/dist/{chunk-XFAXRMWY.js → chunk-GUAK7QUR.js} +4 -4
  201. package/dist/{chunk-JUKA4NY5.js → chunk-GWONO2ML.js} +6 -6
  202. package/dist/{chunk-YRACC6BB.js → chunk-GWVJZ7SX.js} +4 -4
  203. package/dist/{chunk-5NFQKL7C.js → chunk-H6K3AP42.js} +6 -6
  204. package/dist/{chunk-VOG5IVQW.js → chunk-H6N7XXUB.js} +2 -2
  205. package/dist/{chunk-PP7CDKO4.js → chunk-HCBGCR4N.js} +3 -3
  206. package/dist/{chunk-5OEC546C.js → chunk-HDI37JLT.js} +2 -2
  207. package/dist/{chunk-LHTEAPYG.js → chunk-HDQMSZA7.js} +3 -3
  208. package/dist/{chunk-VU63PDWW.js → chunk-HOXWNOQV.js} +3 -3
  209. package/dist/{chunk-KESGVMHW.js → chunk-HUGXO5PE.js} +3 -3
  210. package/dist/{chunk-3CDU7DLD.js → chunk-IKXS2YVQ.js} +2 -2
  211. package/dist/{chunk-BU6TCB76.js → chunk-INCTNS4X.js} +2 -2
  212. package/dist/{chunk-FS7UVKEE.js → chunk-IR5A2BKL.js} +4 -4
  213. package/dist/{chunk-2ZRZTGWP.js → chunk-ISW5K72V.js} +5 -5
  214. package/dist/{chunk-VZ4VAQX3.js → chunk-IVJKILIX.js} +2 -2
  215. package/dist/{chunk-NRI2TZDS.js → chunk-JNX4B3EE.js} +2 -2
  216. package/dist/{chunk-JWJ77IMK.js → chunk-JRV3UFOJ.js} +8 -8
  217. package/dist/{chunk-ZRIWMIHK.js → chunk-JVOV5WAJ.js} +6 -6
  218. package/dist/chunk-K3YHXOWZ.js +126 -0
  219. package/dist/chunk-K3YHXOWZ.js.map +1 -0
  220. package/dist/{chunk-HR7YTBR7.js → chunk-K4N3V7YE.js} +4 -4
  221. package/dist/{chunk-WU2KXA6I.js → chunk-KC733FDV.js} +3 -3
  222. package/dist/{chunk-ZCXVTFYQ.js → chunk-KG64HV34.js} +2 -2
  223. package/dist/{chunk-LB27LKG3.js → chunk-KUNHGNGF.js} +4 -4
  224. package/dist/{chunk-FQT4C5R4.js → chunk-KWIR73YH.js} +12 -12
  225. package/dist/{chunk-IKZSQKOE.js → chunk-LFHAYETO.js} +3 -3
  226. package/dist/{chunk-NM2FLCPV.js → chunk-LO4M5D7T.js} +3 -3
  227. package/dist/{chunk-CGBUWNNQ.js → chunk-LWFJZ3Q5.js} +4 -4
  228. package/dist/{chunk-OCQ6GDCF.js → chunk-MH3XW3WR.js} +2 -2
  229. package/dist/{chunk-3WAAL3KN.js → chunk-MT2OCLGT.js} +7 -7
  230. package/dist/{chunk-QJK7BNH3.js → chunk-N7KUKE45.js} +3 -3
  231. package/dist/{chunk-WAD5VL6B.js → chunk-NBFP645M.js} +7 -7
  232. package/dist/{chunk-TTJTMDLI.js → chunk-NF42BHI5.js} +2 -2
  233. package/dist/{chunk-6MN5KOVM.js → chunk-NHMFBUBK.js} +2 -2
  234. package/dist/{chunk-N4HHFYPB.js → chunk-NND4UTWS.js} +2 -2
  235. package/dist/{chunk-EMEXXAQI.js → chunk-NYFGFELX.js} +7 -7
  236. package/dist/{chunk-Q2LQVYXY.js → chunk-OL2BEJZR.js} +2 -2
  237. package/dist/{chunk-KTX7XME6.js → chunk-PAICZOL5.js} +4 -4
  238. package/dist/{chunk-AJ4MRDKM.js → chunk-PAK25GQC.js} +4 -4
  239. package/dist/{chunk-KYQ4OORF.js → chunk-PJNA6STF.js} +6 -6
  240. package/dist/{chunk-BPOVRMVS.js → chunk-Q4PS47EB.js} +8 -8
  241. package/dist/{chunk-YXU45AVO.js → chunk-QBJBKXF4.js} +10 -10
  242. package/dist/{chunk-EKWH4LGM.js → chunk-QEHEYVOL.js} +2 -2
  243. package/dist/{chunk-XNTDEQEB.js → chunk-QMA7TNZJ.js} +4 -4
  244. package/dist/{chunk-P2OQ4IGP.js → chunk-QTMXGMM7.js} +2 -2
  245. package/dist/{chunk-NQ7NMCRI.js → chunk-QTN7G5T2.js} +2 -2
  246. package/dist/{chunk-DSDNGTH6.js → chunk-R4XZTIZG.js} +7 -7
  247. package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
  248. package/dist/{chunk-F56VOHFW.js → chunk-RJTVUM5E.js} +2 -2
  249. package/dist/{chunk-KN7C6R6L.js → chunk-ROG7LMPK.js} +20 -20
  250. package/dist/{chunk-J44PPGBF.js → chunk-RX7J6VRI.js} +2 -2
  251. package/dist/{chunk-FIF4RQ4S.js → chunk-RXLD5XS2.js} +3 -3
  252. package/dist/{chunk-I2STNAIQ.js → chunk-RYWX6LK4.js} +2 -2
  253. package/dist/{chunk-HGRC635A.js → chunk-RZ4SBSLP.js} +2 -2
  254. package/dist/{chunk-S22XIXLL.js → chunk-SA2ERYVV.js} +5 -5
  255. package/dist/{chunk-6VKHS2BB.js → chunk-SDBNXZ2S.js} +2 -2
  256. package/dist/{chunk-KQS4ZJGS.js → chunk-SHAEK26Y.js} +4 -4
  257. package/dist/{chunk-PIUQYYOM.js → chunk-TBDAH7WC.js} +2 -2
  258. package/dist/{chunk-IHO2O44S.js → chunk-TE3XYCX7.js} +5 -5
  259. package/dist/{chunk-6DMUVVON.js → chunk-TJ7NQG7E.js} +4 -4
  260. package/dist/{chunk-Y6C4MYZE.js → chunk-TNQDSTIA.js} +7 -7
  261. package/dist/{chunk-UILH4OAZ.js → chunk-TOEBPWKG.js} +5 -5
  262. package/dist/{chunk-DWG5SEGW.js → chunk-TOMCXNAO.js} +2 -2
  263. package/dist/{chunk-YTIUFMRM.js → chunk-TU7ZXJX4.js} +3 -3
  264. package/dist/{chunk-P53KRCKW.js → chunk-TZASFX6G.js} +4 -4
  265. package/dist/{chunk-3CUWQXTG.js → chunk-UBUT2T5B.js} +2 -2
  266. package/dist/{chunk-ACU7LEFG.js → chunk-UDTA7YWD.js} +2 -2
  267. package/dist/{chunk-VYV3JOV5.js → chunk-UFGPKDF4.js} +2 -2
  268. package/dist/{chunk-WSYPM3SR.js → chunk-UI5O6J6R.js} +4 -4
  269. package/dist/{chunk-JQ6HDXKA.js → chunk-VFLNP2ZZ.js} +4 -4
  270. package/dist/{chunk-7PUSFB3T.js → chunk-W34CCOUM.js} +2 -2
  271. package/dist/{chunk-WDQRQIT7.js → chunk-WCVVM66J.js} +2 -2
  272. package/dist/{chunk-AEJ3FFNE.js → chunk-WQQON4RL.js} +5 -5
  273. package/dist/{chunk-H7DVH6KD.js → chunk-WT5SSBTU.js} +7 -7
  274. package/dist/{chunk-EWVJJ32N.js → chunk-WXAFPVMW.js} +5 -5
  275. package/dist/chunk-XK77FY42.js +59 -0
  276. package/dist/chunk-XK77FY42.js.map +1 -0
  277. package/dist/{chunk-6KLDYVRY.js → chunk-XKYOQOZK.js} +2 -2
  278. package/dist/{chunk-CKFZQQ6T.js → chunk-XNDMCT5G.js} +2 -2
  279. package/dist/{chunk-R53ZOW4B.js → chunk-XP522FFM.js} +3 -3
  280. package/dist/{chunk-WGNLG2W2.js → chunk-XRGJVS4P.js} +2 -2
  281. package/dist/{chunk-FPKVHR5L.js → chunk-XRUW7DMH.js} +2 -2
  282. package/dist/{chunk-IV7G7NK3.js → chunk-XZH22APJ.js} +4 -4
  283. package/dist/{chunk-ZL3GCUKC.js → chunk-ZAVMJL4S.js} +2 -2
  284. package/dist/{chunk-SV4FYSDL.js → chunk-ZDMQDTSH.js} +4 -4
  285. package/dist/{chunk-CKAVTWXP.js → chunk-ZGWEFOW6.js} +4 -4
  286. package/dist/{chunk-WC3W36AM.js → chunk-ZOUWHGV3.js} +4 -4
  287. package/dist/{chunk-4CBM7JNK.js → chunk-ZWIPJFUA.js} +4 -4
  288. package/dist/data-display/AsyncStateContainer.js +4 -4
  289. package/dist/data-display/Avatar.js +4 -4
  290. package/dist/data-display/Badge.js +8 -6
  291. package/dist/data-display/CardKit.js +6 -6
  292. package/dist/data-display/Carousel.js +10 -8
  293. package/dist/data-display/Chart.js +22 -20
  294. package/dist/data-display/DataGrid.js +7 -5
  295. package/dist/data-display/DataViews.js +76 -74
  296. package/dist/data-display/FleetMap.js +17 -15
  297. package/dist/data-display/LazyImage.js +3 -3
  298. package/dist/data-display/Lightbox.js +6 -6
  299. package/dist/data-display/LoadingState.js +3 -3
  300. package/dist/data-display/MapPreview.js +4 -4
  301. package/dist/data-display/Progress.js +2 -2
  302. package/dist/data-display/Sheet.js +9 -7
  303. package/dist/data-display/StatCard.js +3 -3
  304. package/dist/data-display/Table.js +7 -5
  305. package/dist/feedback/ConfirmAction.js +3 -3
  306. package/dist/feedback/NotificationStatusNotice.js +3 -3
  307. package/dist/form/AddressAutocomplete.js +7 -7
  308. package/dist/form/Button.js +2 -2
  309. package/dist/form/Calendar.js +6 -6
  310. package/dist/form/CategorySelect.js +4 -4
  311. package/dist/form/CodeEditor.js +3 -3
  312. package/dist/form/Command.js +7 -5
  313. package/dist/form/DateRangePicker.js +7 -7
  314. package/dist/form/Label.js +7 -5
  315. package/dist/form/Menubar.js +10 -8
  316. package/dist/form/RichTextEditor.js +2 -2
  317. package/dist/form/Switch.js +2 -2
  318. package/dist/form/total-form.js +14 -14
  319. package/dist/icons.js +8 -6
  320. package/dist/layout/Box.js +8 -6
  321. package/dist/layout/ContentToolbar.js +9 -9
  322. package/dist/layout/ScrollArea.js +3 -3
  323. package/dist/layout/SettingCard.js +22 -20
  324. package/dist/layout/SettingsLayout.js +4 -4
  325. package/dist/layout/Skeleton.js +2 -2
  326. package/dist/layout/Stack.js +9 -7
  327. package/dist/navigation/AppHeader.js +15 -13
  328. package/dist/navigation/NavigationMenu.js +5 -5
  329. package/dist/navigation/SectionNav.js +14 -12
  330. package/dist/navigation/Tabs.js +2 -2
  331. package/dist/provider.js +8 -6
  332. package/dist/social-login-button.js +3 -3
  333. package/dist/tokens.js +21 -5
  334. package/dist/types/provider/mui-bridge.d.ts.map +1 -1
  335. package/dist/types/tokens/density-overrides.d.ts +2 -14
  336. package/dist/types/tokens/density-overrides.d.ts.map +1 -1
  337. package/dist/types/tokens/density-overrides.navigation.d.ts +17 -0
  338. package/dist/types/tokens/density-overrides.navigation.d.ts.map +1 -0
  339. package/dist/types/tokens/density-overrides.selection.d.ts +16 -0
  340. package/dist/types/tokens/density-overrides.selection.d.ts.map +1 -0
  341. package/dist/types/tokens/density.d.ts +18 -11
  342. package/dist/types/tokens/density.d.ts.map +1 -1
  343. package/dist/types/tokens/scales.d.ts +1 -1
  344. package/dist/types/tokens/scales.d.ts.map +1 -1
  345. package/dist/user-avatar.js +7 -7
  346. package/dist/utility/WorkflowStep.js +5 -3
  347. package/package.json +1 -1
  348. package/src/provider/mui-bridge.ts +15 -3
  349. package/src/tokens/density-overrides.navigation.ts +226 -0
  350. package/src/tokens/density-overrides.selection.ts +210 -0
  351. package/src/tokens/density-overrides.ts +15 -208
  352. package/src/tokens/density.ts +30 -11
  353. package/src/tokens/scales.ts +10 -3
  354. package/dist/chunk-5D52CMNX.js.map +0 -1
  355. package/dist/chunk-BIDPJNCG.js.map +0 -1
  356. package/dist/chunk-TMOC2XUE.js.map +0 -1
  357. /package/dist/{chunk-ODFJTEIL.js.map → chunk-23YZEAUU.js.map} +0 -0
  358. /package/dist/{chunk-OBID7SOG.js.map → chunk-2GAFEQ2T.js.map} +0 -0
  359. /package/dist/{chunk-NRSVI23L.js.map → chunk-2T7L6ZWF.js.map} +0 -0
  360. /package/dist/{chunk-2YKTB2IZ.js.map → chunk-32JMSHEA.js.map} +0 -0
  361. /package/dist/{chunk-2NYVMLFQ.js.map → chunk-3YRPEZ3F.js.map} +0 -0
  362. /package/dist/{chunk-CGL7R37P.js.map → chunk-43Q6CVPB.js.map} +0 -0
  363. /package/dist/{chunk-G6II7SVX.js.map → chunk-44USLRMT.js.map} +0 -0
  364. /package/dist/{chunk-E4GTZ26X.js.map → chunk-4CDZP6KD.js.map} +0 -0
  365. /package/dist/{chunk-HISEWACT.js.map → chunk-4GRUNQNB.js.map} +0 -0
  366. /package/dist/{chunk-AOKLEE64.js.map → chunk-4NDNV45Y.js.map} +0 -0
  367. /package/dist/{chunk-LTJDZIYR.js.map → chunk-4O7X45T5.js.map} +0 -0
  368. /package/dist/{chunk-H5XKBPKK.js.map → chunk-4UQY2DUN.js.map} +0 -0
  369. /package/dist/{chunk-43UFSKEK.js.map → chunk-4WCYKU3S.js.map} +0 -0
  370. /package/dist/{chunk-JAHWFJCW.js.map → chunk-5JCGBCFJ.js.map} +0 -0
  371. /package/dist/{chunk-UJOFRJLX.js.map → chunk-5MW7OYBM.js.map} +0 -0
  372. /package/dist/{chunk-4A7PSQB5.js.map → chunk-6EPXOVY3.js.map} +0 -0
  373. /package/dist/{chunk-AQC67NQZ.js.map → chunk-6EXGL36F.js.map} +0 -0
  374. /package/dist/{chunk-CMLIWUBW.js.map → chunk-6PPHALM3.js.map} +0 -0
  375. /package/dist/{chunk-WHYVVKRS.js.map → chunk-6SI22JFV.js.map} +0 -0
  376. /package/dist/{chunk-RZPYKTOG.js.map → chunk-6SM5ML75.js.map} +0 -0
  377. /package/dist/{chunk-THCDUP6Q.js.map → chunk-6SXXW5GR.js.map} +0 -0
  378. /package/dist/{chunk-5OX6KZIZ.js.map → chunk-6TLY2E24.js.map} +0 -0
  379. /package/dist/{chunk-SAJ5H5VC.js.map → chunk-7JTTE4OY.js.map} +0 -0
  380. /package/dist/{chunk-AG3DY5TH.js.map → chunk-ADSA76T7.js.map} +0 -0
  381. /package/dist/{chunk-25OI5W6Y.js.map → chunk-AH4XGLE2.js.map} +0 -0
  382. /package/dist/{chunk-CACBJ4CR.js.map → chunk-AJAPP56P.js.map} +0 -0
  383. /package/dist/{chunk-GMC3F43L.js.map → chunk-AMSNWV7V.js.map} +0 -0
  384. /package/dist/{chunk-MWPXKZ7O.js.map → chunk-AY5MY7HJ.js.map} +0 -0
  385. /package/dist/{chunk-2LSJTQIL.js.map → chunk-B22NXESR.js.map} +0 -0
  386. /package/dist/{chunk-E32YPPF5.js.map → chunk-B4Y6W3OU.js.map} +0 -0
  387. /package/dist/{chunk-2K2B5QM2.js.map → chunk-BEGTLELZ.js.map} +0 -0
  388. /package/dist/{chunk-QMSCRKR6.js.map → chunk-C7GYSLPO.js.map} +0 -0
  389. /package/dist/{chunk-33NBMNTB.js.map → chunk-CF25EQFU.js.map} +0 -0
  390. /package/dist/{chunk-WDAEYLT5.js.map → chunk-D6ROYZ6H.js.map} +0 -0
  391. /package/dist/{chunk-ZVJSY2OV.js.map → chunk-EF5XUS44.js.map} +0 -0
  392. /package/dist/{chunk-6PU3JYVY.js.map → chunk-F3AYISXT.js.map} +0 -0
  393. /package/dist/{chunk-ST36ZSAN.js.map → chunk-FRIUYEXD.js.map} +0 -0
  394. /package/dist/{chunk-K6LNHHSH.js.map → chunk-GC5XJ7YB.js.map} +0 -0
  395. /package/dist/{chunk-JYLOCXMV.js.map → chunk-GI63FQEJ.js.map} +0 -0
  396. /package/dist/{chunk-FVKBP3UX.js.map → chunk-GLKQT2DS.js.map} +0 -0
  397. /package/dist/{chunk-MEYKNJNI.js.map → chunk-GT6HPOS2.js.map} +0 -0
  398. /package/dist/{chunk-XFAXRMWY.js.map → chunk-GUAK7QUR.js.map} +0 -0
  399. /package/dist/{chunk-JUKA4NY5.js.map → chunk-GWONO2ML.js.map} +0 -0
  400. /package/dist/{chunk-YRACC6BB.js.map → chunk-GWVJZ7SX.js.map} +0 -0
  401. /package/dist/{chunk-5NFQKL7C.js.map → chunk-H6K3AP42.js.map} +0 -0
  402. /package/dist/{chunk-VOG5IVQW.js.map → chunk-H6N7XXUB.js.map} +0 -0
  403. /package/dist/{chunk-PP7CDKO4.js.map → chunk-HCBGCR4N.js.map} +0 -0
  404. /package/dist/{chunk-5OEC546C.js.map → chunk-HDI37JLT.js.map} +0 -0
  405. /package/dist/{chunk-LHTEAPYG.js.map → chunk-HDQMSZA7.js.map} +0 -0
  406. /package/dist/{chunk-VU63PDWW.js.map → chunk-HOXWNOQV.js.map} +0 -0
  407. /package/dist/{chunk-KESGVMHW.js.map → chunk-HUGXO5PE.js.map} +0 -0
  408. /package/dist/{chunk-3CDU7DLD.js.map → chunk-IKXS2YVQ.js.map} +0 -0
  409. /package/dist/{chunk-BU6TCB76.js.map → chunk-INCTNS4X.js.map} +0 -0
  410. /package/dist/{chunk-FS7UVKEE.js.map → chunk-IR5A2BKL.js.map} +0 -0
  411. /package/dist/{chunk-2ZRZTGWP.js.map → chunk-ISW5K72V.js.map} +0 -0
  412. /package/dist/{chunk-VZ4VAQX3.js.map → chunk-IVJKILIX.js.map} +0 -0
  413. /package/dist/{chunk-NRI2TZDS.js.map → chunk-JNX4B3EE.js.map} +0 -0
  414. /package/dist/{chunk-JWJ77IMK.js.map → chunk-JRV3UFOJ.js.map} +0 -0
  415. /package/dist/{chunk-ZRIWMIHK.js.map → chunk-JVOV5WAJ.js.map} +0 -0
  416. /package/dist/{chunk-HR7YTBR7.js.map → chunk-K4N3V7YE.js.map} +0 -0
  417. /package/dist/{chunk-WU2KXA6I.js.map → chunk-KC733FDV.js.map} +0 -0
  418. /package/dist/{chunk-ZCXVTFYQ.js.map → chunk-KG64HV34.js.map} +0 -0
  419. /package/dist/{chunk-LB27LKG3.js.map → chunk-KUNHGNGF.js.map} +0 -0
  420. /package/dist/{chunk-FQT4C5R4.js.map → chunk-KWIR73YH.js.map} +0 -0
  421. /package/dist/{chunk-IKZSQKOE.js.map → chunk-LFHAYETO.js.map} +0 -0
  422. /package/dist/{chunk-NM2FLCPV.js.map → chunk-LO4M5D7T.js.map} +0 -0
  423. /package/dist/{chunk-CGBUWNNQ.js.map → chunk-LWFJZ3Q5.js.map} +0 -0
  424. /package/dist/{chunk-OCQ6GDCF.js.map → chunk-MH3XW3WR.js.map} +0 -0
  425. /package/dist/{chunk-3WAAL3KN.js.map → chunk-MT2OCLGT.js.map} +0 -0
  426. /package/dist/{chunk-QJK7BNH3.js.map → chunk-N7KUKE45.js.map} +0 -0
  427. /package/dist/{chunk-WAD5VL6B.js.map → chunk-NBFP645M.js.map} +0 -0
  428. /package/dist/{chunk-TTJTMDLI.js.map → chunk-NF42BHI5.js.map} +0 -0
  429. /package/dist/{chunk-6MN5KOVM.js.map → chunk-NHMFBUBK.js.map} +0 -0
  430. /package/dist/{chunk-N4HHFYPB.js.map → chunk-NND4UTWS.js.map} +0 -0
  431. /package/dist/{chunk-EMEXXAQI.js.map → chunk-NYFGFELX.js.map} +0 -0
  432. /package/dist/{chunk-Q2LQVYXY.js.map → chunk-OL2BEJZR.js.map} +0 -0
  433. /package/dist/{chunk-KTX7XME6.js.map → chunk-PAICZOL5.js.map} +0 -0
  434. /package/dist/{chunk-AJ4MRDKM.js.map → chunk-PAK25GQC.js.map} +0 -0
  435. /package/dist/{chunk-KYQ4OORF.js.map → chunk-PJNA6STF.js.map} +0 -0
  436. /package/dist/{chunk-BPOVRMVS.js.map → chunk-Q4PS47EB.js.map} +0 -0
  437. /package/dist/{chunk-YXU45AVO.js.map → chunk-QBJBKXF4.js.map} +0 -0
  438. /package/dist/{chunk-EKWH4LGM.js.map → chunk-QEHEYVOL.js.map} +0 -0
  439. /package/dist/{chunk-XNTDEQEB.js.map → chunk-QMA7TNZJ.js.map} +0 -0
  440. /package/dist/{chunk-P2OQ4IGP.js.map → chunk-QTMXGMM7.js.map} +0 -0
  441. /package/dist/{chunk-NQ7NMCRI.js.map → chunk-QTN7G5T2.js.map} +0 -0
  442. /package/dist/{chunk-DSDNGTH6.js.map → chunk-R4XZTIZG.js.map} +0 -0
  443. /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
  444. /package/dist/{chunk-F56VOHFW.js.map → chunk-RJTVUM5E.js.map} +0 -0
  445. /package/dist/{chunk-KN7C6R6L.js.map → chunk-ROG7LMPK.js.map} +0 -0
  446. /package/dist/{chunk-J44PPGBF.js.map → chunk-RX7J6VRI.js.map} +0 -0
  447. /package/dist/{chunk-FIF4RQ4S.js.map → chunk-RXLD5XS2.js.map} +0 -0
  448. /package/dist/{chunk-I2STNAIQ.js.map → chunk-RYWX6LK4.js.map} +0 -0
  449. /package/dist/{chunk-HGRC635A.js.map → chunk-RZ4SBSLP.js.map} +0 -0
  450. /package/dist/{chunk-S22XIXLL.js.map → chunk-SA2ERYVV.js.map} +0 -0
  451. /package/dist/{chunk-6VKHS2BB.js.map → chunk-SDBNXZ2S.js.map} +0 -0
  452. /package/dist/{chunk-KQS4ZJGS.js.map → chunk-SHAEK26Y.js.map} +0 -0
  453. /package/dist/{chunk-PIUQYYOM.js.map → chunk-TBDAH7WC.js.map} +0 -0
  454. /package/dist/{chunk-IHO2O44S.js.map → chunk-TE3XYCX7.js.map} +0 -0
  455. /package/dist/{chunk-6DMUVVON.js.map → chunk-TJ7NQG7E.js.map} +0 -0
  456. /package/dist/{chunk-Y6C4MYZE.js.map → chunk-TNQDSTIA.js.map} +0 -0
  457. /package/dist/{chunk-UILH4OAZ.js.map → chunk-TOEBPWKG.js.map} +0 -0
  458. /package/dist/{chunk-DWG5SEGW.js.map → chunk-TOMCXNAO.js.map} +0 -0
  459. /package/dist/{chunk-YTIUFMRM.js.map → chunk-TU7ZXJX4.js.map} +0 -0
  460. /package/dist/{chunk-P53KRCKW.js.map → chunk-TZASFX6G.js.map} +0 -0
  461. /package/dist/{chunk-3CUWQXTG.js.map → chunk-UBUT2T5B.js.map} +0 -0
  462. /package/dist/{chunk-ACU7LEFG.js.map → chunk-UDTA7YWD.js.map} +0 -0
  463. /package/dist/{chunk-VYV3JOV5.js.map → chunk-UFGPKDF4.js.map} +0 -0
  464. /package/dist/{chunk-WSYPM3SR.js.map → chunk-UI5O6J6R.js.map} +0 -0
  465. /package/dist/{chunk-JQ6HDXKA.js.map → chunk-VFLNP2ZZ.js.map} +0 -0
  466. /package/dist/{chunk-7PUSFB3T.js.map → chunk-W34CCOUM.js.map} +0 -0
  467. /package/dist/{chunk-WDQRQIT7.js.map → chunk-WCVVM66J.js.map} +0 -0
  468. /package/dist/{chunk-AEJ3FFNE.js.map → chunk-WQQON4RL.js.map} +0 -0
  469. /package/dist/{chunk-H7DVH6KD.js.map → chunk-WT5SSBTU.js.map} +0 -0
  470. /package/dist/{chunk-EWVJJ32N.js.map → chunk-WXAFPVMW.js.map} +0 -0
  471. /package/dist/{chunk-6KLDYVRY.js.map → chunk-XKYOQOZK.js.map} +0 -0
  472. /package/dist/{chunk-CKFZQQ6T.js.map → chunk-XNDMCT5G.js.map} +0 -0
  473. /package/dist/{chunk-R53ZOW4B.js.map → chunk-XP522FFM.js.map} +0 -0
  474. /package/dist/{chunk-WGNLG2W2.js.map → chunk-XRGJVS4P.js.map} +0 -0
  475. /package/dist/{chunk-FPKVHR5L.js.map → chunk-XRUW7DMH.js.map} +0 -0
  476. /package/dist/{chunk-IV7G7NK3.js.map → chunk-XZH22APJ.js.map} +0 -0
  477. /package/dist/{chunk-ZL3GCUKC.js.map → chunk-ZAVMJL4S.js.map} +0 -0
  478. /package/dist/{chunk-SV4FYSDL.js.map → chunk-ZDMQDTSH.js.map} +0 -0
  479. /package/dist/{chunk-CKAVTWXP.js.map → chunk-ZGWEFOW6.js.map} +0 -0
  480. /package/dist/{chunk-WC3W36AM.js.map → chunk-ZOUWHGV3.js.map} +0 -0
  481. /package/dist/{chunk-4CBM7JNK.js.map → chunk-ZWIPJFUA.js.map} +0 -0
@@ -0,0 +1,226 @@
1
+ import { tableCellClasses } from '@mui/material/TableCell/index.js';
2
+ import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
3
+
4
+ import { rem, rems } from './relative';
5
+
6
+ /**
7
+ * TOGGLEBUTTON / TAB / TABLECELL / PAGINATIONITEM / SLIDER GEOMETRY,
8
+ * DENSITY-AWARE (FUT-2768).
9
+ *
10
+ * The remainder of the fixed-px geometry the density audit catalogued, none
11
+ * of it hard-coded in `@12-apps/ui`'s own source. Verified against the
12
+ * installed `@mui/material@6.5.0` source; each goes through the SAME
13
+ * per-size/per-slot `overridesResolver` key MUI itself resolves
14
+ * (`iconButtonDensityOverrides`/`chipDensityOverrides`'s own mechanism), so a
15
+ * theme value composes with MUI's baked-in `variants` instead of replacing
16
+ * them outright:
17
+ *
18
+ * - `ToggleButton`: `padding: 11/7/15` at medium(root)/small/large — same
19
+ * `root`/`sizeSmall`/`sizeLarge` shape as `iconButtonDensityOverrides`.
20
+ * - `Tab`: `minHeight: 48`, `padding: '12px 16px'` on the root (via `rems()`).
21
+ * The icon+label combo (`minHeight: 72`, `paddingTop`/`Bottom: 9`) is a
22
+ * SEPARATE MUI variant, exposed as the `labelIcon` key.
23
+ * - `TableCell`: `padding: 16` on the root, `'6px 16px'` at small, nested
24
+ * inside it `'0 12px 0 16px'` on the small+checkbox combo — all gated on
25
+ * `ownerState.padding === 'normal'` (MUI's default): `checkbox`/`none` are
26
+ * separate variants with their OWN unscaled padding (`'0 0 0 4px'`/`0`) an
27
+ * unconditional rule clobbered at every size but small (FUT-2861 review —
28
+ * the SAME Lesson-1 clobber the ellipsis fix above avoids, missed here).
29
+ * `@12-apps/ui`'s own `Table` (FUT-2769) wins regardless (two classes deep
30
+ * under its styled root); this reaches a BARE `<TableCell>`.
31
+ * - `PaginationItem`: `minWidth/height: 32/26/40` at medium(root)/small/large.
32
+ * The ellipsis shares the SAME slot and `minWidth` but has NO `height` of
33
+ * its own (`'auto'`), gated on `ownerState.type` being neither
34
+ * `'start-ellipsis'` nor `'end-ellipsis'` — skipping it would force a
35
+ * height onto the ellipsis (Lesson 1).
36
+ * - `Slider`: rail `height: 4/2` at `orientation="horizontal"`/`size="small"`
37
+ * — gated on `ownerState.orientation` since the SAME key answers for either
38
+ * axis (MUI sets `height` horizontal / `width` vertical, leaving the other
39
+ * `'100%'`). Thumb `20×20`/`12×12` needs no gate. `@12-apps/ui`'s own
40
+ * `Slider` already sets rail/thumb size through `rem()` and never forwards
41
+ * `size` — a no-op THERE, reaches a BARE `<Slider>`. The thumb's ring and
42
+ * the value-label offset were checked and left OUT — that story's own doc.
43
+ *
44
+ * `Avatar` is NOT in this file: `@12-apps/ui`'s own `Avatar` wraps `MuiAvatar`
45
+ * in a `StyledAvatar` that ALREADY sets `width`/`height` through
46
+ * `rem(theme, boxPx(size))` (`40` at `md`) — higher specificity than any
47
+ * `MuiAvatar.styleOverrides.root`, dead code here, so it ships none.
48
+ *
49
+ * Geometry-neutral at `normal`; each slot a MODULE-LEVEL function, as above.
50
+ */
51
+
52
+ const toggleButtonRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 11) });
53
+ const toggleButtonSmallPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 7) });
54
+ const toggleButtonLargePadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 15) });
55
+
56
+ /** `MuiToggleButton`'s own padding, at every size MUI has. */
57
+ export function toggleButtonDensityOverrides(): Components<Theme> {
58
+ return {
59
+ MuiToggleButton: {
60
+ styleOverrides: {
61
+ root: toggleButtonRootPadding,
62
+ sizeSmall: toggleButtonSmallPadding,
63
+ sizeLarge: toggleButtonLargePadding,
64
+ },
65
+ },
66
+ };
67
+ }
68
+
69
+ const tabRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
70
+ minHeight: rem(theme, 48),
71
+ padding: rems(theme, 12, 16),
72
+ });
73
+ const tabLabelIconGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
74
+ minHeight: rem(theme, 72),
75
+ paddingTop: rem(theme, 9),
76
+ paddingBottom: rem(theme, 9),
77
+ });
78
+
79
+ /** `MuiTab`'s own root height/padding, and the icon+label combo's taller box. */
80
+ export function tabDensityOverrides(): Components<Theme> {
81
+ return {
82
+ MuiTab: {
83
+ styleOverrides: {
84
+ root: tabRootGeometry,
85
+ labelIcon: tabLabelIconGeometry,
86
+ },
87
+ },
88
+ };
89
+ }
90
+
91
+ interface TableCellOwnerStateForOverrides {
92
+ padding?: 'normal' | 'checkbox' | 'none';
93
+ }
94
+ type TableCellStyleFn = (props: { theme: Theme; ownerState?: TableCellOwnerStateForOverrides }) => CSSObject;
95
+ const isDefaultTableCellPadding = (padding: TableCellOwnerStateForOverrides['padding']): boolean =>
96
+ padding === undefined || padding === 'normal';
97
+
98
+ const tableCellRootPadding: TableCellStyleFn = ({ theme, ownerState }) =>
99
+ isDefaultTableCellPadding(ownerState?.padding) ? { padding: rem(theme, 16) } : {};
100
+
101
+ const tableCellSmallPadding: TableCellStyleFn = ({ theme, ownerState }) => {
102
+ const style: CSSObject = {
103
+ [`&.${tableCellClasses.paddingCheckbox}`]: { padding: rems(theme, 0, 12, 0, 16) },
104
+ };
105
+ if (isDefaultTableCellPadding(ownerState?.padding)) style.padding = rems(theme, 6, 16);
106
+ return style;
107
+ };
108
+
109
+ /** Reaches a BARE `<TableCell>` only — module doc comment above. */
110
+ export function tableCellDensityOverrides(): Components<Theme> {
111
+ return {
112
+ MuiTableCell: {
113
+ styleOverrides: {
114
+ root: tableCellRootPadding,
115
+ sizeSmall: tableCellSmallPadding,
116
+ },
117
+ },
118
+ };
119
+ }
120
+
121
+ /** The `ownerState` field that tells the ellipsis item apart from a real button. */
122
+ interface PaginationItemOwnerStateForOverrides {
123
+ type?: 'page' | 'first' | 'last' | 'start-ellipsis' | 'end-ellipsis' | 'previous' | 'next';
124
+ }
125
+ type PaginationItemStyleFn = (props: {
126
+ theme: Theme;
127
+ ownerState?: PaginationItemOwnerStateForOverrides;
128
+ }) => CSSObject;
129
+
130
+ const isPaginationEllipsis = (type: PaginationItemOwnerStateForOverrides['type']): boolean =>
131
+ type === 'start-ellipsis' || type === 'end-ellipsis';
132
+
133
+ /** `minWidth` always; `height` only off the ellipsis, which has none of its own. */
134
+ function paginationItemGeometryAt(px: number): PaginationItemStyleFn {
135
+ return ({ theme, ownerState }) => {
136
+ const style: CSSObject = { minWidth: rem(theme, px) };
137
+ if (!isPaginationEllipsis(ownerState?.type)) style.height = rem(theme, px);
138
+ return style;
139
+ };
140
+ }
141
+ const paginationItemRootGeometry = paginationItemGeometryAt(32);
142
+ const paginationItemSmallGeometry = paginationItemGeometryAt(26);
143
+ const paginationItemLargeGeometry = paginationItemGeometryAt(40);
144
+
145
+ /**
146
+ * `MuiPaginationItem`'s own `minWidth`/`height`, at every size MUI has —
147
+ * `height` skipped on the ellipsis item, which has none of its own (`auto`).
148
+ */
149
+ export function paginationItemDensityOverrides(): Components<Theme> {
150
+ return {
151
+ MuiPaginationItem: {
152
+ styleOverrides: {
153
+ root: paginationItemRootGeometry,
154
+ sizeSmall: paginationItemSmallGeometry,
155
+ sizeLarge: paginationItemLargeGeometry,
156
+ },
157
+ },
158
+ };
159
+ }
160
+
161
+ /** The `ownerState` field that tells which axis the rail's `height`/`4` reads as. */
162
+ interface SliderOwnerStateForOverrides {
163
+ orientation?: 'horizontal' | 'vertical';
164
+ }
165
+ type SliderStyleFn = (props: { theme: Theme; ownerState?: SliderOwnerStateForOverrides }) => CSSObject;
166
+
167
+ /** The rail's `4`/`2` reads as `height` for a horizontal slider, `width` for a vertical one. */
168
+ function sliderRailAxisAt(px: number): SliderStyleFn {
169
+ return ({ theme, ownerState }) =>
170
+ ownerState?.orientation === 'vertical' ? { width: rem(theme, px) } : { height: rem(theme, px) };
171
+ }
172
+ const sliderRootGeometry = sliderRailAxisAt(4);
173
+ const sliderSmallGeometry = sliderRailAxisAt(2);
174
+ const sliderThumbGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
175
+ width: rem(theme, 20),
176
+ height: rem(theme, 20),
177
+ });
178
+ const sliderThumbSmallGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
179
+ width: rem(theme, 12),
180
+ height: rem(theme, 12),
181
+ });
182
+
183
+ /** `MuiSlider`'s own rail thickness (root/sizeSmall) and thumb box (thumb/thumbSizeSmall). */
184
+ export function sliderDensityOverrides(): Components<Theme> {
185
+ return {
186
+ MuiSlider: {
187
+ styleOverrides: {
188
+ root: sliderRootGeometry,
189
+ sizeSmall: sliderSmallGeometry,
190
+ thumb: sliderThumbGeometry,
191
+ thumbSizeSmall: sliderThumbSmallGeometry,
192
+ },
193
+ },
194
+ };
195
+ }
196
+
197
+ /**
198
+ * `MuiTabs`' own indicator thickness (`height: 2` horizontal, `width: 2`
199
+ * vertical) — one short of `Tab` in the ticket's own literal list, added
200
+ * after a FUT-2767-review pass over state/orientation-gated literals; same
201
+ * orientation gate as the Slider rail. `@12-apps/ui`'s own `Tabs` draws its
202
+ * OWN 3px indicator through `rem()` already, blocking THIS override there —
203
+ * `tabDensityOverrides` reaches `Tab.root`'s `minHeight` instead (both
204
+ * measured in `density-wrapper-reach.test.stories.tsx`).
205
+ */
206
+ interface TabsIndicatorOwnerStateForOverrides {
207
+ orientation?: 'horizontal' | 'vertical';
208
+ }
209
+ type TabsIndicatorStyleFn = (props: {
210
+ theme: Theme;
211
+ ownerState?: TabsIndicatorOwnerStateForOverrides;
212
+ }) => CSSObject;
213
+
214
+ const tabsIndicatorAxisAt: TabsIndicatorStyleFn = ({ theme, ownerState }) =>
215
+ ownerState?.orientation === 'vertical' ? { width: rem(theme, 2) } : { height: rem(theme, 2) };
216
+
217
+ /** `MuiTabs`' own indicator thickness, by orientation. */
218
+ export function tabsIndicatorDensityOverrides(): Components<Theme> {
219
+ return {
220
+ MuiTabs: {
221
+ styleOverrides: {
222
+ indicator: tabsIndicatorAxisAt,
223
+ },
224
+ },
225
+ };
226
+ }
@@ -0,0 +1,210 @@
1
+ import { switchClasses } from '@mui/material/Switch/index.js';
2
+ import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
3
+
4
+ import { rem, rems } from './relative';
5
+
6
+ /**
7
+ * CHECKBOX / RADIO / SWITCH GEOMETRY, DENSITY-AWARE (FUT-2767).
8
+ *
9
+ * `Checkbox`/`Radio`/`Switch` are MUI's own components, unwrapped — but
10
+ * **only two of the three `@12-apps/ui` wrappers actually forward their
11
+ * geometry to MUI**, corrected here after an earlier revision of this doc
12
+ * comment claimed all three did.
13
+ *
14
+ * - `Checkbox.tsx`'s `StyledCheckbox` and `RadioGroup.variants.tsx`'s
15
+ * `DefaultRadios` (the ONLY variant rendering a raw `<Radio>` — `cards`/
16
+ * `buttons`/`segments` draw custom controls, outside this ticket) set NO
17
+ * `padding` of their own, so `checkboxRadioDensityOverrides()` reaches
18
+ * both directly — confirmed by a real render, same computed padding as
19
+ * raw `MuiCheckbox`/`MuiRadio` at both densities
20
+ * (`density-overrides.test.stories.tsx`'s `ui-checkbox`/`ui-radio-group`).
21
+ * - `Switch.styles.ts`'s `switchSx` is DIFFERENT: it draws root/switchBase/
22
+ * thumb geometry itself, per instance, from its own `SWITCH_SIZES` table
23
+ * (`Switch.metrics.ts`), every number already through `rem(theme, px)`.
24
+ * `Switch.parts.tsx`'s `StyledSwitch = styled(MuiSwitch, {...})(...)`
25
+ * composes these as an OUTER wrapper class whose nested `& .MuiSwitch-
26
+ * switchBase`/`& .MuiSwitch-thumb` selectors are a TWO-class compound —
27
+ * higher specificity than this file's `MuiSwitch.styleOverrides.
28
+ * switchBase`/`thumb`, which compose onto a single-class generated class.
29
+ * `switchDensityOverrides()` therefore has **NO effect on `@12-apps/ui`'s
30
+ * own `<Switch>`** — it only reaches a raw `@mui/material/Switch` consumer
31
+ * (a host's own `Table.tsx` density-toggle column, say). Not a gap:
32
+ * `switchSx` already reacts to `theme.typography.fontSize` on its own —
33
+ * including the CHECKED thumb's own travel distance, computed as
34
+ * `rem(theme, width - thumbSize - padding * 2)` from the SAME per-instance
35
+ * geometry, so it moves consistently with no help from this file.
36
+ * Confirmed by measurement, both sizes, both states, both densities
37
+ * (`ui-switch-*` cases); documented at `Switch.md`'s "Density" section.
38
+ *
39
+ * **The ticket's open question — does a `MuiSwitchBase` theme override reach
40
+ * `Checkbox`/`Radio` at all? — is NO, verified two ways.** `Checkbox`/`Radio`
41
+ * both render through `internal/SwitchBase.js`'s `SwitchBaseRoot`, which is
42
+ * `styled(ButtonBase, { name: 'MuiSwitchBase' })({ padding: 9, ... })` — with
43
+ * NO `slot` key. `@mui/system`'s `createStyled.js` computes
44
+ * `overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(slot))`,
45
+ * and `defaultOverridesResolver` (`if (!slot) return null`) returns `null`
46
+ * for an absent slot; the styled call itself then only pushes its
47
+ * `styleThemeOverrides` expression `if (componentName && overridesResolver)`
48
+ * — `null` is falsy, so for THIS styled call `theme.components.MuiSwitchBase
49
+ * .styleOverrides` is never read at all. (`variants` is a SEPARATE check,
50
+ * gated on `skipVariantsResolver` rather than `overridesResolver`, which is
51
+ * why the ticket's own two-part specificity proof for Chip's label — probing
52
+ * with `variants` — does not transfer here; `styleOverrides` is what dies.)
53
+ * A render-level probe confirms it: a theme with `components.MuiSwitchBase
54
+ * .styleOverrides.root = { padding: '999px' }`, rendering `<Switch />`,
55
+ * `<Checkbox />` and `<Radio />` through it, leaves EVERY ONE of `.MuiSwitch-
56
+ * switchBase`, `.MuiCheckbox-root` and `.MuiRadio-root` at their unthemed
57
+ * padding (`9px`/`4px` — see below), never `999px`. The Decision's own
58
+ * suggested `MuiSwitchBase` route is therefore the ticket's documented
59
+ * fallback in disguise: this file skips straight to duplicating the override
60
+ * under `MuiCheckbox` and `MuiRadio`, each independently confirmed LIVE by
61
+ * the same probe (`components.MuiCheckbox.styleOverrides.root.padding` DOES
62
+ * reach `.MuiCheckbox-root`, and the same for `MuiRadio`).
63
+ *
64
+ * - `Checkbox`/`Radio` (`internal/SwitchBase.js`, `Checkbox.js`, `Radio.js`):
65
+ * `padding: 9` — constant across `size="small"`/`"medium"` today (neither
66
+ * `CheckboxRoot` nor `RadioRoot` carries a size-conditional padding rule),
67
+ * so ONE `root` override, no `sizeSmall`/`sizeMedium` split, covers both
68
+ * sizes without disturbing the glyph-driven size difference FUT-2585 left
69
+ * alone.
70
+ * - `Switch` (`Switch.js`): root (the track) `width: 34+12*2`, `height:
71
+ * 14+12*2`, `padding: 12` (medium); `switchBase` (the thumb's absolutely-
72
+ * positioned wrapper) — its OWN literal is NOT the `12` the ticket's
73
+ * Decision sketch names (that `12` is `SwitchRoot`'s own padding, a
74
+ * DIFFERENT slot); `switchBase` inherits `internal/SwitchBase.js`'s generic
75
+ * `padding: 9` unmodified at medium (`SwitchSwitchBase`'s own styles never
76
+ * set `padding`), confirmed by the same render probe with NO theme
77
+ * override at all (`.MuiSwitch-switchBase` computed padding: `9px`). This
78
+ * file overrides `MuiSwitch.styleOverrides.switchBase` (a LIVE key —
79
+ * `SwitchSwitchBase = styled(SwitchBase, { name: 'MuiSwitch', slot:
80
+ * 'SwitchBase', ... })` DOES pass a `slot`) with `rem(theme, 9)`, the
81
+ * MEASURED default, not the ticket's `12` — using `12` here would move
82
+ * today's real 9px to 12px at `density: 'normal'`, failing the Done-when's
83
+ * own pixel-identical requirement, so the number is corrected against the
84
+ * probe rather than the sketch. `thumb`: `20×20`, unconditional.
85
+ * - `Switch` `size="small"` (`:82-100`, a `variants` entry on `SwitchRoot`
86
+ * itself): root `width: 40`, `height: 24`, `padding: 7`; a NESTED `&
87
+ * .${switchClasses.switchBase}` selector sets `padding: 4` (not 9); a
88
+ * NESTED `& .${switchClasses.thumb}` selector sets `20×20` down to
89
+ * `16×16`. Both nested rules are baked into `SwitchRoot`'s OWN generated
90
+ * class at TWO-class specificity (the size-small instance's unique class,
91
+ * plus `.MuiSwitch-switchBase`/`.MuiSwitch-thumb`) — exactly the Chip
92
+ * outlined-label shape this file already has above, and the SAME failure
93
+ * mode Lesson 1 warns about: a FLAT `styleOverrides.switchBase`/`thumb`
94
+ * (one class) cannot out-specificity it, so at `size="small"` it would
95
+ * silently keep rendering MUI's unthemed `4px`/`16×16` at every density,
96
+ * the click target and thumb staying full-size while the track around them
97
+ * shrank. Fixed the same way: `sizeSmall`'s OWN nested `& .${switchClasses
98
+ * .switchBase}` / `& .${switchClasses.thumb}` rules, read through
99
+ * `switchClasses` (not a hand-typed selector string) for the same
100
+ * `ClassNameGenerator.configure` reason `chipClasses` is above, inserted
101
+ * as part of the SAME `sizeSmall` override object so they land AFTER
102
+ * `SwitchRoot`'s own baked-in small variant in the generated class's CSS
103
+ * text (later wins at matching two-class specificity) rather than trying
104
+ * to out-specificity it from a different slot.
105
+ *
106
+ * **The checked thumb's own travel distance is a FOURTH literal, found only
107
+ * on adversarial review of the PR this doc comment first shipped in.**
108
+ * `SwitchSwitchBase`'s base style bakes in `&.Mui-checked { transform:
109
+ * translateX(20px) }` (medium), and `SwitchRoot`'s `size: 'small'` variant
110
+ * nests the same at `16px` — both bare, never run through `pxToRem`, so at
111
+ * `density: 'compact'` the checked thumb kept travelling the FULL, unscaled
112
+ * distance while the track around it shrank ×0.9 — a visible overshoot.
113
+ * `switchSwitchBasePadding`/`switchSizeSmall` each now carry their own
114
+ * `&.${switchClasses.checked}` rule (`translateX(rem(theme, 20))`/`rem(theme,
115
+ * 16)`), composed onto the SAME generated class, in the SAME position
116
+ * `padding` already occupies — so it wins by the identical mechanism, not a
117
+ * new one. Proven at the pixel level, both sizes/densities: `switch-md-
118
+ * checked`/`switch-sm-checked` measure the thumb's final position against
119
+ * the track's own edge, not just the transform string.
120
+ *
121
+ * At `density: 'normal'` every number above computes back to the literal it
122
+ * replaces (`rem(theme, 9)` is `0.5625rem`, `9px` at the 16px root — no
123
+ * visible change), the same geometry-neutral guarantee `iconButtonDensity
124
+ * Overrides`/`chipDensityOverrides` give above. The same non-default-
125
+ * `fontSize` caveat those two give applies here unchanged: `rem()` only ever
126
+ * reads `theme.typography.fontSize`, so a host adopting
127
+ * `checkboxRadioDensityOverrides`/`switchDensityOverrides` standalone moves
128
+ * every number here by that one coefficient, same as everything else `rem()`
129
+ * touches.
130
+ */
131
+
132
+ const checkboxRadioRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 9) });
133
+
134
+ /**
135
+ * `MuiCheckbox`/`MuiRadio`'s own padding — duplicated under both component
136
+ * keys, the ticket's own documented fallback, since `MuiSwitchBase` cannot
137
+ * reach either (see the module doc comment above). One module-level function
138
+ * shared by both keys, and by `checkboxRadioDensityOverrides()`'s own two
139
+ * calls across the two theme-build paths, for the same identity reason the
140
+ * rest of this file's slots are module-level.
141
+ */
142
+ export function checkboxRadioDensityOverrides(): Components<Theme> {
143
+ return {
144
+ MuiCheckbox: { styleOverrides: { root: checkboxRadioRootPadding } },
145
+ MuiRadio: { styleOverrides: { root: checkboxRadioRootPadding } },
146
+ };
147
+ }
148
+
149
+ const switchRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
150
+ width: rems(theme, 34 + 12 * 2),
151
+ height: rems(theme, 14 + 12 * 2),
152
+ padding: rem(theme, 12),
153
+ });
154
+ const switchSwitchBasePadding = ({ theme }: { theme: Theme }): CSSObject => ({
155
+ padding: rem(theme, 9),
156
+ // FUT-2767 (adversarial-review fix) — `SwitchSwitchBase`'s OWN base style
157
+ // (`Switch.js`, medium) bakes in `&.Mui-checked { transform:
158
+ // translateX(20px) }`, a bare literal never run through `pxToRem` — at
159
+ // `density: 'compact'` the track/padding/thumb above all shrink ×0.9 but
160
+ // this offset stayed at a full 20px, so the checked thumb overshot the now-
161
+ // smaller track. Composed onto the SAME generated class as that base style,
162
+ // AFTER it (`createStyled` composes `styleThemeOverrides` after a slot's
163
+ // own base/variants — see the module doc comment), so this nested rule
164
+ // wins at the SAME (two-class, `.<hash>.Mui-checked`) specificity, the same
165
+ // mechanism this function's own `padding` line already relies on.
166
+ [`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 20)})` },
167
+ });
168
+ const switchThumbSize = ({ theme }: { theme: Theme }): CSSObject => ({
169
+ width: rem(theme, 20),
170
+ height: rem(theme, 20),
171
+ });
172
+ const switchSizeSmall = ({ theme }: { theme: Theme }): CSSObject => ({
173
+ width: rem(theme, 40),
174
+ height: rem(theme, 24),
175
+ padding: rem(theme, 7),
176
+ // Higher (two-class) specificity than the flat `switchBase`/`thumb`
177
+ // overrides above, inserted as part of THIS SAME generated class — see the
178
+ // module doc comment for why a flat override cannot reach these at
179
+ // `size="small"` on its own.
180
+ [`& .${switchClasses.switchBase}`]: {
181
+ padding: rem(theme, 4),
182
+ // Same overshoot as medium's, at `size="small"`'s OWN literal
183
+ // (`SwitchRoot`'s baked-in `size: 'small'` variant, `Switch.js`:
184
+ // `translateX(16px)`). Nested one level deeper so the compiled selector
185
+ // is `.<root-hash> .MuiSwitch-switchBase.Mui-checked` — the same THREE-
186
+ // class descendant compound MUI's own baked-in small variant uses for
187
+ // this rule, composed after it in the same generated class, so it wins
188
+ // at matching specificity the same way the sibling `padding: rem(theme,
189
+ // 4)` line above already does.
190
+ [`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 16)})` },
191
+ },
192
+ [`& .${switchClasses.thumb}`]: { width: rem(theme, 16), height: rem(theme, 16) },
193
+ });
194
+
195
+ /**
196
+ * `MuiSwitch`'s own track (root), thumb wrapper (switchBase) and thumb
197
+ * (thumb) geometry, at both sizes MUI has.
198
+ */
199
+ export function switchDensityOverrides(): Components<Theme> {
200
+ return {
201
+ MuiSwitch: {
202
+ styleOverrides: {
203
+ root: switchRootGeometry,
204
+ switchBase: switchSwitchBasePadding,
205
+ thumb: switchThumbSize,
206
+ sizeSmall: switchSizeSmall,
207
+ },
208
+ },
209
+ };
210
+ }
@@ -1,8 +1,21 @@
1
1
  import { chipClasses } from '@mui/material/Chip/index.js';
2
- import { switchClasses } from '@mui/material/Switch/index.js';
3
2
  import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
4
3
 
5
- import { rem, rems } from './relative';
4
+ import { rem } from './relative';
5
+
6
+ // Re-exported so every existing import site (`./density`, `./scales`,
7
+ // `../provider/mui-bridge`) keeps resolving `from './density-overrides'`
8
+ // unchanged — the split below is purely a file-layout move to stay under
9
+ // the 400-line `quality:complexity` cap, not a public-API change.
10
+ export {
11
+ toggleButtonDensityOverrides,
12
+ tabDensityOverrides,
13
+ tabsIndicatorDensityOverrides,
14
+ tableCellDensityOverrides,
15
+ paginationItemDensityOverrides,
16
+ sliderDensityOverrides,
17
+ } from './density-overrides.navigation';
18
+ export { checkboxRadioDensityOverrides, switchDensityOverrides } from './density-overrides.selection';
6
19
 
7
20
  /** The `ownerState` fields `MuiChip`'s two styled slots (root, label) both receive. */
8
21
  interface ChipOwnerStateForOverrides {
@@ -176,209 +189,3 @@ export function chipDensityOverrides(): Components<Theme> {
176
189
  },
177
190
  };
178
191
  }
179
-
180
- /**
181
- * CHECKBOX / RADIO / SWITCH GEOMETRY, DENSITY-AWARE (FUT-2767).
182
- *
183
- * `Checkbox`/`Radio`/`Switch` are MUI's own components, unwrapped — but
184
- * **only two of the three `@12-apps/ui` wrappers actually forward their
185
- * geometry to MUI**, corrected here after an earlier revision of this doc
186
- * comment claimed all three did.
187
- *
188
- * - `Checkbox.tsx`'s `StyledCheckbox` and `RadioGroup.variants.tsx`'s
189
- * `DefaultRadios` (the ONLY variant rendering a raw `<Radio>` — `cards`/
190
- * `buttons`/`segments` draw custom controls, outside this ticket) set NO
191
- * `padding` of their own, so `checkboxRadioDensityOverrides()` reaches
192
- * both directly — confirmed by a real render, same computed padding as
193
- * raw `MuiCheckbox`/`MuiRadio` at both densities
194
- * (`density-overrides.test.stories.tsx`'s `ui-checkbox`/`ui-radio-group`).
195
- * - `Switch.styles.ts`'s `switchSx` is DIFFERENT: it draws root/switchBase/
196
- * thumb geometry itself, per instance, from its own `SWITCH_SIZES` table
197
- * (`Switch.metrics.ts`), every number already through `rem(theme, px)`.
198
- * `Switch.parts.tsx`'s `StyledSwitch = styled(MuiSwitch, {...})(...)`
199
- * composes these as an OUTER wrapper class whose nested `& .MuiSwitch-
200
- * switchBase`/`& .MuiSwitch-thumb` selectors are a TWO-class compound —
201
- * higher specificity than this file's `MuiSwitch.styleOverrides.
202
- * switchBase`/`thumb`, which compose onto a single-class generated class.
203
- * `switchDensityOverrides()` therefore has **NO effect on `@12-apps/ui`'s
204
- * own `<Switch>`** — it only reaches a raw `@mui/material/Switch` consumer
205
- * (a host's own `Table.tsx` density-toggle column, say). Not a gap:
206
- * `switchSx` already reacts to `theme.typography.fontSize` on its own —
207
- * including the CHECKED thumb's own travel distance, computed as
208
- * `rem(theme, width - thumbSize - padding * 2)` from the SAME per-instance
209
- * geometry, so it moves consistently with no help from this file.
210
- * Confirmed by measurement, both sizes, both states, both densities
211
- * (`ui-switch-*` cases); documented at `Switch.md`'s "Density" section.
212
- *
213
- * **The ticket's open question — does a `MuiSwitchBase` theme override reach
214
- * `Checkbox`/`Radio` at all? — is NO, verified two ways.** `Checkbox`/`Radio`
215
- * both render through `internal/SwitchBase.js`'s `SwitchBaseRoot`, which is
216
- * `styled(ButtonBase, { name: 'MuiSwitchBase' })({ padding: 9, ... })` — with
217
- * NO `slot` key. `@mui/system`'s `createStyled.js` computes
218
- * `overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(slot))`,
219
- * and `defaultOverridesResolver` (`if (!slot) return null`) returns `null`
220
- * for an absent slot; the styled call itself then only pushes its
221
- * `styleThemeOverrides` expression `if (componentName && overridesResolver)`
222
- * — `null` is falsy, so for THIS styled call `theme.components.MuiSwitchBase
223
- * .styleOverrides` is never read at all. (`variants` is a SEPARATE check,
224
- * gated on `skipVariantsResolver` rather than `overridesResolver`, which is
225
- * why the ticket's own two-part specificity proof for Chip's label — probing
226
- * with `variants` — does not transfer here; `styleOverrides` is what dies.)
227
- * A render-level probe confirms it: a theme with `components.MuiSwitchBase
228
- * .styleOverrides.root = { padding: '999px' }`, rendering `<Switch />`,
229
- * `<Checkbox />` and `<Radio />` through it, leaves EVERY ONE of `.MuiSwitch-
230
- * switchBase`, `.MuiCheckbox-root` and `.MuiRadio-root` at their unthemed
231
- * padding (`9px`/`4px` — see below), never `999px`. The Decision's own
232
- * suggested `MuiSwitchBase` route is therefore the ticket's documented
233
- * fallback in disguise: this file skips straight to duplicating the override
234
- * under `MuiCheckbox` and `MuiRadio`, each independently confirmed LIVE by
235
- * the same probe (`components.MuiCheckbox.styleOverrides.root.padding` DOES
236
- * reach `.MuiCheckbox-root`, and the same for `MuiRadio`).
237
- *
238
- * - `Checkbox`/`Radio` (`internal/SwitchBase.js`, `Checkbox.js`, `Radio.js`):
239
- * `padding: 9` — constant across `size="small"`/`"medium"` today (neither
240
- * `CheckboxRoot` nor `RadioRoot` carries a size-conditional padding rule),
241
- * so ONE `root` override, no `sizeSmall`/`sizeMedium` split, covers both
242
- * sizes without disturbing the glyph-driven size difference FUT-2585 left
243
- * alone.
244
- * - `Switch` (`Switch.js`): root (the track) `width: 34+12*2`, `height:
245
- * 14+12*2`, `padding: 12` (medium); `switchBase` (the thumb's absolutely-
246
- * positioned wrapper) — its OWN literal is NOT the `12` the ticket's
247
- * Decision sketch names (that `12` is `SwitchRoot`'s own padding, a
248
- * DIFFERENT slot); `switchBase` inherits `internal/SwitchBase.js`'s generic
249
- * `padding: 9` unmodified at medium (`SwitchSwitchBase`'s own styles never
250
- * set `padding`), confirmed by the same render probe with NO theme
251
- * override at all (`.MuiSwitch-switchBase` computed padding: `9px`). This
252
- * file overrides `MuiSwitch.styleOverrides.switchBase` (a LIVE key —
253
- * `SwitchSwitchBase = styled(SwitchBase, { name: 'MuiSwitch', slot:
254
- * 'SwitchBase', ... })` DOES pass a `slot`) with `rem(theme, 9)`, the
255
- * MEASURED default, not the ticket's `12` — using `12` here would move
256
- * today's real 9px to 12px at `density: 'normal'`, failing the Done-when's
257
- * own pixel-identical requirement, so the number is corrected against the
258
- * probe rather than the sketch. `thumb`: `20×20`, unconditional.
259
- * - `Switch` `size="small"` (`:82-100`, a `variants` entry on `SwitchRoot`
260
- * itself): root `width: 40`, `height: 24`, `padding: 7`; a NESTED `&
261
- * .${switchClasses.switchBase}` selector sets `padding: 4` (not 9); a
262
- * NESTED `& .${switchClasses.thumb}` selector sets `20×20` down to
263
- * `16×16`. Both nested rules are baked into `SwitchRoot`'s OWN generated
264
- * class at TWO-class specificity (the size-small instance's unique class,
265
- * plus `.MuiSwitch-switchBase`/`.MuiSwitch-thumb`) — exactly the Chip
266
- * outlined-label shape this file already has above, and the SAME failure
267
- * mode Lesson 1 warns about: a FLAT `styleOverrides.switchBase`/`thumb`
268
- * (one class) cannot out-specificity it, so at `size="small"` it would
269
- * silently keep rendering MUI's unthemed `4px`/`16×16` at every density,
270
- * the click target and thumb staying full-size while the track around them
271
- * shrank. Fixed the same way: `sizeSmall`'s OWN nested `& .${switchClasses
272
- * .switchBase}` / `& .${switchClasses.thumb}` rules, read through
273
- * `switchClasses` (not a hand-typed selector string) for the same
274
- * `ClassNameGenerator.configure` reason `chipClasses` is above, inserted
275
- * as part of the SAME `sizeSmall` override object so they land AFTER
276
- * `SwitchRoot`'s own baked-in small variant in the generated class's CSS
277
- * text (later wins at matching two-class specificity) rather than trying
278
- * to out-specificity it from a different slot.
279
- *
280
- * **The checked thumb's own travel distance is a FOURTH literal, found only
281
- * on adversarial review of the PR this doc comment first shipped in.**
282
- * `SwitchSwitchBase`'s base style bakes in `&.Mui-checked { transform:
283
- * translateX(20px) }` (medium), and `SwitchRoot`'s `size: 'small'` variant
284
- * nests the same at `16px` — both bare, never run through `pxToRem`, so at
285
- * `density: 'compact'` the checked thumb kept travelling the FULL, unscaled
286
- * distance while the track around it shrank ×0.9 — a visible overshoot.
287
- * `switchSwitchBasePadding`/`switchSizeSmall` each now carry their own
288
- * `&.${switchClasses.checked}` rule (`translateX(rem(theme, 20))`/`rem(theme,
289
- * 16)`), composed onto the SAME generated class, in the SAME position
290
- * `padding` already occupies — so it wins by the identical mechanism, not a
291
- * new one. Proven at the pixel level, both sizes/densities: `switch-md-
292
- * checked`/`switch-sm-checked` measure the thumb's final position against
293
- * the track's own edge, not just the transform string.
294
- *
295
- * At `density: 'normal'` every number above computes back to the literal it
296
- * replaces (`rem(theme, 9)` is `0.5625rem`, `9px` at the 16px root — no
297
- * visible change), the same geometry-neutral guarantee `iconButtonDensity
298
- * Overrides`/`chipDensityOverrides` give above. The same non-default-
299
- * `fontSize` caveat those two give applies here unchanged: `rem()` only ever
300
- * reads `theme.typography.fontSize`, so a host adopting
301
- * `checkboxRadioDensityOverrides`/`switchDensityOverrides` standalone moves
302
- * every number here by that one coefficient, same as everything else `rem()`
303
- * touches.
304
- */
305
-
306
- const checkboxRadioRootPadding = ({ theme }: { theme: Theme }): CSSObject => ({ padding: rem(theme, 9) });
307
-
308
- /**
309
- * `MuiCheckbox`/`MuiRadio`'s own padding — duplicated under both component
310
- * keys, the ticket's own documented fallback, since `MuiSwitchBase` cannot
311
- * reach either (see the module doc comment above). One module-level function
312
- * shared by both keys, and by `checkboxRadioDensityOverrides()`'s own two
313
- * calls across the two theme-build paths, for the same identity reason the
314
- * rest of this file's slots are module-level.
315
- */
316
- export function checkboxRadioDensityOverrides(): Components<Theme> {
317
- return {
318
- MuiCheckbox: { styleOverrides: { root: checkboxRadioRootPadding } },
319
- MuiRadio: { styleOverrides: { root: checkboxRadioRootPadding } },
320
- };
321
- }
322
-
323
- const switchRootGeometry = ({ theme }: { theme: Theme }): CSSObject => ({
324
- width: rems(theme, 34 + 12 * 2),
325
- height: rems(theme, 14 + 12 * 2),
326
- padding: rem(theme, 12),
327
- });
328
- const switchSwitchBasePadding = ({ theme }: { theme: Theme }): CSSObject => ({
329
- padding: rem(theme, 9),
330
- // FUT-2767 (adversarial-review fix) — `SwitchSwitchBase`'s OWN base style
331
- // (`Switch.js`, medium) bakes in `&.Mui-checked { transform:
332
- // translateX(20px) }`, a bare literal never run through `pxToRem` — at
333
- // `density: 'compact'` the track/padding/thumb above all shrink ×0.9 but
334
- // this offset stayed at a full 20px, so the checked thumb overshot the now-
335
- // smaller track. Composed onto the SAME generated class as that base style,
336
- // AFTER it (`createStyled` composes `styleThemeOverrides` after a slot's
337
- // own base/variants — see the module doc comment), so this nested rule
338
- // wins at the SAME (two-class, `.<hash>.Mui-checked`) specificity, the same
339
- // mechanism this function's own `padding` line already relies on.
340
- [`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 20)})` },
341
- });
342
- const switchThumbSize = ({ theme }: { theme: Theme }): CSSObject => ({
343
- width: rem(theme, 20),
344
- height: rem(theme, 20),
345
- });
346
- const switchSizeSmall = ({ theme }: { theme: Theme }): CSSObject => ({
347
- width: rem(theme, 40),
348
- height: rem(theme, 24),
349
- padding: rem(theme, 7),
350
- // Higher (two-class) specificity than the flat `switchBase`/`thumb`
351
- // overrides above, inserted as part of THIS SAME generated class — see the
352
- // module doc comment for why a flat override cannot reach these at
353
- // `size="small"` on its own.
354
- [`& .${switchClasses.switchBase}`]: {
355
- padding: rem(theme, 4),
356
- // Same overshoot as medium's, at `size="small"`'s OWN literal
357
- // (`SwitchRoot`'s baked-in `size: 'small'` variant, `Switch.js`:
358
- // `translateX(16px)`). Nested one level deeper so the compiled selector
359
- // is `.<root-hash> .MuiSwitch-switchBase.Mui-checked` — the same THREE-
360
- // class descendant compound MUI's own baked-in small variant uses for
361
- // this rule, composed after it in the same generated class, so it wins
362
- // at matching specificity the same way the sibling `padding: rem(theme,
363
- // 4)` line above already does.
364
- [`&.${switchClasses.checked}`]: { transform: `translateX(${rem(theme, 16)})` },
365
- },
366
- [`& .${switchClasses.thumb}`]: { width: rem(theme, 16), height: rem(theme, 16) },
367
- });
368
-
369
- /**
370
- * `MuiSwitch`'s own track (root), thumb wrapper (switchBase) and thumb
371
- * (thumb) geometry, at both sizes MUI has.
372
- */
373
- export function switchDensityOverrides(): Components<Theme> {
374
- return {
375
- MuiSwitch: {
376
- styleOverrides: {
377
- root: switchRootGeometry,
378
- switchBase: switchSwitchBasePadding,
379
- thumb: switchThumbSize,
380
- sizeSmall: switchSizeSmall,
381
- },
382
- },
383
- };
384
- }