@jobber/components 6.85.2 → 6.85.3-CLEANUPre-6d043f4.28

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 (277) hide show
  1. package/dist/AtlantisThemeContext/AtlantisThemeContext.d.ts +1 -1
  2. package/dist/AtlantisThemeContext/index.d.ts +1 -1
  3. package/dist/AtlantisThemeContext/types.d.ts +17 -0
  4. package/dist/AtlantisThemeContext-cjs.js +38 -12
  5. package/dist/AtlantisThemeContext-es.js +40 -14
  6. package/dist/Autocomplete/Autocomplete.d.ts +3 -3
  7. package/dist/Autocomplete/Autocomplete.rebuilt.d.ts +8 -0
  8. package/dist/Autocomplete/Autocomplete.types.d.ts +388 -4
  9. package/dist/Autocomplete/components/MenuList.d.ts +37 -0
  10. package/dist/Autocomplete/components/PersistentRegion.d.ts +18 -0
  11. package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +22 -0
  12. package/dist/Autocomplete/index.cjs +1335 -37
  13. package/dist/Autocomplete/index.d.ts +32 -2
  14. package/dist/Autocomplete/index.mjs +1326 -21
  15. package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +38 -0
  16. package/dist/Autocomplete/useAutocomplete.d.ts +66 -0
  17. package/dist/Autocomplete/utils/menuModel.d.ts +14 -0
  18. package/dist/Banner/index.cjs +1 -6
  19. package/dist/Banner/index.mjs +1 -6
  20. package/dist/Banner-cjs.js +2 -2
  21. package/dist/Banner-es.js +2 -2
  22. package/dist/Button-cjs.js +2 -2
  23. package/dist/Button-es.js +2 -2
  24. package/dist/Card/CardClickable.d.ts +3 -1
  25. package/dist/Card/CardHeader.d.ts +1 -1
  26. package/dist/Card/index.cjs +2 -4
  27. package/dist/Card/index.mjs +2 -4
  28. package/dist/Card/types.d.ts +19 -1
  29. package/dist/Card-cjs.js +14 -13
  30. package/dist/Card-es.js +14 -13
  31. package/dist/Chip/index.cjs +2 -3
  32. package/dist/Chip/index.mjs +2 -3
  33. package/dist/Chip-cjs.js +3 -3
  34. package/dist/Chip-es.js +3 -3
  35. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -0
  36. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -0
  37. package/dist/Chips/InternalChipDismissible/index.cjs +2 -3
  38. package/dist/Chips/InternalChipDismissible/index.mjs +2 -3
  39. package/dist/Chips/index.cjs +2 -3
  40. package/dist/Chips/index.mjs +2 -3
  41. package/dist/Combobox/Combobox.types.d.ts +3 -1
  42. package/dist/Combobox/components/ComboboxActivator/index.cjs +2 -3
  43. package/dist/Combobox/components/ComboboxActivator/index.mjs +2 -3
  44. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.cjs +1 -1
  45. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.mjs +1 -1
  46. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.cjs +1 -1
  47. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.mjs +1 -1
  48. package/dist/Combobox/components/ComboboxContent/index.cjs +2 -3
  49. package/dist/Combobox/components/ComboboxContent/index.mjs +2 -3
  50. package/dist/Combobox/components/ComboboxTrigger/index.cjs +2 -3
  51. package/dist/Combobox/components/ComboboxTrigger/index.mjs +2 -3
  52. package/dist/Combobox/index.cjs +2 -6
  53. package/dist/Combobox/index.mjs +2 -6
  54. package/dist/Combobox-cjs.js +2 -2
  55. package/dist/Combobox-es.js +2 -2
  56. package/dist/ComboboxAction-cjs.js +5 -3
  57. package/dist/ComboboxAction-es.js +5 -3
  58. package/dist/ComboboxContent-cjs.js +3 -4
  59. package/dist/ComboboxContent-es.js +4 -5
  60. package/dist/ComboboxLoadMore-cjs.js +2 -2
  61. package/dist/ComboboxLoadMore-es.js +2 -2
  62. package/dist/ComboboxOption-cjs.js +1 -1
  63. package/dist/ComboboxOption-es.js +1 -1
  64. package/dist/ConfirmationModal/index.cjs +2 -4
  65. package/dist/ConfirmationModal/index.mjs +2 -4
  66. package/dist/ConfirmationModal-cjs.js +2 -2
  67. package/dist/ConfirmationModal-es.js +2 -2
  68. package/dist/ContentBlock/index.cjs +1 -6
  69. package/dist/ContentBlock/index.mjs +1 -6
  70. package/dist/ContentBlock-cjs.js +2 -2
  71. package/dist/ContentBlock-es.js +2 -2
  72. package/dist/Countdown-cjs.js +0 -1
  73. package/dist/Countdown-es.js +0 -1
  74. package/dist/DataDump/index.cjs +2 -4
  75. package/dist/DataDump/index.mjs +2 -4
  76. package/dist/DataList/components/DataListActions/index.cjs +2 -5
  77. package/dist/DataList/components/DataListActions/index.mjs +2 -5
  78. package/dist/DataList/components/DataListActionsMenu/index.cjs +1 -5
  79. package/dist/DataList/components/DataListActionsMenu/index.mjs +1 -5
  80. package/dist/DataList/components/DataListBulkActions/index.cjs +2 -5
  81. package/dist/DataList/components/DataListBulkActions/index.mjs +2 -5
  82. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +2 -6
  83. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +2 -6
  84. package/dist/DataList/components/DataListFilters/index.cjs +2 -7
  85. package/dist/DataList/components/DataListFilters/index.mjs +2 -7
  86. package/dist/DataList/components/DataListHeader/DataListHeaderCheckbox.d.ts +1 -2
  87. package/dist/DataList/components/DataListHeader/index.cjs +2 -5
  88. package/dist/DataList/components/DataListHeader/index.mjs +2 -5
  89. package/dist/DataList/components/DataListHeaderTile/components/index.cjs +1 -2
  90. package/dist/DataList/components/DataListHeaderTile/components/index.mjs +1 -2
  91. package/dist/DataList/components/DataListHeaderTile/index.cjs +1 -3
  92. package/dist/DataList/components/DataListHeaderTile/index.mjs +1 -3
  93. package/dist/DataList/components/DataListItem/index.cjs +2 -5
  94. package/dist/DataList/components/DataListItem/index.mjs +2 -5
  95. package/dist/DataList/components/DataListItemActions/index.cjs +2 -5
  96. package/dist/DataList/components/DataListItemActions/index.mjs +2 -5
  97. package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +2 -5
  98. package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +2 -5
  99. package/dist/DataList/components/DataListItems/index.cjs +2 -5
  100. package/dist/DataList/components/DataListItems/index.mjs +2 -5
  101. package/dist/DataList/components/DataListLayout/index.cjs +2 -5
  102. package/dist/DataList/components/DataListLayout/index.mjs +2 -5
  103. package/dist/DataList/components/DataListLayoutActions/index.cjs +2 -5
  104. package/dist/DataList/components/DataListLayoutActions/index.mjs +2 -5
  105. package/dist/DataList/components/DataListLoadMore/index.cjs +1 -1
  106. package/dist/DataList/components/DataListLoadMore/index.mjs +1 -1
  107. package/dist/DataList/components/DataListOverflowFade/index.cjs +1 -1
  108. package/dist/DataList/components/DataListOverflowFade/index.mjs +1 -1
  109. package/dist/DataList/components/DataListSearch/index.cjs +1 -2
  110. package/dist/DataList/components/DataListSearch/index.mjs +1 -2
  111. package/dist/DataList/components/DataListStatusBar/index.cjs +1 -3
  112. package/dist/DataList/components/DataListStatusBar/index.mjs +1 -3
  113. package/dist/DataList/index.cjs +2 -7
  114. package/dist/DataList/index.mjs +2 -7
  115. package/dist/DataListActionsMenu-cjs.js +5 -8
  116. package/dist/DataListActionsMenu-es.js +5 -8
  117. package/dist/DataListHeaderTile-cjs.js +2 -2
  118. package/dist/DataListHeaderTile-es.js +2 -2
  119. package/dist/DataListItem-cjs.js +2 -0
  120. package/dist/DataListItem-es.js +2 -0
  121. package/dist/DataListLoadMore-cjs.js +2 -2
  122. package/dist/DataListLoadMore-es.js +2 -2
  123. package/dist/DataListOverflowFade-cjs.js +3 -3
  124. package/dist/DataListOverflowFade-es.js +3 -3
  125. package/dist/DataListSearch-cjs.js +2 -2
  126. package/dist/DataListSearch-es.js +2 -2
  127. package/dist/DataListSortingOptions-cjs.js +3 -4
  128. package/dist/DataListSortingOptions-es.js +3 -4
  129. package/dist/DataTable/index.cjs +4 -6
  130. package/dist/DataTable/index.mjs +4 -6
  131. package/dist/DataTable/test-utilities/index.cjs +1 -7
  132. package/dist/DataTable/test-utilities/index.mjs +1 -7
  133. package/dist/DataTable-cjs.js +4 -4
  134. package/dist/DataTable-es.js +4 -4
  135. package/dist/DataTableTable-cjs.js +8 -8
  136. package/dist/DataTableTable-es.js +8 -8
  137. package/dist/DatePicker/DatePickerActivator.d.ts +2 -4
  138. package/dist/DatePicker/index.cjs +5 -3
  139. package/dist/DatePicker/index.mjs +5 -3
  140. package/dist/DatePicker-cjs.js +11478 -8531
  141. package/dist/DatePicker-es.js +11483 -8517
  142. package/dist/Disclosure/index.cjs +1 -6
  143. package/dist/Disclosure/index.mjs +1 -6
  144. package/dist/Disclosure-cjs.js +3 -3
  145. package/dist/Disclosure-es.js +3 -3
  146. package/dist/FeatureSwitch/index.cjs +1 -1
  147. package/dist/FeatureSwitch/index.mjs +1 -1
  148. package/dist/FormField/FormFieldWrapper.d.ts +1 -1
  149. package/dist/FormField/hooks/useAtlantisReactHookForm.d.ts +1 -0
  150. package/dist/FormField/index.cjs +1 -0
  151. package/dist/FormField/index.mjs +1 -0
  152. package/dist/FormField-cjs.js +2 -21
  153. package/dist/FormField-es.js +2 -21
  154. package/dist/FormatFile/index.cjs +2 -4
  155. package/dist/FormatFile/index.mjs +2 -4
  156. package/dist/Gallery/index.cjs +2 -7
  157. package/dist/Gallery/index.mjs +2 -7
  158. package/dist/Heading/Heading.d.ts +7 -1
  159. package/dist/Heading-cjs.js +2 -2
  160. package/dist/Heading-es.js +2 -2
  161. package/dist/InlineLabel/InlineLabel.d.ts +1 -1
  162. package/dist/InlineLabel-cjs.js +2 -1
  163. package/dist/InlineLabel-es.js +2 -1
  164. package/dist/InputDate/InputDate.types.d.ts +0 -12
  165. package/dist/InputDate/index.cjs +9 -30
  166. package/dist/InputDate/index.mjs +9 -30
  167. package/dist/InputEmail/index.cjs +1 -0
  168. package/dist/InputEmail/index.mjs +1 -0
  169. package/dist/InputFile/InputFile.d.ts +5 -1
  170. package/dist/InputFile-cjs.js +2 -2
  171. package/dist/InputFile-es.js +2 -2
  172. package/dist/InputNumber/index.cjs +3698 -2959
  173. package/dist/InputNumber/index.mjs +3698 -2959
  174. package/dist/InputPassword/index.cjs +1 -0
  175. package/dist/InputPassword/index.mjs +1 -0
  176. package/dist/InputPassword-cjs.js +1 -0
  177. package/dist/InputPassword-es.js +1 -0
  178. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +1 -1
  179. package/dist/InputPhoneNumber/index.cjs +1 -0
  180. package/dist/InputPhoneNumber/index.mjs +1 -0
  181. package/dist/InputText/InputText.d.ts +2 -2
  182. package/dist/InputText/index.cjs +3 -3
  183. package/dist/InputText/index.mjs +3 -3
  184. package/dist/InputText/useInputTextFormField.d.ts +6 -6
  185. package/dist/InputTime/index.cjs +1 -0
  186. package/dist/InputTime/index.mjs +2 -1
  187. package/dist/InternalChipDismissible-cjs.js +1 -0
  188. package/dist/InternalChipDismissible-es.js +1 -0
  189. package/dist/LightBox/index.cjs +1 -6
  190. package/dist/LightBox/index.mjs +1 -6
  191. package/dist/LightBox-cjs.js +12 -74
  192. package/dist/LightBox-es.js +12 -74
  193. package/dist/List/index.cjs +1 -1
  194. package/dist/List/index.mjs +1 -1
  195. package/dist/Markdown/index.cjs +1 -1
  196. package/dist/Markdown/index.mjs +1 -1
  197. package/dist/Markdown-cjs.js +20540 -18350
  198. package/dist/Markdown-es.js +20541 -18351
  199. package/dist/Menu/index.cjs +2 -4
  200. package/dist/Menu/index.mjs +2 -4
  201. package/dist/Menu-cjs.js +5 -37
  202. package/dist/Menu-es.js +6 -38
  203. package/dist/Modal/Modal.rebuilt.d.ts +1 -1
  204. package/dist/Modal/index.cjs +25 -22
  205. package/dist/Modal/index.mjs +26 -23
  206. package/dist/Page/index.cjs +3 -11
  207. package/dist/Page/index.mjs +3 -11
  208. package/dist/Page-cjs.js +5 -5
  209. package/dist/Page-es.js +5 -5
  210. package/dist/Popover/index.cjs +2 -1
  211. package/dist/Popover/index.mjs +2 -1
  212. package/dist/Popover/usePopover.d.ts +1 -1
  213. package/dist/Popover-cjs.js +2 -2
  214. package/dist/Popover-es.js +3 -3
  215. package/dist/RecurringSelect/index.cjs +2 -0
  216. package/dist/RecurringSelect/index.mjs +2 -0
  217. package/dist/Select/index.cjs +1 -0
  218. package/dist/Select/index.mjs +1 -0
  219. package/dist/SideDrawer/index.cjs +1 -5
  220. package/dist/SideDrawer/index.mjs +1 -5
  221. package/dist/SideDrawer-cjs.js +7 -10
  222. package/dist/SideDrawer-es.js +7 -10
  223. package/dist/Tabs/index.cjs +0 -1
  224. package/dist/Tabs/index.mjs +0 -1
  225. package/dist/Tabs-cjs.js +76 -2
  226. package/dist/Tabs-es.js +76 -2
  227. package/dist/Tooltip/index.cjs +2 -2
  228. package/dist/Tooltip/index.mjs +2 -2
  229. package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
  230. package/dist/Tooltip-cjs.js +3 -4
  231. package/dist/Tooltip-es.js +4 -5
  232. package/dist/_baseEach-es.js +1 -1
  233. package/dist/_commonjsHelpers-cjs.js +0 -26
  234. package/dist/_commonjsHelpers-es.js +1 -26
  235. package/dist/_isIterateeCall-es.js +1 -1
  236. package/dist/clsx-cjs.js +5 -0
  237. package/dist/clsx-es.js +3 -0
  238. package/dist/debounce-es.js +2 -2
  239. package/dist/floating-ui.react-cjs.js +2106 -2225
  240. package/dist/floating-ui.react-es.js +2105 -2226
  241. package/dist/helpers-cjs.js +21 -2
  242. package/dist/helpers-es.js +1 -1
  243. package/dist/index.cjs +15 -21
  244. package/dist/index.mjs +11 -17
  245. package/dist/isObjectLike-es.js +1 -1
  246. package/dist/isSymbol-es.js +1 -1
  247. package/dist/isTypedArray-es.js +1 -1
  248. package/dist/keysIn-es.js +1 -1
  249. package/dist/omit-es.js +1 -1
  250. package/dist/styles.css +719 -509
  251. package/dist/tslib.es6-cjs.js +3 -3
  252. package/dist/tslib.es6-es.js +3 -3
  253. package/dist/useScrollToActive-cjs.js +3 -45
  254. package/dist/useScrollToActive-es.js +5 -47
  255. package/dist/utils/mockLargeViewport.d.ts +33 -0
  256. package/package.json +13 -19
  257. package/rollup.config.mjs +1 -15
  258. package/dist/Autocomplete-cjs.js +0 -357
  259. package/dist/Autocomplete-es.js +0 -344
  260. package/dist/throttle-cjs.js +0 -80
  261. package/dist/throttle-es.js +0 -77
  262. package/dist/useDebounce-cjs.js +0 -4415
  263. package/dist/useDebounce-es.js +0 -4413
  264. package/dist/useFocusTrap-cjs.js +0 -75
  265. package/dist/useFocusTrap-es.js +0 -73
  266. package/dist/useInView-cjs.js +0 -26
  267. package/dist/useInView-es.js +0 -24
  268. package/dist/useIsMounted-cjs.js +0 -51
  269. package/dist/useIsMounted-es.js +0 -49
  270. package/dist/useOnKeyDown-cjs.js +0 -41
  271. package/dist/useOnKeyDown-es.js +0 -39
  272. package/dist/useRefocusOnActivator-cjs.js +0 -33
  273. package/dist/useRefocusOnActivator-es.js +0 -31
  274. package/dist/useResizeObserver-cjs.js +0 -1131
  275. package/dist/useResizeObserver-es.js +0 -1128
  276. package/dist/useSafeLayoutEffect-cjs.js +0 -14
  277. package/dist/useSafeLayoutEffect-es.js +0 -12
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import { type AutocompleteRebuiltProps, type MenuItem, type OptionLike } from "../Autocomplete.types";
3
+ export declare function Wrapper<T extends OptionLike>({ initialValue, initialInputValue, onChange, onInputChange, onBlur, onFocus, menu, openOnFocus, filterOptions, emptyActions, customRenderOption, customRenderAction, customRenderSection, customRenderInput, customRenderHeader, customRenderFooter, loading, customRenderLoading, emptyStateMessage, ref, readOnly, UNSAFE_className, UNSAFE_styles, debounce, }: {
4
+ readonly initialValue?: T;
5
+ readonly initialInputValue?: string;
6
+ readonly onChange?: (v: T | undefined) => void;
7
+ readonly onInputChange?: (v: string) => void;
8
+ readonly onBlur?: () => void;
9
+ readonly onFocus?: () => void;
10
+ readonly menu?: MenuItem<T>[];
11
+ readonly openOnFocus?: boolean;
12
+ readonly filterOptions?: false | ((opts: T[], input: string) => T[]);
13
+ readonly emptyActions?: AutocompleteRebuiltProps<T, false>["emptyActions"];
14
+ readonly customRenderOption?: AutocompleteRebuiltProps<T, false>["customRenderOption"];
15
+ readonly customRenderAction?: AutocompleteRebuiltProps<T, false>["customRenderAction"];
16
+ readonly customRenderInput?: AutocompleteRebuiltProps<T, false>["customRenderInput"];
17
+ readonly customRenderHeader?: AutocompleteRebuiltProps<T, false>["customRenderHeader"];
18
+ readonly customRenderFooter?: AutocompleteRebuiltProps<T, false>["customRenderFooter"];
19
+ readonly customRenderSection?: AutocompleteRebuiltProps<T, false>["customRenderSection"];
20
+ readonly loading?: boolean;
21
+ readonly customRenderLoading?: React.ReactNode;
22
+ readonly emptyStateMessage?: React.ReactNode;
23
+ readonly ref?: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
24
+ readonly UNSAFE_className?: AutocompleteRebuiltProps<T, false>["UNSAFE_className"];
25
+ readonly UNSAFE_styles?: AutocompleteRebuiltProps<T, false>["UNSAFE_styles"];
26
+ readonly readOnly?: boolean;
27
+ readonly debounce?: number;
28
+ }): React.JSX.Element;
29
+ export declare function FreeFormWrapper({ initialValue, initialInputValue, onChange, onInputChange, menu, openOnFocus, inputEqualsOption, debounce, }: {
30
+ readonly initialValue?: OptionLike;
31
+ readonly initialInputValue?: string;
32
+ readonly onChange?: (v: OptionLike | undefined) => void;
33
+ readonly onInputChange?: (v: string) => void;
34
+ readonly menu?: MenuItem<OptionLike>[];
35
+ readonly openOnFocus?: boolean;
36
+ readonly inputEqualsOption?: (input: string, option: OptionLike) => boolean;
37
+ readonly debounce?: number;
38
+ }): React.JSX.Element;
@@ -0,0 +1,66 @@
1
+ import type React from "react";
2
+ import type { ActionConfig, ActionOrigin, AutocompleteRebuiltProps, MenuAction, MenuSection, OptionLike } from "./Autocomplete.types";
3
+ export type RenderItem<T extends OptionLike, S extends object = Record<string, unknown>, A extends object = Record<string, unknown>> = {
4
+ kind: "option";
5
+ value: T;
6
+ } | {
7
+ kind: "action";
8
+ action: MenuAction<A>;
9
+ origin?: ActionOrigin;
10
+ } | {
11
+ kind: "section";
12
+ section: MenuSection<T, S, A>;
13
+ };
14
+ export declare function useAutocomplete<Value extends OptionLike, Multiple extends boolean = false, SectionExtra extends object = Record<string, unknown>, ActionExtra extends object = Record<string, unknown>>(props: AutocompleteRebuiltProps<Value, Multiple, SectionExtra, ActionExtra>): {
15
+ renderable: RenderItem<Value, SectionExtra, ActionExtra>[];
16
+ optionCount: number;
17
+ persistentsHeaders: import("./Autocomplete.types").MenuHeader<ActionExtra>[];
18
+ persistentsFooters: import("./Autocomplete.types").MenuFooter<ActionExtra>[];
19
+ headerInteractiveCount: number;
20
+ middleNavigableCount: number;
21
+ getOptionLabel: (opt: Value) => string;
22
+ isOptionSelected: (opt: Value) => boolean;
23
+ refs: {
24
+ reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
25
+ floating: React.MutableRefObject<HTMLElement | null>;
26
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
27
+ setFloating: (node: HTMLElement | null) => void;
28
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
29
+ floatingStyles: React.CSSProperties;
30
+ context: {
31
+ x: number;
32
+ y: number;
33
+ placement: import("@floating-ui/utils").Placement;
34
+ strategy: import("@floating-ui/utils").Strategy;
35
+ middlewareData: import("@floating-ui/core").MiddlewareData;
36
+ isPositioned: boolean;
37
+ update: () => void;
38
+ floatingStyles: React.CSSProperties;
39
+ open: boolean;
40
+ onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
41
+ events: import("@floating-ui/react").FloatingEvents;
42
+ dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
43
+ nodeId: string | undefined;
44
+ floatingId: string | undefined;
45
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
46
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
47
+ };
48
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
49
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
50
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
51
+ active?: boolean;
52
+ selected?: boolean;
53
+ }) => Record<string, unknown>;
54
+ open: boolean;
55
+ setOpen: (open: boolean) => void;
56
+ activeIndex: number | null;
57
+ setActiveIndex: (index: number | null) => void;
58
+ listRef: React.MutableRefObject<(HTMLElement | null)[]>;
59
+ onSelection: (option: Value) => void;
60
+ onAction: (action: ActionConfig) => void;
61
+ onInputChangeFromUser: (val: string) => void;
62
+ onInputBlur: () => void;
63
+ onInputFocus: () => void;
64
+ onInputKeyDown: (event: React.KeyboardEvent) => void;
65
+ setReferenceElement: (el: HTMLElement | null) => void;
66
+ };
@@ -0,0 +1,14 @@
1
+ import type React from "react";
2
+ import type { ActionConfig, MenuFooter, MenuHeader, MenuItem, MenuOptions, MenuSection, OptionLike } from "../Autocomplete.types";
3
+ import type { RenderItem } from "../useAutocomplete";
4
+ export declare function flattenMenu<Value extends OptionLike, S extends object, A extends object>(menu: MenuItem<Value, S, A>[]): {
5
+ optionItems: Value[];
6
+ sections: (MenuSection<Value, S, A> | MenuOptions<Value, A>)[];
7
+ persistentsHeaders: MenuHeader<A>[];
8
+ persistentsFooters: MenuFooter<A>[];
9
+ };
10
+ export declare function buildItemsForGroup<Value extends OptionLike, S extends object, A extends object>(group: MenuSection<Value, S, A> | MenuOptions<Value, A>, optionsFilter?: (opts: Value[]) => Value[]): Array<RenderItem<Value, S, A>>;
11
+ export declare function buildRenderableList<Value extends OptionLike, S extends object, A extends object>(sections: Array<MenuSection<Value, S, A> | MenuOptions<Value, A>>, optionsFilter?: (opts: Value[]) => Value[]): RenderItem<Value, S, A>[];
12
+ export declare function getNavigableItemAtIndex<Value extends OptionLike, S extends object, A extends object>(activeIndex: number | null, renderable: Array<RenderItem<Value, S, A>>): RenderItem<Value, S, A> | null;
13
+ export declare function findNavigableIndexForValue<Value extends OptionLike, S extends object, A extends object>(renderable: Array<RenderItem<Value, S, A>>, equals: (a: Value, b: Value) => boolean, selectedValue: Value): number | null;
14
+ export declare function invokeActiveItemOnEnter<Value extends OptionLike, S extends object, A extends object>(event: React.KeyboardEvent, activeIndex: number | null, renderable: Array<RenderItem<Value, S, A>>, onSelect: (option: Value) => void, onAction: (action: ActionConfig) => void): void;
@@ -4,12 +4,7 @@ var Banner = require('../Banner-cjs.js');
4
4
  require('../tslib.es6-cjs.js');
