@jobber/components 6.90.3 → 6.91.0

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 (214) hide show
  1. package/dist/AtlantisThemeContext-es.js +1 -1
  2. package/dist/Autocomplete/index.cjs +12 -15
  3. package/dist/Autocomplete/index.mjs +13 -16
  4. package/dist/Banner/index.cjs +1 -6
  5. package/dist/Banner/index.mjs +1 -6
  6. package/dist/Banner-cjs.js +2 -2
  7. package/dist/Banner-es.js +2 -2
  8. package/dist/Card/index.cjs +1 -4
  9. package/dist/Card/index.mjs +1 -4
  10. package/dist/Chip/index.cjs +1 -3
  11. package/dist/Chip/index.mjs +1 -3
  12. package/dist/Chip-cjs.js +3 -3
  13. package/dist/Chip-es.js +3 -3
  14. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +1 -0
  15. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -0
  16. package/dist/Chips/InternalChipDismissible/index.cjs +1 -3
  17. package/dist/Chips/InternalChipDismissible/index.mjs +1 -3
  18. package/dist/Chips/index.cjs +1 -3
  19. package/dist/Chips/index.mjs +1 -3
  20. package/dist/Combobox/components/ComboboxActivator/index.cjs +1 -3
  21. package/dist/Combobox/components/ComboboxActivator/index.mjs +1 -3
  22. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.cjs +1 -1
  23. package/dist/Combobox/components/ComboboxContent/ComboboxContentList/index.mjs +1 -1
  24. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.cjs +1 -1
  25. package/dist/Combobox/components/ComboboxContent/ComboboxLoadMore/index.mjs +1 -1
  26. package/dist/Combobox/components/ComboboxContent/index.cjs +1 -3
  27. package/dist/Combobox/components/ComboboxContent/index.mjs +1 -3
  28. package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -3
  29. package/dist/Combobox/components/ComboboxTrigger/index.mjs +1 -3
  30. package/dist/Combobox/index.cjs +1 -6
  31. package/dist/Combobox/index.mjs +1 -6
  32. package/dist/Combobox-cjs.js +2 -2
  33. package/dist/Combobox-es.js +2 -2
  34. package/dist/ComboboxContent-cjs.js +3 -4
  35. package/dist/ComboboxContent-es.js +4 -5
  36. package/dist/ComboboxLoadMore-cjs.js +2 -2
  37. package/dist/ComboboxLoadMore-es.js +2 -2
  38. package/dist/ConfirmationModal/index.cjs +1 -3
  39. package/dist/ConfirmationModal/index.mjs +1 -3
  40. package/dist/ConfirmationModal-cjs.js +2 -2
  41. package/dist/ConfirmationModal-es.js +2 -2
  42. package/dist/ContentBlock/index.cjs +1 -6
  43. package/dist/ContentBlock/index.mjs +1 -6
  44. package/dist/ContentBlock-cjs.js +2 -2
  45. package/dist/ContentBlock-es.js +2 -2
  46. package/dist/DataDump/index.cjs +1 -4
  47. package/dist/DataDump/index.mjs +1 -4
  48. package/dist/DataList/components/DataListActions/index.cjs +1 -5
  49. package/dist/DataList/components/DataListActions/index.mjs +1 -5
  50. package/dist/DataList/components/DataListActionsMenu/index.cjs +1 -5
  51. package/dist/DataList/components/DataListActionsMenu/index.mjs +1 -5
  52. package/dist/DataList/components/DataListBulkActions/index.cjs +1 -5
  53. package/dist/DataList/components/DataListBulkActions/index.mjs +1 -5
  54. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -6
  55. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -6
  56. package/dist/DataList/components/DataListFilters/index.cjs +1 -7
  57. package/dist/DataList/components/DataListFilters/index.mjs +1 -7
  58. package/dist/DataList/components/DataListHeader/index.cjs +1 -5
  59. package/dist/DataList/components/DataListHeader/index.mjs +1 -5
  60. package/dist/DataList/components/DataListHeaderTile/components/index.cjs +1 -2
  61. package/dist/DataList/components/DataListHeaderTile/components/index.mjs +1 -2
  62. package/dist/DataList/components/DataListHeaderTile/index.cjs +1 -3
  63. package/dist/DataList/components/DataListHeaderTile/index.mjs +1 -3
  64. package/dist/DataList/components/DataListItem/index.cjs +1 -5
  65. package/dist/DataList/components/DataListItem/index.mjs +1 -5
  66. package/dist/DataList/components/DataListItemActions/index.cjs +1 -5
  67. package/dist/DataList/components/DataListItemActions/index.mjs +1 -5
  68. package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +1 -5
  69. package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +1 -5
  70. package/dist/DataList/components/DataListItems/index.cjs +1 -5
  71. package/dist/DataList/components/DataListItems/index.mjs +1 -5
  72. package/dist/DataList/components/DataListLayout/index.cjs +1 -5
  73. package/dist/DataList/components/DataListLayout/index.mjs +1 -5
  74. package/dist/DataList/components/DataListLayoutActions/index.cjs +1 -5
  75. package/dist/DataList/components/DataListLayoutActions/index.mjs +1 -5
  76. package/dist/DataList/components/DataListLoadMore/index.cjs +1 -1
  77. package/dist/DataList/components/DataListLoadMore/index.mjs +1 -1
  78. package/dist/DataList/components/DataListOverflowFade/index.cjs +1 -1
  79. package/dist/DataList/components/DataListOverflowFade/index.mjs +1 -1
  80. package/dist/DataList/components/DataListSearch/index.cjs +1 -2
  81. package/dist/DataList/components/DataListSearch/index.mjs +1 -2
  82. package/dist/DataList/components/DataListStatusBar/index.cjs +1 -3
  83. package/dist/DataList/components/DataListStatusBar/index.mjs +1 -3
  84. package/dist/DataList/index.cjs +1 -7
  85. package/dist/DataList/index.mjs +1 -7
  86. package/dist/DataListActionsMenu-cjs.js +5 -8
  87. package/dist/DataListActionsMenu-es.js +5 -8
  88. package/dist/DataListHeaderTile-cjs.js +2 -2
  89. package/dist/DataListHeaderTile-es.js +2 -2
  90. package/dist/DataListLoadMore-cjs.js +2 -2
  91. package/dist/DataListLoadMore-es.js +2 -2
  92. package/dist/DataListOverflowFade-cjs.js +3 -3
  93. package/dist/DataListOverflowFade-es.js +3 -3
  94. package/dist/DataListSearch-cjs.js +2 -2
  95. package/dist/DataListSearch-es.js +2 -2
  96. package/dist/DataListSortingOptions-cjs.js +3 -4
  97. package/dist/DataListSortingOptions-es.js +3 -4
  98. package/dist/DataTable/index.cjs +4 -6
  99. package/dist/DataTable/index.mjs +4 -6
  100. package/dist/DataTable/test-utilities/index.cjs +1 -7
  101. package/dist/DataTable/test-utilities/index.mjs +1 -7
  102. package/dist/DataTable-cjs.js +4 -4
  103. package/dist/DataTable-es.js +4 -4
  104. package/dist/DatePicker/index.cjs +1 -1
  105. package/dist/DatePicker/index.mjs +1 -1
  106. package/dist/DatePicker-cjs.js +2 -2
  107. package/dist/DatePicker-es.js +3 -3
  108. package/dist/Disclosure/index.cjs +1 -6
  109. package/dist/Disclosure/index.mjs +1 -6
  110. package/dist/Disclosure-cjs.js +3 -3
  111. package/dist/Disclosure-es.js +3 -3
  112. package/dist/FormField/FormFieldWrapper.d.ts +1 -1
  113. package/dist/FormField/index.cjs +1 -0
  114. package/dist/FormField/index.mjs +1 -0
  115. package/dist/FormField-cjs.js +2 -21
  116. package/dist/FormField-es.js +2 -21
  117. package/dist/FormatFile/index.cjs +1 -3
  118. package/dist/FormatFile/index.mjs +1 -3
  119. package/dist/Gallery/index.cjs +1 -6
  120. package/dist/Gallery/index.mjs +1 -6
  121. package/dist/InputDate/index.cjs +1 -2
  122. package/dist/InputDate/index.mjs +1 -2
  123. package/dist/InputEmail/index.cjs +1 -0
  124. package/dist/InputEmail/index.mjs +1 -0
  125. package/dist/InputNumber/index.cjs +1 -0
  126. package/dist/InputNumber/index.mjs +1 -0
  127. package/dist/InputPassword/index.cjs +1 -0
  128. package/dist/InputPassword/index.mjs +1 -0
  129. package/dist/InputPassword-cjs.js +1 -0
  130. package/dist/InputPassword-es.js +1 -0
  131. package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +1 -1
  132. package/dist/InputPhoneNumber/index.cjs +1 -0
  133. package/dist/InputPhoneNumber/index.mjs +1 -0
  134. package/dist/InputText/InputText.d.ts +2 -2
  135. package/dist/InputText/index.cjs +3 -3
  136. package/dist/InputText/index.mjs +3 -3
  137. package/dist/InputTime/index.cjs +1 -0
  138. package/dist/InputTime/index.mjs +2 -1
  139. package/dist/InternalChipDismissible-cjs.js +1 -0
  140. package/dist/InternalChipDismissible-es.js +1 -0
  141. package/dist/LightBox/index.cjs +1 -6
  142. package/dist/LightBox/index.mjs +1 -6
  143. package/dist/LightBox-cjs.js +12 -74
  144. package/dist/LightBox-es.js +12 -74
  145. package/dist/Menu/index.cjs +1 -4
  146. package/dist/Menu/index.mjs +1 -4
  147. package/dist/Menu-cjs.js +5 -37
  148. package/dist/Menu-es.js +6 -38
  149. package/dist/Modal/Modal.rebuilt.d.ts +1 -1
  150. package/dist/Modal/index.cjs +24 -22
  151. package/dist/Modal/index.mjs +25 -23
  152. package/dist/Page/index.cjs +2 -10
  153. package/dist/Page/index.mjs +2 -10
  154. package/dist/Page-cjs.js +5 -5
  155. package/dist/Page-es.js +5 -5
  156. package/dist/Popover/index.cjs +1 -1
  157. package/dist/Popover/index.mjs +1 -1
  158. package/dist/Popover-cjs.js +2 -2
  159. package/dist/Popover-es.js +3 -3
  160. package/dist/RecurringSelect/index.cjs +1 -0
  161. package/dist/RecurringSelect/index.mjs +1 -0
  162. package/dist/Select/index.cjs +1 -0
  163. package/dist/Select/index.mjs +1 -0
  164. package/dist/SideDrawer/index.cjs +1 -5
  165. package/dist/SideDrawer/index.mjs +1 -5
  166. package/dist/SideDrawer-cjs.js +7 -10
  167. package/dist/SideDrawer-es.js +7 -10
  168. package/dist/Tabs/index.cjs +0 -1
  169. package/dist/Tabs/index.mjs +0 -1
  170. package/dist/Tabs-cjs.js +76 -2
  171. package/dist/Tabs-es.js +76 -2
  172. package/dist/Tooltip/index.cjs +1 -2
  173. package/dist/Tooltip/index.mjs +1 -2
  174. package/dist/Tooltip-cjs.js +3 -4
  175. package/dist/Tooltip-es.js +4 -5
  176. package/dist/_baseEach-es.js +1 -1
  177. package/dist/_commonjsHelpers-cjs.js +0 -26
  178. package/dist/_commonjsHelpers-es.js +1 -26
  179. package/dist/_isIterateeCall-es.js +1 -1
  180. package/dist/debounce-es.js +2 -2
  181. package/dist/floating-ui.react-cjs.js +0 -118
  182. package/dist/floating-ui.react-es.js +1 -118
  183. package/dist/helpers-cjs.js +21 -2
  184. package/dist/helpers-es.js +1 -1
  185. package/dist/index.cjs +1 -9
  186. package/dist/index.mjs +1 -9
  187. package/dist/isObjectLike-es.js +1 -1
  188. package/dist/isSymbol-es.js +1 -1
  189. package/dist/isTypedArray-es.js +1 -1
  190. package/dist/keysIn-es.js +1 -1
  191. package/dist/omit-es.js +1 -1
  192. package/dist/styles.css +8 -7
  193. package/dist/useScrollToActive-cjs.js +3 -45
  194. package/dist/useScrollToActive-es.js +5 -47
  195. package/package.json +3 -3
  196. package/rollup.config.mjs +0 -15
  197. package/dist/throttle-cjs.js +0 -80
  198. package/dist/throttle-es.js +0 -77
  199. package/dist/useDebounce-cjs.js +0 -4416
  200. package/dist/useDebounce-es.js +0 -4413
  201. package/dist/useFocusTrap-cjs.js +0 -75
  202. package/dist/useFocusTrap-es.js +0 -73
  203. package/dist/useInView-cjs.js +0 -26
  204. package/dist/useInView-es.js +0 -24
  205. package/dist/useIsMounted-cjs.js +0 -51
  206. package/dist/useIsMounted-es.js +0 -49
  207. package/dist/useOnKeyDown-cjs.js +0 -41
  208. package/dist/useOnKeyDown-es.js +0 -39
  209. package/dist/useRefocusOnActivator-cjs.js +0 -33
  210. package/dist/useRefocusOnActivator-es.js +0 -31
  211. package/dist/useResizeObserver-cjs.js +0 -1131
  212. package/dist/useResizeObserver-es.js +0 -1128
  213. package/dist/useSafeLayoutEffect-cjs.js +0 -14
  214. package/dist/useSafeLayoutEffect-es.js +0 -12
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();
@@ -6,8 +6,7 @@ require('classnames');
6
6
  require('../floating-ui.react-cjs.js');
