@12-apps/ui 6.77.1 → 6.78.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 +1 -1
- package/components-catalog.md +8 -0
- 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 +57 -57
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +71 -71
- package/dist/_internal/components/data-display/DataViews/DeleteViewDialog.js +5 -5
- package/dist/_internal/components/data-display/DataViews/ManageViewsDialog.js +6 -6
- package/dist/_internal/components/data-display/DataViews/SaveViewModal.js +8 -8
- package/dist/_internal/components/data-display/DataViews/data-views-bar-controls.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-card-body.js +6 -6
- package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +19 -19
- 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 +30 -30
- package/dist/_internal/components/data-display/DataViews/data-views-grid-bodies.js +8 -8
- 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 +54 -54
- package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +31 -31
- package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +25 -25
- package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +28 -28
- package/dist/_internal/components/data-display/DataViews/data-views-number-input.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-pagination.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-quick-chip.js +3 -3
- 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 +18 -18
- 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/LazyImage/LazyImage.js +3 -3
- 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 +10 -10
- package/dist/_internal/components/feedback/ConfirmAction/ConfirmButton.js +5 -5
- package/dist/_internal/components/feedback/NotificationStatusNotice/NotificationStatusNotice.js +5 -5
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.js +56 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.metrics.js +8 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.metrics.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js +52 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.parts.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.styles.js +58 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.styles.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.types.js +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/SequenceResolver.types.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/sequence-model.js +28 -0
- package/dist/_internal/components/feedback/SequenceResolver/sequence-model.js.map +1 -0
- package/dist/_internal/components/feedback/SequenceResolver/useSequenceRun.js +9 -0
- package/dist/_internal/components/feedback/SequenceResolver/useSequenceRun.js.map +1 -0
- package/dist/_internal/components/feedback/TutorialOverlay/TutorialOverlay.js +2 -2
- package/dist/_internal/components/feedback/index.js +40 -23
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.hooks.js +4 -4
- package/dist/_internal/components/form/AddressAutocomplete/AddressAutocomplete.js +11 -11
- 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 +4 -4
- package/dist/_internal/components/form/Autocomplete/Autocomplete.parts.js +3 -3
- 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/Calendar/Calendar.js +2 -2
- 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 +11 -11
- 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 +6 -6
- package/dist/_internal/components/form/CodeEditor/CodeEditor.js +3 -3
- package/dist/_internal/components/form/Command/Command.js +5 -5
- 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 +9 -9
- 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.factory.js +4 -4
- package/dist/_internal/components/form/Input/Input.js +5 -5
- 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 +5 -5
- 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.js +6 -6
- package/dist/_internal/components/form/PhoneInput/PhoneInput.js +3 -3
- package/dist/_internal/components/form/PickerSheet/PickerSheet.js +6 -6
- package/dist/_internal/components/form/PickerSheet/PickerSheet.parts.js +4 -4
- package/dist/_internal/components/form/PickerSheet/PickerSheet.styles.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 +2 -2
- package/dist/_internal/components/form/Select/Select.js +6 -6
- package/dist/_internal/components/form/Select/Select.menu.js +4 -4
- package/dist/_internal/components/form/Select/Select.searchable.js +4 -4
- package/dist/_internal/components/form/Select/Select.styles.js +3 -3
- 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/UploadButton/UploadButton.js +2 -2
- package/dist/_internal/components/form/index.js +64 -64
- package/dist/_internal/components/form/total-form/Fields/CategoryField.js +12 -12
- package/dist/_internal/components/form/total-form/Fields/CepField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/SelectField.js +7 -7
- package/dist/_internal/components/form/total-form/Fields/TextField.js +6 -6
- package/dist/_internal/components/form/total-form/Fields/ToggleField.js +4 -4
- package/dist/_internal/components/form/total-form/Fields/index.js +30 -30
- package/dist/_internal/components/form/total-form/SubmitButton.js +5 -5
- package/dist/_internal/components/index.js +165 -155
- package/dist/_internal/components/layout/Box/Box.js +6 -6
- 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/Screen/Screen.js +7 -7
- package/dist/_internal/components/layout/SettingCard/SettingCard.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingCard.parts.js +9 -9
- package/dist/_internal/components/layout/SettingCard/SettingCard.summary.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGrid.js +10 -10
- package/dist/_internal/components/layout/SettingCard/SettingGroup.js +13 -13
- package/dist/_internal/components/layout/SettingCard/SettingSwitch.js +11 -11
- package/dist/_internal/components/layout/SettingCard/SettingToggle.js +13 -13
- package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +3 -3
- package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.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 +36 -36
- package/dist/_internal/components/navigation/AppHeader/AppHeader.details.js +6 -6
- 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/SectionNav/SectionNav.bar.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.js +6 -6
- package/dist/_internal/components/navigation/SectionNav/SectionNav.parts.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.primary.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.rail.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.railCreate.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/SectionNav.sheet.js +3 -3
- package/dist/_internal/components/navigation/SectionNav/__stories__/fixtures.js +3 -3
- package/dist/_internal/components/navigation/Tabs/Tabs.js +2 -2
- package/dist/_internal/components/navigation/Tabs/Tabs.styles.js +2 -2
- package/dist/_internal/components/navigation/index.js +29 -29
- 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 +7 -7
- package/dist/_internal/en-US.data-display.js +2 -2
- 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/social-login-button/social-login-button.js +5 -5
- 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 +5 -5
- package/dist/charts.js +3 -3
- package/dist/{chunk-75FHDUJW.js → chunk-2D4WKET2.js} +5 -5
- package/dist/{chunk-3O2OJW4O.js → chunk-2QO3BKUQ.js} +8 -8
- package/dist/{chunk-MA6ENJDP.js → chunk-2VHAD4NE.js} +3 -3
- package/dist/{chunk-FJ3UZ4RC.js → chunk-33MMQHYU.js} +2 -2
- package/dist/{chunk-CBO46LJH.js → chunk-3HSLEUVW.js} +5 -5
- package/dist/chunk-3LUT2C5M.js +122 -0
- package/dist/chunk-3LUT2C5M.js.map +1 -0
- package/dist/{chunk-6VTOGR36.js → chunk-3XZZSHE5.js} +5 -5
- package/dist/{chunk-BLINEMVO.js → chunk-3YLRR4JM.js} +3 -3
- package/dist/{chunk-PD7MKJCM.js → chunk-4AJY7HMH.js} +5 -5
- package/dist/{chunk-VWVA74JY.js → chunk-4HUSG5MR.js} +2 -2
- package/dist/{chunk-7CPLKAL6.js → chunk-4M5GEKPM.js} +2 -2
- package/dist/{chunk-WEMI4PV7.js → chunk-4MQ6XTIJ.js} +5 -5
- package/dist/{chunk-3MQZBBUW.js → chunk-5463SZOH.js} +3 -3
- package/dist/{chunk-CAX3NFFE.js → chunk-555TUQ7E.js} +4 -4
- package/dist/{chunk-5KGABAQB.js → chunk-5752357K.js} +4 -4
- package/dist/{chunk-ZOLUUX4B.js → chunk-5J7SA4CZ.js} +4 -4
- package/dist/chunk-5UBP2DJ4.js +102 -0
- package/dist/chunk-5UBP2DJ4.js.map +1 -0
- package/dist/{chunk-364NH2NY.js → chunk-5USHYSCO.js} +21 -12
- package/dist/chunk-5USHYSCO.js.map +1 -0
- package/dist/{chunk-5AQLJ4AL.js → chunk-62XVHRTX.js} +2 -2
- package/dist/{chunk-SO5OU2ZV.js → chunk-64AOS2WA.js} +2 -2
- package/dist/{chunk-75I42HHE.js → chunk-66QQ7YQN.js} +2 -2
- package/dist/{chunk-7KZEQJPQ.js → chunk-6J7RGNSF.js} +4 -4
- package/dist/{chunk-GCBWZ3MX.js → chunk-6LMYQJZP.js} +2 -2
- package/dist/{chunk-4SQ2WCZA.js → chunk-6MOJK2QT.js} +2 -2
- package/dist/{chunk-Q6MZHT2F.js → chunk-6RTE4UNO.js} +5 -5
- package/dist/{chunk-NIZUFPV3.js → chunk-72GJRV5J.js} +2 -2
- package/dist/{chunk-LYB6YYTG.js → chunk-72OG3AGH.js} +2 -2
- package/dist/{chunk-Y46R26TE.js → chunk-7AC2UGTU.js} +3 -3
- package/dist/{chunk-NPSARV2I.js → chunk-7P5PNRBT.js} +8 -8
- package/dist/{chunk-RPKUZDRY.js → chunk-7QXEEZFO.js} +2 -2
- package/dist/{chunk-SUXT6QAY.js → chunk-7RG37FVT.js} +2 -2
- package/dist/{chunk-5F7HYYGM.js → chunk-7ZROYGUG.js} +3 -3
- package/dist/{chunk-LY5I3ZSV.js → chunk-A2YLFKQU.js} +4 -4
- package/dist/{chunk-BEYLI32I.js → chunk-A5NXBOWS.js} +7 -7
- package/dist/{chunk-7TKQIZ3K.js → chunk-AAREDFH6.js} +2 -2
- package/dist/{chunk-4QGPRORO.js → chunk-AEYLFBZT.js} +3 -3
- package/dist/{chunk-VPGDYI63.js → chunk-AKBL7S7A.js} +5 -5
- package/dist/{chunk-6DGNMASB.js → chunk-ALREWFRX.js} +4 -4
- package/dist/{chunk-NQ6P7O7C.js → chunk-ASZGMKB4.js} +2 -2
- package/dist/{chunk-CWCNLITK.js → chunk-AXZCCX7O.js} +2 -2
- package/dist/{chunk-FVL6U72V.js → chunk-B2JYQBO4.js} +2 -2
- package/dist/{chunk-IU2WSJ4F.js → chunk-BARTUKJU.js} +2 -2
- package/dist/{chunk-4JNC5AEF.js → chunk-BTGXHQX3.js} +2 -2
- package/dist/{chunk-VMTOLAZ5.js → chunk-BWFQEASG.js} +5 -5
- package/dist/{chunk-MKBIIYJM.js → chunk-C47LBKEG.js} +4 -4
- package/dist/{chunk-2K2Q7VGV.js → chunk-C5JCARNE.js} +2 -2
- package/dist/{chunk-LBEZ7A3F.js → chunk-C7CIUDXZ.js} +3 -3
- package/dist/chunk-CHP3QIS3.js +218 -0
- package/dist/chunk-CHP3QIS3.js.map +1 -0
- package/dist/{chunk-YWXCLPCX.js → chunk-CO7GH3W7.js} +2 -2
- package/dist/{chunk-ARVLS57B.js → chunk-CW6Y32N2.js} +2 -2
- package/dist/{chunk-LZJHHMOF.js → chunk-DRJL3JHR.js} +2 -2
- package/dist/chunk-DTNXP7ZS.js +1 -0
- package/dist/chunk-DTNXP7ZS.js.map +1 -0
- package/dist/{chunk-7IXXASQ6.js → chunk-DXFKPY2K.js} +4 -4
- package/dist/chunk-E53MMMDA.js +209 -0
- package/dist/chunk-E53MMMDA.js.map +1 -0
- package/dist/{chunk-FR2RJXHS.js → chunk-EBCEDBHX.js} +3 -3
- package/dist/{chunk-BRHRK7BK.js → chunk-ENRB6PIN.js} +2 -2
- package/dist/{chunk-J5QNJERV.js → chunk-F6IMOMA3.js} +3 -3
- package/dist/{chunk-YTDUIU7X.js → chunk-F6LZHF4O.js} +2 -2
- package/dist/{chunk-725H45MT.js → chunk-FAIQCGSL.js} +5 -5
- package/dist/{chunk-HVGQH54G.js → chunk-FTDGFWB5.js} +5 -5
- package/dist/{chunk-P7VAMJFJ.js → chunk-GFXS5PJL.js} +3 -3
- package/dist/{chunk-YEKPQAOW.js → chunk-GQ2T44BC.js} +2 -2
- package/dist/{chunk-JA3WJPXH.js → chunk-GSXYXMCV.js} +3 -3
- package/dist/{chunk-IZ7JTG3Z.js → chunk-GTT5UKKO.js} +4 -4
- package/dist/{chunk-WDSJ6SVY.js → chunk-GXSHLMT4.js} +2 -2
- package/dist/chunk-HHPFWEJY.js +28 -0
- package/dist/chunk-HHPFWEJY.js.map +1 -0
- package/dist/{chunk-ULK4AGG4.js → chunk-HTGK7QCX.js} +3 -3
- package/dist/{chunk-Y3LK6ZQG.js → chunk-I2KAN3YB.js} +2 -2
- package/dist/{chunk-M5DBOM7R.js → chunk-ICRVLGWD.js} +2 -2
- package/dist/{chunk-BEHM2VLH.js → chunk-IQ2U5MVO.js} +7 -7
- package/dist/{chunk-LABIUXDM.js → chunk-J7C7FPVO.js} +2 -2
- package/dist/{chunk-CYH5QQUP.js → chunk-KHIUYLKY.js} +4 -4
- package/dist/{chunk-PPEHBI5O.js → chunk-KXTNTDRD.js} +2 -2
- package/dist/{chunk-IBOFASAZ.js → chunk-LC6ND4ET.js} +2 -2
- package/dist/{chunk-BF3SGOWT.js → chunk-LG52LMAM.js} +3 -3
- package/dist/{chunk-3Y7LSMGV.js → chunk-LH4VKUZC.js} +2 -2
- package/dist/{chunk-CFDWKQZT.js → chunk-LODYTVOO.js} +2 -2
- package/dist/{chunk-Y2CCXB7R.js → chunk-LUNN5GTB.js} +2 -2
- package/dist/{chunk-ACBHZG3Z.js → chunk-M74YHHJE.js} +5 -5
- package/dist/{chunk-BGGVYKVZ.js → chunk-MA6SUE7F.js} +4 -4
- package/dist/{chunk-AT6UKTH4.js → chunk-MHFXJRLD.js} +2 -2
- package/dist/{chunk-3BDMYTH6.js → chunk-MHLYX6QW.js} +4 -4
- package/dist/{chunk-FXECKKPW.js → chunk-MO4FFK62.js} +3 -3
- package/dist/{chunk-SAKSIN7E.js → chunk-MQVIYTH5.js} +2 -2
- package/dist/{chunk-NKBCUR4V.js → chunk-MSC43MCJ.js} +2 -2
- package/dist/{chunk-RHVJ3L4U.js → chunk-MWPD2BXO.js} +2 -2
- package/dist/{chunk-TSID4257.js → chunk-N34AOGK3.js} +7 -7
- package/dist/{chunk-NZBEE2PR.js → chunk-N3LW5ER5.js} +3 -3
- package/dist/{chunk-Q3HYEAVQ.js → chunk-N3ZOZWP5.js} +2 -2
- package/dist/{chunk-AO4NDR6W.js → chunk-NTO5DALI.js} +2 -2
- package/dist/{chunk-VQSBZPKO.js → chunk-NYWAAXDX.js} +2 -2
- package/dist/{chunk-CHGUN7OF.js → chunk-O6SAU5JA.js} +2 -2
- package/dist/{chunk-3FDSXSEP.js → chunk-OE3SQOZV.js} +2 -2
- package/dist/{chunk-VLH3IMJG.js → chunk-OFXCSLGX.js} +2 -2
- package/dist/{chunk-E54XIRY2.js → chunk-PIP7XII2.js} +5 -5
- package/dist/{chunk-QWSYHENP.js → chunk-PTQRJEPN.js} +5 -5
- package/dist/{chunk-S5VIN3EB.js → chunk-Q6PRGXR2.js} +2 -2
- package/dist/{chunk-DQ3O252B.js → chunk-QCNUMOTL.js} +2 -2
- package/dist/{chunk-XZE5FIRB.js → chunk-QCQWOSSD.js} +2 -2
- package/dist/{chunk-TRYYYWV3.js → chunk-QIYX33SH.js} +9 -9
- package/dist/{chunk-RGVNXES5.js → chunk-QQHZBJMU.js} +4 -4
- package/dist/{chunk-XZFTRGRW.js → chunk-QVO4SIS7.js} +2 -2
- package/dist/{chunk-WJEJ65TF.js → chunk-QYX4567K.js} +2 -2
- package/dist/{chunk-7JKDB5J5.js → chunk-R53ZOW4B.js} +4 -4
- package/dist/{chunk-HSIUVFXE.js → chunk-RA6W37NZ.js} +2 -2
- package/dist/{chunk-HDTFLW42.js → chunk-REMODSVN.js} +2 -2
- package/dist/{chunk-P4LR2GLN.js → chunk-RIDCGFGM.js} +2 -2
- package/dist/{chunk-RNQ2PGBB.js → chunk-RKVS5AA6.js} +3 -3
- package/dist/{chunk-MKNW4FRR.js → chunk-RS576GOH.js} +7 -7
- package/dist/{chunk-NIENIKZ5.js → chunk-SCAPSX6T.js} +2 -2
- package/dist/{chunk-HG2YLNGJ.js → chunk-SFVHZAGE.js} +2 -2
- package/dist/{chunk-5HFB4WFE.js → chunk-T743IIER.js} +3 -3
- package/dist/{chunk-C6LW34TV.js → chunk-THD3N4BJ.js} +2 -2
- package/dist/{chunk-IDRVQVDL.js → chunk-TNDTEI6D.js} +2 -2
- package/dist/{chunk-U2QV4TTZ.js → chunk-TR7ZA67L.js} +2 -2
- package/dist/chunk-TWAKMV5B.js +1 -0
- package/dist/chunk-TWAKMV5B.js.map +1 -0
- package/dist/{chunk-EP3DRILI.js → chunk-U36BXXQ7.js} +2 -2
- package/dist/{chunk-AJ5LXKLQ.js → chunk-U4G3KY6L.js} +6 -6
- package/dist/{chunk-UAFSEZ2E.js → chunk-UQUN2NGE.js} +2 -2
- package/dist/{chunk-6A4PTK5Q.js → chunk-V4JMZZGH.js} +5 -5
- package/dist/{chunk-72L5C74V.js → chunk-VBGC7G4F.js} +3 -3
- package/dist/{chunk-IWJTLCTF.js → chunk-VD72JGHA.js} +3 -3
- package/dist/{chunk-TVXUOJAL.js → chunk-VJG43WKU.js} +2 -2
- package/dist/{chunk-H7QTDKA6.js → chunk-VMN6KG2U.js} +2 -2
- package/dist/{chunk-YRF7WFAQ.js → chunk-WA6F4NOO.js} +8 -8
- package/dist/{chunk-HOJL2GKW.js → chunk-WC3W36AM.js} +4 -4
- package/dist/{chunk-OQW4OERS.js → chunk-WNIL2KTB.js} +3 -3
- package/dist/{chunk-NQYC7V5N.js → chunk-WOSUYOAU.js} +5 -5
- package/dist/{chunk-DDNUPFPE.js → chunk-WT7VZDTI.js} +5 -5
- package/dist/{chunk-DOWVAC4U.js → chunk-XODBYGTH.js} +2 -2
- package/dist/{chunk-HDXUQKJ5.js → chunk-XRDH24J7.js} +2 -2
- package/dist/{chunk-DQKMOGYZ.js → chunk-XYFBJH6F.js} +4 -4
- package/dist/{chunk-SZSS5KKX.js → chunk-XYSE2QZN.js} +2 -2
- package/dist/{chunk-MIUPTZS6.js → chunk-Y4KR4LT2.js} +2 -2
- package/dist/{chunk-D7PVIC33.js → chunk-Y7YJYUNV.js} +4 -4
- package/dist/{chunk-GHP5JLL3.js → chunk-YASSCBWN.js} +2 -2
- package/dist/{chunk-QLJU7UUI.js → chunk-YH7G44WL.js} +2 -2
- package/dist/chunk-YJBWDDW7.js +162 -0
- package/dist/chunk-YJBWDDW7.js.map +1 -0
- package/dist/{chunk-FS55MQ4Q.js → chunk-YNDTLBOH.js} +2 -2
- package/dist/{chunk-6E4L53DF.js → chunk-YZX4DVRS.js} +2 -2
- package/dist/{chunk-NDQJDA7O.js → chunk-Z7COWR4K.js} +2 -2
- package/dist/{chunk-NYA26GV2.js → chunk-ZCCKIWZU.js} +2 -2
- package/dist/{chunk-J32XJALK.js → chunk-ZTPB7PVI.js} +2 -2
- package/dist/{chunk-NKHNUTTY.js → chunk-ZXHODKHH.js} +3 -3
- package/dist/{chunk-7LOCLC24.js → chunk-ZYKDUKAH.js} +2 -2
- 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/DataViews.js +71 -71
- package/dist/data-display/FleetMap.js +9 -9
- package/dist/data-display/LazyImage.js +3 -3
- package/dist/data-display/MapPreview.js +5 -5
- package/dist/data-display/Sheet.js +3 -3
- package/dist/en-US.js +6 -6
- package/dist/feedback/ConfirmAction.js +5 -5
- package/dist/feedback/NotificationStatusNotice.js +5 -5
- package/dist/feedback/SequenceResolver.js +56 -0
- package/dist/feedback/SequenceResolver.js.map +1 -0
- package/dist/feedback/TutorialOverlay.js +2 -2
- package/dist/form/AddressAutocomplete.js +11 -11
- package/dist/form/Autocomplete.js +4 -4
- package/dist/form/Button.js +4 -4
- package/dist/form/Calendar.js +2 -2
- package/dist/form/CategorySelect.js +11 -11
- package/dist/form/CepField.js +6 -6
- package/dist/form/CodeEditor.js +3 -3
- package/dist/form/Command.js +5 -5
- package/dist/form/CreatableSelect.js +3 -3
- package/dist/form/DateRangePicker.js +9 -9
- package/dist/form/Input/outlined.js +5 -5
- package/dist/form/Input.js +5 -5
- package/dist/form/InputOTP.js +4 -4
- package/dist/form/Label.js +3 -3
- package/dist/form/MenuSelect.js +4 -4
- package/dist/form/Menubar.js +5 -5
- package/dist/form/NumberField.js +6 -6
- package/dist/form/PhoneInput.js +3 -3
- package/dist/form/PickerSheet.js +6 -6
- package/dist/form/RadioGroup.js +5 -5
- package/dist/form/RichTextEditor.js +2 -2
- package/dist/form/Select.js +6 -6
- package/dist/form/Textarea.js +3 -3
- package/dist/form/Toggle.js +4 -4
- package/dist/form/ToggleGroup.js +3 -3
- package/dist/form/UploadButton.js +2 -2
- package/dist/form/total-form.js +32 -32
- package/dist/icons.js +6 -6
- package/dist/layout/Box.js +6 -6
- package/dist/layout/ContentToolbar.js +11 -11
- package/dist/layout/Screen.js +7 -7
- package/dist/layout/SettingCard.js +18 -18
- package/dist/layout/SettingsLayout.js +3 -3
- package/dist/layout/Stack.js +7 -7
- package/dist/layout/TableFilter.js +3 -3
- package/dist/locales.js +11 -11
- package/dist/native/chunks/{chunk-2MFMON74.js → chunk-EZHCNYQO.js} +67 -33
- package/dist/native/chunks/chunk-EZHCNYQO.js.map +1 -0
- package/dist/native/chunks/{chunk-H22XVP5O.js → chunk-TZPNJ4AU.js} +2 -2
- package/dist/native/data-display/EmptyState.js +2 -2
- package/dist/native/data-display/ErrorState.js +1 -1
- package/dist/native/data-display/FleetMap.js +2 -2
- package/dist/native/form/Button.js +1 -1
- package/dist/navigation/AppHeader.js +8 -8
- package/dist/navigation/NavigationMenu.js +4 -4
- package/dist/navigation/Pagination.js +4 -4
- package/dist/navigation/SectionNav.js +6 -6
- package/dist/navigation/Tabs.js +2 -2
- package/dist/provider.js +6 -6
- package/dist/pt-BR.js +5 -5
- package/dist/social-login-button.js +5 -5
- package/dist/tokens.js +4 -4
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.d.ts +17 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.metrics.d.ts +33 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.metrics.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.parts.d.ts +61 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.parts.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.styles.d.ts +51 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.styles.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.types.d.ts +175 -0
- package/dist/types/components/feedback/SequenceResolver/SequenceResolver.types.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/index.d.ts +3 -0
- package/dist/types/components/feedback/SequenceResolver/index.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/sequence-model.d.ts +85 -0
- package/dist/types/components/feedback/SequenceResolver/sequence-model.d.ts.map +1 -0
- package/dist/types/components/feedback/SequenceResolver/useSequenceRun.d.ts +24 -0
- package/dist/types/components/feedback/SequenceResolver/useSequenceRun.d.ts.map +1 -0
- package/dist/types/components/feedback/index.d.ts +1 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.d.ts.map +1 -1
- package/dist/types/components/form/Button/Button.native.loading.d.ts +36 -0
- package/dist/types/components/form/Button/Button.native.loading.d.ts.map +1 -0
- package/dist/types-native/components/form/Button/Button.native.d.ts.map +1 -1
- package/dist/types-native/components/form/Button/Button.native.loading.d.ts +36 -0
- package/dist/types-native/components/form/Button/Button.native.loading.d.ts.map +1 -0
- package/dist/user-avatar.js +5 -5
- package/dist/utility/WorkflowStep.js +3 -3
- package/package.json +5 -1
- package/src/components/feedback/SequenceResolver/SequenceResolver.md +136 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.metrics.ts +26 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.parts.tsx +307 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.styles.ts +238 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.tsx +179 -0
- package/src/components/feedback/SequenceResolver/SequenceResolver.types.ts +185 -0
- package/src/components/feedback/SequenceResolver/index.ts +14 -0
- package/src/components/feedback/SequenceResolver/sequence-model.ts +181 -0
- package/src/components/feedback/SequenceResolver/useSequenceRun.ts +205 -0
- package/src/components/feedback/index.ts +1 -0
- package/src/components/form/Button/Button.md +4 -3
- package/src/components/form/Button/Button.native.loading.tsx +89 -0
- package/src/components/form/Button/Button.native.tsx +14 -24
- package/src/components/form/Button/Button.tsx +47 -16
- package/dist/chunk-364NH2NY.js.map +0 -1
- package/dist/chunk-6YIKVXAV.js +0 -1
- package/dist/native/chunks/chunk-2MFMON74.js.map +0 -1
- /package/dist/{chunk-6YIKVXAV.js.map → _internal/components/feedback/SequenceResolver/SequenceResolver.js.map} +0 -0
- /package/dist/{chunk-75FHDUJW.js.map → chunk-2D4WKET2.js.map} +0 -0
- /package/dist/{chunk-3O2OJW4O.js.map → chunk-2QO3BKUQ.js.map} +0 -0
- /package/dist/{chunk-MA6ENJDP.js.map → chunk-2VHAD4NE.js.map} +0 -0
- /package/dist/{chunk-FJ3UZ4RC.js.map → chunk-33MMQHYU.js.map} +0 -0
- /package/dist/{chunk-CBO46LJH.js.map → chunk-3HSLEUVW.js.map} +0 -0
- /package/dist/{chunk-6VTOGR36.js.map → chunk-3XZZSHE5.js.map} +0 -0
- /package/dist/{chunk-BLINEMVO.js.map → chunk-3YLRR4JM.js.map} +0 -0
- /package/dist/{chunk-PD7MKJCM.js.map → chunk-4AJY7HMH.js.map} +0 -0
- /package/dist/{chunk-VWVA74JY.js.map → chunk-4HUSG5MR.js.map} +0 -0
- /package/dist/{chunk-7CPLKAL6.js.map → chunk-4M5GEKPM.js.map} +0 -0
- /package/dist/{chunk-WEMI4PV7.js.map → chunk-4MQ6XTIJ.js.map} +0 -0
- /package/dist/{chunk-3MQZBBUW.js.map → chunk-5463SZOH.js.map} +0 -0
- /package/dist/{chunk-CAX3NFFE.js.map → chunk-555TUQ7E.js.map} +0 -0
- /package/dist/{chunk-5KGABAQB.js.map → chunk-5752357K.js.map} +0 -0
- /package/dist/{chunk-ZOLUUX4B.js.map → chunk-5J7SA4CZ.js.map} +0 -0
- /package/dist/{chunk-5AQLJ4AL.js.map → chunk-62XVHRTX.js.map} +0 -0
- /package/dist/{chunk-SO5OU2ZV.js.map → chunk-64AOS2WA.js.map} +0 -0
- /package/dist/{chunk-75I42HHE.js.map → chunk-66QQ7YQN.js.map} +0 -0
- /package/dist/{chunk-7KZEQJPQ.js.map → chunk-6J7RGNSF.js.map} +0 -0
- /package/dist/{chunk-GCBWZ3MX.js.map → chunk-6LMYQJZP.js.map} +0 -0
- /package/dist/{chunk-4SQ2WCZA.js.map → chunk-6MOJK2QT.js.map} +0 -0
- /package/dist/{chunk-Q6MZHT2F.js.map → chunk-6RTE4UNO.js.map} +0 -0
- /package/dist/{chunk-NIZUFPV3.js.map → chunk-72GJRV5J.js.map} +0 -0
- /package/dist/{chunk-LYB6YYTG.js.map → chunk-72OG3AGH.js.map} +0 -0
- /package/dist/{chunk-Y46R26TE.js.map → chunk-7AC2UGTU.js.map} +0 -0
- /package/dist/{chunk-NPSARV2I.js.map → chunk-7P5PNRBT.js.map} +0 -0
- /package/dist/{chunk-RPKUZDRY.js.map → chunk-7QXEEZFO.js.map} +0 -0
- /package/dist/{chunk-SUXT6QAY.js.map → chunk-7RG37FVT.js.map} +0 -0
- /package/dist/{chunk-5F7HYYGM.js.map → chunk-7ZROYGUG.js.map} +0 -0
- /package/dist/{chunk-LY5I3ZSV.js.map → chunk-A2YLFKQU.js.map} +0 -0
- /package/dist/{chunk-BEYLI32I.js.map → chunk-A5NXBOWS.js.map} +0 -0
- /package/dist/{chunk-7TKQIZ3K.js.map → chunk-AAREDFH6.js.map} +0 -0
- /package/dist/{chunk-4QGPRORO.js.map → chunk-AEYLFBZT.js.map} +0 -0
- /package/dist/{chunk-VPGDYI63.js.map → chunk-AKBL7S7A.js.map} +0 -0
- /package/dist/{chunk-6DGNMASB.js.map → chunk-ALREWFRX.js.map} +0 -0
- /package/dist/{chunk-NQ6P7O7C.js.map → chunk-ASZGMKB4.js.map} +0 -0
- /package/dist/{chunk-CWCNLITK.js.map → chunk-AXZCCX7O.js.map} +0 -0
- /package/dist/{chunk-FVL6U72V.js.map → chunk-B2JYQBO4.js.map} +0 -0
- /package/dist/{chunk-IU2WSJ4F.js.map → chunk-BARTUKJU.js.map} +0 -0
- /package/dist/{chunk-4JNC5AEF.js.map → chunk-BTGXHQX3.js.map} +0 -0
- /package/dist/{chunk-VMTOLAZ5.js.map → chunk-BWFQEASG.js.map} +0 -0
- /package/dist/{chunk-MKBIIYJM.js.map → chunk-C47LBKEG.js.map} +0 -0
- /package/dist/{chunk-2K2Q7VGV.js.map → chunk-C5JCARNE.js.map} +0 -0
- /package/dist/{chunk-LBEZ7A3F.js.map → chunk-C7CIUDXZ.js.map} +0 -0
- /package/dist/{chunk-YWXCLPCX.js.map → chunk-CO7GH3W7.js.map} +0 -0
- /package/dist/{chunk-ARVLS57B.js.map → chunk-CW6Y32N2.js.map} +0 -0
- /package/dist/{chunk-LZJHHMOF.js.map → chunk-DRJL3JHR.js.map} +0 -0
- /package/dist/{chunk-7IXXASQ6.js.map → chunk-DXFKPY2K.js.map} +0 -0
- /package/dist/{chunk-FR2RJXHS.js.map → chunk-EBCEDBHX.js.map} +0 -0
- /package/dist/{chunk-BRHRK7BK.js.map → chunk-ENRB6PIN.js.map} +0 -0
- /package/dist/{chunk-J5QNJERV.js.map → chunk-F6IMOMA3.js.map} +0 -0
- /package/dist/{chunk-YTDUIU7X.js.map → chunk-F6LZHF4O.js.map} +0 -0
- /package/dist/{chunk-725H45MT.js.map → chunk-FAIQCGSL.js.map} +0 -0
- /package/dist/{chunk-HVGQH54G.js.map → chunk-FTDGFWB5.js.map} +0 -0
- /package/dist/{chunk-P7VAMJFJ.js.map → chunk-GFXS5PJL.js.map} +0 -0
- /package/dist/{chunk-YEKPQAOW.js.map → chunk-GQ2T44BC.js.map} +0 -0
- /package/dist/{chunk-JA3WJPXH.js.map → chunk-GSXYXMCV.js.map} +0 -0
- /package/dist/{chunk-IZ7JTG3Z.js.map → chunk-GTT5UKKO.js.map} +0 -0
- /package/dist/{chunk-WDSJ6SVY.js.map → chunk-GXSHLMT4.js.map} +0 -0
- /package/dist/{chunk-ULK4AGG4.js.map → chunk-HTGK7QCX.js.map} +0 -0
- /package/dist/{chunk-Y3LK6ZQG.js.map → chunk-I2KAN3YB.js.map} +0 -0
- /package/dist/{chunk-M5DBOM7R.js.map → chunk-ICRVLGWD.js.map} +0 -0
- /package/dist/{chunk-BEHM2VLH.js.map → chunk-IQ2U5MVO.js.map} +0 -0
- /package/dist/{chunk-LABIUXDM.js.map → chunk-J7C7FPVO.js.map} +0 -0
- /package/dist/{chunk-CYH5QQUP.js.map → chunk-KHIUYLKY.js.map} +0 -0
- /package/dist/{chunk-PPEHBI5O.js.map → chunk-KXTNTDRD.js.map} +0 -0
- /package/dist/{chunk-IBOFASAZ.js.map → chunk-LC6ND4ET.js.map} +0 -0
- /package/dist/{chunk-BF3SGOWT.js.map → chunk-LG52LMAM.js.map} +0 -0
- /package/dist/{chunk-3Y7LSMGV.js.map → chunk-LH4VKUZC.js.map} +0 -0
- /package/dist/{chunk-CFDWKQZT.js.map → chunk-LODYTVOO.js.map} +0 -0
- /package/dist/{chunk-Y2CCXB7R.js.map → chunk-LUNN5GTB.js.map} +0 -0
- /package/dist/{chunk-ACBHZG3Z.js.map → chunk-M74YHHJE.js.map} +0 -0
- /package/dist/{chunk-BGGVYKVZ.js.map → chunk-MA6SUE7F.js.map} +0 -0
- /package/dist/{chunk-AT6UKTH4.js.map → chunk-MHFXJRLD.js.map} +0 -0
- /package/dist/{chunk-3BDMYTH6.js.map → chunk-MHLYX6QW.js.map} +0 -0
- /package/dist/{chunk-FXECKKPW.js.map → chunk-MO4FFK62.js.map} +0 -0
- /package/dist/{chunk-SAKSIN7E.js.map → chunk-MQVIYTH5.js.map} +0 -0
- /package/dist/{chunk-NKBCUR4V.js.map → chunk-MSC43MCJ.js.map} +0 -0
- /package/dist/{chunk-RHVJ3L4U.js.map → chunk-MWPD2BXO.js.map} +0 -0
- /package/dist/{chunk-TSID4257.js.map → chunk-N34AOGK3.js.map} +0 -0
- /package/dist/{chunk-NZBEE2PR.js.map → chunk-N3LW5ER5.js.map} +0 -0
- /package/dist/{chunk-Q3HYEAVQ.js.map → chunk-N3ZOZWP5.js.map} +0 -0
- /package/dist/{chunk-AO4NDR6W.js.map → chunk-NTO5DALI.js.map} +0 -0
- /package/dist/{chunk-VQSBZPKO.js.map → chunk-NYWAAXDX.js.map} +0 -0
- /package/dist/{chunk-CHGUN7OF.js.map → chunk-O6SAU5JA.js.map} +0 -0
- /package/dist/{chunk-3FDSXSEP.js.map → chunk-OE3SQOZV.js.map} +0 -0
- /package/dist/{chunk-VLH3IMJG.js.map → chunk-OFXCSLGX.js.map} +0 -0
- /package/dist/{chunk-E54XIRY2.js.map → chunk-PIP7XII2.js.map} +0 -0
- /package/dist/{chunk-QWSYHENP.js.map → chunk-PTQRJEPN.js.map} +0 -0
- /package/dist/{chunk-S5VIN3EB.js.map → chunk-Q6PRGXR2.js.map} +0 -0
- /package/dist/{chunk-DQ3O252B.js.map → chunk-QCNUMOTL.js.map} +0 -0
- /package/dist/{chunk-XZE5FIRB.js.map → chunk-QCQWOSSD.js.map} +0 -0
- /package/dist/{chunk-TRYYYWV3.js.map → chunk-QIYX33SH.js.map} +0 -0
- /package/dist/{chunk-RGVNXES5.js.map → chunk-QQHZBJMU.js.map} +0 -0
- /package/dist/{chunk-XZFTRGRW.js.map → chunk-QVO4SIS7.js.map} +0 -0
- /package/dist/{chunk-WJEJ65TF.js.map → chunk-QYX4567K.js.map} +0 -0
- /package/dist/{chunk-7JKDB5J5.js.map → chunk-R53ZOW4B.js.map} +0 -0
- /package/dist/{chunk-HSIUVFXE.js.map → chunk-RA6W37NZ.js.map} +0 -0
- /package/dist/{chunk-HDTFLW42.js.map → chunk-REMODSVN.js.map} +0 -0
- /package/dist/{chunk-P4LR2GLN.js.map → chunk-RIDCGFGM.js.map} +0 -0
- /package/dist/{chunk-RNQ2PGBB.js.map → chunk-RKVS5AA6.js.map} +0 -0
- /package/dist/{chunk-MKNW4FRR.js.map → chunk-RS576GOH.js.map} +0 -0
- /package/dist/{chunk-NIENIKZ5.js.map → chunk-SCAPSX6T.js.map} +0 -0
- /package/dist/{chunk-HG2YLNGJ.js.map → chunk-SFVHZAGE.js.map} +0 -0
- /package/dist/{chunk-5HFB4WFE.js.map → chunk-T743IIER.js.map} +0 -0
- /package/dist/{chunk-C6LW34TV.js.map → chunk-THD3N4BJ.js.map} +0 -0
- /package/dist/{chunk-IDRVQVDL.js.map → chunk-TNDTEI6D.js.map} +0 -0
- /package/dist/{chunk-U2QV4TTZ.js.map → chunk-TR7ZA67L.js.map} +0 -0
- /package/dist/{chunk-EP3DRILI.js.map → chunk-U36BXXQ7.js.map} +0 -0
- /package/dist/{chunk-AJ5LXKLQ.js.map → chunk-U4G3KY6L.js.map} +0 -0
- /package/dist/{chunk-UAFSEZ2E.js.map → chunk-UQUN2NGE.js.map} +0 -0
- /package/dist/{chunk-6A4PTK5Q.js.map → chunk-V4JMZZGH.js.map} +0 -0
- /package/dist/{chunk-72L5C74V.js.map → chunk-VBGC7G4F.js.map} +0 -0
- /package/dist/{chunk-IWJTLCTF.js.map → chunk-VD72JGHA.js.map} +0 -0
- /package/dist/{chunk-TVXUOJAL.js.map → chunk-VJG43WKU.js.map} +0 -0
- /package/dist/{chunk-H7QTDKA6.js.map → chunk-VMN6KG2U.js.map} +0 -0
- /package/dist/{chunk-YRF7WFAQ.js.map → chunk-WA6F4NOO.js.map} +0 -0
- /package/dist/{chunk-HOJL2GKW.js.map → chunk-WC3W36AM.js.map} +0 -0
- /package/dist/{chunk-OQW4OERS.js.map → chunk-WNIL2KTB.js.map} +0 -0
- /package/dist/{chunk-NQYC7V5N.js.map → chunk-WOSUYOAU.js.map} +0 -0
- /package/dist/{chunk-DDNUPFPE.js.map → chunk-WT7VZDTI.js.map} +0 -0
- /package/dist/{chunk-DOWVAC4U.js.map → chunk-XODBYGTH.js.map} +0 -0
- /package/dist/{chunk-HDXUQKJ5.js.map → chunk-XRDH24J7.js.map} +0 -0
- /package/dist/{chunk-DQKMOGYZ.js.map → chunk-XYFBJH6F.js.map} +0 -0
- /package/dist/{chunk-SZSS5KKX.js.map → chunk-XYSE2QZN.js.map} +0 -0
- /package/dist/{chunk-MIUPTZS6.js.map → chunk-Y4KR4LT2.js.map} +0 -0
- /package/dist/{chunk-D7PVIC33.js.map → chunk-Y7YJYUNV.js.map} +0 -0
- /package/dist/{chunk-GHP5JLL3.js.map → chunk-YASSCBWN.js.map} +0 -0
- /package/dist/{chunk-QLJU7UUI.js.map → chunk-YH7G44WL.js.map} +0 -0
- /package/dist/{chunk-FS55MQ4Q.js.map → chunk-YNDTLBOH.js.map} +0 -0
- /package/dist/{chunk-6E4L53DF.js.map → chunk-YZX4DVRS.js.map} +0 -0
- /package/dist/{chunk-NDQJDA7O.js.map → chunk-Z7COWR4K.js.map} +0 -0
- /package/dist/{chunk-NYA26GV2.js.map → chunk-ZCCKIWZU.js.map} +0 -0
- /package/dist/{chunk-J32XJALK.js.map → chunk-ZTPB7PVI.js.map} +0 -0
- /package/dist/{chunk-NKHNUTTY.js.map → chunk-ZXHODKHH.js.map} +0 -0
- /package/dist/{chunk-7LOCLC24.js.map → chunk-ZYKDUKAH.js.map} +0 -0
- /package/dist/native/chunks/{chunk-H22XVP5O.js.map → chunk-TZPNJ4AU.js.map} +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { SequenceItem, SequenceSummary } from './SequenceResolver.types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* THE RUN, as pure data: what was answered or passed over, and what is ahead.
|
|
5
|
+
*
|
|
6
|
+
* The queue is the host's live data, not a snapshot. An answer can resolve
|
|
7
|
+
* other entries with it (one limit saved for every sibling of a product), a
|
|
8
|
+
* refetch can drop the entry just answered, and a realtime push can add one —
|
|
9
|
+
* so the run is NOT an index into the queue. It keeps the visited steps in the
|
|
10
|
+
* order they were visited, and the steps still ahead in the order the queue
|
|
11
|
+
* gave them; `syncRun` reconciles the second list with each new queue.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** How a visited step was left. */
|
|
15
|
+
export type Visit<I extends SequenceItem, R> =
|
|
16
|
+
| { item: I; outcome: 'resolved'; result: R; alsoResolved?: number }
|
|
17
|
+
| { item: I; outcome: 'skipped' };
|
|
18
|
+
|
|
19
|
+
export interface RunState<I extends SequenceItem, R> {
|
|
20
|
+
/** Every step left behind, oldest first. Back pops the last one. */
|
|
21
|
+
visits: Visit<I, R>[];
|
|
22
|
+
/** The steps still ahead; the first is on screen. Empty means the end screen. */
|
|
23
|
+
ahead: I[];
|
|
24
|
+
/**
|
|
25
|
+
* The step whose answer is being written, kept ahead even while the queue
|
|
26
|
+
* lacks it (the host's refetch may drop it before the write returns).
|
|
27
|
+
* Cleared when the run leaves it.
|
|
28
|
+
*/
|
|
29
|
+
pinned?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The steps Back returned to, kept ahead while the queue lacks them (the
|
|
32
|
+
* host's inverse ran, its refetch has not put the entry back yet). A SET:
|
|
33
|
+
* two Backs before one refetch hold both. A key leaves it when the queue
|
|
34
|
+
* confirms the entry or the run leaves the step.
|
|
35
|
+
*/
|
|
36
|
+
held: readonly string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function dedupe<I extends SequenceItem>(items: readonly I[], skip: ReadonlySet<string>): I[] {
|
|
40
|
+
const seen = new Set(skip);
|
|
41
|
+
const out: I[] = [];
|
|
42
|
+
for (const item of items) {
|
|
43
|
+
if (seen.has(item.key)) continue;
|
|
44
|
+
seen.add(item.key);
|
|
45
|
+
out.push(item);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A fresh run over `queue` (a repeated key counts once). */
|
|
51
|
+
export function startRun<I extends SequenceItem, R>(queue: readonly I[]): RunState<I, R> {
|
|
52
|
+
return { visits: [], ahead: dedupe(queue, new Set()), held: [] };
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The run against a new queue.
|
|
57
|
+
*
|
|
58
|
+
* - A step ahead that the queue no longer has is dropped — it was resolved
|
|
59
|
+
* elsewhere (siblings answered together, another device) — unless it is
|
|
60
|
+
* `pinned` or `held`.
|
|
61
|
+
* - A held key the queue has again is released: the host confirmed it.
|
|
62
|
+
* - A queue entry the run has not seen is appended, in queue order.
|
|
63
|
+
* - The entries kept are refreshed from the queue (same key, newer data).
|
|
64
|
+
* - Visited steps are history and never change.
|
|
65
|
+
*/
|
|
66
|
+
export function syncRun<I extends SequenceItem, R>(
|
|
67
|
+
state: RunState<I, R>,
|
|
68
|
+
queue: readonly I[],
|
|
69
|
+
): RunState<I, R> {
|
|
70
|
+
const fresh = new Map(queue.map((item) => [item.key, item] as const));
|
|
71
|
+
const kept = state.ahead.flatMap((item) => {
|
|
72
|
+
const next = fresh.get(item.key);
|
|
73
|
+
if (next) return [next];
|
|
74
|
+
return item.key === state.pinned || state.held.includes(item.key) ? [item] : [];
|
|
75
|
+
});
|
|
76
|
+
const known = new Set([...state.visits.map((visit) => visit.item.key), ...kept.map((item) => item.key)]);
|
|
77
|
+
const held = state.held.filter((key) => !fresh.has(key));
|
|
78
|
+
return { ...state, ahead: [...kept, ...dedupe(queue, known)], held };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** Keep `key` ahead whatever the queue says, until the run moves on (see {@link RunState.pinned}). */
|
|
82
|
+
export function pinRun<I extends SequenceItem, R>(state: RunState<I, R>, key: string): RunState<I, R> {
|
|
83
|
+
return { ...state, pinned: key };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** The step on screen, or `undefined` at the end. */
|
|
87
|
+
export function currentOf<I extends SequenceItem, R>(state: RunState<I, R>): I | undefined {
|
|
88
|
+
return state.ahead[0];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** The pins once the run leaves `key`: neither the write pin nor the held set keeps it. */
|
|
92
|
+
function leaving<I extends SequenceItem, R>(state: RunState<I, R>, key: string): Pick<RunState<I, R>, 'pinned' | 'held'> {
|
|
93
|
+
return {
|
|
94
|
+
pinned: state.pinned === key ? undefined : state.pinned,
|
|
95
|
+
held: state.held.filter((held) => held !== key),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Answer `item` — the step that was on screen when the answer began (a pending
|
|
101
|
+
* write keeps it there, see {@link RunState.pinned}). An item no longer ahead
|
|
102
|
+
* was already answered (a double call): a no-op, as at the end.
|
|
103
|
+
*/
|
|
104
|
+
export function resolveRun<I extends SequenceItem, R>(
|
|
105
|
+
state: RunState<I, R>,
|
|
106
|
+
result: R,
|
|
107
|
+
item: I | undefined = state.ahead[0],
|
|
108
|
+
alsoResolved = 0,
|
|
109
|
+
): RunState<I, R> {
|
|
110
|
+
if (!item || !state.ahead.some((entry) => entry.key === item.key)) return state;
|
|
111
|
+
const visit: Visit<I, R> = alsoResolved > 0 ? { item, outcome: 'resolved', result, alsoResolved } : { item, outcome: 'resolved', result };
|
|
112
|
+
return {
|
|
113
|
+
visits: [...state.visits, visit],
|
|
114
|
+
ahead: state.ahead.filter((entry) => entry.key !== item.key),
|
|
115
|
+
...leaving(state, item.key),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Pass over the step on screen. Given the `key` that was on screen when the
|
|
121
|
+
* skip began, a step that has moved on since (a double call) is left alone. At
|
|
122
|
+
* the end it is a no-op.
|
|
123
|
+
*/
|
|
124
|
+
export function skipRun<I extends SequenceItem, R>(state: RunState<I, R>, key?: string): RunState<I, R> {
|
|
125
|
+
const [item, ...rest] = state.ahead;
|
|
126
|
+
if (!item || (key !== undefined && item.key !== key)) return state;
|
|
127
|
+
return { visits: [...state.visits, { item, outcome: 'skipped' }], ahead: rest, ...leaving(state, item.key) };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** The step Back would return to, or `undefined` on the first one. */
|
|
131
|
+
export function previousOf<I extends SequenceItem, R>(state: RunState<I, R>): Visit<I, R> | undefined {
|
|
132
|
+
return state.visits[state.visits.length - 1];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Return to the previous step: it is on screen again, ahead of the rest, and
|
|
137
|
+
* held until the queue confirms it. Given the `key` Back began from, a step
|
|
138
|
+
* already returned to (a double call) is left alone.
|
|
139
|
+
*/
|
|
140
|
+
export function backRun<I extends SequenceItem, R>(state: RunState<I, R>, key?: string): RunState<I, R> {
|
|
141
|
+
const last = previousOf(state);
|
|
142
|
+
if (!last || (key !== undefined && last.item.key !== key)) return state;
|
|
143
|
+
const ahead = state.ahead.filter((item) => item.key !== last.item.key);
|
|
144
|
+
// The step being left keeps no write pin: `pinned` is for a write in flight
|
|
145
|
+
// on the step ON SCREEN, and a failed one must not hold an entry the
|
|
146
|
+
// host's refetch has since dropped (it was applied server-side).
|
|
147
|
+
const leftKey = state.ahead[0]?.key;
|
|
148
|
+
return {
|
|
149
|
+
...state,
|
|
150
|
+
pinned: state.pinned === leftKey ? undefined : state.pinned,
|
|
151
|
+
visits: state.visits.slice(0, -1),
|
|
152
|
+
ahead: [last.item, ...ahead],
|
|
153
|
+
held: [...state.held.filter((held) => held !== last.item.key), last.item.key],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** Where the run stands. */
|
|
158
|
+
export function summaryOf<I extends SequenceItem, R>(state: RunState<I, R>): SequenceSummary {
|
|
159
|
+
const resolved = state.visits.filter((visit) => visit.outcome === 'resolved').length;
|
|
160
|
+
const alsoResolved = state.visits.reduce(
|
|
161
|
+
(sum, visit) => sum + (visit.outcome === 'resolved' ? Math.max(0, visit.alsoResolved ?? 0) : 0),
|
|
162
|
+
0,
|
|
163
|
+
);
|
|
164
|
+
return {
|
|
165
|
+
alsoResolved,
|
|
166
|
+
resolved,
|
|
167
|
+
skipped: state.visits.length - resolved,
|
|
168
|
+
total: state.visits.length + state.ahead.length,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** 1-based position of the step on screen (`total + 1` never happens: at the end it is `total`). */
|
|
173
|
+
export function positionOf<I extends SequenceItem, R>(state: RunState<I, R>): number {
|
|
174
|
+
return Math.min(state.visits.length + 1, state.visits.length + state.ahead.length);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** How far along, 0..100. An empty run is complete. */
|
|
178
|
+
export function progressOf<I extends SequenceItem, R>(state: RunState<I, R>): number {
|
|
179
|
+
const total = state.visits.length + state.ahead.length;
|
|
180
|
+
return total === 0 ? 100 : Math.round((state.visits.length / total) * 100);
|
|
181
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
backRun,
|
|
5
|
+
currentOf,
|
|
6
|
+
pinRun,
|
|
7
|
+
previousOf,
|
|
8
|
+
resolveRun,
|
|
9
|
+
skipRun,
|
|
10
|
+
startRun,
|
|
11
|
+
syncRun,
|
|
12
|
+
type RunState,
|
|
13
|
+
} from './sequence-model';
|
|
14
|
+
import type { SequenceItem, SequenceResolveOptions } from './SequenceResolver.types';
|
|
15
|
+
|
|
16
|
+
interface RunInputs<I extends SequenceItem, R> {
|
|
17
|
+
/** The resolver is open. Opening it, intro or not, starts a fresh run. */
|
|
18
|
+
open: boolean;
|
|
19
|
+
/** True while the run is on screen: open, and past the intro. */
|
|
20
|
+
active: boolean;
|
|
21
|
+
queue: readonly I[];
|
|
22
|
+
onBack?: (item: I, result: R) => Promise<void> | void;
|
|
23
|
+
/** The message for a rejection that carries none. */
|
|
24
|
+
failed: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface SequenceRun<I extends SequenceItem, R> {
|
|
28
|
+
run: RunState<I, R>;
|
|
29
|
+
busy: boolean;
|
|
30
|
+
error: string | null;
|
|
31
|
+
resolve: (result: R | PromiseLike<R>, options?: SequenceResolveOptions) => void;
|
|
32
|
+
skip: () => void;
|
|
33
|
+
back: () => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface Tracked<I extends SequenceItem, R> {
|
|
37
|
+
run: RunState<I, R>;
|
|
38
|
+
/** The queue `run` was last reconciled with, by reference. */
|
|
39
|
+
queue: readonly I[];
|
|
40
|
+
active: boolean;
|
|
41
|
+
open: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The screen key an error belongs to: the step's key, or the end screen's. */
|
|
45
|
+
const END_SCREEN = '\u0000end';
|
|
46
|
+
const screenOf = (item: SequenceItem | undefined): string => item?.key ?? END_SCREEN;
|
|
47
|
+
|
|
48
|
+
/** A rejection's message, and the screen it was raised on. */
|
|
49
|
+
interface GateError {
|
|
50
|
+
message: string;
|
|
51
|
+
screen: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function isThenable<R>(value: R | PromiseLike<R>): value is PromiseLike<R> {
|
|
55
|
+
return typeof (value as { then?: unknown } | null)?.then === 'function';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function messageOf(reason: unknown, fallback: string): string {
|
|
59
|
+
if (reason instanceof Error && reason.message) return reason.message;
|
|
60
|
+
if (typeof reason === 'string' && reason) return reason;
|
|
61
|
+
return fallback;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** What the pending work is: an answer being written, or Back's inverse. */
|
|
65
|
+
type Work = 'resolve' | 'back';
|
|
66
|
+
|
|
67
|
+
interface AsyncGate {
|
|
68
|
+
/** The pending work, or `null` when idle. */
|
|
69
|
+
busy: Work | null;
|
|
70
|
+
error: GateError | null;
|
|
71
|
+
/** True from the moment work starts — read before React re-renders with `busy`. */
|
|
72
|
+
isPending: () => boolean;
|
|
73
|
+
clearError: () => void;
|
|
74
|
+
/** Run `work`; on success apply `onDone`, on failure keep the screen and show why. */
|
|
75
|
+
settle: <T>(work: PromiseLike<T>, kind: Work, screen: string, onDone: (value: T) => void) => void;
|
|
76
|
+
/** Forget pending work (a restart): whatever settles later touches nothing. */
|
|
77
|
+
reset: () => void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* `busy` while a promise settles, the rejection's message as `error`, and
|
|
82
|
+
* nothing double-fired. Refs, not state, for the guard: a second tap in the
|
|
83
|
+
* same frame reads them before React has re-rendered with `busy`, and a
|
|
84
|
+
* promise settling after a restart must not touch the new run.
|
|
85
|
+
*/
|
|
86
|
+
function useAsyncGate(failed: string): AsyncGate {
|
|
87
|
+
const [busy, setBusy] = useState<Work | null>(null);
|
|
88
|
+
const [error, setError] = useState<GateError | null>(null);
|
|
89
|
+
const pending = useRef(false);
|
|
90
|
+
const generation = useRef(0);
|
|
91
|
+
|
|
92
|
+
const settle = useCallback(
|
|
93
|
+
<T,>(work: PromiseLike<T>, kind: Work, screen: string, onDone: (value: T) => void) => {
|
|
94
|
+
const mine = generation.current;
|
|
95
|
+
pending.current = true;
|
|
96
|
+
setBusy(kind);
|
|
97
|
+
setError(null);
|
|
98
|
+
const finish = (): boolean => {
|
|
99
|
+
if (mine !== generation.current) return false;
|
|
100
|
+
pending.current = false;
|
|
101
|
+
setBusy(null);
|
|
102
|
+
return true;
|
|
103
|
+
};
|
|
104
|
+
work.then(
|
|
105
|
+
(value) => {
|
|
106
|
+
if (finish()) onDone(value);
|
|
107
|
+
},
|
|
108
|
+
(reason: unknown) => {
|
|
109
|
+
if (finish()) setError({ message: messageOf(reason, failed), screen });
|
|
110
|
+
},
|
|
111
|
+
);
|
|
112
|
+
},
|
|
113
|
+
[failed],
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const reset = (): void => {
|
|
117
|
+
generation.current += 1;
|
|
118
|
+
pending.current = false;
|
|
119
|
+
if (busy) setBusy(null);
|
|
120
|
+
if (error) setError(null);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
busy,
|
|
125
|
+
error,
|
|
126
|
+
isPending: () => pending.current,
|
|
127
|
+
clearError: () => setError(null),
|
|
128
|
+
settle,
|
|
129
|
+
reset,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The run, restarted from the queue each time the resolver OPENS (intro or
|
|
135
|
+
* not — a closed-and-reopened resolver never reports the previous run) and
|
|
136
|
+
* each time it becomes ACTIVE (the intro is dropped). While active, each new queue
|
|
137
|
+
* is reconciled into it during render (`syncRun`) rather than in an effect, so
|
|
138
|
+
* no frame ever shows a step the queue has already dropped.
|
|
139
|
+
*/
|
|
140
|
+
function useTrackedRun<I extends SequenceItem, R>(
|
|
141
|
+
inputs: { open: boolean; active: boolean; queue: readonly I[] },
|
|
142
|
+
onRestart: () => void,
|
|
143
|
+
): { run: RunState<I, R>; update: (step: (run: RunState<I, R>) => RunState<I, R>) => void } {
|
|
144
|
+
const { open, active, queue } = inputs;
|
|
145
|
+
const [tracked, setTracked] = useState<Tracked<I, R>>(() => ({ run: startRun(queue), queue, active, open }));
|
|
146
|
+
let current = tracked;
|
|
147
|
+
if (active !== tracked.active || open !== tracked.open || queue !== tracked.queue) {
|
|
148
|
+
const restart = (active && !tracked.active) || (open && !tracked.open);
|
|
149
|
+
current = { run: restart ? startRun(queue) : syncRun(tracked.run, queue), queue, active, open };
|
|
150
|
+
if (restart) onRestart();
|
|
151
|
+
setTracked(current);
|
|
152
|
+
}
|
|
153
|
+
const update = useCallback((step: (run: RunState<I, R>) => RunState<I, R>) => {
|
|
154
|
+
setTracked((prev) => ({ ...prev, run: step(prev.run) }));
|
|
155
|
+
}, []);
|
|
156
|
+
return { run: current.run, update };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** The run's state and its verbs — the index/back/skip/done logic, once (FUT-3671). */
|
|
160
|
+
export function useSequenceRun<I extends SequenceItem, R>(inputs: RunInputs<I, R>): SequenceRun<I, R> {
|
|
161
|
+
const { open, active, queue, onBack, failed } = inputs;
|
|
162
|
+
const gate = useAsyncGate(failed);
|
|
163
|
+
const { run, update } = useTrackedRun<I, R>({ open, active, queue }, gate.reset);
|
|
164
|
+
const { settle, isPending, clearError } = gate;
|
|
165
|
+
|
|
166
|
+
const onScreen = currentOf(run);
|
|
167
|
+
const resolve = (result: R | PromiseLike<R>, options?: SequenceResolveOptions): void => {
|
|
168
|
+
const also = options?.alsoResolved ?? 0;
|
|
169
|
+
if (isPending() || !onScreen) return;
|
|
170
|
+
if (isThenable(result)) {
|
|
171
|
+
// The host's refetch may drop the entry before its write returns: keep
|
|
172
|
+
// it on screen meanwhile, and answer THIS entry when it does.
|
|
173
|
+
update((prev) => pinRun(prev, onScreen.key));
|
|
174
|
+
settle(result, 'resolve', onScreen.key, (value) => update((prev) => resolveRun(prev, value, onScreen, also)));
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
clearError();
|
|
178
|
+
update((prev) => resolveRun(prev, result, onScreen, also));
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
const skip = (): void => {
|
|
182
|
+
if (isPending() || !onScreen) return;
|
|
183
|
+
clearError();
|
|
184
|
+
update((prev) => skipRun(prev, onScreen.key));
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
const back = (): void => {
|
|
188
|
+
const last = previousOf(run);
|
|
189
|
+
if (isPending() || !last) return;
|
|
190
|
+
if (last.outcome === 'resolved' && onBack) {
|
|
191
|
+
// `new Promise` so a handler that throws synchronously lands in the same
|
|
192
|
+
// rejection path as one that rejects.
|
|
193
|
+
const undo = new Promise<void>((done) => done(onBack(last.item, last.result)));
|
|
194
|
+
settle(undo, 'back', screenOf(onScreen), () => update((prev) => backRun(prev, last.item.key)));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
clearError();
|
|
198
|
+
update((prev) => backRun(prev, last.item.key));
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// An error belongs to the screen it was raised on: once a queue change (or
|
|
202
|
+
// anything else) moves the run to another step, it no longer shows.
|
|
203
|
+
const error = gate.error && gate.error.screen === screenOf(onScreen) ? gate.error.message : null;
|
|
204
|
+
return { run, busy: gate.busy !== null, error, resolve, skip, back };
|
|
205
|
+
}
|
|
@@ -10,11 +10,11 @@ The Button component is a versatile and highly customizable interactive element
|
|
|
10
10
|
- **Color Themes**: primary, secondary, success, warning, info, danger, neutral
|
|
11
11
|
- **Size Options**: xs, sm, md, lg, xl
|
|
12
12
|
- **Special Effects**: glow, pulse animations
|
|
13
|
-
- **Loading States**: Built-in loading spinner
|
|
13
|
+
- **Loading States**: Built-in loading spinner over the label, which stays as the button's accessible name
|
|
14
14
|
- **Icon Support**: Leading icons with automatic loading state handling
|
|
15
15
|
- **Renders As Anything**: `component` swaps the element, carrying that
|
|
16
16
|
component's own props through the types (a router link, an `<a>`, a label)
|
|
17
|
-
- **Accessibility**:
|
|
17
|
+
- **Accessibility**: Native `<button>` semantics, keyboard navigation; a loading button keeps its name and sets `aria-busy`
|
|
18
18
|
- **Responsive Design**: Adapts to different screen sizes
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -56,7 +56,7 @@ import { Button } from '@procurement/ui';
|
|
|
56
56
|
| `variant` | `'solid' \| 'outline' \| 'ghost' \| 'text' \| 'glass' \| 'gradient'` | `'solid'` | Visual style variant |
|
|
57
57
|
| `color` | `'primary' \| 'secondary' \| 'success' \| 'warning' \| 'info' \| 'danger' \| 'neutral'` | `'primary'` | Color theme |
|
|
58
58
|
| `size` | `'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Button size |
|
|
59
|
-
| `loading` | `boolean` | `false` | Shows loading spinner
|
|
59
|
+
| `loading` | `boolean` | `false` | Shows loading spinner over the label, sets `aria-busy`, disables button |
|
|
60
60
|
| `disabled` | `boolean` | `false` | Disables button interaction |
|
|
61
61
|
| `icon` | `ReactNode` | - | Icon element to display before text |
|
|
62
62
|
| `glow` | `boolean` | `false` | Adds glow visual effect |
|
|
@@ -274,6 +274,7 @@ The Button component includes comprehensive test IDs for reliable automated test
|
|
|
274
274
|
| Button | `{dataTestId}` or `'button'` | Main button element |
|
|
275
275
|
| Icon | `{dataTestId}-icon` or `'button-icon'` | Icon wrapper when icon prop provided |
|
|
276
276
|
| Loading Spinner | `{dataTestId}-loading` or `'button-loading'` | Circular progress during loading state |
|
|
277
|
+
| Loading Label | `{dataTestId}-busy-label` or `'button-busy-label'` | The label kept, transparent, under the spinner while loading |
|
|
277
278
|
|
|
278
279
|
### Testing Best Practices
|
|
279
280
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ActivityIndicator, Platform, StyleSheet, View } from 'react-native';
|
|
3
|
+
import type { TextStyle } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { BUTTON_SPINNER_SIZE } from './Button.metrics';
|
|
6
|
+
import { renderTextChildren } from '../../../platform/text-children';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The native Button's loading state (FUT-3646): the label and icon stay laid
|
|
10
|
+
* out under the spinner — so the button keeps its width and shape — and the
|
|
11
|
+
* button keeps its name. Split from `Button.native.tsx` to keep that file
|
|
12
|
+
* under the line ceiling.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The spinner over the label while loading, across the whole button; `role`
|
|
17
|
+
* comes from react-native's ActivityIndicator. It used to REPLACE the label, so
|
|
18
|
+
* a loading button had no accessible name (FUT-3646).
|
|
19
|
+
*/
|
|
20
|
+
export function Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {
|
|
21
|
+
return (
|
|
22
|
+
<View style={styles.spinner}>
|
|
23
|
+
<ActivityIndicator
|
|
24
|
+
size={Platform.OS === 'ios' ? 'small' : BUTTON_SPINNER_SIZE}
|
|
25
|
+
color={color}
|
|
26
|
+
testID={testID}
|
|
27
|
+
accessibilityLabel="loading"
|
|
28
|
+
/>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The button's name while loading: its text label, said outright. The label
|
|
35
|
+
* stays laid out (transparent) so the width holds, but a screen reader may skip
|
|
36
|
+
* a view at opacity 0 — VoiceOver does — so the name cannot ride on it alone.
|
|
37
|
+
* A caller's own `aria-label` still wins, being spread after this.
|
|
38
|
+
*/
|
|
39
|
+
export const loadingName = (loading: boolean | undefined, children: React.ReactNode): string | undefined =>
|
|
40
|
+
loading ? textOf(children) : undefined;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The text of a label made only of strings and numbers — `Salvar`, or
|
|
44
|
+
* `Salvar {n}`, which React hands over as an array. Anything else (an element)
|
|
45
|
+
* has no text to say here, so the name is left to the label itself.
|
|
46
|
+
*/
|
|
47
|
+
function textOf(children: React.ReactNode): string | undefined {
|
|
48
|
+
const parts = React.Children.toArray(children);
|
|
49
|
+
const textual = parts.every((part) => typeof part === 'string' || typeof part === 'number');
|
|
50
|
+
return textual && parts.length > 0 ? parts.join('') : undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Laid out but unseen under the spinner while loading, so the width holds. */
|
|
54
|
+
export const hiddenWhile = (loading: boolean | undefined) => (loading ? styles.hidden : null);
|
|
55
|
+
|
|
56
|
+
/** The text label; while loading, kept laid out but unseen under the spinner. */
|
|
57
|
+
export function Label({
|
|
58
|
+
loading,
|
|
59
|
+
label,
|
|
60
|
+
testID,
|
|
61
|
+
children,
|
|
62
|
+
}: {
|
|
63
|
+
loading: boolean | undefined;
|
|
64
|
+
label: TextStyle;
|
|
65
|
+
testID: string;
|
|
66
|
+
children: React.ReactNode;
|
|
67
|
+
}): React.ReactNode {
|
|
68
|
+
const text = renderTextChildren(children, label, 1);
|
|
69
|
+
return loading ? (
|
|
70
|
+
<View style={styles.hidden} testID={testID}>
|
|
71
|
+
{text}
|
|
72
|
+
</View>
|
|
73
|
+
) : (
|
|
74
|
+
text
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = StyleSheet.create({
|
|
79
|
+
// The label and icon under the spinner: laid out, so the width holds, but unseen.
|
|
80
|
+
hidden: {
|
|
81
|
+
opacity: 0,
|
|
82
|
+
},
|
|
83
|
+
spinner: {
|
|
84
|
+
...StyleSheet.absoluteFillObject,
|
|
85
|
+
pointerEvents: 'none',
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
justifyContent: 'center',
|
|
88
|
+
},
|
|
89
|
+
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
ActivityIndicator,
|
|
4
3
|
Animated,
|
|
5
4
|
Easing,
|
|
6
5
|
Platform,
|
|
@@ -20,7 +19,6 @@ import {
|
|
|
20
19
|
BUTTON_ICON_GAP_UNITS,
|
|
21
20
|
BUTTON_LINE_HEIGHT,
|
|
22
21
|
BUTTON_SIZES,
|
|
23
|
-
BUTTON_SPINNER_SIZE,
|
|
24
22
|
BUTTON_WASH_ALPHA,
|
|
25
23
|
GLASS_BACKGROUND_ALPHA,
|
|
26
24
|
GLASS_BACKGROUND_ALPHA_PRESSED,
|
|
@@ -35,7 +33,7 @@ import {
|
|
|
35
33
|
quietInk,
|
|
36
34
|
} from './Button.metrics';
|
|
37
35
|
import type { ButtonProps, ButtonVariant } from './Button.types.native';
|
|
38
|
-
import {
|
|
36
|
+
import { hiddenWhile, Label, loadingName, Spinner } from './Button.native.loading';
|
|
39
37
|
import { childTestId, resolveTestId, withoutTestIdProps } from '../../../platform/test-id';
|
|
40
38
|
import { useUiTheme } from '../../../provider/use-ui-theme.native';
|
|
41
39
|
import { resolveFieldEdge } from '../../../tokens/field-edge.core';
|
|
@@ -238,7 +236,8 @@ interface ButtonLook {
|
|
|
238
236
|
function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
239
237
|
const { variant, color, size, loading, icon, children, glow, pulse, active, disabled, style } = props;
|
|
240
238
|
const palette = buttonPalette(theme, color);
|
|
241
|
-
|
|
239
|
+
// Loading keeps the icon (transparent), so it changes neither the shape nor the gap (FUT-3646).
|
|
240
|
+
const iconOnly = icon != null && children == null;
|
|
242
241
|
const inactive = Boolean(disabled) || loading;
|
|
243
242
|
const paint = inactive ? disabledPaint(theme, variant) : paintFor(theme, variant, color, palette, active);
|
|
244
243
|
// The theme's one field radius, so a button and the input beside it agree.
|
|
@@ -248,7 +247,7 @@ function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
|
248
247
|
// ring turns it visible; on native the glow's shadow needs it visible too,
|
|
249
248
|
// because a view's own shadow is clipped by its own overflow there.
|
|
250
249
|
const overflow: ViewStyle['overflow'] = pulse || glow ? 'visible' : 'hidden';
|
|
251
|
-
const sized = sizeStyle(theme, size, iconOnly, icon != null
|
|
250
|
+
const sized = sizeStyle(theme, size, iconOnly, icon != null);
|
|
252
251
|
const glowing = glow && !inactive ? glowStyle(palette) : null;
|
|
253
252
|
|
|
254
253
|
return {
|
|
@@ -275,18 +274,6 @@ function buttonLook(theme: UiTheme, props: ResolvedProps): ButtonLook {
|
|
|
275
274
|
};
|
|
276
275
|
}
|
|
277
276
|
|
|
278
|
-
/** The spinner that replaces the label while loading; `role` comes from react-native's ActivityIndicator. */
|
|
279
|
-
function Spinner({ color, testID }: { color: string; testID: string }): React.JSX.Element {
|
|
280
|
-
return (
|
|
281
|
-
<ActivityIndicator
|
|
282
|
-
size={Platform.OS === 'ios' ? 'small' : BUTTON_SPINNER_SIZE}
|
|
283
|
-
color={color}
|
|
284
|
-
testID={testID}
|
|
285
|
-
accessibilityLabel="loading"
|
|
286
|
-
/>
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
277
|
export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
291
278
|
const resolved = resolveButtonProps(rawProps);
|
|
292
279
|
const { loading, icon, iconPosition, pulse, ripple, children, onClick, onPress, ...others } = resolved;
|
|
@@ -306,12 +293,11 @@ export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
|
306
293
|
onPress?.(event);
|
|
307
294
|
};
|
|
308
295
|
|
|
309
|
-
const iconNode =
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
) : null;
|
|
296
|
+
const iconNode = icon ? (
|
|
297
|
+
<View style={[styles.icon, hiddenWhile(loading)]} testID={idFor('icon')}>
|
|
298
|
+
{icon}
|
|
299
|
+
</View>
|
|
300
|
+
) : null;
|
|
315
301
|
|
|
316
302
|
return (
|
|
317
303
|
<Pressable
|
|
@@ -319,6 +305,7 @@ export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
|
319
305
|
role="button"
|
|
320
306
|
aria-disabled={look.inactive}
|
|
321
307
|
aria-busy={loading}
|
|
308
|
+
aria-label={loadingName(loading, children)}
|
|
322
309
|
disabled={look.inactive}
|
|
323
310
|
onPress={handlePress}
|
|
324
311
|
android_ripple={ripple && !look.inactive ? { color: alpha(look.palette.main, 0.2), borderless: false } : undefined}
|
|
@@ -328,8 +315,11 @@ export const Button = React.forwardRef<View, ButtonProps>((rawProps, ref) => {
|
|
|
328
315
|
>
|
|
329
316
|
{pulse && !look.inactive ? <Pulse color={look.palette.main} radius={look.radius} testID={idFor('pulse')} /> : null}
|
|
330
317
|
{iconPosition === 'left' ? iconNode : null}
|
|
331
|
-
{loading
|
|
318
|
+
<Label loading={loading} label={look.label} testID={idFor('busy-label')}>
|
|
319
|
+
{children}
|
|
320
|
+
</Label>
|
|
332
321
|
{iconPosition === 'right' ? iconNode : null}
|
|
322
|
+
{loading ? <Spinner color={look.label.color as string} testID={idFor('loading')} /> : null}
|
|
333
323
|
</Pressable>
|
|
334
324
|
);
|
|
335
325
|
});
|