@jobber/components 6.86.2 → 6.86.3
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.
- package/dist/Autocomplete/index.cjs +12 -13
- package/dist/Autocomplete/index.mjs +16 -17
- package/dist/Banner-cjs.js +1 -1
- package/dist/Banner-es.js +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +3 -3
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +2 -2
- package/dist/ComboboxContent-cjs.js +2 -2
- package/dist/ComboboxContent-es.js +5 -5
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +2 -2
- package/dist/ConfirmationModal-cjs.js +1 -1
- package/dist/ConfirmationModal-es.js +2 -2
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +2 -2
- package/dist/DataListActionsMenu-cjs.js +4 -4
- package/dist/DataListActionsMenu-es.js +8 -8
- package/dist/DataListHeaderTile-cjs.js +1 -1
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +2 -2
- package/dist/DataListOverflowFade-es.js +3 -3
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +2 -2
- package/dist/DataListSortingOptions-cjs.js +2 -2
- package/dist/DataListSortingOptions-es.js +4 -4
- package/dist/DataTable/test-utilities/index.cjs +1 -1
- package/dist/DataTable/test-utilities/index.mjs +1 -1
- package/dist/DataTable-cjs.js +3 -3
- package/dist/DataTable-es.js +4 -4
- package/dist/DatePicker-cjs.js +1 -1
- package/dist/DatePicker-es.js +2 -2
- package/dist/Disclosure-cjs.js +2 -2
- package/dist/Disclosure-es.js +3 -3
- package/dist/FormField-cjs.js +5 -1
- package/dist/FormField-es.js +5 -1
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/index.cjs +2 -2
- package/dist/InputText/index.mjs +3 -3
- package/dist/LightBox-cjs.js +67 -51
- package/dist/LightBox-es.js +73 -57
- package/dist/Menu-cjs.js +11 -6
- package/dist/Menu-es.js +16 -11
- package/dist/Modal/index.cjs +3 -3
- package/dist/Modal/index.mjs +7 -7
- package/dist/Page-cjs.js +4 -4
- package/dist/Page-es.js +5 -5
- package/dist/Popover-cjs.js +1 -1
- package/dist/Popover-es.js +3 -3
- package/dist/SideDrawer-cjs.js +6 -6
- package/dist/SideDrawer-es.js +10 -10
- package/dist/Tooltip-cjs.js +2 -2
- package/dist/Tooltip-es.js +5 -5
- package/dist/floating-ui.react-es.js +1 -1
- package/dist/index.cjs +6 -7
- package/dist/index.mjs +6 -7
- package/dist/throttle-cjs.js +1 -0
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +4383 -70
- package/dist/useDebounce-es.js +4384 -72
- package/dist/useFocusTrap-cjs.js +8 -3
- package/dist/useFocusTrap-es.js +9 -4
- package/dist/useInView-cjs.js +10 -5
- package/dist/useInView-es.js +11 -6
- package/dist/useIsMounted-cjs.js +19 -4
- package/dist/useIsMounted-es.js +20 -5
- package/dist/useOnKeyDown-cjs.js +7 -2
- package/dist/useOnKeyDown-es.js +8 -3
- package/dist/useRefocusOnActivator-cjs.js +7 -2
- package/dist/useRefocusOnActivator-es.js +8 -3
- package/dist/useResizeObserver-cjs.js +92 -64
- package/dist/useResizeObserver-es.js +94 -65
- package/dist/useSafeLayoutEffect-cjs.js +8 -3
- package/dist/useSafeLayoutEffect-es.js +10 -5
- package/dist/useScrollToActive-cjs.js +9 -4
- package/dist/useScrollToActive-es.js +11 -6
- package/package.json +4 -4
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
? useLayoutEffect
|
|
5
|
-
: useEffect;
|
|
3
|
+
var useSafeLayoutEffect = {};
|
|
6
4
|
|
|
7
|
-
|
|
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 };
|
|
@@ -248,14 +248,19 @@ 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;
|
|
251
256
|
/**
|
|
252
257
|
* Announce a message on voice over whenever you do an action. This is
|
|
253
258
|
* especially helpful when you have an action that adds or deletes an element
|
|
254
259
|
* from the screen.
|
|
255
260
|
*/
|
|
256
261
|
function useLiveAnnounce() {
|
|
257
|
-
const [announcedMessage, setAnnouncedMessage] =
|
|
258
|
-
|
|
262
|
+
const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
|
|
263
|
+
(0, react_1.useEffect)(() => {
|
|
259
264
|
let target;
|
|
260
265
|
if (announcedMessage) {
|
|
261
266
|
target = createAnnouncedElement();
|
|
@@ -311,7 +316,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
|
|
|
311
316
|
const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
|
|
312
317
|
const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
|
|
313
318
|
const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
|
|
314
|
-
const { liveAnnounce } =
|
|
319
|
+
const { liveAnnounce } = useLiveAnnounce_2();
|
|
315
320
|
const actions = {
|
|
316
321
|
handleChipRemove: (value) => {
|
|
317
322
|
return () => {
|
|
@@ -381,7 +386,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
|
|
|
381
386
|
const [shouldCancelEnter, setShouldCancelEnter] = React.useState(false);
|
|
382
387
|
const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
|
|
383
388
|
const maxOptionIndex = allOptions.length - 1;
|
|
384
|
-
const { liveAnnounce } =
|
|
389
|
+
const { liveAnnounce } = useLiveAnnounce_2();
|
|
385
390
|
React.useEffect(() => {
|
|
386
391
|
setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
|
|
387
392
|
}, [options]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useState,
|
|
1
|
+
import React__default, { useState, useId, useEffect, 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,
|
|
12
|
+
import { u as useFloating, o as offset, f as flip, e as size, b 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,14 +246,19 @@ 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;
|
|
249
254
|
/**
|
|
250
255
|
* Announce a message on voice over whenever you do an action. This is
|
|
251
256
|
* especially helpful when you have an action that adds or deletes an element
|
|
252
257
|
* from the screen.
|
|
253
258
|
*/
|
|
254
259
|
function useLiveAnnounce() {
|
|
255
|
-
const [announcedMessage, setAnnouncedMessage] = useState("");
|
|
256
|
-
useEffect(() => {
|
|
260
|
+
const [announcedMessage, setAnnouncedMessage] = (0, react_1.useState)("");
|
|
261
|
+
(0, react_1.useEffect)(() => {
|
|
257
262
|
let target;
|
|
258
263
|
if (announcedMessage) {
|
|
259
264
|
target = createAnnouncedElement();
|
|
@@ -309,7 +314,7 @@ function useInternalChipDismissible({ children, selected, onChange, onClick, onC
|
|
|
309
314
|
const visibleChipOptions = chipOptions.filter(chip => selected.includes(chip.value));
|
|
310
315
|
const sortedVisibleChipOptions = sortBy$1(visibleChipOptions, chip => selected.indexOf(chip.value));
|
|
311
316
|
const availableChipOptions = chipOptions.filter(chip => !selected.includes(chip.value));
|
|
312
|
-
const { liveAnnounce } =
|
|
317
|
+
const { liveAnnounce } = useLiveAnnounce_2();
|
|
313
318
|
const actions = {
|
|
314
319
|
handleChipRemove: (value) => {
|
|
315
320
|
return () => {
|
|
@@ -379,7 +384,7 @@ function useInternalChipDismissibleInput({ options, isLoadingMore = false, onCus
|
|
|
379
384
|
const [shouldCancelEnter, setShouldCancelEnter] = useState(false);
|
|
380
385
|
const canAddCustomOption = onCustomOptionSelect !== undefined && !isLoadingMore;
|
|
381
386
|
const maxOptionIndex = allOptions.length - 1;
|
|
382
|
-
const { liveAnnounce } =
|
|
387
|
+
const { liveAnnounce } = useLiveAnnounce_2();
|
|
383
388
|
useEffect(() => {
|
|
384
389
|
setAllOptions(generateOptions(options, searchValue, canAddCustomOption));
|
|
385
390
|
}, [options]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.86.
|
|
3
|
+
"version": "6.86.3",
|
|
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
|
|
465
|
+
"storybook:build": "storybook build --disable-telemetry"
|
|
466
466
|
},
|
|
467
467
|
"files": [
|
|
468
468
|
"*.js",
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
],
|
|
474
474
|
"dependencies": {
|
|
475
475
|
"@floating-ui/react": "^0.27.5",
|
|
476
|
-
"@jobber/formatters": "^0.4.
|
|
476
|
+
"@jobber/formatters": "^0.4.2",
|
|
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": "
|
|
547
|
+
"gitHead": "5bbca8eb6e0837b469d2343f9d0fa98a46f7d689"
|
|
548
548
|
}
|