7
7
  require('react-dom');
8
8
  require('framer-motion');
9
- require('../useSafeLayoutEffect-cjs.js');
10
- require('../useIsMounted-cjs.js');
9
+ require('@jobber/hooks');
11
10
 
12
11
 
13
12
 
@@ -4,5 +4,4 @@ import 'classnames';
4
4
  import '../floating-ui.react-es.js';
5
5
  import 'react-dom';
6
6
  import 'framer-motion';
7
- import '../useSafeLayoutEffect-es.js';
8
- import '../useIsMounted-es.js';
7
+ import '@jobber/hooks';
@@ -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,
@@ -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 };
@@ -1064,15 +1064,6 @@ function isVirtualPointerEvent(event) {
1064
1064
  // iOS VoiceOver returns 0.333• for width/height.
1065
1065
  event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
1066
1066
  }
1067
- function isMouseLikePointerType(pointerType, strict) {
1068
- // On some Linux machines with Chromium, mouse inputs return a `pointerType`
1069
- // of "pen": https://github.com/floating-ui/floating-ui/issues/2015
1070
- const values = ['mouse', 'pen'];
1071
- if (!strict) {
1072
- values.push('', undefined);
1073
- }
1074
- return values.includes(pointerType);
1075
- }
1076
1067
 
1077
1068
  var isClient$1 = typeof document !== 'undefined';
