@jobber/components 6.86.0 → 6.86.2

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 (80) hide show
  1. package/dist/Autocomplete/index.cjs +6 -6
  2. package/dist/Autocomplete/index.mjs +11 -11
  3. package/dist/Banner-cjs.js +1 -1
  4. package/dist/Banner-es.js +1 -1
  5. package/dist/Chip-cjs.js +2 -2
  6. package/dist/Chip-es.js +3 -3
  7. package/dist/Combobox-cjs.js +1 -1
  8. package/dist/Combobox-es.js +2 -2
  9. package/dist/ComboboxContent-cjs.js +2 -2
  10. package/dist/ComboboxContent-es.js +5 -5
  11. package/dist/ComboboxLoadMore-cjs.js +1 -1
  12. package/dist/ComboboxLoadMore-es.js +2 -2
  13. package/dist/ConfirmationModal-cjs.js +1 -1
  14. package/dist/ConfirmationModal-es.js +2 -2
  15. package/dist/ContentBlock-cjs.js +1 -1
  16. package/dist/ContentBlock-es.js +2 -2
  17. package/dist/DataListActionsMenu-cjs.js +4 -4
  18. package/dist/DataListActionsMenu-es.js +8 -8
  19. package/dist/DataListHeaderTile-cjs.js +1 -1
  20. package/dist/DataListHeaderTile-es.js +2 -2
  21. package/dist/DataListLoadMore-cjs.js +1 -1
  22. package/dist/DataListLoadMore-es.js +2 -2
  23. package/dist/DataListOverflowFade-cjs.js +2 -2
  24. package/dist/DataListOverflowFade-es.js +3 -3
  25. package/dist/DataListSearch-cjs.js +1 -1
  26. package/dist/DataListSearch-es.js +2 -2
  27. package/dist/DataListSortingOptions-cjs.js +2 -2
  28. package/dist/DataListSortingOptions-es.js +4 -4
  29. package/dist/DataTable/test-utilities/index.cjs +1 -1
  30. package/dist/DataTable/test-utilities/index.mjs +1 -1
  31. package/dist/DataTable-cjs.js +3 -3
  32. package/dist/DataTable-es.js +4 -4
  33. package/dist/DatePicker-cjs.js +1 -1
  34. package/dist/DatePicker-es.js +2 -2
  35. package/dist/Disclosure-cjs.js +2 -2
  36. package/dist/Disclosure-es.js +3 -3
  37. package/dist/FormField-cjs.js +1 -5
  38. package/dist/FormField-es.js +1 -5
  39. package/dist/InputText/InputText.d.ts +2 -2
  40. package/dist/InputText/index.cjs +2 -2
  41. package/dist/InputText/index.mjs +3 -3
  42. package/dist/LightBox-cjs.js +51 -67
  43. package/dist/LightBox-es.js +57 -73
  44. package/dist/Menu-cjs.js +6 -11
  45. package/dist/Menu-es.js +11 -16
  46. package/dist/Modal/index.cjs +3 -3
  47. package/dist/Modal/index.mjs +7 -7
  48. package/dist/Page-cjs.js +4 -4
  49. package/dist/Page-es.js +5 -5
  50. package/dist/Popover-cjs.js +1 -1
  51. package/dist/Popover-es.js +3 -3
  52. package/dist/SideDrawer-cjs.js +6 -6
  53. package/dist/SideDrawer-es.js +10 -10
  54. package/dist/Tooltip-cjs.js +2 -2
  55. package/dist/Tooltip-es.js +5 -5
  56. package/dist/floating-ui.react-es.js +1 -1
  57. package/dist/index.cjs +5 -5
  58. package/dist/index.mjs +5 -5
  59. package/dist/styles.css +27 -6
  60. package/dist/throttle-cjs.js +0 -1
  61. package/dist/throttle-es.js +1 -1
  62. package/dist/useDebounce-cjs.js +69 -4381
  63. package/dist/useDebounce-es.js +71 -4383
  64. package/dist/useFocusTrap-cjs.js +3 -8
  65. package/dist/useFocusTrap-es.js +4 -9
  66. package/dist/useInView-cjs.js +5 -10
  67. package/dist/useInView-es.js +6 -11
  68. package/dist/useIsMounted-cjs.js +4 -19
  69. package/dist/useIsMounted-es.js +5 -20
  70. package/dist/useOnKeyDown-cjs.js +2 -7
  71. package/dist/useOnKeyDown-es.js +3 -8
  72. package/dist/useRefocusOnActivator-cjs.js +2 -7
  73. package/dist/useRefocusOnActivator-es.js +3 -8
  74. package/dist/useResizeObserver-cjs.js +64 -92
  75. package/dist/useResizeObserver-es.js +65 -94
  76. package/dist/useSafeLayoutEffect-cjs.js +3 -8
  77. package/dist/useSafeLayoutEffect-es.js +5 -10
  78. package/dist/useScrollToActive-cjs.js +4 -9
  79. package/dist/useScrollToActive-es.js +6 -11
  80. package/package.json +3 -3
@@ -1,12 +1,7 @@
1
- import React__default from 'react';
1
+ import { useLayoutEffect, useEffect } from 'react';
2
2
 
