@12-apps/ui 6.45.7 → 6.46.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 (238) hide show
  1. package/dist/_internal/components/data-display/Badge/Badge.js +6 -6
  2. package/dist/_internal/components/data-display/Badge/Badge.styles.js +4 -4
  3. package/dist/_internal/components/data-display/Badge/BadgeContent.js +5 -5
  4. package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +5 -5
  5. package/dist/_internal/components/data-display/Carousel/Carousel.js +7 -7
  6. package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +4 -4
  7. package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +4 -4
  8. package/dist/_internal/components/data-display/Chart/Chart.js +7 -7
  9. package/dist/_internal/components/data-display/Chart/SpecChart.js +8 -8
  10. package/dist/_internal/components/data-display/Chart/chart-context.js +5 -5
  11. package/dist/_internal/components/data-display/Chart/chart-internals.js +4 -4
  12. package/dist/_internal/components/data-display/Chart/chart-renderers.js +6 -6
  13. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +4 -4
  14. package/dist/_internal/components/data-display/DataGrid/DataGrid.model.js +3 -3
  15. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +14 -14
  16. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +15 -15
  17. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +6 -6
  18. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +5 -5
  19. package/dist/_internal/components/data-display/DataViews/base-list-card.js +7 -7
  20. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +5 -5
  21. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +4 -4
  22. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +7 -7
  23. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +13 -13
  24. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +3 -3
  25. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +4 -4
  26. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +7 -7
  27. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +6 -6
  28. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +4 -4
  29. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +5 -5
  30. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
  31. package/dist/_internal/components/data-display/Sheet/Sheet.js +5 -5
  32. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +4 -4
  33. package/dist/_internal/components/data-display/Table/Table.js +3 -3
  34. package/dist/_internal/components/data-display/index.js +22 -22
  35. package/dist/_internal/components/form/Command/Command.js +5 -5
  36. package/dist/_internal/components/form/Command/Command.styles.js +4 -4
  37. package/dist/_internal/components/form/Label/Label.js +5 -5
  38. package/dist/_internal/components/form/Label/Label.styles.js +4 -4
  39. package/dist/_internal/components/form/Menubar/Menubar.item.js +5 -5
  40. package/dist/_internal/components/form/Menubar/Menubar.js +7 -7
  41. package/dist/_internal/components/form/Menubar/Menubar.styles.js +4 -4
  42. package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +6 -6
  43. package/dist/_internal/components/form/index.js +11 -11
  44. package/dist/_internal/components/index.js +46 -46
  45. package/dist/_internal/components/layout/Box/Box.js +6 -6
  46. package/dist/_internal/components/layout/SettingCard/SettingCard.js +8 -8
  47. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +7 -7
  48. package/dist/_internal/components/layout/SettingCard/SettingGrid.js +8 -8
  49. package/dist/_internal/components/layout/SettingCard/SettingGroup.js +10 -10
  50. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +9 -9
  51. package/dist/_internal/components/layout/SettingCard/SettingToggle.js +10 -10
  52. package/dist/_internal/components/layout/Stack/Stack.js +7 -7
  53. package/dist/_internal/components/layout/index.js +13 -13
  54. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
  55. package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +4 -4
  56. package/dist/_internal/components/navigation/SectionNav/SectionNav.bar.js +10 -10
  57. package/dist/_internal/components/navigation/SectionNav/SectionNav.js +12 -12
  58. package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +7 -7
  59. package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +8 -8
  60. package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +8 -8
  61. package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +8 -8
  62. package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +3 -3
  63. package/dist/_internal/components/navigation/index.js +16 -16
  64. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -3
  65. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +3 -3
  66. package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
  67. package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
  68. package/dist/_internal/components/utility/index.js +3 -3
  69. package/dist/_internal/icons/Icon.js +6 -6
  70. package/dist/_internal/provider/UiProvider.js +5 -5
  71. package/dist/_internal/provider/mui-bridge.js +4 -4
  72. package/dist/_internal/provider/use-ui-theme.js +5 -5
  73. package/dist/_internal/tokens/density-overrides.js +7 -3
  74. package/dist/_internal/tokens/density.js +2 -2
  75. package/dist/charts.js +8 -8
  76. package/dist/{chunk-RNVR3RGV.js → chunk-25OI5W6Y.js} +2 -2
  77. package/dist/{chunk-GHJ2FIJO.js → chunk-4A7PSQB5.js} +3 -3
  78. package/dist/{chunk-YF3VD2KD.js → chunk-4CBM7JNK.js} +2 -2
  79. package/dist/{chunk-L3APNYI5.js → chunk-56QYSVLI.js} +4 -4
  80. package/dist/chunk-5D52CMNX.js +127 -0
  81. package/dist/chunk-5D52CMNX.js.map +1 -0
  82. package/dist/{chunk-5OS5AMC2.js → chunk-5OX6KZIZ.js} +2 -2
  83. package/dist/{chunk-PJVZY2SA.js → chunk-6MN5KOVM.js} +2 -2
  84. package/dist/{chunk-ITBUKGG3.js → chunk-6VKHS2BB.js} +2 -2
  85. package/dist/{chunk-RPKWTFJ2.js → chunk-7PUSFB3T.js} +2 -2
  86. package/dist/{chunk-6OLJ2RAT.js → chunk-AA7QTFMB.js} +2 -2
  87. package/dist/{chunk-H7HEB4UC.js → chunk-AEJ3FFNE.js} +2 -2
  88. package/dist/{chunk-HDVEE4NQ.js → chunk-BIDPJNCG.js} +12 -8
  89. package/dist/chunk-BIDPJNCG.js.map +1 -0
  90. package/dist/{chunk-QGB3DOMV.js → chunk-BU6TCB76.js} +2 -2
  91. package/dist/{chunk-UHGQ74E3.js → chunk-BWURMQWZ.js} +2 -2
  92. package/dist/{chunk-SENCNTMV.js → chunk-BWXPO2SE.js} +3 -3
  93. package/dist/{chunk-6ZWOVUNB.js → chunk-CACBJ4CR.js} +2 -2
  94. package/dist/{chunk-2OP2FYB3.js → chunk-CJPP4OUK.js} +2 -2
  95. package/dist/{chunk-Q5J37WOE.js → chunk-DWG5SEGW.js} +2 -2
  96. package/dist/{chunk-6HTCCWUM.js → chunk-E32YPPF5.js} +2 -2
  97. package/dist/{chunk-A7OQBAR7.js → chunk-E4GTZ26X.js} +2 -2
  98. package/dist/{chunk-Y4ET3NRC.js → chunk-EKWH4LGM.js} +2 -2
  99. package/dist/{chunk-KNAWZM7F.js → chunk-F56VOHFW.js} +2 -2
  100. package/dist/{chunk-IXWIJCS3.js → chunk-H5XKBPKK.js} +2 -2
  101. package/dist/{chunk-SJY4DDG7.js → chunk-HAFLKWWU.js} +2 -2
  102. package/dist/{chunk-TCFBCTZD.js → chunk-HC2AO3RT.js} +2 -2
  103. package/dist/{chunk-CU7ELD43.js → chunk-HISEWACT.js} +2 -2
  104. package/dist/{chunk-FTV5R2UZ.js → chunk-I2STNAIQ.js} +2 -2
  105. package/dist/{chunk-K7PWC44N.js → chunk-J2JWWGMT.js} +4 -4
  106. package/dist/{chunk-YKALXHCS.js → chunk-JTWRI4WD.js} +5 -5
  107. package/dist/{chunk-JWNOM5QT.js → chunk-JUKA4NY5.js} +2 -2
  108. package/dist/{chunk-PSX7DAMV.js → chunk-KYQ4OORF.js} +3 -3
  109. package/dist/{chunk-L6Q2A32O.js → chunk-LQRUTHJY.js} +2 -2
  110. package/dist/{chunk-SRZY6QG3.js → chunk-LTJDZIYR.js} +4 -4
  111. package/dist/{chunk-HYEOKBFV.js → chunk-LUPHXDEU.js} +2 -2
  112. package/dist/{chunk-HAPELHNW.js → chunk-LV2SZFXK.js} +3 -3
  113. package/dist/{chunk-JFL5WT3S.js → chunk-MEYKNJNI.js} +3 -3
  114. package/dist/{chunk-BUAFRLSB.js → chunk-N2XQKTXX.js} +3 -3
  115. package/dist/{chunk-4MGUBSAL.js → chunk-N4HHFYPB.js} +2 -2
  116. package/dist/{chunk-XLQYOBHP.js → chunk-NFTFP6WO.js} +4 -4
  117. package/dist/{chunk-XTDJ2D5A.js → chunk-NRKAJHBB.js} +2 -2
  118. package/dist/{chunk-4T5LD2NV.js → chunk-P2OQ4IGP.js} +2 -2
  119. package/dist/{chunk-O25RFGPX.js → chunk-P3XEF26U.js} +2 -2
  120. package/dist/{chunk-MW7S7WZM.js → chunk-PIUQYYOM.js} +2 -2
  121. package/dist/{chunk-FHWXRHMA.js → chunk-QFJ3JXXP.js} +1 -1
  122. package/dist/{chunk-FHWXRHMA.js.map → chunk-QFJ3JXXP.js.map} +1 -1
  123. package/dist/{chunk-EJMSSDLM.js → chunk-QL7NPQOP.js} +3 -3
  124. package/dist/{chunk-VDSQ5H4Y.js → chunk-QQUNZH3L.js} +2 -2
  125. package/dist/{chunk-PUYJVQ7X.js → chunk-RBLBXJR7.js} +2 -2
  126. package/dist/{chunk-OERKNBKK.js → chunk-RSQYWGMU.js} +2 -2
  127. package/dist/{chunk-VOBVYVPN.js → chunk-RVOYCPKF.js} +2 -2
  128. package/dist/{chunk-LHHV6NXO.js → chunk-RZPYKTOG.js} +2 -2
  129. package/dist/{chunk-CSXK7LH7.js → chunk-ST36ZSAN.js} +2 -2
  130. package/dist/{chunk-6LYRFS5S.js → chunk-T6HVNVFI.js} +2 -2
  131. package/dist/{chunk-2GG5W6LR.js → chunk-TMOC2XUE.js} +8 -4
  132. package/dist/chunk-TMOC2XUE.js.map +1 -0
  133. package/dist/{chunk-SOCZLOPJ.js → chunk-VOG5IVQW.js} +2 -2
  134. package/dist/{chunk-YDIRPKYI.js → chunk-WDQRQIT7.js} +2 -2
  135. package/dist/{chunk-VVFV4MXS.js → chunk-WGNLG2W2.js} +2 -2
  136. package/dist/{chunk-PKXCQKPB.js → chunk-XFAXRMWY.js} +3 -3
  137. package/dist/{chunk-G6T7KRQ3.js → chunk-YDU2YPQA.js} +3 -3
  138. package/dist/{chunk-KRA75CKC.js → chunk-Z3L2EGXW.js} +2 -2
  139. package/dist/{chunk-3WCUGTRH.js → chunk-ZCEXSYAJ.js} +4 -4
  140. package/dist/{chunk-EOKPFMJD.js → chunk-ZCXVTFYQ.js} +2 -2
  141. package/dist/{chunk-PNWGQAXQ.js → chunk-ZL3GCUKC.js} +2 -2
  142. package/dist/{chunk-RPFQQP5S.js → chunk-ZRIWMIHK.js} +2 -2
  143. package/dist/data-display/Badge.js +6 -6
  144. package/dist/data-display/Carousel.js +7 -7
  145. package/dist/data-display/Chart.js +8 -8
  146. package/dist/data-display/DataGrid.js +4 -4
  147. package/dist/data-display/DataViews.js +18 -18
  148. package/dist/data-display/FleetMap.js +5 -5
  149. package/dist/data-display/Sheet.js +5 -5
  150. package/dist/data-display/Table.js +3 -3
  151. package/dist/form/Command.js +5 -5
  152. package/dist/form/Label.js +5 -5
  153. package/dist/form/Menubar.js +7 -7
  154. package/dist/icons.js +6 -6
  155. package/dist/layout/Box.js +6 -6
  156. package/dist/layout/SettingCard.js +13 -13
  157. package/dist/layout/Stack.js +7 -7
  158. package/dist/navigation/AppHeader.js +7 -7
  159. package/dist/navigation/SectionNav.js +12 -12
  160. package/dist/provider.js +6 -6
  161. package/dist/tokens.js +8 -4
  162. package/dist/types/provider/mui-bridge.d.ts.map +1 -1
  163. package/dist/types/tokens/density-overrides.d.ts +14 -0
  164. package/dist/types/tokens/density-overrides.d.ts.map +1 -1
  165. package/dist/types/tokens/density.d.ts +10 -7
  166. package/dist/types/tokens/density.d.ts.map +1 -1
  167. package/dist/types/tokens/scales.d.ts +1 -1
  168. package/dist/types/tokens/scales.d.ts.map +1 -1
  169. package/dist/utility/WorkflowStep.js +3 -3
  170. package/package.json +1 -1
  171. package/src/components/form/Switch/Switch.md +26 -0
  172. package/src/provider/mui-bridge.ts +11 -4
  173. package/src/tokens/density-overrides.ts +208 -1
  174. package/src/tokens/density.ts +18 -8
  175. package/src/tokens/scales.ts +9 -3
  176. package/dist/chunk-2GG5W6LR.js.map +0 -1
  177. package/dist/chunk-532XOWZ5.js +0 -59
  178. package/dist/chunk-532XOWZ5.js.map +0 -1
  179. package/dist/chunk-HDVEE4NQ.js.map +0 -1
  180. /package/dist/{chunk-RNVR3RGV.js.map → chunk-25OI5W6Y.js.map} +0 -0
  181. /package/dist/{chunk-GHJ2FIJO.js.map → chunk-4A7PSQB5.js.map} +0 -0
  182. /package/dist/{chunk-YF3VD2KD.js.map → chunk-4CBM7JNK.js.map} +0 -0
  183. /package/dist/{chunk-L3APNYI5.js.map → chunk-56QYSVLI.js.map} +0 -0
  184. /package/dist/{chunk-5OS5AMC2.js.map → chunk-5OX6KZIZ.js.map} +0 -0
  185. /package/dist/{chunk-PJVZY2SA.js.map → chunk-6MN5KOVM.js.map} +0 -0
  186. /package/dist/{chunk-ITBUKGG3.js.map → chunk-6VKHS2BB.js.map} +0 -0
  187. /package/dist/{chunk-RPKWTFJ2.js.map → chunk-7PUSFB3T.js.map} +0 -0
  188. /package/dist/{chunk-6OLJ2RAT.js.map → chunk-AA7QTFMB.js.map} +0 -0
  189. /package/dist/{chunk-H7HEB4UC.js.map → chunk-AEJ3FFNE.js.map} +0 -0
  190. /package/dist/{chunk-QGB3DOMV.js.map → chunk-BU6TCB76.js.map} +0 -0
  191. /package/dist/{chunk-UHGQ74E3.js.map → chunk-BWURMQWZ.js.map} +0 -0
  192. /package/dist/{chunk-SENCNTMV.js.map → chunk-BWXPO2SE.js.map} +0 -0
  193. /package/dist/{chunk-6ZWOVUNB.js.map → chunk-CACBJ4CR.js.map} +0 -0
  194. /package/dist/{chunk-2OP2FYB3.js.map → chunk-CJPP4OUK.js.map} +0 -0
  195. /package/dist/{chunk-Q5J37WOE.js.map → chunk-DWG5SEGW.js.map} +0 -0
  196. /package/dist/{chunk-6HTCCWUM.js.map → chunk-E32YPPF5.js.map} +0 -0
  197. /package/dist/{chunk-A7OQBAR7.js.map → chunk-E4GTZ26X.js.map} +0 -0
  198. /package/dist/{chunk-Y4ET3NRC.js.map → chunk-EKWH4LGM.js.map} +0 -0
  199. /package/dist/{chunk-KNAWZM7F.js.map → chunk-F56VOHFW.js.map} +0 -0
  200. /package/dist/{chunk-IXWIJCS3.js.map → chunk-H5XKBPKK.js.map} +0 -0
  201. /package/dist/{chunk-SJY4DDG7.js.map → chunk-HAFLKWWU.js.map} +0 -0
  202. /package/dist/{chunk-TCFBCTZD.js.map → chunk-HC2AO3RT.js.map} +0 -0
  203. /package/dist/{chunk-CU7ELD43.js.map → chunk-HISEWACT.js.map} +0 -0
  204. /package/dist/{chunk-FTV5R2UZ.js.map → chunk-I2STNAIQ.js.map} +0 -0
  205. /package/dist/{chunk-K7PWC44N.js.map → chunk-J2JWWGMT.js.map} +0 -0
  206. /package/dist/{chunk-YKALXHCS.js.map → chunk-JTWRI4WD.js.map} +0 -0
  207. /package/dist/{chunk-JWNOM5QT.js.map → chunk-JUKA4NY5.js.map} +0 -0
  208. /package/dist/{chunk-PSX7DAMV.js.map → chunk-KYQ4OORF.js.map} +0 -0
  209. /package/dist/{chunk-L6Q2A32O.js.map → chunk-LQRUTHJY.js.map} +0 -0
  210. /package/dist/{chunk-SRZY6QG3.js.map → chunk-LTJDZIYR.js.map} +0 -0
  211. /package/dist/{chunk-HYEOKBFV.js.map → chunk-LUPHXDEU.js.map} +0 -0
  212. /package/dist/{chunk-HAPELHNW.js.map → chunk-LV2SZFXK.js.map} +0 -0
  213. /package/dist/{chunk-JFL5WT3S.js.map → chunk-MEYKNJNI.js.map} +0 -0
  214. /package/dist/{chunk-BUAFRLSB.js.map → chunk-N2XQKTXX.js.map} +0 -0
  215. /package/dist/{chunk-4MGUBSAL.js.map → chunk-N4HHFYPB.js.map} +0 -0
  216. /package/dist/{chunk-XLQYOBHP.js.map → chunk-NFTFP6WO.js.map} +0 -0
  217. /package/dist/{chunk-XTDJ2D5A.js.map → chunk-NRKAJHBB.js.map} +0 -0
  218. /package/dist/{chunk-4T5LD2NV.js.map → chunk-P2OQ4IGP.js.map} +0 -0
  219. /package/dist/{chunk-O25RFGPX.js.map → chunk-P3XEF26U.js.map} +0 -0
  220. /package/dist/{chunk-MW7S7WZM.js.map → chunk-PIUQYYOM.js.map} +0 -0
  221. /package/dist/{chunk-EJMSSDLM.js.map → chunk-QL7NPQOP.js.map} +0 -0
  222. /package/dist/{chunk-VDSQ5H4Y.js.map → chunk-QQUNZH3L.js.map} +0 -0
  223. /package/dist/{chunk-PUYJVQ7X.js.map → chunk-RBLBXJR7.js.map} +0 -0
  224. /package/dist/{chunk-OERKNBKK.js.map → chunk-RSQYWGMU.js.map} +0 -0
  225. /package/dist/{chunk-VOBVYVPN.js.map → chunk-RVOYCPKF.js.map} +0 -0
  226. /package/dist/{chunk-LHHV6NXO.js.map → chunk-RZPYKTOG.js.map} +0 -0
  227. /package/dist/{chunk-CSXK7LH7.js.map → chunk-ST36ZSAN.js.map} +0 -0
  228. /package/dist/{chunk-6LYRFS5S.js.map → chunk-T6HVNVFI.js.map} +0 -0
  229. /package/dist/{chunk-SOCZLOPJ.js.map → chunk-VOG5IVQW.js.map} +0 -0
  230. /package/dist/{chunk-YDIRPKYI.js.map → chunk-WDQRQIT7.js.map} +0 -0
  231. /package/dist/{chunk-VVFV4MXS.js.map → chunk-WGNLG2W2.js.map} +0 -0
  232. /package/dist/{chunk-PKXCQKPB.js.map → chunk-XFAXRMWY.js.map} +0 -0
  233. /package/dist/{chunk-G6T7KRQ3.js.map → chunk-YDU2YPQA.js.map} +0 -0
  234. /package/dist/{chunk-KRA75CKC.js.map → chunk-Z3L2EGXW.js.map} +0 -0
  235. /package/dist/{chunk-3WCUGTRH.js.map → chunk-ZCEXSYAJ.js.map} +0 -0
  236. /package/dist/{chunk-EOKPFMJD.js.map → chunk-ZCXVTFYQ.js.map} +0 -0
  237. /package/dist/{chunk-PNWGQAXQ.js.map → chunk-ZL3GCUKC.js.map} +0 -0
  238. /package/dist/{chunk-RPFQQP5S.js.map → chunk-ZRIWMIHK.js.map} +0 -0