1078
1069
 
@@ -5924,114 +5915,6 @@ const FloatingOverlay = /*#__PURE__*/React__namespace.forwardRef(function Floati
5924
5915
  });
5925
5916
  });
5926
5917
 
5927
- function isButtonTarget(event) {
5928
- return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';
5929
- }
5930
- function isAnchorTarget(event) {
5931
- return isHTMLElement(event.target) && event.target.tagName === 'A';
5932
- }
5933
- function isSpaceIgnored(element) {
5934
- return isTypeableElement(element);
5935
- }
5936
- /**
5937
- * Opens or closes the floating element when clicking the reference element.
5938
- * @see https://floating-ui.com/docs/useClick
5939
- */
5940
- function useClick(context, props) {
5941
- if (props === void 0) {
5942
- props = {};
5943
- }
5944
- const {
5945
- open,
5946
- onOpenChange,
5947
- dataRef,
5948
- elements: {
5949
- domReference
5950
- }
5951
- } = context;
5952
- const {
5953
- enabled = true,
5954
- event: eventOption = 'click',
5955
- toggle = true,
5956
- ignoreMouse = false,
5957
- keyboardHandlers = true,
5958
- stickIfOpen = true
5959
- } = props;
5960
- const pointerTypeRef = React__namespace.useRef();
5961
- const didKeyDownRef = React__namespace.useRef(false);
5962
- const reference = React__namespace.useMemo(() => ({
5963
- onPointerDown(event) {
5964
- pointerTypeRef.current = event.pointerType;
5965
- },
5966
- onMouseDown(event) {
5967
- const pointerType = pointerTypeRef.current;
5968
-
5969
- // Ignore all buttons except for the "main" button.
5970
- // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
5971
- if (event.button !== 0) return;
5972
- if (eventOption === 'click') return;
5973
- if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;
5974
- if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {
5975
- onOpenChange(false, event.nativeEvent, 'click');
5976
- } else {
5977
- // Prevent stealing focus from the floating element
5978
- event.preventDefault();
5979
- onOpenChange(true, event.nativeEvent, 'click');
5980
- }
5981
- },
5982
- onClick(event) {
5983
- const pointerType = pointerTypeRef.current;
5984
- if (eventOption === 'mousedown' && pointerTypeRef.current) {
5985
- pointerTypeRef.current = undefined;
5986
- return;
5987
- }
5988
- if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;
5989
- if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {
5990
- onOpenChange(false, event.nativeEvent, 'click');
5991
- } else {
5992
- onOpenChange(true, event.nativeEvent, 'click');
5993
- }
5994
- },
5995
- onKeyDown(event) {
5996
- pointerTypeRef.current = undefined;
5997
- if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {
5998
- return;
5999
- }
6000
- if (event.key === ' ' && !isSpaceIgnored(domReference)) {
6001
- // Prevent scrolling
6002
- event.preventDefault();
6003
- didKeyDownRef.current = true;
6004
- }
6005
- if (isAnchorTarget(event)) {
6006
- return;
6007
- }
6008
- if (event.key === 'Enter') {
6009
- if (open && toggle) {
6010
- onOpenChange(false, event.nativeEvent, 'click');
6011
- } else {
6012
- onOpenChange(true, event.nativeEvent, 'click');
6013
- }
6014
- }
6015
- },
6016
- onKeyUp(event) {
6017
- if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {
6018
- return;
6019
- }
6020
- if (event.key === ' ' && didKeyDownRef.current) {
6021
- didKeyDownRef.current = false;
6022
- if (open && toggle) {
6023
- onOpenChange(false, event.nativeEvent, 'click');
6024
- } else {
6025
- onOpenChange(true, event.nativeEvent, 'click');
6026
- }
6027
- }
6028
- }
6029
- }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);
6030
- return React__namespace.useMemo(() => enabled ? {
6031
- reference
6032
- } : {}, [enabled, reference]);
6033
- }
6034
-
6035
5918
  const bubbleHandlerKeys = {
6036
5919
  pointerdown: 'onPointerDown',
6037
5920
  mousedown: 'onMouseDown',
@@ -7413,7 +7296,6 @@ exports.limitShift = limitShift;
7413
7296
  exports.offset = offset;
7414
7297
  exports.shift = shift;
7415
7298
  exports.size = size;
7416
- exports.useClick = useClick;
7417
7299
  exports.useDismiss = useDismiss;
7418
7300
  exports.useFloating = useFloating;
7419
7301
  exports.useFloatingNodeId = useFloatingNodeId;
@@ -1043,15 +1043,6 @@ function isVirtualPointerEvent(event) {
1043
1043
  // iOS VoiceOver returns 0.333• for width/height.
1044
1044
  event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
1045
1045
  }
1046
- function isMouseLikePointerType(pointerType, strict) {
1047
- // On some Linux machines with Chromium, mouse inputs return a `pointerType`
1048
- // of "pen": https://github.com/floating-ui/floating-ui/issues/2015
1049
- const values = ['mouse', 'pen'];
1050
- if (!strict) {
1051
- values.push('', undefined);
1052
- }
1053
- return values.includes(pointerType);
1054
- }
1055
1046
 
1056
1047
  var isClient$1 = typeof document !== 'undefined';
1057
1048
 
@@ -5903,114 +5894,6 @@ const FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(p
5903
5894
  });
5904
5895
  });
