@servicetitan/anvil2 3.11.1 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/{DataTable-C_O7nJDd.js → DataTable-DTAbOaPM.js} +3 -3
  3. package/dist/{DataTable-C_O7nJDd.js.map → DataTable-DTAbOaPM.js.map} +1 -1
  4. package/dist/{Dialog-C3wxqB-V.js → Dialog-PcuDCqK7.js} +2 -2
  5. package/dist/{Dialog-C3wxqB-V.js.map → Dialog-PcuDCqK7.js.map} +1 -1
  6. package/dist/Dialog.js +1 -1
  7. package/dist/{Drawer-BO_G3ujC.js → Drawer-C73Ka9ra.js} +2 -2
  8. package/dist/{Drawer-BO_G3ujC.js.map → Drawer-C73Ka9ra.js.map} +1 -1
  9. package/dist/Drawer.js +1 -1
  10. package/dist/{FilterBar-D8jLOWpw.js → FilterBar-D2NDYqTs.js} +3 -3
  11. package/dist/{FilterBar-D8jLOWpw.js.map → FilterBar-D2NDYqTs.js.map} +1 -1
  12. package/dist/FilterBar.js +1 -1
  13. package/dist/MultiSelectField.js +1 -1
  14. package/dist/{MultiSelectFieldSync-D1GrPsmK.js → MultiSelectFieldSync-CFw607cm.js} +5 -11
  15. package/dist/{MultiSelectFieldSync-D1GrPsmK.js.map → MultiSelectFieldSync-CFw607cm.js.map} +1 -1
  16. package/dist/MultiSelectMenu.js +1 -1
  17. package/dist/{MultiSelectMenuSync-DXaQJaFb.js → MultiSelectMenuSync-C6afc80f.js} +5 -11
  18. package/dist/MultiSelectMenuSync-C6afc80f.js.map +1 -0
  19. package/dist/{Page-Dvdx-9vo.js → Page-B5yLLq76.js} +2 -2
  20. package/dist/{Page-Dvdx-9vo.js.map → Page-B5yLLq76.js.map} +1 -1
  21. package/dist/Page.js +1 -1
  22. package/dist/{SavedFiltersButton-BKdyw-84.js → SavedFiltersButton-ClghkFdA.js} +5 -5
  23. package/dist/{SavedFiltersButton-BKdyw-84.js.map → SavedFiltersButton-ClghkFdA.js.map} +1 -1
  24. package/dist/SavedFiltersButton.js +1 -1
  25. package/dist/SelectField.js +1 -1
  26. package/dist/{SelectFieldSync-CXJ_vM_r.js → SelectFieldSync-BdYCHwPd.js} +5 -11
  27. package/dist/{SelectFieldSync-CXJ_vM_r.js.map → SelectFieldSync-BdYCHwPd.js.map} +1 -1
  28. package/dist/SelectMenu.js +1 -1
  29. package/dist/{SelectMenuSync-fgPfAK2H.js → SelectMenuSync-DlqmXr04.js} +5 -11
  30. package/dist/{SelectMenuSync-fgPfAK2H.js.map → SelectMenuSync-DlqmXr04.js.map} +1 -1
  31. package/dist/{SelectOptions-DnCivsmF.js → SelectOptions-Cz4mU7WG.js} +2 -2
  32. package/dist/{SelectOptions-DnCivsmF.js.map → SelectOptions-Cz4mU7WG.js.map} +1 -1
  33. package/dist/{Stepper-z1y9AfaJ.js → Stepper-CCKHWlUr.js} +497 -121
  34. package/dist/Stepper-CCKHWlUr.js.map +1 -0
  35. package/dist/Stepper.css +19 -16
  36. package/dist/Stepper.js +1 -1
  37. package/dist/Table.js +1 -1
  38. package/dist/Toast.js +2 -2
  39. package/dist/{Toaster-CEJo8hNY.js → Toaster-B1xZq1bs.js} +2 -2
  40. package/dist/{Toaster-CEJo8hNY.js.map → Toaster-B1xZq1bs.js.map} +1 -1
  41. package/dist/{Toaster-CJW-ZD3D.js → Toaster-C2z5rCrc.js} +44 -35
  42. package/dist/Toaster-C2z5rCrc.js.map +1 -0
  43. package/dist/Toaster.css +49 -55
  44. package/dist/TreeSelectField.js +1 -1
  45. package/dist/{TreeSelectFieldSync-KV1A8ixs.js → TreeSelectFieldSync-D7ntJmDF.js} +4 -10
  46. package/dist/{TreeSelectFieldSync-KV1A8ixs.js.map → TreeSelectFieldSync-D7ntJmDF.js.map} +1 -1
  47. package/dist/TreeSelectMenu.js +1 -1
  48. package/dist/{TreeSelectMenuSync-sn_p39Sm.js → TreeSelectMenuSync-CTm2n1vJ.js} +4 -10
  49. package/dist/{TreeSelectMenuSync-sn_p39Sm.js.map → TreeSelectMenuSync-CTm2n1vJ.js.map} +1 -1
  50. package/dist/beta.js +10 -10
  51. package/dist/{bulkActionTypes-KRa7Hs6l.js → bulkActionTypes-jKqcdwuO.js} +2 -2
  52. package/dist/{bulkActionTypes-KRa7Hs6l.js.map → bulkActionTypes-jKqcdwuO.js.map} +1 -1
  53. package/dist/{filter-state-DY4aB2Yl.js → filter-state-TEgOgQVy.js} +9 -9
  54. package/dist/{filter-state-DY4aB2Yl.js.map → filter-state-TEgOgQVy.js.map} +1 -1
  55. package/dist/index.js +10 -10
  56. package/dist/src/beta/components/TreeSelectField/TreeSelectFieldSync.d.ts +1 -1
  57. package/dist/src/beta/components/TreeSelectMenu/TreeSelectMenuSync.d.ts +1 -1
  58. package/dist/src/components/Stepper/base/StepperBase.d.ts +114 -0
  59. package/dist/src/components/Stepper/base/StepperBaseList.d.ts +21 -0
  60. package/dist/src/components/Stepper/base/StepperBasePanel.d.ts +40 -0
  61. package/dist/src/components/Stepper/base/StepperBaseStep.d.ts +66 -0
  62. package/dist/src/components/Stepper/base/index.d.ts +5 -0
  63. package/dist/src/components/Stepper/base/internal/StepperBaseContext.d.ts +39 -0
  64. package/dist/src/components/Stepper/base/internal/StepperStepIndexScope.d.ts +4 -0
  65. package/dist/src/components/Stepper/index.d.ts +1 -0
  66. package/dist/src/components/Stepper/internal/StepperContext.d.ts +0 -1
  67. package/dist/src/components/Stepper/internal/StepperWizardBootstrap.d.ts +3 -0
  68. package/dist/src/components/Stepper/internal/countRegisteredSteps.d.ts +2 -0
  69. package/dist/src/internal/functions/areOptionsValueEqual.d.ts +8 -0
  70. package/dist/src/internal/functions/isThenable.d.ts +4 -0
  71. package/dist/src/internal/hooks/useInvalidateOnOptionsChange.d.ts +16 -0
  72. package/dist/{syncFilterUtils-B6bmn3bo.js → syncFilterUtils-9Pqeq8J4.js} +45 -30
  73. package/dist/syncFilterUtils-9Pqeq8J4.js.map +1 -0
  74. package/dist/{treeSync-iLxsTFYf.js → treeSync-tEqZxxHQ.js} +55 -20
  75. package/dist/treeSync-tEqZxxHQ.js.map +1 -0
  76. package/dist/{useAdaptiveView-Q30aklTE.js → useInvalidateOnOptionsChange-CC_6sRp9.js} +54 -3
  77. package/dist/useInvalidateOnOptionsChange-CC_6sRp9.js.map +1 -0
  78. package/package.json +1 -1
  79. package/dist/MultiSelectMenuSync-DXaQJaFb.js.map +0 -1
  80. package/dist/Stepper-z1y9AfaJ.js.map +0 -1
  81. package/dist/Toaster-CJW-ZD3D.js.map +0 -1
  82. package/dist/syncFilterUtils-B6bmn3bo.js.map +0 -1
  83. package/dist/treeSync-iLxsTFYf.js.map +0 -1
  84. package/dist/useAdaptiveView-Q30aklTE.js.map +0 -1
  85. /package/dist/{useAdaptiveView.css → useInvalidateOnOptionsChange.css} +0 -0
