@jobber/components 4.41.0 → 4.42.1-update-hov.11
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/Chip.d.ts +1 -0
- package/Chip.js +17 -0
- package/Combobox.d.ts +1 -0
- package/Combobox.js +17 -0
- package/Flex.d.ts +1 -0
- package/Flex.js +17 -0
- package/dist/Autocomplete/index.js +8 -8
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-1aa30ee1.js → Avatar-76a799fa.js} +1 -1
- package/dist/Banner/index.js +5 -5
- package/dist/Button/index.js +2 -2
- package/dist/Button-163a0641.js +57 -0
- package/dist/ButtonDismiss/index.js +3 -3
- package/dist/{ButtonDismiss-82680c7d.js → ButtonDismiss-2b98d075.js} +1 -1
- package/dist/Card/index.js +5 -5
- package/dist/{Card-cc2ffbaa.js → Card-3178033c.js} +4 -4
- package/dist/Checkbox/index.js +3 -3
- package/dist/{Checkbox-3bccf65c.js → Checkbox-ad7ec2e7.js} +2 -2
- package/dist/Chip/Chip.d.ts +8 -0
- package/dist/Chip/components/ChipDismissible/ChipDismissible.d.ts +3 -0
- package/dist/Chip/components/ChipPrefix/Chip.Prefix.d.ts +2 -0
- package/dist/Chip/components/ChipSelectable/ChipSelectable.d.ts +3 -0
- package/dist/Chip/components/ChipSuffix/Chip.Suffix.d.ts +6 -0
- package/dist/Chip/hooks/index.d.ts +1 -0
- package/dist/Chip/hooks/useChildComponent.d.ts +8 -0
- package/dist/Chip/index.d.ts +3 -0
- package/dist/Chip/index.js +40 -0
- package/dist/Chip-55e6da05.js +89 -0
- package/dist/Chips/index.js +505 -19
- package/dist/Combobox/Combobox.d.ts +11 -0
- package/dist/Combobox/Combobox.types.d.ts +189 -0
- package/dist/Combobox/ComboboxProvider.d.ts +20 -0
- package/dist/Combobox/components/ComboboxAction/ComboboxAction.d.ts +3 -0
- package/dist/Combobox/components/ComboboxAction/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +3 -0
- package/dist/Combobox/components/ComboboxActivator/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +3 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +3 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +3 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +3 -0
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxContent/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxOption/ComboboxOption.d.ts +6 -0
- package/dist/Combobox/components/ComboboxOption/index.d.ts +1 -0
- package/dist/Combobox/components/ComboboxTrigger/ComboboxTrigger.d.ts +3 -0
- package/dist/Combobox/components/ComboboxTrigger/index.d.ts +1 -0
- package/dist/Combobox/hooks/useCombobox.d.ts +15 -0
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +13 -0
- package/dist/Combobox/hooks/useComboboxContent.d.ts +8 -0
- package/dist/Combobox/hooks/useComboboxValidation.d.ts +12 -0
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +7 -0
- package/dist/Combobox/index.d.ts +3 -0
- package/dist/Combobox/index.js +31 -0
- package/dist/Combobox-0044641d.js +403 -0
- package/dist/ConfirmationModal/index.js +9 -9
- package/dist/{ConfirmationModal-6b61ebf5.js → ConfirmationModal-f7234e44.js} +2 -2
- package/dist/Content/Content.d.ts +1 -1
- package/dist/DataDump/index.js +6 -6
- package/dist/DataList/DataList.d.ts +10 -3
- package/dist/DataList/DataList.types.d.ts +80 -5
- package/dist/DataList/DataList.utils.d.ts +5 -4
- package/dist/DataList/components/DataListAction/DataListAction.d.ts +2 -3
- package/dist/DataList/components/DataListActions/DataListActions.d.ts +3 -0
- package/dist/DataList/components/DataListActions/index.d.ts +1 -0
- package/dist/DataList/components/DataListActionsMenu/DataListActionsMenu.d.ts +2 -2
- package/dist/DataList/components/DataListBulkActions/DataListBulkActions.const.d.ts +1 -0
- package/dist/DataList/components/DataListBulkActions/DataListBulkActions.d.ts +4 -0
- package/dist/DataList/components/DataListBulkActions/index.d.ts +1 -0
- package/dist/DataList/components/DataListHeader/DataListHeader.d.ts +2 -0
- package/dist/DataList/components/DataListHeader/index.d.ts +1 -0
- package/dist/DataList/components/DataListItem/DataListItem.d.ts +9 -0
- package/dist/DataList/components/{DataListLayoutInternal → DataListItem}/DataListItemInternal.d.ts +1 -1
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickable.d.ts +2 -0
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickableInternal.d.ts +3 -0
- package/dist/DataList/components/DataListItem/components/DataListItemClickable/index.d.ts +1 -0
- package/dist/DataList/components/DataListItem/index.d.ts +1 -0
- package/dist/DataList/components/DataListItemActions/DataListItemActions.d.ts +4 -4
- package/dist/DataList/components/DataListItemActionsOverflow/DataListItemActionsOverflow.d.ts +7 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.d.ts +1 -0
- package/dist/DataList/components/DataListItems/DataListItems.d.ts +7 -0
- package/dist/DataList/components/DataListItems/index.d.ts +1 -0
- package/dist/DataList/components/DataListLayout/DataListLayout.d.ts +2 -2
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutActions.d.ts +2 -0
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/DataListLayoutContext.d.ts +4 -0
- package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/index.d.ts +1 -0
- package/dist/DataList/components/DataListLayoutActions/index.d.ts +1 -0
- package/dist/DataList/components/DataListLoadingState/DataListLoadingState.d.ts +2 -9
- package/dist/DataList/components/DataListOverflowFade/DataListOverflowFade.d.ts +6 -0
- package/dist/DataList/components/DataListOverflowFade/index.d.ts +2 -0
- package/dist/DataList/components/DataListSearch/DataListSearch.d.ts +1 -1
- package/dist/DataList/components/DataListStatusBar/DataListStatusBar.d.ts +10 -0
- package/dist/DataList/components/DataListStatusBar/index.d.ts +1 -0
- package/dist/DataList/context/DataListContext/DataListContext.d.ts +4 -10
- package/dist/DataList/context/DataListLayoutContext/DataListLayoutContext.d.ts +5 -0
- package/dist/DataList/context/DataListLayoutContext/index.d.ts +1 -0
- package/dist/DataList/hooks/useActiveLayout.d.ts +4 -0
- package/dist/DataList/hooks/useGetItemActions.d.ts +6 -0
- package/dist/DataList/index.js +626 -376
- package/dist/DataTable/DataTable.d.ts +10 -10
- package/dist/DataTable/Pagination.d.ts +6 -5
- package/dist/DataTable/index.js +20 -14
- package/dist/DatePicker/index.js +3 -3
- package/dist/{DatePicker-b31baae4.js → DatePicker-c18f1739.js} +3 -3
- package/dist/DescriptionList/index.js +2 -2
- package/dist/Disclosure/index.js +2 -2
- package/dist/Drawer/index.js +5 -5
- package/dist/Emphasis/index.js +2 -2
- package/dist/{Emphasis-76a10790.js → Emphasis-b2d1b3aa.js} +1 -1
- package/dist/FeatureSwitch/index.js +7 -7
- package/dist/Flex/Flex.d.ts +32 -0
- package/dist/Flex/Flex.types.d.ts +6 -0
- package/dist/Flex/index.d.ts +1 -0
- package/dist/Flex/index.js +40 -0
- package/dist/FormField/index.js +5 -5
- package/dist/{FormField-d6138b7f.js → FormField-0b529c0b.js} +4 -4
- package/dist/FormatFile/index.js +11 -11
- package/dist/{FormatFile-aa1898f9.js → FormatFile-6bc7f045.js} +6 -6
- package/dist/Gallery/index.js +12 -12
- package/dist/Heading/index.js +2 -2
- package/dist/{Heading-a1191b15.js → Heading-0f4ecb0c.js} +1 -1
- package/dist/InlineLabel/index.js +2 -2
- package/dist/{InlineLabel-afd5fc6f.js → InlineLabel-9a517c19.js} +2 -2
- package/dist/InputAvatar/index.js +5 -5
- package/dist/InputDate/index.js +6 -6
- package/dist/InputEmail/index.js +5 -5
- package/dist/InputFile/index.js +3 -3
- package/dist/{InputFile-2a06c2c0.js → InputFile-8a21a5fb.js} +3 -3
- package/dist/InputNumber/index.js +6 -6
- package/dist/{InputNumber-07b03067.js → InputNumber-6a7cefc6.js} +1 -1
- package/dist/InputPassword/index.js +5 -5
- package/dist/InputPhoneNumber/index.js +5 -5
- package/dist/InputText/index.js +6 -6
- package/dist/{InputText-d1a52550.js → InputText-dcf6c428.js} +1 -1
- package/dist/InputTime/index.js +5 -5
- package/dist/InputValidation/index.js +3 -3
- package/dist/{InputValidation-b5a3d92c.js → InputValidation-179f0926.js} +2 -2
- package/dist/LightBox/index.js +4 -4
- package/dist/{LightBox-437a1c8b.js → LightBox-3f4dbc33.js} +2 -2
- package/dist/Link/Link.d.ts +1 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/List/index.js +7 -7
- package/dist/Markdown/index.js +5 -5
- package/dist/{Markdown-f6748dcb.js → Markdown-96070121.js} +3 -3
- package/dist/Menu/index.js +3 -3
- package/dist/{Menu-51f8712f.js → Menu-d7ea093c.js} +3 -3
- package/dist/Modal/index.js +5 -5
- package/dist/{Modal-a9ab9565.js → Modal-b9d194e4.js} +4 -4
- package/dist/MultiSelect/index.js +5 -5
- package/dist/{Option-b903e7ac.js → Option-752ce1e8.js} +1 -1
- package/dist/Page/index.js +7 -7
- package/dist/Popover/index.js +50 -9
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-5dfc1885.js → ProgressBar-250e7b24.js} +1 -1
- package/dist/RadioGroup/index.js +3 -3
- package/dist/{RadioGroup-8e76d20b.js → RadioGroup-ebaa4f87.js} +2 -2
- package/dist/RecurringSelect/index.js +11 -11
- package/dist/Select/index.js +6 -6
- package/dist/StatusLabel/index.js +2 -2
- package/dist/Switch/index.js +2 -2
- package/dist/{Switch-e75145cc.js → Switch-b85272bf.js} +2 -2
- package/dist/Tabs/Tabs.d.ts +12 -1
- package/dist/Tabs/index.js +8 -4
- package/dist/Text/index.js +2 -2
- package/dist/{Text-e7ed0974.js → Text-4a2bc89f.js} +1 -1
- package/dist/Toast/index.js +2 -2
- package/dist/Tooltip/index.js +1 -3
- package/dist/{Tooltip-bf67fe6e.js → Tooltip-6b12f1c2.js} +6 -8
- package/dist/Typography/index.js +1 -1
- package/dist/{Typography-fd6f932a.js → Typography-973b122e.js} +3 -3
- package/package.json +7 -7
- package/rollup.config.js +3 -5
- package/dist/Button-fd8413b2.js +0 -57
- package/dist/Chip-4916a642.js +0 -514
- package/dist/DataList/components/DataListItemActions/DataListItemActionsOverflow.d.ts +0 -7
- package/dist/DataList/components/DataListLayoutInternal/DataListHeader.d.ts +0 -11
- package/dist/DataList/components/DataListLayoutInternal/DataListItems.d.ts +0 -10
- package/dist/DataList/components/DataListLayoutInternal/DataListLayoutInternal.d.ts +0 -10
- package/dist/DataList/components/DataListLayoutInternal/index.d.ts +0 -3
- package/dist/DataList/hooks/useLayoutMediaQueries.d.ts +0 -1
- package/dist/Popover-bbfc6aa1.js +0 -53
- /package/dist/DataList/components/{DataListLayoutInternal → DataListHeader}/DataListHeaderCheckbox.d.ts +0 -0
- /package/dist/DataList/components/{DataListFilters/DataListFilter.const.d.ts → DataListOverflowFade/DataListOverflowFade.const.d.ts} +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { Dispatch, ReactElement, SetStateAction } from "react";
|
|
2
|
+
type ComboboxFragment = Iterable<ComboboxNode>;
|
|
3
|
+
type ComboboxNode = ReactElement | ComboboxFragment;
|
|
4
|
+
export interface ComboboxProps {
|
|
5
|
+
readonly children?: ComboboxNode;
|
|
6
|
+
/**
|
|
7
|
+
* When `true`, `Combobox` will allow for multiple selections
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
readonly multiSelect?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Placeholder text to display in the search input. Defaults to "Search".
|
|
14
|
+
*/
|
|
15
|
+
readonly searchPlaceholder?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The selected options of the Combobox.
|
|
18
|
+
*/
|
|
19
|
+
readonly selected: ComboboxOption[];
|
|
20
|
+
/**
|
|
21
|
+
* The encapsulating noun for the content of the combobox. Used
|
|
22
|
+
* in the empty state, and search placeholder. Should be pluralized.
|
|
23
|
+
*/
|
|
24
|
+
readonly subjectNoun?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Callback function invoked upon the selection of an option. Provides the selected option(s) as an argument.
|
|
27
|
+
*/
|
|
28
|
+
readonly onSelect: (selection: ComboboxOption[]) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function invoked upon the Combobox menu closing.
|
|
31
|
+
*/
|
|
32
|
+
readonly onClose?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* The Chip heading for the trigger
|
|
35
|
+
*/
|
|
36
|
+
readonly label?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ComboboxActivatorProps {
|
|
39
|
+
readonly children: React.ReactElement;
|
|
40
|
+
}
|
|
41
|
+
export interface ComboboxTriggerProps extends Pick<ComboboxContentProps, "selected"> {
|
|
42
|
+
readonly label?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ComboboxOption {
|
|
45
|
+
/**
|
|
46
|
+
* A unique identifier for the option.
|
|
47
|
+
*/
|
|
48
|
+
id: string | number;
|
|
49
|
+
/**
|
|
50
|
+
* The value to be visually displayed in the Combobox options list.
|
|
51
|
+
*/
|
|
52
|
+
label: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ComboboxContentProps {
|
|
55
|
+
/**
|
|
56
|
+
* Placeholder text to display in the search input. Defaults to "Search".
|
|
57
|
+
*/
|
|
58
|
+
readonly searchPlaceholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The selected options of the Combobox.
|
|
61
|
+
*/
|
|
62
|
+
readonly selected: ComboboxOption[];
|
|
63
|
+
/**
|
|
64
|
+
* The encapsulating noun for the content of the combobox. Used
|
|
65
|
+
* in the empty state, and search placeholder. Should be pluralized.
|
|
66
|
+
*/
|
|
67
|
+
readonly subjectNoun?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Action elements to be displayed at the bottom of the list.
|
|
70
|
+
*/
|
|
71
|
+
readonly actionElements?: ReactElement[];
|
|
72
|
+
/**
|
|
73
|
+
* State setter for the selected options.
|
|
74
|
+
*/
|
|
75
|
+
readonly selectedStateSetter: (selection: ComboboxOption[]) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Callback function to be called when an option is selected.
|
|
78
|
+
*/
|
|
79
|
+
readonly handleSelection: (option: ComboboxOption) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Are multiple selections permitted.
|
|
82
|
+
*/
|
|
83
|
+
readonly multiselect?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The current search term.
|
|
86
|
+
*/
|
|
87
|
+
readonly searchValue: string;
|
|
88
|
+
/**
|
|
89
|
+
* Setter for the current search term.
|
|
90
|
+
*/
|
|
91
|
+
readonly setSearchValue: Dispatch<SetStateAction<string>>;
|
|
92
|
+
/**
|
|
93
|
+
* Reference to the wrapping div element of all the Combobox pieces
|
|
94
|
+
*/
|
|
95
|
+
readonly wrapperRef: React.RefObject<HTMLDivElement>;
|
|
96
|
+
/**
|
|
97
|
+
* Is the Combobox open
|
|
98
|
+
*/
|
|
99
|
+
readonly open: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Setter for the open state of the Combobox.
|
|
102
|
+
*/
|
|
103
|
+
readonly setOpen: (open: boolean) => void;
|
|
104
|
+
/**
|
|
105
|
+
* The full set of options for the Combobox in the shape of data, not elements.
|
|
106
|
+
*/
|
|
107
|
+
readonly options: ComboboxOption[];
|
|
108
|
+
}
|
|
109
|
+
export interface ComboboxSearchProps {
|
|
110
|
+
/**
|
|
111
|
+
* The placeholder for the search input.
|
|
112
|
+
*/
|
|
113
|
+
placeholder?: string;
|
|
114
|
+
/**
|
|
115
|
+
* The value of the search input
|
|
116
|
+
*/
|
|
117
|
+
searchValue: string;
|
|
118
|
+
/**
|
|
119
|
+
* The open state of the Combobox listbox.
|
|
120
|
+
*/
|
|
121
|
+
open: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Setter for the search input value.
|
|
124
|
+
*/
|
|
125
|
+
setSearchValue: Dispatch<SetStateAction<string>>;
|
|
126
|
+
}
|
|
127
|
+
export interface ComboboxHeaderProps {
|
|
128
|
+
/**
|
|
129
|
+
* Does the Combobox have any options visible in the list.
|
|
130
|
+
*/
|
|
131
|
+
readonly hasOptionsVisible: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* The noun to be used in the header label.
|
|
134
|
+
*/
|
|
135
|
+
readonly subjectNoun?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The number of selected options.
|
|
138
|
+
*/
|
|
139
|
+
readonly selectedCount: number;
|
|
140
|
+
/**
|
|
141
|
+
* The function to call when the clear all button is clicked.
|
|
142
|
+
*/
|
|
143
|
+
readonly onClearAll: () => void;
|
|
144
|
+
/**
|
|
145
|
+
* The function to call when the select all button is clicked.
|
|
146
|
+
*/
|
|
147
|
+
readonly onSelectAll: () => void;
|
|
148
|
+
}
|
|
149
|
+
export interface ComboboxListProps {
|
|
150
|
+
/**
|
|
151
|
+
* The options to display in the list. May be the full set of the Combobox or could be filtered.
|
|
152
|
+
*/
|
|
153
|
+
readonly options: ComboboxOption[];
|
|
154
|
+
/**
|
|
155
|
+
* Used to determine if the empty state should be shown and given priority over the options list.
|
|
156
|
+
*/
|
|
157
|
+
readonly showEmptyState: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The currently selected options.
|
|
160
|
+
*/
|
|
161
|
+
readonly selected: ComboboxOption[];
|
|
162
|
+
/**
|
|
163
|
+
* A ref to the list element.
|
|
164
|
+
*/
|
|
165
|
+
readonly optionsListRef: React.RefObject<HTMLUListElement>;
|
|
166
|
+
/**
|
|
167
|
+
* The current search term. Used in the no results message.
|
|
168
|
+
*/
|
|
169
|
+
readonly searchValue: string;
|
|
170
|
+
/**
|
|
171
|
+
* Determines if it is a single selection or multi selection Combobox.
|
|
172
|
+
*/
|
|
173
|
+
readonly multiselect?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* The noun to be used in the empty state message.
|
|
176
|
+
*/
|
|
177
|
+
readonly subjectNoun?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface ComboboxActionProps {
|
|
180
|
+
/**
|
|
181
|
+
* The function to call when the action is clicked.
|
|
182
|
+
*/
|
|
183
|
+
onClick(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
184
|
+
/**
|
|
185
|
+
* The label text of the action.
|
|
186
|
+
*/
|
|
187
|
+
readonly label: string;
|
|
188
|
+
}
|
|
189
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { Dispatch, MutableRefObject, SetStateAction } from "react";
|
|
2
|
+
import { ComboboxOption } from "./Combobox.types";
|
|
3
|
+
export declare const ComboboxContext: React.Context<{
|
|
4
|
+
open: boolean;
|
|
5
|
+
setOpen: (open: boolean) => void;
|
|
6
|
+
selected: ComboboxOption[];
|
|
7
|
+
selectionHandler: (option: ComboboxOption) => void;
|
|
8
|
+
handleClose: () => void;
|
|
9
|
+
shouldScroll: MutableRefObject<boolean>;
|
|
10
|
+
}>;
|
|
11
|
+
export interface ComboboxProviderProps {
|
|
12
|
+
readonly children: React.ReactNode;
|
|
13
|
+
readonly selected: ComboboxOption[];
|
|
14
|
+
readonly selectionHandler: (option: ComboboxOption) => void;
|
|
15
|
+
readonly open: boolean;
|
|
16
|
+
readonly setOpen: Dispatch<SetStateAction<boolean>>;
|
|
17
|
+
readonly handleClose: () => void;
|
|
18
|
+
readonly shouldScroll: MutableRefObject<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export declare function ComboboxContextProvider(props: ComboboxProviderProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxAction } from "./ComboboxAction";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ComboboxActivator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxContentHeader } from "./ComboboxContentHeader";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxContentList } from "./ComboboxContentList";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxContentSearch } from "./ComboboxContentSearch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxContent } from "./ComboboxContent";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ComboboxOption";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComboboxTrigger } from "./ComboboxTrigger";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { Dispatch, MutableRefObject } from "react";
|
|
2
|
+
import { UseMakeComboboxHandlersReturn } from "./useMakeComboboxHandlers";
|
|
3
|
+
import { ComboboxOption } from "../Combobox.types";
|
|
4
|
+
type UseComboboxReturn = {
|
|
5
|
+
wrapperRef: React.RefObject<HTMLDivElement>;
|
|
6
|
+
searchValue: string;
|
|
7
|
+
setSearchValue: Dispatch<React.SetStateAction<string>>;
|
|
8
|
+
open: boolean;
|
|
9
|
+
setOpen: Dispatch<React.SetStateAction<boolean>>;
|
|
10
|
+
selectedOptions: ComboboxOption[];
|
|
11
|
+
selectedStateSetter: (selection: ComboboxOption[]) => void;
|
|
12
|
+
shouldScroll: MutableRefObject<boolean>;
|
|
13
|
+
} & UseMakeComboboxHandlersReturn;
|
|
14
|
+
export declare function useCombobox(selected: ComboboxOption[], onSelect: (selection: ComboboxOption[]) => void, onClose?: () => void, multiSelect?: boolean): UseComboboxReturn;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComboboxOption } from "../Combobox.types";
|
|
3
|
+
export declare function useComboboxAccessibility(selectionCallback: (selection: ComboboxOption) => void, filteredOptions: ComboboxOption[], optionsListRef: React.RefObject<HTMLUListElement>, open: boolean, wrapperRef: React.RefObject<HTMLDivElement>): {
|
|
4
|
+
popperRef: React.RefObject<HTMLDivElement>;
|
|
5
|
+
popperStyles: {
|
|
6
|
+
[key: string]: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
attributes: {
|
|
9
|
+
[key: string]: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComboboxOption } from "../Combobox.types";
|
|
3
|
+
interface useComboboxContent {
|
|
4
|
+
filteredOptions: ComboboxOption[];
|
|
5
|
+
optionsListRef: React.RefObject<HTMLUListElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare function useComboboxContent(options: ComboboxOption[], open: boolean, selected: ComboboxOption[], searchValue: string): useComboboxContent;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ComboboxProps } from "../Combobox.types";
|
|
3
|
+
export declare const COMBOBOX_TRIGGER_COUNT_ERROR_MESSAGE = "Combobox must have exactly one Trigger element";
|
|
4
|
+
export declare function useComboboxValidation(children?: ComboboxProps["children"]): {
|
|
5
|
+
triggerElement?: ReactElement;
|
|
6
|
+
optionElements?: ReactElement[];
|
|
7
|
+
actionElements?: ReactElement[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Return all instances child component that matches the `type` provided
|
|
11
|
+
*/
|
|
12
|
+
export declare function getCompoundComponents<T>(type: ReactElement<T>["type"], children?: ComboboxProps["children"]): ReactElement<T>[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComboboxOption } from "../Combobox.types";
|
|
3
|
+
export interface UseMakeComboboxHandlersReturn {
|
|
4
|
+
handleClose: () => void;
|
|
5
|
+
handleSelection: (selection: ComboboxOption) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function useMakeComboboxHandlers(setOpen: (open: boolean) => void, setSearchValue: (searchValue: string) => void, selectedOptions: ComboboxOption[], shouldScroll: React.MutableRefObject<boolean>, selectedStateSetter: (selected: ComboboxOption[]) => void, multiSelect?: boolean, onClose?: () => void): UseMakeComboboxHandlersReturn;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var Combobox = require('../Combobox-0044641d.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('react-dom');
|
|
9
|
+
require('../style-inject.es-9d2f5f4e.js');
|
|
10
|
+
require('../Icon-405a216c.js');
|
|
11
|
+
require('@jobber/design');
|
|
12
|
+
require('../Text-4a2bc89f.js');
|
|
13
|
+
require('../Typography-973b122e.js');
|
|
14
|
+
require('../Button-163a0641.js');
|
|
15
|
+
require('react-router-dom');
|
|
16
|
+
require('@jobber/hooks/useRefocusOnActivator');
|
|
17
|
+
require('@jobber/hooks/useFocusTrap');
|
|
18
|
+
require('react-popper');
|
|
19
|
+
require('@jobber/hooks/useOnKeyDown');
|
|
20
|
+
require('../Chip-55e6da05.js');
|
|
21
|
+
require('@jobber/hooks/useInView');
|
|
22
|
+
require('../Avatar-76a799fa.js');
|
|
23
|
+
require('color');
|
|
24
|
+
require('../Tooltip-6b12f1c2.js');
|
|
25
|
+
require('framer-motion');
|
|
26
|
+
require('@jobber/hooks/useAssert');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
exports.Combobox = Combobox.Combobox;
|
|
31
|
+
exports.ComboboxContextProvider = Combobox.ComboboxContextProvider;
|