5
5
  require('react');
6
6
  require('classnames');
7
- require('../useResizeObserver-cjs.js');
8
- require('../_commonjsHelpers-cjs.js');
9
- require('../throttle-cjs.js');
10
- require('../debounce-cjs.js');
11
- require('../isObjectLike-cjs.js');
12
- require('../isSymbol-cjs.js');
7
+ require('@jobber/hooks');
13
8
  require('../Icon-cjs.js');
14
9
  require('@jobber/design');
15
10
  require('../ButtonDismiss-cjs.js');
@@ -2,12 +2,7 @@ export { B as Banner } from '../Banner-es.js';
2
2
  import '../tslib.es6-es.js';
3
3
  import 'react';
4
4
  import 'classnames';
5
- import '../useResizeObserver-es.js';
6
- import '../_commonjsHelpers-es.js';
7
- import '../throttle-es.js';
8
- import '../debounce-es.js';
9
- import '../isObjectLike-es.js';
10
- import '../isSymbol-es.js';
5
+ import '@jobber/hooks';
11
6
  import '../Icon-es.js';
12
7
  import '@jobber/design';
13
8
  import '../ButtonDismiss-es.js';
@@ -3,7 +3,7 @@
3
3
  var tslib_es6 = require('./tslib.es6-cjs.js');