@@ -6,20 +6,20 @@ import {
6
6
  import {
7
7
  AppHeaderIdentity,
8
8
  AppHeaderStatus
9
- } from "../chunk-RNVR3RGV.js";
9
+ } from "../chunk-25OI5W6Y.js";
10
10
  import {
11
11
  AppHeaderBrand
12
12
  } from "../chunk-GWFAINQ7.js";
13
13
  import {
14
14
  AppHeaderDetails
15
- } from "../chunk-EJMSSDLM.js";
15
+ } from "../chunk-QL7NPQOP.js";
16
16
  import {
17
17
  brandGradient,
18
18
  highlightOf,
19
19
  initialsOf
20
20
  } from "../chunk-IQU4HKND.js";
21
- import "../chunk-PUYJVQ7X.js";
22
- import "../chunk-MW7S7WZM.js";
21
+ import "../chunk-RBLBXJR7.js";
22
+ import "../chunk-PIUQYYOM.js";
23
23
  import "../chunk-LYVTJLCF.js";
24
24
  import "../chunk-CRN4KKNI.js";
25
25
  import "../chunk-3U3H3BZM.js";
@@ -38,10 +38,10 @@ import "../chunk-TAMIZE4Q.js";
38
38
  import "../chunk-TYJR4GOF.js";
