@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,69 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { UiPaletteKey, UiTheme } from '../../../tokens/theme';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* THE LAYOUT PRIMITIVE BOTH RENDERERS SHARE.
|
|
7
|
+
*
|
|
8
|
+
* Half of every screen in the origin apps is `@12-apps/ui/mui/Box` with an `sx`
|
|
9
|
+
* — raw MUI, which no native renderer can ever answer to. This `Box` is the
|
|
10
|
+
* one a screen meant for both platforms writes instead: a fixed set of layout
|
|
11
|
+
* props on the spacing scale, resolved by `box-layout.ts` into the same
|
|
12
|
+
* numbers on each side. `p={2}` is 16px on the web and 16dp on native, because
|
|
13
|
+
* both are `theme.spacing(2)`.
|
|
14
|
+
*
|
|
15
|
+
* Spacing props are in SPACING UNITS, exactly as MUI's own `Box` reads them.
|
|
16
|
+
*/
|
|
17
|
+
export type BoxDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
18
|
+
export type BoxAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
19
|
+
export type BoxJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
20
|
+
export type BoxBackground = 'default' | 'paper' | 'transparent' | UiPaletteKey;
|
|
21
|
+
export type BoxRadius = keyof UiTheme['radius'];
|
|
22
|
+
/** What both renderers accept as a size: px, a percentage, or `auto`. */
|
|
23
|
+
export type BoxDimension = number | 'auto' | `${number}%`;
|
|
24
|
+
|
|
25
|
+
export interface BoxSpacingProps {
|
|
26
|
+
p?: number;
|
|
27
|
+
px?: number;
|
|
28
|
+
py?: number;
|
|
29
|
+
pt?: number;
|
|
30
|
+
pr?: number;
|
|
31
|
+
pb?: number;
|
|
32
|
+
pl?: number;
|
|
33
|
+
m?: number;
|
|
34
|
+
mx?: number;
|
|
35
|
+
my?: number;
|
|
36
|
+
mt?: number;
|
|
37
|
+
mr?: number;
|
|
38
|
+
mb?: number;
|
|
39
|
+
ml?: number;
|
|
40
|
+
/** Between children. Setting it makes the box a flex container. */
|
|
41
|
+
gap?: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface BoxBaseProps extends BoxSpacingProps {
|
|
45
|
+
children?: React.ReactNode;
|
|
46
|
+
/** Setting any of these four makes the box a flex container. */
|
|
47
|
+
direction?: BoxDirection;
|
|
48
|
+
align?: BoxAlign;
|
|
49
|
+
justify?: BoxJustify;
|
|
50
|
+
wrap?: boolean;
|
|
51
|
+
flex?: number;
|
|
52
|
+
/** A surface, `transparent`, or a palette slot's main colour. */
|
|
53
|
+
bg?: BoxBackground;
|
|
54
|
+
radius?: BoxRadius;
|
|
55
|
+
/** A 1px border in the theme's divider colour. */
|
|
56
|
+
bordered?: boolean;
|
|
57
|
+
width?: BoxDimension;
|
|
58
|
+
height?: BoxDimension;
|
|
59
|
+
testID?: string;
|
|
60
|
+
dataTestId?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Every prop {@link BoxBaseProps} owns, so a renderer can split them from its own. */
|
|
64
|
+
export const BOX_BASE_KEYS = [
|
|
65
|
+
'p', 'px', 'py', 'pt', 'pr', 'pb', 'pl',
|
|
66
|
+
'm', 'mx', 'my', 'mt', 'mr', 'mb', 'ml',
|
|
67
|
+
'gap', 'direction', 'align', 'justify', 'wrap', 'flex',
|
|
68
|
+
'bg', 'radius', 'bordered', 'width', 'height', 'testID', 'dataTestId',
|
|
69
|
+
] as const satisfies readonly (keyof Omit<BoxBaseProps, 'children'>)[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Box
|
|
2
|
+
|
|
3
|
+
The layout primitive both renderers share.
|
|
4
|
+
|
|
5
|
+
`@12-apps/ui/mui/Box` is raw MUI: an `sx` prop and nothing a React Native
|
|
6
|
+
renderer could ever answer to. This `Box` is what a screen meant for both
|
|
7
|
+
platforms writes instead. Its props are a fixed vocabulary on the spacing
|
|
8
|
+
scale, and one resolver (`box-layout.ts`) turns them into the same numbers on
|
|
9
|
+
each side — `p={2}` is `theme.spacing(2)`, 16px on the web and 16dp on native.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Box } from '@12-apps/ui/layout/Box';
|
|
13
|
+
|
|
14
|
+
<Box direction="row" gap={2} align="center" p={2} bg="paper" radius="lg" bordered>
|
|
15
|
+
…
|
|
16
|
+
</Box>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| prop | type | notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `p` `px` `py` `pt` `pr` `pb` `pl` | `number` | padding, in spacing units; the specific side wins over the axis, the axis over `p` |
|
|
24
|
+
| `m` `mx` `my` `mt` `mr` `mb` `ml` | `number` | margin, same rules |
|
|
25
|
+
| `gap` | `number` | between children; makes the box a flex container |
|
|
26
|
+
| `direction` | `row` `column` `row-reverse` `column-reverse` | makes the box a flex container (`column` when only `gap`/`align`/`justify` is set) |
|
|
27
|
+
| `align` | `start` `center` `end` `stretch` `baseline` | `alignItems` |
|
|
28
|
+
| `justify` | `start` `center` `end` `between` `around` `evenly` | `justifyContent` |
|
|
29
|
+
| `wrap` | `boolean` | `flexWrap: wrap` |
|
|
30
|
+
| `flex` | `number` | |
|
|
31
|
+
| `bg` | `default` `paper` `transparent` or a palette slot | a surface, or the slot's `main` |
|
|
32
|
+
| `radius` | `sm` `md` `lg` `xl` `full` | the theme's radius scale (2, 4, 8, 16 px by default) |
|
|
33
|
+
| `bordered` | `boolean` | a 1px border in the divider colour |
|
|
34
|
+
| `width` `height` | `number` `'auto'` `'50%'` | what both renderers accept as a size |
|
|
35
|
+
| `testID` / `dataTestId` | `string` | either spelling; rendered as `data-testid` on the web |
|
|
36
|
+
|
|
37
|
+
On the **web** every other prop of MUI's `Box` is accepted too, `sx` included —
|
|
38
|
+
it is applied after the resolved layout, so it still wins. On **native** the
|
|
39
|
+
extras are a `View`'s own (`style`, `onLayout`, `accessibilityLabel`…).
|
|
40
|
+
|
|
41
|
+
## What differs between renderers
|
|
42
|
+
|
|
43
|
+
A `View` is always a flex column; MUI's `Box` is a `div`, a block, until a
|
|
44
|
+
layout prop makes it flex. Children stack the same way in both, so the only
|
|
45
|
+
observable difference is `display` on a box with no layout props — which is
|
|
46
|
+
why the `BlockByDefault` test story is tagged `native-skip`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { resolveBoxLayout, splitBoxProps } from './box-layout';
|
|
5
|
+
import type { BoxProps } from './Box.types.native';
|
|
6
|
+
import { resolveTestId } from '../../../platform/test-id';
|
|
7
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
8
|
+
|
|
9
|
+
/** The native `Box`: a `View` with the same resolved numbers the web `Box` puts in `sx`. */
|
|
10
|
+
export const Box = React.forwardRef<View, BoxProps>(({ children, style, ...props }, ref) => {
|
|
11
|
+
const theme = useUiTheme();
|
|
12
|
+
const { layout, rest } = splitBoxProps(props);
|
|
13
|
+
const resolved = resolveBoxLayout(layout, theme);
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<View ref={ref} style={[resolved, style]} testID={resolveTestId(layout)} {...rest}>
|
|
17
|
+
{children}
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
Box.displayName = 'Box';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import MuiBox from '@mui/material/Box/index.js';
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material/styles/index.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
import { resolveBoxLayout, splitBoxProps, type BoxLayout } from './box-layout';
|
|
6
|
+
import type { BoxProps } from './Box.types';
|
|
7
|
+
import { resolveTestId } from '../../../platform/test-id';
|
|
8
|
+
import { useUiTheme } from '../../../provider/use-ui-theme';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* `sx` is not CSS: it reads a bare number on `padding`, `margin` or `gap` as
|
|
12
|
+
* SPACING UNITS, on `borderRadius` as a multiple of `shape.borderRadius`, and a
|
|
13
|
+
* `width` of `1` or less as a fraction. The resolver's numbers are already px,
|
|
14
|
+
* so every one of them is written as a px string — otherwise a `p={2}` box
|
|
15
|
+
* renders 128px of padding on the web and 16dp on native, which is the one
|
|
16
|
+
* thing this component exists to rule out.
|
|
17
|
+
*/
|
|
18
|
+
const PX_KEYS = new Set<keyof BoxLayout>([
|
|
19
|
+
'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft',
|
|
20
|
+
'marginTop', 'marginRight', 'marginBottom', 'marginLeft',
|
|
21
|
+
'gap', 'borderRadius', 'borderWidth', 'width', 'height',
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
export function layoutToSx(layout: BoxLayout): Record<string, string | number> {
|
|
25
|
+
return Object.fromEntries(
|
|
26
|
+
Object.entries(layout).map(([key, value]) => [
|
|
27
|
+
key,
|
|
28
|
+
typeof value === 'number' && PX_KEYS.has(key as keyof BoxLayout) ? `${value}px` : value,
|
|
29
|
+
]),
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The web `Box`: MUI's, with the neutral layout props resolved into `sx` ahead
|
|
35
|
+
* of whatever `sx` the caller adds — so the caller's escape hatch still wins.
|
|
36
|
+
*/
|
|
37
|
+
export const Box = React.forwardRef<HTMLDivElement, BoxProps>(
|
|
38
|
+
({ children, sx, ...props }, ref) => {
|
|
39
|
+
const theme = useUiTheme();
|
|
40
|
+
const { layout, rest } = splitBoxProps(props);
|
|
41
|
+
const resolved = layoutToSx(resolveBoxLayout(layout, theme)) as SxProps<Theme>;
|
|
42
|
+
const testId = resolveTestId(layout);
|
|
43
|
+
const merged: SxProps<Theme> = [
|
|
44
|
+
resolved,
|
|
45
|
+
...(Array.isArray(sx) ? sx : sx === undefined ? [] : [sx]),
|
|
46
|
+
] as SxProps<Theme>;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<MuiBox ref={ref} sx={merged} data-testid={testId} {...rest}>
|
|
50
|
+
{children}
|
|
51
|
+
</MuiBox>
|
|
52
|
+
);
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
Box.displayName = 'Box';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { BoxBaseProps } from './Box.base';
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
BoxAlign,
|
|
7
|
+
BoxBackground,
|
|
8
|
+
BoxBaseProps,
|
|
9
|
+
BoxDimension,
|
|
10
|
+
BoxDirection,
|
|
11
|
+
BoxJustify,
|
|
12
|
+
BoxRadius,
|
|
13
|
+
BoxSpacingProps,
|
|
14
|
+
} from './Box.base';
|
|
15
|
+
export { BOX_BASE_KEYS } from './Box.base';
|
|
16
|
+
|
|
17
|
+
/** The native `Box`: the neutral props, plus a `View`'s own where they do not overlap. */
|
|
18
|
+
export type BoxProps = BoxBaseProps &
|
|
19
|
+
Omit<ViewProps, keyof BoxBaseProps | 'style'> & {
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BoxProps as MuiBoxProps } from '@mui/material/Box/index.js';
|
|
2
|
+
|
|
3
|
+
import { BOX_BASE_KEYS, type BoxBaseProps } from './Box.base';
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
BoxAlign,
|
|
7
|
+
BoxBackground,
|
|
8
|
+
BoxBaseProps,
|
|
9
|
+
BoxDimension,
|
|
10
|
+
BoxDirection,
|
|
11
|
+
BoxJustify,
|
|
12
|
+
BoxRadius,
|
|
13
|
+
BoxSpacingProps,
|
|
14
|
+
} from './Box.base';
|
|
15
|
+
export { BOX_BASE_KEYS } from './Box.base';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The web `Box`: the neutral props, plus whatever MUI's `Box` accepts that they
|
|
19
|
+
* do not already name. `sx` stays available — it is the web's escape hatch and
|
|
20
|
+
* the reason nothing a web screen does today has to change.
|
|
21
|
+
*/
|
|
22
|
+
export type BoxProps = BoxBaseProps & Omit<MuiBoxProps, (typeof BOX_BASE_KEYS)[number] | 'children'>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { BOX_BASE_KEYS, type BoxAlign, type BoxBaseProps, type BoxDimension, type BoxJustify } from './Box.base';
|
|
2
|
+
import type { UiTheme } from '../../../tokens/theme';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The resolved style, in React Native's property names.
|
|
6
|
+
*
|
|
7
|
+
* They are also valid CSS-in-JS names, and every number is px on the web and
|
|
8
|
+
* dp on native, so ONE resolver feeds both `Box.tsx` (into `sx`) and
|
|
9
|
+
* `Box.native.tsx` (into `style`). That is the alignment guarantee: there is no
|
|
10
|
+
* second table of numbers for the native side to drift from.
|
|
11
|
+
*/
|
|
12
|
+
export interface BoxLayout {
|
|
13
|
+
display?: 'flex';
|
|
14
|
+
flexDirection?: BoxBaseProps['direction'];
|
|
15
|
+
alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
|
|
16
|
+
justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
17
|
+
flexWrap?: 'wrap';
|
|
18
|
+
flex?: number;
|
|
19
|
+
gap?: number;
|
|
20
|
+
paddingTop?: number;
|
|
21
|
+
paddingRight?: number;
|
|
22
|
+
paddingBottom?: number;
|
|
23
|
+
paddingLeft?: number;
|
|
24
|
+
marginTop?: number;
|
|
25
|
+
marginRight?: number;
|
|
26
|
+
marginBottom?: number;
|
|
27
|
+
marginLeft?: number;
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
borderRadius?: number;
|
|
30
|
+
borderWidth?: number;
|
|
31
|
+
borderStyle?: 'solid';
|
|
32
|
+
borderColor?: string;
|
|
33
|
+
width?: BoxDimension;
|
|
34
|
+
height?: BoxDimension;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const ALIGN: Record<BoxAlign, NonNullable<BoxLayout['alignItems']>> = {
|
|
38
|
+
start: 'flex-start',
|
|
39
|
+
center: 'center',
|
|
40
|
+
end: 'flex-end',
|
|
41
|
+
stretch: 'stretch',
|
|
42
|
+
baseline: 'baseline',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const JUSTIFY: Record<BoxJustify, NonNullable<BoxLayout['justifyContent']>> = {
|
|
46
|
+
start: 'flex-start',
|
|
47
|
+
center: 'center',
|
|
48
|
+
end: 'flex-end',
|
|
49
|
+
between: 'space-between',
|
|
50
|
+
around: 'space-around',
|
|
51
|
+
evenly: 'space-evenly',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function background(theme: UiTheme, bg: NonNullable<BoxBaseProps['bg']>): string {
|
|
55
|
+
if (bg === 'transparent') return 'transparent';
|
|
56
|
+
if (bg === 'default' || bg === 'paper') return theme.palette.background[bg];
|
|
57
|
+
return theme.palette[bg].main;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type SpacingKey = keyof Pick<
|
|
61
|
+
BoxLayout,
|
|
62
|
+
| 'paddingTop' | 'paddingRight' | 'paddingBottom' | 'paddingLeft'
|
|
63
|
+
| 'marginTop' | 'marginRight' | 'marginBottom' | 'marginLeft'
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Each side reads the most specific prop that is set: the side, then its axis,
|
|
68
|
+
* then the shorthand — the precedence MUI's `Box` gives `pt`/`py`/`p`.
|
|
69
|
+
*/
|
|
70
|
+
const SIDES: ReadonlyArray<readonly [SpacingKey, ReadonlyArray<keyof BoxBaseProps>]> = [
|
|
71
|
+
['paddingTop', ['pt', 'py', 'p']],
|
|
72
|
+
['paddingRight', ['pr', 'px', 'p']],
|
|
73
|
+
['paddingBottom', ['pb', 'py', 'p']],
|
|
74
|
+
['paddingLeft', ['pl', 'px', 'p']],
|
|
75
|
+
['marginTop', ['mt', 'my', 'm']],
|
|
76
|
+
['marginRight', ['mr', 'mx', 'm']],
|
|
77
|
+
['marginBottom', ['mb', 'my', 'm']],
|
|
78
|
+
['marginLeft', ['ml', 'mx', 'm']],
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
function spacingLayout(props: BoxBaseProps, theme: UiTheme): BoxLayout {
|
|
82
|
+
const layout: BoxLayout = {};
|
|
83
|
+
for (const [key, sources] of SIDES) {
|
|
84
|
+
const units = sources.map((source) => props[source]).find((value) => value !== undefined);
|
|
85
|
+
if (typeof units === 'number') layout[key] = theme.spacing(units);
|
|
86
|
+
}
|
|
87
|
+
return layout;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** A flex container whenever any flex prop is set; a plain box otherwise. */
|
|
91
|
+
function flexLayout(props: BoxBaseProps, theme: UiTheme): BoxLayout {
|
|
92
|
+
const layout: BoxLayout = {};
|
|
93
|
+
const isFlex =
|
|
94
|
+
[props.direction, props.align, props.justify, props.gap].some((value) => value !== undefined) ||
|
|
95
|
+
props.wrap === true;
|
|
96
|
+
if (!isFlex) return layout;
|
|
97
|
+
|
|
98
|
+
layout.display = 'flex';
|
|
99
|
+
layout.flexDirection = props.direction ?? 'column';
|
|
100
|
+
if (props.gap !== undefined) layout.gap = theme.spacing(props.gap);
|
|
101
|
+
if (props.align !== undefined) layout.alignItems = ALIGN[props.align];
|
|
102
|
+
if (props.justify !== undefined) layout.justifyContent = JUSTIFY[props.justify];
|
|
103
|
+
if (props.wrap) layout.flexWrap = 'wrap';
|
|
104
|
+
return layout;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function surfaceLayout(props: BoxBaseProps, theme: UiTheme): BoxLayout {
|
|
108
|
+
const layout: BoxLayout = {};
|
|
109
|
+
if (props.flex !== undefined) layout.flex = props.flex;
|
|
110
|
+
if (props.bg !== undefined) layout.backgroundColor = background(theme, props.bg);
|
|
111
|
+
if (props.radius !== undefined) layout.borderRadius = theme.radius[props.radius];
|
|
112
|
+
if (props.bordered) {
|
|
113
|
+
// `borderStyle` spelled out: CSS defaults it to `none`, under which a
|
|
114
|
+
// border-width computes to 0 and nothing paints. React Native's default is
|
|
115
|
+
// `solid`, which is how a box can pass natively and vanish on the web.
|
|
116
|
+
layout.borderWidth = 1;
|
|
117
|
+
layout.borderStyle = 'solid';
|
|
118
|
+
layout.borderColor = theme.palette.divider;
|
|
119
|
+
}
|
|
120
|
+
if (props.width !== undefined) layout.width = props.width;
|
|
121
|
+
if (props.height !== undefined) layout.height = props.height;
|
|
122
|
+
return layout;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** The style for a box's neutral props. Unset props produce no key at all. */
|
|
126
|
+
export function resolveBoxLayout(props: BoxBaseProps, theme: UiTheme): BoxLayout {
|
|
127
|
+
return { ...spacingLayout(props, theme), ...flexLayout(props, theme), ...surfaceLayout(props, theme) };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** The neutral props on one side, everything else — the renderer's own — on the other. */
|
|
131
|
+
export function splitBoxProps<P extends BoxBaseProps>(
|
|
132
|
+
props: P,
|
|
133
|
+
): { layout: BoxBaseProps; rest: Omit<P, (typeof BOX_BASE_KEYS)[number]> } {
|
|
134
|
+
const layout: Record<string, unknown> = {};
|
|
135
|
+
const rest: Record<string, unknown> = {};
|
|
136
|
+
const own = new Set<string>([...BOX_BASE_KEYS, 'data-testid']);
|
|
137
|
+
for (const [key, value] of Object.entries(props)) {
|
|
138
|
+
(own.has(key) ? layout : rest)[key] = value;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
layout: layout as BoxBaseProps,
|
|
142
|
+
rest: rest as Omit<P, (typeof BOX_BASE_KEYS)[number]>,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Box } from './Box.native';
|
|
2
|
+
export type {
|
|
3
|
+
BoxAlign,
|
|
4
|
+
BoxBackground,
|
|
5
|
+
BoxBaseProps,
|
|
6
|
+
BoxDimension,
|
|
7
|
+
BoxDirection,
|
|
8
|
+
BoxJustify,
|
|
9
|
+
BoxProps,
|
|
10
|
+
BoxRadius,
|
|
11
|
+
BoxSpacingProps,
|
|
12
|
+
} from './Box.types.native';
|
|
13
|
+
export { resolveBoxLayout } from './box-layout';
|
|
14
|
+
export type { BoxLayout } from './box-layout';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { Box } from './Box';
|
|
2
|
+
export type {
|
|
3
|
+
BoxAlign,
|
|
4
|
+
BoxBackground,
|
|
5
|
+
BoxBaseProps,
|
|
6
|
+
BoxDimension,
|
|
7
|
+
BoxDirection,
|
|
8
|
+
BoxJustify,
|
|
9
|
+
BoxProps,
|
|
10
|
+
BoxRadius,
|
|
11
|
+
BoxSpacingProps,
|
|
12
|
+
} from './Box.types';
|
|
13
|
+
export { resolveBoxLayout } from './box-layout';
|
|
14
|
+
export type { BoxLayout } from './box-layout';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { BoxBaseProps } from '../Box/Box.base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A `Box` that is always a flex container, with an optional divider between
|
|
7
|
+
* children — MUI's `Stack`, on the neutral prop set. `direction` defaults to
|
|
8
|
+
* `column` and `gap` to `0`, as MUI's does.
|
|
9
|
+
*/
|
|
10
|
+
export interface StackBaseProps extends Omit<BoxBaseProps, 'direction'> {
|
|
11
|
+
direction?: 'row' | 'column';
|
|
12
|
+
/** Rendered between every pair of children. */
|
|
13
|
+
divider?: React.ReactNode;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Stack
|
|
2
|
+
|
|
3
|
+
A `Box` that is always a flex container, with an optional divider between
|
|
4
|
+
children — MUI's `Stack` on the neutral prop set, so it renders on both the web
|
|
5
|
+
and React Native.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Stack } from '@12-apps/ui/layout/Stack';
|
|
9
|
+
|
|
10
|
+
<Stack direction="row" gap={2} align="center" divider={<Box width={1} bg="neutral" />}>
|
|
11
|
+
…
|
|
12
|
+
</Stack>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`direction` defaults to `column` and `gap` to `0`, as MUI's does. Every other
|
|
16
|
+
prop is `Box`'s (see `layout/Box`). `divider` is cloned between each adjacent
|
|
17
|
+
pair of children and never outside them.
|
|
18
|
+
|
|
19
|
+
`@12-apps/ui/mui/Stack` remains raw MUI and web-only.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { StackProps } from './Stack.types.native';
|
|
5
|
+
import { withDividers } from './with-dividers';
|
|
6
|
+
import { Box } from '../Box/Box.native';
|
|
7
|
+
|
|
8
|
+
export const Stack = React.forwardRef<View, StackProps>(
|
|
9
|
+
({ direction = 'column', gap = 0, divider, children, ...rest }, ref) => (
|
|
10
|
+
<Box ref={ref} direction={direction} gap={gap} {...rest}>
|
|
11
|
+
{withDividers(children, divider)}
|
|
12
|
+
</Box>
|
|
13
|
+
),
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
Stack.displayName = 'Stack';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { StackProps } from './Stack.types';
|
|
4
|
+
import { withDividers } from './with-dividers';
|
|
5
|
+
import { Box } from '../Box/Box';
|
|
6
|
+
|
|
7
|
+
export const Stack = React.forwardRef<HTMLDivElement, StackProps>(
|
|
8
|
+
({ direction = 'column', gap = 0, divider, children, ...rest }, ref) => (
|
|
9
|
+
<Box ref={ref} direction={direction} gap={gap} {...rest}>
|
|
10
|
+
{withDividers(children, divider)}
|
|
11
|
+
</Box>
|
|
12
|
+
),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
Stack.displayName = 'Stack';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** The children with `divider` cloned between each adjacent pair. */
|
|
4
|
+
export function withDividers(
|
|
5
|
+
children: React.ReactNode,
|
|
6
|
+
divider: React.ReactNode | undefined,
|
|
7
|
+
): React.ReactNode {
|
|
8
|
+
if (divider === undefined || divider === null) return children;
|
|
9
|
+
const items = React.Children.toArray(children);
|
|
10
|
+
return items.flatMap((child, index) =>
|
|
11
|
+
index === 0
|
|
12
|
+
? [child]
|
|
13
|
+
: [React.createElement(React.Fragment, { key: `divider-${index}` }, divider), child],
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { ColorValue, SizeValue } from '../../../tokens/vocabulary';
|
|
4
|
+
|
|
5
|
+
/** The contract both renderers honour; see `Button.base.ts` for why it is its own file. */
|
|
6
|
+
export type TextVariant = 'body' | 'heading' | 'caption' | 'code';
|
|
7
|
+
export type TextWeight = 'light' | 'normal' | 'medium' | 'semibold' | 'bold';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The contract both renderers honour. Nothing here names a DOM or a React
|
|
11
|
+
* Native type: the web adds `HTMLAttributes` and `as` below, the native side
|
|
12
|
+
* adds `TextProps` from react-native in `Text.types.native.ts`.
|
|
13
|
+
*/
|
|
14
|
+
export interface TextBaseProps {
|
|
15
|
+
variant?: TextVariant;
|
|
16
|
+
color?: ColorValue;
|
|
17
|
+
size?: SizeValue;
|
|
18
|
+
weight?: TextWeight;
|
|
19
|
+
italic?: boolean;
|
|
20
|
+
underline?: boolean;
|
|
21
|
+
strikethrough?: boolean;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
testID?: string;
|
|
24
|
+
dataTestId?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FONT_WEIGHTS, TYPE_SIZES } from '../../../tokens/theme';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* THE NUMBERS BOTH `Text` RENDERERS DRAW WITH.
|
|
5
|
+
*
|
|
6
|
+
* `Text.tsx` used to hold these as rem strings and `Text.native.tsx` would have
|
|
7
|
+
* held them again as numbers — two tables, one of which drifts. Now there is
|
|
8
|
+
* one, in px, and the web derives its rem from it (see `px()` in the theme).
|
|
9
|
+
* Ratios stay ratios; the native side multiplies them out because React
|
|
10
|
+
* Native's `lineHeight` and `letterSpacing` are absolute.
|
|
11
|
+
*/
|
|
12
|
+
export const TEXT_SIZES = TYPE_SIZES;
|
|
13
|
+
export const TEXT_WEIGHTS = FONT_WEIGHTS;
|
|
14
|
+
|
|
15
|
+
/** The `heading` variant: heavier by default, tighter tracking. */
|
|
16
|
+
export const HEADING_DEFAULT_WEIGHT = 600;
|
|
17
|
+
export const HEADING_LETTER_SPACING_EM = -0.01;
|
|
18
|
+
|
|
19
|
+
/** The `caption` variant: a step down at the default size, faded and looser. */
|
|
20
|
+
export const CAPTION_FONT_SIZE = 12;
|
|
21
|
+
export const CAPTION_OPACITY = 0.8;
|
|
22
|
+
export const CAPTION_LETTER_SPACING_EM = 0.02;
|
|
23
|
+
|
|
24
|
+
/** The `code` variant: a step down, on a faint primary wash inside a hairline. */
|
|
25
|
+
export const CODE_FONT_SIZE = 14;
|
|
26
|
+
export const CODE_BACKGROUND_ALPHA = 0.08;
|
|
27
|
+
export const CODE_BORDER_ALPHA = 0.12;
|
|
28
|
+
export const CODE_PADDING = { vertical: 2, horizontal: 6 } as const;
|
|
29
|
+
/** Half the theme's `md` radius, as `Text.tsx` has always drawn it. */
|
|
30
|
+
export const CODE_RADIUS_FACTOR = 0.5;
|