@servicetitan/anvil2 1.49.7 → 1.50.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 +24 -0
- package/dist/{Combobox-hxGMMb8x.js → Combobox-DGAa9vgU.js} +7 -19
- package/dist/Combobox-DGAa9vgU.js.map +1 -0
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-CUFa7cQK.js → DataTable-DQ9FFuV8.js} +111 -57
- package/dist/DataTable-DQ9FFuV8.js.map +1 -0
- package/dist/DataTable.css +68 -26
- package/dist/{Dialog-UzG6-s9H.js → Dialog-BwabBKoZ.js} +19 -13
- package/dist/Dialog-BwabBKoZ.js.map +1 -0
- package/dist/Dialog.css +31 -28
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-BHK18NYm.js → Drawer-GXeoK-r9.js} +20 -12
- package/dist/Drawer-GXeoK-r9.js.map +1 -0
- package/dist/Drawer.css +33 -27
- package/dist/Drawer.js +1 -1
- package/dist/{Page-ClI3IOc7.js → Page-DEbpjQw0.js} +2 -2
- package/dist/{Page-ClI3IOc7.js.map → Page-DEbpjQw0.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Pagination-CnF6yBr5.js → Pagination-BR8MiRaA.js} +17 -25
- package/dist/Pagination-BR8MiRaA.js.map +1 -0
- package/dist/Pagination.js +1 -1
- package/dist/{SearchField-D6bICv4b.js → SearchField-CJAo8dE0.js} +10 -7
- package/dist/{SearchField-D6bICv4b.js.map → SearchField-CJAo8dE0.js.map} +1 -1
- package/dist/SearchField.css +14 -8
- package/dist/SearchField.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldSync-BOzavAtv.js → SelectFieldSync-D4VdOXoY.js} +93 -81
- package/dist/SelectFieldSync-D4VdOXoY.js.map +1 -0
- package/dist/SelectFieldSync.css +6 -5
- package/dist/{SelectTrigger-DfVnPiNf.js → SelectTrigger-D4AjiMKp.js} +2 -2
- package/dist/{SelectTrigger-DfVnPiNf.js.map → SelectTrigger-D4AjiMKp.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-D8scKtBr.js → SelectTriggerBase-D9GuxPxR.js} +3 -15
- package/dist/SelectTriggerBase-D9GuxPxR.js.map +1 -0
- package/dist/Table.js +1 -1
- package/dist/{Toolbar-BxYOXLmv.js → Toolbar-Vw9V1RHr.js} +208 -139
- package/dist/Toolbar-Vw9V1RHr.js.map +1 -0
- package/dist/Toolbar.css +62 -30
- package/dist/Toolbar.js +1 -1
- package/dist/beta/components/SelectField/internal/useCombo.d.ts +1 -0
- package/dist/beta/components/Table/DataTable/internal/cells/DataTableHeaderCell.d.ts +9 -1
- package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
- package/dist/beta/components/Table/internal/ResizeHandle.d.ts +5 -2
- package/dist/beta/components/Table/internal/getCommonPinningStyles.d.ts +2 -1
- package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +28 -0
- package/dist/beta.js +3 -3
- package/dist/components/Combobox/internal/ComboboxLegacy/ComboboxLegacyUtils.d.ts +0 -36
- package/dist/components/Combobox/internal/ComboboxUtils.d.ts +0 -57
- package/dist/components/Dialog/Dialog.d.ts +3 -3
- package/dist/components/Drawer/Drawer.d.ts +2 -2
- package/dist/components/Pagination/internal/Pagination.d.ts +3 -4
- package/dist/components/Pagination/internal/PaginationList.d.ts +1 -0
- package/dist/components/Pagination/internal/PaginationTotalCount.d.ts +2 -4
- package/dist/index.js +7 -7
- package/dist/internal/hooks/index.d.ts +1 -0
- package/dist/internal/hooks/useDownshiftEnvironment/index.d.ts +1 -0
- package/dist/internal/hooks/useDownshiftEnvironment/useDownshiftEnvironment.d.ts +36 -0
- package/dist/{match-sorter.esm-CtBw0MrM.js → match-sorter.esm-NrKOPPde.js} +16 -3
- package/dist/match-sorter.esm-NrKOPPde.js.map +1 -0
- package/package.json +7 -7
- package/dist/Combobox-hxGMMb8x.js.map +0 -1
- package/dist/DataTable-CUFa7cQK.js.map +0 -1
- package/dist/Dialog-UzG6-s9H.js.map +0 -1
- package/dist/Drawer-BHK18NYm.js.map +0 -1
- package/dist/Pagination-CnF6yBr5.js.map +0 -1
- package/dist/SelectFieldSync-BOzavAtv.js.map +0 -1
- package/dist/SelectTriggerBase-D8scKtBr.js.map +0 -1
- package/dist/Toolbar-BxYOXLmv.js.map +0 -1
- package/dist/match-sorter.esm-CtBw0MrM.js.map +0 -1
package/dist/Toolbar.css
CHANGED
|
@@ -11,24 +11,28 @@ button[data-anv=toolbar-select] {
|
|
|
11
11
|
/* REVERT LAYER BUGFIX END */
|
|
12
12
|
/* -- Toolbar Base */
|
|
13
13
|
@layer base {
|
|
14
|
-
.
|
|
14
|
+
._toolbar_1em0g_13[aria-orientation=horizontal] {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
._toolbar_1em0g_13[aria-orientation=vertical] {
|
|
15
18
|
height: 100%;
|
|
16
19
|
max-height: inherit;
|
|
17
20
|
}
|
|
18
|
-
._toolbar-outline-
|
|
21
|
+
._toolbar-outline-spacer_1em0g_20:not(:has([data-anv=toolbar-filter-group], [data-anv=toolbar-control-group])) {
|
|
19
22
|
padding: 0.25rem;
|
|
20
23
|
}
|
|
21
|
-
._toolbar-
|
|
24
|
+
._toolbar-content_1em0g_23 {
|
|
22
25
|
align-items: flex-start;
|
|
26
|
+
gap: 0.25rem;
|
|
23
27
|
width: 100%;
|
|
24
28
|
}
|
|
25
|
-
._overflow-
|
|
29
|
+
._overflow-wrap_1em0g_28 {
|
|
26
30
|
flex-wrap: wrap;
|
|
27
31
|
}
|
|
28
|
-
._overflow-
|
|
32
|
+
._overflow-collapse_1em0g_31 {
|
|
29
33
|
flex-wrap: nowrap;
|
|
30
34
|
}
|
|
31
|
-
._toolbar-overflow-
|
|
35
|
+
._toolbar-overflow-content_1em0g_34 {
|
|
32
36
|
display: flex;
|
|
33
37
|
flex-direction: column;
|
|
34
38
|
gap: 0.75rem;
|
|
@@ -36,42 +40,42 @@ button[data-anv=toolbar-select] {
|
|
|
36
40
|
padding: 0.5rem !important;
|
|
37
41
|
margin: 0 !important;
|
|
38
42
|
}
|
|
39
|
-
._toolbar-overflow-
|
|
43
|
+
._toolbar-overflow-content_1em0g_34 ._toolbar-button-item_1em0g_42 {
|
|
40
44
|
width: 100%;
|
|
41
45
|
}
|
|
42
46
|
}
|
|
43
47
|
/* -- Toolbar Overflow and Orientation States */
|
|
44
48
|
@layer state {
|
|
45
|
-
[aria-orientation=vertical] ._toolbar-
|
|
46
|
-
[aria-orientation=vertical] ._toolbar-button-
|
|
49
|
+
[aria-orientation=vertical] ._toolbar-item_1em0g_48,
|
|
50
|
+
[aria-orientation=vertical] ._toolbar-button-item_1em0g_42 {
|
|
47
51
|
width: 100%;
|
|
48
52
|
}
|
|
49
|
-
._overflow-
|
|
53
|
+
._overflow-collapse_1em0g_31 {
|
|
50
54
|
overflow: hidden;
|
|
51
55
|
}
|
|
52
|
-
[aria-orientation=vertical] ._overflow-
|
|
56
|
+
[aria-orientation=vertical] ._overflow-collapse_1em0g_31 {
|
|
53
57
|
height: 100%;
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
/* -- Toolbar Items Component Overrides */
|
|
57
61
|
@layer application {
|
|
58
|
-
._toolbar-button-
|
|
62
|
+
._toolbar-button-item_1em0g_42 {
|
|
59
63
|
white-space: nowrap;
|
|
60
64
|
font-size: 0.75rem;
|
|
61
65
|
min-width: -moz-min-content;
|
|
62
66
|
min-width: min-content;
|
|
63
67
|
padding: 0.375rem;
|
|
64
68
|
}
|
|
65
|
-
._toolbar-button-toggle-
|
|
69
|
+
._toolbar-button-toggle-item_1em0g_67[aria-pressed=false] {
|
|
66
70
|
border-color: var(--button-primary-foreground-color, #ffffff);
|
|
67
71
|
}
|
|
68
|
-
._toolbar-button-toggle-
|
|
72
|
+
._toolbar-button-toggle-item_1em0g_67[aria-pressed=true] {
|
|
69
73
|
border-color: var(--background-color-primary-subdued, #E0F2FF);
|
|
70
74
|
}
|
|
71
|
-
._toolbar-overflow-
|
|
75
|
+
._toolbar-overflow-trigger_1em0g_73 {
|
|
72
76
|
padding: 0.5rem;
|
|
73
77
|
}
|
|
74
|
-
._toolbar-overflow-
|
|
78
|
+
._toolbar-overflow-trigger_1em0g_73[aria-expanded=true] {
|
|
75
79
|
--button-background-color: var(--button-ghost-background-color-hover, rgba(20, 20, 20, 0.0784313725));
|
|
76
80
|
}
|
|
77
81
|
}@layer starter, reset, base, state, application;
|
|
@@ -93,58 +97,86 @@ button[data-anv=toolbar-select] {
|
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
@layer base {
|
|
96
|
-
._filter-button-
|
|
100
|
+
._filter-button-trigger_1gitm_18 {
|
|
97
101
|
font-size: 0.75rem;
|
|
98
102
|
white-space: nowrap;
|
|
99
103
|
}
|
|
100
|
-
._filter-button-
|
|
104
|
+
._filter-button-content_1gitm_22 {
|
|
101
105
|
min-width: 12.5rem;
|
|
102
106
|
max-width: 22.5rem;
|
|
103
107
|
}
|
|
104
|
-
._filter-
|
|
108
|
+
._filter-select-content_1gitm_26:has(input[type=search]) {
|
|
109
|
+
max-height: 18.75rem;
|
|
110
|
+
}
|
|
111
|
+
._filter-select-content_1gitm_26:not(:has(input[type=search])) {
|
|
112
|
+
max-height: 18.5rem;
|
|
113
|
+
}
|
|
114
|
+
._filter-select-content_1gitm_26:not(:has(._filter-button-buttons_1gitm_32)) {
|
|
115
|
+
padding-block-end: 0.75rem;
|
|
116
|
+
}
|
|
117
|
+
._filter-select-content_1gitm_26 ._filter-button-buttons_1gitm_32 {
|
|
118
|
+
padding-block-end: 1rem;
|
|
119
|
+
}
|
|
120
|
+
._filter-drawer-trigger_1gitm_38 {
|
|
105
121
|
position: sticky;
|
|
106
122
|
right: 0;
|
|
107
123
|
border: none;
|
|
108
124
|
}
|
|
109
|
-
._filter-button-
|
|
110
|
-
|
|
125
|
+
._filter-button-buttons_1gitm_32 {
|
|
126
|
+
background: var(--background-color-strong, #f7f7f7);
|
|
127
|
+
padding-inline: 1rem;
|
|
128
|
+
padding-block-start: 0.5rem;
|
|
129
|
+
position: sticky;
|
|
130
|
+
bottom: 0;
|
|
111
131
|
}
|
|
112
132
|
[data-anv=toolbar-filter-group] {
|
|
113
133
|
container-type: inline-size;
|
|
114
134
|
}
|
|
115
|
-
._filter-
|
|
135
|
+
._filter-item_1gitm_53 {
|
|
116
136
|
max-height: 1.75rem;
|
|
117
137
|
}
|
|
118
138
|
@container (max-width: primitive.$breakpoint-md) {
|
|
119
|
-
._filter-
|
|
139
|
+
._filter-item_1gitm_53 {
|
|
120
140
|
display: none;
|
|
121
141
|
}
|
|
122
142
|
}
|
|
123
|
-
._filter-select-
|
|
124
|
-
|
|
143
|
+
._filter-select-search_1gitm_61 {
|
|
144
|
+
background: var(--background-color-strong, #f7f7f7);
|
|
145
|
+
padding-block-start: 1rem;
|
|
146
|
+
padding-inline: 1rem;
|
|
147
|
+
position: sticky;
|
|
148
|
+
top: 0;
|
|
149
|
+
z-index: 1;
|
|
150
|
+
}
|
|
151
|
+
._filter-select-search_1gitm_61 input[type=search] {
|
|
152
|
+
padding-inline-end: 0.5rem;
|
|
125
153
|
}
|
|
126
154
|
}
|
|
127
155
|
@layer application {
|
|
128
|
-
._filter-button-
|
|
156
|
+
._filter-button-trigger_1gitm_18 {
|
|
129
157
|
max-height: 1.75rem;
|
|
130
158
|
padding: 0.3125rem 0.375rem;
|
|
131
159
|
}
|
|
132
|
-
._filter-button-
|
|
160
|
+
._filter-button-trigger_1gitm_18[aria-expanded=true]:not(._filter-button-trigger--selected_1gitm_78) {
|
|
133
161
|
--button-background-color: var(--button-ghost-background-color-hover, rgba(20, 20, 20, 0.0784313725));
|
|
134
162
|
}
|
|
135
|
-
._filter-button-trigger--
|
|
163
|
+
._filter-button-trigger--selected_1gitm_78 {
|
|
136
164
|
--button-background-color: var(--background-color-primary-subdued, #E0F2FF);
|
|
137
165
|
color: var(--foreground-color-primary, #0265DC);
|
|
138
166
|
}
|
|
139
|
-
._filter-drawer-
|
|
167
|
+
._filter-drawer-trigger_1gitm_38 {
|
|
140
168
|
padding-inline: 0.5rem;
|
|
141
169
|
}
|
|
142
|
-
._filter-drawer-trigger--
|
|
170
|
+
._filter-drawer-trigger--chipped_1gitm_88 {
|
|
143
171
|
background-color: var(--background-color-primary-subdued, #E0F2FF);
|
|
144
172
|
color: var(--foreground-color-primary, #0265DC);
|
|
145
173
|
min-width: -moz-max-content;
|
|
146
174
|
min-width: max-content;
|
|
147
175
|
}
|
|
176
|
+
._filter-select-search_1gitm_61 > div[role=presentation],
|
|
177
|
+
._filter-select-search_1gitm_61 input[type=search] {
|
|
178
|
+
padding-inline-end: 1rem;
|
|
179
|
+
}
|
|
148
180
|
}@layer starter, reset, base, state, application;
|
|
149
181
|
@layer base {
|
|
150
182
|
._toolbar-control-group_13h8p_2 {
|
package/dist/Toolbar.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect, T as default } from './Toolbar-
|
|
1
|
+
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect, T as default } from './Toolbar-Vw9V1RHr.js';
|
|
2
2
|
//# sourceMappingURL=Toolbar.js.map
|
|
@@ -18,6 +18,7 @@ export type UseComboOptions = {
|
|
|
18
18
|
*/
|
|
19
19
|
export declare const useCombo: ({ options, pinnedOptions, selectAll, selectedOption, onSelectedOptionChange, onInputValueChange, onIsOpenChange, displayAs, disableHighlightOnOpen, disabled, }: UseComboOptions) => {
|
|
20
20
|
inputValue: string;
|
|
21
|
+
wrapperDivRef: import('react').RefObject<HTMLDivElement>;
|
|
21
22
|
getToggleButtonProps: <Options>(options?: import('downshift').UseComboboxGetToggleButtonPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetToggleButtonPropsReturnValue, Options>;
|
|
22
23
|
getLabelProps: <Options>(options?: import('downshift').UseComboboxGetLabelPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetLabelPropsReturnValue, Options>;
|
|
23
24
|
getMenuProps: <Options>(options?: import('downshift').UseComboboxGetMenuPropsOptions & Options, otherOptions?: import('downshift').GetPropsCommonOptions) => import('downshift').Overwrite<import('downshift').UseComboboxGetMenuPropsReturnValue, Options>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
1
2
|
import { HeaderContext } from '@tanstack/react-table';
|
|
2
3
|
import { DataTableHeaderCellProps as BaseDataTableHeaderCellProps } from '../../../base/cells/TableHeaderCell';
|
|
3
4
|
/**
|
|
@@ -18,4 +19,11 @@ export type DataTableHeaderCellProps<T> = BaseDataTableHeaderCellProps & {
|
|
|
18
19
|
* @param props.children - The children of the DataTableHeaderCell component
|
|
19
20
|
* @param props.header - The header of the DataTableHeaderCell component
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
+
declare function DataTableHeaderCellInner<T>(props: DataTableHeaderCellProps<T>, forwardedRef: Ref<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Data table header cell with focus management and ref forwarding
|
|
25
|
+
*/
|
|
26
|
+
export declare const DataTableHeaderCell: <T>(props: DataTableHeaderCellProps<T> & {
|
|
27
|
+
ref?: Ref<HTMLDivElement>;
|
|
28
|
+
}) => ReturnType<typeof DataTableHeaderCellInner>;
|
|
29
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export declare const expandedRowData: TableRow<TableStoryData>[];
|
|
|
15
15
|
export declare const subComponentsData: TableRow<TableStoryData>[];
|
|
16
16
|
export declare const primaryColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
17
17
|
export declare const groupedColumns: import('../..').ColumnDef<TableStoryData>[];
|
|
18
|
+
export declare const columnsWithMaxWidth: import('../..').ColumnDef<TableStoryData>[];
|
|
18
19
|
export declare const columnsWithoutFooter: import('../..').ColumnDef<TableStoryData>[];
|
|
19
20
|
export type Category = "electronics" | "clothing" | "home" | "garden" | "other";
|
|
20
21
|
export type EditableTableStoryData = {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { Header } from '@tanstack/react-table';
|
|
2
2
|
/**
|
|
3
3
|
* Props for the ResizeHandle component
|
|
4
|
-
* @
|
|
4
|
+
* @property {Header<T, unknown>} header - The header instance from TanStack Table
|
|
5
|
+
* @property {() => void} [onResizeStart] - Callback fired before resize begins, useful for initializing state
|
|
5
6
|
*/
|
|
6
7
|
export type ResizeHandleProps<T> = {
|
|
7
8
|
header: Header<T, unknown>;
|
|
9
|
+
onResizeStart?: () => void;
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Resize handle component resizing table columns
|
|
11
13
|
* @param props - The props for the ResizeHandle component
|
|
12
14
|
* @param props.header - The header of the ResizeHandle component
|
|
15
|
+
* @param props.onResizeStart - Optional callback fired before resize begins
|
|
13
16
|
*/
|
|
14
|
-
export declare function ResizeHandle<T>({ header }: ResizeHandleProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ResizeHandle<T>({ header, onResizeStart, }: ResizeHandleProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { Column } from '@tanstack/react-table';
|
|
3
3
|
/**
|
|
4
|
-
* Get the common styles for
|
|
4
|
+
* Get the common styles for sticky positioning of pinned columns
|
|
5
|
+
* Width is handled by CSS Grid, so only positioning is needed
|
|
5
6
|
*/
|
|
6
7
|
export declare const getCommonPinningStyles: <T>(column: Column<T>) => CSSProperties;
|
|
@@ -38,3 +38,31 @@ export declare const updateSingleFilter: (filters: Filter[], filterId: string, v
|
|
|
38
38
|
* @returns {boolean} True if the values are different
|
|
39
39
|
*/
|
|
40
40
|
export declare const hasChangedFilter: <T>(a: T, b: T) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if the selection value of a filter has changed by comparing references.
|
|
43
|
+
* Uses reference equality (===) to detect if the parent has provided a new value.
|
|
44
|
+
*
|
|
45
|
+
* @param {Filter} existingFilter - The current filter state
|
|
46
|
+
* @param {Filter} newFilter - The incoming filter from props
|
|
47
|
+
* @returns {boolean} True if the selection value reference has changed
|
|
48
|
+
*/
|
|
49
|
+
export declare const hasFilterSelectionChanged: (existingFilter: Filter, newFilter: Filter) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Preserves the selection state from an existing filter into a new filter.
|
|
52
|
+
* Used when filter configuration updates but the selection value reference hasn't changed,
|
|
53
|
+
* allowing us to maintain user selections through configuration updates.
|
|
54
|
+
*
|
|
55
|
+
* @param {Filter} newFilter - The new filter configuration from props
|
|
56
|
+
* @param {Filter} existingFilter - The existing filter with user's selections
|
|
57
|
+
* @returns {Filter} New filter with configuration from newFilter and selection from existingFilter
|
|
58
|
+
*/
|
|
59
|
+
export declare const preserveFilterState: (newFilter: Filter, existingFilter: Filter) => Filter;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a deep clone of filters with updated item references.
|
|
62
|
+
* Ensures that selected items reference the current items array for proper equality checks.
|
|
63
|
+
* Used when initializing draft state to ensure selections use current item references.
|
|
64
|
+
*
|
|
65
|
+
* @param {Filter[]} filters - Array of filter objects to clone
|
|
66
|
+
* @returns {Filter[]} New array with cloned filters and updated item references
|
|
67
|
+
*/
|
|
68
|
+
export declare const cloneFiltersWithItemRefs: (filters: Filter[]) => Filter[];
|
package/dist/beta.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-
|
|
2
|
-
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-
|
|
1
|
+
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-DQ9FFuV8.js';
|
|
2
|
+
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-Vw9V1RHr.js';
|
|
3
3
|
export { u as useCalendarBetaProps } from './Calendar-CAYitkfM.js';
|
|
4
4
|
export { C as Calendar } from './Calendar-C9oxHTGG.js';
|
|
5
|
-
export { S as SelectField, a as SelectFieldSync, u as useAdaptiveView } from './SelectFieldSync-
|
|
5
|
+
export { S as SelectField, a as SelectFieldSync, u as useAdaptiveView } from './SelectFieldSync-D4VdOXoY.js';
|
|
6
6
|
//# sourceMappingURL=beta.js.map
|
|
@@ -32,40 +32,4 @@ export type ComboboxLegacyContextProps<Item = any> = Required<Pick<UseDownshiftC
|
|
|
32
32
|
setHasExactMatch?: Dispatch<SetStateAction<boolean>>;
|
|
33
33
|
};
|
|
34
34
|
export declare const ComboboxLegacyContext: import('react').Context<ComboboxLegacyContextProps<any> | null>;
|
|
35
|
-
export declare const useDownshiftEnvironment: () => {
|
|
36
|
-
ref: MutableRefObject<HTMLDivElement | null>;
|
|
37
|
-
environment: {
|
|
38
|
-
document: Document;
|
|
39
|
-
addEventListener: {
|
|
40
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
41
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
42
|
-
};
|
|
43
|
-
removeEventListener: {
|
|
44
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
45
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
46
|
-
};
|
|
47
|
-
Node: {
|
|
48
|
-
new (): Node;
|
|
49
|
-
prototype: Node;
|
|
50
|
-
readonly ELEMENT_NODE: 1;
|
|
51
|
-
readonly ATTRIBUTE_NODE: 2;
|
|
52
|
-
readonly TEXT_NODE: 3;
|
|
53
|
-
readonly CDATA_SECTION_NODE: 4;
|
|
54
|
-
readonly ENTITY_REFERENCE_NODE: 5;
|
|
55
|
-
readonly ENTITY_NODE: 6;
|
|
56
|
-
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
57
|
-
readonly COMMENT_NODE: 8;
|
|
58
|
-
readonly DOCUMENT_NODE: 9;
|
|
59
|
-
readonly DOCUMENT_TYPE_NODE: 10;
|
|
60
|
-
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
61
|
-
readonly NOTATION_NODE: 12;
|
|
62
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
63
|
-
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
64
|
-
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
65
|
-
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
66
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
67
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
68
|
-
};
|
|
69
|
-
} | undefined;
|
|
70
|
-
};
|
|
71
35
|
export declare const useComboboxLegacy: <Item = any>() => ComboboxLegacyContextProps<Item>;
|
|
@@ -15,62 +15,5 @@ export declare const defaultItemToString: <Item>(item: Item | null) => string;
|
|
|
15
15
|
* @returns The item itself as the key
|
|
16
16
|
*/
|
|
17
17
|
export declare const defaultItemToKey: <Item>(item: Item | null) => Item | null;
|
|
18
|
-
/**
|
|
19
|
-
* Hook to handle downshift environment configuration for shadow DOM support
|
|
20
|
-
*
|
|
21
|
-
* Features:
|
|
22
|
-
* - Fixes shadow DOM compatibility issues with downshift
|
|
23
|
-
* - Provides proper document and event listener references
|
|
24
|
-
* - Returns ref for wrapper element and environment configuration
|
|
25
|
-
*
|
|
26
|
-
* @returns Object containing ref and environment configuration
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const { ref, environment } = useDownshiftEnvironment();
|
|
30
|
-
*
|
|
31
|
-
* return (
|
|
32
|
-
* <div ref={ref}>
|
|
33
|
-
* <Combobox environment={environment}>
|
|
34
|
-
* combobox content
|
|
35
|
-
* </Combobox>
|
|
36
|
-
* </div>
|
|
37
|
-
* );
|
|
38
|
-
*/
|
|
39
|
-
export declare const useDownshiftEnvironment: () => {
|
|
40
|
-
ref: import('react').MutableRefObject<HTMLDivElement | null>;
|
|
41
|
-
environment: {
|
|
42
|
-
document: Document;
|
|
43
|
-
addEventListener: {
|
|
44
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
45
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
46
|
-
};
|
|
47
|
-
removeEventListener: {
|
|
48
|
-
<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
49
|
-
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
50
|
-
};
|
|
51
|
-
Node: {
|
|
52
|
-
new (): Node;
|
|
53
|
-
prototype: Node;
|
|
54
|
-
readonly ELEMENT_NODE: 1;
|
|
55
|
-
readonly ATTRIBUTE_NODE: 2;
|
|
56
|
-
readonly TEXT_NODE: 3;
|
|
57
|
-
readonly CDATA_SECTION_NODE: 4;
|
|
58
|
-
readonly ENTITY_REFERENCE_NODE: 5;
|
|
59
|
-
readonly ENTITY_NODE: 6;
|
|
60
|
-
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
61
|
-
readonly COMMENT_NODE: 8;
|
|
62
|
-
readonly DOCUMENT_NODE: 9;
|
|
63
|
-
readonly DOCUMENT_TYPE_NODE: 10;
|
|
64
|
-
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
65
|
-
readonly NOTATION_NODE: 12;
|
|
66
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
67
|
-
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
68
|
-
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
69
|
-
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
70
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
71
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
72
|
-
};
|
|
73
|
-
} | undefined;
|
|
74
|
-
};
|
|
75
18
|
export declare function isMultiple<Item>(props: ComboboxProps<Item> | ComboboxSelectProps<Item>): props is ComboboxMultipleProps<Item> | SelectMultipleProps<Item>;
|
|
76
19
|
export declare function getScrollParent(node: HTMLElement | null): HTMLElement | null;
|
|
@@ -15,7 +15,7 @@ export type DialogProps = ComponentPropsWithoutRef<"dialog"> & OpenCloseTransiti
|
|
|
15
15
|
/**
|
|
16
16
|
* @default "medium"
|
|
17
17
|
*/
|
|
18
|
-
size?: Extract<Size, "medium" | "large">;
|
|
18
|
+
size?: Extract<Size, "medium" | "large" | "xlarge">;
|
|
19
19
|
/**
|
|
20
20
|
* @default false
|
|
21
21
|
*/
|
|
@@ -53,7 +53,7 @@ export declare const DialogElement: import('react').ForwardRefExoticComponent<Om
|
|
|
53
53
|
/**
|
|
54
54
|
* @default "medium"
|
|
55
55
|
*/
|
|
56
|
-
size?: Extract<Size, "medium" | "large">;
|
|
56
|
+
size?: Extract<Size, "medium" | "large" | "xlarge">;
|
|
57
57
|
/**
|
|
58
58
|
* @default false
|
|
59
59
|
*/
|
|
@@ -116,7 +116,7 @@ export declare const Dialog: import('react').ForwardRefExoticComponent<Omit<impo
|
|
|
116
116
|
/**
|
|
117
117
|
* @default "medium"
|
|
118
118
|
*/
|
|
119
|
-
size?: Extract<Size, "medium" | "large">;
|
|
119
|
+
size?: Extract<Size, "medium" | "large" | "xlarge">;
|
|
120
120
|
/**
|
|
121
121
|
* @default false
|
|
122
122
|
*/
|
|
@@ -12,7 +12,7 @@ export type DrawerProps = ComponentPropsWithoutRef<"dialog"> & OpenCloseTransiti
|
|
|
12
12
|
* The size of the drawer.
|
|
13
13
|
* @default "medium"
|
|
14
14
|
*/
|
|
15
|
-
size?: Extract<Size, "medium" | "large">;
|
|
15
|
+
size?: Extract<Size, "small" | "medium" | "large" | "xlarge">;
|
|
16
16
|
/**
|
|
17
17
|
* Controls whether the drawer is open or closed.
|
|
18
18
|
* @default false
|
|
@@ -74,7 +74,7 @@ export declare const Drawer: import('react').ForwardRefExoticComponent<Omit<impo
|
|
|
74
74
|
* The size of the drawer.
|
|
75
75
|
* @default "medium"
|
|
76
76
|
*/
|
|
77
|
-
size?: Extract<Size, "medium" | "large">;
|
|
77
|
+
size?: Extract<Size, "small" | "medium" | "large" | "xlarge">;
|
|
78
78
|
/**
|
|
79
79
|
* Controls whether the drawer is open or closed.
|
|
80
80
|
* @default false
|
|
@@ -30,6 +30,7 @@ export declare const Pagination: import('react').ForwardRefExoticComponent<Omit<
|
|
|
30
30
|
List: import('react').ForwardRefExoticComponent<{
|
|
31
31
|
page: number;
|
|
32
32
|
totalPages: number;
|
|
33
|
+
hasTotalItemCount?: boolean;
|
|
33
34
|
onPageChange: (page: number) => void;
|
|
34
35
|
children: React.ReactNode;
|
|
35
36
|
className?: string;
|
|
@@ -46,10 +47,8 @@ export declare const Pagination: import('react').ForwardRefExoticComponent<Omit<
|
|
|
46
47
|
onItemClick: (page: number) => void;
|
|
47
48
|
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
48
49
|
ItemsPerPageMenu: import('react').ForwardRefExoticComponent<import('./PaginationItemsPerPageMenu').PaginationItemsPerPageMenuProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
49
|
-
TotalCount: ({
|
|
50
|
-
|
|
51
|
-
lastItem: number;
|
|
52
|
-
totalCount: number;
|
|
50
|
+
TotalCount: ({ itemRangeText, className, }: {
|
|
51
|
+
itemRangeText: string;
|
|
53
52
|
className?: string;
|
|
54
53
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
55
54
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const PaginationTotalCount: ({
|
|
2
|
-
|
|
3
|
-
lastItem: number;
|
|
4
|
-
totalCount: number;
|
|
1
|
+
export declare const PaginationTotalCount: ({ itemRangeText, className, }: {
|
|
2
|
+
itemRangeText: string;
|
|
5
3
|
className?: string;
|
|
6
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { C as Card } from './Card-Ch3sMUo5.js';
|
|
|
15
15
|
export { C as Checkbox } from './Checkbox-zAKOGEBl.js';
|
|
16
16
|
export { C as CheckboxGroup } from './Checkbox-DbBeuNdW.js';
|
|
17
17
|
export { C as Chip } from './Chip-UqdorCE2.js';
|
|
18
|
-
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, e as ComboboxItem, f as ComboboxItemAddNew, d as ComboboxList, g as ComboboxSearchField, b as ComboboxSelect, h as ComboboxSelectTrigger } from './Combobox-
|
|
18
|
+
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, e as ComboboxItem, f as ComboboxItemAddNew, d as ComboboxList, g as ComboboxSearchField, b as ComboboxSelect, h as ComboboxSelectTrigger } from './Combobox-DGAa9vgU.js';
|
|
19
19
|
export { u as useInfiniteCombobox } from './useInfiniteCombobox-WcRgC9p6.js';
|
|
20
20
|
export { D as DateField } from './DateField-BT9jJRp5.js';
|
|
21
21
|
export { D as DateFieldRange } from './DateFieldRange-ZAic_9mt.js';
|
|
@@ -24,11 +24,11 @@ export { D as DateFieldYearless } from './DateFieldYearless-DXO_MPwA.js';
|
|
|
24
24
|
export { D as DateFieldYearlessRange } from './DateFieldYearlessRange-Cg6bbPIi.js';
|
|
25
25
|
export { D as DaysOfTheWeek } from './DaysOfTheWeek-9B9d7-hF.js';
|
|
26
26
|
export { D as Details, b as DetailsContent, a as DetailsSummary } from './Details-CkaKTRvc.js';
|
|
27
|
-
export { D as Dialog, a as DialogContent, b as DialogFooter, c as DialogHeader } from './Dialog-
|
|
27
|
+
export { D as Dialog, a as DialogContent, b as DialogFooter, c as DialogHeader } from './Dialog-BwabBKoZ.js';
|
|
28
28
|
export { D as DialogCancelButton } from './DialogCancelButton-sTEfx5kf.js';
|
|
29
29
|
export { D as Divider } from './Divider-Olv8yWXD.js';
|
|
30
30
|
export { D as Dnd } from './index-ByS9WvPk.js';
|
|
31
|
-
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader } from './Drawer-
|
|
31
|
+
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader } from './Drawer-GXeoK-r9.js';
|
|
32
32
|
export { E as EditCard } from './EditCard-Ds1UXJIS.js';
|
|
33
33
|
export { F as FieldLabel } from './FieldLabel-jqlQ1Ldh.js';
|
|
34
34
|
export { F as FieldMessage } from './FieldMessage-DdCUxZz-.js';
|
|
@@ -45,17 +45,17 @@ export { L as ListView, a as ListViewOption, b as ListViewOptionCell } from './L
|
|
|
45
45
|
export { M as Menu, a as MenuItem } from './Menu-Cn2JJe1Y.js';
|
|
46
46
|
export { N as NumberField } from './NumberField-CjWLnD9X.js';
|
|
47
47
|
export { Overflow, OverflowText } from './Overflow.js';
|
|
48
|
-
export { P as Page } from './Page-
|
|
49
|
-
export { P as Pagination } from './Pagination-
|
|
48
|
+
export { P as Page } from './Page-DEbpjQw0.js';
|
|
49
|
+
export { P as Pagination } from './Pagination-BR8MiRaA.js';
|
|
50
50
|
import { P as Popover } from './Popover-CCXrzBul.js';
|
|
51
51
|
export { a as PopoverButton, b as PopoverClose, c as PopoverContent, d as PopoverTrigger } from './Popover-CCXrzBul.js';
|
|
52
52
|
export { P as ProgressBar } from './ProgressBar-BpKEr6cO.js';
|
|
53
53
|
export { R as Radio } from './Radio-jj0-1dOg.js';
|
|
54
54
|
export { R as RadioGroup } from './RadioGroup-Bxy415eu.js';
|
|
55
|
-
export { S as SearchField } from './SearchField-
|
|
55
|
+
export { S as SearchField } from './SearchField-CJAo8dE0.js';
|
|
56
56
|
export { S as SegmentedControl, a as SegmentedControlSegment } from './SegmentedControl-DK1cwC7A.js';
|
|
57
57
|
export { S as SelectCard, a as SelectCardElement, b as SelectCardGroup } from './SelectCard-CjbsPKZ4.js';
|
|
58
|
-
export { S as SelectTrigger } from './SelectTrigger-
|
|
58
|
+
export { S as SelectTrigger } from './SelectTrigger-D4AjiMKp.js';
|
|
59
59
|
export { S as SideNav, b as SideNavCollapsible, c as SideNavGroup, a as SideNavLink } from './SideNav-B1sH17Uc.js';
|
|
60
60
|
export { Skeleton, SkeletonCircle, SkeletonPill, SkeletonRectangle, SkeletonText } from './Skeleton.js';
|
|
61
61
|
export { S as Spinner } from './Spinner-xEFwsq8_.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useDownshiftEnvironment';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return type for the useDownshiftEnvironment hook
|
|
3
|
+
* @property {React.RefObject<HTMLDivElement>} ref - Ref to attach to the wrapper element
|
|
4
|
+
* @property {object | undefined} environment - Environment configuration for downshift
|
|
5
|
+
*/
|
|
6
|
+
export interface UseDownshiftEnvironmentReturn {
|
|
7
|
+
ref: React.RefObject<HTMLDivElement>;
|
|
8
|
+
environment: {
|
|
9
|
+
document: Document;
|
|
10
|
+
addEventListener: typeof document.addEventListener;
|
|
11
|
+
removeEventListener: typeof document.removeEventListener;
|
|
12
|
+
Node: typeof Node;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Hook to handle downshift environment configuration for shadow DOM support
|
|
17
|
+
*
|
|
18
|
+
* Features:
|
|
19
|
+
* - Fixes shadow DOM compatibility issues with downshift
|
|
20
|
+
* - Provides proper document and event listener references
|
|
21
|
+
* - Returns ref for wrapper element and environment configuration
|
|
22
|
+
*
|
|
23
|
+
* @returns Object containing ref and environment configuration
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const { ref, environment } = useDownshiftEnvironment();
|
|
27
|
+
*
|
|
28
|
+
* return (
|
|
29
|
+
* <div ref={ref}>
|
|
30
|
+
* <Combobox environment={environment}>
|
|
31
|
+
* combobox content
|
|
32
|
+
* </Combobox>
|
|
33
|
+
* </div>
|
|
34
|
+
* );
|
|
35
|
+
*/
|
|
36
|
+
export declare const useDownshiftEnvironment: () => UseDownshiftEnvironmentReturn;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import React__default, { useRef, useEffect, useMemo, useCallback, useLayoutEffect, useReducer, cloneElement, Component } from 'react';
|
|
1
2
|
import { a as _extends, _ as _objectWithoutPropertiesLoose } from './extends-Bg2s_OKl.js';
|
|
2
3
|
import { g as getDefaultExportFromCjs } from './index-tZvMCc77.js';
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
const useDownshiftEnvironment = () => {
|
|
6
|
+
const wrapperDivRef = useRef(null);
|
|
7
|
+
const shadowRoot = wrapperDivRef.current ? wrapperDivRef.current.getRootNode() : null;
|
|
8
|
+
const shadowDocument = wrapperDivRef.current && shadowRoot ? shadowRoot.ownerDocument : null;
|
|
9
|
+
const environment = shadowDocument ? {
|
|
10
|
+
document: shadowDocument,
|
|
11
|
+
addEventListener: shadowDocument.addEventListener.bind(shadowRoot),
|
|
12
|
+
removeEventListener: shadowDocument.removeEventListener.bind(shadowRoot),
|
|
13
|
+
Node
|
|
14
|
+
} : void 0;
|
|
15
|
+
return { ref: wrapperDivRef, environment };
|
|
16
|
+
};
|
|
4
17
|
|
|
5
18
|
function _setPrototypeOf(t, e) {
|
|
6
19
|
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
@@ -6259,5 +6272,5 @@ function getKeyAttributes(key) {
|
|
|
6259
6272
|
};
|
|
6260
6273
|
}
|
|
6261
6274
|
|
|
6262
|
-
export {
|
|
6263
|
-
//# sourceMappingURL=match-sorter.esm-
|
|
6275
|
+
export { useCombobox as a, useMultipleSelection as b, useSelect as c, matchSorter as m, useDownshiftEnvironment as u };
|
|
6276
|
+
//# sourceMappingURL=match-sorter.esm-NrKOPPde.js.map
|