@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,49 @@
1
+ /**
2
+ * A private copy of `feedback/Dialog`'s `focusFirstTabbable` (FUT-2696), which
3
+ * this maintenance line predates. `SettingCard` needs the same "move focus to
4
+ * the first tabbable descendant, or the element itself" rule when it opens in
5
+ * place — pulling the shared `Dialog.focus` module forward would drag the
6
+ * Dialog focus-trap fix it shipped with onto a line that only takes security
7
+ * and backport fixes.
8
+ */
9
+
10
+ /**
11
+ * The candidate list `FocusTrap`'s own `defaultGetTabbable` uses
12
+ * (`@mui/material/Unstable_TrapFocus/FocusTrap.js`). A match whose resolved
13
+ * `tabIndex` is -1 is skipped, as the trap itself skips one.
14
+ */
15
+ const FOCUSABLE_SELECTOR = [
16
+ 'input:not([disabled]):not([type="hidden"])',
17
+ 'select:not([disabled])',
18
+ 'textarea:not([disabled])',
19
+ 'a[href]',
20
+ 'button:not([disabled])',
21
+ '[tabindex]:not([tabindex="-1"])',
22
+ 'audio[controls]',
23
+ 'video[controls]',
24
+ '[contenteditable]:not([contenteditable="false"])',
25
+ ].join(',');
26
+
27
+ /**
28
+ * Move focus into `target`: its first tabbable descendant, or `target`
29
+ * itself — given `tabIndex={-1}` if it does not already carry one — when
30
+ * nothing inside is focusable.
31
+ *
32
+ * Backs off when focus already sits on a DESCENDANT of `target` other than
33
+ * `target` itself: that is a caller's `autoFocus` (or an explicit `.focus()`
34
+ * of their own) that arrived before this ran, and it keeps winning.
35
+ */
36
+ export function focusFirstTabbable(target: HTMLElement): void {
37
+ const active = target.ownerDocument.activeElement;
38
+ if (active !== target && target.contains(active)) return;
39
+
40
+ const tabbable = Array.from(target.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)).find(
41
+ (element) => element.tabIndex >= 0,
42
+ );
43
+ if (tabbable) {
44
+ tabbable.focus();
45
+ return;
46
+ }
47
+ if (!target.hasAttribute('tabindex')) target.setAttribute('tabindex', '-1');
48
+ target.focus();
49
+ }
@@ -0,0 +1,191 @@
1
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState, type RefObject } from 'react';
2
+
3
+ import { focusFirstTabbable } from './SettingCard.focus';
4
+
5
+ import type { SettingCardProps, SettingErrorFormatter, SettingSaveResult } from './SettingCard.types';
6
+
7
+ /** The sentence a rejected save shows: the host's, else the copy's fallback. */
8
+ export function saveErrorMessage(
9
+ error: unknown,
10
+ formatError: SettingErrorFormatter | undefined,
11
+ fallback: string,
12
+ ): string {
13
+ return formatError?.(error) ?? fallback;
14
+ }
15
+
16
+ /**
17
+ * Open state that is controlled when `open` is passed and uncontrolled
18
+ * otherwise — the shape MUI's own `useControlled` has, without its dev-only
19
+ * warnings reaching into this package's surface.
20
+ */
21
+ export function useControllableOpen(
22
+ open: boolean | undefined,
23
+ defaultOpen: boolean,
24
+ onOpenChange: ((open: boolean) => void) | undefined,
25
+ ): [boolean, (next: boolean) => void] {
26
+ const [inner, setInner] = useState(defaultOpen);
27
+ const controlled = open !== undefined;
28
+ const value = controlled ? open : inner;
29
+
30
+ const setOpen = useCallback(
31
+ (next: boolean) => {
32
+ if (!controlled) setInner(next);
33
+ onOpenChange?.(next);
34
+ },
35
+ [controlled, onOpenChange],
36
+ );
37
+
38
+ return [value, setOpen];
39
+ }
40
+
41
+ /**
42
+ * Runs a save that may or may not be async and reports how it went.
43
+ *
44
+ * `Promise.resolve().then(save)` rather than `await save()`: it also catches a
45
+ * handler that throws SYNCHRONOUSLY, which an `await` inside `try` would too —
46
+ * but it keeps the pending state visible for one tick even when the handler
47
+ * returns nothing, so a save never "succeeds" in the middle of the click that
48
+ * started it. A sequence id drops the outcome of a run the card has since
49
+ * abandoned (closed, or started again).
50
+ */
51
+ export function useSaveRunner(formatError: SettingErrorFormatter | undefined, fallback: string) {
52
+ const [saving, setSaving] = useState(false);
53
+ const [error, setError] = useState<string | null>(null);
54
+ const seq = useRef(0);
55
+
56
+ useEffect(
57
+ () => () => {
58
+ // Unmounted: whatever is still in flight has nobody left to report to.
59
+ seq.current += 1;
60
+ },
61
+ [],
62
+ );
63
+
64
+ const run = useCallback(
65
+ async (save: () => SettingSaveResult): Promise<boolean> => {
66
+ const mine = (seq.current += 1);
67
+ setSaving(true);
68
+ setError(null);
69
+ try {
70
+ await Promise.resolve().then(save);
71
+ if (seq.current !== mine) return false;
72
+ setSaving(false);
73
+ return true;
74
+ } catch (cause) {
75
+ if (seq.current !== mine) return false;
76
+ setSaving(false);
77
+ setError(saveErrorMessage(cause, formatError, fallback));
78
+ return false;
79
+ }
80
+ },
81
+ [formatError, fallback],
82
+ );
83
+
84
+ const reset = useCallback(() => {
85
+ seq.current += 1;
86
+ setSaving(false);
87
+ setError(null);
88
+ }, []);
89
+
90
+ return { saving, error, run, reset };
91
+ }
92
+
93
+ /**
94
+ * A switch that saves the moment it flips.
95
+ *
96
+ * It shows the flip at once (`pending`) and holds it while the save runs; a
97
+ * success hands back to the host's `checked`, which by then says the same
98
+ * thing, and a failure drops `pending` so the switch returns to what is
99
+ * actually saved. A flip while one is in flight is ignored rather than queued:
100
+ * two racing writes of a boolean have no right answer.
101
+ */
102
+ export function useAsyncSwitch(options: {
103
+ checked: boolean;
104
+ onChange: (checked: boolean) => SettingSaveResult;
105
+ formatError: SettingErrorFormatter | undefined;
106
+ fallback: string;
107
+ }) {
108
+ const { checked, onChange, formatError, fallback } = options;
109
+ const [pending, setPending] = useState<boolean | null>(null);
110
+ const { saving, error, run } = useSaveRunner(formatError, fallback);
111
+
112
+ const flip = useCallback(
113
+ async (next: boolean) => {
114
+ if (saving) return;
115
+ setPending(next);
116
+ await run(() => onChange(next));
117
+ setPending(null);
118
+ },
119
+ [saving, run, onChange],
120
+ );
121
+
122
+ return { shown: pending ?? checked, saving, error, flip };
123
+ }
124
+
125
+ /**
126
+ * Focus follows the card: into it when it opens, back to the trigger when it
127
+ * closes.
128
+ *
129
+ * Inward, it is the Dialog's own rule (`focusFirstTabbable`, FUT-2696): the
130
+ * first tabbable descendant, and a caller's `autoFocus` keeps winning. The
131
+ * card is NOT a trap — it is inline, the rest of the page is still there, and
132
+ * locking Tab inside it would strand a keyboard user who wants to leave
133
+ * mid-edit. What it owes them is the round trip: the Edit trigger unmounts
134
+ * while the card is open, so without the return focus would fall to <body>
135
+ * and the reader would start again from the top of the page.
136
+ *
137
+ * Only a TRANSITION moves focus: a card mounted open (or closed) leaves focus
138
+ * where the page put it.
139
+ */
140
+ export function useFocusHandoff(
141
+ open: boolean,
142
+ body: RefObject<HTMLElement | null>,
143
+ trigger: RefObject<HTMLElement | null>,
144
+ ): void {
145
+ const previous = useRef(open);
146
+
147
+ useLayoutEffect(() => {
148
+ if (previous.current === open) return;
149
+ previous.current = open;
150
+ if (open && body.current) focusFirstTabbable(body.current);
151
+ if (!open) trigger.current?.focus();
152
+ }, [open, body, trigger]);
153
+ }
154
+
155
+ /**
156
+ * Everything an editable card DOES, apart from how it looks: its open state,
157
+ * the save and its outcome, Cancel, and where focus goes.
158
+ */
159
+ export function useSettingCard(props: SettingCardProps) {
160
+ const { copy, onSave, onCancel, open: openProp, defaultOpen = false, onOpenChange, formatError } = props;
161
+ const disabled = props.disabled ?? false;
162
+ const saveDisabled = props.saveDisabled ?? false;
163
+ const [open, setOpen] = useControllableOpen(openProp, defaultOpen, onOpenChange);
164
+ const { saving, error, run, reset } = useSaveRunner(formatError, copy.saveFailed);
165
+ const bodyRef = useRef<HTMLDivElement>(null);
166
+ const editRef = useRef<HTMLButtonElement>(null);
167
+ useFocusHandoff(open, bodyRef, editRef);
168
+
169
+ // However the card closed — Cancel, a save, or a controlling host — the
170
+ // next opening starts without the last one's error.
171
+ useEffect(() => {
172
+ if (!open) reset();
173
+ }, [open, reset]);
174
+
175
+ const openCard = useCallback(() => setOpen(true), [setOpen]);
176
+
177
+ const cancel = useCallback(() => {
178
+ if (saving) return;
179
+ setOpen(false);
180
+ onCancel?.();
181
+ }, [saving, setOpen, onCancel]);
182
+
183
+ const save = useCallback(() => {
184
+ if (saving || saveDisabled) return;
185
+ void run(onSave).then((saved) => {
186
+ if (saved) setOpen(false);
187
+ });
188
+ }, [saving, saveDisabled, run, onSave, setOpen]);
189
+
190
+ return { open, disabled, saveDisabled, saving, error, bodyRef, editRef, openCard, cancel, save };
191
+ }
@@ -0,0 +1,121 @@
1
+ # SettingCard
2
+
3
+ ## Purpose
4
+
5
+ One setting, summarised while closed and edited **in place**. A settings screen
6
+ built from these reads as a list of answers ("Sign out after 30 minutes") with
7
+ one Edit each, instead of a wall of open forms.
8
+
9
+ - **Closed:** title, a status pill, a one-line summary, and Edit.
10
+ - **Open:** Edit opens the card where it is — no dialog, no route change —
11
+ around the host's form (`children`), a collapsible "learn more" disclosure and
12
+ Cancel / Save.
13
+
14
+ The card knows nothing about what it edits. The form, the draft and the save
15
+ are the host's; the card owns the open/closed state, the save's pending and
16
+ failed states, and focus.
17
+
18
+ Part of the `layout/SettingCard` family, with
19
+ [`SettingToggle`](./SettingToggle.md), [`SettingGroup`](./SettingGroup.md) and
20
+ [`SettingGrid`](./SettingGrid.md).
21
+
22
+ ## Usage
23
+
24
+ ```tsx
25
+ import { SettingCard } from '@12-apps/ui/layout/SettingCard';
26
+ import { NumberField } from '@12-apps/ui/form/NumberField';
27
+ import { useLocaleCopy } from '@12-apps/i18n/react';
28
+ import { SETTING_CARD_COPY } from '@12-apps/ui/locales';
29
+
30
+ const copy = useLocaleCopy(SETTING_CARD_COPY);
31
+ const [draft, setDraft] = useState<number | null>(saved);
32
+
33
+ <SettingCard
34
+ copy={copy}
35
+ title="Session timeout"
36
+ summary={`Sign out after ${saved} minutes`}
37
+ status={{ label: 'On', color: 'success' }}
38
+ learnMore="A shorter timeout protects shared devices."
39
+ onCancel={() => setDraft(saved)}
40
+ onSave={() => api.saveTimeout(draft)} // may return a promise
41
+ >
42
+ <NumberField label="Minutes" value={draft} onChange={setDraft} min={5} max={240} suffix="min" />
43
+ </SettingCard>
44
+ ```
45
+
46
+ ## Props
47
+
48
+ | prop | type | default | effect |
49
+ |---|---|---|---|
50
+ | `copy` | `SettingCardCopy` | **required** | Edit / Cancel / Save / Saving / Learn more / the fallback error. No shipped default — pass `EN_US_SETTING_CARD_COPY`, `PT_BR_SETTING_CARD_COPY`, or `SETTING_CARD_COPY` through `useLocaleCopy`. |
51
+ | `title` | `string` | **required** | The setting's name. A heading, and the accessible name of the card's region. |
52
+ | `onSave` | `() => void \| Promise<unknown>` | **required** | Persist the draft. See *Saving* below. |
53
+ | `children` | `ReactNode` | **required** | The form. Rendered only while open. |
54
+ | `summary` | `ReactNode` | — | The one line a closed card shows. Ends in an ellipsis rather than wrapping. |
55
+ | `status` | `{ label: string; color?: ColorValue }` | — | The pill beside the title. `label` is always shown, so colour never carries the meaning alone. |
56
+ | `learnMore` | `ReactNode` | — | Longer explanation behind a disclosure in the open card. Omit for no disclosure. |
57
+ | `onCancel` | `() => void` | — | The card closed without saving. Reset the host's draft here. |
58
+ | `open` / `defaultOpen` / `onOpenChange` | | uncontrolled, closed | Controlled or uncontrolled open state. `onOpenChange` hears Edit, Cancel, Escape and a successful save. |
59
+ | `disabled` | `boolean` | `false` | Disables Edit. |
60
+ | `saveDisabled` | `boolean` | `false` | Disables Save — for a draft the host knows is invalid. |
61
+ | `formatError` | `(error: unknown) => string \| undefined` | — | The sentence to show for a rejected save. `undefined` falls back to `copy.saveFailed`. |
62
+ | `headingLevel` | `'h2' … 'h6'` | `'h3'` | Where the title sits in the page outline. |
63
+ | `icon` | `ReactNode` | — | A decorative glyph before the title. |
64
+ | `dataTestId` | `string` | — | Root test id; parts derive `-edit`, `-save`, `-cancel`, `-summary`, `-status`, `-error`, `-saving`, `-body`, `-learn-more`, `-title`. |
65
+ | `className`, `sx` | | | Styling hooks on the root `<section>`. |
66
+
67
+ ## Saving
68
+
69
+ - **Pending.** While the promise `onSave` returned is pending, Save shows a
70
+ spinner and `copy.saving`, the card is `aria-busy`, Cancel is disabled and
71
+ further presses of Save are ignored — `onSave` runs once.
72
+ - **Resolved.** The card closes and focus returns to Edit. Update `summary` from
73
+ the saved value in the same handler.
74
+ - **Rejected** (or `onSave` throws). The card **stays open**, the draft is
75
+ untouched, and the error appears in a `role="alert"` line that Save is
76
+ described by. The card never prints `error.message` by itself — that string
77
+ is written for a developer; map it with `formatError`.
78
+
79
+ Save is `aria-disabled`, not `disabled`, while pending: a disabled button drops
80
+ the focus it holds, and a keyboard user whose save then failed would be sent
81
+ back to the top of the page.
82
+
83
+ ## Cancelling
84
+
85
+ Cancel (or Escape inside the open card) closes the card and calls `onCancel`.
86
+ `children` unmount on close, so any **uncontrolled** state inside the form is
87
+ discarded by construction; a controlled draft is the host's to reset in
88
+ `onCancel`, as in the example above.
89
+
90
+ ## In a grid
91
+
92
+ An open card sets `grid-column: 1 / -1` on itself and carries
93
+ `data-setting-card-open`, so inside a [`SettingGrid`](./SettingGrid.md) — or any
94
+ CSS grid — its form gets the whole row. `height: 100%` lets it match the other
95
+ cards in its row while closed.
96
+
97
+ ## Accessibility
98
+
99
+ - The root is a `<section>` labelled by the title; the title is a real heading
100
+ (`headingLevel`).
101
+ - Edit's accessible name is `copy.edit` **plus the title** ("Edit Session
102
+ timeout"), so a grid of cards is not a list of identical buttons.
103
+ - **Focus round trip.** Opening moves focus to the first tabbable element in the
104
+ form — the rule `Dialog` uses (`focusFirstTabbable`, FUT-2696), so a field's
105
+ own `autoFocus` still wins. Closing, by any path, returns focus to Edit. A
106
+ card mounted open does not take focus.
107
+ - **No focus trap.** The card is inline and the page around it stays usable; a
108
+ trap would strand a keyboard user who wants to leave mid-edit. Escape
109
+ cancels.
110
+ - The "learn more" trigger owns `aria-expanded` / `aria-controls`; the region is
111
+ kept mounted so `aria-controls` always resolves.
112
+ - The save failure is `role="alert"`, announced without moving focus.
113
+
114
+ ## Best practices
115
+
116
+ - Keep `summary` to the current **value** in words, not a description of the
117
+ setting — the title already says what it is.
118
+ - Use `status` for a state that changes how the summary reads ("Off",
119
+ "Managed by your organisation"); skip it when the summary says it all.
120
+ - A setting that is a single on/off is a [`SettingToggle`](./SettingToggle.md),
121
+ not a card with a switch inside.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The setting-card family's lengths, in design px. The web reads every one
3
+ * through `rem(theme, n)`, so they scale with the host's type scale.
4
+ */
5
+ export const SETTING_CARD = {
6
+ /** Between the icon and the title. */
7
+ iconGap: 12,
8
+ /** The spinner beside a switch while its flip is saving. */
9
+ spinnerSize: 16,
10
+ /** How far a group's dependent rows sit in from its main switch. */
11
+ groupIndent: 24,
12
+ /** The rule down the left of a group's dependent rows. */
13
+ groupRuleWidth: 2,
14
+ /** The narrowest a grid column gets by default. */
15
+ gridMinColumnWidth: 320,
16
+ } as const;
17
+
18
+ /** The grid's default gap, in theme SPACING units (not px): what `sx`'s `gap: 2` means. */
19
+ export const SETTING_GRID_GAP_UNITS = 2;
20
+
21
+ /** How faded a group's dependent rows are while the main switch is off. */
22
+ export const SETTING_GROUP_INACTIVE_OPACITY = 0.5;
@@ -0,0 +1,162 @@
1
+ import Box from '@mui/material/Box/index.js';
2
+ import CircularProgress from '@mui/material/CircularProgress/index.js';
3
+ import { useTheme } from '@mui/material/styles/index.js';
4
+ import React, { useId, useState } from 'react';
5
+
6
+ import { Icon } from '../../../icons';
7
+ import { rem } from './SettingCard.rem';
8
+ import { Chip } from '../../data-display/Chip';
9
+ import { Button } from '../../form/Button';
10
+ import { BUTTON_SIZES } from '../../form/Button/Button.metrics';
11
+ import { Collapsible } from '../Collapsible';
12
+
13
+ import { SETTING_CARD } from './SettingCard.metrics';
14
+ import { errorStyles, headerStyles, iconStyles, titleStyles } from './SettingCard.styles';
15
+ import type { SettingHeadingLevel, SettingStatus } from './SettingCard.types';
16
+
17
+ /** `<root>-<part>` when the host gave a root test id, else nothing. */
18
+ export const partTestId = (root: string | undefined, part: string): string | undefined =>
19
+ root ? `${root}-${part}` : undefined;
20
+
21
+ interface HeaderProps {
22
+ titleId: string;
23
+ title: string;
24
+ headingLevel: SettingHeadingLevel;
25
+ icon?: React.ReactNode;
26
+ status?: SettingStatus;
27
+ /** Rendered at the row's far end — the Edit trigger, or a switch. */
28
+ trailing?: React.ReactNode;
29
+ /** Renders the title as a `<label>` for this control instead of a heading. */
30
+ labelFor?: string;
31
+ dataTestId?: string;
32
+ }
33
+
34
+ /**
35
+ * Icon, title, status pill, and whatever the row ends with.
36
+ *
37
+ * A switch card's title is the switch's `<label>`, so the words are both its
38
+ * accessible name and a tap target far larger than the track. An editable
39
+ * card's title is a heading, so the page outline lists every setting.
40
+ */
41
+ export const SettingHeader: React.FC<HeaderProps> = ({
42
+ titleId,
43
+ title,
44
+ headingLevel,
45
+ icon,
46
+ status,
47
+ trailing,
48
+ labelFor,
49
+ dataTestId,
50
+ }) => {
51
+ const theme = useTheme();
52
+ return (
53
+ <Box sx={headerStyles(theme)}>
54
+ {icon && (
55
+ <Box component="span" aria-hidden sx={iconStyles(theme)}>
56
+ {icon}
57
+ </Box>
58
+ )}
59
+ <Box sx={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: 1, minWidth: 0, flex: 1 }}>
60
+ <Box
61
+ component={labelFor ? 'label' : headingLevel}
62
+ id={titleId}
63
+ htmlFor={labelFor}
64
+ sx={{ ...titleStyles(theme), ...(labelFor ? { cursor: 'pointer' } : {}) }}
65
+ data-testid={partTestId(dataTestId, 'title')}
66
+ >
67
+ {title}
68
+ </Box>
69
+ {status && (
70
+ <Chip
71
+ label={status.label}
72
+ color={status.color ?? 'neutral'}
73
+ size="sm"
74
+ variant="outlined"
75
+ dataTestId={partTestId(dataTestId, 'status')}
76
+ />
77
+ )}
78
+ </Box>
79
+ {trailing}
80
+ </Box>
81
+ );
82
+ };
83
+
84
+ /**
85
+ * The failure line. `role="alert"` so it is announced the moment it appears,
86
+ * without anyone having to move focus to find it.
87
+ */
88
+ export const SaveError: React.FC<{ id: string; message: string | null; dataTestId?: string }> = ({
89
+ id,
90
+ message,
91
+ dataTestId,
92
+ }) => {
93
+ const theme = useTheme();
94
+ if (!message) return null;
95
+ return (
96
+ <Box component="p" id={id} role="alert" sx={errorStyles(theme)} data-testid={partTestId(dataTestId, 'error')}>
97
+ {message}
98
+ </Box>
99
+ );
100
+ };
101
+
102
+ /** The spinner that rides beside a pending control; decorative — the words are announced separately. */
103
+ export const PendingSpinner: React.FC<{ dataTestId?: string }> = ({ dataTestId }) => {
104
+ const theme = useTheme();
105
+ return (
106
+ <CircularProgress
107
+ size={rem(theme, SETTING_CARD.spinnerSize)}
108
+ color="inherit"
109
+ aria-hidden
110
+ data-testid={partTestId(dataTestId, 'saving')}
111
+ />
112
+ );
113
+ };
114
+
115
+ /**
116
+ * The "learn more" disclosure: a text button that owns `aria-expanded`, and
117
+ * the collapsible region it controls. Closed by default — it is the longer
118
+ * explanation, and the form is what the reader came for.
119
+ */
120
+ export const LearnMore: React.FC<{
121
+ label: string;
122
+ children: React.ReactNode;
123
+ dataTestId?: string;
124
+ }> = ({ label, children, dataTestId }) => {
125
+ const [expanded, setExpanded] = useState(false);
126
+ const regionId = useId();
127
+ const theme = useTheme();
128
+ return (
129
+ // Pulled out by the button's own padding, so the words line up with the form above.
130
+ <Box sx={{ marginLeft: `-${rem(theme, BUTTON_SIZES.sm.paddingHorizontal)}` }}>
131
+ <Button
132
+ variant="text"
133
+ size="sm"
134
+ aria-expanded={expanded}
135
+ aria-controls={regionId}
136
+ onClick={() => setExpanded((was) => !was)}
137
+ icon={
138
+ <Box
139
+ component="span"
140
+ sx={{
141
+ display: 'inline-flex',
142
+ transform: expanded ? 'rotate(180deg)' : 'none',
143
+ transition: theme.transitions.create('transform'),
144
+ }}
145
+ >
146
+ <Icon name="ExpandMore" size="xs" />
147
+ </Box>
148
+ }
149
+ iconPosition="right"
150
+ dataTestId={partTestId(dataTestId, 'learn-more')}
151
+ >
152
+ {label}
153
+ </Button>
154
+ {/* Kept mounted so `aria-controls` always names an element that exists. */}
155
+ <Collapsible open={expanded} keepMounted sx={{ marginLeft: rem(theme, BUTTON_SIZES.sm.paddingHorizontal) }} dataTestId={partTestId(dataTestId, 'learn-more-content')}>
156
+ <Box id={regionId} sx={{ ...theme.typography.body2, color: 'text.secondary', pt: 1 }}>
157
+ {children}
158
+ </Box>
159
+ </Collapsible>
160
+ </Box>
161
+ );
162
+ };
@@ -0,0 +1,14 @@
1
+ import type { Theme } from '@mui/material/styles/index.js';
2
+
3
+ /**
4
+ * A size drawn at `px`, as rem through the theme's type scale.
5
+ *
6
+ * A private copy of `tokens/relative`'s `rem()` (FUT-2591), which this
7
+ * maintenance line predates: `theme.typography.pxToRem(px)` needs no gate or
8
+ * shared vocabulary to be correct, and pulling the shared module forward
9
+ * would drag its lint gate and exceptions ledger onto a line that only takes
10
+ * security and backport fixes.
11
+ */
12
+ export function rem(theme: Theme, px: number): string {
13
+ return theme.typography.pxToRem(px);
14
+ }