@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.
- package/dist/Autocomplete/index.cjs +6 -6
- package/dist/Autocomplete/index.mjs +11 -11
- 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 +1 -5
- package/dist/FormField-es.js +1 -5
- 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 +51 -67
- package/dist/LightBox-es.js +57 -73
- package/dist/Menu-cjs.js +6 -11
- package/dist/Menu-es.js +11 -16
- 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 +5 -5
- package/dist/index.mjs +5 -5
- package/dist/styles.css +27 -6
- package/dist/throttle-cjs.js +0 -1
- package/dist/throttle-es.js +1 -1
- package/dist/useDebounce-cjs.js +69 -4381
- package/dist/useDebounce-es.js +71 -4383
- package/dist/useFocusTrap-cjs.js +3 -8
- package/dist/useFocusTrap-es.js +4 -9
- package/dist/useInView-cjs.js +5 -10
- package/dist/useInView-es.js +6 -11
- package/dist/useIsMounted-cjs.js +4 -19
- package/dist/useIsMounted-es.js +5 -20
- package/dist/useOnKeyDown-cjs.js +2 -7
- package/dist/useOnKeyDown-es.js +3 -8
- package/dist/useRefocusOnActivator-cjs.js +2 -7
- package/dist/useRefocusOnActivator-es.js +3 -8
- package/dist/useResizeObserver-cjs.js +64 -92
- package/dist/useResizeObserver-es.js +65 -94
- package/dist/useSafeLayoutEffect-cjs.js +3 -8
- package/dist/useSafeLayoutEffect-es.js +5 -10
- package/dist/useScrollToActive-cjs.js +4 -9
- package/dist/useScrollToActive-es.js +6 -11
- package/package.json +3 -3
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useLayoutEffect, useEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useSafeLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)
|
|
4
|
+
? useLayoutEffect
|
|
5
|
+
: useEffect;
|
|
4
6
|
|
|
5
|
-
|
|
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] =
|
|
263
|
-
|
|
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 } =
|
|
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 } =
|
|
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,
|
|
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,
|
|
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] =
|
|
261
|
-
|
|
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 } =
|
|
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 } =
|
|
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.
|
|
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.
|
|
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": "
|
|
547
|
+
"gitHead": "bef84b036409d4f7c5fb9a0185afad2e2870b2ea"
|
|
548
548
|
}
|