@12-apps/ui 6.20.0 → 6.22.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 +10 -4
- package/dist/_internal/components/data-display/Alert/Alert.js +2 -2
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +8 -8
- package/dist/_internal/components/data-display/Badge/Badge.js +2 -2
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +3 -3
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +3 -3
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +6 -6
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +3 -3
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +49 -48
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +72 -65
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +9 -6
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +10 -7
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +20 -13
- package/dist/_internal/components/data-display/DataViews/base-card.js +12 -8
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +6 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +10 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +5 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +18 -15
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +17 -15
- package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +20 -18
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +46 -45
- package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +23 -22
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +27 -20
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +4 -4
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +1 -1
- package/dist/_internal/components/data-display/DataViews/save-view-preview.js +3 -3
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +6 -6
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +3 -3
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +3 -3
- package/dist/_internal/components/data-display/ErrorState/ErrorState.js +2 -2
- package/dist/_internal/components/data-display/HoverCard/HoverCard.js +3 -3
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +4 -4
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +5 -5
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +4 -4
- package/dist/_internal/components/data-display/Progress/Progress.js +2 -2
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +4 -4
- package/dist/_internal/components/data-display/StatCard/StatCard.js +4 -4
- package/dist/_internal/components/data-display/index.js +50 -50
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +3 -3
- package/dist/_internal/components/feedback/Dialog/Dialog.base.js +1 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.base.js.map +1 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.helpers.js +12 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.helpers.js.map +1 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.js +6 -2
- package/dist/_internal/components/feedback/Dialog/Dialog.metrics.js +42 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.metrics.js.map +1 -0
- package/dist/_internal/components/feedback/Dialog/Dialog.styles.js +3 -1
- package/dist/_internal/components/feedback/Modal/Modal.js +2 -2
- package/dist/_internal/components/feedback/StackedModal/StackedModal.js +2 -2
- package/dist/_internal/components/feedback/index.js +14 -11
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +3 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +11 -9
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +7 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +5 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +5 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +4 -2
- package/dist/_internal/components/form/Button/Button.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +10 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +5 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +5 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +6 -4
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +5 -3
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +13 -11
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +4 -2
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +5 -3
- package/dist/_internal/components/form/CepField/CepField.js +10 -4
- package/dist/_internal/components/form/Checkbox/Checkbox.base.js +1 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.base.js.map +1 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.helpers.js +2 -1
- package/dist/_internal/components/form/Checkbox/Checkbox.js +9 -2
- package/dist/_internal/components/form/Checkbox/Checkbox.metrics.js +34 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.metrics.js.map +1 -0
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +5 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +4 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +3 -3
- package/dist/_internal/components/form/Input/Input.base.js +1 -0
- package/dist/_internal/components/form/Input/Input.base.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.helpers.js +23 -0
- package/dist/_internal/components/form/Input/Input.helpers.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.js +9 -3
- package/dist/_internal/components/form/Input/Input.metrics.js +53 -0
- package/dist/_internal/components/form/Input/Input.metrics.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.styles.js +10 -4
- package/dist/_internal/components/form/InputOTP/InputOTP.js +5 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +4 -2
- package/dist/_internal/components/form/Label/Label.js +2 -2
- package/dist/_internal/components/form/Menubar/Menubar.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +4 -2
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +6 -4
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +4 -2
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +5 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +4 -2
- package/dist/_internal/components/form/Select/Select.base.js +1 -0
- package/dist/_internal/components/form/Select/Select.base.js.map +1 -0
- package/dist/_internal/components/form/Select/Select.helpers.js +48 -0
- package/dist/_internal/components/form/Select/Select.helpers.js.map +1 -0
- package/dist/_internal/components/form/Select/Select.js +10 -2
- package/dist/_internal/components/form/Select/Select.metrics.js +38 -0
- package/dist/_internal/components/form/Select/Select.metrics.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.base.js +1 -0
- package/dist/_internal/components/form/Switch/Switch.base.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.helpers.js +59 -0
- package/dist/_internal/components/form/Switch/Switch.helpers.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.js +9 -3
- package/dist/_internal/components/form/Switch/Switch.metrics.js +83 -0
- package/dist/_internal/components/form/Switch/Switch.metrics.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.parts.js +7 -2
- package/dist/_internal/components/form/Switch/Switch.styles.js +6 -1
- package/dist/_internal/components/form/Textarea/Textarea.js +5 -3
- package/dist/_internal/components/form/Textarea/Textarea.styles.js +4 -2
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -2
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js.map +1 -1
- package/dist/_internal/components/form/Toggle/Toggle.js +5 -3
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +4 -2
- package/dist/_internal/components/form/index.js +46 -40
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +14 -12
- package/dist/_internal/components/form/total-form/Fields/CepField.js +11 -5
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +11 -3
- package/dist/_internal/components/form/total-form/Fields/TextField.js +10 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +32 -24
- package/dist/_internal/components/form/total-form/SubmitButton.js +3 -3
- package/dist/_internal/components/index.js +138 -128
- package/dist/_internal/components/layout/Box/Box.js +2 -2
- package/dist/_internal/components/layout/Card/Card.base.js +1 -0
- package/dist/_internal/components/layout/Card/Card.base.js.map +1 -0
- package/dist/_internal/components/layout/Card/Card.helpers.js +1 -1
- package/dist/_internal/components/layout/Card/Card.js +6 -3
- package/dist/_internal/components/layout/Card/Card.metrics.js +44 -0
- package/dist/_internal/components/layout/Card/Card.metrics.js.map +1 -0
- package/dist/_internal/components/layout/Card/Card.styles.js +3 -1
- package/dist/_internal/components/layout/Container/Container.js +2 -2
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +3 -3
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +3 -3
- package/dist/_internal/components/layout/Spacer/Spacer.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +3 -3
- package/dist/_internal/components/layout/index.js +22 -20
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +12 -9
- package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
- package/dist/_internal/components/navigation/index.js +20 -17
- package/dist/_internal/components/typography/Heading/Heading.js +2 -2
- package/dist/_internal/components/typography/Paragraph/Paragraph.js +2 -2
- package/dist/_internal/components/typography/Text/Text.js +2 -2
- package/dist/_internal/components/typography/index.js +4 -4
- package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
- package/dist/_internal/components/utility/index.js +2 -2
- package/dist/_internal/icons/Icon.js +3 -3
- package/dist/_internal/icons/paths.generated.js +1 -1
- package/dist/_internal/platform/aria.js +17 -1
- package/dist/_internal/platform/aria.js.map +1 -1
- package/dist/_internal/platform/test-id.js +5 -1
- package/dist/_internal/social-login-button/social-login-button.js +10 -8
- package/dist/_internal/tokens/field-edge.core.js +11 -0
- package/dist/_internal/tokens/field-edge.core.js.map +1 -0
- package/dist/_internal/tokens/field-edge.js +5 -2
- package/dist/_internal/tokens/mui-type.js +1 -0
- package/dist/_internal/tokens/mui-type.js.map +1 -1
- package/dist/_internal/tokens/shadow.js +18 -0
- package/dist/_internal/tokens/shadow.js.map +1 -0
- package/dist/_internal/user-avatar/user-avatar.js +9 -7
- package/dist/charts.js +11 -11
- package/dist/{chunk-MBYO2F4Y.js → chunk-25R3ITGZ.js} +6 -6
- package/dist/chunk-2ECT4IY2.js +250 -0
- package/dist/chunk-2ECT4IY2.js.map +1 -0
- package/dist/{chunk-KQ74QU55.js → chunk-2FDBR77W.js} +3 -3
- package/dist/{chunk-D7FJ2GAD.js → chunk-2HPP6RVC.js} +2 -2
- package/dist/{chunk-B2A4DG77.js → chunk-2MMEIN4T.js} +6 -6
- package/dist/{chunk-YRUCIKPO.js → chunk-2UYR2OOE.js} +4 -4
- package/dist/{chunk-2PCOC3PT.js → chunk-343TTIHD.js} +2 -2
- package/dist/{chunk-DQHC5P64.js → chunk-3FLVIVOK.js} +3 -3
- package/dist/{chunk-URWGRPL7.js → chunk-3W7IEWEL.js} +2 -2
- package/dist/{chunk-47UD6DZ4.js → chunk-4523RYE7.js} +5 -5
- package/dist/{chunk-AEGX66N7.js → chunk-4IVOHL32.js} +2 -2
- package/dist/{chunk-OQXOYHIV.js → chunk-4OHRZW7U.js} +48 -40
- package/dist/chunk-4OHRZW7U.js.map +1 -0
- package/dist/{chunk-GGE7Y53F.js → chunk-4TXIZ5WI.js} +2 -2
- package/dist/{chunk-IJIT5HQP.js → chunk-4X4KM4ZB.js} +4 -4
- package/dist/{chunk-6PRA45LC.js → chunk-5KEMPCW4.js} +54 -45
- package/dist/chunk-5KEMPCW4.js.map +1 -0
- package/dist/{chunk-M7OHXNLF.js → chunk-5NKUYCZD.js} +3 -3
- package/dist/{chunk-C52BELLW.js → chunk-5OIH36KX.js} +3 -3
- package/dist/chunk-5ZNU2U4D.js +41 -0
- package/dist/chunk-5ZNU2U4D.js.map +1 -0
- package/dist/{chunk-LMJBINWN.js → chunk-5ZTUP65G.js} +7 -7
- package/dist/{chunk-EX3PSZLV.js → chunk-67L7HMEP.js} +3 -3
- package/dist/{chunk-2EKALM6P.js → chunk-6JGPPTLX.js} +5 -5
- package/dist/{chunk-LZRURORY.js → chunk-6NZTYZP5.js} +4 -4
- package/dist/chunk-6Q6T3FW5.js +92 -0
- package/dist/chunk-6Q6T3FW5.js.map +1 -0
- package/dist/{chunk-DCEMUZJQ.js → chunk-6WIDZGXE.js} +2 -2
- package/dist/{chunk-R7MX5KPJ.js → chunk-6YLAVHV4.js} +4 -4
- package/dist/chunk-73BEVJCS.js +28 -0
- package/dist/chunk-73BEVJCS.js.map +1 -0
- package/dist/chunk-7FDU3FIN.js +13 -0
- package/dist/chunk-7FDU3FIN.js.map +1 -0
- package/dist/{chunk-RXSGHPCR.js → chunk-7FOOLP5H.js} +4 -4
- package/dist/{chunk-DOADQW7I.js → chunk-7NSX7A5H.js} +2 -2
- package/dist/{chunk-QZWKC3AP.js → chunk-7VN7LFBA.js} +6 -6
- package/dist/{chunk-E4FGKZID.js → chunk-AEGXHZQT.js} +2 -2
- package/dist/{chunk-WO52KYSU.js → chunk-AGSBIUPV.js} +8 -8
- package/dist/{chunk-D2IASECY.js → chunk-AIRWM7KK.js} +39 -28
- package/dist/chunk-AIRWM7KK.js.map +1 -0
- package/dist/{chunk-PU3AAKRR.js → chunk-AJ6XEO4E.js} +2 -2
- package/dist/{chunk-7DNQHMDO.js → chunk-B6IURHSZ.js} +4 -4
- package/dist/chunk-BEBLRL5D.js +177 -0
- package/dist/chunk-BEBLRL5D.js.map +1 -0
- package/dist/{chunk-WX7VWW3W.js → chunk-C3CMEDSO.js} +2 -2
- package/dist/{chunk-HSAH5QUQ.js → chunk-CHPZTF34.js} +7 -7
- package/dist/{chunk-7EESF76V.js → chunk-CJBBGMIA.js} +2 -2
- package/dist/{chunk-2W4CIWTW.js → chunk-DBYFC6CF.js} +3 -3
- package/dist/chunk-DFK6QCXX.js +150 -0
- package/dist/chunk-DFK6QCXX.js.map +1 -0
- package/dist/{chunk-FGLV6BXQ.js → chunk-DTC224UJ.js} +6 -6
- package/dist/{chunk-HEK4LQT6.js → chunk-DVFIE54C.js} +2 -2
- package/dist/{chunk-4N4ENTF7.js → chunk-DW5FRWRQ.js} +2 -2
- package/dist/{chunk-THBT56JE.js → chunk-E55CJV65.js} +2 -2
- package/dist/{chunk-B7BZAIHL.js → chunk-EOHKZGOZ.js} +2 -2
- package/dist/{chunk-MLOWPVVW.js → chunk-EPEJMTCQ.js} +16 -13
- package/dist/chunk-EPEJMTCQ.js.map +1 -0
- package/dist/{chunk-EGRFMPGD.js → chunk-EXJBPKGW.js} +4 -4
- package/dist/{chunk-BILE3A7F.js → chunk-FGK2C7JR.js} +2 -2
- package/dist/{chunk-OI3HOI74.js → chunk-FGUESLDX.js} +2 -2
- package/dist/{chunk-RI5JZLZL.js → chunk-FKUYRQSP.js} +1 -1
- package/dist/chunk-FKUYRQSP.js.map +1 -0
- package/dist/{chunk-VCTKJHXD.js → chunk-FL54G7PV.js} +2 -2
- package/dist/{chunk-FX5DY6VR.js → chunk-FR67FG2U.js} +7 -4
- package/dist/chunk-FR67FG2U.js.map +1 -0
- package/dist/{chunk-HDNK7BAX.js → chunk-GT7C6TSM.js} +3 -3
- package/dist/chunk-GY6KNVMI.js +39 -0
- package/dist/chunk-GY6KNVMI.js.map +1 -0
- package/dist/chunk-GYXUCS37.js +36 -0
- package/dist/chunk-GYXUCS37.js.map +1 -0
- package/dist/{chunk-V3SBJ3PB.js → chunk-HFXTAEYY.js} +2 -2
- package/dist/{chunk-HBAPVB7T.js → chunk-HKKSZ7HG.js} +2 -2
- package/dist/{chunk-FOMK3WPG.js → chunk-HLYPI5CO.js} +4 -4
- package/dist/{chunk-3AOOI2NR.js → chunk-HR7YTBR7.js} +4 -4
- package/dist/{chunk-UNF65XZW.js → chunk-I5SBTNV2.js} +2 -2
- package/dist/{chunk-X24P3ZYW.js → chunk-J4W4TQPC.js} +6 -6
- package/dist/{chunk-5ZOJLYD2.js → chunk-JE6RZ5L6.js} +4 -4
- package/dist/{chunk-NQC6H7GY.js → chunk-JIKWZDNK.js} +2 -2
- package/dist/{chunk-ENNW5SKT.js → chunk-JSH3HFDQ.js} +2 -2
- package/dist/{chunk-JB7JE4QZ.js → chunk-JWW2Z3RH.js} +4 -4
- package/dist/{chunk-LAHDFBDE.js → chunk-JXNT5TUP.js} +3 -3
- package/dist/{chunk-VMNSGE2G.js → chunk-KEVPUBOE.js} +5 -1
- package/dist/chunk-KEVPUBOE.js.map +1 -0
- package/dist/{chunk-ZBNTFWTG.js → chunk-KIHQE5YA.js} +2 -2
- package/dist/{chunk-ZEBJT5JZ.js → chunk-KTK4A3IF.js} +3 -3
- package/dist/{chunk-4WK2RTVY.js → chunk-LS4FMSHY.js} +5 -5
- package/dist/{chunk-PNYXXLPU.js → chunk-M4LQRQFL.js} +2 -2
- package/dist/{chunk-Z7JNCB5Q.js → chunk-MESRKY67.js} +2 -2
- package/dist/chunk-MLCFODJO.js +135 -0
- package/dist/chunk-MLCFODJO.js.map +1 -0
- package/dist/{chunk-VJK5FBNK.js → chunk-MP4VSWHK.js} +2 -2
- package/dist/{chunk-Q5EQC7NL.js → chunk-N5IVVLTH.js} +8 -5
- package/dist/chunk-N5IVVLTH.js.map +1 -0
- package/dist/{chunk-6XPNJLXE.js → chunk-NARIG5FL.js} +2 -2
- package/dist/{chunk-VEFDL77X.js → chunk-NWNSUHEB.js} +2 -2
- package/dist/{chunk-43NEBUV3.js → chunk-O3336DJ6.js} +2 -2
- package/dist/{chunk-WBVHRLIS.js → chunk-OFOYMZRY.js} +2 -2
- package/dist/{chunk-SM3NRN7L.js → chunk-ON2CMKTI.js} +2 -2
- package/dist/{chunk-IH4CX43Q.js → chunk-OP65D4UR.js} +2 -2
- package/dist/{chunk-NHSMLVNC.js → chunk-OVLNF4AZ.js} +3 -3
- package/dist/{chunk-ZTZ6S5Q6.js → chunk-OXQP3N6X.js} +4 -4
- package/dist/{chunk-YVW7VPK4.js → chunk-PFLKPNBU.js} +2 -2
- package/dist/{chunk-7P2HZLEG.js → chunk-PFV6RL4Q.js} +3 -3
- package/dist/{chunk-76GZ55IC.js → chunk-PMS3H3OO.js} +7 -7
- package/dist/{chunk-UF27D35R.js → chunk-PRUSQQDT.js} +2 -2
- package/dist/{chunk-HBZIN6IQ.js → chunk-PZEC5CQA.js} +2 -2
- package/dist/{chunk-74OZ5KVR.js → chunk-Q75SJ35X.js} +4 -4
- package/dist/{chunk-PC5FFEIY.js → chunk-QFJRB27Q.js} +4 -4
- package/dist/{chunk-6D5WEZ2L.js → chunk-QFVFHIHE.js} +2 -2
- package/dist/{chunk-GBB6XQ56.js → chunk-QGBMCB76.js} +2 -2
- package/dist/{chunk-PODGTNXS.js → chunk-QKIJ6YXZ.js} +4 -4
- package/dist/{chunk-DX527XPL.js → chunk-QWDEOITU.js} +2 -2
- package/dist/{chunk-BJ3J6FTN.js → chunk-R7R3LOKW.js} +40 -23
- package/dist/chunk-R7R3LOKW.js.map +1 -0
- package/dist/{chunk-OLZTGVBT.js → chunk-REMK55JI.js} +4 -4
- package/dist/{chunk-BLT5ZBVL.js → chunk-RRX6ZTNX.js} +2 -2
- package/dist/{chunk-RMSH2I3O.js → chunk-S6YY2WWK.js} +40 -50
- package/dist/chunk-S6YY2WWK.js.map +1 -0
- package/dist/{chunk-FCOEJCUP.js → chunk-TFO6GBW7.js} +2 -2
- package/dist/{chunk-2ZDTGI5V.js → chunk-TLMLEC4F.js} +7 -7
- package/dist/{chunk-VSLUFBMT.js → chunk-TOYEP23N.js} +41 -27
- package/dist/chunk-TOYEP23N.js.map +1 -0
- package/dist/{chunk-FP4R47TM.js → chunk-TW3BXVEU.js} +2 -2
- package/dist/{chunk-QLWBQQW7.js → chunk-TYJR4GOF.js} +10 -2
- package/dist/chunk-TYJR4GOF.js.map +1 -0
- package/dist/{chunk-JD364H3Y.js → chunk-TZ633UZA.js} +6 -5
- package/dist/chunk-TZ633UZA.js.map +1 -0
- package/dist/{chunk-J6UFAMIC.js → chunk-TZDDL3DR.js} +2 -2
- package/dist/{chunk-6IUTT6BK.js → chunk-U2YJCNRU.js} +4 -4
- package/dist/{chunk-KZSKI2R3.js → chunk-U2ZDN2AL.js} +2 -2
- package/dist/{chunk-YFHIESMD.js → chunk-U7Q2Y6WG.js} +2 -2
- package/dist/{chunk-RQDN4BN5.js → chunk-UU3QAKG6.js} +14 -14
- package/dist/{chunk-VJFH2AXT.js → chunk-UVGRRI7N.js} +7 -7
- package/dist/{chunk-7DBFEZRC.js → chunk-VIK3HAUQ.js} +2 -2
- package/dist/chunk-VM3HRSAU.js +79 -0
- package/dist/chunk-VM3HRSAU.js.map +1 -0
- package/dist/{chunk-SOCKK67R.js → chunk-VNDOQEJ7.js} +4 -4
- package/dist/{chunk-J54WH74M.js → chunk-VNNG46TS.js} +5 -5
- package/dist/{chunk-5ZF3VASA.js → chunk-VQAM2XZV.js} +7 -7
- package/dist/{chunk-SEH7KOVG.js → chunk-VXTYVJDK.js} +2 -2
- package/dist/{chunk-37YPZHAG.js → chunk-W4SDVTZC.js} +2 -2
- package/dist/{chunk-X5D3PTWI.js → chunk-W4YWU7LQ.js} +2 -2
- package/dist/{chunk-LKVIZNUM.js → chunk-W7Y6RA6W.js} +8 -8
- package/dist/{chunk-Z4GWXTZV.js → chunk-WGRS4PGY.js} +8 -8
- package/dist/{chunk-NRUYYGDZ.js → chunk-WLQTHPMX.js} +2 -2
- package/dist/{chunk-J2KSG754.js → chunk-WRDPWEIC.js} +5 -5
- package/dist/{chunk-HEG7JIBM.js → chunk-X5MPHXG5.js} +4 -4
- package/dist/{chunk-NFAKRI4S.js → chunk-XELVDPKL.js} +4 -4
- package/dist/{chunk-EPNUVSNK.js → chunk-XFUNJYFT.js} +7 -7
- package/dist/{chunk-7RZ4WOQW.js → chunk-XKV5ZIBG.js} +3 -3
- package/dist/{chunk-F2DOTCF3.js → chunk-XSF6AXEU.js} +2 -2
- package/dist/{chunk-74EZ565M.js → chunk-XT7HMNBW.js} +9 -9
- package/dist/{chunk-PHCSPHDH.js → chunk-XUJG2HFW.js} +3 -3
- package/dist/{chunk-ACDYA5WC.js → chunk-XZTOIEKI.js} +2 -2
- package/dist/{chunk-S5LE2ARG.js → chunk-YANLN6HP.js} +66 -56
- package/dist/chunk-YANLN6HP.js.map +1 -0
- package/dist/{chunk-SKZHOWTS.js → chunk-YDI6IJ6F.js} +2 -2
- package/dist/{chunk-YK2PETUP.js → chunk-YJ4HM25H.js} +2 -2
- package/dist/{chunk-Q4NOI2CR.js → chunk-YQ6TNHAC.js} +4 -4
- package/dist/{chunk-24BUCMQA.js → chunk-YTOYMJPM.js} +2 -2
- package/dist/{chunk-G5ZVD5IJ.js → chunk-ZDWU52DJ.js} +2 -2
- package/dist/{chunk-MY5VNNSP.js → chunk-ZIYMBR7K.js} +8 -8
- package/dist/{chunk-7JWXLDRH.js → chunk-ZKR5B6YJ.js} +4 -4
- package/dist/{chunk-4MGFUPQT.js → chunk-ZOUWHGV3.js} +4 -4
- package/dist/{chunk-UMDXGIRZ.js → chunk-ZZOOSKSV.js} +2 -2
- package/dist/data-display/Alert.js +2 -2
- package/dist/data-display/AsyncStateContainer.js +8 -8
- package/dist/data-display/Badge.js +2 -2
- package/dist/data-display/CardKit.js +10 -10
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +11 -11
- package/dist/data-display/DataGrid.js +3 -3
- package/dist/data-display/DataViews.js +90 -81
- package/dist/data-display/DescriptionItem.js +3 -3
- package/dist/data-display/EmptyState.js +3 -3
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/HoverCard.js +3 -3
- package/dist/data-display/LazyImage.js +4 -4
- package/dist/data-display/Lightbox.js +5 -5
- package/dist/data-display/LoadingState.js +4 -4
- package/dist/data-display/MapPreview.js +4 -4
- package/dist/data-display/Progress.js +2 -2
- package/dist/data-display/SectionOnboarding.js +4 -4
- package/dist/data-display/Sheet.js +4 -4
- package/dist/data-display/StatCard.js +4 -4
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/Dialog.js +6 -2
- package/dist/feedback/Modal.js +2 -2
- package/dist/feedback/StackedModal.js +2 -2
- package/dist/form/AddressAutocomplete.js +11 -9
- package/dist/form/Button.js +2 -2
- package/dist/form/CategorySelect.js +13 -11
- package/dist/form/CepField.js +10 -4
- package/dist/form/Checkbox.js +9 -2
- package/dist/form/CodeEditor.js +5 -3
- package/dist/form/CreatableSelect.js +4 -2
- package/dist/form/DateRangePicker.js +3 -3
- package/dist/form/Input.js +9 -3
- package/dist/form/InputOTP.js +5 -3
- package/dist/form/Label.js +2 -2
- package/dist/form/Menubar.js +2 -2
- package/dist/form/PhoneInput.js +4 -2
- package/dist/form/RadioGroup.js +6 -4
- package/dist/form/RichTextEditor.js +4 -2
- package/dist/form/Select.js +10 -2
- package/dist/form/Switch.js +9 -3
- package/dist/form/Textarea.js +5 -3
- package/dist/form/Toggle.js +5 -3
- package/dist/form/total-form.js +37 -32
- package/dist/icons.js +3 -3
- package/dist/layout/Box.js +2 -2
- package/dist/layout/Card.js +6 -3
- package/dist/layout/Container.js +2 -2
- package/dist/layout/ContentToolbar.js +9 -9
- package/dist/layout/ScrollArea.js +3 -3
- package/dist/layout/Skeleton.js +3 -3
- package/dist/layout/Spacer.js +2 -2
- package/dist/layout/Stack.js +3 -3
- package/dist/native/chunks/{chunk-HSIND52T.js → chunk-2UFNPDYT.js} +2 -1
- package/dist/native/chunks/chunk-2UFNPDYT.js.map +1 -0
- package/dist/native/chunks/{chunk-EKKNUEA6.js → chunk-75JQYVDZ.js} +3 -3
- package/dist/native/chunks/chunk-7LTVGW23.js +351 -0
- package/dist/native/chunks/chunk-7LTVGW23.js.map +1 -0
- package/dist/native/chunks/{chunk-M4DTJDWU.js → chunk-AR5O4BEY.js} +6 -2
- package/dist/native/chunks/chunk-AR5O4BEY.js.map +1 -0
- package/dist/native/chunks/{chunk-UKCCYP52.js → chunk-ATS7STZJ.js} +4 -4
- package/dist/native/chunks/{chunk-YTHR4Y5P.js → chunk-GWGIWQO7.js} +2 -2
- package/dist/native/chunks/{chunk-P3PL4WBO.js → chunk-LEMMXZFN.js} +24 -24
- package/dist/native/chunks/{chunk-P3PL4WBO.js.map → chunk-LEMMXZFN.js.map} +1 -1
- package/dist/native/chunks/chunk-NRN37A5K.js +67 -0
- package/dist/native/chunks/chunk-NRN37A5K.js.map +1 -0
- package/dist/native/chunks/chunk-OXHZDFJZ.js +15 -0
- package/dist/native/chunks/chunk-OXHZDFJZ.js.map +1 -0
- package/dist/native/chunks/{chunk-Q52IDAF2.js → chunk-QYUD3S6F.js} +9 -5
- package/dist/native/chunks/chunk-QYUD3S6F.js.map +1 -0
- package/dist/native/chunks/chunk-T6BJPP3E.js +26 -0
- package/dist/native/chunks/chunk-T6BJPP3E.js.map +1 -0
- package/dist/native/data-display/Alert.js +9 -9
- package/dist/native/data-display/Avatar.js +7 -7
- package/dist/native/data-display/Badge.js +9 -9
- package/dist/native/data-display/Chip.js +4 -4
- package/dist/native/data-display/EmptyState.js +12 -12
- package/dist/native/data-display/ErrorState.js +12 -12
- package/dist/native/data-display/LoadingState.js +7 -7
- package/dist/native/data-display/Progress.js +3 -3
- package/dist/native/feedback/Dialog.js +496 -0
- package/dist/native/feedback/Dialog.js.map +1 -0
- package/dist/native/form/Button.js +4 -4
- package/dist/native/form/Checkbox.js +233 -0
- package/dist/native/form/Checkbox.js.map +1 -0
- package/dist/native/form/Input.js +233 -0
- package/dist/native/form/Input.js.map +1 -0
- package/dist/native/form/Select.js +348 -0
- package/dist/native/form/Select.js.map +1 -0
- package/dist/native/form/Switch.js +511 -0
- package/dist/native/form/Switch.js.map +1 -0
- package/dist/native/icons.js +4 -4
- package/dist/native/layout/Box.js +4 -4
- package/dist/native/layout/Card.js +494 -0
- package/dist/native/layout/Card.js.map +1 -0
- package/dist/native/layout/Container.js +3 -3
- package/dist/native/layout/Skeleton.js +6 -6
- package/dist/native/layout/Spacer.js +3 -3
- package/dist/native/layout/Stack.js +4 -4
- package/dist/native/provider.js +2 -2
- package/dist/native/tokens.js +1 -1
- package/dist/native/typography/Heading.js +3 -3
- package/dist/native/typography/Paragraph.js +3 -3
- package/dist/native/typography/Text.js +3 -3
- package/dist/navigation/AppHeader.js +12 -9
- package/dist/navigation/CommandPalette.js +3 -3
- package/dist/navigation/NavigationMenu.js +5 -5
- package/dist/social-login-button.js +10 -8
- package/dist/types/components/feedback/Dialog/Dialog.base.d.ts +64 -0
- package/dist/types/components/feedback/Dialog/Dialog.base.d.ts.map +1 -0
- package/dist/types/components/feedback/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/Dialog.helpers.d.ts +35 -0
- package/dist/types/components/feedback/Dialog/Dialog.helpers.d.ts.map +1 -0
- package/dist/types/components/feedback/Dialog/Dialog.metrics.d.ts +133 -0
- package/dist/types/components/feedback/Dialog/Dialog.metrics.d.ts.map +1 -0
- package/dist/types/components/feedback/Dialog/Dialog.styles.d.ts +4 -4
- package/dist/types/components/feedback/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/Dialog.types.d.ts +8 -41
- package/dist/types/components/feedback/Dialog/Dialog.types.d.ts.map +1 -1
- package/dist/types/components/feedback/Dialog/index.d.ts +1 -1
- package/dist/types/components/feedback/Dialog/index.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/Checkbox.base.d.ts +36 -0
- package/dist/types/components/form/Checkbox/Checkbox.base.d.ts.map +1 -0
- package/dist/types/components/form/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/Checkbox.helpers.d.ts +9 -3
- package/dist/types/components/form/Checkbox/Checkbox.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/Checkbox.metrics.d.ts +92 -0
- package/dist/types/components/form/Checkbox/Checkbox.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Checkbox/Checkbox.types.d.ts +8 -10
- package/dist/types/components/form/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/index.d.ts +1 -1
- package/dist/types/components/form/Checkbox/index.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.base.d.ts +62 -0
- package/dist/types/components/form/Input/Input.base.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.helpers.d.ts +11 -0
- package/dist/types/components/form/Input/Input.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.metrics.d.ts +186 -0
- package/dist/types/components/form/Input/Input.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.styles.d.ts +1 -35
- package/dist/types/components/form/Input/Input.styles.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.types.d.ts +12 -17
- package/dist/types/components/form/Input/Input.types.d.ts.map +1 -1
- package/dist/types/components/form/Input/index.d.ts +1 -1
- package/dist/types/components/form/Input/index.d.ts.map +1 -1
- package/dist/types/components/form/Select/Select.base.d.ts +75 -0
- package/dist/types/components/form/Select/Select.base.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.d.ts.map +1 -1
- package/dist/types/components/form/Select/Select.helpers.d.ts +36 -0
- package/dist/types/components/form/Select/Select.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.metrics.d.ts +72 -0
- package/dist/types/components/form/Select/Select.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.types.d.ts +12 -49
- package/dist/types/components/form/Select/Select.types.d.ts.map +1 -1
- package/dist/types/components/form/Select/index.d.ts +1 -1
- package/dist/types/components/form/Select/index.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.base.d.ts +111 -0
- package/dist/types/components/form/Switch/Switch.base.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.helpers.d.ts +17 -0
- package/dist/types/components/form/Switch/Switch.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts +194 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.parts.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.styles.d.ts +5 -3
- package/dist/types/components/form/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.types.d.ts +9 -91
- package/dist/types/components/form/Switch/Switch.types.d.ts.map +1 -1
- package/dist/types/components/form/Switch/index.d.ts +1 -1
- package/dist/types/components/form/Switch/index.d.ts.map +1 -1
- package/dist/types/components/layout/Card/Card.base.d.ts +77 -0
- package/dist/types/components/layout/Card/Card.base.d.ts.map +1 -0
- package/dist/types/components/layout/Card/Card.d.ts.map +1 -1
- package/dist/types/components/layout/Card/Card.helpers.d.ts +8 -3
- package/dist/types/components/layout/Card/Card.helpers.d.ts.map +1 -1
- package/dist/types/components/layout/Card/Card.metrics.d.ts +182 -0
- package/dist/types/components/layout/Card/Card.metrics.d.ts.map +1 -0
- package/dist/types/components/layout/Card/Card.styles.d.ts +2 -2
- package/dist/types/components/layout/Card/Card.styles.d.ts.map +1 -1
- package/dist/types/components/layout/Card/Card.types.d.ts +10 -44
- package/dist/types/components/layout/Card/Card.types.d.ts.map +1 -1
- package/dist/types/components/layout/Card/index.d.ts +1 -1
- package/dist/types/components/layout/Card/index.d.ts.map +1 -1
- package/dist/types/icons/paths.generated.d.ts +4 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -1
- package/dist/types/platform/aria.d.ts +59 -1
- package/dist/types/platform/aria.d.ts.map +1 -1
- package/dist/types/platform/test-id.d.ts +24 -0
- package/dist/types/platform/test-id.d.ts.map +1 -1
- package/dist/types/tokens/field-edge.core.d.ts +27 -0
- package/dist/types/tokens/field-edge.core.d.ts.map +1 -0
- package/dist/types/tokens/field-edge.d.ts +8 -9
- package/dist/types/tokens/field-edge.d.ts.map +1 -1
- package/dist/types/tokens/mui-type.d.ts +1 -1
- package/dist/types/tokens/mui-type.d.ts.map +1 -1
- package/dist/types/tokens/shadow.d.ts +40 -0
- package/dist/types/tokens/shadow.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.base.d.ts +64 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.base.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.helpers.d.ts +35 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.helpers.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.look.native.d.ts +44 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.look.native.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.metrics.d.ts +133 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.metrics.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.native.d.ts +8 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.native.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.types.native.d.ts +25 -0
- package/dist/types-native/components/feedback/Dialog/Dialog.types.native.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/DialogParts.native.d.ts +39 -0
- package/dist/types-native/components/feedback/Dialog/DialogParts.native.d.ts.map +1 -0
- package/dist/types-native/components/feedback/Dialog/index.native.d.ts +4 -0
- package/dist/types-native/components/feedback/Dialog/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.base.d.ts +36 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.helpers.d.ts +13 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.metrics.d.ts +92 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.native.d.ts +21 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.types.native.d.ts +27 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Checkbox/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.base.d.ts +62 -0
- package/dist/types-native/components/form/Input/Input.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.helpers.d.ts +11 -0
- package/dist/types-native/components/form/Input/Input.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.look.native.d.ts +61 -0
- package/dist/types-native/components/form/Input/Input.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.metrics.d.ts +186 -0
- package/dist/types-native/components/form/Input/Input.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.native.d.ts +22 -0
- package/dist/types-native/components/form/Input/Input.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.types.native.d.ts +20 -0
- package/dist/types-native/components/form/Input/Input.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Input/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.base.d.ts +75 -0
- package/dist/types-native/components/form/Select/Select.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.helpers.d.ts +36 -0
- package/dist/types-native/components/form/Select/Select.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.look.native.d.ts +26 -0
- package/dist/types-native/components/form/Select/Select.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.metrics.d.ts +72 -0
- package/dist/types-native/components/form/Select/Select.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.native.d.ts +21 -0
- package/dist/types-native/components/form/Select/Select.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.types.native.d.ts +29 -0
- package/dist/types-native/components/form/Select/Select.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Select/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.base.d.ts +111 -0
- package/dist/types-native/components/form/Switch/Switch.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.helpers.d.ts +17 -0
- package/dist/types-native/components/form/Switch/Switch.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts +43 -0
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts +194 -0
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.native.d.ts +20 -0
- package/dist/types-native/components/form/Switch/Switch.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.types.native.d.ts +27 -0
- package/dist/types-native/components/form/Switch/Switch.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Switch/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/field-pulse.native.d.ts +18 -0
- package/dist/types-native/components/form/field-pulse.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.base.d.ts +77 -0
- package/dist/types-native/components/layout/Card/Card.base.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.helpers.d.ts +11 -0
- package/dist/types-native/components/layout/Card/Card.helpers.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.look.native.d.ts +57 -0
- package/dist/types-native/components/layout/Card/Card.look.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.metrics.d.ts +182 -0
- package/dist/types-native/components/layout/Card/Card.metrics.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.native.d.ts +11 -0
- package/dist/types-native/components/layout/Card/Card.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/Card.types.native.d.ts +28 -0
- package/dist/types-native/components/layout/Card/Card.types.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/CardParts.native.d.ts +55 -0
- package/dist/types-native/components/layout/Card/CardParts.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Card/index.native.d.ts +4 -0
- package/dist/types-native/components/layout/Card/index.native.d.ts.map +1 -0
- package/dist/types-native/icons/paths.generated.d.ts +4 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -1
- package/dist/types-native/platform/aria.d.ts +59 -1
- package/dist/types-native/platform/aria.d.ts.map +1 -1
- package/dist/types-native/platform/pulse-ring.native.d.ts +35 -0
- package/dist/types-native/platform/pulse-ring.native.d.ts.map +1 -0
- package/dist/types-native/platform/test-id.d.ts +24 -0
- package/dist/types-native/platform/test-id.d.ts.map +1 -1
- package/dist/types-native/tokens/field-edge.core.d.ts +27 -0
- package/dist/types-native/tokens/field-edge.core.d.ts.map +1 -0
- package/dist/types-native/tokens/mui-type.d.ts +1 -1
- package/dist/types-native/tokens/mui-type.d.ts.map +1 -1
- package/dist/types-native/tokens/shadow.d.ts +40 -0
- package/dist/types-native/tokens/shadow.d.ts.map +1 -0
- package/dist/types-native/utils/withDefaults.d.ts +13 -0
- package/dist/types-native/utils/withDefaults.d.ts.map +1 -0
- package/dist/typography/Heading.js +2 -2
- package/dist/typography/Paragraph.js +2 -2
- package/dist/typography/Text.js +2 -2
- package/dist/user-avatar.js +9 -7
- package/dist/utility/InstallPrompt.js +2 -2
- package/package.json +25 -1
- package/src/components/data-display/CardKit/NATIVE-NOTES.md +48 -0
- package/src/components/feedback/Dialog/Dialog.base.ts +69 -0
- package/src/components/feedback/Dialog/Dialog.helpers.ts +75 -0
- package/src/components/feedback/Dialog/Dialog.look.native.ts +159 -0
- package/src/components/feedback/Dialog/Dialog.metrics.ts +140 -0
- package/src/components/feedback/Dialog/Dialog.native.tsx +149 -0
- package/src/components/feedback/Dialog/Dialog.styles.ts +63 -41
- package/src/components/feedback/Dialog/Dialog.tsx +58 -74
- package/src/components/feedback/Dialog/Dialog.types.native.ts +46 -0
- package/src/components/feedback/Dialog/Dialog.types.ts +24 -41
- package/src/components/feedback/Dialog/DialogParts.native.tsx +257 -0
- package/src/components/feedback/Dialog/NATIVE-NOTES.md +16 -0
- package/src/components/feedback/Dialog/index.native.ts +16 -0
- package/src/components/feedback/Dialog/index.ts +8 -2
- package/src/components/form/Checkbox/Checkbox.base.ts +36 -0
- package/src/components/form/Checkbox/Checkbox.helpers.ts +13 -13
- package/src/components/form/Checkbox/Checkbox.metrics.ts +73 -0
- package/src/components/form/Checkbox/Checkbox.native.tsx +246 -0
- package/src/components/form/Checkbox/Checkbox.tsx +34 -21
- package/src/components/form/Checkbox/Checkbox.types.native.ts +29 -0
- package/src/components/form/Checkbox/Checkbox.types.ts +12 -11
- package/src/components/form/Checkbox/NATIVE-NOTES.md +11 -0
- package/src/components/form/Checkbox/index.native.ts +8 -0
- package/src/components/form/Checkbox/index.ts +1 -1
- package/src/components/form/Input/Input.base.ts +84 -0
- package/src/components/form/Input/Input.helpers.ts +43 -0
- package/src/components/form/Input/Input.look.native.ts +246 -0
- package/src/components/form/Input/Input.metrics.ts +229 -0
- package/src/components/form/Input/Input.native.tsx +240 -0
- package/src/components/form/Input/Input.styles.ts +45 -51
- package/src/components/form/Input/Input.tsx +46 -42
- package/src/components/form/Input/Input.types.native.ts +29 -0
- package/src/components/form/Input/Input.types.ts +15 -17
- package/src/components/form/Input/NATIVE-NOTES.md +14 -0
- package/src/components/form/Input/index.native.ts +2 -0
- package/src/components/form/Input/index.ts +1 -1
- package/src/components/form/Select/NATIVE-NOTES.md +12 -0
- package/src/components/form/Select/Select.base.ts +78 -0
- package/src/components/form/Select/Select.helpers.ts +82 -0
- package/src/components/form/Select/Select.look.native.ts +99 -0
- package/src/components/form/Select/Select.metrics.ts +90 -0
- package/src/components/form/Select/Select.native.tsx +264 -0
- package/src/components/form/Select/Select.tsx +37 -25
- package/src/components/form/Select/Select.types.native.ts +30 -0
- package/src/components/form/Select/Select.types.ts +14 -51
- package/src/components/form/Select/index.native.ts +9 -0
- package/src/components/form/Select/index.ts +7 -1
- package/src/components/form/Switch/NATIVE-NOTES.md +12 -0
- package/src/components/form/Switch/Switch.base.ts +136 -0
- package/src/components/form/Switch/Switch.helpers.ts +61 -0
- package/src/components/form/Switch/Switch.look.native.ts +187 -0
- package/src/components/form/Switch/Switch.metrics.ts +191 -0
- package/src/components/form/Switch/Switch.native.tsx +360 -0
- package/src/components/form/Switch/Switch.parts.tsx +4 -4
- package/src/components/form/Switch/Switch.styles.ts +109 -147
- package/src/components/form/Switch/Switch.tsx +4 -2
- package/src/components/form/Switch/Switch.types.native.ts +34 -0
- package/src/components/form/Switch/Switch.types.ts +16 -117
- package/src/components/form/Switch/index.native.ts +8 -0
- package/src/components/form/Switch/index.ts +6 -1
- package/src/components/form/field-pulse.native.tsx +78 -0
- package/src/components/layout/Card/Card.base.ts +92 -0
- package/src/components/layout/Card/Card.helpers.ts +13 -7
- package/src/components/layout/Card/Card.look.native.ts +204 -0
- package/src/components/layout/Card/Card.metrics.ts +171 -0
- package/src/components/layout/Card/Card.native.tsx +130 -0
- package/src/components/layout/Card/Card.styles.ts +88 -48
- package/src/components/layout/Card/Card.tsx +41 -25
- package/src/components/layout/Card/Card.types.native.ts +59 -0
- package/src/components/layout/Card/Card.types.ts +30 -45
- package/src/components/layout/Card/CardParts.native.tsx +262 -0
- package/src/components/layout/Card/NATIVE-NOTES.md +15 -0
- package/src/components/layout/Card/index.native.ts +18 -0
- package/src/components/layout/Card/index.ts +9 -0
- package/src/icons/glyphs.json +4 -0
- package/src/icons/paths.generated.ts +4 -0
- package/src/platform/aria.ts +72 -1
- package/src/platform/pulse-ring.native.tsx +82 -0
- package/src/platform/test-id.ts +30 -0
- package/src/tokens/field-edge.core.ts +87 -0
- package/src/tokens/field-edge.ts +10 -66
- package/src/tokens/mui-type.ts +2 -1
- package/src/tokens/shadow.ts +59 -0
- package/dist/chunk-6PRA45LC.js.map +0 -1
- package/dist/chunk-BJ3J6FTN.js.map +0 -1
- package/dist/chunk-D2IASECY.js.map +0 -1
- package/dist/chunk-FX5DY6VR.js.map +0 -1
- package/dist/chunk-JD364H3Y.js.map +0 -1
- package/dist/chunk-MLOWPVVW.js.map +0 -1
- package/dist/chunk-OQXOYHIV.js.map +0 -1
- package/dist/chunk-Q5EQC7NL.js.map +0 -1
- package/dist/chunk-QLWBQQW7.js.map +0 -1
- package/dist/chunk-RI5JZLZL.js.map +0 -1
- package/dist/chunk-RMSH2I3O.js.map +0 -1
- package/dist/chunk-S5LE2ARG.js.map +0 -1
- package/dist/chunk-TBWEIQUR.js +0 -263
- package/dist/chunk-TBWEIQUR.js.map +0 -1
- package/dist/chunk-VMF3UXM4.js +0 -137
- package/dist/chunk-VMF3UXM4.js.map +0 -1
- package/dist/chunk-VMNSGE2G.js.map +0 -1
- package/dist/chunk-VSLUFBMT.js.map +0 -1
- package/dist/native/chunks/chunk-4NK5ZQZ3.js +0 -10
- package/dist/native/chunks/chunk-4NK5ZQZ3.js.map +0 -1
- package/dist/native/chunks/chunk-HSIND52T.js.map +0 -1
- package/dist/native/chunks/chunk-M4DTJDWU.js.map +0 -1
- package/dist/native/chunks/chunk-Q52IDAF2.js.map +0 -1
- /package/dist/{chunk-MBYO2F4Y.js.map → chunk-25R3ITGZ.js.map} +0 -0
- /package/dist/{chunk-KQ74QU55.js.map → chunk-2FDBR77W.js.map} +0 -0
- /package/dist/{chunk-D7FJ2GAD.js.map → chunk-2HPP6RVC.js.map} +0 -0
- /package/dist/{chunk-B2A4DG77.js.map → chunk-2MMEIN4T.js.map} +0 -0
- /package/dist/{chunk-YRUCIKPO.js.map → chunk-2UYR2OOE.js.map} +0 -0
- /package/dist/{chunk-2PCOC3PT.js.map → chunk-343TTIHD.js.map} +0 -0
- /package/dist/{chunk-DQHC5P64.js.map → chunk-3FLVIVOK.js.map} +0 -0
- /package/dist/{chunk-URWGRPL7.js.map → chunk-3W7IEWEL.js.map} +0 -0
- /package/dist/{chunk-47UD6DZ4.js.map → chunk-4523RYE7.js.map} +0 -0
- /package/dist/{chunk-AEGX66N7.js.map → chunk-4IVOHL32.js.map} +0 -0
- /package/dist/{chunk-GGE7Y53F.js.map → chunk-4TXIZ5WI.js.map} +0 -0
- /package/dist/{chunk-IJIT5HQP.js.map → chunk-4X4KM4ZB.js.map} +0 -0
- /package/dist/{chunk-M7OHXNLF.js.map → chunk-5NKUYCZD.js.map} +0 -0
- /package/dist/{chunk-C52BELLW.js.map → chunk-5OIH36KX.js.map} +0 -0
- /package/dist/{chunk-LMJBINWN.js.map → chunk-5ZTUP65G.js.map} +0 -0
- /package/dist/{chunk-EX3PSZLV.js.map → chunk-67L7HMEP.js.map} +0 -0
- /package/dist/{chunk-2EKALM6P.js.map → chunk-6JGPPTLX.js.map} +0 -0
- /package/dist/{chunk-LZRURORY.js.map → chunk-6NZTYZP5.js.map} +0 -0
- /package/dist/{chunk-DCEMUZJQ.js.map → chunk-6WIDZGXE.js.map} +0 -0
- /package/dist/{chunk-R7MX5KPJ.js.map → chunk-6YLAVHV4.js.map} +0 -0
- /package/dist/{chunk-RXSGHPCR.js.map → chunk-7FOOLP5H.js.map} +0 -0
- /package/dist/{chunk-DOADQW7I.js.map → chunk-7NSX7A5H.js.map} +0 -0
- /package/dist/{chunk-QZWKC3AP.js.map → chunk-7VN7LFBA.js.map} +0 -0
- /package/dist/{chunk-E4FGKZID.js.map → chunk-AEGXHZQT.js.map} +0 -0
- /package/dist/{chunk-WO52KYSU.js.map → chunk-AGSBIUPV.js.map} +0 -0
- /package/dist/{chunk-PU3AAKRR.js.map → chunk-AJ6XEO4E.js.map} +0 -0
- /package/dist/{chunk-7DNQHMDO.js.map → chunk-B6IURHSZ.js.map} +0 -0
- /package/dist/{chunk-WX7VWW3W.js.map → chunk-C3CMEDSO.js.map} +0 -0
- /package/dist/{chunk-HSAH5QUQ.js.map → chunk-CHPZTF34.js.map} +0 -0
- /package/dist/{chunk-7EESF76V.js.map → chunk-CJBBGMIA.js.map} +0 -0
- /package/dist/{chunk-2W4CIWTW.js.map → chunk-DBYFC6CF.js.map} +0 -0
- /package/dist/{chunk-FGLV6BXQ.js.map → chunk-DTC224UJ.js.map} +0 -0
- /package/dist/{chunk-HEK4LQT6.js.map → chunk-DVFIE54C.js.map} +0 -0
- /package/dist/{chunk-4N4ENTF7.js.map → chunk-DW5FRWRQ.js.map} +0 -0
- /package/dist/{chunk-THBT56JE.js.map → chunk-E55CJV65.js.map} +0 -0
- /package/dist/{chunk-B7BZAIHL.js.map → chunk-EOHKZGOZ.js.map} +0 -0
- /package/dist/{chunk-EGRFMPGD.js.map → chunk-EXJBPKGW.js.map} +0 -0
- /package/dist/{chunk-BILE3A7F.js.map → chunk-FGK2C7JR.js.map} +0 -0
- /package/dist/{chunk-OI3HOI74.js.map → chunk-FGUESLDX.js.map} +0 -0
- /package/dist/{chunk-VCTKJHXD.js.map → chunk-FL54G7PV.js.map} +0 -0
- /package/dist/{chunk-HDNK7BAX.js.map → chunk-GT7C6TSM.js.map} +0 -0
- /package/dist/{chunk-V3SBJ3PB.js.map → chunk-HFXTAEYY.js.map} +0 -0
- /package/dist/{chunk-HBAPVB7T.js.map → chunk-HKKSZ7HG.js.map} +0 -0
- /package/dist/{chunk-FOMK3WPG.js.map → chunk-HLYPI5CO.js.map} +0 -0
- /package/dist/{chunk-3AOOI2NR.js.map → chunk-HR7YTBR7.js.map} +0 -0
- /package/dist/{chunk-UNF65XZW.js.map → chunk-I5SBTNV2.js.map} +0 -0
- /package/dist/{chunk-X24P3ZYW.js.map → chunk-J4W4TQPC.js.map} +0 -0
- /package/dist/{chunk-5ZOJLYD2.js.map → chunk-JE6RZ5L6.js.map} +0 -0
- /package/dist/{chunk-NQC6H7GY.js.map → chunk-JIKWZDNK.js.map} +0 -0
- /package/dist/{chunk-ENNW5SKT.js.map → chunk-JSH3HFDQ.js.map} +0 -0
- /package/dist/{chunk-JB7JE4QZ.js.map → chunk-JWW2Z3RH.js.map} +0 -0
- /package/dist/{chunk-LAHDFBDE.js.map → chunk-JXNT5TUP.js.map} +0 -0
- /package/dist/{chunk-ZBNTFWTG.js.map → chunk-KIHQE5YA.js.map} +0 -0
- /package/dist/{chunk-ZEBJT5JZ.js.map → chunk-KTK4A3IF.js.map} +0 -0
- /package/dist/{chunk-4WK2RTVY.js.map → chunk-LS4FMSHY.js.map} +0 -0
- /package/dist/{chunk-PNYXXLPU.js.map → chunk-M4LQRQFL.js.map} +0 -0
- /package/dist/{chunk-Z7JNCB5Q.js.map → chunk-MESRKY67.js.map} +0 -0
- /package/dist/{chunk-VJK5FBNK.js.map → chunk-MP4VSWHK.js.map} +0 -0
- /package/dist/{chunk-6XPNJLXE.js.map → chunk-NARIG5FL.js.map} +0 -0
- /package/dist/{chunk-VEFDL77X.js.map → chunk-NWNSUHEB.js.map} +0 -0
- /package/dist/{chunk-43NEBUV3.js.map → chunk-O3336DJ6.js.map} +0 -0
- /package/dist/{chunk-WBVHRLIS.js.map → chunk-OFOYMZRY.js.map} +0 -0
- /package/dist/{chunk-SM3NRN7L.js.map → chunk-ON2CMKTI.js.map} +0 -0
- /package/dist/{chunk-IH4CX43Q.js.map → chunk-OP65D4UR.js.map} +0 -0
- /package/dist/{chunk-NHSMLVNC.js.map → chunk-OVLNF4AZ.js.map} +0 -0
- /package/dist/{chunk-ZTZ6S5Q6.js.map → chunk-OXQP3N6X.js.map} +0 -0
- /package/dist/{chunk-YVW7VPK4.js.map → chunk-PFLKPNBU.js.map} +0 -0
- /package/dist/{chunk-7P2HZLEG.js.map → chunk-PFV6RL4Q.js.map} +0 -0
- /package/dist/{chunk-76GZ55IC.js.map → chunk-PMS3H3OO.js.map} +0 -0
- /package/dist/{chunk-UF27D35R.js.map → chunk-PRUSQQDT.js.map} +0 -0
- /package/dist/{chunk-HBZIN6IQ.js.map → chunk-PZEC5CQA.js.map} +0 -0
- /package/dist/{chunk-74OZ5KVR.js.map → chunk-Q75SJ35X.js.map} +0 -0
- /package/dist/{chunk-PC5FFEIY.js.map → chunk-QFJRB27Q.js.map} +0 -0
- /package/dist/{chunk-6D5WEZ2L.js.map → chunk-QFVFHIHE.js.map} +0 -0
- /package/dist/{chunk-GBB6XQ56.js.map → chunk-QGBMCB76.js.map} +0 -0
- /package/dist/{chunk-PODGTNXS.js.map → chunk-QKIJ6YXZ.js.map} +0 -0
- /package/dist/{chunk-DX527XPL.js.map → chunk-QWDEOITU.js.map} +0 -0
- /package/dist/{chunk-OLZTGVBT.js.map → chunk-REMK55JI.js.map} +0 -0
- /package/dist/{chunk-BLT5ZBVL.js.map → chunk-RRX6ZTNX.js.map} +0 -0
- /package/dist/{chunk-FCOEJCUP.js.map → chunk-TFO6GBW7.js.map} +0 -0
- /package/dist/{chunk-2ZDTGI5V.js.map → chunk-TLMLEC4F.js.map} +0 -0
- /package/dist/{chunk-FP4R47TM.js.map → chunk-TW3BXVEU.js.map} +0 -0
- /package/dist/{chunk-J6UFAMIC.js.map → chunk-TZDDL3DR.js.map} +0 -0
- /package/dist/{chunk-6IUTT6BK.js.map → chunk-U2YJCNRU.js.map} +0 -0
- /package/dist/{chunk-KZSKI2R3.js.map → chunk-U2ZDN2AL.js.map} +0 -0
- /package/dist/{chunk-YFHIESMD.js.map → chunk-U7Q2Y6WG.js.map} +0 -0
- /package/dist/{chunk-RQDN4BN5.js.map → chunk-UU3QAKG6.js.map} +0 -0
- /package/dist/{chunk-VJFH2AXT.js.map → chunk-UVGRRI7N.js.map} +0 -0
- /package/dist/{chunk-7DBFEZRC.js.map → chunk-VIK3HAUQ.js.map} +0 -0
- /package/dist/{chunk-SOCKK67R.js.map → chunk-VNDOQEJ7.js.map} +0 -0
- /package/dist/{chunk-J54WH74M.js.map → chunk-VNNG46TS.js.map} +0 -0
- /package/dist/{chunk-5ZF3VASA.js.map → chunk-VQAM2XZV.js.map} +0 -0
- /package/dist/{chunk-SEH7KOVG.js.map → chunk-VXTYVJDK.js.map} +0 -0
- /package/dist/{chunk-37YPZHAG.js.map → chunk-W4SDVTZC.js.map} +0 -0
- /package/dist/{chunk-X5D3PTWI.js.map → chunk-W4YWU7LQ.js.map} +0 -0
- /package/dist/{chunk-LKVIZNUM.js.map → chunk-W7Y6RA6W.js.map} +0 -0
- /package/dist/{chunk-Z4GWXTZV.js.map → chunk-WGRS4PGY.js.map} +0 -0
- /package/dist/{chunk-NRUYYGDZ.js.map → chunk-WLQTHPMX.js.map} +0 -0
- /package/dist/{chunk-J2KSG754.js.map → chunk-WRDPWEIC.js.map} +0 -0
- /package/dist/{chunk-HEG7JIBM.js.map → chunk-X5MPHXG5.js.map} +0 -0
- /package/dist/{chunk-NFAKRI4S.js.map → chunk-XELVDPKL.js.map} +0 -0
- /package/dist/{chunk-EPNUVSNK.js.map → chunk-XFUNJYFT.js.map} +0 -0
- /package/dist/{chunk-7RZ4WOQW.js.map → chunk-XKV5ZIBG.js.map} +0 -0
- /package/dist/{chunk-F2DOTCF3.js.map → chunk-XSF6AXEU.js.map} +0 -0
- /package/dist/{chunk-74EZ565M.js.map → chunk-XT7HMNBW.js.map} +0 -0
- /package/dist/{chunk-PHCSPHDH.js.map → chunk-XUJG2HFW.js.map} +0 -0
- /package/dist/{chunk-ACDYA5WC.js.map → chunk-XZTOIEKI.js.map} +0 -0
- /package/dist/{chunk-SKZHOWTS.js.map → chunk-YDI6IJ6F.js.map} +0 -0
- /package/dist/{chunk-YK2PETUP.js.map → chunk-YJ4HM25H.js.map} +0 -0
- /package/dist/{chunk-Q4NOI2CR.js.map → chunk-YQ6TNHAC.js.map} +0 -0
- /package/dist/{chunk-24BUCMQA.js.map → chunk-YTOYMJPM.js.map} +0 -0
- /package/dist/{chunk-G5ZVD5IJ.js.map → chunk-ZDWU52DJ.js.map} +0 -0
- /package/dist/{chunk-MY5VNNSP.js.map → chunk-ZIYMBR7K.js.map} +0 -0
- /package/dist/{chunk-7JWXLDRH.js.map → chunk-ZKR5B6YJ.js.map} +0 -0
- /package/dist/{chunk-4MGFUPQT.js.map → chunk-ZOUWHGV3.js.map} +0 -0
- /package/dist/{chunk-UMDXGIRZ.js.map → chunk-ZZOOSKSV.js.map} +0 -0
- /package/dist/native/chunks/{chunk-EKKNUEA6.js.map → chunk-75JQYVDZ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-UKCCYP52.js.map → chunk-ATS7STZJ.js.map} +0 -0
- /package/dist/native/chunks/{chunk-YTHR4Y5P.js.map → chunk-GWGIWQO7.js.map} +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { SwitchVariant } from './Switch.base';
|
|
2
|
+
import { alpha } from '../../../tokens/color';
|
|
3
|
+
import type { SizeValue } from '../../../tokens/vocabulary';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* THE NUMBERS BOTH `Switch` RENDERERS DRAW WITH.
|
|
7
|
+
*
|
|
8
|
+
* `Switch.styles.ts` (web, emotion over MUI's `Switch`) and
|
|
9
|
+
* `Switch.native.tsx` (React Native, drawing the track and thumb itself) read
|
|
10
|
+
* this one table: the geometry per size, the four looks' radii and shadows,
|
|
11
|
+
* the resting track colours, and the type the label, the description and the
|
|
12
|
+
* helper are set in.
|
|
13
|
+
*
|
|
14
|
+
* Spacing is in SPACING UNITS where the web writes `theme.spacing(n)`;
|
|
15
|
+
* everything else is px, a ratio or an alpha.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** MUI's `palette.common.black`, which `UiTheme` does not carry. */
|
|
19
|
+
export const SWITCH_BLACK = '#000';
|
|
20
|
+
|
|
21
|
+
export interface SwitchGeometry {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
padding: number;
|
|
25
|
+
thumbSize: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const SWITCH_SIZES: Record<SizeValue, SwitchGeometry> = {
|
|
29
|
+
xs: { width: 34, height: 18, padding: 1, thumbSize: 14 },
|
|
30
|
+
sm: { width: 42, height: 22, padding: 1, thumbSize: 18 },
|
|
31
|
+
md: { width: 50, height: 26, padding: 1, thumbSize: 22 },
|
|
32
|
+
lg: { width: 58, height: 30, padding: 2, thumbSize: 24 },
|
|
33
|
+
xl: { width: 66, height: 34, padding: 2, thumbSize: 28 },
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** The four platform looks. `label` prints its wording on a `default` track. */
|
|
37
|
+
export type SwitchLook = 'ios' | 'android' | 'material' | 'default';
|
|
38
|
+
|
|
39
|
+
export const lookOf = (variant?: string): SwitchLook => {
|
|
40
|
+
if (variant === 'ios') return 'ios';
|
|
41
|
+
if (variant === 'android') return 'android';
|
|
42
|
+
if (variant === 'material') return 'material';
|
|
43
|
+
return 'default';
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Track geometry once the caller's overrides and the size preset are combined. */
|
|
47
|
+
export const geometryOf = (size: SizeValue | undefined, width?: number, height?: number): SwitchGeometry => {
|
|
48
|
+
const preset = SWITCH_SIZES[size as SizeValue] ?? SWITCH_SIZES.md;
|
|
49
|
+
return { ...preset, width: width || preset.width, height: height || preset.height };
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The thumb's corner. `'50%'` is what the web emits; a renderer with no
|
|
54
|
+
* percentage radius asks {@link thumbRadius} for the px instead.
|
|
55
|
+
*/
|
|
56
|
+
export const THUMB_RADIUS: Record<SwitchLook, (thumbSize: number) => number | string> = {
|
|
57
|
+
ios: () => '50%',
|
|
58
|
+
android: () => 4,
|
|
59
|
+
material: (thumbSize) => thumbSize / 3,
|
|
60
|
+
default: () => '50%',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const TRACK_RADIUS: Record<SwitchLook, (height: number) => number> = {
|
|
64
|
+
ios: (height) => height / 2,
|
|
65
|
+
android: (height) => height / 3,
|
|
66
|
+
material: (height) => height / 2.5,
|
|
67
|
+
default: (height) => height / 2,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** The web's `'50%'` as the px a circle of this size needs. */
|
|
71
|
+
export const thumbRadius = (look: SwitchLook, thumbSize: number): number => {
|
|
72
|
+
const radius = THUMB_RADIUS[look](thumbSize);
|
|
73
|
+
return typeof radius === 'number' ? radius : thumbSize / 2;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The elevation the thumb rests at per look — an INDEX into `theme.shadows`,
|
|
78
|
+
* not the shadow itself, so a host that re-themes MUI's elevations keeps
|
|
79
|
+
* moving the web. {@link MUI_SHADOWS} carries MUI's own values for the native
|
|
80
|
+
* side, which has no `theme.shadows` to read.
|
|
81
|
+
*/
|
|
82
|
+
export const THUMB_ELEVATION: Record<SwitchLook, number> = { ios: 0, android: 3, material: 2, default: 2 };
|
|
83
|
+
|
|
84
|
+
export const MUI_SHADOWS: Record<number, string> = {
|
|
85
|
+
2: '0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12)',
|
|
86
|
+
3: '0px 3px 3px -2px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 1px 8px 0px rgba(0,0,0,0.12)',
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** The iOS thumb's own three-layer shadow, which the web writes out literally. */
|
|
90
|
+
export const IOS_THUMB_SHADOW = `0 3px 1px 0 ${alpha(SWITCH_BLACK, 0.04)}, 0 3px 8px 0 ${alpha(SWITCH_BLACK, 0.12)}, 0 1px 0 0 ${alpha(SWITCH_BLACK, 0.08)}`;
|
|
91
|
+
|
|
92
|
+
/** The iOS track's inset hairline. */
|
|
93
|
+
export const iosTrackShadow = (): string =>
|
|
94
|
+
`inset 0 0 0 0.5px ${alpha(SWITCH_BLACK, 0.1)}, inset 0 2px 3px ${alpha(SWITCH_BLACK, 0.12)}`;
|
|
95
|
+
|
|
96
|
+
/** The resting track: a black wash on iOS, the disabled ink elsewhere. */
|
|
97
|
+
export const TRACK_ALPHA = { ios: 0.1, android: 0.2, other: 0.3 } as const;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* `black` is MUI's `palette.common.black` on the web and {@link SWITCH_BLACK}
|
|
101
|
+
* on native, whose theme has no `common` — the same `#000` either way, passed
|
|
102
|
+
* in rather than assumed so a host that themes it still moves the web.
|
|
103
|
+
*/
|
|
104
|
+
export const trackColor = (ink: { black: string; disabled: string }, look: SwitchLook): string => {
|
|
105
|
+
if (look === 'ios') return alpha(ink.black, TRACK_ALPHA.ios);
|
|
106
|
+
const strength = look === 'android' ? TRACK_ALPHA.android : TRACK_ALPHA.other;
|
|
107
|
+
return alpha(ink.disabled, strength);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** How far the thumb travels, and where it starts. iOS insets differently. */
|
|
111
|
+
export const thumbTravel = (look: SwitchLook, geometry: SwitchGeometry): { rest: number; travel: number } => {
|
|
112
|
+
const { width, thumbSize, padding } = geometry;
|
|
113
|
+
if (look === 'ios') {
|
|
114
|
+
// The web nudges the whole switch base 2px right and shortens the trip.
|
|
115
|
+
return { rest: padding + IOS_BASE_OFFSET, travel: width - thumbSize - IOS_TRAVEL_INSET };
|
|
116
|
+
}
|
|
117
|
+
return { rest: padding, travel: width - thumbSize - padding * 2 };
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export const IOS_BASE_OFFSET = 2;
|
|
121
|
+
export const IOS_TRAVEL_INSET = 4;
|
|
122
|
+
|
|
123
|
+
/** MUI's 300ms `cubic-bezier(0.4, 0, 0.2, 1)`, on everything the switch moves. */
|
|
124
|
+
export const SWITCH_TRANSITION = { ms: 300, easing: 'cubic-bezier(0.4, 0, 0.2, 1)' } as const;
|
|
125
|
+
|
|
126
|
+
/** The disabled treatment: the thumb greys and the track fades. */
|
|
127
|
+
export const DISABLED = { trackOpacity: 0.3, checkedTrackOpacity: 0.5, thumbGrey: 100 } as const;
|
|
128
|
+
|
|
129
|
+
/** `glass`: a paper wash under a blur, inside a faint divider hairline. */
|
|
130
|
+
export const SWITCH_GLASS = {
|
|
131
|
+
trackAlpha: 0.1,
|
|
132
|
+
thumbAlpha: 0.9,
|
|
133
|
+
borderAlpha: 0.2,
|
|
134
|
+
trackBlur: 20,
|
|
135
|
+
thumbBlur: 10,
|
|
136
|
+
} as const;
|
|
137
|
+
|
|
138
|
+
/** `gradient`: the checked track runs light → main → dark; the resting one is fainter. */
|
|
139
|
+
export const SWITCH_GRADIENT = {
|
|
140
|
+
checked: { angleDeg: 90, stops: [0, 50, 100] },
|
|
141
|
+
resting: { angleDeg: 135, lightAlpha: 0.3, mainAlpha: 0.2 },
|
|
142
|
+
shimmerMs: 3000,
|
|
143
|
+
} as const;
|
|
144
|
+
|
|
145
|
+
/** `glow`: a halo of the hue around the checked track, breathing every two seconds. */
|
|
146
|
+
export const SWITCH_GLOW = { blur: 10, alpha: 0.6, insetBlur: 10, insetAlpha: 0.2, ms: 2000 } as const;
|
|
147
|
+
|
|
148
|
+
/** `pulse`: the thumb breathes; `ripple`: a wash of the hue expands under the pointer. */
|
|
149
|
+
export const SWITCH_PULSE = { ms: 2000, minOpacity: 0.7, minScale: 0.95 } as const;
|
|
150
|
+
export const SWITCH_RIPPLE = { alpha: 0.2, ms: 600, scale: 2 } as const;
|
|
151
|
+
|
|
152
|
+
/** `loading`: a 2px ring inside the thumb, turning once a second. */
|
|
153
|
+
export const SWITCH_SPINNER = { sizeRatio: 0.6, borderWidth: 2, ms: 1000 } as const;
|
|
154
|
+
|
|
155
|
+
/** The two icons overlaid on the track, at their own size per step of the scale. */
|
|
156
|
+
export const SWITCH_ICON_SIZES: Record<SizeValue, number> = { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 };
|
|
157
|
+
/** Where a shown icon sits, and how small a hidden one is drawn. */
|
|
158
|
+
export const SWITCH_ICON = { inset: 4, hiddenScale: 0.8 } as const;
|
|
159
|
+
|
|
160
|
+
/** The wording the `label` variant prints inside the track: 0.75rem at 500, 8px in. */
|
|
161
|
+
export const TRACK_LABEL = { fontSize: 12, fontWeight: 500, insetUnits: 1 } as const;
|
|
162
|
+
|
|
163
|
+
/** MUI's `body2` for the label, `caption` for the description and the helper text. */
|
|
164
|
+
export const SWITCH_LABEL = { fontSize: 14, lineHeight: 1.43, fontWeight: 500 } as const;
|
|
165
|
+
export const SWITCH_DESCRIPTION = { fontSize: 12, lineHeight: 1.66, marginTopUnits: 0.5 } as const;
|
|
166
|
+
export const SWITCH_HELPER = { fontSize: 12, lineHeight: 1.66, marginTopUnits: 1 } as const;
|
|
167
|
+
|
|
168
|
+
/** The label row: 16px from the control beside it, 8px above or below it. */
|
|
169
|
+
export const LABEL_GAP_UNITS = { beside: 2, stacked: 1 } as const;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* `neutral`'s three greys, and the literals the web falls back to for a theme
|
|
173
|
+
* whose grey ramp omits a step. Same three steps `Button` draws its neutral
|
|
174
|
+
* from.
|
|
175
|
+
*/
|
|
176
|
+
export const NEUTRAL_GREY = { main: 700, dark: 800, light: 500 } as const;
|
|
177
|
+
export const NEUTRAL_FALLBACK = { main: '#616161', dark: '#424242', light: '#9e9e9e' } as const;
|
|
178
|
+
export const NEUTRAL_CONTRAST = '#fff';
|
|
179
|
+
|
|
180
|
+
/** Hover: the thumb lifts a shade and takes a halo of the hue. */
|
|
181
|
+
export const SWITCH_HOVER = { thumbScale: 1.05, elevation: 4, blur: 12, alpha: 0.2 } as const;
|
|
182
|
+
|
|
183
|
+
/** Focus: MUI rings the thumb rather than moving it. */
|
|
184
|
+
export const SWITCH_FOCUS_RING = { width: 6, alpha: 0.2 } as const;
|
|
185
|
+
|
|
186
|
+
/** A duration as the CSS the web has always emitted: `2000` → `2s`. */
|
|
187
|
+
export const seconds = (ms: number): string => `${ms / 1000}s`;
|
|
188
|
+
|
|
189
|
+
/** Whether this variant prints its wording inside the track. */
|
|
190
|
+
export const showsTrackLabels = (variant: SwitchVariant | undefined, onText?: string, offText?: string): boolean =>
|
|
191
|
+
variant === 'label' && Boolean(onText ?? offText);
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ActivityIndicator,
|
|
4
|
+
Animated,
|
|
5
|
+
Easing,
|
|
6
|
+
Platform,
|
|
7
|
+
Pressable,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
Text as RNText,
|
|
10
|
+
View,
|
|
11
|
+
type GestureResponderEvent,
|
|
12
|
+
type ViewStyle,
|
|
13
|
+
} from 'react-native';
|
|
14
|
+
|
|
15
|
+
import { resolveSwitchProps, withoutSwitchProps, type ResolvedSwitchProps } from './Switch.helpers';
|
|
16
|
+
import {
|
|
17
|
+
descriptionTextStyle,
|
|
18
|
+
helperTextStyle,
|
|
19
|
+
labelTextStyle,
|
|
20
|
+
switchPalette,
|
|
21
|
+
thumbStyle,
|
|
22
|
+
trackStyle,
|
|
23
|
+
type SwitchPaint,
|
|
24
|
+
type SwitchState,
|
|
25
|
+
} from './Switch.look.native';
|
|
26
|
+
import {
|
|
27
|
+
LABEL_GAP_UNITS,
|
|
28
|
+
SWITCH_ICON,
|
|
29
|
+
SWITCH_ICON_SIZES,
|
|
30
|
+
SWITCH_PULSE,
|
|
31
|
+
SWITCH_SPINNER,
|
|
32
|
+
SWITCH_TRANSITION,
|
|
33
|
+
TRACK_LABEL,
|
|
34
|
+
geometryOf,
|
|
35
|
+
lookOf,
|
|
36
|
+
showsTrackLabels,
|
|
37
|
+
thumbTravel,
|
|
38
|
+
type SwitchGeometry,
|
|
39
|
+
} from './Switch.metrics';
|
|
40
|
+
import type { SwitchProps } from './Switch.types.native';
|
|
41
|
+
import { webKeyDown } from '../../../platform/aria';
|
|
42
|
+
import { childTestId, resolveTestId } from '../../../platform/test-id';
|
|
43
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
44
|
+
import type { UiTheme } from '../../../tokens/theme';
|
|
45
|
+
|
|
46
|
+
const nativeDriver = Platform.OS !== 'web';
|
|
47
|
+
|
|
48
|
+
/** The web writes the `on` wording in white, whatever the hue behind it. */
|
|
49
|
+
const TRACK_LABEL_ON_INK = '#fff';
|
|
50
|
+
|
|
51
|
+
/** A 0→1 value that follows `on`, over MUI's 300ms curve unless animation is off. */
|
|
52
|
+
function useProgress(on: boolean, animated: boolean): Animated.Value {
|
|
53
|
+
const progress = React.useRef(new Animated.Value(on ? 1 : 0)).current;
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
const timing = Animated.timing(progress, {
|
|
56
|
+
toValue: on ? 1 : 0,
|
|
57
|
+
duration: animated ? SWITCH_TRANSITION.ms : 0,
|
|
58
|
+
easing: Easing.bezier(0.4, 0, 0.2, 1),
|
|
59
|
+
useNativeDriver: nativeDriver,
|
|
60
|
+
});
|
|
61
|
+
timing.start();
|
|
62
|
+
return () => timing.stop();
|
|
63
|
+
}, [on, animated, progress]);
|
|
64
|
+
return progress;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** The web's `pulseAnimation` on the thumb: it breathes to 0.7 and 0.95 and back. */
|
|
68
|
+
function usePulse(enabled: boolean): { opacity?: Animated.AnimatedInterpolation<number>; scale?: Animated.AnimatedInterpolation<number> } {
|
|
69
|
+
const progress = React.useRef(new Animated.Value(0)).current;
|
|
70
|
+
React.useEffect(() => {
|
|
71
|
+
if (!enabled) return undefined;
|
|
72
|
+
const loop = Animated.loop(
|
|
73
|
+
Animated.timing(progress, {
|
|
74
|
+
toValue: 1,
|
|
75
|
+
duration: SWITCH_PULSE.ms,
|
|
76
|
+
easing: Easing.inOut(Easing.ease),
|
|
77
|
+
useNativeDriver: nativeDriver,
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
loop.start();
|
|
81
|
+
return () => loop.stop();
|
|
82
|
+
}, [enabled, progress]);
|
|
83
|
+
if (!enabled) return {};
|
|
84
|
+
return {
|
|
85
|
+
opacity: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [1, SWITCH_PULSE.minOpacity, 1] }),
|
|
86
|
+
scale: progress.interpolate({ inputRange: [0, 0.5, 1], outputRange: [1, SWITCH_PULSE.minScale, 1] }),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** The wording the `label` variant prints inside the track, both halves at once. */
|
|
91
|
+
function TrackLabels({
|
|
92
|
+
theme,
|
|
93
|
+
onText,
|
|
94
|
+
offText,
|
|
95
|
+
contrastText,
|
|
96
|
+
}: {
|
|
97
|
+
theme: UiTheme;
|
|
98
|
+
onText?: string;
|
|
99
|
+
offText?: string;
|
|
100
|
+
contrastText: string;
|
|
101
|
+
}): React.JSX.Element {
|
|
102
|
+
const inset = theme.spacing(TRACK_LABEL.insetUnits);
|
|
103
|
+
const base = {
|
|
104
|
+
fontFamily: theme.typography.fontFamily,
|
|
105
|
+
fontSize: TRACK_LABEL.fontSize,
|
|
106
|
+
fontWeight: String(TRACK_LABEL.fontWeight) as 'normal',
|
|
107
|
+
};
|
|
108
|
+
return (
|
|
109
|
+
<View style={styles.trackLabels}>
|
|
110
|
+
<RNText style={[base, { color: contrastText, marginLeft: inset }]}>{onText ?? ''}</RNText>
|
|
111
|
+
<RNText style={[base, { color: theme.palette.text.secondary, marginRight: inset }]}>
|
|
112
|
+
{offText ?? ''}
|
|
113
|
+
</RNText>
|
|
114
|
+
</View>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* One of the two icons overlaid on the track.
|
|
120
|
+
*
|
|
121
|
+
* The web centres a hidden icon on the track and pins a shown one to `left: 4`
|
|
122
|
+
* (or `right: 4`) with a `translate(∓50%)` — which puts half of it outside the
|
|
123
|
+
* track. Same arithmetic here, in px.
|
|
124
|
+
*/
|
|
125
|
+
function SwitchIcon({
|
|
126
|
+
icon,
|
|
127
|
+
shown,
|
|
128
|
+
animated,
|
|
129
|
+
size,
|
|
130
|
+
side,
|
|
131
|
+
width,
|
|
132
|
+
}: {
|
|
133
|
+
icon: React.ReactNode;
|
|
134
|
+
shown: boolean;
|
|
135
|
+
animated: boolean;
|
|
136
|
+
size: number;
|
|
137
|
+
side: 'on' | 'off';
|
|
138
|
+
width: number;
|
|
139
|
+
}): React.JSX.Element {
|
|
140
|
+
const half = size / 2;
|
|
141
|
+
const offset = shown ? SWITCH_ICON.inset - half : width / 2 - half;
|
|
142
|
+
return (
|
|
143
|
+
<View
|
|
144
|
+
style={[
|
|
145
|
+
styles.icon,
|
|
146
|
+
side === 'on' ? { left: offset } : { right: offset },
|
|
147
|
+
{
|
|
148
|
+
width: size,
|
|
149
|
+
height: size,
|
|
150
|
+
opacity: shown ? 1 : 0,
|
|
151
|
+
transform: [{ translateY: -half }, { scale: shown && animated ? 1 : SWITCH_ICON.hiddenScale }],
|
|
152
|
+
},
|
|
153
|
+
]}
|
|
154
|
+
>
|
|
155
|
+
{icon}
|
|
156
|
+
</View>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface ControlProps {
|
|
161
|
+
props: ResolvedSwitchProps;
|
|
162
|
+
theme: UiTheme;
|
|
163
|
+
checked: boolean;
|
|
164
|
+
inactive: boolean;
|
|
165
|
+
onToggle: (event?: GestureResponderEvent) => void;
|
|
166
|
+
rest: Record<string, unknown>;
|
|
167
|
+
testID: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** The track, the thumb, and everything overlaid on them. */
|
|
171
|
+
function SwitchControl({ props, theme, checked, inactive, onToggle, rest, testID }: ControlProps): React.JSX.Element {
|
|
172
|
+
const { variant, color, size, animated, loading, onIcon, offIcon, onText, offText } = props;
|
|
173
|
+
const geometry: SwitchGeometry = geometryOf(size, props.trackWidth, props.trackHeight);
|
|
174
|
+
const look = lookOf(variant);
|
|
175
|
+
const palette = switchPalette(theme, color);
|
|
176
|
+
const state: SwitchState = { checked, disabled: inactive };
|
|
177
|
+
const paint: SwitchPaint = props;
|
|
178
|
+
const { rest: restX, travel } = thumbTravel(look, geometry);
|
|
179
|
+
const progress = useProgress(checked, animated);
|
|
180
|
+
const pulse = usePulse(props.pulse && !loading);
|
|
181
|
+
const iconSize = SWITCH_ICON_SIZES[size];
|
|
182
|
+
|
|
183
|
+
return (
|
|
184
|
+
<Pressable
|
|
185
|
+
testID={testID}
|
|
186
|
+
role="checkbox"
|
|
187
|
+
aria-checked={checked}
|
|
188
|
+
aria-disabled={inactive}
|
|
189
|
+
disabled={inactive}
|
|
190
|
+
onPress={onToggle}
|
|
191
|
+
{...webKeyDown((event) => {
|
|
192
|
+
if (event.key === ' ' || event.key === 'Spacebar') onToggle();
|
|
193
|
+
})}
|
|
194
|
+
style={{ width: geometry.width, height: geometry.height }}
|
|
195
|
+
{...rest}
|
|
196
|
+
>
|
|
197
|
+
<View style={trackStyle(theme, paint, palette, geometry, look, state)} />
|
|
198
|
+
{showsTrackLabels(variant, onText, offText) ? (
|
|
199
|
+
<TrackLabels theme={theme} onText={onText} offText={offText} contrastText={TRACK_LABEL_ON_INK} />
|
|
200
|
+
) : null}
|
|
201
|
+
{onIcon == null ? null : (
|
|
202
|
+
<SwitchIcon icon={onIcon} shown={checked} animated={animated} size={iconSize} side="on" width={geometry.width} />
|
|
203
|
+
)}
|
|
204
|
+
{offIcon == null ? null : (
|
|
205
|
+
<SwitchIcon icon={offIcon} shown={!checked} animated={animated} size={iconSize} side="off" width={geometry.width} />
|
|
206
|
+
)}
|
|
207
|
+
<Animated.View
|
|
208
|
+
style={[
|
|
209
|
+
thumbStyle(theme, paint, geometry, look, state),
|
|
210
|
+
{ top: geometry.padding, left: restX, opacity: pulse.opacity },
|
|
211
|
+
{
|
|
212
|
+
transform: [
|
|
213
|
+
{ translateX: progress.interpolate({ inputRange: [0, 1], outputRange: [0, travel] }) },
|
|
214
|
+
...(pulse.scale === undefined ? [] : [{ scale: pulse.scale }]),
|
|
215
|
+
],
|
|
216
|
+
},
|
|
217
|
+
]}
|
|
218
|
+
>
|
|
219
|
+
{loading ? (
|
|
220
|
+
<ActivityIndicator
|
|
221
|
+
size={geometry.thumbSize * SWITCH_SPINNER.sizeRatio}
|
|
222
|
+
color={palette.main}
|
|
223
|
+
accessibilityLabel="loading"
|
|
224
|
+
/>
|
|
225
|
+
) : null}
|
|
226
|
+
</Animated.View>
|
|
227
|
+
</Pressable>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** The label and its description, in the column beside (or above) the control. */
|
|
232
|
+
function LabelBlock({
|
|
233
|
+
theme,
|
|
234
|
+
label,
|
|
235
|
+
description,
|
|
236
|
+
error,
|
|
237
|
+
testID,
|
|
238
|
+
}: {
|
|
239
|
+
theme: UiTheme;
|
|
240
|
+
label: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
error: boolean;
|
|
243
|
+
testID: string;
|
|
244
|
+
}): React.JSX.Element {
|
|
245
|
+
return (
|
|
246
|
+
<View style={styles.labelBlock}>
|
|
247
|
+
<RNText testID={testID} style={labelTextStyle(theme, error)}>
|
|
248
|
+
{label}
|
|
249
|
+
</RNText>
|
|
250
|
+
{description === undefined ? null : (
|
|
251
|
+
<RNText style={descriptionTextStyle(theme, error)}>{description}</RNText>
|
|
252
|
+
)}
|
|
253
|
+
</View>
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** The row (or column) the label and the control share, per `labelPosition`. */
|
|
258
|
+
function labelRowStyle(theme: UiTheme, position: string): ViewStyle {
|
|
259
|
+
const stacked = position === 'top' || position === 'bottom';
|
|
260
|
+
return {
|
|
261
|
+
flexDirection: position === 'top' ? 'column' : position === 'bottom' ? 'column-reverse' : 'row',
|
|
262
|
+
alignItems: stacked ? 'flex-start' : 'center',
|
|
263
|
+
gap: theme.spacing(stacked ? LABEL_GAP_UNITS.stacked : LABEL_GAP_UNITS.beside),
|
|
264
|
+
width: '100%',
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The native `Switch`.
|
|
270
|
+
*
|
|
271
|
+
* React Native's own `Switch` is the platform control at the platform's size,
|
|
272
|
+
* with no track geometry, no thumb radius and no room for an icon — so this
|
|
273
|
+
* draws the track and the thumb itself, off the same table the web styles MUI
|
|
274
|
+
* with, and takes `role="checkbox"` with `aria-checked` for the state a hidden
|
|
275
|
+
* `<input type="checkbox">` carries on the web. See `NATIVE-NOTES.md`.
|
|
276
|
+
*/
|
|
277
|
+
export const Switch = React.forwardRef<View, SwitchProps>((rawProps, ref) => {
|
|
278
|
+
const props = resolveSwitchProps(rawProps);
|
|
279
|
+
const {
|
|
280
|
+
label, description, labelPosition, error, helperText, loading, disabled,
|
|
281
|
+
checked, defaultChecked, onChange, onClick, onPress, style, ...others
|
|
282
|
+
} = props;
|
|
283
|
+
|
|
284
|
+
const theme = useUiTheme();
|
|
285
|
+
const [own, setOwn] = React.useState(defaultChecked ?? false);
|
|
286
|
+
const current = checked ?? own;
|
|
287
|
+
const inactive = loading || disabled;
|
|
288
|
+
const rest = withoutSwitchProps(others);
|
|
289
|
+
|
|
290
|
+
// A keyboard toggle has no gesture behind it, so `onClick`/`onPress` — which
|
|
291
|
+
// are press handlers — only fire when there is a press to report.
|
|
292
|
+
const toggle = (event?: GestureResponderEvent): void => {
|
|
293
|
+
const next = !current;
|
|
294
|
+
setOwn(next);
|
|
295
|
+
onChange?.({ target: { checked: next } }, next);
|
|
296
|
+
if (event === undefined) return;
|
|
297
|
+
onClick?.(event);
|
|
298
|
+
onPress?.(event);
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
const control = (
|
|
302
|
+
<SwitchControl
|
|
303
|
+
props={props}
|
|
304
|
+
theme={theme}
|
|
305
|
+
checked={current}
|
|
306
|
+
inactive={inactive}
|
|
307
|
+
onToggle={toggle}
|
|
308
|
+
rest={rest}
|
|
309
|
+
testID={resolveTestId(others, 'switch') ?? 'switch'}
|
|
310
|
+
/>
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
return (
|
|
314
|
+
<View ref={ref} testID={childTestId(others, 'container', 'switch')} style={style}>
|
|
315
|
+
{label === undefined ? (
|
|
316
|
+
control
|
|
317
|
+
) : (
|
|
318
|
+
<View style={labelRowStyle(theme, labelPosition)}>
|
|
319
|
+
{labelPosition === 'start' ? control : null}
|
|
320
|
+
<LabelBlock
|
|
321
|
+
theme={theme}
|
|
322
|
+
label={label}
|
|
323
|
+
description={description}
|
|
324
|
+
error={error}
|
|
325
|
+
testID={childTestId(others, 'label', 'switch')}
|
|
326
|
+
/>
|
|
327
|
+
{labelPosition === 'start' ? null : control}
|
|
328
|
+
</View>
|
|
329
|
+
)}
|
|
330
|
+
{helperText === undefined ? null : (
|
|
331
|
+
<RNText testID={childTestId(others, 'helper', 'switch')} style={helperTextStyle(theme, error)}>
|
|
332
|
+
{helperText}
|
|
333
|
+
</RNText>
|
|
334
|
+
)}
|
|
335
|
+
</View>
|
|
336
|
+
);
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
Switch.displayName = 'Switch';
|
|
340
|
+
|
|
341
|
+
const styles = StyleSheet.create({
|
|
342
|
+
labelBlock: {
|
|
343
|
+
flex: 1,
|
|
344
|
+
},
|
|
345
|
+
trackLabels: {
|
|
346
|
+
...StyleSheet.absoluteFillObject,
|
|
347
|
+
flexDirection: 'row',
|
|
348
|
+
alignItems: 'center',
|
|
349
|
+
justifyContent: 'space-between',
|
|
350
|
+
pointerEvents: 'none',
|
|
351
|
+
},
|
|
352
|
+
icon: {
|
|
353
|
+
position: 'absolute',
|
|
354
|
+
top: '50%',
|
|
355
|
+
zIndex: 2,
|
|
356
|
+
alignItems: 'center',
|
|
357
|
+
justifyContent: 'center',
|
|
358
|
+
pointerEvents: 'none',
|
|
359
|
+
},
|
|
360
|
+
});
|
|
@@ -5,9 +5,11 @@ import Typography from '@mui/material/Typography/index.js';
|
|
|
5
5
|
import { styled } from '@mui/material/styles/index.js';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
+
import { LABEL_GAP_UNITS, SWITCH_ICON_SIZES } from './Switch.metrics';
|
|
8
9
|
import { switchSx } from './Switch.styles';
|
|
9
10
|
import type { SwitchFlags } from './Switch.styles';
|
|
10
11
|
import type { SwitchProps } from './Switch.types';
|
|
12
|
+
import type { SizeValue } from '../../../tokens/vocabulary';
|
|
11
13
|
|
|
12
14
|
const StyledSwitch = styled(MuiSwitch, {
|
|
13
15
|
shouldForwardProp: (prop) =>
|
|
@@ -42,7 +44,7 @@ const StyledLabelContainer = styled(Box, {
|
|
|
42
44
|
alignItems: stacked ? 'flex-start' : 'center',
|
|
43
45
|
flexDirection:
|
|
44
46
|
labelPosition === 'top' ? 'column' : labelPosition === 'bottom' ? 'column-reverse' : 'row',
|
|
45
|
-
gap: theme.spacing(stacked ?
|
|
47
|
+
gap: theme.spacing(stacked ? LABEL_GAP_UNITS.stacked : LABEL_GAP_UNITS.beside),
|
|
46
48
|
width: '100%',
|
|
47
49
|
...(error && { '& .MuiTypography-root': { color: theme.palette.error.main } }),
|
|
48
50
|
};
|
|
@@ -62,8 +64,6 @@ export const LabelContainer: React.FC<{
|
|
|
62
64
|
</StyledLabelContainer>
|
|
63
65
|
);
|
|
64
66
|
|
|
65
|
-
const ICON_SIZES: Record<string, number> = { xs: 12, sm: 14, md: 16, lg: 18, xl: 20 };
|
|
66
|
-
|
|
67
67
|
export interface SwitchIconProps {
|
|
68
68
|
icon: React.ReactNode;
|
|
69
69
|
/** True when this icon is the one the current state should show. */
|
|
@@ -94,7 +94,7 @@ export const SwitchIcon: React.FC<SwitchIconProps> = ({ icon, shown, animated, s
|
|
|
94
94
|
pointerEvents: 'none',
|
|
95
95
|
zIndex: 2,
|
|
96
96
|
color: isOn ? '#fff' : 'text.secondary',
|
|
97
|
-
fontSize:
|
|
97
|
+
fontSize: SWITCH_ICON_SIZES[size as SizeValue] ?? SWITCH_ICON_SIZES.md,
|
|
98
98
|
}}
|
|
99
99
|
>
|
|
100
100
|
{icon}
|