@jobber/components 6.96.0 → 6.97.1
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/ComboboxContent-cjs.js +10 -3
- package/dist/ComboboxContent-es.js +11 -4
- package/dist/DataListItem-cjs.js +2 -0
- package/dist/DataListItem-es.js +2 -0
- package/dist/FormField/hooks/useAtlantisReactHookForm.d.ts +1 -0
- package/dist/InputText/useInputTextFormField.d.ts +1 -1
- package/package.json +6 -6
|
@@ -51,12 +51,13 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
51
51
|
const nodeId = floatingUi_react.useFloatingNodeId();
|
|
52
52
|
jobberHooks.useRefocusOnActivator(open);
|
|
53
53
|
const floatingRef = jobberHooks.useFocusTrap(open);
|
|
54
|
-
const { floatingStyles, update, context } = floatingUi_react.useFloating({
|
|
54
|
+
const { floatingStyles, update, context, elements } = floatingUi_react.useFloating({
|
|
55
55
|
nodeId,
|
|
56
56
|
elements: {
|
|
57
57
|
reference: wrapperRef.current,
|
|
58
58
|
floating: floatingRef.current,
|
|
59
59
|
},
|
|
60
|
+
placement: "bottom-start",
|
|
60
61
|
open,
|
|
61
62
|
onOpenChange: openState => {
|
|
62
63
|
if (!openState)
|
|
@@ -66,11 +67,17 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
66
67
|
floatingUi_react.offset(COMBOBOX_OFFSET),
|
|
67
68
|
floatingUi_react.flip({ fallbackPlacements: ["top-start", "bottom-end", "top-end"] }),
|
|
68
69
|
],
|
|
69
|
-
placement: "bottom-start",
|
|
70
|
-
whileElementsMounted: floatingUi_react.autoUpdate,
|
|
71
70
|
});
|
|
72
71
|
const dismiss = floatingUi_react.useDismiss(context);
|
|
73
72
|
const { getFloatingProps } = floatingUi_react.useInteractions([dismiss]);
|
|
73
|
+
// Floating element is hidden via CSS (not conditionally rendered),
|
|
74
|
+
// set up and tear down autoUpdate manually to avoid unnecessary observers.
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
if (open && elements.reference && elements.floating) {
|
|
77
|
+
const cleanup = floatingUi_react.autoUpdate(elements.reference, elements.floating, update);
|
|
78
|
+
return cleanup;
|
|
79
|
+
}
|
|
80
|
+
}, [open, floatingUi_react.autoUpdate, elements, update]);
|
|
74
81
|
React.useEffect(() => {
|
|
75
82
|
focusedIndex.current = null;
|
|
76
83
|
if (open) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useContext, useRef, useEffect, useMemo } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import { g as useFloatingParentNodeId, h as useFloatingNodeId, u as useFloating, o as offset, f as flip,
|
|
3
|
+
import { g as useFloatingParentNodeId, h as useFloatingNodeId, u as useFloating, o as offset, f as flip, a as useDismiss, b as useInteractions, c as autoUpdate, i as FloatingTree, j as FloatingNode, F as FloatingPortal } from './floating-ui.react-es.js';
|
|
4
4
|
import { C as ComboboxContentSearch } from './ComboboxContentSearch-es.js';
|
|
5
5
|
import { C as ComboboxContentList } from './ComboboxContentList-es.js';
|
|
6
6
|
import { C as ComboboxContentHeader } from './ComboboxContentHeader-es.js';
|
|
@@ -49,12 +49,13 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
49
49
|
const nodeId = useFloatingNodeId();
|
|
50
50
|
useRefocusOnActivator(open);
|
|
51
51
|
const floatingRef = useFocusTrap(open);
|
|
52
|
-
const { floatingStyles, update, context } = useFloating({
|
|
52
|
+
const { floatingStyles, update, context, elements } = useFloating({
|
|
53
53
|
nodeId,
|
|
54
54
|
elements: {
|
|
55
55
|
reference: wrapperRef.current,
|
|
56
56
|
floating: floatingRef.current,
|
|
57
57
|
},
|
|
58
|
+
placement: "bottom-start",
|
|
58
59
|
open,
|
|
59
60
|
onOpenChange: openState => {
|
|
60
61
|
if (!openState)
|
|
@@ -64,11 +65,17 @@ function useComboboxAccessibility(selectionCallback, filteredOptions, optionsLis
|
|
|
64
65
|
offset(COMBOBOX_OFFSET),
|
|
65
66
|
flip({ fallbackPlacements: ["top-start", "bottom-end", "top-end"] }),
|
|
66
67
|
],
|
|
67
|
-
placement: "bottom-start",
|
|
68
|
-
whileElementsMounted: autoUpdate,
|
|
69
68
|
});
|
|
70
69
|
const dismiss = useDismiss(context);
|
|
71
70
|
const { getFloatingProps } = useInteractions([dismiss]);
|
|
71
|
+
// Floating element is hidden via CSS (not conditionally rendered),
|
|
72
|
+
// set up and tear down autoUpdate manually to avoid unnecessary observers.
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (open && elements.reference && elements.floating) {
|
|
75
|
+
const cleanup = autoUpdate(elements.reference, elements.floating, update);
|
|
76
|
+
return cleanup;
|
|
77
|
+
}
|
|
78
|
+
}, [open, autoUpdate, elements, update]);
|
|
72
79
|
useEffect(() => {
|
|
73
80
|
focusedIndex.current = null;
|
|
74
81
|
if (open) {
|
package/dist/DataListItem-cjs.js
CHANGED
package/dist/DataListItem-es.js
CHANGED
|
@@ -9,6 +9,7 @@ export declare function useAtlantisReactHookForm({ actionsRef, name, defaultValu
|
|
|
9
9
|
inputRefs: import("react").RefCallback<any>;
|
|
10
10
|
useControllerField: {
|
|
11
11
|
value: any;
|
|
12
|
+
disabled?: boolean;
|
|
12
13
|
name: string;
|
|
13
14
|
};
|
|
14
15
|
setValue: import("react-hook-form").UseFormSetValue<import("react-hook-form").FieldValues>;
|
|
@@ -59,7 +59,7 @@ export declare function useInputTextFormField({ id, name, description, inline, h
|
|
|
59
59
|
className: string;
|
|
60
60
|
name: string;
|
|
61
61
|
disabled: boolean | undefined;
|
|
62
|
-
inputMode: "none" | "text" | "search" | "
|
|
62
|
+
inputMode: "none" | "text" | "search" | "email" | "decimal" | "tel" | "url" | "numeric" | undefined;
|
|
63
63
|
onChange: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
64
64
|
onBlur: () => void;
|
|
65
65
|
onFocus: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.97.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -483,13 +483,13 @@
|
|
|
483
483
|
"classnames": "^2.3.2",
|
|
484
484
|
"color": "^3.1.2",
|
|
485
485
|
"filesize": "^6.1.0",
|
|
486
|
-
"framer-motion": "^11.
|
|
486
|
+
"framer-motion": "^11.11.12",
|
|
487
487
|
"lodash": "^4.17.21",
|
|
488
488
|
"react-aria-components": "^1.11.0",
|
|
489
489
|
"react-countdown": "^2.3.2",
|
|
490
490
|
"react-datepicker": "^8.7.0",
|
|
491
491
|
"react-dropzone": "^11.0.2",
|
|
492
|
-
"react-hook-form": "^7.
|
|
492
|
+
"react-hook-form": "^7.52.0",
|
|
493
493
|
"react-markdown": "^10.1.0",
|
|
494
494
|
"react-router-dom": "^5.3.4",
|
|
495
495
|
"ts-xor": "^1.0.8"
|
|
@@ -529,11 +529,11 @@
|
|
|
529
529
|
"classnames": "^2",
|
|
530
530
|
"color": "^4",
|
|
531
531
|
"filesize": "^6",
|
|
532
|
-
"framer-motion": "^11",
|
|
532
|
+
"framer-motion": "^11.11.12",
|
|
533
533
|
"lodash": "^4",
|
|
534
534
|
"react": "^18.2.0",
|
|
535
535
|
"react-dom": "^18",
|
|
536
|
-
"react-hook-form": "^7",
|
|
536
|
+
"react-hook-form": "^7.52.0",
|
|
537
537
|
"react-router-dom": "^6"
|
|
538
538
|
},
|
|
539
539
|
"browserslist": [
|
|
@@ -541,5 +541,5 @@
|
|
|
541
541
|
"> 1%",
|
|
542
542
|
"IE 10"
|
|
543
543
|
],
|
|
544
|
-
"gitHead": "
|
|
544
|
+
"gitHead": "7ad3ab047c32d137b34e2b9d8c067b16f9d46a49"
|
|
545
545
|
}
|