@12-apps/ui 6.40.0 → 6.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NATIVE.md +1 -1
- package/components-catalog.md +43 -5
- package/dist/_internal/components/data-display/Badge/Badge.js +3 -3
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +3 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-context.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-internals.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +48 -48
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +63 -63
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +7 -7
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +8 -8
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +14 -14
- package/dist/_internal/components/data-display/DataViews/base-card.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +23 -23
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +45 -45
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +29 -29
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-search.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +24 -24
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +5 -5
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +6 -6
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +9 -9
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +5 -5
- package/dist/_internal/components/data-display/MapPreview/MapSearchBar.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +3 -3
- package/dist/_internal/components/data-display/index.js +9 -9
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +5 -5
- package/dist/_internal/components/feedback/index.js +8 -8
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +5 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +3 -3
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +4 -4
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +3 -3
- package/dist/_internal/components/form/Button/Button.js +4 -4
- package/dist/_internal/components/form/Button/Button.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +8 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +10 -10
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +4 -4
- package/dist/_internal/components/form/CepField/CepField.js +5 -5
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +2 -2
- package/dist/_internal/components/form/Command/Command.js +3 -3
- package/dist/_internal/components/form/Command/Command.styles.js +3 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +5 -5
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +5 -5
- package/dist/_internal/components/form/Input/Input.js +4 -4
- package/dist/_internal/components/form/Input/Input.styles.js +3 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.js +4 -4
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +3 -3
- package/dist/_internal/components/form/Label/Label.js +3 -3
- package/dist/_internal/components/form/Label/Label.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.item.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +3 -3
- package/dist/_internal/components/form/NumberField/NumberField.helpers.js +20 -0
- package/dist/_internal/components/form/NumberField/NumberField.js +28 -0
- package/dist/_internal/components/form/NumberField/NumberField.types.js +1 -0
- package/dist/_internal/components/form/NumberField/NumberField.types.js.map +1 -0
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +5 -5
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +3 -3
- package/dist/_internal/components/form/Select/Select.js +3 -3
- package/dist/_internal/components/form/Switch/Switch.js +5 -5
- package/dist/_internal/components/form/Switch/Switch.parts.js +3 -3
- package/dist/_internal/components/form/Switch/Switch.styles.js +2 -2
- package/dist/_internal/components/form/Textarea/Textarea.js +3 -3
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +3 -3
- package/dist/_internal/components/form/ToggleGroup/ToggleGroup.js +3 -3
- package/dist/_internal/components/form/index.js +53 -47
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +11 -11
- package/dist/_internal/components/form/total-form/Fields/CepField.js +6 -6
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/TextField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +24 -24
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -5
- package/dist/_internal/components/index.js +155 -116
- package/dist/_internal/components/layout/Box/Box.js +6 -6
- package/dist/_internal/components/layout/Card/Card.js +2 -2
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +4 -4
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectTriggers.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SavedViewsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SortByDropdown.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +3 -3
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +2 -2
- package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js +19 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +54 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js +12 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +59 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js +37 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.types.js +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.types.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +56 -0
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js +10 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +65 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +63 -0
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +65 -0
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js.map +1 -0
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +3 -3
- package/dist/_internal/components/layout/SettingsLayout/SettingsSectionChips.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +7 -7
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +3 -3
- package/dist/_internal/components/layout/index.js +88 -26
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +8 -8
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +4 -4
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/Pagination/Pagination.js +4 -4
- package/dist/_internal/components/navigation/Pagination/PaginationParts.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +4 -4
- package/dist/_internal/components/navigation/Tabs/Tabs.styles.js +2 -2
- package/dist/_internal/components/navigation/index.js +27 -27
- package/dist/_internal/components/typography/index.js +4 -4
- package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
- package/dist/_internal/components/utility/index.js +16 -16
- package/dist/_internal/en-US.data-display.js +2 -2
- package/dist/_internal/en-US.layout.js +5 -1
- package/dist/_internal/icons/Icon.js +6 -6
- package/dist/_internal/provider/UiProvider.js +5 -5
- package/dist/_internal/provider/mui-bridge.js +4 -4
- package/dist/_internal/provider/use-ui-theme.js +5 -5
- package/dist/_internal/pt-BR.data-display.js +2 -2
- package/dist/_internal/pt-BR.layout.js +5 -1
- package/dist/_internal/social-login-button/social-login-button.js +7 -7
- package/dist/_internal/tokens/density.js +3 -3
- package/dist/_internal/tokens/field-height.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +7 -7
- package/dist/charts.js +3 -3
- package/dist/chunk-2GTORM5E.js +1 -0
- package/dist/chunk-2GTORM5E.js.map +1 -0
- package/dist/{chunk-3PGFMBEI.js → chunk-2LKWJV65.js} +5 -5
- package/dist/{chunk-IIUB4IOH.js → chunk-2XHIF3M3.js} +4 -4
- package/dist/chunk-33L26P4J.js +27 -0
- package/dist/chunk-33L26P4J.js.map +1 -0
- package/dist/{chunk-CKPFLEOL.js → chunk-3CUWQXTG.js} +3 -3
- package/dist/{chunk-GVFPOKJW.js → chunk-3CYTVX4T.js} +5 -5
- package/dist/chunk-3DO5AJCG.js +117 -0
- package/dist/chunk-3DO5AJCG.js.map +1 -0
- package/dist/{chunk-TJPQIFI4.js → chunk-3EPA2A4M.js} +8 -8
- package/dist/{chunk-HDELNMZC.js → chunk-3MJHHPRW.js} +2 -2
- package/dist/chunk-3U7WKBMH.js +27 -0
- package/dist/chunk-3U7WKBMH.js.map +1 -0
- package/dist/{chunk-RNC574FS.js → chunk-3UEZ6NUI.js} +2 -2
- package/dist/{chunk-OXLOC6TC.js → chunk-3XS37SQT.js} +3 -3
- package/dist/{chunk-2Q5QHSU2.js → chunk-44USLRMT.js} +8 -8
- package/dist/{chunk-O7OQZJ3D.js → chunk-4GN2RLYL.js} +2 -2
- package/dist/{chunk-QUFKPCWD.js → chunk-4S2LWZ7L.js} +2 -2
- package/dist/{chunk-LPWIAVGP.js → chunk-4UVFPORR.js} +5 -5
- package/dist/{chunk-3B4YMZD5.js → chunk-4Z7GEO2R.js} +2 -2
- package/dist/{chunk-XXPEFK4V.js → chunk-53O2TNSR.js} +5 -5
- package/dist/{chunk-G3SKAI6S.js → chunk-54HTXJJ2.js} +2 -2
- package/dist/{chunk-JE6RZ5L6.js → chunk-5ZOJLYD2.js} +4 -4
- package/dist/{chunk-JDUIWHJ3.js → chunk-6H4TPEMO.js} +2 -2
- package/dist/{chunk-FYZJEME4.js → chunk-6JGATEOF.js} +3 -3
- package/dist/{chunk-ZFUOLLZS.js → chunk-6L2FKTBO.js} +5 -5
- package/dist/{chunk-BDBI4W77.js → chunk-6MD5QXXJ.js} +3 -3
- package/dist/{chunk-LJSKF43D.js → chunk-6TPYT3UC.js} +5 -5
- package/dist/{chunk-KZT5JC3E.js → chunk-6ZD3FI5P.js} +2 -2
- package/dist/{chunk-SBV62CSC.js → chunk-72FPUWD6.js} +2 -2
- package/dist/{chunk-L75CZ3SI.js → chunk-72S2RGWD.js} +2 -2
- package/dist/{chunk-WUFTDJ2L.js → chunk-77BKKPCI.js} +2 -2
- package/dist/{chunk-5A4XPYNK.js → chunk-7FEXRMJE.js} +2 -2
- package/dist/{chunk-AW336SO7.js → chunk-7KKMZJFT.js} +2 -2
- package/dist/{chunk-4SSWJRC4.js → chunk-7TE4TMS3.js} +3 -3
- package/dist/chunk-AEMD6JHZ.js +1 -0
- package/dist/chunk-AEMD6JHZ.js.map +1 -0
- package/dist/{chunk-5XWCKCHP.js → chunk-ALOUJ3CE.js} +4 -4
- package/dist/{chunk-UFUMYNKS.js → chunk-AWG2AJHX.js} +5 -5
- package/dist/{chunk-DDVNYVJH.js → chunk-B3QWQG62.js} +2 -2
- package/dist/{chunk-CKI33CN2.js → chunk-BA6Z52QN.js} +2 -2
- package/dist/{chunk-RSWHKOUN.js → chunk-BM4KKGL7.js} +2 -2
- package/dist/chunk-BOWS4U6W.js +1 -0
- package/dist/chunk-BOWS4U6W.js.map +1 -0
- package/dist/{chunk-OZGJ3YCN.js → chunk-BVSSEOLI.js} +2 -2
- package/dist/{chunk-FI6BL4UU.js → chunk-C2TERIB4.js} +2 -2
- package/dist/{chunk-DUITNU72.js → chunk-C6OVO6AT.js} +2 -2
- package/dist/{chunk-WL2S2YB3.js → chunk-CKHFYTIX.js} +4 -4
- package/dist/{chunk-GBEHJBYM.js → chunk-CLK67TNH.js} +2 -2
- package/dist/{chunk-T2HZ3GVA.js → chunk-CM2Q7IH3.js} +4 -4
- package/dist/{chunk-GE26GVHM.js → chunk-CMFJQH6A.js} +2 -2
- package/dist/{chunk-6PPHALM3.js → chunk-CMLIWUBW.js} +4 -4
- package/dist/{chunk-AU3GV6UL.js → chunk-DH5UJD2I.js} +3 -3
- package/dist/{chunk-BKT2KJ56.js → chunk-DH6SL3SY.js} +2 -2
- package/dist/{chunk-TRTX4BDI.js → chunk-DJKVSUXH.js} +2 -2
- package/dist/{chunk-VE3P77TV.js → chunk-DLWLIPCP.js} +2 -2
- package/dist/{chunk-AJVFSUC4.js → chunk-EIII4QU4.js} +9 -9
- package/dist/{chunk-MWPXKZ7O.js → chunk-ERY6D2OV.js} +4 -4
- package/dist/{chunk-TJ7NQG7E.js → chunk-FBUCXTA4.js} +4 -4
- package/dist/{chunk-SE6TW72O.js → chunk-FDMQ7H22.js} +2 -2
- package/dist/{chunk-EKM7C4X2.js → chunk-FTQBVZ7V.js} +3 -3
- package/dist/{chunk-E2FMNY6B.js → chunk-FXWXBEOZ.js} +2 -2
- package/dist/{chunk-UI5O6J6R.js → chunk-FY6PONLA.js} +4 -4
- package/dist/{chunk-QUIHOPOC.js → chunk-G4TKMUOL.js} +2 -2
- package/dist/{chunk-6BS2RBW4.js → chunk-G7XHJPLO.js} +3 -3
- package/dist/{chunk-4RXPIHJG.js → chunk-GE2CCITY.js} +2 -2
- package/dist/{chunk-WRHBXOGN.js → chunk-GG62LKA3.js} +5 -5
- package/dist/{chunk-YQCRQHVU.js → chunk-GI63FQEJ.js} +4 -4
- package/dist/{chunk-WUQKXAYF.js → chunk-GPHURU2K.js} +5 -5
- package/dist/{chunk-GPT673YL.js → chunk-H72YKEGD.js} +2 -2
- package/dist/chunk-HALFOXSZ.js +1 -0
- package/dist/chunk-HALFOXSZ.js.map +1 -0
- package/dist/{chunk-UP6RO2PR.js → chunk-HKBJZX3C.js} +3 -3
- package/dist/chunk-IC7GHPMK.js +22 -0
- package/dist/chunk-IC7GHPMK.js.map +1 -0
- package/dist/{chunk-COUFRGD6.js → chunk-J6KLT7HP.js} +4 -4
- package/dist/{chunk-N4D5V3AA.js → chunk-JAGAFEZL.js} +2 -2
- package/dist/{chunk-CLTK76ZF.js → chunk-JE5GEWTG.js} +5 -5
- package/dist/{chunk-23XBBGWD.js → chunk-JFLFZLOA.js} +5 -5
- package/dist/{chunk-BLUURKCY.js → chunk-K6LNHHSH.js} +2 -2
- package/dist/{chunk-HSNOWYEE.js → chunk-K7FSTB2K.js} +2 -2
- package/dist/{chunk-SXVCXLKU.js → chunk-K7MQP2KT.js} +3 -3
- package/dist/{chunk-QQ46JX5H.js → chunk-KHOAXZW2.js} +4 -4
- package/dist/{chunk-SCVBGQFO.js → chunk-KQZGUHYZ.js} +2 -2
- package/dist/{chunk-GJ7GIGDS.js → chunk-LCWGNDTH.js} +2 -2
- package/dist/{chunk-4D2IVVHR.js → chunk-LF3EVXMF.js} +2 -2
- package/dist/{chunk-2XTBGZSR.js → chunk-LGCRL7DK.js} +2 -2
- package/dist/{chunk-WY35GCHY.js → chunk-LODMNSLR.js} +3 -3
- package/dist/{chunk-EXFX3JRN.js → chunk-M47ZOUGF.js} +4 -4
- package/dist/{chunk-AQCQ2USS.js → chunk-M65ZNPLO.js} +2 -2
- package/dist/{chunk-JZ5IGO5G.js → chunk-NCB4GBRL.js} +2 -2
- package/dist/{chunk-SE4WZIKD.js → chunk-NFGIA2ZV.js} +2 -2
- package/dist/{chunk-H772ZSAI.js → chunk-NQ7NMCRI.js} +2 -2
- package/dist/{chunk-P7JF6XT7.js → chunk-NRSVI23L.js} +2 -2
- package/dist/{chunk-FRTEU7ZO.js → chunk-NU55QUMO.js} +2 -2
- package/dist/chunk-OJUORFGO.js +87 -0
- package/dist/chunk-OJUORFGO.js.map +1 -0
- package/dist/{chunk-JB56E4XQ.js → chunk-PAICZOL5.js} +6 -6
- package/dist/chunk-PEOOCQ2T.js +140 -0
- package/dist/chunk-PEOOCQ2T.js.map +1 -0
- package/dist/chunk-PGGGKYWG.js +1 -0
- package/dist/chunk-PGGGKYWG.js.map +1 -0
- package/dist/{chunk-QX3CXOJ3.js → chunk-PTONBPZL.js} +2 -2
- package/dist/chunk-Q4JWWTL4.js +36 -0
- package/dist/chunk-Q4JWWTL4.js.map +1 -0
- package/dist/{chunk-4UASV6VL.js → chunk-QDELBNL3.js} +2 -2
- package/dist/{chunk-ZE56GK5C.js → chunk-QEI5DC6S.js} +5 -5
- package/dist/chunk-QGUNUXTT.js +1 -0
- package/dist/chunk-QGUNUXTT.js.map +1 -0
- package/dist/{chunk-3UXBIUJF.js → chunk-RDFPM2AQ.js} +5 -5
- package/dist/chunk-RDZGXJOD.js +74 -0
- package/dist/chunk-RDZGXJOD.js.map +1 -0
- package/dist/chunk-RN7UJI7S.js +1 -0
- package/dist/chunk-RN7UJI7S.js.map +1 -0
- package/dist/chunk-RPBGUWNF.js +168 -0
- package/dist/chunk-RPBGUWNF.js.map +1 -0
- package/dist/{chunk-BKHO4RSF.js → chunk-RZ2VZ7SL.js} +2 -2
- package/dist/{chunk-MT7QJRP7.js → chunk-S4IXC2V3.js} +3 -3
- package/dist/chunk-SALQ65SM.js +118 -0
- package/dist/chunk-SALQ65SM.js.map +1 -0
- package/dist/{chunk-XOZYUJQ5.js → chunk-SDKOOVEX.js} +5 -3
- package/dist/{chunk-XOZYUJQ5.js.map → chunk-SDKOOVEX.js.map} +1 -1
- package/dist/{chunk-5K4G2XYS.js → chunk-SNBAMWI5.js} +2 -2
- package/dist/{chunk-MKJHDHLF.js → chunk-TCNTIGMY.js} +2 -2
- package/dist/{chunk-RUZVK4FV.js → chunk-TPVSHO75.js} +3 -3
- package/dist/{chunk-I72PREY7.js → chunk-TTJTMDLI.js} +2 -2
- package/dist/{chunk-TU5EIKJA.js → chunk-U5SH3VRJ.js} +4 -4
- package/dist/chunk-U67ZQ6VM.js +82 -0
- package/dist/chunk-U67ZQ6VM.js.map +1 -0
- package/dist/{chunk-APPIPQFT.js → chunk-UGPRBJWB.js} +6 -6
- package/dist/{chunk-V3RQFWL6.js → chunk-VEEG4UXZ.js} +2 -2
- package/dist/{chunk-DOLDAAXH.js → chunk-VOJBLBXE.js} +3 -3
- package/dist/{chunk-WTXPGASQ.js → chunk-VWJEM2ER.js} +3 -3
- package/dist/chunk-VYM2GPR6.js +47 -0
- package/dist/chunk-VYM2GPR6.js.map +1 -0
- package/dist/{chunk-BXEMC4YH.js → chunk-VYV3JOV5.js} +2 -2
- package/dist/{chunk-OTWMG7B2.js → chunk-WN5PNP6F.js} +4 -4
- package/dist/chunk-X3C3VTYS.js +85 -0
- package/dist/chunk-X3C3VTYS.js.map +1 -0
- package/dist/{chunk-HZBRXLV7.js → chunk-XB7HYOMM.js} +2 -2
- package/dist/{chunk-C6FVXX7Y.js → chunk-XBLFK2FL.js} +2 -2
- package/dist/{chunk-EDBVMLNX.js → chunk-XHA2NXLD.js} +2 -2
- package/dist/chunk-XJQNSMGA.js +10 -0
- package/dist/chunk-XJQNSMGA.js.map +1 -0
- package/dist/{chunk-ZO4NO77T.js → chunk-XO4ZUHVH.js} +2 -2
- package/dist/{chunk-D455V3BW.js → chunk-XVZG52CM.js} +7 -7
- package/dist/{chunk-OPT7X3Y6.js → chunk-XXL4PM4M.js} +2 -2
- package/dist/{chunk-3HKUOLPD.js → chunk-XZY7O7JJ.js} +4 -4
- package/dist/{chunk-53TDQYA3.js → chunk-Y2UXX5IQ.js} +4 -4
- package/dist/{chunk-743SY4WQ.js → chunk-YLXQWYOG.js} +5 -5
- package/dist/{chunk-Q33JWFSA.js → chunk-YPIVLPXF.js} +2 -2
- package/dist/{chunk-T7UUP7VD.js → chunk-YRUX7XMQ.js} +2 -2
- package/dist/{chunk-4JEXYOSN.js → chunk-YTXZUTLF.js} +2 -2
- package/dist/{chunk-V7A5ZAAF.js → chunk-YWJDUJAR.js} +3 -3
- package/dist/{chunk-ZK7YERPQ.js → chunk-Z2NN53E5.js} +2 -2
- package/dist/{chunk-CLSC36JS.js → chunk-Z4DKVLYG.js} +3 -3
- package/dist/{chunk-NFJ3VVD3.js → chunk-Z6T5SXST.js} +5 -5
- package/dist/{chunk-IITZA6U2.js → chunk-ZBVU2YWV.js} +9 -9
- package/dist/{chunk-IEWAFD6L.js → chunk-ZC5HDBQO.js} +2 -2
- package/dist/{chunk-KQS4ZJGS.js → chunk-ZGCPDA3F.js} +5 -5
- package/dist/{chunk-AHDNANID.js → chunk-ZH2SZ6B3.js} +2 -2
- package/dist/{chunk-KOX2AEFW.js → chunk-ZKWVCSAB.js} +2 -2
- package/dist/{chunk-K2U4BNHQ.js → chunk-ZNBLGS66.js} +2 -2
- package/dist/{chunk-WGUY7EIB.js → chunk-ZUME25DS.js} +5 -5
- package/dist/data-display/Badge.js +3 -3
- package/dist/data-display/CardKit.js +6 -6
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +3 -3
- package/dist/data-display/Chip.js +1 -0
- package/dist/data-display/DataViews.js +67 -67
- package/dist/data-display/FleetMap.js +9 -9
- package/dist/data-display/MapPreview.js +5 -5
- package/dist/data-display/Sheet.js +3 -3
- package/dist/en-US.js +15 -11
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/NotificationStatusNotice.js +5 -5
- package/dist/form/AddressAutocomplete.js +7 -7
- package/dist/form/Autocomplete.js +4 -4
- package/dist/form/Button.js +4 -4
- package/dist/form/CategorySelect.js +10 -10
- package/dist/form/CepField.js +5 -5
- package/dist/form/CodeEditor.js +2 -2
- package/dist/form/Command.js +3 -3
- package/dist/form/CreatableSelect.js +3 -3
- package/dist/form/DateRangePicker.js +7 -7
- package/dist/form/Input.js +4 -4
- package/dist/form/InputOTP.js +4 -4
- package/dist/form/Label.js +3 -3
- package/dist/form/Menubar.js +3 -3
- package/dist/form/NumberField.js +29 -0
- package/dist/form/NumberField.js.map +1 -0
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/RadioGroup.js +5 -5
- package/dist/form/RichTextEditor.js +3 -3
- package/dist/form/Select.js +3 -3
- package/dist/form/Switch.js +5 -5
- package/dist/form/Textarea.js +3 -3
- package/dist/form/Toggle.js +4 -4
- package/dist/form/ToggleGroup.js +3 -3
- package/dist/form/total-form.js +30 -30
- package/dist/icons.js +7 -6
- package/dist/layout/Box.js +6 -6
- package/dist/layout/Card.js +2 -2
- package/dist/layout/Collapsible.js +1 -0
- package/dist/layout/ContentToolbar.js +13 -13
- package/dist/layout/ScrollArea.js +2 -2
- package/dist/layout/SettingCard.js +80 -0
- package/dist/layout/SettingCard.js.map +1 -0
- package/dist/layout/SettingsLayout.js +4 -4
- package/dist/layout/Stack.js +7 -7
- package/dist/layout/TableFilter.js +3 -3
- package/dist/locales.js +37 -23
- package/dist/locales.js.map +1 -1
- package/dist/navigation/AppHeader.js +12 -12
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/navigation/Pagination.js +4 -4
- package/dist/navigation/Tabs.js +4 -4
- package/dist/provider.js +6 -6
- package/dist/pt-BR.js +12 -8
- package/dist/social-login-button.js +7 -7
- package/dist/tokens.js +4 -4
- package/dist/types/components/form/Input/Input.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.types.d.ts +10 -0
- package/dist/types/components/form/Input/Input.types.d.ts.map +1 -1
- package/dist/types/components/form/NumberField/NumberField.d.ts +21 -0
- package/dist/types/components/form/NumberField/NumberField.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/NumberField.helpers.d.ts +48 -0
- package/dist/types/components/form/NumberField/NumberField.helpers.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/NumberField.types.d.ts +31 -0
- package/dist/types/components/form/NumberField/NumberField.types.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/index.d.ts +3 -0
- package/dist/types/components/form/NumberField/index.d.ts.map +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts.map +1 -1
- package/dist/types/components/layout/SettingCard/SettingCard.d.ts +14 -0
- package/dist/types/components/layout/SettingCard/SettingCard.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts +79 -0
- package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts +21 -0
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts +49 -0
- package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts +48 -0
- package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts +127 -0
- package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGrid.d.ts +33 -0
- package/dist/types/components/layout/SettingCard/SettingGrid.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts +13 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.d.ts +18 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts +28 -0
- package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingToggle.d.ts +13 -0
- package/dist/types/components/layout/SettingCard/SettingToggle.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/index.d.ts +6 -0
- package/dist/types/components/layout/SettingCard/index.d.ts.map +1 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/index.d.ts.map +1 -1
- package/dist/types/copy/layout.d.ts +27 -0
- package/dist/types/copy/layout.d.ts.map +1 -1
- package/dist/types/en-US.layout.d.ts +3 -1
- package/dist/types/en-US.layout.d.ts.map +1 -1
- package/dist/types/locales.d.ts +3 -1
- package/dist/types/locales.d.ts.map +1 -1
- package/dist/types/pt-BR.layout.d.ts +3 -1
- package/dist/types/pt-BR.layout.d.ts.map +1 -1
- package/dist/user-avatar.js +7 -7
- package/dist/utility/InstallPrompt.js +2 -2
- package/dist/utility/WorkflowStep.js +3 -3
- package/package.json +9 -1
- package/src/components/form/Input/Input.tsx +2 -0
- package/src/components/form/Input/Input.types.ts +10 -0
- package/src/components/form/NumberField/NumberField.helpers.ts +77 -0
- package/src/components/form/NumberField/NumberField.md +86 -0
- package/src/components/form/NumberField/NumberField.tsx +88 -0
- package/src/components/form/NumberField/NumberField.types.ts +43 -0
- package/src/components/form/NumberField/index.ts +2 -0
- package/src/components/form/NumberField/tests.md +51 -0
- package/src/components/form/NumberField/track.md +42 -0
- package/src/components/form/index.ts +1 -0
- package/src/components/layout/SettingCard/SettingCard.hooks.ts +191 -0
- package/src/components/layout/SettingCard/SettingCard.md +121 -0
- package/src/components/layout/SettingCard/SettingCard.metrics.ts +22 -0
- package/src/components/layout/SettingCard/SettingCard.parts.tsx +162 -0
- package/src/components/layout/SettingCard/SettingCard.styles.ts +142 -0
- package/src/components/layout/SettingCard/SettingCard.tsx +197 -0
- package/src/components/layout/SettingCard/SettingCard.types.ts +140 -0
- package/src/components/layout/SettingCard/SettingGrid.md +65 -0
- package/src/components/layout/SettingCard/SettingGrid.tsx +105 -0
- package/src/components/layout/SettingCard/SettingGroup.context.ts +11 -0
- package/src/components/layout/SettingCard/SettingGroup.md +81 -0
- package/src/components/layout/SettingCard/SettingGroup.tsx +73 -0
- package/src/components/layout/SettingCard/SettingSwitch.tsx +92 -0
- package/src/components/layout/SettingCard/SettingToggle.md +61 -0
- package/src/components/layout/SettingCard/SettingToggle.tsx +43 -0
- package/src/components/layout/SettingCard/index.ts +18 -0
- package/src/components/layout/SettingCard/tests.md +68 -0
- package/src/components/layout/SettingCard/track.md +54 -0
- package/src/components/layout/index.ts +1 -0
- package/src/copy/layout.ts +29 -0
- package/src/en-US.layout.ts +16 -0
- package/src/locales.ts +10 -0
- package/src/pt-BR.layout.ts +16 -0
- package/dist/chunk-A7RIZOAL.js +0 -13
- package/dist/chunk-A7RIZOAL.js.map +0 -1
- package/dist/chunk-BY3JEK5T.js +0 -1
- package/dist/chunk-FZJ2FTGE.js +0 -1
- package/dist/chunk-GRHECKHU.js +0 -13
- package/dist/chunk-GRHECKHU.js.map +0 -1
- /package/dist/{chunk-BY3JEK5T.js.map → _internal/components/form/NumberField/NumberField.helpers.js.map} +0 -0
- /package/dist/{chunk-FZJ2FTGE.js.map → _internal/components/form/NumberField/NumberField.js.map} +0 -0
- /package/dist/{chunk-3PGFMBEI.js.map → chunk-2LKWJV65.js.map} +0 -0
- /package/dist/{chunk-IIUB4IOH.js.map → chunk-2XHIF3M3.js.map} +0 -0
- /package/dist/{chunk-CKPFLEOL.js.map → chunk-3CUWQXTG.js.map} +0 -0
- /package/dist/{chunk-GVFPOKJW.js.map → chunk-3CYTVX4T.js.map} +0 -0
- /package/dist/{chunk-TJPQIFI4.js.map → chunk-3EPA2A4M.js.map} +0 -0
- /package/dist/{chunk-HDELNMZC.js.map → chunk-3MJHHPRW.js.map} +0 -0
- /package/dist/{chunk-RNC574FS.js.map → chunk-3UEZ6NUI.js.map} +0 -0
- /package/dist/{chunk-OXLOC6TC.js.map → chunk-3XS37SQT.js.map} +0 -0
- /package/dist/{chunk-2Q5QHSU2.js.map → chunk-44USLRMT.js.map} +0 -0
- /package/dist/{chunk-O7OQZJ3D.js.map → chunk-4GN2RLYL.js.map} +0 -0
- /package/dist/{chunk-QUFKPCWD.js.map → chunk-4S2LWZ7L.js.map} +0 -0
- /package/dist/{chunk-LPWIAVGP.js.map → chunk-4UVFPORR.js.map} +0 -0
- /package/dist/{chunk-3B4YMZD5.js.map → chunk-4Z7GEO2R.js.map} +0 -0
- /package/dist/{chunk-XXPEFK4V.js.map → chunk-53O2TNSR.js.map} +0 -0
- /package/dist/{chunk-G3SKAI6S.js.map → chunk-54HTXJJ2.js.map} +0 -0
- /package/dist/{chunk-JE6RZ5L6.js.map → chunk-5ZOJLYD2.js.map} +0 -0
- /package/dist/{chunk-JDUIWHJ3.js.map → chunk-6H4TPEMO.js.map} +0 -0
- /package/dist/{chunk-FYZJEME4.js.map → chunk-6JGATEOF.js.map} +0 -0
- /package/dist/{chunk-ZFUOLLZS.js.map → chunk-6L2FKTBO.js.map} +0 -0
- /package/dist/{chunk-BDBI4W77.js.map → chunk-6MD5QXXJ.js.map} +0 -0
- /package/dist/{chunk-LJSKF43D.js.map → chunk-6TPYT3UC.js.map} +0 -0
- /package/dist/{chunk-KZT5JC3E.js.map → chunk-6ZD3FI5P.js.map} +0 -0
- /package/dist/{chunk-SBV62CSC.js.map → chunk-72FPUWD6.js.map} +0 -0
- /package/dist/{chunk-L75CZ3SI.js.map → chunk-72S2RGWD.js.map} +0 -0
- /package/dist/{chunk-WUFTDJ2L.js.map → chunk-77BKKPCI.js.map} +0 -0
- /package/dist/{chunk-5A4XPYNK.js.map → chunk-7FEXRMJE.js.map} +0 -0
- /package/dist/{chunk-AW336SO7.js.map → chunk-7KKMZJFT.js.map} +0 -0
- /package/dist/{chunk-4SSWJRC4.js.map → chunk-7TE4TMS3.js.map} +0 -0
- /package/dist/{chunk-5XWCKCHP.js.map → chunk-ALOUJ3CE.js.map} +0 -0
- /package/dist/{chunk-UFUMYNKS.js.map → chunk-AWG2AJHX.js.map} +0 -0
- /package/dist/{chunk-DDVNYVJH.js.map → chunk-B3QWQG62.js.map} +0 -0
- /package/dist/{chunk-CKI33CN2.js.map → chunk-BA6Z52QN.js.map} +0 -0
- /package/dist/{chunk-RSWHKOUN.js.map → chunk-BM4KKGL7.js.map} +0 -0
- /package/dist/{chunk-OZGJ3YCN.js.map → chunk-BVSSEOLI.js.map} +0 -0
- /package/dist/{chunk-FI6BL4UU.js.map → chunk-C2TERIB4.js.map} +0 -0
- /package/dist/{chunk-DUITNU72.js.map → chunk-C6OVO6AT.js.map} +0 -0
- /package/dist/{chunk-WL2S2YB3.js.map → chunk-CKHFYTIX.js.map} +0 -0
- /package/dist/{chunk-GBEHJBYM.js.map → chunk-CLK67TNH.js.map} +0 -0
- /package/dist/{chunk-T2HZ3GVA.js.map → chunk-CM2Q7IH3.js.map} +0 -0
- /package/dist/{chunk-GE26GVHM.js.map → chunk-CMFJQH6A.js.map} +0 -0
- /package/dist/{chunk-6PPHALM3.js.map → chunk-CMLIWUBW.js.map} +0 -0
- /package/dist/{chunk-AU3GV6UL.js.map → chunk-DH5UJD2I.js.map} +0 -0
- /package/dist/{chunk-BKT2KJ56.js.map → chunk-DH6SL3SY.js.map} +0 -0
- /package/dist/{chunk-TRTX4BDI.js.map → chunk-DJKVSUXH.js.map} +0 -0
- /package/dist/{chunk-VE3P77TV.js.map → chunk-DLWLIPCP.js.map} +0 -0
- /package/dist/{chunk-AJVFSUC4.js.map → chunk-EIII4QU4.js.map} +0 -0
- /package/dist/{chunk-MWPXKZ7O.js.map → chunk-ERY6D2OV.js.map} +0 -0
- /package/dist/{chunk-TJ7NQG7E.js.map → chunk-FBUCXTA4.js.map} +0 -0
- /package/dist/{chunk-SE6TW72O.js.map → chunk-FDMQ7H22.js.map} +0 -0
- /package/dist/{chunk-EKM7C4X2.js.map → chunk-FTQBVZ7V.js.map} +0 -0
- /package/dist/{chunk-E2FMNY6B.js.map → chunk-FXWXBEOZ.js.map} +0 -0
- /package/dist/{chunk-UI5O6J6R.js.map → chunk-FY6PONLA.js.map} +0 -0
- /package/dist/{chunk-QUIHOPOC.js.map → chunk-G4TKMUOL.js.map} +0 -0
- /package/dist/{chunk-6BS2RBW4.js.map → chunk-G7XHJPLO.js.map} +0 -0
- /package/dist/{chunk-4RXPIHJG.js.map → chunk-GE2CCITY.js.map} +0 -0
- /package/dist/{chunk-WRHBXOGN.js.map → chunk-GG62LKA3.js.map} +0 -0
- /package/dist/{chunk-YQCRQHVU.js.map → chunk-GI63FQEJ.js.map} +0 -0
- /package/dist/{chunk-WUQKXAYF.js.map → chunk-GPHURU2K.js.map} +0 -0
- /package/dist/{chunk-GPT673YL.js.map → chunk-H72YKEGD.js.map} +0 -0
- /package/dist/{chunk-UP6RO2PR.js.map → chunk-HKBJZX3C.js.map} +0 -0
- /package/dist/{chunk-COUFRGD6.js.map → chunk-J6KLT7HP.js.map} +0 -0
- /package/dist/{chunk-N4D5V3AA.js.map → chunk-JAGAFEZL.js.map} +0 -0
- /package/dist/{chunk-CLTK76ZF.js.map → chunk-JE5GEWTG.js.map} +0 -0
- /package/dist/{chunk-23XBBGWD.js.map → chunk-JFLFZLOA.js.map} +0 -0
- /package/dist/{chunk-BLUURKCY.js.map → chunk-K6LNHHSH.js.map} +0 -0
- /package/dist/{chunk-HSNOWYEE.js.map → chunk-K7FSTB2K.js.map} +0 -0
- /package/dist/{chunk-SXVCXLKU.js.map → chunk-K7MQP2KT.js.map} +0 -0
- /package/dist/{chunk-QQ46JX5H.js.map → chunk-KHOAXZW2.js.map} +0 -0
- /package/dist/{chunk-SCVBGQFO.js.map → chunk-KQZGUHYZ.js.map} +0 -0
- /package/dist/{chunk-GJ7GIGDS.js.map → chunk-LCWGNDTH.js.map} +0 -0
- /package/dist/{chunk-4D2IVVHR.js.map → chunk-LF3EVXMF.js.map} +0 -0
- /package/dist/{chunk-2XTBGZSR.js.map → chunk-LGCRL7DK.js.map} +0 -0
- /package/dist/{chunk-WY35GCHY.js.map → chunk-LODMNSLR.js.map} +0 -0
- /package/dist/{chunk-EXFX3JRN.js.map → chunk-M47ZOUGF.js.map} +0 -0
- /package/dist/{chunk-AQCQ2USS.js.map → chunk-M65ZNPLO.js.map} +0 -0
- /package/dist/{chunk-JZ5IGO5G.js.map → chunk-NCB4GBRL.js.map} +0 -0
- /package/dist/{chunk-SE4WZIKD.js.map → chunk-NFGIA2ZV.js.map} +0 -0
- /package/dist/{chunk-H772ZSAI.js.map → chunk-NQ7NMCRI.js.map} +0 -0
- /package/dist/{chunk-P7JF6XT7.js.map → chunk-NRSVI23L.js.map} +0 -0
- /package/dist/{chunk-FRTEU7ZO.js.map → chunk-NU55QUMO.js.map} +0 -0
- /package/dist/{chunk-JB56E4XQ.js.map → chunk-PAICZOL5.js.map} +0 -0
- /package/dist/{chunk-QX3CXOJ3.js.map → chunk-PTONBPZL.js.map} +0 -0
- /package/dist/{chunk-4UASV6VL.js.map → chunk-QDELBNL3.js.map} +0 -0
- /package/dist/{chunk-ZE56GK5C.js.map → chunk-QEI5DC6S.js.map} +0 -0
- /package/dist/{chunk-3UXBIUJF.js.map → chunk-RDFPM2AQ.js.map} +0 -0
- /package/dist/{chunk-BKHO4RSF.js.map → chunk-RZ2VZ7SL.js.map} +0 -0
- /package/dist/{chunk-MT7QJRP7.js.map → chunk-S4IXC2V3.js.map} +0 -0
- /package/dist/{chunk-5K4G2XYS.js.map → chunk-SNBAMWI5.js.map} +0 -0
- /package/dist/{chunk-MKJHDHLF.js.map → chunk-TCNTIGMY.js.map} +0 -0
- /package/dist/{chunk-RUZVK4FV.js.map → chunk-TPVSHO75.js.map} +0 -0
- /package/dist/{chunk-I72PREY7.js.map → chunk-TTJTMDLI.js.map} +0 -0
- /package/dist/{chunk-TU5EIKJA.js.map → chunk-U5SH3VRJ.js.map} +0 -0
- /package/dist/{chunk-APPIPQFT.js.map → chunk-UGPRBJWB.js.map} +0 -0
- /package/dist/{chunk-V3RQFWL6.js.map → chunk-VEEG4UXZ.js.map} +0 -0
- /package/dist/{chunk-DOLDAAXH.js.map → chunk-VOJBLBXE.js.map} +0 -0
- /package/dist/{chunk-WTXPGASQ.js.map → chunk-VWJEM2ER.js.map} +0 -0
- /package/dist/{chunk-BXEMC4YH.js.map → chunk-VYV3JOV5.js.map} +0 -0
- /package/dist/{chunk-OTWMG7B2.js.map → chunk-WN5PNP6F.js.map} +0 -0
- /package/dist/{chunk-HZBRXLV7.js.map → chunk-XB7HYOMM.js.map} +0 -0
- /package/dist/{chunk-C6FVXX7Y.js.map → chunk-XBLFK2FL.js.map} +0 -0
- /package/dist/{chunk-EDBVMLNX.js.map → chunk-XHA2NXLD.js.map} +0 -0
- /package/dist/{chunk-ZO4NO77T.js.map → chunk-XO4ZUHVH.js.map} +0 -0
- /package/dist/{chunk-D455V3BW.js.map → chunk-XVZG52CM.js.map} +0 -0
- /package/dist/{chunk-OPT7X3Y6.js.map → chunk-XXL4PM4M.js.map} +0 -0
- /package/dist/{chunk-3HKUOLPD.js.map → chunk-XZY7O7JJ.js.map} +0 -0
- /package/dist/{chunk-53TDQYA3.js.map → chunk-Y2UXX5IQ.js.map} +0 -0
- /package/dist/{chunk-743SY4WQ.js.map → chunk-YLXQWYOG.js.map} +0 -0
- /package/dist/{chunk-Q33JWFSA.js.map → chunk-YPIVLPXF.js.map} +0 -0
- /package/dist/{chunk-T7UUP7VD.js.map → chunk-YRUX7XMQ.js.map} +0 -0
- /package/dist/{chunk-4JEXYOSN.js.map → chunk-YTXZUTLF.js.map} +0 -0
- /package/dist/{chunk-V7A5ZAAF.js.map → chunk-YWJDUJAR.js.map} +0 -0
- /package/dist/{chunk-ZK7YERPQ.js.map → chunk-Z2NN53E5.js.map} +0 -0
- /package/dist/{chunk-CLSC36JS.js.map → chunk-Z4DKVLYG.js.map} +0 -0
- /package/dist/{chunk-NFJ3VVD3.js.map → chunk-Z6T5SXST.js.map} +0 -0
- /package/dist/{chunk-IITZA6U2.js.map → chunk-ZBVU2YWV.js.map} +0 -0
- /package/dist/{chunk-IEWAFD6L.js.map → chunk-ZC5HDBQO.js.map} +0 -0
- /package/dist/{chunk-KQS4ZJGS.js.map → chunk-ZGCPDA3F.js.map} +0 -0
- /package/dist/{chunk-AHDNANID.js.map → chunk-ZH2SZ6B3.js.map} +0 -0
- /package/dist/{chunk-KOX2AEFW.js.map → chunk-ZKWVCSAB.js.map} +0 -0
- /package/dist/{chunk-K2U4BNHQ.js.map → chunk-ZNBLGS66.js.map} +0 -0
- /package/dist/{chunk-WGUY7EIB.js.map → chunk-ZUME25DS.js.map} +0 -0
|
@@ -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 '../../../tokens/relative';
|
|
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,142 @@
|
|
|
1
|
+
import type { CSSObject, SxProps, Theme } from '@mui/material/styles/index.js';
|
|
2
|
+
|
|
3
|
+
import { rem } from '../../../tokens/relative';
|
|
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
|
+
}
|