@servicetitan/anvil2 1.45.2 → 1.46.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.
- package/CHANGELOG.md +20 -0
- package/dist/{Calendar-BK861SAW.js → Calendar-BQ5F2ENO.js} +2 -2
- package/dist/{Calendar-BK861SAW.js.map → Calendar-BQ5F2ENO.js.map} +1 -1
- package/dist/Calendar.js +1 -1
- package/dist/{Checkbox-ZphVb1l0.js → Checkbox-DDrmVC-u.js} +2 -2
- package/dist/{Checkbox-ZphVb1l0.js.map → Checkbox-DDrmVC-u.js.map} +1 -1
- package/dist/{Checkbox-CYNjFdtO.js → Checkbox-Dl4KTwEJ.js} +2 -2
- package/dist/{Checkbox-CYNjFdtO.js.map → Checkbox-Dl4KTwEJ.js.map} +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/{useInfiniteCombobox-BaYWUxjg.js → Combobox-B9nesJuc.js} +18 -185
- package/dist/Combobox-B9nesJuc.js.map +1 -0
- package/dist/Combobox.js +2 -1
- package/dist/Combobox.js.map +1 -1
- package/dist/{DateField-DnasO2rB.js → DateField-DXxPsRtf.js} +2 -2
- package/dist/{DateField-DnasO2rB.js.map → DateField-DXxPsRtf.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DateFieldRange-Ba-8T-Nz.js → DateFieldRange-Xauviu1w.js} +6 -6
- package/dist/DateFieldRange-Xauviu1w.js.map +1 -0
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-BBu5Hi9c.js → DateFieldSingle-yLnwpVzd.js} +4 -4
- package/dist/{DateFieldSingle-BBu5Hi9c.js.map → DateFieldSingle-yLnwpVzd.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/Dnd.js +1 -1
- package/dist/DndSort.js +1 -1
- package/dist/{ListView-DEAMQopB.js → ListView-pb3rIcze.js} +2 -2
- package/dist/{ListView-DEAMQopB.js.map → ListView-pb3rIcze.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{Menu-C8we5CHP.js → Menu-DEVZz9xZ.js} +8 -3
- package/dist/Menu-DEVZz9xZ.js.map +1 -0
- package/dist/Menu.js +1 -1
- package/dist/{Page-cKXkjMmd.js → Page-BMDkbDcU.js} +2 -2
- package/dist/{Page-cKXkjMmd.js.map → Page-BMDkbDcU.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-ta8a2cJN.js → Pagination-BJsCppgW.js} +2 -2
- package/dist/{Pagination-ta8a2cJN.js.map → Pagination-BJsCppgW.js.map} +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/{SearchField-BKXkoWPs.js → SearchField-Bb0uObwG.js} +2 -2
- package/dist/{SearchField-BKXkoWPs.js.map → SearchField-Bb0uObwG.js.map} +1 -1
- package/dist/SearchField.js +1 -1
- package/dist/{SelectCard-BWh8Yp7T.js → SelectCard-BTYZg9TG.js} +2 -2
- package/dist/{SelectCard-BWh8Yp7T.js.map → SelectCard-BTYZg9TG.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/Toolbar-D4zuUFhb.js +2077 -0
- package/dist/Toolbar-D4zuUFhb.js.map +1 -0
- package/dist/Toolbar.css +139 -28
- package/dist/Toolbar.d.ts +3 -3
- package/dist/Toolbar.js +1 -1
- package/dist/assets/icons/st/gnav_legacy_search_filled.svg +1 -1
- package/dist/assets/icons/st/gnav_legacy_search_outline.svg +1 -1
- package/dist/beta/components/Toolbar/Filters/FilterButton.d.ts +30 -0
- package/dist/beta/components/Toolbar/Filters/FilterDateRange.d.ts +37 -0
- package/dist/beta/components/Toolbar/Filters/FilterDateSingle.d.ts +30 -0
- package/dist/beta/components/Toolbar/Filters/FilterDrawer.d.ts +15 -0
- package/dist/beta/components/Toolbar/Filters/FilterGroup.d.ts +25 -0
- package/dist/beta/components/Toolbar/Filters/FilterItemWrapper.d.ts +24 -0
- package/dist/beta/components/Toolbar/Filters/FilterSelect.d.ts +29 -0
- package/dist/beta/components/Toolbar/Filters/FilterToggleButton.d.ts +24 -0
- package/dist/beta/components/Toolbar/Filters/internal/FilterGroupContext.d.ts +40 -0
- package/dist/beta/components/Toolbar/Filters/internal/types.d.ts +130 -0
- package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +40 -0
- package/dist/beta/components/Toolbar/Filters/internal/utils/test.d.ts +57 -0
- package/dist/beta/components/Toolbar/Toolbar.d.ts +302 -0
- package/dist/beta/components/Toolbar/ToolbarButton.d.ts +41 -0
- package/dist/beta/components/Toolbar/ToolbarButtonLink.d.ts +43 -0
- package/dist/beta/components/Toolbar/ToolbarButtonToggle.d.ts +42 -0
- package/dist/beta/components/Toolbar/ToolbarControlGroup.d.ts +20 -0
- package/dist/beta/components/Toolbar/ToolbarSearchField.d.ts +20 -0
- package/dist/beta/components/Toolbar/ToolbarSelect.d.ts +108 -0
- package/dist/beta/components/Toolbar/index.d.ts +9 -0
- package/dist/beta/components/Toolbar/internal/ToolbarItemOverflowContext.d.ts +19 -0
- package/dist/beta/components/Toolbar/internal/ToolbarItemWrapper.d.ts +40 -0
- package/dist/beta/components/Toolbar/internal/ToolbarOverflowContext.d.ts +35 -0
- package/dist/beta/components/Toolbar/internal/ToolbarOverflowMenu.d.ts +29 -0
- package/dist/beta/components/Toolbar/internal/utils/accessibility.d.ts +26 -0
- package/dist/beta/components/Toolbar/internal/utils/test.d.ts +29 -0
- package/dist/beta/components/Toolbar/types.d.ts +50 -0
- package/dist/beta/components/index.d.ts +1 -0
- package/dist/beta/index.d.ts +1 -0
- package/dist/beta.d.ts +2 -0
- package/dist/beta.js +2 -0
- package/dist/beta.js.map +1 -0
- package/dist/components/Combobox/ComboboxTypes.d.ts +8 -0
- package/dist/components/DateFieldRange/internal/DateFieldRangeCalendar.d.ts +1 -1
- package/dist/components/Dialog/index.d.ts +1 -1
- package/dist/{indeterminate_check_box-Bg24oeHy.js → indeterminate_check_box-RY9zr3xS.js} +17 -17
- package/dist/{indeterminate_check_box-Bg24oeHy.js.map → indeterminate_check_box-RY9zr3xS.js.map} +1 -1
- package/dist/indeterminate_check_box.css +72 -66
- package/dist/{index-CqdP5W00.js → index-V5Ez2gq_.js} +2 -2
- package/dist/{index-CqdP5W00.js.map → index-V5Ez2gq_.js.map} +1 -1
- package/dist/index.css +125 -26
- package/dist/index.js +759 -27
- package/dist/index.js.map +1 -1
- package/dist/index2.css +88 -105
- package/dist/internal/hooks/index.d.ts +1 -0
- package/dist/internal/hooks/useContainerQuery/index.d.ts +1 -0
- package/dist/internal/hooks/useContainerQuery/useContainerQuery.d.ts +46 -0
- package/dist/{useDateFieldOrchestration-DPLftOxu.js → useDateFieldOrchestration-BNJCsRkS.js} +2 -2
- package/dist/{useDateFieldOrchestration-DPLftOxu.js.map → useDateFieldOrchestration-BNJCsRkS.js.map} +1 -1
- package/dist/useInfiniteCombobox-WcRgC9p6.js +179 -0
- package/dist/useInfiniteCombobox-WcRgC9p6.js.map +1 -0
- package/dist/useIntersectionObserver-BEmMDO3P.js +70 -0
- package/dist/useIntersectionObserver-BEmMDO3P.js.map +1 -0
- package/package.json +2 -1
- package/dist/DateFieldRange-Ba-8T-Nz.js.map +0 -1
- package/dist/Menu-C8we5CHP.js.map +0 -1
- package/dist/Toolbar-DK7tXy_W.js +0 -807
- package/dist/Toolbar-DK7tXy_W.js.map +0 -1
- package/dist/useInfiniteCombobox-BaYWUxjg.js.map +0 -1
- /package/dist/{useInfiniteCombobox.css → Combobox.css} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Filter, FilterValue } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of filters that are currently active (i.e., have a value set).
|
|
4
|
+
*
|
|
5
|
+
* @param {Filter[]} filters - Array of filter objects to check
|
|
6
|
+
* @returns {Filter[]} Array of active filters
|
|
7
|
+
*/
|
|
8
|
+
export declare const getActiveFilters: (filters: Filter[]) => Filter[];
|
|
9
|
+
/**
|
|
10
|
+
* Checks if any filters in the array have active values
|
|
11
|
+
*
|
|
12
|
+
* @param {Filter[]} filters - Array of filter objects to check
|
|
13
|
+
* @returns {boolean} True if any filter has an active value
|
|
14
|
+
*/
|
|
15
|
+
export declare const checkActiveFilters: (filters: Filter[]) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Resets all filters to their default state
|
|
18
|
+
*
|
|
19
|
+
* @param {Filter[]} filters - Array of filter objects to reset
|
|
20
|
+
* @returns {Filter[]} New array with reset filters
|
|
21
|
+
*/
|
|
22
|
+
export declare const resetFilters: (filters: Filter[]) => Filter[];
|
|
23
|
+
/**
|
|
24
|
+
* Updates a single filter in an array of filters
|
|
25
|
+
*
|
|
26
|
+
* @param {Filter[]} filters - Array of filter objects
|
|
27
|
+
* @param {string} filterId - ID of the filter to update
|
|
28
|
+
* @param {FilterValue} value - New value for the filter
|
|
29
|
+
* @returns {Filter[]} New array with updated filter
|
|
30
|
+
*/
|
|
31
|
+
export declare const updateSingleFilter: (filters: Filter[], filterId: string, value: FilterValue) => Filter[];
|
|
32
|
+
/**
|
|
33
|
+
* Determines if two filter values are different.
|
|
34
|
+
* For singleSelect, compares by id if both are objects with id.
|
|
35
|
+
*
|
|
36
|
+
* @param {T} a - First value to compare
|
|
37
|
+
* @param {T} b - Second value to compare
|
|
38
|
+
* @returns {boolean} True if the values are different
|
|
39
|
+
*/
|
|
40
|
+
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
|
|
@@ -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 {};
|