@12-apps/ui 6.17.1 → 6.18.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 (711) hide show
  1. package/NATIVE.md +94 -0
  2. package/components-catalog.md +23 -0
  3. package/components-guidelines.md +16 -1
  4. package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +3 -3
  5. package/dist/_internal/components/data-display/CardKit/CardKebab.js +10 -4
  6. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +10 -4
  7. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +10 -4
  8. package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +9 -4
  9. package/dist/_internal/components/data-display/Carousel/Carousel.js +11 -6
  10. package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +8 -3
  11. package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +8 -3
  12. package/dist/_internal/components/data-display/Chart/Chart.js +11 -6
  13. package/dist/_internal/components/data-display/Chart/SpecChart.js +12 -7
  14. package/dist/_internal/components/data-display/Chart/chart-context.js +9 -4
  15. package/dist/_internal/components/data-display/Chart/chart-internals.js +8 -3
  16. package/dist/_internal/components/data-display/Chart/chart-renderers.js +10 -5
  17. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +1 -1
  18. package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +8 -2
  19. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +49 -42
  20. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +69 -62
  21. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +12 -5
  22. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +16 -9
  23. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +16 -9
  24. package/dist/_internal/components/data-display/DataViews/base-card.js +8 -2
  25. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +10 -4
  26. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +9 -3
  27. package/dist/_internal/components/data-display/DataViews/base-list-card.js +13 -7
  28. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +9 -9
  29. package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +8 -2
  30. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +11 -5
  31. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +15 -8
  32. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +8 -2
  33. package/dist/_internal/components/data-display/DataViews/data-views-empty.js +12 -5
  34. package/dist/_internal/components/data-display/DataViews/data-views-export.js +12 -5
  35. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +11 -11
  36. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +16 -9
  37. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +10 -4
  38. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +46 -39
  39. package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +8 -2
  40. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +23 -16
  41. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -2
  42. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +13 -6
  43. package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +3 -3
  44. package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +12 -5
  45. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +19 -12
  46. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +21 -14
  47. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +18 -11
  48. package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +12 -5
  49. package/dist/_internal/components/data-display/DataViews/save-view-preview.js +8 -2
  50. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +12 -6
  51. package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
  52. package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +8 -2
  53. package/dist/_internal/components/data-display/InteractiveTooltip/InteractiveTooltip.js +2 -2
  54. package/dist/_internal/components/data-display/Lightbox/Lightbox.js +3 -3
  55. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +8 -3
  56. package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
  57. package/dist/_internal/components/data-display/Sheet/Sheet.js +12 -7
  58. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +8 -3
  59. package/dist/_internal/components/data-display/index.js +68 -61
  60. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +10 -4
  61. package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
  62. package/dist/_internal/components/feedback/index.js +27 -21
  63. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
  64. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +6 -6
  65. package/dist/_internal/components/form/Button/Button.base.js +1 -0
  66. package/dist/_internal/components/form/Button/Button.base.js.map +1 -0
  67. package/dist/_internal/components/form/Button/Button.helpers.js +1 -1
  68. package/dist/_internal/components/form/Button/Button.js +9 -3
  69. package/dist/_internal/components/form/Button/Button.metrics.js +47 -0
  70. package/dist/_internal/components/form/Button/Button.metrics.js.map +1 -0
  71. package/dist/_internal/components/form/Button/Button.styles.js +6 -1
  72. package/dist/_internal/components/form/Calendar/Calendar.hooks.js +2 -2
  73. package/dist/_internal/components/form/Calendar/Calendar.js +6 -6
  74. package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
  75. package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
  76. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +5 -5
  77. package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
  78. package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
  79. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +8 -8
  80. package/dist/_internal/components/form/CepField/CepField.js +3 -3
  81. package/dist/_internal/components/form/CodeEditor/CodeEditor.js +1 -1
  82. package/dist/_internal/components/form/Command/Command.js +9 -4
  83. package/dist/_internal/components/form/Command/Command.styles.js +8 -3
  84. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +9 -9
  85. package/dist/_internal/components/form/Input/Input.js +2 -2
  86. package/dist/_internal/components/form/Label/Label.js +9 -4
  87. package/dist/_internal/components/form/Label/Label.styles.js +8 -3
  88. package/dist/_internal/components/form/Menubar/Menubar.item.js +9 -4
  89. package/dist/_internal/components/form/Menubar/Menubar.js +12 -7
  90. package/dist/_internal/components/form/Menubar/Menubar.styles.js +8 -3
  91. package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +10 -5
  92. package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
  93. package/dist/_internal/components/form/index.js +94 -87
  94. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +9 -9
  95. package/dist/_internal/components/form/total-form/Fields/CepField.js +4 -4
  96. package/dist/_internal/components/form/total-form/Fields/TextField.js +3 -3
  97. package/dist/_internal/components/form/total-form/Fields/index.js +21 -21
  98. package/dist/_internal/components/form/total-form/SubmitButton.js +10 -4
  99. package/dist/_internal/components/index.js +260 -252
  100. package/dist/_internal/components/layout/Box/Box.base.js +8 -0
  101. package/dist/_internal/components/layout/Box/Box.base.js.map +1 -0
  102. package/dist/_internal/components/layout/Box/Box.js +22 -0
  103. package/dist/_internal/components/layout/Box/Box.js.map +1 -0
  104. package/dist/_internal/components/layout/Box/Box.types.js +8 -0
  105. package/dist/_internal/components/layout/Box/Box.types.js.map +1 -0
  106. package/dist/_internal/components/layout/Box/box-layout.js +11 -0
  107. package/dist/_internal/components/layout/Box/box-layout.js.map +1 -0
  108. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +2 -2
  109. package/dist/_internal/components/layout/Stack/Stack.base.js +1 -0
  110. package/dist/_internal/components/layout/Stack/Stack.base.js.map +1 -0
  111. package/dist/_internal/components/layout/Stack/Stack.js +22 -0
  112. package/dist/_internal/components/layout/Stack/Stack.js.map +1 -0
  113. package/dist/_internal/components/layout/Stack/Stack.types.js +1 -0
  114. package/dist/_internal/components/layout/Stack/Stack.types.js.map +1 -0
  115. package/dist/_internal/components/layout/Stack/with-dividers.js +8 -0
  116. package/dist/_internal/components/layout/Stack/with-dividers.js.map +1 -0
  117. package/dist/_internal/components/layout/index.js +19 -19
  118. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +18 -11
  119. package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +8 -3
  120. package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +3 -3
  121. package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
  122. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
  123. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
  124. package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
  125. package/dist/_internal/components/navigation/Pagination/Pagination.js +2 -2
  126. package/dist/_internal/components/navigation/index.js +38 -31
  127. package/dist/_internal/components/typography/Heading/Heading.js +4 -3
  128. package/dist/_internal/components/typography/Heading/Heading.styles.js +3 -2
  129. package/dist/_internal/components/typography/Text/Text.base.js +1 -0
  130. package/dist/_internal/components/typography/Text/Text.base.js.map +1 -0
  131. package/dist/_internal/components/typography/Text/Text.js +7 -1
  132. package/dist/_internal/components/typography/Text/Text.metrics.js +34 -0
  133. package/dist/_internal/components/typography/Text/Text.metrics.js.map +1 -0
  134. package/dist/_internal/components/typography/index.js +13 -7
  135. package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
  136. package/dist/_internal/components/utility/index.js +26 -26
  137. package/dist/_internal/icons/Icon.js +21 -0
  138. package/dist/_internal/icons/Icon.js.map +1 -0
  139. package/dist/_internal/icons/Icon.types.js +10 -0
  140. package/dist/_internal/icons/Icon.types.js.map +1 -0
  141. package/dist/_internal/icons/icon-color.js +10 -0
  142. package/dist/_internal/icons/icon-color.js.map +1 -0
  143. package/dist/_internal/icons/paths.generated.js +10 -0
  144. package/dist/_internal/icons/paths.generated.js.map +1 -0
  145. package/dist/_internal/platform/test-id.js +12 -0
  146. package/dist/_internal/platform/test-id.js.map +1 -0
  147. package/dist/_internal/provider/UiProvider.js +17 -0
  148. package/dist/_internal/provider/UiProvider.js.map +1 -0
  149. package/dist/_internal/provider/UiProvider.types.js +8 -0
  150. package/dist/_internal/provider/UiProvider.types.js.map +1 -0
  151. package/dist/_internal/provider/mui-bridge.js +17 -0
  152. package/dist/_internal/provider/mui-bridge.js.map +1 -0
  153. package/dist/_internal/provider/ui-theme-context.js +9 -0
  154. package/dist/_internal/provider/ui-theme-context.js.map +1 -0
  155. package/dist/_internal/provider/use-ui-theme.js +16 -0
  156. package/dist/_internal/provider/use-ui-theme.js.map +1 -0
  157. package/dist/_internal/social-login-button/social-login-button.js +15 -8
  158. package/dist/_internal/tokens/color.js +26 -0
  159. package/dist/_internal/tokens/color.js.map +1 -0
  160. package/dist/_internal/tokens/css-units.js +10 -0
  161. package/dist/_internal/tokens/css-units.js.map +1 -0
  162. package/dist/_internal/tokens/heading-scale.js +10 -0
  163. package/dist/_internal/tokens/heading-scale.js.map +1 -0
  164. package/dist/_internal/tokens/theme.js +33 -0
  165. package/dist/_internal/tokens/theme.js.map +1 -0
  166. package/dist/_internal/tokens/typography.js +5 -3
  167. package/dist/_internal/tokens/vocabulary.js +22 -0
  168. package/dist/_internal/tokens/vocabulary.js.map +1 -0
  169. package/dist/_internal/user-avatar/user-avatar.js +12 -5
  170. package/dist/charts.js +12 -7
  171. package/dist/{chunk-IAQFQNBL.js → chunk-24BUCMQA.js} +15 -9
  172. package/dist/chunk-24BUCMQA.js.map +1 -0
  173. package/dist/{chunk-GFBNUWT5.js → chunk-2EKALM6P.js} +6 -6
  174. package/dist/{chunk-VRHBJXZ7.js → chunk-2PCOC3PT.js} +62 -42
  175. package/dist/chunk-2PCOC3PT.js.map +1 -0
  176. package/dist/{chunk-ISW5K72V.js → chunk-2ZRZTGWP.js} +5 -5
  177. package/dist/{chunk-EB4BTKKY.js → chunk-3AFUWDYS.js} +4 -4
  178. package/dist/{chunk-HR7YTBR7.js → chunk-3AOOI2NR.js} +4 -4
  179. package/dist/{chunk-PKJKA4CU.js → chunk-3ZFORMNT.js} +4 -4
  180. package/dist/{chunk-WME2F2YY.js → chunk-4EJSUL62.js} +3 -3
  181. package/dist/{chunk-WMALDOF5.js → chunk-4G3FGCWX.js} +4 -4
  182. package/dist/chunk-4GGH6ZQ7.js +14 -0
  183. package/dist/chunk-4GGH6ZQ7.js.map +1 -0
  184. package/dist/{chunk-2PPWKCMW.js → chunk-4N4ENTF7.js} +2 -2
  185. package/dist/{chunk-6CBYPMYQ.js → chunk-4R2CDZOQ.js} +4 -4
  186. package/dist/{chunk-FJHNNSD3.js → chunk-4WK2RTVY.js} +5 -5
  187. package/dist/{chunk-6U7NA74A.js → chunk-5HOJSVQH.js} +2 -2
  188. package/dist/{chunk-2XGM5PDA.js → chunk-624TFFLJ.js} +5 -3
  189. package/dist/{chunk-2XGM5PDA.js.map → chunk-624TFFLJ.js.map} +1 -1
  190. package/dist/{chunk-GCJLMX63.js → chunk-67LDIJQZ.js} +2 -2
  191. package/dist/chunk-6JAIFIPW.js +111 -0
  192. package/dist/chunk-6JAIFIPW.js.map +1 -0
  193. package/dist/{chunk-X4X4CVWJ.js → chunk-6JZE4IIN.js} +2 -2
  194. package/dist/{chunk-OAXAF4VY.js → chunk-74KMXBG3.js} +9 -9
  195. package/dist/{chunk-ZDWU52DJ.js → chunk-7AR2R7TV.js} +4 -4
  196. package/dist/{chunk-B6IURHSZ.js → chunk-7DNQHMDO.js} +4 -4
  197. package/dist/{chunk-G7CFUI4I.js → chunk-7EESF76V.js} +2 -2
  198. package/dist/chunk-7JXLGOM2.js +25 -0
  199. package/dist/chunk-7JXLGOM2.js.map +1 -0
  200. package/dist/{chunk-AX7UFG2U.js → chunk-7RZ4WOQW.js} +3 -3
  201. package/dist/chunk-7V6ZRQYW.js +90 -0
  202. package/dist/chunk-7V6ZRQYW.js.map +1 -0
  203. package/dist/chunk-7ZPUN7TV.js +29 -0
  204. package/dist/chunk-7ZPUN7TV.js.map +1 -0
  205. package/dist/chunk-AG66JBNH.js +21 -0
  206. package/dist/chunk-AG66JBNH.js.map +1 -0
  207. package/dist/{chunk-VOOPGAQO.js → chunk-B7BZAIHL.js} +2 -2
  208. package/dist/{chunk-FWCUELBU.js → chunk-BILE3A7F.js} +2 -2
  209. package/dist/{chunk-XSKVBGCZ.js → chunk-BLBOYCOV.js} +6 -6
  210. package/dist/{chunk-4Y65Q3CR.js → chunk-C52BELLW.js} +3 -3
  211. package/dist/{chunk-QCIWROKG.js → chunk-CGQI4XE5.js} +5 -3
  212. package/dist/{chunk-QCIWROKG.js.map → chunk-CGQI4XE5.js.map} +1 -1
  213. package/dist/{chunk-RP3W6IQO.js → chunk-CPNSVIIB.js} +5 -5
  214. package/dist/{chunk-T4SM36XC.js → chunk-D7FJ2GAD.js} +2 -2
  215. package/dist/{chunk-SCGVB7DS.js → chunk-DOADQW7I.js} +2 -2
  216. package/dist/{chunk-RIAIJTEW.js → chunk-DOMEYGTN.js} +2 -2
  217. package/dist/{chunk-7HPPUO2A.js → chunk-DQHC5P64.js} +3 -3
  218. package/dist/{chunk-W2UTDN4T.js → chunk-DWZ7FLA7.js} +4 -4
  219. package/dist/{chunk-24LW52EU.js → chunk-DX527XPL.js} +2 -2
  220. package/dist/{chunk-A4YWFX5C.js → chunk-ENNW5SKT.js} +2 -2
  221. package/dist/{chunk-BPYPUEM5.js → chunk-EPNCYUQ7.js} +5 -5
  222. package/dist/{chunk-MUAVYVDJ.js → chunk-EW7ZNSWU.js} +5 -5
  223. package/dist/{chunk-DWUMMMLR.js → chunk-FOMK3WPG.js} +2 -2
  224. package/dist/{chunk-RQ4EQ5FJ.js → chunk-FP4R47TM.js} +2 -2
  225. package/dist/{chunk-7CA6GVBO.js → chunk-FZXKH2ZT.js} +3 -7
  226. package/dist/chunk-FZXKH2ZT.js.map +1 -0
  227. package/dist/{chunk-SHQWIDD5.js → chunk-GJQYM3PM.js} +4 -4
  228. package/dist/{chunk-WEH5TCPE.js → chunk-GSTRPZS4.js} +8 -8
  229. package/dist/chunk-H2EQVMU3.js +49 -0
  230. package/dist/chunk-H2EQVMU3.js.map +1 -0
  231. package/dist/{chunk-WC3W36AM.js → chunk-HOJL2GKW.js} +4 -4
  232. package/dist/{chunk-PMFW55F5.js → chunk-HSAH5QUQ.js} +5 -5
  233. package/dist/{chunk-A3KY6NUA.js → chunk-IH4CX43Q.js} +2 -2
  234. package/dist/{chunk-HEDOL2RV.js → chunk-IJIT5HQP.js} +3 -3
  235. package/dist/{chunk-VR5HDUBK.js → chunk-IPS55KWK.js} +2 -2
  236. package/dist/chunk-ITGG5OKP.js +86 -0
  237. package/dist/chunk-ITGG5OKP.js.map +1 -0
  238. package/dist/{chunk-ELYLG4F7.js → chunk-J54WH74M.js} +4 -4
  239. package/dist/chunk-J6UFAMIC.js +19 -0
  240. package/dist/chunk-J6UFAMIC.js.map +1 -0
  241. package/dist/{chunk-5ZOJLYD2.js → chunk-JE6RZ5L6.js} +4 -4
  242. package/dist/{chunk-NYUGX76C.js → chunk-JT6TERQL.js} +20 -17
  243. package/dist/chunk-JT6TERQL.js.map +1 -0
  244. package/dist/chunk-KLREH4X6.js +16 -0
  245. package/dist/chunk-KLREH4X6.js.map +1 -0
  246. package/dist/{chunk-EY4LPLIR.js → chunk-KQ74QU55.js} +3 -3
  247. package/dist/{chunk-XULTDO56.js → chunk-KT6HWAEN.js} +2 -2
  248. package/dist/{chunk-COSJTD6Z.js → chunk-KZSKI2R3.js} +2 -2
  249. package/dist/{chunk-DQIQKIEA.js → chunk-L5ZZJ4XE.js} +3 -3
  250. package/dist/{chunk-SFAP5EH5.js → chunk-LUMF63BM.js} +4 -4
  251. package/dist/{chunk-6RFL7HGI.js → chunk-LZRURORY.js} +4 -4
  252. package/dist/{chunk-KXNWDXR7.js → chunk-M2K7BPHX.js} +2 -2
  253. package/dist/{chunk-WLDK74RR.js → chunk-MSUSZLRE.js} +2 -2
  254. package/dist/{chunk-WPR2HS5B.js → chunk-MUVJD26L.js} +8 -8
  255. package/dist/{chunk-VVXRIPV5.js → chunk-MY5VNNSP.js} +9 -9
  256. package/dist/{chunk-JPDKRGYI.js → chunk-MZQTHSLN.js} +3 -3
  257. package/dist/{chunk-FF55LRSV.js → chunk-NETZMGQP.js} +2 -2
  258. package/dist/{chunk-3QGRQNTP.js → chunk-NFAKRI4S.js} +6 -6
  259. package/dist/{chunk-KSF7TLXH.js → chunk-NHSMLVNC.js} +6 -6
  260. package/dist/chunk-NQN5Z36J.js +182 -0
  261. package/dist/chunk-NQN5Z36J.js.map +1 -0
  262. package/dist/{chunk-HQJ75HHI.js → chunk-NYLXHOMR.js} +2 -2
  263. package/dist/chunk-OCUVKI63.js +35 -0
  264. package/dist/chunk-OCUVKI63.js.map +1 -0
  265. package/dist/{chunk-CXA6UNFF.js → chunk-OH3YGJT5.js} +7 -7
  266. package/dist/{chunk-REMK55JI.js → chunk-OLZTGVBT.js} +4 -4
  267. package/dist/{chunk-M3RIC6JI.js → chunk-OQXOYHIV.js} +4 -4
  268. package/dist/{chunk-3LO5JWTC.js → chunk-P5YYVDAD.js} +3 -3
  269. package/dist/{chunk-6TYSEAAT.js → chunk-PC5FFEIY.js} +4 -4
  270. package/dist/{chunk-SLYZMJEL.js → chunk-PHCSPHDH.js} +3 -3
  271. package/dist/{chunk-TCAB2ERD.js → chunk-PNYXXLPU.js} +2 -2
  272. package/dist/chunk-PT6TCWIW.js +13 -0
  273. package/dist/chunk-PT6TCWIW.js.map +1 -0
  274. package/dist/{chunk-IPE5FFFD.js → chunk-PUBPZOQJ.js} +2 -2
  275. package/dist/chunk-QLWBQQW7.js +18 -0
  276. package/dist/chunk-QLWBQQW7.js.map +1 -0
  277. package/dist/{chunk-6HNEEJES.js → chunk-QRX5BYUQ.js} +4 -4
  278. package/dist/chunk-QWBQVQRG.js +18 -0
  279. package/dist/chunk-QWBQVQRG.js.map +1 -0
  280. package/dist/{chunk-5QXSPLWU.js → chunk-R6SSXEK2.js} +2 -2
  281. package/dist/chunk-RLC46NIW.js +47 -0
  282. package/dist/chunk-RLC46NIW.js.map +1 -0
  283. package/dist/{chunk-NR3J7VQL.js → chunk-RNCQ5KHQ.js} +2 -2
  284. package/dist/chunk-RTSK5OZT.js +15 -0
  285. package/dist/chunk-RTSK5OZT.js.map +1 -0
  286. package/dist/{chunk-7FOOLP5H.js → chunk-RXSGHPCR.js} +4 -4
  287. package/dist/{chunk-Z56IO7OV.js → chunk-RXVPUW7V.js} +2 -2
  288. package/dist/{chunk-5SYD23V4.js → chunk-SKZHOWTS.js} +4 -4
  289. package/dist/{chunk-FWL2N2KH.js → chunk-SX3V2DLV.js} +2 -2
  290. package/dist/{chunk-AUYC5K5K.js → chunk-TAMIZE4Q.js} +1 -1
  291. package/dist/chunk-TAMIZE4Q.js.map +1 -0
  292. package/dist/{chunk-3GOX75ZM.js → chunk-TF4TPLF2.js} +2 -2
  293. package/dist/{chunk-3DQP6OPC.js → chunk-THBT56JE.js} +2 -2
  294. package/dist/{chunk-CBPQJAHX.js → chunk-U7RULTSH.js} +3 -3
  295. package/dist/{chunk-RRX6ZTNX.js → chunk-UEJQQVP2.js} +4 -4
  296. package/dist/{chunk-ES2RN7YV.js → chunk-UQHJQ26Y.js} +2 -2
  297. package/dist/chunk-V3PLFYKO.js +34 -0
  298. package/dist/chunk-V3PLFYKO.js.map +1 -0
  299. package/dist/chunk-V5IOLAIS.js +22 -0
  300. package/dist/chunk-V5IOLAIS.js.map +1 -0
  301. package/dist/{chunk-WR6F6J43.js → chunk-V662PA6T.js} +6 -6
  302. package/dist/{chunk-VJKRJYZL.js → chunk-VEFDL77X.js} +2 -2
  303. package/dist/{chunk-GT7C6TSM.js → chunk-VNEEXUWA.js} +3 -3
  304. package/dist/{chunk-N34YHFZW.js → chunk-W2YNUUVJ.js} +2 -2
  305. package/dist/{chunk-N4WANJI3.js → chunk-WBVHRLIS.js} +4 -4
  306. package/dist/{chunk-MHFJBNDP.js → chunk-WO52KYSU.js} +8 -8
  307. package/dist/{chunk-CLNTJM3F.js → chunk-WUPVHIMD.js} +2 -2
  308. package/dist/{chunk-ZBOFBRZC.js → chunk-WX7VWW3W.js} +2 -2
  309. package/dist/{chunk-SRMWCN5D.js → chunk-X5BHPSAC.js} +5 -5
  310. package/dist/chunk-X5D3PTWI.js +58 -0
  311. package/dist/chunk-X5D3PTWI.js.map +1 -0
  312. package/dist/{chunk-MD6T7MDT.js → chunk-XKMFIH27.js} +12 -12
  313. package/dist/{chunk-T53L42XW.js → chunk-XSJWN3WH.js} +7 -7
  314. package/dist/{chunk-AVU6KU27.js → chunk-XXDXW6TX.js} +2 -2
  315. package/dist/chunk-XZTRZ3HO.js +7 -0
  316. package/dist/chunk-XZTRZ3HO.js.map +1 -0
  317. package/dist/chunk-YMRI5QKG.js +134 -0
  318. package/dist/chunk-YMRI5QKG.js.map +1 -0
  319. package/dist/{chunk-45OIUWGO.js → chunk-YNQGXSDD.js} +5 -5
  320. package/dist/{chunk-5VVM2PPV.js → chunk-ZEBJT5JZ.js} +3 -3
  321. package/dist/{chunk-DJORMYOV.js → chunk-ZU3SWR4I.js} +2 -2
  322. package/dist/data-display/AsyncStateContainer.js +3 -3
  323. package/dist/data-display/CardKit.js +14 -8
  324. package/dist/data-display/Carousel.js +11 -6
  325. package/dist/data-display/Chart.js +12 -7
  326. package/dist/data-display/DataGrid.js +1 -1
  327. package/dist/data-display/DataViews.js +78 -71
  328. package/dist/data-display/DescriptionItem.js +8 -2
  329. package/dist/data-display/InteractiveTooltip.js +2 -2
  330. package/dist/data-display/Lightbox.js +3 -3
  331. package/dist/data-display/Sheet.js +12 -7
  332. package/dist/en-US.js +8 -8
  333. package/dist/feedback/ConfirmAction.js +12 -6
  334. package/dist/feedback/TutorialOverlay.js +2 -2
  335. package/dist/form/AddressAutocomplete.js +6 -6
  336. package/dist/form/Button.js +9 -3
  337. package/dist/form/Calendar.js +6 -6
  338. package/dist/form/CategorySelect.js +10 -10
  339. package/dist/form/CepField.js +3 -3
  340. package/dist/form/CodeEditor.js +1 -1
  341. package/dist/form/Command.js +9 -4
  342. package/dist/form/DateRangePicker.js +9 -9
  343. package/dist/form/Input.js +2 -2
  344. package/dist/form/Label.js +9 -4
  345. package/dist/form/Menubar.js +12 -7
  346. package/dist/form/RichTextEditor.js +2 -2
  347. package/dist/form/total-form.js +34 -28
  348. package/dist/icons.js +31 -0
  349. package/dist/icons.js.map +1 -0
  350. package/dist/layout/Box.js +23 -0
  351. package/dist/layout/Box.js.map +1 -0
  352. package/dist/layout/SettingsLayout.js +2 -2
  353. package/dist/layout/Stack.js +22 -0
  354. package/dist/layout/Stack.js.map +1 -0
  355. package/dist/locales.js +25 -25
  356. package/dist/native/chunks/chunk-5WLOVHKK.js +29 -0
  357. package/dist/native/chunks/chunk-5WLOVHKK.js.map +1 -0
  358. package/dist/native/chunks/chunk-L2UUNK2M.js +316 -0
  359. package/dist/native/chunks/chunk-L2UUNK2M.js.map +1 -0
  360. package/dist/native/chunks/chunk-M4DTJDWU.js +18 -0
  361. package/dist/native/chunks/chunk-M4DTJDWU.js.map +1 -0
  362. package/dist/native/chunks/chunk-QZ233LRH.js +136 -0
  363. package/dist/native/chunks/chunk-QZ233LRH.js.map +1 -0
  364. package/dist/native/chunks/chunk-VGBKUL6D.js +21 -0
  365. package/dist/native/chunks/chunk-VGBKUL6D.js.map +1 -0
  366. package/dist/native/form/Button.js +321 -0
  367. package/dist/native/form/Button.js.map +1 -0
  368. package/dist/native/icons.js +108 -0
  369. package/dist/native/icons.js.map +1 -0
  370. package/dist/native/layout/Box.js +12 -0
  371. package/dist/native/layout/Box.js.map +1 -0
  372. package/dist/native/layout/Stack.js +30 -0
  373. package/dist/native/layout/Stack.js.map +1 -0
  374. package/dist/native/provider.js +26 -0
  375. package/dist/native/provider.js.map +1 -0
  376. package/dist/native/tokens.js +65 -0
  377. package/dist/native/tokens.js.map +1 -0
  378. package/dist/native/typography/Text.js +131 -0
  379. package/dist/native/typography/Text.js.map +1 -0
  380. package/dist/navigation/AppHeader.js +19 -12
  381. package/dist/navigation/CommandPalette.js +3 -3
  382. package/dist/navigation/NavigationMenu.js +5 -5
  383. package/dist/navigation/Pagination.js +2 -2
  384. package/dist/provider.js +26 -0
  385. package/dist/provider.js.map +1 -0
  386. package/dist/pt-BR.js +8 -8
  387. package/dist/social-login-button.js +15 -8
  388. package/dist/tokens.js +59 -6
  389. package/dist/types/components/form/Button/Button.base.d.ts +65 -0
  390. package/dist/types/components/form/Button/Button.base.d.ts.map +1 -0
  391. package/dist/types/components/form/Button/Button.d.ts.map +1 -1
  392. package/dist/types/components/form/Button/Button.helpers.d.ts +7 -3
  393. package/dist/types/components/form/Button/Button.helpers.d.ts.map +1 -1
  394. package/dist/types/components/form/Button/Button.metrics.d.ts +52 -0
  395. package/dist/types/components/form/Button/Button.metrics.d.ts.map +1 -0
  396. package/dist/types/components/form/Button/Button.styles.d.ts.map +1 -1
  397. package/dist/types/components/form/Button/Button.types.d.ts +3 -46
  398. package/dist/types/components/form/Button/Button.types.d.ts.map +1 -1
  399. package/dist/types/components/form/Button/index.d.ts +1 -1
  400. package/dist/types/components/form/Button/index.d.ts.map +1 -1
  401. package/dist/types/components/layout/Box/Box.base.d.ts +60 -0
  402. package/dist/types/components/layout/Box/Box.base.d.ts.map +1 -0
  403. package/dist/types/components/layout/Box/Box.d.ts +10 -0
  404. package/dist/types/components/layout/Box/Box.d.ts.map +1 -0
  405. package/dist/types/components/layout/Box/Box.types.d.ts +11 -0
  406. package/dist/types/components/layout/Box/Box.types.d.ts.map +1 -0
  407. package/dist/types/components/layout/Box/box-layout.d.ts +42 -0
  408. package/dist/types/components/layout/Box/box-layout.d.ts.map +1 -0
  409. package/dist/types/components/layout/Box/index.d.ts +5 -0
  410. package/dist/types/components/layout/Box/index.d.ts.map +1 -0
  411. package/dist/types/components/layout/Stack/Stack.base.d.ts +13 -0
  412. package/dist/types/components/layout/Stack/Stack.base.d.ts.map +1 -0
  413. package/dist/types/components/layout/Stack/Stack.d.ts +4 -0
  414. package/dist/types/components/layout/Stack/Stack.d.ts.map +1 -0
  415. package/dist/types/components/layout/Stack/Stack.types.d.ts +5 -0
  416. package/dist/types/components/layout/Stack/Stack.types.d.ts.map +1 -0
  417. package/dist/types/components/layout/Stack/index.d.ts +3 -0
  418. package/dist/types/components/layout/Stack/index.d.ts.map +1 -0
  419. package/dist/types/components/layout/Stack/with-dividers.d.ts +4 -0
  420. package/dist/types/components/layout/Stack/with-dividers.d.ts.map +1 -0
  421. package/dist/types/components/typography/Text/Text.base.d.ts +23 -0
  422. package/dist/types/components/typography/Text/Text.base.d.ts.map +1 -0
  423. package/dist/types/components/typography/Text/Text.d.ts.map +1 -1
  424. package/dist/types/components/typography/Text/Text.metrics.d.ts +29 -0
  425. package/dist/types/components/typography/Text/Text.metrics.d.ts.map +1 -0
  426. package/dist/types/components/typography/Text/Text.types.d.ts +3 -11
  427. package/dist/types/components/typography/Text/Text.types.d.ts.map +1 -1
  428. package/dist/types/components/typography/Text/index.d.ts +1 -1
  429. package/dist/types/components/typography/Text/index.d.ts.map +1 -1
  430. package/dist/types/icons/Icon.d.ts +13 -0
  431. package/dist/types/icons/Icon.d.ts.map +1 -0
  432. package/dist/types/icons/Icon.types.d.ts +30 -0
  433. package/dist/types/icons/Icon.types.d.ts.map +1 -0
  434. package/dist/types/icons/icon-color.d.ts +10 -0
  435. package/dist/types/icons/icon-color.d.ts.map +1 -0
  436. package/dist/types/icons/index.d.ts +6 -0
  437. package/dist/types/icons/index.d.ts.map +1 -0
  438. package/dist/types/icons/paths.generated.d.ts +43 -0
  439. package/dist/types/icons/paths.generated.d.ts.map +1 -0
  440. package/dist/types/platform/test-id.d.ts +21 -0
  441. package/dist/types/platform/test-id.d.ts.map +1 -0
  442. package/dist/types/provider/UiProvider.d.ts +15 -0
  443. package/dist/types/provider/UiProvider.d.ts.map +1 -0
  444. package/dist/types/provider/UiProvider.types.d.ts +17 -0
  445. package/dist/types/provider/UiProvider.types.d.ts.map +1 -0
  446. package/dist/types/provider/index.d.ts +5 -0
  447. package/dist/types/provider/index.d.ts.map +1 -0
  448. package/dist/types/provider/mui-bridge.d.ts +7 -0
  449. package/dist/types/provider/mui-bridge.d.ts.map +1 -0
  450. package/dist/types/provider/ui-theme-context.d.ts +12 -0
  451. package/dist/types/provider/ui-theme-context.d.ts.map +1 -0
  452. package/dist/types/provider/use-ui-theme.d.ts +11 -0
  453. package/dist/types/provider/use-ui-theme.d.ts.map +1 -0
  454. package/dist/types/tokens/color.d.ts +44 -0
  455. package/dist/types/tokens/color.d.ts.map +1 -0
  456. package/dist/types/tokens/css-units.d.ts +14 -0
  457. package/dist/types/tokens/css-units.d.ts.map +1 -0
  458. package/dist/types/tokens/heading-scale.d.ts +65 -0
  459. package/dist/types/tokens/heading-scale.d.ts.map +1 -0
  460. package/dist/types/tokens/scales.d.ts +9 -114
  461. package/dist/types/tokens/scales.d.ts.map +1 -1
  462. package/dist/types/tokens/theme.d.ts +166 -0
  463. package/dist/types/tokens/theme.d.ts.map +1 -0
  464. package/dist/types/tokens/typography.d.ts +6 -62
  465. package/dist/types/tokens/typography.d.ts.map +1 -1
  466. package/dist/types/tokens/vocabulary.d.ts +117 -0
  467. package/dist/types/tokens/vocabulary.d.ts.map +1 -0
  468. package/dist/types-native/components/form/Button/Button.base.d.ts +65 -0
  469. package/dist/types-native/components/form/Button/Button.base.d.ts.map +1 -0
  470. package/dist/types-native/components/form/Button/Button.helpers.d.ts +10 -0
  471. package/dist/types-native/components/form/Button/Button.helpers.d.ts.map +1 -0
  472. package/dist/types-native/components/form/Button/Button.metrics.d.ts +52 -0
  473. package/dist/types-native/components/form/Button/Button.metrics.d.ts.map +1 -0
  474. package/dist/types-native/components/form/Button/Button.native.d.ts +10 -0
  475. package/dist/types-native/components/form/Button/Button.native.d.ts.map +1 -0
  476. package/dist/types-native/components/form/Button/Button.types.native.d.ts +17 -0
  477. package/dist/types-native/components/form/Button/Button.types.native.d.ts.map +1 -0
  478. package/dist/types-native/components/form/Button/index.native.d.ts +3 -0
  479. package/dist/types-native/components/form/Button/index.native.d.ts.map +1 -0
  480. package/dist/types-native/components/layout/Box/Box.base.d.ts +60 -0
  481. package/dist/types-native/components/layout/Box/Box.base.d.ts.map +1 -0
  482. package/dist/types-native/components/layout/Box/Box.native.d.ts +7 -0
  483. package/dist/types-native/components/layout/Box/Box.native.d.ts.map +1 -0
  484. package/dist/types-native/components/layout/Box/Box.types.native.d.ts +9 -0
  485. package/dist/types-native/components/layout/Box/Box.types.native.d.ts.map +1 -0
  486. package/dist/types-native/components/layout/Box/box-layout.d.ts +42 -0
  487. package/dist/types-native/components/layout/Box/box-layout.d.ts.map +1 -0
  488. package/dist/types-native/components/layout/Box/index.native.d.ts +5 -0
  489. package/dist/types-native/components/layout/Box/index.native.d.ts.map +1 -0
  490. package/dist/types-native/components/layout/Stack/Stack.base.d.ts +13 -0
  491. package/dist/types-native/components/layout/Stack/Stack.base.d.ts.map +1 -0
  492. package/dist/types-native/components/layout/Stack/Stack.native.d.ts +4 -0
  493. package/dist/types-native/components/layout/Stack/Stack.native.d.ts.map +1 -0
  494. package/dist/types-native/components/layout/Stack/Stack.types.native.d.ts +5 -0
  495. package/dist/types-native/components/layout/Stack/Stack.types.native.d.ts.map +1 -0
  496. package/dist/types-native/components/layout/Stack/index.native.d.ts +3 -0
  497. package/dist/types-native/components/layout/Stack/index.native.d.ts.map +1 -0
  498. package/dist/types-native/components/layout/Stack/with-dividers.d.ts +4 -0
  499. package/dist/types-native/components/layout/Stack/with-dividers.d.ts.map +1 -0
  500. package/dist/types-native/components/typography/Text/Text.base.d.ts +23 -0
  501. package/dist/types-native/components/typography/Text/Text.base.d.ts.map +1 -0
  502. package/dist/types-native/components/typography/Text/Text.metrics.d.ts +29 -0
  503. package/dist/types-native/components/typography/Text/Text.metrics.d.ts.map +1 -0
  504. package/dist/types-native/components/typography/Text/Text.native.d.ts +25 -0
  505. package/dist/types-native/components/typography/Text/Text.native.d.ts.map +1 -0
  506. package/dist/types-native/components/typography/Text/Text.types.native.d.ts +8 -0
  507. package/dist/types-native/components/typography/Text/Text.types.native.d.ts.map +1 -0
  508. package/dist/types-native/components/typography/Text/index.native.d.ts +3 -0
  509. package/dist/types-native/components/typography/Text/index.native.d.ts.map +1 -0
  510. package/dist/types-native/icons/Icon.native.d.ts +15 -0
  511. package/dist/types-native/icons/Icon.native.d.ts.map +1 -0
  512. package/dist/types-native/icons/Icon.types.d.ts +30 -0
  513. package/dist/types-native/icons/Icon.types.d.ts.map +1 -0
  514. package/dist/types-native/icons/icon-color.d.ts +10 -0
  515. package/dist/types-native/icons/icon-color.d.ts.map +1 -0
  516. package/dist/types-native/icons/index.native.d.ts +6 -0
  517. package/dist/types-native/icons/index.native.d.ts.map +1 -0
  518. package/dist/types-native/icons/paths.generated.d.ts +43 -0
  519. package/dist/types-native/icons/paths.generated.d.ts.map +1 -0
  520. package/dist/types-native/platform/test-id.d.ts +21 -0
  521. package/dist/types-native/platform/test-id.d.ts.map +1 -0
  522. package/dist/types-native/provider/UiProvider.native.d.ts +8 -0
  523. package/dist/types-native/provider/UiProvider.native.d.ts.map +1 -0
  524. package/dist/types-native/provider/UiProvider.types.d.ts +17 -0
  525. package/dist/types-native/provider/UiProvider.types.d.ts.map +1 -0
  526. package/dist/types-native/provider/index.native.d.ts +4 -0
  527. package/dist/types-native/provider/index.native.d.ts.map +1 -0
  528. package/dist/types-native/provider/ui-theme-context.d.ts +12 -0
  529. package/dist/types-native/provider/ui-theme-context.d.ts.map +1 -0
  530. package/dist/types-native/provider/use-ui-theme.native.d.ts +4 -0
  531. package/dist/types-native/provider/use-ui-theme.native.d.ts.map +1 -0
  532. package/dist/types-native/tokens/color.d.ts +44 -0
  533. package/dist/types-native/tokens/color.d.ts.map +1 -0
  534. package/dist/types-native/tokens/css-units.d.ts +14 -0
  535. package/dist/types-native/tokens/css-units.d.ts.map +1 -0
  536. package/dist/types-native/tokens/heading-scale.d.ts +65 -0
  537. package/dist/types-native/tokens/heading-scale.d.ts.map +1 -0
  538. package/dist/types-native/tokens/index.native.d.ts +10 -0
  539. package/dist/types-native/tokens/index.native.d.ts.map +1 -0
  540. package/dist/types-native/tokens/theme.d.ts +166 -0
  541. package/dist/types-native/tokens/theme.d.ts.map +1 -0
  542. package/dist/types-native/tokens/vocabulary.d.ts +117 -0
  543. package/dist/types-native/tokens/vocabulary.d.ts.map +1 -0
  544. package/dist/typography/Heading.js +4 -3
  545. package/dist/typography/Text.js +7 -1
  546. package/dist/user-avatar.js +12 -5
  547. package/dist/utility/InstallPrompt.js +2 -2
  548. package/package.json +79 -7
  549. package/src/components/form/Button/Button.base.ts +80 -0
  550. package/src/components/form/Button/Button.helpers.ts +12 -7
  551. package/src/components/form/Button/Button.metrics.ts +101 -0
  552. package/src/components/form/Button/Button.native.tsx +339 -0
  553. package/src/components/form/Button/Button.styles.ts +16 -16
  554. package/src/components/form/Button/Button.tsx +8 -5
  555. package/src/components/form/Button/Button.types.native.ts +27 -0
  556. package/src/components/form/Button/Button.types.ts +8 -58
  557. package/src/components/form/Button/index.native.ts +2 -0
  558. package/src/components/form/Button/index.ts +1 -1
  559. package/src/components/layout/Box/Box.base.ts +69 -0
  560. package/src/components/layout/Box/Box.md +46 -0
  561. package/src/components/layout/Box/Box.native.tsx +22 -0
  562. package/src/components/layout/Box/Box.tsx +56 -0
  563. package/src/components/layout/Box/Box.types.native.ts +21 -0
  564. package/src/components/layout/Box/Box.types.ts +22 -0
  565. package/src/components/layout/Box/box-layout.ts +144 -0
  566. package/src/components/layout/Box/index.native.ts +14 -0
  567. package/src/components/layout/Box/index.ts +14 -0
  568. package/src/components/layout/Stack/Stack.base.ts +14 -0
  569. package/src/components/layout/Stack/Stack.md +19 -0
  570. package/src/components/layout/Stack/Stack.native.tsx +16 -0
  571. package/src/components/layout/Stack/Stack.tsx +15 -0
  572. package/src/components/layout/Stack/Stack.types.native.ts +6 -0
  573. package/src/components/layout/Stack/Stack.types.ts +6 -0
  574. package/src/components/layout/Stack/index.native.ts +2 -0
  575. package/src/components/layout/Stack/index.ts +2 -0
  576. package/src/components/layout/Stack/with-dividers.ts +15 -0
  577. package/src/components/typography/Text/Text.base.ts +25 -0
  578. package/src/components/typography/Text/Text.metrics.ts +30 -0
  579. package/src/components/typography/Text/Text.native.tsx +149 -0
  580. package/src/components/typography/Text/Text.tsx +45 -27
  581. package/src/components/typography/Text/Text.types.native.ts +11 -0
  582. package/src/components/typography/Text/Text.types.ts +7 -12
  583. package/src/components/typography/Text/index.native.ts +2 -0
  584. package/src/components/typography/Text/index.ts +1 -1
  585. package/src/icons/Icon.md +28 -0
  586. package/src/icons/Icon.native.tsx +44 -0
  587. package/src/icons/Icon.tsx +47 -0
  588. package/src/icons/Icon.types.ts +40 -0
  589. package/src/icons/glyphs.json +39 -0
  590. package/src/icons/icon-color.ts +20 -0
  591. package/src/icons/index.native.ts +5 -0
  592. package/src/icons/index.ts +5 -0
  593. package/src/icons/paths.generated.ts +51 -0
  594. package/src/platform/test-id.ts +34 -0
  595. package/src/provider/UiProvider.native.tsx +13 -0
  596. package/src/provider/UiProvider.tsx +22 -0
  597. package/src/provider/UiProvider.types.ts +20 -0
  598. package/src/provider/index.native.ts +3 -0
  599. package/src/provider/index.ts +4 -0
  600. package/src/provider/mui-bridge.ts +141 -0
  601. package/src/provider/ui-theme-context.ts +13 -0
  602. package/src/provider/use-ui-theme.native.ts +9 -0
  603. package/src/provider/use-ui-theme.ts +18 -0
  604. package/src/tokens/color.ts +163 -0
  605. package/src/tokens/css-units.ts +28 -0
  606. package/src/tokens/heading-scale.ts +87 -0
  607. package/src/tokens/index.native.ts +9 -0
  608. package/src/tokens/scales.ts +11 -186
  609. package/src/tokens/theme.ts +334 -0
  610. package/src/tokens/typography.ts +6 -83
  611. package/src/tokens/vocabulary.ts +189 -0
  612. package/dist/chunk-7CA6GVBO.js.map +0 -1
  613. package/dist/chunk-AUYC5K5K.js.map +0 -1
  614. package/dist/chunk-I6PZVHIT.js +0 -46
  615. package/dist/chunk-I6PZVHIT.js.map +0 -1
  616. package/dist/chunk-IAQFQNBL.js.map +0 -1
  617. package/dist/chunk-NYUGX76C.js.map +0 -1
  618. package/dist/chunk-VRHBJXZ7.js.map +0 -1
  619. /package/dist/{chunk-GFBNUWT5.js.map → chunk-2EKALM6P.js.map} +0 -0
  620. /package/dist/{chunk-ISW5K72V.js.map → chunk-2ZRZTGWP.js.map} +0 -0
  621. /package/dist/{chunk-EB4BTKKY.js.map → chunk-3AFUWDYS.js.map} +0 -0
  622. /package/dist/{chunk-HR7YTBR7.js.map → chunk-3AOOI2NR.js.map} +0 -0
  623. /package/dist/{chunk-PKJKA4CU.js.map → chunk-3ZFORMNT.js.map} +0 -0
  624. /package/dist/{chunk-WME2F2YY.js.map → chunk-4EJSUL62.js.map} +0 -0
  625. /package/dist/{chunk-WMALDOF5.js.map → chunk-4G3FGCWX.js.map} +0 -0
  626. /package/dist/{chunk-2PPWKCMW.js.map → chunk-4N4ENTF7.js.map} +0 -0
  627. /package/dist/{chunk-6CBYPMYQ.js.map → chunk-4R2CDZOQ.js.map} +0 -0
  628. /package/dist/{chunk-FJHNNSD3.js.map → chunk-4WK2RTVY.js.map} +0 -0
  629. /package/dist/{chunk-6U7NA74A.js.map → chunk-5HOJSVQH.js.map} +0 -0
  630. /package/dist/{chunk-GCJLMX63.js.map → chunk-67LDIJQZ.js.map} +0 -0
  631. /package/dist/{chunk-X4X4CVWJ.js.map → chunk-6JZE4IIN.js.map} +0 -0
  632. /package/dist/{chunk-OAXAF4VY.js.map → chunk-74KMXBG3.js.map} +0 -0
  633. /package/dist/{chunk-ZDWU52DJ.js.map → chunk-7AR2R7TV.js.map} +0 -0
  634. /package/dist/{chunk-B6IURHSZ.js.map → chunk-7DNQHMDO.js.map} +0 -0
  635. /package/dist/{chunk-G7CFUI4I.js.map → chunk-7EESF76V.js.map} +0 -0
  636. /package/dist/{chunk-AX7UFG2U.js.map → chunk-7RZ4WOQW.js.map} +0 -0
  637. /package/dist/{chunk-VOOPGAQO.js.map → chunk-B7BZAIHL.js.map} +0 -0
  638. /package/dist/{chunk-FWCUELBU.js.map → chunk-BILE3A7F.js.map} +0 -0
  639. /package/dist/{chunk-XSKVBGCZ.js.map → chunk-BLBOYCOV.js.map} +0 -0
  640. /package/dist/{chunk-4Y65Q3CR.js.map → chunk-C52BELLW.js.map} +0 -0
  641. /package/dist/{chunk-RP3W6IQO.js.map → chunk-CPNSVIIB.js.map} +0 -0
  642. /package/dist/{chunk-T4SM36XC.js.map → chunk-D7FJ2GAD.js.map} +0 -0
  643. /package/dist/{chunk-SCGVB7DS.js.map → chunk-DOADQW7I.js.map} +0 -0
  644. /package/dist/{chunk-RIAIJTEW.js.map → chunk-DOMEYGTN.js.map} +0 -0
  645. /package/dist/{chunk-7HPPUO2A.js.map → chunk-DQHC5P64.js.map} +0 -0
  646. /package/dist/{chunk-W2UTDN4T.js.map → chunk-DWZ7FLA7.js.map} +0 -0
  647. /package/dist/{chunk-24LW52EU.js.map → chunk-DX527XPL.js.map} +0 -0
  648. /package/dist/{chunk-A4YWFX5C.js.map → chunk-ENNW5SKT.js.map} +0 -0
  649. /package/dist/{chunk-BPYPUEM5.js.map → chunk-EPNCYUQ7.js.map} +0 -0
  650. /package/dist/{chunk-MUAVYVDJ.js.map → chunk-EW7ZNSWU.js.map} +0 -0
  651. /package/dist/{chunk-DWUMMMLR.js.map → chunk-FOMK3WPG.js.map} +0 -0
  652. /package/dist/{chunk-RQ4EQ5FJ.js.map → chunk-FP4R47TM.js.map} +0 -0
  653. /package/dist/{chunk-SHQWIDD5.js.map → chunk-GJQYM3PM.js.map} +0 -0
  654. /package/dist/{chunk-WEH5TCPE.js.map → chunk-GSTRPZS4.js.map} +0 -0
  655. /package/dist/{chunk-WC3W36AM.js.map → chunk-HOJL2GKW.js.map} +0 -0
  656. /package/dist/{chunk-PMFW55F5.js.map → chunk-HSAH5QUQ.js.map} +0 -0
  657. /package/dist/{chunk-A3KY6NUA.js.map → chunk-IH4CX43Q.js.map} +0 -0
  658. /package/dist/{chunk-HEDOL2RV.js.map → chunk-IJIT5HQP.js.map} +0 -0
  659. /package/dist/{chunk-VR5HDUBK.js.map → chunk-IPS55KWK.js.map} +0 -0
  660. /package/dist/{chunk-ELYLG4F7.js.map → chunk-J54WH74M.js.map} +0 -0
  661. /package/dist/{chunk-5ZOJLYD2.js.map → chunk-JE6RZ5L6.js.map} +0 -0
  662. /package/dist/{chunk-EY4LPLIR.js.map → chunk-KQ74QU55.js.map} +0 -0
  663. /package/dist/{chunk-XULTDO56.js.map → chunk-KT6HWAEN.js.map} +0 -0
  664. /package/dist/{chunk-COSJTD6Z.js.map → chunk-KZSKI2R3.js.map} +0 -0
  665. /package/dist/{chunk-DQIQKIEA.js.map → chunk-L5ZZJ4XE.js.map} +0 -0
  666. /package/dist/{chunk-SFAP5EH5.js.map → chunk-LUMF63BM.js.map} +0 -0
  667. /package/dist/{chunk-6RFL7HGI.js.map → chunk-LZRURORY.js.map} +0 -0
  668. /package/dist/{chunk-KXNWDXR7.js.map → chunk-M2K7BPHX.js.map} +0 -0
  669. /package/dist/{chunk-WLDK74RR.js.map → chunk-MSUSZLRE.js.map} +0 -0
  670. /package/dist/{chunk-WPR2HS5B.js.map → chunk-MUVJD26L.js.map} +0 -0
  671. /package/dist/{chunk-VVXRIPV5.js.map → chunk-MY5VNNSP.js.map} +0 -0
  672. /package/dist/{chunk-JPDKRGYI.js.map → chunk-MZQTHSLN.js.map} +0 -0
  673. /package/dist/{chunk-FF55LRSV.js.map → chunk-NETZMGQP.js.map} +0 -0
  674. /package/dist/{chunk-3QGRQNTP.js.map → chunk-NFAKRI4S.js.map} +0 -0
  675. /package/dist/{chunk-KSF7TLXH.js.map → chunk-NHSMLVNC.js.map} +0 -0
  676. /package/dist/{chunk-HQJ75HHI.js.map → chunk-NYLXHOMR.js.map} +0 -0
  677. /package/dist/{chunk-CXA6UNFF.js.map → chunk-OH3YGJT5.js.map} +0 -0
  678. /package/dist/{chunk-REMK55JI.js.map → chunk-OLZTGVBT.js.map} +0 -0
  679. /package/dist/{chunk-M3RIC6JI.js.map → chunk-OQXOYHIV.js.map} +0 -0
  680. /package/dist/{chunk-3LO5JWTC.js.map → chunk-P5YYVDAD.js.map} +0 -0
  681. /package/dist/{chunk-6TYSEAAT.js.map → chunk-PC5FFEIY.js.map} +0 -0
  682. /package/dist/{chunk-SLYZMJEL.js.map → chunk-PHCSPHDH.js.map} +0 -0
  683. /package/dist/{chunk-TCAB2ERD.js.map → chunk-PNYXXLPU.js.map} +0 -0
  684. /package/dist/{chunk-IPE5FFFD.js.map → chunk-PUBPZOQJ.js.map} +0 -0
  685. /package/dist/{chunk-6HNEEJES.js.map → chunk-QRX5BYUQ.js.map} +0 -0
  686. /package/dist/{chunk-5QXSPLWU.js.map → chunk-R6SSXEK2.js.map} +0 -0
  687. /package/dist/{chunk-NR3J7VQL.js.map → chunk-RNCQ5KHQ.js.map} +0 -0
  688. /package/dist/{chunk-7FOOLP5H.js.map → chunk-RXSGHPCR.js.map} +0 -0
  689. /package/dist/{chunk-Z56IO7OV.js.map → chunk-RXVPUW7V.js.map} +0 -0
  690. /package/dist/{chunk-5SYD23V4.js.map → chunk-SKZHOWTS.js.map} +0 -0
  691. /package/dist/{chunk-FWL2N2KH.js.map → chunk-SX3V2DLV.js.map} +0 -0
  692. /package/dist/{chunk-3GOX75ZM.js.map → chunk-TF4TPLF2.js.map} +0 -0
  693. /package/dist/{chunk-3DQP6OPC.js.map → chunk-THBT56JE.js.map} +0 -0
  694. /package/dist/{chunk-CBPQJAHX.js.map → chunk-U7RULTSH.js.map} +0 -0
  695. /package/dist/{chunk-RRX6ZTNX.js.map → chunk-UEJQQVP2.js.map} +0 -0
  696. /package/dist/{chunk-ES2RN7YV.js.map → chunk-UQHJQ26Y.js.map} +0 -0
  697. /package/dist/{chunk-WR6F6J43.js.map → chunk-V662PA6T.js.map} +0 -0
  698. /package/dist/{chunk-VJKRJYZL.js.map → chunk-VEFDL77X.js.map} +0 -0
  699. /package/dist/{chunk-GT7C6TSM.js.map → chunk-VNEEXUWA.js.map} +0 -0
  700. /package/dist/{chunk-N34YHFZW.js.map → chunk-W2YNUUVJ.js.map} +0 -0
  701. /package/dist/{chunk-N4WANJI3.js.map → chunk-WBVHRLIS.js.map} +0 -0
  702. /package/dist/{chunk-MHFJBNDP.js.map → chunk-WO52KYSU.js.map} +0 -0
  703. /package/dist/{chunk-CLNTJM3F.js.map → chunk-WUPVHIMD.js.map} +0 -0
  704. /package/dist/{chunk-ZBOFBRZC.js.map → chunk-WX7VWW3W.js.map} +0 -0
  705. /package/dist/{chunk-SRMWCN5D.js.map → chunk-X5BHPSAC.js.map} +0 -0
  706. /package/dist/{chunk-MD6T7MDT.js.map → chunk-XKMFIH27.js.map} +0 -0
  707. /package/dist/{chunk-T53L42XW.js.map → chunk-XSJWN3WH.js.map} +0 -0
  708. /package/dist/{chunk-AVU6KU27.js.map → chunk-XXDXW6TX.js.map} +0 -0
  709. /package/dist/{chunk-45OIUWGO.js.map → chunk-YNQGXSDD.js.map} +0 -0
  710. /package/dist/{chunk-5VVM2PPV.js.map → chunk-ZEBJT5JZ.js.map} +0 -0
  711. /package/dist/{chunk-DJORMYOV.js.map → chunk-ZU3SWR4I.js.map} +0 -0
