@12-apps/ui 6.31.0 → 6.32.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 (864) hide show
  1. package/components-guidelines.md +31 -0
  2. package/dist/_internal/components/data-display/Alert/Alert.js +5 -4
  3. package/dist/_internal/components/data-display/Alert/Alert.metrics.js +3 -2
  4. package/dist/_internal/components/data-display/Alert/Alert.styles.js +4 -3
  5. package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +3 -3
  6. package/dist/_internal/components/data-display/Avatar/Avatar.js +6 -5
  7. package/dist/_internal/components/data-display/Avatar/Avatar.view.js +5 -4
  8. package/dist/_internal/components/data-display/Badge/Badge.animations.js +3 -2
  9. package/dist/_internal/components/data-display/Badge/Badge.js +6 -5
  10. package/dist/_internal/components/data-display/Badge/Badge.metrics.js +3 -2
  11. package/dist/_internal/components/data-display/Badge/Badge.styles.js +4 -3
  12. package/dist/_internal/components/data-display/Badge/Badge.variants.js +3 -2
  13. package/dist/_internal/components/data-display/Badge/BadgeContent.js +5 -4
  14. package/dist/_internal/components/data-display/Banner/Banner.js +3 -2
  15. package/dist/_internal/components/data-display/Banner/Banner.styles.js +3 -2
  16. package/dist/_internal/components/data-display/CardKit/CardKebab.js +9 -5
  17. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +6 -5
  18. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +16 -12
  19. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +13 -9
  20. package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +9 -5
  21. package/dist/_internal/components/data-display/Carousel/Carousel.js +13 -9
  22. package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +8 -4
  23. package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +8 -4
  24. package/dist/_internal/components/data-display/Chart/Chart.js +12 -8
  25. package/dist/_internal/components/data-display/Chart/SpecChart.js +15 -11
  26. package/dist/_internal/components/data-display/Chart/chart-context.js +9 -5
  27. package/dist/_internal/components/data-display/Chart/chart-internals.js +8 -4
  28. package/dist/_internal/components/data-display/Chart/chart-renderers.js +11 -7
  29. package/dist/_internal/components/data-display/Chart/chart-spec.js +2 -2
  30. package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
  31. package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +6 -5
  32. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +72 -70
  33. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +95 -93
  34. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +13 -9
  35. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +17 -13
  36. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +21 -19
  37. package/dist/_internal/components/data-display/DataViews/base-card.js +8 -7
  38. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +11 -10
  39. package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +5 -4
  40. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +10 -9
  41. package/dist/_internal/components/data-display/DataViews/base-list-card.js +16 -15
  42. package/dist/_internal/components/data-display/DataViews/card-surface.js +3 -2
  43. package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +6 -1
  44. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +22 -20
  45. package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +6 -5
  46. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +10 -6
  47. package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +6 -1
  48. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +16 -12
  49. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +8 -7
  50. package/dist/_internal/components/data-display/DataViews/data-views-empty.js +11 -7
  51. package/dist/_internal/components/data-display/DataViews/data-views-export.js +11 -7
  52. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +31 -29
  53. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +20 -16
  54. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +9 -5
  55. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +68 -66
  56. package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +6 -5
  57. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +38 -36
  58. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
  59. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +21 -17
  60. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +24 -20
  61. package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +6 -1
  62. package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +11 -4
  63. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +10 -5
  64. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +3 -3
  65. package/dist/_internal/components/data-display/DataViews/data-views-search.js +6 -1
  66. package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +11 -7
  67. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +27 -23
  68. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +36 -34
  69. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +26 -22
  70. package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +11 -7
  71. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
  72. package/dist/_internal/components/data-display/DataViews/save-view-preview.js +6 -5
  73. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +13 -9
  74. package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +3 -3
  75. package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +6 -5
  76. package/dist/_internal/components/data-display/EmptyState/EmptyState.js +2 -2
  77. package/dist/_internal/components/data-display/FleetMap/FleetBody.js +17 -12
  78. package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +16 -11
  79. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +23 -19
  80. package/dist/_internal/components/data-display/InteractiveTooltip/InteractiveTooltip.js +2 -2
  81. package/dist/_internal/components/data-display/Lightbox/Lightbox.js +6 -6
  82. package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
  83. package/dist/_internal/components/data-display/MapPreview/MapLayers.js +7 -2
  84. package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
  85. package/dist/_internal/components/data-display/MapPreview/MapPreview.js +15 -10
  86. package/dist/_internal/components/data-display/MapPreview/MapSearchBar.js +6 -1
  87. package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
  88. package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
  89. package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
  90. package/dist/_internal/components/data-display/Progress/Progress.js +6 -5
  91. package/dist/_internal/components/data-display/Progress/Progress.metrics.js +4 -3
  92. package/dist/_internal/components/data-display/Progress/Progress.styles.js +5 -4
  93. package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +3 -3
  94. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +7 -3
  95. package/dist/_internal/components/data-display/Sheet/Sheet.js +9 -5
  96. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +8 -4
  97. package/dist/_internal/components/data-display/Table/Table.js +3 -3
  98. package/dist/_internal/components/data-display/index.js +78 -74
  99. package/dist/_internal/components/feedback/ConfirmAction/ConfirmAction.js +2 -2
  100. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +11 -7
  101. package/dist/_internal/components/feedback/ConfirmAction/with-confirmation.js +2 -2
  102. package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
  103. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +12 -8
  104. package/dist/_internal/components/feedback/StackedModal/StackedModal.js +2 -2
  105. package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
  106. package/dist/_internal/components/feedback/index.js +24 -20
  107. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +9 -7
  108. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +7 -5
  109. package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +6 -4
  110. package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +6 -4
  111. package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +5 -3
  112. package/dist/_internal/components/form/Autocomplete/Autocomplete.js +7 -2
  113. package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +6 -1
  114. package/dist/_internal/components/form/Button/Button.js +8 -4
  115. package/dist/_internal/components/form/Button/Button.styles.js +8 -3
  116. package/dist/_internal/components/form/Calendar/Calendar.js +4 -4
  117. package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
  118. package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
  119. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +11 -9
  120. package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +6 -4
  121. package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +6 -4
  122. package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +7 -5
  123. package/dist/_internal/components/form/CategorySelect/CategoryRows.js +6 -4
  124. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +14 -12
  125. package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +5 -3
  126. package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +6 -4
  127. package/dist/_internal/components/form/CepField/CepField.js +9 -7
  128. package/dist/_internal/components/form/Checkbox/Checkbox.js +4 -3
  129. package/dist/_internal/components/form/CodeEditor/CodeEditor.js +4 -4
  130. package/dist/_internal/components/form/Command/Command.js +9 -5
  131. package/dist/_internal/components/form/Command/Command.styles.js +8 -4
  132. package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +5 -3
  133. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +8 -3
  134. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +15 -10
  135. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +7 -2
  136. package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +8 -3
  137. package/dist/_internal/components/form/Input/Input.js +8 -6
  138. package/dist/_internal/components/form/Input/Input.metrics.js +3 -2
  139. package/dist/_internal/components/form/Input/Input.styles.js +7 -5
  140. package/dist/_internal/components/form/InputOTP/InputOTP.js +7 -5
  141. package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +5 -3
  142. package/dist/_internal/components/form/Label/Label.js +9 -5
  143. package/dist/_internal/components/form/Label/Label.styles.js +8 -4
  144. package/dist/_internal/components/form/Menubar/Menubar.item.js +9 -5
  145. package/dist/_internal/components/form/Menubar/Menubar.js +12 -8
  146. package/dist/_internal/components/form/Menubar/Menubar.styles.js +8 -4
  147. package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +10 -6
  148. package/dist/_internal/components/form/PhoneInput/PhoneInput.js +5 -3
  149. package/dist/_internal/components/form/RadioGroup/RadioGroup.js +8 -6
  150. package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +5 -3
  151. package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +6 -4
  152. package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +3 -3
  153. package/dist/_internal/components/form/Select/Select.js +7 -5
  154. package/dist/_internal/components/form/Select/Select.metrics.js +3 -2
  155. package/dist/_internal/components/form/Switch/Switch.js +7 -6
  156. package/dist/_internal/components/form/Switch/Switch.parts.js +5 -4
  157. package/dist/_internal/components/form/Switch/Switch.styles.js +4 -3
  158. package/dist/_internal/components/form/Textarea/Textarea.js +5 -3
  159. package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +13 -6
  160. package/dist/_internal/components/form/Textarea/TextareaRichEditor.js.map +1 -1
  161. package/dist/_internal/components/form/Toggle/Toggle.js +6 -4
  162. package/dist/_internal/components/form/Toggle/Toggle.styles.js +5 -3
  163. package/dist/_internal/components/form/ToggleGroup/ToggleGroup.js +6 -1
  164. package/dist/_internal/components/form/index.js +58 -56
  165. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +15 -13
  166. package/dist/_internal/components/form/total-form/Fields/CepField.js +10 -8
  167. package/dist/_internal/components/form/total-form/Fields/SelectField.js +8 -6
  168. package/dist/_internal/components/form/total-form/Fields/TextField.js +9 -7
  169. package/dist/_internal/components/form/total-form/Fields/ToggleField.js +7 -2
  170. package/dist/_internal/components/form/total-form/Fields/index.js +29 -27
  171. package/dist/_internal/components/form/total-form/SubmitButton.js +9 -5
  172. package/dist/_internal/components/index.js +177 -175
  173. package/dist/_internal/components/layout/Box/Box.js +10 -6
  174. package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +6 -1
  175. package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +6 -1
  176. package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +7 -2
  177. package/dist/_internal/components/layout/ContentToolbar/MultiSelectTriggers.js +6 -1
  178. package/dist/_internal/components/layout/ContentToolbar/SavedViewsMenu.js +8 -1
  179. package/dist/_internal/components/layout/ContentToolbar/SortByDropdown.js +6 -1
  180. package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +6 -1
  181. package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +3 -3
  182. package/dist/_internal/components/layout/Stack/Stack.js +11 -7
  183. package/dist/_internal/components/layout/TableFilter/TableFilter.js +6 -1
  184. package/dist/_internal/components/layout/index.js +22 -17
  185. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +14 -10
  186. package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +8 -4
  187. package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +2 -2
  188. package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
  189. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
  190. package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
  191. package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
  192. package/dist/_internal/components/navigation/Pagination/Pagination.js +10 -3
  193. package/dist/_internal/components/navigation/Pagination/PaginationParts.js +8 -1
  194. package/dist/_internal/components/navigation/index.js +25 -21
  195. package/dist/_internal/components/typography/Heading/Heading.js +6 -5
  196. package/dist/_internal/components/typography/Heading/Heading.metrics.js +4 -3
  197. package/dist/_internal/components/typography/Heading/Heading.styles.js +5 -4
  198. package/dist/_internal/components/typography/Paragraph/Paragraph.js +4 -3
  199. package/dist/_internal/components/typography/Text/Text.js +5 -4
  200. package/dist/_internal/components/typography/Text/Text.metrics.js +4 -3
  201. package/dist/_internal/components/typography/index.js +9 -8
  202. package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.js +2 -2
  203. package/dist/_internal/components/utility/index.js +2 -2
  204. package/dist/_internal/icons/Icon.js +10 -6
  205. package/dist/_internal/provider/UiProvider.js +9 -5
  206. package/dist/_internal/provider/mui-bridge.js +8 -4
  207. package/dist/_internal/provider/use-ui-theme.js +9 -5
  208. package/dist/_internal/social-login-button/social-login-button.js +14 -10
  209. package/dist/_internal/tokens/field-height.core.js +20 -0
  210. package/dist/_internal/tokens/field-height.core.js.map +1 -0
  211. package/dist/_internal/tokens/field-height.js +37 -0
  212. package/dist/_internal/tokens/field-height.js.map +1 -0
  213. package/dist/_internal/tokens/theme.js +3 -2
  214. package/dist/_internal/user-avatar/user-avatar.js +14 -10
  215. package/dist/charts.js +24 -20
  216. package/dist/{chunk-JUHPNTDA.js → chunk-2DJIS2WQ.js} +13 -6
  217. package/dist/chunk-2DJIS2WQ.js.map +1 -0
  218. package/dist/{chunk-JHOBW7OD.js → chunk-2F4YEGYG.js} +4 -4
  219. package/dist/chunk-2F4YEGYG.js.map +1 -0
  220. package/dist/{chunk-GOKMLXZH.js → chunk-2SKNSQCP.js} +2 -2
  221. package/dist/{chunk-YRUCIKPO.js → chunk-2UYR2OOE.js} +4 -4
  222. package/dist/{chunk-RMB4RTTM.js → chunk-2W4GTZDP.js} +10 -10
  223. package/dist/{chunk-JVMNE5G4.js → chunk-2X5OQDPH.js} +5 -1
  224. package/dist/chunk-2X5OQDPH.js.map +1 -0
  225. package/dist/{chunk-IASDP44E.js → chunk-3AOOI2NR.js} +6 -6
  226. package/dist/{chunk-BRUJC7OG.js → chunk-3CN2GBIK.js} +3 -3
  227. package/dist/{chunk-F73D4EMA.js → chunk-3DO5MFXA.js} +1 -1
  228. package/dist/chunk-3DO5MFXA.js.map +1 -0
  229. package/dist/{chunk-L6UTYFAB.js → chunk-3E3JYKUK.js} +12 -3
  230. package/dist/chunk-3E3JYKUK.js.map +1 -0
  231. package/dist/{chunk-WCLWFN3F.js → chunk-3NA7AO6H.js} +7 -7
  232. package/dist/{chunk-URK67BAE.js → chunk-3SJZP7KH.js} +5 -5
  233. package/dist/{chunk-67L5CMXP.js → chunk-3Z23QTCP.js} +8 -8
  234. package/dist/{chunk-4ETQRBZC.js → chunk-46UPILLK.js} +4 -4
  235. package/dist/{chunk-SSJHEV5Z.js → chunk-4BEQADWC.js} +2 -2
  236. package/dist/{chunk-DBXGRZBJ.js → chunk-4D7YIU34.js} +7 -7
  237. package/dist/{chunk-32MTYYGC.js → chunk-4PIKOJZ4.js} +2 -2
  238. package/dist/{chunk-SAIKHWH7.js → chunk-56S7A2XT.js} +9 -9
  239. package/dist/{chunk-UHWHTNUS.js → chunk-5BW7NCM5.js} +4 -4
  240. package/dist/{chunk-LG6DHNRD.js → chunk-5FA5S2YN.js} +2 -2
  241. package/dist/{chunk-H35CQ6DF.js → chunk-5KZR3RXL.js} +3 -3
  242. package/dist/{chunk-MRGPVPQC.js → chunk-5NH24MF5.js} +8 -8
  243. package/dist/{chunk-IQFUV3BA.js → chunk-5RHMLOIA.js} +2 -2
  244. package/dist/{chunk-DORPR2YP.js → chunk-5SBJO37T.js} +2 -2
  245. package/dist/{chunk-3ZGQSWHJ.js → chunk-5U4SJ2DA.js} +5 -5
  246. package/dist/{chunk-XMDH3MRV.js → chunk-5UWSDTZV.js} +12 -6
  247. package/dist/chunk-5UWSDTZV.js.map +1 -0
  248. package/dist/{chunk-QKDFD4VT.js → chunk-62NFZR52.js} +4 -4
  249. package/dist/{chunk-3PT3SBJ7.js → chunk-65JHGT5F.js} +2 -2
  250. package/dist/{chunk-H7ZN2GW7.js → chunk-67N6TH6E.js} +2 -2
  251. package/dist/{chunk-Q5BSNHN7.js → chunk-6M33XQLZ.js} +2 -2
  252. package/dist/{chunk-IPS55KWK.js → chunk-6M7CMILP.js} +2 -2
  253. package/dist/{chunk-X2R7QG5I.js → chunk-6MDBMCFK.js} +2 -2
  254. package/dist/{chunk-PCONTSJJ.js → chunk-6V7D6GRX.js} +11 -11
  255. package/dist/{chunk-DTKMBI7B.js → chunk-6YLAVHV4.js} +4 -4
  256. package/dist/{chunk-MCAXIKQD.js → chunk-6ZZNV2PA.js} +4 -4
  257. package/dist/{chunk-BWSYSSF3.js → chunk-7A3G4W52.js} +3 -3
  258. package/dist/{chunk-RXSGHPCR.js → chunk-7FOOLP5H.js} +4 -4
  259. package/dist/{chunk-NJ6D37KV.js → chunk-7FWXG2KF.js} +2 -2
  260. package/dist/{chunk-XPPEUGHG.js → chunk-7MM2I34E.js} +5 -5
  261. package/dist/{chunk-F22WT7UX.js → chunk-7NFRTAEU.js} +2 -2
  262. package/dist/{chunk-OIFBBDYX.js → chunk-7TSQNYQO.js} +2 -2
  263. package/dist/{chunk-OFMDFN3U.js → chunk-A2QZXV2K.js} +2 -2
  264. package/dist/{chunk-J2RRZZXC.js → chunk-APT5L7V5.js} +2 -2
  265. package/dist/{chunk-ZVTJGWIV.js → chunk-AYRHW4DX.js} +2 -2
  266. package/dist/{chunk-Y2CSBXQT.js → chunk-AZ2KKHID.js} +2 -2
  267. package/dist/{chunk-NLUZGT4U.js → chunk-AZ4LLAAJ.js} +3 -3
  268. package/dist/{chunk-HJOABXKN.js → chunk-AZUFGKMQ.js} +4 -4
  269. package/dist/{chunk-IAVAZ36T.js → chunk-B4BU5CS6.js} +4 -4
  270. package/dist/{chunk-IRSI3BFF.js → chunk-B64PPHUR.js} +9 -1
  271. package/dist/chunk-B64PPHUR.js.map +1 -0
  272. package/dist/{chunk-USPQZQBF.js → chunk-BIIAMH47.js} +7 -4
  273. package/dist/chunk-BIIAMH47.js.map +1 -0
  274. package/dist/{chunk-APMEXS3Y.js → chunk-BM4LH7VQ.js} +5 -5
  275. package/dist/{chunk-JOPTI47I.js → chunk-BM4ZPBBT.js} +3 -3
  276. package/dist/{chunk-VGSEI7PQ.js → chunk-BTIBFR5L.js} +2 -2
  277. package/dist/{chunk-6SXZ7CF2.js → chunk-BTVIHTAL.js} +5 -2
  278. package/dist/chunk-BTVIHTAL.js.map +1 -0
  279. package/dist/{chunk-C2ZNAQMO.js → chunk-BUXSHLQM.js} +5 -5
  280. package/dist/{chunk-CIVLXOLG.js → chunk-C5WSPGMP.js} +2 -2
  281. package/dist/{chunk-SGV7QGYQ.js → chunk-C6R4LVUX.js} +7 -7
  282. package/dist/{chunk-DV42HAVP.js → chunk-CDNJOA3N.js} +21 -6
  283. package/dist/chunk-CDNJOA3N.js.map +1 -0
  284. package/dist/chunk-CGO452DC.js +90 -0
  285. package/dist/chunk-CGO452DC.js.map +1 -0
  286. package/dist/{chunk-6SNRPCSK.js → chunk-CR4KC2K5.js} +2 -2
  287. package/dist/{chunk-4WT4PV4M.js → chunk-CZ5ZL63A.js} +2 -2
  288. package/dist/{chunk-BPYPUEM5.js → chunk-CZJLWCEG.js} +2 -2
  289. package/dist/{chunk-YANLN6HP.js → chunk-D6HDJVQW.js} +5 -5
  290. package/dist/{chunk-6PSAPCTE.js → chunk-DAQ2ZDU2.js} +2 -2
  291. package/dist/{chunk-PEMZ2ABQ.js → chunk-DDTPMZOB.js} +5 -5
  292. package/dist/{chunk-XEUSTU7K.js → chunk-DIWC6AQL.js} +6 -6
  293. package/dist/{chunk-LWAOL4BG.js → chunk-DO3UNZAU.js} +2 -2
  294. package/dist/{chunk-D5YGDCMP.js → chunk-DZXN3QCX.js} +19 -19
  295. package/dist/{chunk-GUROYOKQ.js → chunk-EAE5Z5HL.js} +2 -2
  296. package/dist/{chunk-EYRSUVBC.js → chunk-ECZXTIDR.js} +2 -2
  297. package/dist/{chunk-3P4THDBM.js → chunk-EIGELK2H.js} +4 -4
  298. package/dist/{chunk-RRDL7AGQ.js → chunk-EKSSKQUW.js} +6 -2
  299. package/dist/chunk-EKSSKQUW.js.map +1 -0
  300. package/dist/{chunk-26ORCF6J.js → chunk-ENUWZ3HW.js} +2 -2
  301. package/dist/{chunk-DWZ7FLA7.js → chunk-FATRMNVN.js} +5 -5
  302. package/dist/{chunk-MSKEFXXV.js → chunk-FYFIND6O.js} +13 -5
  303. package/dist/chunk-FYFIND6O.js.map +1 -0
  304. package/dist/{chunk-SHQWIDD5.js → chunk-GJQYM3PM.js} +4 -4
  305. package/dist/{chunk-DX36KZUV.js → chunk-GSWDQ3ZX.js} +4 -4
  306. package/dist/{chunk-VNEEXUWA.js → chunk-GT7C6TSM.js} +3 -3
  307. package/dist/{chunk-OHKEQ7QJ.js → chunk-GXEB6MJA.js} +2 -2
  308. package/dist/{chunk-CPA2YRVZ.js → chunk-H3TNIGMI.js} +2 -2
  309. package/dist/{chunk-5EQFAFR3.js → chunk-H4NWU2ZN.js} +2 -2
  310. package/dist/{chunk-QNUWSXF2.js → chunk-H57ZS6W2.js} +3 -3
  311. package/dist/{chunk-RDFPH47Y.js → chunk-HEVST4CS.js} +10 -6
  312. package/dist/chunk-HEVST4CS.js.map +1 -0
  313. package/dist/{chunk-7YTLJUBX.js → chunk-HQZRWOSS.js} +2 -2
  314. package/dist/{chunk-25R3ITGZ.js → chunk-HTZYFGYE.js} +5 -5
  315. package/dist/{chunk-BKP7YW3Y.js → chunk-HZXCTLNI.js} +2 -2
  316. package/dist/{chunk-EFEZWG4C.js → chunk-IBWVEARQ.js} +9 -2
  317. package/dist/chunk-IBWVEARQ.js.map +1 -0
  318. package/dist/{chunk-SZZLABMO.js → chunk-IDO4EV7T.js} +3 -3
  319. package/dist/{chunk-ETU4LNU7.js → chunk-IGAXQRRZ.js} +3 -3
  320. package/dist/{chunk-ORIFMVN4.js → chunk-IM76SSXI.js} +3 -3
  321. package/dist/{chunk-EATFKTO3.js → chunk-IOEF32HX.js} +3 -3
  322. package/dist/{chunk-NR2HXHBR.js → chunk-IYSQRTIX.js} +2 -2
  323. package/dist/{chunk-YXQ2NJHF.js → chunk-JAYWTSXX.js} +6 -6
  324. package/dist/{chunk-RRO2EOJB.js → chunk-JB67KPGM.js} +4 -4
  325. package/dist/{chunk-RIA34EUT.js → chunk-JDY37EML.js} +3 -3
  326. package/dist/{chunk-SMUZRLFZ.js → chunk-JGOXXKPY.js} +2 -2
  327. package/dist/{chunk-VYMULXCJ.js → chunk-JLWAYBOP.js} +5 -2
  328. package/dist/chunk-JLWAYBOP.js.map +1 -0
  329. package/dist/{chunk-DHQ6ASUD.js → chunk-JPNPXNFH.js} +4 -4
  330. package/dist/{chunk-XVM4ZIRE.js → chunk-JPXG7IFW.js} +6 -4
  331. package/dist/chunk-JPXG7IFW.js.map +1 -0
  332. package/dist/{chunk-4DUHJIR2.js → chunk-JYETSTOQ.js} +2 -2
  333. package/dist/{chunk-FC74EAW4.js → chunk-JZJOAGBG.js} +4 -4
  334. package/dist/{chunk-CEA4QA63.js → chunk-KAPKMVKR.js} +2 -3
  335. package/dist/{chunk-CEA4QA63.js.map → chunk-KAPKMVKR.js.map} +1 -1
  336. package/dist/{chunk-R7KR5FYJ.js → chunk-KCFCEWF7.js} +2 -2
  337. package/dist/{chunk-HFBME3C5.js → chunk-KG4VNCNO.js} +4 -4
  338. package/dist/{chunk-V3RVRZAU.js → chunk-KMUSTQA6.js} +2 -2
  339. package/dist/{chunk-HSVNFMXY.js → chunk-LB2G6SD6.js} +8 -8
  340. package/dist/{chunk-ETSKBOXN.js → chunk-LGLHU55A.js} +7 -5
  341. package/dist/chunk-LGLHU55A.js.map +1 -0
  342. package/dist/{chunk-RWIBPIPD.js → chunk-LNOYDMFD.js} +6 -6
  343. package/dist/{chunk-SFAP5EH5.js → chunk-LUMF63BM.js} +4 -4
  344. package/dist/{chunk-WVJI3Z4P.js → chunk-LWLVWM34.js} +2 -2
  345. package/dist/{chunk-RFZU5BTG.js → chunk-LYSSO6WC.js} +4 -4
  346. package/dist/{chunk-GLPHRHIT.js → chunk-M7HX3HKW.js} +2 -2
  347. package/dist/{chunk-EJJRJYB5.js → chunk-MG73KW54.js} +6 -6
  348. package/dist/{chunk-QP3KK4KO.js → chunk-MGP5LLEK.js} +10 -10
  349. package/dist/{chunk-BDVJ65GR.js → chunk-MMPJ2MCE.js} +6 -3
  350. package/dist/chunk-MMPJ2MCE.js.map +1 -0
  351. package/dist/{chunk-4EL5ZSZ3.js → chunk-MQZDTGGJ.js} +8 -5
  352. package/dist/chunk-MQZDTGGJ.js.map +1 -0
  353. package/dist/{chunk-ATBT4RJZ.js → chunk-MSXNA3UH.js} +2 -2
  354. package/dist/{chunk-BB2IVF76.js → chunk-MVXFMIVZ.js} +7 -4
  355. package/dist/chunk-MVXFMIVZ.js.map +1 -0
  356. package/dist/{chunk-G5G4Q7G6.js → chunk-MYYGXSXF.js} +9 -6
  357. package/dist/chunk-MYYGXSXF.js.map +1 -0
  358. package/dist/{chunk-MYUZPUXQ.js → chunk-N74IYYRU.js} +3 -3
  359. package/dist/{chunk-5YOFMMK3.js → chunk-NBBFFPTA.js} +2 -2
  360. package/dist/{chunk-272OV2KZ.js → chunk-NFGVP3HN.js} +15 -9
  361. package/dist/chunk-NFGVP3HN.js.map +1 -0
  362. package/dist/{chunk-NFJUBPIN.js → chunk-NFLY5JMP.js} +2 -2
  363. package/dist/{chunk-3BAFJMBH.js → chunk-NKIAP6ZL.js} +4 -4
  364. package/dist/{chunk-G3WUOPWE.js → chunk-NLBIG5LU.js} +2 -2
  365. package/dist/{chunk-65IHPI4S.js → chunk-NMX3JAAB.js} +5 -4
  366. package/dist/chunk-NMX3JAAB.js.map +1 -0
  367. package/dist/{chunk-CATLG2RT.js → chunk-NU3EQX2L.js} +3 -3
  368. package/dist/{chunk-55E7GLVT.js → chunk-O4C5LUTJ.js} +6 -6
  369. package/dist/{chunk-WONCE5GB.js → chunk-OGPOTZAU.js} +18 -10
  370. package/dist/chunk-OGPOTZAU.js.map +1 -0
  371. package/dist/{chunk-INH2BDHV.js → chunk-OOGKAFBU.js} +7 -7
  372. package/dist/{chunk-HZAPN7XD.js → chunk-OZAP2BEP.js} +5 -2
  373. package/dist/chunk-OZAP2BEP.js.map +1 -0
  374. package/dist/{chunk-2YOQLBEX.js → chunk-OZZNC4YU.js} +3 -3
  375. package/dist/{chunk-Q544QEIN.js → chunk-P3L42CBB.js} +15 -9
  376. package/dist/chunk-P3L42CBB.js.map +1 -0
  377. package/dist/{chunk-BRAF4MFO.js → chunk-PE4ZW3IA.js} +9 -5
  378. package/dist/chunk-PE4ZW3IA.js.map +1 -0
  379. package/dist/{chunk-35GWNOLB.js → chunk-PH5XJGKJ.js} +2 -2
  380. package/dist/{chunk-AGYGNNOM.js → chunk-PQECNGDE.js} +2 -2
  381. package/dist/{chunk-IPE5FFFD.js → chunk-PUBPZOQJ.js} +2 -2
  382. package/dist/{chunk-7DNQHMDO.js → chunk-PXH24VIP.js} +4 -4
  383. package/dist/chunk-PZBK3F52.js +31 -0
  384. package/dist/chunk-PZBK3F52.js.map +1 -0
  385. package/dist/{chunk-7U36V4CU.js → chunk-Q2GZMDZL.js} +4 -4
  386. package/dist/{chunk-4LDRYLE2.js → chunk-QNHNFU7G.js} +5 -5
  387. package/dist/{chunk-EN5Q5RPQ.js → chunk-QRUCR4YZ.js} +17 -5
  388. package/dist/chunk-QRUCR4YZ.js.map +1 -0
  389. package/dist/{chunk-WBKWIFXA.js → chunk-QYNCPS5W.js} +6 -6
  390. package/dist/{chunk-C4NRFERD.js → chunk-R2I3LUUH.js} +2 -2
  391. package/dist/{chunk-RCI6KVN6.js → chunk-R67J6JKT.js} +5 -5
  392. package/dist/{chunk-GOWBYHYW.js → chunk-R6SBP5M5.js} +4 -4
  393. package/dist/{chunk-GKGA2ZCW.js → chunk-RAWQMBX6.js} +2 -2
  394. package/dist/{chunk-6BGS5FND.js → chunk-RGKGBYT2.js} +3 -3
  395. package/dist/{chunk-A5FIYKAN.js → chunk-RGMSTQ2J.js} +2 -2
  396. package/dist/{chunk-CPNSVIIB.js → chunk-RP3W6IQO.js} +5 -5
  397. package/dist/{chunk-WHLVMQNF.js → chunk-RQ5HZDBV.js} +4 -4
  398. package/dist/chunk-RQ5HZDBV.js.map +1 -0
  399. package/dist/{chunk-UEJQQVP2.js → chunk-RRX6ZTNX.js} +4 -4
  400. package/dist/{chunk-OL7UQMBI.js → chunk-RUEKY3VR.js} +2 -2
  401. package/dist/{chunk-3T2I6BYA.js → chunk-SJIBPRPB.js} +4 -4
  402. package/dist/{chunk-BHXFPZAA.js → chunk-SLODUPES.js} +16 -10
  403. package/dist/chunk-SLODUPES.js.map +1 -0
  404. package/dist/{chunk-TLY2QMU5.js → chunk-SVFA75FO.js} +3 -3
  405. package/dist/{chunk-R4SOPN6K.js → chunk-SVXHKIGJ.js} +12 -5
  406. package/dist/chunk-SVXHKIGJ.js.map +1 -0
  407. package/dist/{chunk-DF2FFYZ7.js → chunk-T53L42XW.js} +10 -10
  408. package/dist/{chunk-V6YZ3PL5.js → chunk-T5MOGJ56.js} +2 -2
  409. package/dist/{chunk-WI6GD4MV.js → chunk-TBRAZK3Y.js} +12 -12
  410. package/dist/{chunk-6VZYQC7T.js → chunk-TCLBB7U4.js} +6 -6
  411. package/dist/{chunk-5UGXAAZG.js → chunk-TJT4NSFN.js} +2 -2
  412. package/dist/{chunk-RQFBLYYH.js → chunk-TN55JKIU.js} +2 -2
  413. package/dist/{chunk-P4BZ7YE6.js → chunk-TTVKL3RD.js} +2 -2
  414. package/dist/{chunk-UCTJJYVC.js → chunk-TTW4MAOJ.js} +5 -5
  415. package/dist/{chunk-D6P5PSHU.js → chunk-U3ON6YW3.js} +2 -2
  416. package/dist/{chunk-VUFMV5Q5.js → chunk-U3PPLAFB.js} +2 -2
  417. package/dist/{chunk-WVQ47UTI.js → chunk-UEWIIYGA.js} +2 -2
  418. package/dist/{chunk-SDSAQ5YS.js → chunk-UJE7IKQ4.js} +2 -2
  419. package/dist/{chunk-AFZUPCBK.js → chunk-V3WWNKHU.js} +6 -6
  420. package/dist/{chunk-PS3EJLOC.js → chunk-VDZQJBAV.js} +4 -4
  421. package/dist/chunk-VDZQJBAV.js.map +1 -0
  422. package/dist/{chunk-D7Q42CRZ.js → chunk-VECWMANF.js} +10 -6
  423. package/dist/chunk-VECWMANF.js.map +1 -0
  424. package/dist/{chunk-CKW267ZK.js → chunk-VI7YYAXV.js} +3 -3
  425. package/dist/{chunk-KJYD5OJ4.js → chunk-VLVMJDGD.js} +2 -2
  426. package/dist/{chunk-O7SE4PYT.js → chunk-VNHLYDTX.js} +12 -6
  427. package/dist/chunk-VNHLYDTX.js.map +1 -0
  428. package/dist/{chunk-2SWQ6HIK.js → chunk-W3FAKT3D.js} +4 -4
  429. package/dist/{chunk-P7FQUGED.js → chunk-WQSL6MCA.js} +7 -7
  430. package/dist/{chunk-GSFNH4C5.js → chunk-WROCSDVL.js} +5 -5
  431. package/dist/{chunk-U7Q2Y6WG.js → chunk-X4HGBK4G.js} +2 -2
  432. package/dist/{chunk-ZCNCQGWK.js → chunk-X4XYUNRL.js} +2 -2
  433. package/dist/{chunk-HEWJJ4VE.js → chunk-XLZBZSES.js} +6 -3
  434. package/dist/chunk-XLZBZSES.js.map +1 -0
  435. package/dist/{chunk-H2RHA73H.js → chunk-XM6WEANW.js} +8 -8
  436. package/dist/{chunk-2N2KNXTF.js → chunk-XO27IMBE.js} +3 -3
  437. package/dist/{chunk-QPMLACIK.js → chunk-XY6KOMRN.js} +2 -2
  438. package/dist/{chunk-GEZYZ446.js → chunk-Y3IGYWGN.js} +27 -5
  439. package/dist/chunk-Y3IGYWGN.js.map +1 -0
  440. package/dist/{chunk-6SK3MTYJ.js → chunk-Y5UCOBQN.js} +4 -4
  441. package/dist/{chunk-I2IZ53QS.js → chunk-Y7ZS724A.js} +2 -2
  442. package/dist/{chunk-CJMU3G2J.js → chunk-YCNKH5P6.js} +6 -6
  443. package/dist/{chunk-O6DRUOUF.js → chunk-YESTO24O.js} +2 -2
  444. package/dist/{chunk-F65LT7XV.js → chunk-YZKA7UJK.js} +2 -2
  445. package/dist/{chunk-2DFH74T4.js → chunk-ZB6BX4GO.js} +2 -2
  446. package/dist/{chunk-7AR2R7TV.js → chunk-ZDWU52DJ.js} +4 -4
  447. package/dist/{chunk-M7E66OSC.js → chunk-ZPIMPOHV.js} +4 -4
  448. package/dist/data-display/Alert.js +5 -4
  449. package/dist/data-display/AsyncStateContainer.js +3 -3
  450. package/dist/data-display/Avatar.js +6 -5
  451. package/dist/data-display/Badge.js +6 -5
  452. package/dist/data-display/Banner.js +3 -2
  453. package/dist/data-display/CardKit.js +20 -16
  454. package/dist/data-display/Carousel.js +13 -9
  455. package/dist/data-display/Chart.js +24 -20
  456. package/dist/data-display/DataGrid.js +3 -3
  457. package/dist/data-display/DataViews.js +116 -114
  458. package/dist/data-display/DescriptionItem.js +6 -5
  459. package/dist/data-display/EmptyState.js +2 -2
  460. package/dist/data-display/FleetMap.js +23 -19
  461. package/dist/data-display/InteractiveTooltip.js +2 -2
  462. package/dist/data-display/Lightbox.js +6 -6
  463. package/dist/data-display/MapPreview.js +15 -10
  464. package/dist/data-display/Progress.js +6 -5
  465. package/dist/data-display/SectionOnboarding.js +3 -3
  466. package/dist/data-display/Sheet.js +9 -5
  467. package/dist/data-display/Table.js +3 -3
  468. package/dist/feedback/ConfirmAction.js +14 -10
  469. package/dist/feedback/Dialog.js +2 -2
  470. package/dist/feedback/NotificationStatusNotice.js +12 -8
  471. package/dist/feedback/StackedModal.js +2 -2
  472. package/dist/feedback/TutorialOverlay.js +2 -2
  473. package/dist/form/AddressAutocomplete.js +9 -7
  474. package/dist/form/Autocomplete.js +7 -2
  475. package/dist/form/Button.js +8 -4
  476. package/dist/form/Calendar.js +4 -4
  477. package/dist/form/CategorySelect.js +14 -12
  478. package/dist/form/CepField.js +9 -7
  479. package/dist/form/Checkbox.js +4 -3
  480. package/dist/form/CodeEditor.js +4 -4
  481. package/dist/form/Command.js +9 -5
  482. package/dist/form/CreatableSelect.js +5 -3
  483. package/dist/form/DateRangePicker.js +15 -10
  484. package/dist/form/Input.js +8 -6
  485. package/dist/form/InputOTP.js +7 -5
  486. package/dist/form/Label.js +9 -5
  487. package/dist/form/Menubar.js +12 -8
  488. package/dist/form/PhoneInput.js +5 -3
  489. package/dist/form/RadioGroup.js +8 -6
  490. package/dist/form/RichTextEditor.js +3 -3
  491. package/dist/form/Select.js +7 -5
  492. package/dist/form/Switch.js +7 -6
  493. package/dist/form/Textarea.js +5 -3
  494. package/dist/form/Toggle.js +6 -4
  495. package/dist/form/ToggleGroup.js +6 -1
  496. package/dist/form/total-form.js +36 -34
  497. package/dist/icons.js +10 -6
  498. package/dist/layout/Box.js +10 -6
  499. package/dist/layout/ContentToolbar.js +18 -13
  500. package/dist/layout/ScrollArea.js +3 -3
  501. package/dist/layout/Stack.js +11 -7
  502. package/dist/layout/TableFilter.js +6 -1
  503. package/dist/native/chunks/{chunk-UKROAIPA.js → chunk-335WGKE6.js} +35 -48
  504. package/dist/native/chunks/chunk-335WGKE6.js.map +1 -0
  505. package/dist/native/chunks/{chunk-LB65S6C7.js → chunk-4KWFRDI2.js} +3 -3
  506. package/dist/native/chunks/{chunk-S5SLTMPB.js → chunk-5IASLIBI.js} +2 -2
  507. package/dist/native/chunks/{chunk-IVNAQJY6.js → chunk-GUBTMR2K.js} +2 -2
  508. package/dist/native/chunks/chunk-IMGBBIMT.js +46 -0
  509. package/dist/native/chunks/chunk-IMGBBIMT.js.map +1 -0
  510. package/dist/native/chunks/{chunk-T3TYQMAH.js → chunk-KIG4KY4W.js} +18 -13
  511. package/dist/native/chunks/chunk-KIG4KY4W.js.map +1 -0
  512. package/dist/native/chunks/{chunk-VAD5YVIZ.js → chunk-OI57L6WL.js} +5 -5
  513. package/dist/native/chunks/{chunk-V72V2Q45.js → chunk-R5XVZRDD.js} +28 -1
  514. package/dist/native/chunks/chunk-R5XVZRDD.js.map +1 -0
  515. package/dist/native/chunks/{chunk-7UEJ2FMQ.js → chunk-X6RQGKGF.js} +2 -2
  516. package/dist/native/data-display/Alert.js +3 -3
  517. package/dist/native/data-display/Avatar.js +3 -3
  518. package/dist/native/data-display/Badge.js +3 -3
  519. package/dist/native/data-display/Chip.js +3 -3
  520. package/dist/native/data-display/EmptyState.js +6 -5
  521. package/dist/native/data-display/ErrorState.js +5 -4
  522. package/dist/native/data-display/ErrorState.js.map +1 -1
  523. package/dist/native/data-display/FleetMap.js +7 -6
  524. package/dist/native/data-display/FleetMap.js.map +1 -1
  525. package/dist/native/data-display/LoadingState.js +2 -2
  526. package/dist/native/data-display/Progress.js +2 -2
  527. package/dist/native/feedback/Dialog.js +3 -3
  528. package/dist/native/form/Button.js +4 -3
  529. package/dist/native/form/Checkbox.js +3 -3
  530. package/dist/native/form/Input.js +7 -3
  531. package/dist/native/form/Input.js.map +1 -1
  532. package/dist/native/form/Select.js +27 -14
  533. package/dist/native/form/Select.js.map +1 -1
  534. package/dist/native/form/Switch.js +2 -2
  535. package/dist/native/icons.js +3 -3
  536. package/dist/native/layout/Box.js +3 -3
  537. package/dist/native/layout/Card.js +2 -2
  538. package/dist/native/layout/Container.js +2 -2
  539. package/dist/native/layout/Skeleton.js +3 -3
  540. package/dist/native/layout/Spacer.js +2 -2
  541. package/dist/native/layout/Stack.js +3 -3
  542. package/dist/native/provider.js +2 -2
  543. package/dist/native/tokens.js +11 -1
  544. package/dist/native/typography/Heading.js +2 -2
  545. package/dist/native/typography/Paragraph.js +2 -2
  546. package/dist/native/typography/Text.js +2 -2
  547. package/dist/navigation/AppHeader.js +15 -11
  548. package/dist/navigation/CommandPalette.js +2 -2
  549. package/dist/navigation/NavigationMenu.js +5 -5
  550. package/dist/navigation/Pagination.js +10 -3
  551. package/dist/provider.js +10 -6
  552. package/dist/social-login-button.js +14 -10
  553. package/dist/tokens.js +39 -9
  554. package/dist/types/components/data-display/DataViews/data-views-bar-controls.d.ts.map +1 -1
  555. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
  556. package/dist/types/components/data-display/DataViews/data-views-range-pill.d.ts.map +1 -1
  557. package/dist/types/components/data-display/DataViews/data-views-search.d.ts.map +1 -1
  558. package/dist/types/components/data-display/LazyImage/LazyImage.hooks.d.ts +1 -1
  559. package/dist/types/components/data-display/MapPreview/MapSearchBar.d.ts.map +1 -1
  560. package/dist/types/components/form/AddressAutocomplete/AddressTextField.d.ts.map +1 -1
  561. package/dist/types/components/form/Button/Button.styles.d.ts +9 -2
  562. package/dist/types/components/form/Button/Button.styles.d.ts.map +1 -1
  563. package/dist/types/components/form/CategorySelect/CategoryPanelHead.d.ts.map +1 -1
  564. package/dist/types/components/form/CategorySelect/CategorySelect.styles.d.ts +3 -4
  565. package/dist/types/components/form/CategorySelect/CategorySelect.styles.d.ts.map +1 -1
  566. package/dist/types/components/form/CreatableSelect/CreatableSelect.d.ts.map +1 -1
  567. package/dist/types/components/form/Input/Input.d.ts.map +1 -1
  568. package/dist/types/components/form/Input/Input.metrics.d.ts +26 -16
  569. package/dist/types/components/form/Input/Input.metrics.d.ts.map +1 -1
  570. package/dist/types/components/form/Input/Input.styles.d.ts +2 -1
  571. package/dist/types/components/form/Input/Input.styles.d.ts.map +1 -1
  572. package/dist/types/components/form/InputOTP/InputOTP.styles.d.ts.map +1 -1
  573. package/dist/types/components/form/PhoneInput/PhoneInput.d.ts.map +1 -1
  574. package/dist/types/components/form/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
  575. package/dist/types/components/form/Select/Select.d.ts.map +1 -1
  576. package/dist/types/components/form/Textarea/Textarea.d.ts.map +1 -1
  577. package/dist/types/components/form/Textarea/TextareaRichEditor.d.ts.map +1 -1
  578. package/dist/types/components/form/Toggle/Toggle.styles.d.ts.map +1 -1
  579. package/dist/types/components/form/ToggleGroup/ToggleGroup.d.ts.map +1 -1
  580. package/dist/types/components/form/total-form/Fields/ToggleField.d.ts.map +1 -1
  581. package/dist/types/components/form/total-form/SubmitButton.d.ts.map +1 -1
  582. package/dist/types/components/layout/ContentToolbar/ColumnsMenu.d.ts.map +1 -1
  583. package/dist/types/components/layout/ContentToolbar/FilterTrigger.d.ts.map +1 -1
  584. package/dist/types/components/layout/ContentToolbar/MultiSelectDropdown.d.ts.map +1 -1
  585. package/dist/types/components/layout/ContentToolbar/MultiSelectTriggers.d.ts.map +1 -1
  586. package/dist/types/components/layout/ContentToolbar/SavedViewsMenu.d.ts.map +1 -1
  587. package/dist/types/components/layout/ContentToolbar/SortByDropdown.d.ts.map +1 -1
  588. package/dist/types/components/layout/ContentToolbar/ViewSelector.d.ts.map +1 -1
  589. package/dist/types/components/layout/TableFilter/TableFilter.d.ts.map +1 -1
  590. package/dist/types/components/navigation/Pagination/PaginationParts.d.ts.map +1 -1
  591. package/dist/types/provider/mui-bridge.d.ts.map +1 -1
  592. package/dist/types/tokens/field-height.core.d.ts +49 -0
  593. package/dist/types/tokens/field-height.core.d.ts.map +1 -0
  594. package/dist/types/tokens/field-height.d.ts +58 -0
  595. package/dist/types/tokens/field-height.d.ts.map +1 -0
  596. package/dist/types/tokens/scales.d.ts +1 -0
  597. package/dist/types/tokens/scales.d.ts.map +1 -1
  598. package/dist/types/tokens/theme.d.ts +8 -0
  599. package/dist/types/tokens/theme.d.ts.map +1 -1
  600. package/dist/types-native/components/form/Button/Button.native.d.ts.map +1 -1
  601. package/dist/types-native/components/form/Input/Input.look.native.d.ts +2 -2
  602. package/dist/types-native/components/form/Input/Input.metrics.d.ts +26 -16
  603. package/dist/types-native/components/form/Input/Input.metrics.d.ts.map +1 -1
  604. package/dist/types-native/components/form/Input/Input.native.d.ts.map +1 -1
  605. package/dist/types-native/components/form/Select/Select.native.d.ts +2 -2
  606. package/dist/types-native/components/form/Select/Select.native.d.ts.map +1 -1
  607. package/dist/types-native/components/form/field-pulse.native.d.ts +3 -1
  608. package/dist/types-native/components/form/field-pulse.native.d.ts.map +1 -1
  609. package/dist/types-native/tokens/field-height.core.d.ts +49 -0
  610. package/dist/types-native/tokens/field-height.core.d.ts.map +1 -0
  611. package/dist/types-native/tokens/index.native.d.ts +1 -0
  612. package/dist/types-native/tokens/index.native.d.ts.map +1 -1
  613. package/dist/types-native/tokens/theme.d.ts +8 -0
  614. package/dist/types-native/tokens/theme.d.ts.map +1 -1
  615. package/dist/typography/Heading.js +6 -5
  616. package/dist/typography/Paragraph.js +4 -3
  617. package/dist/typography/Text.js +5 -4
  618. package/dist/user-avatar.js +14 -10
  619. package/dist/utility/InfiniteScroll.js +2 -2
  620. package/package.json +1 -1
  621. package/src/components/data-display/DataViews/data-views-bar-controls.tsx +3 -2
  622. package/src/components/data-display/DataViews/data-views-day-input.tsx +2 -2
  623. package/src/components/data-display/DataViews/data-views-more-fields.tsx +4 -1
  624. package/src/components/data-display/DataViews/data-views-number-input.tsx +2 -2
  625. package/src/components/data-display/DataViews/data-views-range-pill.tsx +6 -3
  626. package/src/components/data-display/DataViews/data-views-search.tsx +6 -2
  627. package/src/components/data-display/MapPreview/MapSearchBar.tsx +2 -0
  628. package/src/components/form/AddressAutocomplete/AddressTextField.tsx +4 -2
  629. package/src/components/form/Autocomplete/Autocomplete.parts.tsx +2 -2
  630. package/src/components/form/Button/Button.native.tsx +17 -4
  631. package/src/components/form/Button/Button.styles.ts +21 -5
  632. package/src/components/form/CategorySelect/CategoryPanelHead.tsx +3 -3
  633. package/src/components/form/CategorySelect/CategorySelect.styles.ts +5 -5
  634. package/src/components/form/CreatableSelect/CreatableSelect.tsx +2 -1
  635. package/src/components/form/Input/Input.look.native.ts +5 -5
  636. package/src/components/form/Input/Input.metrics.ts +53 -18
  637. package/src/components/form/Input/Input.native.tsx +2 -0
  638. package/src/components/form/Input/Input.styles.ts +4 -2
  639. package/src/components/form/Input/Input.tsx +9 -3
  640. package/src/components/form/InputOTP/InputOTP.styles.ts +12 -8
  641. package/src/components/form/PhoneInput/PhoneInput.tsx +4 -2
  642. package/src/components/form/RadioGroup/RadioGroup.styles.ts +10 -1
  643. package/src/components/form/Select/Select.native.tsx +34 -8
  644. package/src/components/form/Select/Select.tsx +13 -7
  645. package/src/components/form/Textarea/Textarea.tsx +5 -2
  646. package/src/components/form/Textarea/TextareaRichEditor.tsx +8 -3
  647. package/src/components/form/Toggle/Toggle.styles.ts +7 -3
  648. package/src/components/form/ToggleGroup/ToggleGroup.tsx +5 -0
  649. package/src/components/form/field-pulse.native.tsx +6 -3
  650. package/src/components/form/total-form/Fields/ToggleField.tsx +0 -2
  651. package/src/components/form/total-form/SubmitButton.tsx +4 -9
  652. package/src/components/layout/ContentToolbar/ColumnsMenu.tsx +3 -2
  653. package/src/components/layout/ContentToolbar/FilterTrigger.tsx +2 -1
  654. package/src/components/layout/ContentToolbar/MultiSelectDropdown.tsx +2 -0
  655. package/src/components/layout/ContentToolbar/MultiSelectTriggers.tsx +7 -5
  656. package/src/components/layout/ContentToolbar/SavedViewsMenu.tsx +3 -1
  657. package/src/components/layout/ContentToolbar/SortByDropdown.tsx +2 -1
  658. package/src/components/layout/ContentToolbar/ViewSelector.tsx +2 -1
  659. package/src/components/layout/TableFilter/TableFilter.tsx +3 -2
  660. package/src/components/navigation/Pagination/PaginationParts.tsx +2 -2
  661. package/src/provider/mui-bridge.ts +6 -2
  662. package/src/tokens/field-height.core.ts +70 -0
  663. package/src/tokens/field-height.ts +152 -0
  664. package/src/tokens/index.native.ts +7 -0
  665. package/src/tokens/scales.ts +14 -0
  666. package/src/tokens/theme.ts +10 -0
  667. package/dist/chunk-272OV2KZ.js.map +0 -1
  668. package/dist/chunk-4EL5ZSZ3.js.map +0 -1
  669. package/dist/chunk-65IHPI4S.js.map +0 -1
  670. package/dist/chunk-6SXZ7CF2.js.map +0 -1
  671. package/dist/chunk-BB2IVF76.js.map +0 -1
  672. package/dist/chunk-BDVJ65GR.js.map +0 -1
  673. package/dist/chunk-BHXFPZAA.js.map +0 -1
  674. package/dist/chunk-BRAF4MFO.js.map +0 -1
  675. package/dist/chunk-D7Q42CRZ.js.map +0 -1
  676. package/dist/chunk-DV42HAVP.js.map +0 -1
  677. package/dist/chunk-EFEZWG4C.js.map +0 -1
  678. package/dist/chunk-EN5Q5RPQ.js.map +0 -1
  679. package/dist/chunk-ETSKBOXN.js.map +0 -1
  680. package/dist/chunk-F73D4EMA.js.map +0 -1
  681. package/dist/chunk-G5G4Q7G6.js.map +0 -1
  682. package/dist/chunk-GEZYZ446.js.map +0 -1
  683. package/dist/chunk-HEWJJ4VE.js.map +0 -1
  684. package/dist/chunk-HZAPN7XD.js.map +0 -1
  685. package/dist/chunk-IRSI3BFF.js.map +0 -1
  686. package/dist/chunk-JHOBW7OD.js.map +0 -1
  687. package/dist/chunk-JUHPNTDA.js.map +0 -1
  688. package/dist/chunk-JVMNE5G4.js.map +0 -1
  689. package/dist/chunk-L6UTYFAB.js.map +0 -1
  690. package/dist/chunk-MSKEFXXV.js.map +0 -1
  691. package/dist/chunk-O7SE4PYT.js.map +0 -1
  692. package/dist/chunk-PS3EJLOC.js.map +0 -1
  693. package/dist/chunk-Q544QEIN.js.map +0 -1
  694. package/dist/chunk-R4SOPN6K.js.map +0 -1
  695. package/dist/chunk-RDFPH47Y.js.map +0 -1
  696. package/dist/chunk-RRDL7AGQ.js.map +0 -1
  697. package/dist/chunk-USPQZQBF.js.map +0 -1
  698. package/dist/chunk-VYMULXCJ.js.map +0 -1
  699. package/dist/chunk-WHLVMQNF.js.map +0 -1
  700. package/dist/chunk-WONCE5GB.js.map +0 -1
  701. package/dist/chunk-XMDH3MRV.js.map +0 -1
  702. package/dist/chunk-XVM4ZIRE.js.map +0 -1
  703. package/dist/native/chunks/chunk-T3TYQMAH.js.map +0 -1
  704. package/dist/native/chunks/chunk-UKROAIPA.js.map +0 -1
  705. package/dist/native/chunks/chunk-V72V2Q45.js.map +0 -1
  706. /package/dist/{chunk-GOKMLXZH.js.map → chunk-2SKNSQCP.js.map} +0 -0
  707. /package/dist/{chunk-YRUCIKPO.js.map → chunk-2UYR2OOE.js.map} +0 -0
  708. /package/dist/{chunk-RMB4RTTM.js.map → chunk-2W4GTZDP.js.map} +0 -0
  709. /package/dist/{chunk-IASDP44E.js.map → chunk-3AOOI2NR.js.map} +0 -0
  710. /package/dist/{chunk-BRUJC7OG.js.map → chunk-3CN2GBIK.js.map} +0 -0
  711. /package/dist/{chunk-WCLWFN3F.js.map → chunk-3NA7AO6H.js.map} +0 -0
  712. /package/dist/{chunk-URK67BAE.js.map → chunk-3SJZP7KH.js.map} +0 -0
  713. /package/dist/{chunk-67L5CMXP.js.map → chunk-3Z23QTCP.js.map} +0 -0
  714. /package/dist/{chunk-4ETQRBZC.js.map → chunk-46UPILLK.js.map} +0 -0
  715. /package/dist/{chunk-SSJHEV5Z.js.map → chunk-4BEQADWC.js.map} +0 -0
  716. /package/dist/{chunk-DBXGRZBJ.js.map → chunk-4D7YIU34.js.map} +0 -0
  717. /package/dist/{chunk-32MTYYGC.js.map → chunk-4PIKOJZ4.js.map} +0 -0
  718. /package/dist/{chunk-SAIKHWH7.js.map → chunk-56S7A2XT.js.map} +0 -0
  719. /package/dist/{chunk-UHWHTNUS.js.map → chunk-5BW7NCM5.js.map} +0 -0
  720. /package/dist/{chunk-LG6DHNRD.js.map → chunk-5FA5S2YN.js.map} +0 -0
  721. /package/dist/{chunk-H35CQ6DF.js.map → chunk-5KZR3RXL.js.map} +0 -0
  722. /package/dist/{chunk-MRGPVPQC.js.map → chunk-5NH24MF5.js.map} +0 -0
  723. /package/dist/{chunk-IQFUV3BA.js.map → chunk-5RHMLOIA.js.map} +0 -0
  724. /package/dist/{chunk-DORPR2YP.js.map → chunk-5SBJO37T.js.map} +0 -0
  725. /package/dist/{chunk-3ZGQSWHJ.js.map → chunk-5U4SJ2DA.js.map} +0 -0
  726. /package/dist/{chunk-QKDFD4VT.js.map → chunk-62NFZR52.js.map} +0 -0
  727. /package/dist/{chunk-3PT3SBJ7.js.map → chunk-65JHGT5F.js.map} +0 -0
  728. /package/dist/{chunk-H7ZN2GW7.js.map → chunk-67N6TH6E.js.map} +0 -0
  729. /package/dist/{chunk-Q5BSNHN7.js.map → chunk-6M33XQLZ.js.map} +0 -0
  730. /package/dist/{chunk-IPS55KWK.js.map → chunk-6M7CMILP.js.map} +0 -0
  731. /package/dist/{chunk-X2R7QG5I.js.map → chunk-6MDBMCFK.js.map} +0 -0
  732. /package/dist/{chunk-PCONTSJJ.js.map → chunk-6V7D6GRX.js.map} +0 -0
  733. /package/dist/{chunk-DTKMBI7B.js.map → chunk-6YLAVHV4.js.map} +0 -0
  734. /package/dist/{chunk-MCAXIKQD.js.map → chunk-6ZZNV2PA.js.map} +0 -0
  735. /package/dist/{chunk-BWSYSSF3.js.map → chunk-7A3G4W52.js.map} +0 -0
  736. /package/dist/{chunk-RXSGHPCR.js.map → chunk-7FOOLP5H.js.map} +0 -0
  737. /package/dist/{chunk-NJ6D37KV.js.map → chunk-7FWXG2KF.js.map} +0 -0
  738. /package/dist/{chunk-XPPEUGHG.js.map → chunk-7MM2I34E.js.map} +0 -0
  739. /package/dist/{chunk-F22WT7UX.js.map → chunk-7NFRTAEU.js.map} +0 -0
  740. /package/dist/{chunk-OIFBBDYX.js.map → chunk-7TSQNYQO.js.map} +0 -0
  741. /package/dist/{chunk-OFMDFN3U.js.map → chunk-A2QZXV2K.js.map} +0 -0
  742. /package/dist/{chunk-J2RRZZXC.js.map → chunk-APT5L7V5.js.map} +0 -0
  743. /package/dist/{chunk-ZVTJGWIV.js.map → chunk-AYRHW4DX.js.map} +0 -0
  744. /package/dist/{chunk-Y2CSBXQT.js.map → chunk-AZ2KKHID.js.map} +0 -0
  745. /package/dist/{chunk-NLUZGT4U.js.map → chunk-AZ4LLAAJ.js.map} +0 -0
  746. /package/dist/{chunk-HJOABXKN.js.map → chunk-AZUFGKMQ.js.map} +0 -0
  747. /package/dist/{chunk-IAVAZ36T.js.map → chunk-B4BU5CS6.js.map} +0 -0
  748. /package/dist/{chunk-APMEXS3Y.js.map → chunk-BM4LH7VQ.js.map} +0 -0
  749. /package/dist/{chunk-JOPTI47I.js.map → chunk-BM4ZPBBT.js.map} +0 -0
  750. /package/dist/{chunk-VGSEI7PQ.js.map → chunk-BTIBFR5L.js.map} +0 -0
  751. /package/dist/{chunk-C2ZNAQMO.js.map → chunk-BUXSHLQM.js.map} +0 -0
  752. /package/dist/{chunk-CIVLXOLG.js.map → chunk-C5WSPGMP.js.map} +0 -0
  753. /package/dist/{chunk-SGV7QGYQ.js.map → chunk-C6R4LVUX.js.map} +0 -0
  754. /package/dist/{chunk-6SNRPCSK.js.map → chunk-CR4KC2K5.js.map} +0 -0
  755. /package/dist/{chunk-4WT4PV4M.js.map → chunk-CZ5ZL63A.js.map} +0 -0
  756. /package/dist/{chunk-BPYPUEM5.js.map → chunk-CZJLWCEG.js.map} +0 -0
  757. /package/dist/{chunk-YANLN6HP.js.map → chunk-D6HDJVQW.js.map} +0 -0
  758. /package/dist/{chunk-6PSAPCTE.js.map → chunk-DAQ2ZDU2.js.map} +0 -0
  759. /package/dist/{chunk-PEMZ2ABQ.js.map → chunk-DDTPMZOB.js.map} +0 -0
  760. /package/dist/{chunk-XEUSTU7K.js.map → chunk-DIWC6AQL.js.map} +0 -0
  761. /package/dist/{chunk-LWAOL4BG.js.map → chunk-DO3UNZAU.js.map} +0 -0
  762. /package/dist/{chunk-D5YGDCMP.js.map → chunk-DZXN3QCX.js.map} +0 -0
  763. /package/dist/{chunk-GUROYOKQ.js.map → chunk-EAE5Z5HL.js.map} +0 -0
  764. /package/dist/{chunk-EYRSUVBC.js.map → chunk-ECZXTIDR.js.map} +0 -0
  765. /package/dist/{chunk-3P4THDBM.js.map → chunk-EIGELK2H.js.map} +0 -0
  766. /package/dist/{chunk-26ORCF6J.js.map → chunk-ENUWZ3HW.js.map} +0 -0
  767. /package/dist/{chunk-DWZ7FLA7.js.map → chunk-FATRMNVN.js.map} +0 -0
  768. /package/dist/{chunk-SHQWIDD5.js.map → chunk-GJQYM3PM.js.map} +0 -0
  769. /package/dist/{chunk-DX36KZUV.js.map → chunk-GSWDQ3ZX.js.map} +0 -0
  770. /package/dist/{chunk-VNEEXUWA.js.map → chunk-GT7C6TSM.js.map} +0 -0
  771. /package/dist/{chunk-OHKEQ7QJ.js.map → chunk-GXEB6MJA.js.map} +0 -0
  772. /package/dist/{chunk-CPA2YRVZ.js.map → chunk-H3TNIGMI.js.map} +0 -0
  773. /package/dist/{chunk-5EQFAFR3.js.map → chunk-H4NWU2ZN.js.map} +0 -0
  774. /package/dist/{chunk-QNUWSXF2.js.map → chunk-H57ZS6W2.js.map} +0 -0
  775. /package/dist/{chunk-7YTLJUBX.js.map → chunk-HQZRWOSS.js.map} +0 -0
  776. /package/dist/{chunk-25R3ITGZ.js.map → chunk-HTZYFGYE.js.map} +0 -0
  777. /package/dist/{chunk-BKP7YW3Y.js.map → chunk-HZXCTLNI.js.map} +0 -0
  778. /package/dist/{chunk-SZZLABMO.js.map → chunk-IDO4EV7T.js.map} +0 -0
  779. /package/dist/{chunk-ETU4LNU7.js.map → chunk-IGAXQRRZ.js.map} +0 -0
  780. /package/dist/{chunk-ORIFMVN4.js.map → chunk-IM76SSXI.js.map} +0 -0
  781. /package/dist/{chunk-EATFKTO3.js.map → chunk-IOEF32HX.js.map} +0 -0
  782. /package/dist/{chunk-NR2HXHBR.js.map → chunk-IYSQRTIX.js.map} +0 -0
  783. /package/dist/{chunk-YXQ2NJHF.js.map → chunk-JAYWTSXX.js.map} +0 -0
  784. /package/dist/{chunk-RRO2EOJB.js.map → chunk-JB67KPGM.js.map} +0 -0
  785. /package/dist/{chunk-RIA34EUT.js.map → chunk-JDY37EML.js.map} +0 -0
  786. /package/dist/{chunk-SMUZRLFZ.js.map → chunk-JGOXXKPY.js.map} +0 -0
  787. /package/dist/{chunk-DHQ6ASUD.js.map → chunk-JPNPXNFH.js.map} +0 -0
  788. /package/dist/{chunk-4DUHJIR2.js.map → chunk-JYETSTOQ.js.map} +0 -0
  789. /package/dist/{chunk-FC74EAW4.js.map → chunk-JZJOAGBG.js.map} +0 -0
  790. /package/dist/{chunk-R7KR5FYJ.js.map → chunk-KCFCEWF7.js.map} +0 -0
  791. /package/dist/{chunk-HFBME3C5.js.map → chunk-KG4VNCNO.js.map} +0 -0
  792. /package/dist/{chunk-V3RVRZAU.js.map → chunk-KMUSTQA6.js.map} +0 -0
  793. /package/dist/{chunk-HSVNFMXY.js.map → chunk-LB2G6SD6.js.map} +0 -0
  794. /package/dist/{chunk-RWIBPIPD.js.map → chunk-LNOYDMFD.js.map} +0 -0
  795. /package/dist/{chunk-SFAP5EH5.js.map → chunk-LUMF63BM.js.map} +0 -0
  796. /package/dist/{chunk-WVJI3Z4P.js.map → chunk-LWLVWM34.js.map} +0 -0
  797. /package/dist/{chunk-RFZU5BTG.js.map → chunk-LYSSO6WC.js.map} +0 -0
  798. /package/dist/{chunk-GLPHRHIT.js.map → chunk-M7HX3HKW.js.map} +0 -0
  799. /package/dist/{chunk-EJJRJYB5.js.map → chunk-MG73KW54.js.map} +0 -0
  800. /package/dist/{chunk-QP3KK4KO.js.map → chunk-MGP5LLEK.js.map} +0 -0
  801. /package/dist/{chunk-ATBT4RJZ.js.map → chunk-MSXNA3UH.js.map} +0 -0
  802. /package/dist/{chunk-MYUZPUXQ.js.map → chunk-N74IYYRU.js.map} +0 -0
  803. /package/dist/{chunk-5YOFMMK3.js.map → chunk-NBBFFPTA.js.map} +0 -0
  804. /package/dist/{chunk-NFJUBPIN.js.map → chunk-NFLY5JMP.js.map} +0 -0
  805. /package/dist/{chunk-3BAFJMBH.js.map → chunk-NKIAP6ZL.js.map} +0 -0
  806. /package/dist/{chunk-G3WUOPWE.js.map → chunk-NLBIG5LU.js.map} +0 -0
  807. /package/dist/{chunk-CATLG2RT.js.map → chunk-NU3EQX2L.js.map} +0 -0
  808. /package/dist/{chunk-55E7GLVT.js.map → chunk-O4C5LUTJ.js.map} +0 -0
  809. /package/dist/{chunk-INH2BDHV.js.map → chunk-OOGKAFBU.js.map} +0 -0
  810. /package/dist/{chunk-2YOQLBEX.js.map → chunk-OZZNC4YU.js.map} +0 -0
  811. /package/dist/{chunk-35GWNOLB.js.map → chunk-PH5XJGKJ.js.map} +0 -0
  812. /package/dist/{chunk-AGYGNNOM.js.map → chunk-PQECNGDE.js.map} +0 -0
  813. /package/dist/{chunk-IPE5FFFD.js.map → chunk-PUBPZOQJ.js.map} +0 -0
  814. /package/dist/{chunk-7DNQHMDO.js.map → chunk-PXH24VIP.js.map} +0 -0
  815. /package/dist/{chunk-7U36V4CU.js.map → chunk-Q2GZMDZL.js.map} +0 -0
  816. /package/dist/{chunk-4LDRYLE2.js.map → chunk-QNHNFU7G.js.map} +0 -0
  817. /package/dist/{chunk-WBKWIFXA.js.map → chunk-QYNCPS5W.js.map} +0 -0
  818. /package/dist/{chunk-C4NRFERD.js.map → chunk-R2I3LUUH.js.map} +0 -0
  819. /package/dist/{chunk-RCI6KVN6.js.map → chunk-R67J6JKT.js.map} +0 -0
  820. /package/dist/{chunk-GOWBYHYW.js.map → chunk-R6SBP5M5.js.map} +0 -0
  821. /package/dist/{chunk-GKGA2ZCW.js.map → chunk-RAWQMBX6.js.map} +0 -0
  822. /package/dist/{chunk-6BGS5FND.js.map → chunk-RGKGBYT2.js.map} +0 -0
  823. /package/dist/{chunk-A5FIYKAN.js.map → chunk-RGMSTQ2J.js.map} +0 -0
  824. /package/dist/{chunk-CPNSVIIB.js.map → chunk-RP3W6IQO.js.map} +0 -0
  825. /package/dist/{chunk-UEJQQVP2.js.map → chunk-RRX6ZTNX.js.map} +0 -0
  826. /package/dist/{chunk-OL7UQMBI.js.map → chunk-RUEKY3VR.js.map} +0 -0
  827. /package/dist/{chunk-3T2I6BYA.js.map → chunk-SJIBPRPB.js.map} +0 -0
  828. /package/dist/{chunk-TLY2QMU5.js.map → chunk-SVFA75FO.js.map} +0 -0
  829. /package/dist/{chunk-DF2FFYZ7.js.map → chunk-T53L42XW.js.map} +0 -0
  830. /package/dist/{chunk-V6YZ3PL5.js.map → chunk-T5MOGJ56.js.map} +0 -0
  831. /package/dist/{chunk-WI6GD4MV.js.map → chunk-TBRAZK3Y.js.map} +0 -0
  832. /package/dist/{chunk-6VZYQC7T.js.map → chunk-TCLBB7U4.js.map} +0 -0
  833. /package/dist/{chunk-5UGXAAZG.js.map → chunk-TJT4NSFN.js.map} +0 -0
  834. /package/dist/{chunk-RQFBLYYH.js.map → chunk-TN55JKIU.js.map} +0 -0
  835. /package/dist/{chunk-P4BZ7YE6.js.map → chunk-TTVKL3RD.js.map} +0 -0
  836. /package/dist/{chunk-UCTJJYVC.js.map → chunk-TTW4MAOJ.js.map} +0 -0
  837. /package/dist/{chunk-D6P5PSHU.js.map → chunk-U3ON6YW3.js.map} +0 -0
  838. /package/dist/{chunk-VUFMV5Q5.js.map → chunk-U3PPLAFB.js.map} +0 -0
  839. /package/dist/{chunk-WVQ47UTI.js.map → chunk-UEWIIYGA.js.map} +0 -0
  840. /package/dist/{chunk-SDSAQ5YS.js.map → chunk-UJE7IKQ4.js.map} +0 -0
  841. /package/dist/{chunk-AFZUPCBK.js.map → chunk-V3WWNKHU.js.map} +0 -0
  842. /package/dist/{chunk-CKW267ZK.js.map → chunk-VI7YYAXV.js.map} +0 -0
  843. /package/dist/{chunk-KJYD5OJ4.js.map → chunk-VLVMJDGD.js.map} +0 -0
  844. /package/dist/{chunk-2SWQ6HIK.js.map → chunk-W3FAKT3D.js.map} +0 -0
  845. /package/dist/{chunk-P7FQUGED.js.map → chunk-WQSL6MCA.js.map} +0 -0
  846. /package/dist/{chunk-GSFNH4C5.js.map → chunk-WROCSDVL.js.map} +0 -0
  847. /package/dist/{chunk-U7Q2Y6WG.js.map → chunk-X4HGBK4G.js.map} +0 -0
  848. /package/dist/{chunk-ZCNCQGWK.js.map → chunk-X4XYUNRL.js.map} +0 -0
  849. /package/dist/{chunk-H2RHA73H.js.map → chunk-XM6WEANW.js.map} +0 -0
  850. /package/dist/{chunk-2N2KNXTF.js.map → chunk-XO27IMBE.js.map} +0 -0
  851. /package/dist/{chunk-QPMLACIK.js.map → chunk-XY6KOMRN.js.map} +0 -0
  852. /package/dist/{chunk-6SK3MTYJ.js.map → chunk-Y5UCOBQN.js.map} +0 -0
  853. /package/dist/{chunk-I2IZ53QS.js.map → chunk-Y7ZS724A.js.map} +0 -0
  854. /package/dist/{chunk-CJMU3G2J.js.map → chunk-YCNKH5P6.js.map} +0 -0
  855. /package/dist/{chunk-O6DRUOUF.js.map → chunk-YESTO24O.js.map} +0 -0
  856. /package/dist/{chunk-F65LT7XV.js.map → chunk-YZKA7UJK.js.map} +0 -0
  857. /package/dist/{chunk-2DFH74T4.js.map → chunk-ZB6BX4GO.js.map} +0 -0
  858. /package/dist/{chunk-7AR2R7TV.js.map → chunk-ZDWU52DJ.js.map} +0 -0
  859. /package/dist/{chunk-M7E66OSC.js.map → chunk-ZPIMPOHV.js.map} +0 -0
  860. /package/dist/native/chunks/{chunk-LB65S6C7.js.map → chunk-4KWFRDI2.js.map} +0 -0
  861. /package/dist/native/chunks/{chunk-S5SLTMPB.js.map → chunk-5IASLIBI.js.map} +0 -0
  862. /package/dist/native/chunks/{chunk-IVNAQJY6.js.map → chunk-GUBTMR2K.js.map} +0 -0
  863. /package/dist/native/chunks/{chunk-VAD5YVIZ.js.map → chunk-OI57L6WL.js.map} +0 -0
  864. /package/dist/native/chunks/{chunk-7UEJ2FMQ.js.map → chunk-X6RQGKGF.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/CreatableSelect/CreatableSelect.tsx"],"sourcesContent":["'use client';\n\nimport type { Theme } from '@mui/material/styles/index.js';\nimport Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete/index.js';\nimport type { AutocompleteRenderInputParams } from '@mui/material/Autocomplete/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport { useId, useMemo } from 'react';\n\nimport { stackedOverlayZIndex } from '../../../tokens/layers';\nimport { FormControl, FormLabel, FormMessage } from '../Form';\nimport type { CreatableSelectOption, CreatableSelectProps } from './CreatableSelect.types';\nimport type { SizeValue } from '../../../tokens/scales';\n\nimport { fieldEdge } from '../../../tokens/field-edge';\nimport { fieldRadiusPx } from '../../../tokens/field-radius';\n\n/** Internal option shape: a real option, or the synthetic \"create new\" row. */\ninterface InternalOption extends CreatableSelectOption {\n /** True for the synthetic row that triggers {@link CreatableSelectProps.onCreate}. */\n isCreate?: boolean;\n}\n\n/** Prefix that marks a synthetic create-row value so it can never collide with a real one. */\nconst CREATE_PREFIX = ' create:';\n\nconst filterOptions = createFilterOptions<InternalOption>();\n\n/** How far one nesting level indents a dropdown row, in px. */\nconst INDENT_STEP = 16;\n\n/** `sm`/`md` → MUI's own scale, the same mapping {@link Input} uses. */\n// All five house stops onto MUI's two. `xs`/`sm` draw small; `md` and up draw\n// medium, because an autocomplete field has no third or fourth height to give.\nconst MUI_SIZE = { xs: 'small', sm: 'small', md: 'medium', lg: 'medium', xl: 'medium' } as const;\n\n/** Match the outlined border treatment of `Input` so siblings look identical. */\nconst fieldSx = {\n '& .MuiOutlinedInput-root': {\n borderRadius: fieldRadiusPx,\n '& fieldset': {\n borderColor: (theme: Theme) => fieldEdge(theme),\n },\n '&:hover fieldset': { borderColor: 'primary.main' },\n '&.Mui-focused fieldset': { borderColor: 'primary.main', borderWidth: 2 },\n '&.Mui-error fieldset': { borderColor: 'error.main' },\n },\n} as const;\n\n/**\n * The filter that appends the synthetic \"create\" row when the typed text matches\n * no existing option. Built per render from the two props it closes over.\n */\nfunction buildFilter(\n onCreate: CreatableSelectProps['onCreate'],\n createOptionLabel: (input: string) => string,\n) {\n return (available: InternalOption[], params: { inputValue: string }): InternalOption[] => {\n const filtered = filterOptions(available, params as Parameters<typeof filterOptions>[1]);\n const input = params.inputValue.trim();\n const alreadyExists = available.some(\n (option) => option.label.toLowerCase() === input.toLowerCase(),\n );\n if (input && !alreadyExists && onCreate) {\n filtered.push({\n value: `${CREATE_PREFIX}${input}`,\n label: createOptionLabel(input),\n isCreate: true,\n });\n }\n return filtered;\n };\n}\n\n/**\n * A nested option is indented on its ROW; the label itself stays the bare name,\n * so the closed field never shows the tree drawing (see `depth`).\n */\nfunction renderIndentedOption(\n props: React.HTMLAttributes<HTMLLIElement>,\n option: InternalOption,\n): React.JSX.Element {\n const { key, ...rest } = props as typeof props & { key?: string };\n return (\n <li\n key={key ?? option.value}\n {...rest}\n style={{ paddingLeft: INDENT_STEP * (1 + (option.depth ?? 0)) }}\n >\n {option.label}\n </li>\n );\n}\n\n/** The text field Autocomplete renders, with the library's border + a loading adornment. */\nfunction renderField(\n params: AutocompleteRenderInputParams,\n field: {\n inputId: string;\n placeholder?: string;\n error?: string;\n loading: boolean;\n size: SizeValue;\n dataTestId: string;\n },\n): React.JSX.Element {\n return (\n <TextField\n {...params}\n id={field.inputId}\n placeholder={field.placeholder}\n error={Boolean(field.error)}\n size={MUI_SIZE[field.size]}\n sx={fieldSx}\n inputProps={{ ...params.inputProps, 'data-testid': `${field.dataTestId}-input` }}\n slotProps={{\n input: {\n ...params.InputProps,\n endAdornment: (\n <>\n {field.loading ? <CircularProgress color=\"inherit\" size={18} /> : null}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n }}\n />\n );\n}\n\n/**\n * The option list, plus the selected OBJECT MUI wants, from the controlled value.\n * `depth` is carried through: it is what {@link renderIndentedOption} draws.\n */\nfunction useInternalOptions(\n options: CreatableSelectOption[],\n value: string | null,\n): { items: InternalOption[]; selected: InternalOption | null } {\n const items = useMemo<InternalOption[]>(\n () => options.map(({ value: optionValue, label, depth }) => ({\n value: optionValue,\n label,\n depth,\n })),\n [options],\n );\n const selected = useMemo<InternalOption | null>(\n () => items.find((option) => option.value === value) ?? null,\n [items, value],\n );\n return { items, selected };\n}\n\n/** Route a picked row: cleared, the synthetic create row, or a real option. */\nfunction handlePick(\n next: InternalOption | null,\n onChange: CreatableSelectProps['onChange'],\n onCreate: CreatableSelectProps['onCreate'],\n): void {\n if (!next) {\n onChange(null);\n return;\n }\n if (next.isCreate) {\n void onCreate?.(next.value.slice(CREATE_PREFIX.length));\n return;\n }\n onChange(next.value);\n}\n\n/**\n * A single-select, searchable combobox that can create a new option on the fly.\n *\n * Type to filter {@link CreatableSelectProps.options}; when the typed text matches\n * no option and {@link CreatableSelectProps.onCreate} is provided, a \"create\" row\n * appears and selecting it (Enter or click) calls `onCreate` with the raw text —\n * the parent persists it, then feeds the new option back via `options`/`value`.\n *\n * Chrome matches the library's other form fields: an external {@link FormLabel}\n * above the control (not a floating label), the same outlined border treatment as\n * {@link Input} and the same `sm`/`md` scale, so it lines up with sibling fields\n * in a grid row.\n */\nexport function CreatableSelect({\n options,\n value,\n onChange,\n onCreate,\n label,\n error,\n placeholder,\n createOptionLabel,\n noOptionsText,\n disabled = false,\n loading = false,\n fullWidth = true,\n size = 'md',\n dataTestId = 'creatable-select',\n}: CreatableSelectProps): React.JSX.Element {\n const inputId = useId();\n const { items, selected } = useInternalOptions(options, value);\n\n return (\n <FormControl fullWidth={fullWidth} error={Boolean(error)}>\n {label && (\n <FormLabel htmlFor={inputId} error={Boolean(error)}>\n {label}\n </FormLabel>\n )}\n <Autocomplete<InternalOption, false, false, false>\n value={selected}\n options={items}\n disabled={disabled}\n loading={loading}\n fullWidth={fullWidth}\n size={MUI_SIZE[size]}\n handleHomeEndKeys\n selectOnFocus\n clearOnBlur\n data-testid={dataTestId}\n noOptionsText={noOptionsText}\n // Lift the dropdown above stacked modals: the default popup z-index is\n // `modal` (1300), but a stacked sheet at depth ≥2 sits at 1300 + depth*10,\n // which would otherwise cover the options. The height is the token's\n // now — this component used to be the only place the rule was written\n // down, which is how `CategorySelect` came to be missing it (12-57).\n slotProps={{ popper: { sx: { zIndex: stackedOverlayZIndex } } }}\n getOptionLabel={(option) => (typeof option === 'string' ? option : option.label)}\n isOptionEqualToValue={(option, current) => option.value === current.value}\n renderOption={renderIndentedOption}\n filterOptions={buildFilter(onCreate, createOptionLabel)}\n onChange={(_event, next) => handlePick(next, onChange, onCreate)}\n renderInput={(params) =>\n renderField(params, { inputId, placeholder, error, loading, size, dataTestId })\n }\n />\n {error && <FormMessage error dataTestId={`${dataTestId}-message`}>{error}</FormMessage>}\n </FormControl>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,OAAO,gBAAgB,2BAA2B;AAElD,OAAO,sBAAsB;AAC7B,OAAO,eAAe;AACtB,SAAS,OAAO,eAAe;AA6E3B,SAmCQ,UAnCR,KAmCQ,YAnCR;AA5DJ,IAAM,gBAAgB;AAEtB,IAAM,gBAAgB,oBAAoC;AAG1D,IAAM,cAAc;AAKpB,IAAM,WAAW,EAAE,IAAI,SAAS,IAAI,SAAS,IAAI,UAAU,IAAI,UAAU,IAAI,SAAS;AAGtF,IAAM,UAAU;AAAA,EACd,4BAA4B;AAAA,IAC1B,cAAc;AAAA,IACd,cAAc;AAAA,MACZ,aAAa,CAAC,UAAiB,UAAU,KAAK;AAAA,IAChD;AAAA,IACA,oBAAoB,EAAE,aAAa,eAAe;AAAA,IAClD,0BAA0B,EAAE,aAAa,gBAAgB,aAAa,EAAE;AAAA,IACxE,wBAAwB,EAAE,aAAa,aAAa;AAAA,EACtD;AACF;AAMA,SAAS,YACP,UACA,mBACA;AACA,SAAO,CAAC,WAA6B,WAAqD;AACxF,UAAM,WAAW,cAAc,WAAW,MAA6C;AACvF,UAAM,QAAQ,OAAO,WAAW,KAAK;AACrC,UAAM,gBAAgB,UAAU;AAAA,MAC9B,CAAC,WAAW,OAAO,MAAM,YAAY,MAAM,MAAM,YAAY;AAAA,IAC/D;AACA,QAAI,SAAS,CAAC,iBAAiB,UAAU;AACvC,eAAS,KAAK;AAAA,QACZ,OAAO,GAAG,aAAa,GAAG,KAAK;AAAA,QAC/B,OAAO,kBAAkB,KAAK;AAAA,QAC9B,UAAU;AAAA,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AA,IACC,SAAS,oBAAC,eAAY,OAAK,MAAC,YAAY,GAAG,UAAU,YAAa,iBAAM;AAAA,KAC3E;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/layout/ContentToolbar/FilterTrigger.tsx"],"sourcesContent":["'use client';\n\nimport FilterIcon from '@mui/icons-material/FilterListRounded';\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport React from 'react';\n\nimport type { FilterTriggerProps } from './ContentToolbar.types';\nimport { fieldRadiusPx } from '../../../tokens/field-radius';\n\n/**\n * Labeled filter toggle: a \"Filtros\" button (styled like the sibling toolbar\n * controls) with a funnel icon and, when filters are active, a count badge — so\n * it's obvious that the list is filtered and by how many facets. The panel itself\n * is supplied by the consumer.\n */\nexport function FilterTrigger({\n open,\n onOpenChange,\n hasActiveFilters = false,\n activeCount = 0,\n label = 'Filtros',\n 'data-testid': testId = 'toggle-filters-btn',\n}: FilterTriggerProps): React.JSX.Element {\n const active = activeCount > 0 || hasActiveFilters;\n return (\n <Button\n variant=\"text\"\n size=\"small\"\n color=\"inherit\"\n data-testid={testId}\n aria-expanded={open}\n aria-label={open ? 'Close filters' : 'Open filters'}\n onClick={() => onOpenChange(!open)}\n startIcon={<FilterIcon sx={{ fontSize: 16 }} />}\n sx={{\n minWidth: 0,\n height: 32,\n px: 1,\n gap: 0.25,\n borderRadius: fieldRadiusPx,\n textTransform: 'none',\n fontWeight: 600,\n color: active ? 'primary.main' : 'text.primary',\n bgcolor: open ? 'action.selected' : 'transparent',\n }}\n >\n {label}\n {activeCount > 0 && (\n <Box\n component=\"span\"\n data-testid={`${testId}-count`}\n sx={{\n ml: 0.5,\n minWidth: 18,\n height: 18,\n px: 0.5,\n borderRadius: 999,\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: '0.7rem',\n fontWeight: 700,\n lineHeight: 1,\n bgcolor: 'primary.main',\n color: 'primary.contrastText',\n }}\n >\n {activeCount}\n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ocomplete.parts.tsx"],"sourcesContent":["import LinkIcon from '@mui/icons-material/Link';\nimport SearchIcon from '@mui/icons-material/Search';\nimport Box from '@mui/material/Box/index.js';\nimport Chip from '@mui/material/Chip/index.js';\nimport CircularProgress from '@mui/material/CircularProgress/index.js';\nimport List from '@mui/material/List/index.js';\nimport ListItem from '@mui/material/ListItem/index.js';\nimport ListItemText from '@mui/material/ListItemText/index.js';\nimport Paper from '@mui/material/Paper/index.js';\nimport Popper from '@mui/material/Popper/index.js';\nimport TextField from '@mui/material/TextField/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport { styled } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport { highlightLabel, type MatchMode } from './Autocomplete.helpers';\nimport type { SuggestionItemState, SuggestionType } from './Autocomplete.types';\nimport type { AutocompleteCopy } from '../../../copy';\nimport { fieldRootStyles } from '../../../tokens/field-radius';\n\nconst StyledPopper = styled(Popper)(({ theme }) => ({\n zIndex: theme.zIndex.tooltip,\n width: '100%',\n maxHeight: 300,\n overflow: 'auto',\n // Popper.js writes the computed position (and stamps `data-popper-placement`)\n // in a layout effect that can land AFTER the first paint. Until it does, the\n // element would paint once unpositioned — at the offset-parent origin, far\n // left and full width — then jump under the input, a visible per-keystroke\n // flash as the list re-renders. Hide that unpositioned first frame; it becomes\n // visible the instant popper assigns a placement.\n '&:not([data-popper-placement])': { visibility: 'hidden' },\n}));\n\nconst InlineSuggestionDisplay = styled('div')(() => ({\n position: 'absolute',\n pointerEvents: 'none',\n left: '14px', // Match TextField padding\n top: '50%',\n transform: 'translateY(-50%)',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n zIndex: 1,\n}));\n\nconst UserTextTwin = styled('span')({\n visibility: 'hidden',\n});\n\nconst GhostText = styled('span')(({ theme }) => ({\n color: theme.palette.text.secondary,\n opacity: 0.6,\n}));\n\nconst ChipContainer = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexWrap: 'wrap',\n gap: theme.spacing(0.5),\n marginBottom: theme.spacing(1),\n}));\n\n/** Leading icon for a typed suggestion (search vs. link); null for untyped items. */\nexport function suggestionTypeIcon(type: SuggestionType | undefined): React.ReactNode {\n const sx = { color: 'text.secondary', flexShrink: 0 } as const;\n if (type === 'link') return <LinkIcon fontSize=\"small\" sx={sx} />;\n if (type === 'search') return <SearchIcon fontSize=\"small\" sx={sx} />;\n return null;\n}\n\n/** The inline ghost-text overlay: an invisible twin of the typed text + the grey remainder. */\nfunction GhostOverlay({ inputValue, ghost }: { inputValue: string; ghost: string }): React.JSX.Element {\n return (\n <InlineSuggestionDisplay>\n <UserTextTwin>{inputValue}</UserTextTwin>\n <GhostText>{ghost}</GhostText>\n </InlineSuggestionDisplay>\n );\n}\n\nexport interface AutocompleteInputProps {\n id: string;\n listId: string;\n inputRef: React.RefObject<HTMLInputElement | null>;\n inputValue: string;\n ghost: string;\n showGhost: boolean;\n isInputFocused: boolean;\n open: boolean;\n activeDescendant: string | undefined;\n isLoading: boolean;\n disabled: boolean;\n autoFocus: boolean;\n placeholder: string;\n startAdornment?: React.ReactNode;\n inputAriaLabel?: string;\n inputClassName?: string;\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;\n onKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;\n onFocus: () => void;\n onBlur: () => void;\n onCompositionStart: () => void;\n onCompositionEnd: () => void;\n}\n\n/** The combobox text field plus its inline ghost-text overlay. */\nexport function AutocompleteInput(props: AutocompleteInputProps): React.JSX.Element {\n const showOverlay = Boolean(props.ghost) && props.showGhost && props.isInputFocused;\n return (\n <Box sx={{ position: 'relative' }}>\n {showOverlay && <GhostOverlay inputValue={props.inputValue} ghost={props.ghost} />}\n <TextField\n ref={props.inputRef}\n fullWidth\n sx={fieldRootStyles}\n value={props.inputValue}\n onChange={props.onChange}\n onKeyDown={props.onKeyDown}\n onFocus={props.onFocus}\n onBlur={props.onBlur}\n onCompositionStart={props.onCompositionStart}\n onCompositionEnd={props.onCompositionEnd}\n placeholder={props.placeholder}\n disabled={props.disabled}\n autoFocus={props.autoFocus}\n className={props.inputClassName}\n InputProps={{\n startAdornment: props.startAdornment,\n endAdornment: props.isLoading ? <CircularProgress size={20} /> : undefined,\n }}\n inputProps={{\n role: 'combobox',\n 'aria-expanded': props.open,\n 'aria-controls': props.open ? props.listId : undefined,\n 'aria-activedescendant': props.activeDescendant,\n 'aria-autocomplete': 'list',\n 'aria-label': props.inputAriaLabel,\n id: props.id,\n }}\n />\n </Box>\n );\n}\n\n/** Selected-item chips (multiple mode). */\nexport function ChipList<T>({\n items,\n getKey,\n getLabel,\n onRemove,\n chipClassName,\n}: {\n items: T[];\n getKey: (item: T) => string;\n getLabel: (item: T) => string;\n onRemove: (item: T) => void;\n chipClassName?: string;\n}): React.JSX.Element {\n return (\n <ChipContainer data-testid=\"selected-items-container\">\n {items.map((item, index) => (\n <Chip\n key={`${getKey(item)}-${index}`}\n label={getLabel(item)}\n onDelete={() => onRemove(item)}\n size=\"small\"\n className={chipClassName}\n data-testid={`selected-chip-${index}`}\n />\n ))}\n </ChipContainer>\n );\n}\n\n/** Default suggestion row: per-type icon + highlighted label + optional description. */\nexport function DefaultSuggestion<T>({\n item,\n state,\n getLabel,\n getDescription,\n getSuggestionType,\n matchMode,\n}: {\n item: T;\n state: SuggestionItemState;\n getLabel: (item: T) => string;\n getDescription?: (item: T) => string | undefined;\n getSuggestionType: (item: T) => SuggestionType | undefined;\n matchMode: MatchMode;\n}): React.JSX.Element {\n const label = getLabel(item);\n const description = getDescription?.(item);\n const displayLabel = highlightLabel(label, state.query, matchMode);\n return (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n width: '100%',\n // Bold the matched prefix (not a yellow <mark> highlight).\n '& mark': { backgroundColor: 'transparent', color: 'inherit', fontWeight: 700 },\n }}\n >\n {suggestionTypeIcon(getSuggestionType(item))}\n <ListItemText\n primary={<span dangerouslySetInnerHTML={{ __html: displayLabel }} />}\n secondary={description}\n />\n </Box>\n );\n}\n\n/** A \"Loading…\" row shown while async suggestions resolve. */\nexport function LoadingRow({ label }: { label: string }): React.JSX.Element {\n return (\n <ListItem>\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <CircularProgress size={16} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n </Box>\n </ListItem>\n );\n}\n\n/** The empty \"No results found\" row. */\nexport function NoResultsRow({ label }: { label: string }): React.JSX.Element {\n return (\n <ListItem>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {label}\n </Typography>\n </ListItem>\n );\n}\n\n/** Keep the Popper the same width as its anchor input. */\nconst SAME_WIDTH_MODIFIER = {\n name: 'sameWidth',\n enabled: true,\n fn: ({ state }: { state: { elements: { reference?: unknown }; styles: { popper?: Record<string, string> }; rects: { reference: { width: number } } } }) => {\n if (state.elements.reference && state.styles.popper) {\n state.styles.popper.width = `${state.rects.reference.width}px`;\n }\n },\n phase: 'beforeWrite' as const,\n requires: ['computeStyles'],\n};\n\nexport interface SuggestionListBoxProps<T> {\n copy: AutocompleteCopy;\n open: boolean;\n anchorEl: HTMLElement | null;\n portal: boolean | { container?: HTMLElement };\n listRef: React.RefObject<HTMLUListElement | null>;\n listId: string;\n optionIdPrefix: string;\n items: T[];\n activeIndex: number;\n isLoading: boolean;\n showNoResults: boolean;\n getKey: (item: T) => string;\n onSelect: (item: T) => void;\n onHover: (index: number) => void;\n renderItem: (item: T, active: boolean) => React.ReactNode;\n listClassName?: string;\n itemClassName?: string;\n activeItemClassName?: string;\n}\n\n/** The suggestions dropdown: a same-width Popper with the option list + loading/empty rows. */\nexport function SuggestionListBox<T>({\n copy,\n open,\n anchorEl,\n portal,\n listRef,\n listId,\n optionIdPrefix,\n items,\n activeIndex,\n isLoading,\n showNoResults,\n getKey,\n onSelect,\n onHover,\n renderItem,\n listClassName,\n itemClassName,\n activeItemClassName,\n}: SuggestionListBoxProps<T>): React.JSX.Element {\n return (\n <StyledPopper\n open={open}\n anchorEl={anchorEl}\n placement=\"bottom-start\"\n disablePortal={!portal}\n modifiers={[SAME_WIDTH_MODIFIER]}\n >\n <Paper elevation={8} className={listClassName} data-testid=\"suggestions-dropdown\">\n <List\n ref={listRef}\n role=\"listbox\"\n id={listId}\n dense\n sx={{ maxHeight: 300, overflow: 'auto' }}\n data-testid=\"suggestions-list\"\n >\n {items.map((item, index) => (\n <ListItem\n key={getKey(item)}\n id={`${optionIdPrefix}-${index}`}\n role=\"option\"\n component=\"div\"\n sx={{\n cursor: 'pointer',\n backgroundColor: index === activeIndex ? 'action.hover' : 'transparent',\n '&:hover': { backgroundColor: 'action.hover' },\n }}\n aria-selected={index === activeIndex}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => onSelect(item)}\n onMouseEnter={() => onHover(index)}\n className={`${itemClassName} ${index === activeIndex ? activeItemClassName : ''}`}\n data-testid={`suggestion-item-${index}`}\n >\n {renderItem(item, index === activeIndex)}\n </ListItem>\n ))}\n {isLoading && <LoadingRow label={copy.loading} />}\n {showNoResults && <NoResultsRow label={copy.noResults} />}\n </List>\n </Paper>\n </StyledPopper>\n );\n}\n"],"mappings":";;;;;;;;AAAA,OAAO,cAAc;AACrB,OAAO,gBAAgB;AACvB,OAAO,SAAS;AAChB,OAAO,UAAU;AACjB,OAAO,sBAAsB;AAC7B,OAAO,UAAU;AACjB,OAAO,cAAc;AACrB,OAAO,kBAAkB;AACzB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAAS,cAAc;AAuDO,cAQ1B,YAR0B;AA/C9B,IAAM,eAAe,OAAO,MAAM,EAAE,CAAC,EAAE,MAAM,OAAO;AAAA,EAClD,QAAQ,MAAM,OAAO;AAAA,EACrB,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOV,kCAAkC,EAAE,YAAY,SAAS;AAC3D,EAAE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]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/Select/Select.tsx"],"sourcesContent":["import FormControl from '@mui/material/FormControl/index.js';\nimport FormHelperText from '@mui/material/FormHelperText/index.js';\nimport InputLabel from '@mui/material/InputLabel/index.js';\nimport MenuItem from '@mui/material/MenuItem/index.js';\nimport MuiSelect from '@mui/material/Select/index.js';\nimport { alpha, type CSSObject, keyframes, styled, type Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport {\n SELECT_BORDER,\n SELECT_GLASS,\n SELECT_GLOW,\n SELECT_GRADIENT,\n SELECT_PULSE,\n selectInputSize,\n} from './Select.metrics';\nimport type { SelectProps } from './Select.types';\n\nimport { splitTestId } from '../../../platform/test-id';\nimport { fieldEdge } from '../../../tokens/field-edge';\nimport { fieldRadius } from '../../../tokens/field-radius';\n\n// Define pulse animation\nconst pulseAnimation = keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 ${SELECT_PULSE.spread}px currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\n/** Glow ring on the outlined input, keyed off the `glow` prop. */\nconst glowStyles = (theme: Theme): CSSObject => ({\n '& .MuiOutlinedInput-root': {\n boxShadow: `0 0 ${SELECT_GLOW.rest.blur}px ${alpha(theme.palette.primary.main, SELECT_GLOW.rest.alpha)}`,\n '&.Mui-focused': {\n boxShadow: `0 0 ${SELECT_GLOW.focused.blur}px ${alpha(theme.palette.primary.main, SELECT_GLOW.focused.alpha)}`,\n },\n },\n});\n\n/** Pulsing halo behind the control, keyed off the `pulse` prop. */\nconst pulseStyles = (theme: Theme): CSSObject => ({\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '0',\n right: '0',\n height: `${SELECT_PULSE.height}px`,\n transform: 'translateY(-50%)',\n borderRadius: fieldRadius(theme),\n backgroundColor: theme.palette.primary.main,\n opacity: SELECT_PULSE.opacity,\n animation: `${pulseAnimation} ${SELECT_PULSE.ms / 1000}s infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n },\n});\n\n/** `glass` variant: translucent, blurred background. */\nconst glassVariant = (theme: Theme): CSSObject => ({\n backgroundColor: alpha(theme.palette.background.paper, SELECT_GLASS.background.rest),\n backdropFilter: `blur(${SELECT_GLASS.blur}px)`,\n border: `${SELECT_BORDER.rest}px solid ${fieldEdge(theme)}`,\n '& fieldset': { border: 'none' },\n '&:hover': {\n backgroundColor: alpha(theme.palette.background.paper, SELECT_GLASS.background.hover),\n borderColor: alpha(theme.palette.primary.main, SELECT_GLASS.hoverBorderAlpha),\n },\n '&.Mui-focused': {\n backgroundColor: alpha(theme.palette.background.paper, SELECT_GLASS.background.focused),\n borderColor: theme.palette.primary.main,\n boxShadow: `0 0 0 ${SELECT_GLASS.focusRing.width}px ${alpha(theme.palette.primary.main, SELECT_GLASS.focusRing.alpha)}`,\n },\n});\n\n/** `gradient` variant: gradient fill with a masked gradient border. */\nconst gradientFill = (theme: Theme, strength: number): string =>\n `linear-gradient(${SELECT_GRADIENT.angleDeg}deg, ${alpha(theme.palette.primary.main, strength)}, ${alpha(theme.palette.secondary.main, strength)})`;\n\nconst gradientVariant = (theme: Theme): CSSObject => ({\n background: gradientFill(theme, SELECT_GRADIENT.fill.rest),\n border: `${SELECT_GRADIENT.borderWidth}px solid transparent`,\n backgroundOrigin: 'border-box',\n backgroundClip: 'padding-box, border-box',\n position: 'relative',\n '& fieldset': { border: 'none' },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n background: `linear-gradient(${SELECT_GRADIENT.angleDeg}deg, ${theme.palette.primary.main}, ${theme.palette.secondary.main})`,\n mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',\n maskComposite: 'exclude',\n padding: `${SELECT_GRADIENT.borderWidth}px`,\n zIndex: -1,\n },\n '&:hover': {\n background: gradientFill(theme, SELECT_GRADIENT.fill.hover),\n },\n '&.Mui-focused': {\n background: gradientFill(theme, SELECT_GRADIENT.fill.focused),\n '&::before': {\n background: `linear-gradient(${SELECT_GRADIENT.angleDeg}deg, ${theme.palette.primary.dark}, ${theme.palette.secondary.dark})`,\n },\n },\n});\n\n/** `default` variant: standard outlined borders with hover/focus/error states. */\nconst defaultVariant = (theme: Theme): CSSObject => ({\n '& fieldset': { borderColor: fieldEdge(theme) },\n '&:hover fieldset': { borderColor: theme.palette.primary.main },\n '&.Mui-focused fieldset': { borderColor: theme.palette.primary.main, borderWidth: SELECT_BORDER.focused },\n '&.Mui-error fieldset': { borderColor: theme.palette.error.main },\n});\n\n/** Pick the variant style block for the outlined input. */\nconst variantStyles = (theme: Theme, variant: SelectProps['variant']): CSSObject => {\n if (variant === 'glass') return glassVariant(theme);\n if (variant === 'gradient') return gradientVariant(theme);\n return defaultVariant(theme);\n};\n\nconst StyledFormControl = styled(FormControl, {\n shouldForwardProp: (prop) => prop !== 'customVariant' && prop !== 'glow' && prop !== 'pulse',\n})<{\n customVariant?: SelectProps['variant'];\n glow?: boolean;\n pulse?: boolean;\n}>(({ theme, customVariant, glow, pulse }) => ({\n position: 'relative',\n ...(glow ? glowStyles(theme) : {}),\n ...(pulse ? pulseStyles(theme) : {}),\n '& .MuiOutlinedInput-root': {\n transition: 'all 0.3s ease',\n borderRadius: fieldRadius(theme),\n ...variantStyles(theme, customVariant),\n },\n}));\n\n/**\n * Build the placeholder item plus one MenuItem per option. Returns a flat ARRAY\n * (not a Fragment): MUI `Select` enumerates its children with `React.Children`,\n * which does not descend into Fragments — a Fragment would hide every option.\n */\nfunction renderMenuItems(\n options: SelectProps['options'],\n placeholder: string | undefined,\n dataTestId: string | undefined,\n): React.ReactNode[] {\n const optionTestId = (value: string | number): string =>\n dataTestId ? `${dataTestId}-option-${value}` : `option-${value}`;\n const items = options.map((option) => (\n <MenuItem\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n data-testid={optionTestId(option.value)}\n >\n {option.label}\n </MenuItem>\n ));\n if (placeholder) {\n items.unshift(\n <MenuItem key=\"__placeholder__\" value=\"\" disabled>\n {placeholder}\n </MenuItem>,\n );\n }\n return items;\n}\n\n/**\n * The house scale as a FormControl size.\n *\n * Not `muiSize`: that collapses five onto MUI's three, and a FormControl takes\n * only two. This component's scale is already narrowed to `sm | md`, so the map\n * is exact rather than lossy.\n */\nconst formControlSize = (size: SelectProps['size']): 'small' | 'medium' | undefined => {\n if (size === undefined) return undefined;\n return selectInputSize(size) === 'sm' ? 'small' : 'medium';\n};\n\nexport const Select = React.forwardRef<HTMLDivElement, SelectProps>(\n (\n {\n // `variant`/`size`/`glow`/`pulse` intentionally have no defaults: undefined\n // resolves to the default variant, MUI's medium size, and no glow/pulse —\n // keeping this render function under the complexity budget.\n variant,\n options,\n label,\n helperText,\n fullWidth = true,\n size,\n error,\n placeholder,\n glow,\n pulse,\n value,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) => {\n const { testId: dataTestId, rest: props } = splitTestId(rest);\n const labelId = React.useId();\n const helperTextId = React.useId();\n const selectId = React.useId();\n\n return (\n <StyledFormControl\n fullWidth={fullWidth}\n size={formControlSize(size)}\n error={error}\n customVariant={variant}\n glow={glow}\n pulse={pulse}\n ref={ref}\n data-testid={dataTestId}\n >\n {label && (\n <InputLabel id={labelId} htmlFor={selectId}>\n {label}\n </InputLabel>\n )}\n <MuiSelect\n id={selectId}\n labelId={label ? labelId : undefined}\n label={label}\n displayEmpty={Boolean(placeholder)}\n aria-describedby={helperText ? helperTextId : undefined}\n data-testid={dataTestId ? `${dataTestId}-select` : 'select'}\n value={value ?? ''}\n {...props}\n /*\n * `role=\"combobox\"` sits on MUI's display DIV, not on the hidden\n * native input that `{...props}` reaches — so an `aria-label` passed\n * to this component never landed on the element carrying the role,\n * and MUI's `aria-labelledby` then fell back to that div's OWN id.\n * The control announced as its current value: a filter's field\n * select read \"Status\" instead of \"Filtro 1 — campo\".\n *\n * Forwarding it here names the right element. The explicit\n * `undefined` clears that self-referential `aria-labelledby`, which\n * would otherwise win — a labelledby always beats a label in the\n * accessible-name computation.\n */\n SelectDisplayProps={\n ariaLabel === undefined\n ? undefined\n : { 'aria-label': ariaLabel, 'aria-labelledby': undefined }\n }\n >\n {renderMenuItems(options, placeholder, dataTestId)}\n </MuiSelect>\n {helperText && (\n <FormHelperText id={helperTextId} error={error}>\n {helperText}\n </FormHelperText>\n )}\n </StyledFormControl>\n );\n },\n);\n\nSelect.displayName = 'Select';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,iBAAiB;AACxB,OAAO,oBAAoB;AAC3B,OAAO,gBAAgB;AACvB,OAAO,cAAc;AACrB,OAAO,eAAe;AACtB,SAAS,OAAuB,WAAW,cAA0B;AACrE,OAAO,WAAW;AA+Jd,cA2DE,YA3DF;AA9IJ,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMC,YAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU3C,IAAM,aAAa,CAAC,WAA6B;AAAA,EAC/C,4BAA4B;AAAA,IAC1B,WAAW,OAAO,WAAY,KAAK,IAAI,MAAM,MAAM,MAAM,QAAQ,QAAQ,MAAM,WAAY,KAAK,KAAK,CAAC;AAAA,IACtG,iBAAiB;AAAA,MACf,WAAW,OAAO,WAAY,QAAQ,IAAI,MAAM,MAAM,MAAM,QAAQ,QAAQ,MAAM,WAAY,QAAQ,KAAK,CAAC;AAAA,IAC9G;AAAA,EACF;AACF;AAGA,IAAM,cAAc,CAAC,WAA6B;AAAA,EAChD,YAAY;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ,GAAG,YAAa,MAAM;AAAA,IAC9B,WAAW;AAAA,IACX,cAAc,YAAY,KAAK;AAAA,IAC/B,iBAAiB,MAAM,QAAQ,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QAC1B;AAAA,QACA,eAAe;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QAEZ;AAAA,mBACC,oBAAC,cAAW,IAAI,SAAS,SAAS,UAC/B,iBACH;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,SAAS,QAAQ,UAAU;AAAA,cAC3B;AAAA,cACA,cAAc,QAAQ,WAAW;AAAA,cACjC,oBAAkB,aAAa,eAAe;AAAA,cAC9C,eAAa,aAAa,GAAG,UAAU,YAAY;AAAA,cACnD,OAAO,SAAS;AAAA,cACf,GAAG;AAAA,cAcJ,oBACE,cAAc,SACV,SACA,EAAE,cAAc,WAAW,mBAAmB,OAAU;AAAA,cAG7D,0BAAgB,SAAS,aAAa,UAAU;AAAA;AAAA,UACnD;AAAA,UACC,cACC,oBAAC,kBAAe,IAAI,cAAc,OAC/B,sBACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/Toggle/Toggle.styles.ts"],"sourcesContent":["import { alpha, keyframes } from '@mui/material/styles/index.js';\nimport type { CSSObject, PaletteColor, Theme } from '@mui/material/styles/index.js';\n\nimport { fieldEdge } from '../../../tokens/field-edge';\nimport { fieldRadius } from '../../../tokens/field-radius';\n\nconst glowAnimation = keyframes`\n 0% { box-shadow: 0 0 5px currentColor; }\n 50% { box-shadow: 0 0 15px currentColor, 0 0 25px currentColor; }\n 100% { box-shadow: 0 0 5px currentColor; }\n`;\n\nconst floatAnimation = keyframes`\n 0%, 100% { transform: translateY(0px); }\n 50% { transform: translateY(-2px); }\n`;\n\ninterface TogglePalette {\n main: string;\n dark: string;\n light: string;\n contrastText: string;\n}\n\nconst neutralPalette = (theme: Theme): TogglePalette => ({\n main: theme.palette.grey?.[700] || '#616161',\n dark: theme.palette.grey?.[800] || '#424242',\n light: theme.palette.grey?.[500] || '#9e9e9e',\n contrastText: '#fff',\n});\n\n// A theme can be handed to us with shades missing, so each one falls back through\n// the palette's own main colour before reaching for primary.\nconst shade = (\n palette: PaletteColor | undefined,\n key: 'dark' | 'light',\n fallback: PaletteColor,\n): string => palette?.[key] || palette?.main || fallback[key];\n\nexport const getColorFromTheme = (theme: Theme, color: string): TogglePalette => {\n if (color === 'neutral') return neutralPalette(theme);\n\n const colorMap: Record<string, PaletteColor> = {\n primary: theme.palette.primary,\n secondary: theme.palette.secondary,\n success: theme.palette.success,\n warning: theme.palette.warning,\n info: theme.palette.info,\n danger: theme.palette.error,\n };\n\n const fallback = theme.palette.primary;\n const palette = colorMap[color] || fallback;\n\n return {\n main: palette?.main || fallback.main,\n dark: shade(palette, 'dark', fallback),\n light: shade(palette, 'light', fallback),\n contrastText: palette?.contrastText || '#fff',\n };\n};\n\nconst SIZE_MAP: Record<string, CSSObject> = {\n xs: { padding: '4px 8px', fontSize: '0.75rem' },\n sm: { padding: '6px 12px', fontSize: '0.875rem' },\n md: { padding: '8px 16px', fontSize: '1rem' },\n lg: { padding: '10px 20px', fontSize: '1.125rem' },\n xl: { padding: '12px 24px', fontSize: '1.25rem' },\n};\n\nexport const baseStyles = (\n theme: Theme,\n colorPalette: TogglePalette,\n customSize: string,\n): CSSObject => ({\n textTransform: 'none',\n fontWeight: 500,\n borderRadius: fieldRadius(theme),\n transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',\n border: `2px solid ${fieldEdge(theme)}`,\n color: theme.palette.text.primary,\n backgroundColor: 'transparent',\n position: 'relative',\n overflow: 'hidden',\n\n // A zero-sized circle that grows to fill the button on hover.\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n left: '50%',\n width: 0,\n height: 0,\n borderRadius: '50%',\n backgroundColor: alpha(colorPalette.main, 0.2),\n transform: 'translate(-50%, -50%)',\n transition: 'width 0.4s, height 0.4s',\n },\n\n '&:hover': {\n backgroundColor: alpha(colorPalette.main, 0.08),\n borderColor: colorPalette.main,\n transform: 'translateY(-1px)',\n boxShadow: `0 4px 8px ${alpha(colorPalette.main, 0.15)}`,\n animation: `${floatAnimation} 2s ease-in-out infinite`,\n\n '&::before': {\n width: '100%',\n height: '100%',\n },\n },\n\n '&:active': {\n transform: 'scale(0.98)',\n },\n\n '&.Mui-selected': {\n backgroundColor: colorPalette.main,\n color: colorPalette.contrastText || '#fff',\n borderColor: colorPalette.main,\n boxShadow: `0 2px 8px ${alpha(colorPalette.main, 0.3)}`,\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n background: `linear-gradient(135deg, transparent, ${alpha('#fff', 0.1)})`,\n pointerEvents: 'none',\n },\n\n '&:hover': {\n backgroundColor: colorPalette.dark,\n transform: 'translateY(-2px) scale(1.02)',\n boxShadow: `0 6px 20px ${alpha(colorPalette.main, 0.4)}`,\n },\n },\n\n // Size wins over everything above it.\n ...(SIZE_MAP[customSize] ?? {}),\n});\n\nexport const variantStyles = (\n customVariant: string | undefined,\n colorPalette: TogglePalette,\n): CSSObject => {\n switch (customVariant) {\n case 'outline':\n return {\n backgroundColor: 'transparent',\n border: `2px solid ${colorPalette.main}`,\n color: colorPalette.main,\n\n '&.Mui-selected': {\n backgroundColor: colorPalette.main,\n color: colorPalette.contrastText || '#fff',\n },\n };\n case 'soft':\n return {\n backgroundColor: alpha(colorPalette.main, 0.1),\n border: 'none',\n color: colorPalette.main,\n\n '&.Mui-selected': {\n backgroundColor: alpha(colorPalette.main, 0.2),\n color: colorPalette.main,\n },\n };\n default:\n return {};\n }\n};\n\ninterface ToggleEffects {\n glass?: boolean;\n gradient?: boolean;\n glow?: boolean;\n}\n\n// gradient and glow both target `.Mui-selected`; with both on, the later spread\n// wins, so glow's animation replaces gradient's.\nexport const effectStyles = (\n theme: Theme,\n colorPalette: TogglePalette,\n { glass, gradient, glow }: ToggleEffects,\n): CSSObject => ({\n ...(glass && {\n backgroundColor: alpha(theme.palette.background.paper, 0.1),\n backdropFilter: 'blur(20px)',\n border: `1px solid ${alpha(theme.palette.divider, 0.2)}`,\n }),\n\n ...(gradient && {\n '&.Mui-selected': {\n background: `linear-gradient(135deg, ${colorPalette.light}, ${colorPalette.main}, ${colorPalette.dark})`,\n backgroundSize: '200% 200%',\n animation: `${floatAnimation} 3s ease-in-out infinite`,\n border: 'none',\n\n '&:hover': {\n backgroundPosition: '100% 100%',\n },\n },\n }),\n\n ...(glow && {\n '&.Mui-selected': {\n animation: `${glowAnimation} 2s ease-in-out infinite`,\n boxShadow: `0 0 15px ${alpha(colorPalette.main, 0.6)}`,\n },\n }),\n});\n"],"mappings":";;;;;;;;AAAA,SAAS,OAAO,iBAAiB;AAMjC,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAMtB,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAYvB,IAAM,iBAAiB,CAAC,WAAiC;AAAA,EACvD,MAAM,MAAM,QAAQ,OAAO,GAAG,KAAK;AAAA,EACnC,MAAM,MAAM,QAAQ,OAAO,GAAG,KAAK;AAAA,EACnC,OAAO,MAAM,QAAQ,OAAO,GAAG,KAAK;AAAA,EACpC,cAAc;AAChB;AAIA,IAAM,QAAQ,CACZ,SACA,KACA,aACW,UAAU,GAAG,KAAK,SAAS,QAAQ,SAAS,GAAG;AAErD,IAAM,oBAAoB,CAAC,OAAc,UAAiC;AAC/E,MAAI,UAAU,UAAW,QAAO,eAAe,KAAK;AAEpD,QAAM,WAAyC;AAAA,IAC7C,SAAS,MAAM,QAAQ;AAAA,IACvB,WAAW,MAAM,QAAQ;AAAA,IACzB,SAAS,MAAM,QAAQ;AAAA,IACvB,SAAS,MAAM,QAAQ;AAAA,IACvB,MAAM,MAAM,QAAQ;AAAA,IACpB,QAAQ,MAAM,QAAQ;AAAA,EACxB;AAEA,QAAM,WAAW,MAAM,QAAQ;AAC/B,QAAM,UAAU,SAAS,KAAK,KAAK;AAEnC,SAAO;AAAA,IACL,MAAM,SAAS,QAAQ,SAAS;AAAA,IA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;AAAA,IAChB,QAAQ,aAAa,MAAM,MAAM,QAAQ,SAAS,GAAG,CAAC;AAAA,EACxD;AAAA,EAEA,GAAI,YAAY;AAAA,IACd,kBAAkB;AAAA,MAChB,YAAY,2BAA2B,aAAa,KAAK,KAAK,aAAa,IAAI,KAAK,aAAa,IAAI;AAAA,MACrG,gBAAgB;AAAA,MAChB,WAAW,GAAG,cAAc;AAAA,MAC5B,QAAQ;AAAA,MAER,WAAW;AAAA,QACT,oBAAoB;AAAA,MACtB;AAAA,IACF;AAAA,EACF;AAAA,EAEA,GAAI,QAAQ;AAAA,IACV,kBAAkB;AAAA,MAChB,WAAW,GAAG,aAAa;AAAA,MAC3B,WAAW,YAAY,MAAM,aAAa,MAAM,GAAG,CAAC;AAAA,IACtD;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/total-form/SubmitButton.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\n\nimport { Button } from '../Button';\nimport { useFormContext } from './FormContext';\n\n/** Props for {@link SubmitButton}. */\nexport interface SubmitButtonProps {\n /** Button label. */\n children: React.ReactNode;\n /** Test id; defaults to `total-form-submit`. Override when a page renders more than one form. */\n dataTestId?: string;\n}\n\n/**\n * The height of a form input control (see `Input` — `.MuiInputBase-root`), so a\n * submit button placed inline with fields lines up with them instead of sitting\n * shorter. Kept in sync with that value by hand.\n */\nconst FIELD_HEIGHT = 56;\n\n/**\n * Submit control wired to {@link useFormContext}. Wraps the existing `@12-apps/ui`\n * `Button` as a `type=\"submit\"` button (testid `total-form-submit`) and\n * reflects the form's `submitting` state via `loading`/`disabled`.\n *\n * It matches the form field height and never wraps its label, so it aligns with\n * an adjacent input on the same row (and stays full-width when the row stacks).\n */\nexport function SubmitButton({\n children,\n dataTestId = 'total-form-submit',\n}: SubmitButtonProps): React.ReactElement {\n const { submitting } = useFormContext();\n\n return (\n <Button\n type=\"submit\"\n dataTestId={dataTestId}\n loading={submitting}\n disabled={submitting}\n // `Button` replaces (not merges) its size styles with this `sx`, so restate\n // the md padding/font here alongside the field-height + no-wrap alignment.\n sx={{ height: FIELD_HEIGHT, px: 2, fontSize: '1rem', flexShrink: 0, whiteSpace: 'nowrap' }}\n >\n {children}\n </Button>\n );\n}\n"],"mappings":";;;;;;;;AAqCI;AAjBJ,IAAM,eAAe;AAUd,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA,aAAa;AACf,GAA0C;AACxC,QAAM,EAAE,WAAW,IAAI,eAAe;AAEtC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,MAGV,IAAI,EAAE,QAAQ,cAAc,IAAI,GAAG,UAAU,QAAQ,YAAY,GAAG,YAAY,SAAS;AAAA,MAExF;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/form/Button/Button.native.tsx","../../../src/components/form/Button/Button.helpers.ts","../../../src/components/form/Button/Button.metrics.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n ActivityIndicator,\n Animated,\n Easing,\n Platform,\n Pressable,\n StyleSheet,\n View,\n type GestureResponderEvent,\n type PressableStateCallbackType,\n type StyleProp,\n type TextStyle,\n type ViewStyle,\n} from 'react-native';\n\nimport { resolveButtonProps } from './Button.helpers';\nimport {\n BUTTON_FONT_WEIGHT,\n BUTTON_ICON_GAP_UNITS,\n BUTTON_LINE_HEIGHT,\n BUTTON_SIZES,\n BUTTON_SPINNER_SIZE,\n BUTTON_WASH_ALPHA,\n GLASS_BACKGROUND_ALPHA,\n GLASS_BACKGROUND_ALPHA_PRESSED,\n GLASS_BORDER_ALPHA,\n GLOW_INNER_ALPHA,\n GLOW_RADIUS,\n ICON_ONLY_PADDING,\n PULSE_ALPHA,\n PULSE_DURATION_MS,\n PULSE_SPREAD,\n buttonPalette,\n gradientStops,\n quietInk,\n} from './Button.metrics';\nimport type { ButtonProps, ButtonVariant } from './Button.types.native';\nimport { renderTextChildren } from '../../../platform/text-children';\nimport { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';\nimport { useUiTheme } from '../../../provider/use-ui-theme.native';\nimport { alpha } from '../../../tokens/color';\nimport type { ColorValue, SizeValue } from '../../../tokens/vocabulary';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/** MUI's `min-width` for a button that carries a label. */\nconst MIN_WIDTH = 64;\n\ninterface Paint {\n container: ViewStyle;\n pressed: ViewStyle;\n label: TextStyle;\n}\n\n/**\n * What the web's `VARIANT_STYLES` paint, as three React Native styles: at rest,\n * while pressed (the web's `:hover`, which touch has no equivalent of), and the\n * label. Same palette arithmetic, same alphas.\n *\n * `gradient` is the one honest gap: React Native core has no gradient fill, so\n * it paints the gradient's first stop. A host wanting the real thing adds a\n * gradient library; the parity ledger records this.\n */\nfunction paintFor(\n theme: UiTheme,\n variant: ButtonVariant,\n color: ColorValue,\n palette: UiPaletteColor,\n active: boolean,\n): Paint {\n const wash = alpha(palette.main, BUTTON_WASH_ALPHA);\n switch (variant) {\n case 'outline':\n return {\n container: { backgroundColor: 'transparent', borderWidth: 1, borderColor: palette.main },\n pressed: { backgroundColor: wash, borderColor: palette.dark },\n label: { color: palette.main },\n };\n case 'ghost':\n return {\n container: { backgroundColor: 'transparent' },\n pressed: { backgroundColor: wash },\n label: { color: quietInk(theme, palette) },\n };\n case 'text':\n return {\n container: { backgroundColor: active ? wash : 'transparent' },\n pressed: { backgroundColor: wash },\n label: { color: quietInk(theme, palette) },\n };\n case 'glass':\n return {\n container: {\n backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA),\n borderWidth: 1,\n borderColor: alpha(theme.palette.divider, GLASS_BORDER_ALPHA),\n },\n pressed: { backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA_PRESSED) },\n label: { color: palette.main },\n };\n case 'gradient': {\n const [from, to] = gradientStops(theme, color, palette);\n return {\n container: { backgroundColor: from },\n pressed: { backgroundColor: to },\n label: { color: '#fff' },\n };\n }\n default:\n return {\n container: { backgroundColor: palette.main },\n pressed: { backgroundColor: palette.dark },\n label: { color: palette.contrastText || '#fff' },\n };\n }\n}\n\n/** MUI's disabled treatment per variant family, so a disabled button reads as one on both sides. */\nfunction disabledPaint(theme: UiTheme, variant: ButtonVariant): Paint {\n const filled = variant === 'solid' || variant === 'gradient' || variant === 'glass';\n return {\n container: filled\n ? { backgroundColor: theme.palette.action.disabledBackground, borderWidth: 0 }\n : variant === 'outline'\n ? { backgroundColor: 'transparent', borderWidth: 1, borderColor: theme.palette.action.disabledBackground }\n : { backgroundColor: 'transparent' },\n pressed: {},\n label: { color: theme.palette.action.disabled },\n };\n}\n\nfunction sizeStyle(theme: UiTheme, size: SizeValue, iconOnly: boolean, hasIcon: boolean): ViewStyle {\n const metrics = BUTTON_SIZES[size];\n if (iconOnly) {\n return { padding: ICON_ONLY_PADDING[size], minWidth: 0 };\n }\n return {\n paddingVertical: metrics.paddingVertical,\n paddingHorizontal: metrics.paddingHorizontal,\n minWidth: MIN_WIDTH,\n gap: hasIcon ? theme.spacing(BUTTON_ICON_GAP_UNITS) : undefined,\n };\n}\n\nfunction glowStyle(palette: UiPaletteColor): ViewStyle {\n return Platform.select<ViewStyle>({\n android: { elevation: 8 },\n default: {\n shadowColor: palette.main,\n shadowOpacity: GLOW_INNER_ALPHA,\n shadowRadius: GLOW_RADIUS,\n shadowOffset: { width: 0, height: 0 },\n },\n });\n}\n\n/** The web's `::after` pulse ring: a looped scale-and-fade behind the button. */\nfunction Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, {\n toValue: 1,\n duration: PULSE_DURATION_MS,\n easing: Easing.out(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n StyleSheet.absoluteFill,\n {\n pointerEvents: 'none',\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE_ALPHA, 0, 0] }),\n transform: [\n { scale: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [1, 1 + PULSE_SPREAD / 40, 1] }) },\n ],\n },\n ]}\n />\n );\n}\n\n\ntype ResolvedProps = ReturnType<typeof resolveButtonProps<ButtonProps>>;\n\ninterface ButtonLook {\n inactive: boolean;\n palette: UiPaletteColor;\n radius: number;\n label: TextStyle;\n container: (state: PressableStateCallbackType) => StyleProp<ViewStyle>;\n}\n\n/**\n * Everything the button paints, decided once per render from the resolved\n * props and the theme. Kept out of the component so the component reads as\n * structure — what renders where — and this reads as arithmetic.\n */\nfunction buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {\n const { variant, color, size, loading, icon, children, glow, pulse, active, disabled, style } = props;\n const palette = buttonPalette(theme, color);\n const iconOnly = !loading && icon != null && children == null;\n const inactive = Boolean(disabled) || loading;\n const paint = inactive ? disabledPaint(theme, variant) : paintFor(theme, variant, color, palette, active);\n // The theme's one field radius, so a button and the input beside it agree.\n const radius = theme.radius.field;\n const metrics = BUTTON_SIZES[size];\n // The web button is `overflow: hidden` (its ripple needs it) unless the pulse\n // ring turns it visible; on native the glow's shadow needs it visible too,\n // because a view's own shadow is clipped by its own overflow there.\n const overflow: ViewStyle['overflow'] = pulse || glow ? 'visible' : 'hidden';\n const sized = sizeStyle(theme, size, iconOnly, icon != null && !loading);\n const glowing = glow && !inactive ? glowStyle(palette) : null;\n\n return {\n inactive,\n palette,\n radius,\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: metrics.fontSize,\n lineHeight: metrics.fontSize * BUTTON_LINE_HEIGHT,\n fontWeight: String(BUTTON_FONT_WEIGHT) as TextStyle['fontWeight'],\n textAlign: 'center',\n ...paint.label,\n },\n container: (state) => [\n styles.base,\n { borderRadius: radius, overflow },\n sized,\n paint.container,\n state.pressed && !inactive ? paint.pressed : null,\n glowing,\n style,\n ],\n };\n}\n\n/** The spinner that replaces the label while loading; `role` comes from react-native's ActivityIndicator. */\nfunction Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {\n return (\n <ActivityIndicator\n size={Platform.OS === 'ios' ? 'small' : BUTTON_SPINNER_SIZE}\n color={color}\n testID={testID}\n accessibilityLabel=\"loading\"\n />\n );\n}\n\nexport const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {\n const resolved = resolveButtonProps(rawProps);\n const { loading, icon, iconPosition, pulse, ripple, children, onClick, onPress, ...others } = resolved;\n const theme = useUiTheme();\n const look = buttonLook(theme, resolved);\n\n // The shared stories pass `'data-testid'` as a plain prop; honour it here and\n // keep all three spellings off the element (react-native-web would drop them).\n const testId = resolveTestId(others, 'button');\n const idFor = (suffix: string) => childTestId(others, suffix, 'button');\n const rest = withoutTestIdProps(others);\n // `buttonLook` consumed these; they are not Pressable props.\n const { variant: _v, color: _c, size: _s, glow: _g, active: _a, disabled: _d, style: _st, ...pressable } = rest;\n\n const handlePress = (event: GestureResponderEvent): void => {\n onClick?.(event);\n onPress?.(event);\n };\n\n const iconNode =\n !loading && icon ? (\n <View style={styles.icon} testID={idFor('icon')}>\n {icon}\n </View>\n ) : null;\n\n return (\n <Pressable\n ref={ref}\n role=\"button\"\n aria-disabled={look.inactive}\n aria-busy={loading}\n disabled={look.inactive}\n onPress={handlePress}\n android_ripple={ripple && !look.inactive ? { color: alpha(look.palette.main, 0.2), borderless: false } : undefined}\n style={look.container}\n testID={testId}\n {...pressable}\n >\n {pulse && !look.inactive ? <Pulse color={look.palette.main} radius={look.radius} testID={idFor('pulse')} /> : null}\n {iconPosition === 'left' ? iconNode : null}\n {loading ? <Spinner color={look.label.color as string} testID={idFor('loading')} /> : renderTextChildren(children, look.label, 1)}\n {iconPosition === 'right' ? iconNode : null}\n </Pressable>\n );\n});\n\nButton.displayName = 'Button';\n\nconst styles = StyleSheet.create({\n base: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n alignSelf: 'flex-start',\n position: 'relative',\n },\n icon: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n","import type { ButtonBaseProps } from './Button.base';\n\ntype ButtonDefaultedKeys =\n | 'variant'\n | 'color'\n | 'size'\n | 'loading'\n | 'iconPosition'\n | 'glow'\n | 'pulse'\n | 'ripple'\n | 'active';\n\n/**\n * Generic over the renderer's own props: the web and the native `Button` pass\n * different handler types through, and both come back out untouched.\n */\ntype ResolvedButtonProps<P extends ButtonBaseProps> = P &\n Required<Pick<ButtonBaseProps, ButtonDefaultedKeys>>;\n\nconst BUTTON_DEFAULTS: Required<Pick<ButtonBaseProps, 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 = <P extends ButtonBaseProps>(props: P): Partial<P> =>\n Object.fromEntries(\n Object.entries(props).filter(([, value]) => value !== undefined),\n ) as Partial<P>;\n\nexport const resolveButtonProps = <P extends ButtonBaseProps>(props: P): ResolvedButtonProps<P> =>\n ({ ...BUTTON_DEFAULTS, ...definedProps(props) }) as ResolvedButtonProps<P>;\n","import { darken, lighten } from '../../../tokens/color';\nimport type { ColorValue, SizeValue } from '../../../tokens/vocabulary';\nimport type { UiPaletteColor, UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Button` RENDERERS DRAW WITH.\n *\n * `Button.styles.ts` (web, emotion) and `Button.native.tsx` (React Native)\n * read this one table. The web turns the px into rem and the padding into a\n * shorthand string; native uses the numbers as they are. Neither restates a\n * value, which is what keeps a native `md` button 16px tall of padding and\n * 16px of type exactly like the web one.\n */\nexport interface ButtonSizeMetrics {\n paddingVertical: number;\n paddingHorizontal: number;\n fontSize: number;\n}\n\nexport const BUTTON_SIZES: Record<SizeValue, ButtonSizeMetrics> = {\n xs: { paddingVertical: 2, paddingHorizontal: 8, fontSize: 12 },\n sm: { paddingVertical: 6, paddingHorizontal: 12, fontSize: 14 },\n md: { paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },\n lg: { paddingVertical: 10, paddingHorizontal: 20, fontSize: 18 },\n xl: { paddingVertical: 12, paddingHorizontal: 24, fontSize: 20 },\n};\n\n/** A button that is only an icon is square: uniform padding, no min-width. */\nexport const ICON_ONLY_PADDING: Record<SizeValue, number> = {\n xs: 2,\n sm: 5,\n md: 7,\n lg: 9,\n xl: 11,\n};\n\n/**\n * The start/end icon slot's font-size, in px — MUI's `medium` value, pinned\n * (12-74).\n *\n * MUI sizes that slot off its OWN `size` prop, writing 18/20/22 onto the first\n * child of `.MuiButton-startIcon`. We never passed a `size`, so every button in\n * every size has always drawn medium's 20px; now that `size` IS forwarded — so\n * the rendered class finally names the size the button actually is — the number\n * would start moving with it.\n *\n * WHAT THAT ACTUALLY REACHES, measured in a browser rather than assumed: this\n * Button renders its own wrapper span around the icon (it carries the child\n * test id), so MUI's rule lands on the WRAPPER and reaches the glyph only when\n * the glyph takes its size by inheritance — `fontSize=\"inherit\"`, an em-sized\n * SVG, a text or emoji glyph. With the pin removed, such a glyph measured 18px\n * at `xs`/`sm` and 22px at `lg`/`xl` against the 20px it has always been. An\n * icon carrying an absolute size of its own does not move at all: a default\n * `SvgIcon` stayed 24×24 across all five.\n *\n * A silent resize of the inherited case is still a design decision arriving as\n * a side effect of a class-name fix, so it is pinned to what shipped before —\n * `Button.tsx` puts it on that same wrapper. Scaling the glyph with the button\n * is a ticket of its own.\n */\nexport const BUTTON_ICON_GLYPH_SIZE = 20;\n\nexport const BUTTON_FONT_WEIGHT = 500;\n/** Between the icon and the label: `theme.spacing(0.5)`. */\nexport const BUTTON_ICON_GAP_UNITS = 0.5;\nexport const BUTTON_SPINNER_SIZE = 16;\n/** MUI's `line-height` for button text. */\nexport const BUTTON_LINE_HEIGHT = 1.75;\n\n/** The wash behind an outline, ghost or text button while it is hovered or pressed. */\nexport const BUTTON_WASH_ALPHA = 0.1;\nexport const GLASS_BACKGROUND_ALPHA = 0.1;\nexport const GLASS_BACKGROUND_ALPHA_PRESSED = 0.2;\nexport const GLASS_BORDER_ALPHA = 0.2;\nexport const GLOW_INNER_ALPHA = 0.6;\nexport const GLOW_OUTER_ALPHA = 0.3;\nexport const GLOW_RADIUS = 20;\nexport const PULSE_ALPHA = 0.3;\nexport const PULSE_DURATION_MS = 2000;\nexport const PULSE_SPREAD = 15;\n\n/**\n * `neutral` has no palette slot of its own in MUI, so `Button.styles.ts` has\n * always drawn it from three greys. Same three greys here.\n */\nexport function buttonPalette(theme: UiTheme, color: ColorValue): UiPaletteColor {\n if (color === 'neutral') {\n return {\n main: theme.palette.grey[700],\n dark: theme.palette.grey[800],\n light: theme.palette.grey[500],\n contrastText: '#fff',\n };\n }\n return theme.palette[color];\n}\n\n/**\n * The label colour for `ghost` and `text`: one step darker than `main` in\n * light mode (lighter in dark), because `main` is chosen to sit UNDER white and\n * is not legible AS text on a tinted surface. See the web `quietInk`.\n */\nexport const quietInk = (theme: UiTheme, palette: UiPaletteColor): string =>\n theme.mode === 'dark' ? lighten(palette.main, 0.35) : darken(palette.main, 0.3);\n\n/** Gradients run between two related hues; the named colours pick a specific pair. */\nexport function gradientStops(\n theme: UiTheme,\n color: ColorValue,\n palette: UiPaletteColor,\n): [string, string] {\n switch (color) {\n case 'primary':\n return [theme.palette.primary.main, theme.palette.secondary.main];\n case 'secondary':\n return [theme.palette.secondary.main, theme.palette.primary.main];\n case 'success':\n case 'warning':\n return [theme.palette[color].light, theme.palette[color].dark];\n case 'danger':\n return [theme.palette.danger.light, theme.palette.danger.dark];\n default:\n return [palette.main, palette.dark];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,YAAY,WAAW;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;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AS;AAAA,MACT,gBAAgB,UAAU,CAAC,KAAK,WAAW,EAAE,OAAO,MAAM,KAAK,QAAQ,MAAM,GAAG,GAAG,YAAY,MAAM,IAAI;AAAA,MACzG,OAAO,KAAK;AAAA,MACZ,QAAQ;AAAA,MACP,GAAG;AAAA,MAEH;AAAA,iBAAS,CAAC,KAAK,WAAW,oBAAC,SAAM,OAAO,KAAK,QAAQ,MAAM,QAAQ,KAAK,QAAQ,QAAQ,MAAM,OAAO,GAAG,IAAK;AAAA,QAC7G,iBAAiB,SAAS,WAAW;AAAA,QACrC,UAAU,oBAAC,WAAQ,OAAO,KAAK,MAAM,OAAiB,QAAQ,MAAM,SAAS,GAAG,IAAK,mBAAmB,UAAU,KAAK,OAAO,CAAC;AAAA,QAC/H,iBAAiB,UAAU,WAAW;AAAA;AAAA;AAAA,EACzC;AAEJ,CAAC;AAED,OAAO,cAAc;AAErB,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AAAA,EACA,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,gBAAgB;AAAA,EAClB;AACF,CAAC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/form/Input/Input.metrics.ts","../../../src/components/form/field-pulse.native.tsx","../../../src/tokens/field-edge.core.ts","../../../src/components/form/Input/Input.look.native.ts"],"sourcesContent":["import type { InputVariant } from './Input.base';\nimport { decomposeColor, recomposeColor } from '../../../tokens/color';\nimport type { UiTheme } from '../../../tokens/theme';\nimport { SIZE_VALUES, type SizeValue } from '../../../tokens/vocabulary';\n\n/**\n * THE NUMBERS BOTH `Input` RENDERERS DRAW WITH.\n *\n * `Input.styles.ts` (web, emotion over MUI's `TextField`) and\n * `Input.native.tsx` (React Native) read this one table. The web turns the px\n * into the padding shorthands and rem it has always emitted; native uses the\n * numbers as they are.\n *\n * Two kinds of number live here, and the difference matters:\n *\n * - the ones `Input.styles.ts` writes itself — the size overrides, the glow,\n * the pulse, the glass and gradient alphas, the filled wash;\n * - the ones MUI supplies UNDER those overrides — `OutlinedInput`'s\n * `16.5px 14px`, `InputBase`'s 23px line box, `FormHelperText`'s 3px lift.\n * The web never writes them, but it draws them, so a native field that\n * wants the same box has to know them. They are MUI 6.5's own values,\n * copied with their source named; a host that re-themes MUI's components\n * moves the web only, which the parity ledger records.\n */\n\nexport interface InputInset {\n top: number;\n right: number;\n bottom: number;\n left: number;\n}\n\n/** MUI gives a text field two heights; the house scale has five. */\nexport type MuiInputSize = 'small' | 'medium';\nexport type MuiInputVariant = 'outlined' | 'filled' | 'standard';\n\n/** Our five variants map onto MUI's three; `glass` and `gradient` restyle an outline. */\nexport const muiVariantFor = (variant: InputVariant): MuiInputVariant => {\n switch (variant) {\n case 'underline':\n return 'standard';\n case 'glass':\n case 'gradient':\n return 'outlined';\n default:\n return variant;\n }\n};\n\n/** Which of MUI's two heights each step of the house scale asks for. */\nexport const INPUT_MUI_SIZE: Record<SizeValue, MuiInputSize> = {\n xs: 'small',\n sm: 'small',\n md: 'medium',\n lg: 'medium',\n xl: 'medium',\n};\n\n/**\n * The three steps MUI has no height for, as `padding` on the input itself.\n *\n * `sm` and `md` are absent on purpose — they ARE MUI's two heights, so they\n * fall through to {@link MUI_INPUT_PADDING} below rather than restating it.\n * (`lg`'s 16px is a hair under `md`'s 16.5px: the override is a round number\n * where MUI's is derived from a 56px box. Kept as written — this table is what\n * the web draws, not what it ought to draw.)\n */\nexport const INPUT_SIZE_OVERRIDES: Partial<Record<SizeValue, { vertical: number; horizontal: number }>> = {\n xs: { vertical: 6, horizontal: 10 },\n lg: { vertical: 16, horizontal: 14 },\n xl: { vertical: 20, horizontal: 16 },\n};\n\n/**\n * MUI's own input padding per variant and height (`OutlinedInput`,\n * `FilledInput`, `InputBase`). The filled insets are lopsided because the\n * floating label sits inside the box on the web.\n */\nexport const MUI_INPUT_PADDING: Record<MuiInputVariant, Record<MuiInputSize, InputInset>> = {\n outlined: {\n small: { top: 8.5, right: 14, bottom: 8.5, left: 14 },\n medium: { top: 16.5, right: 14, bottom: 16.5, left: 14 },\n },\n filled: {\n small: { top: 21, right: 12, bottom: 4, left: 12 },\n medium: { top: 25, right: 12, bottom: 8, left: 12 },\n },\n standard: {\n small: { top: 1, right: 0, bottom: 5, left: 0 },\n medium: { top: 4, right: 0, bottom: 5, left: 0 },\n },\n};\n\n/** The inset the value is drawn at: the size override where there is one, MUI's otherwise. */\nexport function inputPadding(variant: InputVariant, size: SizeValue): InputInset {\n const override = INPUT_SIZE_OVERRIDES[size];\n if (override) {\n return {\n top: override.vertical,\n right: override.horizontal,\n bottom: override.vertical,\n left: override.horizontal,\n };\n }\n return MUI_INPUT_PADDING[muiVariantFor(variant)][INPUT_MUI_SIZE[size]];\n}\n\n/** `theme.typography.body1` and `InputBase`'s `lineHeight: '1.4375em'`, in px. */\nexport const INPUT_FONT_SIZE = 16;\nexport const INPUT_LINE_HEIGHT = 23;\n\n/** MUI's `::placeholder` opacity, which multiplies the ink's own alpha. */\nexport const PLACEHOLDER_OPACITY = { light: 0.42, dark: 0.5 } as const;\n\n/**\n * The placeholder's colour: the field's ink faded by MUI's opacity.\n *\n * `alpha()` REPLACES an alpha channel, and `text.primary` already carries one\n * (`rgba(0, 0, 0, 0.87)`), so `alpha(ink, 0.42)` would be a different grey from\n * the one the browser composites. React Native has no per-placeholder opacity —\n * only `placeholderTextColor` — so the multiplication happens here.\n */\nexport function placeholderInk(theme: UiTheme): string {\n const opacity = theme.mode === 'dark' ? PLACEHOLDER_OPACITY.dark : PLACEHOLDER_OPACITY.light;\n const { type, values } = decomposeColor(theme.palette.text.primary);\n const [first = 0, second = 0, third = 0, own = 1] = values;\n return recomposeColor({\n type: type.startsWith('hsl') ? 'hsla' : 'rgba',\n values: [first, second, third, own * opacity],\n });\n}\n\n/** The outline: 1px at rest, 2px focused, as MUI's `notchedOutline` draws it. */\nexport const INPUT_BORDER = { rest: 1, focused: 2 } as const;\n\n/** `FilledInput`'s and `Input`'s resting underline, MUI's own two greys. */\nexport const UNDERLINE_COLOR = {\n light: 'rgba(0, 0, 0, 0.42)',\n dark: 'rgba(255, 255, 255, 0.7)',\n} as const;\n\n/**\n * The label. It floats into the border on the web and sits above the field on\n * native, but it is the SAME label: 16px body type at MUI's shrunk scale, and\n * left-aligned with the value it names ({@link inputPadding}'s `left`).\n *\n * The 4px gap is MUI's own: a standard field puts 16px between the control's\n * top and the input, and the shrunk label's 12px line box takes the first 12.\n */\nexport const INPUT_LABEL = { scale: 0.75, gap: 4 } as const;\n\n/** `FormHelperText`: `theme.typography.caption` lifted 3px, inset 14px when contained. */\nexport const HELPER_TEXT = {\n fontSize: 12,\n lineHeight: 1.66,\n marginTop: 3,\n marginTopSmall: 4,\n marginHorizontal: 14,\n} as const;\n\n/** `InputAdornment`: 8px between the glyph and the value, on whichever side it is. */\nexport const ADORNMENT_GAP = 8;\n\n/** `loading`: the field fades and MUI's 20px `CircularProgress` takes the end slot. */\nexport const INPUT_LOADING = { opacity: 0.7, spinnerSize: 20 } as const;\n\n/** `glow`: a halo of the primary hue, wider and stronger while focused. */\nexport const INPUT_GLOW = {\n rest: { blur: 15, alpha: 0.3 },\n focused: { blur: 20, alpha: 0.5 },\n} as const;\n\n/**\n * `pulse`: a 56px bar behind the field, fading outward every two seconds. Its\n * corner is the field's own — `fieldRadius` on the web, `radius.field` native.\n */\nexport const INPUT_PULSE = {\n height: 56,\n opacity: 0.3,\n ms: 2000,\n spread: 10,\n} as const;\n\n/** `floating`: where the label rests and where it shrinks to, on the web. */\nexport const FLOATING_LABEL = {\n rest: { x: 14, y: 16 },\n shrink: { x: 14, y: -9 },\n scale: 0.75,\n paddingX: 4,\n} as const;\n\n/** `glass`: a wash of paper under a blur, brighter as the field is engaged. */\nexport const INPUT_GLASS = {\n background: { rest: 0.1, hover: 0.15, focused: 0.2 },\n blur: 20,\n hoverBorderAlpha: 0.3,\n focusRing: { width: 2, alpha: 0.1 },\n} as const;\n\n/** `gradient`: a 135° fill between the two brand hues, inside a 2px masked ring. */\nexport const INPUT_GRADIENT = {\n angleDeg: 135,\n fill: { rest: 0.1, hover: 0.15, focused: 0.2 },\n borderWidth: 2,\n} as const;\n\n/** `filled`: MUI's own grey replaced by a wash of `action.hover`. */\nexport const FILLED_WASH = { rest: 0.04, hover: 0.08, focused: 0.12 } as const;\n\n/**\n * The `sx` the web spreads onto the `TextField` for a size: MUI's height, plus\n * the input padding for the three steps MUI has no height for.\n */\nexport interface InputSizeProps {\n size: MuiInputSize;\n sx?: { '& .MuiInputBase-input': { padding: string } };\n}\n\nconst sizeProps = (size: SizeValue): InputSizeProps => {\n const override = INPUT_SIZE_OVERRIDES[size];\n return {\n size: INPUT_MUI_SIZE[size],\n ...(override\n ? { sx: { '& .MuiInputBase-input': { padding: `${override.vertical}px ${override.horizontal}px` } } }\n : {}),\n };\n};\n\nexport const SIZE_MAP: Record<SizeValue, InputSizeProps> = Object.fromEntries(\n SIZE_VALUES.map((size) => [size, sizeProps(size)]),\n) as Record<SizeValue, InputSizeProps>;\n","import * as React from 'react';\nimport { Animated, Easing, Platform, StyleSheet } from 'react-native';\n\nimport { INPUT_PULSE } from './Input/Input.metrics';\n\n/**\n * THE BAR THAT PULSES BEHIND A FIELD.\n *\n * `Input.styles.ts` and `Select.tsx` declare the same `::after` — a 56px wash\n * of the primary hue at 0.3, growing a 10px box-shadow ring and fading out\n * every two seconds — so the native halves draw it from one component rather\n * than one each. The numbers stay in `Input.metrics.ts`, which `Select.metrics`\n * re-exports under its own name.\n *\n * React Native has no box-shadow spread, so the ring is a scale on the bar.\n */\nexport function FieldPulse({\n color,\n radius,\n testID,\n}: {\n color: string;\n radius: number;\n testID: string;\n}): React.JSX.Element {\n const progress = React.useRef(new Animated.Value(0)).current;\n\n React.useEffect(() => {\n const loop = Animated.loop(\n Animated.timing(progress, {\n toValue: 1,\n duration: INPUT_PULSE.ms,\n easing: Easing.out(Easing.ease),\n useNativeDriver: Platform.OS !== 'web',\n }),\n );\n loop.start();\n return () => loop.stop();\n }, [progress]);\n\n return (\n <Animated.View\n testID={testID}\n aria-hidden\n style={[\n styles.pulse,\n {\n borderRadius: radius,\n backgroundColor: color,\n opacity: progress.interpolate({\n inputRange: [0, 0.7, 1],\n outputRange: [INPUT_PULSE.opacity, 0, 0],\n }),\n transform: [\n { translateY: -INPUT_PULSE.height / 2 },\n {\n scale: progress.interpolate({\n inputRange: [0, 0.7, 1],\n outputRange: [1, 1 + INPUT_PULSE.spread / INPUT_PULSE.height, 1],\n }),\n },\n ],\n },\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n pulse: {\n position: 'absolute',\n top: '50%',\n left: 0,\n right: 0,\n height: INPUT_PULSE.height,\n pointerEvents: 'none',\n },\n});\n","import {\n darken,\n decomposeColor,\n getContrastRatio,\n getLuminance,\n hslToRgb,\n lighten,\n recomposeColor,\n} from './color';\n\n/**\n * THE FIELD EDGE, WITH NO RENDERER BEHIND IT.\n *\n * The argument for why an outlined control cannot draw its resting boundary\n * from `alpha(theme.palette.divider, 0.23)` is in `./field-edge.ts`, next to\n * the MUI-typed `fieldEdge` the web components call. This file is the WALK\n * itself, over two colour strings, so the native renderer can run it too:\n * `Input.native.tsx` and `Select.native.tsx` have no MUI `Theme` to pass and no\n * `@mui/material/styles` to import, and a second copy of the walk beside them\n * is a second answer to \"where is this field's border\" waiting to drift.\n *\n * `./color` is a faithful port of MUI's colour manipulator (asserted equal to\n * it in `./__tests__/color.test.ts`), so the string this returns is the string\n * the web has always emitted.\n */\n\n/**\n * WCAG 2.1 SC 1.4.11 — the contrast a control's own boundary owes the surface\n * behind it. See `./field-edge.ts` for why 3:1 and why it is a floor.\n */\nexport const MIN_UI_CONTRAST = 3;\n\n/** How far one step of the walk moves, and how many steps before it gives up. */\nconst STEP = 0.05;\nconst MAX_STEPS = 20;\n\n/** A colour's red, green, blue and alpha, with `hsl()` converted on the way. */\nfunction channels(colour: string): [number, number, number, number] {\n const decomposed = decomposeColor(colour);\n const rgb = decomposed.type.startsWith('hsl') ? decomposeColor(hslToRgb(colour)) : decomposed;\n const [r, g, b, a] = rgb.values;\n return [r ?? 0, g ?? 0, b ?? 0, a ?? 1];\n}\n\n/**\n * A colour as an opaque `rgb()`, with any translucency resolved against\n * `surface`.\n *\n * Needed because `getContrastRatio` reads the channels it is given and ignores\n * the alpha, so handing it an `rgba()` measures a colour nobody sees.\n */\nfunction flatten(colour: string, surface: string): string {\n const [r, g, b, alpha] = channels(colour);\n if (alpha >= 1) return recomposeColor({ type: 'rgb', values: [r, g, b] });\n\n const [baseR, baseG, baseB] = channels(surface);\n const blend = (fg: number, bg: number): number => Math.round(alpha * fg + (1 - alpha) * bg);\n return recomposeColor({\n type: 'rgb',\n values: [blend(r, baseR), blend(g, baseG), blend(b, baseB)],\n });\n}\n\n/**\n * The resting boundary a control draws on `surface`, from the theme's own\n * `divider` as the seed: the seed itself when it already clears\n * {@link MIN_UI_CONTRAST}, otherwise the nearest tone of it that does.\n */\nexport function resolveFieldEdge(divider: string, surface: string): string {\n const ground = flatten(surface, '#FFFFFF');\n const seed = flatten(divider, ground);\n if (getContrastRatio(seed, ground) >= MIN_UI_CONTRAST) return seed;\n\n // Away from the surface, whichever way that is — so one rule serves both\n // modes, and a dark card in a light theme is still handled by the pair rather\n // than by `palette.mode`.\n const away = getLuminance(ground) > 0.5 ? darken : lighten;\n for (let step = 1; step <= MAX_STEPS; step += 1) {\n // From the SEED each time rather than compounding the previous result, so\n // the walk lands on the nearest passing tone instead of overshooting past it.\n const candidate = away(seed, step * STEP);\n if (getContrastRatio(candidate, ground) >= MIN_UI_CONTRAST) return candidate;\n }\n // Unreachable for any real surface — black clears 21:1 on white and white\n // clears it on black — but a caller must never be handed `undefined`.\n return getLuminance(ground) > 0.5 ? '#000000' : '#FFFFFF';\n}\n","import type { TextStyle, ViewStyle } from 'react-native';\n\nimport type { InputVariant } from './Input.base';\nimport {\n FILLED_WASH,\n HELPER_TEXT,\n INPUT_MUI_SIZE,\n INPUT_BORDER,\n INPUT_FONT_SIZE,\n INPUT_GLASS,\n INPUT_GRADIENT,\n INPUT_LABEL,\n INPUT_LINE_HEIGHT,\n UNDERLINE_COLOR,\n inputPadding,\n placeholderInk,\n} from './Input.metrics';\nimport { alpha } from '../../../tokens/color';\nimport { resolveFieldEdge } from '../../../tokens/field-edge.core';\nimport type { UiTheme } from '../../../tokens/theme';\nimport type { SizeValue } from '../../../tokens/vocabulary';\n\n/**\n * WHAT A NATIVE `Input` PAINTS, AS ARITHMETIC.\n *\n * Kept out of `Input.native.tsx` so that file reads as structure — label, box,\n * value, helper — and this one reads as the decisions: which border, how thick,\n * what colour, and where the value sits inside it.\n */\nexport interface FieldState {\n focused: boolean;\n error: boolean;\n disabled: boolean;\n}\n\n/** Which edges a variant draws. `filled` and `underline` rule only the bottom. */\nconst BORDER_SIDES: Record<InputVariant, 'all' | 'bottom'> = {\n outlined: 'all',\n glass: 'all',\n gradient: 'all',\n filled: 'bottom',\n underline: 'bottom',\n};\n\n/**\n * Whether the web draws this border on an absolutely positioned element.\n *\n * MUI's `notchedOutline` fieldset and the `::before` / `::after` underlines\n * cost no height — the field is 56px tall WITH its border. `glass` and\n * `gradient` instead put a real `border` on the input root, which does add to\n * the box, so the web field is 2px and 4px taller respectively. React Native\n * has only the second kind, so the first three compensate below.\n */\nconst BORDER_IS_FREE: Record<InputVariant, boolean> = {\n outlined: true,\n filled: true,\n underline: true,\n glass: false,\n gradient: false,\n};\n\n/**\n * How thick. Only the outline family thickens on focus (MUI's `borderWidth: 2`\n * on `.Mui-focused .notchedOutline`); `glass` and `gradient` declare their own\n * constant border and change only its colour.\n */\nexport function borderWidthFor(variant: InputVariant, focused: boolean): number {\n if (variant === 'gradient') return INPUT_GRADIENT.borderWidth;\n if (variant === 'glass') return INPUT_BORDER.rest;\n return focused ? INPUT_BORDER.focused : INPUT_BORDER.rest;\n}\n\n/**\n * The width the border takes out of the horizontal inset — 0 where the web's\n * border adds to the box rather than floating over it. Exported because the\n * `Select` draws the same box and has to place its arrow inside the same edge.\n */\nexport function horizontalBorderInset(variant: InputVariant, focused: boolean): number {\n if (BORDER_SIDES[variant] !== 'all' || !BORDER_IS_FREE[variant]) return 0;\n return borderWidthFor(variant, focused);\n}\n\n/**\n * What colour. Error and disabled outrank focus, as they do in MUI's source\n * order; a resting `filled` keeps MUI's own underline grey because the web\n * override only replaces its background.\n */\nfunction borderColorFor(theme: UiTheme, variant: InputVariant, state: FieldState): string {\n if (state.disabled) return theme.palette.action.disabled;\n if (state.error) return theme.palette.danger.main;\n if (variant === 'gradient') {\n return state.focused ? theme.palette.primary.dark : theme.palette.primary.main;\n }\n if (state.focused) return theme.palette.primary.main;\n if (variant === 'filled') {\n return theme.mode === 'dark' ? UNDERLINE_COLOR.dark : UNDERLINE_COLOR.light;\n }\n return resolveFieldEdge(theme.palette.divider, theme.palette.background.paper);\n}\n\n/** The fill behind the value. `outlined` and `underline` have none. */\nfunction backgroundFor(theme: UiTheme, variant: InputVariant, state: FieldState): string | undefined {\n switch (variant) {\n case 'filled':\n return alpha(theme.palette.action.hover, state.focused ? FILLED_WASH.focused : FILLED_WASH.rest);\n case 'glass':\n return alpha(\n theme.palette.background.paper,\n state.focused ? INPUT_GLASS.background.focused : INPUT_GLASS.background.rest,\n );\n case 'gradient':\n // The first stop of the web's 135° fill; React Native core has no gradient.\n return alpha(\n theme.palette.primary.main,\n state.focused ? INPUT_GRADIENT.fill.focused : INPUT_GRADIENT.fill.rest,\n );\n default:\n return undefined;\n }\n}\n\n/**\n * The theme's one field radius: `filled` rounds its top two corners with it,\n * `underline` none, the rest all four.\n */\nfunction radiusFor(theme: UiTheme, variant: InputVariant): ViewStyle {\n if (variant === 'underline') return {};\n if (variant === 'filled') {\n return { borderTopLeftRadius: theme.radius.field, borderTopRightRadius: theme.radius.field };\n }\n return { borderRadius: theme.radius.field };\n}\n\n/** The border as React Native writes it: a width per side, one colour, one style. */\nfunction borderStyle(variant: InputVariant, width: number, color: string, state: FieldState): ViewStyle {\n // MUI draws a disabled `filled` or `standard` underline dotted.\n const style: ViewStyle['borderStyle'] =\n state.disabled && BORDER_SIDES[variant] === 'bottom' ? 'dotted' : 'solid';\n const sides: ViewStyle =\n BORDER_SIDES[variant] === 'bottom' ? { borderBottomWidth: width } : { borderWidth: width };\n return { ...sides, borderColor: color, borderStyle: style };\n}\n\nexport interface FieldLook {\n /** The row the border is drawn on: fill, edges, corners and horizontal inset. */\n box: ViewStyle;\n /** The `TextInput` itself: type, ink and the vertical inset. */\n value: TextStyle;\n placeholder: string;\n}\n\n/**\n * The field, in absolute numbers.\n *\n * The horizontal inset sits on the ROW rather than on the `TextInput`, which is\n * what MUI does the moment an adornment appears (`paddingLeft: 14` moves to the\n * input root and the input's own goes to 0) — so one rule serves a field with\n * adornments and one without.\n *\n * Where the web's border costs no height, the inset gives the border back its\n * width, so the box is the height MUI draws (56px medium, 40px small) and the\n * value does not shift by a pixel when the focused border thickens.\n */\nexport function fieldLook(\n theme: UiTheme,\n variant: InputVariant,\n size: SizeValue,\n state: FieldState,\n): FieldLook {\n const padding = inputPadding(variant, size);\n const width = borderWidthFor(variant, state.focused);\n const inset = BORDER_IS_FREE[variant] ? width : 0;\n const sides = BORDER_SIDES[variant];\n const horizontal = sides === 'all' ? inset : 0;\n\n return {\n box: {\n flexDirection: 'row',\n alignItems: 'center',\n paddingLeft: padding.left - horizontal,\n paddingRight: padding.right - horizontal,\n backgroundColor: backgroundFor(theme, variant, state),\n ...radiusFor(theme, variant),\n ...borderStyle(variant, width, borderColorFor(theme, variant, state), state),\n },\n value: {\n flex: 1,\n minWidth: 0,\n fontFamily: theme.typography.fontFamily,\n fontSize: INPUT_FONT_SIZE,\n lineHeight: INPUT_LINE_HEIGHT,\n color: state.disabled ? theme.palette.text.disabled : theme.palette.text.primary,\n paddingTop: padding.top - (sides === 'all' ? inset : 0),\n paddingBottom: padding.bottom - inset,\n paddingHorizontal: 0,\n },\n placeholder: placeholderInk(theme),\n };\n}\n\n/**\n * The label's ink. MUI's `FormLabel` is `text.secondary`, the focus colour is\n * the palette's `main`, and error and disabled are declared after it and win.\n */\nexport function labelStyle(theme: UiTheme, variant: InputVariant, size: SizeValue, state: FieldState): TextStyle {\n const ink = state.disabled\n ? theme.palette.text.disabled\n : state.error\n ? theme.palette.danger.main\n : state.focused\n ? theme.palette.primary.main\n : theme.palette.text.secondary;\n\n return {\n color: ink,\n fontFamily: theme.typography.fontFamily,\n fontSize: INPUT_FONT_SIZE * INPUT_LABEL.scale,\n marginBottom: INPUT_LABEL.gap,\n // Aligned with the value it names: the web's floating label and the input\n // share one left inset (14px outlined, 12px filled, 0 standard).\n marginLeft: inputPadding(variant, size).left,\n };\n}\n\n/**\n * `FormHelperText`: caption type, 3px below the field, inset 14px when\n * contained — and 4px below at MUI's `small` density, which `INPUT_MUI_SIZE`\n * selects for `xs` and `sm` (`FormHelperText.js`: `marginTop: 3`, then a\n * `size: 'small'` variant raising it to 4).\n */\nexport function helperStyle(\n theme: UiTheme,\n variant: InputVariant,\n size: SizeValue,\n state: FieldState,\n): TextStyle {\n return {\n color: state.disabled\n ? theme.palette.text.disabled\n : state.error\n ? theme.palette.danger.main\n : theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontSize: HELPER_TEXT.fontSize,\n lineHeight: HELPER_TEXT.fontSize * HELPER_TEXT.lineHeight,\n marginTop: INPUT_MUI_SIZE[size] === 'small' ? HELPER_TEXT.marginTopSmall : HELPER_TEXT.marginTop,\n marginHorizontal: variant === 'underline' ? 0 : HELPER_TEXT.marginHorizontal,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqCO,IAAM,gBAAgB,CAAC,YAA2C;AACvE,UAAQ,SAAS;AAAA,IACf,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAGO,IAAM,iBAAkD;AAAA,E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MAAM,QAAQ,OAAO,OACrB,MAAM,QAAQ,KAAK;AAAA,IACzB,YAAY,MAAM,WAAW;AAAA,IAC7B,UAAU,YAAY;AAAA,IACtB,YAAY,YAAY,WAAW,YAAY;AAAA,IAC/C,WAAW,eAAe,IAAI,MAAM,UAAU,YAAY,iBAAiB,YAAY;AAAA,IACvF,kBAAkB,YAAY,cAAc,IAAI,YAAY;AAAA,EAC9D;AACF;","names":["alpha"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/tokens/color.ts","../../../src/tokens/ink-over.ts","../../../src/tokens/field-radius.core.ts","../../../src/tokens/heading-scale.ts","../../../src/tokens/css-units.ts","../../../src/tokens/theme.ts"],"sourcesContent":["/**\n * COLOUR ARITHMETIC WITH NO RENDERER BEHIND IT.\n *\n * Every shade the web components paint comes out of MUI's colour manipulator:\n * `lighten(main, 0.2)` is a palette's `light`, `darken(main, 0.3)` its `dark`,\n * `alpha(main, 0.1)` the hover wash on an outline button. A native component\n * that wants the SAME pixel has to run the SAME arithmetic, and it cannot\n * import it — `@mui/material/styles` drags emotion and the DOM in behind it.\n *\n * So the arithmetic lives here, once, with nothing behind it. It is a faithful\n * port of `@mui/system/colorManipulator` (MIT), down to the truncation:\n * `lighten('#6366F1', 0.2)` is `rgb(130, 132, 243)` on both sides because both\n * TRUNCATE 132.6 rather than round it. A port that rounded would be one pixel\n * of tint away from the web on every button, forever, and nothing would flag it.\n *\n * `color()` space strings are deliberately unsupported: nothing in this package\n * emits one, and a smaller surface is a smaller thing to keep identical.\n */\n\nexport type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla';\n\nexport interface DecomposedColor {\n type: ColorFormat;\n values: number[];\n}\n\nconst FORMATS: readonly ColorFormat[] = ['rgb', 'rgba', 'hsl', 'hsla'];\n\nconst clamp = (value: number, min = 0, max = 1): number => Math.min(Math.max(min, value), max);\n\n/** `#rgb`, `#rgba`, `#rrggbb` or `#rrggbbaa` to its `rgb()` / `rgba()` string. */\nexport function hexToRgb(color: string): string {\n const hex = color.slice(1);\n const pair = new RegExp(`.{1,${hex.length >= 6 ? 2 : 1}}`, 'g');\n let channels: string[] | null = hex.match(pair);\n if (channels && channels[0]?.length === 1) {\n channels = channels.map((channel) => channel + channel);\n }\n if (!channels) return '';\n\n const parts = channels.map((channel, index) =>\n index < 3 ? parseInt(channel, 16) : Math.round((parseInt(channel, 16) / 255) * 1000) / 1000,\n );\n return `rgb${channels.length === 4 ? 'a' : ''}(${parts.join(', ')})`;\n}\n\n/** Any supported colour string to its type and numeric channels. */\nexport function decomposeColor(color: string): DecomposedColor {\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n const marker = color.indexOf('(');\n const type = color.substring(0, marker) as ColorFormat;\n if (!FORMATS.includes(type)) {\n throw new Error(\n `@12-apps/ui: unsupported colour \"${color}\". Use #nnn, #nnnnnn, rgb(), rgba(), hsl() or hsla().`,\n );\n }\n\n const values = color\n .substring(marker + 1, color.length - 1)\n .split(',')\n .map((value) => parseFloat(value));\n\n return { type, values };\n}\n\n/** The inverse of {@link decomposeColor}, with MUI's channel truncation. */\nexport function recomposeColor({ type, values }: DecomposedColor): string {\n const parts: Array<number | string> = type.startsWith('rgb')\n ? values.map((value, index) => (index < 3 ? Math.trunc(value) : value))\n : [values[0] ?? 0, `${values[1] ?? 0}%`, `${values[2] ?? 0}%`, ...values.slice(3)];\n\n return `${type}(${parts.join(', ')})`;\n}\n\n/** An `hsl()` / `hsla()` string to its `rgb()` / `rgba()` equivalent. */\nexport function hslToRgb(color: string): string {\n const { type, values } = decomposeColor(color);\n const h = values[0] ?? 0;\n const s = (values[1] ?? 0) / 100;\n const l = (values[2] ?? 0) / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n: number, k = (n + h / 30) % 12): number =>\n l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (type === 'hsla') {\n return recomposeColor({ type: 'rgba', values: [...rgb, values[3] ?? 1] });\n }\n return recomposeColor({ type: 'rgb', values: rgb });\n}\n\n/** Relative luminance (WCAG 2.0), to three decimals like MUI. */\nexport function getLuminance(color: string): number {\n const decomposed = decomposeColor(color);\n const channels = decomposed.type.startsWith('hsl')\n ? decomposeColor(hslToRgb(color)).values\n : decomposed.values;\n\n const [r, g, b] = channels.slice(0, 3).map((value) => {\n const c = value / 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n\n return Number((0.2126 * (r ?? 0) + 0.7152 * (g ?? 0) + 0.0722 * (b ?? 0)).toFixed(3));\n}\n\n/** WCAG contrast ratio between two colours, 1 to 21. */\nexport function getContrastRatio(foreground: string, background: string): number {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/** The colour with its alpha channel set to `value` (0 to 1). */\nexport function alpha(color: string, value: number): string {\n const decomposed = decomposeColor(color);\n const type: ColorFormat = decomposed.type.endsWith('a')\n ? decomposed.type\n : (`${decomposed.type}a` as ColorFormat);\n const values = decomposed.values.slice(0, 3);\n values[3] = clamp(value);\n return recomposeColor({ type, values });\n}\n\n/** The colour moved `coefficient` (0 to 1) of the way towards black. */\nexport function darken(color: string, coefficient: number): string {\n const decomposed = decomposeColor(color);\n const amount = clamp(coefficient);\n const values = [...decomposed.values];\n\n if (decomposed.type.startsWith('hsl')) {\n values[2] = (values[2] ?? 0) * (1 - amount);\n } else {\n for (let index = 0; index < 3; index += 1) {\n values[index] = (values[index] ?? 0) * (1 - amount);\n }\n }\n return recomposeColor({ type: decomposed.type, values });\n}\n\n/** The colour moved `coefficient` (0 to 1) of the way towards white. */\nexport function lighten(color: string, coefficient: number): string {\n const decomposed = decomposeColor(color);\n const amount = clamp(coefficient);\n const values = [...decomposed.values];\n\n if (decomposed.type.startsWith('hsl')) {\n values[2] = (values[2] ?? 0) + (100 - (values[2] ?? 0)) * amount;\n } else {\n for (let index = 0; index < 3; index += 1) {\n values[index] = (values[index] ?? 0) + (255 - (values[index] ?? 0)) * amount;\n }\n }\n return recomposeColor({ type: decomposed.type, values });\n}\n\n/** Darken a light colour or lighten a dark one, by `coefficient`. */\nexport function emphasize(color: string, coefficient = 0.15): string {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n","/**\n * THE PRODUCT'S TWO INKS, AND THE TWO RULES FOR CHOOSING BETWEEN THEM.\n *\n * Split out of `theme.ts` when that file reached the 400-line cap, and the seam\n * is a real one rather than a place the knife happened to land: everything here\n * answers one question — given a surface, which of the two inks goes on it —\n * and nothing here builds a palette. `theme.ts` keeps the tables and the\n * factories and imports the answers.\n *\n * Both functions stay exported from `theme.ts` as well, because both were\n * published from there and a caller should not have to learn about this file.\n */\nimport { getContrastRatio } from './color';\n\n/** MUI's `createPalette` contrast defaults, exactly. */\nexport const CONTRAST_THRESHOLD = 3;\nexport const DARK_TEXT_PRIMARY = 'rgba(0, 0, 0, 0.87)';\nexport const LIGHT_TEXT_PRIMARY = '#fff';\n\n/**\n * MUI's `getContrastText`: white where white reads at 3:1 on the colour, the\n * light mode's dark ink otherwise. (MUI's source spells the white as the DARK\n * palette's `text.primary`, which is what made it easy to read backwards.)\n */\nexport function contrastText(background: string): string {\n return getContrastRatio(background, LIGHT_TEXT_PRIMARY) >= CONTRAST_THRESHOLD\n ? LIGHT_TEXT_PRIMARY\n : DARK_TEXT_PRIMARY;\n}\n\n/**\n * The ink that reads on EVERY one of these fills (FUT-1924).\n *\n * {@link contrastText} answers for one fill, which is all MUI's `augmentColor`\n * ever needs: a solid button is a single flat colour. Two components paint the\n * label over something that is not one colour — `Button`'s `gradient` variant\n * runs between two stops, and `Switch`'s thumb travels the whole length of a\n * checked track — and both of them stated `#fff` outright instead, which is\n * white-on-pale the moment a white-labelled host hands the library a pale\n * brand. Audited across the library, those two were the only places a hardcoded\n * white sat over a surface the TENANT chooses.\n *\n * **This deliberately does not follow `contrastText`'s rule.** MUI's is a\n * threshold that PREFERS white — white wherever white clears 3:1 — which is a\n * brand-feel decision, and it is kept for every existing caller so nothing\n * already legible moves. Here the fills can disagree: over MUI's own success\n * pair white is 2.78:1 on `#4caf50` and dark ink 2.66:1 on `#1b5e20`, so\n * neither meets any threshold and asking whether one does is the wrong\n * question. The answer is whichever ink has the better WORST case across the\n * fills — which is also not what either fill says on its own, since\n * `contrastText('#4caf50')` is dark ink.\n *\n * A gradient wide enough that neither ink clears 4.5:1 anywhere is a palette\n * problem this cannot fix — it returns the less bad ink and does not pretend\n * otherwise.\n *\n * **It no longer takes the better ink for free (FUT-2066).** \"Better worst\n * case\" decides WHICH ink wins; {@link INK_CHANGE_MARGIN} decides whether the\n * win is big enough to repaint a brand over. The two rows that moved when this\n * function landed were `warning` — 2.16:1 white on an orange, the defect — and\n * `danger`, bought for a quarter of a point. Only the first survives the\n * margin, which is the whole point: one of them was a fix and the other was\n * churn, and nothing in the old rule could tell them apart.\n *\n * `Math.min` is the claim, and it is worth knowing that no test can prove it\n * against `Math.max` today: the two candidate inks sit at opposite ends of the\n * luminance range, so ranking them by their best fill and by their worst gives\n * the same winner for every possible pair (checked exhaustively). Worst case is\n * still what this MEANS, and the moment a third ink or one that is not an\n * extreme is offered, the two stop agreeing.\n *\n * `incumbent` is the palette's own `contrastText` for this role — what both\n * call sites already passed, under the name `fallback`. It is still returned\n * when a fill cannot be decomposed ({@link getContrastRatio} throws on a format\n * it does not know, and a throw inside an emotion style function takes the\n * render down with it), so nothing about that path changed; it has simply\n * stopped being only a last resort.\n */\n/**\n * HOW MUCH BETTER THE OTHER INK HAS TO BE BEFORE A BRAND IS REPAINTED (FUT-2066).\n *\n * Half a contrast point. The rule this guards is \"take the better worst case\",\n * and on MUI's own stock palette that rule repainted `danger`'s gradient button\n * from white-on-red to black-on-red for **0.25 of a point** — 3.49 against 3.74,\n * with neither ink clearing AA either way. A rule that churns a brand for a\n * rounding difference will churn it again on the next palette tweak, and the\n * consumer who has to explain why their destructive button changed colour has\n * no better answer than \"it rounded the other way\".\n *\n * The number sits in a wide measured band rather than on a cliff. Walking the\n * five gradient pairs `Button.styles.ts` paints, the only two gaps that exist\n * are `danger`'s **0.25** — the churn — and `warning`'s **3.38**, white at\n * 2.16:1 on an orange against dark ink at 5.54:1, which is the defect FUT-1924\n * exists for. Anything in `[0.3, 3.38]` separates them; 0.5 is the round number\n * nearest the bottom of that band, so the next palette move has to be\n * substantially larger than a rounding difference before this fires.\n *\n * FUT-2066 recorded this as undecidable, on a measurement that turns out to be\n * wrong: it reports the incumbent for `success` as DARK ink and concludes that\n * a margin would hold it at 2.66 where the current rule gets 2.78. The gradient\n * runs `success.light → success.dark`, but `contrastText` answers for\n * `success.MAIN` — `#2e7d32`, not the `#4caf50` the table names — and white on\n * `#2e7d32` is 5.7:1, so the incumbent is white and a margin leaves that row\n * exactly where it is. With that row corrected the objection goes away and the\n * shape the ticket proposed is simply right.\n */\nconst INK_CHANGE_MARGIN = 0.5;\n\n/**\n * The contrast below which the incumbent is not worth keeping at any margin.\n *\n * MUI's own `contrastThreshold`, and the same number for the same reason: below\n * 3:1 an ink is not a brand decision, it is text nobody can read. `warning` is\n * caught by this AND by {@link INK_CHANGE_MARGIN} — white sits at 2.16:1 on\n * that orange — which is deliberate: the one row that has to move should not\n * depend on which clause fires.\n */\nconst INK_CHANGE_FLOOR = CONTRAST_THRESHOLD;\n\nexport function inkOver(fills: readonly string[], incumbent: string): string {\n try {\n const worstCase = (ink: string): number =>\n Math.min(...fills.map((fill) => getContrastRatio(ink, fill)));\n\n const better =\n worstCase(LIGHT_TEXT_PRIMARY) >= worstCase(DARK_TEXT_PRIMARY)\n ? LIGHT_TEXT_PRIMARY\n : DARK_TEXT_PRIMARY;\n\n // The incumbent is the palette's OWN answer for this role, which is what\n // makes \"keep it unless the gain is material\" a statement about churn\n // rather than about arithmetic. It arrives as the same argument that used\n // to be the parse-failure fallback, because it always was `contrastText`\n // at both call sites — the parameter has stopped being a last resort and\n // started being the thing being defended.\n const held = worstCase(incumbent);\n const gain = worstCase(better) - held;\n return gain >= INK_CHANGE_MARGIN || held < INK_CHANGE_FLOOR ? better : incumbent;\n } catch {\n return incumbent;\n }\n}\n","/**\n * THE ONE RADIUS EVERY FIELD IS DRAWN WITH, WITH NO RENDERER BEHIND IT.\n *\n * A row of controls — a search box, three filter triggers, a \"Mais\" button —\n * used to carry three radii: the text field took MUI's `shape.borderRadius`\n * (4px), the button `theme.spacing(1)` (8px), and the filter triggers a 999px\n * pill. Each was reasonable on its own; side by side they read as three kits\n * glued together. A field's corner is one decision, so it is one token.\n *\n * \"Field\" is anything that sits at control height and takes input or opens a\n * choice: text inputs, selects, textareas, OTP slots, date and filter triggers,\n * toggles, and the buttons that share their rows. It is NOT a card, a menu, a\n * badge or a chip counter — those keep the theme's general `radius` scale.\n *\n * This file is the number alone, so the native renderer and `./theme.ts` read\n * it without importing MUI. The web reader and the theme channel it is set\n * through are in `./field-radius.ts`.\n */\n\n/**\n * The default field radius, in px (dp on native).\n *\n * 8, because that is what `Button` has always drawn — so the control people\n * see most keeps its corner and the rest of the row comes to meet it.\n */\nexport const DEFAULT_FIELD_RADIUS = 8;\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 * THE ONE READER OF CSS LENGTHS.\n *\n * `HEADING_SCALE` and a host's MUI overrides speak CSS — `'2rem'`, `'-0.02em'`\n * — and both `tokens/theme.ts` and `provider/mui-bridge.ts` need them as\n * numbers. Two private parsers drifted (one multiplied `em` by 16, one did\n * not), so there is one, here, with the rule spelled out: a length becomes px\n * against a 16px root, a tracking value becomes em.\n */\n\nconst ROOT_PX = 16;\n\n/** `'1.5rem'` → 24, `'1.5em'` → 24, `'20px'` → 20, `20` → 20, unparseable → `fallback`. */\nexport function cssLengthToPx(value: string | number | undefined, fallback: number): number {\n if (typeof value === 'number') return value;\n if (value === undefined) return fallback;\n const parsed = Number.parseFloat(value);\n if (Number.isNaN(parsed)) return fallback;\n return value.endsWith('rem') || value.endsWith('em') ? parsed * ROOT_PX : parsed;\n}\n\n/** `'-0.02em'` → -0.02, `'0.5px'` → 0.5 / 16, `undefined` → `undefined` (\"normal\"). */\nexport function cssTrackingToEm(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n const parsed = Number.parseFloat(value);\n if (Number.isNaN(parsed)) return undefined;\n return value.endsWith('px') ? parsed / ROOT_PX : parsed;\n}\n","import { darken, lighten } from './color';\nimport { contrastText, DARK_TEXT_PRIMARY, inkOver } from './ink-over';\n\n/*\n RE-EXPORTED rather than moved out of the public surface. Both were published\n from here, and `ink-over.ts` exists because this file reached the 400-line cap\n — a caller should not have to learn that.\n*/\nexport { contrastText, inkOver };\nimport { cssLengthToPx, cssTrackingToEm } from './css-units';\nimport { DEFAULT_FIELD_RADIUS } from './field-radius.core';\nimport { HEADING_SCALE, type HeadingLevel } from './heading-scale';\n\nimport type { SizeValue } from './vocabulary';\n\n/**\n * THE THEME BOTH RENDERERS READ.\n *\n * On the web every component styles itself from MUI's `Theme`, which is built\n * by the host (`@12-apps/app-shell`'s `createAppTheme` in the origin apps) and\n * reaches a component through emotion's context. React Native has no emotion,\n * no CSS and no MUI, so a native `Button` needs the same decisions — the\n * palette, the spacing unit, the radius, the type scale — from somewhere that\n * does not import a renderer.\n *\n * This is that somewhere. `UiTheme` is a plain object of numbers and colour\n * strings. `createUiTheme` derives it the way MUI's `createPalette` derives its\n * own: a `light` shade is `lighten(main, 0.2)`, a `dark` shade `darken(main,\n * 0.3)`, `contrastText` flips at a 3:1 ratio against `rgba(0, 0, 0, 0.87)`.\n * Same seeds in, same shades out, on both sides — that is the whole basis for\n * a native button being the web button's colour and not a near miss.\n *\n * Numbers are in px on the web and dp on native; both are the CSS-pixel unit\n * a design is drawn in, so a `fontSize: 16` here IS `1rem` in a web style\n * and `16` in a `StyleSheet`. The web components keep their `rem` strings and\n * derive them from these numbers where the two meet (see `px()` below and the\n * `*.metrics.ts` file beside each ported component).\n *\n * `danger` and `neutral` are this package's names (see `./scales`); `danger`\n * is MUI's `error` and `neutral` is drawn from the grey ramp the way\n * `Button.styles.ts` has always drawn it.\n */\n\nexport type UiThemeMode = 'light' | 'dark';\n\nexport interface UiPaletteColor {\n main: string;\n light: string;\n dark: string;\n contrastText: string;\n}\n\nexport type UiGreyStep = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n\nexport interface UiPalette {\n mode: UiThemeMode;\n primary: UiPaletteColor;\n secondary: UiPaletteColor;\n success: UiPaletteColor;\n warning: UiPaletteColor;\n info: UiPaletteColor;\n danger: UiPaletteColor;\n neutral: UiPaletteColor;\n text: { primary: string; secondary: string; disabled: string };\n background: { default: string; paper: string };\n divider: string;\n action: {\n active: string;\n hover: string;\n selected: string;\n disabled: string;\n disabledBackground: string;\n focus: string;\n };\n grey: Record<UiGreyStep, string>;\n}\n\n/** One step of the body scale: `fontSize` in px, `lineHeight` as a ratio. */\nexport interface UiTypeStep {\n fontSize: number;\n lineHeight: number;\n}\n\nexport type UiFontWeight = 'light' | 'normal' | 'medium' | 'semibold' | 'bold';\n\nexport interface UiHeadingStep extends UiTypeStep {\n /** In em, so it scales with the step. `undefined` is \"normal\". */\n letterSpacing?: number;\n normalWeight: number;\n}\n\nexport interface UiTypography {\n /**\n * Native has no fallback stacks: a font is either installed and named, or\n * `undefined` and the platform's own. The web default is MUI's Roboto stack.\n */\n fontFamily: string | undefined;\n monospaceFontFamily: string | undefined;\n sizes: Record<SizeValue, UiTypeStep>;\n weights: Record<UiFontWeight, number>;\n heading: Record<HeadingLevel, UiHeadingStep>;\n}\n\nexport interface UiTheme {\n mode: UiThemeMode;\n palette: UiPalette;\n /** MUI's `theme.spacing(n)`: `n` units of {@link UiTheme.spacingUnit}, in px. */\n spacing: (units: number) => number;\n spacingUnit: number;\n /**\n * `md` is MUI's `shape.borderRadius`; `sm`–`xl` are its halves and doubles.\n * `field` is not on that scale: it is the one corner every field is drawn\n * with (see `./field-radius.core`), MUI's `theme.fieldRadius` on the web.\n */\n radius: { sm: number; md: number; lg: number; xl: number; full: number; field: number };\n typography: UiTypography;\n zIndex: { appBar: number; drawer: number; modal: number; snackbar: number; tooltip: number };\n}\n\n/** A seed for one palette slot: a hex `main`, or any subset of the four shades. */\nexport type UiPaletteSeed = string | Partial<UiPaletteColor>;\n\nexport interface UiThemeOptions {\n mode?: UiThemeMode;\n palette?: Partial<{\n primary: UiPaletteSeed;\n secondary: UiPaletteSeed;\n success: UiPaletteSeed;\n warning: UiPaletteSeed;\n info: UiPaletteSeed;\n danger: UiPaletteSeed;\n background: Partial<UiPalette['background']>;\n }>;\n typography?: Partial<Pick<UiTypography, 'fontFamily' | 'monospaceFontFamily'>>;\n spacingUnit?: number;\n /** The radius every field is drawn with, in dp. Defaults to {@link DEFAULT_FIELD_RADIUS}. */\n fieldRadius?: number;\n}\n\nconst ROOT_FONT_PX = 16;\n\n/** The px value as the rem string the web components write. */\nexport const px = (value: number): string => `${value / ROOT_FONT_PX}rem`;\n\n/** MUI's `createPalette` default tonal offset, exactly. */\nconst TONAL_OFFSET = 0.2;\n\nexport const GREY: Record<UiGreyStep, string> = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n};\n\n/**\n * The platform's own seeds. The pair `@12-apps/ui`'s Storybook preview and\n * `@12-apps/app-shell`'s `DEFAULT_THEME_TOKENS` both carry — keep the three in\n * step if the design tokens change.\n */\nexport const DEFAULT_BRAND: Record<UiThemeMode, { primary: string; secondary: string }> = {\n light: { primary: '#6366F1', secondary: '#8B5CF6' },\n dark: { primary: '#818CF8', secondary: '#A78BFA' },\n};\n\n/** MUI's semantic defaults per mode. These are declared shades, not derived. */\nconst SEMANTIC_DEFAULTS: Record<\n UiThemeMode,\n Record<'success' | 'warning' | 'info' | 'danger', UiPaletteColor>\n> = {\n light: {\n success: { main: '#2e7d32', light: '#4caf50', dark: '#1b5e20', contrastText: '#fff' },\n warning: { main: '#ed6c02', light: '#ff9800', dark: '#e65100', contrastText: '#fff' },\n info: { main: '#0288d1', light: '#03a9f4', dark: '#01579b', contrastText: '#fff' },\n danger: { main: '#d32f2f', light: '#ef5350', dark: '#c62828', contrastText: '#fff' },\n },\n dark: {\n success: { main: '#66bb6a', light: '#81c784', dark: '#388e3c', contrastText: DARK_TEXT_PRIMARY },\n warning: { main: '#ffa726', light: '#ffb74d', dark: '#f57c00', contrastText: DARK_TEXT_PRIMARY },\n info: { main: '#29b6f6', light: '#4fc3f7', dark: '#0288d1', contrastText: DARK_TEXT_PRIMARY },\n danger: { main: '#f44336', light: '#e57373', dark: '#d32f2f', contrastText: '#fff' },\n },\n};\n\nconst MODE_DEFAULTS: Record<\n UiThemeMode,\n Pick<UiPalette, 'text' | 'background' | 'divider' | 'action'>\n> = {\n light: {\n text: { primary: DARK_TEXT_PRIMARY, secondary: 'rgba(0, 0, 0, 0.6)', disabled: 'rgba(0, 0, 0, 0.38)' },\n background: { default: '#fff', paper: '#fff' },\n divider: 'rgba(0, 0, 0, 0.12)',\n action: {\n active: 'rgba(0, 0, 0, 0.54)',\n hover: 'rgba(0, 0, 0, 0.04)',\n selected: 'rgba(0, 0, 0, 0.08)',\n disabled: 'rgba(0, 0, 0, 0.26)',\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n focus: 'rgba(0, 0, 0, 0.12)',\n },\n },\n dark: {\n text: { primary: '#fff', secondary: 'rgba(255, 255, 255, 0.7)', disabled: 'rgba(255, 255, 255, 0.5)' },\n background: { default: '#121212', paper: '#121212' },\n divider: 'rgba(255, 255, 255, 0.12)',\n action: {\n active: '#fff',\n hover: 'rgba(255, 255, 255, 0.08)',\n selected: 'rgba(255, 255, 255, 0.16)',\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n focus: 'rgba(255, 255, 255, 0.12)',\n },\n },\n};\n\n\n/**\n * MUI's `augmentColor` for a custom colour: derive whatever shade the seed\n * left out. `light` is one tonal offset up, `dark` one and a half down.\n */\nexport function augmentColor(seed: UiPaletteSeed): UiPaletteColor {\n const partial = typeof seed === 'string' ? { main: seed } : seed;\n const main = partial.main ?? partial.light ?? partial.dark;\n if (!main) {\n throw new Error('@12-apps/ui: a palette seed needs at least a `main` colour.');\n }\n return {\n main,\n light: partial.light ?? lighten(main, TONAL_OFFSET),\n dark: partial.dark ?? darken(main, TONAL_OFFSET * 1.5),\n contrastText: partial.contrastText ?? contrastText(main),\n };\n}\n\nconst semantic = (\n mode: UiThemeMode,\n key: 'success' | 'warning' | 'info' | 'danger',\n seed: UiPaletteSeed | undefined,\n): UiPaletteColor => (seed === undefined ? SEMANTIC_DEFAULTS[mode][key] : augmentColor(seed));\n\n/** `neutral` as `accentFor` in `./scales` has always drawn it: three greys and white. */\nexport const NEUTRAL: UiPaletteColor = {\n main: GREY[600],\n light: GREY[400],\n dark: GREY[800],\n contrastText: '#fff',\n};\n\n/** The body scale `Text` renders, in px. `Text.tsx`'s rem map is this, divided by 16. */\nexport const TYPE_SIZES: Record<SizeValue, UiTypeStep> = {\n xs: { fontSize: 12, lineHeight: 1.2 },\n sm: { fontSize: 14, lineHeight: 1.3 },\n md: { fontSize: 16, lineHeight: 1.5 },\n lg: { fontSize: 18, lineHeight: 1.4 },\n xl: { fontSize: 20, lineHeight: 1.3 },\n};\n\nexport const FONT_WEIGHTS: Record<UiFontWeight, number> = {\n light: 300,\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n};\n\n// `HEADING_SCALE` speaks CSS, this theme speaks numbers; `./css-units` is the\n// one place that conversion is written.\nconst HEADING_STEPS = Object.fromEntries(\n Object.entries(HEADING_SCALE).map(([level, metrics]) => [\n level,\n {\n fontSize: cssLengthToPx(metrics.fontSize, ROOT_FONT_PX),\n lineHeight: metrics.lineHeight,\n letterSpacing: cssTrackingToEm(metrics.letterSpacing),\n normalWeight: metrics.normalWeight,\n },\n ]),\n) as Record<HeadingLevel, UiHeadingStep>;\n\nexport const WEB_FONT_FAMILY = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\nexport const WEB_MONOSPACE_FONT_FAMILY = 'Monaco, Menlo, \"Ubuntu Mono\", \"Courier New\", monospace';\n\n/**\n * Build the theme. Every field is derived here so a host that changes one\n * seed gets every dependent shade recomputed, on both renderers, identically.\n */\nexport function createUiTheme(options: UiThemeOptions = {}): UiTheme {\n const mode = options.mode ?? 'light';\n const seeds = options.palette ?? {};\n const brand = DEFAULT_BRAND[mode];\n const defaults = MODE_DEFAULTS[mode];\n const spacingUnit = options.spacingUnit ?? 8;\n\n const palette: UiPalette = {\n mode,\n primary: augmentColor(seeds.primary ?? brand.primary),\n secondary: augmentColor(seeds.secondary ?? brand.secondary),\n success: semantic(mode, 'success', seeds.success),\n warning: semantic(mode, 'warning', seeds.warning),\n info: semantic(mode, 'info', seeds.info),\n danger: semantic(mode, 'danger', seeds.danger),\n neutral: NEUTRAL,\n text: defaults.text,\n background: { ...defaults.background, ...seeds.background },\n divider: defaults.divider,\n action: defaults.action,\n grey: GREY,\n };\n\n return {\n mode,\n palette,\n spacing: (units: number) => units * spacingUnit,\n spacingUnit,\n radius: { sm: 2, md: 4, lg: 8, xl: 16, full: 9999, field: options.fieldRadius ?? DEFAULT_FIELD_RADIUS },\n typography: {\n fontFamily: options.typography?.fontFamily,\n monospaceFontFamily: options.typography?.monospaceFontFamily,\n sizes: TYPE_SIZES,\n weights: FONT_WEIGHTS,\n heading: HEADING_STEPS,\n },\n zIndex: { appBar: 1100, drawer: 1200, modal: 1300, snackbar: 1400, tooltip: 1500 },\n };\n}\n\n/** The palette slot a house colour name resolves to. */\nexport type UiPaletteKey = 'primary' | 'secondary' | 'success' | 'warning' | 'info' | 'danger' | 'neutral';\n\nexport const DEFAULT_UI_THEME: UiTheme = createUiTheme();\n"],"mappings":";AA0BA,IAAM,UAAkC,CAAC,OAAO,QAAQ,OAAO,MAAM;AAErE,IAAM,QAAQ,CAAC,OAAe,MAAM,GAAG,MAAM,MAAc,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,GAAG,GAAG;AAGtF,SAAS,SAAS,OAAuB;AAC9C,QAAM,MAAM,MAAM,MAAM,CAAC;AACzB,QAAM,OAAO,IAAI,OAAO,OAAO,IAAI,UAAU,IAAI,IAAI,CAAC,KAAK,GAAG;AAC9D,MAAI,WAA4B,IAAI,MAAM,IAAI;AAC9C,MAAI,YAAY,SAAS,CAAC,GAAG,WAAW,GAAG;AACzC,eAAW,SAAS,IAAI,CAAC,YAAY,UAAU,OAAO;AAAA,EACxD;AACA,MAAI,CAAC,SAAU,QAAO;AAEtB,QAAM,QAAQ,SA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