@jobber/components 8.14.0 → 8.14.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/FilterPicker.d.ts +1 -0
- package/{Combobox.js → FilterPicker.js} +3 -3
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +11 -11
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +11 -11
- package/dist/DataList/components/DataListFilters/index.cjs +11 -11
- package/dist/DataList/components/DataListFilters/index.mjs +11 -11
- package/dist/DataList/index.cjs +11 -11
- package/dist/DataList/index.mjs +11 -11
- package/dist/DataListSort-cjs.js +5 -5
- package/dist/DataListSort-es.js +5 -5
- package/dist/FilterPicker/FilterPicker.d.ts +11 -0
- package/dist/{Combobox/Combobox.types.d.ts → FilterPicker/FilterPicker.types.d.ts} +51 -51
- package/dist/FilterPicker/FilterPickerProvider.d.ts +18 -0
- package/dist/FilterPicker/components/FilterPickerAction/FilterPickerAction.d.ts +3 -0
- package/dist/FilterPicker/components/FilterPickerAction/index.cjs +12 -0
- package/dist/FilterPicker/components/FilterPickerAction/index.d.ts +1 -0
- package/dist/FilterPicker/components/FilterPickerAction/index.mjs +6 -0
- package/dist/FilterPicker/components/FilterPickerActivator/FilterPickerActivator.d.ts +3 -0
- package/dist/{Combobox/components/ComboboxActivator → FilterPicker/components/FilterPickerActivator}/index.cjs +3 -3
- package/dist/FilterPicker/components/FilterPickerActivator/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxActivator → FilterPicker/components/FilterPickerActivator}/index.mjs +2 -2
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContent.d.ts +3 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentHeader/FilterPickerContentHeader.d.ts +3 -0
- package/dist/{Combobox/components/ComboboxContent/ComboboxContentHeader → FilterPicker/components/FilterPickerContent/FilterPickerContentHeader}/index.cjs +2 -2
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentHeader/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxContent/ComboboxContentHeader → FilterPicker/components/FilterPickerContent/FilterPickerContentHeader}/index.mjs +1 -1
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentList/FilterPickerContentList.d.ts +3 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentList/FilterPickerContentList.module.css.d.ts +13 -0
- package/dist/{Combobox/components/ComboboxContent/ComboboxContentList → FilterPicker/components/FilterPickerContent/FilterPickerContentList}/index.cjs +5 -5
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentList/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxContent/ComboboxContentList → FilterPicker/components/FilterPickerContent/FilterPickerContentList}/index.mjs +4 -4
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentSearch/FilterPickerContentSearch.d.ts +3 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentSearch/index.cjs +10 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentSearch/index.d.ts +1 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerContentSearch/index.mjs +4 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerLoadMore/FilterPickerLoadMore.d.ts +6 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerLoadMore/index.cjs +9 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerLoadMore/index.d.ts +1 -0
- package/dist/FilterPicker/components/FilterPickerContent/FilterPickerLoadMore/index.mjs +3 -0
- package/dist/{Combobox/components/ComboboxContent → FilterPicker/components/FilterPickerContent}/index.cjs +8 -8
- package/dist/FilterPicker/components/FilterPickerContent/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxContent → FilterPicker/components/FilterPickerContent}/index.mjs +7 -7
- package/dist/FilterPicker/components/FilterPickerOption/FilterPickerOption.d.ts +3 -0
- package/dist/{Combobox/components/ComboboxOption → FilterPicker/components/FilterPickerOption}/index.cjs +3 -3
- package/dist/FilterPicker/components/FilterPickerOption/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxOption → FilterPicker/components/FilterPickerOption}/index.mjs +2 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/FilterPickerTrigger.d.ts +3 -0
- package/dist/{Combobox/components/ComboboxTrigger → FilterPicker/components/FilterPickerTrigger}/index.cjs +3 -3
- package/dist/FilterPicker/components/FilterPickerTrigger/index.d.ts +1 -0
- package/dist/{Combobox/components/ComboboxTrigger → FilterPicker/components/FilterPickerTrigger}/index.mjs +2 -2
- package/dist/FilterPicker/constants.d.ts +1 -0
- package/dist/FilterPicker/hooks/useFilterPicker.d.ts +17 -0
- package/dist/FilterPicker/hooks/useFilterPickerAccessibility.d.ts +9 -0
- package/dist/FilterPicker/hooks/useFilterPickerActivatorAccessibility.d.ts +2 -0
- package/dist/FilterPicker/hooks/useFilterPickerContent.d.ts +9 -0
- package/dist/FilterPicker/hooks/useFilterPickerValidation.d.ts +12 -0
- package/dist/FilterPicker/hooks/useMakeFilterPickerHandlers.d.ts +8 -0
- package/dist/{Combobox → FilterPicker}/index.cjs +13 -13
- package/dist/FilterPicker/index.d.ts +3 -0
- package/dist/{Combobox → FilterPicker}/index.mjs +11 -11
- package/dist/{Combobox-cjs.js → FilterPicker-cjs.js} +25 -25
- package/dist/{Combobox-es.js → FilterPicker-es.js} +25 -25
- package/dist/{ComboboxAction-cjs.js → FilterPickerAction-cjs.js} +5 -5
- package/dist/{ComboboxAction-es.js → FilterPickerAction-es.js} +5 -5
- package/dist/{ComboboxActivator-cjs.js → FilterPickerActivator-cjs.js} +8 -8
- package/dist/{ComboboxActivator-es.js → FilterPickerActivator-es.js} +9 -9
- package/dist/{ComboboxContent-cjs.js → FilterPickerContent-cjs.js} +19 -19
- package/dist/{ComboboxContent-es.js → FilterPickerContent-es.js} +20 -20
- package/dist/{ComboboxContentHeader-cjs.js → FilterPickerContentHeader-cjs.js} +4 -4
- package/dist/{ComboboxContentHeader-es.js → FilterPickerContentHeader-es.js} +4 -4
- package/dist/{ComboboxContentList-cjs.js → FilterPickerContentList-cjs.js} +7 -7
- package/dist/{ComboboxContentList-es.js → FilterPickerContentList-es.js} +7 -7
- package/dist/{ComboboxContentSearch-cjs.js → FilterPickerContentSearch-cjs.js} +4 -4
- package/dist/{ComboboxContentSearch-es.js → FilterPickerContentSearch-es.js} +4 -4
- package/dist/FilterPickerLoadMore-cjs.js +16 -0
- package/dist/{ComboboxLoadMore-es.js → FilterPickerLoadMore-es.js} +4 -4
- package/dist/{ComboboxOption-cjs.js → FilterPickerOption-cjs.js} +5 -5
- package/dist/{ComboboxOption-es.js → FilterPickerOption-es.js} +5 -5
- package/dist/FilterPickerProvider-cjs.js +13 -0
- package/dist/FilterPickerProvider-es.js +10 -0
- package/dist/{ComboboxTrigger-cjs.js → FilterPickerTrigger-cjs.js} +4 -4
- package/dist/{ComboboxTrigger-es.js → FilterPickerTrigger-es.js} +4 -4
- package/dist/constants-cjs.js +2 -2
- package/dist/constants-es.js +2 -2
- package/dist/docs/Autocomplete/Autocomplete.md +1 -1
- package/dist/docs/Chip/Chip.md +4 -4
- package/dist/docs/DataList/DataList.md +16 -15
- package/dist/docs/{Combobox/Combobox.md → FilterPicker/FilterPicker.md} +91 -85
- package/dist/docs/Menu/Menu.md +1 -1
- package/dist/docs/MultiSelect/MultiSelect.md +1 -1
- package/dist/docs/Tabs/Tabs.md +2 -2
- package/dist/docs/index.md +1 -1
- package/dist/docs/usage-guidelines/usage-guidelines.md +5 -5
- package/dist/index.cjs +13 -13
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +11 -11
- package/dist/styles.css +53 -53
- package/dist/utils/meta/meta.json +5 -5
- package/package.json +6 -6
- package/rollup.config.mjs +2 -2
- package/Combobox.d.ts +0 -1
- package/dist/Combobox/Combobox.d.ts +0 -11
- package/dist/Combobox/ComboboxProvider.d.ts +0 -18
- package/dist/Combobox/components/ComboboxAction/ComboboxAction.d.ts +0 -3
- package/dist/Combobox/components/ComboboxAction/index.cjs +0 -12
- package/dist/Combobox/components/ComboboxAction/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxAction/index.mjs +0 -6
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +0 -3
- package/dist/Combobox/components/ComboboxActivator/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +0 -3
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +0 -3
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +0 -3
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +0 -3
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.cjs +0 -10
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.mjs +0 -4
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/ComboboxLoadMore.d.ts +0 -6
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.cjs +0 -9
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.mjs +0 -3
- package/dist/Combobox/components/ComboboxContent/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxOption/ComboboxOption.d.ts +0 -3
- package/dist/Combobox/components/ComboboxOption/index.d.ts +0 -1
- package/dist/Combobox/components/ComboboxTrigger/ComboboxTrigger.d.ts +0 -3
- package/dist/Combobox/components/ComboboxTrigger/index.d.ts +0 -1
- package/dist/Combobox/constants.d.ts +0 -1
- package/dist/Combobox/hooks/useCombobox.d.ts +0 -17
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +0 -9
- package/dist/Combobox/hooks/useComboboxActivatorAccessibility.d.ts +0 -2
- package/dist/Combobox/hooks/useComboboxContent.d.ts +0 -9
- package/dist/Combobox/hooks/useComboboxValidation.d.ts +0 -12
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +0 -8
- package/dist/Combobox/index.d.ts +0 -3
- package/dist/ComboboxLoadMore-cjs.js +0 -16
- package/dist/ComboboxProvider-cjs.js +0 -13
- package/dist/ComboboxProvider-es.js +0 -10
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Dispatch, ReactElement, SetStateAction } from "react";
|
|
2
|
-
type
|
|
3
|
-
type
|
|
4
|
-
export interface
|
|
5
|
-
readonly children?:
|
|
2
|
+
type FilterPickerFragment = Iterable<FilterPickerNode>;
|
|
3
|
+
type FilterPickerNode = ReactElement | FilterPickerFragment;
|
|
4
|
+
export interface FilterPickerProps {
|
|
5
|
+
readonly children?: FilterPickerNode;
|
|
6
6
|
/**
|
|
7
|
-
* When `true`, `
|
|
7
|
+
* When `true`, `FilterPicker` will allow for multiple selections
|
|
8
8
|
*
|
|
9
9
|
* @default false
|
|
10
10
|
*/
|
|
11
11
|
readonly multiSelect?: boolean;
|
|
12
12
|
/**
|
|
13
|
-
* The selected options of the
|
|
13
|
+
* The selected options of the FilterPicker.
|
|
14
14
|
*/
|
|
15
|
-
readonly selected:
|
|
15
|
+
readonly selected: FilterPickerOption[];
|
|
16
16
|
/**
|
|
17
17
|
* The encapsulating noun for the content of the combobox. Used
|
|
18
18
|
* in the empty state, and search placeholder. Should be pluralized.
|
|
@@ -21,23 +21,23 @@ export interface ComboboxProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Callback function invoked upon the selection of an option. Provides the selected option(s) as an argument.
|
|
23
23
|
*/
|
|
24
|
-
readonly onSelect: (selection:
|
|
24
|
+
readonly onSelect: (selection: FilterPickerOption[]) => void;
|
|
25
25
|
/**
|
|
26
26
|
* Callback function invoked upon the selection of all options. Provides the selected option(s) as an argument.
|
|
27
27
|
* This is only available when `multiSelect` is `true`.
|
|
28
28
|
*/
|
|
29
|
-
readonly onSelectAll?: (selection:
|
|
29
|
+
readonly onSelectAll?: (selection: FilterPickerOption[]) => void;
|
|
30
30
|
/**
|
|
31
31
|
* Callback function invoked upon the clearing of all options.
|
|
32
32
|
* This is only available when `multiSelect` is `true`.
|
|
33
33
|
*/
|
|
34
34
|
readonly onClear?: () => void;
|
|
35
35
|
/**
|
|
36
|
-
* Callback function invoked upon the
|
|
36
|
+
* Callback function invoked upon the FilterPicker menu closing.
|
|
37
37
|
*/
|
|
38
38
|
readonly onClose?: () => void;
|
|
39
39
|
/**
|
|
40
|
-
* Debounced callback function invoked on
|
|
40
|
+
* Debounced callback function invoked on FilterPicker search input change. Receives the current search value as an argument.
|
|
41
41
|
*/
|
|
42
42
|
readonly onSearch?: (searchValue: string) => void;
|
|
43
43
|
/**
|
|
@@ -53,7 +53,7 @@ export interface ComboboxProps {
|
|
|
53
53
|
*/
|
|
54
54
|
readonly label?: string;
|
|
55
55
|
/**
|
|
56
|
-
* Should the
|
|
56
|
+
* Should the FilterPicker display the loading state.
|
|
57
57
|
*/
|
|
58
58
|
readonly loading?: boolean;
|
|
59
59
|
/**
|
|
@@ -61,44 +61,44 @@ export interface ComboboxProps {
|
|
|
61
61
|
*/
|
|
62
62
|
readonly defaultActivatorRef?: React.Ref<HTMLButtonElement>;
|
|
63
63
|
}
|
|
64
|
-
export interface
|
|
64
|
+
export interface FilterPickerCustomActivatorProps {
|
|
65
65
|
/**
|
|
66
|
-
* Required to describe the expanded state of the
|
|
66
|
+
* Required to describe the expanded state of the FilterPicker.
|
|
67
67
|
* Automatically updates as open state is toggled.
|
|
68
68
|
*/
|
|
69
69
|
ariaExpanded: boolean;
|
|
70
70
|
/**
|
|
71
|
-
* Required to describe the relationship between the toggle-able
|
|
71
|
+
* Required to describe the relationship between the toggle-able FilterPicker Menu and the activator.
|
|
72
72
|
*/
|
|
73
73
|
ariaControls: string;
|
|
74
74
|
/**
|
|
75
|
-
* The aria-label attribute for the
|
|
75
|
+
* The aria-label attribute for the FilterPicker activator.
|
|
76
76
|
*/
|
|
77
77
|
ariaLabel?: string;
|
|
78
78
|
/**
|
|
79
|
-
* Required to describe the interactive element which toggles the
|
|
79
|
+
* Required to describe the interactive element which toggles the FilterPicker's visibility.
|
|
80
80
|
*/
|
|
81
81
|
role: "combobox";
|
|
82
82
|
/**
|
|
83
|
-
* Method to open the
|
|
83
|
+
* Method to open the FilterPicker. Closing is handled by the FilterPicker itself.
|
|
84
84
|
*/
|
|
85
85
|
open: () => void;
|
|
86
86
|
}
|
|
87
|
-
export type
|
|
88
|
-
export interface
|
|
89
|
-
readonly children: React.ReactElement | ((props:
|
|
87
|
+
export type FilterPickerActivatorAccessibility = Omit<FilterPickerCustomActivatorProps, "open">;
|
|
88
|
+
export interface FilterPickerActivatorProps {
|
|
89
|
+
readonly children: React.ReactElement | ((props: FilterPickerCustomActivatorProps) => React.ReactElement);
|
|
90
90
|
}
|
|
91
|
-
export interface
|
|
91
|
+
export interface FilterPickerTriggerProps extends Pick<FilterPickerContentProps, "selected"> {
|
|
92
92
|
readonly label?: string;
|
|
93
93
|
readonly activatorRef?: React.Ref<HTMLButtonElement>;
|
|
94
94
|
}
|
|
95
|
-
export interface
|
|
95
|
+
export interface FilterPickerOptionProps {
|
|
96
96
|
/**
|
|
97
97
|
* A unique identifier for the option.
|
|
98
98
|
*/
|
|
99
99
|
id: string | number;
|
|
100
100
|
/**
|
|
101
|
-
* The value to be visually displayed in the
|
|
101
|
+
* The value to be visually displayed in the FilterPicker options list.
|
|
102
102
|
*/
|
|
103
103
|
label: string;
|
|
104
104
|
/**
|
|
@@ -109,7 +109,7 @@ export interface ComboboxOptionProps {
|
|
|
109
109
|
* Advanced: A custom render prop to completely control how this option is rendered.
|
|
110
110
|
* The function receives the option's props, and a boolean indicating if the option is selected.
|
|
111
111
|
*/
|
|
112
|
-
readonly customRender?: (option: Pick<
|
|
112
|
+
readonly customRender?: (option: Pick<FilterPickerOptionProps, "id" | "label" | "prefix"> & {
|
|
113
113
|
isSelected: boolean;
|
|
114
114
|
/** Render the default option content. */
|
|
115
115
|
defaultContent: ReactElement;
|
|
@@ -117,14 +117,14 @@ export interface ComboboxOptionProps {
|
|
|
117
117
|
/**
|
|
118
118
|
* Callback function invoked when the option is clicked.
|
|
119
119
|
*/
|
|
120
|
-
readonly onClick?: (option:
|
|
120
|
+
readonly onClick?: (option: FilterPickerOption) => void;
|
|
121
121
|
}
|
|
122
|
-
export type
|
|
123
|
-
export interface
|
|
122
|
+
export type FilterPickerOption = FilterPickerOptionProps;
|
|
123
|
+
export interface FilterPickerContentProps {
|
|
124
124
|
/**
|
|
125
|
-
* The selected options of the
|
|
125
|
+
* The selected options of the FilterPicker.
|
|
126
126
|
*/
|
|
127
|
-
readonly selected:
|
|
127
|
+
readonly selected: FilterPickerOption[];
|
|
128
128
|
/**
|
|
129
129
|
* The encapsulating noun for the content of the combobox. Used
|
|
130
130
|
* in the empty state, and search placeholder. Should be pluralized.
|
|
@@ -137,11 +137,11 @@ export interface ComboboxContentProps {
|
|
|
137
137
|
/**
|
|
138
138
|
* State setter for the selected options.
|
|
139
139
|
*/
|
|
140
|
-
readonly selectedStateSetter: (selection:
|
|
140
|
+
readonly selectedStateSetter: (selection: FilterPickerOption[]) => void;
|
|
141
141
|
/**
|
|
142
142
|
* Callback function to be called when an option is selected.
|
|
143
143
|
*/
|
|
144
|
-
readonly handleSelection: (option:
|
|
144
|
+
readonly handleSelection: (option: FilterPickerOption) => void;
|
|
145
145
|
/**
|
|
146
146
|
* Are multiple selections permitted.
|
|
147
147
|
*/
|
|
@@ -163,23 +163,23 @@ export interface ComboboxContentProps {
|
|
|
163
163
|
*/
|
|
164
164
|
readonly onLoadMore?: () => void;
|
|
165
165
|
/**
|
|
166
|
-
* Reference to the wrapping div element of all the
|
|
166
|
+
* Reference to the wrapping div element of all the FilterPicker pieces
|
|
167
167
|
*/
|
|
168
168
|
readonly wrapperRef: React.RefObject<HTMLDivElement | null>;
|
|
169
169
|
/**
|
|
170
|
-
* Is the
|
|
170
|
+
* Is the FilterPicker open
|
|
171
171
|
*/
|
|
172
172
|
readonly open: boolean;
|
|
173
173
|
/**
|
|
174
|
-
* The full set of options for the
|
|
174
|
+
* The full set of options for the FilterPicker in the shape of data, not elements.
|
|
175
175
|
*/
|
|
176
|
-
readonly options:
|
|
176
|
+
readonly options: FilterPickerOption[];
|
|
177
177
|
/**
|
|
178
178
|
* Should loading state be shown.
|
|
179
179
|
*/
|
|
180
180
|
readonly loading?: boolean;
|
|
181
181
|
}
|
|
182
|
-
export interface
|
|
182
|
+
export interface FilterPickerSearchProps {
|
|
183
183
|
/**
|
|
184
184
|
* The placeholder for the search input.
|
|
185
185
|
*/
|
|
@@ -189,7 +189,7 @@ export interface ComboboxSearchProps {
|
|
|
189
189
|
*/
|
|
190
190
|
searchValue: string;
|
|
191
191
|
/**
|
|
192
|
-
* The open state of the
|
|
192
|
+
* The open state of the FilterPicker listbox.
|
|
193
193
|
*/
|
|
194
194
|
open: boolean;
|
|
195
195
|
/**
|
|
@@ -201,9 +201,9 @@ export interface ComboboxSearchProps {
|
|
|
201
201
|
*/
|
|
202
202
|
readonly handleSearchChange: (value: string) => void;
|
|
203
203
|
}
|
|
204
|
-
export interface
|
|
204
|
+
export interface FilterPickerHeaderProps {
|
|
205
205
|
/**
|
|
206
|
-
* Does the
|
|
206
|
+
* Does the FilterPicker have any options visible in the list.
|
|
207
207
|
*/
|
|
208
208
|
readonly hasOptionsVisible: boolean;
|
|
209
209
|
/**
|
|
@@ -223,15 +223,15 @@ export interface ComboboxHeaderProps {
|
|
|
223
223
|
*/
|
|
224
224
|
readonly onSelectAll: () => void;
|
|
225
225
|
}
|
|
226
|
-
export interface
|
|
226
|
+
export interface FilterPickerListProps {
|
|
227
227
|
/**
|
|
228
|
-
* The options to display in the list. May be the full set of the
|
|
228
|
+
* The options to display in the list. May be the full set of the FilterPicker or could be filtered.
|
|
229
229
|
*/
|
|
230
|
-
readonly options:
|
|
230
|
+
readonly options: FilterPickerOption[];
|
|
231
231
|
/**
|
|
232
232
|
* The currently selected options.
|
|
233
233
|
*/
|
|
234
|
-
readonly selected:
|
|
234
|
+
readonly selected: FilterPickerOption[];
|
|
235
235
|
/**
|
|
236
236
|
* A ref to the list element.
|
|
237
237
|
*/
|
|
@@ -241,7 +241,7 @@ export interface ComboboxListProps {
|
|
|
241
241
|
*/
|
|
242
242
|
readonly searchValue: string;
|
|
243
243
|
/**
|
|
244
|
-
* Determines if it is a single selection or multi selection
|
|
244
|
+
* Determines if it is a single selection or multi selection FilterPicker.
|
|
245
245
|
*/
|
|
246
246
|
readonly multiselect?: boolean;
|
|
247
247
|
/**
|
|
@@ -257,26 +257,26 @@ export interface ComboboxListProps {
|
|
|
257
257
|
*/
|
|
258
258
|
readonly onLoadMore?: () => void;
|
|
259
259
|
}
|
|
260
|
-
export interface
|
|
260
|
+
export interface FilterPickerActionProps {
|
|
261
261
|
/**
|
|
262
262
|
* The function to call when the action is clicked.
|
|
263
263
|
*/
|
|
264
|
-
onClick(event: React.MouseEvent<HTMLButtonElement>, options:
|
|
264
|
+
onClick(event: React.MouseEvent<HTMLButtonElement>, options: FilterPickerActionCallbackOptions): void;
|
|
265
265
|
/**
|
|
266
266
|
* The label text of the action.
|
|
267
267
|
*/
|
|
268
|
-
readonly label: string | ((options:
|
|
268
|
+
readonly label: string | ((options: FilterPickerActionCallbackOptions) => string);
|
|
269
269
|
/**
|
|
270
270
|
* Determine if the action is visible for a given item.
|
|
271
271
|
*/
|
|
272
|
-
readonly visible?: boolean | ((options:
|
|
272
|
+
readonly visible?: boolean | ((options: FilterPickerActionCallbackOptions) => boolean);
|
|
273
273
|
/**
|
|
274
|
-
* Keeps the
|
|
274
|
+
* Keeps the FilterPicker open when the action is clicked.
|
|
275
275
|
* @default false
|
|
276
276
|
*/
|
|
277
277
|
readonly keepOpenOnClick?: boolean;
|
|
278
278
|
}
|
|
279
|
-
export interface
|
|
279
|
+
export interface FilterPickerActionCallbackOptions {
|
|
280
280
|
readonly searchValue: string;
|
|
281
281
|
}
|
|
282
282
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { RefObject } from "react";
|
|
3
|
+
import { type FilterPickerOption } from "./FilterPicker.types";
|
|
4
|
+
export interface FilterPickerProviderProps {
|
|
5
|
+
readonly children: React.ReactNode;
|
|
6
|
+
readonly selected: FilterPickerOption[];
|
|
7
|
+
readonly selectionHandler: (option: FilterPickerOption) => void;
|
|
8
|
+
readonly open: boolean;
|
|
9
|
+
readonly handleClose: () => void;
|
|
10
|
+
readonly handleOpen: () => void;
|
|
11
|
+
readonly shouldScroll: RefObject<boolean>;
|
|
12
|
+
readonly searchValue: string;
|
|
13
|
+
readonly label?: string;
|
|
14
|
+
readonly onClear?: () => void;
|
|
15
|
+
readonly onSelectAll?: (selection: FilterPickerOption[]) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const FilterPickerContext: React.Context<Omit<FilterPickerProviderProps, "children">>;
|
|
18
|
+
export declare function FilterPickerContextProvider({ children, ...props }: FilterPickerProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var FilterPickerAction = require('../../../FilterPickerAction-cjs.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('../../../Typography-cjs.js');
|
|
6
|
+
require('classnames');
|
|
7
|
+
require('../../../FilterPickerProvider-cjs.js');
|
|
8
|
+
require('../../../tslib.es6-cjs.js');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.FilterPickerAction = FilterPickerAction.FilterPickerAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerAction } from "./FilterPickerAction";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var FilterPickerActivator = require('../../../FilterPickerActivator-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('../../../Button-cjs.js');
|
|
6
6
|
require('../../../tslib.es6-cjs.js');
|
|
@@ -22,9 +22,9 @@ require('react/jsx-runtime');
|
|
|
22
22
|
require('react-dom');
|
|
23
23
|
require('../../../floating-ui.react-dom-cjs.js');
|
|
24
24
|
require('framer-motion');
|
|
25
|
-
require('../../../
|
|
25
|
+
require('../../../FilterPickerProvider-cjs.js');
|
|
26
26
|
require('../../../constants-cjs.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
exports.
|
|
30
|
+
exports.FilterPickerActivator = FilterPickerActivator.FilterPickerActivator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FilterPickerActivator";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { F as FilterPickerActivator } from '../../../FilterPickerActivator-es.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../../Button-es.js';
|
|
4
4
|
import '../../../tslib.es6-es.js';
|
|
@@ -20,5 +20,5 @@ import 'react/jsx-runtime';
|
|
|
20
20
|
import 'react-dom';
|
|
21
21
|
import '../../../floating-ui.react-dom-es.js';
|
|
22
22
|
import 'framer-motion';
|
|
23
|
-
import '../../../
|
|
23
|
+
import '../../../FilterPickerProvider-es.js';
|
|
24
24
|
import '../../../constants-es.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var FilterPickerContentHeader = require('../../../../FilterPickerContentHeader-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('../../../../Typography-cjs.js');
|
|
6
6
|
require('classnames');
|
|
@@ -12,4 +12,4 @@ require('@jobber/design');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.
|
|
15
|
+
exports.FilterPickerContentHeader = FilterPickerContentHeader.FilterPickerContentHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerContentHeader } from "./FilterPickerContentHeader";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "container": string;
|
|
3
|
+
readonly "emptyStateMessage": string;
|
|
4
|
+
readonly "filterMessage": string;
|
|
5
|
+
readonly "hasOptions": string;
|
|
6
|
+
readonly "loadingContainer": string;
|
|
7
|
+
readonly "optionsList": string;
|
|
8
|
+
readonly "scrollBottom": string;
|
|
9
|
+
readonly "scrollNone": string;
|
|
10
|
+
readonly "scrollTop": string;
|
|
11
|
+
};
|
|
12
|
+
export = styles;
|
|
13
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var FilterPickerContentList = require('../../../../FilterPickerContentList-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('classnames');
|
|
6
6
|
require('framer-motion');
|
|
@@ -21,13 +21,13 @@ require('../../../../_baseFor-cjs.js');
|
|
|
21
21
|
require('../../../../keysIn-cjs.js');
|
|
22
22
|
require('../../../../_isIterateeCall-cjs.js');
|
|
23
23
|
require('../../../../_setToString-cjs.js');
|
|
24
|
-
require('../../../../
|
|
24
|
+
require('../../../../FilterPickerOption-cjs.js');
|
|
25
25
|
require('../../../../Icon-cjs.js');
|
|
26
26
|
require('../../../../Flex-cjs.js');
|
|
27
|
-
require('../../../../
|
|
28
|
-
require('../../../../
|
|
27
|
+
require('../../../../FilterPickerProvider-cjs.js');
|
|
28
|
+
require('../../../../FilterPickerLoadMore-cjs.js');
|
|
29
29
|
require('@jobber/hooks');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.
|
|
33
|
+
exports.FilterPickerContentList = FilterPickerContentList.FilterPickerContentList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerContentList } from "./FilterPickerContentList";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { F as FilterPickerContentList } from '../../../../FilterPickerContentList-es.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import 'framer-motion';
|
|
@@ -19,9 +19,9 @@ import '../../../../_baseFor-es.js';
|
|
|
19
19
|
import '../../../../keysIn-es.js';
|
|
20
20
|
import '../../../../_isIterateeCall-es.js';
|
|
21
21
|
import '../../../../_setToString-es.js';
|
|
22
|
-
import '../../../../
|
|
22
|
+
import '../../../../FilterPickerOption-es.js';
|
|
23
23
|
import '../../../../Icon-es.js';
|
|
24
24
|
import '../../../../Flex-es.js';
|
|
25
|
-
import '../../../../
|
|
26
|
-
import '../../../../
|
|
25
|
+
import '../../../../FilterPickerProvider-es.js';
|
|
26
|
+
import '../../../../FilterPickerLoadMore-es.js';
|
|
27
27
|
import '@jobber/hooks';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var FilterPickerContentSearch = require('../../../../FilterPickerContentSearch-cjs.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('../../../../Icon-cjs.js');
|
|
6
|
+
require('@jobber/design');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.FilterPickerContentSearch = FilterPickerContentSearch.FilterPickerContentSearch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerContentSearch } from "./FilterPickerContentSearch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerLoadMore } from "./FilterPickerLoadMore";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var FilterPickerContent = require('../../../FilterPickerContent-cjs.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('classnames');
|
|
6
6
|
require('../../../floating-ui.react-cjs.js');
|
|
@@ -9,10 +9,10 @@ require('../../../index.esm-cjs.js');
|
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('react-dom');
|
|
11
11
|
require('../../../floating-ui.react-dom-cjs.js');
|
|
12
|
-
require('../../../
|
|
12
|
+
require('../../../FilterPickerContentSearch-cjs.js');
|
|
13
13
|
require('../../../Icon-cjs.js');
|
|
14
14
|
require('@jobber/design');
|
|
15
|
-
require('../../../
|
|
15
|
+
require('../../../FilterPickerContentList-cjs.js');
|
|
16
16
|
require('framer-motion');
|
|
17
17
|
require('../../../Text-cjs.js');
|
|
18
18
|
require('../../../Typography-cjs.js');
|
|
@@ -30,16 +30,16 @@ require('../../../_baseFor-cjs.js');
|
|
|
30
30
|
require('../../../keysIn-cjs.js');
|
|
31
31
|
require('../../../_isIterateeCall-cjs.js');
|
|
32
32
|
require('../../../_setToString-cjs.js');
|
|
33
|
-
require('../../../
|
|
33
|
+
require('../../../FilterPickerOption-cjs.js');
|
|
34
34
|
require('../../../Flex-cjs.js');
|
|
35
|
-
require('../../../
|
|
36
|
-
require('../../../
|
|
35
|
+
require('../../../FilterPickerProvider-cjs.js');
|
|
36
|
+
require('../../../FilterPickerLoadMore-cjs.js');
|
|
37
37
|
require('@jobber/hooks');
|
|
38
|
-
require('../../../
|
|
38
|
+
require('../../../FilterPickerContentHeader-cjs.js');
|
|
39
39
|
require('../../../Button-cjs.js');
|
|
40
40
|
require('react-router-dom');
|
|
41
41
|
require('../../../constants-cjs.js');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
exports.
|
|
45
|
+
exports.FilterPickerContent = FilterPickerContent.FilterPickerContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilterPickerContent } from "./FilterPickerContent";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { F as FilterPickerContent } from '../../../FilterPickerContent-es.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '../../../floating-ui.react-es.js';
|
|
@@ -7,10 +7,10 @@ import '../../../index.esm-es.js';
|
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import '../../../floating-ui.react-dom-es.js';
|
|
10
|
-
import '../../../
|
|
10
|
+
import '../../../FilterPickerContentSearch-es.js';
|
|
11
11
|
import '../../../Icon-es.js';
|
|
12
12
|
import '@jobber/design';
|
|
13
|
-
import '../../../
|
|
13
|
+
import '../../../FilterPickerContentList-es.js';
|
|
14
14
|
import 'framer-motion';
|
|
15
15
|
import '../../../Text-es.js';
|
|
16
16
|
import '../../../Typography-es.js';
|
|
@@ -28,12 +28,12 @@ import '../../../_baseFor-es.js';
|
|
|
28
28
|
import '../../../keysIn-es.js';
|
|
29
29
|
import '../../../_isIterateeCall-es.js';
|
|
30
30
|
import '../../../_setToString-es.js';
|
|
31
|
-
import '../../../
|
|
31
|
+
import '../../../FilterPickerOption-es.js';
|
|
32
32
|
import '../../../Flex-es.js';
|
|
33
|
-
import '../../../
|
|
34
|
-
import '../../../
|
|
33
|
+
import '../../../FilterPickerProvider-es.js';
|
|
34
|
+
import '../../../FilterPickerLoadMore-es.js';
|
|
35
35
|
import '@jobber/hooks';
|
|
36
|
-
import '../../../
|
|
36
|
+
import '../../../FilterPickerContentHeader-es.js';
|
|
37
37
|
import '../../../Button-es.js';
|
|
38
38
|
import 'react-router-dom';
|
|
39
39
|
import '../../../constants-es.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var FilterPickerOption = require('../../../FilterPickerOption-cjs.js');
|
|
4
4
|
require('../../../tslib.es6-cjs.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('../../../Icon-cjs.js');
|
|
8
8
|
require('@jobber/design');
|
|
9
9
|
require('../../../Flex-cjs.js');
|
|
10
|
-
require('../../../
|
|
10
|
+
require('../../../FilterPickerProvider-cjs.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
exports.
|
|
14
|
+
exports.FilterPickerOption = FilterPickerOption.FilterPickerOption;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FilterPickerOption";
|