@12-apps/ui 6.30.1 → 6.30.3

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 (661) hide show
  1. package/NATIVE.md +1 -1
  2. package/components-catalog.md +43 -5
  3. package/dist/_internal/components/data-display/Alert/Alert.js +4 -4
  4. package/dist/_internal/components/data-display/Alert/Alert.metrics.js +2 -2
  5. package/dist/_internal/components/data-display/Alert/Alert.styles.js +3 -3
  6. package/dist/_internal/components/data-display/Avatar/Avatar.js +5 -5
  7. package/dist/_internal/components/data-display/Avatar/Avatar.view.js +3 -3
  8. package/dist/_internal/components/data-display/Badge/Badge.animations.js +2 -2
  9. package/dist/_internal/components/data-display/Badge/Badge.js +6 -6
  10. package/dist/_internal/components/data-display/Badge/Badge.metrics.js +2 -2
  11. package/dist/_internal/components/data-display/Badge/Badge.styles.js +3 -3
  12. package/dist/_internal/components/data-display/Badge/Badge.variants.js +2 -2
  13. package/dist/_internal/components/data-display/Badge/BadgeContent.js +4 -4
  14. package/dist/_internal/components/data-display/Banner/Banner.js +2 -2
  15. package/dist/_internal/components/data-display/Banner/Banner.styles.js +2 -2
  16. package/dist/_internal/components/data-display/CardKit/CardKebab.js +6 -6
  17. package/dist/_internal/components/data-display/CardKit/card-actions-context.js +5 -5
  18. package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +11 -11
  19. package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +7 -7
  20. package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +2 -2
  21. package/dist/_internal/components/data-display/Carousel/Carousel.js +5 -5
  22. package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +2 -2
  23. package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +2 -2
  24. package/dist/_internal/components/data-display/Chart/Chart.js +6 -6
  25. package/dist/_internal/components/data-display/Chart/SpecChart.js +9 -9
  26. package/dist/_internal/components/data-display/Chart/chart-context.js +4 -4
  27. package/dist/_internal/components/data-display/Chart/chart-internals.js +2 -2
  28. package/dist/_internal/components/data-display/Chart/chart-renderers.js +5 -5
  29. package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +5 -5
  30. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +52 -52
  31. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +68 -68
  32. package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +8 -8
  33. package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +10 -10
  34. package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +13 -13
  35. package/dist/_internal/components/data-display/DataViews/base-card.js +7 -7
  36. package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +10 -10
  37. package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +4 -4
  38. package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +9 -9
  39. package/dist/_internal/components/data-display/DataViews/base-list-card.js +14 -14
  40. package/dist/_internal/components/data-display/DataViews/card-surface.js +2 -2
  41. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +11 -11
  42. package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +5 -5
  43. package/dist/_internal/components/data-display/DataViews/data-views-columns.js +7 -7
  44. package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +13 -13
  45. package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +7 -7
  46. package/dist/_internal/components/data-display/DataViews/data-views-empty.js +8 -8
  47. package/dist/_internal/components/data-display/DataViews/data-views-export.js +8 -8
  48. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +12 -12
  49. package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +14 -14
  50. package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +6 -6
  51. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +49 -49
  52. package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +5 -5
  53. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +21 -21
  54. package/dist/_internal/components/data-display/DataViews/data-views-layout-context.js +2 -2
  55. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +29 -6
  56. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +33 -10
  57. package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +1 -1
  58. package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +3 -3
  59. package/dist/_internal/components/data-display/DataViews/data-views-scope-tabs.js +3 -3
  60. package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +8 -8
  61. package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +18 -18
  62. package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +20 -20
  63. package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +17 -17
  64. package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +8 -8
  65. package/dist/_internal/components/data-display/DataViews/list-card-rails.js +3 -3
  66. package/dist/_internal/components/data-display/DataViews/save-view-preview.js +5 -5
  67. package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +9 -9
  68. package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
  69. package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +5 -5
  70. package/dist/_internal/components/data-display/FleetMap/FleetBody.js +11 -11
  71. package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +10 -10
  72. package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +2 -2
  73. package/dist/_internal/components/data-display/FleetMap/FleetMap.js +15 -15
  74. package/dist/_internal/components/data-display/HoverCard/HoverCard.js +2 -2
  75. package/dist/_internal/components/data-display/Lightbox/Lightbox.js +3 -3
  76. package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
  77. package/dist/_internal/components/data-display/MapPreview/MapLayers.js +2 -2
  78. package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
  79. package/dist/_internal/components/data-display/MapPreview/MapPreview.js +9 -9
  80. package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
  81. package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
  82. package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
  83. package/dist/_internal/components/data-display/Progress/Progress.js +5 -5
  84. package/dist/_internal/components/data-display/Progress/Progress.metrics.js +3 -3
  85. package/dist/_internal/components/data-display/Progress/Progress.styles.js +4 -4
  86. package/dist/_internal/components/data-display/Sheet/Sheet.body.js +2 -2
  87. package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
  88. package/dist/_internal/components/data-display/Sheet/Sheet.js +5 -5
  89. package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +2 -2
  90. package/dist/_internal/components/data-display/Table/Table.js +3 -3
  91. package/dist/_internal/components/data-display/index.js +57 -57
  92. package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +6 -6
  93. package/dist/_internal/components/feedback/Modal/Modal.js +2 -2
  94. package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +8 -8
  95. package/dist/_internal/components/feedback/index.js +14 -14
  96. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +5 -5
  97. package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +3 -3
  98. package/dist/_internal/components/form/Autocomplete/Autocomplete.js +1 -1
  99. package/dist/_internal/components/form/Button/Button.js +5 -5
  100. package/dist/_internal/components/form/Button/Button.styles.js +3 -3
  101. package/dist/_internal/components/form/Calendar/Calendar.js +4 -4
  102. package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
  103. package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
  104. package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +5 -5
  105. package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
  106. package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
  107. package/dist/_internal/components/form/CategorySelect/CategorySelect.js +9 -9
  108. package/dist/_internal/components/form/CepField/CepField.js +2 -2
  109. package/dist/_internal/components/form/Checkbox/Checkbox.js +3 -3
  110. package/dist/_internal/components/form/CodeEditor/CodeEditor.js +1 -1
  111. package/dist/_internal/components/form/Command/Command.js +2 -2
  112. package/dist/_internal/components/form/Command/Command.styles.js +2 -2
  113. package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
  114. package/dist/_internal/components/form/Input/Input.js +1 -1
  115. package/dist/_internal/components/form/InputOTP/InputOTP.js +2 -2
  116. package/dist/_internal/components/form/Label/Label.js +2 -2
  117. package/dist/_internal/components/form/Label/Label.styles.js +2 -2
  118. package/dist/_internal/components/form/Menubar/Menubar.item.js +2 -2
  119. package/dist/_internal/components/form/Menubar/Menubar.js +2 -2
  120. package/dist/_internal/components/form/Menubar/Menubar.styles.js +2 -2
  121. package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +2 -2
  122. package/dist/_internal/components/form/NumberField/NumberField.helpers.js +20 -0
  123. package/dist/_internal/components/form/NumberField/NumberField.js +21 -0
  124. package/dist/_internal/components/form/NumberField/NumberField.types.js +1 -0
  125. package/dist/_internal/components/form/NumberField/NumberField.types.js.map +1 -0
  126. package/dist/_internal/components/form/Switch/Switch.js +5 -5
  127. package/dist/_internal/components/form/Switch/Switch.parts.js +4 -4
  128. package/dist/_internal/components/form/Switch/Switch.styles.js +3 -3
  129. package/dist/_internal/components/form/UploadButton/UploadButton.js +2 -2
  130. package/dist/_internal/components/form/index.js +47 -41
  131. package/dist/_internal/components/form/total-form/Fields/CategoryField.js +10 -10
  132. package/dist/_internal/components/form/total-form/Fields/CepField.js +3 -3
  133. package/dist/_internal/components/form/total-form/Fields/TextField.js +2 -2
  134. package/dist/_internal/components/form/total-form/Fields/index.js +20 -20
  135. package/dist/_internal/components/form/total-form/SubmitButton.js +6 -6
  136. package/dist/_internal/components/index.js +194 -153
  137. package/dist/_internal/components/layout/Box/Box.js +5 -5
  138. package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +1 -1
  139. package/dist/_internal/components/layout/SettingCard/SettingCard.focus.js +8 -0
  140. package/dist/_internal/components/layout/SettingCard/SettingCard.focus.js.map +1 -0
  141. package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js +19 -0
  142. package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js.map +1 -0
  143. package/dist/_internal/components/layout/SettingCard/SettingCard.js +44 -0
  144. package/dist/_internal/components/layout/SettingCard/SettingCard.js.map +1 -0
  145. package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js +12 -0
  146. package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js.map +1 -0
  147. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +49 -0
  148. package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js.map +1 -0
  149. package/dist/_internal/components/layout/SettingCard/SettingCard.rem.js +8 -0
  150. package/dist/_internal/components/layout/SettingCard/SettingCard.rem.js.map +1 -0
  151. package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js +35 -0
  152. package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js.map +1 -0
  153. package/dist/_internal/components/layout/SettingCard/SettingCard.types.js +1 -0
  154. package/dist/_internal/components/layout/SettingCard/SettingCard.types.js.map +1 -0
  155. package/dist/_internal/components/layout/SettingCard/SettingGrid.js +46 -0
  156. package/dist/_internal/components/layout/SettingCard/SettingGrid.js.map +1 -0
  157. package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js +10 -0
  158. package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js.map +1 -0
  159. package/dist/_internal/components/layout/SettingCard/SettingGroup.js +55 -0
  160. package/dist/_internal/components/layout/SettingCard/SettingGroup.js.map +1 -0
  161. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +53 -0
  162. package/dist/_internal/components/layout/SettingCard/SettingSwitch.js.map +1 -0
  163. package/dist/_internal/components/layout/SettingCard/SettingToggle.js +55 -0
  164. package/dist/_internal/components/layout/SettingCard/SettingToggle.js.map +1 -0
  165. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
  166. package/dist/_internal/components/layout/Stack/Stack.js +6 -6
  167. package/dist/_internal/components/layout/index.js +74 -12
  168. package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +9 -9
  169. package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +2 -2
  170. package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +3 -3
  171. package/dist/_internal/components/navigation/Pagination/Pagination.js +2 -2
  172. package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
  173. package/dist/_internal/components/navigation/index.js +26 -26
  174. package/dist/_internal/components/typography/Heading/Heading.js +5 -5
  175. package/dist/_internal/components/typography/Heading/Heading.metrics.js +3 -3
  176. package/dist/_internal/components/typography/Heading/Heading.styles.js +4 -4
  177. package/dist/_internal/components/typography/Paragraph/Paragraph.js +3 -3
  178. package/dist/_internal/components/typography/Text/Text.js +4 -4
  179. package/dist/_internal/components/typography/Text/Text.metrics.js +3 -3
  180. package/dist/_internal/components/typography/index.js +11 -11
  181. package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +3 -3
  182. package/dist/_internal/components/utility/InstallPrompt/usePwaInstall.js +2 -2
  183. package/dist/_internal/components/utility/index.js +15 -15
  184. package/dist/_internal/en-US.data-display.js +2 -2
  185. package/dist/_internal/en-US.layout.js +5 -1
  186. package/dist/_internal/icons/Icon.js +6 -6
  187. package/dist/_internal/provider/UiProvider.js +4 -4
  188. package/dist/_internal/provider/mui-bridge.js +3 -3
  189. package/dist/_internal/provider/use-ui-theme.js +4 -4
  190. package/dist/_internal/pt-BR.data-display.js +2 -2
  191. package/dist/_internal/pt-BR.layout.js +5 -1
  192. package/dist/_internal/social-login-button/social-login-button.js +11 -11
  193. package/dist/_internal/tokens/theme.js +2 -2
  194. package/dist/_internal/user-avatar/user-avatar.js +11 -11
  195. package/dist/charts.js +15 -15
  196. package/dist/{chunk-TSEWUY4V.js → chunk-23LZNANO.js} +2 -2
  197. package/dist/{chunk-K2EHH7TC.js → chunk-2CJXYSOE.js} +7 -7
  198. package/dist/{chunk-HGJHZ5PE.js → chunk-2DHVWNTO.js} +7 -7
  199. package/dist/{chunk-K2JH7QPR.js → chunk-2F2HPQNQ.js} +3 -3
  200. package/dist/chunk-2GTORM5E.js +1 -0
  201. package/dist/chunk-2GTORM5E.js.map +1 -0
  202. package/dist/{chunk-C5YBXQTK.js → chunk-2QJKWH7Q.js} +3 -3
  203. package/dist/{chunk-W3FAKT3D.js → chunk-2SWQ6HIK.js} +4 -4
  204. package/dist/{chunk-IIUB4IOH.js → chunk-2XHIF3M3.js} +4 -4
  205. package/dist/chunk-33L26P4J.js +27 -0
  206. package/dist/chunk-33L26P4J.js.map +1 -0
  207. package/dist/{chunk-3PUOLOEP.js → chunk-37L6O266.js} +2 -2
  208. package/dist/{chunk-EVXFEXBS.js → chunk-3ELEPGCP.js} +2 -2
  209. package/dist/{chunk-RVGG5YJY.js → chunk-3HJLJFLA.js} +2 -2
  210. package/dist/chunk-3U7WKBMH.js +27 -0
  211. package/dist/chunk-3U7WKBMH.js.map +1 -0
  212. package/dist/{chunk-VESIQYBF.js → chunk-3ZTC2VEO.js} +9 -9
  213. package/dist/{chunk-46UPILLK.js → chunk-4ETQRBZC.js} +4 -4
  214. package/dist/chunk-4HDP2PZD.js +9 -0
  215. package/dist/chunk-4HDP2PZD.js.map +1 -0
  216. package/dist/{chunk-PFZAUMJA.js → chunk-4JGBWPG7.js} +2 -2
  217. package/dist/{chunk-7IKWIWWV.js → chunk-53LG7IT4.js} +11 -11
  218. package/dist/{chunk-S2GDYA6R.js → chunk-5GMHJ7Y5.js} +5 -5
  219. package/dist/{chunk-IABE56TG.js → chunk-5ZOJLYD2.js} +4 -4
  220. package/dist/{chunk-XXE6NTJB.js → chunk-5ZXVYKHU.js} +10 -5
  221. package/dist/chunk-5ZXVYKHU.js.map +1 -0
  222. package/dist/{chunk-4XVH6IWN.js → chunk-66KAONOC.js} +3 -3
  223. package/dist/{chunk-4MXFPDKL.js → chunk-6CAP4STN.js} +4 -4
  224. package/dist/{chunk-C5EFVSBN.js → chunk-6HJLYSBM.js} +2 -2
  225. package/dist/{chunk-CASZGBCA.js → chunk-6P3CRSAW.js} +5 -5
  226. package/dist/chunk-6PPF5WEN.js +30 -0
  227. package/dist/chunk-6PPF5WEN.js.map +1 -0
  228. package/dist/{chunk-Y5UCOBQN.js → chunk-6SK3MTYJ.js} +4 -4
  229. package/dist/{chunk-JQL4GG5L.js → chunk-6VMTF23F.js} +5 -5
  230. package/dist/{chunk-EPRA5QLB.js → chunk-6XUZDJZY.js} +2 -2
  231. package/dist/{chunk-B6IURHSZ.js → chunk-7DNQHMDO.js} +4 -4
  232. package/dist/{chunk-SLMA4UQS.js → chunk-A3TISECJ.js} +3 -3
  233. package/dist/{chunk-FVPN4YKW.js → chunk-ABSHD35E.js} +3 -3
  234. package/dist/chunk-AEMD6JHZ.js +1 -0
  235. package/dist/chunk-AEMD6JHZ.js.map +1 -0
  236. package/dist/{chunk-PQECNGDE.js → chunk-AGYGNNOM.js} +2 -2
  237. package/dist/{chunk-SUTNQG7E.js → chunk-ALU3BH37.js} +4 -4
  238. package/dist/{chunk-MGPA6KTM.js → chunk-AMFP64L3.js} +2 -2
  239. package/dist/{chunk-VEGT5PAD.js → chunk-BAISDZ3L.js} +21 -21
  240. package/dist/chunk-BOWS4U6W.js +1 -0
  241. package/dist/chunk-BOWS4U6W.js.map +1 -0
  242. package/dist/{chunk-CZJLWCEG.js → chunk-BPYPUEM5.js} +2 -2
  243. package/dist/{chunk-3MALHTZQ.js → chunk-C4J7PVVI.js} +3 -3
  244. package/dist/{chunk-7OZBOS75.js → chunk-CK2NTT4S.js} +6 -6
  245. package/dist/{chunk-Q5NAZ7TW.js → chunk-CSGUSHAO.js} +4 -4
  246. package/dist/{chunk-YTYROOLY.js → chunk-D22EGB3T.js} +3 -3
  247. package/dist/{chunk-VNGYJXAU.js → chunk-DBV6DDQI.js} +2 -2
  248. package/dist/{chunk-6PKVHFCK.js → chunk-DCRNBKMY.js} +9 -9
  249. package/dist/{chunk-PMS3H3OO.js → chunk-DF2FFYZ7.js} +4 -4
  250. package/dist/chunk-DG2A4DQU.js +118 -0
  251. package/dist/chunk-DG2A4DQU.js.map +1 -0
  252. package/dist/{chunk-RBGOGTT2.js → chunk-DWZ7FLA7.js} +4 -4
  253. package/dist/{chunk-237NDIT2.js → chunk-E3O72LBJ.js} +2 -2
  254. package/dist/{chunk-OH3YGJT5.js → chunk-EMNGIYH6.js} +5 -5
  255. package/dist/{chunk-XFUNJYFT.js → chunk-EPNUVSNK.js} +7 -7
  256. package/dist/{chunk-35UG2QDB.js → chunk-EUEUZI4L.js} +2 -2
  257. package/dist/{chunk-KUJLZFDW.js → chunk-FCG5YR6T.js} +3 -3
  258. package/dist/{chunk-2UBFDRL7.js → chunk-FCTURAZF.js} +2 -2
  259. package/dist/{chunk-UC6A6ASM.js → chunk-FFQKUTO6.js} +2 -2
  260. package/dist/{chunk-J3ZP6EUS.js → chunk-FNIHELAR.js} +2 -2
  261. package/dist/{chunk-SQV3HPTZ.js → chunk-G76H5PEM.js} +4 -4
  262. package/dist/{chunk-FLIMEQUA.js → chunk-GBX5ACPF.js} +5 -5
  263. package/dist/{chunk-22ZJH7RY.js → chunk-GN26LHNJ.js} +2 -2
  264. package/dist/{chunk-5KFZGB5U.js → chunk-GS7ESED2.js} +2 -2
  265. package/dist/{chunk-FGUK3D54.js → chunk-GZHZ7OTY.js} +3 -3
  266. package/dist/chunk-HALFOXSZ.js +1 -0
  267. package/dist/chunk-HALFOXSZ.js.map +1 -0
  268. package/dist/{chunk-BLBOYCOV.js → chunk-HKV4MQ2W.js} +5 -5
  269. package/dist/{chunk-K4JRHQMI.js → chunk-HMJM6DKA.js} +3 -3
  270. package/dist/{chunk-ZWIDQEJ4.js → chunk-HT7DWIR4.js} +5 -5
  271. package/dist/{chunk-UVD5NFRF.js → chunk-I3PGXMVJ.js} +2 -2
  272. package/dist/{chunk-Z52HVR4J.js → chunk-I4IPGIRF.js} +2 -2
  273. package/dist/{chunk-HR7YTBR7.js → chunk-IASDP44E.js} +4 -4
  274. package/dist/chunk-IAVQXQ3V.js +82 -0
  275. package/dist/chunk-IAVQXQ3V.js.map +1 -0
  276. package/dist/chunk-IC7GHPMK.js +22 -0
  277. package/dist/chunk-IC7GHPMK.js.map +1 -0
  278. package/dist/{chunk-VKH7AENA.js → chunk-IFNJWH55.js} +2 -2
  279. package/dist/{chunk-PUBPZOQJ.js → chunk-IPE5FFFD.js} +2 -2
  280. package/dist/{chunk-HP2ODXNA.js → chunk-IPS55KWK.js} +2 -2
  281. package/dist/{chunk-BILJU2DX.js → chunk-JFOATIMF.js} +5 -5
  282. package/dist/{chunk-MCBG6R5A.js → chunk-JH77UDWB.js} +3 -3
  283. package/dist/{chunk-XYDW5RQB.js → chunk-JTJR63WI.js} +2 -2
  284. package/dist/{chunk-IVVOIDE5.js → chunk-KHVKQPQ5.js} +3 -3
  285. package/dist/chunk-KRR6KK5J.js +117 -0
  286. package/dist/chunk-KRR6KK5J.js.map +1 -0
  287. package/dist/{chunk-T5WNNEP5.js → chunk-KVCS6IEI.js} +2 -2
  288. package/dist/{chunk-HZ6L7WXE.js → chunk-LGOIBC2C.js} +7 -7
  289. package/dist/chunk-LGPQVKHC.js +47 -0
  290. package/dist/chunk-LGPQVKHC.js.map +1 -0
  291. package/dist/{chunk-BKAB4KZK.js → chunk-LKAKYP42.js} +5 -5
  292. package/dist/{chunk-ZPIMPOHV.js → chunk-M7E66OSC.js} +4 -4
  293. package/dist/{chunk-VVXA7T2M.js → chunk-MG6XC5SK.js} +2 -2
  294. package/dist/{chunk-554SVTCN.js → chunk-MKZNP32D.js} +4 -4
  295. package/dist/chunk-MPRZDEKY.js +168 -0
  296. package/dist/chunk-MPRZDEKY.js.map +1 -0
  297. package/dist/{chunk-MSS6IU5X.js → chunk-N6V6BFKD.js} +3 -3
  298. package/dist/{chunk-OLQDB346.js → chunk-NH4XD62U.js} +2 -2
  299. package/dist/{chunk-GH2DC7PS.js → chunk-NPN7JTRM.js} +4 -4
  300. package/dist/{chunk-AIBNBWQU.js → chunk-NR7LSYLM.js} +2 -2
  301. package/dist/{chunk-3XLDTVLC.js → chunk-NU2HND2Y.js} +5 -5
  302. package/dist/{chunk-T2VO32Z2.js → chunk-OG5LJPI3.js} +2 -2
  303. package/dist/{chunk-REMK55JI.js → chunk-OLZTGVBT.js} +4 -4
  304. package/dist/{chunk-URVNHKM2.js → chunk-ON7PRAAC.js} +6 -6
  305. package/dist/{chunk-EZMCWRXO.js → chunk-OTMJBGJA.js} +24 -26
  306. package/dist/chunk-OTMJBGJA.js.map +1 -0
  307. package/dist/{chunk-3TFUAKWJ.js → chunk-OVOSDXFM.js} +2 -2
  308. package/dist/{chunk-SONWG2RT.js → chunk-OW4UEIXA.js} +5 -5
  309. package/dist/{chunk-23FCBIUN.js → chunk-P7FQUGED.js} +8 -8
  310. package/dist/{chunk-V7F53GEO.js → chunk-P7IVAMAU.js} +7 -7
  311. package/dist/{chunk-JYF3HT7M.js → chunk-PD6JRCUT.js} +8 -8
  312. package/dist/chunk-PGGGKYWG.js +1 -0
  313. package/dist/chunk-PGGGKYWG.js.map +1 -0
  314. package/dist/{chunk-B474PL5O.js → chunk-PKFFJAQ6.js} +2 -2
  315. package/dist/{chunk-EUKYQXYU.js → chunk-PLDVEJPR.js} +2 -2
  316. package/dist/{chunk-HT4B2DJU.js → chunk-PZEC5CQA.js} +4 -4
  317. package/dist/chunk-Q4JWWTL4.js +36 -0
  318. package/dist/chunk-Q4JWWTL4.js.map +1 -0
  319. package/dist/chunk-Q6FUSSLK.js +140 -0
  320. package/dist/chunk-Q6FUSSLK.js.map +1 -0
  321. package/dist/{chunk-6FUOUUYO.js → chunk-Q6STVEYJ.js} +4 -4
  322. package/dist/{chunk-6IKX5IIX.js → chunk-Q75SJ35X.js} +5 -5
  323. package/dist/{chunk-WC5XYWTE.js → chunk-QGJBNVC2.js} +2 -2
  324. package/dist/chunk-QGUNUXTT.js +1 -0
  325. package/dist/chunk-QGUNUXTT.js.map +1 -0
  326. package/dist/{chunk-KFZT3PHA.js → chunk-QHJ7FTZK.js} +4 -4
  327. package/dist/{chunk-NUB4T3RQ.js → chunk-QJ6KWJJH.js} +2 -2
  328. package/dist/chunk-R6XVOUNC.js +85 -0
  329. package/dist/chunk-R6XVOUNC.js.map +1 -0
  330. package/dist/{chunk-CZPU5TW3.js → chunk-RFZU5BTG.js} +2 -2
  331. package/dist/chunk-RH4QT7YT.js +74 -0
  332. package/dist/chunk-RH4QT7YT.js.map +1 -0
  333. package/dist/{chunk-JGV66VUK.js → chunk-RLCMVSJZ.js} +2 -2
  334. package/dist/chunk-RN7UJI7S.js +1 -0
  335. package/dist/chunk-RN7UJI7S.js.map +1 -0
  336. package/dist/{chunk-JB67KPGM.js → chunk-RRO2EOJB.js} +4 -4
  337. package/dist/{chunk-JJ3VR7WX.js → chunk-RZLWW3KC.js} +2 -2
  338. package/dist/{chunk-MZQTHSLN.js → chunk-S7HRED4D.js} +2 -2
  339. package/dist/{chunk-EXJBPKGW.js → chunk-SHDIZSN5.js} +5 -5
  340. package/dist/{chunk-GJQYM3PM.js → chunk-SHQWIDD5.js} +4 -4
  341. package/dist/{chunk-L6TCIZFR.js → chunk-SUAGBFYJ.js} +3 -3
  342. package/dist/{chunk-K5V3KCFI.js → chunk-SVBR3GWG.js} +6 -6
  343. package/dist/{chunk-DAPK3ADA.js → chunk-TC3EPGGJ.js} +4 -4
  344. package/dist/{chunk-DEE6IPGI.js → chunk-TJXNVREN.js} +2 -2
  345. package/dist/{chunk-WREIYOXN.js → chunk-TLMLEC4F.js} +7 -7
  346. package/dist/{chunk-57ZSQB5V.js → chunk-TLRTLYVT.js} +2 -2
  347. package/dist/{chunk-DUWF5LUK.js → chunk-TNCCCLLO.js} +4 -4
  348. package/dist/{chunk-TQ6FPOPD.js → chunk-TPKSOHB5.js} +5 -2
  349. package/dist/{chunk-TQ6FPOPD.js.map → chunk-TPKSOHB5.js.map} +1 -1
  350. package/dist/{chunk-JPVDZXXX.js → chunk-U5RQBHRY.js} +2 -2
  351. package/dist/{chunk-TU5EIKJA.js → chunk-U5SH3VRJ.js} +4 -4
  352. package/dist/chunk-V32X24SH.js +87 -0
  353. package/dist/chunk-V32X24SH.js.map +1 -0
  354. package/dist/{chunk-J4W4TQPC.js → chunk-V5P5Q6HM.js} +6 -6
  355. package/dist/{chunk-DQOLW4B5.js → chunk-VBMV2W4K.js} +3 -3
  356. package/dist/{chunk-57W2C7HY.js → chunk-VOHT6ZX3.js} +8 -8
  357. package/dist/{chunk-QYNCPS5W.js → chunk-WBKWIFXA.js} +6 -6
  358. package/dist/{chunk-VJFH2AXT.js → chunk-WG7HIXJ7.js} +8 -8
  359. package/dist/{chunk-VMXDTCYF.js → chunk-WMALDOF5.js} +4 -4
  360. package/dist/{chunk-I3FXTIKA.js → chunk-WP6Y2NJQ.js} +3 -3
  361. package/dist/chunk-WP6Y2NJQ.js.map +1 -0
  362. package/dist/{chunk-2L2NWXWJ.js → chunk-WRXD464C.js} +2 -2
  363. package/dist/{chunk-KT6HWAEN.js → chunk-WZUNBSS7.js} +2 -2
  364. package/dist/{chunk-NWQWUYOV.js → chunk-XGB3YF32.js} +2 -2
  365. package/dist/chunk-XJQNSMGA.js +10 -0
  366. package/dist/chunk-XJQNSMGA.js.map +1 -0
  367. package/dist/{chunk-QRX5BYUQ.js → chunk-Y6KPZQPI.js} +4 -4
  368. package/dist/{chunk-ZYKDPX3W.js → chunk-YY66AKSK.js} +2 -2
  369. package/dist/{chunk-62NA6IF3.js → chunk-ZBZ76VR7.js} +3 -3
  370. package/dist/{chunk-OXQP3N6X.js → chunk-ZTZ6S5Q6.js} +4 -4
  371. package/dist/data-display/Alert.js +4 -4
  372. package/dist/data-display/Avatar.js +5 -5
  373. package/dist/data-display/Badge.js +6 -6
  374. package/dist/data-display/Banner.js +2 -2
  375. package/dist/data-display/CardKit.js +15 -15
  376. package/dist/data-display/Carousel.js +5 -5
  377. package/dist/data-display/Chart.js +15 -15
  378. package/dist/data-display/Chip.js +1 -0
  379. package/dist/data-display/DataViews.js +88 -88
  380. package/dist/data-display/DescriptionItem.js +5 -5
  381. package/dist/data-display/FleetMap.js +15 -15
  382. package/dist/data-display/HoverCard.js +2 -2
  383. package/dist/data-display/Lightbox.js +3 -3
  384. package/dist/data-display/MapPreview.js +9 -9
  385. package/dist/data-display/Progress.js +5 -5
  386. package/dist/data-display/Sheet.js +5 -5
  387. package/dist/data-display/Table.js +3 -3
  388. package/dist/en-US.js +15 -11
  389. package/dist/feedback/ConfirmAction.js +9 -9
  390. package/dist/feedback/Modal.js +2 -2
  391. package/dist/feedback/NotificationStatusNotice.js +8 -8
  392. package/dist/form/AddressAutocomplete.js +5 -5
  393. package/dist/form/Autocomplete.js +1 -1
  394. package/dist/form/Button.js +5 -5
  395. package/dist/form/Calendar.js +4 -4
  396. package/dist/form/CategorySelect.js +9 -9
  397. package/dist/form/CepField.js +2 -2
  398. package/dist/form/Checkbox.js +3 -3
  399. package/dist/form/CodeEditor.js +1 -1
  400. package/dist/form/Command.js +2 -2
  401. package/dist/form/DateRangePicker.js +7 -7
  402. package/dist/form/Input.js +1 -1
  403. package/dist/form/InputOTP.js +2 -2
  404. package/dist/form/Label.js +2 -2
  405. package/dist/form/Menubar.js +2 -2
  406. package/dist/form/NumberField.js +22 -0
  407. package/dist/form/NumberField.js.map +1 -0
  408. package/dist/form/Switch.js +5 -5
  409. package/dist/form/UploadButton.js +2 -2
  410. package/dist/form/total-form.js +24 -24
  411. package/dist/icons.js +7 -6
  412. package/dist/layout/Box.js +5 -5
  413. package/dist/layout/Collapsible.js +1 -0
  414. package/dist/layout/ContentToolbar.js +3 -3
  415. package/dist/layout/ScrollArea.js +1 -1
  416. package/dist/layout/SettingCard.js +70 -0
  417. package/dist/layout/SettingCard.js.map +1 -0
  418. package/dist/layout/SettingsLayout.js +3 -3
  419. package/dist/layout/Stack.js +6 -6
  420. package/dist/locales.js +37 -23
  421. package/dist/locales.js.map +1 -1
  422. package/dist/navigation/AppHeader.js +11 -11
  423. package/dist/navigation/CommandPalette.js +3 -3
  424. package/dist/navigation/Pagination.js +2 -2
  425. package/dist/navigation/Tabs.js +2 -2
  426. package/dist/provider.js +5 -5
  427. package/dist/pt-BR.js +12 -8
  428. package/dist/social-login-button.js +11 -11
  429. package/dist/tokens.js +2 -2
  430. package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts +6 -1
  431. package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts.map +1 -1
  432. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +0 -11
  433. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
  434. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
  435. package/dist/types/components/form/Input/Input.d.ts.map +1 -1
  436. package/dist/types/components/form/Input/Input.types.d.ts +10 -0
  437. package/dist/types/components/form/Input/Input.types.d.ts.map +1 -1
  438. package/dist/types/components/form/NumberField/NumberField.d.ts +21 -0
  439. package/dist/types/components/form/NumberField/NumberField.d.ts.map +1 -0
  440. package/dist/types/components/form/NumberField/NumberField.helpers.d.ts +48 -0
  441. package/dist/types/components/form/NumberField/NumberField.helpers.d.ts.map +1 -0
  442. package/dist/types/components/form/NumberField/NumberField.types.d.ts +31 -0
  443. package/dist/types/components/form/NumberField/NumberField.types.d.ts.map +1 -0
  444. package/dist/types/components/form/NumberField/index.d.ts +3 -0
  445. package/dist/types/components/form/NumberField/index.d.ts.map +1 -0
  446. package/dist/types/components/form/index.d.ts +1 -0
  447. package/dist/types/components/form/index.d.ts.map +1 -1
  448. package/dist/types/components/layout/SettingCard/SettingCard.d.ts +14 -0
  449. package/dist/types/components/layout/SettingCard/SettingCard.d.ts.map +1 -0
  450. package/dist/types/components/layout/SettingCard/SettingCard.focus.d.ts +19 -0
  451. package/dist/types/components/layout/SettingCard/SettingCard.focus.d.ts.map +1 -0
  452. package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts +79 -0
  453. package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts.map +1 -0
  454. package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts +21 -0
  455. package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts.map +1 -0
  456. package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts +49 -0
  457. package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts.map +1 -0
  458. package/dist/types/components/layout/SettingCard/SettingCard.rem.d.ts +12 -0
  459. package/dist/types/components/layout/SettingCard/SettingCard.rem.d.ts.map +1 -0
  460. package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts +48 -0
  461. package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts.map +1 -0
  462. package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts +127 -0
  463. package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts.map +1 -0
  464. package/dist/types/components/layout/SettingCard/SettingGrid.d.ts +33 -0
  465. package/dist/types/components/layout/SettingCard/SettingGrid.d.ts.map +1 -0
  466. package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts +13 -0
  467. package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts.map +1 -0
  468. package/dist/types/components/layout/SettingCard/SettingGroup.d.ts +18 -0
  469. package/dist/types/components/layout/SettingCard/SettingGroup.d.ts.map +1 -0
  470. package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts +28 -0
  471. package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts.map +1 -0
  472. package/dist/types/components/layout/SettingCard/SettingToggle.d.ts +13 -0
  473. package/dist/types/components/layout/SettingCard/SettingToggle.d.ts.map +1 -0
  474. package/dist/types/components/layout/SettingCard/index.d.ts +6 -0
  475. package/dist/types/components/layout/SettingCard/index.d.ts.map +1 -0
  476. package/dist/types/components/layout/index.d.ts +1 -0
  477. package/dist/types/components/layout/index.d.ts.map +1 -1
  478. package/dist/types/copy/layout.d.ts +27 -0
  479. package/dist/types/copy/layout.d.ts.map +1 -1
  480. package/dist/types/en-US.layout.d.ts +3 -1
  481. package/dist/types/en-US.layout.d.ts.map +1 -1
  482. package/dist/types/locales.d.ts +3 -1
  483. package/dist/types/locales.d.ts.map +1 -1
  484. package/dist/types/pt-BR.layout.d.ts +3 -1
  485. package/dist/types/pt-BR.layout.d.ts.map +1 -1
  486. package/dist/typography/Heading.js +5 -5
  487. package/dist/typography/Paragraph.js +3 -3
  488. package/dist/typography/Text.js +4 -4
  489. package/dist/user-avatar.js +11 -11
  490. package/dist/utility/InstallPrompt.js +4 -4
  491. package/package.json +9 -1
  492. package/src/components/data-display/DataViews/data-views-category-pill.tsx +6 -1
  493. package/src/components/data-display/DataViews/data-views-more-fields.tsx +43 -37
  494. package/src/components/data-display/DataViews/data-views-overflow.ts +12 -1
  495. package/src/components/form/Input/Input.tsx +25 -12
  496. package/src/components/form/Input/Input.types.ts +10 -0
  497. package/src/components/form/NumberField/NumberField.helpers.ts +77 -0
  498. package/src/components/form/NumberField/NumberField.md +86 -0
  499. package/src/components/form/NumberField/NumberField.tsx +88 -0
  500. package/src/components/form/NumberField/NumberField.types.ts +43 -0
  501. package/src/components/form/NumberField/index.ts +2 -0
  502. package/src/components/form/NumberField/tests.md +51 -0
  503. package/src/components/form/NumberField/track.md +48 -0
  504. package/src/components/form/index.ts +1 -0
  505. package/src/components/layout/SettingCard/SettingCard.focus.ts +49 -0
  506. package/src/components/layout/SettingCard/SettingCard.hooks.ts +191 -0
  507. package/src/components/layout/SettingCard/SettingCard.md +121 -0
  508. package/src/components/layout/SettingCard/SettingCard.metrics.ts +22 -0
  509. package/src/components/layout/SettingCard/SettingCard.parts.tsx +162 -0
  510. package/src/components/layout/SettingCard/SettingCard.rem.ts +14 -0
  511. package/src/components/layout/SettingCard/SettingCard.styles.ts +142 -0
  512. package/src/components/layout/SettingCard/SettingCard.tsx +197 -0
  513. package/src/components/layout/SettingCard/SettingCard.types.ts +140 -0
  514. package/src/components/layout/SettingCard/SettingGrid.md +65 -0
  515. package/src/components/layout/SettingCard/SettingGrid.tsx +105 -0
  516. package/src/components/layout/SettingCard/SettingGroup.context.ts +11 -0
  517. package/src/components/layout/SettingCard/SettingGroup.md +81 -0
  518. package/src/components/layout/SettingCard/SettingGroup.tsx +73 -0
  519. package/src/components/layout/SettingCard/SettingSwitch.tsx +92 -0
  520. package/src/components/layout/SettingCard/SettingToggle.md +61 -0
  521. package/src/components/layout/SettingCard/SettingToggle.tsx +43 -0
  522. package/src/components/layout/SettingCard/index.ts +18 -0
  523. package/src/components/layout/SettingCard/tests.md +68 -0
  524. package/src/components/layout/SettingCard/track.md +63 -0
  525. package/src/components/layout/index.ts +1 -0
  526. package/src/copy/layout.ts +29 -0
  527. package/src/en-US.layout.ts +16 -0
  528. package/src/locales.ts +10 -0
  529. package/src/pt-BR.layout.ts +16 -0
  530. package/dist/chunk-A7RIZOAL.js +0 -13
  531. package/dist/chunk-A7RIZOAL.js.map +0 -1
  532. package/dist/chunk-BY3JEK5T.js +0 -1
  533. package/dist/chunk-EZMCWRXO.js.map +0 -1
  534. package/dist/chunk-FZJ2FTGE.js +0 -1
  535. package/dist/chunk-GRHECKHU.js +0 -13
  536. package/dist/chunk-GRHECKHU.js.map +0 -1
  537. package/dist/chunk-I3FXTIKA.js.map +0 -1
  538. package/dist/chunk-XXE6NTJB.js.map +0 -1
  539. /package/dist/{chunk-BY3JEK5T.js.map → _internal/components/form/NumberField/NumberField.helpers.js.map} +0 -0
  540. /package/dist/{chunk-FZJ2FTGE.js.map → _internal/components/form/NumberField/NumberField.js.map} +0 -0
  541. /package/dist/{chunk-TSEWUY4V.js.map → chunk-23LZNANO.js.map} +0 -0
  542. /package/dist/{chunk-K2EHH7TC.js.map → chunk-2CJXYSOE.js.map} +0 -0
  543. /package/dist/{chunk-HGJHZ5PE.js.map → chunk-2DHVWNTO.js.map} +0 -0
  544. /package/dist/{chunk-K2JH7QPR.js.map → chunk-2F2HPQNQ.js.map} +0 -0
  545. /package/dist/{chunk-C5YBXQTK.js.map → chunk-2QJKWH7Q.js.map} +0 -0
  546. /package/dist/{chunk-W3FAKT3D.js.map → chunk-2SWQ6HIK.js.map} +0 -0
  547. /package/dist/{chunk-IIUB4IOH.js.map → chunk-2XHIF3M3.js.map} +0 -0
  548. /package/dist/{chunk-3PUOLOEP.js.map → chunk-37L6O266.js.map} +0 -0
  549. /package/dist/{chunk-EVXFEXBS.js.map → chunk-3ELEPGCP.js.map} +0 -0
  550. /package/dist/{chunk-RVGG5YJY.js.map → chunk-3HJLJFLA.js.map} +0 -0
  551. /package/dist/{chunk-VESIQYBF.js.map → chunk-3ZTC2VEO.js.map} +0 -0
  552. /package/dist/{chunk-46UPILLK.js.map → chunk-4ETQRBZC.js.map} +0 -0
  553. /package/dist/{chunk-PFZAUMJA.js.map → chunk-4JGBWPG7.js.map} +0 -0
  554. /package/dist/{chunk-7IKWIWWV.js.map → chunk-53LG7IT4.js.map} +0 -0
  555. /package/dist/{chunk-S2GDYA6R.js.map → chunk-5GMHJ7Y5.js.map} +0 -0
  556. /package/dist/{chunk-IABE56TG.js.map → chunk-5ZOJLYD2.js.map} +0 -0
  557. /package/dist/{chunk-4XVH6IWN.js.map → chunk-66KAONOC.js.map} +0 -0
  558. /package/dist/{chunk-4MXFPDKL.js.map → chunk-6CAP4STN.js.map} +0 -0
  559. /package/dist/{chunk-C5EFVSBN.js.map → chunk-6HJLYSBM.js.map} +0 -0
  560. /package/dist/{chunk-CASZGBCA.js.map → chunk-6P3CRSAW.js.map} +0 -0
  561. /package/dist/{chunk-Y5UCOBQN.js.map → chunk-6SK3MTYJ.js.map} +0 -0
  562. /package/dist/{chunk-JQL4GG5L.js.map → chunk-6VMTF23F.js.map} +0 -0
  563. /package/dist/{chunk-EPRA5QLB.js.map → chunk-6XUZDJZY.js.map} +0 -0
  564. /package/dist/{chunk-B6IURHSZ.js.map → chunk-7DNQHMDO.js.map} +0 -0
  565. /package/dist/{chunk-SLMA4UQS.js.map → chunk-A3TISECJ.js.map} +0 -0
  566. /package/dist/{chunk-FVPN4YKW.js.map → chunk-ABSHD35E.js.map} +0 -0
  567. /package/dist/{chunk-PQECNGDE.js.map → chunk-AGYGNNOM.js.map} +0 -0
  568. /package/dist/{chunk-SUTNQG7E.js.map → chunk-ALU3BH37.js.map} +0 -0
  569. /package/dist/{chunk-MGPA6KTM.js.map → chunk-AMFP64L3.js.map} +0 -0
  570. /package/dist/{chunk-VEGT5PAD.js.map → chunk-BAISDZ3L.js.map} +0 -0
  571. /package/dist/{chunk-CZJLWCEG.js.map → chunk-BPYPUEM5.js.map} +0 -0
  572. /package/dist/{chunk-3MALHTZQ.js.map → chunk-C4J7PVVI.js.map} +0 -0
  573. /package/dist/{chunk-7OZBOS75.js.map → chunk-CK2NTT4S.js.map} +0 -0
  574. /package/dist/{chunk-Q5NAZ7TW.js.map → chunk-CSGUSHAO.js.map} +0 -0
  575. /package/dist/{chunk-YTYROOLY.js.map → chunk-D22EGB3T.js.map} +0 -0
  576. /package/dist/{chunk-VNGYJXAU.js.map → chunk-DBV6DDQI.js.map} +0 -0
  577. /package/dist/{chunk-6PKVHFCK.js.map → chunk-DCRNBKMY.js.map} +0 -0
  578. /package/dist/{chunk-PMS3H3OO.js.map → chunk-DF2FFYZ7.js.map} +0 -0
  579. /package/dist/{chunk-RBGOGTT2.js.map → chunk-DWZ7FLA7.js.map} +0 -0
  580. /package/dist/{chunk-237NDIT2.js.map → chunk-E3O72LBJ.js.map} +0 -0
  581. /package/dist/{chunk-OH3YGJT5.js.map → chunk-EMNGIYH6.js.map} +0 -0
  582. /package/dist/{chunk-XFUNJYFT.js.map → chunk-EPNUVSNK.js.map} +0 -0
  583. /package/dist/{chunk-35UG2QDB.js.map → chunk-EUEUZI4L.js.map} +0 -0
  584. /package/dist/{chunk-KUJLZFDW.js.map → chunk-FCG5YR6T.js.map} +0 -0
  585. /package/dist/{chunk-2UBFDRL7.js.map → chunk-FCTURAZF.js.map} +0 -0
  586. /package/dist/{chunk-UC6A6ASM.js.map → chunk-FFQKUTO6.js.map} +0 -0
  587. /package/dist/{chunk-J3ZP6EUS.js.map → chunk-FNIHELAR.js.map} +0 -0
  588. /package/dist/{chunk-SQV3HPTZ.js.map → chunk-G76H5PEM.js.map} +0 -0
  589. /package/dist/{chunk-FLIMEQUA.js.map → chunk-GBX5ACPF.js.map} +0 -0
  590. /package/dist/{chunk-22ZJH7RY.js.map → chunk-GN26LHNJ.js.map} +0 -0
  591. /package/dist/{chunk-5KFZGB5U.js.map → chunk-GS7ESED2.js.map} +0 -0
  592. /package/dist/{chunk-FGUK3D54.js.map → chunk-GZHZ7OTY.js.map} +0 -0
  593. /package/dist/{chunk-BLBOYCOV.js.map → chunk-HKV4MQ2W.js.map} +0 -0
  594. /package/dist/{chunk-K4JRHQMI.js.map → chunk-HMJM6DKA.js.map} +0 -0
  595. /package/dist/{chunk-ZWIDQEJ4.js.map → chunk-HT7DWIR4.js.map} +0 -0
  596. /package/dist/{chunk-UVD5NFRF.js.map → chunk-I3PGXMVJ.js.map} +0 -0
  597. /package/dist/{chunk-Z52HVR4J.js.map → chunk-I4IPGIRF.js.map} +0 -0
  598. /package/dist/{chunk-HR7YTBR7.js.map → chunk-IASDP44E.js.map} +0 -0
  599. /package/dist/{chunk-VKH7AENA.js.map → chunk-IFNJWH55.js.map} +0 -0
  600. /package/dist/{chunk-PUBPZOQJ.js.map → chunk-IPE5FFFD.js.map} +0 -0
  601. /package/dist/{chunk-HP2ODXNA.js.map → chunk-IPS55KWK.js.map} +0 -0
  602. /package/dist/{chunk-BILJU2DX.js.map → chunk-JFOATIMF.js.map} +0 -0
  603. /package/dist/{chunk-MCBG6R5A.js.map → chunk-JH77UDWB.js.map} +0 -0
  604. /package/dist/{chunk-XYDW5RQB.js.map → chunk-JTJR63WI.js.map} +0 -0
  605. /package/dist/{chunk-IVVOIDE5.js.map → chunk-KHVKQPQ5.js.map} +0 -0
  606. /package/dist/{chunk-T5WNNEP5.js.map → chunk-KVCS6IEI.js.map} +0 -0
  607. /package/dist/{chunk-HZ6L7WXE.js.map → chunk-LGOIBC2C.js.map} +0 -0
  608. /package/dist/{chunk-BKAB4KZK.js.map → chunk-LKAKYP42.js.map} +0 -0
  609. /package/dist/{chunk-ZPIMPOHV.js.map → chunk-M7E66OSC.js.map} +0 -0
  610. /package/dist/{chunk-VVXA7T2M.js.map → chunk-MG6XC5SK.js.map} +0 -0
  611. /package/dist/{chunk-554SVTCN.js.map → chunk-MKZNP32D.js.map} +0 -0
  612. /package/dist/{chunk-MSS6IU5X.js.map → chunk-N6V6BFKD.js.map} +0 -0
  613. /package/dist/{chunk-OLQDB346.js.map → chunk-NH4XD62U.js.map} +0 -0
  614. /package/dist/{chunk-GH2DC7PS.js.map → chunk-NPN7JTRM.js.map} +0 -0
  615. /package/dist/{chunk-AIBNBWQU.js.map → chunk-NR7LSYLM.js.map} +0 -0
  616. /package/dist/{chunk-3XLDTVLC.js.map → chunk-NU2HND2Y.js.map} +0 -0
  617. /package/dist/{chunk-T2VO32Z2.js.map → chunk-OG5LJPI3.js.map} +0 -0
  618. /package/dist/{chunk-REMK55JI.js.map → chunk-OLZTGVBT.js.map} +0 -0
  619. /package/dist/{chunk-URVNHKM2.js.map → chunk-ON7PRAAC.js.map} +0 -0
  620. /package/dist/{chunk-3TFUAKWJ.js.map → chunk-OVOSDXFM.js.map} +0 -0
  621. /package/dist/{chunk-SONWG2RT.js.map → chunk-OW4UEIXA.js.map} +0 -0
  622. /package/dist/{chunk-23FCBIUN.js.map → chunk-P7FQUGED.js.map} +0 -0
  623. /package/dist/{chunk-V7F53GEO.js.map → chunk-P7IVAMAU.js.map} +0 -0
  624. /package/dist/{chunk-JYF3HT7M.js.map → chunk-PD6JRCUT.js.map} +0 -0
  625. /package/dist/{chunk-B474PL5O.js.map → chunk-PKFFJAQ6.js.map} +0 -0
  626. /package/dist/{chunk-EUKYQXYU.js.map → chunk-PLDVEJPR.js.map} +0 -0
  627. /package/dist/{chunk-HT4B2DJU.js.map → chunk-PZEC5CQA.js.map} +0 -0
  628. /package/dist/{chunk-6FUOUUYO.js.map → chunk-Q6STVEYJ.js.map} +0 -0
  629. /package/dist/{chunk-6IKX5IIX.js.map → chunk-Q75SJ35X.js.map} +0 -0
  630. /package/dist/{chunk-WC5XYWTE.js.map → chunk-QGJBNVC2.js.map} +0 -0
  631. /package/dist/{chunk-KFZT3PHA.js.map → chunk-QHJ7FTZK.js.map} +0 -0
  632. /package/dist/{chunk-NUB4T3RQ.js.map → chunk-QJ6KWJJH.js.map} +0 -0
  633. /package/dist/{chunk-CZPU5TW3.js.map → chunk-RFZU5BTG.js.map} +0 -0
  634. /package/dist/{chunk-JGV66VUK.js.map → chunk-RLCMVSJZ.js.map} +0 -0
  635. /package/dist/{chunk-JB67KPGM.js.map → chunk-RRO2EOJB.js.map} +0 -0
  636. /package/dist/{chunk-JJ3VR7WX.js.map → chunk-RZLWW3KC.js.map} +0 -0
  637. /package/dist/{chunk-MZQTHSLN.js.map → chunk-S7HRED4D.js.map} +0 -0
  638. /package/dist/{chunk-EXJBPKGW.js.map → chunk-SHDIZSN5.js.map} +0 -0
  639. /package/dist/{chunk-GJQYM3PM.js.map → chunk-SHQWIDD5.js.map} +0 -0
  640. /package/dist/{chunk-L6TCIZFR.js.map → chunk-SUAGBFYJ.js.map} +0 -0
  641. /package/dist/{chunk-K5V3KCFI.js.map → chunk-SVBR3GWG.js.map} +0 -0
  642. /package/dist/{chunk-DAPK3ADA.js.map → chunk-TC3EPGGJ.js.map} +0 -0
  643. /package/dist/{chunk-DEE6IPGI.js.map → chunk-TJXNVREN.js.map} +0 -0
  644. /package/dist/{chunk-WREIYOXN.js.map → chunk-TLMLEC4F.js.map} +0 -0
  645. /package/dist/{chunk-57ZSQB5V.js.map → chunk-TLRTLYVT.js.map} +0 -0
  646. /package/dist/{chunk-DUWF5LUK.js.map → chunk-TNCCCLLO.js.map} +0 -0
  647. /package/dist/{chunk-JPVDZXXX.js.map → chunk-U5RQBHRY.js.map} +0 -0
  648. /package/dist/{chunk-TU5EIKJA.js.map → chunk-U5SH3VRJ.js.map} +0 -0
  649. /package/dist/{chunk-J4W4TQPC.js.map → chunk-V5P5Q6HM.js.map} +0 -0
  650. /package/dist/{chunk-DQOLW4B5.js.map → chunk-VBMV2W4K.js.map} +0 -0
  651. /package/dist/{chunk-57W2C7HY.js.map → chunk-VOHT6ZX3.js.map} +0 -0
  652. /package/dist/{chunk-QYNCPS5W.js.map → chunk-WBKWIFXA.js.map} +0 -0
  653. /package/dist/{chunk-VJFH2AXT.js.map → chunk-WG7HIXJ7.js.map} +0 -0
  654. /package/dist/{chunk-VMXDTCYF.js.map → chunk-WMALDOF5.js.map} +0 -0
  655. /package/dist/{chunk-2L2NWXWJ.js.map → chunk-WRXD464C.js.map} +0 -0
  656. /package/dist/{chunk-KT6HWAEN.js.map → chunk-WZUNBSS7.js.map} +0 -0
  657. /package/dist/{chunk-NWQWUYOV.js.map → chunk-XGB3YF32.js.map} +0 -0
  658. /package/dist/{chunk-QRX5BYUQ.js.map → chunk-Y6KPZQPI.js.map} +0 -0
  659. /package/dist/{chunk-ZYKDPX3W.js.map → chunk-YY66AKSK.js.map} +0 -0
  660. /package/dist/{chunk-62NA6IF3.js.map → chunk-ZBZ76VR7.js.map} +0 -0
  661. /package/dist/{chunk-OXQP3N6X.js.map → chunk-ZTZ6S5Q6.js.map} +0 -0