package/dist/index.js CHANGED
@@ -21,10 +21,10 @@ export { D as DateFieldYearless } from './DateFieldYearless-Bo1V-4K2.js';
21
21
  export { D as DateFieldYearlessRange } from './DateFieldYearlessRange-rj36AQhR.js';
22
22
  export { D as DaysOfTheWeek } from './DaysOfTheWeek-B39FZ-TR.js';
23
23
  export { D as Details } from './Details-CVA5zbrR.js';
24
- export { D as Dialog } from './Dialog-C3wxqB-V.js';
24
+ export { D as Dialog } from './Dialog-PcuDCqK7.js';
25
25
  export { D as Divider } from './Divider-C7fp5Xb6.js';
26
26
  export { D as Dnd } from './index-BwV_Pz7v.js';
27
- export { D as Drawer } from './Drawer-BO_G3ujC.js';
27
+ export { D as Drawer } from './Drawer-C73Ka9ra.js';
28
28
  export { D as DrillDown, b as DrillDownContent, c as DrillDownFooter, a as DrillDownHeader, d as DrillDownNextButton, e as DrillDownPrevButton, u as useDrillDown } from './useDrilldown-D5iDWSx7.js';
29
29
  export { E as EditCard } from './EditCard-CtWVEAsA.js';
30
30
  export { F as FieldLabel } from './FieldLabel-BFJdJP_W.js';
