@12-apps/ui 6.17.0 → 6.18.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 +94 -0
- package/components-catalog.md +23 -0
- package/components-guidelines.md +16 -1
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +10 -4
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +10 -4
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +10 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +9 -4
- package/dist/_internal/components/data-display/Carousel/Carousel.js +11 -6
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +8 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +8 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +11 -6
- package/dist/_internal/components/data-display/Chart/SpecChart.js +12 -7
- package/dist/_internal/components/data-display/Chart/chart-context.js +9 -4
- package/dist/_internal/components/data-display/Chart/chart-internals.js +8 -3
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +10 -5
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +1 -1
- package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +8 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +50 -43
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +70 -63
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +12 -5
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +16 -9
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +16 -9
- package/dist/_internal/components/data-display/DataViews/base-card.js +8 -2
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +10 -4
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +9 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +13 -7
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +10 -10
- package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +8 -2
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +11 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +15 -8
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +8 -2
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +12 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +12 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +16 -9
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +10 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +47 -40
- package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +8 -2
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +24 -17
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -2
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +13 -6
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +12 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +19 -12
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +21 -14
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +18 -11
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +12 -5
- package/dist/_internal/components/data-display/DataViews/save-view-preview.js +8 -2
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +12 -6
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +8 -2
- package/dist/_internal/components/data-display/InteractiveTooltip/InteractiveTooltip.js +2 -2
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +8 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.hooks.js +2 -2
- package/dist/_internal/components/data-display/Sheet/Sheet.js +12 -7
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +8 -3
- package/dist/_internal/components/data-display/index.js +68 -61
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +10 -4
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +27 -21
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +6 -6
- package/dist/_internal/components/form/Button/Button.base.js +1 -0
- package/dist/_internal/components/form/Button/Button.base.js.map +1 -0
- package/dist/_internal/components/form/Button/Button.helpers.js +1 -1
- package/dist/_internal/components/form/Button/Button.js +9 -3
- package/dist/_internal/components/form/Button/Button.metrics.js +47 -0
- package/dist/_internal/components/form/Button/Button.metrics.js.map +1 -0
- package/dist/_internal/components/form/Button/Button.styles.js +6 -1
- package/dist/_internal/components/form/Calendar/Calendar.hooks.js +2 -2
- package/dist/_internal/components/form/Calendar/Calendar.js +6 -6
- package/dist/_internal/components/form/Calendar/CalendarDayCell.js +2 -2
- package/dist/_internal/components/form/Calendar/CalendarMonth.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +2 -2
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +9 -9
- package/dist/_internal/components/form/CepField/CepField.js +4 -4
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +1 -1
- package/dist/_internal/components/form/Command/Command.js +9 -4
- package/dist/_internal/components/form/Command/Command.styles.js +8 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +2 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +9 -9
- package/dist/_internal/components/form/Form/Form.js +1 -1
- package/dist/_internal/components/form/Input/Input.js +2 -2
- package/dist/_internal/components/form/Label/Label.js +9 -4
- package/dist/_internal/components/form/Label/Label.styles.js +8 -3
- package/dist/_internal/components/form/Menubar/Menubar.item.js +9 -4
- package/dist/_internal/components/form/Menubar/Menubar.js +12 -7
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +8 -3
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +10 -5
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +2 -2
- package/dist/_internal/components/form/index.js +95 -88
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +10 -10
- package/dist/_internal/components/form/total-form/Fields/CepField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +2 -2
- package/dist/_internal/components/form/total-form/Fields/TextField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +2 -2
- package/dist/_internal/components/form/total-form/Fields/index.js +24 -24
- package/dist/_internal/components/form/total-form/FormContainer.js +2 -2
- package/dist/_internal/components/form/total-form/SubmitButton.js +10 -4
- package/dist/_internal/components/index.js +261 -253
- package/dist/_internal/components/layout/Box/Box.base.js +8 -0
- package/dist/_internal/components/layout/Box/Box.base.js.map +1 -0
- package/dist/_internal/components/layout/Box/Box.js +22 -0
- package/dist/_internal/components/layout/Box/Box.js.map +1 -0
- package/dist/_internal/components/layout/Box/Box.types.js +8 -0
- package/dist/_internal/components/layout/Box/Box.types.js.map +1 -0
- package/dist/_internal/components/layout/Box/box-layout.js +11 -0
- package/dist/_internal/components/layout/Box/box-layout.js.map +1 -0
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.base.js +1 -0
- package/dist/_internal/components/layout/Stack/Stack.base.js.map +1 -0
- package/dist/_internal/components/layout/Stack/Stack.js +22 -0
- package/dist/_internal/components/layout/Stack/Stack.js.map +1 -0
- package/dist/_internal/components/layout/Stack/Stack.types.js +1 -0
- package/dist/_internal/components/layout/Stack/Stack.types.js.map +1 -0
- package/dist/_internal/components/layout/Stack/with-dividers.js +8 -0
- package/dist/_internal/components/layout/Stack/with-dividers.js.map +1 -0
- package/dist/_internal/components/layout/index.js +19 -19
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +18 -11
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +8 -3
- 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/Pagination/Pagination.js +2 -2
- package/dist/_internal/components/navigation/index.js +38 -31
- package/dist/_internal/components/typography/Heading/Heading.js +4 -3
- package/dist/_internal/components/typography/Heading/Heading.styles.js +3 -2
- package/dist/_internal/components/typography/Text/Text.base.js +1 -0
- package/dist/_internal/components/typography/Text/Text.base.js.map +1 -0
- package/dist/_internal/components/typography/Text/Text.js +7 -1
- package/dist/_internal/components/typography/Text/Text.metrics.js +34 -0
- package/dist/_internal/components/typography/Text/Text.metrics.js.map +1 -0
- package/dist/_internal/components/typography/index.js +13 -7
- package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
- package/dist/_internal/components/utility/index.js +26 -26
- package/dist/_internal/icons/Icon.js +21 -0
- package/dist/_internal/icons/Icon.js.map +1 -0
- package/dist/_internal/icons/Icon.types.js +10 -0
- package/dist/_internal/icons/Icon.types.js.map +1 -0
- package/dist/_internal/icons/icon-color.js +10 -0
- package/dist/_internal/icons/icon-color.js.map +1 -0
- package/dist/_internal/icons/paths.generated.js +10 -0
- package/dist/_internal/icons/paths.generated.js.map +1 -0
- package/dist/_internal/platform/test-id.js +12 -0
- package/dist/_internal/platform/test-id.js.map +1 -0
- package/dist/_internal/provider/UiProvider.js +17 -0
- package/dist/_internal/provider/UiProvider.js.map +1 -0
- package/dist/_internal/provider/UiProvider.types.js +8 -0
- package/dist/_internal/provider/UiProvider.types.js.map +1 -0
- package/dist/_internal/provider/mui-bridge.js +17 -0
- package/dist/_internal/provider/mui-bridge.js.map +1 -0
- package/dist/_internal/provider/ui-theme-context.js +9 -0
- package/dist/_internal/provider/ui-theme-context.js.map +1 -0
- package/dist/_internal/provider/use-ui-theme.js +16 -0
- package/dist/_internal/provider/use-ui-theme.js.map +1 -0
- package/dist/_internal/social-login-button/social-login-button.js +15 -8
- package/dist/_internal/tokens/color.js +26 -0
- package/dist/_internal/tokens/color.js.map +1 -0
- package/dist/_internal/tokens/css-units.js +10 -0
- package/dist/_internal/tokens/css-units.js.map +1 -0
- package/dist/_internal/tokens/heading-scale.js +10 -0
- package/dist/_internal/tokens/heading-scale.js.map +1 -0
- package/dist/_internal/tokens/theme.js +33 -0
- package/dist/_internal/tokens/theme.js.map +1 -0
- package/dist/_internal/tokens/typography.js +5 -3
- package/dist/_internal/tokens/vocabulary.js +22 -0
- package/dist/_internal/tokens/vocabulary.js.map +1 -0
- package/dist/_internal/user-avatar/user-avatar.js +12 -5
- package/dist/charts.js +12 -7
- package/dist/{chunk-IAQFQNBL.js → chunk-24BUCMQA.js} +15 -9
- package/dist/chunk-24BUCMQA.js.map +1 -0
- package/dist/{chunk-GFBNUWT5.js → chunk-2EKALM6P.js} +6 -6
- package/dist/{chunk-VRHBJXZ7.js → chunk-2PCOC3PT.js} +62 -42
- package/dist/chunk-2PCOC3PT.js.map +1 -0
- package/dist/{chunk-ISW5K72V.js → chunk-2ZRZTGWP.js} +5 -5
- package/dist/{chunk-3ORFVLI3.js → chunk-37YPZHAG.js} +2 -2
- package/dist/{chunk-EB4BTKKY.js → chunk-3AFUWDYS.js} +4 -4
- package/dist/{chunk-HR7YTBR7.js → chunk-3AOOI2NR.js} +4 -4
- package/dist/{chunk-PKJKA4CU.js → chunk-3ZFORMNT.js} +4 -4
- package/dist/{chunk-PLK7UGO6.js → chunk-4EJSUL62.js} +3 -3
- package/dist/{chunk-WMALDOF5.js → chunk-4G3FGCWX.js} +4 -4
- package/dist/chunk-4GGH6ZQ7.js +14 -0
- package/dist/chunk-4GGH6ZQ7.js.map +1 -0
- package/dist/{chunk-2PPWKCMW.js → chunk-4N4ENTF7.js} +2 -2
- package/dist/{chunk-6CBYPMYQ.js → chunk-4R2CDZOQ.js} +4 -4
- package/dist/{chunk-FJHNNSD3.js → chunk-4WK2RTVY.js} +5 -5
- package/dist/{chunk-6U7NA74A.js → chunk-5HOJSVQH.js} +2 -2
- package/dist/{chunk-2XGM5PDA.js → chunk-624TFFLJ.js} +5 -3
- package/dist/{chunk-2XGM5PDA.js.map → chunk-624TFFLJ.js.map} +1 -1
- package/dist/{chunk-QETBO7EC.js → chunk-67LDIJQZ.js} +2 -2
- package/dist/chunk-6JAIFIPW.js +111 -0
- package/dist/chunk-6JAIFIPW.js.map +1 -0
- package/dist/{chunk-X4X4CVWJ.js → chunk-6JZE4IIN.js} +2 -2
- package/dist/{chunk-LUWATXU4.js → chunk-74KMXBG3.js} +10 -10
- package/dist/{chunk-ZDWU52DJ.js → chunk-7AR2R7TV.js} +4 -4
- package/dist/{chunk-B6IURHSZ.js → chunk-7DNQHMDO.js} +4 -4
- package/dist/{chunk-G7CFUI4I.js → chunk-7EESF76V.js} +2 -2
- package/dist/chunk-7JXLGOM2.js +25 -0
- package/dist/chunk-7JXLGOM2.js.map +1 -0
- package/dist/{chunk-AX7UFG2U.js → chunk-7RZ4WOQW.js} +3 -3
- package/dist/chunk-7V6ZRQYW.js +90 -0
- package/dist/chunk-7V6ZRQYW.js.map +1 -0
- package/dist/chunk-7ZPUN7TV.js +29 -0
- package/dist/chunk-7ZPUN7TV.js.map +1 -0
- package/dist/chunk-AG66JBNH.js +21 -0
- package/dist/chunk-AG66JBNH.js.map +1 -0
- package/dist/{chunk-WFX5GASM.js → chunk-B7BZAIHL.js} +2 -2
- package/dist/{chunk-RX6DWIIW.js → chunk-BILE3A7F.js} +3 -3
- package/dist/{chunk-XSKVBGCZ.js → chunk-BLBOYCOV.js} +6 -6
- package/dist/{chunk-4Y65Q3CR.js → chunk-C52BELLW.js} +3 -3
- package/dist/{chunk-QCIWROKG.js → chunk-CGQI4XE5.js} +5 -3
- package/dist/{chunk-QCIWROKG.js.map → chunk-CGQI4XE5.js.map} +1 -1
- package/dist/{chunk-RP3W6IQO.js → chunk-CPNSVIIB.js} +5 -5
- package/dist/{chunk-T4SM36XC.js → chunk-D7FJ2GAD.js} +2 -2
- package/dist/{chunk-SCGVB7DS.js → chunk-DOADQW7I.js} +2 -2
- package/dist/{chunk-RIAIJTEW.js → chunk-DOMEYGTN.js} +2 -2
- package/dist/{chunk-7HPPUO2A.js → chunk-DQHC5P64.js} +3 -3
- package/dist/{chunk-W2UTDN4T.js → chunk-DWZ7FLA7.js} +4 -4
- package/dist/{chunk-24LW52EU.js → chunk-DX527XPL.js} +2 -2
- package/dist/{chunk-OK5BHFZE.js → chunk-E6OILRUU.js} +2 -2
- package/dist/{chunk-A4YWFX5C.js → chunk-ENNW5SKT.js} +2 -2
- package/dist/{chunk-BPYPUEM5.js → chunk-EPNCYUQ7.js} +5 -5
- package/dist/{chunk-MUAVYVDJ.js → chunk-EW7ZNSWU.js} +5 -5
- package/dist/{chunk-DWUMMMLR.js → chunk-FOMK3WPG.js} +2 -2
- package/dist/{chunk-RQ4EQ5FJ.js → chunk-FP4R47TM.js} +2 -2
- package/dist/{chunk-7CA6GVBO.js → chunk-FZXKH2ZT.js} +3 -7
- package/dist/chunk-FZXKH2ZT.js.map +1 -0
- package/dist/{chunk-SHQWIDD5.js → chunk-GJQYM3PM.js} +4 -4
- package/dist/{chunk-WEH5TCPE.js → chunk-GSTRPZS4.js} +8 -8
- package/dist/chunk-H2EQVMU3.js +49 -0
- package/dist/chunk-H2EQVMU3.js.map +1 -0
- package/dist/{chunk-WC3W36AM.js → chunk-HOJL2GKW.js} +4 -4
- package/dist/{chunk-PMFW55F5.js → chunk-HSAH5QUQ.js} +5 -5
- package/dist/{chunk-A3KY6NUA.js → chunk-IH4CX43Q.js} +2 -2
- package/dist/{chunk-HEDOL2RV.js → chunk-IJIT5HQP.js} +3 -3
- package/dist/{chunk-VZO7VREP.js → chunk-IPPTOL53.js} +2 -2
- package/dist/chunk-IPPTOL53.js.map +1 -0
- package/dist/{chunk-VR5HDUBK.js → chunk-IPS55KWK.js} +2 -2
- package/dist/chunk-ITGG5OKP.js +86 -0
- package/dist/chunk-ITGG5OKP.js.map +1 -0
- package/dist/{chunk-ELYLG4F7.js → chunk-J54WH74M.js} +4 -4
- package/dist/chunk-J6UFAMIC.js +19 -0
- package/dist/chunk-J6UFAMIC.js.map +1 -0
- package/dist/{chunk-5ZOJLYD2.js → chunk-JE6RZ5L6.js} +4 -4
- package/dist/{chunk-NYUGX76C.js → chunk-JT6TERQL.js} +20 -17
- package/dist/chunk-JT6TERQL.js.map +1 -0
- package/dist/chunk-KLREH4X6.js +16 -0
- package/dist/chunk-KLREH4X6.js.map +1 -0
- package/dist/{chunk-EY4LPLIR.js → chunk-KQ74QU55.js} +3 -3
- package/dist/{chunk-XULTDO56.js → chunk-KT6HWAEN.js} +2 -2
- package/dist/{chunk-COSJTD6Z.js → chunk-KZSKI2R3.js} +2 -2
- package/dist/{chunk-DQIQKIEA.js → chunk-L5ZZJ4XE.js} +3 -3
- package/dist/{chunk-SFAP5EH5.js → chunk-LUMF63BM.js} +4 -4
- package/dist/{chunk-LIQHOLDQ.js → chunk-LYMAMKJT.js} +2 -2
- package/dist/{chunk-6RFL7HGI.js → chunk-LZRURORY.js} +4 -4
- package/dist/{chunk-KXNWDXR7.js → chunk-M2K7BPHX.js} +2 -2
- package/dist/{chunk-WLDK74RR.js → chunk-MSUSZLRE.js} +2 -2
- package/dist/{chunk-EE2LBAJH.js → chunk-MUVJD26L.js} +10 -10
- package/dist/{chunk-VVXRIPV5.js → chunk-MY5VNNSP.js} +9 -9
- package/dist/{chunk-JPDKRGYI.js → chunk-MZQTHSLN.js} +3 -3
- package/dist/{chunk-FF55LRSV.js → chunk-NETZMGQP.js} +2 -2
- package/dist/{chunk-3QGRQNTP.js → chunk-NFAKRI4S.js} +6 -6
- package/dist/{chunk-KSF7TLXH.js → chunk-NHSMLVNC.js} +6 -6
- package/dist/chunk-NQN5Z36J.js +182 -0
- package/dist/chunk-NQN5Z36J.js.map +1 -0
- package/dist/{chunk-HQJ75HHI.js → chunk-NYLXHOMR.js} +2 -2
- package/dist/chunk-OCUVKI63.js +35 -0
- package/dist/chunk-OCUVKI63.js.map +1 -0
- package/dist/{chunk-CXA6UNFF.js → chunk-OH3YGJT5.js} +7 -7
- package/dist/{chunk-45N6LXUU.js → chunk-OI3HOI74.js} +2 -2
- package/dist/{chunk-REMK55JI.js → chunk-OLZTGVBT.js} +4 -4
- package/dist/{chunk-M3RIC6JI.js → chunk-OQXOYHIV.js} +4 -4
- package/dist/{chunk-3LO5JWTC.js → chunk-P5YYVDAD.js} +3 -3
- package/dist/{chunk-6TYSEAAT.js → chunk-PC5FFEIY.js} +4 -4
- package/dist/{chunk-SLYZMJEL.js → chunk-PHCSPHDH.js} +3 -3
- package/dist/{chunk-TCAB2ERD.js → chunk-PNYXXLPU.js} +2 -2
- package/dist/chunk-PT6TCWIW.js +13 -0
- package/dist/chunk-PT6TCWIW.js.map +1 -0
- package/dist/{chunk-IPE5FFFD.js → chunk-PUBPZOQJ.js} +2 -2
- package/dist/chunk-QLWBQQW7.js +18 -0
- package/dist/chunk-QLWBQQW7.js.map +1 -0
- package/dist/{chunk-6HNEEJES.js → chunk-QRX5BYUQ.js} +4 -4
- package/dist/chunk-QWBQVQRG.js +18 -0
- package/dist/chunk-QWBQVQRG.js.map +1 -0
- package/dist/{chunk-5QXSPLWU.js → chunk-R6SSXEK2.js} +2 -2
- package/dist/chunk-RLC46NIW.js +47 -0
- package/dist/chunk-RLC46NIW.js.map +1 -0
- package/dist/{chunk-NR3J7VQL.js → chunk-RNCQ5KHQ.js} +2 -2
- package/dist/chunk-RTSK5OZT.js +15 -0
- package/dist/chunk-RTSK5OZT.js.map +1 -0
- package/dist/{chunk-7FOOLP5H.js → chunk-RXSGHPCR.js} +4 -4
- package/dist/{chunk-Z56IO7OV.js → chunk-RXVPUW7V.js} +2 -2
- package/dist/{chunk-5SYD23V4.js → chunk-SKZHOWTS.js} +4 -4
- package/dist/{chunk-FWL2N2KH.js → chunk-SX3V2DLV.js} +2 -2
- package/dist/{chunk-AUYC5K5K.js → chunk-TAMIZE4Q.js} +1 -1
- package/dist/chunk-TAMIZE4Q.js.map +1 -0
- package/dist/{chunk-3GOX75ZM.js → chunk-TF4TPLF2.js} +2 -2
- package/dist/{chunk-3DQP6OPC.js → chunk-THBT56JE.js} +2 -2
- package/dist/{chunk-DGMR3IMM.js → chunk-U7RULTSH.js} +3 -3
- package/dist/{chunk-RRX6ZTNX.js → chunk-UEJQQVP2.js} +4 -4
- package/dist/{chunk-O3OU2PPT.js → chunk-UQHJQ26Y.js} +2 -2
- package/dist/chunk-V3PLFYKO.js +34 -0
- package/dist/chunk-V3PLFYKO.js.map +1 -0
- package/dist/chunk-V5IOLAIS.js +22 -0
- package/dist/chunk-V5IOLAIS.js.map +1 -0
- package/dist/{chunk-WR6F6J43.js → chunk-V662PA6T.js} +6 -6
- package/dist/{chunk-VJKRJYZL.js → chunk-VEFDL77X.js} +2 -2
- package/dist/{chunk-GT7C6TSM.js → chunk-VNEEXUWA.js} +3 -3
- package/dist/{chunk-N34YHFZW.js → chunk-W2YNUUVJ.js} +2 -2
- package/dist/{chunk-N4WANJI3.js → chunk-WBVHRLIS.js} +4 -4
- package/dist/{chunk-MHFJBNDP.js → chunk-WO52KYSU.js} +8 -8
- package/dist/{chunk-ENK4XGKF.js → chunk-WUPVHIMD.js} +2 -2
- package/dist/{chunk-KNNBIXWJ.js → chunk-WX7VWW3W.js} +3 -3
- package/dist/{chunk-TUAIPMU7.js → chunk-X5BHPSAC.js} +5 -5
- package/dist/chunk-X5D3PTWI.js +58 -0
- package/dist/chunk-X5D3PTWI.js.map +1 -0
- package/dist/{chunk-TPUIIZN2.js → chunk-XKMFIH27.js} +12 -12
- package/dist/{chunk-T53L42XW.js → chunk-XSJWN3WH.js} +7 -7
- package/dist/{chunk-AVU6KU27.js → chunk-XXDXW6TX.js} +2 -2
- package/dist/chunk-XZTRZ3HO.js +7 -0
- package/dist/chunk-XZTRZ3HO.js.map +1 -0
- package/dist/chunk-YMRI5QKG.js +134 -0
- package/dist/chunk-YMRI5QKG.js.map +1 -0
- package/dist/{chunk-45OIUWGO.js → chunk-YNQGXSDD.js} +5 -5
- package/dist/{chunk-5VVM2PPV.js → chunk-ZEBJT5JZ.js} +3 -3
- package/dist/{chunk-DJORMYOV.js → chunk-ZU3SWR4I.js} +2 -2
- package/dist/data-display/AsyncStateContainer.js +3 -3
- package/dist/data-display/CardKit.js +14 -8
- package/dist/data-display/Carousel.js +11 -6
- package/dist/data-display/Chart.js +12 -7
- package/dist/data-display/DataGrid.js +1 -1
- package/dist/data-display/DataViews.js +78 -71
- package/dist/data-display/DescriptionItem.js +8 -2
- package/dist/data-display/InteractiveTooltip.js +2 -2
- package/dist/data-display/Lightbox.js +3 -3
- package/dist/data-display/Sheet.js +12 -7
- package/dist/en-US.js +8 -8
- package/dist/feedback/ConfirmAction.js +12 -6
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +6 -6
- package/dist/form/Button.js +9 -3
- package/dist/form/Calendar.js +6 -6
- package/dist/form/CategorySelect.js +11 -11
- package/dist/form/CepField.js +4 -4
- package/dist/form/CodeEditor.js +1 -1
- package/dist/form/Command.js +9 -4
- package/dist/form/CreatableSelect.js +2 -2
- package/dist/form/DateRangePicker.js +9 -9
- package/dist/form/Form.js +1 -1
- package/dist/form/Input.js +2 -2
- package/dist/form/Label.js +9 -4
- package/dist/form/Menubar.js +12 -7
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/total-form.js +38 -32
- package/dist/icons.js +31 -0
- package/dist/icons.js.map +1 -0
- package/dist/layout/Box.js +23 -0
- package/dist/layout/Box.js.map +1 -0
- package/dist/layout/SettingsLayout.js +2 -2
- package/dist/layout/Stack.js +22 -0
- package/dist/layout/Stack.js.map +1 -0
- package/dist/locales.js +25 -25
- package/dist/native/chunks/chunk-5WLOVHKK.js +29 -0
- package/dist/native/chunks/chunk-5WLOVHKK.js.map +1 -0
- package/dist/native/chunks/chunk-L2UUNK2M.js +316 -0
- package/dist/native/chunks/chunk-L2UUNK2M.js.map +1 -0
- package/dist/native/chunks/chunk-M4DTJDWU.js +18 -0
- package/dist/native/chunks/chunk-M4DTJDWU.js.map +1 -0
- package/dist/native/chunks/chunk-QZ233LRH.js +136 -0
- package/dist/native/chunks/chunk-QZ233LRH.js.map +1 -0
- package/dist/native/chunks/chunk-VGBKUL6D.js +21 -0
- package/dist/native/chunks/chunk-VGBKUL6D.js.map +1 -0
- package/dist/native/form/Button.js +321 -0
- package/dist/native/form/Button.js.map +1 -0
- package/dist/native/icons.js +108 -0
- package/dist/native/icons.js.map +1 -0
- package/dist/native/layout/Box.js +12 -0
- package/dist/native/layout/Box.js.map +1 -0
- package/dist/native/layout/Stack.js +30 -0
- package/dist/native/layout/Stack.js.map +1 -0
- package/dist/native/provider.js +26 -0
- package/dist/native/provider.js.map +1 -0
- package/dist/native/tokens.js +65 -0
- package/dist/native/tokens.js.map +1 -0
- package/dist/native/typography/Text.js +131 -0
- package/dist/native/typography/Text.js.map +1 -0
- package/dist/navigation/AppHeader.js +19 -12
- package/dist/navigation/CommandPalette.js +3 -3
- package/dist/navigation/NavigationMenu.js +5 -5
- package/dist/navigation/Pagination.js +2 -2
- package/dist/provider.js +26 -0
- package/dist/provider.js.map +1 -0
- package/dist/pt-BR.js +8 -8
- package/dist/social-login-button.js +15 -8
- package/dist/tokens.js +59 -6
- package/dist/types/components/form/Button/Button.base.d.ts +65 -0
- package/dist/types/components/form/Button/Button.base.d.ts.map +1 -0
- package/dist/types/components/form/Button/Button.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.helpers.d.ts +7 -3
- package/dist/types/components/form/Button/Button.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.metrics.d.ts +52 -0
- package/dist/types/components/form/Button/Button.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Button/Button.styles.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.types.d.ts +3 -46
- package/dist/types/components/form/Button/Button.types.d.ts.map +1 -1
- package/dist/types/components/form/Button/index.d.ts +1 -1
- package/dist/types/components/form/Button/index.d.ts.map +1 -1
- package/dist/types/components/form/Form/Form.d.ts.map +1 -1
- package/dist/types/components/layout/Box/Box.base.d.ts +60 -0
- package/dist/types/components/layout/Box/Box.base.d.ts.map +1 -0
- package/dist/types/components/layout/Box/Box.d.ts +10 -0
- package/dist/types/components/layout/Box/Box.d.ts.map +1 -0
- package/dist/types/components/layout/Box/Box.types.d.ts +11 -0
- package/dist/types/components/layout/Box/Box.types.d.ts.map +1 -0
- package/dist/types/components/layout/Box/box-layout.d.ts +42 -0
- package/dist/types/components/layout/Box/box-layout.d.ts.map +1 -0
- package/dist/types/components/layout/Box/index.d.ts +5 -0
- package/dist/types/components/layout/Box/index.d.ts.map +1 -0
- package/dist/types/components/layout/Stack/Stack.base.d.ts +13 -0
- package/dist/types/components/layout/Stack/Stack.base.d.ts.map +1 -0
- package/dist/types/components/layout/Stack/Stack.d.ts +4 -0
- package/dist/types/components/layout/Stack/Stack.d.ts.map +1 -0
- package/dist/types/components/layout/Stack/Stack.types.d.ts +5 -0
- package/dist/types/components/layout/Stack/Stack.types.d.ts.map +1 -0
- package/dist/types/components/layout/Stack/index.d.ts +3 -0
- package/dist/types/components/layout/Stack/index.d.ts.map +1 -0
- package/dist/types/components/layout/Stack/with-dividers.d.ts +4 -0
- package/dist/types/components/layout/Stack/with-dividers.d.ts.map +1 -0
- package/dist/types/components/typography/Text/Text.base.d.ts +23 -0
- package/dist/types/components/typography/Text/Text.base.d.ts.map +1 -0
- package/dist/types/components/typography/Text/Text.d.ts.map +1 -1
- package/dist/types/components/typography/Text/Text.metrics.d.ts +29 -0
- package/dist/types/components/typography/Text/Text.metrics.d.ts.map +1 -0
- package/dist/types/components/typography/Text/Text.types.d.ts +3 -11
- package/dist/types/components/typography/Text/Text.types.d.ts.map +1 -1
- package/dist/types/components/typography/Text/index.d.ts +1 -1
- package/dist/types/components/typography/Text/index.d.ts.map +1 -1
- package/dist/types/icons/Icon.d.ts +13 -0
- package/dist/types/icons/Icon.d.ts.map +1 -0
- package/dist/types/icons/Icon.types.d.ts +30 -0
- package/dist/types/icons/Icon.types.d.ts.map +1 -0
- package/dist/types/icons/icon-color.d.ts +10 -0
- package/dist/types/icons/icon-color.d.ts.map +1 -0
- package/dist/types/icons/index.d.ts +6 -0
- package/dist/types/icons/index.d.ts.map +1 -0
- package/dist/types/icons/paths.generated.d.ts +43 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -0
- package/dist/types/platform/test-id.d.ts +21 -0
- package/dist/types/platform/test-id.d.ts.map +1 -0
- package/dist/types/provider/UiProvider.d.ts +15 -0
- package/dist/types/provider/UiProvider.d.ts.map +1 -0
- package/dist/types/provider/UiProvider.types.d.ts +17 -0
- package/dist/types/provider/UiProvider.types.d.ts.map +1 -0
- package/dist/types/provider/index.d.ts +5 -0
- package/dist/types/provider/index.d.ts.map +1 -0
- package/dist/types/provider/mui-bridge.d.ts +7 -0
- package/dist/types/provider/mui-bridge.d.ts.map +1 -0
- package/dist/types/provider/ui-theme-context.d.ts +12 -0
- package/dist/types/provider/ui-theme-context.d.ts.map +1 -0
- package/dist/types/provider/use-ui-theme.d.ts +11 -0
- package/dist/types/provider/use-ui-theme.d.ts.map +1 -0
- package/dist/types/tokens/color.d.ts +44 -0
- package/dist/types/tokens/color.d.ts.map +1 -0
- package/dist/types/tokens/css-units.d.ts +14 -0
- package/dist/types/tokens/css-units.d.ts.map +1 -0
- package/dist/types/tokens/heading-scale.d.ts +65 -0
- package/dist/types/tokens/heading-scale.d.ts.map +1 -0
- package/dist/types/tokens/scales.d.ts +9 -114
- package/dist/types/tokens/scales.d.ts.map +1 -1
- package/dist/types/tokens/theme.d.ts +166 -0
- package/dist/types/tokens/theme.d.ts.map +1 -0
- package/dist/types/tokens/typography.d.ts +6 -62
- package/dist/types/tokens/typography.d.ts.map +1 -1
- package/dist/types/tokens/vocabulary.d.ts +117 -0
- package/dist/types/tokens/vocabulary.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.base.d.ts +65 -0
- package/dist/types-native/components/form/Button/Button.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.helpers.d.ts +10 -0
- package/dist/types-native/components/form/Button/Button.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.metrics.d.ts +52 -0
- package/dist/types-native/components/form/Button/Button.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.native.d.ts +10 -0
- package/dist/types-native/components/form/Button/Button.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.types.native.d.ts +17 -0
- package/dist/types-native/components/form/Button/Button.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Button/index.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Box/Box.base.d.ts +60 -0
- package/dist/types-native/components/layout/Box/Box.base.d.ts.map +1 -0
- package/dist/types-native/components/layout/Box/Box.native.d.ts +7 -0
- package/dist/types-native/components/layout/Box/Box.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Box/Box.types.native.d.ts +9 -0
- package/dist/types-native/components/layout/Box/Box.types.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Box/box-layout.d.ts +42 -0
- package/dist/types-native/components/layout/Box/box-layout.d.ts.map +1 -0
- package/dist/types-native/components/layout/Box/index.native.d.ts +5 -0
- package/dist/types-native/components/layout/Box/index.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Stack/Stack.base.d.ts +13 -0
- package/dist/types-native/components/layout/Stack/Stack.base.d.ts.map +1 -0
- package/dist/types-native/components/layout/Stack/Stack.native.d.ts +4 -0
- package/dist/types-native/components/layout/Stack/Stack.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Stack/Stack.types.native.d.ts +5 -0
- package/dist/types-native/components/layout/Stack/Stack.types.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Stack/index.native.d.ts +3 -0
- package/dist/types-native/components/layout/Stack/index.native.d.ts.map +1 -0
- package/dist/types-native/components/layout/Stack/with-dividers.d.ts +4 -0
- package/dist/types-native/components/layout/Stack/with-dividers.d.ts.map +1 -0
- package/dist/types-native/components/typography/Text/Text.base.d.ts +23 -0
- package/dist/types-native/components/typography/Text/Text.base.d.ts.map +1 -0
- package/dist/types-native/components/typography/Text/Text.metrics.d.ts +29 -0
- package/dist/types-native/components/typography/Text/Text.metrics.d.ts.map +1 -0
- package/dist/types-native/components/typography/Text/Text.native.d.ts +25 -0
- package/dist/types-native/components/typography/Text/Text.native.d.ts.map +1 -0
- package/dist/types-native/components/typography/Text/Text.types.native.d.ts +8 -0
- package/dist/types-native/components/typography/Text/Text.types.native.d.ts.map +1 -0
- package/dist/types-native/components/typography/Text/index.native.d.ts +3 -0
- package/dist/types-native/components/typography/Text/index.native.d.ts.map +1 -0
- package/dist/types-native/icons/Icon.native.d.ts +15 -0
- package/dist/types-native/icons/Icon.native.d.ts.map +1 -0
- package/dist/types-native/icons/Icon.types.d.ts +30 -0
- package/dist/types-native/icons/Icon.types.d.ts.map +1 -0
- package/dist/types-native/icons/icon-color.d.ts +10 -0
- package/dist/types-native/icons/icon-color.d.ts.map +1 -0
- package/dist/types-native/icons/index.native.d.ts +6 -0
- package/dist/types-native/icons/index.native.d.ts.map +1 -0
- package/dist/types-native/icons/paths.generated.d.ts +43 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -0
- package/dist/types-native/platform/test-id.d.ts +21 -0
- package/dist/types-native/platform/test-id.d.ts.map +1 -0
- package/dist/types-native/provider/UiProvider.native.d.ts +8 -0
- package/dist/types-native/provider/UiProvider.native.d.ts.map +1 -0
- package/dist/types-native/provider/UiProvider.types.d.ts +17 -0
- package/dist/types-native/provider/UiProvider.types.d.ts.map +1 -0
- package/dist/types-native/provider/index.native.d.ts +4 -0
- package/dist/types-native/provider/index.native.d.ts.map +1 -0
- package/dist/types-native/provider/ui-theme-context.d.ts +12 -0
- package/dist/types-native/provider/ui-theme-context.d.ts.map +1 -0
- package/dist/types-native/provider/use-ui-theme.native.d.ts +4 -0
- package/dist/types-native/provider/use-ui-theme.native.d.ts.map +1 -0
- package/dist/types-native/tokens/color.d.ts +44 -0
- package/dist/types-native/tokens/color.d.ts.map +1 -0
- package/dist/types-native/tokens/css-units.d.ts +14 -0
- package/dist/types-native/tokens/css-units.d.ts.map +1 -0
- package/dist/types-native/tokens/heading-scale.d.ts +65 -0
- package/dist/types-native/tokens/heading-scale.d.ts.map +1 -0
- package/dist/types-native/tokens/index.native.d.ts +10 -0
- package/dist/types-native/tokens/index.native.d.ts.map +1 -0
- package/dist/types-native/tokens/theme.d.ts +166 -0
- package/dist/types-native/tokens/theme.d.ts.map +1 -0
- package/dist/types-native/tokens/vocabulary.d.ts +117 -0
- package/dist/types-native/tokens/vocabulary.d.ts.map +1 -0
- package/dist/typography/Heading.js +4 -3
- package/dist/typography/Text.js +7 -1
- package/dist/user-avatar.js +12 -5
- package/dist/utility/InstallPrompt.js +2 -2
- package/package.json +79 -7
- package/src/components/form/Button/Button.base.ts +80 -0
- package/src/components/form/Button/Button.helpers.ts +12 -7
- package/src/components/form/Button/Button.metrics.ts +101 -0
- package/src/components/form/Button/Button.native.tsx +339 -0
- package/src/components/form/Button/Button.styles.ts +16 -16
- package/src/components/form/Button/Button.tsx +8 -5
- package/src/components/form/Button/Button.types.native.ts +27 -0
- package/src/components/form/Button/Button.types.ts +8 -58
- package/src/components/form/Button/index.native.ts +2 -0
- package/src/components/form/Button/index.ts +1 -1
- package/src/components/form/Form/Form.md +46 -1
- package/src/components/form/Form/Form.tsx +40 -1
- package/src/components/layout/Box/Box.base.ts +69 -0
- package/src/components/layout/Box/Box.md +46 -0
- package/src/components/layout/Box/Box.native.tsx +22 -0
- package/src/components/layout/Box/Box.tsx +56 -0
- package/src/components/layout/Box/Box.types.native.ts +21 -0
- package/src/components/layout/Box/Box.types.ts +22 -0
- package/src/components/layout/Box/box-layout.ts +144 -0
- package/src/components/layout/Box/index.native.ts +14 -0
- package/src/components/layout/Box/index.ts +14 -0
- package/src/components/layout/Stack/Stack.base.ts +14 -0
- package/src/components/layout/Stack/Stack.md +19 -0
- package/src/components/layout/Stack/Stack.native.tsx +16 -0
- package/src/components/layout/Stack/Stack.tsx +15 -0
- package/src/components/layout/Stack/Stack.types.native.ts +6 -0
- package/src/components/layout/Stack/Stack.types.ts +6 -0
- package/src/components/layout/Stack/index.native.ts +2 -0
- package/src/components/layout/Stack/index.ts +2 -0
- package/src/components/layout/Stack/with-dividers.ts +15 -0
- package/src/components/typography/Text/Text.base.ts +25 -0
- package/src/components/typography/Text/Text.metrics.ts +30 -0
- package/src/components/typography/Text/Text.native.tsx +149 -0
- package/src/components/typography/Text/Text.tsx +45 -27
- package/src/components/typography/Text/Text.types.native.ts +11 -0
- package/src/components/typography/Text/Text.types.ts +7 -12
- package/src/components/typography/Text/index.native.ts +2 -0
- package/src/components/typography/Text/index.ts +1 -1
- package/src/icons/Icon.md +28 -0
- package/src/icons/Icon.native.tsx +44 -0
- package/src/icons/Icon.tsx +47 -0
- package/src/icons/Icon.types.ts +40 -0
- package/src/icons/glyphs.json +39 -0
- package/src/icons/icon-color.ts +20 -0
- package/src/icons/index.native.ts +5 -0
- package/src/icons/index.ts +5 -0
- package/src/icons/paths.generated.ts +51 -0
- package/src/platform/test-id.ts +34 -0
- package/src/provider/UiProvider.native.tsx +13 -0
- package/src/provider/UiProvider.tsx +22 -0
- package/src/provider/UiProvider.types.ts +20 -0
- package/src/provider/index.native.ts +3 -0
- package/src/provider/index.ts +4 -0
- package/src/provider/mui-bridge.ts +141 -0
- package/src/provider/ui-theme-context.ts +13 -0
- package/src/provider/use-ui-theme.native.ts +9 -0
- package/src/provider/use-ui-theme.ts +18 -0
- package/src/tokens/color.ts +163 -0
- package/src/tokens/css-units.ts +28 -0
- package/src/tokens/heading-scale.ts +87 -0
- package/src/tokens/index.native.ts +9 -0
- package/src/tokens/scales.ts +11 -186
- package/src/tokens/theme.ts +334 -0
- package/src/tokens/typography.ts +6 -83
- package/src/tokens/vocabulary.ts +189 -0
- package/dist/chunk-7CA6GVBO.js.map +0 -1
- package/dist/chunk-AUYC5K5K.js.map +0 -1
- package/dist/chunk-I6PZVHIT.js +0 -46
- package/dist/chunk-I6PZVHIT.js.map +0 -1
- package/dist/chunk-IAQFQNBL.js.map +0 -1
- package/dist/chunk-NYUGX76C.js.map +0 -1
- package/dist/chunk-VRHBJXZ7.js.map +0 -1
- package/dist/chunk-VZO7VREP.js.map +0 -1
- /package/dist/{chunk-GFBNUWT5.js.map → chunk-2EKALM6P.js.map} +0 -0
- /package/dist/{chunk-ISW5K72V.js.map → chunk-2ZRZTGWP.js.map} +0 -0
- /package/dist/{chunk-3ORFVLI3.js.map → chunk-37YPZHAG.js.map} +0 -0
- /package/dist/{chunk-EB4BTKKY.js.map → chunk-3AFUWDYS.js.map} +0 -0
- /package/dist/{chunk-HR7YTBR7.js.map → chunk-3AOOI2NR.js.map} +0 -0
- /package/dist/{chunk-PKJKA4CU.js.map → chunk-3ZFORMNT.js.map} +0 -0
- /package/dist/{chunk-PLK7UGO6.js.map → chunk-4EJSUL62.js.map} +0 -0
- /package/dist/{chunk-WMALDOF5.js.map → chunk-4G3FGCWX.js.map} +0 -0
- /package/dist/{chunk-2PPWKCMW.js.map → chunk-4N4ENTF7.js.map} +0 -0
- /package/dist/{chunk-6CBYPMYQ.js.map → chunk-4R2CDZOQ.js.map} +0 -0
- /package/dist/{chunk-FJHNNSD3.js.map → chunk-4WK2RTVY.js.map} +0 -0
- /package/dist/{chunk-6U7NA74A.js.map → chunk-5HOJSVQH.js.map} +0 -0
- /package/dist/{chunk-QETBO7EC.js.map → chunk-67LDIJQZ.js.map} +0 -0
- /package/dist/{chunk-X4X4CVWJ.js.map → chunk-6JZE4IIN.js.map} +0 -0
- /package/dist/{chunk-LUWATXU4.js.map → chunk-74KMXBG3.js.map} +0 -0
- /package/dist/{chunk-ZDWU52DJ.js.map → chunk-7AR2R7TV.js.map} +0 -0
- /package/dist/{chunk-B6IURHSZ.js.map → chunk-7DNQHMDO.js.map} +0 -0
- /package/dist/{chunk-G7CFUI4I.js.map → chunk-7EESF76V.js.map} +0 -0
- /package/dist/{chunk-AX7UFG2U.js.map → chunk-7RZ4WOQW.js.map} +0 -0
- /package/dist/{chunk-WFX5GASM.js.map → chunk-B7BZAIHL.js.map} +0 -0
- /package/dist/{chunk-RX6DWIIW.js.map → chunk-BILE3A7F.js.map} +0 -0
- /package/dist/{chunk-XSKVBGCZ.js.map → chunk-BLBOYCOV.js.map} +0 -0
- /package/dist/{chunk-4Y65Q3CR.js.map → chunk-C52BELLW.js.map} +0 -0
- /package/dist/{chunk-RP3W6IQO.js.map → chunk-CPNSVIIB.js.map} +0 -0
- /package/dist/{chunk-T4SM36XC.js.map → chunk-D7FJ2GAD.js.map} +0 -0
- /package/dist/{chunk-SCGVB7DS.js.map → chunk-DOADQW7I.js.map} +0 -0
- /package/dist/{chunk-RIAIJTEW.js.map → chunk-DOMEYGTN.js.map} +0 -0
- /package/dist/{chunk-7HPPUO2A.js.map → chunk-DQHC5P64.js.map} +0 -0
- /package/dist/{chunk-W2UTDN4T.js.map → chunk-DWZ7FLA7.js.map} +0 -0
- /package/dist/{chunk-24LW52EU.js.map → chunk-DX527XPL.js.map} +0 -0
- /package/dist/{chunk-OK5BHFZE.js.map → chunk-E6OILRUU.js.map} +0 -0
- /package/dist/{chunk-A4YWFX5C.js.map → chunk-ENNW5SKT.js.map} +0 -0
- /package/dist/{chunk-BPYPUEM5.js.map → chunk-EPNCYUQ7.js.map} +0 -0
- /package/dist/{chunk-MUAVYVDJ.js.map → chunk-EW7ZNSWU.js.map} +0 -0
- /package/dist/{chunk-DWUMMMLR.js.map → chunk-FOMK3WPG.js.map} +0 -0
- /package/dist/{chunk-RQ4EQ5FJ.js.map → chunk-FP4R47TM.js.map} +0 -0
- /package/dist/{chunk-SHQWIDD5.js.map → chunk-GJQYM3PM.js.map} +0 -0
- /package/dist/{chunk-WEH5TCPE.js.map → chunk-GSTRPZS4.js.map} +0 -0
- /package/dist/{chunk-WC3W36AM.js.map → chunk-HOJL2GKW.js.map} +0 -0
- /package/dist/{chunk-PMFW55F5.js.map → chunk-HSAH5QUQ.js.map} +0 -0
- /package/dist/{chunk-A3KY6NUA.js.map → chunk-IH4CX43Q.js.map} +0 -0
- /package/dist/{chunk-HEDOL2RV.js.map → chunk-IJIT5HQP.js.map} +0 -0
- /package/dist/{chunk-VR5HDUBK.js.map → chunk-IPS55KWK.js.map} +0 -0
- /package/dist/{chunk-ELYLG4F7.js.map → chunk-J54WH74M.js.map} +0 -0
- /package/dist/{chunk-5ZOJLYD2.js.map → chunk-JE6RZ5L6.js.map} +0 -0
- /package/dist/{chunk-EY4LPLIR.js.map → chunk-KQ74QU55.js.map} +0 -0
- /package/dist/{chunk-XULTDO56.js.map → chunk-KT6HWAEN.js.map} +0 -0
- /package/dist/{chunk-COSJTD6Z.js.map → chunk-KZSKI2R3.js.map} +0 -0
- /package/dist/{chunk-DQIQKIEA.js.map → chunk-L5ZZJ4XE.js.map} +0 -0
- /package/dist/{chunk-SFAP5EH5.js.map → chunk-LUMF63BM.js.map} +0 -0
- /package/dist/{chunk-LIQHOLDQ.js.map → chunk-LYMAMKJT.js.map} +0 -0
- /package/dist/{chunk-6RFL7HGI.js.map → chunk-LZRURORY.js.map} +0 -0
- /package/dist/{chunk-KXNWDXR7.js.map → chunk-M2K7BPHX.js.map} +0 -0
- /package/dist/{chunk-WLDK74RR.js.map → chunk-MSUSZLRE.js.map} +0 -0
- /package/dist/{chunk-EE2LBAJH.js.map → chunk-MUVJD26L.js.map} +0 -0
- /package/dist/{chunk-VVXRIPV5.js.map → chunk-MY5VNNSP.js.map} +0 -0
- /package/dist/{chunk-JPDKRGYI.js.map → chunk-MZQTHSLN.js.map} +0 -0
- /package/dist/{chunk-FF55LRSV.js.map → chunk-NETZMGQP.js.map} +0 -0
- /package/dist/{chunk-3QGRQNTP.js.map → chunk-NFAKRI4S.js.map} +0 -0
- /package/dist/{chunk-KSF7TLXH.js.map → chunk-NHSMLVNC.js.map} +0 -0
- /package/dist/{chunk-HQJ75HHI.js.map → chunk-NYLXHOMR.js.map} +0 -0
- /package/dist/{chunk-CXA6UNFF.js.map → chunk-OH3YGJT5.js.map} +0 -0
- /package/dist/{chunk-45N6LXUU.js.map → chunk-OI3HOI74.js.map} +0 -0
- /package/dist/{chunk-REMK55JI.js.map → chunk-OLZTGVBT.js.map} +0 -0
- /package/dist/{chunk-M3RIC6JI.js.map → chunk-OQXOYHIV.js.map} +0 -0
- /package/dist/{chunk-3LO5JWTC.js.map → chunk-P5YYVDAD.js.map} +0 -0
- /package/dist/{chunk-6TYSEAAT.js.map → chunk-PC5FFEIY.js.map} +0 -0
- /package/dist/{chunk-SLYZMJEL.js.map → chunk-PHCSPHDH.js.map} +0 -0
- /package/dist/{chunk-TCAB2ERD.js.map → chunk-PNYXXLPU.js.map} +0 -0
- /package/dist/{chunk-IPE5FFFD.js.map → chunk-PUBPZOQJ.js.map} +0 -0
- /package/dist/{chunk-6HNEEJES.js.map → chunk-QRX5BYUQ.js.map} +0 -0
- /package/dist/{chunk-5QXSPLWU.js.map → chunk-R6SSXEK2.js.map} +0 -0
- /package/dist/{chunk-NR3J7VQL.js.map → chunk-RNCQ5KHQ.js.map} +0 -0
- /package/dist/{chunk-7FOOLP5H.js.map → chunk-RXSGHPCR.js.map} +0 -0
- /package/dist/{chunk-Z56IO7OV.js.map → chunk-RXVPUW7V.js.map} +0 -0
- /package/dist/{chunk-5SYD23V4.js.map → chunk-SKZHOWTS.js.map} +0 -0
- /package/dist/{chunk-FWL2N2KH.js.map → chunk-SX3V2DLV.js.map} +0 -0
- /package/dist/{chunk-3GOX75ZM.js.map → chunk-TF4TPLF2.js.map} +0 -0
- /package/dist/{chunk-3DQP6OPC.js.map → chunk-THBT56JE.js.map} +0 -0
- /package/dist/{chunk-DGMR3IMM.js.map → chunk-U7RULTSH.js.map} +0 -0
- /package/dist/{chunk-RRX6ZTNX.js.map → chunk-UEJQQVP2.js.map} +0 -0
- /package/dist/{chunk-O3OU2PPT.js.map → chunk-UQHJQ26Y.js.map} +0 -0
- /package/dist/{chunk-WR6F6J43.js.map → chunk-V662PA6T.js.map} +0 -0
- /package/dist/{chunk-VJKRJYZL.js.map → chunk-VEFDL77X.js.map} +0 -0
- /package/dist/{chunk-GT7C6TSM.js.map → chunk-VNEEXUWA.js.map} +0 -0
- /package/dist/{chunk-N34YHFZW.js.map → chunk-W2YNUUVJ.js.map} +0 -0
- /package/dist/{chunk-N4WANJI3.js.map → chunk-WBVHRLIS.js.map} +0 -0
- /package/dist/{chunk-MHFJBNDP.js.map → chunk-WO52KYSU.js.map} +0 -0
- /package/dist/{chunk-ENK4XGKF.js.map → chunk-WUPVHIMD.js.map} +0 -0
- /package/dist/{chunk-KNNBIXWJ.js.map → chunk-WX7VWW3W.js.map} +0 -0
- /package/dist/{chunk-TUAIPMU7.js.map → chunk-X5BHPSAC.js.map} +0 -0
- /package/dist/{chunk-TPUIIZN2.js.map → chunk-XKMFIH27.js.map} +0 -0
- /package/dist/{chunk-T53L42XW.js.map → chunk-XSJWN3WH.js.map} +0 -0
- /package/dist/{chunk-AVU6KU27.js.map → chunk-XXDXW6TX.js.map} +0 -0
- /package/dist/{chunk-45OIUWGO.js.map → chunk-YNQGXSDD.js.map} +0 -0
- /package/dist/{chunk-5VVM2PPV.js.map → chunk-ZEBJT5JZ.js.map} +0 -0
- /package/dist/{chunk-DJORMYOV.js.map → chunk-ZU3SWR4I.js.map} +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
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 PressableStateCallbackType,
|
|
13
|
+
type StyleProp,
|
|
14
|
+
type TextStyle,
|
|
15
|
+
type ViewStyle,
|
|
16
|
+
} from 'react-native';
|
|
17
|
+
|
|
18
|
+
import { resolveButtonProps } from './Button.helpers';
|
|
19
|
+
import {
|
|
20
|
+
BUTTON_FONT_WEIGHT,
|
|
21
|
+
BUTTON_ICON_GAP_UNITS,
|
|
22
|
+
BUTTON_LINE_HEIGHT,
|
|
23
|
+
BUTTON_RADIUS_UNITS,
|
|
24
|
+
BUTTON_SIZES,
|
|
25
|
+
BUTTON_SPINNER_SIZE,
|
|
26
|
+
BUTTON_WASH_ALPHA,
|
|
27
|
+
GLASS_BACKGROUND_ALPHA,
|
|
28
|
+
GLASS_BACKGROUND_ALPHA_PRESSED,
|
|
29
|
+
GLASS_BORDER_ALPHA,
|
|
30
|
+
GLOW_INNER_ALPHA,
|
|
31
|
+
GLOW_RADIUS,
|
|
32
|
+
ICON_ONLY_PADDING,
|
|
33
|
+
PULSE_ALPHA,
|
|
34
|
+
PULSE_DURATION_MS,
|
|
35
|
+
PULSE_SPREAD,
|
|
36
|
+
buttonPalette,
|
|
37
|
+
gradientStops,
|
|
38
|
+
quietInk,
|
|
39
|
+
} from './Button.metrics';
|
|
40
|
+
import type { ButtonProps, ButtonVariant } from './Button.types.native';
|
|
41
|
+
import { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
42
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
43
|
+
import { alpha } from '../../../tokens/color';
|
|
44
|
+
import type { ColorValue, SizeValue } from '../../../tokens/vocabulary';
|
|
45
|
+
import type { UiPaletteColor, UiTheme } from '../../../tokens/theme';
|
|
46
|
+
|
|
47
|
+
/** MUI's `min-width` for a button that carries a label. */
|
|
48
|
+
const MIN_WIDTH = 64;
|
|
49
|
+
|
|
50
|
+
interface Paint {
|
|
51
|
+
container: ViewStyle;
|
|
52
|
+
pressed: ViewStyle;
|
|
53
|
+
label: TextStyle;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* What the web's `VARIANT_STYLES` paint, as three React Native styles: at rest,
|
|
58
|
+
* while pressed (the web's `:hover`, which touch has no equivalent of), and the
|
|
59
|
+
* label. Same palette arithmetic, same alphas.
|
|
60
|
+
*
|
|
61
|
+
* `gradient` is the one honest gap: React Native core has no gradient fill, so
|
|
62
|
+
* it paints the gradient's first stop. A host wanting the real thing adds a
|
|
63
|
+
* gradient library; the parity ledger records this.
|
|
64
|
+
*/
|
|
65
|
+
function paintFor(
|
|
66
|
+
theme: UiTheme,
|
|
67
|
+
variant: ButtonVariant,
|
|
68
|
+
color: ColorValue,
|
|
69
|
+
palette: UiPaletteColor,
|
|
70
|
+
active: boolean,
|
|
71
|
+
): Paint {
|
|
72
|
+
const wash = alpha(palette.main, BUTTON_WASH_ALPHA);
|
|
73
|
+
switch (variant) {
|
|
74
|
+
case 'outline':
|
|
75
|
+
return {
|
|
76
|
+
container: { backgroundColor: 'transparent', borderWidth: 1, borderColor: palette.main },
|
|
77
|
+
pressed: { backgroundColor: wash, borderColor: palette.dark },
|
|
78
|
+
label: { color: palette.main },
|
|
79
|
+
};
|
|
80
|
+
case 'ghost':
|
|
81
|
+
return {
|
|
82
|
+
container: { backgroundColor: 'transparent' },
|
|
83
|
+
pressed: { backgroundColor: wash },
|
|
84
|
+
label: { color: quietInk(theme, palette) },
|
|
85
|
+
};
|
|
86
|
+
case 'text':
|
|
87
|
+
return {
|
|
88
|
+
container: { backgroundColor: active ? wash : 'transparent' },
|
|
89
|
+
pressed: { backgroundColor: wash },
|
|
90
|
+
label: { color: quietInk(theme, palette) },
|
|
91
|
+
};
|
|
92
|
+
case 'glass':
|
|
93
|
+
return {
|
|
94
|
+
container: {
|
|
95
|
+
backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA),
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
borderColor: alpha(theme.palette.divider, GLASS_BORDER_ALPHA),
|
|
98
|
+
},
|
|
99
|
+
pressed: { backgroundColor: alpha(theme.palette.background.paper, GLASS_BACKGROUND_ALPHA_PRESSED) },
|
|
100
|
+
label: { color: palette.main },
|
|
101
|
+
};
|
|
102
|
+
case 'gradient': {
|
|
103
|
+
const [from, to] = gradientStops(theme, color, palette);
|
|
104
|
+
return {
|
|
105
|
+
container: { backgroundColor: from },
|
|
106
|
+
pressed: { backgroundColor: to },
|
|
107
|
+
label: { color: '#fff' },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
default:
|
|
111
|
+
return {
|
|
112
|
+
container: { backgroundColor: palette.main },
|
|
113
|
+
pressed: { backgroundColor: palette.dark },
|
|
114
|
+
label: { color: palette.contrastText || '#fff' },
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** MUI's disabled treatment per variant family, so a disabled button reads as one on both sides. */
|
|
120
|
+
function disabledPaint(theme: UiTheme, variant: ButtonVariant): Paint {
|
|
121
|
+
const filled = variant === 'solid' || variant === 'gradient' || variant === 'glass';
|
|
122
|
+
return {
|
|
123
|
+
container: filled
|
|
124
|
+
? { backgroundColor: theme.palette.action.disabledBackground, borderWidth: 0 }
|
|
125
|
+
: variant === 'outline'
|
|
126
|
+
? { backgroundColor: 'transparent', borderWidth: 1, borderColor: theme.palette.action.disabledBackground }
|
|
127
|
+
: { backgroundColor: 'transparent' },
|
|
128
|
+
pressed: {},
|
|
129
|
+
label: { color: theme.palette.action.disabled },
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function sizeStyle(theme: UiTheme, size: SizeValue, iconOnly: boolean, hasIcon: boolean): ViewStyle {
|
|
134
|
+
const metrics = BUTTON_SIZES[size];
|
|
135
|
+
if (iconOnly) {
|
|
136
|
+
return { padding: ICON_ONLY_PADDING[size], minWidth: 0 };
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
paddingVertical: metrics.paddingVertical,
|
|
140
|
+
paddingHorizontal: metrics.paddingHorizontal,
|
|
141
|
+
minWidth: MIN_WIDTH,
|
|
142
|
+
gap: hasIcon ? theme.spacing(BUTTON_ICON_GAP_UNITS) : undefined,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function glowStyle(palette: UiPaletteColor): ViewStyle {
|
|
147
|
+
return Platform.select<ViewStyle>({
|
|
148
|
+
android: { elevation: 8 },
|
|
149
|
+
default: {
|
|
150
|
+
shadowColor: palette.main,
|
|
151
|
+
shadowOpacity: GLOW_INNER_ALPHA,
|
|
152
|
+
shadowRadius: GLOW_RADIUS,
|
|
153
|
+
shadowOffset: { width: 0, height: 0 },
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** The web's `::after` pulse ring: a looped scale-and-fade behind the button. */
|
|
159
|
+
function Pulse({ color, radius, testID }: { color: string; radius: number; testID: string }): React.JSX.Element {
|
|
160
|
+
const progress = React.useRef(new Animated.Value(0)).current;
|
|
161
|
+
|
|
162
|
+
React.useEffect(() => {
|
|
163
|
+
const loop = Animated.loop(
|
|
164
|
+
Animated.timing(progress, {
|
|
165
|
+
toValue: 1,
|
|
166
|
+
duration: PULSE_DURATION_MS,
|
|
167
|
+
easing: Easing.out(Easing.ease),
|
|
168
|
+
useNativeDriver: Platform.OS !== 'web',
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
loop.start();
|
|
172
|
+
return () => loop.stop();
|
|
173
|
+
}, [progress]);
|
|
174
|
+
|
|
175
|
+
return (
|
|
176
|
+
<Animated.View
|
|
177
|
+
testID={testID}
|
|
178
|
+
aria-hidden
|
|
179
|
+
style={[
|
|
180
|
+
StyleSheet.absoluteFill,
|
|
181
|
+
{
|
|
182
|
+
pointerEvents: 'none',
|
|
183
|
+
borderRadius: radius,
|
|
184
|
+
backgroundColor: color,
|
|
185
|
+
opacity: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [PULSE_ALPHA, 0, 0] }),
|
|
186
|
+
transform: [
|
|
187
|
+
{ scale: progress.interpolate({ inputRange: [0, 0.7, 1], outputRange: [1, 1 + PULSE_SPREAD / 40, 1] }) },
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
]}
|
|
191
|
+
/>
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* A string or number child is the label and gets the label style; anything
|
|
197
|
+
* else is rendered as given. No test id of its own: the web puts none on the
|
|
198
|
+
* label, and a shared story that counts `/perf-button-/` must count buttons.
|
|
199
|
+
*/
|
|
200
|
+
function renderChildren(children: React.ReactNode, label: TextStyle): React.ReactNode {
|
|
201
|
+
return React.Children.map(children, (child) =>
|
|
202
|
+
typeof child === 'string' || typeof child === 'number' ? (
|
|
203
|
+
<RNText style={label} numberOfLines={1}>
|
|
204
|
+
{child}
|
|
205
|
+
</RNText>
|
|
206
|
+
) : (
|
|
207
|
+
child
|
|
208
|
+
),
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
type ResolvedProps = ReturnType<typeof resolveButtonProps<ButtonProps>>;
|
|
213
|
+
|
|
214
|
+
interface ButtonLook {
|
|
215
|
+
inactive: boolean;
|
|
216
|
+
palette: UiPaletteColor;
|
|
217
|
+
radius: number;
|
|
218
|
+
label: TextStyle;
|
|
219
|
+
container: (state: PressableStateCallbackType) => StyleProp<ViewStyle>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Everything the button paints, decided once per render from the resolved
|
|
224
|
+
* props and the theme. Kept out of the component so the component reads as
|
|
225
|
+
* structure — what renders where — and this reads as arithmetic.
|
|
226
|
+
*/
|
|
227
|
+
function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
228
|
+
const { variant, color, size, loading, icon, children, glow, pulse, active, disabled, style } = props;
|
|
229
|
+
const palette = buttonPalette(theme, color);
|
|
230
|
+
const iconOnly = !loading && icon != null && children == null;
|
|
231
|
+
const inactive = Boolean(disabled) || loading;
|
|
232
|
+
const paint = inactive ? disabledPaint(theme, variant) : paintFor(theme, variant, color, palette, active);
|
|
233
|
+
const radius = theme.spacing(BUTTON_RADIUS_UNITS);
|
|
234
|
+
const metrics = BUTTON_SIZES[size];
|
|
235
|
+
// The web button is `overflow: hidden` (its ripple needs it) unless the pulse
|
|
236
|
+
// ring turns it visible; on native the glow's shadow needs it visible too,
|
|
237
|
+
// because a view's own shadow is clipped by its own overflow there.
|
|
238
|
+
const overflow: ViewStyle['overflow'] = pulse || glow ? 'visible' : 'hidden';
|
|
239
|
+
const sized = sizeStyle(theme, size, iconOnly, icon != null && !loading);
|
|
240
|
+
const glowing = glow && !inactive ? glowStyle(palette) : null;
|
|
241
|
+
|
|
242
|
+
return {
|
|
243
|
+
inactive,
|
|
244
|
+
palette,
|
|
245
|
+
radius,
|
|
246
|
+
label: {
|
|
247
|
+
fontFamily: theme.typography.fontFamily,
|
|
248
|
+
fontSize: metrics.fontSize,
|
|
249
|
+
lineHeight: metrics.fontSize * BUTTON_LINE_HEIGHT,
|
|
250
|
+
fontWeight: String(BUTTON_FONT_WEIGHT) as TextStyle['fontWeight'],
|
|
251
|
+
textAlign: 'center',
|
|
252
|
+
...paint.label,
|
|
253
|
+
},
|
|
254
|
+
container: (state) => [
|
|
255
|
+
styles.base,
|
|
256
|
+
{ borderRadius: radius, overflow },
|
|
257
|
+
sized,
|
|
258
|
+
paint.container,
|
|
259
|
+
state.pressed && !inactive ? paint.pressed : null,
|
|
260
|
+
glowing,
|
|
261
|
+
style,
|
|
262
|
+
],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** The spinner that replaces the label while loading; `role` comes from react-native's ActivityIndicator. */
|
|
267
|
+
function Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {
|
|
268
|
+
return (
|
|
269
|
+
<ActivityIndicator
|
|
270
|
+
size={Platform.OS === 'ios' ? 'small' : BUTTON_SPINNER_SIZE}
|
|
271
|
+
color={color}
|
|
272
|
+
testID={testID}
|
|
273
|
+
accessibilityLabel="loading"
|
|
274
|
+
/>
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
279
|
+
const resolved = resolveButtonProps(rawProps);
|
|
280
|
+
const { loading, icon, iconPosition, pulse, ripple, children, onClick, onPress, ...others } = resolved;
|
|
281
|
+
const theme = useUiTheme();
|
|
282
|
+
const look = buttonLook(theme, resolved);
|
|
283
|
+
|
|
284
|
+
// The shared stories pass `'data-testid'` as a plain prop; honour it here and
|
|
285
|
+
// keep all three spellings off the element (react-native-web would drop them).
|
|
286
|
+
const testId = resolveTestId(others, 'button');
|
|
287
|
+
const idFor = (suffix: string) => childTestId(others, suffix, 'button');
|
|
288
|
+
const rest = withoutTestIdProps(others);
|
|
289
|
+
// `buttonLook` consumed these; they are not Pressable props.
|
|
290
|
+
const { variant: _v, color: _c, size: _s, glow: _g, active: _a, disabled: _d, style: _st, ...pressable } = rest;
|
|
291
|
+
|
|
292
|
+
const handlePress = (event: GestureResponderEvent): void => {
|
|
293
|
+
onClick?.(event);
|
|
294
|
+
onPress?.(event);
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
const iconNode =
|
|
298
|
+
!loading && icon ? (
|
|
299
|
+
<View style={styles.icon} testID={idFor('icon')}>
|
|
300
|
+
{icon}
|
|
301
|
+
</View>
|
|
302
|
+
) : null;
|
|
303
|
+
|
|
304
|
+
return (
|
|
305
|
+
<Pressable
|
|
306
|
+
ref={ref}
|
|
307
|
+
role="button"
|
|
308
|
+
aria-disabled={look.inactive}
|
|
309
|
+
aria-busy={loading}
|
|
310
|
+
disabled={look.inactive}
|
|
311
|
+
onPress={handlePress}
|
|
312
|
+
android_ripple={ripple && !look.inactive ? { color: alpha(look.palette.main, 0.2), borderless: false } : undefined}
|
|
313
|
+
style={look.container}
|
|
314
|
+
testID={testId}
|
|
315
|
+
{...pressable}
|
|
316
|
+
>
|
|
317
|
+
{pulse && !look.inactive ? <Pulse color={look.palette.main} radius={look.radius} testID={idFor('pulse')} /> : null}
|
|
318
|
+
{iconPosition === 'left' ? iconNode : null}
|
|
319
|
+
{loading ? <Spinner color={look.label.color as string} testID={idFor('loading')} /> : renderChildren(children, look.label)}
|
|
320
|
+
{iconPosition === 'right' ? iconNode : null}
|
|
321
|
+
</Pressable>
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
Button.displayName = 'Button';
|
|
326
|
+
|
|
327
|
+
const styles = StyleSheet.create({
|
|
328
|
+
base: {
|
|
329
|
+
flexDirection: 'row',
|
|
330
|
+
alignItems: 'center',
|
|
331
|
+
justifyContent: 'center',
|
|
332
|
+
alignSelf: 'flex-start',
|
|
333
|
+
position: 'relative',
|
|
334
|
+
},
|
|
335
|
+
icon: {
|
|
336
|
+
alignItems: 'center',
|
|
337
|
+
justifyContent: 'center',
|
|
338
|
+
},
|
|
339
|
+
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { alpha, darken, keyframes, lighten } from '@mui/material/styles/index.js';
|
|
2
2
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
|
+
import { BUTTON_SIZES, ICON_ONLY_PADDING as ICON_ONLY_PADDING_PX } from './Button.metrics';
|
|
5
|
+
import { px } from '../../../tokens/theme';
|
|
6
|
+
|
|
4
7
|
// Define pulse animation globally
|
|
5
8
|
const pulseAnimation = keyframes`
|
|
6
9
|
0% {
|
|
@@ -62,16 +65,17 @@ export const getColorFromTheme = (theme: Theme, color: string): ColorPalette =>
|
|
|
62
65
|
};
|
|
63
66
|
};
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
// Derived from `Button.metrics.ts`, which the native `Button` reads too — one
|
|
69
|
+
// table, so a size cannot differ between the renderers.
|
|
70
|
+
const SIZE_MAP: Record<string, CSSObject> = Object.fromEntries(
|
|
71
|
+
Object.entries(BUTTON_SIZES).map(([size, m]) => [
|
|
72
|
+
size,
|
|
73
|
+
{ padding: `${m.paddingVertical}px ${m.paddingHorizontal}px`, fontSize: px(m.fontSize) },
|
|
74
|
+
]),
|
|
75
|
+
);
|
|
67
76
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
sm: { padding: '6px 12px', fontSize: '0.875rem' },
|
|
71
|
-
md: DEFAULT_SIZE,
|
|
72
|
-
lg: { padding: '10px 20px', fontSize: '1.125rem' },
|
|
73
|
-
xl: { padding: '12px 24px', fontSize: '1.25rem' },
|
|
74
|
-
};
|
|
77
|
+
/** What an unrecognised size falls back to, named so indexing can never be undefined. */
|
|
78
|
+
const DEFAULT_SIZE: CSSObject = SIZE_MAP.md as CSSObject;
|
|
75
79
|
|
|
76
80
|
/**
|
|
77
81
|
* A BUTTON THAT IS ONLY AN ICON IS SQUARE.
|
|
@@ -86,13 +90,9 @@ const SIZE_MAP: Record<string, CSSObject> = {
|
|
|
86
90
|
* Derived, not declared: a button with an `icon` and no children can only be an
|
|
87
91
|
* icon button, so no consumer has to opt in and none can forget to.
|
|
88
92
|
*/
|
|
89
|
-
const ICON_ONLY_PADDING: Record<string, string> =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
md: '7px',
|
|
93
|
-
lg: '9px',
|
|
94
|
-
xl: '11px',
|
|
95
|
-
};
|
|
93
|
+
const ICON_ONLY_PADDING: Record<string, string> = Object.fromEntries(
|
|
94
|
+
Object.entries(ICON_ONLY_PADDING_PX).map(([size, padding]) => [size, `${padding}px`]),
|
|
95
|
+
);
|
|
96
96
|
|
|
97
97
|
const iconOnlySize = (size: string): CSSObject => ({
|
|
98
98
|
minWidth: 0,
|
|
@@ -4,6 +4,7 @@ import { styled } from '@mui/material/styles/index.js';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
import { resolveButtonProps } from './Button.helpers';
|
|
7
|
+
import { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
7
8
|
import {
|
|
8
9
|
buttonEmphasisStyles,
|
|
9
10
|
buttonVariantStyles,
|
|
@@ -88,11 +89,13 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
88
89
|
onClick,
|
|
89
90
|
onFocus,
|
|
90
91
|
onBlur,
|
|
91
|
-
|
|
92
|
-
...props
|
|
92
|
+
...others
|
|
93
93
|
} = resolveButtonProps(rawProps);
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
// Every spelling of the test id the shared contract allows, mapped to the
|
|
95
|
+
// one the DOM reads; the native Button does the same in reverse.
|
|
96
|
+
const ownTestId = resolveTestId(others, 'button');
|
|
97
|
+
const testId = (suffix: string) => childTestId(others, suffix, 'button');
|
|
98
|
+
const props = withoutTestIdProps(others);
|
|
96
99
|
|
|
97
100
|
// Wrap icon with testId if provided
|
|
98
101
|
const iconWithTestId =
|
|
@@ -122,7 +125,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
122
125
|
onFocus={onFocus}
|
|
123
126
|
onBlur={onBlur}
|
|
124
127
|
sx={buttonSize(size, iconOnly)}
|
|
125
|
-
data-testid={
|
|
128
|
+
data-testid={ownTestId}
|
|
126
129
|
{...props}
|
|
127
130
|
className={mergedClassName}
|
|
128
131
|
>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GestureResponderEvent,
|
|
3
|
+
NativeSyntheticEvent,
|
|
4
|
+
PressableProps,
|
|
5
|
+
StyleProp,
|
|
6
|
+
TargetedEvent,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
import type { ButtonBaseProps } from './Button.base';
|
|
11
|
+
|
|
12
|
+
export type { ButtonBaseProps, ButtonVariant } from './Button.base';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The native `Button`. `onClick` keeps its web name — the 179 call sites in
|
|
16
|
+
* the origin apps spell it that way and a shared screen should not have to
|
|
17
|
+
* know which renderer it is on — and `onPress` is accepted too, because that is
|
|
18
|
+
* what a React Native developer will reach for. Both fire.
|
|
19
|
+
*/
|
|
20
|
+
export type ButtonProps = ButtonBaseProps &
|
|
21
|
+
Omit<PressableProps, keyof ButtonBaseProps | 'style' | 'onPress' | 'onFocus' | 'onBlur'> & {
|
|
22
|
+
onClick?: (event: GestureResponderEvent) => void;
|
|
23
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
24
|
+
onFocus?: (event: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
25
|
+
onBlur?: (event: NativeSyntheticEvent<TargetedEvent>) => void;
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
};
|
|
@@ -1,75 +1,25 @@
|
|
|
1
|
-
import type { ColorValue, SizeValue } from '../../../tokens/scales';
|
|
2
1
|
import type { ButtonProps as MuiButtonProps } from '@mui/material/Button/index.js';
|
|
3
2
|
import type * as React from 'react';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The variant of the button
|
|
8
|
-
*/
|
|
9
|
-
variant?: 'solid' | 'outline' | 'ghost' | 'text' | 'glass' | 'gradient';
|
|
4
|
+
import type { ButtonBaseProps } from './Button.base';
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
* The color of the button
|
|
13
|
-
*/
|
|
14
|
-
color?: ColorValue;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The size of the button
|
|
18
|
-
*/
|
|
19
|
-
size?: SizeValue;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Whether the button is in loading state
|
|
23
|
-
*/
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Icon to display in the button
|
|
28
|
-
*/
|
|
29
|
-
icon?: React.ReactNode;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Position of the icon
|
|
33
|
-
*/
|
|
34
|
-
iconPosition?: 'left' | 'right';
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Whether the button should have a glow effect
|
|
38
|
-
*/
|
|
39
|
-
glow?: boolean;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Whether the button should have a pulse animation
|
|
43
|
-
*/
|
|
44
|
-
pulse?: boolean;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Whether to show ripple effect on click
|
|
48
|
-
*/
|
|
49
|
-
ripple?: boolean;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Whether the button is in active state
|
|
53
|
-
*/
|
|
54
|
-
active?: boolean;
|
|
6
|
+
export type { ButtonBaseProps, ButtonVariant } from './Button.base';
|
|
55
7
|
|
|
8
|
+
export interface ButtonProps
|
|
9
|
+
extends ButtonBaseProps,
|
|
10
|
+
Omit<MuiButtonProps, 'variant' | 'color' | 'size' | keyof ButtonBaseProps> {
|
|
56
11
|
/**
|
|
57
12
|
* Click handler
|
|
58
13
|
*/
|
|
59
14
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
60
|
-
|
|
15
|
+
|
|
61
16
|
/**
|
|
62
17
|
* Focus handler
|
|
63
18
|
*/
|
|
64
19
|
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
65
|
-
|
|
20
|
+
|
|
66
21
|
/**
|
|
67
22
|
* Blur handler
|
|
68
23
|
*/
|
|
69
24
|
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Test ID for testing purposes
|
|
73
|
-
*/
|
|
74
|
-
dataTestId?: string;
|
|
75
|
-
}
|
|
25
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Button } from './Button';
|
|
2
|
-
export type { ButtonProps } from './Button.types';
|
|
2
|
+
export type { ButtonBaseProps, ButtonProps, ButtonVariant } from './Button.types';
|
|
@@ -85,7 +85,7 @@ Default layout with fields stacked vertically:
|
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### Horizontal Layout
|
|
88
|
-
|
|
88
|
+
Intended to put labels beside their inputs:
|
|
89
89
|
```tsx
|
|
90
90
|
<Form variant="horizontal">
|
|
91
91
|
<FormField name="field1" label="Field 1">
|
|
@@ -94,6 +94,13 @@ Labels positioned horizontally beside inputs:
|
|
|
94
94
|
</Form>
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
+
> **Not wired up yet.** `Form` accepts the variant, but nothing carries it down
|
|
98
|
+
> to `FormField` — `FormFieldProps` has no `variant` — so a horizontal form
|
|
99
|
+
> currently draws ordinary vertical rows. The field's styled wrapper still
|
|
100
|
+
> keeps the horizontal branch, scoped to the column axis (see
|
|
101
|
+
> [Row spacing](#row-spacing)), so wiring it up later is a wiring job rather
|
|
102
|
+
> than a re-derivation of the spacing.
|
|
103
|
+
|
|
97
104
|
### Inline Layout
|
|
98
105
|
All elements in a single row:
|
|
99
106
|
```tsx
|
|
@@ -103,6 +110,44 @@ All elements in a single row:
|
|
|
103
110
|
</Form>
|
|
104
111
|
```
|
|
105
112
|
|
|
113
|
+
## Row spacing
|
|
114
|
+
|
|
115
|
+
A label sits **4px** above its control, and exactly one thing puts it there:
|
|
116
|
+
`FormLabel`'s own `marginBottom` (`theme.spacing(0.5)`). `FormMessage` mirrors it
|
|
117
|
+
with the same 4px `marginTop` below the control, so a row reads 4 / control / 4.
|
|
118
|
+
|
|
119
|
+
`FormField` deliberately adds **nothing** to that. It used to: the wrapper was a
|
|
120
|
+
flex column with `gap: theme.spacing(1)`, and in a column a gap and a margin add
|
|
121
|
+
up — 8 + 4 = 12px, three times what every other user of `FormLabel` draws.
|
|
122
|
+
`CepField`, `CategorySelect`, `CreatableSelect`, the `total-form` fields and
|
|
123
|
+
`@12-apps/discounts`' builders all put a bare `FormLabel` straight inside a
|
|
124
|
+
`FormControl`, which has no gap of its own, so the label's margin is the whole
|
|
125
|
+
of their spacing at 4px. `FormField` was the only one of them that disagreed.
|
|
126
|
+
|
|
127
|
+
That is a claim about `FormLabel`'s callers, not about every labelled control in
|
|
128
|
+
the package: `Textarea` labels itself through MUI's `InputLabel` at
|
|
129
|
+
`theme.spacing(1)` and draws 8px. It shares no code with `FormLabel`, so it is a
|
|
130
|
+
separate inconsistency — worth settling one day, and no argument for keeping a
|
|
131
|
+
second spacing mechanism here.
|
|
132
|
+
|
|
133
|
+
Eight pixels a row is invisible on one field and decisive on six. Measured in
|
|
134
|
+
Chromium at 320x568 — the smallest supported viewport — a six-field address form
|
|
135
|
+
put its submit button 41px below the fold.
|
|
136
|
+
|
|
137
|
+
**There is no `spacing` prop, and that is the answer rather than an omission.**
|
|
138
|
+
A knob here would be a second place to state a decision that already has one, and
|
|
139
|
+
its default would have to be the 4px every other `FormLabel` row draws — so the
|
|
140
|
+
only thing it would buy is the ability to disagree with them. A row that
|
|
141
|
+
genuinely needs more air gets it from the container: `Form`'s own `spacing` sets
|
|
142
|
+
the distance *between* fields, and a caller composing `FormControl` +
|
|
143
|
+
`FormLabel` by hand can space them however it likes.
|
|
144
|
+
|
|
145
|
+
`variant="horizontal"` keeps a `columnGap` rather than a `gap`. That branch is
|
|
146
|
+
unreachable today (see [Horizontal Layout](#horizontal-layout)), and the axis is
|
|
147
|
+
the reason it is kept rather than deleted: with the label beside the control a
|
|
148
|
+
horizontal gap and a vertical margin are orthogonal, where a `gap` shorthand
|
|
149
|
+
would put the 8px straight back on the row axis as soon as a field wrapped.
|
|
150
|
+
|
|
106
151
|
## Validation
|
|
107
152
|
|
|
108
153
|
Display validation errors and helper text:
|
|
@@ -54,6 +54,45 @@ export const Form = React.forwardRef<HTMLFormElement, FormProps>(
|
|
|
54
54
|
|
|
55
55
|
Form.displayName = 'Form';
|
|
56
56
|
|
|
57
|
+
/**
|
|
58
|
+
* NO ROW GAP HERE, and that is the fix rather than an omission.
|
|
59
|
+
*
|
|
60
|
+
* `FormLabel` already carries `marginBottom: theme.spacing(0.5)` — 4px — and it
|
|
61
|
+
* carries it because it has to: every OTHER user of it (`CepField`,
|
|
62
|
+
* `CategorySelect`, `CreatableSelect`, the three `total-form` fields, five of
|
|
63
|
+
* `@12-apps/discounts`' builders and the host's own `currency-field`) puts a
|
|
64
|
+
* bare `FormLabel` straight inside a `FormControl`, which is a plain block box
|
|
65
|
+
* with no gap of its own. There, the label's own margin is the ONLY thing
|
|
66
|
+
* between the label and the control.
|
|
67
|
+
*
|
|
68
|
+
* A `gap: theme.spacing(1)` here was a second mechanism for that one job, and in
|
|
69
|
+
* a column the two ADD: 8px + 4px put `FormField` at 12px where every one of
|
|
70
|
+
* those siblings sits at 4px. Measured in Chromium at 320x568 on a consuming
|
|
71
|
+
* app's six-field delivery address form, the 8px a row it added pushed the
|
|
72
|
+
* submit button from 561px to 609px — 41px below the fold of the smallest
|
|
73
|
+
* supported phone, i.e. a checkout whose primary action is off-screen.
|
|
74
|
+
*
|
|
75
|
+
* That claim is about `FormLabel`'s own callers, not about the whole package:
|
|
76
|
+
* `Textarea` labels its control through MUI's `InputLabel` at
|
|
77
|
+
* `theme.spacing(1)` and still draws 8px. It composes nothing out of
|
|
78
|
+
* `FormLabel`, so it is a separate inconsistency rather than a reason to keep
|
|
79
|
+
* a second spacing here.
|
|
80
|
+
*
|
|
81
|
+
* ## The `columnGap` is scaffolding, and currently unreachable
|
|
82
|
+
*
|
|
83
|
+
* `FormFieldProps` has no `variant` and `FormField` passes none, so `variant`
|
|
84
|
+
* is ALWAYS undefined and every branch below resolves to the vertical shape.
|
|
85
|
+
* `Form` accepts `variant="horizontal"` and `Form.md` documents it as "labels
|
|
86
|
+
* beside inputs", but nothing carries that variant down to the field — so a
|
|
87
|
+
* horizontal form draws vertical rows today. That gap is older than this
|
|
88
|
+
* change and fixing it is a feature, not a spacing fix.
|
|
89
|
+
*
|
|
90
|
+
* The branch is kept, scoped to the COLUMN axis, so that whoever does wire it
|
|
91
|
+
* up inherits the right answer: with the label beside the control, a horizontal
|
|
92
|
+
* gap and a vertical margin are orthogonal and nothing double-counts. A `gap`
|
|
93
|
+
* shorthand there would put the 8px back on the row axis the moment a field
|
|
94
|
+
* wrapped.
|
|
95
|
+
*/
|
|
57
96
|
const StyledFormField = styled(Box, {
|
|
58
97
|
shouldForwardProp: (prop) => prop !== 'variant',
|
|
59
98
|
})<{ variant?: 'vertical' | 'horizontal' }>(
|
|
@@ -61,7 +100,7 @@ const StyledFormField = styled(Box, {
|
|
|
61
100
|
display: variant === 'horizontal' ? 'grid' : 'flex',
|
|
62
101
|
flexDirection: variant === 'horizontal' ? undefined : 'column',
|
|
63
102
|
gridTemplateColumns: variant === 'horizontal' ? '200px 1fr' : undefined,
|
|
64
|
-
|
|
103
|
+
columnGap: variant === 'horizontal' ? theme.spacing(1) : undefined,
|
|
65
104
|
alignItems: variant === 'horizontal' ? 'center' : undefined,
|
|
66
105
|
}),
|
|
67
106
|
);
|