@jobber/components 9.5.3 → 9.6.0
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/Combobox.d.ts +1 -0
- package/Combobox.js +17 -0
- package/dist/Autocomplete/index.cjs +0 -2
- package/dist/Autocomplete/index.mjs +0 -2
- package/dist/Autocomplete-cjs.js +4 -5
- package/dist/Autocomplete-es.js +1 -2
- package/dist/Card/index.cjs +2 -2
- package/dist/Card/index.mjs +2 -2
- package/dist/Chip/index.cjs +0 -2
- package/dist/Chip/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.cjs +0 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +0 -2
- package/dist/Chips/index.cjs +0 -2
- package/dist/Chips/index.mjs +0 -2
- package/dist/Combobox/Combobox.contentSlots.d.ts +5 -0
- package/dist/Combobox/Combobox.context.d.ts +34 -0
- package/dist/Combobox/Combobox.d.ts +69 -0
- package/dist/Combobox/Combobox.footer.d.ts +7 -0
- package/dist/Combobox/Combobox.items.d.ts +25 -0
- package/dist/Combobox/Combobox.responsive.d.ts +54 -0
- package/dist/Combobox/Combobox.selectAll.d.ts +4 -0
- package/dist/Combobox/Combobox.slotFactory.d.ts +7 -0
- package/dist/Combobox/Combobox.testUtils.d.ts +12 -0
- package/dist/Combobox/Combobox.types.d.ts +166 -0
- package/dist/Combobox/index.cjs +35 -0
- package/dist/Combobox/index.d.ts +2 -0
- package/dist/Combobox/index.mjs +29 -0
- package/dist/Combobox-cjs.js +675 -0
- package/dist/Combobox-es.js +673 -0
- package/dist/ComboboxPrimitive-cjs.js +88 -47
- package/dist/ComboboxPrimitive-es.js +39 -23
- package/dist/{ComboboxChipRemove-cjs.js → ComboboxSeparator-cjs.js} +501 -455
- package/dist/{ComboboxChipRemove-es.js → ComboboxSeparator-es.js} +500 -456
- package/dist/ConfirmationModal/index.cjs +0 -2
- package/dist/ConfirmationModal/index.mjs +0 -2
- package/dist/ContentBlock/index.cjs +1 -0
- package/dist/ContentBlock/index.mjs +1 -0
- package/dist/ContentBlock-cjs.js +2 -18
- package/dist/ContentBlock-es.js +1 -17
- package/dist/DataDump/index.cjs +2 -2
- package/dist/DataDump/index.mjs +2 -2
- package/dist/DataList/components/DataListActions/index.cjs +0 -2
- package/dist/DataList/components/DataListActions/index.mjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.cjs +0 -2
- package/dist/DataList/components/DataListBulkActions/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +0 -2
- package/dist/DataList/components/DataListFilters/index.cjs +0 -2
- package/dist/DataList/components/DataListFilters/index.mjs +0 -2
- package/dist/DataList/components/DataListHeader/index.cjs +0 -2
- package/dist/DataList/components/DataListHeader/index.mjs +0 -2
- package/dist/DataList/components/DataListItem/index.cjs +0 -2
- package/dist/DataList/components/DataListItem/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActions/index.mjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +0 -2
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +0 -2
- package/dist/DataList/components/DataListItems/index.cjs +0 -2
- package/dist/DataList/components/DataListItems/index.mjs +0 -2
- package/dist/DataList/components/DataListLayout/index.cjs +0 -2
- package/dist/DataList/components/DataListLayout/index.mjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.cjs +0 -2
- package/dist/DataList/components/DataListLayoutActions/index.mjs +0 -2
- package/dist/DataList/index.cjs +0 -2
- package/dist/DataList/index.mjs +0 -2
- package/dist/DatePicker/index.cjs +0 -2
- package/dist/DatePicker/index.mjs +0 -2
- package/dist/DatePicker-cjs.js +4 -5
- package/dist/DatePicker-es.js +1 -2
- package/dist/Dialog/index.cjs +2 -2
- package/dist/Dialog/index.mjs +2 -2
- package/dist/DrawerDescription-cjs.js +268 -99
- package/dist/DrawerDescription-es.js +270 -103
- package/dist/DrawerTitle-cjs.js +2 -6
- package/dist/DrawerTitle-es.js +3 -7
- package/dist/FieldDescription-cjs.js +184 -181
- package/dist/FieldDescription-es.js +187 -184
- package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerContent/index.mjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +0 -2
- package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +0 -2
- package/dist/FilterPicker/index.cjs +0 -2
- package/dist/FilterPicker/index.mjs +0 -2
- package/dist/FilterPickerContent-cjs.js +4 -5
- package/dist/FilterPickerContent-es.js +1 -2
- package/dist/FormatFile/index.cjs +0 -2
- package/dist/FormatFile/index.mjs +0 -2
- package/dist/Gallery/index.cjs +0 -2
- package/dist/Gallery/index.mjs +0 -2
- package/dist/InputDate/index.cjs +0 -2
- package/dist/InputDate/index.mjs +0 -2
- package/dist/InputNumber/index.cjs +2 -2
- package/dist/InputNumber/index.mjs +2 -2
- package/dist/InputNumber/types.d.ts +5 -0
- package/dist/InputNumber-cjs.js +2 -2
- package/dist/InputNumber-es.js +2 -2
- package/dist/LightBox/index.cjs +0 -2
- package/dist/LightBox/index.mjs +0 -2
- package/dist/Menu/index.cjs +2 -2
- package/dist/Menu/index.mjs +2 -2
- package/dist/Menu-cjs.js +4 -5
- package/dist/Menu-es.js +1 -2
- package/dist/MenuSubmenuTrigger-cjs.js +206 -164
- package/dist/MenuSubmenuTrigger-es.js +194 -152
- package/dist/Modal/index.cjs +0 -2
- package/dist/Modal/index.mjs +1 -3
- package/dist/NumberFieldInput-cjs.js +187 -308
- package/dist/NumberFieldInput-es.js +187 -308
- package/dist/Page/index.cjs +2 -2
- package/dist/Page/index.mjs +2 -2
- package/dist/Popover/index.cjs +0 -2
- package/dist/Popover/index.mjs +0 -2
- package/dist/Popover-cjs.js +7 -8
- package/dist/Popover-es.js +1 -2
- package/dist/ScrollAreaViewport-cjs.js +747 -1093
- package/dist/ScrollAreaViewport-es.js +734 -1081
- package/dist/Select/index.cjs +2 -2
- package/dist/Select/index.mjs +2 -2
- package/dist/SelectGroupLabel-cjs.js +207 -306
- package/dist/SelectGroupLabel-es.js +203 -302
- package/dist/SelectPrimitive-cjs.js +11 -17
- package/dist/SelectPrimitive-es.js +1 -7
- package/dist/Tooltip/index.cjs +0 -2
- package/dist/Tooltip/index.mjs +0 -2
- package/dist/Tooltip-cjs.js +6 -7
- package/dist/Tooltip-es.js +1 -2
- package/dist/buttonRenderAdapter-cjs.js +2 -1
- package/dist/buttonRenderAdapter-es.js +2 -1
- package/dist/dialogReturnFocus-cjs.js +1 -1
- package/dist/dialogReturnFocus-es.js +2 -2
- package/dist/docs/InputNumber/InputNumber.md +2 -2
- package/dist/docs/SelectPrimitive/SelectPrimitive.md +1 -1
- package/dist/floating-ui.react-cjs.js +2557 -185
- package/dist/floating-ui.react-es.js +2512 -149
- package/dist/getMappedBreakpointWidth-cjs.js +21 -0
- package/dist/getMappedBreakpointWidth-es.js +18 -0
- package/dist/index.cjs +15 -10
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +14 -10
- package/dist/mergeClassName-cjs.js +12 -0
- package/dist/mergeClassName-es.js +10 -0
- package/dist/primitives/BottomSheet/index.cjs +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/ComboboxPrimitive/ComboboxPrimitive.d.ts +2 -2
- package/dist/primitives/ComboboxPrimitive/index.cjs +4 -5
- package/dist/primitives/ComboboxPrimitive/index.mjs +4 -5
- package/dist/primitives/SelectPrimitive/index.cjs +1 -2
- package/dist/primitives/SelectPrimitive/index.mjs +1 -2
- package/dist/primitives/index.cjs +3 -3
- package/dist/primitives/index.mjs +3 -3
- package/dist/scrollEdges-cjs.js +1 -11
- package/dist/scrollEdges-es.js +1 -11
- package/dist/scrollable-cjs.js +58 -0
- package/dist/scrollable-es.js +54 -0
- package/dist/styles.css +759 -42
- package/dist/unstyledPrimitives/index.cjs +720 -478
- package/dist/unstyledPrimitives/index.mjs +663 -421
- package/dist/useCompositeListItem-cjs.js +2108 -361
- package/dist/useCompositeListItem-es.js +2076 -331
- package/dist/useLabel-cjs.js +2 -3
- package/dist/useLabel-es.js +2 -3
- package/dist/useRenderElement-cjs.js +9 -7
- package/dist/useRenderElement-es.js +9 -7
- package/dist/useScrollLock-cjs.js +819 -344
- package/dist/useScrollLock-es.js +732 -296
- package/dist/useScrollToActive-cjs.js +4 -5
- package/dist/useScrollToActive-es.js +1 -2
- package/dist/utils/meta/meta.json +43 -1
- package/package.json +8 -3
- package/dist/floating-ui.react-dom-cjs.js +0 -2103
- package/dist/floating-ui.react-dom-es.js +0 -2072
- package/dist/floating-ui.utils-cjs.js +0 -342
- package/dist/floating-ui.utils-es.js +0 -300
package/dist/useLabel-cjs.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var floatingUi_utils = require('./floating-ui.utils-cjs.js');
|
|
4
3
|
var useScrollLock = require('./useScrollLock-cjs.js');
|
|
5
4
|
var useCompositeListItem = require('./useCompositeListItem-cjs.js');
|
|
6
5
|
|
|
@@ -9,7 +8,7 @@ function useRegisteredLabelId(idProp, setLabelId) {
|
|
|
9
8
|
useScrollLock.useIsoLayoutEffect(() => {
|
|
10
9
|
setLabelId(id);
|
|
11
10
|
return () => {
|
|
12
|
-
setLabelId(undefined);
|
|
11
|
+
setLabelId(currentId => currentId === id ? undefined : currentId);
|
|
13
12
|
};
|
|
14
13
|
}, [id, setLabelId]);
|
|
15
14
|
return id;
|
|
@@ -42,7 +41,7 @@ function useLabel(params = {}) {
|
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
43
|
const controlElement = useScrollLock.ownerDocument(event.currentTarget).getElementById(resolvedControlId);
|
|
45
|
-
if (
|
|
44
|
+
if (useScrollLock.isHTMLElement(controlElement)) {
|
|
46
45
|
focusElementWithVisible(controlElement);
|
|
47
46
|
}
|
|
48
47
|
}
|
package/dist/useLabel-es.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { i as isHTMLElement } from './
|
|
2
|
-
import { u as useBaseUiId, a as useIsoLayoutEffect, b as useStableCallback, g as getTarget, o as ownerDocument } from './useScrollLock-es.js';
|
|
1
|
+
import { u as useBaseUiId, c as useIsoLayoutEffect, d as useStableCallback, e as getTarget, o as ownerDocument, i as isHTMLElement } from './useScrollLock-es.js';
|
|
3
2
|
import { u as useLabelableContext } from './useCompositeListItem-es.js';
|
|
4
3
|
|
|
5
4
|
function useRegisteredLabelId(idProp, setLabelId) {
|
|
@@ -7,7 +6,7 @@ function useRegisteredLabelId(idProp, setLabelId) {
|
|
|
7
6
|
useIsoLayoutEffect(() => {
|
|
8
7
|
setLabelId(id);
|
|
9
8
|
return () => {
|
|
10
|
-
setLabelId(undefined);
|
|
9
|
+
setLabelId(currentId => currentId === id ? undefined : currentId);
|
|
11
10
|
};
|
|
12
11
|
}, [id, setLabelId]);
|
|
13
12
|
return id;
|
|
@@ -364,7 +364,9 @@ function update(forkRef, refs) {
|
|
|
364
364
|
if (typeof cleanupCallback === 'function') {
|
|
365
365
|
cleanupCallback();
|
|
366
366
|
} else {
|
|
367
|
-
ref
|
|
367
|
+
// Legacy ref with no attach-time cleanup: detach by calling it with `null`.
|
|
368
|
+
// It returns nothing; React 19 cleanups are handled in the branch above.
|
|
369
|
+
void ref(null);
|
|
368
370
|
}
|
|
369
371
|
break;
|
|
370
372
|
}
|
|
@@ -536,7 +538,8 @@ function useRenderElementProps(componentProps, params = {}) {
|
|
|
536
538
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
537
539
|
if (typeof document !== 'undefined') {
|
|
538
540
|
if (!enabled) {
|
|
539
|
-
|
|
541
|
+
// Called only to keep the hook order stable when disabled; the merged ref is unused.
|
|
542
|
+
void useMergedRefs(null, null);
|
|
540
543
|
} else if (Array.isArray(ref)) {
|
|
541
544
|
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
|
|
542
545
|
} else {
|
|
@@ -562,9 +565,9 @@ function resolveRenderFunctionProps(props) {
|
|
|
562
565
|
}
|
|
563
566
|
|
|
564
567
|
// The symbol React uses internally for lazy components
|
|
565
|
-
// https://github.com/
|
|
568
|
+
// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
|
|
566
569
|
//
|
|
567
|
-
// TODO delete once https://github.com/
|
|
570
|
+
// TODO delete once https://github.com/react/react/issues/32392 is fixed
|
|
568
571
|
const REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
569
572
|
const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
|
|
570
573
|
const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
|
|
@@ -579,10 +582,9 @@ function evaluateRenderProp(element, render, props, state) {
|
|
|
579
582
|
const mergedProps = mergeProps(props, render.props);
|
|
580
583
|
mergedProps.ref = props.ref;
|
|
581
584
|
let newElement = render;
|
|
582
|
-
|
|
583
|
-
// Workaround for https://github.com/facebook/react/issues/32392
|
|
585
|
+
// Workaround for https://github.com/react/react/issues/32392
|
|
584
586
|
// This works because the toArray() logic unwrap lazy element type in
|
|
585
|
-
// https://github.com/
|
|
587
|
+
// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
|
|
586
588
|
if (newElement?.$$typeof === REACT_LAZY_TYPE) {
|
|
587
589
|
const children = React__namespace.Children.toArray(render);
|
|
588
590
|
newElement = children[0];
|
|
@@ -344,7 +344,9 @@ function update(forkRef, refs) {
|
|
|
344
344
|
if (typeof cleanupCallback === 'function') {
|
|
345
345
|
cleanupCallback();
|
|
346
346
|
} else {
|
|
347
|
-
ref
|
|
347
|
+
// Legacy ref with no attach-time cleanup: detach by calling it with `null`.
|
|
348
|
+
// It returns nothing; React 19 cleanups are handled in the branch above.
|
|
349
|
+
void ref(null);
|
|
348
350
|
}
|
|
349
351
|
break;
|
|
350
352
|
}
|
|
@@ -516,7 +518,8 @@ function useRenderElementProps(componentProps, params = {}) {
|
|
|
516
518
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
517
519
|
if (typeof document !== 'undefined') {
|
|
518
520
|
if (!enabled) {
|
|
519
|
-
|
|
521
|
+
// Called only to keep the hook order stable when disabled; the merged ref is unused.
|
|
522
|
+
void useMergedRefs(null, null);
|
|
520
523
|
} else if (Array.isArray(ref)) {
|
|
521
524
|
outProps.ref = useMergedRefsN([outProps.ref, getReactElementRef(renderProp), ...ref]);
|
|
522
525
|
} else {
|
|
@@ -542,9 +545,9 @@ function resolveRenderFunctionProps(props) {
|
|
|
542
545
|
}
|
|
543
546
|
|
|
544
547
|
// The symbol React uses internally for lazy components
|
|
545
|
-
// https://github.com/
|
|
548
|
+
// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/shared/ReactSymbols.js#L31
|
|
546
549
|
//
|
|
547
|
-
// TODO delete once https://github.com/
|
|
550
|
+
// TODO delete once https://github.com/react/react/issues/32392 is fixed
|
|
548
551
|
const REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
549
552
|
const COMPONENT_IDENTIFIER_PATTERN = /^[A-Z][A-Za-z0-9$]*$/;
|
|
550
553
|
const LOWERCASE_CHARACTER_PATTERN = /[a-z]/;
|
|
@@ -559,10 +562,9 @@ function evaluateRenderProp(element, render, props, state) {
|
|
|
559
562
|
const mergedProps = mergeProps(props, render.props);
|
|
560
563
|
mergedProps.ref = props.ref;
|
|
561
564
|
let newElement = render;
|
|
562
|
-
|
|
563
|
-
// Workaround for https://github.com/facebook/react/issues/32392
|
|
565
|
+
// Workaround for https://github.com/react/react/issues/32392
|
|
564
566
|
// This works because the toArray() logic unwrap lazy element type in
|
|
565
|
-
// https://github.com/
|
|
567
|
+
// https://github.com/react/react/blob/a0566250b210499b4c5677f5ac2eedbd71d51a1b/packages/react/src/ReactChildren.js#L186
|
|
566
568
|
if (newElement?.$$typeof === REACT_LAZY_TYPE) {
|
|
567
569
|
const children = React.Children.toArray(render);
|
|
568
570
|
newElement = children[0];
|