@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
@@ -14,7 +14,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
14
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
15
  PERFORMANCE OF THIS SOFTWARE.
16
16
  ***************************************************************************** */
17
- /* global Reflect, Promise, SuppressedError, Symbol */
17
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
18
18
 
19
19
 
20
20
  function __rest(s, e) {
@@ -40,8 +40,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
40
40
  }
41
41
 
42
42
  function __generator(thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -12,7 +12,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
13
  PERFORMANCE OF THIS SOFTWARE.
14
14
  ***************************************************************************** */
15
- /* global Reflect, Promise, SuppressedError, Symbol */
15
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
16
16
 
17
17
 
18
18
  function __rest(s, e) {
@@ -38,8 +38,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
38
38
  }
39
39
 
40
40
  function __generator(thisArg, body) {
41
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
42
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
41
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
42
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
43
  function verb(n) { return function (v) { return step([n, v]); }; }
44
44
  function step(op) {
45
45
  if (f) throw new TypeError("Generator is already executing.");
@@ -9,6 +9,7 @@ var isTypedArray = require('./isTypedArray-cjs.js');
9
9
  var isSymbol$1 = require('./isSymbol-cjs.js');
10
10
  var identity$1 = require('./identity-cjs.js');
11
11
  var _isIterateeCall = require('./_isIterateeCall-cjs.js');
12
+ var jobberHooks = require('@jobber/hooks');
12
13
  var debounce = require('./debounce-cjs.js');
13
14
  var Icon = require('./Icon-cjs.js');
14
15
  var floatingUi_react = require('./floating-ui.react-cjs.js');
@@ -248,49 +249,6 @@ var sortBy_1 = sortBy;
248
249
 
249
250
  var sortBy$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(sortBy_1);
250
251
 
251
- var useLiveAnnounce$1 = {};
252
-
253
- Object.defineProperty(useLiveAnnounce$1, "__esModule", { value: true });
254
- var useLiveAnnounce_2 = useLiveAnnounce$1.useLiveAnnounce = useLiveAnnounce;
255
- const react_1 = React;
256
- /**
257
- * Announce a message on voice over whenever you do an action. This is
258
- * especially helpful when you have an action that adds or deletes an element
259
- * from the screen.
260
- */
261
- function useLiveAnnounce() {
262
- const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
263
- (0, react_1.useEffect)(() => {
264
- let target;
265
- if (announcedMessage) {
266
- target = createAnnouncedElement();
267
- setTimeout(() => target.append(announcedMessage), 100);
268
- }
269
- return () => target === null || target === void 0 ? void 0 : target.remove();
270
- }, [announcedMessage]);
271
- return {
272
- liveAnnounce: (message) => {
273
- setAnnouncedMessage(message);
274
- },
275
- };
276
- }
277
- // eslint-disable-next-line max-statements
278
- function createAnnouncedElement() {
279
- const el = document.createElement("div");
280
- el.style.position = "absolute";
281
- el.style.width = "1px";
282
- el.style.height = "1px";
283
- el.style.overflow = "hidden";
284
- el.style.clipPath = " inset(100%)";
285
- el.style.whiteSpace = " nowrap";
286
- el.style.top = "0";
287
- el.setAttribute("role", "status");
288
- el.setAttribute("aria-atomic", "true");
289
- el.setAttribute("aria-live", "assertive");
290
- document.body.appendChild(el);
291
- return el;
292
- }
293
-
294
252
  /**
295
253
  * Recursively finds a focusable element (div or button) in the specified direction
296
254
  */
@@ -316,7 +274,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
316
274
  const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
317
275
  const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
318
276
  const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
319
- const { liveAnnounce } = useLiveAnnounce_2();
277
+ const { liveAnnounce } = jobberHooks.useLiveAnnounce();
320
278
  const actions = {
321
279
  handleChipRemove: (value) => {
322
280
  return () => {
@@ -386,7 +344,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
386
344
  const [shouldCancelEnter, setShouldCancelEnter] = React.useState(false);
387
345
  const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
388
346
  const maxOptionIndex = allOptions.length - 1;
389
- const { liveAnnounce } = useLiveAnnounce_2();
347
+ const { liveAnnounce } = jobberHooks.useLiveAnnounce();
390
348
  React.useEffect(() => {
391
349
  setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
392
350
  }, [options]);
@@ -7,9 +7,10 @@ import { b as isArrayLike_1, k as _baseUnary, a as isArray_1 } from './isTypedAr
7
7
  import { i as isSymbol_1 } from './isSymbol-es.js';
8
8
  import { i as identity_1 } from './identity-es.js';
9
9
  import { _ as _baseRest, a as _isIterateeCall } from './_isIterateeCall-es.js';
10
- import { a as debounce } from './debounce-es.js';
10
+ import { useLiveAnnounce } from '@jobber/hooks';
11
+ import { d as debounce } from './debounce-es.js';
11
12
  import { I as Icon } from './Icon-es.js';
12
- import { u as useFloating, o as offset, f as flip, e as size, b as autoUpdate } from './floating-ui.react-es.js';
13
+ import { u as useFloating, o as offset, f as flip, s as size, c as autoUpdate } from './floating-ui.react-es.js';
13
14
  import { c as calculateMaxHeight } from './maxHeight-es.js';
14
15
 
15
16
  var baseEach = _baseEach,
@@ -246,49 +247,6 @@ var sortBy_1 = sortBy;
246
247
 
247
248
  var sortBy$1 = /*@__PURE__*/getDefaultExportFromCjs(sortBy_1);
248
249
 
249
- var useLiveAnnounce$1 = {};
250
-
251
- Object.defineProperty(useLiveAnnounce$1, "__esModule", { value: true });
252
- var useLiveAnnounce_2 = useLiveAnnounce$1.useLiveAnnounce = useLiveAnnounce;
253
- const react_1 = React__default;
254
- /**
255
- * Announce a message on voice over whenever you do an action. This is
256
- * especially helpful when you have an action that adds or deletes an element
257
- * from the screen.
258
- */
259
- function useLiveAnnounce() {
260
- const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
261
- (0, react_1.useEffect)(() => {
262
- let target;
263
- if (announcedMessage) {
264
- target = createAnnouncedElement();
265
- setTimeout(() => target.append(announcedMessage), 100);
266
- }
267
- return () => target === null || target === void 0 ? void 0 : target.remove();
268
- }, [announcedMessage]);
269
- return {
270
- liveAnnounce: (message) => {
271
- setAnnouncedMessage(message);
272
- },
273
- };
274
- }
275
- // eslint-disable-next-line max-statements
276
- function createAnnouncedElement() {
277
- const el = document.createElement("div");
278
- el.style.position = "absolute";
279
- el.style.width = "1px";
280
- el.style.height = "1px";
281
- el.style.overflow = "hidden";
282
- el.style.clipPath = " inset(100%)";
283
- el.style.whiteSpace = " nowrap";
284
- el.style.top = "0";
285
- el.setAttribute("role", "status");
286
- el.setAttribute("aria-atomic", "true");
287
- el.setAttribute("aria-live", "assertive");
288
- document.body.appendChild(el);
289
- return el;
290
- }
291
-
292
250
  /**
293
251
  * Recursively finds a focusable element (div or button) in the specified direction
294
252
  */
@@ -314,7 +272,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
314
272
  const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
315
273
  const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
316
274
  const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
317
- const { liveAnnounce } = useLiveAnnounce_2();
275
+ const { liveAnnounce } = useLiveAnnounce();
318
276
  const actions = {
319
277
  handleChipRemove: (value) => {
320
278
  return () => {
@@ -384,7 +342,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
384
342
  const [shouldCancelEnter, setShouldCancelEnter] = useState(false);
385
343
  const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
386
344
  const maxOptionIndex = allOptions.length - 1;
387
- const { liveAnnounce } = useLiveAnnounce_2();
345
+ const { liveAnnounce } = useLiveAnnounce();
388
346
  useEffect(() => {
389
347
  setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
390
348
  }, [options]);
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Test utility for mocking a large viewport using Jest spies
3
+ * This is useful for testing components that use floating-ui and
4
+ * have flip middleware.
5
+ */
6
+ interface ViewportMock {
7
+ restore: () => void;
8
+ }
9
+ /**
10
+ * Mocks a large viewport (2000x2000) for testing tooltips and popovers
11
+ * that need sufficient space for positioning.
12
+ *
13
+ * @returns Object with restore method for cleanup
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * describe("with a preferred placement", () => {
18
+ * let viewportMock: ReturnType<typeof mockLargeViewport>;
19
+ *
20
+ * beforeEach(() => {
21
+ * viewportMock = mockLargeViewport();
22
+ * });
23
+ *
24
+ * afterEach(() => {
25
+ * viewportMock.restore();
26
+ * });
27
+ *
28
+ * // tests...
29
+ * });
30
+ * ```
31
+ */
32
+ export declare function mockLargeViewport(): ViewportMock;
33
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.85.2",
3
+ "version": "6.85.3-CLEANUPre-6d043f4.28+6d043f490",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -462,7 +462,7 @@
462
462
  "prepack": "npm run entryPoints:build",
463
463
  "postpack": "npm run entryPoints:clean",
464
464
  "storybook": "storybook dev -p 6007 --disable-telemetry",
465
- "build-storybook": "storybook build --disable-telemetry"
465
+ "storybook:build": "storybook build --disable-telemetry"
466
466
  },
467
467
  "files": [
468
468
  "*.js",
@@ -473,25 +473,24 @@
473
473
  ],
474
474
  "dependencies": {
475
475
  "@floating-ui/react": "^0.27.5",
476
- "@jobber/formatters": "^0.4.0",
476
+ "@jobber/formatters": "^0.4.1-CLEANUPre-6d043f4.476+6d043f490",
477
477
  "@tanstack/react-table": "8.5.13",
478
478
  "@types/color": "^3.0.1",
479
479
  "@types/lodash": "^4.14.136",
480
- "@types/react-datepicker": "^4.8.0",
481
480
  "@types/react-router": "5.1.7",
482
481
  "@types/react-router-dom": "^5.3.3",
483
482
  "axios": "^1.11.0",
484
483
  "classnames": "^2.3.2",
485
484
  "color": "^3.1.2",
486
485
  "filesize": "^6.1.0",
487
- "framer-motion": "^11.0.3",
486
+ "framer-motion": "^11.11.12",
488
487
  "lodash": "^4.17.21",
489
- "react-aria-components": "^1.7.1",
488
+ "react-aria-components": "^1.11.0",
490
489
  "react-countdown": "^2.3.2",
491
- "react-datepicker": "~4.10.0",
490
+ "react-datepicker": "^8.7.0",
492
491
  "react-dropzone": "^11.0.2",
493
- "react-hook-form": "^7.43.7",
494
- "react-markdown": "^8.0.3",
492
+ "react-hook-form": "^7.52.0",
493
+ "react-markdown": "^10.1.0",
495
494
  "react-router-dom": "^5.3.4",
496
495
  "ts-xor": "^1.0.8"
497
496
  },
@@ -504,8 +503,6 @@
504
503
  "@storybook/addon-a11y": "^9.1.1",
505
504
  "@storybook/react-vite": "^9.1.1",
506
505
  "@types/glob": "^7.1.1",
507
- "@types/react": "^18.0.28",
508
- "@types/react-dom": "^18.0.11",
509
506
  "autoprefixer": "^9.5.1",
510
507
  "copyfiles": "^2.4.1",
511
508
  "glob": "^7.1.4",
@@ -513,7 +510,6 @@
513
510
  "postcss": "^8.4.40",
514
511
  "postcss-import": "^12.0.1",
515
512
  "postcss-preset-env": "^8.3.0",
516
- "rollup": "^4.13.0",
517
513
  "rollup-plugin-copy": "^3.5.0",
518
514
  "rollup-plugin-multi-input": "^1.4.1",
519
515
  "rollup-plugin-polyfill-node": "^0.13.0",
@@ -529,14 +525,12 @@
529
525
  "axios": "^1.11.0",
530
526
  "classnames": "^2",
531
527
  "color": "^4",
532
- "date-fns": "^2.30.0",
533
- "date-fns-tz": "^2.0.0",
534
528
  "filesize": "^6",
535
- "framer-motion": "^11",
529
+ "framer-motion": "^11.11.12",
536
530
  "lodash": "^4",
537
- "react": "^18.2.0",
538
- "react-dom": "^18",
539
- "react-hook-form": "^7",
531
+ "react": "^18 || ^19.1.0",
532
+ "react-dom": "^18 || ^19.1.0",
533
+ "react-hook-form": "^7.52.0",
540
534
  "react-router-dom": "^6"
541
535
  },
542
536
  "browserslist": [
@@ -544,5 +538,5 @@
544
538
  "> 1%",
545
539
  "IE 10"
546
540
  ],
547
- "gitHead": "35579c7a74222f56c1f6d00ae964f244886471b6"
541
+ "gitHead": "6d043f4908d39d779d91ffa9fe2e84418734665c"
548
542
  }
package/rollup.config.mjs CHANGED
@@ -1,6 +1,4 @@
1
1
  /* eslint-disable import/no-default-export */
2
- import { fileURLToPath } from "url";
3
- import { dirname, resolve } from "path";
4
2
  import typescript from "@rollup/plugin-typescript";
5
3
  import postcss from "rollup-plugin-postcss";
6
4
  import commonjs from "@rollup/plugin-commonjs";
@@ -12,10 +10,6 @@ import tools from "@csstools/postcss-global-data";
12
10
  import presetenv from "postcss-preset-env";
13
11
  import multiInput from "rollup-plugin-multi-input";
14
12
  import nodePolyfills from "rollup-plugin-polyfill-node";
15
- import alias from "@rollup/plugin-alias";
16
- // comments for manual release
17
- const __filename = fileURLToPath(import.meta.url);
18
- const __dirname = dirname(__filename);
19
13
 
20
14
  /**
21
15
  * When PREBUILD_CSS is supplied, only build the main index.ts file.
@@ -31,15 +25,6 @@ export default {
31
25
  input: PREBUILD_CSS ? "src/index.ts" : `src/**/index.{ts,tsx}`,
32
26
  plugins: [
33
27
  nodePolyfills(),
34
- alias({
35
- entries: [
36
- {
37
- find: /@jobber\/hooks\/(.*)/,
38
- replacement: (_, p1) =>
39
- resolve(__dirname, `../hooks/dist/${p1}/${p1}.js`),
40
- },
41
- ],
42
- }),
43
28
  nodeResolve(),
44
29
  multiInput.default(),
45
30
  typescript({
@@ -152,6 +137,7 @@ export default {
152
137
  ],
153
138
  external: [
154
139
  "react",
140
+ "react/jsx-runtime",
155
141
  "react-hook-form",
156
142
  "react-router-dom",
157
143
  "react-dom",