@jobber/components 4.42.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.
Files changed (180) hide show
  1. package/Chip.d.ts +1 -0
  2. package/Chip.js +17 -0
  3. package/Combobox.d.ts +1 -0
  4. package/Combobox.js +17 -0
  5. package/Flex.d.ts +1 -0
  6. package/Flex.js +17 -0
  7. package/dist/Autocomplete/index.js +8 -8
  8. package/dist/Avatar/index.js +1 -1
  9. package/dist/{Avatar-1aa30ee1.js → Avatar-76a799fa.js} +1 -1
  10. package/dist/Banner/index.js +5 -5
  11. package/dist/Button/index.js +2 -2
  12. package/dist/Button-163a0641.js +57 -0
  13. package/dist/ButtonDismiss/index.js +3 -3
  14. package/dist/{ButtonDismiss-82680c7d.js → ButtonDismiss-2b98d075.js} +1 -1
  15. package/dist/Card/index.js +5 -5
  16. package/dist/{Card-cc2ffbaa.js → Card-3178033c.js} +4 -4
  17. package/dist/Checkbox/index.js +3 -3
  18. package/dist/{Checkbox-3bccf65c.js → Checkbox-ad7ec2e7.js} +2 -2
  19. package/dist/Chip/Chip.d.ts +8 -0
  20. package/dist/Chip/components/ChipDismissible/ChipDismissible.d.ts +3 -0
  21. package/dist/Chip/components/ChipPrefix/Chip.Prefix.d.ts +2 -0
  22. package/dist/Chip/components/ChipSelectable/ChipSelectable.d.ts +3 -0
  23. package/dist/Chip/components/ChipSuffix/Chip.Suffix.d.ts +6 -0
  24. package/dist/Chip/hooks/index.d.ts +1 -0
  25. package/dist/Chip/hooks/useChildComponent.d.ts +8 -0
  26. package/dist/Chip/index.d.ts +3 -0
  27. package/dist/Chip/index.js +40 -0
  28. package/dist/Chip-55e6da05.js +89 -0
  29. package/dist/Chips/index.js +505 -19
  30. package/dist/Combobox/Combobox.d.ts +11 -0
  31. package/dist/Combobox/Combobox.types.d.ts +189 -0
  32. package/dist/Combobox/ComboboxProvider.d.ts +20 -0
  33. package/dist/Combobox/components/ComboboxAction/ComboboxAction.d.ts +3 -0
  34. package/dist/Combobox/components/ComboboxAction/index.d.ts +1 -0
  35. package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +3 -0
  36. package/dist/Combobox/components/ComboboxActivator/index.d.ts +1 -0
  37. package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +3 -0
  38. package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +3 -0
  39. package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/index.d.ts +1 -0
  40. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +3 -0
  41. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.d.ts +1 -0
  42. package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +3 -0
  43. package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/index.d.ts +1 -0
  44. package/dist/Combobox/components/ComboboxContent/index.d.ts +1 -0
  45. package/dist/Combobox/components/ComboboxOption/ComboboxOption.d.ts +6 -0
  46. package/dist/Combobox/components/ComboboxOption/index.d.ts +1 -0
  47. package/dist/Combobox/components/ComboboxTrigger/ComboboxTrigger.d.ts +3 -0
  48. package/dist/Combobox/components/ComboboxTrigger/index.d.ts +1 -0
  49. package/dist/Combobox/hooks/useCombobox.d.ts +15 -0
  50. package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +13 -0
  51. package/dist/Combobox/hooks/useComboboxContent.d.ts +8 -0
  52. package/dist/Combobox/hooks/useComboboxValidation.d.ts +12 -0
  53. package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +7 -0
  54. package/dist/Combobox/index.d.ts +3 -0
  55. package/dist/Combobox/index.js +31 -0
  56. package/dist/Combobox-0044641d.js +403 -0
  57. package/dist/ConfirmationModal/index.js +9 -9
  58. package/dist/{ConfirmationModal-6b61ebf5.js → ConfirmationModal-f7234e44.js} +2 -2
  59. package/dist/Content/Content.d.ts +1 -1
  60. package/dist/DataDump/index.js +6 -6
  61. package/dist/DataList/DataList.d.ts +8 -3
  62. package/dist/DataList/DataList.types.d.ts +71 -7
  63. package/dist/DataList/DataList.utils.d.ts +5 -4
  64. package/dist/DataList/components/DataListAction/DataListAction.d.ts +2 -3
  65. package/dist/DataList/components/DataListActions/DataListActions.d.ts +3 -0
  66. package/dist/DataList/components/DataListActions/index.d.ts +1 -0
  67. package/dist/DataList/components/DataListBulkActions/DataListBulkActions.const.d.ts +1 -0
  68. package/dist/DataList/components/DataListBulkActions/DataListBulkActions.d.ts +4 -0
  69. package/dist/DataList/components/DataListBulkActions/index.d.ts +1 -0
  70. package/dist/DataList/components/DataListHeader/DataListHeader.d.ts +2 -0
  71. package/dist/DataList/components/DataListHeader/index.d.ts +1 -0
  72. package/dist/DataList/components/DataListItem/DataListItem.d.ts +9 -0
  73. package/dist/DataList/components/{DataListLayoutInternal → DataListItem}/DataListItemInternal.d.ts +1 -1
  74. package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickable.d.ts +2 -0
  75. package/dist/DataList/components/DataListItem/components/DataListItemClickable/DataListItemClickableInternal.d.ts +3 -0
  76. package/dist/DataList/components/DataListItem/components/DataListItemClickable/index.d.ts +1 -0
  77. package/dist/DataList/components/DataListItem/index.d.ts +1 -0
  78. package/dist/DataList/components/DataListItemActions/DataListItemActions.d.ts +4 -4
  79. package/dist/DataList/components/DataListItemActionsOverflow/DataListItemActionsOverflow.d.ts +7 -0
  80. package/dist/DataList/components/DataListItemActionsOverflow/index.d.ts +1 -0
  81. package/dist/DataList/components/DataListItems/DataListItems.d.ts +7 -0
  82. package/dist/DataList/components/DataListItems/index.d.ts +1 -0
  83. package/dist/DataList/components/DataListLayout/DataListLayout.d.ts +2 -2
  84. package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/DataListLayoutContext.d.ts +4 -0
  85. package/dist/DataList/components/DataListLayoutActions/DataListLayoutContext/index.d.ts +1 -0
  86. package/dist/DataList/components/DataListLoadingState/DataListLoadingState.d.ts +2 -9
  87. package/dist/DataList/components/DataListOverflowFade/DataListOverflowFade.d.ts +6 -0
  88. package/dist/DataList/components/DataListOverflowFade/index.d.ts +2 -0
  89. package/dist/DataList/components/DataListSearch/DataListSearch.d.ts +1 -1
  90. package/dist/DataList/components/DataListStatusBar/DataListStatusBar.d.ts +10 -0
  91. package/dist/DataList/components/DataListStatusBar/index.d.ts +1 -0
  92. package/dist/DataList/context/DataListContext/DataListContext.d.ts +3 -3
  93. package/dist/DataList/context/DataListLayoutContext/DataListLayoutContext.d.ts +4 -4
  94. package/dist/DataList/hooks/useActiveLayout.d.ts +4 -0
  95. package/dist/DataList/hooks/useGetItemActions.d.ts +6 -0
  96. package/dist/DataList/index.js +583 -417
  97. package/dist/DataTable/DataTable.d.ts +10 -10
  98. package/dist/DataTable/Pagination.d.ts +6 -5
  99. package/dist/DataTable/index.js +20 -14
  100. package/dist/DatePicker/index.js +3 -3
  101. package/dist/{DatePicker-b31baae4.js → DatePicker-c18f1739.js} +3 -3
  102. package/dist/DescriptionList/index.js +2 -2
  103. package/dist/Disclosure/index.js +2 -2
  104. package/dist/Drawer/index.js +5 -5
  105. package/dist/Emphasis/index.js +2 -2
  106. package/dist/{Emphasis-76a10790.js → Emphasis-b2d1b3aa.js} +1 -1
  107. package/dist/FeatureSwitch/index.js +7 -7
  108. package/dist/Flex/Flex.d.ts +32 -0
  109. package/dist/Flex/Flex.types.d.ts +6 -0
  110. package/dist/Flex/index.d.ts +1 -0
  111. package/dist/Flex/index.js +40 -0
  112. package/dist/FormField/index.js +5 -5
  113. package/dist/{FormField-d6138b7f.js → FormField-0b529c0b.js} +4 -4
  114. package/dist/FormatFile/index.js +11 -11
  115. package/dist/{FormatFile-aa1898f9.js → FormatFile-6bc7f045.js} +6 -6
  116. package/dist/Gallery/index.js +12 -12
  117. package/dist/Heading/index.js +2 -2
  118. package/dist/{Heading-a1191b15.js → Heading-0f4ecb0c.js} +1 -1
  119. package/dist/InlineLabel/index.js +2 -2
  120. package/dist/{InlineLabel-afd5fc6f.js → InlineLabel-9a517c19.js} +2 -2
  121. package/dist/InputAvatar/index.js +5 -5
  122. package/dist/InputDate/index.js +6 -6
  123. package/dist/InputEmail/index.js +5 -5
  124. package/dist/InputFile/index.js +3 -3
  125. package/dist/{InputFile-2a06c2c0.js → InputFile-8a21a5fb.js} +3 -3
  126. package/dist/InputNumber/index.js +6 -6
  127. package/dist/{InputNumber-07b03067.js → InputNumber-6a7cefc6.js} +1 -1
  128. package/dist/InputPassword/index.js +5 -5
  129. package/dist/InputPhoneNumber/index.js +5 -5
  130. package/dist/InputText/index.js +6 -6
  131. package/dist/{InputText-d1a52550.js → InputText-dcf6c428.js} +1 -1
  132. package/dist/InputTime/index.js +5 -5
  133. package/dist/InputValidation/index.js +3 -3
  134. package/dist/{InputValidation-b5a3d92c.js → InputValidation-179f0926.js} +2 -2
  135. package/dist/LightBox/index.js +4 -4
  136. package/dist/{LightBox-437a1c8b.js → LightBox-3f4dbc33.js} +2 -2
  137. package/dist/Link/Link.d.ts +1 -2
  138. package/dist/Link/index.d.ts +1 -1
  139. package/dist/List/index.js +7 -7
  140. package/dist/Markdown/index.js +5 -5
  141. package/dist/{Markdown-f6748dcb.js → Markdown-96070121.js} +3 -3
  142. package/dist/Menu/index.js +3 -3
  143. package/dist/{Menu-51f8712f.js → Menu-d7ea093c.js} +3 -3
  144. package/dist/Modal/index.js +5 -5
  145. package/dist/{Modal-a9ab9565.js → Modal-b9d194e4.js} +4 -4
  146. package/dist/MultiSelect/index.js +5 -5
  147. package/dist/{Option-b903e7ac.js → Option-752ce1e8.js} +1 -1
  148. package/dist/Page/index.js +7 -7
  149. package/dist/Popover/index.js +50 -9
  150. package/dist/ProgressBar/index.js +1 -1
  151. package/dist/{ProgressBar-5dfc1885.js → ProgressBar-250e7b24.js} +1 -1
  152. package/dist/RadioGroup/index.js +3 -3
  153. package/dist/{RadioGroup-8e76d20b.js → RadioGroup-ebaa4f87.js} +2 -2
  154. package/dist/RecurringSelect/index.js +11 -11
  155. package/dist/Select/index.js +6 -6
  156. package/dist/StatusLabel/index.js +2 -2
  157. package/dist/Switch/index.js +2 -2
  158. package/dist/{Switch-e75145cc.js → Switch-b85272bf.js} +2 -2
  159. package/dist/Tabs/Tabs.d.ts +12 -1
  160. package/dist/Tabs/index.js +8 -4
  161. package/dist/Text/index.js +2 -2
  162. package/dist/{Text-e7ed0974.js → Text-4a2bc89f.js} +1 -1
  163. package/dist/Toast/index.js +2 -2
  164. package/dist/Tooltip/index.js +1 -3
  165. package/dist/{Tooltip-bf67fe6e.js → Tooltip-6b12f1c2.js} +6 -8
  166. package/dist/Typography/index.js +1 -1
  167. package/dist/{Typography-fd6f932a.js → Typography-973b122e.js} +3 -3
  168. package/package.json +7 -7
  169. package/rollup.config.js +3 -5
  170. package/dist/Button-fd8413b2.js +0 -57
  171. package/dist/Chip-4916a642.js +0 -514
  172. package/dist/DataList/components/DataListItemActions/DataListItemActionsOverflow.d.ts +0 -7
  173. package/dist/DataList/components/DataListLayoutInternal/DataListHeader.d.ts +0 -11
  174. package/dist/DataList/components/DataListLayoutInternal/DataListItems.d.ts +0 -10
  175. package/dist/DataList/components/DataListLayoutInternal/DataListLayoutInternal.d.ts +0 -10
  176. package/dist/DataList/components/DataListLayoutInternal/index.d.ts +0 -3
  177. package/dist/DataList/hooks/useLayoutMediaQueries.d.ts +0 -1
  178. package/dist/Popover-bbfc6aa1.js +0 -53
  179. /package/dist/DataList/components/{DataListLayoutInternal → DataListHeader}/DataListHeaderCheckbox.d.ts +0 -0
  180. /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,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxActionProps } from "../../Combobox.types";
