@servicetitan/anvil2 3.13.6 → 3.14.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/CHANGELOG.md +27 -0
- package/dist/{AiMark-D8dx3b1Q.js → AiMark-CWufA6pV.js} +7 -62
- package/dist/{AiMark-D8dx3b1Q.js.map → AiMark-CWufA6pV.js.map} +1 -1
- package/dist/AiMark.js +1 -1
- package/dist/{Alert-N-Es76Om.js → Alert-RkvFtmRP.js} +2 -2
- package/dist/{Alert-N-Es76Om.js.map → Alert-RkvFtmRP.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{AnvilProvider-DcYAaAvs.js → AnvilProvider-DagOuc9c.js} +13 -7
- package/dist/AnvilProvider-DagOuc9c.js.map +1 -0
- package/dist/AnvilProvider.js +1 -1
- package/dist/{Avatar-D31JDNrs.js → Avatar-DZxHhMTP.js} +2 -4
- package/dist/Avatar-DZxHhMTP.js.map +1 -0
- package/dist/{Avatar-DXI-w1Vi.js → Avatar-DkWoRhJu.js} +2 -2
- package/dist/{Avatar-DXI-w1Vi.js.map → Avatar-DkWoRhJu.js.map} +1 -1
- package/dist/Avatar.js +2 -2
- package/dist/{Breadcrumbs-Di0HJmcH.js → Breadcrumbs-DbOrdao2.js} +2 -2
- package/dist/{Breadcrumbs-Di0HJmcH.js.map → Breadcrumbs-DbOrdao2.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button-Dwh_Nd4l.js.map +1 -1
- package/dist/{Calendar-DnK6UwPE.js → Calendar-CK-AAaSG.js} +33 -41
- package/dist/Calendar-CK-AAaSG.js.map +1 -0
- package/dist/{Calendar-C1mgmbWt.js → Calendar-DLnn6dJE.js} +2 -2
- package/dist/{Calendar-C1mgmbWt.js.map → Calendar-DLnn6dJE.js.map} +1 -1
- package/dist/Calendar.css +50 -48
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-CknwM231.js → Checkbox-CboZhOtU.js} +3 -3
- package/dist/{Checkbox-CknwM231.js.map → Checkbox-CboZhOtU.js.map} +1 -1
- package/dist/{Checkbox-FvMXGsgi.js → Checkbox-Cn4iNLW_.js} +2 -2
- package/dist/{Checkbox-FvMXGsgi.js.map → Checkbox-Cn4iNLW_.js.map} +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/{Chip-AILbiVZ6.js → Chip-UbrxYEqs.js} +4 -6
- package/dist/Chip-UbrxYEqs.js.map +1 -0
- package/dist/Chip.js +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-BE1YvSto.js → DataTable-COExZbOC.js} +11 -25
- package/dist/DataTable-COExZbOC.js.map +1 -0
- package/dist/{DateFieldRange-VK82YRwV.js → DateFieldRange-CpTxlASD.js} +5 -5
- package/dist/{DateFieldRange-VK82YRwV.js.map → DateFieldRange-CpTxlASD.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-BikPSISX.js → DateFieldSingle-DR2kfrzh.js} +5 -5
- package/dist/{DateFieldSingle-BikPSISX.js.map → DateFieldSingle-DR2kfrzh.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-DQIEBYKe.js → DateFieldYearless-4mS_2Mgw.js} +5 -5
- package/dist/{DateFieldYearless-DQIEBYKe.js.map → DateFieldYearless-4mS_2Mgw.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-BpQqvD9U.js → DateFieldYearlessRange-C-yvKBkJ.js} +4 -4
- package/dist/{DateFieldYearlessRange-BpQqvD9U.js.map → DateFieldYearlessRange-C-yvKBkJ.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-Re26vN8g.js → DaysOfTheWeek-Bo4w8SsT.js} +2 -2
- package/dist/{DaysOfTheWeek-Re26vN8g.js.map → DaysOfTheWeek-Bo4w8SsT.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-BMPFoRQh.js → Dialog-Ds25dKQp.js} +4 -4
- package/dist/{Dialog-BMPFoRQh.js.map → Dialog-Ds25dKQp.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-BCw_ZHSD.js → Drawer-Da-bj_6o.js} +4 -4
- package/dist/{Drawer-BCw_ZHSD.js.map → Drawer-Da-bj_6o.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{EditCard-CTEk64eN.js → EditCard-CocV93gS.js} +2 -2
- package/dist/{EditCard-CTEk64eN.js.map → EditCard-CocV93gS.js.map} +1 -1
- package/dist/EditCard.js +1 -1
- package/dist/{FieldLabel-CYCk2rz-.js → FieldLabel-6aFKQfyD.js} +2 -2
- package/dist/FieldLabel-6aFKQfyD.js.map +1 -0
- package/dist/FieldLabel.js +1 -1
- package/dist/{FilterBar-XMZ-Q-aW.js → FilterBar-CZT1ryz_.js} +6 -7
- package/dist/FilterBar-CZT1ryz_.js.map +1 -0
- package/dist/FilterBar.js +1 -1
- package/dist/Helper-BHpOgh7k.js.map +1 -1
- package/dist/Icon-B5zwN7GD.js.map +1 -1
- package/dist/{InputMask-Bm7ZYtQy.js → InputMask-CNV0Ucli.js} +3 -3
- package/dist/{InputMask-Bm7ZYtQy.js.map → InputMask-CNV0Ucli.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-Bkv1ZCSu.js → ListView-DFAWrwzi.js} +2 -2
- package/dist/ListView-DFAWrwzi.js.map +1 -0
- package/dist/ListView.js +1 -1
- package/dist/{Listbox-BWy_uBqm.js → Listbox-BErqErNN.js} +2 -2
- package/dist/Listbox-BErqErNN.js.map +1 -0
- package/dist/Listbox.js +1 -1
- package/dist/LocalizationContext-UsmB5mnR.js.map +1 -1
- package/dist/LocalizationProvider-BPcOU7YX.js.map +1 -1
- package/dist/{MenuFooter--lBF8OjJ.js → MenuFooter-fGSZYh8e.js} +2 -2
- package/dist/MenuFooter-fGSZYh8e.js.map +1 -0
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-C57Hms2z.js → MultiSelectFieldSync-CqWUidCm.js} +8 -8
- package/dist/MultiSelectFieldSync-CqWUidCm.js.map +1 -0
- package/dist/MultiSelectMenu.js +1 -1
- package/dist/{MultiSelectMenuSync-DxU1AtCL.js → MultiSelectMenuSync-DG3rKyQc.js} +6 -6
- package/dist/{MultiSelectMenuSync-DxU1AtCL.js.map → MultiSelectMenuSync-DG3rKyQc.js.map} +1 -1
- package/dist/{NumberField-BOLMhpdk.js → NumberField-DRYYJHec.js} +3 -3
- package/dist/{NumberField-BOLMhpdk.js.map → NumberField-DRYYJHec.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-CBmCe-YR.js → Page-BmpojvuI.js} +8 -8
- package/dist/{Page-CBmCe-YR.js.map → Page-BmpojvuI.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-Hjalx9ZX.js → Pagination-Bc4fhdNm.js} +3 -3
- package/dist/{Pagination-Hjalx9ZX.js.map → Pagination-Bc4fhdNm.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{Popover-BQ-R2hs0.js → Popover-BgVOsP4J.js} +2 -2
- package/dist/{Popover-BQ-R2hs0.js.map → Popover-BgVOsP4J.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/PortalProvider-Cj_y3gbC.js.map +1 -1
- package/dist/{ProgressBar-BUmYFa81.js → ProgressBar-Chb0uKfL.js} +2 -2
- package/dist/{ProgressBar-BUmYFa81.js.map → ProgressBar-Chb0uKfL.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-BgbBIhPS.js → Radio-DcNlFfSu.js} +3 -3
- package/dist/{Radio-BgbBIhPS.js.map → Radio-DcNlFfSu.js.map} +1 -1
- package/dist/{Radio-C2pWQ84U.js → Radio-gpMEsFss.js} +2 -2
- package/dist/{Radio-C2pWQ84U.js.map → Radio-gpMEsFss.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{RichTextEditor-Chzl-zeW.js → RichTextEditor-DeO4p-S-.js} +8 -8
- package/dist/{RichTextEditor-Chzl-zeW.js.map → RichTextEditor-DeO4p-S-.js.map} +1 -1
- package/dist/RichTextEditor.js +1 -1
- package/dist/{SavedFiltersButton-DFy_R8yv.js → SavedFiltersButton-Cvf1mJk8.js} +10 -10
- package/dist/{SavedFiltersButton-DFy_R8yv.js.map → SavedFiltersButton-Cvf1mJk8.js.map} +1 -1
- package/dist/SavedFiltersButton.js +1 -1
- package/dist/{SelectCard-BGTB3ay0.js → SelectCard-bp5hRyHK.js} +3 -3
- package/dist/{SelectCard-BGTB3ay0.js.map → SelectCard-bp5hRyHK.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldLabel-CcX2GAym.js → SelectFieldLabel-DZqxaZsp.js} +2 -2
- package/dist/SelectFieldLabel-DZqxaZsp.js.map +1 -0
- package/dist/{SelectFieldSync-CLpTOgdr.js → SelectFieldSync-Wkx6DGpg.js} +7 -7
- package/dist/{SelectFieldSync-CLpTOgdr.js.map → SelectFieldSync-Wkx6DGpg.js.map} +1 -1
- package/dist/SelectMenu.js +1 -1
- package/dist/{SelectMenuSync-DqUIPJtu.js → SelectMenuSync-O55TODxn.js} +6 -6
- package/dist/{SelectMenuSync-DqUIPJtu.js.map → SelectMenuSync-O55TODxn.js.map} +1 -1
- package/dist/{SelectOptions-BkqBzRiG.js → SelectOptions-0A8BYx1q.js} +2 -2
- package/dist/SelectOptions-0A8BYx1q.js.map +1 -0
- package/dist/{SelectTrigger-DdIvzkNw.js → SelectTrigger-BfJ7DWYq.js} +3 -3
- package/dist/{SelectTrigger-DdIvzkNw.js.map → SelectTrigger-BfJ7DWYq.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-f2z0XQDf.js → SelectTriggerBase-DvsI-kSG.js} +3 -3
- package/dist/{SelectTriggerBase-f2z0XQDf.js.map → SelectTriggerBase-DvsI-kSG.js.map} +1 -1
- package/dist/StatusIcon-BqorkNJf.js.map +1 -1
- package/dist/{Switch-DWaFomvP.js → Switch-CrDmBj4D.js} +2 -2
- package/dist/{Switch-DWaFomvP.js.map → Switch-CrDmBj4D.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{Text-D2TIPmZ2.js → Text-CZccJAnm.js} +2 -2
- package/dist/{Text-D2TIPmZ2.js.map → Text-CZccJAnm.js.map} +1 -1
- package/dist/Text.js +1 -1
- package/dist/{TextField-wIc7ic0E.js → TextField-D0f9LwgQ.js} +3 -3
- package/dist/{TextField-wIc7ic0E.js.map → TextField-D0f9LwgQ.js.map} +1 -1
- package/dist/{TextField-DJaBZ4Je.js → TextField-DX5qyWPo.js} +2 -2
- package/dist/{TextField-DJaBZ4Je.js.map → TextField-DX5qyWPo.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-D4c6VjNs.js → Textarea-CdTcekFd.js} +3 -3
- package/dist/{Textarea-D4c6VjNs.js.map → Textarea-CdTcekFd.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/ThemeProvider-DW-Mflv6.js.map +1 -1
- package/dist/ThemeProviderContext-l52GohYT.js.map +1 -1
- package/dist/{TimeField-DpnX_t31.js → TimeField-BxNglWQt.js} +4 -4
- package/dist/TimeField-BxNglWQt.js.map +1 -0
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-Cl9BSxHs.js → Toaster-C-Z_FMbW.js} +3 -3
- package/dist/{Toaster-Cl9BSxHs.js.map → Toaster-C-Z_FMbW.js.map} +1 -1
- package/dist/{Toaster-11pmgwx5.js → Toaster-nyQgF9Ki.js} +2 -2
- package/dist/{Toaster-11pmgwx5.js.map → Toaster-nyQgF9Ki.js.map} +1 -1
- package/dist/{Toolbar-C9_Z1wAt.js → Toolbar-BUbMtBVz.js} +4 -4
- package/dist/{Toolbar-C9_Z1wAt.js.map → Toolbar-BUbMtBVz.js.map} +1 -1
- package/dist/{Toolbar-Dq9KOJoH.js → Toolbar-BxAFPvbn.js} +5 -5
- package/dist/{Toolbar-Dq9KOJoH.js.map → Toolbar-BxAFPvbn.js.map} +1 -1
- package/dist/Toolbar.js +2 -2
- package/dist/{ToolbarButtonToggle-BGnYIt6-.js → ToolbarButtonToggle-NSJ2XfXT.js} +2 -2
- package/dist/{ToolbarButtonToggle-BGnYIt6-.js.map → ToolbarButtonToggle-NSJ2XfXT.js.map} +1 -1
- package/dist/TrackingProvider-Co4lyoI9.js.map +1 -1
- package/dist/TrackingProviderContext-CrVA7KHv.js.map +1 -1
- package/dist/TreeSelectField.js +1 -1
- package/dist/{TreeSelectFieldSync-nD0qctC8.js → TreeSelectFieldSync-DpvwlM7B.js} +6 -6
- package/dist/{TreeSelectFieldSync-nD0qctC8.js.map → TreeSelectFieldSync-DpvwlM7B.js.map} +1 -1
- package/dist/TreeSelectMenu.js +1 -1
- package/dist/{TreeSelectMenuSync-B8pwy4dA.js → TreeSelectMenuSync-BDitYX_k.js} +5 -5
- package/dist/{TreeSelectMenuSync-B8pwy4dA.js.map → TreeSelectMenuSync-BDitYX_k.js.map} +1 -1
- package/dist/{TypeaheadTextField-2kW-oCMo.js → TypeaheadTextField-Cj09sEji.js} +3 -3
- package/dist/{TypeaheadTextField-2kW-oCMo.js.map → TypeaheadTextField-Cj09sEji.js.map} +1 -1
- package/dist/TypeaheadTextField.js +1 -1
- package/dist/{YearlessDateInputWithPicker-CuHWd_Vp.js → YearlessDateInputWithPicker-CoomgSEK.js} +8 -6
- package/dist/YearlessDateInputWithPicker-CoomgSEK.js.map +1 -0
- package/dist/anvParts-DFVq7-Cm.js +25 -0
- package/dist/anvParts-DFVq7-Cm.js.map +1 -0
- package/dist/arrayIdsEqual-DnevhwqN.js.map +1 -1
- package/dist/assets/icons/st/gnav_automations_active.svg +1 -0
- package/dist/assets/icons/st/gnav_automations_inactive.svg +1 -0
- package/dist/assets/icons/st/gnav_command_center_active.svg +1 -0
- package/dist/assets/icons/st/gnav_command_center_inactive.svg +1 -0
- package/dist/assets/icons/st.ts +4 -0
- package/dist/beta.js +17 -17
- package/dist/{bulkActionTypes-cnslVUIT.js → bulkActionTypes-DAo3_ECS.js} +2 -2
- package/dist/bulkActionTypes-DAo3_ECS.js.map +1 -0
- package/dist/childrenToString-Bz9MqbHb.js.map +1 -1
- package/dist/confirmationTypes-DeRtO_Cw.js.map +1 -1
- package/dist/{downshift.esm-xtSnQp44.js → downshift.esm-U4VMqrF-.js} +3 -1
- package/dist/downshift.esm-U4VMqrF-.js.map +1 -0
- package/dist/{filter-state-B7lCzjsR.js → filter-state-CZcczj37.js} +21 -21
- package/dist/{filter-state-B7lCzjsR.js.map → filter-state-CZcczj37.js.map} +1 -1
- package/dist/floating-ui.react-dom-BIKT960u.js.map +1 -1
- package/dist/getActiveElement-BcSyVE7S.js.map +1 -1
- package/dist/getKeyboardFocusableElements-B_U9rt6y.js.map +1 -1
- package/dist/{index-BHztJ8H6.js → index-BFxzUzoz.js} +2 -2
- package/dist/{index-BHztJ8H6.js.map → index-BFxzUzoz.js.map} +1 -1
- package/dist/index.js +44 -45
- package/dist/index.js.map +1 -1
- package/dist/portalScopeClassNames-DA28LrXe.js.map +1 -1
- package/dist/src/components/DateFieldYearless/internal/YearlessDateSelectionPopover.d.ts +2 -2
- package/dist/src/hooks/useAccessibleColor/useAccessibleColor.d.ts +3 -28
- package/dist/src/hooks/useBreakpoint/useBreakpoint.d.ts +15 -60
- package/dist/src/hooks/useMergeRefs/useMergeRefs.d.ts +3 -20
- package/dist/src/hooks/usePrefersColorScheme/usePrefersColorScheme.d.ts +2 -11
- package/dist/src/hooks/usePrefersReducedMotion/usePrefersReducedMotion.d.ts +2 -10
- package/dist/src/hooks/useSize/index.d.ts +2 -13
- package/dist/src/hooks/useSwipe/useSwipe.d.ts +3 -20
- package/dist/src/hooks/useTrackingId/index.d.ts +6 -17
- package/dist/src/internal/components/AddNewItemButton.d.ts +4 -30
- package/dist/src/internal/components/Helper/Helper.d.ts +12 -8
- package/dist/src/internal/components/InView.d.ts +4 -24
- package/dist/src/internal/components/InlineMarkdown/InlineMarkdown.d.ts +2 -19
- package/dist/src/internal/components/Label/Label.d.ts +12 -51
- package/dist/src/internal/components/ManualTestLayout/ManualTestLayout.d.ts +3 -2
- package/dist/src/internal/components/MenuFooter/MenuFooter.d.ts +11 -17
- package/dist/src/internal/components/MultiSelectOptions.d.ts +15 -0
- package/dist/src/internal/components/OptionCheckbox.d.ts +2 -0
- package/dist/src/internal/components/OptionContentArea.d.ts +4 -0
- package/dist/src/internal/components/OptionRow.d.ts +4 -0
- package/dist/src/internal/components/OptionsDialog/OptionsDialog.d.ts +13 -1
- package/dist/src/internal/components/OptionsPanel.d.ts +16 -0
- package/dist/src/internal/components/OptionsPopover/OptionsPopover.d.ts +9 -14
- package/dist/src/internal/components/Popover/Popover.d.ts +45 -180
- package/dist/src/internal/components/Popover/PopoverButton.d.ts +0 -20
- package/dist/src/internal/components/Popover/PopoverClose.d.ts +0 -20
- package/dist/src/internal/components/Popover/PopoverContent.d.ts +4 -25
- package/dist/src/internal/components/Popover/PopoverTrigger.d.ts +1 -23
- package/dist/src/internal/components/Popover/internal/PopoverContext.d.ts +0 -21
- package/dist/src/internal/components/Popover/internal/usePopoverContext.d.ts +1 -3
- package/dist/src/internal/components/SelectOption.d.ts +8 -0
- package/dist/src/internal/components/SelectOptions.d.ts +15 -0
- package/dist/src/internal/components/Shadow/Shadow.d.ts +1 -0
- package/dist/src/internal/components/StatusIcon/StatusIcon.d.ts +4 -33
- package/dist/src/internal/components/Surface/Surface.d.ts +40 -73
- package/dist/src/internal/components/Surface/surfaceGeometry.d.ts +12 -0
- package/dist/src/internal/components/VirtualizedOptionsPanel.d.ts +1 -0
- package/dist/src/internal/components/YearSelector/YearSelector.d.ts +14 -48
- package/dist/src/internal/components/YearSelector/internal/YearItem.d.ts +1 -0
- package/dist/src/internal/components/YearSelector/internal/useYearSelectorKeys.d.ts +4 -0
- package/dist/src/internal/constants/anvParts.d.ts +3 -55
- package/dist/src/internal/flubber/a2c.d.ts +0 -4
- package/dist/src/internal/flubber/arc.d.ts +0 -4
- package/dist/src/internal/flubber/bezier.d.ts +0 -4
- package/dist/src/internal/flubber/errors.d.ts +0 -4
- package/dist/src/internal/flubber/index.d.ts +0 -4
- package/dist/src/internal/flubber/interpolate.d.ts +3 -0
- package/dist/src/internal/flubber/linear.d.ts +0 -4
- package/dist/src/internal/flubber/parse.d.ts +0 -4
- package/dist/src/internal/flubber/path-properties.d.ts +0 -4
- package/dist/src/internal/functions/areOptionsValueEqual.d.ts +2 -5
- package/dist/src/internal/functions/buildSelectItems.d.ts +2 -4
- package/dist/src/internal/functions/childrenToString.d.ts +3 -21
- package/dist/src/internal/functions/getActiveElement.d.ts +4 -0
- package/dist/src/internal/functions/getInitial.d.ts +3 -13
- package/dist/src/internal/functions/getKeyboardFocusableElements.d.ts +6 -30
- package/dist/src/internal/functions/inlineMarkdown.d.ts +3 -16
- package/dist/src/internal/functions/isThenable.d.ts +1 -1
- package/dist/src/internal/functions/kebabize.d.ts +3 -13
- package/dist/src/internal/functions/mapOrder.d.ts +4 -0
- package/dist/src/internal/functions/popoverTargetDomProps.d.ts +1 -1
- package/dist/src/internal/functions/portalScopeClassNames.d.ts +6 -13
- package/dist/src/internal/functions/safePopover.d.ts +2 -0
- package/dist/src/internal/functions/sizeToToken.d.ts +1 -0
- package/dist/src/internal/functions/stripInlineMarkdown.d.ts +3 -5
- package/dist/src/internal/functions/syncFilterUtils.d.ts +4 -2
- package/dist/src/internal/functions/warnOnce.d.ts +1 -2
- package/dist/src/internal/hooks/useBulkActionRunner.d.ts +4 -27
- package/dist/src/internal/hooks/useCommitSelectionIfChanged.d.ts +7 -14
- package/dist/src/internal/hooks/useConfirmationDraft.d.ts +4 -4
- package/dist/src/internal/hooks/useContainerQuery/useContainerQuery.d.ts +2 -33
- package/dist/src/internal/hooks/useDebouncedCallback/useDebouncedCallback.d.ts +3 -25
- package/dist/src/internal/hooks/useDialogScrollLock/useDialogScrollLock.d.ts +6 -31
- package/dist/src/internal/hooks/useDialogTransitionStates/useDialogTransitionStates.d.ts +2 -27
- package/dist/src/internal/hooks/useDownshiftEnvironment/useDownshiftEnvironment.d.ts +8 -24
- package/dist/src/internal/hooks/useFocusWithin/useFocusWithin.d.ts +3 -14
- package/dist/src/internal/hooks/useGroupedOptions.d.ts +4 -22
- package/dist/src/internal/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +4 -47
- package/dist/src/internal/hooks/useInvalidateOnOptionsChange.d.ts +2 -7
- package/dist/src/internal/hooks/useIsScrollable/useIsScrollable.d.ts +1 -5
- package/dist/src/internal/hooks/useKeyboardFocusables/useKeyboardFocusables.d.ts +1 -38
- package/dist/src/internal/hooks/useLayoutPropsUtil/useLayoutPropsUtil.d.ts +2 -38
- package/dist/src/internal/hooks/useNumberField/internal/createNumberMaskOptions.d.ts +2 -5
- package/dist/src/internal/hooks/useNumberField/internal/createTrailingZerosHandlers.d.ts +1 -2
- package/dist/src/internal/hooks/useNumberField/internal/numberMaskUtils.d.ts +0 -6
- package/dist/src/internal/hooks/useNumberField/internal/useNumberFieldInputMode.d.ts +2 -17
- package/dist/src/internal/hooks/useNumberField/internal/useNumberFieldKeys.d.ts +4 -30
- package/dist/src/internal/hooks/useNumberField/useNumberField.d.ts +19 -65
- package/dist/src/internal/hooks/useOnClickOutside/useOnClickOutside.d.ts +5 -33
- package/dist/src/internal/hooks/useOpenCloseTransitionStates/useOpenCloseTransitionStates.d.ts +4 -28
- package/dist/src/internal/hooks/useOptionallyControlledState/useOptionallyControlledState.d.ts +2 -46
- package/dist/src/internal/hooks/useOptionsSections.d.ts +4 -9
- package/dist/src/internal/hooks/usePinnedOptions.d.ts +4 -24
- package/dist/src/internal/hooks/usePlatform/usePlatform.d.ts +3 -50
- package/dist/src/internal/hooks/usePopoverCloseDelayWorkaround/usePopoverCloseDelayWorkaround.d.ts +4 -0
- package/dist/src/internal/hooks/usePopoverTransitionStates/usePopoverTransitionStates.d.ts +1 -21
- package/dist/src/internal/hooks/usePrevious/usePrevious.d.ts +1 -0
- package/dist/src/internal/hooks/useProcessedOptions.d.ts +2 -3
- package/dist/src/internal/hooks/useSelectFieldLoading/useSelectFieldLoading.d.ts +18 -61
- package/dist/src/internal/hooks/useSelectOrchestration.d.ts +4 -3
- package/dist/src/internal/hooks/useToggleSelection.d.ts +3 -3
- package/dist/src/internal/hooks/useTypeAhead/useTypeAhead.d.ts +3 -11
- package/dist/src/internal/testing/anvPartsContract.d.ts +9 -9
- package/dist/src/internal/testing/prefersColorScheme.d.ts +7 -0
- package/dist/src/internal/testing/reactHostProps.d.ts +2 -2
- package/dist/src/internal/types/addNewItemTypes.d.ts +14 -16
- package/dist/src/internal/types/argTypes.d.ts +2 -0
- package/dist/src/internal/types/bulkActionTypes.d.ts +12 -41
- package/dist/src/internal/types/confirmationTypes.d.ts +6 -7
- package/dist/src/internal/types/optionContent.d.ts +6 -9
- package/dist/src/internal/types/props.d.ts +6 -1
- package/dist/src/internal/types/selectFieldInternalTypes.d.ts +10 -12
- package/dist/src/internal/utils/arrayIdsEqual.d.ts +1 -5
- package/dist/src/internal/utils/generateChromaticStickersheetProps.d.ts +4 -8
- package/dist/src/internal/utils/inlineMarkdownRegex.d.ts +0 -4
- package/dist/src/internal/utils/layerManager.d.ts +5 -28
- package/dist/src/internal/utils/uniquifySvgDomIds.d.ts +0 -2
- package/dist/src/providers/AnvilProvider/AnvilProvider.d.ts +4 -0
- package/dist/src/providers/AnvilProvider/AnvilProviderContext.d.ts +16 -6
- package/dist/src/providers/LocalizationProvider/LocalizationContext.d.ts +7 -0
- package/dist/src/providers/LocalizationProvider/LocalizationProvider.d.ts +6 -0
- package/dist/src/providers/LocalizationProvider/LocalizationStoryWrapper.d.ts +1 -0
- package/dist/src/providers/LocalizationProvider/useTranslations.d.ts +6 -0
- package/dist/src/providers/PortalProvider/PortalProvider.d.ts +1 -0
- package/dist/src/providers/PortalProvider/PortalProviderContext.d.ts +3 -0
- package/dist/src/providers/ThemeProvider/ThemeProvider.d.ts +16 -0
- package/dist/src/providers/ThemeProvider/index.d.ts +1 -1
- package/dist/src/providers/ThemeProvider/internal/ThemeProviderContext.d.ts +2 -0
- package/dist/src/providers/ThemeProvider/themeToCssVars.d.ts +3 -4
- package/dist/src/providers/ThemeProvider/useTheme.d.ts +5 -0
- package/dist/src/providers/TrackingProvider/TrackingProvider.d.ts +1 -0
- package/dist/src/providers/TrackingProvider/TrackingProviderContext.d.ts +7 -0
- package/dist/src/providers/TrackingProvider/useTrackingContext.d.ts +5 -0
- package/dist/src/themes/carto.d.ts +3 -43
- package/dist/src/types/DataTrackingId.d.ts +1 -0
- package/dist/src/types/DistributiveOmit.d.ts +1 -14
- package/dist/src/types/MaxLengthCounterProps.d.ts +4 -0
- package/dist/src/types/PassThroughProps.d.ts +3 -0
- package/dist/src/types/ai-marks.d.ts +14 -45
- package/dist/src/types/ianaZones.d.ts +2 -0
- package/dist/src/types/locales.d.ts +1 -0
- package/dist/src/types/props.d.ts +14 -16
- package/dist/{stripInlineMarkdown-82hVO9EP.js → stripInlineMarkdown-CosQSmBr.js} +2 -2
- package/dist/stripInlineMarkdown-CosQSmBr.js.map +1 -0
- package/dist/{syncFilterUtils-CMH8ApTo.js → syncFilterUtils-_uwyt6FD.js} +20 -19
- package/dist/syncFilterUtils-_uwyt6FD.js.map +1 -0
- package/dist/themes.js.map +1 -1
- package/dist/token/core/component-variables.scss +156 -0
- package/dist/token/core/component.d.ts +78 -0
- package/dist/token/core/component.js +1018 -0
- package/dist/token/core/component.scss +82 -0
- package/dist/token.js +1096 -0
- package/dist/token.js.map +1 -1
- package/dist/{treeSync-8byHuYib.js → treeSync-Bp80Xduj.js} +4 -4
- package/dist/{treeSync-8byHuYib.js.map → treeSync-Bp80Xduj.js.map} +1 -1
- package/dist/useAccessibleColor-BYKjkGRg.js.map +1 -1
- package/dist/useBreakpoint-BBNRlMGZ.js.map +1 -1
- package/dist/useDebouncedCallback-DLkapjcP.js.map +1 -1
- package/dist/useDialogScrollLock-BW-aVboo.js.map +1 -1
- package/dist/{useDrilldown-CicFEJpD.js → useDrilldown-D5XGfAUT.js} +3 -3
- package/dist/{useDrilldown-CicFEJpD.js.map → useDrilldown-D5XGfAUT.js.map} +1 -1
- package/dist/useFocusWithin-hi77jsrB.js.map +1 -1
- package/dist/{useInfiniteCombobox-BS7W8JkW.js → useInfiniteCombobox-ORhH44Rp.js} +7 -7
- package/dist/{useInfiniteCombobox-BS7W8JkW.js.map → useInfiniteCombobox-ORhH44Rp.js.map} +1 -1
- package/dist/{useInitialFocus-BIvXK1Rp.js → useInitialFocus-CGybEc6x.js} +2 -6
- package/dist/useInitialFocus-CGybEc6x.js.map +1 -0
- package/dist/useIntersectionObserver-BEmMDO3P.js.map +1 -1
- package/dist/{useInvalidateOnOptionsChange-BKKS9HXb.js → useInvalidateOnOptionsChange-ieSgbkwT.js} +5 -5
- package/dist/useInvalidateOnOptionsChange-ieSgbkwT.js.map +1 -0
- package/dist/useLayoutPropsUtil-DjqeAJZ9.js.map +1 -1
- package/dist/useMergeRefs-Dfmtq9cI.js.map +1 -1
- package/dist/useNumberField-CXFYUZ_n.js.map +1 -1
- package/dist/useOnClickOutside-Zw5vzxSq.js.map +1 -1
- package/dist/useOptionallyControlledState-DbDuos5L.js.map +1 -1
- package/dist/{usePopoverTransitionStates-B1opfxxn.js → usePopoverTransitionStates-CDXCdyKa.js} +2 -1
- package/dist/usePopoverTransitionStates-CDXCdyKa.js.map +1 -0
- package/dist/usePrefersColorScheme-CwOF0TjZ.js.map +1 -1
- package/dist/usePrefersReducedMotion-DR9B_D6w.js.map +1 -1
- package/dist/usePrevious-Bvq-5auG.js.map +1 -1
- package/dist/useSize.js.map +1 -1
- package/dist/useSwipe-Cp-CJxLU.js.map +1 -1
- package/dist/useTheme-B4i6a3bM.js.map +1 -1
- package/dist/useTrackingContext-C522P4sv.js.map +1 -1
- package/dist/useTrackingId.js.map +1 -1
- package/dist/warnOnce-Y9PRHcU4.js.map +1 -1
- package/package.json +3 -3
- package/dist/AnvilProvider-DcYAaAvs.js.map +0 -1
- package/dist/Avatar-D31JDNrs.js.map +0 -1
- package/dist/Calendar-DnK6UwPE.js.map +0 -1
- package/dist/Chip-AILbiVZ6.js.map +0 -1
- package/dist/DataTable-BE1YvSto.js.map +0 -1
- package/dist/FieldLabel-CYCk2rz-.js.map +0 -1
- package/dist/FilterBar-XMZ-Q-aW.js.map +0 -1
- package/dist/ListView-Bkv1ZCSu.js.map +0 -1
- package/dist/Listbox-BWy_uBqm.js.map +0 -1
- package/dist/MenuFooter--lBF8OjJ.js.map +0 -1
- package/dist/MultiSelectFieldSync-C57Hms2z.js.map +0 -1
- package/dist/SelectFieldLabel-CcX2GAym.js.map +0 -1
- package/dist/SelectOptions-BkqBzRiG.js.map +0 -1
- package/dist/TimeField-DpnX_t31.js.map +0 -1
- package/dist/YearlessDateInputWithPicker-CuHWd_Vp.js.map +0 -1
- package/dist/anvParts-BGg5dgfl.js +0 -43
- package/dist/anvParts-BGg5dgfl.js.map +0 -1
- package/dist/bulkActionTypes-cnslVUIT.js.map +0 -1
- package/dist/downshift.esm-xtSnQp44.js.map +0 -1
- package/dist/stripInlineMarkdown-82hVO9EP.js.map +0 -1
- package/dist/syncFilterUtils-CMH8ApTo.js.map +0 -1
- package/dist/useInitialFocus-BIvXK1Rp.js.map +0 -1
- package/dist/useInvalidateOnOptionsChange-BKKS9HXb.js.map +0 -1
- package/dist/usePopoverTransitionStates-B1opfxxn.js.map +0 -1
|
@@ -1,44 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Options for the useIntersectionObserver hook
|
|
3
|
-
* @property {Element | Document | null} [root] - The root element for intersection calculations
|
|
4
|
-
* @property {string} [rootMargin] - Margin around the root element
|
|
5
|
-
* @property {number | number[]} [threshold] - Threshold values for intersection detection
|
|
6
|
-
* @property {boolean} [freezeOnceVisible] - Whether to freeze once the element becomes visible
|
|
7
|
-
* @property {(isIntersecting: boolean, entry: IntersectionObserverEntry) => void} [onChange] - Callback when intersection changes
|
|
8
|
-
* @property {boolean} [initialIsIntersecting] - Initial intersection state
|
|
9
|
-
*/
|
|
10
1
|
export type UseIntersectionObserverOptions = {
|
|
11
|
-
/**
|
|
12
|
-
* The root element for intersection calculations
|
|
13
|
-
*/
|
|
14
2
|
root?: Element | Document | null;
|
|
15
|
-
/**
|
|
16
|
-
* Margin around the root element
|
|
17
|
-
*/
|
|
18
3
|
rootMargin?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Threshold values for intersection detection
|
|
21
|
-
*/
|
|
22
4
|
threshold?: number | number[];
|
|
23
|
-
/**
|
|
24
|
-
* Whether to freeze once the element becomes visible
|
|
25
|
-
*/
|
|
5
|
+
/** Stops observing after the first intersecting entry. */
|
|
26
6
|
freezeOnceVisible?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Callback when intersection changes
|
|
29
|
-
*/
|
|
30
7
|
onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
|
|
31
|
-
/**
|
|
32
|
-
* Initial intersection state
|
|
33
|
-
*/
|
|
8
|
+
/** Value reported before the first observer entry. Defaults to `false`. */
|
|
34
9
|
initialIsIntersecting?: boolean;
|
|
35
10
|
};
|
|
36
|
-
/**
|
|
37
|
-
* Return type for the useIntersectionObserver hook
|
|
38
|
-
* @property {(node?: Element | null) => void} ref - Function to set the element to observe
|
|
39
|
-
* @property {boolean} isIntersecting - Whether the element is intersecting
|
|
40
|
-
* @property {IntersectionObserverEntry} [entry] - The intersection observer entry
|
|
41
|
-
*/
|
|
11
|
+
/** The observer result, available through tuple or named-property access. */
|
|
42
12
|
export type IntersectionReturn = [
|
|
43
13
|
(node?: Element | null) => void,
|
|
44
14
|
boolean,
|
|
@@ -49,19 +19,6 @@ export type IntersectionReturn = [
|
|
|
49
19
|
entry?: IntersectionObserverEntry;
|
|
50
20
|
};
|
|
51
21
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* Features:
|
|
55
|
-
* - Observes element intersection with viewport or custom root element
|
|
56
|
-
* - Supports configurable threshold values and root margins
|
|
57
|
-
* - Provides intersection state and detailed entry information
|
|
58
|
-
* - Supports freezing observation once element becomes visible
|
|
59
|
-
* - Handles browser compatibility gracefully
|
|
60
|
-
* - Provides both array and object destructuring support
|
|
61
|
-
* - Automatically cleans up observer on unmount
|
|
62
|
-
* - Supports onChange callback for custom intersection handling
|
|
63
|
-
*
|
|
64
|
-
* @param options - Configuration options for the intersection observer
|
|
65
|
-
* @returns Array containing ref function, intersection state, and entry, with additional object properties
|
|
22
|
+
* Reports intersection state for the element assigned through its returned ref.
|
|
66
23
|
*/
|
|
67
24
|
export declare function useIntersectionObserver({ threshold, root, rootMargin, freezeOnceVisible, initialIsIntersecting, onChange, }?: UseIntersectionObserverOptions): IntersectionReturn;
|
|
@@ -2,13 +2,8 @@ type InvalidatableHandle = {
|
|
|
2
2
|
invalidate: () => void;
|
|
3
3
|
};
|
|
4
4
|
/**
|
|
5
|
-
* Invalidates a select
|
|
6
|
-
*
|
|
7
|
-
* A new array (or tree) identity with the same data does not invalidate, so
|
|
8
|
-
* consumers can pass inline option literals without triggering a reload.
|
|
9
|
-
*
|
|
10
|
-
* @param handleRef Ref to an imperative handle that exposes `invalidate`
|
|
11
|
-
* @param options The current options value (flat list or tree)
|
|
5
|
+
* Invalidates a select handle only when option contents change, ignoring the
|
|
6
|
+
* initial mount and reference-only changes.
|
|
12
7
|
*/
|
|
13
8
|
export declare function useInvalidateOnOptionsChange(handleRef: {
|
|
14
9
|
current: InvalidatableHandle | null;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Custom hook to detect if an element is horizontally scrollable
|
|
3
|
-
* @param element The HTML element to check for horizontal scrollability
|
|
4
|
-
* @returns boolean indicating if the element is horizontally scrollable
|
|
5
|
-
*/
|
|
1
|
+
/** Reports horizontal overflow and updates after element resizes. */
|
|
6
2
|
export declare const useIsScrollable: (element: HTMLElement | null) => boolean;
|
|
@@ -1,52 +1,15 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { FocusableElement } from 'tabbable';
|
|
3
|
-
/**
|
|
4
|
-
* Options for the useKeyboardFocusables hook
|
|
5
|
-
*/
|
|
6
3
|
type OptionProps = {
|
|
7
|
-
/**
|
|
8
|
-
* Disable mutation observer
|
|
9
|
-
*/
|
|
10
4
|
observeChange: false;
|
|
11
5
|
} | {
|
|
12
|
-
/**
|
|
13
|
-
* Enable mutation observer with optional configuration
|
|
14
|
-
*/
|
|
15
6
|
observeChange: true;
|
|
16
|
-
/**
|
|
17
|
-
* Observe attribute changes
|
|
18
|
-
*/
|
|
19
7
|
attributes?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Observe text content changes
|
|
22
|
-
*/
|
|
23
8
|
characterData?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Observe child element changes
|
|
26
|
-
*/
|
|
27
9
|
childList?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Observe descendant changes
|
|
30
|
-
*/
|
|
31
10
|
subtree?: boolean;
|
|
32
11
|
};
|
|
33
|
-
/**
|
|
34
|
-
* Custom hook for tracking keyboard focusable elements within a container.
|
|
35
|
-
*
|
|
36
|
-
* Features:
|
|
37
|
-
* - Tracks all keyboard focusable elements within a target container
|
|
38
|
-
* - Supports both ref objects and direct element references
|
|
39
|
-
* - Optional mutation observer for real-time updates
|
|
40
|
-
* - Debounced updates to prevent excessive re-renders
|
|
41
|
-
* - Configurable mutation observer options
|
|
42
|
-
* - Manual update function for immediate refresh
|
|
43
|
-
* - Uses tabbable library for accurate focusable detection
|
|
44
|
-
* - Automatically cleans up mutation observer
|
|
45
|
-
*
|
|
46
|
-
* @param element - Target element or ref to monitor for focusable elements
|
|
47
|
-
* @param options - Configuration options for mutation observer behavior
|
|
48
|
-
* @returns Object containing current focusable elements and update function
|
|
49
|
-
*/
|
|
12
|
+
/** Tracks tabbable descendants within a container as its DOM changes. */
|
|
50
13
|
export declare const useKeyboardFocusables: (element: RefObject<HTMLElement> | HTMLElement | undefined, options?: OptionProps) => {
|
|
51
14
|
focusables: FocusableElement[] | null;
|
|
52
15
|
};
|
|
@@ -1,53 +1,17 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { LayoutUtilProps } from '../../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Responsive layout configuration type
|
|
5
|
-
*/
|
|
6
3
|
type ResponsiveLayout = {
|
|
7
|
-
/**
|
|
8
|
-
* Base layout properties
|
|
9
|
-
*/
|
|
10
4
|
base?: LayoutUtilProps;
|
|
11
|
-
/**
|
|
12
|
-
* Extra small breakpoint layout properties
|
|
13
|
-
*/
|
|
14
5
|
xs?: LayoutUtilProps;
|
|
15
|
-
/**
|
|
16
|
-
* Small breakpoint layout properties
|
|
17
|
-
*/
|
|
18
6
|
sm?: LayoutUtilProps;
|
|
19
|
-
/**
|
|
20
|
-
* Medium breakpoint layout properties
|
|
21
|
-
*/
|
|
22
7
|
md?: LayoutUtilProps;
|
|
23
|
-
/**
|
|
24
|
-
* Large breakpoint layout properties
|
|
25
|
-
*/
|
|
26
8
|
lg?: LayoutUtilProps;
|
|
27
|
-
/**
|
|
28
|
-
* Extra large breakpoint layout properties
|
|
29
|
-
*/
|
|
30
9
|
xl?: LayoutUtilProps;
|
|
31
|
-
/**
|
|
32
|
-
* Extra extra large breakpoint layout properties
|
|
33
|
-
*/
|
|
34
10
|
xxl?: LayoutUtilProps;
|
|
35
11
|
};
|
|
36
12
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* Features:
|
|
40
|
-
* - Separates layout properties from component properties
|
|
41
|
-
* - Provides responsive breakpoint support for all layout properties
|
|
42
|
-
* - Automatically converts gap sizes to CSS tokens
|
|
43
|
-
* - Uses breakpoint cascade for responsive values
|
|
44
|
-
* - Optimized with useMemo for performance
|
|
45
|
-
* - Supports all CSS Grid and Flexbox properties
|
|
46
|
-
* - Handles responsive size inheritance (larger breakpoints inherit from smaller ones)
|
|
47
|
-
* - Returns both layout styles and filtered component props
|
|
48
|
-
*
|
|
49
|
-
* @param props - Object containing layout and component properties
|
|
50
|
-
* @returns Object containing layout styles and filtered component props
|
|
13
|
+
* Resolves responsive layout utilities into styles and removes them from the
|
|
14
|
+
* remaining component props.
|
|
51
15
|
*/
|
|
52
16
|
export declare function useLayoutPropsUtil<T extends ResponsiveLayout>(props: T): {
|
|
53
17
|
layoutStyles?: CSSProperties;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { MaskitoOptions } from '@maskito/core';
|
|
2
2
|
import { MaskitoNumberParams } from '@maskito/kit';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* When `minimumFractionDigits` is 0, Maskito rejects trailing decimals ("123.")
|
|
7
|
-
* and strips trailing zeros ("123.0" → "123."). This extends the base options
|
|
8
|
-
* with processors to allow natural decimal input during typing.
|
|
4
|
+
* Extends Maskito's number options with in-progress decimal processors when
|
|
5
|
+
* `minimumFractionDigits` is 0.
|
|
9
6
|
*/
|
|
10
7
|
export declare function createNumberMaskOptions(params: MaskitoNumberParams): MaskitoOptions;
|
|
@@ -10,7 +10,6 @@ export interface TrailingZerosHandlers {
|
|
|
10
10
|
*
|
|
11
11
|
* When `minimumFractionDigits` is 0, Maskito's multi-pass validation strips
|
|
12
12
|
* trailing zeros (e.g., "123.0" → "123."). This factory returns coordinated
|
|
13
|
-
* processors that
|
|
14
|
-
* support multiple NumberField instances.
|
|
13
|
+
* processors that preserve the user's intermediate text until blur.
|
|
15
14
|
*/
|
|
16
15
|
export declare function createTrailingZerosHandlers(params: Pick<MaskitoNumberParams, "minimumFractionDigits" | "maximumFractionDigits">): TrailingZerosHandlers;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility predicates for number mask processing.
|
|
3
|
-
*/
|
|
4
|
-
/** Returns true if the string contains one or more zeros and nothing else. */
|
|
5
1
|
export declare const isAllZeros: (str: string) => boolean;
|
|
6
|
-
/** Returns true if the string is empty or contains only zeros. */
|
|
7
2
|
export declare const isEmptyOrAllZeros: (str: string) => boolean;
|
|
8
|
-
/** Returns true if the string is a single non-zero digit (1-9). */
|
|
9
3
|
export declare const isNonZeroDigit: (str: string) => boolean;
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
export type InputMode = "decimal" | "numeric" | "text";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* The inputMode attribute tells the device what type of software keyboard to show.
|
|
6
|
-
* There are inconsistencies in what each software keyboard includes across different platforms:
|
|
7
|
-
* - iPhone lacks a minus sign in both numeric and decimal keyboards
|
|
8
|
-
* - Android numeric keyboard has both decimal point and minus sign
|
|
9
|
-
* - iPad has different keyboard behavior than iPhone
|
|
10
|
-
*
|
|
11
|
-
* @param hasDecimals - Whether the number field allows decimal values
|
|
12
|
-
* @param hasNegative - Whether the number field allows negative values
|
|
13
|
-
* @returns The optimal inputMode attribute to use on the number field
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* const inputMode = useNumberFieldInputMode({
|
|
17
|
-
* hasDecimals: true,
|
|
18
|
-
* hasNegative: false
|
|
19
|
-
* });
|
|
3
|
+
* Selects a software-keyboard hint that keeps the required decimal and minus
|
|
4
|
+
* keys available on iPhone and Android.
|
|
20
5
|
*/
|
|
21
6
|
export declare const useNumberFieldInputMode: ({ hasDecimals, hasNegative, }: {
|
|
22
7
|
hasDecimals: boolean;
|
|
@@ -1,43 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration for the useNumberFieldKeys hook
|
|
3
|
-
*/
|
|
4
1
|
export type UseNumberFieldKeysConfig = {
|
|
5
|
-
/** Function to increment the value by a specified amount */
|
|
6
2
|
increment: (amount: number) => void;
|
|
7
|
-
/** Function to decrement the value by a specified amount */
|
|
8
3
|
decrement: (amount: number) => void;
|
|
9
|
-
/** Function to set the value to the minimum allowed value */
|
|
10
4
|
setToMin: () => void;
|
|
11
|
-
/** Function to set the value to the maximum allowed value */
|
|
12
5
|
setToMax: () => void;
|
|
13
|
-
/** The step value for increment/decrement operations */
|
|
14
6
|
step: number;
|
|
15
|
-
/**
|
|
7
|
+
/** Applied to `step` for Page Up and Page Down. */
|
|
16
8
|
largeStepMultiplier: number;
|
|
17
|
-
/**
|
|
9
|
+
/** Ignores all handled keys when `true`. */
|
|
18
10
|
readOnly?: boolean;
|
|
19
11
|
};
|
|
20
12
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* This hook provides keyboard navigation support for number input fields:
|
|
24
|
-
* - Arrow Up/Down: Increment/decrement by step value
|
|
25
|
-
* - Page Up/Down: Increment/decrement by step * largeStepMultiplier
|
|
26
|
-
* - Home: Set to minimum value
|
|
27
|
-
* - End: Set to maximum value
|
|
28
|
-
*
|
|
29
|
-
* @param config - Configuration object containing increment/decrement functions and step values
|
|
30
|
-
* @returns Object containing the input ref to attach to the input element
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* const { inputRef } = useNumberFieldKeys({
|
|
34
|
-
* increment: (amount) => setValue(prev => prev + amount),
|
|
35
|
-
* decrement: (amount) => setValue(prev => prev - amount),
|
|
36
|
-
* setToMin: () => setValue(minValue),
|
|
37
|
-
* setToMax: () => setValue(maxValue),
|
|
38
|
-
* step: 1,
|
|
39
|
-
* largeStepMultiplier: 10
|
|
40
|
-
* });
|
|
13
|
+
* Attaches spinbutton keyboard controls: arrows step, Page Up/Down take a large
|
|
14
|
+
* step, and Home/End move to the bounds.
|
|
41
15
|
*/
|
|
42
16
|
declare function useNumberFieldKeys(config: UseNumberFieldKeysConfig): {
|
|
43
17
|
inputRef: import('react').RefObject<HTMLInputElement>;
|
|
@@ -1,94 +1,48 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configuration options for the useNumberField hook
|
|
3
|
-
*/
|
|
4
1
|
export type UseNumberFieldConfig = {
|
|
5
|
-
/**
|
|
6
|
-
* The label for the number field.
|
|
7
|
-
* Important for accessibility and button labeling.
|
|
8
|
-
*/
|
|
2
|
+
/** Included in the increment and decrement buttons' accessible names. */
|
|
9
3
|
label?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The minimum value for the number field.
|
|
12
|
-
* @default 0
|
|
13
|
-
*/
|
|
4
|
+
/** Lower bound for stepping with the buttons or keyboard. Defaults to `0`. */
|
|
14
5
|
minValue?: number;
|
|
15
6
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
7
|
+
* Upper bound for stepping with the buttons or keyboard.
|
|
8
|
+
* Defaults to `100000000000000`.
|
|
18
9
|
*/
|
|
19
10
|
maxValue?: number;
|
|
20
|
-
/**
|
|
21
|
-
* The step value for the number field.
|
|
22
|
-
* @default 1
|
|
23
|
-
*/
|
|
11
|
+
/** Magnitude used for button and arrow-key changes. Zero falls back to `1`. */
|
|
24
12
|
step?: number;
|
|
25
|
-
/**
|
|
26
|
-
* The controlled value for the number field.
|
|
27
|
-
*/
|
|
13
|
+
/** Numeric value to format when controlling the field. */
|
|
28
14
|
value?: number | null;
|
|
29
|
-
/**
|
|
30
|
-
* The default (uncontrolled) value for the number field.
|
|
31
|
-
*/
|
|
15
|
+
/** Initial numeric value when the field is uncontrolled. */
|
|
32
16
|
defaultValue?: number | null;
|
|
33
17
|
/**
|
|
34
|
-
*
|
|
35
|
-
* @default 0
|
|
18
|
+
* Limits and rounds decimal input. Raised to `minimumFractionDigits` when lower.
|
|
36
19
|
*/
|
|
37
20
|
maximumFractionDigits?: number;
|
|
38
|
-
/**
|
|
39
|
-
* The minimum number of decimal places for the number field.
|
|
40
|
-
* @default 0
|
|
41
|
-
*/
|
|
21
|
+
/** Pads the displayed value with trailing zeros. Defaults to `0`. */
|
|
42
22
|
minimumFractionDigits?: number;
|
|
43
|
-
/**
|
|
44
|
-
* A callback that is called when the value changes.
|
|
45
|
-
* @param value The new numeric value or null if invalid/empty
|
|
46
|
-
*/
|
|
23
|
+
/** Receives `null` for empty or unparseable input; a lone minus does not notify. */
|
|
47
24
|
onChange?: (value: number | null) => void;
|
|
48
25
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
26
|
+
* Ignores step, Page Up/Down, Home, and End keys without disabling text entry
|
|
27
|
+
* or buttons.
|
|
51
28
|
*/
|
|
52
29
|
readOnly?: boolean;
|
|
53
30
|
};
|
|
54
|
-
/**
|
|
55
|
-
* Return value from the useNumberField hook
|
|
56
|
-
*/
|
|
57
31
|
export type UseNumberFieldReturnValue = {
|
|
58
|
-
/**
|
|
32
|
+
/** Parsed number, or `null` while empty, a lone minus, or unparseable. */
|
|
59
33
|
value: number | null;
|
|
60
|
-
/**
|
|
34
|
+
/** Attach to the input to enable masking and keyboard controls. */
|
|
61
35
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
62
|
-
/**
|
|
36
|
+
/** Masked spinbutton props for the input. */
|
|
63
37
|
inputProps: Pick<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "inputMode" | "aria-valuenow" | "aria-valuemin" | "aria-valuemax" | "min" | "max" | "step" | "role" | "pattern" | "type" | "autoComplete">;
|
|
64
|
-
/**
|
|
38
|
+
/** Props for a non-tabbable increment button. */
|
|
65
39
|
incrementButtonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
66
|
-
/**
|
|
40
|
+
/** Props for a non-tabbable decrement button. */
|
|
67
41
|
decrementButtonProps: React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
68
42
|
};
|
|
69
43
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* This hook handles:
|
|
73
|
-
* - Precise decimal arithmetic using Big.js
|
|
74
|
-
* - Number formatting with thousand separators and decimal precision
|
|
75
|
-
* - Input validation and value clamping
|
|
76
|
-
* - Keyboard navigation (arrows, PageUp/Down, Home/End)
|
|
77
|
-
* - Platform-specific input modes for mobile devices
|
|
78
|
-
* - Accessibility attributes and button states
|
|
79
|
-
* - Controlled and uncontrolled value management
|
|
80
|
-
*
|
|
81
|
-
* @param config - Configuration options for the number field
|
|
82
|
-
* @returns Object containing the current value, input ref, and props for input and buttons
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* const { value, inputRef, inputProps, incrementButtonProps, decrementButtonProps } = useNumberField({
|
|
86
|
-
* label: "Quantity",
|
|
87
|
-
* minValue: 0,
|
|
88
|
-
* maxValue: 100,
|
|
89
|
-
* step: 1,
|
|
90
|
-
* onChange: (value) => console.log(value)
|
|
91
|
-
* });
|
|
44
|
+
* Builds masked spinbutton and stepper-control props while preserving incomplete
|
|
45
|
+
* negative and decimal input that cannot round-trip through a numeric value.
|
|
92
46
|
*/
|
|
93
47
|
export declare const useNumberField: (config: UseNumberFieldConfig) => {
|
|
94
48
|
value: number | null;
|
|
@@ -1,44 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for the useOnClickOutside hook
|
|
3
|
-
*/
|
|
4
1
|
type UseOnClickOutsideProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Callback fired when a click begins outside target elements (on pointerdown)
|
|
7
|
-
*/
|
|
2
|
+
/** Pointerdown outside `targets`. */
|
|
8
3
|
onClickOutsideBegin?: (e: PointerEvent) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Callback fired when a click completes outside target elements (on pointerup),
|
|
11
|
-
* but only if the click also began outside the targets
|
|
12
|
-
*/
|
|
4
|
+
/** Pointerup outside `targets`, only if that press also started outside. */
|
|
13
5
|
onClickOutside?: (e: PointerEvent) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Array of target elements to monitor
|
|
16
|
-
*/
|
|
17
6
|
targets: (HTMLElement | undefined)[];
|
|
18
|
-
/**
|
|
19
|
-
* Whether to disable the useOnClickOutside hook
|
|
20
|
-
*/
|
|
21
7
|
disable?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Optional layer ID for stacking management. When provided, callbacks will only
|
|
24
|
-
* fire if this layer is the topmost layer in the stack.
|
|
25
|
-
*/
|
|
8
|
+
/** When set, callbacks fire only if this layer is top of the overlay stack. */
|
|
26
9
|
layerId?: string;
|
|
27
10
|
};
|
|
28
11
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* Features:
|
|
32
|
-
* - Detects clicks outside of multiple target elements
|
|
33
|
-
* - Supports both pointerdown and pointerup event handling (works for mouse and touch)
|
|
34
|
-
* - Provides separate callbacks for click begin and complete actions
|
|
35
|
-
* - Handles SSR environments gracefully
|
|
36
|
-
* - Automatically cleans up event listeners
|
|
37
|
-
* - Uses composedPath for accurate event target detection
|
|
38
|
-
* - Supports optional callbacks for flexible usage
|
|
39
|
-
*
|
|
40
|
-
* @param props - Configuration object containing targets and optional callbacks
|
|
41
|
-
* @returns void
|
|
12
|
+
* Listens on `document`. Outside-ness uses `composedPath`, so shadow-tree
|
|
13
|
+
* clicks still count as inside a target.
|
|
42
14
|
*/
|
|
43
15
|
export declare const useOnClickOutside: ({ onClickOutsideBegin, targets, onClickOutside, disable, layerId, }: UseOnClickOutsideProps) => void;
|
|
44
16
|
export {};
|
package/dist/src/internal/hooks/useOpenCloseTransitionStates/useOpenCloseTransitionStates.d.ts
CHANGED
|
@@ -1,31 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Possible states for open/close transitions
|
|
3
|
-
*/
|
|
1
|
+
/** Lifecycle phases for an animated visibility change. */
|
|
4
2
|
export type OpenCloseTransitionStates = "opening" | "open" | "closing" | "closed";
|
|
5
|
-
/**
|
|
6
|
-
* Effects configuration for open/close transition states
|
|
7
|
-
* @property {() => void} [onOpenAnimationStart] - Callback when opening animation starts
|
|
8
|
-
* @property {() => void} [onCloseAnimationStart] - Callback when closing animation starts
|
|
9
|
-
* @property {() => void} [onOpenAnimationComplete] - Callback when opening animation completes
|
|
10
|
-
* @property {() => void} [onCloseAnimationComplete] - Callback when closing animation completes
|
|
11
|
-
* @property {number | (() => number)} [durationMs] - Duration of the animation in milliseconds (or a function that returns the duration)
|
|
12
|
-
*/
|
|
3
|
+
/** Optional side effects for each transition boundary. */
|
|
13
4
|
export type OpenCloseTransitionStateEffects = {
|
|
14
|
-
/**
|
|
15
|
-
* Callback when opening animation starts
|
|
16
|
-
*/
|
|
17
5
|
onOpenAnimationStart?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Callback when closing animation starts
|
|
20
|
-
*/
|
|
21
6
|
onCloseAnimationStart?: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* Callback when opening animation completes
|
|
24
|
-
*/
|
|
25
7
|
onOpenAnimationComplete?: () => void;
|
|
26
|
-
/**
|
|
27
|
-
* Callback when closing animation completes
|
|
28
|
-
*/
|
|
29
8
|
onCloseAnimationComplete?: () => void;
|
|
30
9
|
};
|
|
31
10
|
export type OpenCloseTransitionState = {
|
|
@@ -42,10 +21,7 @@ export type OpenCloseTransitionStateOptions = {
|
|
|
42
21
|
onCloseAnimationComplete?: () => void;
|
|
43
22
|
};
|
|
44
23
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @param openProp - The open prop controlling visibility
|
|
48
|
-
* @param options - Additional, optional options including callbacks for animation start, complete, and initialization
|
|
49
|
-
* @returns Object containing state, control functions, and utility flags
|
|
24
|
+
* Tracks opening and closing phases, completing each transition after a
|
|
25
|
+
* nonzero configured duration.
|
|
50
26
|
*/
|
|
51
27
|
export declare const useOpenCloseTransitionStates: (openProp: boolean | undefined, options?: OpenCloseTransitionStateOptions) => OpenCloseTransitionState;
|
package/dist/src/internal/hooks/useOptionallyControlledState/useOptionallyControlledState.d.ts
CHANGED
|
@@ -1,56 +1,12 @@
|
|
|
1
1
|
import { SetStateAction, Dispatch } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Props for the useOptionallyControlledState hook
|
|
4
|
-
*/
|
|
5
2
|
type UseOptionallyControlledStateProps<T> = {
|
|
6
|
-
/**
|
|
7
|
-
* The controlled value of the state.
|
|
8
|
-
* When provided, the component becomes controlled.
|
|
9
|
-
*/
|
|
10
3
|
controlledValue?: T;
|
|
11
|
-
/**
|
|
12
|
-
* The default value of the state.
|
|
13
|
-
* Used when the component is uncontrolled.
|
|
14
|
-
*/
|
|
15
4
|
defaultValue?: T;
|
|
16
|
-
/**
|
|
17
|
-
* A function that is called when the value changes.
|
|
18
|
-
* @param value The new value
|
|
19
|
-
*/
|
|
20
5
|
onChange?: (value: T) => void;
|
|
21
6
|
};
|
|
22
7
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* Features:
|
|
26
|
-
* - Supports both controlled and uncontrolled state management
|
|
27
|
-
* - Automatically switches between controlled and uncontrolled modes
|
|
28
|
-
* - Provides consistent API regardless of control mode
|
|
29
|
-
* - Handles onChange callbacks for both modes
|
|
30
|
-
* - Uses useCallback for optimized setter function
|
|
31
|
-
* - Supports generic types for flexible state values
|
|
32
|
-
*
|
|
33
|
-
* @param props - Configuration object containing controlled value, default value, and onChange callback
|
|
34
|
-
* @returns Tuple containing current value and setter function
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Custom hook that manages state that can be either controlled or uncontrolled.
|
|
38
|
-
*
|
|
39
|
-
* This hook provides a unified interface for managing component state that can be
|
|
40
|
-
* controlled externally or managed internally. It automatically detects whether
|
|
41
|
-
* the component should be controlled based on the presence of a controlledValue.
|
|
42
|
-
*
|
|
43
|
-
* @param controlledValue - The controlled value (makes component controlled when provided)
|
|
44
|
-
* @param defaultValue - The default value for uncontrolled mode
|
|
45
|
-
* @param onChange - Callback function called when the value changes
|
|
46
|
-
* @returns Tuple containing the current value and a setter function
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* const [value, setValue] = useOptionallyControlledState({
|
|
50
|
-
* controlledValue: props.value,
|
|
51
|
-
* defaultValue: 0,
|
|
52
|
-
* onChange: props.onChange
|
|
53
|
-
* });
|
|
8
|
+
* Uses a defined controlled value when provided; otherwise stores state from
|
|
9
|
+
* the default value. Setters notify `onChange` in either mode.
|
|
54
10
|
*/
|
|
55
11
|
export declare function useOptionallyControlledState<T>({ controlledValue, defaultValue, onChange, }: UseOptionallyControlledStateProps<T>): [
|
|
56
12
|
T,
|
|
@@ -34,18 +34,13 @@ export type VirtualRow = {
|
|
|
34
34
|
type: "load-more";
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @param sectionsMeta - Section metadata describing pinned/group ranges
|
|
40
|
-
* @returns Grouped sections for rendering
|
|
37
|
+
* Partitions a flat item list into indexed pinned, grouped, and unsectioned
|
|
38
|
+
* ranges.
|
|
41
39
|
*/
|
|
42
40
|
export declare const useOptionsSections: (items: SelectItem[], sectionsMeta: SectionMeta[]) => Section[];
|
|
43
41
|
/**
|
|
44
|
-
*
|
|
45
|
-
* and
|
|
46
|
-
* @param sections - The grouped sections from useOptionsSections
|
|
47
|
-
* @param hasMore - Whether there are more items to load
|
|
48
|
-
* @returns The flat virtual row list and a downshift-to-virtual index mapping
|
|
42
|
+
* Builds virtual rows and index metadata, marking bulk-action rows as sticky
|
|
43
|
+
* and appending a load-more row when requested.
|
|
49
44
|
*/
|
|
50
45
|
export declare function flattenSectionsToVirtualRows(sections: Section[], hasMore: boolean): {
|
|
51
46
|
virtualRows: VirtualRow[];
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { SelectFieldOption, SelectFieldPinnedOptions } from '../../components/SelectField/types';
|
|
2
|
-
/**
|
|
3
|
-
* Normalized pinned section structure used internally.
|
|
4
|
-
* @property label - Section label (e.g., "Recent", "Favorites")
|
|
5
|
-
* @property options - The pinned options for this section
|
|
6
|
-
* @property loading - Whether this section is still loading its options
|
|
7
|
-
*/
|
|
2
|
+
/** A pinned section normalized for item building. */
|
|
8
3
|
export type NormalizedPinnedSection<TID extends string | number> = {
|
|
9
4
|
label: string;
|
|
10
5
|
options: SelectFieldOption<TID>[];
|
|
@@ -14,24 +9,9 @@ type UsePinnedOptionsResult<TID extends string | number> = {
|
|
|
14
9
|
pinnedSections: NormalizedPinnedSection<TID>[];
|
|
15
10
|
};
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* - Labeled pinned options object
|
|
21
|
-
* - Array of labeled pinned options objects
|
|
22
|
-
*
|
|
23
|
-
* Dynamic sections appear immediately with `loading: true` and empty options,
|
|
24
|
-
* then transition to their resolved options once loaded. Results are cached
|
|
25
|
-
* per section per search value so revisiting a previous search term is instant.
|
|
26
|
-
*
|
|
27
|
-
* Per-section configuration:
|
|
28
|
-
* - `searchReactive` (default true): when false, loader is called once and the
|
|
29
|
-
* result is reused for all search values.
|
|
30
|
-
* - `cacheSize` (default 15): max number of search results cached per section.
|
|
31
|
-
*
|
|
32
|
-
* @param pinned - The pinned options configuration from props
|
|
33
|
-
* @param searchValue - Current search input value
|
|
34
|
-
* @returns Normalized pinned sections with per-section loading state
|
|
12
|
+
* Normalizes static and loaded pinned sections, caching dynamic results by
|
|
13
|
+
* section and search value. Non-reactive loaders run once with an empty search;
|
|
14
|
+
* unresolved sections are returned empty with `loading: true`.
|
|
35
15
|
*/
|
|
36
16
|
export declare function usePinnedOptions<TID extends string | number>(pinned: SelectFieldPinnedOptions<TID> | undefined, searchValue: string): UsePinnedOptionsResult<TID>;
|
|
37
17
|
export {};
|