@@ -43,7 +43,7 @@ export { L as ListView, a as ListViewOption, b as ListViewOptionCell } from './L
43
43
  export { M as Menu } from './Menu-BMn1CSr1.js';
44
44
  export { N as NumberField } from './NumberField-ASyiQu5l.js';
45
45
  export { Overflow, OverflowText } from './Overflow.js';
46
- export { P as Page } from './Page-Dvdx-9vo.js';
46
+ export { P as Page } from './Page-B5yLLq76.js';
47
47
  export { P as Pagination } from './Pagination-BcW9WJ2b.js';
48
48
  export { P as Popover } from './Popover-CjsE5FG0.js';
49
49
  export { P as ProgressBar } from './ProgressBar-C_HXy_Hx.js';
@@ -51,24 +51,24 @@ export { R as Radio } from './Radio-CBQpuxLP.js';
51
51
  export { S as SearchField } from './SearchField-ChoNtw8w.js';
52
52
  export { S as SegmentedControl, a as SegmentedControlSegment } from './SegmentedControl-CQ6DrbDc.js';
53
53
  export { S as SelectCard } from './SelectCard-DbWOdnuI.js';
54
- export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-CXJ_vM_r.js';
55
- export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-D1GrPsmK.js';
56
- export { S as SelectMenu, a as SelectMenuSync } from './SelectMenuSync-fgPfAK2H.js';
57
- export { M as MultiSelectMenu, a as MultiSelectMenuSync } from './MultiSelectMenuSync-DXaQJaFb.js';
54
+ export { S as SelectField, a as SelectFieldSync } from './SelectFieldSync-BdYCHwPd.js';
55
+ export { M as MultiSelectField, a as MultiSelectFieldSync } from './MultiSelectFieldSync-CFw607cm.js';
56
+ export { S as SelectMenu, a as SelectMenuSync } from './SelectMenuSync-DlqmXr04.js';
57
+ export { M as MultiSelectMenu, a as MultiSelectMenuSync } from './MultiSelectMenuSync-C6afc80f.js';
58
58
  export { S as SelectTrigger } from './SelectTrigger-QkI2I04A.js';
59
59
  export { S as SideNav } from './SideNav-BLXgM918.js';
60
60
  export { Skeleton, SkeletonCircle, SkeletonPill, SkeletonRectangle, SkeletonText } from './Skeleton.js';
61
61
  export { S as Spinner } from './Spinner-B7tTWcP6.js';
62
62
  export { S as SrOnly } from './SrOnly-pnf8ajnh.js';
63
- export { S as Stepper } from './Stepper-z1y9AfaJ.js';
63
+ export { S as Stepper, a as StepperBase } from './Stepper-CCKHWlUr.js';
64
64
  export { S as Switch } from './Switch-MfbL3JVk.js';
