@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,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* - Handles single names (returns first two characters)
|
|
6
|
-
* - Handles multiple names (returns first and last name initials)
|
|
7
|
-
* - Automatically capitalizes all initials
|
|
8
|
-
* - Filters out empty strings and whitespace
|
|
9
|
-
* - Handles edge cases like empty names and single characters
|
|
10
|
-
* - Preserves proper capitalization rules
|
|
11
|
-
* - Returns undefined for empty or falsy input
|
|
12
|
-
*
|
|
13
|
-
* @param name - The full name string to extract initials from
|
|
14
|
-
* @returns The initials as a string, or undefined if name is empty
|
|
2
|
+
* Initials from a space-split name. Multiple words: first and last, both
|
|
3
|
+
* uppercased. One word: first two characters as title case, or a single
|
|
4
|
+
* uppercased character. Empty / falsy input is `undefined`.
|
|
15
5
|
*/
|
|
16
6
|
export declare function getInitial(name: string): string | undefined;
|
|
@@ -1,36 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CSS selector
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `[contenteditable]:not([contenteditable="false"])` covers every editable
|
|
7
|
-
* value the attribute accepts — `""` (bare), `"true"`, `"plaintext-only"`,
|
|
8
|
-
* `"inherit"` — and excludes the explicit opt-out `"false"`. All editable
|
|
9
|
-
* variants have an implicit tabindex of 0.
|
|
2
|
+
* CSS selector for natively keyboard-focusable descendants.
|
|
3
|
+
* `[contenteditable]:not([contenteditable="false"])` includes `""`, `"true"`,
|
|
4
|
+
* `"plaintext-only"`, and `"inherit"` — those have implicit tabindex 0.
|
|
10
5
|
*/
|
|
11
6
|
export declare const KEYBOARD_FOCUSABLE_SELECTOR = "a[href], button, input, textarea, select, details, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]:not([tabindex=\"-1\"])";
|
|
12
7
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* - Finds all elements that can receive keyboard focus
|
|
17
|
-
* - Filters out disabled, hidden, and inert elements
|
|
18
|
-
* - Respects ARIA attributes for accessibility
|
|
19
|
-
* - Checks computed styles for visibility
|
|
20
|
-
* - Supports all standard focusable elements (links, buttons, inputs, etc.)
|
|
21
|
-
* - Handles null and undefined input gracefully
|
|
22
|
-
* - Returns array of focusable HTMLElements
|
|
23
|
-
* - Excludes elements with tabindex="-1"
|
|
24
|
-
*
|
|
25
|
-
* Focusable Elements Detected:
|
|
26
|
-
* - Links with href attributes
|
|
27
|
-
* - Buttons (all types)
|
|
28
|
-
* - Form inputs (text, checkbox, radio, etc.)
|
|
29
|
-
* - Textareas and select elements
|
|
30
|
-
* - Details elements
|
|
31
|
-
* - Elements with positive tabindex values
|
|
32
|
-
*
|
|
33
|
-
* @param element - The container element to search for focusable elements
|
|
34
|
-
* @returns Array of focusable HTMLElements, or empty array if no element provided
|
|
8
|
+
* Keyboard-focusable descendants of `element`. Drops `disabled`,
|
|
9
|
+
* `display: none`, and elements whose `aria-hidden` or `inert` attribute is
|
|
10
|
+
* a non-empty string. Missing `element` is `[]`.
|
|
35
11
|
*/
|
|
36
12
|
export declare function getKeyboardFocusableElements(element?: HTMLElement | null): Element[];
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Supported constructs (matched in order):
|
|
8
|
-
* - `***text***` → `<strong><em>text</em></strong>`
|
|
9
|
-
* - `**text**` → `<strong>text</strong>`
|
|
10
|
-
* - `*text*` → `<em>text</em>`
|
|
11
|
-
* - `==text==` → `<mark>`
|
|
12
|
-
* - `` `text` `` → `<code>` (no nested markdown inside code)
|
|
13
|
-
*
|
|
14
|
-
* For plain-text stripping (e.g. aria-label), use `stripInlineMarkdown` from
|
|
15
|
-
* `./stripInlineMarkdown` — it has no style dependencies.
|
|
16
|
-
*
|
|
17
|
-
* @param text - The string to parse
|
|
18
|
-
* @returns Array of React nodes representing the parsed content
|
|
3
|
+
* Turns limited inline markdown into React nodes (`***` / `**` / `*` / `==` / `` ` ``).
|
|
4
|
+
* The shared global regex needs `lastIndex` reset per call and saved around
|
|
5
|
+
* nested parses. Code spans are not reparsed.
|
|
19
6
|
*/
|
|
20
7
|
export declare const parseInlineMarkdown: (text: string) => ReactNode[];
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* - Handles camelCase to kebab-case conversion
|
|
6
|
-
* - Handles PascalCase to kebab-case conversion
|
|
7
|
-
* - Preserves consecutive numbers without separators
|
|
8
|
-
* - Adds hyphens before uppercase letters and numbers
|
|
9
|
-
* - Maintains lowercase letters as-is
|
|
10
|
-
* - Handles edge cases like single characters and empty strings
|
|
11
|
-
* - Preserves existing hyphens in the input string
|
|
12
|
-
*
|
|
13
|
-
* @param str - The string to convert to kebab-case
|
|
14
|
-
* @returns The kebab-case version of the input string
|
|
2
|
+
* Inserts hyphens before uppercase letters and digits (except consecutive
|
|
3
|
+
* digits and the first character), then lowercases. Adjacent capitals each
|
|
4
|
+
* get a hyphen (`HTTP` → `h-t-t-p`).
|
|
15
5
|
*/
|
|
16
6
|
export declare function kebabize(str: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** React 18 warns on `popoverTarget`; React 19 warns on `popovertarget`. */
|
|
1
|
+
/** React 18 warns on `popoverTarget`; React 19 warns on `popovertarget`. Missing `id` is `{}`. */
|
|
2
2
|
export declare function popoverTargetDomProps(id: string | undefined, version?: string): {
|
|
3
3
|
[x: string]: string;
|
|
4
4
|
};
|
|
@@ -2,19 +2,12 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Class names that re-establish the Anvil2 styling scope on a container.
|
|
4
4
|
*
|
|
5
|
-
* Native `popover` / top-layer elements
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* of the `--a2-*` design tokens (defined on `.anvil2.theme-core`) and miss the
|
|
9
|
-
* scoped component rules, so they render unstyled.
|
|
5
|
+
* Native `popover` / top-layer elements are promoted out of ancestor
|
|
6
|
+
* `AnvilProvider` `.anvil2` scope. Without the scope, descendants miss
|
|
7
|
+
* `--a2-*` tokens and scoped component rules.
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* e.g. when an Anvil2 component is used from a legacy host).
|
|
14
|
-
*
|
|
15
|
-
* Pair with `usePortalScopeStyle` so custom `ThemeProvider` tokens (e.g. Carto
|
|
16
|
-
* Inter) are re-applied on top of `.theme-core`, which otherwise resets those
|
|
17
|
-
* variables to core defaults (Nunito Sans).
|
|
9
|
+
* Pair with `usePortalScopeStyle` so custom `ThemeProvider` tokens are
|
|
10
|
+
* re-applied; `.theme-core` otherwise resets them to core defaults.
|
|
18
11
|
*/
|
|
19
12
|
export declare const portalScopeClassNames: string;
|
|
20
13
|
/**
|
|
@@ -22,7 +15,7 @@ export declare const portalScopeClassNames: string;
|
|
|
22
15
|
*
|
|
23
16
|
* `.theme-core` on the same node redefines `--a2-*` to core defaults, which
|
|
24
17
|
* wins over inherited `ThemeProvider` variables. Re-applying `themeStyle`
|
|
25
|
-
* after that reset keeps
|
|
18
|
+
* after that reset keeps custom themes intact.
|
|
26
19
|
*
|
|
27
20
|
* Pass the element's own styles so positioning / UA resets still win.
|
|
28
21
|
*/
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
/** Calls `showPopover()`; any throw is `console.warn`ed and swallowed. */
|
|
1
2
|
export declare const safeShowPopover: (element?: HTMLElement) => void;
|
|
3
|
+
/** Calls `hidePopover()`; any throw is `console.warn`ed and swallowed. */
|
|
2
4
|
export declare const safeHidePopover: (element?: HTMLElement) => void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param str - The string to strip
|
|
6
|
-
* @returns The string with all inline markdown syntax removed
|
|
2
|
+
* Drops inline markdown markers and returns the inner text (for `aria-label`).
|
|
3
|
+
* Shared global regex: reset `lastIndex` per call and save it around nested
|
|
4
|
+
* strips. Code spans are not reparsed.
|
|
7
5
|
*/
|
|
8
6
|
export declare const stripInlineMarkdown: (str: string) => string;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MatchSorterOptions } from 'match-sorter';
|
|
2
2
|
import { SelectFieldOption, SelectFieldGroupByValue } from '../../components/SelectField/types';
|
|
3
3
|
export type SyncFilterFn<TID extends string | number = string | number, T extends SelectFieldOption<TID> = SelectFieldOption<TID>> = (options: T[], searchValue: string) => T[];
|
|
4
|
+
/** Filters by label and search text, preserving input order for equal matches. */
|
|
4
5
|
export declare const defaultSyncFilter: <TID extends string | number, T extends SelectFieldOption<TID> = SelectFieldOption<TID>>(options: T[], searchValue: string) => T[];
|
|
6
|
+
/** Normalizes a filter function or match-sorter options into a sync filter. */
|
|
5
7
|
export declare const toSyncFilterFn: <TID extends string | number, T extends SelectFieldOption<TID> = SelectFieldOption<TID>>(filter: SyncFilterFn<TID, T> | MatchSorterOptions<T>) => SyncFilterFn<TID, T>;
|
|
6
8
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
+
* Orders groups with the comparator, keeps options stable within each group,
|
|
10
|
+
* and places ungrouped options last.
|
|
9
11
|
*/
|
|
10
12
|
export declare const sortByGroup: <TID extends string | number, T extends SelectFieldOption<TID> = SelectFieldOption<TID>>(options: T[], groupSorter: (a: SelectFieldGroupByValue, b: SelectFieldGroupByValue) => number) => T[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Tree-shaken in production builds via the `process.env.NODE_ENV` guard.
|
|
2
|
+
* `console.warn` in development, once per unique message. No-op in production.
|
|
4
3
|
*/
|
|
5
4
|
export declare function warnOnce(message: string): void;
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
type BulkComputeResult<T> = T[] | Promise<T[]>;
|
|
2
2
|
export type UseBulkActionRunnerOptions<T> = {
|
|
3
|
-
/** Sets the draft (or commits when confirmation is off). */
|
|
4
3
|
setDraft: (next: T[]) => void;
|
|
5
4
|
};
|
|
6
5
|
export type UseBulkActionRunnerResult<T> = {
|
|
7
|
-
/**
|
|
8
|
-
* True while a bulk-action promise is in flight. While true, callers should
|
|
9
|
-
* disable option rows, override the bulk row's checkState to "loading", and
|
|
10
|
-
* disable Apply.
|
|
11
|
-
*/
|
|
12
6
|
pending: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Run a bulk action. If `compute` returns an array synchronously, the draft
|
|
15
|
-
* is updated immediately. If it returns a promise, the runner enters the
|
|
16
|
-
* pending state until resolve/reject. Stale resolutions (those that finish
|
|
17
|
-
* after another draft mutation or another bulk run, or after `reset()`) are
|
|
18
|
-
* silently discarded.
|
|
19
|
-
*/
|
|
20
7
|
runBulk: (compute: (current: T[]) => BulkComputeResult<T>, current: T[]) => void;
|
|
21
|
-
/**
|
|
22
|
-
* Wrap an external draft mutation so that any in-flight bulk promise's
|
|
23
|
-
* eventual resolution is discarded. Use this in place of the raw setDraft
|
|
24
|
-
* whenever the user mutates the draft outside of a bulk action (option
|
|
25
|
-
* click, etc.) so that a slow Select-All-fetching promise can't clobber a
|
|
26
|
-
* subsequent click.
|
|
27
|
-
*/
|
|
28
8
|
setDraftAndBump: (next: T[]) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Discard any in-flight bulk resolution. Call when the menu closes so that
|
|
31
|
-
* a promise resolving after close can't apply to the next menu instance.
|
|
32
|
-
*/
|
|
33
9
|
reset: () => void;
|
|
34
10
|
};
|
|
35
11
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
12
|
+
* Applies Select-All / Select-Filtered computes through `setDraft`, discarding
|
|
13
|
+
* stale async results with a generation counter. Synchronous arrays apply
|
|
14
|
+
* immediately. `setDraftAndBump` and `reset` also advance the generation;
|
|
15
|
+
* `reset` clears `pending` but does not revert the last `setDraft`.
|
|
39
16
|
*/
|
|
40
17
|
export declare function useBulkActionRunner<T>({ setDraft, }: UseBulkActionRunnerOptions<T>): UseBulkActionRunnerResult<T>;
|
|
41
18
|
export {};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* Invokes `onChange` only when `next` is a different id set than the latest
|
|
3
|
+
* `selected` value (not the closed-over one).
|
|
4
4
|
*
|
|
5
|
-
* Downshift can re-invoke a click handler
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* the stale
|
|
10
|
-
*
|
|
11
|
-
* Comparing against the latest selection — not the closed-over one — breaks
|
|
12
|
-
* that loop without treating the stale add as a toggle/deselect.
|
|
13
|
-
*
|
|
14
|
-
* @param selected The current selected options
|
|
15
|
-
* @param onChange Called when the id set actually changes
|
|
16
|
-
* @returns A stable function that commits `next` only when ids differ
|
|
5
|
+
* Downshift can re-invoke a click handler from an earlier render. That handler
|
|
6
|
+
* still sees the pre-click selection, so it reports an add of ids the parent
|
|
7
|
+
* already holds. Consumers that write a new array from that callback re-render,
|
|
8
|
+
* and the stale handler fires again. Comparing against the latest selection
|
|
9
|
+
* breaks that loop without treating the stale add as a deselect.
|
|
17
10
|
*/
|
|
18
11
|
export declare function useCommitSelectionIfChanged<T extends {
|
|
19
12
|
id: string | number;
|
|
@@ -13,9 +13,9 @@ export type UseConfirmationDraftResult<T> = {
|
|
|
13
13
|
isDirty: boolean;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Holds a draft
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* `
|
|
16
|
+
* Holds a draft of a controlled value while confirmation is on. `setDraft`
|
|
17
|
+
* commits immediately when `enabled` is false. Opening, or a `value` change
|
|
18
|
+
* while open, copies `value` into the draft. Closing does not reset it —
|
|
19
|
+
* `cancel` does.
|
|
20
20
|
*/
|
|
21
21
|
export declare function useConfirmationDraft<T>({ value, onCommit, isOpen, enabled, isEqual, }: UseConfirmationDraftOptions<T>): UseConfirmationDraftResult<T>;
|
|
@@ -1,45 +1,14 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Return type for the useContainerQuery hook
|
|
4
|
-
*/
|
|
5
2
|
export type ContainerQueryReturnProps = {
|
|
6
|
-
/**
|
|
7
|
-
* The breakpoint name
|
|
8
|
-
*/
|
|
9
3
|
name: "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
10
|
-
/**
|
|
11
|
-
* Minimum width for this breakpoint
|
|
12
|
-
*/
|
|
13
4
|
min: number | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Maximum width for this breakpoint
|
|
16
|
-
*/
|
|
17
5
|
max: number | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Current container width
|
|
20
|
-
*/
|
|
21
6
|
containerWidth: number;
|
|
22
|
-
/**
|
|
23
|
-
* Current container height
|
|
24
|
-
*/
|
|
25
7
|
containerHeight: number;
|
|
26
8
|
};
|
|
27
9
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Features:
|
|
31
|
-
* - Detects current breakpoint based on container width instead of viewport width
|
|
32
|
-
* - Supports all standard breakpoints (xs, sm, md, lg, xl, xxl)
|
|
33
|
-
* - Provides container dimensions information
|
|
34
|
-
* - Uses hammer-token breakpoint values for consistency
|
|
35
|
-
* - Listens for container resize events using ResizeObserver
|
|
36
|
-
* - Supports optional disable functionality
|
|
37
|
-
* - Uses container element dimensions for accurate measurements
|
|
38
|
-
*
|
|
39
|
-
* @param containerRef - React ref to the container element to observe
|
|
40
|
-
* @param props - Optional configuration object
|
|
41
|
-
* @param props.disable - Whether to disable the hook
|
|
42
|
-
* @returns Current breakpoint information or undefined if disabled
|
|
10
|
+
* Observes a container and returns its active Anvil2 breakpoint and dimensions.
|
|
11
|
+
* Returns `undefined` while disabled or before measurement.
|
|
43
12
|
*/
|
|
44
13
|
export declare const useContainerQuery: (containerRef: RefObject<HTMLElement>, props?: {
|
|
45
14
|
disable?: boolean;
|
|
@@ -1,28 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* - Delays callback execution until after a specified delay period
|
|
6
|
-
* - Cancels previous pending calls when a new one is made
|
|
7
|
-
* - Maintains stable function reference (only changes when delay changes)
|
|
8
|
-
* - Always uses the latest callback via ref (avoids stale closures)
|
|
9
|
-
* - Properly cleans up timeouts on unmount and delay changes
|
|
10
|
-
* - Supports async callbacks
|
|
11
|
-
* - Type-safe with generics
|
|
12
|
-
*
|
|
13
|
-
* @param callback - The function to debounce
|
|
14
|
-
* @param delay - Delay in milliseconds before executing the callback
|
|
15
|
-
* @returns Debounced version of the callback with the same signature
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* const debouncedSearch = useDebouncedCallback(
|
|
19
|
-
* (searchTerm: string) => {
|
|
20
|
-
* performSearch(searchTerm);
|
|
21
|
-
* },
|
|
22
|
-
* 300
|
|
23
|
-
* );
|
|
24
|
-
*
|
|
25
|
-
* // Later in event handler:
|
|
26
|
-
* debouncedSearch(inputValue);
|
|
2
|
+
* Returns a debounced function with a stable identity that always calls the
|
|
3
|
+
* latest `callback`. Pending calls cancel on a new invoke, delay change, or
|
|
4
|
+
* unmount. Defaults to 300ms.
|
|
27
5
|
*/
|
|
28
6
|
export declare function useDebouncedCallback<T extends (...args: any[]) => any>(callback: T, delay?: number): T;
|
|
@@ -1,40 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props for the useDialogScrollLock hook
|
|
3
|
-
* @property {boolean} open - Whether the dialog is open
|
|
4
|
-
* @property {string} id - Unique identifier for the dialog
|
|
5
|
-
* @property {boolean} [enableScrollChaining] - Whether to enable scroll chaining
|
|
6
|
-
* @property {React.RefObject<HTMLElement>} elementRef - Reference to the dialog element
|
|
7
|
-
*/
|
|
8
1
|
export interface UseDialogScrollLockProps {
|
|
9
|
-
/**
|
|
10
|
-
* Whether the dialog is open
|
|
11
|
-
*/
|
|
2
|
+
/** When true, this id counts as open on the host. */
|
|
12
3
|
open: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Unique identifier for the dialog
|
|
15
|
-
*/
|
|
4
|
+
/** Distinguishes this dialog from others on the same shadow host. */
|
|
16
5
|
id: string;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to enable scroll chaining
|
|
19
|
-
*/
|
|
6
|
+
/** Skips host scroll locking when enabled. */
|
|
20
7
|
enableScrollChaining?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Reference to the dialog element
|
|
23
|
-
*/
|
|
8
|
+
/** Element used to locate the enclosing shadow root. */
|
|
24
9
|
elementRef: React.RefObject<HTMLElement>;
|
|
25
10
|
}
|
|
26
11
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* Features:
|
|
30
|
-
* - Manages scroll lock state for dialogs in shadow DOM
|
|
31
|
-
* - Tracks multiple open dialogs with unique IDs
|
|
32
|
-
* - Prevents scroll chaining when dialogs are open
|
|
33
|
-
* - Automatically cleans up scroll lock on unmount
|
|
34
|
-
* - Supports enabling/disabling scroll chaining
|
|
35
|
-
* - Uses data attributes to track dialog state
|
|
36
|
-
*
|
|
37
|
-
* @param props - Configuration object containing dialog state and element reference
|
|
38
|
-
* @returns void
|
|
12
|
+
* Records open dialog ids on a shared shadow host so page-scroll CSS remains
|
|
13
|
+
* active until the last dialog closes. No-op outside a shadow root.
|
|
39
14
|
*/
|
|
40
15
|
export declare const useDialogScrollLock: ({ open, id, enableScrollChaining, elementRef, }: UseDialogScrollLockProps) => void;
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { OpenCloseTransitionStateEffects } from '../useOpenCloseTransitionStates';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @property {() => void} [onCloseAnimationStart] - Callback when closing animation starts
|
|
7
|
-
* @property {() => void} [onOpenAnimationComplete] - Callback when opening animation completes
|
|
8
|
-
* @property {() => void} [onCloseAnimationComplete] - Callback when closing animation completes
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Custom hook for managing dialog transition states and animations.
|
|
12
|
-
*
|
|
13
|
-
* Features:
|
|
14
|
-
* - Manages dialog open/close transition states
|
|
15
|
-
* - Handles animation timing based on CSS animation duration
|
|
16
|
-
* - Provides callbacks for animation lifecycle events
|
|
17
|
-
* - Supports controlled dialog state management
|
|
18
|
-
* - Automatically handles showModal() and close() calls
|
|
19
|
-
* - Provides utility flags for open/closed states
|
|
20
|
-
*
|
|
21
|
-
* @param ref - The ref to the dialog element
|
|
22
|
-
* @param openProp - The open prop controlling dialog visibility
|
|
23
|
-
* @param options - Additional, optional options including callbacks for animation start, complete, and initialization
|
|
24
|
-
* @returns Object containing dialog state, control functions, and utility flags
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Effects configuration for dialog transition states
|
|
28
|
-
* @param openProp - The open prop controlling dialog visibility
|
|
29
|
-
* @param options - The effects configuration
|
|
30
|
-
* @returns The dialog transition state
|
|
4
|
+
* Coordinates a dialog's modal lifecycle with its CSS opening and closing
|
|
5
|
+
* animations.
|
|
31
6
|
*/
|
|
32
7
|
export declare const useDialogTransitionStates: (ref: RefObject<HTMLDialogElement>, openProp: boolean | undefined, options?: OpenCloseTransitionStateEffects) => import('..').OpenCloseTransitionState;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return type for the useDownshiftEnvironment hook
|
|
3
|
-
* @property {React.RefObject<HTMLDivElement>} ref - Ref to attach to the wrapper element
|
|
4
|
-
* @property {object | undefined} environment - Environment configuration for downshift
|
|
5
|
-
*/
|
|
6
1
|
export interface UseDownshiftEnvironmentReturn {
|
|
2
|
+
/** Attach to the wrapper so `getRootNode()` can see a shadow host. */
|
|
7
3
|
ref: React.RefObject<HTMLDivElement>;
|
|
4
|
+
/**
|
|
5
|
+
* Set when the wrapper's `getRootNode()` is a shadow root; otherwise
|
|
6
|
+
* Downshift uses its `document` default.
|
|
7
|
+
*/
|
|
8
8
|
environment: {
|
|
9
9
|
document: Document;
|
|
10
10
|
addEventListener: typeof document.addEventListener;
|
|
@@ -13,24 +13,8 @@ export interface UseDownshiftEnvironmentReturn {
|
|
|
13
13
|
} | undefined;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* - Fixes shadow DOM compatibility issues with downshift
|
|
20
|
-
* - Provides proper document and event listener references
|
|
21
|
-
* - Returns ref for wrapper element and environment configuration
|
|
22
|
-
*
|
|
23
|
-
* @returns Object containing ref and environment configuration
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* const { ref, environment } = useDownshiftEnvironment();
|
|
27
|
-
*
|
|
28
|
-
* return (
|
|
29
|
-
* <div ref={ref}>
|
|
30
|
-
* <Combobox environment={environment}>
|
|
31
|
-
* combobox content
|
|
32
|
-
* </Combobox>
|
|
33
|
-
* </div>
|
|
34
|
-
* );
|
|
16
|
+
* Supplies Downshift's `environment` so listboxes inside shadow DOM still
|
|
17
|
+
* receive document-level events. First render is always `environment:
|
|
18
|
+
* undefined` because the wrapper ref is empty.
|
|
35
19
|
*/
|
|
36
20
|
export declare const useDownshiftEnvironment: () => UseDownshiftEnvironmentReturn;
|
|
@@ -11,19 +11,8 @@ export interface UseFocusWithinReturnValue<T extends HTMLElement = HTMLElement>
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @param options.onFocus Optional callback when focus enters the element
|
|
18
|
-
* @param options.onBlur Optional callback when focus leaves the element
|
|
19
|
-
* @returns Object containing props for the element
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* const { props } = useFocusWithin({
|
|
23
|
-
* onFocus: () => console.log('Focus entered'),
|
|
24
|
-
* onBlur: () => console.log('Focus left')
|
|
25
|
-
* });
|
|
26
|
-
*
|
|
27
|
-
* return <div {...props}>Content</div>;
|
|
14
|
+
* Returns `onFocus`/`onBlur` props that fire when focus enters or leaves the
|
|
15
|
+
* host, not when it moves among descendants. `otherRelatedElements` are also
|
|
16
|
+
* treated as inside for leave detection.
|
|
28
17
|
*/
|
|
29
18
|
export declare function useFocusWithin<T extends HTMLElement>({ onBlur, onFocus, otherRelatedElements, }?: UseFocusWithinOptions): UseFocusWithinReturnValue<T>;
|
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
import { SelectFieldGroupByValue, SelectFieldOption } from '../../components/SelectField/types';
|
|
2
2
|
import { SelectItem } from '../types/selectFieldInternalTypes';
|
|
3
|
-
/**
|
|
4
|
-
* Normalized group section structure used internally.
|
|
5
|
-
* @property label - The group label (derived from groupToString or String(groupValue))
|
|
6
|
-
* @property options - The options belonging to this group
|
|
7
|
-
*/
|
|
3
|
+
/** A group label and its options, normalized for section rendering. */
|
|
8
4
|
export type NormalizedGroupSection<TID extends string | number> = {
|
|
9
5
|
label: string;
|
|
10
6
|
options: SelectFieldOption<TID>[];
|
|
11
7
|
};
|
|
12
8
|
type UseGroupedOptionsResult<TID extends string | number> = {
|
|
13
|
-
/** Options that have a group property, converted to downshift items */
|
|
14
9
|
groupedItems: SelectItem<TID>[];
|
|
15
|
-
/** Options that don't have a group property, converted to downshift items */
|
|
16
10
|
ungroupedItems: SelectItem<TID>[];
|
|
17
|
-
/** Metadata about each group section for rendering */
|
|
18
11
|
groupSections: NormalizedGroupSection<TID>[];
|
|
19
12
|
};
|
|
20
13
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* Groups are ordered by insertion order (first occurrence of a group value
|
|
24
|
-
* defines its position in the list).
|
|
25
|
-
*
|
|
26
|
-
* @param options - The options to process
|
|
27
|
-
* @param groupToString - Optional function to convert group values to display labels
|
|
28
|
-
* @returns Grouped items, ungrouped items, and group section metadata
|
|
14
|
+
* Partitions options into Downshift items and group sections, preserving
|
|
15
|
+
* first-seen group order.
|
|
29
16
|
*/
|
|
30
17
|
export declare function useGroupedOptions<TID extends string | number>(options: SelectFieldOption<TID>[], groupToString?: (groupValue: SelectFieldGroupByValue) => string): UseGroupedOptionsResult<TID>;
|
|
31
18
|
/**
|
|
32
|
-
*
|
|
33
|
-
* The group value is extracted from the first option in each section.
|
|
34
|
-
*
|
|
35
|
-
* @param sections - The group sections to sort
|
|
36
|
-
* @param groupSorter - Comparator function for group values
|
|
37
|
-
* @returns A new array of sorted sections
|
|
19
|
+
* Returns group sections sorted by each section's first option group value.
|
|
38
20
|
*/
|
|
39
21
|
export declare function sortGroupSections<TID extends string | number>(sections: NormalizedGroupSection<TID>[], groupSorter: (a: SelectFieldGroupByValue, b: SelectFieldGroupByValue) => number): NormalizedGroupSection<TID>[];
|
|
40
22
|
export {};
|