39
39
  import "../chunk-AKZWDZCZ.js";
40
40
  import "../chunk-HPK33ACY.js";
41
- import "../chunk-FHWXRHMA.js";
41
+ import "../chunk-QFJ3JXXP.js";
42
42
  import "../chunk-7ZPUN7TV.js";
43
- import "../chunk-2GG5W6LR.js";
44
- import "../chunk-532XOWZ5.js";
43
+ import "../chunk-TMOC2XUE.js";
44
+ import "../chunk-5D52CMNX.js";
45
45
  import "../chunk-PT6TCWIW.js";
46
46
  import "../chunk-M47ZOUGF.js";
47
47
  import "../chunk-7FDU3FIN.js";
@@ -1,32 +1,32 @@
1
1
  import "../chunk-R26KYJHK.js";
2
2
  import {
3
3
  SectionNav
4
- } from "../chunk-SENCNTMV.js";
5
- import "../chunk-TCFBCTZD.js";
4
+ } from "../chunk-BWXPO2SE.js";
5
+ import "../chunk-HC2AO3RT.js";
6
6
  import {
7
7
  sectionNavBarInset
8
- } from "../chunk-3WCUGTRH.js";
9
- import "../chunk-2OP2FYB3.js";
8
+ } from "../chunk-ZCEXSYAJ.js";
9
+ import "../chunk-CJPP4OUK.js";
10
10
  import {
11
11
  RaisedActionButton
12
- } from "../chunk-6OLJ2RAT.js";
13
- import "../chunk-HYEOKBFV.js";
12
+ } from "../chunk-AA7QTFMB.js";
13
+ import "../chunk-LUPHXDEU.js";
14
14
  import "../chunk-VHVI3D4R.js";