65
65
  export { T as Tab } from './Tab-Bqfvg8Ce.js';
66
66
  export { T as Text } from './Text-CEJHoh0p.js';
67
67
  export { T as Textarea } from './Textarea-CSXwaDf6.js';
68
68
  export { T as TextField } from './TextField-DWbDQfHY.js';
69
69
  export { T as TimeField } from './TimeField-BY_hasgp.js';
70
- export { T as Toaster } from './Toaster-CEJo8hNY.js';
71
- export { t as toast } from './Toaster-CJW-ZD3D.js';
70
+ export { T as Toaster } from './Toaster-B1xZq1bs.js';
71
+ export { t as toast } from './Toaster-C2z5rCrc.js';
72
72
  export { T as Toolbar } from './Toolbar-neulke7h.js';
73
73
  export { T as Tooltip } from './Tooltip-CzrJgl98.js';
74
74
  export { u as useAccessibleColor } from './useAccessibleColor-BYKjkGRg.js';
@@ -47,7 +47,7 @@ export type TreeSelectFieldSyncProps = Omit<TreeSelectFieldProps, "loadOptions"
47
47
  * - Accepts static `options` instead of `loadOptions`.
48
48
  * - Performs client-side filtering with tree-structure awareness (parents of matches are preserved).
49
49
  * - Accepts a custom filter function or MatchSorterOptions to customize filtering behavior.
50
- * - Invalidates the field when the options reference changes.
50
+ * - Invalidates the field when the options contents change.
51
51
  * - Supports all other props of TreeSelectField.
52
52
  *
53
53
  * @example
@@ -47,7 +47,7 @@ export type TreeSelectMenuSyncProps = Omit<TreeSelectMenuProps, "loadOptions" |
47
47
  * - Accepts static `options` instead of `loadOptions`.
48
48
  * - Performs client-side filtering with tree-structure awareness (parents of matches are preserved).
49
49
  * - Accepts a custom filter function or MatchSorterOptions to customize filtering behavior.
50
- * - Invalidates the menu when the options reference changes.
50
+ * - Invalidates the menu when the options contents change.
51
51
  * - Supports all other props of TreeSelectMenu.
52
52
  *
53
53
  * @example
