@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
@@ -4,6 +4,7 @@ import { k as FormField, j as useFormFieldWrapperStyles, b as useAtlantisFormFie
4
4
  import classnames from 'classnames';
5
5
  import '../tslib.es6-es.js';
6
6
  import 'react-hook-form';
7
+ import '@jobber/hooks';
7
8
  import 'framer-motion';
8
9
  import '@jobber/design';
9
10
  import '../Button-es.js';
@@ -4,12 +4,8 @@ var SideDrawer = require('../SideDrawer-cjs.js');
4
4
  require('react');
5
5
  require('react-dom');
6
6
  require('framer-motion');
7
- require('../useRefocusOnActivator-cjs.js');
8
- require('../useFocusTrap-cjs.js');
7
+ require('@jobber/hooks');
9
8
  require('classnames');
10
- require('../useInView-cjs.js');
11
- require('../useIsMounted-cjs.js');
12
- require('../useSafeLayoutEffect-cjs.js');
13
9
  require('@jobber/design');
14
10
  require('../Heading-cjs.js');
15
11
  require('../Typography-cjs.js');
@@ -2,12 +2,8 @@ export { S as SideDrawer } from '../SideDrawer-es.js';
2
2
  import 'react';
3
3
  import 'react-dom';
4
4
  import 'framer-motion';
5
- import '../useRefocusOnActivator-es.js';
6
- import '../useFocusTrap-es.js';
5
+ import '@jobber/hooks';
7
6
  import 'classnames';
8
- import '../useInView-es.js';
9
- import '../useIsMounted-es.js';
10
- import '../useSafeLayoutEffect-es.js';
11
7
  import '@jobber/design';
12
8
  import '../Heading-es.js';
13
9
  import '../Typography-es.js';
@@ -3,11 +3,8 @@
3
3
  var React = require('react');
4
4
  var ReactDOM = require('react-dom');
5
5
  var framerMotion = require('framer-motion');
6
- var useRefocusOnActivator = require('./useRefocusOnActivator-cjs.js');
7
- var useFocusTrap = require('./useFocusTrap-cjs.js');
6
+ var jobberHooks = require('@jobber/hooks');
8
7
  var classnames = require('classnames');
9
- var useInView = require('./useInView-cjs.js');
10
- var useIsMounted = require('./useIsMounted-cjs.js');
11
8
  var design = require('@jobber/design');
12
9
  var Heading = require('./Heading-cjs.js');
13
10
  var Button = require('./Button-cjs.js');
@@ -87,10 +84,10 @@ const useSideDrawerState = (open) => {
87
84
  backButton: false,
88
85
  });
89
86
  const { toolbar, title, actions, backButton, footer } = useSlotIDs();
