@12-apps/ui 6.40.0 → 6.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NATIVE.md +1 -1
- package/components-catalog.md +43 -5
- package/dist/_internal/components/data-display/Badge/Badge.js +3 -3
- package/dist/_internal/components/data-display/Badge/Badge.styles.js +3 -3
- package/dist/_internal/components/data-display/Badge/BadgeContent.js +3 -3
- package/dist/_internal/components/data-display/CardKit/CardKebab.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
- package/dist/_internal/components/data-display/CardKit/use-row-confirm.js +5 -5
- package/dist/_internal/components/data-display/Carousel/Carousel.chrome.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.parts.js +3 -3
- package/dist/_internal/components/data-display/Carousel/Carousel.styles.js +3 -3
- package/dist/_internal/components/data-display/Chart/Chart.js +3 -3
- package/dist/_internal/components/data-display/Chart/SpecChart.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-context.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-internals.js +3 -3
- package/dist/_internal/components/data-display/Chart/chart-renderers.js +3 -3
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +49 -49
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +64 -64
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +7 -7
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +8 -8
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +14 -14
- package/dist/_internal/components/data-display/DataViews/base-card.js +3 -3
- package/dist/_internal/components/data-display/DataViews/base-list-card.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +18 -18
- package/dist/_internal/components/data-display/DataViews/data-views-columns.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-day-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-empty.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-export.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +23 -23
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +7 -7
- package/dist/_internal/components/data-display/DataViews/data-views-grid-helpers.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +46 -46
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +29 -29
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +37 -14
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +38 -17
- package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +1 -1
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-search.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-select-all-strip.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +17 -17
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +24 -24
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +16 -16
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +5 -5
- package/dist/_internal/components/data-display/DataViews/use-data-views-state.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetBody.js +7 -7
- package/dist/_internal/components/data-display/FleetMap/FleetCanvas.js +6 -6
- package/dist/_internal/components/data-display/FleetMap/FleetMap.fixtures.js +2 -2
- package/dist/_internal/components/data-display/FleetMap/FleetMap.js +9 -9
- package/dist/_internal/components/data-display/MapPreview/MapLayers.js +4 -4
- package/dist/_internal/components/data-display/MapPreview/MapPreview.js +5 -5
- package/dist/_internal/components/data-display/MapPreview/MapSearchBar.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.body.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.js +3 -3
- package/dist/_internal/components/data-display/Sheet/Sheet.styles.js +3 -3
- package/dist/_internal/components/data-display/index.js +9 -9
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/Dialog/Dialog.js +2 -2
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +5 -5
- package/dist/_internal/components/feedback/index.js +8 -8
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +7 -7
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocompleteField.js +5 -5
- package/dist/_internal/components/form/AddressAutocomplete/AddressFallbackField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressInputField.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressTextField.js +3 -3
- package/dist/_internal/components/form/Autocomplete/Autocomplete.js +5 -5
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +3 -3
- package/dist/_internal/components/form/Autocomplete/useAutocomplete.js +1 -1
- package/dist/_internal/components/form/Button/Button.js +4 -4
- package/dist/_internal/components/form/Button/Button.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryPanel.js +8 -8
- package/dist/_internal/components/form/CategorySelect/CategoryPanelFoot.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelHead.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategoryPanelList.js +5 -5
- package/dist/_internal/components/form/CategorySelect/CategoryRows.js +4 -4
- package/dist/_internal/components/form/CategorySelect/CategorySelect.js +10 -10
- package/dist/_internal/components/form/CategorySelect/CategorySelect.styles.js +3 -3
- package/dist/_internal/components/form/CategorySelect/CategoryTrigger.js +4 -4
- package/dist/_internal/components/form/CepField/CepField.js +5 -5
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +2 -2
- package/dist/_internal/components/form/Command/Command.js +3 -3
- package/dist/_internal/components/form/Command/Command.styles.js +3 -3
- package/dist/_internal/components/form/CreatableSelect/CreatableSelect.js +3 -3
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.hooks.js +5 -5
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.js +7 -7
- package/dist/_internal/components/form/DateRangePicker/DateRangePicker.range.js +4 -4
- package/dist/_internal/components/form/DateRangePicker/DateRangePickerFields.js +5 -5
- package/dist/_internal/components/form/Input/Input.js +4 -4
- package/dist/_internal/components/form/Input/Input.styles.js +3 -3
- package/dist/_internal/components/form/InputOTP/InputOTP.js +4 -4
- package/dist/_internal/components/form/InputOTP/InputOTP.styles.js +3 -3
- package/dist/_internal/components/form/Label/Label.js +3 -3
- package/dist/_internal/components/form/Label/Label.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.item.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.styles.js +3 -3
- package/dist/_internal/components/form/Menubar/Menubar.toolbar.js +3 -3
- package/dist/_internal/components/form/NumberField/NumberField.helpers.js +20 -0
- package/dist/_internal/components/form/NumberField/NumberField.js +28 -0
- package/dist/_internal/components/form/NumberField/NumberField.types.js +1 -0
- package/dist/_internal/components/form/NumberField/NumberField.types.js.map +1 -0
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.js +5 -5
- package/dist/_internal/components/form/RadioGroup/RadioGroup.styles.js +3 -3
- package/dist/_internal/components/form/RadioGroup/RadioGroup.variants.js +4 -4
- package/dist/_internal/components/form/RichTextEditor/RichTextEditor.js +3 -3
- package/dist/_internal/components/form/Select/Select.js +3 -3
- package/dist/_internal/components/form/Switch/Switch.js +5 -5
- package/dist/_internal/components/form/Switch/Switch.parts.js +3 -3
- package/dist/_internal/components/form/Switch/Switch.styles.js +2 -2
- package/dist/_internal/components/form/Textarea/Textarea.js +3 -3
- package/dist/_internal/components/form/Textarea/TextareaRichEditor.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.js +4 -4
- package/dist/_internal/components/form/Toggle/Toggle.styles.js +3 -3
- package/dist/_internal/components/form/ToggleGroup/ToggleGroup.js +3 -3
- package/dist/_internal/components/form/index.js +54 -48
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +11 -11
- package/dist/_internal/components/form/total-form/Fields/CepField.js +6 -6
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/TextField.js +5 -5
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +24 -24
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -5
- package/dist/_internal/components/index.js +156 -117
- package/dist/_internal/components/layout/Box/Box.js +6 -6
- package/dist/_internal/components/layout/Card/Card.js +2 -2
- package/dist/_internal/components/layout/ContentToolbar/ColumnsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/FilterTrigger.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectDropdown.js +4 -4
- package/dist/_internal/components/layout/ContentToolbar/MultiSelectTriggers.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SavedViewsMenu.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/SortByDropdown.js +3 -3
- package/dist/_internal/components/layout/ContentToolbar/ViewSelector.js +3 -3
- package/dist/_internal/components/layout/ScrollArea/ScrollArea.js +2 -2
- package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js +19 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.hooks.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +54 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js +12 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.metrics.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +59 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js +37 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.styles.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.types.js +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingCard.types.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +56 -0
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js +10 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.context.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +65 -0
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +63 -0
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js.map +1 -0
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +65 -0
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js.map +1 -0
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +3 -3
- package/dist/_internal/components/layout/SettingsLayout/SettingsSectionChips.js +2 -2
- package/dist/_internal/components/layout/Stack/Stack.js +7 -7
- package/dist/_internal/components/layout/TableFilter/TableFilter.js +3 -3
- package/dist/_internal/components/layout/index.js +88 -26
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +8 -8
- package/dist/_internal/components/navigation/AppHeader/AppHeader.identity.js +3 -3
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMegaSection.js +2 -2
- package/dist/_internal/components/navigation/NavigationMenu/NavigationMenu.js +4 -4
- package/dist/_internal/components/navigation/NavigationMenu/NavigationStandardBody.js +2 -2
- package/dist/_internal/components/navigation/Pagination/Pagination.js +4 -4
- package/dist/_internal/components/navigation/Pagination/PaginationParts.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +4 -4
- package/dist/_internal/components/navigation/Tabs/Tabs.styles.js +2 -2
- package/dist/_internal/components/navigation/index.js +27 -27
- package/dist/_internal/components/typography/index.js +4 -4
- package/dist/_internal/components/utility/InstallPrompt/InstallPrompt.js +2 -2
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.helpers.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStep.parts.js +3 -3
- package/dist/_internal/components/utility/WorkflowStep/WorkflowStepRow.js +3 -3
- package/dist/_internal/components/utility/index.js +16 -16
- package/dist/_internal/en-US.data-display.js +2 -2
- package/dist/_internal/en-US.layout.js +5 -1
- package/dist/_internal/icons/Icon.js +6 -6
- package/dist/_internal/provider/UiProvider.js +5 -5
- package/dist/_internal/provider/mui-bridge.js +4 -4
- package/dist/_internal/provider/use-ui-theme.js +5 -5
- package/dist/_internal/pt-BR.data-display.js +2 -2
- package/dist/_internal/pt-BR.layout.js +5 -1
- package/dist/_internal/social-login-button/social-login-button.js +7 -7
- package/dist/_internal/tokens/density.js +3 -3
- package/dist/_internal/tokens/field-height.js +2 -2
- package/dist/_internal/user-avatar/user-avatar.js +7 -7
- package/dist/charts.js +3 -3
- package/dist/chunk-2GTORM5E.js +1 -0
- package/dist/chunk-2GTORM5E.js.map +1 -0
- package/dist/{chunk-3PGFMBEI.js → chunk-2LKWJV65.js} +5 -5
- package/dist/{chunk-IIUB4IOH.js → chunk-2XHIF3M3.js} +4 -4
- package/dist/chunk-33L26P4J.js +27 -0
- package/dist/chunk-33L26P4J.js.map +1 -0
- package/dist/{chunk-CKPFLEOL.js → chunk-3CUWQXTG.js} +3 -3
- package/dist/{chunk-GVFPOKJW.js → chunk-3CYTVX4T.js} +5 -5
- package/dist/chunk-3DO5AJCG.js +117 -0
- package/dist/chunk-3DO5AJCG.js.map +1 -0
- package/dist/{chunk-TJPQIFI4.js → chunk-3EPA2A4M.js} +8 -8
- package/dist/{chunk-HDELNMZC.js → chunk-3MJHHPRW.js} +2 -2
- package/dist/chunk-3U7WKBMH.js +27 -0
- package/dist/chunk-3U7WKBMH.js.map +1 -0
- package/dist/{chunk-RNC574FS.js → chunk-3UEZ6NUI.js} +2 -2
- package/dist/{chunk-OXLOC6TC.js → chunk-3XS37SQT.js} +3 -3
- package/dist/{chunk-2Q5QHSU2.js → chunk-44USLRMT.js} +8 -8
- package/dist/{chunk-O7OQZJ3D.js → chunk-4GN2RLYL.js} +2 -2
- package/dist/{chunk-QUFKPCWD.js → chunk-4S2LWZ7L.js} +2 -2
- package/dist/{chunk-LPWIAVGP.js → chunk-4UVFPORR.js} +5 -5
- package/dist/{chunk-3B4YMZD5.js → chunk-4Z7GEO2R.js} +2 -2
- package/dist/{chunk-XXPEFK4V.js → chunk-53O2TNSR.js} +5 -5
- package/dist/{chunk-G3SKAI6S.js → chunk-54HTXJJ2.js} +2 -2
- package/dist/{chunk-JE6RZ5L6.js → chunk-5ZOJLYD2.js} +4 -4
- package/dist/{chunk-JDUIWHJ3.js → chunk-6H4TPEMO.js} +2 -2
- package/dist/{chunk-FYZJEME4.js → chunk-6JGATEOF.js} +3 -3
- package/dist/{chunk-ZFUOLLZS.js → chunk-6L2FKTBO.js} +5 -5
- package/dist/{chunk-BDBI4W77.js → chunk-6MD5QXXJ.js} +3 -3
- package/dist/{chunk-ODW2D5PN.js → chunk-6QYKZMEE.js} +5 -2
- package/dist/{chunk-ODW2D5PN.js.map → chunk-6QYKZMEE.js.map} +1 -1
- package/dist/{chunk-LJSKF43D.js → chunk-6TPYT3UC.js} +5 -5
- package/dist/{chunk-KZT5JC3E.js → chunk-6ZD3FI5P.js} +2 -2
- package/dist/{chunk-SBV62CSC.js → chunk-72FPUWD6.js} +2 -2
- package/dist/{chunk-L75CZ3SI.js → chunk-72S2RGWD.js} +2 -2
- package/dist/{chunk-WUFTDJ2L.js → chunk-77BKKPCI.js} +2 -2
- package/dist/{chunk-5A4XPYNK.js → chunk-7FEXRMJE.js} +2 -2
- package/dist/{chunk-AW336SO7.js → chunk-7KKMZJFT.js} +2 -2
- package/dist/{chunk-4SSWJRC4.js → chunk-7TE4TMS3.js} +3 -3
- package/dist/chunk-AEMD6JHZ.js +1 -0
- package/dist/chunk-AEMD6JHZ.js.map +1 -0
- package/dist/{chunk-5XWCKCHP.js → chunk-ALOUJ3CE.js} +4 -4
- package/dist/{chunk-UFUMYNKS.js → chunk-AWG2AJHX.js} +5 -5
- package/dist/{chunk-DDVNYVJH.js → chunk-B3QWQG62.js} +2 -2
- package/dist/{chunk-CKI33CN2.js → chunk-BA6Z52QN.js} +2 -2
- package/dist/{chunk-53TDQYA3.js → chunk-BKZERHNC.js} +4 -4
- package/dist/{chunk-RSWHKOUN.js → chunk-BM4KKGL7.js} +2 -2
- package/dist/chunk-BOWS4U6W.js +1 -0
- package/dist/chunk-BOWS4U6W.js.map +1 -0
- package/dist/{chunk-M4P7NS2L.js → chunk-BR2T72JI.js} +23 -15
- package/dist/chunk-BR2T72JI.js.map +1 -0
- package/dist/{chunk-OZGJ3YCN.js → chunk-BVSSEOLI.js} +2 -2
- package/dist/{chunk-FI6BL4UU.js → chunk-C2TERIB4.js} +2 -2
- package/dist/{chunk-DUITNU72.js → chunk-C6OVO6AT.js} +2 -2
- package/dist/{chunk-WL2S2YB3.js → chunk-CKHFYTIX.js} +4 -4
- package/dist/{chunk-GBEHJBYM.js → chunk-CLK67TNH.js} +2 -2
- package/dist/{chunk-T2HZ3GVA.js → chunk-CM2Q7IH3.js} +4 -4
- package/dist/{chunk-GE26GVHM.js → chunk-CMFJQH6A.js} +2 -2
- package/dist/{chunk-6PPHALM3.js → chunk-CMLIWUBW.js} +4 -4
- package/dist/{chunk-AU3GV6UL.js → chunk-DH5UJD2I.js} +3 -3
- package/dist/{chunk-BKT2KJ56.js → chunk-DH6SL3SY.js} +2 -2
- package/dist/{chunk-APPIPQFT.js → chunk-DH77PLFF.js} +8 -8
- package/dist/{chunk-TRTX4BDI.js → chunk-DJKVSUXH.js} +2 -2
- package/dist/{chunk-VE3P77TV.js → chunk-DLWLIPCP.js} +2 -2
- package/dist/{chunk-MWPXKZ7O.js → chunk-ERY6D2OV.js} +4 -4
- package/dist/{chunk-TJ7NQG7E.js → chunk-FBUCXTA4.js} +4 -4
- package/dist/{chunk-SE6TW72O.js → chunk-FDMQ7H22.js} +2 -2
- package/dist/{chunk-E2FMNY6B.js → chunk-FXWXBEOZ.js} +2 -2
- package/dist/{chunk-UI5O6J6R.js → chunk-FY6PONLA.js} +4 -4
- package/dist/{chunk-QUIHOPOC.js → chunk-G4TKMUOL.js} +2 -2
- package/dist/{chunk-6BS2RBW4.js → chunk-G7XHJPLO.js} +3 -3
- package/dist/{chunk-4RXPIHJG.js → chunk-GE2CCITY.js} +2 -2
- package/dist/{chunk-WRHBXOGN.js → chunk-GG62LKA3.js} +5 -5
- package/dist/{chunk-YQCRQHVU.js → chunk-GI63FQEJ.js} +4 -4
- package/dist/{chunk-WUQKXAYF.js → chunk-GPHURU2K.js} +5 -5
- package/dist/{chunk-GPT673YL.js → chunk-H72YKEGD.js} +2 -2
- package/dist/chunk-HALFOXSZ.js +1 -0
- package/dist/chunk-HALFOXSZ.js.map +1 -0
- package/dist/{chunk-AJVFSUC4.js → chunk-HFVYWHJT.js} +10 -10
- package/dist/{chunk-UP6RO2PR.js → chunk-HKBJZX3C.js} +3 -3
- package/dist/chunk-IC7GHPMK.js +22 -0
- package/dist/chunk-IC7GHPMK.js.map +1 -0
- package/dist/{chunk-V3RQFWL6.js → chunk-IUD6N52Q.js} +3 -3
- package/dist/{chunk-N4D5V3AA.js → chunk-JAGAFEZL.js} +2 -2
- package/dist/{chunk-CLTK76ZF.js → chunk-JE5GEWTG.js} +5 -5
- package/dist/{chunk-23XBBGWD.js → chunk-JFLFZLOA.js} +5 -5
- package/dist/{chunk-BLUURKCY.js → chunk-K6LNHHSH.js} +2 -2
- package/dist/{chunk-HSNOWYEE.js → chunk-K7FSTB2K.js} +2 -2
- package/dist/{chunk-SXVCXLKU.js → chunk-K7MQP2KT.js} +3 -3
- package/dist/{chunk-QQ46JX5H.js → chunk-KHOAXZW2.js} +4 -4
- package/dist/{chunk-SCVBGQFO.js → chunk-KQZGUHYZ.js} +2 -2
- package/dist/{chunk-GJ7GIGDS.js → chunk-LCWGNDTH.js} +2 -2
- package/dist/{chunk-4D2IVVHR.js → chunk-LF3EVXMF.js} +2 -2
- package/dist/{chunk-2XTBGZSR.js → chunk-LGCRL7DK.js} +2 -2
- package/dist/{chunk-WY35GCHY.js → chunk-LODMNSLR.js} +3 -3
- package/dist/{chunk-EXFX3JRN.js → chunk-M47ZOUGF.js} +4 -4
- package/dist/{chunk-AQCQ2USS.js → chunk-M65ZNPLO.js} +2 -2
- package/dist/{chunk-COUFRGD6.js → chunk-MEBQKYH4.js} +4 -4
- package/dist/{chunk-JZ5IGO5G.js → chunk-NCB4GBRL.js} +2 -2
- package/dist/{chunk-SE4WZIKD.js → chunk-NFGIA2ZV.js} +2 -2
- package/dist/{chunk-D455V3BW.js → chunk-NOLSQK4J.js} +28 -30
- package/dist/chunk-NOLSQK4J.js.map +1 -0
- package/dist/{chunk-WTXPGASQ.js → chunk-NPPJ3IJP.js} +4 -4
- package/dist/chunk-NPPJ3IJP.js.map +1 -0
- package/dist/{chunk-H772ZSAI.js → chunk-NQ7NMCRI.js} +2 -2
- package/dist/{chunk-P7JF6XT7.js → chunk-NRSVI23L.js} +2 -2
- package/dist/{chunk-FRTEU7ZO.js → chunk-NU55QUMO.js} +2 -2
- package/dist/chunk-OJUORFGO.js +87 -0
- package/dist/chunk-OJUORFGO.js.map +1 -0
- package/dist/{chunk-JB56E4XQ.js → chunk-PAICZOL5.js} +6 -6
- package/dist/chunk-PEOOCQ2T.js +140 -0
- package/dist/chunk-PEOOCQ2T.js.map +1 -0
- package/dist/chunk-PGGGKYWG.js +1 -0
- package/dist/chunk-PGGGKYWG.js.map +1 -0
- package/dist/{chunk-QX3CXOJ3.js → chunk-PTONBPZL.js} +2 -2
- package/dist/chunk-Q4JWWTL4.js +36 -0
- package/dist/chunk-Q4JWWTL4.js.map +1 -0
- package/dist/{chunk-4UASV6VL.js → chunk-QDELBNL3.js} +2 -2
- package/dist/{chunk-ZE56GK5C.js → chunk-QEI5DC6S.js} +5 -5
- package/dist/chunk-QGUNUXTT.js +1 -0
- package/dist/chunk-QGUNUXTT.js.map +1 -0
- package/dist/{chunk-3UXBIUJF.js → chunk-RDFPM2AQ.js} +5 -5
- package/dist/chunk-RDZGXJOD.js +74 -0
- package/dist/chunk-RDZGXJOD.js.map +1 -0
- package/dist/chunk-RN7UJI7S.js +1 -0
- package/dist/chunk-RN7UJI7S.js.map +1 -0
- package/dist/chunk-RPBGUWNF.js +168 -0
- package/dist/chunk-RPBGUWNF.js.map +1 -0
- package/dist/{chunk-BKHO4RSF.js → chunk-RZ2VZ7SL.js} +2 -2
- package/dist/{chunk-MT7QJRP7.js → chunk-S4IXC2V3.js} +3 -3
- package/dist/chunk-SALQ65SM.js +118 -0
- package/dist/chunk-SALQ65SM.js.map +1 -0
- package/dist/{chunk-XOZYUJQ5.js → chunk-SDKOOVEX.js} +5 -3
- package/dist/{chunk-XOZYUJQ5.js.map → chunk-SDKOOVEX.js.map} +1 -1
- package/dist/{chunk-5K4G2XYS.js → chunk-SNBAMWI5.js} +2 -2
- package/dist/{chunk-MKJHDHLF.js → chunk-TCNTIGMY.js} +2 -2
- package/dist/{chunk-EKM7C4X2.js → chunk-TJ3334AJ.js} +3 -3
- package/dist/{chunk-RUZVK4FV.js → chunk-TPVSHO75.js} +3 -3
- package/dist/{chunk-I72PREY7.js → chunk-TTJTMDLI.js} +2 -2
- package/dist/{chunk-TU5EIKJA.js → chunk-U5SH3VRJ.js} +4 -4
- package/dist/chunk-U67ZQ6VM.js +82 -0
- package/dist/chunk-U67ZQ6VM.js.map +1 -0
- package/dist/{chunk-DOLDAAXH.js → chunk-UT73NGRS.js} +3 -3
- package/dist/chunk-VYM2GPR6.js +47 -0
- package/dist/chunk-VYM2GPR6.js.map +1 -0
- package/dist/{chunk-BXEMC4YH.js → chunk-VYV3JOV5.js} +2 -2
- package/dist/{chunk-OTWMG7B2.js → chunk-WN5PNP6F.js} +4 -4
- package/dist/chunk-X3C3VTYS.js +85 -0
- package/dist/chunk-X3C3VTYS.js.map +1 -0
- package/dist/{chunk-HZBRXLV7.js → chunk-XB7HYOMM.js} +2 -2
- package/dist/{chunk-C6FVXX7Y.js → chunk-XBLFK2FL.js} +2 -2
- package/dist/{chunk-EDBVMLNX.js → chunk-XHA2NXLD.js} +2 -2
- package/dist/chunk-XJQNSMGA.js +10 -0
- package/dist/chunk-XJQNSMGA.js.map +1 -0
- package/dist/{chunk-ZO4NO77T.js → chunk-XO4ZUHVH.js} +2 -2
- package/dist/{chunk-OPT7X3Y6.js → chunk-XXL4PM4M.js} +2 -2
- package/dist/{chunk-3HKUOLPD.js → chunk-XZY7O7JJ.js} +4 -4
- package/dist/{chunk-743SY4WQ.js → chunk-YLXQWYOG.js} +5 -5
- package/dist/{chunk-Q33JWFSA.js → chunk-YPIVLPXF.js} +2 -2
- package/dist/{chunk-T7UUP7VD.js → chunk-YRUX7XMQ.js} +2 -2
- package/dist/{chunk-4JEXYOSN.js → chunk-YTXZUTLF.js} +2 -2
- package/dist/{chunk-V7A5ZAAF.js → chunk-YWJDUJAR.js} +3 -3
- package/dist/{chunk-ZK7YERPQ.js → chunk-Z2NN53E5.js} +2 -2
- package/dist/{chunk-CLSC36JS.js → chunk-Z4DKVLYG.js} +3 -3
- package/dist/{chunk-NFJ3VVD3.js → chunk-Z6T5SXST.js} +5 -5
- package/dist/{chunk-IITZA6U2.js → chunk-ZBVU2YWV.js} +9 -9
- package/dist/{chunk-IEWAFD6L.js → chunk-ZC5HDBQO.js} +2 -2
- package/dist/{chunk-KQS4ZJGS.js → chunk-ZGCPDA3F.js} +5 -5
- package/dist/{chunk-AHDNANID.js → chunk-ZH2SZ6B3.js} +2 -2
- package/dist/{chunk-KOX2AEFW.js → chunk-ZKWVCSAB.js} +2 -2
- package/dist/{chunk-K2U4BNHQ.js → chunk-ZNBLGS66.js} +2 -2
- package/dist/{chunk-WGUY7EIB.js → chunk-ZUME25DS.js} +5 -5
- package/dist/data-display/Badge.js +3 -3
- package/dist/data-display/CardKit.js +6 -6
- package/dist/data-display/Carousel.js +3 -3
- package/dist/data-display/Chart.js +3 -3
- package/dist/data-display/Chip.js +1 -0
- package/dist/data-display/DataViews.js +68 -68
- package/dist/data-display/FleetMap.js +9 -9
- package/dist/data-display/MapPreview.js +5 -5
- package/dist/data-display/Sheet.js +3 -3
- package/dist/en-US.js +15 -11
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/Dialog.js +2 -2
- package/dist/feedback/NotificationStatusNotice.js +5 -5
- package/dist/form/AddressAutocomplete.js +7 -7
- package/dist/form/Autocomplete.js +5 -5
- package/dist/form/Button.js +4 -4
- package/dist/form/CategorySelect.js +10 -10
- package/dist/form/CepField.js +5 -5
- package/dist/form/CodeEditor.js +2 -2
- package/dist/form/Command.js +3 -3
- package/dist/form/CreatableSelect.js +3 -3
- package/dist/form/DateRangePicker.js +7 -7
- package/dist/form/Input.js +4 -4
- package/dist/form/InputOTP.js +4 -4
- package/dist/form/Label.js +3 -3
- package/dist/form/Menubar.js +3 -3
- package/dist/form/NumberField.js +29 -0
- package/dist/form/NumberField.js.map +1 -0
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/RadioGroup.js +5 -5
- package/dist/form/RichTextEditor.js +3 -3
- package/dist/form/Select.js +3 -3
- package/dist/form/Switch.js +5 -5
- package/dist/form/Textarea.js +3 -3
- package/dist/form/Toggle.js +4 -4
- package/dist/form/ToggleGroup.js +3 -3
- package/dist/form/total-form.js +30 -30
- package/dist/icons.js +7 -6
- package/dist/layout/Box.js +6 -6
- package/dist/layout/Card.js +2 -2
- package/dist/layout/Collapsible.js +1 -0
- package/dist/layout/ContentToolbar.js +13 -13
- package/dist/layout/ScrollArea.js +2 -2
- package/dist/layout/SettingCard.js +80 -0
- package/dist/layout/SettingCard.js.map +1 -0
- package/dist/layout/SettingsLayout.js +4 -4
- package/dist/layout/Stack.js +7 -7
- package/dist/layout/TableFilter.js +3 -3
- package/dist/locales.js +37 -23
- package/dist/locales.js.map +1 -1
- package/dist/navigation/AppHeader.js +12 -12
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/navigation/Pagination.js +4 -4
- package/dist/navigation/Tabs.js +4 -4
- package/dist/provider.js +6 -6
- package/dist/pt-BR.js +12 -8
- package/dist/social-login-button.js +7 -7
- package/dist/tokens.js +4 -4
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts +6 -1
- package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +0 -11
- package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
- package/dist/types/components/form/Autocomplete/useAutocomplete.d.ts +9 -0
- package/dist/types/components/form/Autocomplete/useAutocomplete.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.d.ts.map +1 -1
- package/dist/types/components/form/Input/Input.types.d.ts +10 -0
- package/dist/types/components/form/Input/Input.types.d.ts.map +1 -1
- package/dist/types/components/form/NumberField/NumberField.d.ts +21 -0
- package/dist/types/components/form/NumberField/NumberField.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/NumberField.helpers.d.ts +48 -0
- package/dist/types/components/form/NumberField/NumberField.helpers.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/NumberField.types.d.ts +31 -0
- package/dist/types/components/form/NumberField/NumberField.types.d.ts.map +1 -0
- package/dist/types/components/form/NumberField/index.d.ts +3 -0
- package/dist/types/components/form/NumberField/index.d.ts.map +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts.map +1 -1
- package/dist/types/components/layout/SettingCard/SettingCard.d.ts +14 -0
- package/dist/types/components/layout/SettingCard/SettingCard.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts +79 -0
- package/dist/types/components/layout/SettingCard/SettingCard.hooks.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts +21 -0
- package/dist/types/components/layout/SettingCard/SettingCard.metrics.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts +49 -0
- package/dist/types/components/layout/SettingCard/SettingCard.parts.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts +48 -0
- package/dist/types/components/layout/SettingCard/SettingCard.styles.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts +127 -0
- package/dist/types/components/layout/SettingCard/SettingCard.types.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGrid.d.ts +33 -0
- package/dist/types/components/layout/SettingCard/SettingGrid.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts +13 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.context.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.d.ts +18 -0
- package/dist/types/components/layout/SettingCard/SettingGroup.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts +28 -0
- package/dist/types/components/layout/SettingCard/SettingSwitch.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/SettingToggle.d.ts +13 -0
- package/dist/types/components/layout/SettingCard/SettingToggle.d.ts.map +1 -0
- package/dist/types/components/layout/SettingCard/index.d.ts +6 -0
- package/dist/types/components/layout/SettingCard/index.d.ts.map +1 -0
- package/dist/types/components/layout/index.d.ts +1 -0
- package/dist/types/components/layout/index.d.ts.map +1 -1
- package/dist/types/copy/layout.d.ts +27 -0
- package/dist/types/copy/layout.d.ts.map +1 -1
- package/dist/types/en-US.layout.d.ts +3 -1
- package/dist/types/en-US.layout.d.ts.map +1 -1
- package/dist/types/locales.d.ts +3 -1
- package/dist/types/locales.d.ts.map +1 -1
- package/dist/types/pt-BR.layout.d.ts +3 -1
- package/dist/types/pt-BR.layout.d.ts.map +1 -1
- package/dist/user-avatar.js +7 -7
- package/dist/utility/InstallPrompt.js +2 -2
- package/dist/utility/WorkflowStep.js +3 -3
- package/package.json +9 -1
- package/src/components/data-display/DataViews/data-views-category-pill.tsx +6 -1
- package/src/components/data-display/DataViews/data-views-more-fields.tsx +43 -37
- package/src/components/data-display/DataViews/data-views-overflow.ts +12 -1
- package/src/components/form/Autocomplete/useAutocomplete.ts +46 -16
- package/src/components/form/Input/Input.tsx +2 -0
- package/src/components/form/Input/Input.types.ts +10 -0
- package/src/components/form/NumberField/NumberField.helpers.ts +77 -0
- package/src/components/form/NumberField/NumberField.md +86 -0
- package/src/components/form/NumberField/NumberField.tsx +88 -0
- package/src/components/form/NumberField/NumberField.types.ts +43 -0
- package/src/components/form/NumberField/index.ts +2 -0
- package/src/components/form/NumberField/tests.md +51 -0
- package/src/components/form/NumberField/track.md +42 -0
- package/src/components/form/index.ts +1 -0
- package/src/components/layout/SettingCard/SettingCard.hooks.ts +191 -0
- package/src/components/layout/SettingCard/SettingCard.md +121 -0
- package/src/components/layout/SettingCard/SettingCard.metrics.ts +22 -0
- package/src/components/layout/SettingCard/SettingCard.parts.tsx +162 -0
- package/src/components/layout/SettingCard/SettingCard.styles.ts +142 -0
- package/src/components/layout/SettingCard/SettingCard.tsx +197 -0
- package/src/components/layout/SettingCard/SettingCard.types.ts +140 -0
- package/src/components/layout/SettingCard/SettingGrid.md +65 -0
- package/src/components/layout/SettingCard/SettingGrid.tsx +105 -0
- package/src/components/layout/SettingCard/SettingGroup.context.ts +11 -0
- package/src/components/layout/SettingCard/SettingGroup.md +81 -0
- package/src/components/layout/SettingCard/SettingGroup.tsx +73 -0
- package/src/components/layout/SettingCard/SettingSwitch.tsx +92 -0
- package/src/components/layout/SettingCard/SettingToggle.md +61 -0
- package/src/components/layout/SettingCard/SettingToggle.tsx +43 -0
- package/src/components/layout/SettingCard/index.ts +18 -0
- package/src/components/layout/SettingCard/tests.md +68 -0
- package/src/components/layout/SettingCard/track.md +54 -0
- package/src/components/layout/index.ts +1 -0
- package/src/copy/layout.ts +29 -0
- package/src/en-US.layout.ts +16 -0
- package/src/locales.ts +10 -0
- package/src/pt-BR.layout.ts +16 -0
- package/dist/chunk-A7RIZOAL.js +0 -13
- package/dist/chunk-A7RIZOAL.js.map +0 -1
- package/dist/chunk-BY3JEK5T.js +0 -1
- package/dist/chunk-D455V3BW.js.map +0 -1
- package/dist/chunk-FZJ2FTGE.js +0 -1
- package/dist/chunk-GRHECKHU.js +0 -13
- package/dist/chunk-GRHECKHU.js.map +0 -1
- package/dist/chunk-M4P7NS2L.js.map +0 -1
- package/dist/chunk-WTXPGASQ.js.map +0 -1
- /package/dist/{chunk-BY3JEK5T.js.map → _internal/components/form/NumberField/NumberField.helpers.js.map} +0 -0
- /package/dist/{chunk-FZJ2FTGE.js.map → _internal/components/form/NumberField/NumberField.js.map} +0 -0
- /package/dist/{chunk-3PGFMBEI.js.map → chunk-2LKWJV65.js.map} +0 -0
- /package/dist/{chunk-IIUB4IOH.js.map → chunk-2XHIF3M3.js.map} +0 -0
- /package/dist/{chunk-CKPFLEOL.js.map → chunk-3CUWQXTG.js.map} +0 -0
- /package/dist/{chunk-GVFPOKJW.js.map → chunk-3CYTVX4T.js.map} +0 -0
- /package/dist/{chunk-TJPQIFI4.js.map → chunk-3EPA2A4M.js.map} +0 -0
- /package/dist/{chunk-HDELNMZC.js.map → chunk-3MJHHPRW.js.map} +0 -0
- /package/dist/{chunk-RNC574FS.js.map → chunk-3UEZ6NUI.js.map} +0 -0
- /package/dist/{chunk-OXLOC6TC.js.map → chunk-3XS37SQT.js.map} +0 -0
- /package/dist/{chunk-2Q5QHSU2.js.map → chunk-44USLRMT.js.map} +0 -0
- /package/dist/{chunk-O7OQZJ3D.js.map → chunk-4GN2RLYL.js.map} +0 -0
- /package/dist/{chunk-QUFKPCWD.js.map → chunk-4S2LWZ7L.js.map} +0 -0
- /package/dist/{chunk-LPWIAVGP.js.map → chunk-4UVFPORR.js.map} +0 -0
- /package/dist/{chunk-3B4YMZD5.js.map → chunk-4Z7GEO2R.js.map} +0 -0
- /package/dist/{chunk-XXPEFK4V.js.map → chunk-53O2TNSR.js.map} +0 -0
- /package/dist/{chunk-G3SKAI6S.js.map → chunk-54HTXJJ2.js.map} +0 -0
- /package/dist/{chunk-JE6RZ5L6.js.map → chunk-5ZOJLYD2.js.map} +0 -0
- /package/dist/{chunk-JDUIWHJ3.js.map → chunk-6H4TPEMO.js.map} +0 -0
- /package/dist/{chunk-FYZJEME4.js.map → chunk-6JGATEOF.js.map} +0 -0
- /package/dist/{chunk-ZFUOLLZS.js.map → chunk-6L2FKTBO.js.map} +0 -0
- /package/dist/{chunk-BDBI4W77.js.map → chunk-6MD5QXXJ.js.map} +0 -0
- /package/dist/{chunk-LJSKF43D.js.map → chunk-6TPYT3UC.js.map} +0 -0
- /package/dist/{chunk-KZT5JC3E.js.map → chunk-6ZD3FI5P.js.map} +0 -0
- /package/dist/{chunk-SBV62CSC.js.map → chunk-72FPUWD6.js.map} +0 -0
- /package/dist/{chunk-L75CZ3SI.js.map → chunk-72S2RGWD.js.map} +0 -0
- /package/dist/{chunk-WUFTDJ2L.js.map → chunk-77BKKPCI.js.map} +0 -0
- /package/dist/{chunk-5A4XPYNK.js.map → chunk-7FEXRMJE.js.map} +0 -0
- /package/dist/{chunk-AW336SO7.js.map → chunk-7KKMZJFT.js.map} +0 -0
- /package/dist/{chunk-4SSWJRC4.js.map → chunk-7TE4TMS3.js.map} +0 -0
- /package/dist/{chunk-5XWCKCHP.js.map → chunk-ALOUJ3CE.js.map} +0 -0
- /package/dist/{chunk-UFUMYNKS.js.map → chunk-AWG2AJHX.js.map} +0 -0
- /package/dist/{chunk-DDVNYVJH.js.map → chunk-B3QWQG62.js.map} +0 -0
- /package/dist/{chunk-CKI33CN2.js.map → chunk-BA6Z52QN.js.map} +0 -0
- /package/dist/{chunk-53TDQYA3.js.map → chunk-BKZERHNC.js.map} +0 -0
- /package/dist/{chunk-RSWHKOUN.js.map → chunk-BM4KKGL7.js.map} +0 -0
- /package/dist/{chunk-OZGJ3YCN.js.map → chunk-BVSSEOLI.js.map} +0 -0
- /package/dist/{chunk-FI6BL4UU.js.map → chunk-C2TERIB4.js.map} +0 -0
- /package/dist/{chunk-DUITNU72.js.map → chunk-C6OVO6AT.js.map} +0 -0
- /package/dist/{chunk-WL2S2YB3.js.map → chunk-CKHFYTIX.js.map} +0 -0
- /package/dist/{chunk-GBEHJBYM.js.map → chunk-CLK67TNH.js.map} +0 -0
- /package/dist/{chunk-T2HZ3GVA.js.map → chunk-CM2Q7IH3.js.map} +0 -0
- /package/dist/{chunk-GE26GVHM.js.map → chunk-CMFJQH6A.js.map} +0 -0
- /package/dist/{chunk-6PPHALM3.js.map → chunk-CMLIWUBW.js.map} +0 -0
- /package/dist/{chunk-AU3GV6UL.js.map → chunk-DH5UJD2I.js.map} +0 -0
- /package/dist/{chunk-BKT2KJ56.js.map → chunk-DH6SL3SY.js.map} +0 -0
- /package/dist/{chunk-APPIPQFT.js.map → chunk-DH77PLFF.js.map} +0 -0
- /package/dist/{chunk-TRTX4BDI.js.map → chunk-DJKVSUXH.js.map} +0 -0
- /package/dist/{chunk-VE3P77TV.js.map → chunk-DLWLIPCP.js.map} +0 -0
- /package/dist/{chunk-MWPXKZ7O.js.map → chunk-ERY6D2OV.js.map} +0 -0
- /package/dist/{chunk-TJ7NQG7E.js.map → chunk-FBUCXTA4.js.map} +0 -0
- /package/dist/{chunk-SE6TW72O.js.map → chunk-FDMQ7H22.js.map} +0 -0
- /package/dist/{chunk-E2FMNY6B.js.map → chunk-FXWXBEOZ.js.map} +0 -0
- /package/dist/{chunk-UI5O6J6R.js.map → chunk-FY6PONLA.js.map} +0 -0
- /package/dist/{chunk-QUIHOPOC.js.map → chunk-G4TKMUOL.js.map} +0 -0
- /package/dist/{chunk-6BS2RBW4.js.map → chunk-G7XHJPLO.js.map} +0 -0
- /package/dist/{chunk-4RXPIHJG.js.map → chunk-GE2CCITY.js.map} +0 -0
- /package/dist/{chunk-WRHBXOGN.js.map → chunk-GG62LKA3.js.map} +0 -0
- /package/dist/{chunk-YQCRQHVU.js.map → chunk-GI63FQEJ.js.map} +0 -0
- /package/dist/{chunk-WUQKXAYF.js.map → chunk-GPHURU2K.js.map} +0 -0
- /package/dist/{chunk-GPT673YL.js.map → chunk-H72YKEGD.js.map} +0 -0
- /package/dist/{chunk-AJVFSUC4.js.map → chunk-HFVYWHJT.js.map} +0 -0
- /package/dist/{chunk-UP6RO2PR.js.map → chunk-HKBJZX3C.js.map} +0 -0
- /package/dist/{chunk-V3RQFWL6.js.map → chunk-IUD6N52Q.js.map} +0 -0
- /package/dist/{chunk-N4D5V3AA.js.map → chunk-JAGAFEZL.js.map} +0 -0
- /package/dist/{chunk-CLTK76ZF.js.map → chunk-JE5GEWTG.js.map} +0 -0
- /package/dist/{chunk-23XBBGWD.js.map → chunk-JFLFZLOA.js.map} +0 -0
- /package/dist/{chunk-BLUURKCY.js.map → chunk-K6LNHHSH.js.map} +0 -0
- /package/dist/{chunk-HSNOWYEE.js.map → chunk-K7FSTB2K.js.map} +0 -0
- /package/dist/{chunk-SXVCXLKU.js.map → chunk-K7MQP2KT.js.map} +0 -0
- /package/dist/{chunk-QQ46JX5H.js.map → chunk-KHOAXZW2.js.map} +0 -0
- /package/dist/{chunk-SCVBGQFO.js.map → chunk-KQZGUHYZ.js.map} +0 -0
- /package/dist/{chunk-GJ7GIGDS.js.map → chunk-LCWGNDTH.js.map} +0 -0
- /package/dist/{chunk-4D2IVVHR.js.map → chunk-LF3EVXMF.js.map} +0 -0
- /package/dist/{chunk-2XTBGZSR.js.map → chunk-LGCRL7DK.js.map} +0 -0
- /package/dist/{chunk-WY35GCHY.js.map → chunk-LODMNSLR.js.map} +0 -0
- /package/dist/{chunk-EXFX3JRN.js.map → chunk-M47ZOUGF.js.map} +0 -0
- /package/dist/{chunk-AQCQ2USS.js.map → chunk-M65ZNPLO.js.map} +0 -0
- /package/dist/{chunk-COUFRGD6.js.map → chunk-MEBQKYH4.js.map} +0 -0
- /package/dist/{chunk-JZ5IGO5G.js.map → chunk-NCB4GBRL.js.map} +0 -0
- /package/dist/{chunk-SE4WZIKD.js.map → chunk-NFGIA2ZV.js.map} +0 -0
- /package/dist/{chunk-H772ZSAI.js.map → chunk-NQ7NMCRI.js.map} +0 -0
- /package/dist/{chunk-P7JF6XT7.js.map → chunk-NRSVI23L.js.map} +0 -0
- /package/dist/{chunk-FRTEU7ZO.js.map → chunk-NU55QUMO.js.map} +0 -0
- /package/dist/{chunk-JB56E4XQ.js.map → chunk-PAICZOL5.js.map} +0 -0
- /package/dist/{chunk-QX3CXOJ3.js.map → chunk-PTONBPZL.js.map} +0 -0
- /package/dist/{chunk-4UASV6VL.js.map → chunk-QDELBNL3.js.map} +0 -0
- /package/dist/{chunk-ZE56GK5C.js.map → chunk-QEI5DC6S.js.map} +0 -0
- /package/dist/{chunk-3UXBIUJF.js.map → chunk-RDFPM2AQ.js.map} +0 -0
- /package/dist/{chunk-BKHO4RSF.js.map → chunk-RZ2VZ7SL.js.map} +0 -0
- /package/dist/{chunk-MT7QJRP7.js.map → chunk-S4IXC2V3.js.map} +0 -0
- /package/dist/{chunk-5K4G2XYS.js.map → chunk-SNBAMWI5.js.map} +0 -0
- /package/dist/{chunk-MKJHDHLF.js.map → chunk-TCNTIGMY.js.map} +0 -0
- /package/dist/{chunk-EKM7C4X2.js.map → chunk-TJ3334AJ.js.map} +0 -0
- /package/dist/{chunk-RUZVK4FV.js.map → chunk-TPVSHO75.js.map} +0 -0
- /package/dist/{chunk-I72PREY7.js.map → chunk-TTJTMDLI.js.map} +0 -0
- /package/dist/{chunk-TU5EIKJA.js.map → chunk-U5SH3VRJ.js.map} +0 -0
- /package/dist/{chunk-DOLDAAXH.js.map → chunk-UT73NGRS.js.map} +0 -0
- /package/dist/{chunk-BXEMC4YH.js.map → chunk-VYV3JOV5.js.map} +0 -0
- /package/dist/{chunk-OTWMG7B2.js.map → chunk-WN5PNP6F.js.map} +0 -0
- /package/dist/{chunk-HZBRXLV7.js.map → chunk-XB7HYOMM.js.map} +0 -0
- /package/dist/{chunk-C6FVXX7Y.js.map → chunk-XBLFK2FL.js.map} +0 -0
- /package/dist/{chunk-EDBVMLNX.js.map → chunk-XHA2NXLD.js.map} +0 -0
- /package/dist/{chunk-ZO4NO77T.js.map → chunk-XO4ZUHVH.js.map} +0 -0
- /package/dist/{chunk-OPT7X3Y6.js.map → chunk-XXL4PM4M.js.map} +0 -0
- /package/dist/{chunk-3HKUOLPD.js.map → chunk-XZY7O7JJ.js.map} +0 -0
- /package/dist/{chunk-743SY4WQ.js.map → chunk-YLXQWYOG.js.map} +0 -0
- /package/dist/{chunk-Q33JWFSA.js.map → chunk-YPIVLPXF.js.map} +0 -0
- /package/dist/{chunk-T7UUP7VD.js.map → chunk-YRUX7XMQ.js.map} +0 -0
- /package/dist/{chunk-4JEXYOSN.js.map → chunk-YTXZUTLF.js.map} +0 -0
- /package/dist/{chunk-V7A5ZAAF.js.map → chunk-YWJDUJAR.js.map} +0 -0
- /package/dist/{chunk-ZK7YERPQ.js.map → chunk-Z2NN53E5.js.map} +0 -0
- /package/dist/{chunk-CLSC36JS.js.map → chunk-Z4DKVLYG.js.map} +0 -0
- /package/dist/{chunk-NFJ3VVD3.js.map → chunk-Z6T5SXST.js.map} +0 -0
- /package/dist/{chunk-IITZA6U2.js.map → chunk-ZBVU2YWV.js.map} +0 -0
- /package/dist/{chunk-IEWAFD6L.js.map → chunk-ZC5HDBQO.js.map} +0 -0
- /package/dist/{chunk-KQS4ZJGS.js.map → chunk-ZGCPDA3F.js.map} +0 -0
- /package/dist/{chunk-AHDNANID.js.map → chunk-ZH2SZ6B3.js.map} +0 -0
- /package/dist/{chunk-KOX2AEFW.js.map → chunk-ZKWVCSAB.js.map} +0 -0
- /package/dist/{chunk-K2U4BNHQ.js.map → chunk-ZNBLGS66.js.map} +0 -0
- /package/dist/{chunk-WGUY7EIB.js.map → chunk-ZUME25DS.js.map} +0 -0
|
@@ -35,6 +35,15 @@ interface AutocompleteState<T> {
|
|
|
35
35
|
setJustCompletedGhost: Setter<boolean>;
|
|
36
36
|
userClosedDropdown: boolean;
|
|
37
37
|
setUserClosedDropdown: Setter<boolean>;
|
|
38
|
+
/**
|
|
39
|
+
* Mirrors `userClosedDropdown`, set synchronously wherever the state is
|
|
40
|
+
* (see {@link setDeliberateClose}). An effect scheduled by one render and
|
|
41
|
+
* flushed after a LATER render has already changed this flag reads a
|
|
42
|
+
* stale, closed-over `userClosedDropdown` — but `.current` on a ref is
|
|
43
|
+
* dereferenced live, so it always reflects the latest write regardless of
|
|
44
|
+
* which render's closure is doing the reading (FUT-2780).
|
|
45
|
+
*/
|
|
46
|
+
userClosedDropdownRef: React.RefObject<boolean>;
|
|
38
47
|
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
39
48
|
listRef: React.RefObject<HTMLUListElement | null>;
|
|
40
49
|
debounceRef: React.RefObject<number | undefined>;
|
|
@@ -50,6 +59,7 @@ function useAutocompleteState<T>(value: string, suggestions: T[]): AutocompleteS
|
|
|
50
59
|
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
51
60
|
const [justCompletedGhost, setJustCompletedGhost] = useState(false);
|
|
52
61
|
const [userClosedDropdown, setUserClosedDropdown] = useState(false);
|
|
62
|
+
const userClosedDropdownRef = useRef(false);
|
|
53
63
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
54
64
|
const listRef = useRef<HTMLUListElement | null>(null);
|
|
55
65
|
const debounceRef = useRef<number | undefined>(undefined);
|
|
@@ -57,10 +67,21 @@ function useAutocompleteState<T>(value: string, suggestions: T[]): AutocompleteS
|
|
|
57
67
|
open, setOpen, activeIndex, setActiveIndex, ghost, setGhost, inputValue, setInputValue,
|
|
58
68
|
composition, setComposition, filteredSuggestions, setFilteredSuggestions, isInputFocused,
|
|
59
69
|
setIsInputFocused, justCompletedGhost, setJustCompletedGhost, userClosedDropdown,
|
|
60
|
-
setUserClosedDropdown, inputRef, listRef, debounceRef,
|
|
70
|
+
setUserClosedDropdown, userClosedDropdownRef, inputRef, listRef, debounceRef,
|
|
61
71
|
};
|
|
62
72
|
}
|
|
63
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Set the "this close was deliberate" flag in both the ref effects read
|
|
76
|
+
* synchronously (live, even from a stale closure) and the state the rest of
|
|
77
|
+
* the component reads for render — every call site that touches
|
|
78
|
+
* `userClosedDropdown` goes through this so the two never drift (FUT-2780).
|
|
79
|
+
*/
|
|
80
|
+
function setDeliberateClose<T>(s: AutocompleteState<T>, closed: boolean): void {
|
|
81
|
+
s.userClosedDropdownRef.current = closed;
|
|
82
|
+
s.setUserClosedDropdown(closed);
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
// ---- effects (one tiny hook each; explicit params keep deps complete) --------
|
|
65
86
|
|
|
66
87
|
function useValueSync(value: string, setInputValue: Setter<string>): void {
|
|
@@ -101,17 +122,17 @@ function useLoadingOpen(
|
|
|
101
122
|
isLoading: boolean,
|
|
102
123
|
inputValue: string,
|
|
103
124
|
disabled: boolean,
|
|
104
|
-
|
|
125
|
+
userClosedDropdownRef: React.RefObject<boolean>,
|
|
105
126
|
setOpen: Setter<boolean>,
|
|
106
127
|
setActiveIndex: Setter<number>,
|
|
107
128
|
): void {
|
|
108
129
|
useEffect(() => {
|
|
109
|
-
if (isLoading && inputValue.trim().length > 0 && !disabled && !
|
|
130
|
+
if (isLoading && inputValue.trim().length > 0 && !disabled && !userClosedDropdownRef.current) setOpen(true);
|
|
110
131
|
if (disabled) {
|
|
111
132
|
setOpen(false);
|
|
112
133
|
setActiveIndex(-1);
|
|
113
134
|
}
|
|
114
|
-
}, [isLoading, inputValue, disabled,
|
|
135
|
+
}, [isLoading, inputValue, disabled, userClosedDropdownRef, setOpen, setActiveIndex]);
|
|
115
136
|
}
|
|
116
137
|
|
|
117
138
|
/** Inputs to the auto-open check, all primitive/stable so effect deps stay complete. */
|
|
@@ -120,7 +141,7 @@ interface AutoOpenArgs {
|
|
|
120
141
|
isInputFocused: boolean;
|
|
121
142
|
composition: boolean;
|
|
122
143
|
justCompletedGhost: boolean;
|
|
123
|
-
|
|
144
|
+
userClosedDropdownRef: React.RefObject<boolean>;
|
|
124
145
|
activeIndex: number;
|
|
125
146
|
setOpen: Setter<boolean>;
|
|
126
147
|
setActiveIndex: Setter<number>;
|
|
@@ -133,7 +154,7 @@ function maybeAutoOpen(a: AutoOpenArgs, hasResults: boolean): void {
|
|
|
133
154
|
a.isInputFocused &&
|
|
134
155
|
!a.composition &&
|
|
135
156
|
!a.justCompletedGhost &&
|
|
136
|
-
!a.
|
|
157
|
+
!a.userClosedDropdownRef.current;
|
|
137
158
|
if (!canAutoOpen) return;
|
|
138
159
|
a.setOpen(true);
|
|
139
160
|
if (hasResults && a.activeIndex === -1) a.setActiveIndex(0);
|
|
@@ -146,7 +167,7 @@ function useLocalFilter<T>(p: AutocompleteProps<T>, s: AutocompleteState<T>): vo
|
|
|
146
167
|
const async = Boolean(p.async);
|
|
147
168
|
const {
|
|
148
169
|
inputValue, isInputFocused, composition, justCompletedGhost, userClosedDropdown, activeIndex,
|
|
149
|
-
setFilteredSuggestions, setOpen, setActiveIndex,
|
|
170
|
+
setFilteredSuggestions, setOpen, setActiveIndex, userClosedDropdownRef,
|
|
150
171
|
} = s;
|
|
151
172
|
useEffect(() => {
|
|
152
173
|
const suggestions = propSuggestions ?? [];
|
|
@@ -157,12 +178,17 @@ function useLocalFilter<T>(p: AutocompleteProps<T>, s: AutocompleteState<T>): vo
|
|
|
157
178
|
const filtered = filterSuggestions(suggestions, inputValue, matchMode, getLabel);
|
|
158
179
|
setFilteredSuggestions(filtered);
|
|
159
180
|
maybeAutoOpen(
|
|
160
|
-
{ inputValue, isInputFocused, composition, justCompletedGhost,
|
|
181
|
+
{ inputValue, isInputFocused, composition, justCompletedGhost, userClosedDropdownRef, activeIndex, setOpen, setActiveIndex },
|
|
161
182
|
filtered.length > 0,
|
|
162
183
|
);
|
|
184
|
+
// `userClosedDropdown` (state) stays a dependency so this effect still
|
|
185
|
+
// reruns on every change of it, same as before — only the VALUE read
|
|
186
|
+
// inside `maybeAutoOpen` moved to the ref (see `userClosedDropdownRef`'s
|
|
187
|
+
// doc comment).
|
|
163
188
|
}, [
|
|
164
189
|
propSuggestions, inputValue, async, getLabel, matchMode, isInputFocused, composition,
|
|
165
190
|
justCompletedGhost, userClosedDropdown, activeIndex, setFilteredSuggestions, setOpen, setActiveIndex,
|
|
191
|
+
userClosedDropdownRef,
|
|
166
192
|
]);
|
|
167
193
|
}
|
|
168
194
|
|
|
@@ -189,7 +215,7 @@ function commitMultiSelect<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteS
|
|
|
189
215
|
if (!current.some((sel) => getKey(sel) === getKey(item))) p.onSelectedItemsChange?.([...current, item]);
|
|
190
216
|
s.setInputValue('');
|
|
191
217
|
onChange('');
|
|
192
|
-
s
|
|
218
|
+
setDeliberateClose(s, false);
|
|
193
219
|
}
|
|
194
220
|
|
|
195
221
|
function commitSingleSelect<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteState<T>, onChange: (v: string) => void): void {
|
|
@@ -227,8 +253,11 @@ function runSelectItem<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteState
|
|
|
227
253
|
// Set LAST so a re-fired `onFocus` cannot clear the flag. The close itself
|
|
228
254
|
// relies on the input never blurring during a pick (the option's
|
|
229
255
|
// `onMouseDown` preventDefault, and Enter keeps focus): `onFocus` reopens a
|
|
230
|
-
// non-empty input directly, without reading this flag.
|
|
231
|
-
|
|
256
|
+
// non-empty input directly, without reading this flag. The REF half is set
|
|
257
|
+
// in the same synchronous tick as the pick, so an effect scheduled by an
|
|
258
|
+
// earlier keystroke — and still pending when this runs — reads the
|
|
259
|
+
// up-to-date value instead of the one it closed over (FUT-2780).
|
|
260
|
+
if (isSingleSelectPick) setDeliberateClose(s, true);
|
|
232
261
|
}
|
|
233
262
|
|
|
234
263
|
function buildKeyContext<T>(
|
|
@@ -244,7 +273,8 @@ function buildKeyContext<T>(
|
|
|
244
273
|
multiple: Boolean(p.multiple), selectedItems: p.selectedItems ?? [],
|
|
245
274
|
getLabel: p.getLabel ?? defaultGetLabel,
|
|
246
275
|
getSuggestionType: p.getSuggestionType ?? defaultGetSuggestionType,
|
|
247
|
-
setOpen: s.setOpen, setActiveIndex: s.setActiveIndex,
|
|
276
|
+
setOpen: s.setOpen, setActiveIndex: s.setActiveIndex,
|
|
277
|
+
setUserClosedDropdown: (closed: boolean) => setDeliberateClose(s, closed),
|
|
248
278
|
setInputValue: s.setInputValue, setGhost: s.setGhost, setJustCompletedGhost: s.setJustCompletedGhost,
|
|
249
279
|
debouncedOnChange: onChange, selectItem, onSelectedItemsChange: p.onSelectedItemsChange,
|
|
250
280
|
};
|
|
@@ -287,7 +317,7 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
|
|
|
287
317
|
Boolean(p.isLoading),
|
|
288
318
|
s.inputValue,
|
|
289
319
|
Boolean(p.disabled),
|
|
290
|
-
s.
|
|
320
|
+
s.userClosedDropdownRef,
|
|
291
321
|
s.setOpen,
|
|
292
322
|
s.setActiveIndex,
|
|
293
323
|
);
|
|
@@ -315,11 +345,11 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
|
|
|
315
345
|
s.setInputValue(e.target.value);
|
|
316
346
|
debouncedOnChange(e.target.value);
|
|
317
347
|
if (!s.open || s.filteredSuggestions.length === 0) s.setActiveIndex(-1);
|
|
318
|
-
s
|
|
348
|
+
setDeliberateClose(s, false);
|
|
319
349
|
},
|
|
320
350
|
onFocus: (): void => {
|
|
321
351
|
s.setIsInputFocused(true);
|
|
322
|
-
s
|
|
352
|
+
setDeliberateClose(s, false);
|
|
323
353
|
if (!s.inputValue.trim()) return;
|
|
324
354
|
s.setOpen(true);
|
|
325
355
|
if (s.filteredSuggestions.length > 0 && s.activeIndex === -1) s.setActiveIndex(0);
|
|
@@ -330,7 +360,7 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
|
|
|
330
360
|
onClickAway: (): void => {
|
|
331
361
|
s.setOpen(false);
|
|
332
362
|
s.setActiveIndex(-1);
|
|
333
|
-
s
|
|
363
|
+
setDeliberateClose(s, true);
|
|
334
364
|
},
|
|
335
365
|
};
|
|
336
366
|
}
|
|
@@ -143,6 +143,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
143
143
|
'aria-label': ariaLabel,
|
|
144
144
|
'aria-describedby': ariaDescribedBy,
|
|
145
145
|
'aria-busy': ariaBusy,
|
|
146
|
+
inputProps,
|
|
146
147
|
...rest
|
|
147
148
|
},
|
|
148
149
|
ref,
|
|
@@ -178,6 +179,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
178
179
|
*/
|
|
179
180
|
inputProps={{
|
|
180
181
|
'data-testid': dataTestId,
|
|
182
|
+
...inputProps,
|
|
181
183
|
...inputAriaOf({ id, helperText, label: ariaLabel, describedBy: ariaDescribedBy, busy: ariaBusy }),
|
|
182
184
|
}}
|
|
183
185
|
InputProps={{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { InputBaseComponentProps } from '@mui/material/InputBase/index.js';
|
|
1
2
|
import type { InputLabelProps as MuiInputLabelProps } from '@mui/material/InputLabel/index.js';
|
|
2
3
|
import type { InputHTMLAttributes } from 'react';
|
|
3
4
|
import type React from 'react';
|
|
@@ -31,4 +32,13 @@ export interface InputProps
|
|
|
31
32
|
* the TYPE was missing, so it failed to compile. FUT-729.
|
|
32
33
|
*/
|
|
33
34
|
InputLabelProps?: Partial<MuiInputLabelProps>;
|
|
35
|
+
/**
|
|
36
|
+
* Attributes for the `<input>` element itself. Anything else this component
|
|
37
|
+
* does not recognise lands on the text field's ROOT `<div>`, where
|
|
38
|
+
* `inputMode`, `pattern`, `role` and `aria-value*` do nothing. Merged, not
|
|
39
|
+
* spread over: the field's own `data-testid` stays the default a caller can
|
|
40
|
+
* override, and the ARIA it builds from `aria-label` / `aria-describedby` /
|
|
41
|
+
* `aria-busy` still lands last.
|
|
42
|
+
*/
|
|
43
|
+
inputProps?: InputBaseComponentProps;
|
|
34
44
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pure half of `NumberField`: what a keystroke may add, what a string of
|
|
3
|
+
* digits is worth, and where an arrow key lands. Kept apart from the component
|
|
4
|
+
* so every rule is a plain function a unit test can hold.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The most digits the field keeps. Fifteen is the longest run that is always
|
|
9
|
+
* a safe integer (`Number.MAX_SAFE_INTEGER` has sixteen, but not every
|
|
10
|
+
* sixteen-digit number is below it), so a pasted serial number can never turn
|
|
11
|
+
* into a rounded float.
|
|
12
|
+
*/
|
|
13
|
+
export const MAX_DIGITS = 15;
|
|
14
|
+
|
|
15
|
+
export interface NumberBounds {
|
|
16
|
+
min?: number;
|
|
17
|
+
max?: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Everything that is not a digit, removed; then cut to {@link MAX_DIGITS}. */
|
|
21
|
+
export function digitsOf(raw: string): string {
|
|
22
|
+
return raw.replace(/\D+/g, '').slice(0, MAX_DIGITS);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* What the field's text is worth. An empty field is `null` — never `0`, and
|
|
27
|
+
* never `NaN` — so "cleared" and "zero" stay two different answers.
|
|
28
|
+
*/
|
|
29
|
+
export function parseDigits(raw: string): number | null {
|
|
30
|
+
const digits = digitsOf(raw);
|
|
31
|
+
return digits === '' ? null : Number(digits);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The text a value shows as. */
|
|
35
|
+
export function formatValue(value: number | null): string {
|
|
36
|
+
return value === null || !Number.isFinite(value) ? '' : String(value);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** `value`, held inside whichever bounds are set. */
|
|
40
|
+
export function clamp(value: number, { min, max }: NumberBounds): number {
|
|
41
|
+
if (max !== undefined && value > max) return max;
|
|
42
|
+
if (min !== undefined && value < min) return min;
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Where ArrowUp (`+1`) or ArrowDown (`-1`) takes the value.
|
|
48
|
+
*
|
|
49
|
+
* From empty, either arrow lands on the floor (`min`, else 0) rather than
|
|
50
|
+
* stepping past it: the first press says "give me a number", and the floor is
|
|
51
|
+
* the only one both directions agree on.
|
|
52
|
+
*/
|
|
53
|
+
export function stepValue(
|
|
54
|
+
value: number | null,
|
|
55
|
+
direction: 1 | -1,
|
|
56
|
+
step: number,
|
|
57
|
+
bounds: NumberBounds,
|
|
58
|
+
): number {
|
|
59
|
+
if (value === null) return clamp(bounds.min ?? 0, bounds);
|
|
60
|
+
return clamp(value + direction * step, bounds);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A key that would type a character the field refuses. Shortcuts (Ctrl/Cmd +
|
|
65
|
+
* a letter — copy, paste, select all) and the named keys (`Backspace`,
|
|
66
|
+
* `ArrowLeft`, `Tab`) are left alone: only a single printable character that
|
|
67
|
+
* is not a digit is blocked.
|
|
68
|
+
*/
|
|
69
|
+
export function isRefusedKey(event: {
|
|
70
|
+
key: string;
|
|
71
|
+
ctrlKey: boolean;
|
|
72
|
+
metaKey: boolean;
|
|
73
|
+
altKey: boolean;
|
|
74
|
+
}): boolean {
|
|
75
|
+
if (event.ctrlKey || event.metaKey || event.altKey) return false;
|
|
76
|
+
return event.key.length === 1 && !/\d/.test(event.key);
|
|
77
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# NumberField
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
A **digits-only** numeric input whose value is a `number | null`. For the
|
|
6
|
+
counts, durations and limits settings forms are full of — "prepare in 15 min",
|
|
7
|
+
"keep for 30 days" — where a plain text input lets letters in and a
|
|
8
|
+
`type="number"` field brings scroll-wheel surprises, `e`, `-` and a value that is
|
|
9
|
+
a string.
|
|
10
|
+
|
|
11
|
+
- `inputMode="numeric"` on the `<input>` itself, so a phone opens its number pad.
|
|
12
|
+
- A non-digit keystroke never reaches the field; a paste keeps only its digits
|
|
13
|
+
(`"1.500 min"` → `1500`).
|
|
14
|
+
- `suffix` — the unit — is drawn **inside** the field's border, at its end.
|
|
15
|
+
- ArrowUp / ArrowDown move by `step`, never past `min` / `max`.
|
|
16
|
+
- An empty field is `null`. Never `0`, never `NaN`: "cleared" and "zero" stay
|
|
17
|
+
two different answers.
|
|
18
|
+
|
|
19
|
+
Built on [`Input`](../Input/Input.md), so it takes the field radius, height,
|
|
20
|
+
border, variants and sizes like every other field.
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { NumberField } from '@12-apps/ui/form/NumberField';
|
|
26
|
+
|
|
27
|
+
const [minutes, setMinutes] = useState<number | null>(15);
|
|
28
|
+
|
|
29
|
+
<NumberField
|
|
30
|
+
label="Preparation time"
|
|
31
|
+
value={minutes}
|
|
32
|
+
onChange={setMinutes}
|
|
33
|
+
min={1}
|
|
34
|
+
max={120}
|
|
35
|
+
step={5}
|
|
36
|
+
suffix="min"
|
|
37
|
+
helperText="Between 1 and 120"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Props
|
|
42
|
+
|
|
43
|
+
Everything [`Input`](../Input/Input.md) takes (`label`, `helperText`, `error`,
|
|
44
|
+
`size`, `variant`, `disabled`, `placeholder`, `data-testid`, …), except the ones
|
|
45
|
+
this field owns (`value`, `onChange`, `type`, `inputMode`, `pattern`, `min`,
|
|
46
|
+
`max`, `step`, `endAdornment`, `maxLength`), plus:
|
|
47
|
+
|
|
48
|
+
| prop | type | default | effect |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| `value` | `number \| null` | **required** | The value. `null` renders an empty field. |
|
|
51
|
+
| `onChange` | `(value: number \| null) => void` | **required** | Every edit, as a number, or `null` once cleared. Not called when an edit leaves the number unchanged. |
|
|
52
|
+
| `min` | `number` | — | Where ArrowDown stops, where an empty field's first arrow press lands, and what a blur raises a smaller value to. |
|
|
53
|
+
| `max` | `number` | — | Where ArrowUp stops, and what a blur lowers a larger value to. |
|
|
54
|
+
| `step` | `number` | `1` | How far one arrow press moves. |
|
|
55
|
+
| `suffix` | `ReactNode` | — | The unit, inside the field's border. Also read as part of the field's description. |
|
|
56
|
+
|
|
57
|
+
## Behaviour notes
|
|
58
|
+
|
|
59
|
+
- **Bounds apply to arrows at once, to typing on blur.** Typing `5` on the way to
|
|
60
|
+
`50` must not snap to a minimum of `10` under the reader's fingers; the blur
|
|
61
|
+
brings an out-of-range value back inside.
|
|
62
|
+
- **Digits only means non-negative integers.** There is no minus sign and no
|
|
63
|
+
decimal separator; a field that needs either is not this one.
|
|
64
|
+
- **At most fifteen digits** — the longest run that is always a safe integer, so
|
|
65
|
+
a pasted serial number never becomes a rounded float.
|
|
66
|
+
- From empty, either arrow lands on `min` (or `0`): the first press says "give me
|
|
67
|
+
a number", and the floor is the one both directions agree on.
|
|
68
|
+
- A caller's `onKeyDown` runs first; calling `preventDefault()` in it cancels the
|
|
69
|
+
field's own handling of that key.
|
|
70
|
+
|
|
71
|
+
## Accessibility
|
|
72
|
+
|
|
73
|
+
- `role="spinbutton"` with `aria-valuenow`, `aria-valuemin` and `aria-valuemax`
|
|
74
|
+
— the arrow keys make it one, and a screen reader then says so, and says where
|
|
75
|
+
in the range the value sits.
|
|
76
|
+
- The suffix has an id and is in the input's `aria-describedby` (after the
|
|
77
|
+
helper text), so "15" is announced with its unit.
|
|
78
|
+
- `inputMode="numeric"` and `pattern="[0-9]*"` bring up the numeric keypad on
|
|
79
|
+
iOS and Android.
|
|
80
|
+
|
|
81
|
+
## Best practices
|
|
82
|
+
|
|
83
|
+
- Put the unit in `suffix`, not in the label: "Preparation time" + `min` reads
|
|
84
|
+
better than "Preparation time (min)", and the unit stays next to the number.
|
|
85
|
+
- Store `null` as "not set" on the host side. Coercing it to `0` is how a
|
|
86
|
+
cleared field ends up submitting a value nobody chose.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { useCallback, useId } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Input } from '../Input';
|
|
4
|
+
|
|
5
|
+
import { clamp, formatValue, isRefusedKey, parseDigits, stepValue } from './NumberField.helpers';
|
|
6
|
+
import type { NumberFieldProps } from './NumberField.types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A digits-only number input whose value is a `number | null`.
|
|
10
|
+
*
|
|
11
|
+
* - `inputMode="numeric"` on the `<input>` itself, so a phone opens its number
|
|
12
|
+
* pad (the attribute does nothing anywhere else — see `Input.types.ts`).
|
|
13
|
+
* - A non-digit keystroke never reaches the field, and a paste keeps only its
|
|
14
|
+
* digits: `"1.500 min"` pastes as `1500`.
|
|
15
|
+
* - `suffix` is drawn inside the field's border, and read as its description.
|
|
16
|
+
* - ArrowUp / ArrowDown move by `step`, never past `min` / `max`. Typing may go
|
|
17
|
+
* out of bounds for a moment (typing `5` on the way to `50` must not snap to a
|
|
18
|
+
* minimum of 10); the blur brings it back inside.
|
|
19
|
+
* - Clearing the field reports `null`, not `0` and not `NaN`.
|
|
20
|
+
*
|
|
21
|
+
* `role="spinbutton"` with `aria-valuenow` / `-min` / `-max`, because that is
|
|
22
|
+
* what the arrow keys make it — a screen reader then says so, and says where
|
|
23
|
+
* in the range the value sits.
|
|
24
|
+
*/
|
|
25
|
+
export const NumberField = React.forwardRef<HTMLInputElement, NumberFieldProps>(function NumberField(
|
|
26
|
+
props,
|
|
27
|
+
ref,
|
|
28
|
+
) {
|
|
29
|
+
const {
|
|
30
|
+
value, onChange, min, max, step = 1, suffix, onKeyDown, onBlur, inputProps, id: idProp,
|
|
31
|
+
'aria-describedby': callerDescribedBy, ...rest
|
|
32
|
+
} = props;
|
|
33
|
+
const generated = useId();
|
|
34
|
+
const id = idProp ?? `number-field-${generated}`;
|
|
35
|
+
const suffixId = `${id}-suffix`;
|
|
36
|
+
|
|
37
|
+
const commit = useCallback(
|
|
38
|
+
(next: number | null) => {
|
|
39
|
+
if (next !== value) onChange(next);
|
|
40
|
+
},
|
|
41
|
+
[value, onChange],
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {
|
|
45
|
+
onKeyDown?.(event);
|
|
46
|
+
if (event.defaultPrevented) return;
|
|
47
|
+
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
commit(stepValue(value, event.key === 'ArrowUp' ? 1 : -1, step, { min, max }));
|
|
50
|
+
} else if (isRefusedKey(event)) {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {
|
|
56
|
+
if (value !== null) commit(clamp(value, { min, max }));
|
|
57
|
+
onBlur?.(event);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const describedBy = [callerDescribedBy, suffix != null ? suffixId : undefined].filter(Boolean).join(' ');
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<Input
|
|
64
|
+
ref={ref}
|
|
65
|
+
{...rest}
|
|
66
|
+
id={id}
|
|
67
|
+
type="text"
|
|
68
|
+
autoComplete="off"
|
|
69
|
+
value={formatValue(value)}
|
|
70
|
+
onChange={(event) => commit(parseDigits(event.target.value))}
|
|
71
|
+
onBlur={handleBlur}
|
|
72
|
+
aria-describedby={describedBy || undefined}
|
|
73
|
+
endAdornment={suffix != null ? <span id={suffixId}>{suffix}</span> : undefined}
|
|
74
|
+
inputProps={{
|
|
75
|
+
...inputProps,
|
|
76
|
+
inputMode: 'numeric',
|
|
77
|
+
pattern: '[0-9]*',
|
|
78
|
+
role: 'spinbutton',
|
|
79
|
+
'aria-valuenow': value ?? undefined,
|
|
80
|
+
'aria-valuemin': min,
|
|
81
|
+
'aria-valuemax': max,
|
|
82
|
+
onKeyDown: handleKeyDown,
|
|
83
|
+
}}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
NumberField.displayName = 'NumberField';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { InputProps } from '../Input/Input.types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What `NumberField` takes over from `Input`: the value and its change are
|
|
7
|
+
* numbers here, not strings, and the element's type, keyboard and trailing
|
|
8
|
+
* slot are the field's own.
|
|
9
|
+
*/
|
|
10
|
+
type OwnedInputProps =
|
|
11
|
+
| 'value'
|
|
12
|
+
| 'defaultValue'
|
|
13
|
+
| 'onChange'
|
|
14
|
+
| 'type'
|
|
15
|
+
| 'inputMode'
|
|
16
|
+
| 'pattern'
|
|
17
|
+
| 'min'
|
|
18
|
+
| 'max'
|
|
19
|
+
| 'step'
|
|
20
|
+
| 'endAdornment'
|
|
21
|
+
| 'maxLength';
|
|
22
|
+
|
|
23
|
+
export interface NumberFieldProps extends Omit<InputProps, OwnedInputProps> {
|
|
24
|
+
/** The value. `null` is an empty field — never `0`, never `NaN`. */
|
|
25
|
+
value: number | null;
|
|
26
|
+
/** Every edit, as the number it now reads, or `null` once cleared. */
|
|
27
|
+
onChange: (value: number | null) => void;
|
|
28
|
+
/**
|
|
29
|
+
* The lowest value ArrowDown reaches, and what a blur raises a smaller one
|
|
30
|
+
* to. Digits only, so the field never holds a negative number whatever this
|
|
31
|
+
* says.
|
|
32
|
+
*/
|
|
33
|
+
min?: number;
|
|
34
|
+
/** The highest value ArrowUp reaches, and what a blur lowers a larger one to. */
|
|
35
|
+
max?: number;
|
|
36
|
+
/** How far one ArrowUp / ArrowDown moves the value. Defaults to 1. */
|
|
37
|
+
step?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The unit, drawn INSIDE the field's border at its end — "min", "%", "kg".
|
|
40
|
+
* Also read to screen readers as part of the field's description.
|
|
41
|
+
*/
|
|
42
|
+
suffix?: ReactNode;
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# NumberField Test Status Tracking
|
|
2
|
+
|
|
3
|
+
## Test Files Status
|
|
4
|
+
|
|
5
|
+
- [x] NumberField.test.stories.tsx created
|
|
6
|
+
- [x] `__tests__/NumberField.test.tsx` (Vitest: helpers + component)
|
|
7
|
+
- [x] Core categories implemented (interaction, keyboard, screen reader, visual/layout, edge cases)
|
|
8
|
+
|
|
9
|
+
## Storybook Tests Status
|
|
10
|
+
|
|
11
|
+
### Test Results
|
|
12
|
+
|
|
13
|
+
| Test Name | Status | Pass/Fail | Notes |
|
|
14
|
+
| -------------------------------- | ------ | --------- | ------------------------------------------------------- |
|
|
15
|
+
| Typing keeps digits only | PASS | Pass | `1a2-3.e` lands as `123` |
|
|
16
|
+
| Paste keeps digits only | PASS | Pass | `1.500 min` reports `1500` |
|
|
17
|
+
| Arrows step within bounds | PASS | Pass | step 5, clamped to 5–20; `aria-valuenow` follows |
|
|
18
|
+
| Clearing reports null | PASS | Pass | reported value is `null`, input empty |
|
|
19
|
+
| Blur clamps typed value | PASS | Pass | typed `5` with min 10 becomes `10` on blur |
|
|
20
|
+
| Suffix inside the border | PASS | Pass | suffix rect inside `.MuiInputBase-root`, right of input |
|
|
21
|
+
| Numeric spinbutton | PASS | Pass | `inputmode`, `aria-value*`, suffix in describedby |
|
|
22
|
+
|
|
23
|
+
Legend: Pending | Running | PASS | FAIL
|
|
24
|
+
|
|
25
|
+
## Static Stories Status
|
|
26
|
+
|
|
27
|
+
- [x] Default story
|
|
28
|
+
- [x] WithSuffix, WithBounds
|
|
29
|
+
- [x] Empty state story (`null`)
|
|
30
|
+
- [x] Error state story
|
|
31
|
+
- [x] Disabled state story
|
|
32
|
+
- [x] Sizes
|
|
33
|
+
- [x] Edge cases (fifteen digits, long suffix)
|
|
34
|
+
|
|
35
|
+
## Lint Status
|
|
36
|
+
|
|
37
|
+
- [x] No lint errors
|
|
38
|
+
- [x] No warnings
|
|
39
|
+
|
|
40
|
+
## TypeCheck Status
|
|
41
|
+
|
|
42
|
+
- [x] No type errors
|
|
43
|
+
- [x] All props properly typed
|
|
44
|
+
|
|
45
|
+
## Overall Component Status
|
|
46
|
+
|
|
47
|
+
- [x] All tests passing
|
|
48
|
+
- [x] Lint clean
|
|
49
|
+
- [x] TypeCheck clean
|
|
50
|
+
- [x] Stories working
|
|
51
|
+
- [ ] Ready for production (pending review)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# NumberField
|
|
2
|
+
|
|
3
|
+
A digits-only numeric input over `Input` whose value is `number | null` (`null`
|
|
4
|
+
is an empty field). `inputMode="numeric"` on the `<input>`, non-digit keystrokes
|
|
5
|
+
refused and pastes reduced to their digits, a `suffix` drawn inside the field,
|
|
6
|
+
and ArrowUp / ArrowDown stepping by `step` within `min` / `max`. Built for the
|
|
7
|
+
`layout/SettingCard` family's forms (FUT-2823) but independent of it.
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
- **value** — the number, or `null` for an empty field.
|
|
12
|
+
- **onChange** — every edit as a number, or `null` once cleared.
|
|
13
|
+
- **min** — floor for arrows and for the blur clamp.
|
|
14
|
+
- **max** — ceiling for arrows and for the blur clamp.
|
|
15
|
+
- **step** — how far one arrow press moves (default 1).
|
|
16
|
+
- **suffix** — the unit, inside the field border, read as its description.
|
|
17
|
+
- Everything else `Input` takes, minus the props this field owns.
|
|
18
|
+
|
|
19
|
+
## Lint
|
|
20
|
+
|
|
21
|
+
- Clean (`pnpm lint:files src/components/form/NumberField`), including the
|
|
22
|
+
complexity and flakiness gates.
|
|
23
|
+
|
|
24
|
+
## Type Errors
|
|
25
|
+
|
|
26
|
+
- None (`pnpm typecheck`, `tsc -p tsconfig.stories.json`).
|
|
27
|
+
|
|
28
|
+
## Testing Scenarios
|
|
29
|
+
|
|
30
|
+
- Digits-only typing and paste; `null` on clear; arrow stepping and clamping;
|
|
31
|
+
blur clamp; suffix geometry; spinbutton ARIA; caller `onKeyDown` precedence.
|
|
32
|
+
|
|
33
|
+
## Storybook Tests List
|
|
34
|
+
|
|
35
|
+
- Form/NumberField/Tests → 7 interaction stories.
|
|
36
|
+
|
|
37
|
+
## Current
|
|
38
|
+
|
|
39
|
+
- 2026-09-26 16:40 BRT — v1 shipped with `Input` gaining a merged `inputProps`
|
|
40
|
+
pass-through (an attribute `Input` does not recognise otherwise lands on the
|
|
41
|
+
text field's root `<div>`). Remaining TODO: none for v1; a host adoption
|
|
42
|
+
follows in the origin host.
|