welcome-ui 8.1.0 → 8.2.0-alpha.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/Alert.mjs +28 -28
- package/dist/Avatar.mjs +47 -44
- package/dist/Breadcrumb.mjs +169 -167
- package/dist/ButtonGroup.mjs +14 -14
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomPopper-B2Cqfph4.mjs → CustomPopper-DezjKb9n.mjs} +12 -17
- package/dist/DatePicker.mjs +74 -74
- package/dist/DateTimePicker.mjs +60 -59
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +51 -55
- package/dist/DropdownMenu.mjs +183 -183
- package/dist/Field.mjs +9 -10
- package/dist/FileDrop.mjs +455 -465
- package/dist/FileUpload.mjs +74 -81
- package/dist/Files.mjs +15 -15
- package/dist/InputText.mjs +42 -42
- package/dist/Label.mjs +1 -1
- package/dist/Modal.mjs +115 -119
- package/dist/Pagination.mjs +31 -29
- package/dist/PasswordInput.mjs +9 -9
- package/dist/Picker.mjs +23 -23
- package/dist/Radio.mjs +35 -35
- package/dist/RadioTab.mjs +1 -1
- package/dist/Search.mjs +123 -127
- package/dist/Select.mjs +301 -318
- package/dist/Slider.mjs +228 -224
- package/dist/Stack.mjs +15 -12
- package/dist/Swiper.mjs +126 -127
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +19 -19
- package/dist/Text.mjs +35 -37
- package/dist/Textarea.mjs +1 -1
- package/dist/TimePicker.mjs +61 -61
- package/dist/Toast.mjs +3 -3
- package/dist/Toggle.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/VariantIcon.mjs +14 -5
- package/dist/WuiProvider.mjs +35 -38
- package/dist/{field-styles-BVlRlvuu.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{hex-to-rgba-DU_XzKIK.mjs → hex-to-rgba-BIDK-3ab.mjs} +2 -2
- package/dist/{index-5HBq1O6Z.mjs → index-62h-enZF.mjs} +31 -31
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/theme.mjs +23 -23
- package/dist/throttle-BDBzFeFj.mjs +13 -0
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Accordion/theme.d.ts +1 -1
- package/dist/types/components/Alert/styles.d.ts +9 -9
- package/dist/types/components/Alert/theme.d.ts +3 -3
- package/dist/types/components/AspectRatio/styles.d.ts +2 -3
- package/dist/types/components/Avatar/index.d.ts +2 -1
- package/dist/types/components/Avatar/styles.d.ts +8 -8
- package/dist/types/components/Avatar/theme.d.ts +2 -2
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/dist/types/components/Badge/styles.d.ts +4 -4
- package/dist/types/components/Badge/theme.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/styles.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/ButtonGroup/index.d.ts +2 -2
- package/dist/types/components/Card/Cover.styles.d.ts +4 -4
- package/dist/types/components/Card/theme.d.ts +1 -1
- package/dist/types/components/Checkbox/styles.d.ts +1 -1
- package/dist/types/components/Checkbox/theme.d.ts +1 -1
- package/dist/types/components/ClearButton/index.d.ts +4 -4
- package/dist/types/components/ClearButton/styles.d.ts +4 -4
- package/dist/types/components/CloseButton/styles.d.ts +4 -4
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/utils.d.ts +1 -1
- package/dist/types/components/Drawer/index.d.ts +5 -5
- package/dist/types/components/Drawer/styles.d.ts +4 -4
- package/dist/types/components/Drawer/theme.d.ts +2 -2
- package/dist/types/components/DropdownMenu/index.d.ts +1 -1
- package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
- package/dist/types/components/Field/utils.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +4 -4
- package/dist/types/components/FileDrop/theme.d.ts +1 -1
- package/dist/types/components/FileUpload/index.d.ts +2 -2
- package/dist/types/components/Files/index.d.ts +3 -3
- package/dist/types/components/Files/types.d.ts +1 -1
- package/dist/types/components/Hint/theme.d.ts +1 -1
- package/dist/types/components/Icon/theme.d.ts +2 -2
- package/dist/types/components/Icons/Sun/content.json.d.ts +1 -2
- package/dist/types/components/Label/theme.d.ts +1 -1
- package/dist/types/components/Link/index.d.ts +2 -2
- package/dist/types/components/Link/styles.d.ts +4 -4
- package/dist/types/components/Link/theme.d.ts +1 -1
- package/dist/types/components/Loader/styles.d.ts +4 -4
- package/dist/types/components/Loader/theme.d.ts +2 -2
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +4 -4
- package/dist/types/components/Modal/Assets/index.d.ts +8 -8
- package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
- package/dist/types/components/Modal/Close.d.ts +2 -2
- package/dist/types/components/Modal/Content.d.ts +5 -3
- package/dist/types/components/Modal/index.d.ts +10 -10
- package/dist/types/components/Modal/styles.d.ts +7 -7
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Pagination/theme.d.ts +1 -1
- package/dist/types/components/Picker/index.d.ts +1 -1
- package/dist/types/components/Picker/styles.d.ts +1 -1
- package/dist/types/components/Popover/styles.d.ts +4 -4
- package/dist/types/components/Popover/theme.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +2 -2
- package/dist/types/components/Radio/styles.d.ts +5 -5
- package/dist/types/components/Radio/theme.d.ts +1 -1
- package/dist/types/components/RadioTab/index.d.ts +1 -1
- package/dist/types/components/RadioTab/styles.d.ts +10 -4
- package/dist/types/components/RadioTab/theme.d.ts +1 -1
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Select/index.d.ts +4 -4
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Select/utils.d.ts +4 -8
- package/dist/types/components/Shape/styles.d.ts +3 -3
- package/dist/types/components/Slider/styles.d.ts +16 -16
- package/dist/types/components/Slider/theme.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +1 -1
- package/dist/types/components/Swiper/styles.d.ts +16 -16
- package/dist/types/components/Swiper/theme.d.ts +1 -1
- package/dist/types/components/System/index.d.ts +6 -6
- package/dist/types/components/Table/theme.d.ts +1 -1
- package/dist/types/components/Tabs/ActiveBar.d.ts +2 -2
- package/dist/types/components/Tabs/TabList.d.ts +2 -2
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Textarea/theme.d.ts +1 -1
- package/dist/types/components/Toast/ToastWrapper.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +14 -14
- package/dist/types/components/Toast/theme.d.ts +1 -1
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Toggle/styles.d.ts +4 -5
- package/dist/types/components/Toggle/theme.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +2 -2
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/Tooltip/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/dist/types/components/WuiProvider/font.d.ts +5 -3
- package/dist/types/components/WuiProvider/index.d.ts +1 -1
- package/dist/types/theme/colors.d.ts +9 -1
- package/dist/types/theme/defaultFields.d.ts +5 -5
- package/dist/types/theme/index.d.ts +2 -2
- package/dist/types/theme/screens.d.ts +7 -7
- package/dist/types/theme/space.d.ts +9 -9
- package/dist/types/theme/typography.d.ts +1 -1
- package/dist/types/utils/field-styles.d.ts +6 -6
- package/dist/types/utils/use-create-portal.d.ts +1 -1
- package/dist/types/utils/use-viewport.d.ts +2 -2
- package/dist/{use-fork-ref-DvaCTfQ_.mjs → use-fork-ref-CUZErtAC.mjs} +3 -4
- package/dist/utils.mjs +29 -102
- package/dist/wrap-children-CzmhoRzd.mjs +13 -0
- package/package.json +2 -2
- package/dist/throttle-CW18pWlW.mjs +0 -13
- package/dist/wrap-children-DBSD-X5-.mjs +0 -9
package/dist/Breadcrumb.mjs
CHANGED
|
@@ -1,63 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import
|
|
2
|
+
import { j as b } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { useRef as P, useState as X, Children as ge, cloneElement as me, useCallback as j, useMemo as xe, useEffect as q } from "react";
|
|
4
4
|
import "./Icon.mjs";
|
|
5
|
-
import { R as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { t as
|
|
8
|
-
import { Box as
|
|
9
|
-
import y, { th as O, css as
|
|
10
|
-
import { h as
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
import { R as we } from "./index-CYmF7qCH.mjs";
|
|
6
|
+
import { forwardRef as ne } from "./System.mjs";
|
|
7
|
+
import { t as ze } from "./throttle-BDBzFeFj.mjs";
|
|
8
|
+
import { Box as Oe } from "./Box.mjs";
|
|
9
|
+
import y, { th as O, css as ie } from "@xstyled/styled-components";
|
|
10
|
+
import { h as Re } from "./hex-to-rgba-BIDK-3ab.mjs";
|
|
11
|
+
import "./overflow-ellipsis-DGV5Kgt-.mjs";
|
|
12
|
+
import "./index-BhcLigYU.mjs";
|
|
13
|
+
var x = [], ye = function() {
|
|
14
|
+
return x.some(function(e) {
|
|
13
15
|
return e.activeTargets.length > 0;
|
|
14
16
|
});
|
|
15
|
-
},
|
|
16
|
-
return
|
|
17
|
+
}, Ee = function() {
|
|
18
|
+
return x.some(function(e) {
|
|
17
19
|
return e.skippedTargets.length > 0;
|
|
18
20
|
});
|
|
19
|
-
},
|
|
21
|
+
}, J = "ResizeObserver loop completed with undelivered notifications.", Be = function() {
|
|
20
22
|
var e;
|
|
21
23
|
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
22
|
-
message:
|
|
23
|
-
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message =
|
|
24
|
+
message: J
|
|
25
|
+
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = J), window.dispatchEvent(e);
|
|
24
26
|
}, k;
|
|
25
27
|
(function(e) {
|
|
26
28
|
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
27
29
|
})(k || (k = {}));
|
|
28
|
-
var
|
|
30
|
+
var w = function(e) {
|
|
29
31
|
return Object.freeze(e);
|
|
30
|
-
},
|
|
32
|
+
}, Te = /* @__PURE__ */ function() {
|
|
31
33
|
function e(t, r) {
|
|
32
|
-
this.inlineSize = t, this.blockSize = r,
|
|
34
|
+
this.inlineSize = t, this.blockSize = r, w(this);
|
|
33
35
|
}
|
|
34
36
|
return e;
|
|
35
|
-
}(),
|
|
37
|
+
}(), oe = function() {
|
|
36
38
|
function e(t, r, n, i) {
|
|
37
|
-
return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width,
|
|
39
|
+
return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, w(this);
|
|
38
40
|
}
|
|
39
41
|
return e.prototype.toJSON = function() {
|
|
40
|
-
var t = this, r = t.x, n = t.y, i = t.top,
|
|
41
|
-
return { x: r, y: n, top: i, right:
|
|
42
|
+
var t = this, r = t.x, n = t.y, i = t.top, s = t.right, o = t.bottom, v = t.left, l = t.width, c = t.height;
|
|
43
|
+
return { x: r, y: n, top: i, right: s, bottom: o, left: v, width: l, height: c };
|
|
42
44
|
}, e.fromRect = function(t) {
|
|
43
45
|
return new e(t.x, t.y, t.width, t.height);
|
|
44
46
|
}, e;
|
|
45
|
-
}(),
|
|
47
|
+
}(), G = function(e) {
|
|
46
48
|
return e instanceof SVGElement && "getBBox" in e;
|
|
47
|
-
},
|
|
48
|
-
if (
|
|
49
|
+
}, se = function(e) {
|
|
50
|
+
if (G(e)) {
|
|
49
51
|
var t = e.getBBox(), r = t.width, n = t.height;
|
|
50
52
|
return !r && !n;
|
|
51
53
|
}
|
|
52
|
-
var i = e,
|
|
53
|
-
return !(
|
|
54
|
-
},
|
|
54
|
+
var i = e, s = i.offsetWidth, o = i.offsetHeight;
|
|
55
|
+
return !(s || o || e.getClientRects().length);
|
|
56
|
+
}, U = function(e) {
|
|
55
57
|
var t;
|
|
56
58
|
if (e instanceof Element)
|
|
57
59
|
return !0;
|
|
58
60
|
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
59
61
|
return !!(r && e instanceof r.Element);
|
|
60
|
-
},
|
|
62
|
+
}, Se = function(e) {
|
|
61
63
|
switch (e.tagName) {
|
|
62
64
|
case "INPUT":
|
|
63
65
|
if (e.type !== "image")
|
|
@@ -72,59 +74,59 @@ var z = function(e) {
|
|
|
72
74
|
return !0;
|
|
73
75
|
}
|
|
74
76
|
return !1;
|
|
75
|
-
}, C = typeof window < "u" ? window : {},
|
|
77
|
+
}, C = typeof window < "u" ? window : {}, I = /* @__PURE__ */ new WeakMap(), Y = /auto|scroll/, Ce = /^tb|vertical/, ke = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
|
|
76
78
|
return parseFloat(e || "0");
|
|
77
79
|
}, R = function(e, t, r) {
|
|
78
|
-
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new
|
|
79
|
-
},
|
|
80
|
+
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Te((r ? t : e) || 0, (r ? e : t) || 0);
|
|
81
|
+
}, K = w({
|
|
80
82
|
devicePixelContentBoxSize: R(),
|
|
81
83
|
borderBoxSize: R(),
|
|
82
84
|
contentBoxSize: R(),
|
|
83
|
-
contentRect: new
|
|
84
|
-
}),
|
|
85
|
-
if (t === void 0 && (t = !1),
|
|
86
|
-
return
|
|
87
|
-
if (
|
|
88
|
-
return
|
|
89
|
-
var r = getComputedStyle(e), n =
|
|
90
|
-
devicePixelContentBoxSize: R(Math.round(
|
|
91
|
-
borderBoxSize: R(
|
|
92
|
-
contentBoxSize: R(
|
|
93
|
-
contentRect: new
|
|
85
|
+
contentRect: new oe(0, 0, 0, 0)
|
|
86
|
+
}), ae = function(e, t) {
|
|
87
|
+
if (t === void 0 && (t = !1), I.has(e) && !t)
|
|
88
|
+
return I.get(e);
|
|
89
|
+
if (se(e))
|
|
90
|
+
return I.set(e, K), K;
|
|
91
|
+
var r = getComputedStyle(e), n = G(e) && e.ownerSVGElement && e.getBBox(), i = !ke && r.boxSizing === "border-box", s = Ce.test(r.writingMode || ""), o = !n && Y.test(r.overflowY || ""), v = !n && Y.test(r.overflowX || ""), l = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), E = n ? 0 : f(r.paddingBottom), d = n ? 0 : f(r.paddingLeft), W = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), A = n ? 0 : f(r.borderBottomWidth), $ = n ? 0 : f(r.borderLeftWidth), B = d + c, g = l + E, T = $ + D, S = W + A, a = v ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, h = i ? B + T : 0, m = i ? g + S : 0, p = n ? n.width : f(r.width) - h - u, z = n ? n.height : f(r.height) - m - a, pe = p + B + u + T, be = z + g + a + S, V = w({
|
|
92
|
+
devicePixelContentBoxSize: R(Math.round(p * devicePixelRatio), Math.round(z * devicePixelRatio), s),
|
|
93
|
+
borderBoxSize: R(pe, be, s),
|
|
94
|
+
contentBoxSize: R(p, z, s),
|
|
95
|
+
contentRect: new oe(d, l, p, z)
|
|
94
96
|
});
|
|
95
|
-
return
|
|
96
|
-
},
|
|
97
|
-
var n =
|
|
97
|
+
return I.set(e, V), V;
|
|
98
|
+
}, ce = function(e, t, r) {
|
|
99
|
+
var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, o = n.devicePixelContentBoxSize;
|
|
98
100
|
switch (t) {
|
|
99
101
|
case k.DEVICE_PIXEL_CONTENT_BOX:
|
|
100
102
|
return o;
|
|
101
103
|
case k.BORDER_BOX:
|
|
102
104
|
return i;
|
|
103
105
|
default:
|
|
104
|
-
return
|
|
106
|
+
return s;
|
|
105
107
|
}
|
|
106
|
-
},
|
|
108
|
+
}, De = /* @__PURE__ */ function() {
|
|
107
109
|
function e(t) {
|
|
108
|
-
var r =
|
|
109
|
-
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize =
|
|
110
|
+
var r = ae(t);
|
|
111
|
+
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = w([r.borderBoxSize]), this.contentBoxSize = w([r.contentBoxSize]), this.devicePixelContentBoxSize = w([r.devicePixelContentBoxSize]);
|
|
110
112
|
}
|
|
111
113
|
return e;
|
|
112
|
-
}(),
|
|
113
|
-
if (
|
|
114
|
+
}(), ue = function(e) {
|
|
115
|
+
if (se(e))
|
|
114
116
|
return 1 / 0;
|
|
115
117
|
for (var t = 0, r = e.parentNode; r; )
|
|
116
118
|
t += 1, r = r.parentNode;
|
|
117
119
|
return t;
|
|
118
|
-
},
|
|
120
|
+
}, Ae = function() {
|
|
119
121
|
var e = 1 / 0, t = [];
|
|
120
|
-
|
|
122
|
+
x.forEach(function(o) {
|
|
121
123
|
if (o.activeTargets.length !== 0) {
|
|
122
|
-
var
|
|
124
|
+
var v = [];
|
|
123
125
|
o.activeTargets.forEach(function(c) {
|
|
124
|
-
var E = new
|
|
125
|
-
|
|
126
|
+
var E = new De(c.target), d = ue(c.target);
|
|
127
|
+
v.push(E), c.lastReportedSize = ce(c.target, c.observedBox), d < e && (e = d);
|
|
126
128
|
}), t.push(function() {
|
|
127
|
-
o.callback.call(o.observer,
|
|
129
|
+
o.callback.call(o.observer, v, o.observer);
|
|
128
130
|
}), o.activeTargets.splice(0, o.activeTargets.length);
|
|
129
131
|
}
|
|
130
132
|
});
|
|
@@ -133,38 +135,38 @@ var z = function(e) {
|
|
|
133
135
|
i();
|
|
134
136
|
}
|
|
135
137
|
return e;
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
+
}, Q = function(e) {
|
|
139
|
+
x.forEach(function(r) {
|
|
138
140
|
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
139
|
-
i.isActive() && (
|
|
141
|
+
i.isActive() && (ue(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
140
142
|
});
|
|
141
143
|
});
|
|
142
|
-
},
|
|
144
|
+
}, Ie = function() {
|
|
143
145
|
var e = 0;
|
|
144
|
-
for (
|
|
145
|
-
e =
|
|
146
|
-
return
|
|
147
|
-
},
|
|
146
|
+
for (Q(e); ye(); )
|
|
147
|
+
e = Ae(), Q(e);
|
|
148
|
+
return Ee() && Be(), e > 0;
|
|
149
|
+
}, _, ve = [], Me = function() {
|
|
148
150
|
return ve.splice(0).forEach(function(e) {
|
|
149
151
|
return e();
|
|
150
152
|
});
|
|
151
|
-
},
|
|
152
|
-
if (!
|
|
153
|
+
}, Le = function(e) {
|
|
154
|
+
if (!_) {
|
|
153
155
|
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
154
156
|
new MutationObserver(function() {
|
|
155
|
-
return
|
|
156
|
-
}).observe(r, n),
|
|
157
|
+
return Me();
|
|
158
|
+
}).observe(r, n), _ = function() {
|
|
157
159
|
r.textContent = "".concat(t ? t-- : t++);
|
|
158
160
|
};
|
|
159
161
|
}
|
|
160
|
-
ve.push(e),
|
|
161
|
-
},
|
|
162
|
-
|
|
162
|
+
ve.push(e), _();
|
|
163
|
+
}, Ne = function(e) {
|
|
164
|
+
Le(function() {
|
|
163
165
|
requestAnimationFrame(e);
|
|
164
166
|
});
|
|
165
|
-
}, N = 0,
|
|
167
|
+
}, N = 0, We = function() {
|
|
166
168
|
return !!N;
|
|
167
|
-
},
|
|
169
|
+
}, $e = 250, Pe = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, Z = [
|
|
168
170
|
"resize",
|
|
169
171
|
"load",
|
|
170
172
|
"transitionend",
|
|
@@ -179,9 +181,9 @@ var z = function(e) {
|
|
|
179
181
|
"mouseout",
|
|
180
182
|
"blur",
|
|
181
183
|
"focus"
|
|
182
|
-
],
|
|
184
|
+
], ee = function(e) {
|
|
183
185
|
return e === void 0 && (e = 0), Date.now() + e;
|
|
184
|
-
},
|
|
186
|
+
}, F = !1, _e = function() {
|
|
185
187
|
function e() {
|
|
186
188
|
var t = this;
|
|
187
189
|
this.stopped = !0, this.listener = function() {
|
|
@@ -190,15 +192,15 @@ var z = function(e) {
|
|
|
190
192
|
}
|
|
191
193
|
return e.prototype.run = function(t) {
|
|
192
194
|
var r = this;
|
|
193
|
-
if (t === void 0 && (t =
|
|
194
|
-
|
|
195
|
-
var n =
|
|
196
|
-
|
|
195
|
+
if (t === void 0 && (t = $e), !F) {
|
|
196
|
+
F = !0;
|
|
197
|
+
var n = ee(t);
|
|
198
|
+
Ne(function() {
|
|
197
199
|
var i = !1;
|
|
198
200
|
try {
|
|
199
|
-
i =
|
|
201
|
+
i = Ie();
|
|
200
202
|
} finally {
|
|
201
|
-
if (
|
|
203
|
+
if (F = !1, t = n - ee(), !We())
|
|
202
204
|
return;
|
|
203
205
|
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
204
206
|
}
|
|
@@ -213,20 +215,20 @@ var z = function(e) {
|
|
|
213
215
|
document.body ? r() : C.addEventListener("DOMContentLoaded", r);
|
|
214
216
|
}, e.prototype.start = function() {
|
|
215
217
|
var t = this;
|
|
216
|
-
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(),
|
|
218
|
+
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), Z.forEach(function(r) {
|
|
217
219
|
return C.addEventListener(r, t.listener, !0);
|
|
218
220
|
}));
|
|
219
221
|
}, e.prototype.stop = function() {
|
|
220
222
|
var t = this;
|
|
221
|
-
this.stopped || (this.observer && this.observer.disconnect(),
|
|
223
|
+
this.stopped || (this.observer && this.observer.disconnect(), Z.forEach(function(r) {
|
|
222
224
|
return C.removeEventListener(r, t.listener, !0);
|
|
223
225
|
}), this.stopped = !0);
|
|
224
226
|
}, e;
|
|
225
|
-
}(),
|
|
226
|
-
!N && e > 0 &&
|
|
227
|
-
},
|
|
228
|
-
return !
|
|
229
|
-
},
|
|
227
|
+
}(), H = new _e(), te = function(e) {
|
|
228
|
+
!N && e > 0 && H.start(), N += e, !N && H.stop();
|
|
229
|
+
}, Fe = function(e) {
|
|
230
|
+
return !G(e) && !Se(e) && getComputedStyle(e).display === "inline";
|
|
231
|
+
}, He = function() {
|
|
230
232
|
function e(t, r) {
|
|
231
233
|
this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
|
|
232
234
|
inlineSize: 0,
|
|
@@ -234,15 +236,15 @@ var z = function(e) {
|
|
|
234
236
|
};
|
|
235
237
|
}
|
|
236
238
|
return e.prototype.isActive = function() {
|
|
237
|
-
var t =
|
|
238
|
-
return
|
|
239
|
+
var t = ce(this.target, this.observedBox, !0);
|
|
240
|
+
return Fe(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
239
241
|
}, e;
|
|
240
|
-
}(),
|
|
242
|
+
}(), Ge = /* @__PURE__ */ function() {
|
|
241
243
|
function e(t, r) {
|
|
242
244
|
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
243
245
|
}
|
|
244
246
|
return e;
|
|
245
|
-
}(),
|
|
247
|
+
}(), M = /* @__PURE__ */ new WeakMap(), re = function(e, t) {
|
|
246
248
|
for (var r = 0; r < e.length; r += 1)
|
|
247
249
|
if (e[r].target === t)
|
|
248
250
|
return r;
|
|
@@ -251,21 +253,21 @@ var z = function(e) {
|
|
|
251
253
|
function e() {
|
|
252
254
|
}
|
|
253
255
|
return e.connect = function(t, r) {
|
|
254
|
-
var n = new
|
|
255
|
-
|
|
256
|
+
var n = new Ge(t, r);
|
|
257
|
+
M.set(t, n);
|
|
256
258
|
}, e.observe = function(t, r, n) {
|
|
257
|
-
var i =
|
|
258
|
-
|
|
259
|
+
var i = M.get(t), s = i.observationTargets.length === 0;
|
|
260
|
+
re(i.observationTargets, r) < 0 && (s && x.push(i), i.observationTargets.push(new He(r, n && n.box)), te(1), H.schedule());
|
|
259
261
|
}, e.unobserve = function(t, r) {
|
|
260
|
-
var n =
|
|
261
|
-
i >= 0 && (
|
|
262
|
+
var n = M.get(t), i = re(n.observationTargets, r), s = n.observationTargets.length === 1;
|
|
263
|
+
i >= 0 && (s && x.splice(x.indexOf(n), 1), n.observationTargets.splice(i, 1), te(-1));
|
|
262
264
|
}, e.disconnect = function(t) {
|
|
263
|
-
var r = this, n =
|
|
265
|
+
var r = this, n = M.get(t);
|
|
264
266
|
n.observationTargets.slice().forEach(function(i) {
|
|
265
267
|
return r.unobserve(t, i.target);
|
|
266
268
|
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
267
269
|
}, e;
|
|
268
|
-
}(),
|
|
270
|
+
}(), Ve = function() {
|
|
269
271
|
function e(t) {
|
|
270
272
|
if (arguments.length === 0)
|
|
271
273
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
@@ -276,13 +278,13 @@ var z = function(e) {
|
|
|
276
278
|
return e.prototype.observe = function(t, r) {
|
|
277
279
|
if (arguments.length === 0)
|
|
278
280
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
279
|
-
if (!
|
|
281
|
+
if (!U(t))
|
|
280
282
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
281
283
|
L.observe(this, t, r);
|
|
282
284
|
}, e.prototype.unobserve = function(t) {
|
|
283
285
|
if (arguments.length === 0)
|
|
284
286
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
285
|
-
if (!
|
|
287
|
+
if (!U(t))
|
|
286
288
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
287
289
|
L.unobserve(this, t);
|
|
288
290
|
}, e.prototype.disconnect = function() {
|
|
@@ -291,7 +293,7 @@ var z = function(e) {
|
|
|
291
293
|
return "function ResizeObserver () { [polyfill code] }";
|
|
292
294
|
}, e;
|
|
293
295
|
}();
|
|
294
|
-
const
|
|
296
|
+
const Xe = (e, t, r) => Math.min(Math.max(e, t), r), je = y.aBox`
|
|
295
297
|
${O("breadcrumbs.item.default")};
|
|
296
298
|
align-items: center;
|
|
297
299
|
transition: medium;
|
|
@@ -309,15 +311,15 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
309
311
|
pointer-events: none;
|
|
310
312
|
cursor: default;
|
|
311
313
|
}
|
|
312
|
-
`,
|
|
314
|
+
`, qe = y.spanBox`
|
|
313
315
|
${O("breadcrumbs.separator")};
|
|
314
316
|
display: flex;
|
|
315
317
|
align-items: center;
|
|
316
|
-
`,
|
|
317
|
-
({ children: e, dataTestId: t, isActive: r, separator: n, ...i },
|
|
318
|
+
`, Je = ne(
|
|
319
|
+
({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, s) => {
|
|
318
320
|
const o = i.href || i.to;
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
|
|
321
|
+
return /* @__PURE__ */ b.jsxs(
|
|
322
|
+
Oe,
|
|
321
323
|
{
|
|
322
324
|
"aria-label": "breadcrumb",
|
|
323
325
|
as: "li",
|
|
@@ -326,14 +328,14 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
326
328
|
flex: "0 0 auto",
|
|
327
329
|
lineHeight: "normal",
|
|
328
330
|
children: [
|
|
329
|
-
n ? /* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
|
|
331
|
+
n ? /* @__PURE__ */ b.jsx(qe, { role: "presentation", children: n }) : null,
|
|
332
|
+
/* @__PURE__ */ b.jsx(
|
|
333
|
+
je,
|
|
332
334
|
{
|
|
333
335
|
"aria-current": r ? "page" : void 0,
|
|
334
336
|
"aria-disabled": !o,
|
|
335
337
|
...i,
|
|
336
|
-
ref:
|
|
338
|
+
ref: s,
|
|
337
339
|
children: e
|
|
338
340
|
}
|
|
339
341
|
)
|
|
@@ -341,32 +343,32 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
341
343
|
}
|
|
342
344
|
);
|
|
343
345
|
}
|
|
344
|
-
),
|
|
345
|
-
({ gradientBackground: e, theme: t }) =>
|
|
346
|
+
), le = y.spanBox(
|
|
347
|
+
({ gradientBackground: e, theme: t }) => ie`
|
|
346
348
|
left: 0;
|
|
347
|
-
background-image: ${
|
|
349
|
+
background-image: ${fe(t, e)};
|
|
348
350
|
transform-origin: left;
|
|
349
351
|
`
|
|
350
|
-
),
|
|
351
|
-
({ gradientBackground: e, theme: t }) =>
|
|
352
|
+
), de = y.spanBox(
|
|
353
|
+
({ gradientBackground: e, theme: t }) => ie`
|
|
352
354
|
right: 0;
|
|
353
|
-
background-image: ${
|
|
355
|
+
background-image: ${fe(t, e, "left")};
|
|
354
356
|
transform-origin: right;
|
|
355
357
|
`
|
|
356
|
-
),
|
|
358
|
+
), Ue = y.divBox`
|
|
357
359
|
${O("breadcrumbs.list")};
|
|
358
360
|
height: 100%;
|
|
359
361
|
position: relative;
|
|
360
362
|
overflow-x: hidden;
|
|
361
363
|
|
|
362
|
-
${
|
|
363
|
-
${
|
|
364
|
+
${le},
|
|
365
|
+
${de} {
|
|
364
366
|
position: absolute;
|
|
365
367
|
bottom: 0;
|
|
366
368
|
top: 0;
|
|
367
369
|
width: 30;
|
|
368
370
|
}
|
|
369
|
-
`,
|
|
371
|
+
`, Ye = y.olBox`
|
|
370
372
|
display: inline-flex;
|
|
371
373
|
align-items: center;
|
|
372
374
|
max-width: 100%;
|
|
@@ -376,72 +378,72 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
376
378
|
padding: 0;
|
|
377
379
|
list-style: none;
|
|
378
380
|
white-space: nowrap;
|
|
379
|
-
`,
|
|
380
|
-
const n = O(`colors.${t}`)({ theme: e }), i =
|
|
381
|
+
`, fe = (e, t, r = "right") => {
|
|
382
|
+
const n = O(`colors.${t}`)({ theme: e }), i = Re(n, 0);
|
|
381
383
|
return `linear-gradient(to ${r}, ${n}, ${i} 100%)`;
|
|
382
|
-
},
|
|
384
|
+
}, he = ne(
|
|
383
385
|
({
|
|
384
386
|
children: e,
|
|
385
387
|
gradientBackground: t = "neutral-10",
|
|
386
388
|
lastChildNotClickable: r = !0,
|
|
387
|
-
separator: n = /* @__PURE__ */
|
|
389
|
+
separator: n = /* @__PURE__ */ b.jsx(we, { size: "xs" }),
|
|
388
390
|
...i
|
|
389
|
-
},
|
|
390
|
-
const o = P(null),
|
|
391
|
-
const
|
|
392
|
-
return
|
|
393
|
-
isActive:
|
|
391
|
+
}, s) => {
|
|
392
|
+
const o = P(null), v = P(), l = P(), [c, E] = X(!1), [d, W] = X(0), D = ge.toArray(e).filter(Boolean), A = D.length, $ = D.map((a, u) => {
|
|
393
|
+
const h = A === 1 || A === u + 1;
|
|
394
|
+
return me(a, {
|
|
395
|
+
isActive: h && r,
|
|
394
396
|
key: `breadcrumb-${u}`,
|
|
395
|
-
separator:
|
|
396
|
-
...
|
|
397
|
-
})
|
|
397
|
+
separator: h ? void 0 : n,
|
|
398
|
+
...a.props
|
|
399
|
+
});
|
|
398
400
|
});
|
|
399
|
-
function B(
|
|
400
|
-
|
|
401
|
+
function B(a, u) {
|
|
402
|
+
a && (a.style.transform = `scale3d(${u}, 1, 1)`);
|
|
401
403
|
}
|
|
402
|
-
const
|
|
403
|
-
const u = 1 -
|
|
404
|
-
B(
|
|
405
|
-
}, []), T =
|
|
406
|
-
const {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}, [d,
|
|
411
|
-
() =>
|
|
412
|
-
(
|
|
413
|
-
const
|
|
404
|
+
const g = j((a) => {
|
|
405
|
+
const u = 1 - a;
|
|
406
|
+
B(v.current, u), B(l.current, a);
|
|
407
|
+
}, []), T = j(() => {
|
|
408
|
+
const {
|
|
409
|
+
current: { offsetWidth: a, scrollLeft: u, scrollWidth: h }
|
|
410
|
+
} = o, m = h - a, z = Xe(Math.abs(u - d), 0, m) / m;
|
|
411
|
+
g(z);
|
|
412
|
+
}, [d, g]), S = xe(
|
|
413
|
+
() => ze(
|
|
414
|
+
(a) => {
|
|
415
|
+
const [
|
|
414
416
|
{
|
|
415
417
|
// Is offsetWidth really needed ?
|
|
416
418
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
417
419
|
// @ts-ignore
|
|
418
|
-
target: { offsetWidth:
|
|
420
|
+
target: { offsetWidth: u, scrollLeft: h, scrollWidth: m }
|
|
419
421
|
}
|
|
420
|
-
] =
|
|
421
|
-
d || W(
|
|
422
|
+
] = a, p = m - u;
|
|
423
|
+
d || W(h === 0 ? 0 : p), E(p > 0);
|
|
422
424
|
},
|
|
423
425
|
300,
|
|
424
426
|
!1
|
|
425
427
|
),
|
|
426
428
|
[d]
|
|
427
429
|
);
|
|
428
|
-
return
|
|
429
|
-
const
|
|
430
|
-
return
|
|
431
|
-
}, []),
|
|
432
|
-
|
|
433
|
-
}, [c,
|
|
434
|
-
c ? /* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
c ? /* @__PURE__ */
|
|
430
|
+
return q(() => {
|
|
431
|
+
const a = new Ve(S);
|
|
432
|
+
return a.observe(o.current), () => a.disconnect();
|
|
433
|
+
}, []), q(() => {
|
|
434
|
+
v.current && l.current && g(0);
|
|
435
|
+
}, [c, g]), /* @__PURE__ */ b.jsxs(Ue, { as: "nav", ref: s, ...i, children: [
|
|
436
|
+
c ? /* @__PURE__ */ b.jsx(le, { gradientBackground: t, ref: v }) : null,
|
|
437
|
+
/* @__PURE__ */ b.jsx(Ye, { dir: "rtl", onScroll: T, ref: o, children: $.reverse() }),
|
|
438
|
+
c ? /* @__PURE__ */ b.jsx(de, { gradientBackground: t, ref: l }) : null
|
|
437
439
|
] });
|
|
438
440
|
}
|
|
439
441
|
);
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
Item:
|
|
442
|
+
he.displayName = "Breadcrumb";
|
|
443
|
+
const ct = Object.assign(he, {
|
|
444
|
+
Item: Je
|
|
443
445
|
});
|
|
444
446
|
export {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
+
ct as Breadcrumb,
|
|
448
|
+
he as BreadcrumbComponent
|
|
447
449
|
};
|
package/dist/ButtonGroup.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
2
|
+
import { j as l } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
+
import { Children as d, cloneElement as m } from "react";
|
|
4
|
+
import { forwardRef as u } from "./System.mjs";
|
|
5
|
+
import f from "@xstyled/styled-components";
|
|
6
|
+
const b = f.divBox`
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
flex-wrap: wrap;
|
|
9
9
|
align-items: center;
|
|
@@ -32,19 +32,19 @@ const x = b.divBox`
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
36
|
-
({ children: t, dataTestId: o, disabled:
|
|
37
|
-
function n(
|
|
38
|
-
return
|
|
35
|
+
`, y = u(
|
|
36
|
+
({ children: t, dataTestId: o, disabled: i, size: e, variant: s }, a) => {
|
|
37
|
+
function n(p) {
|
|
38
|
+
return d.toArray(p).filter(Boolean).map((r) => m(r, {
|
|
39
39
|
...r.props,
|
|
40
|
-
disabled:
|
|
41
|
-
size:
|
|
40
|
+
disabled: i || r.props.disabled,
|
|
41
|
+
size: e || r.props.size,
|
|
42
42
|
variant: s || r.props.variant
|
|
43
|
-
})
|
|
43
|
+
}));
|
|
44
44
|
}
|
|
45
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ l.jsx(b, { "data-testid": o, ref: a, children: n(t) });
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
export {
|
|
49
|
-
|
|
49
|
+
y as ButtonGroup
|
|
50
50
|
};
|