@@ -0,0 +1,334 @@
1
+ import { darken, getContrastRatio, lighten } from './color';
2
+ import { cssLengthToPx, cssTrackingToEm } from './css-units';
3
+ import { HEADING_SCALE, type HeadingLevel } from './heading-scale';
4
+
5
+ import type { SizeValue } from './vocabulary';
6
+
7
+ /**
8
+ * THE THEME BOTH RENDERERS READ.
9
+ *
10
+ * On the web every component styles itself from MUI's `Theme`, which is built
11
+ * by the host (`@12-apps/app-shell`'s `createAppTheme` in the origin apps) and
12
+ * reaches a component through emotion's context. React Native has no emotion,
13
+ * no CSS and no MUI, so a native `Button` needs the same decisions — the
14
+ * palette, the spacing unit, the radius, the type scale — from somewhere that
15
+ * does not import a renderer.
16
+ *
17
+ * This is that somewhere. `UiTheme` is a plain object of numbers and colour
18
+ * strings. `createUiTheme` derives it the way MUI's `createPalette` derives its
19
+ * own: a `light` shade is `lighten(main, 0.2)`, a `dark` shade `darken(main,
20
+ * 0.3)`, `contrastText` flips at a 3:1 ratio against `rgba(0, 0, 0, 0.87)`.
21
+ * Same seeds in, same shades out, on both sides — that is the whole basis for
22
+ * a native button being the web button's colour and not a near miss.
23
+ *
24
+ * Numbers are in px on the web and dp on native; both are the CSS-pixel unit
25
+ * a design is drawn in, so a `fontSize: 16` here IS `1rem` in a web style
26
+ * and `16` in a `StyleSheet`. The web components keep their `rem` strings and
27
+ * derive them from these numbers where the two meet (see `px()` below and the
28
+ * `*.metrics.ts` file beside each ported component).
29
+ *
30
+ * `danger` and `neutral` are this package's names (see `./scales`); `danger`
31
+ * is MUI's `error` and `neutral` is drawn from the grey ramp the way
32
+ * `Button.styles.ts` has always drawn it.
33
+ */
34
+
35
+ export type UiThemeMode = 'light' | 'dark';
36
+
37
+ export interface UiPaletteColor {
38
+ main: string;
39
+ light: string;
40
+ dark: string;
41
+ contrastText: string;
42
+ }
43
+
44
+ export type UiGreyStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
45
+
46
+ export interface UiPalette {
47
+ mode: UiThemeMode;
48
+ primary: UiPaletteColor;
49
+ secondary: UiPaletteColor;
50
+ success: UiPaletteColor;
51
+ warning: UiPaletteColor;
52
+ info: UiPaletteColor;
53
+ danger: UiPaletteColor;
54
+ neutral: UiPaletteColor;
55
+ text: { primary: string; secondary: string; disabled: string };
56
+ background: { default: string; paper: string };
57
+ divider: string;
58
+ action: {
59
+ active: string;
60
+ hover: string;
61
+ selected: string;
62
+ disabled: string;
63
+ disabledBackground: string;
64
+ focus: string;
65
+ };
66
+ grey: Record<UiGreyStep, string>;
67
+ }
68
+
69
+ /** One step of the body scale: `fontSize` in px, `lineHeight` as a ratio. */
70
+ export interface UiTypeStep {
71
+ fontSize: number;
72
+ lineHeight: number;
73
+ }
74
+
75
+ export type UiFontWeight = 'light' | 'normal' | 'medium' | 'semibold' | 'bold';
76
+
77
+ export interface UiHeadingStep extends UiTypeStep {
78
+ /** In em, so it scales with the step. `undefined` is "normal". */
79
+ letterSpacing?: number;
80
+ normalWeight: number;
81
+ }
82
+
83
+ export interface UiTypography {
84
+ /**
85
+ * Native has no fallback stacks: a font is either installed and named, or
86
+ * `undefined` and the platform's own. The web default is MUI's Roboto stack.
87
+ */
88
+ fontFamily: string | undefined;
89
+ monospaceFontFamily: string | undefined;
90
+ sizes: Record<SizeValue, UiTypeStep>;
91
+ weights: Record<UiFontWeight, number>;
92
+ heading: Record<HeadingLevel, UiHeadingStep>;
93
+ }
94
+
95
+ export interface UiTheme {
96
+ mode: UiThemeMode;
97
+ palette: UiPalette;
98
+ /** MUI's `theme.spacing(n)`: `n` units of {@link UiTheme.spacingUnit}, in px. */
99
+ spacing: (units: number) => number;
100
+ spacingUnit: number;
101
+ /** `md` is MUI's `shape.borderRadius`; the others are its halves and doubles. */
102
+ radius: { sm: number; md: number; lg: number; xl: number; full: number };
103
+ typography: UiTypography;
104
+ zIndex: { appBar: number; drawer: number; modal: number; snackbar: number; tooltip: number };
105
+ }
106
+
107
+ /** A seed for one palette slot: a hex `main`, or any subset of the four shades. */
108
+ export type UiPaletteSeed = string | Partial<UiPaletteColor>;
109
+
110
+ export interface UiThemeOptions {
111
+ mode?: UiThemeMode;
112
+ palette?: Partial<{
113
+ primary: UiPaletteSeed;
114
+ secondary: UiPaletteSeed;
115
+ success: UiPaletteSeed;
116
+ warning: UiPaletteSeed;
117
+ info: UiPaletteSeed;
118
+ danger: UiPaletteSeed;
119
+ background: Partial<UiPalette['background']>;
120
+ }>;
121
+ typography?: Partial<Pick<UiTypography, 'fontFamily' | 'monospaceFontFamily'>>;
122
+ spacingUnit?: number;
123
+ }
124
+
125
+ const ROOT_FONT_PX = 16;
126
+
127
+ /** The px value as the rem string the web components write. */
128
+ export const px = (value: number): string => `${value / ROOT_FONT_PX}rem`;
129
+
130
+ /** MUI's `createPalette` defaults, exactly. */
131
+ const TONAL_OFFSET = 0.2;
132
+ const CONTRAST_THRESHOLD = 3;
133
+ const DARK_TEXT_PRIMARY = 'rgba(0, 0, 0, 0.87)';
134
+ const LIGHT_TEXT_PRIMARY = '#fff';
135
+
136
+ export const GREY: Record<UiGreyStep, string> = {
137
+ 50: '#fafafa',
138
+ 100: '#f5f5f5',
139
+ 200: '#eeeeee',
140
+ 300: '#e0e0e0',
141
+ 400: '#bdbdbd',
142
+ 500: '#9e9e9e',
143
+ 600: '#757575',
144
+ 700: '#616161',
145
+ 800: '#424242',
146
+ 900: '#212121',
147
+ };
148
+
149
+ /**
150
+ * The platform's own seeds. The pair `@12-apps/ui`'s Storybook preview and
151
+ * `@12-apps/app-shell`'s `DEFAULT_THEME_TOKENS` both carry — keep the three in
152
+ * step if the design tokens change.
153
+ */
154
+ export const DEFAULT_BRAND: Record<UiThemeMode, { primary: string; secondary: string }> = {
155
+ light: { primary: '#6366F1', secondary: '#8B5CF6' },
156
+ dark: { primary: '#818CF8', secondary: '#A78BFA' },
157
+ };
158
+
159
+ /** MUI's semantic defaults per mode. These are declared shades, not derived. */
160
+ const SEMANTIC_DEFAULTS: Record<
161
+ UiThemeMode,
162
+ Record<'success' | 'warning' | 'info' | 'danger', UiPaletteColor>
163
+ > = {
164
+ light: {
165
+ success: { main: '#2e7d32', light: '#4caf50', dark: '#1b5e20', contrastText: '#fff' },
166
+ warning: { main: '#ed6c02', light: '#ff9800', dark: '#e65100', contrastText: '#fff' },
167
+ info: { main: '#0288d1', light: '#03a9f4', dark: '#01579b', contrastText: '#fff' },
168
+ danger: { main: '#d32f2f', light: '#ef5350', dark: '#c62828', contrastText: '#fff' },
169
+ },
170
+ dark: {
171
+ success: { main: '#66bb6a', light: '#81c784', dark: '#388e3c', contrastText: DARK_TEXT_PRIMARY },
172
+ warning: { main: '#ffa726', light: '#ffb74d', dark: '#f57c00', contrastText: DARK_TEXT_PRIMARY },
173
+ info: { main: '#29b6f6', light: '#4fc3f7', dark: '#0288d1', contrastText: DARK_TEXT_PRIMARY },
174
+ danger: { main: '#f44336', light: '#e57373', dark: '#d32f2f', contrastText: '#fff' },
175
+ },
176
+ };
177
+
178
+ const MODE_DEFAULTS: Record<
179
+ UiThemeMode,
180
+ Pick<UiPalette, 'text' | 'background' | 'divider' | 'action'>
181
+ > = {
182
+ light: {
183
+ text: { primary: DARK_TEXT_PRIMARY, secondary: 'rgba(0, 0, 0, 0.6)', disabled: 'rgba(0, 0, 0, 0.38)' },
184
+ background: { default: '#fff', paper: '#fff' },
185
+ divider: 'rgba(0, 0, 0, 0.12)',
186
+ action: {
187
+ active: 'rgba(0, 0, 0, 0.54)',
188
+ hover: 'rgba(0, 0, 0, 0.04)',
189
+ selected: 'rgba(0, 0, 0, 0.08)',
190
+ disabled: 'rgba(0, 0, 0, 0.26)',
191
+ disabledBackground: 'rgba(0, 0, 0, 0.12)',
192
+ focus: 'rgba(0, 0, 0, 0.12)',
193
+ },
194
+ },
195
+ dark: {
196
+ text: { primary: '#fff', secondary: 'rgba(255, 255, 255, 0.7)', disabled: 'rgba(255, 255, 255, 0.5)' },
197
+ background: { default: '#121212', paper: '#121212' },
198
+ divider: 'rgba(255, 255, 255, 0.12)',
199
+ action: {
200
+ active: '#fff',
201
+ hover: 'rgba(255, 255, 255, 0.08)',
202
+ selected: 'rgba(255, 255, 255, 0.16)',
203
+ disabled: 'rgba(255, 255, 255, 0.3)',
204
+ disabledBackground: 'rgba(255, 255, 255, 0.12)',
205
+ focus: 'rgba(255, 255, 255, 0.12)',
206
+ },
207
+ },
208
+ };
209
+
210
+ /**
211
+ * MUI's `getContrastText`: white where white reads at 3:1 on the colour, the
212
+ * light mode's dark ink otherwise. (MUI's source spells the white as the DARK
213
+ * palette's `text.primary`, which is what made it easy to read backwards.)
214
+ */
215
+ export function contrastText(background: string): string {
216
+ return getContrastRatio(background, LIGHT_TEXT_PRIMARY) >= CONTRAST_THRESHOLD
217
+ ? LIGHT_TEXT_PRIMARY
218
+ : DARK_TEXT_PRIMARY;
219
+ }
220
+
221
+ /**
222
+ * MUI's `augmentColor` for a custom colour: derive whatever shade the seed
223
+ * left out. `light` is one tonal offset up, `dark` one and a half down.
224
+ */
225
+ export function augmentColor(seed: UiPaletteSeed): UiPaletteColor {
226
+ const partial = typeof seed === 'string' ? { main: seed } : seed;
227
+ const main = partial.main ?? partial.light ?? partial.dark;
228
+ if (!main) {
229
+ throw new Error('@12-apps/ui: a palette seed needs at least a `main` colour.');
230
+ }
231
+ return {
232
+ main,
233
+ light: partial.light ?? lighten(main, TONAL_OFFSET),
234
+ dark: partial.dark ?? darken(main, TONAL_OFFSET * 1.5),
235
+ contrastText: partial.contrastText ?? contrastText(main),
236
+ };
237
+ }
238
+
239
+ const semantic = (
240
+ mode: UiThemeMode,
241
+ key: 'success' | 'warning' | 'info' | 'danger',
242
+ seed: UiPaletteSeed | undefined,
243
+ ): UiPaletteColor => (seed === undefined ? SEMANTIC_DEFAULTS[mode][key] : augmentColor(seed));
244
+
245
+ /** `neutral` as `accentFor` in `./scales` has always drawn it: three greys and white. */
246
+ export const NEUTRAL: UiPaletteColor = {
247
+ main: GREY[600],
248
+ light: GREY[400],
249
+ dark: GREY[800],
250
+ contrastText: '#fff',
251
+ };
252
+
253
+ /** The body scale `Text` renders, in px. `Text.tsx`'s rem map is this, divided by 16. */
254
+ export const TYPE_SIZES: Record<SizeValue, UiTypeStep> = {
255
+ xs: { fontSize: 12, lineHeight: 1.2 },
256
+ sm: { fontSize: 14, lineHeight: 1.3 },
257
+ md: { fontSize: 16, lineHeight: 1.5 },
258
+ lg: { fontSize: 18, lineHeight: 1.4 },
259
+ xl: { fontSize: 20, lineHeight: 1.3 },
260
+ };
261
+
262
+ export const FONT_WEIGHTS: Record<UiFontWeight, number> = {
263
+ light: 300,
264
+ normal: 400,
265
+ medium: 500,
266
+ semibold: 600,
267
+ bold: 700,
268
+ };
269
+
270
+ // `HEADING_SCALE` speaks CSS, this theme speaks numbers; `./css-units` is the
271
+ // one place that conversion is written.
272
+ const HEADING_STEPS = Object.fromEntries(
273
+ Object.entries(HEADING_SCALE).map(([level, metrics]) => [
274
+ level,
275
+ {
276
+ fontSize: cssLengthToPx(metrics.fontSize, ROOT_FONT_PX),
277
+ lineHeight: metrics.lineHeight,
278
+ letterSpacing: cssTrackingToEm(metrics.letterSpacing),
279
+ normalWeight: metrics.normalWeight,
280
+ },
281
+ ]),
282
+ ) as Record<HeadingLevel, UiHeadingStep>;
283
+
284
+ export const WEB_FONT_FAMILY = '"Roboto", "Helvetica", "Arial", sans-serif';
285
+ export const WEB_MONOSPACE_FONT_FAMILY = 'Monaco, Menlo, "Ubuntu Mono", "Courier New", monospace';
286
+
287
+ /**
288
+ * Build the theme. Every field is derived here so a host that changes one
289
+ * seed gets every dependent shade recomputed, on both renderers, identically.
290
+ */
291
+ export function createUiTheme(options: UiThemeOptions = {}): UiTheme {
292
+ const mode = options.mode ?? 'light';
293
+ const seeds = options.palette ?? {};
294
+ const brand = DEFAULT_BRAND[mode];
295
+ const defaults = MODE_DEFAULTS[mode];
296
+ const spacingUnit = options.spacingUnit ?? 8;
297
+
298
+ const palette: UiPalette = {
299
+ mode,
300
+ primary: augmentColor(seeds.primary ?? brand.primary),
301
+ secondary: augmentColor(seeds.secondary ?? brand.secondary),
302
+ success: semantic(mode, 'success', seeds.success),
303
+ warning: semantic(mode, 'warning', seeds.warning),
304
+ info: semantic(mode, 'info', seeds.info),
305
+ danger: semantic(mode, 'danger', seeds.danger),
306
+ neutral: NEUTRAL,
307
+ text: defaults.text,
308
+ background: { ...defaults.background, ...seeds.background },
309
+ divider: defaults.divider,
310
+ action: defaults.action,
311
+ grey: GREY,
312
+ };
313
+
314
+ return {
315
+ mode,
316
+ palette,
317
+ spacing: (units: number) => units * spacingUnit,
318
+ spacingUnit,
319
+ radius: { sm: 2, md: 4, lg: 8, xl: 16, full: 9999 },
320
+ typography: {
321
+ fontFamily: options.typography?.fontFamily,
322
+ monospaceFontFamily: options.typography?.monospaceFontFamily,
323
+ sizes: TYPE_SIZES,
324
+ weights: FONT_WEIGHTS,
325
+ heading: HEADING_STEPS,
326
+ },
327
+ zIndex: { appBar: 1100, drawer: 1200, modal: 1300, snackbar: 1400, tooltip: 1500 },
328
+ };
329
+ }
330
+
331
+ /** The palette slot a house colour name resolves to. */
332
+ export type UiPaletteKey = 'primary' | 'secondary' | 'success' | 'warning' | 'info' | 'danger' | 'neutral';
333
+
334
+ export const DEFAULT_UI_THEME: UiTheme = createUiTheme();
@@ -1,91 +1,14 @@
1
1
  import type { Theme } from '@mui/material/styles/index.js';