4
4
  var React = require('react');
5
5
  var classnames = require('classnames');
6
- var useResizeObserver = require('./useResizeObserver-cjs.js');
6
+ var jobberHooks = require('@jobber/hooks');
7
7
  var Icon = require('./Icon-cjs.js');
8
8
  var ButtonDismiss = require('./ButtonDismiss-cjs.js');
9
9
  var Button = require('./Button-cjs.js');
@@ -58,7 +58,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
58
58
  small: 320,
59
59
  medium: 480,
60
60
  };
61
- const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver.useResizeObserver({
61
+ const [bannerRef, { width: bannerWidth = bannerWidths.small }] = jobberHooks.useResizeObserver({
62
62
  widths: bannerWidths,
63
63
  });
64
64
  const bannerClassNames = classnames(styles.banner, [styles[type]], {
package/dist/Banner-es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { _ as __rest } from './tslib.es6-es.js';
2
2
  import React__default, { createContext, useContext, useState } from 'react';
3
3
  import classnames from 'classnames';
4
- import { u as useResizeObserver } from './useResizeObserver-es.js';
4
+ import { useResizeObserver } from '@jobber/hooks';
5
5
  import { I as Icon } from './Icon-es.js';
6
6
  import { B as ButtonDismiss } from './ButtonDismiss-es.js';
7
7
  import { B as Button } from './Button-es.js';
@@ -56,7 +56,7 @@ function InternalWrapper({ children, icon, dismissButton, UNSAFE_className, UNSA
56
56
  small: 320,
57
57
  medium: 480,
58
58
  };
59
- const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver.useResizeObserver({
59
+ const [bannerRef, { width: bannerWidth = bannerWidths.small }] = useResizeObserver({
60
60
  widths: bannerWidths,
61
61
  });
62
62
  const bannerClassNames = classnames(styles.banner, [styles[type]], {
@@ -74,7 +74,7 @@ function Button(props) {
74
74
  React.createElement(ButtonWrapper, Object.assign({}, props))));
75
75
  }
76
76
  function ButtonWrapper(props) {
77
- const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
77
+ const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, loading, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
78
78
  const { combined } = useButtonStyles(props);
79
79
  const buttonType = submit ? "submit" : "button";
80
80
  const buttonClassNames = classnames(combined, UNSAFE_className.container);
@@ -82,7 +82,7 @@ function ButtonWrapper(props) {
82
82
  id, style: UNSAFE_style.container }, (submit && { name, value })), (!disabled && { href: url })), (!disabled && { onClick: onClick })), (!disabled && { onMouseDown: onMouseDown })), (external && {
83
83
  target: "_blank",
84
84
  rel: "noopener noreferrer",
85
- })), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
85
+ })), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-busy": loading, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
86
86
  const buttonInternals = children || React.createElement(ButtonContent, Object.assign({}, props));
