@jobber/components 9.6.1 → 9.6.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 +2 -0
- package/dist/Autocomplete/index.mjs +2 -0
- package/dist/Autocomplete-cjs.js +5 -4
- package/dist/Autocomplete-es.js +2 -1
- package/dist/Card/index.cjs +2 -1
- package/dist/Card/index.mjs +2 -1
- package/dist/Chip/index.cjs +2 -0
- package/dist/Chip/index.mjs +2 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -0
- package/dist/Chips/InternalChipDismissible/index.cjs +2 -0
- package/dist/Chips/InternalChipDismissible/index.mjs +2 -0
- package/dist/Chips/index.cjs +2 -0
- package/dist/Chips/index.mjs +2 -0
- package/dist/Combobox/index.cjs +4 -2
- package/dist/Combobox/index.mjs +4 -2
- package/dist/{ComboboxSeparator-cjs.js → ComboboxChipRemove-cjs.js} +455 -501
- package/dist/{ComboboxSeparator-es.js → ComboboxChipRemove-es.js} +456 -500
- package/dist/ComboboxPrimitive-cjs.js +30 -29
- package/dist/ComboboxPrimitive-es.js +3 -2
- package/dist/ConfirmationModal/index.cjs +2 -0
- package/dist/ConfirmationModal/index.mjs +2 -0
- package/dist/DataDump/index.cjs +2 -1
- package/dist/DataDump/index.mjs +2 -1
- package/dist/DataList/components/DataListActions/index.cjs +2 -0
- package/dist/DataList/components/DataListActions/index.mjs +2 -0
- package/dist/DataList/components/DataListBulkActions/index.cjs +2 -0
- package/dist/DataList/components/DataListBulkActions/index.mjs +2 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +2 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +2 -0
- package/dist/DataList/components/DataListFilters/index.cjs +2 -0
- package/dist/DataList/components/DataListFilters/index.mjs +2 -0
- package/dist/DataList/components/DataListHeader/index.cjs +2 -0
- package/dist/DataList/components/DataListHeader/index.mjs +2 -0
- package/dist/DataList/components/DataListItem/index.cjs +2 -0
- package/dist/DataList/components/DataListItem/index.mjs +2 -0
- package/dist/DataList/components/DataListItemActions/index.cjs +2 -0
- package/dist/DataList/components/DataListItemActions/index.mjs +2 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +2 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +2 -0
- package/dist/DataList/components/DataListItems/index.cjs +2 -0
- package/dist/DataList/components/DataListItems/index.mjs +2 -0
- package/dist/DataList/components/DataListLayout/index.cjs +2 -0
- package/dist/DataList/components/DataListLayout/index.mjs +2 -0
- package/dist/DataList/components/DataListLayoutActions/index.cjs +2 -0
- package/dist/DataList/components/DataListLayoutActions/index.mjs +2 -0
- package/dist/DataList/index.cjs +2 -0
- package/dist/DataList/index.mjs +2 -0
- package/dist/DatePicker/index.cjs +2 -0
- package/dist/DatePicker/index.mjs +2 -0
- package/dist/DatePicker-cjs.js +5 -4
- package/dist/DatePicker-es.js +2 -1
- package/dist/Dialog/index.cjs +2 -1
- package/dist/Dialog/index.mjs +2 -1
- package/dist/DrawerDescription-cjs.js +99 -268
- package/dist/DrawerDescription-es.js +103 -270
- package/dist/DrawerTitle-cjs.js +6 -2
- package/dist/DrawerTitle-es.js +7 -3
- package/dist/FieldDescription-cjs.js +181 -184
- package/dist/FieldDescription-es.js +184 -187
- package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +2 -0
- package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +2 -0
- package/dist/FilterPicker/components/FilterPickerContent/index.cjs +2 -0
- package/dist/FilterPicker/components/FilterPickerContent/index.mjs +2 -0
- package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +2 -0
- package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +2 -0
- package/dist/FilterPicker/index.cjs +2 -0
- package/dist/FilterPicker/index.mjs +2 -0
- package/dist/FilterPickerContent-cjs.js +5 -4
- package/dist/FilterPickerContent-es.js +2 -1
- package/dist/FormatFile/index.cjs +2 -0
- package/dist/FormatFile/index.mjs +2 -0
- package/dist/Gallery/index.cjs +2 -0
- package/dist/Gallery/index.mjs +2 -0
- package/dist/InputDate/index.cjs +2 -0
- package/dist/InputDate/index.mjs +2 -0
- package/dist/InputNumber/index.cjs +2 -1
- package/dist/InputNumber/index.mjs +2 -1
- package/dist/LightBox/index.cjs +2 -0
- package/dist/LightBox/index.mjs +2 -0
- package/dist/Menu/index.cjs +2 -1
- package/dist/Menu/index.mjs +2 -1
- package/dist/Menu-cjs.js +5 -4
- package/dist/Menu-es.js +2 -1
- package/dist/MenuSubmenuTrigger-cjs.js +164 -206
- package/dist/MenuSubmenuTrigger-es.js +152 -194
- package/dist/Modal/index.cjs +2 -0
- package/dist/Modal/index.mjs +3 -1
- package/dist/NumberFieldInput-cjs.js +308 -187
- package/dist/NumberFieldInput-es.js +308 -187
- package/dist/Page/index.cjs +2 -1
- package/dist/Page/index.mjs +2 -1
- package/dist/Popover/index.cjs +2 -0
- package/dist/Popover/index.mjs +2 -0
- package/dist/Popover-cjs.js +8 -7
- package/dist/Popover-es.js +2 -1
- package/dist/ScrollAreaViewport-cjs.js +1093 -747
- package/dist/ScrollAreaViewport-es.js +1081 -734
- package/dist/Select/index.cjs +2 -1
- package/dist/Select/index.mjs +2 -1
- package/dist/SelectGroupLabel-cjs.js +306 -207
- package/dist/SelectGroupLabel-es.js +302 -203
- package/dist/Tooltip/index.cjs +2 -0
- package/dist/Tooltip/index.mjs +2 -0
- package/dist/Tooltip-cjs.js +7 -6
- package/dist/Tooltip-es.js +2 -1
- package/dist/dialogReturnFocus-cjs.js +1 -1
- package/dist/dialogReturnFocus-es.js +2 -2
- package/dist/floating-ui.react-cjs.js +192 -2564
- package/dist/floating-ui.react-dom-cjs.js +2103 -0
- package/dist/floating-ui.react-dom-es.js +2072 -0
- package/dist/floating-ui.react-es.js +156 -2519
- package/dist/floating-ui.utils-cjs.js +342 -0
- package/dist/floating-ui.utils-es.js +300 -0
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +4 -3
- package/dist/primitives/BottomSheet/index.cjs +1 -1
- package/dist/primitives/BottomSheet/index.mjs +1 -1
- package/dist/primitives/ComboboxPrimitive/index.cjs +4 -2
- package/dist/primitives/ComboboxPrimitive/index.mjs +4 -2
- package/dist/primitives/SelectPrimitive/index.cjs +2 -0
- package/dist/primitives/SelectPrimitive/index.mjs +2 -0
- package/dist/primitives/index.cjs +3 -2
- package/dist/primitives/index.mjs +3 -2
- package/dist/scrollEdges-cjs.js +11 -1
- package/dist/scrollEdges-es.js +11 -1
- package/dist/unstyledPrimitives/index.cjs +478 -720
- package/dist/unstyledPrimitives/index.mjs +421 -663
- package/dist/useCompositeListItem-cjs.js +361 -2108
- package/dist/useCompositeListItem-es.js +331 -2076
- package/dist/useLabel-cjs.js +3 -2
- package/dist/useLabel-es.js +3 -2
- package/dist/useRenderElement-cjs.js +7 -9
- package/dist/useRenderElement-es.js +7 -9
- package/dist/useScrollLock-cjs.js +344 -819
- package/dist/useScrollLock-es.js +296 -732
- package/dist/useScrollToActive-cjs.js +5 -4
- package/dist/useScrollToActive-es.js +2 -1
- package/package.json +3 -3
- package/dist/scrollable-cjs.js +0 -58
- package/dist/scrollable-es.js +0 -54
|
@@ -14,6 +14,7 @@ var debounce = require('./debounce-cjs.js');
|
|
|
14
14
|
var Icon = require('./Icon-cjs.js');
|
|
15
15
|
var floatingUi_react = require('./floating-ui.react-cjs.js');
|
|
16
16
|
var maxHeight = require('./maxHeight-cjs.js');
|
|
17
|
+
var floatingUi_reactDom = require('./floating-ui.react-dom-cjs.js');
|
|
17
18
|
|
|
18
19
|
var baseEach = _baseEach._baseEach,
|
|
19
20
|
isArrayLike = isTypedArray.isArrayLike_1;
|
|
@@ -538,9 +539,9 @@ function useRepositionMenu(attachTo) {
|
|
|
538
539
|
const { refs, floatingStyles } = floatingUi_react.useFloating({
|
|
539
540
|
placement: "bottom",
|
|
540
541
|
middleware: [
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
floatingUi_reactDom.offset(ROUNDED_BORDER_ARROW_EDGE_OFFSET),
|
|
543
|
+
floatingUi_reactDom.flip({ fallbackPlacements: ["top"] }),
|
|
544
|
+
floatingUi_reactDom.size({
|
|
544
545
|
apply({ availableHeight, elements, rects }) {
|
|
545
546
|
const maxHeight$1 = maxHeight.calculateMaxHeight(availableHeight, {
|
|
546
547
|
maxHeight: PREFERRED_MAX_HEIGHT,
|
|
@@ -555,7 +556,7 @@ function useRepositionMenu(attachTo) {
|
|
|
555
556
|
elements: {
|
|
556
557
|
reference: attachTo,
|
|
557
558
|
},
|
|
558
|
-
whileElementsMounted:
|
|
559
|
+
whileElementsMounted: floatingUi_reactDom.autoUpdate,
|
|
559
560
|
});
|
|
560
561
|
return {
|
|
561
562
|
setFloatingRef: refs.setFloating,
|
|
@@ -10,8 +10,9 @@ import { _ as _baseRest, a as _isIterateeCall } from './_isIterateeCall-es.js';
|
|
|
10
10
|
import { useLiveAnnounce } from '@jobber/hooks';
|
|
11
11
|
import { d as debounce } from './debounce-es.js';
|
|
12
12
|
import { I as Icon } from './Icon-es.js';
|
|
13
|
-
import { u as useFloating
|
|
13
|
+
import { u as useFloating } from './floating-ui.react-es.js';
|
|
14
14
|
import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
15
|
+
import { o as offset, f as flip, d as size, b as autoUpdate } from './floating-ui.react-dom-es.js';
|
|
15
16
|
|
|
16
17
|
var baseEach = _baseEach,
|
|
17
18
|
isArrayLike = isArrayLike_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -469,7 +469,7 @@
|
|
|
469
469
|
"dist/docs/**/*"
|
|
470
470
|
],
|
|
471
471
|
"dependencies": {
|
|
472
|
-
"@base-ui/react": "1.
|
|
472
|
+
"@base-ui/react": "1.6.0",
|
|
473
473
|
"@floating-ui/react": "^0.27.5",
|
|
474
474
|
"@floating-ui/utils": "0.2.11",
|
|
475
475
|
"@jobber/formatters": "^0.5.0",
|
|
@@ -549,5 +549,5 @@
|
|
|
549
549
|
"> 1%",
|
|
550
550
|
"IE 10"
|
|
551
551
|
],
|
|
552
|
-
"gitHead": "
|
|
552
|
+
"gitHead": "a3e6d42140c69289bcda7f63dadfc2d47688b5d5"
|
|
553
553
|
}
|
package/dist/scrollable-cjs.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var useScrollLock = require('./useScrollLock-cjs.js');
|
|
4
|
-
|
|
5
|
-
function isScrollableY(element, allowOverflowIntent = false) {
|
|
6
|
-
const {
|
|
7
|
-
overflowY
|
|
8
|
-
} = useScrollLock.getComputedStyle(element);
|
|
9
|
-
if (overflowY !== 'auto' && overflowY !== 'scroll') {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
// When `allowOverflowIntent` is true, a container that overflows only once extra space is
|
|
13
|
-
// added (e.g. drawer keyboard scroll slack) still counts, as long as it has layout size on
|
|
14
|
-
// the axis.
|
|
15
|
-
return allowOverflowIntent ? element.clientHeight > 0 : element.scrollHeight > element.clientHeight;
|
|
16
|
-
}
|
|
17
|
-
function isScrollableX(element, allowOverflowIntent = false) {
|
|
18
|
-
const {
|
|
19
|
-
overflowX
|
|
20
|
-
} = useScrollLock.getComputedStyle(element);
|
|
21
|
-
if (overflowX !== 'auto' && overflowX !== 'scroll') {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
return allowOverflowIntent ? element.clientWidth > 0 : element.scrollWidth > element.clientWidth;
|
|
25
|
-
}
|
|
26
|
-
function isScrollable(element, axis, allowOverflowIntent = false) {
|
|
27
|
-
return axis === 'vertical' ? isScrollableY(element, allowOverflowIntent) : isScrollableX(element, allowOverflowIntent);
|
|
28
|
-
}
|
|
29
|
-
function hasScrollableAncestor(target, root, axes) {
|
|
30
|
-
// `getParentNode` crosses shadow boundaries (and slots), so a target inside a shadow root
|
|
31
|
-
// still walks up to scrollable ancestors in the light DOM.
|
|
32
|
-
let node = target;
|
|
33
|
-
while (useScrollLock.isHTMLElement(node) && node !== root && !useScrollLock.isLastTraversableNode(node)) {
|
|
34
|
-
for (const axis of axes) {
|
|
35
|
-
if (isScrollable(node, axis)) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
node = useScrollLock.getParentNode(node);
|
|
40
|
-
}
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
function findScrollableTouchTarget(target, root, axis = 'vertical', allowOverflowIntent = false) {
|
|
44
|
-
// `getParentNode` crosses shadow boundaries (and slots), so a target inside a shadow root
|
|
45
|
-
// still reaches a scrollable ancestor in the light DOM.
|
|
46
|
-
let node = useScrollLock.isHTMLElement(target) ? target : null;
|
|
47
|
-
while (useScrollLock.isHTMLElement(node) && node !== root && !useScrollLock.isLastTraversableNode(node)) {
|
|
48
|
-
if (isScrollable(node, axis, allowOverflowIntent)) {
|
|
49
|
-
return node;
|
|
50
|
-
}
|
|
51
|
-
node = useScrollLock.getParentNode(node);
|
|
52
|
-
}
|
|
53
|
-
return isScrollable(root, axis, allowOverflowIntent) ? root : null;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
exports.findScrollableTouchTarget = findScrollableTouchTarget;
|
|
57
|
-
exports.hasScrollableAncestor = hasScrollableAncestor;
|
|
58
|
-
exports.isScrollableY = isScrollableY;
|
package/dist/scrollable-es.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { g as getComputedStyle, i as isHTMLElement, a as isLastTraversableNode, b as getParentNode } from './useScrollLock-es.js';
|
|
2
|
-
|
|
3
|
-
function isScrollableY(element, allowOverflowIntent = false) {
|
|
4
|
-
const {
|
|
5
|
-
overflowY
|
|
6
|
-
} = getComputedStyle(element);
|
|
7
|
-
if (overflowY !== 'auto' && overflowY !== 'scroll') {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
// When `allowOverflowIntent` is true, a container that overflows only once extra space is
|
|
11
|
-
// added (e.g. drawer keyboard scroll slack) still counts, as long as it has layout size on
|
|
12
|
-
// the axis.
|
|
13
|
-
return allowOverflowIntent ? element.clientHeight > 0 : element.scrollHeight > element.clientHeight;
|
|
14
|
-
}
|
|
15
|
-
function isScrollableX(element, allowOverflowIntent = false) {
|
|
16
|
-
const {
|
|
17
|
-
overflowX
|
|
18
|
-
} = getComputedStyle(element);
|
|
19
|
-
if (overflowX !== 'auto' && overflowX !== 'scroll') {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return allowOverflowIntent ? element.clientWidth > 0 : element.scrollWidth > element.clientWidth;
|
|
23
|
-
}
|
|
24
|
-
function isScrollable(element, axis, allowOverflowIntent = false) {
|
|
25
|
-
return axis === 'vertical' ? isScrollableY(element, allowOverflowIntent) : isScrollableX(element, allowOverflowIntent);
|
|
26
|
-
}
|
|
27
|
-
function hasScrollableAncestor(target, root, axes) {
|
|
28
|
-
// `getParentNode` crosses shadow boundaries (and slots), so a target inside a shadow root
|
|
29
|
-
// still walks up to scrollable ancestors in the light DOM.
|
|
30
|
-
let node = target;
|
|
31
|
-
while (isHTMLElement(node) && node !== root && !isLastTraversableNode(node)) {
|
|
32
|
-
for (const axis of axes) {
|
|
33
|
-
if (isScrollable(node, axis)) {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
node = getParentNode(node);
|
|
38
|
-
}
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
function findScrollableTouchTarget(target, root, axis = 'vertical', allowOverflowIntent = false) {
|
|
42
|
-
// `getParentNode` crosses shadow boundaries (and slots), so a target inside a shadow root
|
|
43
|
-
// still reaches a scrollable ancestor in the light DOM.
|
|
44
|
-
let node = isHTMLElement(target) ? target : null;
|
|
45
|
-
while (isHTMLElement(node) && node !== root && !isLastTraversableNode(node)) {
|
|
46
|
-
if (isScrollable(node, axis, allowOverflowIntent)) {
|
|
47
|
-
return node;
|
|
48
|
-
}
|
|
49
|
-
node = getParentNode(node);
|
|
50
|
-
}
|
|
51
|
-
return isScrollable(root, axis, allowOverflowIntent) ? root : null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { findScrollableTouchTarget as f, hasScrollableAncestor as h, isScrollableY as i };
|