2
2
 
3
- /**
4
- * THE THIRD VOCABULARY: the type scale.
5
- *
6
- * `scales.ts` opens by saying the package had both halves of every argument at
7
- * once until the size and colour vocabularies were declared in one place and
8
- * every component derived from them. The type scale was the one that never got
9
- * that treatment — it lived as a private `LEVELS` table inside
10
- * `Heading.styles.ts`, which is exactly the shape that file exists to refuse.
11
- *
12
- * Two things follow from it being private, and the second is the expensive one.
13
- *
14
- * **It could not be re-themed.** `Heading` read `theme.typography.h1.fontFamily`
15
- * from the theme and then ignored the theme for every other metric, so a host
16
- * calling `createTheme({ typography: { h1: { fontSize: '2rem' } } })` changed
17
- * `<Typography variant="h1">` and left `<Heading level="h1">` at 48px. A design
18
- * system whose type scale cannot be set by the design is not a system.
19
- *
20
- * **And the numbers were a landing page's.** `h1` at 3rem and `h2` at 2.5rem are
21
- * hero metrics. Dropped into an operations console they put a 48px title
22
- * directly above 14px body copy — a 3.4x jump with nothing in between — so
23
- * product teams stopped reaching for the component. Measured in one consuming
24
- * repo: `<Heading>` appeared four times in the entire codebase while raw
25
- * `fontSize` appeared in dozens of files. The component was not disliked, it was
26
- * unusable at app scale, and every host paid for that in hand-rolled CSS.
27
- *
28
- * So the defaults below are an APP scale, and `display` keeps the hero size for
29
- * the screens that actually want one. A marketing page asks for `display`; a
30
- * console asks for `h1` and gets something it can put on a page.
31
- */
32
-
33
- /**
34
- * A step on the scale.
35
- *
36
- * `display` is a SIZE, not a rank — see `Heading`, which renders it as `h1` so
37
- * the document still gets exactly one level-one heading.
38
- */
39
- export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'display';
3
+ import { HEADING_SCALE, type HeadingLevel, type HeadingMetrics, type HeadingScaleOverrides } from './heading-scale';
40
4
 