15
15
  import "../chunk-TMSWLFL4.js";
16
16
  import "../chunk-KIHGTL2D.js";
17
17
  import "../chunk-5AK2EZG5.js";
18
- import "../chunk-HAPELHNW.js";
19
- import "../chunk-YDIRPKYI.js";
20
- import "../chunk-EOKPFMJD.js";
18
+ import "../chunk-LV2SZFXK.js";
19
+ import "../chunk-WDQRQIT7.js";
20
+ import "../chunk-ZCXVTFYQ.js";
21
21
  import "../chunk-M5ZXL52T.js";
22
22
  import "../chunk-6C5D6O3D.js";
23
23
  import "../chunk-3UIDKLML.js";
24
24
  import "../chunk-PYC4CWCQ.js";
25
25
  import "../chunk-TYJR4GOF.js";
26
- import "../chunk-FHWXRHMA.js";
26
+ import "../chunk-QFJ3JXXP.js";
27
27
  import "../chunk-7ZPUN7TV.js";
28
- import "../chunk-2GG5W6LR.js";
29
- import "../chunk-532XOWZ5.js";
28
+ import "../chunk-TMOC2XUE.js";
29
+ import "../chunk-5D52CMNX.js";
30
30
  import "../chunk-PT6TCWIW.js";
31
31
  import "../chunk-M47ZOUGF.js";
32
32
  import "../chunk-7FDU3FIN.js";
package/dist/provider.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  UiProvider
3
- } from "./chunk-KNAWZM7F.js";
3
+ } from "./chunk-F56VOHFW.js";
4
4
  import "./chunk-XZTRZ3HO.js";
5
5
  import {
6
6
  useUiTheme
7
- } from "./chunk-FTV5R2UZ.js";
7
+ } from "./chunk-I2STNAIQ.js";
8
8
  import {
9
9
  muiThemeOptionsFrom,
10
10
  uiThemeFromMui
11
- } from "./chunk-HDVEE4NQ.js";
12
- import "./chunk-FHWXRHMA.js";
11
+ } from "./chunk-BIDPJNCG.js";
12
+ import "./chunk-QFJ3JXXP.js";
13
13
  import "./chunk-7ZPUN7TV.js";
14
- import "./chunk-2GG5W6LR.js";
15
- import "./chunk-532XOWZ5.js";
14
+ import "./chunk-TMOC2XUE.js";
15
+ import "./chunk-5D52CMNX.js";
16
16
  import "./chunk-PT6TCWIW.js";
17
17
  import "./chunk-M47ZOUGF.js";
18
18
  import "./chunk-7FDU3FIN.js";