@@ -0,0 +1,142 @@
1
+ import type { CSSObject, SxProps, Theme } from '@mui/material/styles/index.js';
2
+
3
+ import { rem } from './SettingCard.rem';
4
+ import { CARD_BORDER_WIDTH, CARD_RADIUS_UNITS } from '../Card/Card.metrics';
5
+
6
+ import { SETTING_CARD, SETTING_GROUP_INACTIVE_OPACITY } from './SettingCard.metrics';
7
+
8
+ /**
9
+ * The attribute an open `SettingCard` carries, which `SettingGrid` reads to
10
+ * give it the whole row. An attribute rather than a class so a host's wrapper
11
+ * around the card can be matched with `:has()` as well.
12
+ */
13
+ export const SETTING_CARD_OPEN_ATTR = 'data-setting-card-open';
14
+
15
+ /** `sx` as MUI documents it for composition: the component's own first, the caller's after. */
16
+ export const withCallerSx = (
17
+ own: SxProps<Theme>,
18
+ sx: SxProps<Theme> | undefined,
19
+ ): SxProps<Theme> => [own, ...(Array.isArray(sx) ? sx : [sx])] as SxProps<Theme>;
20
+
21
+ /**
22
+ * The card surface — `Card`'s outlined hairline and medium radius, so a
23
+ * settings screen and a content screen are drawn with one kit.
24
+ *
25
+ * `height: 100%` is what turns the grid's per-row stretch into equal-height
26
+ * cards: a grid item stretches, but a card that sized itself to its content
27
+ * would not fill the item it sits in.
28
+ *
29
+ * `gridColumn: 1 / -1` while open is the full-row span. It lives on the card,
30
+ * not only in the grid's CSS, so it also holds when the card sits in a host's
31
+ * own grid. Outside a grid the property does nothing.
32
+ */
33
+ export const surfaceStyles = (theme: Theme, open: boolean): CSSObject => ({
34
+ boxSizing: 'border-box',
35
+ height: '100%',
36
+ minWidth: 0,
37
+ display: 'flex',
38
+ flexDirection: 'column',
39
+ gap: theme.spacing(1.5),
40
+ padding: theme.spacing(2.5),
41
+ backgroundColor: theme.palette.background.paper,
42
+ border: `${CARD_BORDER_WIDTH}px solid ${open ? theme.palette.primary.main : theme.palette.divider}`,
43
+ borderRadius: theme.spacing(CARD_RADIUS_UNITS.lg),
44
+ boxShadow: open ? theme.shadows[4] : 'none',
45
+ transition: theme.transitions.create(['border-color', 'box-shadow'], {
46
+ duration: theme.transitions.duration.short,
47
+ }),
48
+ ...(open ? { gridColumn: '1 / -1' } : {}),
49
+ });
50
+
51
+ /** A `row` toggle: the card's content with none of its surface. */
52
+ export const flatStyles = (theme: Theme): CSSObject => ({
53
+ display: 'flex',
54
+ flexDirection: 'column',
55
+ gap: theme.spacing(0.5),
56
+ padding: theme.spacing(1.25, 0),
57
+ minWidth: 0,
58
+ });
59
+
60
+ export const headerStyles = (theme: Theme): CSSObject => ({
61
+ display: 'flex',
62
+ alignItems: 'center',
63
+ gap: rem(theme, SETTING_CARD.iconGap),
64
+ minWidth: 0,
65
+ });
66
+
67
+ /**
68
+ * The title names its colour rather than inheriting it: a card rendered under
69
+ * a theme other than the page's (a dark panel on a light page) would otherwise
70
+ * take the page's text colour onto its own surface.
71
+ */
72
+ export const titleStyles = (theme: Theme): CSSObject => ({
73
+ ...theme.typography.subtitle1,
74
+ fontWeight: theme.typography.fontWeightMedium,
75
+ color: theme.palette.text.primary,
76
+ margin: 0,
77
+ minWidth: 0,
78
+ overflowWrap: 'anywhere',
79
+ });
80
+
81
+ /** The one line a closed card shows. Long values end in an ellipsis, not a second line. */
82
+ export const summaryStyles = (theme: Theme): CSSObject => ({
83
+ ...theme.typography.body2,
84
+ color: theme.palette.text.secondary,
85
+ margin: 0,
86
+ overflow: 'hidden',
87
+ textOverflow: 'ellipsis',
88
+ whiteSpace: 'nowrap',
89
+ });
90
+
91
+ /** A switch card's explanation, which may wrap: it is read, not scanned. */
92
+ export const descriptionStyles = (theme: Theme): CSSObject => ({
93
+ ...theme.typography.body2,
94
+ color: theme.palette.text.secondary,
95
+ margin: 0,
96
+ });
97
+
98
+ /** The inactive group's hint: a glyph and the sentence, so it does not read as a second summary. */
99
+ export const hintStyles = (theme: Theme): CSSObject => ({
100
+ ...descriptionStyles(theme),
101
+ display: 'flex',
102
+ alignItems: 'flex-start',
103
+ gap: theme.spacing(1),
104
+ // Centre the 16px glyph on the first 20px line; later lines wrap under the text.
105
+ '& > svg': { flexShrink: 0, marginTop: rem(theme, 2) },
106
+ });
107
+
108
+ export const errorStyles = (theme: Theme): CSSObject => ({
109
+ ...theme.typography.body2,
110
+ color: theme.palette.error.main,
111
+ margin: 0,
112
+ });
113
+
114
+ export const actionsStyles = (theme: Theme): CSSObject => ({
115
+ display: 'flex',
116
+ flexWrap: 'wrap',
117
+ justifyContent: 'flex-end',
118
+ gap: theme.spacing(1),
119
+ marginTop: 'auto',
120
+ });
121
+
122
+ export const iconStyles = (theme: Theme): CSSObject => ({
123
+ display: 'inline-flex',
124
+ flexShrink: 0,
125
+ color: theme.palette.text.secondary,
126
+ });
127
+
128
+ /**
129
+ * A group's dependent rows: indented under the main switch, with a rule down
130
+ * their left edge so the "belongs to" reads without words. While the main
131
+ * switch is off they fade — and `inert` (set by the component) is what makes
132
+ * them unreachable; opacity alone would only make them look it.
133
+ */
134
+ export const dependentsStyles = (theme: Theme, active: boolean): CSSObject => ({
135
+ display: 'flex',
136
+ flexDirection: 'column',
137
+ marginLeft: rem(theme, SETTING_CARD.groupIndent / 2),
138
+ paddingLeft: rem(theme, SETTING_CARD.groupIndent / 2),
139
+ borderLeft: `${rem(theme, SETTING_CARD.groupRuleWidth)} solid ${theme.palette.divider}`,
140
+ opacity: active ? 1 : SETTING_GROUP_INACTIVE_OPACITY,
141
+ transition: theme.transitions.create('opacity', { duration: theme.transitions.duration.short }),
142
+ });
@@ -0,0 +1,197 @@
1
+ import Box from '@mui/material/Box/index.js';
2
+ import React, { forwardRef, useId } from 'react';
3
+
4
+ import { Icon } from '../../../icons';
5
+ import { Button } from '../../form/Button';
6
+
7
+ import { useSettingCard } from './SettingCard.hooks';
8
+ import { LearnMore, PendingSpinner, SaveError, SettingHeader, partTestId } from './SettingCard.parts';
9
+ import { SETTING_CARD_OPEN_ATTR, actionsStyles, summaryStyles, surfaceStyles, withCallerSx } from './SettingCard.styles';
10
+ import type { SettingCardCopy, SettingCardProps } from './SettingCard.types';
11
+
12
+ interface OpenBodyProps {
13
+ bodyRef: React.RefObject<HTMLDivElement | null>;
14
+ titleId: string;
15
+ errorId: string;
16
+ copy: SettingCardCopy;
17
+ learnMore?: React.ReactNode;
18
+ children: React.ReactNode;
19
+ saving: boolean;
20
+ error: string | null;
21
+ saveDisabled: boolean;
22
+ onSave: () => void;
23
+ onCancel: () => void;
24
+ dataTestId?: string;
25
+ }
26
+
27
+ /**
28
+ * The open card: the host's form, the disclosure, the failure line, and the
29
+ * two actions.
30
+ *
31
+ * Save is NOT `disabled` while it saves — it is `aria-disabled` and ignores
32
+ * the click. A disabled button drops the focus it holds, so a keyboard user
33
+ * who pressed Save would land on `<body>` and, if the save then failed, have
34
+ * to find their way back to the form from the top of the page.
35
+ */
36
+ const OpenBody: React.FC<OpenBodyProps> = ({
37
+ bodyRef, titleId, errorId, copy, learnMore, children, saving, error, saveDisabled, onSave, onCancel, dataTestId,
38
+ }) => {
39
+ const onKeyDown = (event: React.KeyboardEvent) => {
40
+ if (event.key !== 'Escape') return;
41
+ event.stopPropagation();
42
+ onCancel();
43
+ };
44
+
45
+ return (
46
+ <Box
47
+ ref={bodyRef}
48
+ role="group"
49
+ aria-labelledby={titleId}
50
+ onKeyDown={onKeyDown}
51
+ sx={{ display: 'flex', flexDirection: 'column', gap: 2, flex: 1 }}
52
+ data-testid={partTestId(dataTestId, 'body')}
53
+ >
54
+ <Box>{children}</Box>
55
+ {learnMore && (
56
+ <LearnMore label={copy.learnMore} dataTestId={dataTestId}>
57
+ {learnMore}
58
+ </LearnMore>
59
+ )}
60
+ <SaveError id={errorId} message={error} dataTestId={dataTestId} />
61
+ <Box sx={(theme) => actionsStyles(theme)}>
62
+ <Button variant="ghost" color="neutral" onClick={onCancel} disabled={saving} dataTestId={partTestId(dataTestId, 'cancel')}>
63
+ {copy.cancel}
64
+ </Button>
65
+ <Button
66
+ variant="solid"
67
+ onClick={onSave}
68
+ disabled={saveDisabled}
69
+ aria-disabled={saving || undefined}
70
+ aria-describedby={error ? errorId : undefined}
71
+ icon={saving ? <PendingSpinner dataTestId={dataTestId} /> : undefined}
72
+ iconPosition="left"
73
+ dataTestId={partTestId(dataTestId, 'save')}
74
+ >
75
+ {saving ? copy.saving : copy.save}
76
+ </Button>
77
+ </Box>
78
+ </Box>
79
+ );
80
+ };
81
+
82
+ /**
83
+ * A setting, summarised while closed and edited in place.
84
+ *
85
+ * Closed: title, status pill, a one-line summary and Edit. Edit opens the card
86
+ * where it is — no dialog, no route — around the host's form, a "learn more"
87
+ * disclosure and Cancel / Save. Save may be async: the card holds its saving
88
+ * state while the promise is pending, closes when it resolves, and stays open
89
+ * with the error when it rejects. Focus moves into the card as it opens and
90
+ * back to Edit as it closes.
91
+ */
92
+ interface EditTriggerProps {
93
+ triggerRef: React.RefObject<HTMLButtonElement | null>;
94
+ id: string;
95
+ titleId: string;
96
+ label: string;
97
+ disabled: boolean;
98
+ onOpen: () => void;
99
+ dataTestId?: string;
100
+ }
101
+
102
+ /** Edit. Its accessible name is "Edit" AND the card's title, so a grid of them is not a list of "Edit, Edit, Edit". */
103
+ const EditTrigger: React.FC<EditTriggerProps> = ({ triggerRef, id, titleId, label, disabled, onOpen, dataTestId }) => (
104
+ <Button
105
+ ref={triggerRef}
106
+ id={id}
107
+ variant="outline"
108
+ color="neutral"
109
+ size="sm"
110
+ icon={<Icon name="Edit" size="xs" />}
111
+ iconPosition="left"
112
+ disabled={disabled}
113
+ aria-labelledby={`${id} ${titleId}`}
114
+ onClick={onOpen}
115
+ dataTestId={partTestId(dataTestId, 'edit')}
116
+ >
117
+ {label}
118
+ </Button>
119
+ );
120
+
121
+ /**
122
+ * A setting, summarised while closed and edited in place.
123
+ *
124
+ * Closed: title, status pill, a one-line summary and Edit. Edit opens the card
125
+ * where it is — no dialog, no route — around the host's form, a "learn more"
126
+ * disclosure and Cancel / Save. Save may be async: the card holds its saving
127
+ * state while the promise is pending, closes when it resolves, and stays open
128
+ * with the error when it rejects. Focus moves into the card as it opens and
129
+ * back to Edit as it closes.
130
+ */
131
+ export const SettingCard = forwardRef<HTMLElement, SettingCardProps>(function SettingCard(props, ref) {
132
+ const { title, headingLevel = 'h3', icon, status, summary, children, learnMore, copy, dataTestId, className, sx } = props;
133
+ const baseId = useId();
134
+ const titleId = `${baseId}-title`;
135
+ const card = useSettingCard(props);
136
+ const { open } = card;
137
+
138
+ return (
139
+ <Box
140
+ component="section"
141
+ ref={ref}
142
+ aria-labelledby={titleId}
143
+ aria-busy={card.saving || undefined}
144
+ data-state={open ? 'open' : 'closed'}
145
+ {...{ [SETTING_CARD_OPEN_ATTR]: open ? '' : undefined }}
146
+ data-testid={dataTestId}
147
+ className={className}
148
+ sx={withCallerSx((theme) => surfaceStyles(theme, open), sx)}
149
+ >
150
+ <SettingHeader
151
+ titleId={titleId}
152
+ title={title}
153
+ headingLevel={headingLevel}
154
+ icon={icon}
155
+ status={status}
156
+ trailing={
157
+ open ? null : (
158
+ <EditTrigger
159
+ triggerRef={card.editRef}
160
+ id={`${baseId}-edit`}
161
+ titleId={titleId}
162
+ label={copy.edit}
163
+ disabled={card.disabled}
164
+ onOpen={card.openCard}
165
+ dataTestId={dataTestId}
166
+ />
167
+ )
168
+ }
169
+ dataTestId={dataTestId}
170
+ />
171
+ {!open && summary != null && (
172
+ <Box component="p" sx={summaryStyles} data-testid={partTestId(dataTestId, 'summary')}>
173
+ {summary}
174
+ </Box>
175
+ )}
176
+ {open && (
177
+ <OpenBody
178
+ bodyRef={card.bodyRef}
179
+ titleId={titleId}
180
+ errorId={`${baseId}-error`}
181
+ copy={copy}
182
+ learnMore={learnMore}
183
+ saving={card.saving}
184
+ error={card.error}
185
+ saveDisabled={card.saveDisabled}
186
+ onSave={card.save}
187
+ onCancel={card.cancel}
188
+ dataTestId={dataTestId}
189
+ >
190
+ {children}
191
+ </OpenBody>
192
+ )}
193
+ </Box>
194
+ );
195
+ });
196
+
197
+ SettingCard.displayName = 'SettingCard';
@@ -0,0 +1,140 @@
1
+ import type { SxProps, Theme } from '@mui/material/styles/index.js';
2
+ import type { ReactNode } from 'react';
3
+
4
+ import type { SettingCardCopy, SettingSwitchCopy } from '../../../copy';
5
+ import type { ColorValue } from '../../../tokens/vocabulary';
6
+
7
+ export type { SettingCardCopy, SettingSwitchCopy } from '../../../copy';
8
+
9
+ /**
10
+ * What a save handler may return. A promise holds the card in its saving
11
+ * state until it settles; a rejection is the failure path. A plain return is
12
+ * a synchronous success.
13
+ */
14
+ export type SettingSaveResult = void | Promise<unknown>;
15
+
16
+ /**
17
+ * Turns whatever a rejected save threw into the sentence the card shows.
18
+ * Return `undefined` to fall back to the copy's `saveFailed`. The card never
19
+ * renders an `Error.message` on its own: that string is usually written for a
20
+ * developer, in the developer's language.
21
+ */
22
+ export type SettingErrorFormatter = (error: unknown) => string | undefined;
23
+
24
+ /** The heading level a card's title renders at, so it fits the page outline. */
25
+ export type SettingHeadingLevel = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
26
+
27
+ /** The pill beside a closed card's title: the setting's current state, in words. */
28
+ export interface SettingStatus {
29
+ /** What the state IS, in the host's language: "On", "Not configured". */
30
+ label: string;
31
+ /** A house colour. Colour is never the only carrier: `label` is always shown. Defaults to `neutral`. */
32
+ color?: ColorValue;
33
+ }
34
+
35
+ /** What every card in the family shares. */
36
+ interface SettingSurfaceProps {
37
+ /** The setting's name. Also the accessible name of the card's region. */
38
+ title: string;
39
+ /** The heading level of `title`. Defaults to `h3`. */
40
+ headingLevel?: SettingHeadingLevel;
41
+ /** A decorative glyph before the title. */
42
+ icon?: ReactNode;
43
+ /** Maps a rejected save to the sentence shown; see {@link SettingErrorFormatter}. */
44
+ formatError?: SettingErrorFormatter;
45
+ /** Root test id. Parts derive theirs from it (`<id>-edit`, `<id>-save`, …). */
46
+ dataTestId?: string;
47
+ className?: string;
48
+ sx?: SxProps<Theme>;
49
+ }
50
+
51
+ export interface SettingCardProps extends SettingSurfaceProps {
52
+ /** The chrome words (Edit, Cancel, Save, …). REQUIRED — no default copy. */
53
+ copy: SettingCardCopy;
54
+ /** The one line a closed card shows under its title: the setting's current value. */
55
+ summary?: ReactNode;
56
+ /** The pill beside the title. Omit for none. */
57
+ status?: SettingStatus;
58
+ /** The form, rendered only while the card is open (so an uncontrolled draft is discarded on close). */
59
+ children: ReactNode;
60
+ /** Longer explanation behind a "learn more" disclosure in the open card. Omit for no disclosure. */
61
+ learnMore?: ReactNode;
62
+ /**
63
+ * Persist the draft. The card stays in its saving state while a returned
64
+ * promise is pending, closes when it resolves, and STAYS OPEN showing the
65
+ * error when it rejects.
66
+ */
67
+ onSave: () => SettingSaveResult;
68
+ /** The card closed without saving — reset the host's draft here. */
69
+ onCancel?: () => void;
70
+ /** Controlled open state. Pair with `onOpenChange`. */
71
+ open?: boolean;
72
+ /** Uncontrolled initial open state. */
73
+ defaultOpen?: boolean;
74
+ /** Every open/close request: Edit, Cancel, Escape, and a successful save. */
75
+ onOpenChange?: (open: boolean) => void;
76
+ /** Disables Edit on a closed card (the setting cannot be changed from here). */
77
+ disabled?: boolean;
78
+ /** Disables Save — for a draft the host knows is invalid. */
79
+ saveDisabled?: boolean;
80
+ }
81
+
82
+ interface SettingSwitchProps extends SettingSurfaceProps {
83
+ /** The saving and failure words. REQUIRED — no default copy. */
84
+ copy: SettingSwitchCopy;
85
+ /** Explanation under the title. Read to screen readers as the switch's description. */
86
+ summary?: ReactNode;
87
+ /** The persisted value. The switch shows the flip optimistically while it saves, then this again. */
88
+ checked: boolean;
89
+ /**
90
+ * Persist a flip. The switch shows the new value and a saving state while a
91
+ * returned promise is pending; a rejection reverts it and shows the error.
92
+ */
93
+ onChange: (checked: boolean) => SettingSaveResult;
94
+ /** Disables the switch. */
95
+ disabled?: boolean;
96
+ }
97
+
98
+ /**
99
+ * `card` draws the surface; `row` draws the same content flat, for a
100
+ * dependent row inside a `SettingGroup` (a card inside a card reads as two
101
+ * subjects).
102
+ */
103
+ export type SettingToggleVariant = 'card' | 'row';
104
+
105
+ export interface SettingToggleProps extends SettingSwitchProps {
106
+ /** Defaults to `card`. */
107
+ variant?: SettingToggleVariant;
108
+ }
109
+
110
+ export interface SettingGroupProps extends SettingSwitchProps {
111
+ /**
112
+ * Why the dependent rows are inactive while the main switch is off —
113
+ * "Turn on notifications to choose which ones you get". Shown only then.
114
+ */
115
+ inactiveHint: string;
116
+ /** The dependent rows. Stay rendered while the main switch is off, dimmed and inert. */
117
+ children: ReactNode;
118
+ }
119
+
120
+ /** The most columns a `SettingGrid` lays out. */
121
+ export type SettingGridColumns = 1 | 2 | 3;
122
+
123
+ export interface SettingGridProps {
124
+ children: ReactNode;
125
+ /**
126
+ * The narrowest a column may get, in design px (scaled with the type
127
+ * scale). The grid adds a column each time its OWN width fits one more.
128
+ * Defaults to 320.
129
+ */
130
+ minColumnWidth?: number;
131
+ /** Defaults to 3. */
132
+ maxColumns?: SettingGridColumns;
133
+ /** Gap between cards, in theme spacing units. Defaults to 2. */
134
+ gap?: number;
135
+ /** Accessible name. When set the grid renders as a labelled `region`. */
136
+ 'aria-label'?: string;
137
+ dataTestId?: string;
138
+ className?: string;
139
+ sx?: SxProps<Theme>;
140
+ }
@@ -0,0 +1,65 @@
1
+ # SettingGrid
2
+
3
+ ## Purpose
4
+
5
+ Lays setting cards out in **one, two or three columns by the width it is
6
+ given**. Part of the `layout/SettingCard` family.
7
+
8
+ - **Container queries, not media queries.** A settings grid lives beside a
9
+ navigation rail, inside a drawer, in half a split view; the viewport says
10
+ nothing about how wide any of those are. The grid asks its own width.
11
+ - **Equal-height rows, without measuring.** Each row is as tall as its tallest
12
+ card and every card in it stretches to match (`grid-auto-rows: auto` with
13
+ `align-items: stretch`). Not `1fr` rows — those make *every* row as tall as the
14
+ tallest one on the page.
15
+ - **An open card spans the row.** A [`SettingCard`](./SettingCard.md) mid-edit
16
+ takes the whole row, wherever it sat, so its form has room.
17
+
18
+ ## Usage
19
+
20
+ ```tsx
21
+ import { SettingCard, SettingGrid, SettingToggle } from '@12-apps/ui/layout/SettingCard';
22
+
23
+ <SettingGrid aria-label="Security">
24
+ <SettingCard … />
25
+ <SettingToggle … />
26
+ <SettingGroup … />
27
+ </SettingGrid>
28
+ ```
29
+
30
+ ## Props
31
+
32
+ | prop | type | default | effect |
33
+ |---|---|---|---|
34
+ | `children` | `ReactNode` | **required** | The cards. |
35
+ | `minColumnWidth` | `number` | `320` | The narrowest a column may get, in design px (scaled through the type scale). A column is added each time the grid's own width fits one more. |
36
+ | `maxColumns` | `1 \| 2 \| 3` | `3` | The most columns laid out. |
37
+ | `gap` | `number` | `2` | Gap between cards, in theme spacing units. |
38
+ | `aria-label` | `string` | — | When set, the grid is a labelled `region`. |
39
+ | `dataTestId` | `string` | — | On the container; the inner grid is `<id>-grid`. |
40
+ | `className`, `sx` | | | On the container. |
41
+
42
+ ## How the columns are decided
43
+
44
+ The outer element is an `inline-size` container named `setting-grid`
45
+ (`SETTING_GRID_CONTAINER`); the inner element is the grid, because a container
46
+ query is answered by an **ancestor**. `n` columns apply from
47
+
48
+ ```
49
+ calc(n × minColumnWidth + (n − 1) × gap)
50
+ ```
51
+
52
+ so a column is never narrower than `minColumnWidth`. Nested grids each answer
53
+ to their own container.
54
+
55
+ ## The open-card span
56
+
57
+ `SettingCard` sets `grid-column: 1 / -1` on itself while open and carries
58
+ `data-setting-card-open`. The grid also gives the whole row to a direct child
59
+ that **contains** an open card (`:has()`), so a host that wraps each card in an
60
+ element of its own keeps the behaviour.
61
+
62
+ ## Accessibility
63
+
64
+ Layout only: reading and tab order are the children's source order at every
65
+ width — the grid never reorders them.
@@ -0,0 +1,105 @@
1
+ import Box from '@mui/material/Box/index.js';
2
+ import { useTheme, type CSSObject, type Theme } from '@mui/material/styles/index.js';
3
+ import { forwardRef } from 'react';
4
+
5
+ import { rem } from './SettingCard.rem';
6
+
7
+ import { SETTING_CARD, SETTING_GRID_GAP_UNITS } from './SettingCard.metrics';
8
+ import { partTestId } from './SettingCard.parts';
9
+ import { SETTING_CARD_OPEN_ATTR, withCallerSx } from './SettingCard.styles';
10
+ import type { SettingGridColumns, SettingGridProps } from './SettingCard.types';
11
+
12
+ /** The container the grid's own queries are asked of. Named, so a nested grid answers to its own. */
13
+ export const SETTING_GRID_CONTAINER = 'setting-grid';
14
+
15
+ /** The track list for `n` equal columns. `minmax(0, …)` so a long word cannot widen its column. */
16
+ const tracks = (n: SettingGridColumns): string => `repeat(${n}, minmax(0, 1fr))`;
17
+
18
+ /**
19
+ * The narrowest the container can be and still fit `n` columns of
20
+ * `minColumnWidth` with the gaps between them. A `calc()` because the gap is a
21
+ * spacing unit and the width a type-scale length: two scales, one sum.
22
+ */
23
+ const threshold = (theme: Theme, n: number, minColumnPx: number, gapUnits: number): string =>
24
+ `calc(${n} * ${rem(theme, minColumnPx)} + ${n - 1} * ${theme.spacing(gapUnits)})`;
25
+
26
+ /**
27
+ * The grid itself.
28
+ *
29
+ * - Columns come from CONTAINER queries, not viewport ones: a settings grid
30
+ * lives beside a rail, inside a drawer, in half a split view, and the
31
+ * viewport says nothing about how wide any of those are.
32
+ * - `grid-auto-rows: auto` with `align-items: stretch` is the equal-height
33
+ * rule: each row is as tall as its tallest card and every card in it
34
+ * stretches to match. Not `1fr` rows — those would make EVERY row as tall as
35
+ * the tallest, so one open card would inflate the whole page.
36
+ * - An open card spans the row. The card sets `grid-column` on itself; the
37
+ * `:has()` rule covers a card the host wrapped in an element of its own.
38
+ */
39
+ export interface SettingGridLayout {
40
+ /** The narrowest column, in DESIGN px (drawn through `rem`). */
41
+ minColumnPx: number;
42
+ maxColumns: SettingGridColumns;
43
+ /** The gap, in theme SPACING units. */
44
+ gapUnits: number;
45
+ }
46
+
47
+ export function settingGridStyles(theme: Theme, { minColumnPx, maxColumns, gapUnits }: SettingGridLayout): CSSObject {
48
+ const styles: CSSObject = {
49
+ display: 'grid',
50
+ gap: theme.spacing(gapUnits),
51
+ gridTemplateColumns: tracks(1),
52
+ gridAutoRows: 'auto',
53
+ alignItems: 'stretch',
54
+ [`& > [${SETTING_CARD_OPEN_ATTR}], & > :has([${SETTING_CARD_OPEN_ATTR}])`]: { gridColumn: '1 / -1' },
55
+ };
56
+ for (const n of [2, 3] as const) {
57
+ if (n > maxColumns) break;
58
+ styles[`@container ${SETTING_GRID_CONTAINER} (min-width: ${threshold(theme, n, minColumnPx, gapUnits)})`] = {
59
+ gridTemplateColumns: tracks(n),
60
+ };
61
+ }
62
+ return styles;
63
+ }
64
+
65
+ /**
66
+ * Lays setting cards out in one, two or three columns by the width it is
67
+ * GIVEN — see {@link settingGridStyles}. Two elements, because a container
68
+ * query is answered by an ANCESTOR: the outer one is the container, the inner
69
+ * one the grid.
70
+ */
71
+ export const SettingGrid = forwardRef<HTMLDivElement, SettingGridProps>(function SettingGrid(props, ref) {
72
+ const {
73
+ children,
74
+ minColumnWidth = SETTING_CARD.gridMinColumnWidth,
75
+ maxColumns = 3,
76
+ gap = SETTING_GRID_GAP_UNITS,
77
+ 'aria-label': ariaLabel,
78
+ dataTestId,
79
+ className,
80
+ sx,
81
+ } = props;
82
+ const theme = useTheme();
83
+ const gridStyles = settingGridStyles(theme, { minColumnPx: minColumnWidth, maxColumns, gapUnits: gap });
84
+
85
+ return (
86
+ <Box
87
+ ref={ref}
88
+ role={ariaLabel ? 'region' : undefined}
89
+ aria-label={ariaLabel}
90
+ data-testid={dataTestId}
91
+ className={className}
92
+ sx={withCallerSx({ containerType: 'inline-size', containerName: SETTING_GRID_CONTAINER, minWidth: 0 }, sx)}
93
+ >
94
+ <Box
95
+ sx={gridStyles}
96
+ data-max-columns={maxColumns}
97
+ data-testid={partTestId(dataTestId, 'grid')}
98
+ >
99
+ {children}
100
+ </Box>
101
+ </Box>
102
+ );
103
+ });
104
+
105
+ SettingGrid.displayName = 'SettingGrid';
@@ -0,0 +1,11 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ /**
4
+ * What a `SettingGroup` tells the rows inside it: whether its main switch is
5
+ * off. `inert` on the rows' container already makes every descendant
6
+ * unreachable; this is for the family's own rows (`SettingToggle`) to ALSO
7
+ * draw and announce themselves as disabled, which `inert` does not do.
8
+ */
9
+ export const SettingGroupContext = createContext<{ inactive: boolean }>({ inactive: false });
10
+
11
+ export const useSettingGroup = (): { inactive: boolean } => useContext(SettingGroupContext);