@jobber/components 7.10.0 → 7.11.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/dist/Autocomplete/index.cjs +1 -0
- package/dist/Autocomplete/index.mjs +1 -0
- package/dist/Card/index.cjs +3 -0
- package/dist/Card/index.mjs +3 -0
- package/dist/Chip/index.cjs +1 -0
- package/dist/Chip/index.mjs +1 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +1 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -0
- package/dist/Chips/InternalChipDismissible/index.cjs +1 -0
- package/dist/Chips/InternalChipDismissible/index.mjs +1 -0
- package/dist/Chips/index.cjs +1 -0
- package/dist/Chips/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxActivator/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxActivator/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxContent/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxContent/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxTrigger/index.mjs +1 -0
- package/dist/Combobox/index.cjs +1 -0
- package/dist/Combobox/index.mjs +1 -0
- package/dist/ConfirmationModal/index.cjs +1 -0
- package/dist/ConfirmationModal/index.mjs +1 -0
- package/dist/DataDump/index.cjs +3 -0
- package/dist/DataDump/index.mjs +3 -0
- package/dist/DataList/components/DataListActions/index.cjs +1 -0
- package/dist/DataList/components/DataListActions/index.mjs +1 -0
- package/dist/DataList/components/DataListBulkActions/index.cjs +1 -0
- package/dist/DataList/components/DataListBulkActions/index.mjs +1 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -0
- package/dist/DataList/components/DataListFilters/index.cjs +1 -0
- package/dist/DataList/components/DataListFilters/index.mjs +1 -0
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItemActions/index.cjs +1 -0
- package/dist/DataList/components/DataListItemActions/index.mjs +1 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +1 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListLayoutActions/index.cjs +1 -0
- package/dist/DataList/components/DataListLayoutActions/index.mjs +1 -0
- package/dist/DataList/index.cjs +1 -0
- package/dist/DataList/index.mjs +1 -0
- package/dist/DatePicker/index.cjs +1 -0
- package/dist/DatePicker/index.mjs +1 -0
- package/dist/DrawerRoot-cjs.js +181 -968
- package/dist/DrawerRoot-es.js +5 -734
- package/dist/FormatFile/index.cjs +1 -0
- package/dist/FormatFile/index.mjs +1 -0
- package/dist/Gallery/index.cjs +1 -0
- package/dist/Gallery/index.mjs +1 -0
- package/dist/InputDate/index.cjs +1 -0
- package/dist/InputDate/index.mjs +1 -0
- package/dist/InputNumberExperimental-cjs.js +783 -0
- package/dist/InputNumberExperimental-es.js +763 -0
- package/dist/LightBox/index.cjs +1 -0
- package/dist/LightBox/index.mjs +1 -0
- package/dist/Menu/index.cjs +3 -0
- package/dist/Menu/index.mjs +3 -0
- package/dist/MenuSubmenuTrigger-cjs.js +202 -447
- package/dist/MenuSubmenuTrigger-es.js +7 -249
- package/dist/Modal/index.cjs +1 -0
- package/dist/Modal/index.mjs +1 -0
- package/dist/NumberFieldInput-cjs.js +1828 -0
- package/dist/NumberFieldInput-es.js +1788 -0
- package/dist/Page/index.cjs +3 -0
- package/dist/Page/index.mjs +3 -0
- package/dist/Popover/index.cjs +1 -0
- package/dist/Popover/index.mjs +1 -0
- package/dist/Tooltip/index.cjs +1 -0
- package/dist/Tooltip/index.mjs +1 -0
- package/dist/docs/Menu/Menu.md +197 -37
- package/dist/floating-ui.react-cjs.js +35 -34
- package/dist/floating-ui.react-dom-cjs.js +65 -64
- package/dist/floating-ui.react-dom-es.js +2 -1
- package/dist/floating-ui.react-es.js +2 -1
- package/dist/floating-ui.utils.dom-cjs.js +185 -0
- package/dist/floating-ui.utils.dom-es.js +165 -0
- package/dist/index.cjs +3 -0
- package/dist/index.esm-cjs.js +0 -183
- package/dist/index.esm-es.js +1 -165
- package/dist/index.mjs +3 -0
- package/dist/primitives/BottomSheet/index.cjs +3 -1
- package/dist/primitives/BottomSheet/index.mjs +3 -1
- package/dist/primitives/InputNumberExperimental/InputNumberExperimental.d.ts +20 -0
- package/dist/primitives/InputNumberExperimental/index.cjs +22 -0
- package/dist/primitives/InputNumberExperimental/index.d.ts +2 -0
- package/dist/primitives/InputNumberExperimental/index.mjs +16 -0
- package/dist/primitives/InputNumberExperimental/types.d.ts +147 -0
- package/dist/primitives/index.cjs +9 -1
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.mjs +8 -1
- package/dist/styles.css +499 -0
- package/dist/unstyledPrimitives/index.cjs +264 -2039
- package/dist/unstyledPrimitives/index.mjs +72 -1847
- package/dist/useBaseUiId-cjs.js +275 -0
- package/dist/useBaseUiId-es.js +251 -0
- package/dist/useValueChanged-cjs.js +820 -0
- package/dist/useValueChanged-es.js +736 -0
- package/package.json +2 -2
- package/rollup.config.mjs +13 -2
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
function hasWindow() {
|
|
2
|
+
return typeof window !== 'undefined';
|
|
3
|
+
}
|
|
4
|
+
function getNodeName(node) {
|
|
5
|
+
if (isNode(node)) {
|
|
6
|
+
return (node.nodeName || '').toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
9
|
+
// returning `#document` an infinite loop won't occur.
|
|
10
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
11
|
+
return '#document';
|
|
12
|
+
}
|
|
13
|
+
function getWindow(node) {
|
|
14
|
+
var _node$ownerDocument;
|
|
15
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
16
|
+
}
|
|
17
|
+
function getDocumentElement(node) {
|
|
18
|
+
var _ref;
|
|
19
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
20
|
+
}
|
|
21
|
+
function isNode(value) {
|
|
22
|
+
if (!hasWindow()) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
26
|
+
}
|
|
27
|
+
function isElement(value) {
|
|
28
|
+
if (!hasWindow()) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
32
|
+
}
|
|
33
|
+
function isHTMLElement(value) {
|
|
34
|
+
if (!hasWindow()) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
38
|
+
}
|
|
39
|
+
function isShadowRoot(value) {
|
|
40
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
44
|
+
}
|
|
45
|
+
function isOverflowElement(element) {
|
|
46
|
+
const {
|
|
47
|
+
overflow,
|
|
48
|
+
overflowX,
|
|
49
|
+
overflowY,
|
|
50
|
+
display
|
|
51
|
+
} = getComputedStyle(element);
|
|
52
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
53
|
+
}
|
|
54
|
+
function isTableElement(element) {
|
|
55
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
56
|
+
}
|
|
57
|
+
function isTopLayer(element) {
|
|
58
|
+
try {
|
|
59
|
+
if (element.matches(':popover-open')) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
} catch (_e) {
|
|
63
|
+
// no-op
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
return element.matches(':modal');
|
|
67
|
+
} catch (_e) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
72
|
+
const containRe = /paint|layout|strict|content/;
|
|
73
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
74
|
+
let isWebKitValue;
|
|
75
|
+
function isContainingBlock(elementOrCss) {
|
|
76
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
77
|
+
|
|
78
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
79
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
80
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
81
|
+
}
|
|
82
|
+
function getContainingBlock(element) {
|
|
83
|
+
let currentNode = getParentNode(element);
|
|
84
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
85
|
+
if (isContainingBlock(currentNode)) {
|
|
86
|
+
return currentNode;
|
|
87
|
+
} else if (isTopLayer(currentNode)) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
currentNode = getParentNode(currentNode);
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
function isWebKit() {
|
|
95
|
+
if (isWebKitValue == null) {
|
|
96
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
97
|
+
}
|
|
98
|
+
return isWebKitValue;
|
|
99
|
+
}
|
|
100
|
+
function isLastTraversableNode(node) {
|
|
101
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
102
|
+
}
|
|
103
|
+
function getComputedStyle(element) {
|
|
104
|
+
return getWindow(element).getComputedStyle(element);
|
|
105
|
+
}
|
|
106
|
+
function getNodeScroll(element) {
|
|
107
|
+
if (isElement(element)) {
|
|
108
|
+
return {
|
|
109
|
+
scrollLeft: element.scrollLeft,
|
|
110
|
+
scrollTop: element.scrollTop
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
scrollLeft: element.scrollX,
|
|
115
|
+
scrollTop: element.scrollY
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function getParentNode(node) {
|
|
119
|
+
if (getNodeName(node) === 'html') {
|
|
120
|
+
return node;
|
|
121
|
+
}
|
|
122
|
+
const result =
|
|
123
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
124
|
+
node.assignedSlot ||
|
|
125
|
+
// DOM Element detected.
|
|
126
|
+
node.parentNode ||
|
|
127
|
+
// ShadowRoot detected.
|
|
128
|
+
isShadowRoot(node) && node.host ||
|
|
129
|
+
// Fallback.
|
|
130
|
+
getDocumentElement(node);
|
|
131
|
+
return isShadowRoot(result) ? result.host : result;
|
|
132
|
+
}
|
|
133
|
+
function getNearestOverflowAncestor(node) {
|
|
134
|
+
const parentNode = getParentNode(node);
|
|
135
|
+
if (isLastTraversableNode(parentNode)) {
|
|
136
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
137
|
+
}
|
|
138
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
139
|
+
return parentNode;
|
|
140
|
+
}
|
|
141
|
+
return getNearestOverflowAncestor(parentNode);
|
|
142
|
+
}
|
|
143
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
144
|
+
var _node$ownerDocument2;
|
|
145
|
+
if (list === void 0) {
|
|
146
|
+
list = [];
|
|
147
|
+
}
|
|
148
|
+
if (traverseIframes === void 0) {
|
|
149
|
+
traverseIframes = true;
|
|
150
|
+
}
|
|
151
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
152
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
153
|
+
const win = getWindow(scrollableAncestor);
|
|
154
|
+
if (isBody) {
|
|
155
|
+
const frameElement = getFrameElement(win);
|
|
156
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
157
|
+
} else {
|
|
158
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function getFrameElement(win) {
|
|
162
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export { isHTMLElement as a, isElement as b, isNode as c, isLastTraversableNode as d, getParentNode as e, getComputedStyle as f, getNodeName as g, getOverflowAncestors as h, isShadowRoot as i, isWebKit as j, getWindow as k, getFrameElement as l, getDocumentElement as m, isTopLayer as n, isOverflowElement as o, getNodeScroll as p, isTableElement as q, isContainingBlock as r, getContainingBlock as s };
|
package/dist/index.cjs
CHANGED
|
@@ -109,6 +109,7 @@ require('./keysIn-cjs.js');
|
|
|
109
109
|
require('./_isIterateeCall-cjs.js');
|
|
110
110
|
require('./_setToString-cjs.js');
|
|
111
111
|
require('./floating-ui.react-cjs.js');
|
|
112
|
+
require('./floating-ui.utils.dom-cjs.js');
|
|
112
113
|
require('./index.esm-cjs.js');
|
|
113
114
|
require('react/jsx-runtime');
|
|
114
115
|
require('react-dom');
|
|
@@ -185,9 +186,11 @@ require('axios');
|
|
|
185
186
|
require('./useRenderElement-cjs.js');
|
|
186
187
|
require('./BottomSheet-cjs.js');
|
|
187
188
|
require('./DrawerRoot-cjs.js');
|
|
189
|
+
require('./useValueChanged-cjs.js');
|
|
188
190
|
require('./OverlaySeparator-cjs.js');
|
|
189
191
|
require('./Separator-cjs.js');
|
|
190
192
|
require('./MenuSubmenuTrigger-cjs.js');
|
|
193
|
+
require('./useBaseUiId-cjs.js');
|
|
191
194
|
require('./AtlantisPortalContent-cjs.js');
|
|
192
195
|
require('@jobber/formatters');
|
|
193
196
|
require('react-dom/client');
|
package/dist/index.esm-cjs.js
CHANGED
|
@@ -1,169 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function hasWindow() {
|
|
4
|
-
return typeof window !== 'undefined';
|
|
5
|
-
}
|
|
6
|
-
function getNodeName(node) {
|
|
7
|
-
if (isNode(node)) {
|
|
8
|
-
return (node.nodeName || '').toLowerCase();
|
|
9
|
-
}
|
|
10
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
11
|
-
// returning `#document` an infinite loop won't occur.
|
|
12
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
13
|
-
return '#document';
|
|
14
|
-
}
|
|
15
|
-
function getWindow(node) {
|
|
16
|
-
var _node$ownerDocument;
|
|
17
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
18
|
-
}
|
|
19
|
-
function getDocumentElement(node) {
|
|
20
|
-
var _ref;
|
|
21
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
22
|
-
}
|
|
23
|
-
function isNode(value) {
|
|
24
|
-
if (!hasWindow()) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
28
|
-
}
|
|
29
|
-
function isElement(value) {
|
|
30
|
-
if (!hasWindow()) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
34
|
-
}
|
|
35
|
-
function isHTMLElement(value) {
|
|
36
|
-
if (!hasWindow()) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
40
|
-
}
|
|
41
|
-
function isShadowRoot(value) {
|
|
42
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
46
|
-
}
|
|
47
|
-
function isOverflowElement(element) {
|
|
48
|
-
const {
|
|
49
|
-
overflow,
|
|
50
|
-
overflowX,
|
|
51
|
-
overflowY,
|
|
52
|
-
display
|
|
53
|
-
} = getComputedStyle$1(element);
|
|
54
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
55
|
-
}
|
|
56
|
-
function isTableElement(element) {
|
|
57
|
-
return /^(table|td|th)$/.test(getNodeName(element));
|
|
58
|
-
}
|
|
59
|
-
function isTopLayer(element) {
|
|
60
|
-
try {
|
|
61
|
-
if (element.matches(':popover-open')) {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
} catch (_e) {
|
|
65
|
-
// no-op
|
|
66
|
-
}
|
|
67
|
-
try {
|
|
68
|
-
return element.matches(':modal');
|
|
69
|
-
} catch (_e) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
74
|
-
const containRe = /paint|layout|strict|content/;
|
|
75
|
-
const isNotNone = value => !!value && value !== 'none';
|
|
76
|
-
let isWebKitValue;
|
|
77
|
-
function isContainingBlock(elementOrCss) {
|
|
78
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
79
|
-
|
|
80
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
81
|
-
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
82
|
-
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
83
|
-
}
|
|
84
|
-
function getContainingBlock(element) {
|
|
85
|
-
let currentNode = getParentNode(element);
|
|
86
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
87
|
-
if (isContainingBlock(currentNode)) {
|
|
88
|
-
return currentNode;
|
|
89
|
-
} else if (isTopLayer(currentNode)) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
currentNode = getParentNode(currentNode);
|
|
93
|
-
}
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
function isWebKit() {
|
|
97
|
-
if (isWebKitValue == null) {
|
|
98
|
-
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
99
|
-
}
|
|
100
|
-
return isWebKitValue;
|
|
101
|
-
}
|
|
102
|
-
function isLastTraversableNode(node) {
|
|
103
|
-
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
104
|
-
}
|
|
105
|
-
function getComputedStyle$1(element) {
|
|
106
|
-
return getWindow(element).getComputedStyle(element);
|
|
107
|
-
}
|
|
108
|
-
function getNodeScroll(element) {
|
|
109
|
-
if (isElement(element)) {
|
|
110
|
-
return {
|
|
111
|
-
scrollLeft: element.scrollLeft,
|
|
112
|
-
scrollTop: element.scrollTop
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
return {
|
|
116
|
-
scrollLeft: element.scrollX,
|
|
117
|
-
scrollTop: element.scrollY
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
function getParentNode(node) {
|
|
121
|
-
if (getNodeName(node) === 'html') {
|
|
122
|
-
return node;
|
|
123
|
-
}
|
|
124
|
-
const result =
|
|
125
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
126
|
-
node.assignedSlot ||
|
|
127
|
-
// DOM Element detected.
|
|
128
|
-
node.parentNode ||
|
|
129
|
-
// ShadowRoot detected.
|
|
130
|
-
isShadowRoot(node) && node.host ||
|
|
131
|
-
// Fallback.
|
|
132
|
-
getDocumentElement(node);
|
|
133
|
-
return isShadowRoot(result) ? result.host : result;
|
|
134
|
-
}
|
|
135
|
-
function getNearestOverflowAncestor(node) {
|
|
136
|
-
const parentNode = getParentNode(node);
|
|
137
|
-
if (isLastTraversableNode(parentNode)) {
|
|
138
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
139
|
-
}
|
|
140
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
141
|
-
return parentNode;
|
|
142
|
-
}
|
|
143
|
-
return getNearestOverflowAncestor(parentNode);
|
|
144
|
-
}
|
|
145
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
146
|
-
var _node$ownerDocument2;
|
|
147
|
-
if (list === void 0) {
|
|
148
|
-
list = [];
|
|
149
|
-
}
|
|
150
|
-
if (traverseIframes === void 0) {
|
|
151
|
-
traverseIframes = true;
|
|
152
|
-
}
|
|
153
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
154
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
155
|
-
const win = getWindow(scrollableAncestor);
|
|
156
|
-
if (isBody) {
|
|
157
|
-
const frameElement = getFrameElement(win);
|
|
158
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
159
|
-
} else {
|
|
160
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
function getFrameElement(win) {
|
|
164
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
3
|
/**
|
|
168
4
|
* Custom positioning reference element.
|
|
169
5
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
@@ -884,34 +720,15 @@ exports.getAlignment = getAlignment;
|
|
|
884
720
|
exports.getAlignmentAxis = getAlignmentAxis;
|
|
885
721
|
exports.getAlignmentSides = getAlignmentSides;
|
|
886
722
|
exports.getAxisLength = getAxisLength;
|
|
887
|
-
exports.getComputedStyle = getComputedStyle$1;
|
|
888
|
-
exports.getContainingBlock = getContainingBlock;
|
|
889
|
-
exports.getDocumentElement = getDocumentElement;
|
|
890
723
|
exports.getExpandedPlacements = getExpandedPlacements;
|
|
891
|
-
exports.getFrameElement = getFrameElement;
|
|
892
|
-
exports.getNodeName = getNodeName;
|
|
893
|
-
exports.getNodeScroll = getNodeScroll;
|
|
894
724
|
exports.getOppositeAlignmentPlacement = getOppositeAlignmentPlacement;
|
|
895
725
|
exports.getOppositeAxis = getOppositeAxis;
|
|
896
726
|
exports.getOppositeAxisPlacements = getOppositeAxisPlacements;
|
|
897
727
|
exports.getOppositePlacement = getOppositePlacement;
|
|
898
|
-
exports.getOverflowAncestors = getOverflowAncestors;
|
|
899
728
|
exports.getPaddingObject = getPaddingObject;
|
|
900
|
-
exports.getParentNode = getParentNode;
|
|
901
729
|
exports.getSide = getSide;
|
|
902
730
|
exports.getSideAxis = getSideAxis;
|
|
903
|
-
exports.getWindow = getWindow;
|
|
904
|
-
exports.isContainingBlock = isContainingBlock;
|
|
905
|
-
exports.isElement = isElement;
|
|
906
|
-
exports.isHTMLElement = isHTMLElement;
|
|
907
|
-
exports.isLastTraversableNode = isLastTraversableNode;
|
|
908
|
-
exports.isNode = isNode;
|
|
909
|
-
exports.isOverflowElement = isOverflowElement;
|
|
910
|
-
exports.isShadowRoot = isShadowRoot;
|
|
911
731
|
exports.isTabbable = isTabbable;
|
|
912
|
-
exports.isTableElement = isTableElement;
|
|
913
|
-
exports.isTopLayer = isTopLayer;
|
|
914
|
-
exports.isWebKit = isWebKit;
|
|
915
732
|
exports.max = max;
|
|
916
733
|
exports.min = min;
|
|
917
734
|
exports.placements = placements;
|
package/dist/index.esm-es.js
CHANGED
|
@@ -1,167 +1,3 @@
|
|
|
1
|
-
function hasWindow() {
|
|
2
|
-
return typeof window !== 'undefined';
|
|
3
|
-
}
|
|
4
|
-
function getNodeName(node) {
|
|
5
|
-
if (isNode(node)) {
|
|
6
|
-
return (node.nodeName || '').toLowerCase();
|
|
7
|
-
}
|
|
8
|
-
// Mocked nodes in testing environments may not be instances of Node. By
|
|
9
|
-
// returning `#document` an infinite loop won't occur.
|
|
10
|
-
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
11
|
-
return '#document';
|
|
12
|
-
}
|
|
13
|
-
function getWindow(node) {
|
|
14
|
-
var _node$ownerDocument;
|
|
15
|
-
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
16
|
-
}
|
|
17
|
-
function getDocumentElement(node) {
|
|
18
|
-
var _ref;
|
|
19
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
20
|
-
}
|
|
21
|
-
function isNode(value) {
|
|
22
|
-
if (!hasWindow()) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
26
|
-
}
|
|
27
|
-
function isElement(value) {
|
|
28
|
-
if (!hasWindow()) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
32
|
-
}
|
|
33
|
-
function isHTMLElement(value) {
|
|
34
|
-
if (!hasWindow()) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
38
|
-
}
|
|
39
|
-
function isShadowRoot(value) {
|
|
40
|
-
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
44
|
-
}
|
|
45
|
-
function isOverflowElement(element) {
|
|
46
|
-
const {
|
|
47
|
-
overflow,
|
|
48
|
-
overflowX,
|
|
49
|
-
overflowY,
|
|
50
|
-
display
|
|
51
|
-
} = getComputedStyle$1(element);
|
|
52
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
53
|
-
}
|
|
54
|
-
function isTableElement(element) {
|
|
55
|
-
return /^(table|td|th)$/.test(getNodeName(element));
|
|
56
|
-
}
|
|
57
|
-
function isTopLayer(element) {
|
|
58
|
-
try {
|
|
59
|
-
if (element.matches(':popover-open')) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
} catch (_e) {
|
|
63
|
-
// no-op
|
|
64
|
-
}
|
|
65
|
-
try {
|
|
66
|
-
return element.matches(':modal');
|
|
67
|
-
} catch (_e) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
72
|
-
const containRe = /paint|layout|strict|content/;
|
|
73
|
-
const isNotNone = value => !!value && value !== 'none';
|
|
74
|
-
let isWebKitValue;
|
|
75
|
-
function isContainingBlock(elementOrCss) {
|
|
76
|
-
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
77
|
-
|
|
78
|
-
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
79
|
-
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
80
|
-
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
81
|
-
}
|
|
82
|
-
function getContainingBlock(element) {
|
|
83
|
-
let currentNode = getParentNode(element);
|
|
84
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
85
|
-
if (isContainingBlock(currentNode)) {
|
|
86
|
-
return currentNode;
|
|
87
|
-
} else if (isTopLayer(currentNode)) {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
currentNode = getParentNode(currentNode);
|
|
91
|
-
}
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
function isWebKit() {
|
|
95
|
-
if (isWebKitValue == null) {
|
|
96
|
-
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
97
|
-
}
|
|
98
|
-
return isWebKitValue;
|
|
99
|
-
}
|
|
100
|
-
function isLastTraversableNode(node) {
|
|
101
|
-
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
102
|
-
}
|
|
103
|
-
function getComputedStyle$1(element) {
|
|
104
|
-
return getWindow(element).getComputedStyle(element);
|
|
105
|
-
}
|
|
106
|
-
function getNodeScroll(element) {
|
|
107
|
-
if (isElement(element)) {
|
|
108
|
-
return {
|
|
109
|
-
scrollLeft: element.scrollLeft,
|
|
110
|
-
scrollTop: element.scrollTop
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
scrollLeft: element.scrollX,
|
|
115
|
-
scrollTop: element.scrollY
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
function getParentNode(node) {
|
|
119
|
-
if (getNodeName(node) === 'html') {
|
|
120
|
-
return node;
|
|
121
|
-
}
|
|
122
|
-
const result =
|
|
123
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
124
|
-
node.assignedSlot ||
|
|
125
|
-
// DOM Element detected.
|
|
126
|
-
node.parentNode ||
|
|
127
|
-
// ShadowRoot detected.
|
|
128
|
-
isShadowRoot(node) && node.host ||
|
|
129
|
-
// Fallback.
|
|
130
|
-
getDocumentElement(node);
|
|
131
|
-
return isShadowRoot(result) ? result.host : result;
|
|
132
|
-
}
|
|
133
|
-
function getNearestOverflowAncestor(node) {
|
|
134
|
-
const parentNode = getParentNode(node);
|
|
135
|
-
if (isLastTraversableNode(parentNode)) {
|
|
136
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
137
|
-
}
|
|
138
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
139
|
-
return parentNode;
|
|
140
|
-
}
|
|
141
|
-
return getNearestOverflowAncestor(parentNode);
|
|
142
|
-
}
|
|
143
|
-
function getOverflowAncestors(node, list, traverseIframes) {
|
|
144
|
-
var _node$ownerDocument2;
|
|
145
|
-
if (list === void 0) {
|
|
146
|
-
list = [];
|
|
147
|
-
}
|
|
148
|
-
if (traverseIframes === void 0) {
|
|
149
|
-
traverseIframes = true;
|
|
150
|
-
}
|
|
151
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
152
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
153
|
-
const win = getWindow(scrollableAncestor);
|
|
154
|
-
if (isBody) {
|
|
155
|
-
const frameElement = getFrameElement(win);
|
|
156
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
157
|
-
} else {
|
|
158
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function getFrameElement(win) {
|
|
162
|
-
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
1
|
/**
|
|
166
2
|
* Custom positioning reference element.
|
|
167
3
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
@@ -873,4 +709,4 @@ var isTabbable = function isTabbable(node, options) {
|
|
|
873
709
|
return isNodeMatchingSelectorTabbable(options, node);
|
|
874
710
|
};
|
|
875
711
|
|
|
876
|
-
export {
|
|
712
|
+
export { focusable as a, getSideAxis as b, getOppositePlacement as c, getExpandedPlacements as d, evaluate as e, floor as f, getSide as g, getOppositeAxisPlacements as h, isTabbable as i, getAlignmentSides as j, getAlignment as k, max as l, min as m, getAlignmentAxis as n, getPaddingObject as o, clamp as p, getAxisLength as q, rectToClientRect as r, sides as s, tabbable as t, getOppositeAxis as u, placements as v, getOppositeAlignmentPlacement as w, createCoords as x, round as y };
|
package/dist/index.mjs
CHANGED
|
@@ -107,6 +107,7 @@ import './keysIn-es.js';
|
|
|
107
107
|
import './_isIterateeCall-es.js';
|
|
108
108
|
import './_setToString-es.js';
|
|
109
109
|
import './floating-ui.react-es.js';
|
|
110
|
+
import './floating-ui.utils.dom-es.js';
|
|
110
111
|
import './index.esm-es.js';
|
|
111
112
|
import 'react/jsx-runtime';
|
|
112
113
|
import 'react-dom';
|
|
@@ -183,9 +184,11 @@ import 'axios';
|
|
|
183
184
|
import './useRenderElement-es.js';
|
|
184
185
|
import './BottomSheet-es.js';
|
|
185
186
|
import './DrawerRoot-es.js';
|
|
187
|
+
import './useValueChanged-es.js';
|
|
186
188
|
import './OverlaySeparator-es.js';
|
|
187
189
|
import './Separator-es.js';
|
|
188
190
|
import './MenuSubmenuTrigger-es.js';
|
|
191
|
+
import './useBaseUiId-es.js';
|
|
189
192
|
import './AtlantisPortalContent-es.js';
|
|
190
193
|
import '@jobber/formatters';
|
|
191
194
|
import 'react-dom/client';
|
|
@@ -6,9 +6,11 @@ require('react');
|
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('../../DrawerRoot-cjs.js');
|
|
8
8
|
require('../../useRenderElement-cjs.js');
|
|
9
|
+
require('../../useValueChanged-cjs.js');
|
|
10
|
+
require('react-dom');
|
|
9
11
|
require('react/jsx-runtime');
|
|
10
12
|
require('../../index.esm-cjs.js');
|
|
11
|
-
require('
|
|
13
|
+
require('../../floating-ui.utils.dom-cjs.js');
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
@@ -4,6 +4,8 @@ import 'react';
|
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '../../DrawerRoot-es.js';
|
|
6
6
|
import '../../useRenderElement-es.js';
|
|
7
|
+
import '../../useValueChanged-es.js';
|
|
8
|
+
import 'react-dom';
|
|
7
9
|
import 'react/jsx-runtime';
|
|
8
10
|
import '../../index.esm-es.js';
|
|
9
|
-
import '
|
|
11
|
+
import '../../floating-ui.utils.dom-es.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { InputNumberExperimentalAffixCompoundProps, InputNumberExperimentalInputProps, InputNumberExperimentalProps, InputNumberExperimentalRef, InputNumberExperimentalStepperCompoundProps } from "./types";
|
|
3
|
+
declare function InputNumberExperimentalInputCompound(props?: InputNumberExperimentalInputProps): React.JSX.Element;
|
|
4
|
+
declare namespace InputNumberExperimentalInputCompound {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
declare function InputNumberExperimentalAffixCompound({ variation, label, icon, onClick, ariaLabel, }: InputNumberExperimentalAffixCompoundProps): React.JSX.Element | null;
|
|
8
|
+
declare namespace InputNumberExperimentalAffixCompound {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
declare function InputNumberExperimentalStepperCompound({ incrementLabel, decrementLabel, }?: InputNumberExperimentalStepperCompoundProps): React.JSX.Element | null;
|
|
12
|
+
declare namespace InputNumberExperimentalStepperCompound {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const InputNumberExperimental: React.ForwardRefExoticComponent<InputNumberExperimentalProps & React.RefAttributes<InputNumberExperimentalRef>> & {
|
|
16
|
+
Input: typeof InputNumberExperimentalInputCompound;
|
|
17
|
+
Affix: typeof InputNumberExperimentalAffixCompound;
|
|
18
|
+
Stepper: typeof InputNumberExperimentalStepperCompound;
|
|
19
|
+
};
|
|
20
|
+
export type { InputNumberExperimentalAffix, InputNumberExperimentalProps, InputNumberExperimentalRef, InputNumberExperimentalSuffix, InputNumberExperimentalSuffixProp, } from "./types";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var InputNumberExperimental = require('../../InputNumberExperimental-cjs.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('classnames');
|
|
6
|
+
require('../../Button-cjs.js');
|
|
7
|
+
require('../../tslib.es6-cjs.js');
|
|
8
|
+
require('react-router-dom');
|
|
9
|
+
require('../../Icon-cjs.js');
|
|
10
|
+
require('@jobber/design');
|
|
11
|
+
require('../../Typography-cjs.js');
|
|
12
|
+
require('../../useValueChanged-cjs.js');
|
|
13
|
+
require('../../useRenderElement-cjs.js');
|
|
14
|
+
require('react-dom');
|
|
15
|
+
require('../../NumberFieldInput-cjs.js');
|
|
16
|
+
require('../../floating-ui.utils.dom-cjs.js');
|
|
17
|
+
require('../../useBaseUiId-cjs.js');
|
|
18
|
+
require('react/jsx-runtime');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.InputNumberExperimental = InputNumberExperimental.InputNumberExperimental;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { I as InputNumberExperimental } from '../../InputNumberExperimental-es.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'classnames';
|
|
4
|
+
import '../../Button-es.js';
|
|
5
|
+
import '../../tslib.es6-es.js';
|
|
6
|
+
import 'react-router-dom';
|
|
7
|
+
import '../../Icon-es.js';
|
|
8
|
+
import '@jobber/design';
|
|
9
|
+
import '../../Typography-es.js';
|
|
10
|
+
import '../../useValueChanged-es.js';
|
|
11
|
+
import '../../useRenderElement-es.js';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import '../../NumberFieldInput-es.js';
|
|
14
|
+
import '../../floating-ui.utils.dom-es.js';
|
|
15
|
+
import '../../useBaseUiId-es.js';
|
|
16
|
+
import 'react/jsx-runtime';
|