87
87
  if (to) {
88
88
  return (React.createElement(reactRouterDom.Link, Object.assign({}, tagProps, { to: to }), buttonInternals));
package/dist/Button-es.js CHANGED
@@ -72,7 +72,7 @@ function Button(props) {
72
72
  React__default.createElement(ButtonWrapper, Object.assign({}, props))));
73
73
  }
74
74
  function ButtonWrapper(props) {
75
- const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
75
+ const { ariaControls, ariaHaspopup, ariaExpanded, ariaLabel, disabled = false, external, id, name, onClick, onMouseDown, loading, role, value, submit, to, url, UNSAFE_className = {}, UNSAFE_style = {}, children, } = props;
76
76
  const { combined } = useButtonStyles(props);
77
77
  const buttonType = submit ? "submit" : "button";
78
78
  const buttonClassNames = classnames(combined, UNSAFE_className.container);
@@ -80,7 +80,7 @@ function ButtonWrapper(props) {
80
80
  id, style: UNSAFE_style.container }, (submit && { name, value })), (!disabled && { href: url })), (!disabled && { onClick: onClick })), (!disabled && { onMouseDown: onMouseDown })), (external && {
81
81
  target: "_blank",
82
82
  rel: "noopener noreferrer",
83
- })), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
83
+ })), (url === undefined && to === undefined && { type: buttonType })), { "aria-controls": ariaControls, "aria-haspopup": ariaHaspopup, "aria-busy": loading, "aria-expanded": ariaExpanded, "aria-label": ariaLabel, role: role });
84
84
  const buttonInternals = children || React__default.createElement(ButtonContent, Object.assign({}, props));