41
5
  /**
42
- * The runtime list, declared beside the union for the reason `SIZE_VALUES`
43
- * gives: a story's `argTypes.options` spelled by hand drifts from the type, and
44
- * the direction it drifts is "documents less than the component accepts".
6
+ * The MUI half of the type scale: the theme augmentation and the reader that
7
+ * merges a host's overrides. The scale itself is in `./heading-scale`, which
8
+ * imports nothing, so `src/tokens/theme.ts` and the native renderer read it
9
+ * without dragging MUI's `Theme` into `dist/types-native`.
45
10
  */
46
- export const HEADING_LEVELS = [
47
- 'display',
48
- 'h1',
49
- 'h2',
50
- 'h3',
51
- 'h4',
52
- 'h5',
53
- 'h6',
54
- ] as const satisfies readonly HeadingLevel[];
55
-
56
- /** Everything one step of the scale decides. */
57
- export interface HeadingMetrics {
58
- fontSize: string;
59
- lineHeight: number;
60
- letterSpacing?: string;
61
- /**
62
- * The weight this step carries when the caller asks for `normal`. A heading's
63
- * "normal" is not body text's 400 — it is the weight the step is meant to
64
- * carry, which gets heavier as the step gets larger.
65
- */
66
- normalWeight: number;
67
- }
68
-
69
- /**
70
- * The house default, in CODE rather than in a component.
71
- *
72
- * ~1.15x per step from a 1rem `h6`, which keeps six distinguishable ranks inside
73
- * the range an application actually uses. The old table ran 1.125rem → 4rem and
74
- * spent its top three steps above anything a product screen wants.
75
- */
76
- export const HEADING_SCALE: Record<HeadingLevel, HeadingMetrics> = {
77
- // The hero size the old `h1` was really offering, under the name that says so.
78
- display: { fontSize: '3rem', lineHeight: 1.05, letterSpacing: '-0.03em', normalWeight: 800 },
79
- h1: { fontSize: '2rem', lineHeight: 1.2, letterSpacing: '-0.02em', normalWeight: 700 },
80
- h2: { fontSize: '1.75rem', lineHeight: 1.25, letterSpacing: '-0.015em', normalWeight: 700 },
81
- h3: { fontSize: '1.5rem', lineHeight: 1.3, letterSpacing: '-0.01em', normalWeight: 600 },
82
- h4: { fontSize: '1.25rem', lineHeight: 1.35, letterSpacing: '-0.005em', normalWeight: 600 },
83
- h5: { fontSize: '1.125rem', lineHeight: 1.4, normalWeight: 600 },
84
- h6: { fontSize: '1rem', lineHeight: 1.5, normalWeight: 600 },
85
- };
86
-
87
- /** A host's overrides: any subset of the steps, any subset of each step's metrics. */
88
- export type HeadingScaleOverrides = Partial<Record<HeadingLevel, Partial<HeadingMetrics>>>;
11
+ export * from './heading-scale';
89
12
 
