welcome-ui 1.0.0-beta.1 → 1.0.0-beta.3
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/Accordion.js +89 -0
- package/dist/Accordion.mjs +579 -0
- package/dist/Alert.js +1 -0
- package/dist/Alert.mjs +7 -0
- package/dist/AspectRatio.js +29 -0
- package/dist/AspectRatio.mjs +41 -0
- package/dist/Avatar.js +5 -0
- package/dist/Avatar.mjs +55 -0
- package/dist/Badge.js +17 -0
- package/dist/Badge.mjs +53 -0
- package/dist/Box.js +1 -0
- package/dist/Box.mjs +8 -0
- package/dist/Breadcrumb.js +54 -0
- package/dist/Breadcrumb.mjs +439 -0
- package/dist/Flex.js +1 -0
- package/dist/Flex.mjs +26 -0
- package/dist/System.js +1 -0
- package/dist/System.mjs +51 -0
- package/dist/X5NMLKT6-BC1Q56kB.mjs +1258 -0
- package/dist/X5NMLKT6-vrNG8i_R.js +14 -0
- package/dist/index-0MPAX4B5.mjs +320 -0
- package/dist/index-BNA_A0oa.js +155 -0
- package/dist/index-BXJQXgy9.js +13 -0
- package/dist/index-Bwrtxit1.mjs +84 -0
- package/dist/index-Ct2FOeyM.js +17 -0
- package/dist/index-DRNn5iIc.js +142 -0
- package/dist/index-Du8Nrf16.mjs +128 -0
- package/dist/index-MifIgNHW.mjs +47 -0
- package/dist/index-V28zHt_Z.js +68 -0
- package/dist/index-WmqrMIzg.mjs +19070 -0
- package/dist/index.js +147 -5
- package/dist/index.mjs +767 -217
- package/dist/types/components/Accordion/index.d.ts +16 -0
- package/dist/types/components/Accordion/styles.d.ts +6 -0
- package/dist/types/components/Accordion/theme.d.ts +10 -0
- package/dist/types/components/Alert/Title.d.ts +7 -0
- package/dist/types/components/Alert/index.d.ts +24 -0
- package/dist/types/components/Alert/styles.d.ts +6 -0
- package/dist/types/components/Alert/theme.d.ts +15 -0
- package/dist/types/components/AspectRatio/index.d.ts +6 -0
- package/dist/types/components/AspectRatio/styles.d.ts +2 -0
- package/dist/types/components/Avatar/index.d.ts +16 -0
- package/dist/types/components/Avatar/styles.d.ts +2 -0
- package/dist/types/components/Avatar/theme.d.ts +9 -0
- package/dist/types/components/Avatar/utils.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +11 -0
- package/dist/types/components/Badge/styles.d.ts +8 -0
- package/dist/types/components/Badge/theme.d.ts +18 -0
- package/dist/types/components/Box/index.d.ts +3 -0
- package/dist/types/components/Breadcrumb/Item.d.ts +13 -0
- package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -0
- package/dist/types/components/Breadcrumb/index.d.ts +18 -0
- package/dist/types/components/Breadcrumb/styles.d.ts +6 -0
- package/dist/types/components/Breadcrumb/theme.d.ts +12 -0
- package/dist/types/components/Button/index.d.ts +21 -0
- package/dist/types/components/Button/styles.d.ts +2 -0
- package/dist/types/components/Button/theme.d.ts +13 -0
- package/dist/types/components/ButtonGroup/index.d.ts +15 -0
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -0
- package/dist/types/components/Card/Cover.d.ts +10 -0
- package/dist/types/components/Card/Cover.styles.d.ts +1 -0
- package/dist/types/components/Card/index.d.ts +8 -0
- package/dist/types/components/Card/styles.d.ts +2 -0
- package/dist/types/components/Card/theme.d.ts +6 -0
- package/dist/types/components/ClearButton/index.d.ts +5 -0
- package/dist/types/components/ClearButton/styles.d.ts +1 -0
- package/dist/types/components/CloseButton/index.d.ts +3 -0
- package/dist/types/components/CloseButton/styles.d.ts +1 -0
- package/dist/types/components/Flex/index.d.ts +19 -0
- package/dist/types/components/System/index.d.ts +40 -0
- package/dist/types/components/WuiProvider/font.d.ts +16 -0
- package/dist/types/components/WuiProvider/hide-focus-rings-root.d.ts +8 -0
- package/dist/types/components/WuiProvider/index.d.ts +11 -0
- package/dist/types/components/WuiProvider/styles.d.ts +5 -0
- package/dist/types/components/index.d.ts +15 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/theme/borders.d.ts +6 -0
- package/dist/types/theme/colors.d.ts +346 -0
- package/dist/types/theme/dark.d.ts +7 -0
- package/dist/types/theme/focus.d.ts +10 -0
- package/dist/types/theme/fonts.d.ts +18 -0
- package/dist/types/theme/index.d.ts +76 -0
- package/dist/types/theme/radii.d.ts +12 -0
- package/dist/types/theme/screens.d.ts +13 -0
- package/dist/types/theme/selection.d.ts +4 -0
- package/dist/types/theme/shadows.d.ts +5 -0
- package/dist/types/theme/space.d.ts +18 -0
- package/dist/types/theme/transitions.d.ts +13 -0
- package/dist/types/theme/typography.d.ts +133 -0
- package/dist/types/theme/underline.d.ts +9 -0
- package/package.json +7 -2
- package/dist/Test.js +0 -3
- package/dist/Test.mjs +0 -9
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import g, { useRef as $, useState as X, Children as ge, cloneElement as me, useCallback as q, useMemo as xe, useEffect as J } from "react";
|
|
3
|
+
import { h as Ee, t as we, c as ze } from "./index-MifIgNHW.mjs";
|
|
4
|
+
import { R as Oe } from "./index-Bwrtxit1.mjs";
|
|
5
|
+
import { forwardRef as ne } from "./System.mjs";
|
|
6
|
+
import { Box as Re } from "./Box.mjs";
|
|
7
|
+
import R, { th as z, css as ie } from "@xstyled/styled-components";
|
|
8
|
+
var x = [], ye = function() {
|
|
9
|
+
return x.some(function(e) {
|
|
10
|
+
return e.activeTargets.length > 0;
|
|
11
|
+
});
|
|
12
|
+
}, Be = function() {
|
|
13
|
+
return x.some(function(e) {
|
|
14
|
+
return e.skippedTargets.length > 0;
|
|
15
|
+
});
|
|
16
|
+
}, U = "ResizeObserver loop completed with undelivered notifications.", Te = function() {
|
|
17
|
+
var e;
|
|
18
|
+
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
19
|
+
message: U
|
|
20
|
+
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = U), window.dispatchEvent(e);
|
|
21
|
+
}, k;
|
|
22
|
+
(function(e) {
|
|
23
|
+
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
24
|
+
})(k || (k = {}));
|
|
25
|
+
var E = function(e) {
|
|
26
|
+
return Object.freeze(e);
|
|
27
|
+
}, Se = /* @__PURE__ */ function() {
|
|
28
|
+
function e(t, r) {
|
|
29
|
+
this.inlineSize = t, this.blockSize = r, E(this);
|
|
30
|
+
}
|
|
31
|
+
return e;
|
|
32
|
+
}(), oe = function() {
|
|
33
|
+
function e(t, r, n, i) {
|
|
34
|
+
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, E(this);
|
|
35
|
+
}
|
|
36
|
+
return e.prototype.toJSON = function() {
|
|
37
|
+
var t = this, r = t.x, n = t.y, i = t.top, s = t.right, o = t.bottom, l = t.left, d = t.width, c = t.height;
|
|
38
|
+
return { x: r, y: n, top: i, right: s, bottom: o, left: l, width: d, height: c };
|
|
39
|
+
}, e.fromRect = function(t) {
|
|
40
|
+
return new e(t.x, t.y, t.width, t.height);
|
|
41
|
+
}, e;
|
|
42
|
+
}(), G = function(e) {
|
|
43
|
+
return e instanceof SVGElement && "getBBox" in e;
|
|
44
|
+
}, se = function(e) {
|
|
45
|
+
if (G(e)) {
|
|
46
|
+
var t = e.getBBox(), r = t.width, n = t.height;
|
|
47
|
+
return !r && !n;
|
|
48
|
+
}
|
|
49
|
+
var i = e, s = i.offsetWidth, o = i.offsetHeight;
|
|
50
|
+
return !(s || o || e.getClientRects().length);
|
|
51
|
+
}, Y = function(e) {
|
|
52
|
+
var t;
|
|
53
|
+
if (e instanceof Element)
|
|
54
|
+
return !0;
|
|
55
|
+
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
56
|
+
return !!(r && e instanceof r.Element);
|
|
57
|
+
}, Ce = function(e) {
|
|
58
|
+
switch (e.tagName) {
|
|
59
|
+
case "INPUT":
|
|
60
|
+
if (e.type !== "image")
|
|
61
|
+
break;
|
|
62
|
+
case "VIDEO":
|
|
63
|
+
case "AUDIO":
|
|
64
|
+
case "EMBED":
|
|
65
|
+
case "OBJECT":
|
|
66
|
+
case "CANVAS":
|
|
67
|
+
case "IFRAME":
|
|
68
|
+
case "IMG":
|
|
69
|
+
return !0;
|
|
70
|
+
}
|
|
71
|
+
return !1;
|
|
72
|
+
}, C = typeof window < "u" ? window : {}, A = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, ke = /^tb|vertical/, De = /msie|trident/i.test(C.navigator && C.navigator.userAgent), f = function(e) {
|
|
73
|
+
return parseFloat(e || "0");
|
|
74
|
+
}, O = function(e, t, r) {
|
|
75
|
+
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Se((r ? t : e) || 0, (r ? e : t) || 0);
|
|
76
|
+
}, Q = E({
|
|
77
|
+
devicePixelContentBoxSize: O(),
|
|
78
|
+
borderBoxSize: O(),
|
|
79
|
+
contentBoxSize: O(),
|
|
80
|
+
contentRect: new oe(0, 0, 0, 0)
|
|
81
|
+
}), ae = function(e, t) {
|
|
82
|
+
if (t === void 0 && (t = !1), A.has(e) && !t)
|
|
83
|
+
return A.get(e);
|
|
84
|
+
if (se(e))
|
|
85
|
+
return A.set(e, Q), Q;
|
|
86
|
+
var r = getComputedStyle(e), n = G(e) && e.ownerSVGElement && e.getBBox(), i = !De && r.boxSizing === "border-box", s = ke.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), d = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), y = n ? 0 : f(r.paddingBottom), v = n ? 0 : f(r.paddingLeft), M = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), I = n ? 0 : f(r.borderBottomWidth), W = n ? 0 : f(r.borderLeftWidth), B = v + c, m = d + y, T = W + D, S = M + I, a = l ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, h = i ? B + T : 0, p = i ? m + S : 0, b = n ? n.width : f(r.width) - h - u, w = n ? n.height : f(r.height) - p - a, pe = b + B + u + T, be = w + m + a + S, V = E({
|
|
87
|
+
devicePixelContentBoxSize: O(Math.round(b * devicePixelRatio), Math.round(w * devicePixelRatio), s),
|
|
88
|
+
borderBoxSize: O(pe, be, s),
|
|
89
|
+
contentBoxSize: O(b, w, s),
|
|
90
|
+
contentRect: new oe(v, d, b, w)
|
|
91
|
+
});
|
|
92
|
+
return A.set(e, V), V;
|
|
93
|
+
}, ce = function(e, t, r) {
|
|
94
|
+
var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, o = n.devicePixelContentBoxSize;
|
|
95
|
+
switch (t) {
|
|
96
|
+
case k.DEVICE_PIXEL_CONTENT_BOX:
|
|
97
|
+
return o;
|
|
98
|
+
case k.BORDER_BOX:
|
|
99
|
+
return i;
|
|
100
|
+
default:
|
|
101
|
+
return s;
|
|
102
|
+
}
|
|
103
|
+
}, Ie = /* @__PURE__ */ function() {
|
|
104
|
+
function e(t) {
|
|
105
|
+
var r = ae(t);
|
|
106
|
+
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = E([r.borderBoxSize]), this.contentBoxSize = E([r.contentBoxSize]), this.devicePixelContentBoxSize = E([r.devicePixelContentBoxSize]);
|
|
107
|
+
}
|
|
108
|
+
return e;
|
|
109
|
+
}(), ue = function(e) {
|
|
110
|
+
if (se(e))
|
|
111
|
+
return 1 / 0;
|
|
112
|
+
for (var t = 0, r = e.parentNode; r; )
|
|
113
|
+
t += 1, r = r.parentNode;
|
|
114
|
+
return t;
|
|
115
|
+
}, Ae = function() {
|
|
116
|
+
var e = 1 / 0, t = [];
|
|
117
|
+
x.forEach(function(o) {
|
|
118
|
+
if (o.activeTargets.length !== 0) {
|
|
119
|
+
var l = [];
|
|
120
|
+
o.activeTargets.forEach(function(c) {
|
|
121
|
+
var y = new Ie(c.target), v = ue(c.target);
|
|
122
|
+
l.push(y), c.lastReportedSize = ce(c.target, c.observedBox), v < e && (e = v);
|
|
123
|
+
}), t.push(function() {
|
|
124
|
+
o.callback.call(o.observer, l, o.observer);
|
|
125
|
+
}), o.activeTargets.splice(0, o.activeTargets.length);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
for (var r = 0, n = t; r < n.length; r++) {
|
|
129
|
+
var i = n[r];
|
|
130
|
+
i();
|
|
131
|
+
}
|
|
132
|
+
return e;
|
|
133
|
+
}, Z = function(e) {
|
|
134
|
+
x.forEach(function(r) {
|
|
135
|
+
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
136
|
+
i.isActive() && (ue(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}, Le = function() {
|
|
140
|
+
var e = 0;
|
|
141
|
+
for (Z(e); ye(); )
|
|
142
|
+
e = Ae(), Z(e);
|
|
143
|
+
return Be() && Te(), e > 0;
|
|
144
|
+
}, P, le = [], Ne = function() {
|
|
145
|
+
return le.splice(0).forEach(function(e) {
|
|
146
|
+
return e();
|
|
147
|
+
});
|
|
148
|
+
}, _e = function(e) {
|
|
149
|
+
if (!P) {
|
|
150
|
+
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
151
|
+
new MutationObserver(function() {
|
|
152
|
+
return Ne();
|
|
153
|
+
}).observe(r, n), P = function() {
|
|
154
|
+
r.textContent = "".concat(t ? t-- : t++);
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
le.push(e), P();
|
|
158
|
+
}, Me = function(e) {
|
|
159
|
+
_e(function() {
|
|
160
|
+
requestAnimationFrame(e);
|
|
161
|
+
});
|
|
162
|
+
}, _ = 0, We = function() {
|
|
163
|
+
return !!_;
|
|
164
|
+
}, $e = 250, Pe = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, j = [
|
|
165
|
+
"resize",
|
|
166
|
+
"load",
|
|
167
|
+
"transitionend",
|
|
168
|
+
"animationend",
|
|
169
|
+
"animationstart",
|
|
170
|
+
"animationiteration",
|
|
171
|
+
"keyup",
|
|
172
|
+
"keydown",
|
|
173
|
+
"mouseup",
|
|
174
|
+
"mousedown",
|
|
175
|
+
"mouseover",
|
|
176
|
+
"mouseout",
|
|
177
|
+
"blur",
|
|
178
|
+
"focus"
|
|
179
|
+
], ee = function(e) {
|
|
180
|
+
return e === void 0 && (e = 0), Date.now() + e;
|
|
181
|
+
}, F = !1, Fe = function() {
|
|
182
|
+
function e() {
|
|
183
|
+
var t = this;
|
|
184
|
+
this.stopped = !0, this.listener = function() {
|
|
185
|
+
return t.schedule();
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return e.prototype.run = function(t) {
|
|
189
|
+
var r = this;
|
|
190
|
+
if (t === void 0 && (t = $e), !F) {
|
|
191
|
+
F = !0;
|
|
192
|
+
var n = ee(t);
|
|
193
|
+
Me(function() {
|
|
194
|
+
var i = !1;
|
|
195
|
+
try {
|
|
196
|
+
i = Le();
|
|
197
|
+
} finally {
|
|
198
|
+
if (F = !1, t = n - ee(), !We())
|
|
199
|
+
return;
|
|
200
|
+
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}, e.prototype.schedule = function() {
|
|
205
|
+
this.stop(), this.run();
|
|
206
|
+
}, e.prototype.observe = function() {
|
|
207
|
+
var t = this, r = function() {
|
|
208
|
+
return t.observer && t.observer.observe(document.body, Pe);
|
|
209
|
+
};
|
|
210
|
+
document.body ? r() : C.addEventListener("DOMContentLoaded", r);
|
|
211
|
+
}, e.prototype.start = function() {
|
|
212
|
+
var t = this;
|
|
213
|
+
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), j.forEach(function(r) {
|
|
214
|
+
return C.addEventListener(r, t.listener, !0);
|
|
215
|
+
}));
|
|
216
|
+
}, e.prototype.stop = function() {
|
|
217
|
+
var t = this;
|
|
218
|
+
this.stopped || (this.observer && this.observer.disconnect(), j.forEach(function(r) {
|
|
219
|
+
return C.removeEventListener(r, t.listener, !0);
|
|
220
|
+
}), this.stopped = !0);
|
|
221
|
+
}, e;
|
|
222
|
+
}(), H = new Fe(), te = function(e) {
|
|
223
|
+
!_ && e > 0 && H.start(), _ += e, !_ && H.stop();
|
|
224
|
+
}, He = function(e) {
|
|
225
|
+
return !G(e) && !Ce(e) && getComputedStyle(e).display === "inline";
|
|
226
|
+
}, Ge = function() {
|
|
227
|
+
function e(t, r) {
|
|
228
|
+
this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
|
|
229
|
+
inlineSize: 0,
|
|
230
|
+
blockSize: 0
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
return e.prototype.isActive = function() {
|
|
234
|
+
var t = ce(this.target, this.observedBox, !0);
|
|
235
|
+
return He(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
236
|
+
}, e;
|
|
237
|
+
}(), Ve = /* @__PURE__ */ function() {
|
|
238
|
+
function e(t, r) {
|
|
239
|
+
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
240
|
+
}
|
|
241
|
+
return e;
|
|
242
|
+
}(), L = /* @__PURE__ */ new WeakMap(), re = function(e, t) {
|
|
243
|
+
for (var r = 0; r < e.length; r += 1)
|
|
244
|
+
if (e[r].target === t)
|
|
245
|
+
return r;
|
|
246
|
+
return -1;
|
|
247
|
+
}, N = function() {
|
|
248
|
+
function e() {
|
|
249
|
+
}
|
|
250
|
+
return e.connect = function(t, r) {
|
|
251
|
+
var n = new Ve(t, r);
|
|
252
|
+
L.set(t, n);
|
|
253
|
+
}, e.observe = function(t, r, n) {
|
|
254
|
+
var i = L.get(t), s = i.observationTargets.length === 0;
|
|
255
|
+
re(i.observationTargets, r) < 0 && (s && x.push(i), i.observationTargets.push(new Ge(r, n && n.box)), te(1), H.schedule());
|
|
256
|
+
}, e.unobserve = function(t, r) {
|
|
257
|
+
var n = L.get(t), i = re(n.observationTargets, r), s = n.observationTargets.length === 1;
|
|
258
|
+
i >= 0 && (s && x.splice(x.indexOf(n), 1), n.observationTargets.splice(i, 1), te(-1));
|
|
259
|
+
}, e.disconnect = function(t) {
|
|
260
|
+
var r = this, n = L.get(t);
|
|
261
|
+
n.observationTargets.slice().forEach(function(i) {
|
|
262
|
+
return r.unobserve(t, i.target);
|
|
263
|
+
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
264
|
+
}, e;
|
|
265
|
+
}(), Xe = function() {
|
|
266
|
+
function e(t) {
|
|
267
|
+
if (arguments.length === 0)
|
|
268
|
+
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
269
|
+
if (typeof t != "function")
|
|
270
|
+
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
271
|
+
N.connect(this, t);
|
|
272
|
+
}
|
|
273
|
+
return e.prototype.observe = function(t, r) {
|
|
274
|
+
if (arguments.length === 0)
|
|
275
|
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
276
|
+
if (!Y(t))
|
|
277
|
+
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
278
|
+
N.observe(this, t, r);
|
|
279
|
+
}, e.prototype.unobserve = function(t) {
|
|
280
|
+
if (arguments.length === 0)
|
|
281
|
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
282
|
+
if (!Y(t))
|
|
283
|
+
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
284
|
+
N.unobserve(this, t);
|
|
285
|
+
}, e.prototype.disconnect = function() {
|
|
286
|
+
N.disconnect(this);
|
|
287
|
+
}, e.toString = function() {
|
|
288
|
+
return "function ResizeObserver () { [polyfill code] }";
|
|
289
|
+
}, e;
|
|
290
|
+
}();
|
|
291
|
+
const qe = R.aBox`
|
|
292
|
+
${z("breadcrumbs.item.default")};
|
|
293
|
+
align-items: center;
|
|
294
|
+
transition: medium;
|
|
295
|
+
direction: initial;
|
|
296
|
+
|
|
297
|
+
&:hover {
|
|
298
|
+
${z("breadcrumbs.item.hover")};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&[aria-current='page'] {
|
|
302
|
+
${z("breadcrumbs.item.active")};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&[aria-disabled='true'] {
|
|
306
|
+
pointer-events: none;
|
|
307
|
+
cursor: default;
|
|
308
|
+
}
|
|
309
|
+
`, Je = R.spanBox`
|
|
310
|
+
${z("breadcrumbs.separator")};
|
|
311
|
+
display: flex;
|
|
312
|
+
align-items: center;
|
|
313
|
+
`, Ue = ne(
|
|
314
|
+
({ children: e, dataTestId: t, isActive: r, separator: n, ...i }, s) => {
|
|
315
|
+
const o = i.href || i.to;
|
|
316
|
+
return /* @__PURE__ */ g.createElement(
|
|
317
|
+
Re,
|
|
318
|
+
{
|
|
319
|
+
"aria-label": "breadcrumb",
|
|
320
|
+
as: "li",
|
|
321
|
+
"data-testid": t,
|
|
322
|
+
display: "inline-flex",
|
|
323
|
+
flex: "0 0 auto",
|
|
324
|
+
lineHeight: "normal"
|
|
325
|
+
},
|
|
326
|
+
n && /* @__PURE__ */ g.createElement(Je, { role: "presentation" }, n),
|
|
327
|
+
/* @__PURE__ */ g.createElement(
|
|
328
|
+
qe,
|
|
329
|
+
{
|
|
330
|
+
"aria-current": r ? "page" : void 0,
|
|
331
|
+
"aria-disabled": !o,
|
|
332
|
+
...i,
|
|
333
|
+
ref: s
|
|
334
|
+
},
|
|
335
|
+
e
|
|
336
|
+
)
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
), de = R.spanBox(
|
|
340
|
+
({ gradientBackground: e, theme: t }) => ie`
|
|
341
|
+
left: 0;
|
|
342
|
+
background-image: ${fe(t, e)};
|
|
343
|
+
transform-origin: left;
|
|
344
|
+
`
|
|
345
|
+
), ve = R.spanBox(
|
|
346
|
+
({ gradientBackground: e, theme: t }) => ie`
|
|
347
|
+
right: 0;
|
|
348
|
+
background-image: ${fe(t, e, "left")};
|
|
349
|
+
transform-origin: right;
|
|
350
|
+
`
|
|
351
|
+
), Ye = R.divBox`
|
|
352
|
+
${z("breadcrumbs.list")};
|
|
353
|
+
height: 100%;
|
|
354
|
+
position: relative;
|
|
355
|
+
overflow-x: hidden;
|
|
356
|
+
|
|
357
|
+
${de},
|
|
358
|
+
${ve} {
|
|
359
|
+
position: absolute;
|
|
360
|
+
bottom: 0;
|
|
361
|
+
top: 0;
|
|
362
|
+
width: 30;
|
|
363
|
+
}
|
|
364
|
+
`, Ke = R.olBox`
|
|
365
|
+
display: inline-flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
max-width: 100%;
|
|
368
|
+
height: 100%;
|
|
369
|
+
overflow-x: auto;
|
|
370
|
+
margin: 0;
|
|
371
|
+
padding: 0;
|
|
372
|
+
list-style: none;
|
|
373
|
+
white-space: nowrap;
|
|
374
|
+
`, fe = (e, t, r = "right") => {
|
|
375
|
+
const n = z(`colors.${t}`)({ theme: e }), i = Ee(n, 0);
|
|
376
|
+
return `linear-gradient(to ${r}, ${n}, ${i} 100%)`;
|
|
377
|
+
}, he = ne(
|
|
378
|
+
({
|
|
379
|
+
children: e,
|
|
380
|
+
gradientBackground: t = "neutral-10",
|
|
381
|
+
lastChildNotClickable: r = !0,
|
|
382
|
+
separator: n = /* @__PURE__ */ g.createElement(Oe, { size: "xs" }),
|
|
383
|
+
...i
|
|
384
|
+
}, s) => {
|
|
385
|
+
const o = $(null), l = $(), d = $(), [c, y] = X(!1), [v, M] = X(0), D = ge.toArray(e).filter(Boolean), I = D.length, W = D.map((a, u) => {
|
|
386
|
+
const h = I === 1 || I === u + 1, p = h && r;
|
|
387
|
+
return me(a, {
|
|
388
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
389
|
+
key: `breadcrumb-${u}`,
|
|
390
|
+
separator: h ? void 0 : n,
|
|
391
|
+
isActive: p,
|
|
392
|
+
...a.props
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
function B(a, u) {
|
|
396
|
+
a && (a.style.transform = `scale3d(${u}, 1, 1)`);
|
|
397
|
+
}
|
|
398
|
+
const m = q((a) => {
|
|
399
|
+
const u = 1 - a;
|
|
400
|
+
B(l.current, u), B(d.current, a);
|
|
401
|
+
}, []), T = q(() => {
|
|
402
|
+
const {
|
|
403
|
+
current: { offsetWidth: a, scrollLeft: u, scrollWidth: h }
|
|
404
|
+
} = o, p = h - a, w = ze(Math.abs(u - v), 0, p) / p;
|
|
405
|
+
m(w);
|
|
406
|
+
}, [v, m]), S = xe(
|
|
407
|
+
() => we(
|
|
408
|
+
(a) => {
|
|
409
|
+
const [
|
|
410
|
+
{
|
|
411
|
+
// Is offsetWidth really needed ?
|
|
412
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
413
|
+
// @ts-ignore
|
|
414
|
+
target: { offsetWidth: u, scrollLeft: h, scrollWidth: p }
|
|
415
|
+
}
|
|
416
|
+
] = a, b = p - u;
|
|
417
|
+
v || M(h === 0 ? 0 : b), y(b > 0);
|
|
418
|
+
},
|
|
419
|
+
300,
|
|
420
|
+
!1
|
|
421
|
+
),
|
|
422
|
+
[v]
|
|
423
|
+
);
|
|
424
|
+
return J(() => {
|
|
425
|
+
const a = new Xe(S);
|
|
426
|
+
return a.observe(o.current), () => a.disconnect();
|
|
427
|
+
}, []), J(() => {
|
|
428
|
+
l.current && d.current && m(0);
|
|
429
|
+
}, [c, m]), /* @__PURE__ */ g.createElement(Ye, { as: "nav", ref: s, ...i }, c && /* @__PURE__ */ g.createElement(de, { gradientBackground: t, ref: l }), /* @__PURE__ */ g.createElement(Ke, { dir: "rtl", onScroll: T, ref: o }, W.reverse()), c && /* @__PURE__ */ g.createElement(ve, { gradientBackground: t, ref: d }));
|
|
430
|
+
}
|
|
431
|
+
);
|
|
432
|
+
he.displayName = "Breadcrumb";
|
|
433
|
+
const nt = Object.assign(he, {
|
|
434
|
+
Item: Ue
|
|
435
|
+
});
|
|
436
|
+
export {
|
|
437
|
+
nt as Breadcrumb,
|
|
438
|
+
he as BreadcrumbComponent
|
|
439
|
+
};
|
package/dist/Flex.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),u=require("./System.js"),d=require("./Box.js"),e=u.forwardRef(({align:t,basis:r,dataTestId:l,direction:i,grow:s,justify:n,shrink:o,wrap:a,...x},c)=>f.createElement(d.Box,{alignItems:t,"data-testid":l,display:"flex",flexBasis:r,flexDirection:i,flexGrow:s,flexShrink:o,flexWrap:a,justifyContent:n,ref:c,...x}));e.displayName="Flex";exports.Flex=e;
|
package/dist/Flex.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { forwardRef as s } from "./System.mjs";
|
|
4
|
+
import { Box as p } from "./Box.mjs";
|
|
5
|
+
const d = s(
|
|
6
|
+
({ align: e, basis: t, dataTestId: r, direction: l, grow: f, justify: i, shrink: o, wrap: a, ...x }, m) => /* @__PURE__ */ n.createElement(
|
|
7
|
+
p,
|
|
8
|
+
{
|
|
9
|
+
alignItems: e,
|
|
10
|
+
"data-testid": r,
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexBasis: t,
|
|
13
|
+
flexDirection: l,
|
|
14
|
+
flexGrow: f,
|
|
15
|
+
flexShrink: o,
|
|
16
|
+
flexWrap: a,
|
|
17
|
+
justifyContent: i,
|
|
18
|
+
ref: m,
|
|
19
|
+
...x
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
d.displayName = "Flex";
|
|
24
|
+
export {
|
|
25
|
+
d as Flex
|
|
26
|
+
};
|
package/dist/System.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),t=require("@xstyled/styled-components");function a(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const p=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,p.get?p:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const e=a(t),i=t.compose(t.style({prop:"opacity"}),t.style({prop:"overflow"}),t.style({prop:"transition",themeGet:t.getTransition}),t.style({prop:"position"}),t.style({prop:"zIndex",themeGet:t.getZIndex}),t.style({prop:"top",themeGet:t.getPx}),t.style({prop:"right",themeGet:t.getPx}),t.style({prop:"bottom",themeGet:t.getPx}),t.style({prop:"left",themeGet:t.getPx})),l=Object.freeze([e.backgrounds,e.borders,e.boxShadow,e.color,e.display,e.flexboxes,e.grids,e.height,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.space,e.typography,e.verticalAlign,e.width,i]),d=Object.freeze([e.margin,e.marginBottom,e.marginLeft,e.marginRight,e.marginTop,e.mx,e.my,e.width,i]),n=t.compose(...l),c=t.compose(...d),f=n.meta.props.filter(o=>!c.meta.props.includes(o)).map(o=>o==="w"?e.width:o==="h"?e.height:e[o]).filter(Boolean),g=t.compose(...f),y=o=>!n.meta.props.includes(o),u=(o,r)=>r(o),h=o=>m.forwardRef(o);exports.componentSystem=g;exports.filterSystemProps=y;exports.forwardRef=h;exports.shouldForwardProp=u;exports.system=n;exports.wrapperSystem=c;
|
package/dist/System.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import * as t from "@xstyled/styled-components";
|
|
4
|
+
import { compose as p, style as o, getTransition as a, getZIndex as c, getPx as r } from "@xstyled/styled-components";
|
|
5
|
+
const i = p(
|
|
6
|
+
o({ prop: "opacity" }),
|
|
7
|
+
o({ prop: "overflow" }),
|
|
8
|
+
o({ prop: "transition", themeGet: a }),
|
|
9
|
+
o({ prop: "position" }),
|
|
10
|
+
o({ prop: "zIndex", themeGet: c }),
|
|
11
|
+
o({ prop: "top", themeGet: r }),
|
|
12
|
+
o({ prop: "right", themeGet: r }),
|
|
13
|
+
o({ prop: "bottom", themeGet: r }),
|
|
14
|
+
o({ prop: "left", themeGet: r })
|
|
15
|
+
), h = Object.freeze([
|
|
16
|
+
t.backgrounds,
|
|
17
|
+
t.borders,
|
|
18
|
+
t.boxShadow,
|
|
19
|
+
t.color,
|
|
20
|
+
t.display,
|
|
21
|
+
t.flexboxes,
|
|
22
|
+
t.grids,
|
|
23
|
+
t.height,
|
|
24
|
+
t.maxHeight,
|
|
25
|
+
t.maxWidth,
|
|
26
|
+
t.minHeight,
|
|
27
|
+
t.minWidth,
|
|
28
|
+
t.space,
|
|
29
|
+
t.typography,
|
|
30
|
+
t.verticalAlign,
|
|
31
|
+
t.width,
|
|
32
|
+
i
|
|
33
|
+
]), d = Object.freeze([
|
|
34
|
+
t.margin,
|
|
35
|
+
t.marginBottom,
|
|
36
|
+
t.marginLeft,
|
|
37
|
+
t.marginRight,
|
|
38
|
+
t.marginTop,
|
|
39
|
+
t.mx,
|
|
40
|
+
t.my,
|
|
41
|
+
t.width,
|
|
42
|
+
i
|
|
43
|
+
]), n = p(...h), f = p(...d), g = n.meta.props.filter((e) => !f.meta.props.includes(e)).map((e) => e === "w" ? t.width : e === "h" ? t.height : t[e]).filter(Boolean), u = p(...g), w = (e) => !n.meta.props.includes(e), x = (e, s) => s(e), y = (e) => m.forwardRef(e);
|
|
44
|
+
export {
|
|
45
|
+
u as componentSystem,
|
|
46
|
+
w as filterSystemProps,
|
|
47
|
+
y as forwardRef,
|
|
48
|
+
x as shouldForwardProp,
|
|
49
|
+
n as system,
|
|
50
|
+
f as wrapperSystem
|
|
51
|
+
};
|