90
- useRefocusOnActivator.useRefocusOnActivator_2(open);
91
- const sideDrawerRef = useFocusTrap.useFocusTrap_2(open);
92
- const [headerShadowRef, noHeaderShadow] = useInView.useInView_2();
93
- const [footerShadowRef, noFooterShadow] = useInView.useInView_2();
87
+ jobberHooks.useRefocusOnActivator(open);
88
+ const sideDrawerRef = jobberHooks.useFocusTrap(open);
89
+ const [headerShadowRef, noHeaderShadow] = jobberHooks.useInView();
90
+ const [footerShadowRef, noFooterShadow] = jobberHooks.useInView();
94
91
  return {
95
92
  ref,
96
93
  setRef,
@@ -107,9 +104,9 @@ const useSideDrawerState = (open) => {
107
104
  function SideDrawer({ children, onRequestClose, open, variation = "base", scrollDirection, inline = false, UNSAFE_className, UNSAFE_style, }) {
108
105
  var _a;
109
106
  const { ref, setRef, components, setComponents, slots, sideDrawerRef, headerShadowRef, noHeaderShadow, footerShadowRef, noFooterShadow, } = useSideDrawerState(open);
110
- useRefocusOnActivator.useRefocusOnActivator_2(open);
107
+ jobberHooks.useRefocusOnActivator(open);
111
108
  const container = ((_a = globalThis.document) === null || _a === void 0 ? void 0 : _a.body) || null;
112
- const isMounted = useIsMounted.useIsMounted_2();
109
+ const isMounted = jobberHooks.useIsMounted();
113
110
  if (!isMounted.current && !container)
114
111
  return null;
115
112
  const SideDrawerRender = (React.createElement(SideDrawerContext.Provider, { value: {
@@ -1,11 +1,8 @@
1
1
  import React__default, { createContext, useContext, useEffect, useState, useId } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import { AnimatePresence, motion } from 'framer-motion';
4
- import { u as useRefocusOnActivator_2 } from './useRefocusOnActivator-es.js';
5
- import { u as useFocusTrap_2 } from './useFocusTrap-es.js';
4
+ import { useRefocusOnActivator, useIsMounted, useFocusTrap, useInView } from '@jobber/hooks';
6
5
  import classnames from 'classnames';
7
- import { u as useInView_2 } from './useInView-es.js';
8
- import { u as useIsMounted_2 } from './useIsMounted-es.js';
9
6
  import { tokens } from '@jobber/design';
10
7
  import { H as Heading } from './Heading-es.js';
11
8
  import { B as Button } from './Button-es.js';
@@ -85,10 +82,10 @@ const useSideDrawerState = (open) => {
85
82
  backButton: false,
86
83
  });
87
84
  const { toolbar, title, actions, backButton, footer } = useSlotIDs();
88
- useRefocusOnActivator_2(open);
89
- const sideDrawerRef = useFocusTrap_2(open);
90
- const [headerShadowRef, noHeaderShadow] = useInView_2();
91
- const [footerShadowRef, noFooterShadow] = useInView_2();
85
+ useRefocusOnActivator(open);
86
+ const sideDrawerRef = useFocusTrap(open);
87
+ const [headerShadowRef, noHeaderShadow] = useInView();
88
+ const [footerShadowRef, noFooterShadow] = useInView();
92
89
  return {
93
90
  ref,
94
91
  setRef,
@@ -105,9 +102,9 @@ const useSideDrawerState = (open) => {
105
102
  function SideDrawer({ children, onRequestClose, open, variation = "base", scrollDirection, inline = false, UNSAFE_className, UNSAFE_style, }) {
106
103
  var _a;
107
104
  const { ref, setRef, components, setComponents, slots, sideDrawerRef, headerShadowRef, noHeaderShadow, footerShadowRef, noFooterShadow, } = useSideDrawerState(open);
108
- useRefocusOnActivator_2(open);
105
+ useRefocusOnActivator(open);
109
106
  const container = ((_a = globalThis.document) === null || _a === void 0 ? void 0 : _a.body) || null;
110
- const isMounted = useIsMounted_2();
107
+ const isMounted = useIsMounted();
111
108
  if (!isMounted.current && !container)
112
109
  return null;
113
110
  const SideDrawerRender = (React__default.createElement(SideDrawerContext.Provider, { value: {
@@ -3,7 +3,6 @@
3
3
  var Tabs = require('../Tabs-cjs.js');
4
4
  require('react');
5
5
  require('classnames');
6
- require('../throttle-cjs.js');
7
6
  require('../_commonjsHelpers-cjs.js');
8
7
  require('../debounce-cjs.js');
9
8
  require('../isObjectLike-cjs.js');
@@ -1,7 +1,6 @@
1
1
  export { a as Tab, T as Tabs } from '../Tabs-es.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
- import '../throttle-es.js';
5
4
  import '../_commonjsHelpers-es.js';
6
5
  import '../debounce-es.js';
7
6
  import '../isObjectLike-es.js';
package/dist/Tabs-cjs.js CHANGED
@@ -2,11 +2,85 @@
2
2
 
3
3
  var React = require('react');
4
4
  var classnames = require('classnames');
5
- var throttle = require('./throttle-cjs.js');
5
+ var _commonjsHelpers = require('./_commonjsHelpers-cjs.js');
6
+ var debounce$1 = require('./debounce-cjs.js');
7
+ var isObjectLike = require('./isObjectLike-cjs.js');
6
8
  var Typography = require('./Typography-cjs.js');
7
9
 
8
10
  var styles = {"tabs":"cHJe2HsBNic-","overflow":"eQt1Jis30lo-","overflowRight":"_6Vf7pQfyKKk-","overflowLeft":"jyevrJK7Bcg-","tabRow":"LfIIg9bwrhQ-","tab":"DEdzikxlAkw-","selected":"VDB94VYoyB0-","tabContent":"htdKg6As4bY-","spinning":"XFrAkUebMjI-"};
9
11
 
12
+ var debounce = debounce$1.debounce_1,
13
+ isObject = isObjectLike.isObject_1;
14
+
15
+ /** Error message constants. */
16
+ var FUNC_ERROR_TEXT = 'Expected a function';
17
+
18
+ /**
19
+ * Creates a throttled function that only invokes `func` at most once per
20
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
21
+ * method to cancel delayed `func` invocations and a `flush` method to
22
+ * immediately invoke them. Provide `options` to indicate whether `func`
23
+ * should be invoked on the leading and/or trailing edge of the `wait`
24
+ * timeout. The `func` is invoked with the last arguments provided to the
25
+ * throttled function. Subsequent calls to the throttled function return the
26
+ * result of the last `func` invocation.
27
+ *
28
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
29
+ * invoked on the trailing edge of the timeout only if the throttled function
30
+ * is invoked more than once during the `wait` timeout.
31
+ *
32
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
33
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
34
+ *
35
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
36
+ * for details over the differences between `_.throttle` and `_.debounce`.
37
+ *
38
+ * @static
39
+ * @memberOf _
40
+ * @since 0.1.0
41
+ * @category Function
42
+ * @param {Function} func The function to throttle.
43
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
44
+ * @param {Object} [options={}] The options object.
45
+ * @param {boolean} [options.leading=true]
46
+ * Specify invoking on the leading edge of the timeout.
47
+ * @param {boolean} [options.trailing=true]
48
+ * Specify invoking on the trailing edge of the timeout.
49
+ * @returns {Function} Returns the new throttled function.
50
+ * @example
51
+ *
52
+ * // Avoid excessively updating the position while scrolling.
53
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
54
+ *
55
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
56
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
57
+ * jQuery(element).on('click', throttled);
58
+ *
59
+ * // Cancel the trailing throttled invocation.
60
+ * jQuery(window).on('popstate', throttled.cancel);
61
+ */
62
+ function throttle(func, wait, options) {
63
+ var leading = true,
64
+ trailing = true;
65
+
66
+ if (typeof func != 'function') {
67
+ throw new TypeError(FUNC_ERROR_TEXT);
68
+ }
69
+ if (isObject(options)) {
70
+ leading = 'leading' in options ? !!options.leading : leading;
71
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
72
+ }
73
+ return debounce(func, wait, {
74
+ 'leading': leading,
75
+ 'maxWait': wait,
76
+ 'trailing': trailing
77
+ });
78
+ }
79
+
80
+ var throttle_1 = throttle;
81
+
82
+ var throttle$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(throttle_1);
83
+
10
84
  function useTabsOverflow() {
11
85
  const [overflowRight, setOverflowRight] = React.useState(false);
12
86
  const [overflowLeft, setOverflowLeft] = React.useState(false);
@@ -21,7 +95,7 @@ function useTabsOverflow() {
21
95
  setOverflowLeft(scrollPos > 0 && scrollPos < scrollWidth);
22
96
  }
23
97
  };
24
- const throttledHandleOverflowing = React.useCallback(throttle.throttle(handleOverflowing, 100), []);
98
+ const throttledHandleOverflowing = React.useCallback(throttle$1(handleOverflowing, 100), []);
25
99
  React.useEffect(() => {
26
100
  var _a;
27
101
  handleOverflowing();
package/dist/Tabs-es.js CHANGED
@@ -1,10 +1,84 @@
1
1
  import React__default, { useState, useRef, useCallback, useEffect } from 'react';
2
2
  import classnames from 'classnames';
3
- import { t as throttle } from './throttle-es.js';
3
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
4
+ import { a as debounce_1 } from './debounce-es.js';
5
+ import { a as isObject_1 } from './isObjectLike-es.js';
4
6
  import { T as Typography } from './Typography-es.js';
5
7
 
6
8
  var styles = {"tabs":"cHJe2HsBNic-","overflow":"eQt1Jis30lo-","overflowRight":"_6Vf7pQfyKKk-","overflowLeft":"jyevrJK7Bcg-","tabRow":"LfIIg9bwrhQ-","tab":"DEdzikxlAkw-","selected":"VDB94VYoyB0-","tabContent":"htdKg6As4bY-","spinning":"XFrAkUebMjI-"};
7
9
 
10
+ var debounce = debounce_1,
11
+ isObject = isObject_1;
12
+
13
+ /** Error message constants. */
14
+ var FUNC_ERROR_TEXT = 'Expected a function';
15
+
16
+ /**
17
+ * Creates a throttled function that only invokes `func` at most once per
18
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
19
+ * method to cancel delayed `func` invocations and a `flush` method to
20
+ * immediately invoke them. Provide `options` to indicate whether `func`
21
+ * should be invoked on the leading and/or trailing edge of the `wait`
22
+ * timeout. The `func` is invoked with the last arguments provided to the
23
+ * throttled function. Subsequent calls to the throttled function return the
24
+ * result of the last `func` invocation.
25
+ *
26
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
27
+ * invoked on the trailing edge of the timeout only if the throttled function
28
+ * is invoked more than once during the `wait` timeout.
29
+ *
30
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
31
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
32
+ *
33
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
34
+ * for details over the differences between `_.throttle` and `_.debounce`.
35
+ *
36
+ * @static
37
+ * @memberOf _
38
+ * @since 0.1.0
39
+ * @category Function
40
+ * @param {Function} func The function to throttle.
41
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
42
+ * @param {Object} [options={}] The options object.
43
+ * @param {boolean} [options.leading=true]
44
+ * Specify invoking on the leading edge of the timeout.
45
+ * @param {boolean} [options.trailing=true]
46
+ * Specify invoking on the trailing edge of the timeout.
47
+ * @returns {Function} Returns the new throttled function.
48
+ * @example
49
+ *
50
+ * // Avoid excessively updating the position while scrolling.
51
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
52
+ *
53
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
54
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
55
+ * jQuery(element).on('click', throttled);
56
+ *
57
+ * // Cancel the trailing throttled invocation.
58
+ * jQuery(window).on('popstate', throttled.cancel);
59
+ */
60
+ function throttle(func, wait, options) {
61
+ var leading = true,
62
+ trailing = true;
63
+
64
+ if (typeof func != 'function') {
65
+ throw new TypeError(FUNC_ERROR_TEXT);
66
+ }
67
+ if (isObject(options)) {
68
+ leading = 'leading' in options ? !!options.leading : leading;
69
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
70
+ }
71
+ return debounce(func, wait, {
72
+ 'leading': leading,
73
+ 'maxWait': wait,
74
+ 'trailing': trailing
75
+ });
76
+ }
77
+
78
+ var throttle_1 = throttle;
79
+
80
+ var throttle$1 = /*@__PURE__*/getDefaultExportFromCjs(throttle_1);
81
+
8
82
  function useTabsOverflow() {
9
83
  const [overflowRight, setOverflowRight] = useState(false);
10
84
  const [overflowLeft, setOverflowLeft] = useState(false);
@@ -19,7 +93,7 @@ function useTabsOverflow() {
19
93
  setOverflowLeft(scrollPos > 0 && scrollPos < scrollWidth);
20
94
  }
21
95
  };
22
- const throttledHandleOverflowing = useCallback(throttle(handleOverflowing, 100), []);
96
+ const throttledHandleOverflowing = useCallback(throttle$1(handleOverflowing, 100), []);
23
97
  useEffect(() => {
24
98
  var _a;
25
99
  handleOverflowing();
@@ -4,10 +4,10 @@ var Tooltip = require('../Tooltip-cjs.js');
4
4
  require('react');
5
5
  require('classnames');
6
6
  require('../floating-ui.react-cjs.js');
7
+ require('react/jsx-runtime');
7
8
  require('react-dom');
8
9
  require('framer-motion');
9
- require('../useSafeLayoutEffect-cjs.js');
10
- require('../useIsMounted-cjs.js');
10
+ require('@jobber/hooks');
11
11
 
12
12
 
13
13
 
@@ -2,7 +2,7 @@ export { T as Tooltip } from '../Tooltip-es.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '../floating-ui.react-es.js';
5
+ import 'react/jsx-runtime';
5
6
  import 'react-dom';
6
7
  import 'framer-motion';
7
- import '../useSafeLayoutEffect-es.js';
8
- import '../useIsMounted-es.js';
8
+ import '@jobber/hooks';
@@ -5,7 +5,7 @@ interface ToolTipPositionOptions {
5
5
  export declare function useTooltipPositioning({ preferredPlacement, }: ToolTipPositionOptions): {
6
6
  styles: {
7
7
  float: import("react").CSSProperties;
8
- arrow: (Partial<import("@floating-ui/core").Coords> & {
8
+ arrow: (Partial<import("@floating-ui/utils").Coords> & {
9
9
  centerOffset: number;
10
10
  alignmentOffset?: number;
11
11
  }) | undefined;
@@ -4,8 +4,7 @@ var React = require('react');
4
4
  var classnames = require('classnames');
5
5
  var floatingUi_react = require('./floating-ui.react-cjs.js');
6
6
  var framerMotion = require('framer-motion');
7
- var useSafeLayoutEffect = require('./useSafeLayoutEffect-cjs.js');
8
- var useIsMounted = require('./useIsMounted-cjs.js');
7
+ var jobberHooks = require('@jobber/hooks');
9
8
 
10
9
  var styles = {"shadowActivator":"sZQ1M6tj8-c-","tooltipWrapper":"_0o-yEgfXmSQ-","tooltip":"Q1YfFqI71cw-","arrow":"ZP3ev-wT-OI-","top":"jlEmO6f6uHg-","bottom":"z9JQ-DR-QYc-","left":"zWATWgq3bS4-","right":"-tDm6lNCCic-","tooltipMessage":"djrmr4mADlA-","spinning":"bobYmlUMnuY-"};
11
10
 
@@ -122,7 +121,7 @@ function Tooltip({ message, children, preferredPlacement = "top", setTabIndex =
122
121
  activator.removeEventListener("blur", hideTooltip);
123
122
  }
124
123
  };
125
- useSafeLayoutEffect.useSafeLayoutEffect_1(() => {
124
+ jobberHooks.useSafeLayoutEffect(() => {
126
125
  injectAttributes();
127
126
  addListeners();
128
127
  return () => {
@@ -132,7 +131,7 @@ function Tooltip({ message, children, preferredPlacement = "top", setTabIndex =
132
131
  }
133
132
  }
134
133
  function TooltipPortal({ children }) {
135
- const mounted = useIsMounted.useIsMounted_2();
134
+ const mounted = jobberHooks.useIsMounted();
136
135
  if (!(mounted === null || mounted === void 0 ? void 0 : mounted.current)) {
137
136
  return null;
138
137
  }
@@ -1,9 +1,8 @@
1
1
  import React__default, { useRef, useState } from 'react';
2
2
  import classnames from 'classnames';
3
- import { u as useFloating, s as shift, f as flip, a as arrow, b as autoUpdate, l as limitShift, F as FloatingPortal } from './floating-ui.react-es.js';
3
+ import { u as useFloating, d as shift, f as flip, e as arrow, c as autoUpdate, l as limitShift, F as FloatingPortal } from './floating-ui.react-es.js';
4
4
  import { motion } from 'framer-motion';
5
- import { u as useSafeLayoutEffect_1 } from './useSafeLayoutEffect-es.js';
6
- import { u as useIsMounted_2 } from './useIsMounted-es.js';
5
+ import { useSafeLayoutEffect, useIsMounted } from '@jobber/hooks';
7
6
 
8
7
  var styles = {"shadowActivator":"sZQ1M6tj8-c-","tooltipWrapper":"_0o-yEgfXmSQ-","tooltip":"Q1YfFqI71cw-","arrow":"ZP3ev-wT-OI-","top":"jlEmO6f6uHg-","bottom":"z9JQ-DR-QYc-","left":"zWATWgq3bS4-","right":"-tDm6lNCCic-","tooltipMessage":"djrmr4mADlA-","spinning":"bobYmlUMnuY-"};
9
8
 
@@ -120,7 +119,7 @@ function Tooltip({ message, children, preferredPlacement = "top", setTabIndex =
120
119
  activator.removeEventListener("blur", hideTooltip);
121
120
  }
122
121
  };
123
- useSafeLayoutEffect_1(() => {
122
+ useSafeLayoutEffect(() => {
124
123
  injectAttributes();
125
124
  addListeners();
126
125
  return () => {
@@ -130,7 +129,7 @@ function Tooltip({ message, children, preferredPlacement = "top", setTabIndex =
130
129
  }
131
130
  }
132
131
  function TooltipPortal({ children }) {
133
- const mounted = useIsMounted_2();
132
+ const mounted = useIsMounted();
134
133
  if (!(mounted === null || mounted === void 0 ? void 0 : mounted.current)) {
135
134
  return null;
136
135
  }
@@ -1,5 +1,5 @@
1
1
  import { g as _MapCache, d as _Uint8Array, e as eq_1, c as _Stack, a as _isIndex, i as identity_1 } from './identity-es.js';
2
- import { b as _Symbol, a as isObjectLike_1, i as isObject_1 } from './isObjectLike-es.js';
2
+ import { b as _Symbol, i as isObjectLike_1, a as isObject_1 } from './isObjectLike-es.js';
3
3
  import { e as _getAllKeys, k as keys_1, b as _baseGet, f as _castPath, g as _toKey, h as _isKey } from './_baseGet-es.js';
4
4
  import { a as _getTag } from './_getTag-es.js';
5
5
  import { c as isBufferExports, d as isTypedArray_1, a as isArray_1, i as isArguments_1, m as isLength_1, b as isArrayLike_1 } from './isTypedArray-es.js';
@@ -6,31 +6,5 @@ function getDefaultExportFromCjs (x) {
6
6
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
7
7
  }
8
8
 
9
- function getAugmentedNamespace(n) {
10
- if (n.__esModule) return n;
11
- var f = n.default;
12
- if (typeof f == "function") {
13
- var a = function a () {
14
- if (this instanceof a) {
15
- return Reflect.construct(f, arguments, this.constructor);
16
- }
17
- return f.apply(this, arguments);
18
- };
19
- a.prototype = f.prototype;
20
- } else a = {};
21
- Object.defineProperty(a, '__esModule', {value: true});
22
- Object.keys(n).forEach(function (k) {
23
- var d = Object.getOwnPropertyDescriptor(n, k);
24
- Object.defineProperty(a, k, d.get ? d : {
25
- enumerable: true,
26
- get: function () {
27
- return n[k];
28
- }
29
- });
30
- });
31
- return a;
32
- }
33
-
34
9
  exports.commonjsGlobal = commonjsGlobal;
35
- exports.getAugmentedNamespace = getAugmentedNamespace;
36
10
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
@@ -4,29 +4,4 @@ function getDefaultExportFromCjs (x) {
4
4
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
5
5
  }
6
6
 
7
- function getAugmentedNamespace(n) {
8
- if (n.__esModule) return n;
9
- var f = n.default;
10
- if (typeof f == "function") {
11
- var a = function a () {
12
- if (this instanceof a) {
13
- return Reflect.construct(f, arguments, this.constructor);
14
- }
15
- return f.apply(this, arguments);
16
- };
17
- a.prototype = f.prototype;
18
- } else a = {};
19
- Object.defineProperty(a, '__esModule', {value: true});
20
- Object.keys(n).forEach(function (k) {
21
- var d = Object.getOwnPropertyDescriptor(n, k);
22
- Object.defineProperty(a, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () {
25
- return n[k];
26
- }
27
- });
28
- });
29
- return a;
30
- }
31
-
32
- export { getAugmentedNamespace as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
7
+ export { commonjsGlobal as c, getDefaultExportFromCjs as g };
@@ -1,7 +1,7 @@
1
1
  import { i as identity_1, e as eq_1, a as _isIndex } from './identity-es.js';
2
2
  import { _ as _overRest, a as _setToString } from './_setToString-es.js';
3
3
  import { b as isArrayLike_1 } from './isTypedArray-es.js';
4
- import { i as isObject_1 } from './isObjectLike-es.js';
4
+ import { a as isObject_1 } from './isObjectLike-es.js';
5
5
 
6
6
  var identity = identity_1,
7
7
  overRest = _overRest,
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
4
+
5
+ exports.clsx = clsx;
@@ -0,0 +1,3 @@
1
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
2
+
3
+ export { clsx as c };
@@ -1,5 +1,5 @@
1
1
  import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
2
- import { c as _root, i as isObject_1 } from './isObjectLike-es.js';
2
+ import { c as _root, a as isObject_1 } from './isObjectLike-es.js';
3
3
  import { i as isSymbol_1 } from './isSymbol-es.js';
4
4
 
5
5
  var root = _root;
@@ -326,4 +326,4 @@ var debounce_1 = debounce;
326
326
 
327
327
  var debounce$1 = /*@__PURE__*/getDefaultExportFromCjs(debounce_1);
328
328
 
329
- export { debounce$1 as a, debounce_1 as d };
329
+ export { debounce_1 as a, debounce$1 as d };