5905
5896
 
5906
- function isButtonTarget(event) {
5907
- return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';
5908
- }
5909
- function isAnchorTarget(event) {
5910
- return isHTMLElement(event.target) && event.target.tagName === 'A';
5911
- }
5912
- function isSpaceIgnored(element) {
5913
- return isTypeableElement(element);
5914
- }
5915
- /**
5916
- * Opens or closes the floating element when clicking the reference element.
5917
- * @see https://floating-ui.com/docs/useClick
5918
- */
5919
- function useClick(context, props) {
5920
- if (props === void 0) {
5921
- props = {};
5922
- }
5923
- const {
5924
- open,
5925
- onOpenChange,
5926
- dataRef,
5927
- elements: {
5928
- domReference
5929
- }
5930
- } = context;
5931
- const {
5932
- enabled = true,
5933
- event: eventOption = 'click',
5934
- toggle = true,
5935
- ignoreMouse = false,
5936
- keyboardHandlers = true,
5937
- stickIfOpen = true
5938
- } = props;
5939
- const pointerTypeRef = React.useRef();
5940
- const didKeyDownRef = React.useRef(false);
5941
- const reference = React.useMemo(() => ({
5942
- onPointerDown(event) {
5943
- pointerTypeRef.current = event.pointerType;
5944
- },
5945
- onMouseDown(event) {
5946
- const pointerType = pointerTypeRef.current;
5947
-
5948
- // Ignore all buttons except for the "main" button.
5949
- // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
5950
- if (event.button !== 0) return;
5951
- if (eventOption === 'click') return;
5952
- if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;
5953
- if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {
5954
- onOpenChange(false, event.nativeEvent, 'click');
5955
- } else {
5956
- // Prevent stealing focus from the floating element
5957
- event.preventDefault();
5958
- onOpenChange(true, event.nativeEvent, 'click');
5959
- }
5960
- },
5961
- onClick(event) {
5962
- const pointerType = pointerTypeRef.current;
5963
- if (eventOption === 'mousedown' && pointerTypeRef.current) {
5964
- pointerTypeRef.current = undefined;
5965
- return;
5966
- }
5967
- if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;
5968
- if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {
5969
- onOpenChange(false, event.nativeEvent, 'click');
5970
- } else {
5971
- onOpenChange(true, event.nativeEvent, 'click');
5972
- }
5973
- },
5974
- onKeyDown(event) {
5975
- pointerTypeRef.current = undefined;
5976
- if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {
5977
- return;
5978
- }
5979
- if (event.key === ' ' && !isSpaceIgnored(domReference)) {
5980
- // Prevent scrolling
5981
- event.preventDefault();
5982
- didKeyDownRef.current = true;
5983
- }
5984
- if (isAnchorTarget(event)) {
5985
- return;
5986
- }
5987
- if (event.key === 'Enter') {
5988
- if (open && toggle) {
5989
- onOpenChange(false, event.nativeEvent, 'click');
5990
- } else {
5991
- onOpenChange(true, event.nativeEvent, 'click');
5992
- }
5993
- }
5994
- },
5995
- onKeyUp(event) {
5996
- if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {
5997
- return;
5998
- }
5999
- if (event.key === ' ' && didKeyDownRef.current) {
6000
- didKeyDownRef.current = false;
6001
- if (open && toggle) {
6002
- onOpenChange(false, event.nativeEvent, 'click');
6003
- } else {
6004
- onOpenChange(true, event.nativeEvent, 'click');
6005
- }
6006
- }
6007
- }
6008
- }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);
6009
- return React.useMemo(() => enabled ? {
6010
- reference
6011
- } : {}, [enabled, reference]);
6012
- }
6013
-
6014
5897
  const bubbleHandlerKeys = {
6015
5898
  pointerdown: 'onPointerDown',
6016
5899
  mousedown: 'onMouseDown',
@@ -7378,4 +7261,4 @@ function useTransitionStyles(context, props) {
7378
7261
  };
7379
7262
  }
7380
7263
 
7381
- export { FloatingPortal as F, arrow as a, autoUpdate as b, useDismiss as c, useInteractions as d, size as e, flip as f, useFloatingParentNodeId as g, useFloatingNodeId as h, FloatingTree as i, FloatingNode as j, autoPlacement as k, limitShift as l, useClick as m, useRole as n, offset as o, FloatingOverlay as p, FloatingFocusManager as q, useListNavigation as r, shift as s, useTransitionStyles as t, useFloating as u, FloatingArrow as v };
7264
+ export { FloatingPortal as F, useDismiss as a, useInteractions as b, autoUpdate as c, shift as d, arrow as e, flip as f, useFloatingParentNodeId as g, useFloatingNodeId as h, FloatingTree as i, FloatingNode as j, autoPlacement as k, limitShift as l, useRole as m, FloatingFocusManager as n, offset as o, FloatingOverlay as p, useListNavigation as q, useTransitionStyles as r, size as s, FloatingArrow as t, useFloating as u };
@@ -1,9 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var useResizeObserver = require('./useResizeObserver-cjs.js');
3
+ var jobberHooks = require('@jobber/hooks');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var jobberHooks__namespace = /*#__PURE__*/_interopNamespaceDefault(jobberHooks);
4
23
 
5
24
  const mockContainerWidth = (exactWidth) => {
6
- jest.spyOn(useResizeObserver.jobberHooks, "useResizeObserver").mockReturnValue([
25
+ jest.spyOn(jobberHooks__namespace, "useResizeObserver").mockReturnValue([
7
26
  { current: null },
8
27
  {
9
28
  width: 1200,
@@ -1,4 +1,4 @@
1
- import { j as jobberHooks } from './useResizeObserver-es.js';
1
+ import * as jobberHooks from '@jobber/hooks';
2
2
 
3
3
  const mockContainerWidth = (exactWidth) => {
4
4
  jest.spyOn(jobberHooks, "useResizeObserver").mockReturnValue([
package/dist/index.cjs CHANGED
@@ -30,7 +30,7 @@ var Countdown = require('./Countdown-cjs.js');
30
30
  var DataDump = require('./DataDump-cjs.js');
31
31
  var DataList = require('./DataList-cjs.js');
32
32
  var DataTable = require('./DataTable-cjs.js');
33
- require('./useResizeObserver-cjs.js');
33
+ require('@jobber/hooks');
34
34
  require('./DataTableTable-cjs.js');
35
35
  var reactTable = require('@tanstack/react-table');
36
36
  var DatePicker = require('./DatePicker-cjs.js');
@@ -110,17 +110,12 @@ require('./_setToString-cjs.js');
110
110
  require('./floating-ui.react-cjs.js');
111
111
  require('react-dom');
112
112
  require('classnames');
113
- require('./useDebounce-cjs.js');
114
113
  require('./maxHeight-cjs.js');
115
114
  require('./tslib.es6-cjs.js');
116
- require('./useIsMounted-cjs.js');
117
- require('./useSafeLayoutEffect-cjs.js');
118
- require('./useOnKeyDown-cjs.js');
119
115
  require('color');
120
116
  require('react-router-dom');
121
117
  require('./getMappedAtlantisSpaceToken-cjs.js');
122
118
  require('react-hook-form');
123
- require('./useInView-cjs.js');
124
119
  require('./useChildComponent-cjs.js');
125
120
  require('./InternalChipDismissible-cjs.js');
126
121
  require('./useScrollToActive-cjs.js');
@@ -136,8 +131,6 @@ require('./ComboboxContentList-cjs.js');
136
131
  require('./ComboboxOption-cjs.js');
137
132
  require('./ComboboxLoadMore-cjs.js');
138
133
  require('./ComboboxContentHeader-cjs.js');
139
- require('./useRefocusOnActivator-cjs.js');
140
- require('./useFocusTrap-cjs.js');
141
134
  require('./constants-cjs.js');
142
135
  require('./ComboboxAction-cjs.js');
143
136
  require('./ComboboxTrigger-cjs.js');
@@ -178,7 +171,6 @@ require('./DataListLoadMore-cjs.js');
178
171
  require('./DataListAction-cjs.js');
179
172
  require('./DataListLayoutActions-cjs.js');
180
173
  require('./DataListStatusBar-cjs.js');
181
- require('./throttle-cjs.js');
182
174
  require('./clsx-cjs.js');
183
175
  require('./omit-cjs.js');
184
176
  require('./useFormFieldFocus-cjs.js');
package/dist/index.mjs CHANGED
@@ -28,7 +28,7 @@ export { C as Countdown } from './Countdown-es.js';
28
28
  export { D as DataDump } from './DataDump-es.js';
29
29
  export { D as DataList } from './DataList-es.js';
30
30
  export { D as DataTable } from './DataTable-es.js';
31
- import './useResizeObserver-es.js';
31
+ import '@jobber/hooks';
32
32
  import './DataTableTable-es.js';
33
33
  export { createColumnHelper } from '@tanstack/react-table';
34
34
  export { D as DatePicker } from './DatePicker-es.js';
@@ -108,17 +108,12 @@ import './_setToString-es.js';
108
108
  import './floating-ui.react-es.js';
109
109
  import 'react-dom';
110
110
  import 'classnames';
111
- import './useDebounce-es.js';
112
111
  import './maxHeight-es.js';
113
112
  import './tslib.es6-es.js';
114
- import './useIsMounted-es.js';
115
- import './useSafeLayoutEffect-es.js';
116
- import './useOnKeyDown-es.js';
117
113
  import 'color';
118
114
  import 'react-router-dom';
119
115
  import './getMappedAtlantisSpaceToken-es.js';
120
116
  import 'react-hook-form';
121
- import './useInView-es.js';
122
117
  import './useChildComponent-es.js';
123
118
  import './InternalChipDismissible-es.js';
124
119
  import './useScrollToActive-es.js';
@@ -134,8 +129,6 @@ import './ComboboxContentList-es.js';
134
129
  import './ComboboxOption-es.js';
135
130
  import './ComboboxLoadMore-es.js';
136
131
  import './ComboboxContentHeader-es.js';
137
- import './useRefocusOnActivator-es.js';
138
- import './useFocusTrap-es.js';
139
132
  import './constants-es.js';
140
133
  import './ComboboxAction-es.js';
141
134
  import './ComboboxTrigger-es.js';
@@ -176,7 +169,6 @@ import './DataListLoadMore-es.js';
176
169
  import './DataListAction-es.js';
177
170
  import './DataListLayoutActions-es.js';
178
171
  import './DataListStatusBar-es.js';
179
- import './throttle-es.js';
180
172
  import './clsx-es.js';
181
173
  import './omit-es.js';
182
174
  import './useFormFieldFocus-es.js';