package/dist/tokens.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  accentFor
3
- } from "./chunk-FHWXRHMA.js";
3
+ } from "./chunk-QFJ3JXXP.js";
4
4
  import {
5
5
  COLOR_VALUES,
6
6
  SIZE_VALUES,
@@ -11,11 +11,13 @@ import {
11
11
  import {
12
12
  densityThemeOptions,
13
13
  useDensity
14
- } from "./chunk-2GG5W6LR.js";
14
+ } from "./chunk-TMOC2XUE.js";
15
15
  import {
16
+ checkboxRadioDensityOverrides,
16
17
  chipDensityOverrides,
17
- iconButtonDensityOverrides
18
- } from "./chunk-532XOWZ5.js";
18
+ iconButtonDensityOverrides,
19
+ switchDensityOverrides
20
+ } from "./chunk-5D52CMNX.js";
19
21
  import {
20
22
  headingMetrics
21
23
  } from "./chunk-PT6TCWIW.js";
@@ -165,6 +167,7 @@ export {
165
167
  alpha,
166
168
  asFieldSize,
167
169
  augmentColor,
170
+ checkboxRadioDensityOverrides,
168
171
  chipDensityOverrides,
169
172
  contrastText,
170
173
  controlNeutral,
@@ -214,6 +217,7 @@ export {
214
217
  shadowInk,
215
218
  sheen,
216
219
  softNeutral,
220
+ switchDensityOverrides,
217
221
  sxRem,
218
222
  uiInk,
219
223
  useDensity
@@ -1 +1 @@
1
- {"version":3,"file":"mui-bridge.d.ts","sourceRoot":"","sources":["../../../src/provider/mui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AASvF,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAwCzB,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAkEpD;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,YAAY,CAuC7D"}
1
+ {"version":3,"file":"mui-bridge.d.ts","sourceRoot":"","sources":["../../../src/provider/mui-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAcvF,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAwCzB,mEAAmE;AACnE,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAkEpD;AAED,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,YAAY,CAyC7D"}
@@ -3,4 +3,18 @@ import type { Components, Theme } from '@mui/material/styles/index.js';
3
3
  export declare function iconButtonDensityOverrides(): Components<Theme>;
4
4
  /** `MuiChip`'s own height (root) and label side padding (label), at both sizes MUI has. */
5
5
  export declare function chipDensityOverrides(): Components<Theme>;
6
+ /**
7
+ * `MuiCheckbox`/`MuiRadio`'s own padding — duplicated under both component
8
+ * keys, the ticket's own documented fallback, since `MuiSwitchBase` cannot
9
+ * reach either (see the module doc comment above). One module-level function
10
+ * shared by both keys, and by `checkboxRadioDensityOverrides()`'s own two
11
+ * calls across the two theme-build paths, for the same identity reason the
12
+ * rest of this file's slots are module-level.
13
+ */
14
+ export declare function checkboxRadioDensityOverrides(): Components<Theme>;
15
+ /**
16
+ * `MuiSwitch`'s own track (root), thumb wrapper (switchBase) and thumb
17
+ * (thumb) geometry, at both sizes MUI has.
18
+ */
19
+ export declare function switchDensityOverrides(): Components<Theme>;
6
20
  //# sourceMappingURL=density-overrides.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"density-overrides.d.ts","sourceRoot":"","sources":["../../../src/tokens/density-overrides.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAa,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAgHlF,4DAA4D;AAC5D,wBAAgB,0BAA0B,IAAI,UAAU,CAAC,KAAK,CAAC,CAU9D;AAwCD,2FAA2F;AAC3F,wBAAgB,oBAAoB,IAAI,UAAU,CAAC,KAAK,CAAC,CAWxD"}
1
+ {"version":3,"file":"density-overrides.d.ts","sourceRoot":"","sources":["../../../src/tokens/density-overrides.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAa,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAgHlF,4DAA4D;AAC5D,wBAAgB,0BAA0B,IAAI,UAAU,CAAC,KAAK,CAAC,CAU9D;AAwCD,2FAA2F;AAC3F,wBAAgB,oBAAoB,IAAI,UAAU,CAAC,KAAK,CAAC,CAWxD;AAkID;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,UAAU,CAAC,KAAK,CAAC,CAKjE;AAgDD;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,UAAU,CAAC,KAAK,CAAC,CAW1D"}
@@ -44,13 +44,16 @@ export declare function useDensity(): ResolvedDensity;
44
44
  * their own layout off.
45
45
  *
46
46
  * `components` is the matching MUI-native override (`fieldOverrides`, plus
47
- * FUT-2766's `iconButtonDensityOverrides`/`chipDensityOverrides`) for a HOST's
48
- * own bare `TextField`/`Select`/`IconButton`/`Chip`, mirroring
49
- * `muiThemeOptionsFrom`'s own `components: mergeMuiComponents(...)`. It
50
- * carries ONLY the overrides this function knows about (`MuiOutlinedInput`'s
51
- * `root`, `input` and `notchedOutline`; `MuiInputLabel`'s `outlined`;
52
- * `MuiIconButton`'s `root`/`sizeSmall`/`sizeLarge`; `MuiChip`'s
53
- * `root`/`sizeSmall`/`label`/`labelSmall`) — a host with ITS OWN overrides for
47
+ * FUT-2766's `iconButtonDensityOverrides`/`chipDensityOverrides` and
48
+ * FUT-2767's `checkboxRadioDensityOverrides`/`switchDensityOverrides`) for a
49
+ * HOST's own bare `TextField`/`Select`/`IconButton`/`Chip`/`Checkbox`/
50
+ * `Radio`/`Switch`, mirroring `muiThemeOptionsFrom`'s own `components:
51
+ * mergeMuiComponents(...)`. It carries ONLY the overrides this function knows
52
+ * about (`MuiOutlinedInput`'s `root`, `input` and `notchedOutline`;
53
+ * `MuiInputLabel`'s `outlined`; `MuiIconButton`'s `root`/`sizeSmall`/
54
+ * `sizeLarge`; `MuiChip`'s `root`/`sizeSmall`/`label`/`labelSmall`;
55
+ * `MuiCheckbox`'s and `MuiRadio`'s `root`; `MuiSwitch`'s
56
+ * `root`/`switchBase`/`thumb`/`sizeSmall`) — a host with ITS OWN overrides for
54
57
  * OTHER components merges them in with
55
58
  * `mergeMuiComponents(densityThemeOptions(density).components, hostOverrides)`,
56
59
  * which keeps a component only ONE side touches untouched. For a component
@@ -1 +1 @@
1
- {"version":3,"file":"density.d.ts","sourceRoot":"","sources":["../../../src/tokens/density.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAKxB;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,KAAK;QACb,iFAAiF;QACjF,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;IACD,UAAU,YAAY;QACpB,iFAAiF;QACjF,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAE5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,GAAG,MAAM,EAC9B,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,EAC/C,WAAW,GAAE,MAA6B,GACzC,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC,CAa7E"}
1
+ {"version":3,"file":"density.d.ts","sourceRoot":"","sources":["../../../src/tokens/density.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAUxB;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,KAAK;QACb,iFAAiF;QACjF,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;IACD,UAAU,YAAY;QACpB,iFAAiF;QACjF,OAAO,CAAC,EAAE,eAAe,CAAC;KAC3B;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAE5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,YAAY,GAAG,MAAM,EAC9B,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,EAC/C,WAAW,GAAE,MAA6B,GACzC,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,YAAY,CAAC,CAe7E"}
@@ -16,7 +16,7 @@ export * from './ink.core';
16
16
  export { DEFAULT_FIELD_RADIUS, fieldRadius, fieldRadiusOverrides, fieldRadiusPx, fieldRootStyles } from './field-radius';
17
17
  export { asFieldSize, DEFAULT_FIELD_HEIGHT, FIELD_BORDER_WIDTH, FIELD_HEIGHT_SCALE, fieldBorder, fieldControlStyles, fieldHeight, fieldHeightOverrides, fieldHeightPx, fieldHeightRem, fieldOverrides, fieldTextFieldStyles, mergeMuiComponents, } from './field-height';
18
18
  export { DEFAULT_DENSITY, DENSITY_FACTOR, densityFieldHeight, densityFontSize, densitySpacingUnit, densityThemeOptions, resolveDensityFactor, useDensity, } from './density';
19
- export { chipDensityOverrides, iconButtonDensityOverrides } from './density-overrides';
19
+ export { checkboxRadioDensityOverrides, chipDensityOverrides, iconButtonDensityOverrides, switchDensityOverrides, } from './density-overrides';
20
20
  export interface Accent {
21
21
  main: string;
22
22
  light: string;
@@ -1 +1 @@
1
- {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../src/tokens/scales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAEzD;;;;;GAKG;AACH,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEzE,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,GACX,MAAM,WAAW,CAAC;AAInB,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEvF,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAmBjE"}
1
+ {"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../../src/tokens/scales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,cAAc,CAAC;AAEzD;;;;;GAKG;AACH,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEzE,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACzH,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAKxB,OAAO,EACL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,GACX,MAAM,WAAW,CAAC;AAKnB,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAmBjE"}
@@ -5,10 +5,10 @@ import {
5
5
  import "../chunk-LV4WSWQZ.js";
6
6
  import "../chunk-KNWG77FB.js";
7
7
  import "../chunk-TM5QQJTF.js";
8
- import "../chunk-FHWXRHMA.js";
8
+ import "../chunk-QFJ3JXXP.js";
9
9
  import "../chunk-7ZPUN7TV.js";
10
- import "../chunk-2GG5W6LR.js";
11
- import "../chunk-532XOWZ5.js";
10
+ import "../chunk-TMOC2XUE.js";
11
+ import "../chunk-5D52CMNX.js";
12
12
  import "../chunk-PT6TCWIW.js";
13
13
  import "../chunk-M47ZOUGF.js";
14
14
  import "../chunk-7FDU3FIN.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.45.7",
3
+ "version": "6.46.0",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -583,6 +583,32 @@ expect(gradientTrack).toHaveStyle({ background: expect.stringContaining('gradien
583
583
  19. **Custom Dimensions** - Test trackWidth and trackHeight props
584
584
  20. **Animations** - Test animated prop and animation effects
585
585
 
586
+ ## Density
587
+
588
+ Every dimension `Switch` draws — the track's width/height, the switchBase's
589
+ own padding, the thumb's size, and the CHECKED thumb's own travel distance —
590
+ comes from `SWITCH_SIZES` (`Switch.metrics.ts`) written through `rem(theme,
591
+ px)` (`Switch.styles.ts`'s `switchSx`/`switchBaseSx`), the same vocabulary
592
+ every other size in this package uses (`tokens/relative.ts`). So `Switch`
593
+ already scales with a theme's density (`theme.typography.fontSize`) with no
594
+ help from `@12-apps/ui/tokens`' `switchDensityOverrides()` — that override
595
+ targets bare `MuiSwitch.styleOverrides`, which this component's own `sx`
596
+ (applied via `styled(MuiSwitch, ...)` in `Switch.parts.tsx`) always outranks,
597
+ so it never reaches this component at all (it exists for a raw
598
+ `@mui/material/Switch` consumer instead, such as a host's own `Table.tsx`
599
+ density-toggle column).
600
+
601
+ This is why `Switch`'s numbers (`xs`/`sm`/`md`/`lg`/`xl`) are its OWN design
602
+ scale, not MUI's `size="small"`/`"medium"` literals — and why a density change
603
+ (`density: 'compact'`, factor 0.9) shrinks every one of them, including the
604
+ checked thumb's own offset, with no separate wiring: FUT-2767's own
605
+ real-Chromium proof (`tokens/density-overrides.test.stories.tsx`'s
606
+ `ui-switch-*` cases) measures a `size="md"` switch at 45×23.4 (from
607
+ 50×26 at `density: 'normal'`) with the checked thumb's gap from the track's
608
+ own edge shrinking from 1px to 0.9px in lock-step — not staying pinned at a
609
+ now-oversized offset the way an UN-scaled `transform: translateX(20px)`
610
+ would.
611
+
586
612
  ## Related Components
587
613
 
588
614
  - Checkbox - For multi-select scenarios
@@ -1,7 +1,12 @@
1
1
  import type { PaletteColor, Theme, ThemeOptions } from '@mui/material/styles/index.js';
2
2
 
3
3
  import { cssLengthToPx, cssTrackingToEm } from '../tokens/css-units';
4
- import { chipDensityOverrides, iconButtonDensityOverrides } from '../tokens/density-overrides';
4
+ import {
5
+ checkboxRadioDensityOverrides,
6
+ chipDensityOverrides,
7
+ iconButtonDensityOverrides,
8
+ switchDensityOverrides,
9
+ } from '../tokens/density-overrides';
5
10
  import { densityFontSize, resolveDensityFactor } from '../tokens/density';
6
11
  import { resolveFieldHeight } from '../tokens/field-height.core';
7
12
  import { fieldOverrides, mergeMuiComponents } from '../tokens/field-height';
@@ -145,13 +150,15 @@ export function muiThemeOptionsFrom(ui: UiTheme): ThemeOptions {
145
150
  shape: { borderRadius: ui.radius.md },
146
151
  fieldRadius: ui.radius.field,
147
152
  fieldHeight: ui.fieldHeight,
148
- // Additive: children 3/4 (FUT-2767/2768) each add one more source here as
149
- // their own geometry overrides land — this PR (FUT-2766) adds IconButton's
150
- // and Chip's.
153
+ // Additive: child 4 (FUT-2768) adds one more source here as its own
154
+ // geometry overrides land — FUT-2766 added IconButton's and Chip's, this
155
+ // PR (FUT-2767) adds Checkbox/Radio's and Switch's.
151
156
  components: mergeMuiComponents(
152
157
  fieldOverrides(ui.radius.field, ui.fieldHeight),
153
158
  iconButtonDensityOverrides(),
154
159
  chipDensityOverrides(),
160
+ checkboxRadioDensityOverrides(),
161
+ switchDensityOverrides(),
155
162
  ),
156
163
  spacing: ui.spacingUnit,
157
164
  density: ui.density,
@@ -1,7 +1,8 @@
1
1
  import { chipClasses } from '@mui/material/Chip/index.js';
2
+ import { switchClasses } from '@mui/material/Switch/index.js';
2
3
  import type { Components, CSSObject, Theme } from '@mui/material/styles/index.js';
3
4
 
4
- import { rem } from './relative';
5
+ import { rem, rems } from './relative';
5
6
 
6
7
  /** The `ownerState` fields `MuiChip`'s two styled slots (root, label) both receive. */
7
8
  interface ChipOwnerStateForOverrides {
@@ -175,3 +176,209 @@ export function chipDensityOverrides(): Components<Theme> {
175
176
  },
176
177
  };
177
178
  }
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
+ }
@@ -9,7 +9,12 @@ import {
9
9
  type DensityLevel,
10
10
  type ResolvedDensity,
11
11
  } from './density.core';
12
- import { chipDensityOverrides, iconButtonDensityOverrides } from './density-overrides';
12
+ import {
13
+ checkboxRadioDensityOverrides,
14
+ chipDensityOverrides,
15
+ iconButtonDensityOverrides,
16
+ switchDensityOverrides,
17
+ } from './density-overrides';
13
18
  import { fieldOverrides, mergeMuiComponents } from './field-height';
14
19
  import { DEFAULT_FIELD_RADIUS } from './field-radius.core';
15
20
 
@@ -72,13 +77,16 @@ export function useDensity(): ResolvedDensity {
72
77
  * their own layout off.
73
78
  *
74
79
  * `components` is the matching MUI-native override (`fieldOverrides`, plus
75
- * FUT-2766's `iconButtonDensityOverrides`/`chipDensityOverrides`) for a HOST's
76
- * own bare `TextField`/`Select`/`IconButton`/`Chip`, mirroring
77
- * `muiThemeOptionsFrom`'s own `components: mergeMuiComponents(...)`. It
78
- * carries ONLY the overrides this function knows about (`MuiOutlinedInput`'s
79
- * `root`, `input` and `notchedOutline`; `MuiInputLabel`'s `outlined`;
80
- * `MuiIconButton`'s `root`/`sizeSmall`/`sizeLarge`; `MuiChip`'s
81
- * `root`/`sizeSmall`/`label`/`labelSmall`) — a host with ITS OWN overrides for
80
+ * FUT-2766's `iconButtonDensityOverrides`/`chipDensityOverrides` and
81
+ * FUT-2767's `checkboxRadioDensityOverrides`/`switchDensityOverrides`) for a
82
+ * HOST's own bare `TextField`/`Select`/`IconButton`/`Chip`/`Checkbox`/
83
+ * `Radio`/`Switch`, mirroring `muiThemeOptionsFrom`'s own `components:
84
+ * mergeMuiComponents(...)`. It carries ONLY the overrides this function knows
85
+ * about (`MuiOutlinedInput`'s `root`, `input` and `notchedOutline`;
86
+ * `MuiInputLabel`'s `outlined`; `MuiIconButton`'s `root`/`sizeSmall`/
87
+ * `sizeLarge`; `MuiChip`'s `root`/`sizeSmall`/`label`/`labelSmall`;
88
+ * `MuiCheckbox`'s and `MuiRadio`'s `root`; `MuiSwitch`'s
89
+ * `root`/`switchBase`/`thumb`/`sizeSmall`) — a host with ITS OWN overrides for
82
90
  * OTHER components merges them in with
83
91
  * `mergeMuiComponents(densityThemeOptions(density).components, hostOverrides)`,
84
92
  * which keeps a component only ONE side touches untouched. For a component
@@ -137,6 +145,8 @@ export function densityThemeOptions(
137
145
  fieldOverrides(fieldRadius, fieldHeight),
138
146
  iconButtonDensityOverrides(),
139
147
  chipDensityOverrides(),
148
+ checkboxRadioDensityOverrides(),
149
+ switchDensityOverrides(),
140
150
  ),
141
151
  };
142
152
  }
@@ -50,9 +50,15 @@ export {
50
50
  useDensity,
51
51
  } from './density';
52
52
  // The IconButton/Chip geometry overrides density threads through both
53
- // consumption paths (FUT-2766) — exported standalone too, for a host that
54
- // wants JUST these two components' overrides without the rest of density.
55
- export { chipDensityOverrides, iconButtonDensityOverrides } from './density-overrides';
53
+ // consumption paths (FUT-2766), and Checkbox/Radio/Switch's (FUT-2767) —
54
+ // exported standalone too, for a host that wants just these components'
55
+ // overrides without the rest of density.
56
+ export {
57
+ checkboxRadioDensityOverrides,
58
+ chipDensityOverrides,
59
+ iconButtonDensityOverrides,
60
+ switchDensityOverrides,
61
+ } from './density-overrides';
56
62
 
57
63
  export interface Accent {
58
64
  main: string;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/tokens/density.ts"],"sourcesContent":["import { useTheme } from '@mui/material/styles/index.js';\nimport type { ThemeOptions } from '@mui/material/styles/index.js';\n\nimport {\n densityFieldHeight,\n densityFontSize,\n densitySpacingUnit,\n resolveDensityFactor,\n type DensityLevel,\n type ResolvedDensity,\n} from './density.core';\nimport { chipDensityOverrides, iconButtonDensityOverrides } from './density-overrides';\nimport { fieldOverrides, mergeMuiComponents } from './field-height';\nimport { DEFAULT_FIELD_RADIUS } from './field-radius.core';\n\n/**\n * DENSITY ON THE WEB: the MUI theme channel, the reader, and the standalone\n * entry point for a host that never calls `createUiTheme`/`UiProvider`.\n *\n * The argument for one density knob, the factor table and its precedence are\n * in `./density.core.ts`.\n */\n\nexport {\n DEFAULT_DENSITY,\n DENSITY_FACTOR,\n densityFieldHeight,\n densityFontSize,\n densitySpacingUnit,\n resolveDensityFactor,\n type DensityLevel,\n type ResolvedDensity,\n} from './density.core';\n\ndeclare module '@mui/material/styles' {\n interface Theme {\n /** The density this theme renders at. See `@12-apps/ui/tokens`' `useDensity`. */\n density?: ResolvedDensity;\n }\n interface ThemeOptions {\n /** The density this theme renders at. See `@12-apps/ui/tokens`' `useDensity`. */\n density?: ResolvedDensity;\n }\n}\n\n/**\n * The theme's resolved density — a plain theme read, not a step-shifting\n * resolver (`size` stays hierarchy; see `./density.core.ts`). A `styleOverrides`\n * callback already gets `{ theme }` and can read `theme.density` directly;\n * this is for a component that needs the level in its own render logic\n * (`Table`/`DataGrid`/`DataViews` each read it once to source their own\n * `density` prop's default).\n *\n * Falls back to `resolveDensityFactor()` (`'normal'`, factor `1`) for a bare\n * MUI theme built without `createUiTheme`/`muiThemeOptionsFrom`.\n */\nexport function useDensity(): ResolvedDensity {\n return useTheme().density ?? resolveDensityFactor();\n}\n\n/**\n * The density factor as a MUI `ThemeOptions` fragment, for a host that builds\n * `createTheme()` directly and never calls `createUiTheme`/`UiProvider` — the\n * same precedence `resolveDensityFactor` gives `createUiTheme`, so the two\n * consumption paths agree on `typography`/`spacing`/`fieldHeight`/`components`\n * (FUT-2764's Design section), not just the first two. `fieldHeight` matters\n * on its own: `Input`/`Select`/`Button` each read `theme.fieldHeight` directly\n * (`Input.tsx`, `Select.tsx`, `Button.styles.ts`'s `buttonSize`), so a fragment\n * that carried only `typography`/`spacing` left every field standing at the\n * DEFAULT height (2.5) at every density on this path — the two paths would\n * agree on the type scale and disagree on the one number three components key\n * their own layout off.\n *\n * `components` is the matching MUI-native override (`fieldOverrides`, plus\n * FUT-2766's `iconButtonDensityOverrides`/`chipDensityOverrides`) for a HOST's\n * own bare `TextField`/`Select`/`IconButton`/`Chip`, mirroring\n * `muiThemeOptionsFrom`'s own `components: mergeMuiComponents(...)`. It\n * carries ONLY the overrides this function knows about (`MuiOutlinedInput`'s\n * `root`, `input` and `notchedOutline`; `MuiInputLabel`'s `outlined`;\n * `MuiIconButton`'s `root`/`sizeSmall`/`sizeLarge`; `MuiChip`'s\n * `root`/`sizeSmall`/`label`/`labelSmall`) — a host with ITS OWN overrides for\n * OTHER components merges them in with\n * `mergeMuiComponents(densityThemeOptions(density).components, hostOverrides)`,\n * which keeps a component only ONE side touches untouched. For a component\n * BOTH sides style, the merge is by INNER key (`root`/`input`/…): a key only\n * one side sets survives from that side, but a key BOTH set is replaced\n * WHOLESALE by whichever source is passed LAST — not deep-merged — so a host\n * wanting to ADD to, say, `MuiOutlinedInput`'s `root` alongside the radius\n * override needs to write that one key's object out in full itself.\n *\n * `fieldRadius` (3rd argument, optional) exists because density does NOT touch\n * the field's CORNER — this is only for a host that already draws its OWN,\n * non-default radius and wants `components` to match it instead of clashing;\n * it defaults\n * to the same {@link DEFAULT_FIELD_RADIUS} `createUiTheme` itself falls back\n * to when a host names no `fieldRadius`, so the two paths still agree with no\n * argument passed at all — the existing 2-argument call keeps working\n * unchanged.\n *\n * **Where to spread it — the first `createTheme()` call, not a later layering\n * one.** `createTheme(options, ...args)` (`createThemeNoVars.js`) only runs\n * `createSpacing`/`createTypography` on `options`, the FIRST argument; every\n * later argument is deep-merged onto the theme those two already built, with\n * no such reprocessing. So a host with a base theme and a SECOND, layering\n * `createTheme()` call on top of it — exactly the shape a two-theme host uses,\n * `createTheme(outer, { palette: { ... } })` — must apply density at the\n * FIRST call (where the base itself is built), never spread onto `outer` in\n * the second one:\n *\n * ```ts\n * // RIGHT — density goes into the base's OWN construction. The second,\n * // layering call is unaffected: it never restates spacing/typography/\n * // fieldHeight/components itself, so `theme.spacing`/`pxToRem`/`fieldHeight`\n * // carry over from `base` UNCHANGED, already correctly scaled.\n * const base = createTheme({ palette: { primary: { main }, ... }, ...densityThemeOptions('compact') });\n * const themed = createTheme(base, { palette: { primary: { main: brand } } });\n *\n * // WRONG — a second, layering argument onto an ALREADY-BUILT theme is\n * // deepmerged with no reprocessing: `spacing`/`typography.fontSize` would\n * // overwrite the already-resolved `theme.spacing` function/`pxToRem` ratio\n * // instead of rescaling them.\n * createTheme(outer, { ...densityThemeOptions('compact') });\n * ```\n */\nexport function densityThemeOptions(\n density: DensityLevel | number,\n factors?: Partial<Record<DensityLevel, number>>,\n fieldRadius: number = DEFAULT_FIELD_RADIUS,\n): Pick<ThemeOptions, 'typography' | 'spacing' | 'fieldHeight' | 'components'> {\n const { factor } = resolveDensityFactor(density, factors);\n const fieldHeight = densityFieldHeight(factor);\n return {\n typography: { fontSize: densityFontSize(factor) },\n spacing: densitySpacingUnit(factor),\n fieldHeight,\n components: mergeMuiComponents(\n fieldOverrides(fieldRadius, fieldHeight),\n iconButtonDensityOverrides(),\n chipDensityOverrides(),\n ),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAwDlB,SAAS,aAA8B;AAC5C,SAAO,SAAS,EAAE,WAAW,qBAAqB;AACpD;AAkEO,SAAS,oBACd,SACA,SACA,cAAsB,sBACuD;AAC7E,QAAM,EAAE,OAAO,IAAI,qBAAqB,SAAS,OAAO;AACxD,QAAM,cAAc,mBAAmB,MAAM;AAC7C,SAAO;AAAA,IACL,YAAY,EAAE,UAAU,gBAAgB,MAAM,EAAE;AAAA,IAChD,SAAS,mBAAmB,MAAM;AAAA,IAClC;AAAA,IACA,YAAY;AAAA,MACV,eAAe,aAAa,WAAW;AAAA,MACvC,2BAA2B;AAAA,MAC3B,qBAAqB;AAAA,IACvB;AAAA,EACF;AACF;","names":[]}