3
- var useSafeLayoutEffect = {};
3
+ const useSafeLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)
4
+ ? useLayoutEffect
5
+ : useEffect;
4
6
 
5
- Object.defineProperty(useSafeLayoutEffect, "__esModule", { value: true });
6
- var useSafeLayoutEffect_1 = useSafeLayoutEffect.useSafeLayoutEffect = void 0;
7
- const react_1 = React__default;
8
- useSafeLayoutEffect_1 = useSafeLayoutEffect.useSafeLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)
9
- ? react_1.useLayoutEffect
10
- : react_1.useEffect;
11
-
12
- export { useSafeLayoutEffect as a, useSafeLayoutEffect_1 as u };
7
+ export { useSafeLayoutEffect as u };
@@ -248,19 +248,14 @@ var sortBy_1 = sortBy;
248
248
 
249
249
  var sortBy$1 = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(sortBy_1);
250
250
 
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
251
  /**
257
252
  * Announce a message on voice over whenever you do an action. This is
258
253
  * especially helpful when you have an action that adds or deletes an element
259
254
  * from the screen.
260
255
  */
261
256
  function useLiveAnnounce() {
262
- const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
263
- (0, react_1.useEffect)(() => {
257
+ const [announcedMessage, setAnnouncedMessage] = React.useState("");
258
+ React.useEffect(() => {
264
259
  let target;
265
260
  if (announcedMessage) {
266
261
  target = createAnnouncedElement();
@@ -316,7 +311,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
316
311
  const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
317
312
  const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
318
313
  const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
319
- const { liveAnnounce } = useLiveAnnounce_2();
314
+ const { liveAnnounce } = useLiveAnnounce();
320
315
  const actions = {
321
316
  handleChipRemove: (value) => {
322
317
  return () => {
@@ -386,7 +381,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
386
381
  const [shouldCancelEnter, setShouldCancelEnter] = React.useState(false);
387
382
  const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
388
383
  const maxOptionIndex = allOptions.length - 1;
389
- const { liveAnnounce } = useLiveAnnounce_2();
384
+ const { liveAnnounce } = useLiveAnnounce();
390
385
  React.useEffect(() => {
391
386
  setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
392
387
  }, [options]);
@@ -1,4 +1,4 @@
1
- import React__default, { useState, useId, useEffect, useRef } from 'react';
1
+ import React__default, { useState, useEffect, useId, useRef } from 'react';
2
2
  import { g as getDefaultExportFromCjs } from './_commonjsHelpers-es.js';
3
3
  import { _ as _baseFlatten } from './_baseFlatten-es.js';
4
4
  import { a as _arrayMap, b as _baseGet } from './_baseGet-es.js';
@@ -9,7 +9,7 @@ import { i as identity_1 } from './identity-es.js';
9
9
  import { _ as _baseRest, a as _isIterateeCall } from './_isIterateeCall-es.js';
10
10
  import { a as debounce } from './debounce-es.js';
11
11
  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';
12
+ import { u as useFloating, o as offset, f as flip, s as size, c as autoUpdate } from './floating-ui.react-es.js';
13
13
  import { c as calculateMaxHeight } from './maxHeight-es.js';
14
14
 
15
15
  var baseEach = _baseEach,
@@ -246,19 +246,14 @@ var sortBy_1 = sortBy;
246
246
 
247
247
  var sortBy$1 = /*@__PURE__*/getDefaultExportFromCjs(sortBy_1);
248
248
 
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
249
  /**
255
250
  * Announce a message on voice over whenever you do an action. This is
256
251
  * especially helpful when you have an action that adds or deletes an element
257
252
  * from the screen.
258
253
  */
259
254
  function useLiveAnnounce() {
260
- const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
261
- (0, react_1.useEffect)(() => {
255
+ const [announcedMessage, setAnnouncedMessage] = useState("");
256
+ useEffect(() => {
262
257
  let target;
263
258
  if (announcedMessage) {
264
259
  target = createAnnouncedElement();
@@ -314,7 +309,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
314
309
  const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
315
310
  const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
316
311
  const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
317
- const { liveAnnounce } = useLiveAnnounce_2();
312
+ const { liveAnnounce } = useLiveAnnounce();
318
313
  const actions = {
319
314
  handleChipRemove: (value) => {
320
315
  return () => {
@@ -384,7 +379,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
384
379
  const [shouldCancelEnter, setShouldCancelEnter] = useState(false);
385
380
  const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
386
381
  const maxOptionIndex = allOptions.length - 1;
387
- const { liveAnnounce } = useLiveAnnounce_2();
382
+ const { liveAnnounce } = useLiveAnnounce();
388
383
  useEffect(() => {
389
384
  setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
390
385
  }, [options]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.86.0",
3
+ "version": "6.86.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -473,7 +473,7 @@
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",
477
477
  "@tanstack/react-table": "8.5.13",
478
478
  "@types/color": "^3.0.1",
479
479
  "@types/lodash": "^4.14.136",
@@ -544,5 +544,5 @@
544
544
  "> 1%",
545
545
  "IE 10"
546
546
  ],
547
- "gitHead": "271a88f6766571313565c0f3b37b1d59697ab509"
547
+ "gitHead": "bef84b036409d4f7c5fb9a0185afad2e2870b2ea"
548
548
  }