90
13
  /**
91
14
  * The theme channel, under our OWN key rather than MUI's `typography.h1…h6`.
@@ -0,0 +1,189 @@
1
+ /**
2
+ * THE TWO VOCABULARIES EVERY COMPONENT SPEAKS.
3
+ *
4
+ * Before this file the package had both halves of every argument at once: 26
5
+ * components sized themselves `xs|sm|md|lg|xl` and four used MUI's
6
+ * `small|medium|large`; 14 coloured themselves `danger|neutral` and 15 used
7
+ * MUI's `error`. Nothing enforced either, because most of these props were
8
+ * spelled out as inline unions and a couple were plain `string`.
9
+ *
10
+ * That is not a tidiness problem. A caller learns the vocabulary from whichever
11
+ * component they used first, and the wrong half is not rejected — it reaches MUI
12
+ * as an unknown value and silently falls back. `Chip` shipped with `color?:
13
+ * string` and MUI's `small|medium`, so `color="danger"` rendered grey and
14
+ * `size="sm"` rendered medium; twelve live call sites were doing exactly that,
15
+ * and every test passed because they all asserted on text.
16
+ *
17
+ * So the vocabulary is declared once, here, and components derive from it.
18
+ *
19
+ * DERIVE, DON'T COPY — AND TAKE THE WHOLE VOCABULARY. Every size prop is
20
+ * `SizeValue` and every colour prop is `ColorValue`, with no `Extract` and no
21
+ * `Exclude`. Handing a component a slice was tried and undone: it is the same
22
+ * fragmentation wearing the canonical type's name, and it leaves a caller having
23
+ * to remember which components accept `xs` and which accept `info`. Where the
24
+ * underlying widget draws fewer steps than five, that is a rendering detail and
25
+ * belongs at the MUI boundary below — not in the prop's type.
26
+ *
27
+ * A component whose size or colour is not this concept at all keeps its own type
28
+ * — `Scrollbar`'s `thin|medium|thick` is a track width, `Sheet`'s `full` is a
29
+ * viewport fraction, `LazyImage`'s size is pixels. Forcing those into the scale
30
+ * would be consistency for its own sake.
31
+ */
32
+
33
+ /**
34
+ * The house size scale.
35
+ *
36
+ * Abbreviated, because that is what 26 of the 30 components with a real size
37
+ * already used and what every caller has been taught to write.
38
+ *
39
+ * Declared as the array and the type together so the two cannot disagree. The
40
+ * runtime list is what Storybook `argTypes.options` and the demo grids iterate;
41
+ * spelled by hand in each story it drifts, and it had — twelve colour lists
42
+ * omitted `info`, so the control that documents the vocabulary offered a
43
+ * component less than the component accepted.
44
+ */
45
+ /**
46
+ * The type scale is the THIRD vocabulary, and it lives in `./typography.ts`
47
+ * because it is metrics rather than a prop union. Re-exported here so
48
+ * `@12-apps/ui/tokens` stays the one import path for "what words does this
49
+ * package speak" — a second entry point is how a vocabulary gets missed.
50
+ */
51
+ export {
52
+ HEADING_LEVELS,
53
+ HEADING_SCALE,
54
+ type HeadingLevel,
55
+ type HeadingMetrics,
56
+ type HeadingScaleOverrides,
57
+ } from './heading-scale';
58
+
59
+ export type SizeValue = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
60
+
61
+ export const SIZE_VALUES = ['xs', 'sm', 'md', 'lg', 'xl'] as const satisfies readonly SizeValue[];
62
+
63
+ /**
64
+ * The house colour vocabulary.
65
+ *
66
+ * `danger` and `neutral` are OURS; the rest are MUI's own names already. That
67
+ * sentence started life in `Button.tsx`, which is the component most callers
68
+ * meet first and therefore the one that taught the vocabulary — so it is the one
69
+ * the rest of the package follows.
70
+ *
71
+ * Components that hand these to MUI translate at the boundary (`danger` →
72
+ * `error`, `neutral` → `default` or `inherit` depending on what the underlying
73
+ * component calls its unaccented state). The translation must be a real mapping
74
+ * and never a cast: a cast is precisely what let `danger` through untouched and
75
+ * had MUI fall back to grey.
76
+ *
77
+ * Array and type declared together, for the reason given on {@link SIZE_VALUES}.
78
+ */
79
+ export type ColorValue =
80
+ | 'primary'
81
+ | 'secondary'
82
+ | 'success'
83
+ | 'warning'
84
+ | 'info'
85
+ | 'danger'
86
+ | 'neutral';
87
+
88
+ export const COLOR_VALUES = [
89
+ 'primary',
90
+ 'secondary',
91
+ 'success',
92
+ 'warning',
93
+ 'info',
94
+ 'danger',
95
+ 'neutral',
96
+ ] as const satisfies readonly ColorValue[];
97
+
98
+ /* ── Array and union, pinned to each other ────────────────────────────────── */
99
+
100
+ /**
101
+ * The arrays above are written out rather than derived, because deriving the
102
+ * union from the array (`(typeof COLOR_VALUES)[number]`) costs the alias its
103
+ * name: TypeScript resolves the indexed access eagerly, and every error in the
104
+ * package stops saying `not assignable to type 'ColorValue'` and starts dumping
105
+ * seven string literals. In a package whose entire purpose is teaching this
106
+ * vocabulary, the name in the error message is worth keeping.
107
+ *
108
+ * Writing both means they could disagree, so both directions are checked here.
109
+ * `satisfies` above catches an entry that is not a member. These catch the other
110
+ * half — a member missing from the array — which `satisfies` cannot see and
111
+ * which is the direction that actually bit: twelve story control lists offered
112
+ * six colours for a vocabulary of seven, so `info` was undocumented everywhere.
113
+ *
114
+ * A gap makes the assignment below fail, and the error names the missing member.
115
+ */
116
+ type Missing<Union extends string, Listed extends string> = Exclude<Union, Listed>;
117
+
118
+ const _allSizesListed: Missing<SizeValue, (typeof SIZE_VALUES)[number]> extends never
119
+ ? true
120
+ : never = true;
121
+
122
+ const _allColorsListed: Missing<ColorValue, (typeof COLOR_VALUES)[number]> extends never
123
+ ? true
124
+ : never = true;
125
+
126
+ void _allSizesListed;
127
+ void _allColorsListed;
128
+
129
+ /* ── The MUI boundary ─────────────────────────────────────────────────────── */
130
+
131
+ /** What MUI calls a size. Three entries against our five. */
132
+ export type MuiSize = 'small' | 'medium' | 'large';
133
+
134
+ /**
135
+ * The house scale collapsed onto MUI's three.
136
+ *
137
+ * Five onto three loses information, and it loses it at the ends on purpose:
138
+ * `xs`/`sm` both draw small and `lg`/`xl` both draw large, because MUI has no
139
+ * fourth and fifth step to give them. A component that genuinely needs five
140
+ * distinct sizes styles them itself rather than routing through here — this is
141
+ * for the ones that just forward the prop.
142
+ */
143
+ export const muiSize = (size: SizeValue): MuiSize => {
144
+ if (size === 'xs' || size === 'sm') return 'small';
145
+ return size === 'md' ? 'medium' : 'large';
146
+ };
147
+
148
+ /** What MUI calls a semantic colour on most components. */
149
+ export type MuiColor = 'primary' | 'secondary' | 'success' | 'warning' | 'info' | 'error';
150
+
151
+ /**
152
+ * The house vocabulary translated for MUI, with the caller naming its neutral.
153
+ *
154
+ * `neutral` is the awkward one: MUI spells the unaccented state `default` on a
155
+ * chip, `inherit` on a button and an icon button, and `grey` in the palette. So
156
+ * the caller passes the word its own MUI component uses rather than this
157
+ * pretending there is one answer.
158
+ *
159
+ * A MAPPING, NEVER A CAST. The cast is what let `danger` reach MUI untouched and
160
+ * silently fall back to grey.
161
+ */
162
+ export function muiColor<N extends string>(color: ColorValue, neutralAs: N): MuiColor | N {
163
+ if (color === 'danger') return 'error';
164
+ return color === 'neutral' ? neutralAs : color;
165
+ }
166
+
167
+ /**
168
+ * The house vocabulary as a `theme.palette` key.
169
+ *
170
+ * Separate from {@link muiColor} because the palette has no `default` and no
171
+ * `inherit` — an unaccented colour there is `grey`.
172
+ */
173
+ export type PaletteKey = MuiColor | 'grey';
174
+
175
+ export const paletteKey = (color: ColorValue): PaletteKey =>
176
+ color === 'danger' ? 'error' : color === 'neutral' ? 'grey' : color;
177
+
178
+ /**
179
+ * A `ColorValue` resolved to a four-stop accent from the theme.
180
+ *
181
+ * `paletteKey` is not enough on its own for anything that reads `.main`: MUI's
182
+ * palette has no neutral `PaletteColor`, and `palette.grey` is a 50–900 ramp
183
+ * with no `main`, `light`, `dark` or `contrastText` on it at all. So `neutral`
184
+ * is resolved from the ramp here, once, instead of every component discovering
185
+ * the same hole and branching around it.
186
+ *
187
+ * Typed against the theme structurally so this file does not drag in MUI's
188
+ * `Theme` and become a dependency of everything that imports a token.
189
+ */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/tokens/typography.ts"],"sourcesContent":["import type { Theme } from '@mui/material/styles/index.js';\n\n/**\n * THE THIRD VOCABULARY: the type scale.\n *\n * `scales.ts` opens by saying the package had both halves of every argument at\n * once until the size and colour vocabularies were declared in one place and\n * every component derived from them. The type scale was the one that never got\n * that treatment — it lived as a private `LEVELS` table inside\n * `Heading.styles.ts`, which is exactly the shape that file exists to refuse.\n *\n * Two things follow from it being private, and the second is the expensive one.\n *\n * **It could not be re-themed.** `Heading` read `theme.typography.h1.fontFamily`\n * from the theme and then ignored the theme for every other metric, so a host\n * calling `createTheme({ typography: { h1: { fontSize: '2rem' } } })` changed\n * `<Typography variant=\"h1\">` and left `<Heading level=\"h1\">` at 48px. A design\n * system whose type scale cannot be set by the design is not a system.\n *\n * **And the numbers were a landing page's.** `h1` at 3rem and `h2` at 2.5rem are\n * hero metrics. Dropped into an operations console they put a 48px title\n * directly above 14px body copy — a 3.4x jump with nothing in between — so\n * product teams stopped reaching for the component. Measured in one consuming\n * repo: `<Heading>` appeared four times in the entire codebase while raw\n * `fontSize` appeared in dozens of files. The component was not disliked, it was\n * unusable at app scale, and every host paid for that in hand-rolled CSS.\n *\n * So the defaults below are an APP scale, and `display` keeps the hero size for\n * the screens that actually want one. A marketing page asks for `display`; a\n * console asks for `h1` and gets something it can put on a page.\n */\n\n/**\n * A step on the scale.\n *\n * `display` is a SIZE, not a rank — see `Heading`, which renders it as `h1` so\n * the document still gets exactly one level-one heading.\n */\nexport type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'display';\n\n/**\n * The runtime list, declared beside the union for the reason `SIZE_VALUES`\n * gives: a story's `argTypes.options` spelled by hand drifts from the type, and\n * the direction it drifts is \"documents less than the component accepts\".\n */\nexport const HEADING_LEVELS = [\n 'display',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n] as const satisfies readonly HeadingLevel[];\n\n/** Everything one step of the scale decides. */\nexport interface HeadingMetrics {\n fontSize: string;\n lineHeight: number;\n letterSpacing?: string;\n /**\n * The weight this step carries when the caller asks for `normal`. A heading's\n * \"normal\" is not body text's 400 — it is the weight the step is meant to\n * carry, which gets heavier as the step gets larger.\n */\n normalWeight: number;\n}\n\n/**\n * The house default, in CODE rather than in a component.\n *\n * ~1.15x per step from a 1rem `h6`, which keeps six distinguishable ranks inside\n * the range an application actually uses. The old table ran 1.125rem → 4rem and\n * spent its top three steps above anything a product screen wants.\n */\nexport const HEADING_SCALE: Record<HeadingLevel, HeadingMetrics> = {\n // The hero size the old `h1` was really offering, under the name that says so.\n display: { fontSize: '3rem', lineHeight: 1.05, letterSpacing: '-0.03em', normalWeight: 800 },\n h1: { fontSize: '2rem', lineHeight: 1.2, letterSpacing: '-0.02em', normalWeight: 700 },\n h2: { fontSize: '1.75rem', lineHeight: 1.25, letterSpacing: '-0.015em', normalWeight: 700 },\n h3: { fontSize: '1.5rem', lineHeight: 1.3, letterSpacing: '-0.01em', normalWeight: 600 },\n h4: { fontSize: '1.25rem', lineHeight: 1.35, letterSpacing: '-0.005em', normalWeight: 600 },\n h5: { fontSize: '1.125rem', lineHeight: 1.4, normalWeight: 600 },\n h6: { fontSize: '1rem', lineHeight: 1.5, normalWeight: 600 },\n};\n\n/** A host's overrides: any subset of the steps, any subset of each step's metrics. */\nexport type HeadingScaleOverrides = Partial<Record<HeadingLevel, Partial<HeadingMetrics>>>;\n\n/**\n * The theme channel, under our OWN key rather than MUI's `typography.h1…h6`.\n *\n * Those are spoken for: MUI ships its own values there (`h1` is 6rem) and\n * `<Typography variant=\"h1\">` renders them. Reading them here would hand an\n * un-themed host a 96px `h1` — worse than the number this change exists to fix —\n * and would make `Heading` and `Typography` impossible to size apart. A separate\n * key means a host that sets nothing gets {@link HEADING_SCALE}, and a host that\n * sets something gets exactly what it asked for.\n */\ndeclare module '@mui/material/styles' {\n interface TypographyVariants {\n headingScale?: HeadingScaleOverrides;\n }\n interface TypographyVariantsOptions {\n headingScale?: HeadingScaleOverrides;\n }\n}\n\n/**\n * One step of the scale, with the host's theme layered over the default.\n *\n * Merged PER METRIC, so a host that only wants a different `fontSize` keeps the\n * line height and letter spacing the step was designed with instead of having to\n * restate them — restating is how a partial override silently loses the tracking\n * that made the size readable.\n */\nexport function headingMetrics(theme: Theme, level: HeadingLevel): HeadingMetrics {\n return { ...HEADING_SCALE[level], ...theme.typography.headingScale?.[level] };\n}\n"],"mappings":";AA6CO,IAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAsBO,IAAM,gBAAsD;AAAA;AAAA,EAEjE,SAAS,EAAE,UAAU,QAAQ,YAAY,MAAM,eAAe,WAAW,cAAc,IAAI;AAAA,EAC3F,IAAI,EAAE,UAAU,QAAQ,YAAY,KAAK,eAAe,WAAW,cAAc,IAAI;AAAA,EACrF,IAAI,EAAE,UAAU,WAAW,YAAY,MAAM,eAAe,YAAY,cAAc,IAAI;AAAA,EAC1F,IAAI,EAAE,UAAU,UAAU,YAAY,KAAK,eAAe,WAAW,cAAc,IAAI;AAAA,EACvF,IAAI,EAAE,UAAU,WAAW,YAAY,MAAM,eAAe,YAAY,cAAc,IAAI;AAAA,EAC1F,IAAI,EAAE,UAAU,YAAY,YAAY,KAAK,cAAc,IAAI;AAAA,EAC/D,IAAI,EAAE,UAAU,QAAQ,YAAY,KAAK,cAAc,IAAI;AAC7D;AAgCO,SAAS,eAAe,OAAc,OAAqC;AAChF,SAAO,EAAE,GAAG,cAAc,KAAK,GAAG,GAAG,MAAM,WAAW,eAAe,KAAK,EAAE;AAC9E;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/Button/Button.helpers.ts"],"sourcesContent":["import type { ButtonProps } from './Button.types';\n\ntype ButtonDefaultedKeys =\n | 'variant'\n | 'color'\n | 'size'\n | 'loading'\n | 'iconPosition'\n | 'glow'\n | 'pulse'\n | 'ripple'\n | 'active';\n\ntype ResolvedButtonProps = ButtonProps & Required<Pick<ButtonProps, ButtonDefaultedKeys>>;\n\nconst BUTTON_DEFAULTS: Pick<ButtonProps, ButtonDefaultedKeys> = {\n variant: 'solid',\n color: 'primary',\n size: 'md',\n loading: false,\n iconPosition: 'left',\n glow: false,\n pulse: false,\n ripple: true,\n active: false,\n};\n\n// Strips explicitly-undefined props before the merge, so `size={undefined}` still\n// falls back to the default exactly as a destructuring default would.\nconst definedProps = (props: ButtonProps): Partial<ButtonProps> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<ButtonProps>;\n\nexport const resolveButtonProps = (props: ButtonProps): ResolvedButtonProps =>\n ({ ...BUTTON_DEFAULTS, ...definedProps(props) }) as ResolvedButtonProps;\n"],"mappings":";AAeA,IAAM,kBAA0D;AAAA,EAC9D,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,cAAc;AAAA,EACd,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;AAIA,IAAM,eAAe,CAAC,UACpB,OAAO;AAAA,EACL,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,MAAM,UAAU,MAAS;AACjE;AAEK,IAAM,qBAAqB,CAAC,WAChC,EAAE,GAAG,iBAAiB,GAAG,aAAa,KAAK,EAAE;","names":[]}