@12-apps/ui 6.20.0 → 6.21.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 +5 -1
- package/dist/_internal/components/data-display/Alert/Alert.js +4 -4
- package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
- package/dist/_internal/components/data-display/AsyncStateContainer/AsyncStateContainer.js +7 -7
- package/dist/_internal/components/data-display/Avatar/Avatar.js +2 -2
- package/dist/_internal/components/data-display/Badge/Badge.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +4 -4
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +10 -10
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +4 -4
- package/dist/_internal/components/data-display/Chart/SpecChart.js +7 -7
- package/dist/_internal/components/data-display/Chart/chart-context.js +2 -2
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataGrid/DataGrid.js +2 -2
- package/dist/_internal/components/data-display/DataViews/DataViewsBoard.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +52 -51
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +73 -69
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +5 -5
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +7 -7
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +16 -12
- package/dist/_internal/components/data-display/DataViews/base-card.js +7 -5
- package/dist/_internal/components/data-display/DataViews/base-list-card-geometry.js +7 -7
- package/dist/_internal/components/data-display/DataViews/base-list-card-gutters.js +10 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card-slots.js +6 -6
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +14 -13
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +17 -15
- package/dist/_internal/components/data-display/DataViews/data-views-columns-tab.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-display-tabs.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +21 -19
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +12 -12
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +47 -46
- package/dist/_internal/components/data-display/DataViews/data-views-header-row.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +27 -26
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +14 -14
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +25 -21
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +13 -13
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +5 -5
- package/dist/_internal/components/data-display/DataViews/list-card-rails.js +2 -2
- package/dist/_internal/components/data-display/DataViews/save-view-preview.js +3 -3
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +8 -8
- package/dist/_internal/components/data-display/DataViews/use-saved-views-controller.js +2 -2
- package/dist/_internal/components/data-display/DescriptionItem/DescriptionItem.js +3 -3
- package/dist/_internal/components/data-display/EmptyState/EmptyState.js +3 -3
- package/dist/_internal/components/data-display/ErrorState/ErrorState.js +2 -2
- package/dist/_internal/components/data-display/HoverCard/HoverCard.js +1 -1
- package/dist/_internal/components/data-display/LazyImage/LazyImage.js +3 -3
- package/dist/_internal/components/data-display/Lightbox/Lightbox.js +5 -5
- package/dist/_internal/components/data-display/LoadingState/LoadingState.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapDecorations.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +3 -3
- package/dist/_internal/components/data-display/MapPreview/MapPreview.hooks.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +11 -11
- package/dist/_internal/components/data-display/MapPreview/MapTiles.js +2 -2
- package/dist/_internal/components/data-display/MapPreview/StaticMapView.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/useMapPreview.js +3 -3
- package/dist/_internal/components/data-display/SectionOnboarding/SectionOnboarding.js +4 -4
- package/dist/_internal/components/data-display/Sheet/Sheet.js +2 -2
- package/dist/_internal/components/data-display/StatCard/StatCard.js +3 -3
- package/dist/_internal/components/data-display/Table/Table.js +3 -3
- package/dist/_internal/components/data-display/index.js +59 -59
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +4 -4
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +9 -9
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +3 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +12 -10
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +7 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +5 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +5 -3
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +4 -2
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
- package/dist/_internal/components/form/Button/Button.js +3 -3
- package/dist/_internal/components/form/Calendar/Calendar.js +4 -4
- 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 +10 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +5 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +5 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +7 -5
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +6 -4
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +14 -12
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +4 -2
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +5 -3
- package/dist/_internal/components/form/CepField/CepField.js +10 -4
- package/dist/_internal/components/form/Checkbox/Checkbox.base.js +1 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.base.js.map +1 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.helpers.js +2 -1
- package/dist/_internal/components/form/Checkbox/Checkbox.js +9 -2
- package/dist/_internal/components/form/Checkbox/Checkbox.metrics.js +34 -0
- package/dist/_internal/components/form/Checkbox/Checkbox.metrics.js.map +1 -0
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +6 -4
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +4 -2
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +5 -5
- package/dist/_internal/components/form/Input/Input.base.js +1 -0
- package/dist/_internal/components/form/Input/Input.base.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.helpers.js +23 -0
- package/dist/_internal/components/form/Input/Input.helpers.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.js +9 -3
- package/dist/_internal/components/form/Input/Input.metrics.js +53 -0
- package/dist/_internal/components/form/Input/Input.metrics.js.map +1 -0
- package/dist/_internal/components/form/Input/Input.styles.js +10 -4
- package/dist/_internal/components/form/InputOTP/InputOTP.js +5 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +4 -2
- package/dist/_internal/components/form/Menubar/Menubar.js +4 -4
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +2 -2
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +4 -2
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +6 -4
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +4 -2
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +5 -3
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +4 -2
- package/dist/_internal/components/form/Select/Select.base.js +1 -0
- package/dist/_internal/components/form/Select/Select.base.js.map +1 -0
- package/dist/_internal/components/form/Select/Select.helpers.js +48 -0
- package/dist/_internal/components/form/Select/Select.helpers.js.map +1 -0
- package/dist/_internal/components/form/Select/Select.js +10 -2
- package/dist/_internal/components/form/Select/Select.metrics.js +38 -0
- package/dist/_internal/components/form/Select/Select.metrics.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.base.js +1 -0
- package/dist/_internal/components/form/Switch/Switch.base.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.helpers.js +59 -0
- package/dist/_internal/components/form/Switch/Switch.helpers.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.js +9 -3
- package/dist/_internal/components/form/Switch/Switch.metrics.js +83 -0
- package/dist/_internal/components/form/Switch/Switch.metrics.js.map +1 -0
- package/dist/_internal/components/form/Switch/Switch.parts.js +7 -2
- package/dist/_internal/components/form/Switch/Switch.styles.js +6 -1
- package/dist/_internal/components/form/Textarea/Textarea.js +5 -3
- package/dist/_internal/components/form/Textarea/Textarea.styles.js +4 -2
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -2
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js.map +1 -1
- package/dist/_internal/components/form/Toggle/Toggle.js +5 -3
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +4 -2
- package/dist/_internal/components/form/index.js +53 -47
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +15 -13
- package/dist/_internal/components/form/total-form/Fields/CepField.js +11 -5
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +11 -3
- package/dist/_internal/components/form/total-form/Fields/TextField.js +10 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +29 -21
- package/dist/_internal/components/form/total-form/SubmitButton.js +4 -4
- package/dist/_internal/components/index.js +140 -134
- package/dist/_internal/components/layout/Box/Box.js +2 -2
- package/dist/_internal/components/layout/Container/Container.js +2 -2
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +3 -3
- package/dist/_internal/components/layout/Skeleton/Skeleton.js +2 -2
- package/dist/_internal/components/layout/Spacer/Spacer.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +3 -3
- package/dist/_internal/components/layout/index.js +13 -13
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
- package/dist/_internal/components/navigation/CommandPalette/CommandPalette.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +5 -5
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenuItem.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +3 -3
- package/dist/_internal/components/navigation/index.js +13 -13
- package/dist/_internal/components/typography/Heading/Heading.js +2 -2
- package/dist/_internal/components/typography/Paragraph/Paragraph.js +2 -2
- package/dist/_internal/components/typography/Text/Text.js +2 -2
- package/dist/_internal/components/typography/index.js +4 -4
- package/dist/_internal/components/utility/InfiniteScroll/InfiniteScroll.js +2 -2
- package/dist/_internal/components/utility/index.js +2 -2
- package/dist/_internal/icons/Icon.js +3 -3
- package/dist/_internal/icons/paths.generated.js +1 -1
- package/dist/_internal/platform/aria.js +17 -1
- package/dist/_internal/platform/aria.js.map +1 -1
- package/dist/_internal/platform/test-id.js +3 -1
- package/dist/_internal/social-login-button/social-login-button.js +6 -6
- package/dist/_internal/tokens/field-edge.core.js +11 -0
- package/dist/_internal/tokens/field-edge.core.js.map +1 -0
- package/dist/_internal/tokens/field-edge.js +5 -2
- package/dist/_internal/user-avatar/user-avatar.js +7 -7
- package/dist/charts.js +13 -13
- package/dist/{chunk-2PCOC3PT.js → chunk-26Z7QWID.js} +2 -2
- package/dist/chunk-2ECT4IY2.js +250 -0
- package/dist/chunk-2ECT4IY2.js.map +1 -0
- package/dist/{chunk-IJIT5HQP.js → chunk-2QFTAGDH.js} +3 -3
- package/dist/{chunk-ENNW5SKT.js → chunk-2QLVUVVR.js} +2 -2
- package/dist/{chunk-W3FAKT3D.js → chunk-2SWQ6HIK.js} +4 -4
- package/dist/{chunk-7P2HZLEG.js → chunk-3UOHKHOT.js} +3 -3
- package/dist/{chunk-URWGRPL7.js → chunk-3W7IEWEL.js} +2 -2
- package/dist/{chunk-Z7JNCB5Q.js → chunk-426FTCMF.js} +2 -2
- package/dist/{chunk-46UPILLK.js → chunk-4ETQRBZC.js} +4 -4
- package/dist/{chunk-NQC6H7GY.js → chunk-4HYXEMBP.js} +2 -2
- package/dist/{chunk-43NEBUV3.js → chunk-4K7FDVAB.js} +2 -2
- package/dist/{chunk-LMJBINWN.js → chunk-4MLDWACO.js} +13 -13
- package/dist/{chunk-GGE7Y53F.js → chunk-4TXIZ5WI.js} +2 -2
- package/dist/{chunk-J6UFAMIC.js → chunk-5RQ7N63M.js} +2 -2
- package/dist/chunk-5ZNU2U4D.js +41 -0
- package/dist/chunk-5ZNU2U4D.js.map +1 -0
- package/dist/{chunk-AVGTTWTE.js → chunk-65DLYC4S.js} +4 -4
- package/dist/{chunk-QLWBQQW7.js → chunk-6F5IKY32.js} +5 -1
- package/dist/chunk-6F5IKY32.js.map +1 -0
- package/dist/{chunk-B2A4DG77.js → chunk-6RGWDKUL.js} +6 -6
- package/dist/{chunk-DCEMUZJQ.js → chunk-6WIDZGXE.js} +2 -2
- package/dist/{chunk-R7MX5KPJ.js → chunk-6YLAVHV4.js} +4 -4
- package/dist/{chunk-E27Y7FF2.js → chunk-6Z4H2Y77.js} +4 -4
- package/dist/{chunk-PNYXXLPU.js → chunk-736HP6BL.js} +2 -2
- package/dist/{chunk-C52BELLW.js → chunk-77F36LQQ.js} +3 -3
- package/dist/chunk-7FDU3FIN.js +13 -0
- package/dist/chunk-7FDU3FIN.js.map +1 -0
- package/dist/{chunk-RXSGHPCR.js → chunk-7FOOLP5H.js} +4 -4
- package/dist/{chunk-74OZ5KVR.js → chunk-7KTU6YMQ.js} +6 -6
- package/dist/{chunk-X5D3PTWI.js → chunk-7MAOQIWA.js} +2 -2
- package/dist/{chunk-5ZF3VASA.js → chunk-7ZH7ZB33.js} +7 -7
- package/dist/{chunk-FX5DY6VR.js → chunk-AD776JPA.js} +7 -4
- package/dist/chunk-AD776JPA.js.map +1 -0
- package/dist/{chunk-PQECNGDE.js → chunk-AGYGNNOM.js} +2 -2
- package/dist/{chunk-PU3AAKRR.js → chunk-AJ6XEO4E.js} +2 -2
- package/dist/{chunk-WX7VWW3W.js → chunk-B3BK2SNS.js} +2 -2
- package/dist/{chunk-VJK5FBNK.js → chunk-B5PYBEXO.js} +2 -2
- package/dist/{chunk-47UD6DZ4.js → chunk-BDVNAU2C.js} +4 -4
- package/dist/{chunk-FGLV6BXQ.js → chunk-BEGWE5O4.js} +5 -5
- package/dist/{chunk-6IUTT6BK.js → chunk-BEH4DN63.js} +4 -4
- package/dist/{chunk-HKV4MQ2W.js → chunk-BLBOYCOV.js} +5 -5
- package/dist/{chunk-24BUCMQA.js → chunk-BNNSO4MC.js} +5 -5
- package/dist/{chunk-CZJLWCEG.js → chunk-BPYPUEM5.js} +2 -2
- package/dist/{chunk-NHSMLVNC.js → chunk-BQQONDW5.js} +7 -7
- package/dist/{chunk-DQHC5P64.js → chunk-BRSF5NRT.js} +4 -4
- package/dist/{chunk-M7OHXNLF.js → chunk-CXVMD6FE.js} +3 -3
- package/dist/{chunk-LYSSO6WC.js → chunk-CZPU5TW3.js} +4 -4
- package/dist/{chunk-DOADQW7I.js → chunk-D4T646G4.js} +2 -2
- package/dist/{chunk-2W4CIWTW.js → chunk-DBYFC6CF.js} +3 -3
- package/dist/{chunk-76GZ55IC.js → chunk-DF2FFYZ7.js} +7 -7
- package/dist/chunk-DFK6QCXX.js +150 -0
- package/dist/chunk-DFK6QCXX.js.map +1 -0
- package/dist/{chunk-BILE3A7F.js → chunk-DH75UNF3.js} +2 -2
- package/dist/{chunk-MLOWPVVW.js → chunk-EPEJMTCQ.js} +16 -13
- package/dist/chunk-EPEJMTCQ.js.map +1 -0
- package/dist/{chunk-6D5WEZ2L.js → chunk-FB36IHCE.js} +8 -8
- package/dist/{chunk-OI3HOI74.js → chunk-FGUESLDX.js} +2 -2
- package/dist/{chunk-PC5FFEIY.js → chunk-FINCVAAR.js} +4 -4
- package/dist/{chunk-YK2PETUP.js → chunk-FRQ4HNGF.js} +2 -2
- package/dist/{chunk-WO52KYSU.js → chunk-G2IPK2XE.js} +10 -10
- package/dist/{chunk-E4FGKZID.js → chunk-GBNOYRLP.js} +8 -8
- package/dist/{chunk-UNF65XZW.js → chunk-GBRKP5GZ.js} +2 -2
- package/dist/{chunk-VLHGBFR6.js → chunk-GCXYCDOA.js} +2 -2
- package/dist/{chunk-EX3PSZLV.js → chunk-GDEXYUPF.js} +3 -3
- package/dist/{chunk-4N4ENTF7.js → chunk-GO4MVQGC.js} +2 -2
- package/dist/{chunk-HDNK7BAX.js → chunk-GT7C6TSM.js} +3 -3
- package/dist/chunk-GY6KNVMI.js +39 -0
- package/dist/chunk-GY6KNVMI.js.map +1 -0
- package/dist/{chunk-HBAPVB7T.js → chunk-HKKSZ7HG.js} +2 -2
- package/dist/{chunk-3AOOI2NR.js → chunk-HR7YTBR7.js} +4 -4
- package/dist/{chunk-AEGX66N7.js → chunk-I3MDKPGG.js} +2 -2
- package/dist/{chunk-7BYFC2MR.js → chunk-I7HYGIEJ.js} +6 -6
- package/dist/{chunk-D7FJ2GAD.js → chunk-IFNK5TPI.js} +2 -2
- package/dist/{chunk-PODGTNXS.js → chunk-IH4RSRQA.js} +4 -4
- package/dist/{chunk-UF27D35R.js → chunk-IIROZKW5.js} +2 -2
- package/dist/{chunk-PUBPZOQJ.js → chunk-IPE5FFFD.js} +2 -2
- package/dist/{chunk-37YPZHAG.js → chunk-JDMYD6QC.js} +2 -2
- package/dist/{chunk-HSAH5QUQ.js → chunk-JIINGMEB.js} +6 -6
- package/dist/{chunk-NRUYYGDZ.js → chunk-JXAYT6LX.js} +2 -2
- package/dist/{chunk-VMNSGE2G.js → chunk-KEVPUBOE.js} +5 -1
- package/dist/chunk-KEVPUBOE.js.map +1 -0
- package/dist/{chunk-ZBNTFWTG.js → chunk-KIHQE5YA.js} +2 -2
- package/dist/{chunk-DVUPIVI2.js → chunk-KT6HWAEN.js} +4 -4
- package/dist/{chunk-MY5VNNSP.js → chunk-MCRIT46W.js} +4 -4
- package/dist/chunk-MLCFODJO.js +135 -0
- package/dist/chunk-MLCFODJO.js.map +1 -0
- package/dist/{chunk-Q5EQC7NL.js → chunk-N5IVVLTH.js} +8 -5
- package/dist/chunk-N5IVVLTH.js.map +1 -0
- package/dist/{chunk-6XPNJLXE.js → chunk-NARIG5FL.js} +2 -2
- package/dist/{chunk-MBYO2F4Y.js → chunk-NUE774AN.js} +6 -6
- package/dist/{chunk-ZEBJT5JZ.js → chunk-OCXCH2ZW.js} +12 -12
- package/dist/{chunk-7TZ6OC5T.js → chunk-OH3YGJT5.js} +2 -2
- package/dist/{chunk-SM3NRN7L.js → chunk-ON2CMKTI.js} +2 -2
- package/dist/{chunk-VCTKJHXD.js → chunk-OOGEYCJH.js} +2 -2
- package/dist/{chunk-J54WH74M.js → chunk-P6IPJYCS.js} +6 -6
- package/dist/{chunk-23FCBIUN.js → chunk-P7FQUGED.js} +8 -8
- package/dist/{chunk-THBT56JE.js → chunk-PANMJFDS.js} +2 -2
- package/dist/{chunk-LZRURORY.js → chunk-PF5HDFYY.js} +3 -3
- package/dist/{chunk-YVW7VPK4.js → chunk-PFLKPNBU.js} +2 -2
- package/dist/{chunk-7EESF76V.js → chunk-PWXL3QQ6.js} +2 -2
- package/dist/{chunk-7DNQHMDO.js → chunk-PXH24VIP.js} +4 -4
- package/dist/{chunk-HBZIN6IQ.js → chunk-PZEC5CQA.js} +2 -2
- package/dist/{chunk-LAHDFBDE.js → chunk-QFHH2NU5.js} +3 -3
- package/dist/{chunk-GBB6XQ56.js → chunk-QGBMCB76.js} +2 -2
- package/dist/{chunk-SOCKK67R.js → chunk-QRX5BYUQ.js} +7 -7
- package/dist/{chunk-QZWKC3AP.js → chunk-QS7ZGRNS.js} +2 -2
- package/dist/{chunk-IH4CX43Q.js → chunk-QZDBWXZG.js} +2 -2
- package/dist/{chunk-PHCSPHDH.js → chunk-R6RVBYTU.js} +3 -3
- package/dist/{chunk-KZSKI2R3.js → chunk-RPQ3W2C6.js} +2 -2
- package/dist/{chunk-HEG7JIBM.js → chunk-RPWEXIAW.js} +5 -5
- package/dist/{chunk-JB67KPGM.js → chunk-RRO2EOJB.js} +4 -4
- package/dist/{chunk-BLT5ZBVL.js → chunk-RRX6ZTNX.js} +2 -2
- package/dist/{chunk-7RZ4WOQW.js → chunk-RRZBATXK.js} +3 -3
- package/dist/{chunk-RMSH2I3O.js → chunk-S6YY2WWK.js} +40 -50
- package/dist/chunk-S6YY2WWK.js.map +1 -0
- package/dist/{chunk-7JWXLDRH.js → chunk-SAHQLXNN.js} +4 -4
- package/dist/{chunk-LUMF63BM.js → chunk-SFAP5EH5.js} +4 -4
- package/dist/{chunk-EGRFMPGD.js → chunk-SHDIZSN5.js} +6 -6
- package/dist/{chunk-GJQYM3PM.js → chunk-SHQWIDD5.js} +4 -4
- package/dist/{chunk-BJ3J6FTN.js → chunk-STH66VLA.js} +40 -23
- package/dist/chunk-STH66VLA.js.map +1 -0
- package/dist/{chunk-FCOEJCUP.js → chunk-TFO6GBW7.js} +2 -2
- package/dist/{chunk-2ZDTGI5V.js → chunk-THZ2NAA4.js} +7 -7
- package/dist/{chunk-OQXOYHIV.js → chunk-TLX66HCW.js} +45 -37
- package/dist/chunk-TLX66HCW.js.map +1 -0
- package/dist/{chunk-VJFH2AXT.js → chunk-TP4N3X2Q.js} +2 -2
- package/dist/{chunk-B7BZAIHL.js → chunk-TPIBJP4S.js} +2 -2
- package/dist/{chunk-Q4NOI2CR.js → chunk-TVO5STZB.js} +5 -5
- package/dist/{chunk-JB7JE4QZ.js → chunk-TZ4SFX3M.js} +3 -3
- package/dist/{chunk-JD364H3Y.js → chunk-TZ633UZA.js} +6 -5
- package/dist/chunk-TZ633UZA.js.map +1 -0
- package/dist/{chunk-HEK4LQT6.js → chunk-UB76PBDF.js} +2 -2
- package/dist/{chunk-NFAKRI4S.js → chunk-UEIVXFUC.js} +2 -2
- package/dist/{chunk-DX527XPL.js → chunk-UOPQOBQZ.js} +3 -3
- package/dist/{chunk-X24P3ZYW.js → chunk-V5P5Q6HM.js} +10 -10
- package/dist/{chunk-7DBFEZRC.js → chunk-VIK3HAUQ.js} +2 -2
- package/dist/{chunk-74EZ565M.js → chunk-VPHOSIPB.js} +5 -5
- package/dist/{chunk-SX3V2DLV.js → chunk-VWBWKLXX.js} +4 -4
- package/dist/{chunk-VEFDL77X.js → chunk-VWGR5XUP.js} +2 -2
- package/dist/{chunk-SEH7KOVG.js → chunk-VXTYVJDK.js} +2 -2
- package/dist/{chunk-QYNCPS5W.js → chunk-WBKWIFXA.js} +6 -6
- package/dist/{chunk-YFHIESMD.js → chunk-WPZT2JD4.js} +2 -2
- package/dist/{chunk-GSFNH4C5.js → chunk-WROCSDVL.js} +5 -5
- package/dist/{chunk-VSLUFBMT.js → chunk-WTIOCG4M.js} +41 -27
- package/dist/chunk-WTIOCG4M.js.map +1 -0
- package/dist/{chunk-QZBUGUOY.js → chunk-XEE7PLDR.js} +6 -6
- package/dist/{chunk-Z4GWXTZV.js → chunk-XFU2S6XT.js} +7 -7
- package/dist/{chunk-RQDN4BN5.js → chunk-XLJJ2ZAP.js} +16 -16
- package/dist/{chunk-ACDYA5WC.js → chunk-XZTOIEKI.js} +2 -2
- package/dist/{chunk-LKVIZNUM.js → chunk-Y46RBFBV.js} +8 -8
- package/dist/{chunk-WBVHRLIS.js → chunk-YCCKY5VW.js} +5 -5
- package/dist/{chunk-SKZHOWTS.js → chunk-YDI6IJ6F.js} +2 -2
- package/dist/{chunk-V3SBJ3PB.js → chunk-Z5ABJLTM.js} +2 -2
- package/dist/{chunk-KQ74QU55.js → chunk-Z6UEOSL7.js} +3 -3
- package/dist/{chunk-G5ZVD5IJ.js → chunk-ZDWU52DJ.js} +2 -2
- package/dist/{chunk-2EKALM6P.js → chunk-ZFPJBKVZ.js} +4 -4
- package/dist/{chunk-FP4R47TM.js → chunk-ZGHIHEND.js} +2 -2
- package/dist/{chunk-F2DOTCF3.js → chunk-ZKFYBC6G.js} +2 -2
- package/dist/{chunk-4MGFUPQT.js → chunk-ZOUWHGV3.js} +4 -4
- package/dist/{chunk-4WK2RTVY.js → chunk-ZXLIWOXC.js} +5 -5
- package/dist/{chunk-UMDXGIRZ.js → chunk-ZZOOSKSV.js} +2 -2
- package/dist/data-display/Alert.js +4 -4
- package/dist/data-display/AsyncStateContainer.js +7 -7
- package/dist/data-display/Avatar.js +2 -2
- package/dist/data-display/Badge.js +3 -3
- package/dist/data-display/CardKit.js +18 -18
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +13 -13
- package/dist/data-display/DataGrid.js +2 -2
- package/dist/data-display/DataViews.js +89 -84
- package/dist/data-display/DescriptionItem.js +3 -3
- package/dist/data-display/EmptyState.js +3 -3
- package/dist/data-display/ErrorState.js +2 -2
- package/dist/data-display/HoverCard.js +1 -1
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/Lightbox.js +5 -5
- package/dist/data-display/LoadingState.js +3 -3
- package/dist/data-display/MapPreview.js +11 -11
- package/dist/data-display/SectionOnboarding.js +4 -4
- package/dist/data-display/Sheet.js +2 -2
- package/dist/data-display/StatCard.js +3 -3
- package/dist/data-display/Table.js +3 -3
- package/dist/feedback/ConfirmAction.js +7 -7
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +12 -10
- package/dist/form/Autocomplete.js +2 -2
- package/dist/form/Button.js +3 -3
- package/dist/form/Calendar.js +4 -4
- package/dist/form/CategorySelect.js +14 -12
- package/dist/form/CepField.js +10 -4
- package/dist/form/Checkbox.js +9 -2
- package/dist/form/CodeEditor.js +6 -4
- package/dist/form/CreatableSelect.js +4 -2
- package/dist/form/DateRangePicker.js +5 -5
- package/dist/form/Input.js +9 -3
- package/dist/form/InputOTP.js +5 -3
- package/dist/form/Menubar.js +4 -4
- package/dist/form/PhoneInput.js +4 -2
- package/dist/form/RadioGroup.js +6 -4
- package/dist/form/RichTextEditor.js +4 -2
- package/dist/form/Select.js +10 -2
- package/dist/form/Switch.js +9 -3
- package/dist/form/Textarea.js +5 -3
- package/dist/form/Toggle.js +5 -3
- package/dist/form/total-form.js +33 -28
- package/dist/icons.js +3 -3
- package/dist/layout/Box.js +2 -2
- package/dist/layout/Container.js +2 -2
- package/dist/layout/ContentToolbar.js +6 -6
- package/dist/layout/ScrollArea.js +3 -3
- package/dist/layout/Skeleton.js +2 -2
- package/dist/layout/Spacer.js +2 -2
- package/dist/layout/Stack.js +3 -3
- package/dist/native/chunks/{chunk-Q52IDAF2.js → chunk-D4EYAXNG.js} +6 -2
- package/dist/native/chunks/chunk-D4EYAXNG.js.map +1 -0
- package/dist/native/chunks/{chunk-EKKNUEA6.js → chunk-OGWPPQL4.js} +2 -2
- package/dist/native/chunks/chunk-OXHZDFJZ.js +15 -0
- package/dist/native/chunks/chunk-OXHZDFJZ.js.map +1 -0
- package/dist/native/chunks/{chunk-M4DTJDWU.js → chunk-QZAUOHDQ.js} +1 -1
- package/dist/native/chunks/chunk-QZAUOHDQ.js.map +1 -0
- package/dist/native/chunks/{chunk-UKCCYP52.js → chunk-RJVM5YDE.js} +2 -2
- package/dist/native/chunks/chunk-T6BJPP3E.js +26 -0
- package/dist/native/chunks/chunk-T6BJPP3E.js.map +1 -0
- package/dist/native/chunks/chunk-WKMDCNIN.js +351 -0
- package/dist/native/chunks/chunk-WKMDCNIN.js.map +1 -0
- package/dist/native/data-display/Alert.js +3 -3
- package/dist/native/data-display/Avatar.js +2 -2
- package/dist/native/data-display/Badge.js +3 -3
- package/dist/native/data-display/Chip.js +2 -2
- package/dist/native/data-display/EmptyState.js +4 -4
- package/dist/native/data-display/ErrorState.js +4 -4
- package/dist/native/data-display/LoadingState.js +1 -1
- package/dist/native/form/Button.js +2 -2
- package/dist/native/form/Checkbox.js +233 -0
- package/dist/native/form/Checkbox.js.map +1 -0
- package/dist/native/form/Input.js +233 -0
- package/dist/native/form/Input.js.map +1 -0
- package/dist/native/form/Select.js +348 -0
- package/dist/native/form/Select.js.map +1 -0
- package/dist/native/form/Switch.js +511 -0
- package/dist/native/form/Switch.js.map +1 -0
- package/dist/native/icons.js +2 -2
- package/dist/native/layout/Box.js +2 -2
- package/dist/native/layout/Container.js +1 -1
- package/dist/native/layout/Skeleton.js +1 -1
- package/dist/native/layout/Spacer.js +1 -1
- package/dist/native/layout/Stack.js +2 -2
- package/dist/native/typography/Heading.js +1 -1
- package/dist/native/typography/Paragraph.js +1 -1
- package/dist/native/typography/Text.js +1 -1
- package/dist/navigation/AppHeader.js +6 -6
- package/dist/navigation/CommandPalette.js +2 -2
- package/dist/navigation/NavigationMenu.js +5 -5
- package/dist/social-login-button.js +6 -6
- package/dist/types/components/form/Checkbox/Checkbox.base.d.ts +36 -0
- package/dist/types/components/form/Checkbox/Checkbox.base.d.ts.map +1 -0
- package/dist/types/components/form/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/Checkbox.helpers.d.ts +9 -3
- package/dist/types/components/form/Checkbox/Checkbox.helpers.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/Checkbox.metrics.d.ts +92 -0
- package/dist/types/components/form/Checkbox/Checkbox.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Checkbox/Checkbox.types.d.ts +8 -10
- package/dist/types/components/form/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/dist/types/components/form/Checkbox/index.d.ts +1 -1
- package/dist/types/components/form/Checkbox/index.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.base.d.ts +62 -0
- package/dist/types/components/form/Input/Input.base.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.helpers.d.ts +11 -0
- package/dist/types/components/form/Input/Input.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.metrics.d.ts +186 -0
- package/dist/types/components/form/Input/Input.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Input/Input.styles.d.ts +1 -35
- package/dist/types/components/form/Input/Input.styles.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.types.d.ts +12 -17
- package/dist/types/components/form/Input/Input.types.d.ts.map +1 -1
- package/dist/types/components/form/Input/index.d.ts +1 -1
- package/dist/types/components/form/Input/index.d.ts.map +1 -1
- package/dist/types/components/form/Select/Select.base.d.ts +75 -0
- package/dist/types/components/form/Select/Select.base.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.d.ts.map +1 -1
- package/dist/types/components/form/Select/Select.helpers.d.ts +36 -0
- package/dist/types/components/form/Select/Select.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.metrics.d.ts +72 -0
- package/dist/types/components/form/Select/Select.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Select/Select.types.d.ts +12 -49
- package/dist/types/components/form/Select/Select.types.d.ts.map +1 -1
- package/dist/types/components/form/Select/index.d.ts +1 -1
- package/dist/types/components/form/Select/index.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.base.d.ts +111 -0
- package/dist/types/components/form/Switch/Switch.base.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.helpers.d.ts +17 -0
- package/dist/types/components/form/Switch/Switch.helpers.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts +194 -0
- package/dist/types/components/form/Switch/Switch.metrics.d.ts.map +1 -0
- package/dist/types/components/form/Switch/Switch.parts.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.styles.d.ts +5 -3
- package/dist/types/components/form/Switch/Switch.styles.d.ts.map +1 -1
- package/dist/types/components/form/Switch/Switch.types.d.ts +9 -91
- package/dist/types/components/form/Switch/Switch.types.d.ts.map +1 -1
- package/dist/types/components/form/Switch/index.d.ts +1 -1
- package/dist/types/components/form/Switch/index.d.ts.map +1 -1
- package/dist/types/icons/paths.generated.d.ts +4 -0
- package/dist/types/icons/paths.generated.d.ts.map +1 -1
- package/dist/types/platform/aria.d.ts +59 -1
- package/dist/types/platform/aria.d.ts.map +1 -1
- package/dist/types/platform/test-id.d.ts +10 -0
- package/dist/types/platform/test-id.d.ts.map +1 -1
- package/dist/types/tokens/field-edge.core.d.ts +27 -0
- package/dist/types/tokens/field-edge.core.d.ts.map +1 -0
- package/dist/types/tokens/field-edge.d.ts +8 -9
- package/dist/types/tokens/field-edge.d.ts.map +1 -1
- package/dist/types-native/components/form/Checkbox/Checkbox.base.d.ts +36 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.helpers.d.ts +13 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.metrics.d.ts +92 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.native.d.ts +21 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.types.native.d.ts +27 -0
- package/dist/types-native/components/form/Checkbox/Checkbox.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Checkbox/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Checkbox/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.base.d.ts +62 -0
- package/dist/types-native/components/form/Input/Input.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.helpers.d.ts +11 -0
- package/dist/types-native/components/form/Input/Input.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.look.native.d.ts +61 -0
- package/dist/types-native/components/form/Input/Input.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.metrics.d.ts +186 -0
- package/dist/types-native/components/form/Input/Input.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.native.d.ts +22 -0
- package/dist/types-native/components/form/Input/Input.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/Input.types.native.d.ts +20 -0
- package/dist/types-native/components/form/Input/Input.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Input/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Input/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.base.d.ts +75 -0
- package/dist/types-native/components/form/Select/Select.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.helpers.d.ts +36 -0
- package/dist/types-native/components/form/Select/Select.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.look.native.d.ts +26 -0
- package/dist/types-native/components/form/Select/Select.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.metrics.d.ts +72 -0
- package/dist/types-native/components/form/Select/Select.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.native.d.ts +21 -0
- package/dist/types-native/components/form/Select/Select.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/Select.types.native.d.ts +29 -0
- package/dist/types-native/components/form/Select/Select.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Select/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Select/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.base.d.ts +111 -0
- package/dist/types-native/components/form/Switch/Switch.base.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.helpers.d.ts +17 -0
- package/dist/types-native/components/form/Switch/Switch.helpers.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts +43 -0
- package/dist/types-native/components/form/Switch/Switch.look.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts +194 -0
- package/dist/types-native/components/form/Switch/Switch.metrics.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.native.d.ts +20 -0
- package/dist/types-native/components/form/Switch/Switch.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/Switch.types.native.d.ts +27 -0
- package/dist/types-native/components/form/Switch/Switch.types.native.d.ts.map +1 -0
- package/dist/types-native/components/form/Switch/index.native.d.ts +3 -0
- package/dist/types-native/components/form/Switch/index.native.d.ts.map +1 -0
- package/dist/types-native/components/form/field-pulse.native.d.ts +18 -0
- package/dist/types-native/components/form/field-pulse.native.d.ts.map +1 -0
- package/dist/types-native/icons/paths.generated.d.ts +4 -0
- package/dist/types-native/icons/paths.generated.d.ts.map +1 -1
- package/dist/types-native/platform/aria.d.ts +59 -1
- package/dist/types-native/platform/aria.d.ts.map +1 -1
- package/dist/types-native/platform/test-id.d.ts +10 -0
- package/dist/types-native/platform/test-id.d.ts.map +1 -1
- package/dist/types-native/tokens/field-edge.core.d.ts +27 -0
- package/dist/types-native/tokens/field-edge.core.d.ts.map +1 -0
- package/dist/types-native/utils/withDefaults.d.ts +13 -0
- package/dist/types-native/utils/withDefaults.d.ts.map +1 -0
- package/dist/typography/Heading.js +2 -2
- package/dist/typography/Paragraph.js +2 -2
- package/dist/typography/Text.js +2 -2
- package/dist/user-avatar.js +7 -7
- package/dist/utility/InfiniteScroll.js +2 -2
- package/package.json +17 -1
- package/src/components/form/Checkbox/Checkbox.base.ts +36 -0
- package/src/components/form/Checkbox/Checkbox.helpers.ts +13 -13
- package/src/components/form/Checkbox/Checkbox.metrics.ts +73 -0
- package/src/components/form/Checkbox/Checkbox.native.tsx +246 -0
- package/src/components/form/Checkbox/Checkbox.tsx +34 -21
- package/src/components/form/Checkbox/Checkbox.types.native.ts +29 -0
- package/src/components/form/Checkbox/Checkbox.types.ts +12 -11
- package/src/components/form/Checkbox/NATIVE-NOTES.md +11 -0
- package/src/components/form/Checkbox/index.native.ts +8 -0
- package/src/components/form/Checkbox/index.ts +1 -1
- package/src/components/form/Input/Input.base.ts +84 -0
- package/src/components/form/Input/Input.helpers.ts +43 -0
- package/src/components/form/Input/Input.look.native.ts +246 -0
- package/src/components/form/Input/Input.metrics.ts +229 -0
- package/src/components/form/Input/Input.native.tsx +240 -0
- package/src/components/form/Input/Input.styles.ts +45 -51
- package/src/components/form/Input/Input.tsx +46 -42
- package/src/components/form/Input/Input.types.native.ts +29 -0
- package/src/components/form/Input/Input.types.ts +15 -17
- package/src/components/form/Input/NATIVE-NOTES.md +14 -0
- package/src/components/form/Input/index.native.ts +2 -0
- package/src/components/form/Input/index.ts +1 -1
- package/src/components/form/Select/NATIVE-NOTES.md +12 -0
- package/src/components/form/Select/Select.base.ts +78 -0
- package/src/components/form/Select/Select.helpers.ts +82 -0
- package/src/components/form/Select/Select.look.native.ts +99 -0
- package/src/components/form/Select/Select.metrics.ts +90 -0
- package/src/components/form/Select/Select.native.tsx +264 -0
- package/src/components/form/Select/Select.tsx +37 -25
- package/src/components/form/Select/Select.types.native.ts +30 -0
- package/src/components/form/Select/Select.types.ts +14 -51
- package/src/components/form/Select/index.native.ts +9 -0
- package/src/components/form/Select/index.ts +7 -1
- package/src/components/form/Switch/NATIVE-NOTES.md +12 -0
- package/src/components/form/Switch/Switch.base.ts +136 -0
- package/src/components/form/Switch/Switch.helpers.ts +61 -0
- package/src/components/form/Switch/Switch.look.native.ts +187 -0
- package/src/components/form/Switch/Switch.metrics.ts +191 -0
- package/src/components/form/Switch/Switch.native.tsx +360 -0
- package/src/components/form/Switch/Switch.parts.tsx +4 -4
- package/src/components/form/Switch/Switch.styles.ts +109 -147
- package/src/components/form/Switch/Switch.tsx +4 -2
- package/src/components/form/Switch/Switch.types.native.ts +34 -0
- package/src/components/form/Switch/Switch.types.ts +16 -117
- package/src/components/form/Switch/index.native.ts +8 -0
- package/src/components/form/Switch/index.ts +6 -1
- package/src/components/form/field-pulse.native.tsx +78 -0
- package/src/icons/glyphs.json +4 -0
- package/src/icons/paths.generated.ts +4 -0
- package/src/platform/aria.ts +72 -1
- package/src/platform/test-id.ts +13 -0
- package/src/tokens/field-edge.core.ts +87 -0
- package/src/tokens/field-edge.ts +10 -66
- package/dist/chunk-BJ3J6FTN.js.map +0 -1
- package/dist/chunk-FX5DY6VR.js.map +0 -1
- package/dist/chunk-JD364H3Y.js.map +0 -1
- package/dist/chunk-MLOWPVVW.js.map +0 -1
- package/dist/chunk-OQXOYHIV.js.map +0 -1
- package/dist/chunk-Q5EQC7NL.js.map +0 -1
- package/dist/chunk-QLWBQQW7.js.map +0 -1
- package/dist/chunk-RMSH2I3O.js.map +0 -1
- package/dist/chunk-TBWEIQUR.js +0 -263
- package/dist/chunk-TBWEIQUR.js.map +0 -1
- package/dist/chunk-VMNSGE2G.js.map +0 -1
- package/dist/chunk-VSLUFBMT.js.map +0 -1
- package/dist/native/chunks/chunk-4NK5ZQZ3.js +0 -10
- package/dist/native/chunks/chunk-4NK5ZQZ3.js.map +0 -1
- package/dist/native/chunks/chunk-M4DTJDWU.js.map +0 -1
- package/dist/native/chunks/chunk-Q52IDAF2.js.map +0 -1
- /package/dist/{chunk-2PCOC3PT.js.map → chunk-26Z7QWID.js.map} +0 -0
- /package/dist/{chunk-IJIT5HQP.js.map → chunk-2QFTAGDH.js.map} +0 -0
- /package/dist/{chunk-ENNW5SKT.js.map → chunk-2QLVUVVR.js.map} +0 -0
- /package/dist/{chunk-W3FAKT3D.js.map → chunk-2SWQ6HIK.js.map} +0 -0
- /package/dist/{chunk-7P2HZLEG.js.map → chunk-3UOHKHOT.js.map} +0 -0
- /package/dist/{chunk-URWGRPL7.js.map → chunk-3W7IEWEL.js.map} +0 -0
- /package/dist/{chunk-Z7JNCB5Q.js.map → chunk-426FTCMF.js.map} +0 -0
- /package/dist/{chunk-46UPILLK.js.map → chunk-4ETQRBZC.js.map} +0 -0
- /package/dist/{chunk-NQC6H7GY.js.map → chunk-4HYXEMBP.js.map} +0 -0
- /package/dist/{chunk-43NEBUV3.js.map → chunk-4K7FDVAB.js.map} +0 -0
- /package/dist/{chunk-LMJBINWN.js.map → chunk-4MLDWACO.js.map} +0 -0
- /package/dist/{chunk-GGE7Y53F.js.map → chunk-4TXIZ5WI.js.map} +0 -0
- /package/dist/{chunk-J6UFAMIC.js.map → chunk-5RQ7N63M.js.map} +0 -0
- /package/dist/{chunk-AVGTTWTE.js.map → chunk-65DLYC4S.js.map} +0 -0
- /package/dist/{chunk-B2A4DG77.js.map → chunk-6RGWDKUL.js.map} +0 -0
- /package/dist/{chunk-DCEMUZJQ.js.map → chunk-6WIDZGXE.js.map} +0 -0
- /package/dist/{chunk-R7MX5KPJ.js.map → chunk-6YLAVHV4.js.map} +0 -0
- /package/dist/{chunk-E27Y7FF2.js.map → chunk-6Z4H2Y77.js.map} +0 -0
- /package/dist/{chunk-PNYXXLPU.js.map → chunk-736HP6BL.js.map} +0 -0
- /package/dist/{chunk-C52BELLW.js.map → chunk-77F36LQQ.js.map} +0 -0
- /package/dist/{chunk-RXSGHPCR.js.map → chunk-7FOOLP5H.js.map} +0 -0
- /package/dist/{chunk-74OZ5KVR.js.map → chunk-7KTU6YMQ.js.map} +0 -0
- /package/dist/{chunk-X5D3PTWI.js.map → chunk-7MAOQIWA.js.map} +0 -0
- /package/dist/{chunk-5ZF3VASA.js.map → chunk-7ZH7ZB33.js.map} +0 -0
- /package/dist/{chunk-PQECNGDE.js.map → chunk-AGYGNNOM.js.map} +0 -0
- /package/dist/{chunk-PU3AAKRR.js.map → chunk-AJ6XEO4E.js.map} +0 -0
- /package/dist/{chunk-WX7VWW3W.js.map → chunk-B3BK2SNS.js.map} +0 -0
- /package/dist/{chunk-VJK5FBNK.js.map → chunk-B5PYBEXO.js.map} +0 -0
- /package/dist/{chunk-47UD6DZ4.js.map → chunk-BDVNAU2C.js.map} +0 -0
- /package/dist/{chunk-FGLV6BXQ.js.map → chunk-BEGWE5O4.js.map} +0 -0
- /package/dist/{chunk-6IUTT6BK.js.map → chunk-BEH4DN63.js.map} +0 -0
- /package/dist/{chunk-HKV4MQ2W.js.map → chunk-BLBOYCOV.js.map} +0 -0
- /package/dist/{chunk-24BUCMQA.js.map → chunk-BNNSO4MC.js.map} +0 -0
- /package/dist/{chunk-CZJLWCEG.js.map → chunk-BPYPUEM5.js.map} +0 -0
- /package/dist/{chunk-NHSMLVNC.js.map → chunk-BQQONDW5.js.map} +0 -0
- /package/dist/{chunk-DQHC5P64.js.map → chunk-BRSF5NRT.js.map} +0 -0
- /package/dist/{chunk-M7OHXNLF.js.map → chunk-CXVMD6FE.js.map} +0 -0
- /package/dist/{chunk-LYSSO6WC.js.map → chunk-CZPU5TW3.js.map} +0 -0
- /package/dist/{chunk-DOADQW7I.js.map → chunk-D4T646G4.js.map} +0 -0
- /package/dist/{chunk-2W4CIWTW.js.map → chunk-DBYFC6CF.js.map} +0 -0
- /package/dist/{chunk-76GZ55IC.js.map → chunk-DF2FFYZ7.js.map} +0 -0
- /package/dist/{chunk-BILE3A7F.js.map → chunk-DH75UNF3.js.map} +0 -0
- /package/dist/{chunk-6D5WEZ2L.js.map → chunk-FB36IHCE.js.map} +0 -0
- /package/dist/{chunk-OI3HOI74.js.map → chunk-FGUESLDX.js.map} +0 -0
- /package/dist/{chunk-PC5FFEIY.js.map → chunk-FINCVAAR.js.map} +0 -0
- /package/dist/{chunk-YK2PETUP.js.map → chunk-FRQ4HNGF.js.map} +0 -0
- /package/dist/{chunk-WO52KYSU.js.map → chunk-G2IPK2XE.js.map} +0 -0
- /package/dist/{chunk-E4FGKZID.js.map → chunk-GBNOYRLP.js.map} +0 -0
- /package/dist/{chunk-UNF65XZW.js.map → chunk-GBRKP5GZ.js.map} +0 -0
- /package/dist/{chunk-VLHGBFR6.js.map → chunk-GCXYCDOA.js.map} +0 -0
- /package/dist/{chunk-EX3PSZLV.js.map → chunk-GDEXYUPF.js.map} +0 -0
- /package/dist/{chunk-4N4ENTF7.js.map → chunk-GO4MVQGC.js.map} +0 -0
- /package/dist/{chunk-HDNK7BAX.js.map → chunk-GT7C6TSM.js.map} +0 -0
- /package/dist/{chunk-HBAPVB7T.js.map → chunk-HKKSZ7HG.js.map} +0 -0
- /package/dist/{chunk-3AOOI2NR.js.map → chunk-HR7YTBR7.js.map} +0 -0
- /package/dist/{chunk-AEGX66N7.js.map → chunk-I3MDKPGG.js.map} +0 -0
- /package/dist/{chunk-7BYFC2MR.js.map → chunk-I7HYGIEJ.js.map} +0 -0
- /package/dist/{chunk-D7FJ2GAD.js.map → chunk-IFNK5TPI.js.map} +0 -0
- /package/dist/{chunk-PODGTNXS.js.map → chunk-IH4RSRQA.js.map} +0 -0
- /package/dist/{chunk-UF27D35R.js.map → chunk-IIROZKW5.js.map} +0 -0
- /package/dist/{chunk-PUBPZOQJ.js.map → chunk-IPE5FFFD.js.map} +0 -0
- /package/dist/{chunk-37YPZHAG.js.map → chunk-JDMYD6QC.js.map} +0 -0
- /package/dist/{chunk-HSAH5QUQ.js.map → chunk-JIINGMEB.js.map} +0 -0
- /package/dist/{chunk-NRUYYGDZ.js.map → chunk-JXAYT6LX.js.map} +0 -0
- /package/dist/{chunk-ZBNTFWTG.js.map → chunk-KIHQE5YA.js.map} +0 -0
- /package/dist/{chunk-DVUPIVI2.js.map → chunk-KT6HWAEN.js.map} +0 -0
- /package/dist/{chunk-MY5VNNSP.js.map → chunk-MCRIT46W.js.map} +0 -0
- /package/dist/{chunk-6XPNJLXE.js.map → chunk-NARIG5FL.js.map} +0 -0
- /package/dist/{chunk-MBYO2F4Y.js.map → chunk-NUE774AN.js.map} +0 -0
- /package/dist/{chunk-ZEBJT5JZ.js.map → chunk-OCXCH2ZW.js.map} +0 -0
- /package/dist/{chunk-7TZ6OC5T.js.map → chunk-OH3YGJT5.js.map} +0 -0
- /package/dist/{chunk-SM3NRN7L.js.map → chunk-ON2CMKTI.js.map} +0 -0
- /package/dist/{chunk-VCTKJHXD.js.map → chunk-OOGEYCJH.js.map} +0 -0
- /package/dist/{chunk-J54WH74M.js.map → chunk-P6IPJYCS.js.map} +0 -0
- /package/dist/{chunk-23FCBIUN.js.map → chunk-P7FQUGED.js.map} +0 -0
- /package/dist/{chunk-THBT56JE.js.map → chunk-PANMJFDS.js.map} +0 -0
- /package/dist/{chunk-LZRURORY.js.map → chunk-PF5HDFYY.js.map} +0 -0
- /package/dist/{chunk-YVW7VPK4.js.map → chunk-PFLKPNBU.js.map} +0 -0
- /package/dist/{chunk-7EESF76V.js.map → chunk-PWXL3QQ6.js.map} +0 -0
- /package/dist/{chunk-7DNQHMDO.js.map → chunk-PXH24VIP.js.map} +0 -0
- /package/dist/{chunk-HBZIN6IQ.js.map → chunk-PZEC5CQA.js.map} +0 -0
- /package/dist/{chunk-LAHDFBDE.js.map → chunk-QFHH2NU5.js.map} +0 -0
- /package/dist/{chunk-GBB6XQ56.js.map → chunk-QGBMCB76.js.map} +0 -0
- /package/dist/{chunk-SOCKK67R.js.map → chunk-QRX5BYUQ.js.map} +0 -0
- /package/dist/{chunk-QZWKC3AP.js.map → chunk-QS7ZGRNS.js.map} +0 -0
- /package/dist/{chunk-IH4CX43Q.js.map → chunk-QZDBWXZG.js.map} +0 -0
- /package/dist/{chunk-PHCSPHDH.js.map → chunk-R6RVBYTU.js.map} +0 -0
- /package/dist/{chunk-KZSKI2R3.js.map → chunk-RPQ3W2C6.js.map} +0 -0
- /package/dist/{chunk-HEG7JIBM.js.map → chunk-RPWEXIAW.js.map} +0 -0
- /package/dist/{chunk-JB67KPGM.js.map → chunk-RRO2EOJB.js.map} +0 -0
- /package/dist/{chunk-BLT5ZBVL.js.map → chunk-RRX6ZTNX.js.map} +0 -0
- /package/dist/{chunk-7RZ4WOQW.js.map → chunk-RRZBATXK.js.map} +0 -0
- /package/dist/{chunk-7JWXLDRH.js.map → chunk-SAHQLXNN.js.map} +0 -0
- /package/dist/{chunk-LUMF63BM.js.map → chunk-SFAP5EH5.js.map} +0 -0
- /package/dist/{chunk-EGRFMPGD.js.map → chunk-SHDIZSN5.js.map} +0 -0
- /package/dist/{chunk-GJQYM3PM.js.map → chunk-SHQWIDD5.js.map} +0 -0
- /package/dist/{chunk-FCOEJCUP.js.map → chunk-TFO6GBW7.js.map} +0 -0
- /package/dist/{chunk-2ZDTGI5V.js.map → chunk-THZ2NAA4.js.map} +0 -0
- /package/dist/{chunk-VJFH2AXT.js.map → chunk-TP4N3X2Q.js.map} +0 -0
- /package/dist/{chunk-B7BZAIHL.js.map → chunk-TPIBJP4S.js.map} +0 -0
- /package/dist/{chunk-Q4NOI2CR.js.map → chunk-TVO5STZB.js.map} +0 -0
- /package/dist/{chunk-JB7JE4QZ.js.map → chunk-TZ4SFX3M.js.map} +0 -0
- /package/dist/{chunk-HEK4LQT6.js.map → chunk-UB76PBDF.js.map} +0 -0
- /package/dist/{chunk-NFAKRI4S.js.map → chunk-UEIVXFUC.js.map} +0 -0
- /package/dist/{chunk-DX527XPL.js.map → chunk-UOPQOBQZ.js.map} +0 -0
- /package/dist/{chunk-X24P3ZYW.js.map → chunk-V5P5Q6HM.js.map} +0 -0
- /package/dist/{chunk-7DBFEZRC.js.map → chunk-VIK3HAUQ.js.map} +0 -0
- /package/dist/{chunk-74EZ565M.js.map → chunk-VPHOSIPB.js.map} +0 -0
- /package/dist/{chunk-SX3V2DLV.js.map → chunk-VWBWKLXX.js.map} +0 -0
- /package/dist/{chunk-VEFDL77X.js.map → chunk-VWGR5XUP.js.map} +0 -0
- /package/dist/{chunk-SEH7KOVG.js.map → chunk-VXTYVJDK.js.map} +0 -0
- /package/dist/{chunk-QYNCPS5W.js.map → chunk-WBKWIFXA.js.map} +0 -0
- /package/dist/{chunk-YFHIESMD.js.map → chunk-WPZT2JD4.js.map} +0 -0
- /package/dist/{chunk-GSFNH4C5.js.map → chunk-WROCSDVL.js.map} +0 -0
- /package/dist/{chunk-QZBUGUOY.js.map → chunk-XEE7PLDR.js.map} +0 -0
- /package/dist/{chunk-Z4GWXTZV.js.map → chunk-XFU2S6XT.js.map} +0 -0
- /package/dist/{chunk-RQDN4BN5.js.map → chunk-XLJJ2ZAP.js.map} +0 -0
- /package/dist/{chunk-ACDYA5WC.js.map → chunk-XZTOIEKI.js.map} +0 -0
- /package/dist/{chunk-LKVIZNUM.js.map → chunk-Y46RBFBV.js.map} +0 -0
- /package/dist/{chunk-WBVHRLIS.js.map → chunk-YCCKY5VW.js.map} +0 -0
- /package/dist/{chunk-SKZHOWTS.js.map → chunk-YDI6IJ6F.js.map} +0 -0
- /package/dist/{chunk-V3SBJ3PB.js.map → chunk-Z5ABJLTM.js.map} +0 -0
- /package/dist/{chunk-KQ74QU55.js.map → chunk-Z6UEOSL7.js.map} +0 -0
- /package/dist/{chunk-G5ZVD5IJ.js.map → chunk-ZDWU52DJ.js.map} +0 -0
- /package/dist/{chunk-2EKALM6P.js.map → chunk-ZFPJBKVZ.js.map} +0 -0
- /package/dist/{chunk-FP4R47TM.js.map → chunk-ZGHIHEND.js.map} +0 -0
- /package/dist/{chunk-F2DOTCF3.js.map → chunk-ZKFYBC6G.js.map} +0 -0
- /package/dist/{chunk-4MGFUPQT.js.map → chunk-ZOUWHGV3.js.map} +0 -0
- /package/dist/{chunk-4WK2RTVY.js.map → chunk-ZXLIWOXC.js.map} +0 -0
- /package/dist/{chunk-UMDXGIRZ.js.map → chunk-ZZOOSKSV.js.map} +0 -0
- /package/dist/native/chunks/{chunk-EKKNUEA6.js.map → chunk-OGWPPQL4.js.map} +0 -0
- /package/dist/native/chunks/{chunk-UKCCYP52.js.map → chunk-RJVM5YDE.js.map} +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ActivityIndicator,
|
|
4
|
+
Platform,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text as RNText,
|
|
7
|
+
TextInput as RNTextInput,
|
|
8
|
+
View,
|
|
9
|
+
type GestureResponderEvent,
|
|
10
|
+
type InputModeOptions,
|
|
11
|
+
type StyleProp,
|
|
12
|
+
type TextInputProps as RNTextInputProps,
|
|
13
|
+
type TextStyle,
|
|
14
|
+
type ViewStyle,
|
|
15
|
+
} from 'react-native';
|
|
16
|
+
|
|
17
|
+
import { resolveInputProps } from './Input.helpers';
|
|
18
|
+
import { FieldPulse } from '../field-pulse.native';
|
|
19
|
+
import { fieldLook, helperStyle, labelStyle, type FieldState } from './Input.look.native';
|
|
20
|
+
import { ADORNMENT_GAP, INPUT_GLOW, INPUT_LOADING, INPUT_PULSE } from './Input.metrics';
|
|
21
|
+
import type { InputProps } from './Input.types.native';
|
|
22
|
+
import { webAria, webClick, webDisabled } from '../../../platform/aria';
|
|
23
|
+
import { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
24
|
+
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The keyboard an HTML input `type` asks for.
|
|
28
|
+
*
|
|
29
|
+
* `password` is the only one that is not a keyboard at all — it is React
|
|
30
|
+
* Native's `secureTextEntry`, which react-native-web turns back into
|
|
31
|
+
* `type="password"`. Everything the map does not name (`date`, `file`, `color`)
|
|
32
|
+
* has no React Native equivalent and falls through to a plain text field.
|
|
33
|
+
*/
|
|
34
|
+
const INPUT_MODE_FOR: Record<string, InputModeOptions> = {
|
|
35
|
+
text: 'text',
|
|
36
|
+
search: 'search',
|
|
37
|
+
email: 'email',
|
|
38
|
+
tel: 'tel',
|
|
39
|
+
url: 'url',
|
|
40
|
+
number: 'numeric',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export function typeProps(type: string | undefined): {
|
|
44
|
+
inputMode?: InputModeOptions;
|
|
45
|
+
secureTextEntry?: boolean;
|
|
46
|
+
} {
|
|
47
|
+
if (type === 'password') return { secureTextEntry: true };
|
|
48
|
+
const mode = type === undefined ? undefined : INPUT_MODE_FOR[type];
|
|
49
|
+
return mode === undefined ? {} : { inputMode: mode };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** MUI's `0 0 15px` halo, 20px and stronger once the field is focused. */
|
|
53
|
+
function glowStyle(color: string, focused: boolean): ViewStyle {
|
|
54
|
+
const glow = focused ? INPUT_GLOW.focused : INPUT_GLOW.rest;
|
|
55
|
+
return Platform.select<ViewStyle>({
|
|
56
|
+
android: { elevation: glow.blur / 2 },
|
|
57
|
+
default: {
|
|
58
|
+
shadowColor: color,
|
|
59
|
+
shadowOpacity: glow.alpha,
|
|
60
|
+
shadowRadius: glow.blur,
|
|
61
|
+
shadowOffset: { width: 0, height: 0 },
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* An adornment in its own slot, 8px from the value as `InputAdornment` puts it.
|
|
68
|
+
*
|
|
69
|
+
* No `testID`: the web field names ONE element, the `<input>` itself, so the
|
|
70
|
+
* native one names the same element and nothing else. A shared story that
|
|
71
|
+
* counts fields by a test-id prefix (`getAllByTestId(/perf-input-/)`) counts
|
|
72
|
+
* the same number on both renderers only if this holds — the two decorations
|
|
73
|
+
* below keep an id because they exist only while asked for.
|
|
74
|
+
*/
|
|
75
|
+
function Slot({
|
|
76
|
+
children,
|
|
77
|
+
side,
|
|
78
|
+
}: {
|
|
79
|
+
children: React.ReactNode;
|
|
80
|
+
side: 'start' | 'end';
|
|
81
|
+
}): React.JSX.Element | null {
|
|
82
|
+
if (children == null) return null;
|
|
83
|
+
return (
|
|
84
|
+
<View style={[styles.slot, side === 'start' ? { marginRight: ADORNMENT_GAP } : { marginLeft: ADORNMENT_GAP }]}>
|
|
85
|
+
{children}
|
|
86
|
+
</View>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** One line of text under or over the field, or nothing at all. */
|
|
91
|
+
function Line({
|
|
92
|
+
text,
|
|
93
|
+
style,
|
|
94
|
+
}: {
|
|
95
|
+
text: string | undefined;
|
|
96
|
+
style: StyleProp<TextStyle>;
|
|
97
|
+
}): React.JSX.Element | null {
|
|
98
|
+
if (text === undefined) return null;
|
|
99
|
+
return <RNText style={style}>{text}</RNText>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** MUI's 20px `CircularProgress` in the end slot; the platform's own arc on a device. */
|
|
103
|
+
function Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {
|
|
104
|
+
return (
|
|
105
|
+
<ActivityIndicator
|
|
106
|
+
testID={testID}
|
|
107
|
+
size={Platform.OS === 'ios' ? 'small' : INPUT_LOADING.spinnerSize}
|
|
108
|
+
color={color}
|
|
109
|
+
accessibilityLabel="loading"
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** MUI's `FormLabel` appends an asterisk to a required field's label. */
|
|
115
|
+
function labelText(label: string | undefined, required: boolean): string | undefined {
|
|
116
|
+
if (label === undefined) return undefined;
|
|
117
|
+
return required ? `${label} *` : label;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The focus flag the border and the label are drawn from, and the handlers that keep it. */
|
|
121
|
+
function useFocusState(
|
|
122
|
+
onFocus: RNTextInputProps['onFocus'],
|
|
123
|
+
onBlur: RNTextInputProps['onBlur'],
|
|
124
|
+
): {
|
|
125
|
+
focused: boolean;
|
|
126
|
+
handleFocus: NonNullable<RNTextInputProps['onFocus']>;
|
|
127
|
+
handleBlur: NonNullable<RNTextInputProps['onBlur']>;
|
|
128
|
+
} {
|
|
129
|
+
const [focused, setFocused] = React.useState(false);
|
|
130
|
+
return {
|
|
131
|
+
focused,
|
|
132
|
+
handleFocus: (event) => {
|
|
133
|
+
setFocused(true);
|
|
134
|
+
onFocus?.(event);
|
|
135
|
+
},
|
|
136
|
+
handleBlur: (event) => {
|
|
137
|
+
setFocused(false);
|
|
138
|
+
onBlur?.(event);
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The native `Input`.
|
|
145
|
+
*
|
|
146
|
+
* The label sits ABOVE the field rather than floating into a notch in its
|
|
147
|
+
* border, because React Native cannot cut a notch in a border — see
|
|
148
|
+
* `NATIVE-NOTES.md`. Everything else is the web field's arithmetic:
|
|
149
|
+
* `Input.look.native.ts` decides the paint, `Input.metrics.ts` holds the
|
|
150
|
+
* numbers, and both renderers read the same table.
|
|
151
|
+
*/
|
|
152
|
+
export const Input = React.forwardRef<RNTextInput, InputProps>((rawProps, ref) => {
|
|
153
|
+
const {
|
|
154
|
+
variant, size, type, label, error, helperText, startAdornment, endAdornment,
|
|
155
|
+
fullWidth, floating: _floating, glow, pulse, loading, disabled, required,
|
|
156
|
+
style, inputStyle, onClick, onPress, onFocus, onBlur, ...others
|
|
157
|
+
} = resolveInputProps(rawProps);
|
|
158
|
+
|
|
159
|
+
const theme = useUiTheme();
|
|
160
|
+
const { focused, handleFocus, handleBlur } = useFocusState(onFocus, onBlur);
|
|
161
|
+
const inactive = disabled || loading;
|
|
162
|
+
const state: FieldState = { focused: focused && !inactive, error, disabled: inactive };
|
|
163
|
+
const look = fieldLook(theme, variant, size, state);
|
|
164
|
+
|
|
165
|
+
const idFor = (suffix: string): string => childTestId(others, suffix, 'input');
|
|
166
|
+
const handlePress = (event: GestureResponderEvent): void => {
|
|
167
|
+
onClick?.(event);
|
|
168
|
+
onPress?.(event);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<View
|
|
173
|
+
style={[
|
|
174
|
+
styles.root,
|
|
175
|
+
fullWidth ? styles.fullWidth : styles.auto,
|
|
176
|
+
loading ? styles.loading : null,
|
|
177
|
+
style,
|
|
178
|
+
]}
|
|
179
|
+
>
|
|
180
|
+
{pulse ? (
|
|
181
|
+
<FieldPulse
|
|
182
|
+
color={theme.palette.primary.main}
|
|
183
|
+
radius={theme.spacing(INPUT_PULSE.radiusUnits)}
|
|
184
|
+
testID={idFor('pulse')}
|
|
185
|
+
/>
|
|
186
|
+
) : null}
|
|
187
|
+
<Line text={labelText(label, required)} style={labelStyle(theme, variant, size, state)} />
|
|
188
|
+
<View style={[look.box, glow ? glowStyle(theme.palette.primary.main, state.focused) : null]}>
|
|
189
|
+
<Slot side="start">{startAdornment}</Slot>
|
|
190
|
+
<RNTextInput
|
|
191
|
+
ref={ref}
|
|
192
|
+
testID={resolveTestId(others, 'input')}
|
|
193
|
+
style={[look.value, inputStyle]}
|
|
194
|
+
placeholderTextColor={look.placeholder}
|
|
195
|
+
editable={!inactive}
|
|
196
|
+
// The web input keeps focus on Enter (a form submits, the caret stays);
|
|
197
|
+
// React Native dismisses the keyboard for a single-line field. A
|
|
198
|
+
// caller wanting the platform behaviour passes its own.
|
|
199
|
+
blurOnSubmit={false}
|
|
200
|
+
aria-label={label}
|
|
201
|
+
aria-disabled={inactive}
|
|
202
|
+
onFocus={handleFocus}
|
|
203
|
+
onBlur={handleBlur}
|
|
204
|
+
onPressIn={handlePress}
|
|
205
|
+
{...webClick(handlePress)}
|
|
206
|
+
{...webDisabled(inactive)}
|
|
207
|
+
{...webAria({ 'aria-invalid': error, 'aria-required': required })}
|
|
208
|
+
{...typeProps(type)}
|
|
209
|
+
{...withoutTestIdProps(others)}
|
|
210
|
+
/>
|
|
211
|
+
<Slot side="end">
|
|
212
|
+
{loading ? <Spinner color={theme.palette.primary.main} testID={idFor('loading')} /> : endAdornment}
|
|
213
|
+
</Slot>
|
|
214
|
+
</View>
|
|
215
|
+
<Line text={helperText} style={helperStyle(theme, variant, size, state)} />
|
|
216
|
+
</View>
|
|
217
|
+
);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
Input.displayName = 'Input';
|
|
221
|
+
|
|
222
|
+
const styles = StyleSheet.create({
|
|
223
|
+
root: {
|
|
224
|
+
position: 'relative',
|
|
225
|
+
},
|
|
226
|
+
fullWidth: {
|
|
227
|
+
alignSelf: 'stretch',
|
|
228
|
+
width: '100%',
|
|
229
|
+
},
|
|
230
|
+
auto: {
|
|
231
|
+
alignSelf: 'flex-start',
|
|
232
|
+
},
|
|
233
|
+
loading: {
|
|
234
|
+
opacity: INPUT_LOADING.opacity,
|
|
235
|
+
},
|
|
236
|
+
slot: {
|
|
237
|
+
flexDirection: 'row',
|
|
238
|
+
alignItems: 'center',
|
|
239
|
+
},
|
|
240
|
+
});
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { alpha, keyframes } from '@mui/material/styles/index.js';
|
|
2
2
|
import type { CSSObject, Theme } from '@mui/material/styles/index.js';
|
|
3
3
|
|
|
4
|
+
import {
|
|
5
|
+
FILLED_WASH,
|
|
6
|
+
FLOATING_LABEL,
|
|
7
|
+
INPUT_BORDER,
|
|
8
|
+
INPUT_GLASS,
|
|
9
|
+
INPUT_GLOW,
|
|
10
|
+
INPUT_GRADIENT,
|
|
11
|
+
INPUT_PULSE,
|
|
12
|
+
} from './Input.metrics';
|
|
4
13
|
import type { InputProps } from './Input.types';
|
|
5
14
|
|
|
6
15
|
import { fieldEdge } from '../../../tokens/field-edge';
|
|
7
16
|
|
|
8
17
|
type InputVariant = NonNullable<InputProps['variant']>;
|
|
9
18
|
|
|
19
|
+
// The numbers below all come from `./Input.metrics`, which the native renderer
|
|
20
|
+
// reads too — see its header for why MUI's own values are in there as well.
|
|
21
|
+
export { muiVariantFor, SIZE_MAP } from './Input.metrics';
|
|
22
|
+
|
|
10
23
|
// Define pulse animation
|
|
11
24
|
const pulseAnimation = keyframes`
|
|
12
25
|
0% {
|
|
@@ -14,7 +27,7 @@ const pulseAnimation = keyframes`
|
|
|
14
27
|
opacity: 1;
|
|
15
28
|
}
|
|
16
29
|
70% {
|
|
17
|
-
box-shadow: 0 0 0
|
|
30
|
+
box-shadow: 0 0 0 ${INPUT_PULSE.spread}px currentColor;
|
|
18
31
|
opacity: 0;
|
|
19
32
|
}
|
|
20
33
|
100% {
|
|
@@ -23,34 +36,11 @@ const pulseAnimation = keyframes`
|
|
|
23
36
|
}
|
|
24
37
|
`;
|
|
25
38
|
|
|
26
|
-
/** Our four variants map onto MUI's three; `glass` and `gradient` restyle an outline. */
|
|
27
|
-
export const muiVariantFor = (variant: InputVariant): 'outlined' | 'filled' | 'standard' => {
|
|
28
|
-
switch (variant) {
|
|
29
|
-
case 'underline':
|
|
30
|
-
return 'standard';
|
|
31
|
-
case 'glass':
|
|
32
|
-
case 'gradient':
|
|
33
|
-
return 'outlined';
|
|
34
|
-
default:
|
|
35
|
-
return variant as 'outlined' | 'filled' | 'standard';
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// MUI gives a text field two heights, so the five house stops are drawn as two
|
|
40
|
-
// plus padding: `xs` tightens below small, `lg`/`xl` open up above medium.
|
|
41
|
-
export const SIZE_MAP = {
|
|
42
|
-
xs: { size: 'small' as const, sx: { '& .MuiInputBase-input': { padding: '6px 10px' } } },
|
|
43
|
-
sm: { size: 'small' as const },
|
|
44
|
-
md: { size: 'medium' as const },
|
|
45
|
-
lg: { size: 'medium' as const, sx: { '& .MuiInputBase-input': { padding: '16px 14px' } } },
|
|
46
|
-
xl: { size: 'medium' as const, sx: { '& .MuiInputBase-input': { padding: '20px 16px' } } },
|
|
47
|
-
};
|
|
48
|
-
|
|
49
39
|
export const glowStyles = (theme: Theme): CSSObject => ({
|
|
50
40
|
'& .MuiInputBase-root': {
|
|
51
|
-
boxShadow: `0 0
|
|
41
|
+
boxShadow: `0 0 ${INPUT_GLOW.rest.blur}px ${alpha(theme.palette.primary.main, INPUT_GLOW.rest.alpha)}`,
|
|
52
42
|
'&.Mui-focused': {
|
|
53
|
-
boxShadow: `0 0
|
|
43
|
+
boxShadow: `0 0 ${INPUT_GLOW.focused.blur}px ${alpha(theme.palette.primary.main, INPUT_GLOW.focused.alpha)}`,
|
|
54
44
|
},
|
|
55
45
|
},
|
|
56
46
|
});
|
|
@@ -64,12 +54,12 @@ export const pulseStyles = (theme: Theme): CSSObject => ({
|
|
|
64
54
|
top: '50%',
|
|
65
55
|
left: '0',
|
|
66
56
|
right: '0',
|
|
67
|
-
height:
|
|
57
|
+
height: `${INPUT_PULSE.height}px`,
|
|
68
58
|
transform: 'translateY(-50%)',
|
|
69
|
-
borderRadius: theme.spacing(
|
|
59
|
+
borderRadius: theme.spacing(INPUT_PULSE.radiusUnits),
|
|
70
60
|
backgroundColor: theme.palette.primary.main,
|
|
71
|
-
opacity:
|
|
72
|
-
animation: `${pulseAnimation}
|
|
61
|
+
opacity: INPUT_PULSE.opacity,
|
|
62
|
+
animation: `${pulseAnimation} ${INPUT_PULSE.ms / 1000}s infinite`,
|
|
73
63
|
pointerEvents: 'none',
|
|
74
64
|
zIndex: -1,
|
|
75
65
|
},
|
|
@@ -77,11 +67,11 @@ export const pulseStyles = (theme: Theme): CSSObject => ({
|
|
|
77
67
|
|
|
78
68
|
export const floatingLabelStyles = (theme: Theme): CSSObject => ({
|
|
79
69
|
'& .MuiInputLabel-root': {
|
|
80
|
-
transform:
|
|
70
|
+
transform: `translate(${FLOATING_LABEL.rest.x}px, ${FLOATING_LABEL.rest.y}px) scale(1)`,
|
|
81
71
|
'&.MuiInputLabel-shrink': {
|
|
82
|
-
transform:
|
|
72
|
+
transform: `translate(${FLOATING_LABEL.shrink.x}px, ${FLOATING_LABEL.shrink.y}px) scale(${FLOATING_LABEL.scale})`,
|
|
83
73
|
backgroundColor: theme.palette.background.paper,
|
|
84
|
-
padding:
|
|
74
|
+
padding: `0 ${FLOATING_LABEL.paddingX}px`,
|
|
85
75
|
},
|
|
86
76
|
},
|
|
87
77
|
});
|
|
@@ -90,17 +80,17 @@ export const inputBaseStyles = (theme: Theme, variant?: InputVariant): CSSObject
|
|
|
90
80
|
switch (variant) {
|
|
91
81
|
case 'glass':
|
|
92
82
|
return {
|
|
93
|
-
backgroundColor: alpha(theme.palette.background.paper,
|
|
94
|
-
backdropFilter:
|
|
95
|
-
border:
|
|
83
|
+
backgroundColor: alpha(theme.palette.background.paper, INPUT_GLASS.background.rest),
|
|
84
|
+
backdropFilter: `blur(${INPUT_GLASS.blur}px)`,
|
|
85
|
+
border: `${INPUT_BORDER.rest}px solid ${fieldEdge(theme)}`,
|
|
96
86
|
'&:hover': {
|
|
97
|
-
backgroundColor: alpha(theme.palette.background.paper,
|
|
98
|
-
borderColor: alpha(theme.palette.primary.main,
|
|
87
|
+
backgroundColor: alpha(theme.palette.background.paper, INPUT_GLASS.background.hover),
|
|
88
|
+
borderColor: alpha(theme.palette.primary.main, INPUT_GLASS.hoverBorderAlpha),
|
|
99
89
|
},
|
|
100
90
|
'&.Mui-focused': {
|
|
101
|
-
backgroundColor: alpha(theme.palette.background.paper,
|
|
91
|
+
backgroundColor: alpha(theme.palette.background.paper, INPUT_GLASS.background.focused),
|
|
102
92
|
borderColor: theme.palette.primary.main,
|
|
103
|
-
boxShadow: `0 0 0
|
|
93
|
+
boxShadow: `0 0 0 ${INPUT_GLASS.focusRing.width}px ${alpha(theme.palette.primary.main, INPUT_GLASS.focusRing.alpha)}`,
|
|
104
94
|
},
|
|
105
95
|
};
|
|
106
96
|
case 'underline':
|
|
@@ -122,11 +112,15 @@ export const inputBaseStyles = (theme: Theme, variant?: InputVariant): CSSObject
|
|
|
122
112
|
}
|
|
123
113
|
};
|
|
124
114
|
|
|
115
|
+
/** The 135° fill between the two brand hues, at one of its three strengths. */
|
|
116
|
+
const gradientFill = (theme: Theme, strength: number): string =>
|
|
117
|
+
`linear-gradient(${INPUT_GRADIENT.angleDeg}deg, ${alpha(theme.palette.primary.main, strength)}, ${alpha(theme.palette.secondary.main, strength)})`;
|
|
118
|
+
|
|
125
119
|
// The border is a gradient painted behind the field and masked to a 2px ring,
|
|
126
120
|
// since CSS cannot put a gradient on `border-color` directly.
|
|
127
121
|
const gradientStyles = (theme: Theme): CSSObject => ({
|
|
128
|
-
background:
|
|
129
|
-
border:
|
|
122
|
+
background: gradientFill(theme, INPUT_GRADIENT.fill.rest),
|
|
123
|
+
border: `${INPUT_GRADIENT.borderWidth}px solid transparent`,
|
|
130
124
|
backgroundOrigin: 'border-box',
|
|
131
125
|
backgroundClip: 'padding-box, border-box',
|
|
132
126
|
position: 'relative',
|
|
@@ -138,19 +132,19 @@ const gradientStyles = (theme: Theme): CSSObject => ({
|
|
|
138
132
|
right: 0,
|
|
139
133
|
bottom: 0,
|
|
140
134
|
borderRadius: 'inherit',
|
|
141
|
-
background: `linear-gradient(
|
|
135
|
+
background: `linear-gradient(${INPUT_GRADIENT.angleDeg}deg, ${theme.palette.primary.main}, ${theme.palette.secondary.main})`,
|
|
142
136
|
mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
|
|
143
137
|
maskComposite: 'exclude',
|
|
144
|
-
padding:
|
|
138
|
+
padding: `${INPUT_GRADIENT.borderWidth}px`,
|
|
145
139
|
zIndex: -1,
|
|
146
140
|
},
|
|
147
141
|
'&:hover': {
|
|
148
|
-
background:
|
|
142
|
+
background: gradientFill(theme, INPUT_GRADIENT.fill.hover),
|
|
149
143
|
},
|
|
150
144
|
'&.Mui-focused': {
|
|
151
|
-
background:
|
|
145
|
+
background: gradientFill(theme, INPUT_GRADIENT.fill.focused),
|
|
152
146
|
'&::before': {
|
|
153
|
-
background: `linear-gradient(
|
|
147
|
+
background: `linear-gradient(${INPUT_GRADIENT.angleDeg}deg, ${theme.palette.primary.dark}, ${theme.palette.secondary.dark})`,
|
|
154
148
|
},
|
|
155
149
|
},
|
|
156
150
|
});
|
|
@@ -164,7 +158,7 @@ export const outlinedStyles = (theme: Theme): CSSObject => ({
|
|
|
164
158
|
},
|
|
165
159
|
'&.Mui-focused fieldset': {
|
|
166
160
|
borderColor: theme.palette.primary.main,
|
|
167
|
-
borderWidth:
|
|
161
|
+
borderWidth: INPUT_BORDER.focused,
|
|
168
162
|
},
|
|
169
163
|
'&.Mui-error fieldset': {
|
|
170
164
|
borderColor: theme.palette.error.main,
|
|
@@ -172,11 +166,11 @@ export const outlinedStyles = (theme: Theme): CSSObject => ({
|
|
|
172
166
|
});
|
|
173
167
|
|
|
174
168
|
export const filledStyles = (theme: Theme): CSSObject => ({
|
|
175
|
-
backgroundColor: alpha(theme.palette.action.hover,
|
|
169
|
+
backgroundColor: alpha(theme.palette.action.hover, FILLED_WASH.rest),
|
|
176
170
|
'&:hover': {
|
|
177
|
-
backgroundColor: alpha(theme.palette.action.hover,
|
|
171
|
+
backgroundColor: alpha(theme.palette.action.hover, FILLED_WASH.hover),
|
|
178
172
|
},
|
|
179
173
|
'&.Mui-focused': {
|
|
180
|
-
backgroundColor: alpha(theme.palette.action.hover,
|
|
174
|
+
backgroundColor: alpha(theme.palette.action.hover, FILLED_WASH.focused),
|
|
181
175
|
},
|
|
182
176
|
});
|
|
@@ -3,6 +3,7 @@ import InputAdornment from '@mui/material/InputAdornment/index.js';
|
|
|
3
3
|
import { styled } from '@mui/material/styles/index.js';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
|
|
6
|
+
import { INPUT_LOADING } from './Input.metrics';
|
|
6
7
|
import { TextFieldSlim } from './text-field-slim';
|
|
7
8
|
|
|
8
9
|
import {
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
SIZE_MAP,
|
|
17
18
|
} from './Input.styles';
|
|
18
19
|
import type { InputProps } from './Input.types';
|
|
20
|
+
import { splitTestId } from '../../../platform/test-id';
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* `TextFieldSlim`, not `TextField` — see `text-field-slim.tsx`. MUI's own
|
|
@@ -35,7 +37,7 @@ const StyledTextField = styled(TextFieldSlim, {
|
|
|
35
37
|
loading?: boolean;
|
|
36
38
|
}>(({ theme, customVariant, floating, glow, pulse, loading }) => ({
|
|
37
39
|
position: 'relative',
|
|
38
|
-
opacity: loading ?
|
|
40
|
+
opacity: loading ? INPUT_LOADING.opacity : 1,
|
|
39
41
|
|
|
40
42
|
...(glow ? glowStyles(theme) : {}),
|
|
41
43
|
...(pulse ? pulseStyles(theme) : {}),
|
|
@@ -58,7 +60,7 @@ const EndAdornment: React.FC<{ loading: boolean; endAdornment?: React.ReactNode
|
|
|
58
60
|
if (loading) {
|
|
59
61
|
return (
|
|
60
62
|
<InputAdornment position="end">
|
|
61
|
-
<CircularProgress size={
|
|
63
|
+
<CircularProgress size={INPUT_LOADING.spinnerSize} />
|
|
62
64
|
</InputAdornment>
|
|
63
65
|
);
|
|
64
66
|
}
|
|
@@ -96,49 +98,51 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
96
98
|
onClick,
|
|
97
99
|
onFocus,
|
|
98
100
|
onBlur,
|
|
99
|
-
'data-testid': dataTestId,
|
|
100
101
|
'aria-label': ariaLabel,
|
|
101
|
-
...
|
|
102
|
+
...rest
|
|
102
103
|
},
|
|
103
104
|
ref,
|
|
104
|
-
) =>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
105
|
+
) => {
|
|
106
|
+
const { testId: dataTestId, rest: props } = splitTestId(rest);
|
|
107
|
+
return (
|
|
108
|
+
<StyledTextField
|
|
109
|
+
ref={ref}
|
|
110
|
+
variant={muiVariantFor(variant)}
|
|
111
|
+
customVariant={variant}
|
|
112
|
+
floating={floating}
|
|
113
|
+
glow={glow}
|
|
114
|
+
pulse={pulse}
|
|
115
|
+
loading={loading}
|
|
116
|
+
label={label}
|
|
117
|
+
error={error}
|
|
118
|
+
helperText={helperText}
|
|
119
|
+
fullWidth={fullWidth}
|
|
120
|
+
{...interactionProps(loading, onClick, props.disabled)}
|
|
121
|
+
onFocus={onFocus}
|
|
122
|
+
onBlur={onBlur}
|
|
123
|
+
/*
|
|
124
|
+
* `aria-label` has to ride `inputProps` to reach the `<input>` (FUT-755).
|
|
125
|
+
* Spread with the rest it lands on the FormControl DIV that the text
|
|
126
|
+
* field renders as its root, which carries no role — so the field kept
|
|
127
|
+
* no accessible name, and a source grep saying "this input is labelled"
|
|
128
|
+
* disagreed with the DOM. The reports search box and the block-title
|
|
129
|
+
* inputs were both named in source and anonymous to a screen reader.
|
|
130
|
+
*/
|
|
131
|
+
inputProps={{
|
|
132
|
+
'data-testid': dataTestId,
|
|
133
|
+
...(ariaLabel === undefined ? {} : { 'aria-label': ariaLabel }),
|
|
134
|
+
}}
|
|
135
|
+
InputProps={{
|
|
136
|
+
startAdornment: startAdornment && (
|
|
137
|
+
<InputAdornment position="start">{startAdornment}</InputAdornment>
|
|
138
|
+
),
|
|
139
|
+
endAdornment: <EndAdornment loading={loading} endAdornment={endAdornment} />,
|
|
140
|
+
}}
|
|
141
|
+
{...SIZE_MAP[size]}
|
|
142
|
+
{...props}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
},
|
|
142
146
|
);
|
|
143
147
|
|
|
144
148
|
Input.displayName = 'Input';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GestureResponderEvent,
|
|
3
|
+
StyleProp,
|
|
4
|
+
TextInputProps as RNTextInputProps,
|
|
5
|
+
TextStyle,
|
|
6
|
+
ViewStyle,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
|
|
9
|
+
import type { InputBaseProps } from './Input.base';
|
|
10
|
+
|
|
11
|
+
export type { InputBaseProps, InputSize, InputVariant } from './Input.base';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The native `Input`: the shared contract, plus a react-native `TextInput`'s
|
|
15
|
+
* own props — `value`, `onChangeText`, `keyboardType`, `selection` and the
|
|
16
|
+
* rest — where the contract does not already name them.
|
|
17
|
+
*
|
|
18
|
+
* `onClick` keeps its web name so a shared screen does not have to know which
|
|
19
|
+
* renderer it is on, and `onPress` is accepted too; both fire when the field is
|
|
20
|
+
* pressed. `style` reaches the box the border is drawn on, which is what `sx`
|
|
21
|
+
* dresses on the web; `inputStyle` reaches the `TextInput` inside it.
|
|
22
|
+
*/
|
|
23
|
+
export type InputProps = InputBaseProps &
|
|
24
|
+
Omit<RNTextInputProps, keyof InputBaseProps | 'style'> & {
|
|
25
|
+
onClick?: (event: GestureResponderEvent) => void;
|
|
26
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
27
|
+
style?: StyleProp<ViewStyle>;
|
|
28
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
29
|
+
};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
import type { SizeValue } from '../../../tokens/scales';
|
|
2
1
|
import type { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel/index.js';
|
|
3
|
-
import type { InputHTMLAttributes
|
|
2
|
+
import type { InputHTMLAttributes } from 'react';
|
|
4
3
|
import type React from 'react';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
export type InputSize = SizeValue;
|
|
5
|
+
import type { InputBaseProps } from './Input.base';
|
|
8
6
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
export type { InputBaseProps, InputSize, InputVariant } from './Input.base';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The web `Input`: the shared contract, plus everything an `<input>` accepts
|
|
11
|
+
* that the contract does not already name.
|
|
12
|
+
*
|
|
13
|
+
* `value`, `defaultValue` and `onChange` keep the DOM's own types — they are
|
|
14
|
+
* not in the base, because a web `value` is `string | number | readonly
|
|
15
|
+
* string[]` and a React Native one is a `string`.
|
|
16
|
+
*/
|
|
17
|
+
export interface InputProps
|
|
18
|
+
extends InputBaseProps,
|
|
19
|
+
Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'color' | keyof InputBaseProps> {
|
|
22
20
|
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
23
21
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
24
22
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Input on React Native
|
|
2
|
+
|
|
3
|
+
Known rendering gaps, one bullet each; `pnpm native:ledger` reads them.
|
|
4
|
+
|
|
5
|
+
- The label sits ABOVE the field at its shrunk size (12px, aligned with the value's own left inset) instead of floating into a notch in the border: React Native can neither cut a notch in a border nor animate a label into one, so `floating` has nothing left to move.
|
|
6
|
+
- `filled` keeps MUI's lopsided `25px 12px 8px` inset, which on the web is where the floating label sits inside the box — so a native filled field reads low in its box, with the label above it.
|
|
7
|
+
- `glass` paints its 0.1 paper wash and hairline without the 20px backdrop blur (React Native has no backdrop filter), and draws ONE border where the web draws two — its own on the field root, plus the outlined fieldset's underneath.
|
|
8
|
+
- `gradient` paints the first stop of its 135° fill flat and gives the 2px ring the gradient's first hue: React Native core has no gradient fill and no masked pseudo-element border.
|
|
9
|
+
- Hover has no touch equivalent, so the web's hover border, its brighter glass wash and its deeper filled wash are not drawn; focus is, and it carries the same colours.
|
|
10
|
+
- `pulse` grows by scaling the bar rather than spreading a box-shadow, which React Native does not have; `glow` is a shadow on iOS and an elevation on Android, so its halo is not symmetrical there.
|
|
11
|
+
- `onClick` fires from the DOM click under react-native-web and from `onPressIn` on a device — react-native-web forwards only the first and React Native only the second, so exactly one runs and never both.
|
|
12
|
+
- Enter keeps focus (`blurOnSubmit={false}`), as it does in a web `<input>`; React Native's own default for a single-line field is to dismiss the keyboard, and a caller wanting that passes its own.
|
|
13
|
+
- An HTML `type` React Native has no keyboard for (`date`, `time`, `file`, `color`) renders a plain text field; `text`, `search`, `email`, `tel`, `url` and `number` pick the keyboard and `password` sets secure entry.
|
|
14
|
+
- The value, label and helper text are set in MUI's own numbers (`body1` at 16px on a 23px line, the 0.75 shrunk label, `caption` at 12px); a host that re-themes MUI's typography variants moves the web only.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Input } from './Input';
|
|
2
|
-
export type { InputProps, InputSize,InputVariant } from './Input.types';
|
|
2
|
+
export type { InputBaseProps, InputProps, InputSize, InputVariant } from './Input.types';
|