@@ -0,0 +1,114 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { LayoutUtilProps } from '../../../types';
3
+ /**
4
+ * Props for the StepperBase component
5
+ * @extends ComponentPropsWithoutRef<"div">
6
+ * @extends LayoutUtilProps
7
+ */
8
+ export type StepperBaseProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag"> & LayoutUtilProps & {
9
+ /**
10
+ * Controlled current step (0-based). Pair with onIndexChange.
11
+ */
12
+ index?: number;
13
+ /**
14
+ * Uncontrolled start. Ignored when index is set.
15
+ * @default 0
16
+ */
17
+ defaultIndex?: number;
18
+ /**
19
+ * Fired when a step is activated.
20
+ * @param index The index of the newly current step
21
+ */
22
+ onIndexChange?: (index: number) => void;
23
+ /**
24
+ * When true, click and keyboard can change the current step.
25
+ * @default false
26
+ */
27
+ interactive?: boolean;
28
+ };
29
+ /**
30
+ * StepperBase is a controllable stepper primitive. The caller sets the current
31
+ * step and each step's outcome. Use Stepper for the linear wizard.
32
+ *
33
+ * Features:
34
+ * - Controlled or uncontrolled current step via index / defaultIndex / onIndexChange
35
+ * - Per-step outcome (not started, started, complete) independent of current
36
+ * - Optional panels; a panel names its step, steps do not require panels
37
+ * - Display-only by default; opt into click/keyboard with interactive
38
+ * - Same track, circle, and compact-label chrome as Stepper
39
+ *
40
+ * @example
41
+ * <StepperBase index={2}>
42
+ * <StepperBase.List>
43
+ * <StepperBase.Step state="complete">Approved</StepperBase.Step>
44
+ * <StepperBase.Step state="complete">Approved & Reconciled</StepperBase.Step>
45
+ * <StepperBase.Step>Scheduled</StepperBase.Step>
46
+ * </StepperBase.List>
47
+ * </StepperBase>
48
+ */
49
+ export declare const StepperBase: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
50
+ /**
51
+ * Controlled current step (0-based). Pair with onIndexChange.
52
+ */
53
+ index?: number;
54
+ /**
55
+ * Uncontrolled start. Ignored when index is set.
56
+ * @default 0
57
+ */
58
+ defaultIndex?: number;
59
+ /**
60
+ * Fired when a step is activated.
61
+ * @param index The index of the newly current step
62
+ */
63
+ onIndexChange?: (index: number) => void;
64
+ /**
65
+ * When true, click and keyboard can change the current step.
66
+ * @default false
67
+ */
68
+ interactive?: boolean;
69
+ } & import('react').RefAttributes<HTMLDivElement>> & {
70
+ /**
71
+ * Individual step. Outcome is independent of whether the step is current.
72
+ *
73
+ * Features:
74
+ * - state: not started, started, or complete
75
+ * - Optional id when a panel points at this step
76
+ * - Check icon when complete
77
+ *
78
+ * @example
79
+ * <StepperBase.Step state="complete">Approved</StepperBase.Step>
80
+ */
81
+ Step: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick" | "disabled"> & {
82
+ state?: import('./StepperBaseStep').StepperBaseStepState;
83
+ id?: string;
84
+ disabled?: boolean;
85
+ onClick?: (e: import('react').MouseEvent<HTMLButtonElement>, index?: number) => void;
86
+ } & import('react').RefAttributes<HTMLButtonElement>>;
87
+ /**
88
+ * Track of steps plus the compact label on small widths.
89
+ *
90
+ * Features:
91
+ * - Lays out StepperBase.Step children
92
+ * - Shows the current step label when the track is narrow
93
+ *
94
+ * @example
95
+ * <StepperBase.List>
96
+ * <StepperBase.Step>Scheduled</StepperBase.Step>
97
+ * </StepperBase.List>
98
+ */
99
+ List: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
100
+ /**
101
+ * Content for one step. Visible when that step is current.
102
+ *
103
+ * Features:
104
+ * - step is required and must match a Step id
105
+ * - id is optional and generated when omitted
106
+ *
107
+ * @example
108
+ * <StepperBase.Panel step="approved">Details</StepperBase.Panel>
109
+ */
110
+ Panel: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
111
+ step: string;
112
+ id?: string;
113
+ } & import('react').RefAttributes<HTMLDivElement>>;
114
+ };
@@ -0,0 +1,21 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ /**
3
+ * Props for the StepperBase.List component
4
+ * @extends ComponentPropsWithoutRef<"div">
5
+ */
6
+ export type StepperBaseListProps = ComponentPropsWithoutRef<"div">;
7
+ /**
8
+ * Container for StepperBase steps.
9
+ *
10
+ * Features:
11
+ * - Groups steps in the track
12
+ * - Shows the current step label on small widths
13
+ * - Accessible tablist
14
+ *
15
+ * @example
16
+ * <StepperBase.List>
17
+ * <StepperBase.Step>One</StepperBase.Step>
18
+ * <StepperBase.Step>Two</StepperBase.Step>
19
+ * </StepperBase.List>
20
+ */
21
+ export declare const StepperBaseList: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,40 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { LayoutUtilProps } from '../../../types';
3
+ /**
4
+ * Props for the StepperBase.Panel component
5
+ * @extends ComponentPropsWithoutRef<"div">
6
+ * @extends LayoutUtilProps
7
+ */
8
+ export type StepperBasePanelProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag"> & LayoutUtilProps & {
9
+ /**
10
+ * id of the controlling Step.
11
+ */
12
+ step: string;
13
+ /**
14
+ * Panel element id. Generated when omitted (used for aria-controls).
15
+ */
16
+ id?: string;
17
+ };
18
+ /**
19
+ * Content panel for a StepperBase step.
20
+ *
21
+ * Features:
22
+ * - Shown only when the named step is current
23
+ * - Fade-in animation
24
+ * - Overflow scrolling for long content
25
+ *
26
+ * @example
27
+ * <StepperBase.Panel step="approved">
28
+ * Details
29
+ * </StepperBase.Panel>
30
+ */
31
+ export declare const StepperBasePanel: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
32
+ /**
33
+ * id of the controlling Step.
34
+ */
35
+ step: string;
36
+ /**
37
+ * Panel element id. Generated when omitted (used for aria-controls).
38
+ */
39
+ id?: string;
40
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,66 @@
1
+ import { MouseEvent, ComponentPropsWithoutRef } from 'react';
2
+ import { StepperBaseStepState } from './internal/StepperBaseContext';
3
+ export type { StepperBaseStepState };
4
+ /**
5
+ * Props for the StepperBase.Step component
6
+ * @extends ComponentPropsWithoutRef<"button">
7
+ */
8
+ export type StepperBaseStepProps = Omit<ComponentPropsWithoutRef<"button">, "onClick" | "disabled"> & {
9
+ /**
10
+ * Outcome of this step. Independent of whether it is current (index).
11
+ * Current + any state is legal.
12
+ * @default "not started"
13
+ */
14
+ state?: StepperBaseStepState;
15
+ /**
16
+ * Stable id. Required when a Panel points at this step.
17
+ */
18
+ id?: string;
19
+ /**
20
+ * When true, this step cannot become current via click or keyboard.
21
+ * @default false
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * Notify only. Does not replace onIndexChange.
26
+ * @param e Mouse event
27
+ * @param index Index of the step in the list
28
+ */
29
+ onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;
30
+ };
31
+ /**
32
+ * Individual step for StepperBase.
33
+ *
34
+ * Features:
35
+ * - Outcome independent of the current step
36
+ * - Check icon when complete
37
+ * - Optional id for panel pairing
38
+ *
39
+ * @example
40
+ * <StepperBase.Step id="approved" state="complete">
41
+ * Approved
42
+ * </StepperBase.Step>
43
+ */
44
+ export declare const StepperBaseStep: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "onClick" | "disabled"> & {
45
+ /**
46
+ * Outcome of this step. Independent of whether it is current (index).
47
+ * Current + any state is legal.
48
+ * @default "not started"
49
+ */
50
+ state?: StepperBaseStepState;
51
+ /**
52
+ * Stable id. Required when a Panel points at this step.
53
+ */
54
+ id?: string;
55
+ /**
56
+ * When true, this step cannot become current via click or keyboard.
57
+ * @default false
58
+ */
59
+ disabled?: boolean;
60
+ /**
61
+ * Notify only. Does not replace onIndexChange.
62
+ * @param e Mouse event
63
+ * @param index Index of the step in the list
64
+ */
65
+ onClick?: (e: MouseEvent<HTMLButtonElement>, index?: number) => void;
66
+ } & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,5 @@
1
+ export * from './StepperBase';
2
+ export type { StepperBaseListProps } from './StepperBaseList';
3
+ export type { StepperBaseStepProps, StepperBaseStepState, } from './StepperBaseStep';
4
+ export type { StepperBasePanelProps } from './StepperBasePanel';
5
+ export { StepperBase as default } from './StepperBase';
@@ -0,0 +1,39 @@
1
+ import { RefObject } from 'react';
2
+ /** Per-step outcome. Independent of whether the step is current. */
3
+ export type StepperBaseStepState = "not started" | "started" | "complete";
4
+ export type StepperBaseStepInfo = {
5
+ index: number;
6
+ id?: string;
7
+ label: string;
8
+ disabled: boolean;
9
+ node: RefObject<HTMLButtonElement | null>;
10
+ };
11
+ export type StepperBaseContextValue = {
12
+ currentIndex: number;
13
+ interactive: boolean;
14
+ focusIndex: number;
15
+ setFocusIndex: (index: number) => void;
16
+ requestIndexChange: (index: number) => void;
17
+ registerStep: (info: StepperBaseStepInfo) => () => void;
18
+ getStep: (index: number) => StepperBaseStepInfo | undefined;
19
+ getCurrentStep: () => StepperBaseStepInfo | undefined;
20
+ getPanelId: (stepId: string) => string | undefined;
21
+ registerPanel: (stepId: string, panelId: string) => () => void;
22
+ };
23
+ export declare const StepperBaseContext: import('react').Context<StepperBaseContextValue>;
24
+ /**
25
+ * Hands out 0-based indices in render order, so steps work inside fragments and
26
+ * wrapper components rather than only as direct List children. Each render of
27
+ * StepperStepIndexScope starts a new pass.
28
+ */
29
+ export type StepperBaseStepIndexPass = {
30
+ allocate: () => number;
31
+ };
32
+ export declare const StepperBaseStepIndexPassContext: import('react').Context<StepperBaseStepIndexPass | null>;
33
+ /**
34
+ * Index of the calling step, or undefined when it renders outside a List.
35
+ *
36
+ * A step allocates at most once per pass, so it keeps its index when it
37
+ * re-renders alone and when StrictMode renders it twice.
38
+ */
39
+ export declare function useStepperStepIndex(): number | undefined;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function StepperStepIndexScope({ children }: {
3
+ children: ReactNode;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -6,3 +6,4 @@ export type { StepperPanelProps } from './StepperPanel';
6
6
  export type { StepperPrevButtonProps } from './StepperPrevButton';
7
7
  export type { StepperStepProps } from './StepperStep';
8
8
  export { Stepper as default } from './Stepper';
9
+ export * from './base';
@@ -7,7 +7,6 @@ export type StepperContextProps = {
7
7
  focus: number;
8
8
  setFocus: Dispatch<SetStateAction<number>>;
9
9
  onComplete?: () => void;
10
- items?: NodeListOf<HTMLElement>;
11
10
  allCompleted?: boolean;
12
11
  setAllCompleted?: Dispatch<SetStateAction<boolean>>;
13
12
  allowNavigateToPrevStep?: boolean;
@@ -0,0 +1,3 @@
1
+ export declare function StepperWizardBootstrap({ defaultIndex, }: {
2
+ defaultIndex?: number;
3
+ }): null;
@@ -0,0 +1,2 @@
1
+ import { StepperBaseContextValue } from '../base/internal/StepperBaseContext';
2
+ export declare function countRegisteredSteps(getStep: StepperBaseContextValue["getStep"]): number;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Deep value equality for select option lists (and nested tree nodes).
3
+ *
4
+ * Compares arrays and plain objects by contents so a new array/object identity
5
+ * with the same data is treated as unchanged. Functions and React elements are
6
+ * compared by reference.
7
+ */
8
+ export declare function areOptionsValueEqual(a: unknown, b: unknown): boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Returns true when `value` looks like a thenable (Promise or Promise-like).
3
+ */
4
+ export declare function isThenable<T>(value: unknown): value is PromiseLike<T>;
@@ -0,0 +1,16 @@
1
+ type InvalidatableHandle = {
2
+ invalidate: () => void;
3
+ };
4
+ /**
5
+ * Invalidates a select field/menu when its `options` *contents* change.
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)
12
+ */
13
+ export declare function useInvalidateOnOptionsChange(handleRef: {
14
+ current: InvalidatableHandle | null;
15
+ }, options: unknown): void;
16
+ export {};
@@ -11,7 +11,7 @@ import { u as useMergeRefs } from './useMergeRefs-Dfmtq9cI.js';
11
11
  import { S as SrOnly } from './SrOnly-pnf8ajnh.js';
12
12
  import { I as Icon } from './Icon-B5zwN7GD.js';
13
13
  import { S as SvgCheck } from './check-Cf67OWrZ.js';
14
- import { b as OptionRow, c as OptionRowSideContent, d as OptionCheckbox, e as OptionContentArea, u as useAdaptiveView } from './useAdaptiveView-Q30aklTE.js';
14
+ import { i as isThenable, c as OptionRow, d as OptionRowSideContent, e as OptionCheckbox, f as OptionContentArea, b as useAdaptiveView } from './useInvalidateOnOptionsChange-CC_6sRp9.js';
15
15
  import { d as defaultRangeExtractor, u as useVirtualizer } from './index-DXeGMe23.js';
16
16
  import { S as SvgAdd } from './add-BcQkAUip.js';
17
17
  import { m as matchSorter } from './match-sorter.esm-CGAauEiU.js';
@@ -86,39 +86,54 @@ function useSelectFieldLoading(config) {
86
86
  if (isInitial) {
87
87
  currentSearchValueRef.current = searchValue;
88
88
  }
89
- (isInitial ? setLoading : setLoadingMore)(true);
89
+ const setBusy = isInitial ? setLoading : setLoadingMore;
90
+ const applyEagerResult = (resolved) => {
91
+ (isInitial ? setOptions : appendOptions)(resolved);
92
+ hasCompletedLoadRef.current = true;
93
+ };
94
+ if (!lazy) {
95
+ const result = loadOptionsProp(searchValue);
96
+ if (!isThenable(result)) {
97
+ await Promise.resolve();
98
+ applyEagerResult(result);
99
+ return;
100
+ }
101
+ setBusy(true);
102
+ try {
103
+ const awaited = await result;
104
+ applyEagerResult(Array.isArray(awaited) ? awaited : await awaited);
105
+ } finally {
106
+ setBusy(false);
107
+ }
108
+ return;
109
+ }
110
+ setBusy(true);
90
111
  try {
91
- if (!lazy) {
92
- const result = await loadOptionsProp(searchValue);
93
- const resolved = Array.isArray(result) ? result : await result;
94
- (isInitial ? setOptions : appendOptions)(resolved);
112
+ let result;
113
+ if (lazy === "page") {
114
+ const page = isInitial ? 0 : previousPage;
115
+ result = await loadOptionsProp(searchValue, page, pageSize);
116
+ setPreviousPage(isInitial ? 1 : page + 1);
117
+ } else if (lazy === "offset") {
118
+ const offset = isInitial ? 0 : previousOffset;
119
+ result = await loadOptionsProp(searchValue, offset, limit);
120
+ setPreviousOffset(isInitial ? limit : offset + limit);
121
+ } else if (lazy === "group") {
122
+ const group = isInitial ? null : previousGroup;
123
+ result = await loadOptionsProp(searchValue, group);
124
+ setPreviousGroup(
125
+ result.options[result.options.length - 1]?.group ?? null
126
+ );
95
127
  } else {
96
- let result;
97
- if (lazy === "page") {
98
- const page = isInitial ? 0 : previousPage;
99
- result = await loadOptionsProp(searchValue, page, pageSize);
100
- setPreviousPage(isInitial ? 1 : page + 1);
101
- } else if (lazy === "offset") {
102
- const offset = isInitial ? 0 : previousOffset;
103
- result = await loadOptionsProp(searchValue, offset, limit);
104
- setPreviousOffset(isInitial ? limit : offset + limit);
105
- } else if (lazy === "group") {
106
- const group = isInitial ? null : previousGroup;
107
- result = await loadOptionsProp(searchValue, group);
108
- setPreviousGroup(
109
- result.options[result.options.length - 1]?.group ?? null
110
- );
111
- } else {
112
- throw new Error(
113
- `Invalid lazy mode: ${lazy}. Expected 'page', 'offset', or 'group'.`
114
- );
115
- }
116
- setHasMoreToLoad(result.hasMore ?? false);
117
- (isInitial ? setOptions : appendOptions)(result.options);
128
+ throw new Error(
129
+ `Invalid lazy mode: ${lazy}. Expected 'page', 'offset', or 'group'.`
130
+ );
118
131
  }
132
+ setHasMoreToLoad(result.hasMore ?? false);
133
+ (isInitial ? setOptions : appendOptions)(result.options);
119
134
  hasCompletedLoadRef.current = true;
120
135
  } finally {
121
- (isInitial ? setLoading : setLoadingMore)(false);
136
+ setBusy(false);
122
137
  }
123
138
  },
124
139
  [
@@ -1225,4 +1240,4 @@ const sortByGroup = (options, groupSorter) => {
1225
1240
  };
1226
1241
 
1227
1242
  export { AddNewItemButton as A, OptionsPanel as O, VirtualizedOptionsPanel as V, useProcessedOptions as a, buildSelectItems as b, sortByGroup as c, defaultSyncFilter as d, toSelectItem as e, shouldShowAddNewItem as s, toSyncFilterFn as t, useSelectOrchestration as u };
1228
- //# sourceMappingURL=syncFilterUtils-B6bmn3bo.js.map
1243
+ //# sourceMappingURL=syncFilterUtils-9Pqeq8J4.js.map