85
85
  if (to) {
86
86
  return (React__default.createElement(Link, Object.assign({}, tagProps, { to: to }), buttonInternals));
@@ -4,10 +4,12 @@ interface ClickableCardProps {
4
4
  onClick(event: React.MouseEvent<HTMLElement>): void;
5
5
  readonly className: string;
6
6
  readonly children: ReactNode | ReactNode[];
7
+ readonly UNSAFE_className?: string;
8
+ readonly UNSAFE_style?: React.CSSProperties;
7
9
  }
8
10
  /**
9
11
  * This is only intended to be used in the Card component.
10
12
  * Please use `<Card onClick={onClick} />` component instead.
11
13
  */
12
- export declare function CardClickable({ className, onClick, children, }: ClickableCardProps): React.JSX.Element;
14
+ export declare function CardClickable({ className, onClick, children, UNSAFE_style, }: ClickableCardProps): React.JSX.Element;
13
15
  export {};
@@ -4,4 +4,4 @@ import type { CardProps } from "./types";
4
4
  * Intended to be used in the Card component.
5
5
  * Use `<Card header={header} />` component instead.
6
6
  */
7
- export declare function CardHeader({ title, header, }: Pick<CardProps, "title" | "header">): React.JSX.Element;
7
+ export declare function CardHeader({ title, header, UNSAFE_className, UNSAFE_style, }: Pick<CardProps, "title" | "header" | "UNSAFE_className" | "UNSAFE_style">): React.JSX.Element;
@@ -12,12 +12,10 @@ require('../Icon-cjs.js');
12
12
  require('@jobber/design');
13
13
  require('../Menu-cjs.js');
14
14
  require('framer-motion');
15
- require('../useRefocusOnActivator-cjs.js');
15
+ require('@jobber/hooks');
16
16
  require('../floating-ui.react-cjs.js');
17
+ require('react/jsx-runtime');
17
18
  require('react-dom');
18
- require('../useFocusTrap-cjs.js');
19
- require('../useIsMounted-cjs.js');
20
- require('../useSafeLayoutEffect-cjs.js');
21
19
  require('../useFormFieldFocus-cjs.js');
22
20
  require('../maxHeight-cjs.js');
23
21
 
@@ -10,11 +10,9 @@ import '../Icon-es.js';
10
10
  import '@jobber/design';
11
11
  import '../Menu-es.js';
12
12
  import 'framer-motion';
13
- import '../useRefocusOnActivator-es.js';
13
+ import '@jobber/hooks';
14
14
  import '../floating-ui.react-es.js';
15
+ import 'react/jsx-runtime';
15
16
  import 'react-dom';
16
- import '../useFocusTrap-es.js';
17
- import '../useIsMounted-es.js';
18
- import '../useSafeLayoutEffect-es.js';
19
17
  import '../useFormFieldFocus-es.js';
20
18
  import '../maxHeight-es.js';
@@ -1,4 +1,4 @@
1
- import type { ReactElement, ReactNode } from "react";
1
+ import type { CSSProperties, ReactElement, ReactNode } from "react";
2
2
  import type colors from "./cardcolors.module.css";
3
3
  import { type ButtonProps } from "../Button";
4
4
  import { type MenuProps } from "../Menu";
@@ -31,6 +31,24 @@ export interface CardProps {
31
31
  */
32
32
  readonly header?: string | HeaderActionProps | ReactElement;
33
33
  readonly elevation?: elevationProp;
34
+ /**
35
+ * **Use at your own risk:** Custom class names for specific elements. This should only be used as a
36
+ * **last resort**. Using this may result in unexpected side effects.
37
+ * More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
38
+ */
39
+ readonly UNSAFE_className?: {
40
+ container?: string;
41
+ header?: string;
42
+ };
43
+ /**
44
+ * **Use at your own risk:** Custom style for specific elements. This should only be used as a
45
+ * **last resort**. Using this may result in unexpected side effects.
46
+ * More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
47
+ */
48
+ readonly UNSAFE_style?: {
49
+ container?: CSSProperties;
50
+ header?: CSSProperties;
51
+ };
34
52
  }
35
53
  export interface CardHeaderProps {
36
54
  readonly children: ReactNode;
package/dist/Card-cjs.js CHANGED
@@ -18,9 +18,9 @@ const SPACEBAR_KEY = " ";
18
18
  * This is only intended to be used in the Card component.
19
19
  * Please use `<Card onClick={onClick} />` component instead.
20
20
  */
21
- function CardClickable({ className, onClick, children, }) {
21
+ function CardClickable({ className, onClick, children, UNSAFE_style = {}, }) {
22
22
  const cardRef = React.useRef();
23
- return (React.createElement("div", { ref: cardRef, "data-testid": "clickable-card", className: className, onClick: onClick, onKeyUp: handleKeyup, onKeyDown: handleKeyDown, role: "button", tabIndex: 0 }, children));
23
+ return (React.createElement("div", { ref: cardRef, "data-testid": "clickable-card", className: className, style: UNSAFE_style, onClick: onClick, onKeyUp: handleKeyup, onKeyDown: handleKeyDown, role: "button", tabIndex: 0 }, children));
24
24
  function isCardFocused() {
25
25
  return document.activeElement === cardRef.current;
26
26
  }
@@ -43,7 +43,7 @@ function CardClickable({ className, onClick, children, }) {
43
43
  * Intended to be used in the Card component.
44
44
  * Use `<Card header={header} />` component instead.
45
45
  */
46
- function CardHeader({ title, header, }) {
46
+ function CardHeader({ title, header, UNSAFE_className = {}, UNSAFE_style = {}, }) {
47
47
  const heading = title || header;
48
48
  if (React.isValidElement(heading))
49
49
  return React.createElement(React.Fragment, null, heading);
@@ -51,7 +51,7 @@ function CardHeader({ title, header, }) {
51
51
  const titleString = typeof heading === "string"
52
52
  ? heading
53
53
  : heading.title;
54
- return (React.createElement("div", { className: styles.header },
54
+ return (React.createElement("div", { className: classnames(styles.header, UNSAFE_className.header), style: UNSAFE_style.header },
55
55
  titleString && React.createElement(Heading.Heading, { level: 2 }, titleString),
56
56
  typeof heading === "object" &&
57
57
  renderHeaderAction(heading === null || heading === void 0 ? void 0 : heading.action)));
@@ -107,30 +107,31 @@ function CardHeaderCompoundComponent({ children }) {
107
107
  function CardBodyCompoundComponent({ children }) {
108
108
  return React.createElement(React.Fragment, null, children);
109
109
  }
110
- function renderCardContent(children, title, header) {
110
+ function renderCardContent(children, title, header, UNSAFE_className, UNSAFE_style) {
111
111
  return (React.createElement(React.Fragment, null,
112
- React.createElement(CardHeader, { title: title, header: header }),
112
+ React.createElement(CardHeader, { title: title, header: header, UNSAFE_className: { header: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.header }, UNSAFE_style: { header: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.header } }),
113
113
  children));
114
114
  }
115
- function renderCardWrapper(className, content, onClick, url, external) {
115
+ function renderCardWrapper(className, content, onClick, url, external, UNSAFE_className, UNSAFE_style) {
116
+ const combinedClassName = classnames(className, UNSAFE_className);
116
117
  if (onClick) {
117
- return (React.createElement(CardClickable, { className: className, onClick: onClick }, content));
118
+ return (React.createElement(CardClickable, { className: combinedClassName, onClick: onClick, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, content));
118
119
  }
119
120
  if (url) {
120
- return (React.createElement("a", Object.assign({ className: className, href: url }, (external && { target: "_blank", rel: "noopener noreferrer" })), content));
121
+ return (React.createElement("a", Object.assign({ className: combinedClassName, href: url, style: UNSAFE_style }, (external && { target: "_blank", rel: "noopener noreferrer" })), content));
121
122
  }
122
- return React.createElement("div", { className: className }, content);
123
+ return (React.createElement("div", { className: combinedClassName, style: UNSAFE_style }, content));
123
124
  }
124
125
  function Card(props) {
125
- const { accent, header, children, title, elevation = "none", onClick, url, external, } = props;
126
+ const { accent, header, children, title, elevation = "none", onClick, url, external, UNSAFE_className = {}, UNSAFE_style = {}, } = props;
126
127
  const className = classnames(styles.card, accent && styles.accent, (url || onClick) && styles.clickable, accent && colors[accent], elevation !== "none" && elevations[`${elevation}Elevation`]);
127
128
  const isUsingCompoundPattern = React.Children.toArray(children).some(child => React.isValidElement(child) &&
128
129
  (child.type === CardHeaderCompoundComponent ||
129
130
  child.type === CardBodyCompoundComponent));
130
131
  const content = isUsingCompoundPattern
131
132
  ? children
132
- : renderCardContent(children, title, header);
133
- return renderCardWrapper(className, content, onClick, url, external);
133
+ : renderCardContent(children, title, header, UNSAFE_className, UNSAFE_style);
134
+ return renderCardWrapper(className, content, onClick, url, external, UNSAFE_className.container, UNSAFE_style.container);
134
135
  }
135
136
  Card.Header = CardHeaderCompoundComponent;
136
137
  Card.Body = CardBodyCompoundComponent;
package/dist/Card-es.js CHANGED
@@ -16,9 +16,9 @@ const SPACEBAR_KEY = " ";
16
16
  * This is only intended to be used in the Card component.
17
17
  * Please use `<Card onClick={onClick} />` component instead.
18
18
  */
19
- function CardClickable({ className, onClick, children, }) {
19
+ function CardClickable({ className, onClick, children, UNSAFE_style = {}, }) {
20
20
  const cardRef = useRef();
21
- return (React__default.createElement("div", { ref: cardRef, "data-testid": "clickable-card", className: className, onClick: onClick, onKeyUp: handleKeyup, onKeyDown: handleKeyDown, role: "button", tabIndex: 0 }, children));
21
+ return (React__default.createElement("div", { ref: cardRef, "data-testid": "clickable-card", className: className, style: UNSAFE_style, onClick: onClick, onKeyUp: handleKeyup, onKeyDown: handleKeyDown, role: "button", tabIndex: 0 }, children));
22
22
  function isCardFocused() {
23
23
  return document.activeElement === cardRef.current;
24
24
  }
@@ -41,7 +41,7 @@ function CardClickable({ className, onClick, children, }) {
41
41
  * Intended to be used in the Card component.
42
42
  * Use `<Card header={header} />` component instead.
43
43
  */
44
- function CardHeader({ title, header, }) {
44
+ function CardHeader({ title, header, UNSAFE_className = {}, UNSAFE_style = {}, }) {
45
45
  const heading = title || header;
46
46
  if (React__default.isValidElement(heading))
47
47
  return React__default.createElement(React__default.Fragment, null, heading);
@@ -49,7 +49,7 @@ function CardHeader({ title, header, }) {
49
49
  const titleString = typeof heading === "string"
50
50
  ? heading
51
51
  : heading.title;
52
- return (React__default.createElement("div", { className: styles.header },
52
+ return (React__default.createElement("div", { className: classnames(styles.header, UNSAFE_className.header), style: UNSAFE_style.header },
53
53
  titleString && React__default.createElement(Heading, { level: 2 }, titleString),
54
54
  typeof heading === "object" &&
55
55
  renderHeaderAction(heading === null || heading === void 0 ? void 0 : heading.action)));
@@ -105,30 +105,31 @@ function CardHeaderCompoundComponent({ children }) {
105
105
  function CardBodyCompoundComponent({ children }) {
106
106
  return React__default.createElement(React__default.Fragment, null, children);
107
107
  }
108
- function renderCardContent(children, title, header) {
108
+ function renderCardContent(children, title, header, UNSAFE_className, UNSAFE_style) {
109
109
  return (React__default.createElement(React__default.Fragment, null,
110
- React__default.createElement(CardHeader, { title: title, header: header }),
110
+ React__default.createElement(CardHeader, { title: title, header: header, UNSAFE_className: { header: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.header }, UNSAFE_style: { header: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.header } }),
111
111
  children));
112
112
  }
113
- function renderCardWrapper(className, content, onClick, url, external) {
113
+ function renderCardWrapper(className, content, onClick, url, external, UNSAFE_className, UNSAFE_style) {
114
+ const combinedClassName = classnames(className, UNSAFE_className);
114
115
  if (onClick) {
115
- return (React__default.createElement(CardClickable, { className: className, onClick: onClick }, content));
116
+ return (React__default.createElement(CardClickable, { className: combinedClassName, onClick: onClick, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, content));
116
117
  }
117
118
  if (url) {
118
- return (React__default.createElement("a", Object.assign({ className: className, href: url }, (external && { target: "_blank", rel: "noopener noreferrer" })), content));
119
+ return (React__default.createElement("a", Object.assign({ className: combinedClassName, href: url, style: UNSAFE_style }, (external && { target: "_blank", rel: "noopener noreferrer" })), content));
119
120
  }
120
- return React__default.createElement("div", { className: className }, content);
121
+ return (React__default.createElement("div", { className: combinedClassName, style: UNSAFE_style }, content));
121
122
  }
122
123
  function Card(props) {
123
- const { accent, header, children, title, elevation = "none", onClick, url, external, } = props;
124
+ const { accent, header, children, title, elevation = "none", onClick, url, external, UNSAFE_className = {}, UNSAFE_style = {}, } = props;
124
125
  const className = classnames(styles.card, accent && styles.accent, (url || onClick) && styles.clickable, accent && colors[accent], elevation !== "none" && elevations[`${elevation}Elevation`]);
125
126
  const isUsingCompoundPattern = React__default.Children.toArray(children).some(child => React__default.isValidElement(child) &&
126
127
  (child.type === CardHeaderCompoundComponent ||
127
128
  child.type === CardBodyCompoundComponent));
128
129
  const content = isUsingCompoundPattern
129
130
  ? children
130
- : renderCardContent(children, title, header);
131
- return renderCardWrapper(className, content, onClick, url, external);
131
+ : renderCardContent(children, title, header, UNSAFE_className, UNSAFE_style);
132
+ return renderCardWrapper(className, content, onClick, url, external, UNSAFE_className.container, UNSAFE_style.container);
132
133
  }
133
134
  Card.Header = CardHeaderCompoundComponent;
134
135
  Card.Body = CardBodyCompoundComponent;
@@ -4,7 +4,7 @@ var Chip = require('../Chip-cjs.js');
4
4
  var ChipDismissible = require('../ChipDismissible-cjs.js');
5
5
  require('react');
6
6
  require('classnames');
7
- require('../useInView-cjs.js');
7
+ require('@jobber/hooks');
8
8
  require('../Avatar-cjs.js');
9
9
  require('color');
10
10
  require('../Icon-cjs.js');
@@ -13,10 +13,9 @@ require('../useChildComponent-cjs.js');
13
13
  require('../Typography-cjs.js');
14
14
  require('../Tooltip-cjs.js');
15
15
  require('../floating-ui.react-cjs.js');
16
+ require('react/jsx-runtime');
16
17
  require('react-dom');
17
18
  require('framer-motion');
18
- require('../useSafeLayoutEffect-cjs.js');
19
- require('../useIsMounted-cjs.js');
20
19
  require('../tslib.es6-cjs.js');
21
20
 
22
21
 
@@ -2,7 +2,7 @@ export { C as Chip } from '../Chip-es.js';
2
2
  export { a as ChipDismissible, C as ChipSelectable } from '../ChipDismissible-es.js';
3
3
  import 'react';
4
4
  import 'classnames';
5
- import '../useInView-es.js';
5
+ import '@jobber/hooks';
6
6
  import '../Avatar-es.js';
7
7
  import 'color';
8
8
  import '../Icon-es.js';
@@ -11,8 +11,7 @@ import '../useChildComponent-es.js';
11
11
  import '../Typography-es.js';
12
12
  import '../Tooltip-es.js';
13
13
  import '../floating-ui.react-es.js';
14
+ import 'react/jsx-runtime';
14
15
  import 'react-dom';
15
16
  import 'framer-motion';
16
- import '../useSafeLayoutEffect-es.js';
17
- import '../useIsMounted-es.js';
18
17
  import '../tslib.es6-es.js';
package/dist/Chip-cjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var React = require('react');
4
4
  var classnames = require('classnames');
5
- var useInView = require('./useInView-cjs.js');
5
+ var jobberHooks = require('@jobber/hooks');
6
6
  var Avatar = require('./Avatar-cjs.js');
7
7
  var Icon = require('./Icon-cjs.js');
8
8
  var useChildComponent = require('./useChildComponent-cjs.js');
@@ -72,8 +72,8 @@ const ChipComponent = React.forwardRef(({ ariaLabel, disabled, heading, invalid,
72
72
  });
73
73
  const prefix = useChildComponent.useChildComponent(children, d => d.type === ChipPrefix);
74
74
  const suffix = useChildComponent.useChildComponent(children, d => d.type === ChipSuffix);
75
- const [labelRef, labelFullyVisible] = useInView.useInView_2();
76
- const [headingRef, headingFullyVisible] = useInView.useInView_2();
75
+ const [labelRef, labelFullyVisible] = jobberHooks.useInView();
76
+ const [headingRef, headingFullyVisible] = jobberHooks.useInView();
77
77
  const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
78
78
  const chipContent = (React.createElement(React.Fragment, null,
79
79
  prefix,
package/dist/Chip-es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React__default, { useRef, forwardRef } from 'react';
2
2
  import classnames from 'classnames';
3
- import { u as useInView_2 } from './useInView-es.js';
3
+ import { useInView } from '@jobber/hooks';
4
4
  import { A as Avatar } from './Avatar-es.js';
5
5
  import { I as Icon } from './Icon-es.js';
6
6
  import { u as useChildComponent } from './useChildComponent-es.js';
@@ -70,8 +70,8 @@ const ChipComponent = forwardRef(({ ariaLabel, disabled, heading, invalid, label
70
70
  });
71
71
  const prefix = useChildComponent(children, d => d.type === ChipPrefix);
72
72
  const suffix = useChildComponent(children, d => d.type === ChipSuffix);
73
- const [labelRef, labelFullyVisible] = useInView_2();
74
- const [headingRef, headingFullyVisible] = useInView_2();
73
+ const [labelRef, labelFullyVisible] = useInView();
74
+ const [headingRef, headingFullyVisible] = useInView();
75
75
  const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
76
76
  const chipContent = (React__default.createElement(React__default.Fragment, null,
77
77
  prefix,
@@ -14,10 +14,12 @@ require('../../../_baseEach-cjs.js');
14
14
  require('../../../_baseFor-cjs.js');
15
15
  require('../../../_isIterateeCall-cjs.js');
16
16
  require('../../../_setToString-cjs.js');
17
+ require('@jobber/hooks');
17
18
  require('../../../debounce-cjs.js');
18
19
  require('../../../Icon-cjs.js');
19
20
  require('@jobber/design');
20
21
  require('../../../floating-ui.react-cjs.js');
22
+ require('react/jsx-runtime');
21
23
  require('react-dom');
22
24
  require('../../../maxHeight-cjs.js');
23
25
 
@@ -12,9 +12,11 @@ import '../../../_baseEach-es.js';
12
12
  import '../../../_baseFor-es.js';
13
13
  import '../../../_isIterateeCall-es.js';
14
14
  import '../../../_setToString-es.js';
15
+ import '@jobber/hooks';
15
16
  import '../../../debounce-es.js';
16
17
  import '../../../Icon-es.js';
17
18
  import '@jobber/design';
18
19
  import '../../../floating-ui.react-es.js';
20
+ import 'react/jsx-runtime';
19
21
  import 'react-dom';
20
22
  import '../../../maxHeight-es.js';
@@ -15,10 +15,12 @@ require('../../_baseEach-cjs.js');
15
15
  require('../../_baseFor-cjs.js');
16
16
  require('../../_isIterateeCall-cjs.js');
17
17
  require('../../_setToString-cjs.js');
18
+ require('@jobber/hooks');
18
19
  require('../../debounce-cjs.js');
19
20
  require('../../Icon-cjs.js');
20
21
  require('@jobber/design');
21
22
  require('../../floating-ui.react-cjs.js');
23
+ require('react/jsx-runtime');
22
24
  require('react-dom');
23
25
  require('../../maxHeight-cjs.js');
24
26
  require('classnames');
@@ -29,14 +31,11 @@ require('react-router-dom');
29
31
  require('../../tslib.es6-cjs.js');
30
32
  require('../../Spinner-cjs.js');
31
33
  require('../../Chip-cjs.js');
32
- require('../../useInView-cjs.js');
33
34
  require('../../Avatar-cjs.js');
34
35
  require('color');
35
36
  require('../../useChildComponent-cjs.js');
36
37
  require('../../Tooltip-cjs.js');
37
38
  require('framer-motion');
38
- require('../../useSafeLayoutEffect-cjs.js');
39
- require('../../useIsMounted-cjs.js');
40
39
 
41
40
 
42
41
 
@@ -13,10 +13,12 @@ import '../../_baseEach-es.js';
13
13
  import '../../_baseFor-es.js';
14
14
  import '../../_isIterateeCall-es.js';
15
15
  import '../../_setToString-es.js';
16
+ import '@jobber/hooks';
16
17
  import '../../debounce-es.js';
17
18
  import '../../Icon-es.js';
18
19
  import '@jobber/design';
19
20
  import '../../floating-ui.react-es.js';
21
+ import 'react/jsx-runtime';
20
22
  import 'react-dom';
21
23
  import '../../maxHeight-es.js';
22
24
  import 'classnames';
@@ -27,11 +29,8 @@ import 'react-router-dom';
27
29
  import '../../tslib.es6-es.js';
28
30
  import '../../Spinner-es.js';
29
31
  import '../../Chip-es.js';
30
- import '../../useInView-es.js';
31
32
  import '../../Avatar-es.js';
32
33
  import 'color';
33
34
  import '../../useChildComponent-es.js';
34
35
  import '../../Tooltip-es.js';
35
36
  import 'framer-motion';
36
- import '../../useSafeLayoutEffect-es.js';
37
- import '../../useIsMounted-es.js';