@servicetitan/anvil2 1.45.2 → 1.46.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{Calendar-BK861SAW.js → Calendar-BQ5F2ENO.js} +2 -2
  3. package/dist/{Calendar-BK861SAW.js.map → Calendar-BQ5F2ENO.js.map} +1 -1
  4. package/dist/Calendar.js +1 -1
  5. package/dist/{Checkbox-ZphVb1l0.js → Checkbox-DDrmVC-u.js} +2 -2
  6. package/dist/{Checkbox-ZphVb1l0.js.map → Checkbox-DDrmVC-u.js.map} +1 -1
  7. package/dist/{Checkbox-CYNjFdtO.js → Checkbox-Dl4KTwEJ.js} +2 -2
  8. package/dist/{Checkbox-CYNjFdtO.js.map → Checkbox-Dl4KTwEJ.js.map} +1 -1
  9. package/dist/Checkbox.js +2 -2
  10. package/dist/{useInfiniteCombobox-BaYWUxjg.js → Combobox-B9nesJuc.js} +18 -185
  11. package/dist/Combobox-B9nesJuc.js.map +1 -0
  12. package/dist/Combobox.js +2 -1
  13. package/dist/Combobox.js.map +1 -1
  14. package/dist/{DateField-DnasO2rB.js → DateField-DXxPsRtf.js} +2 -2
  15. package/dist/{DateField-DnasO2rB.js.map → DateField-DXxPsRtf.js.map} +1 -1
  16. package/dist/DateField.js +1 -1
  17. package/dist/{DateFieldRange-Ba-8T-Nz.js → DateFieldRange-Xauviu1w.js} +6 -6
  18. package/dist/DateFieldRange-Xauviu1w.js.map +1 -0
  19. package/dist/DateFieldRange.js +1 -1
  20. package/dist/{DateFieldSingle-BBu5Hi9c.js → DateFieldSingle-yLnwpVzd.js} +4 -4
  21. package/dist/{DateFieldSingle-BBu5Hi9c.js.map → DateFieldSingle-yLnwpVzd.js.map} +1 -1
  22. package/dist/DateFieldSingle.js +1 -1
  23. package/dist/Dnd.js +1 -1
  24. package/dist/DndSort.js +1 -1
  25. package/dist/{ListView-DEAMQopB.js → ListView-pb3rIcze.js} +2 -2
  26. package/dist/{ListView-DEAMQopB.js.map → ListView-pb3rIcze.js.map} +1 -1
  27. package/dist/ListView.js +1 -1
  28. package/dist/{SearchField-BKXkoWPs.js → SearchField-Bb0uObwG.js} +2 -2
  29. package/dist/{SearchField-BKXkoWPs.js.map → SearchField-Bb0uObwG.js.map} +1 -1
  30. package/dist/SearchField.js +1 -1
  31. package/dist/{SelectCard-BWh8Yp7T.js → SelectCard-BTYZg9TG.js} +2 -2
  32. package/dist/{SelectCard-BWh8Yp7T.js.map → SelectCard-BTYZg9TG.js.map} +1 -1
  33. package/dist/SelectCard.js +1 -1
  34. package/dist/Toolbar-D4zuUFhb.js +2077 -0
  35. package/dist/Toolbar-D4zuUFhb.js.map +1 -0
  36. package/dist/Toolbar.css +139 -28
  37. package/dist/Toolbar.d.ts +3 -3
  38. package/dist/Toolbar.js +1 -1
  39. package/dist/beta/components/Toolbar/Filters/FilterButton.d.ts +30 -0
  40. package/dist/beta/components/Toolbar/Filters/FilterDateRange.d.ts +37 -0
  41. package/dist/beta/components/Toolbar/Filters/FilterDateSingle.d.ts +30 -0
  42. package/dist/beta/components/Toolbar/Filters/FilterDrawer.d.ts +15 -0
  43. package/dist/beta/components/Toolbar/Filters/FilterGroup.d.ts +25 -0
  44. package/dist/beta/components/Toolbar/Filters/FilterItemWrapper.d.ts +24 -0
  45. package/dist/beta/components/Toolbar/Filters/FilterSelect.d.ts +29 -0
  46. package/dist/beta/components/Toolbar/Filters/FilterToggleButton.d.ts +24 -0
  47. package/dist/beta/components/Toolbar/Filters/internal/FilterGroupContext.d.ts +40 -0
  48. package/dist/beta/components/Toolbar/Filters/internal/types.d.ts +130 -0
  49. package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +40 -0
  50. package/dist/beta/components/Toolbar/Filters/internal/utils/test.d.ts +57 -0
  51. package/dist/beta/components/Toolbar/Toolbar.d.ts +302 -0
  52. package/dist/beta/components/Toolbar/ToolbarButton.d.ts +41 -0
  53. package/dist/beta/components/Toolbar/ToolbarButtonLink.d.ts +43 -0
  54. package/dist/beta/components/Toolbar/ToolbarButtonToggle.d.ts +42 -0
  55. package/dist/beta/components/Toolbar/ToolbarControlGroup.d.ts +20 -0
  56. package/dist/beta/components/Toolbar/ToolbarSearchField.d.ts +20 -0
  57. package/dist/beta/components/Toolbar/ToolbarSelect.d.ts +108 -0
  58. package/dist/beta/components/Toolbar/index.d.ts +9 -0
  59. package/dist/beta/components/Toolbar/internal/ToolbarItemOverflowContext.d.ts +19 -0
  60. package/dist/beta/components/Toolbar/internal/ToolbarItemWrapper.d.ts +40 -0
  61. package/dist/beta/components/Toolbar/internal/ToolbarOverflowContext.d.ts +35 -0
  62. package/dist/beta/components/Toolbar/internal/ToolbarOverflowMenu.d.ts +29 -0
  63. package/dist/beta/components/Toolbar/internal/utils/accessibility.d.ts +26 -0
  64. package/dist/beta/components/Toolbar/internal/utils/test.d.ts +29 -0
  65. package/dist/beta/components/Toolbar/types.d.ts +50 -0
  66. package/dist/beta/components/index.d.ts +1 -0
  67. package/dist/beta/index.d.ts +1 -0
  68. package/dist/beta.d.ts +2 -0
  69. package/dist/beta.js +2 -0
  70. package/dist/beta.js.map +1 -0
  71. package/dist/components/Combobox/ComboboxTypes.d.ts +8 -0
  72. package/dist/components/DateFieldRange/internal/DateFieldRangeCalendar.d.ts +1 -1
  73. package/dist/components/Dialog/index.d.ts +1 -1
  74. package/dist/{indeterminate_check_box-Bg24oeHy.js → indeterminate_check_box-RY9zr3xS.js} +17 -17
  75. package/dist/{indeterminate_check_box-Bg24oeHy.js.map → indeterminate_check_box-RY9zr3xS.js.map} +1 -1
  76. package/dist/indeterminate_check_box.css +72 -66
  77. package/dist/{index-CqdP5W00.js → index-V5Ez2gq_.js} +2 -2
  78. package/dist/{index-CqdP5W00.js.map → index-V5Ez2gq_.js.map} +1 -1
  79. package/dist/index.css +125 -26
  80. package/dist/index.js +756 -24
  81. package/dist/index.js.map +1 -1
  82. package/dist/index2.css +88 -105
  83. package/dist/internal/hooks/index.d.ts +1 -0
  84. package/dist/internal/hooks/useContainerQuery/index.d.ts +1 -0
  85. package/dist/internal/hooks/useContainerQuery/useContainerQuery.d.ts +46 -0
  86. package/dist/{useDateFieldOrchestration-DPLftOxu.js → useDateFieldOrchestration-BNJCsRkS.js} +2 -2
  87. package/dist/{useDateFieldOrchestration-DPLftOxu.js.map → useDateFieldOrchestration-BNJCsRkS.js.map} +1 -1
  88. package/dist/useInfiniteCombobox-WcRgC9p6.js +179 -0
  89. package/dist/useInfiniteCombobox-WcRgC9p6.js.map +1 -0
  90. package/dist/useIntersectionObserver-BEmMDO3P.js +70 -0
  91. package/dist/useIntersectionObserver-BEmMDO3P.js.map +1 -0
  92. package/package.json +2 -1
  93. package/dist/DateFieldRange-Ba-8T-Nz.js.map +0 -1
  94. package/dist/Toolbar-DK7tXy_W.js +0 -807
  95. package/dist/Toolbar-DK7tXy_W.js.map +0 -1
  96. package/dist/useInfiniteCombobox-BaYWUxjg.js.map +0 -1
  97. /package/dist/{useInfiniteCombobox.css → Combobox.css} +0 -0