3
+ export declare function ComboboxAction(props: ComboboxActionProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { ComboboxAction } from "./ComboboxAction";
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { ComboboxActivatorProps } from "../../Combobox.types";
3
+ export declare function ComboboxActivator(props: ComboboxActivatorProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -0,0 +1 @@
1
+ export * from "./ComboboxActivator";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxContentProps } from "../../Combobox.types";
3
+ export declare function ComboboxContent(props: ComboboxContentProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxHeaderProps } from "../../../Combobox.types";
3
+ export declare function ComboboxContentHeader(props: ComboboxHeaderProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { ComboboxContentHeader } from "./ComboboxContentHeader";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxListProps } from "../../../Combobox.types";
3
+ export declare function ComboboxContentList(props: ComboboxListProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { ComboboxContentList } from "./ComboboxContentList";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxSearchProps } from "../../../Combobox.types";
3
+ export declare function ComboboxContentSearch(props: ComboboxSearchProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export { ComboboxContentSearch } from "./ComboboxContentSearch";
@@ -0,0 +1 @@
1
+ export { ComboboxContent } from "./ComboboxContent";
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface ComboboxOptionProps {
3
+ readonly id: string | number;
4
+ readonly label: string;
5
+ }
6
+ export declare function ComboboxOption(props: ComboboxOptionProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./ComboboxOption";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { ComboboxTriggerProps } from "../../Combobox.types";
3
+ export declare function ComboboxTrigger({ label, selected, }: ComboboxTriggerProps): JSX.Element;
@@ -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,3 @@
1
+ export * from "./Combobox";
2
+ export { ComboboxContextProvider } from "./ComboboxProvider";
3
+ export { ComboboxOption } from "./Combobox.types";
@@ -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;