@@ -0,0 +1,57 @@
1
+ import { Filter, BooleanFilter, CustomFilter, SingleSelectFilter, MultiSelectFilter, DateFilter, DateRangeFilter } from '../types';
2
+ export type TestValue = {
3
+ id: number;
4
+ label: string;
5
+ value: string;
6
+ };
7
+ export declare const mockFilterOptions: {
8
+ id: number;
9
+ label: string;
10
+ value: string;
11
+ }[];
12
+ export declare const defaultMockBooleanFilter: BooleanFilter;
13
+ export declare const defaultMockCustomFilter: CustomFilter<TestValue>;
14
+ export declare const defaultMockSingleSelectFilter: SingleSelectFilter<{
15
+ id: string;
16
+ label: string;
17
+ }>;
18
+ export declare const defaultMockMultiSelectFilter: MultiSelectFilter<{
19
+ id: string;
20
+ label: string;
21
+ }>;
22
+ export declare const defaultMockDateFilter: DateFilter;
23
+ export declare const defaultMockDateRangeFilter: DateRangeFilter;
24
+ export declare const defaultMockFilters: (BooleanFilter | DateFilter | DateRangeFilter | CustomFilter<TestValue> | SingleSelectFilter<{
25
+ id: string;
26
+ label: string;
27
+ }> | MultiSelectFilter<{
28
+ id: string;
29
+ label: string;
30
+ }>)[];
31
+ export declare function createMockFilter<T = unknown>(overrides?: Partial<Filter | CustomFilter<T> | SingleSelectFilter<T>>): Filter | CustomFilter<T> | SingleSelectFilter<T>;
32
+ export declare function createMockFilterContext(filters?: Filter[], contextOverrides?: {}): {
33
+ filterGroupRef: {
34
+ current: HTMLDivElement;
35
+ };
36
+ filters: Filter[];
37
+ updateFilter: import('vitest').Mock<(...args: any[]) => any>;
38
+ onFilterChange: import('vitest').Mock<(...args: any[]) => any>;
39
+ hiddenFilters: never[];
40
+ addHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
41
+ removeHiddenFilter: import('vitest').Mock<(...args: any[]) => any>;
42
+ controlledFiltering: boolean;
43
+ };
44
+ export declare function createMockBooleanFilter(overrides?: Partial<BooleanFilter>): BooleanFilter;
45
+ export declare function createMockCustomFilter<T = unknown>(overrides?: Partial<CustomFilter<T>>): CustomFilter<T>;
46
+ export declare function createMockSingleSelectFilter<T = {
47
+ id: string;
48
+ label: string;
49
+ }>(overrides?: Partial<SingleSelectFilter<T>>): SingleSelectFilter<T>;
50
+ export declare function createMockMultiSelectFilter<T = {
51
+ id: string;
52
+ label: string;
53
+ }>(overrides?: Partial<MultiSelectFilter<T>>): MultiSelectFilter<T>;
54
+ export declare function createMockDateFilter(overrides?: Partial<DateFilter>): DateFilter;
55
+ export declare function createMockDateRangeFilter(overrides?: Partial<DateRangeFilter>): DateRangeFilter;
56
+ export declare const setupDesktopContainer: () => void;
57
+ export declare const setupMobileContainer: () => void;
@@ -0,0 +1,302 @@
1
+ import { ToolbarOverflowTypes } from './types';
2
+ import { ComponentPropsWithoutRef, ReactElement } from 'react';
3
+ import { LayoutUtilProps } from '../../../types';
4
+ /**
5
+ * Props for the Toolbar component
6
+ * @extends ComponentPropsWithoutRef<"div">
7
+ * @extends LayoutUtilProps
8
+ */
9
+ export type ToolbarProps = ComponentPropsWithoutRef<"div"> & LayoutUtilProps & {
10
+ /**
11
+ * Description of the content this toolbar is associated with, used for accessibility
12
+ */
13
+ associatedContent: string;
14
+ /**
15
+ * Orientation of the toolbar
16
+ * @default horizontal
17
+ */
18
+ direction?: "vertical" | "horizontal";
19
+ /**
20
+ * How to handle overflow when items don't fit
21
+ * @default wrap
22
+ */
23
+ overflow?: ToolbarOverflowTypes;
24
+ /**
25
+ * Additional items to display in the overflow menu
26
+ */
27
+ additionalItems?: ReactElement[];
28
+ };
29
+ /**
30
+ * Toolbar component for grouping related interactive elements with anvil2 tracking.
31
+ *
32
+ * Features:
33
+ * - Horizontal or vertical orientation
34
+ * - Overflow handling with wrap or collapse behavior
35
+ * - Keyboard navigation following ARIA best practices
36
+ * - Screen reader announcements and accessibility
37
+ * - Automatic overflow menu for collapsed items
38
+ * - Support for buttons, toggles, selects, and links
39
+ * - Layout utilities for positioning and spacing
40
+ * - Context-based state management for child components
41
+ * - Automatic tracking ID generation for analytics
42
+ * - Integration with anvil2 tracking system
43
+ *
44
+ * @example
45
+ * <Toolbar associatedContent="document editor" overflow="collapse">
46
+ * <Toolbar.Button icon={BoldIcon} aria-label="Bold" />
47
+ * <Toolbar.ButtonToggle icon={ItalicIcon} aria-label="Italic" />
48
+ * <Toolbar.Select
49
+ * items={fontOptions}
50
+ * selected="arial"
51
+ * accessibleLabel="Font family"
52
+ * />
53
+ * </Toolbar>
54
+ */
55
+ export declare const ToolbarElement: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
56
+ /**
57
+ * Description of the content this toolbar is associated with, used for accessibility
58
+ */
59
+ associatedContent: string;
60
+ /**
61
+ * Orientation of the toolbar
62
+ * @default horizontal
63
+ */
64
+ direction?: "vertical" | "horizontal";
65
+ /**
66
+ * How to handle overflow when items don't fit
67
+ * @default wrap
68
+ */
69
+ overflow?: ToolbarOverflowTypes;
70
+ /**
71
+ * Additional items to display in the overflow menu
72
+ */
73
+ additionalItems?: ReactElement[];
74
+ } & import('react').RefAttributes<HTMLDivElement>>;
75
+ /**
76
+ * Toolbar component for grouping related interactive elements.
77
+ *
78
+ * Features:
79
+ * - Horizontal or vertical orientation
80
+ * - Overflow handling with wrap or collapse behavior
81
+ * - Keyboard navigation following ARIA best practices
82
+ * - Screen reader announcements and accessibility
83
+ * - Automatic overflow menu for collapsed items
84
+ * - Support for buttons, toggles, selects, and links
85
+ * - Layout utilities for positioning and spacing
86
+ * - Context-based state management for child components
87
+ *
88
+ * @example
89
+ * <Toolbar associatedContent="document editor" overflow="collapse">
90
+ * <Toolbar.Button icon={BoldIcon} aria-label="Bold" />
91
+ * <Toolbar.ButtonToggle icon={ItalicIcon} aria-label="Italic" />
92
+ * <Toolbar.Select
93
+ * items={fontOptions}
94
+ * selected="arial"
95
+ * accessibleLabel="Font family"
96
+ * />
97
+ * </Toolbar>
98
+ *
99
+ * @example
100
+ * <Toolbar associatedContent="data table" overflow="wrap">
101
+ * <Toolbar.Search placeholder="Search..." />
102
+ * <Toolbar.Filters
103
+ * filters={filters}
104
+ * onFilterChange={handleFilter}
105
+ * controlledFiltering={true}
106
+ * />
107
+ * <Toolbar.ControlGroup aria-label="Actions">
108
+ * <Toolbar.Button icon={AddIcon} aria-label="Add item" />
109
+ * <Toolbar.Button icon={ExportIcon} aria-label="Export" />
110
+ * </Toolbar.ControlGroup>
111
+ * </Toolbar>
112
+ */
113
+ export declare const Toolbar: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
114
+ /**
115
+ * Description of the content this toolbar is associated with, used for accessibility
116
+ */
117
+ associatedContent: string;
118
+ /**
119
+ * Orientation of the toolbar
120
+ * @default horizontal
121
+ */
122
+ direction?: "vertical" | "horizontal";
123
+ /**
124
+ * How to handle overflow when items don't fit
125
+ * @default wrap
126
+ */
127
+ overflow?: ToolbarOverflowTypes;
128
+ /**
129
+ * Additional items to display in the overflow menu
130
+ */
131
+ additionalItems?: ReactElement[];
132
+ } & import('react').RefAttributes<HTMLDivElement>> & {
133
+ /**
134
+ * ToolbarButton component for standard clickable actions within a toolbar with anvil2 tracking.
135
+ *
136
+ * Features:
137
+ * - Designed specifically for toolbar integration
138
+ * - Consistent styling with other toolbar items
139
+ * - Automatic tooltip for icon-only buttons
140
+ * - Overflow menu support
141
+ * - Accessibility enforcement for aria-labels
142
+ * - Small size optimized for toolbar layout
143
+ * - Ghost and primary appearance options
144
+ * - Automatic tracking ID generation for analytics
145
+ *
146
+ * @example
147
+ * <Toolbar.Button icon={BoldIcon} aria-label="Bold text" />
148
+ *
149
+ * @example
150
+ * <Toolbar.Button appearance="primary">
151
+ * Save
152
+ * </Toolbar.Button>
153
+ */
154
+ Button: import('react').ForwardRefExoticComponent<import('./ToolbarButton').ToolbarButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
155
+ /**
156
+ * ToolbarButtonToggle component for toggleable actions within a toolbar with anvil2 tracking.
157
+ *
158
+ * Features:
159
+ * - Toggle state management
160
+ * - Designed specifically for toolbar integration
161
+ * - Consistent styling with other toolbar items
162
+ * - Overflow menu support
163
+ * - Accessibility enforcement for aria-labels
164
+ * - Small size optimized for toolbar layout
165
+ * - Ghost and primary appearance options
166
+ * - Automatic tracking ID generation for analytics
167
+ *
168
+ * @example
169
+ * <Toolbar.ButtonToggle icon={BoldIcon} aria-label="Bold" checked={isBold} />
170
+ */
171
+ ButtonToggle: import('react').ForwardRefExoticComponent<import('./ToolbarButtonToggle').ToolbarButtonToggleProps & import('react').RefAttributes<HTMLButtonElement>>;
172
+ /**
173
+ * ToolbarButtonLink component for link actions within a toolbar with anvil2 tracking.
174
+ *
175
+ * Features:
176
+ * - Link functionality with href support
177
+ * - Designed specifically for toolbar integration
178
+ * - Consistent styling with other toolbar items
179
+ * - Overflow menu support
180
+ * - Accessibility enforcement for aria-labels
181
+ * - Small size optimized for toolbar layout
182
+ * - Ghost and primary appearance options
183
+ * - Automatic tracking ID generation for analytics
184
+ *
185
+ * @example
186
+ * <Toolbar.ButtonLink href="/help">
187
+ * Help
188
+ * </Toolbar.ButtonLink>
189
+ */
190
+ ButtonLink: import('react').ForwardRefExoticComponent<import('./ToolbarButtonLink').ToolbarButtonLinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
191
+ /**
192
+ * ToolbarSelect component provides a dropdown selector within a toolbar with anvil2 tracking.
193
+ *
194
+ * Features:
195
+ * - Dropdown menu with selectable options
196
+ * - Controlled and uncontrolled usage patterns
197
+ * - Automatic overflow menu integration
198
+ * - Accessibility support with proper ARIA labels
199
+ * - Small size optimized for toolbar layout
200
+ * - Ghost and primary appearance options
201
+ * - Dropdown arrow icon indicator
202
+ * - Listbox integration for keyboard navigation
203
+ * - Automatic tracking ID generation for analytics
204
+ *
205
+ * @example
206
+ * <Toolbar.Select
207
+ * items={fontOptions}
208
+ * selected="arial"
209
+ * accessibleLabel="Font family"
210
+ * onChange={(id) => setFont(id)}
211
+ * />
212
+ */
213
+ Select: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & LayoutUtilProps & {
214
+ appearance?: import('../../..').ButtonAppearance;
215
+ size?: Extract<import('../../..').Size, "small" | "medium" | "large">;
216
+ loading?: boolean;
217
+ } & {
218
+ children?: ComponentPropsWithoutRef<"button">["children"];
219
+ icon?: import('../../..').IconProps["svg"] | {
220
+ after: import('../../..').IconProps["svg"];
221
+ } | {
222
+ before: import('../../..').IconProps["svg"];
223
+ };
224
+ } & import('../../..').DataTrackingId & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & LayoutUtilProps & {
225
+ appearance?: import('../../..').ButtonAppearance;
226
+ size?: Extract<import('../../..').Size, "small" | "medium" | "large">;
227
+ loading?: boolean;
228
+ } & {
229
+ children?: never;
230
+ icon?: import('../../..').IconProps["svg"];
231
+ } & import('../../..').DataTrackingId & import('react').RefAttributes<HTMLButtonElement>, "ref">, "onChange" | "appearance"> & {
232
+ appearance?: import('./types').ToolbarItemAppearance;
233
+ onChange?: (optionId: string) => void;
234
+ selected?: string;
235
+ items: (Record<string, unknown> & {
236
+ id: string;
237
+ } & {
238
+ label: string;
239
+ disabled?: boolean;
240
+ })[];
241
+ accessibleLabel: string;
242
+ } & import('../../..').DataTrackingId & import('react').RefAttributes<HTMLButtonElement>>;
243
+ /**
244
+ * FilterGroup component displays a group of filters with toggles and a clear button.
245
+ * Also contains the FilterDrawer for additional filter options.
246
+ *
247
+ * Features:
248
+ * - Renders filter toggles and popovers for all filter types
249
+ * - Supports controlled and uncontrolled filtering
250
+ * - Integrates with FilterDrawer for batch filter editing
251
+ * - Provides a clear all filters button
252
+ * - Handles overflow and hidden filters
253
+ * - Shares filter state via context for child components
254
+ * - Supports boolean, custom, single-select, multi-select, date, and date range filter types
255
+ * - Date filters include calendar popup for easy selection
256
+ * - Date range filters support start and end date selection
257
+ *
258
+ * @example
259
+ * <Toolbar.Filters
260
+ * filters={filters}
261
+ * onFilterChange={handleFilter}
262
+ * controlledFiltering={true}
263
+ * />
264
+ */
265
+ Filters: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
266
+ filters: import('./Filters/internal/types').Filter[];
267
+ onFilterChange?: (filters: import('./Filters/internal/types').Filter[]) => void;
268
+ controlledFiltering?: boolean;
269
+ } & import('react').RefAttributes<HTMLDivElement>>;
270
+ /**
271
+ * ToolbarControlGroup component provides a flex container for grouping related toolbar controls.
272
+ * Can be used for filters, buttons, or other toolbar items.
273
+ *
274
+ * Features:
275
+ * - Groups related toolbar controls in a flex container
276
+ * - Supports accessibility with aria-label
277
+ * - Handles overflow and wrapping based on toolbar context
278
+ * - Integrates with layout utilities for spacing and alignment
279
+ *
280
+ * @example
281
+ * <Toolbar.ControlGroup aria-label="Formatting controls">
282
+ * <Toolbar.Button icon={BoldIcon} aria-label="Bold" />
283
+ * <Toolbar.Button icon={ItalicIcon} aria-label="Italic" />
284
+ * </Toolbar.ControlGroup>
285
+ */
286
+ ControlGroup: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
287
+ "aria-label"?: string;
288
+ } & import('react').RefAttributes<HTMLDivElement>>;
289
+ /**
290
+ * ToolbarSearchField component renders a small-sized search field for use in toolbars.
291
+ *
292
+ * Features:
293
+ * - Renders a search field styled for toolbar usage
294
+ * - Always uses small size for compact layout
295
+ * - Supports all SearchField props except size
296
+ * - Integrates with toolbar layouts and accessibility
297
+ *
298
+ * @example
299
+ * <Toolbar.Search placeholder="Search..." />
300
+ */
301
+ Search: import('react').ForwardRefExoticComponent<import('./ToolbarSearchField').ToolbarSearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
302
+ };
@@ -0,0 +1,41 @@
1
+ import { ButtonProps } from '../../../components/Button';
2
+ import { ToolbarItemAppearance, WithAriaLabelEnforcement } from './types';
3
+ import { DataTrackingId } from '../../../types';
4
+ /**
5
+ * Base props for the ToolbarButton component
6
+ * @extends Omit<ButtonProps, "appearance" | "aria-label" | "children">
7
+ */
8
+ type ToolbarButtonBaseProps = Omit<ButtonProps, "appearance" | "aria-label" | "children"> & {
9
+ /**
10
+ * Visual appearance of the button
11
+ * @default ghost
12
+ */
13
+ appearance?: ToolbarItemAppearance;
14
+ };
15
+ /**
16
+ * Props for the ToolbarButton component
17
+ * @extends WithAriaLabelEnforcement<ToolbarButtonBaseProps>
18
+ */
19
+ export type ToolbarButtonProps = WithAriaLabelEnforcement<ToolbarButtonBaseProps> & DataTrackingId;
20
+ /**
21
+ * ToolbarButton component for standard clickable actions within a toolbar.
22
+ *
23
+ * Features:
24
+ * - Designed specifically for toolbar integration
25
+ * - Consistent styling with other toolbar items
26
+ * - Automatic tooltip for icon-only buttons
27
+ * - Overflow menu support
28
+ * - Accessibility enforcement for aria-labels
29
+ * - Small size optimized for toolbar layout
30
+ * - Ghost and primary appearance options
31
+ *
32
+ * @example
33
+ * <ToolbarButton icon={BoldIcon} aria-label="Bold text" />
34
+ *
35
+ * @example
36
+ * <ToolbarButton appearance="primary">
37
+ * Save
38
+ * </ToolbarButton>
39
+ */
40
+ export declare const ToolbarButton: import('react').ForwardRefExoticComponent<ToolbarButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
41
+ export {};
@@ -0,0 +1,43 @@
1
+ import { ButtonLinkProps } from '../../../components/ButtonLink';
2
+ import { ToolbarItemAppearance, WithAriaLabelEnforcement } from './types';
3
+ import { DataTrackingId } from '../../../types';
4
+ /**
5
+ * Base props for the ToolbarButtonLink component
6
+ * @extends Omit<ButtonLinkProps, "appearance" | "aria-label" | "children">
7
+ */
8
+ type ToolbarButtonLinkBaseProps = Omit<ButtonLinkProps, "appearance" | "aria-label" | "children"> & {
9
+ /**
10
+ * Visual appearance of the button link
11
+ * @default ghost
12
+ */
13
+ appearance?: ToolbarItemAppearance;
14
+ };
15
+ /**
16
+ * Props for the ToolbarButtonLink component
17
+ * @extends WithAriaLabelEnforcement<ToolbarButtonLinkBaseProps>
18
+ */
19
+ export type ToolbarButtonLinkProps = WithAriaLabelEnforcement<ToolbarButtonLinkBaseProps> & DataTrackingId;
20
+ /**
21
+ * ToolbarButtonLink component for link actions within a toolbar.
22
+ *
23
+ * Features:
24
+ * - Link functionality with href support
25
+ * - Designed specifically for toolbar integration
26
+ * - Consistent styling with other toolbar items
27
+ * - Automatic tooltip for icon-only links
28
+ * - Overflow menu support
29
+ * - Accessibility enforcement for aria-labels
30
+ * - Small size optimized for toolbar layout
31
+ * - Ghost and primary appearance options
32
+ * - Proper anchor element semantics
33
+ *
34
+ * @example
35
+ * <ToolbarButtonLink href="/help">
36
+ * Help
37
+ * </ToolbarButtonLink>
38
+ *
39
+ * @example
40
+ * <ToolbarButtonLink icon={ExternalLinkIcon} href="/docs" aria-label="Documentation" />
41
+ */
42
+ export declare const ToolbarButtonLink: import('react').ForwardRefExoticComponent<ToolbarButtonLinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
43
+ export {};
@@ -0,0 +1,42 @@
1
+ import { ButtonToggleProps } from '../../../components/ButtonToggle';
2
+ import { WithAriaLabelEnforcement } from './types';
3
+ import { DataTrackingId } from '../../../types';
4
+ /**
5
+ * Base props for the ToolbarButtonToggle component
6
+ * @extends Omit<ButtonToggleProps, "aria-label" | "children">
7
+ */
8
+ type ToolbarButtonToggleBaseProps = Omit<ButtonToggleProps, "aria-label" | "children"> & {
9
+ /**
10
+ * Is this toolbar control a filter?
11
+ */
12
+ isFilter?: boolean;
13
+ };
14
+ /**
15
+ * Props for the ToolbarButtonToggle component
16
+ * @extends WithAriaLabelEnforcement<ToolbarButtonToggleBaseProps>
17
+ */
18
+ export type ToolbarButtonToggleProps = WithAriaLabelEnforcement<ToolbarButtonToggleBaseProps> & DataTrackingId;
19
+ /**
20
+ * ToolbarButtonToggle component for toggleable actions within a toolbar.
21
+ *
22
+ * Features:
23
+ * - Toggle state management (on/off)
24
+ * - Designed specifically for toolbar integration
25
+ * - Consistent styling with other toolbar items
26
+ * - Automatic tooltip for icon-only toggles
27
+ * - Overflow menu support
28
+ * - Accessibility enforcement for aria-labels
29
+ * - Small size optimized for toolbar layout
30
+ * - Visual feedback for toggle state
31
+ * - Proper ARIA attributes for toggle semantics
32
+ *
33
+ * @example
34
+ * <ToolbarButtonToggle icon={BoldIcon} aria-label="Bold" checked={isBold} />
35
+ *
36
+ * @example
37
+ * <ToolbarButtonToggle checked={isItalic}>
38
+ * Italic
39
+ * </ToolbarButtonToggle>
40
+ */
41
+ export declare const ToolbarButtonToggle: import('react').ForwardRefExoticComponent<ToolbarButtonToggleProps & import('react').RefAttributes<HTMLButtonElement>>;
42
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { LayoutUtilProps } from '../../../types';
3
+ /**
4
+ * Props for the ToolbarControlGroup component
5
+ *
6
+ * @extends ComponentPropsWithoutRef<'div'>
7
+ * @extends LayoutUtilProps
8
+ */
9
+ export type ToolbarControlGroupProps = ComponentPropsWithoutRef<"div"> & LayoutUtilProps & {
10
+ /**
11
+ * Accessible label for the control group
12
+ */
13
+ "aria-label"?: string;
14
+ };
15
+ export declare const ToolbarControlGroup: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & LayoutUtilProps & {
16
+ /**
17
+ * Accessible label for the control group
18
+ */
19
+ "aria-label"?: string;
20
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,20 @@
1
+ import { SearchFieldProps } from '../../../components/SearchField';
2
+ /**
3
+ * Props for the ToolbarSearchField component
4
+ *
5
+ * @extends Omit<SearchFieldProps, "size">
6
+ */
7
+ export type ToolbarSearchFieldProps = Omit<SearchFieldProps, "size">;
8
+ /**
9
+ * ToolbarSearchField component renders a small-sized search field for use in toolbars.
10
+ *
11
+ * Features:
12
+ * - Renders a search field styled for toolbar usage
13
+ * - Always uses small size for compact layout
14
+ * - Supports all SearchField props except size
15
+ * - Integrates with toolbar layouts and accessibility
16
+ *
17
+ * @example
18
+ * <ToolbarSearchField placeholder="Search..." />
19
+ */
20
+ export declare const ToolbarSearchField: import('react').ForwardRefExoticComponent<ToolbarSearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,108 @@
1
+ import { ListboxItemType } from '../../../components/Listbox';
2
+ import { default as Popover } from '../../../components/Popover';
3
+ import { ToolbarItemAppearance } from './types';
4
+ import { DataTrackingId } from '../../../types';
5
+ /**
6
+ * Type for items in the ToolbarSelect dropdown
7
+ * @extends ItemType<T & { id: string }>
8
+ */
9
+ type ToolbarSelectItem<T = Record<string, unknown>> = ListboxItemType<T & {
10
+ id: string;
11
+ }>;
12
+ /**
13
+ * Props for the ToolbarSelect component
14
+ * @extends Omit<React.ComponentPropsWithoutRef<typeof Popover.Button>, "appearance" | "onChange">
15
+ */
16
+ export type ToolbarSelectProps<T = Record<string, unknown>> = Omit<React.ComponentPropsWithoutRef<typeof Popover.Button>, "appearance" | "onChange"> & {
17
+ /**
18
+ * Visual appearance of the select button
19
+ * @default ghost
20
+ */
21
+ appearance?: ToolbarItemAppearance;
22
+ /**
23
+ * Callback function when selection changes
24
+ */
25
+ onChange?: (optionId: string) => void;
26
+ /**
27
+ * Currently selected item ID (controlled mode)
28
+ */
29
+ selected?: string;
30
+ /**
31
+ * Array of selectable items
32
+ */
33
+ items: ToolbarSelectItem<T>[];
34
+ /**
35
+ * Accessible label for the select component
36
+ */
37
+ accessibleLabel: string;
38
+ } & DataTrackingId;
39
+ /**
40
+ * ToolbarSelect component provides a dropdown selector within a toolbar.
41
+ *
42
+ * Features:
43
+ * - Dropdown menu with selectable options
44
+ * - Controlled and uncontrolled usage patterns
45
+ * - Automatic overflow menu integration
46
+ * - Accessibility support with proper ARIA labels
47
+ * - Small size optimized for toolbar layout
48
+ * - Ghost and primary appearance options
49
+ * - Dropdown arrow icon indicator
50
+ * - Listbox integration for keyboard navigation
51
+ *
52
+ * @example
53
+ * <ToolbarSelect
54
+ * items={fontOptions}
55
+ * selected="arial"
56
+ * accessibleLabel="Font family"
57
+ * onChange={(id) => setFont(id)}
58
+ * />
59
+ *
60
+ * @example
61
+ * <ToolbarSelect
62
+ * appearance="primary"
63
+ * items={colorOptions}
64
+ * accessibleLabel="Text color"
65
+ * />
66
+ */
67
+ export declare const ToolbarSelect: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & import('../../..').LayoutUtilProps & {
68
+ appearance?: import('../../..').ButtonAppearance;
69
+ size?: Extract<import('../../..').Size, "small" | "medium" | "large">;
70
+ loading?: boolean;
71
+ } & {
72
+ children?: import('react').ComponentPropsWithoutRef<"button">["children"];
73
+ icon?: import('../../..').IconProps["svg"] | {
74
+ after: import('../../..').IconProps["svg"];
75
+ } | {
76
+ before: import('../../..').IconProps["svg"];
77
+ };
78
+ } & DataTrackingId & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & import('../../..').LayoutUtilProps & {
79
+ appearance?: import('../../..').ButtonAppearance;
80
+ size?: Extract<import('../../..').Size, "small" | "medium" | "large">;
81
+ loading?: boolean;
82
+ } & {
83
+ children?: never;
84
+ icon?: import('../../..').IconProps["svg"];
85
+ } & DataTrackingId & import('react').RefAttributes<HTMLButtonElement>, "ref">, "onChange" | "appearance"> & {
86
+ /**
87
+ * Visual appearance of the select button
88
+ * @default ghost
89
+ */
90
+ appearance?: ToolbarItemAppearance;
91
+ /**
92
+ * Callback function when selection changes
93
+ */
94
+ onChange?: (optionId: string) => void;
95
+ /**
96
+ * Currently selected item ID (controlled mode)
97
+ */
98
+ selected?: string;
99
+ /**
100
+ * Array of selectable items
101
+ */
102
+ items: ToolbarSelectItem<Record<string, unknown>>[];
103
+ /**
104
+ * Accessible label for the select component
105
+ */
106
+ accessibleLabel: string;
107
+ } & DataTrackingId & import('react').RefAttributes<HTMLButtonElement>>;
108
+ export {};
@@ -0,0 +1,9 @@
1
+ export * from './Toolbar';
2
+ export { Toolbar as default, type ToolbarProps } from './Toolbar';
3
+ export { ToolbarButton, type ToolbarButtonProps } from './ToolbarButton';
4
+ export { ToolbarButtonToggle, type ToolbarButtonToggleProps, } from './ToolbarButtonToggle';
5
+ export { ToolbarButtonLink, type ToolbarButtonLinkProps, } from './ToolbarButtonLink';
6
+ export { ToolbarSelect, type ToolbarSelectProps } from './ToolbarSelect';
7
+ export { type ToolbarItemAppearance, type ToolbarOverflowTypes } from './types';
8
+ export { ToolbarControlGroup, type ToolbarControlGroupProps, } from './ToolbarControlGroup';
9
+ export { ToolbarSearchField, type ToolbarSearchFieldProps, } from './ToolbarSearchField';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Context for denoting if the current item is rendered in the overflow menu
3
+ */
4
+ type OverflowItemContextType = {
5
+ /**
6
+ * Whether the current item is rendered inside the overflow menu
7
+ */
8
+ isInOverflowMenu: boolean;
9
+ };
10
+ /**
11
+ * Context for managing overflow menu state
12
+ */
13
+ export declare const OverflowItemContext: import('react').Context<OverflowItemContextType>;
14
+ /**
15
+ * Hook for accessing overflow menu context
16
+ * @returns OverflowItemContextType - The overflow menu context
17
+ */
18
+ export declare const useOverFlowItemContext: () => OverflowItemContextType;
19
+ export {};