welcome-ui 9.0.8 → 9.0.10
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/Breadcrumb.js +107 -106
- package/dist/Modal.js +59 -50
- package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
- package/dist/types/components/Breadcrumb/index.d.ts +1 -1
- package/dist/types/components/Breadcrumb/types.d.ts +1 -2
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +1 -1
- package/dist/types/components/Modal/Assets/index.d.ts +2 -2
- package/dist/types/components/Modal/components/Content.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +3 -3
- package/dist/types/components/Modal/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as te, jsx as R } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as he, Children as pe, cloneElement as be, useRef as A, useState as V, useCallback as X, useMemo as ge, useEffect as q } from "react";
|
|
4
4
|
import "./Icon-BisRi8B3.js";
|
|
5
5
|
import { R as me } from "./index-Dcq5gh3E.js";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as re } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { t as xe } from "./throttle-BDBzFeFj.js";
|
|
8
|
-
|
|
8
|
+
import { f as ze } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
9
|
+
var b = [], Re = function() {
|
|
9
10
|
return b.some(function(e) {
|
|
10
11
|
return e.activeTargets.length > 0;
|
|
11
12
|
});
|
|
12
|
-
},
|
|
13
|
+
}, we = function() {
|
|
13
14
|
return b.some(function(e) {
|
|
14
15
|
return e.skippedTargets.length > 0;
|
|
15
16
|
});
|
|
16
|
-
}, $ = "ResizeObserver loop completed with undelivered notifications.",
|
|
17
|
+
}, $ = "ResizeObserver loop completed with undelivered notifications.", Oe = function() {
|
|
17
18
|
var e;
|
|
18
19
|
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
19
20
|
message: $
|
|
@@ -24,24 +25,24 @@ var b = [], ze = function() {
|
|
|
24
25
|
})(y || (y = {}));
|
|
25
26
|
var g = function(e) {
|
|
26
27
|
return Object.freeze(e);
|
|
27
|
-
},
|
|
28
|
+
}, Ee = /* @__PURE__ */ function() {
|
|
28
29
|
function e(t, r) {
|
|
29
30
|
this.inlineSize = t, this.blockSize = r, g(this);
|
|
30
31
|
}
|
|
31
32
|
return e;
|
|
32
|
-
}(),
|
|
33
|
+
}(), ne = function() {
|
|
33
34
|
function e(t, r, n, i) {
|
|
34
35
|
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, g(this);
|
|
35
36
|
}
|
|
36
37
|
return e.prototype.toJSON = function() {
|
|
37
|
-
var t = this, r = t.x, n = t.y, i = t.top, o = t.right, s = t.bottom,
|
|
38
|
-
return { x: r, y: n, top: i, right: o, bottom: s, left:
|
|
38
|
+
var t = this, r = t.x, n = t.y, i = t.top, o = t.right, s = t.bottom, c = t.left, v = t.width, u = t.height;
|
|
39
|
+
return { x: r, y: n, top: i, right: o, bottom: s, left: c, width: v, height: u };
|
|
39
40
|
}, e.fromRect = function(t) {
|
|
40
41
|
return new e(t.x, t.y, t.width, t.height);
|
|
41
42
|
}, e;
|
|
42
43
|
}(), P = function(e) {
|
|
43
44
|
return e instanceof SVGElement && "getBBox" in e;
|
|
44
|
-
},
|
|
45
|
+
}, ie = function(e) {
|
|
45
46
|
if (P(e)) {
|
|
46
47
|
var t = e.getBBox(), r = t.width, n = t.height;
|
|
47
48
|
return !r && !n;
|
|
@@ -54,7 +55,7 @@ var g = function(e) {
|
|
|
54
55
|
return !0;
|
|
55
56
|
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
56
57
|
return !!(r && e instanceof r.Element);
|
|
57
|
-
},
|
|
58
|
+
}, ye = function(e) {
|
|
58
59
|
switch (e.tagName) {
|
|
59
60
|
case "INPUT":
|
|
60
61
|
if (e.type !== "image")
|
|
@@ -69,29 +70,29 @@ var g = function(e) {
|
|
|
69
70
|
return !0;
|
|
70
71
|
}
|
|
71
72
|
return !1;
|
|
72
|
-
}, E = typeof window < "u" ? window : {}, S = /* @__PURE__ */ new WeakMap(), U = /auto|scroll/,
|
|
73
|
+
}, E = typeof window < "u" ? window : {}, S = /* @__PURE__ */ new WeakMap(), U = /auto|scroll/, Te = /^tb|vertical/, Be = /msie|trident/i.test(E.navigator && E.navigator.userAgent), d = function(e) {
|
|
73
74
|
return parseFloat(e || "0");
|
|
74
75
|
}, z = function(e, t, r) {
|
|
75
|
-
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new
|
|
76
|
+
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new Ee((r ? t : e) || 0, (r ? e : t) || 0);
|
|
76
77
|
}, Y = g({
|
|
77
78
|
devicePixelContentBoxSize: z(),
|
|
78
79
|
borderBoxSize: z(),
|
|
79
80
|
contentBoxSize: z(),
|
|
80
|
-
contentRect: new
|
|
81
|
-
}),
|
|
81
|
+
contentRect: new ne(0, 0, 0, 0)
|
|
82
|
+
}), oe = function(e, t) {
|
|
82
83
|
if (t === void 0 && (t = !1), S.has(e) && !t)
|
|
83
84
|
return S.get(e);
|
|
84
|
-
if (
|
|
85
|
+
if (ie(e))
|
|
85
86
|
return S.set(e, Y), Y;
|
|
86
|
-
var r = getComputedStyle(e), n = P(e) && e.ownerSVGElement && e.getBBox(), i = !
|
|
87
|
+
var r = getComputedStyle(e), n = P(e) && e.ownerSVGElement && e.getBBox(), i = !Be && r.boxSizing === "border-box", o = Te.test(r.writingMode || ""), s = !n && U.test(r.overflowY || ""), c = !n && U.test(r.overflowX || ""), v = n ? 0 : d(r.paddingTop), u = n ? 0 : d(r.paddingRight), h = n ? 0 : d(r.paddingBottom), f = n ? 0 : d(r.paddingLeft), w = n ? 0 : d(r.borderTopWidth), a = n ? 0 : d(r.borderRightWidth), l = n ? 0 : d(r.borderBottomWidth), m = n ? 0 : d(r.borderLeftWidth), p = f + u, x = v + h, O = m + a, D = w + l, G = c ? e.offsetHeight - D - e.clientHeight : 0, F = s ? e.offsetWidth - O - e.clientWidth : 0, ue = i ? p + O : 0, le = i ? x + D : 0, T = n ? n.width : d(r.width) - ue - F, B = n ? n.height : d(r.height) - le - G, de = T + p + F + O, fe = B + x + G + D, H = g({
|
|
87
88
|
devicePixelContentBoxSize: z(Math.round(T * devicePixelRatio), Math.round(B * devicePixelRatio), o),
|
|
88
|
-
borderBoxSize: z(
|
|
89
|
+
borderBoxSize: z(de, fe, o),
|
|
89
90
|
contentBoxSize: z(T, B, o),
|
|
90
|
-
contentRect: new
|
|
91
|
+
contentRect: new ne(f, v, T, B)
|
|
91
92
|
});
|
|
92
93
|
return S.set(e, H), H;
|
|
93
|
-
},
|
|
94
|
-
var n =
|
|
94
|
+
}, se = function(e, t, r) {
|
|
95
|
+
var n = oe(e, r), i = n.borderBoxSize, o = n.contentBoxSize, s = n.devicePixelContentBoxSize;
|
|
95
96
|
switch (t) {
|
|
96
97
|
case y.DEVICE_PIXEL_CONTENT_BOX:
|
|
97
98
|
return s;
|
|
@@ -100,28 +101,28 @@ var g = function(e) {
|
|
|
100
101
|
default:
|
|
101
102
|
return o;
|
|
102
103
|
}
|
|
103
|
-
},
|
|
104
|
+
}, Se = /* @__PURE__ */ function() {
|
|
104
105
|
function e(t) {
|
|
105
|
-
var r =
|
|
106
|
+
var r = oe(t);
|
|
106
107
|
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = g([r.borderBoxSize]), this.contentBoxSize = g([r.contentBoxSize]), this.devicePixelContentBoxSize = g([r.devicePixelContentBoxSize]);
|
|
107
108
|
}
|
|
108
109
|
return e;
|
|
109
|
-
}(),
|
|
110
|
-
if (
|
|
110
|
+
}(), ae = function(e) {
|
|
111
|
+
if (ie(e))
|
|
111
112
|
return 1 / 0;
|
|
112
113
|
for (var t = 0, r = e.parentNode; r; )
|
|
113
114
|
t += 1, r = r.parentNode;
|
|
114
115
|
return t;
|
|
115
|
-
},
|
|
116
|
+
}, _e = function() {
|
|
116
117
|
var e = 1 / 0, t = [];
|
|
117
118
|
b.forEach(function(s) {
|
|
118
119
|
if (s.activeTargets.length !== 0) {
|
|
119
|
-
var
|
|
120
|
-
s.activeTargets.forEach(function(
|
|
121
|
-
var h = new
|
|
122
|
-
|
|
120
|
+
var c = [];
|
|
121
|
+
s.activeTargets.forEach(function(u) {
|
|
122
|
+
var h = new Se(u.target), f = ae(u.target);
|
|
123
|
+
c.push(h), u.lastReportedSize = se(u.target, u.observedBox), f < e && (e = f);
|
|
123
124
|
}), t.push(function() {
|
|
124
|
-
s.callback.call(s.observer,
|
|
125
|
+
s.callback.call(s.observer, c, s.observer);
|
|
125
126
|
}), s.activeTargets.splice(0, s.activeTargets.length);
|
|
126
127
|
}
|
|
127
128
|
});
|
|
@@ -133,35 +134,35 @@ var g = function(e) {
|
|
|
133
134
|
}, j = function(e) {
|
|
134
135
|
b.forEach(function(r) {
|
|
135
136
|
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
136
|
-
i.isActive() && (
|
|
137
|
+
i.isActive() && (ae(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
137
138
|
});
|
|
138
139
|
});
|
|
139
|
-
},
|
|
140
|
+
}, Ce = function() {
|
|
140
141
|
var e = 0;
|
|
141
|
-
for (j(e);
|
|
142
|
-
e =
|
|
143
|
-
return
|
|
144
|
-
},
|
|
145
|
-
return
|
|
142
|
+
for (j(e); Re(); )
|
|
143
|
+
e = _e(), j(e);
|
|
144
|
+
return we() && Oe(), e > 0;
|
|
145
|
+
}, M, ce = [], Ne = function() {
|
|
146
|
+
return ce.splice(0).forEach(function(e) {
|
|
146
147
|
return e();
|
|
147
148
|
});
|
|
148
|
-
},
|
|
149
|
-
if (!
|
|
149
|
+
}, ke = function(e) {
|
|
150
|
+
if (!M) {
|
|
150
151
|
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
151
152
|
new MutationObserver(function() {
|
|
152
|
-
return
|
|
153
|
-
}).observe(r, n),
|
|
153
|
+
return Ne();
|
|
154
|
+
}).observe(r, n), M = function() {
|
|
154
155
|
r.textContent = "".concat(t ? t-- : t++);
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
|
|
158
|
+
ce.push(e), M();
|
|
159
|
+
}, De = function(e) {
|
|
160
|
+
ke(function() {
|
|
160
161
|
requestAnimationFrame(e);
|
|
161
162
|
});
|
|
162
|
-
}, N = 0,
|
|
163
|
+
}, N = 0, Ae = function() {
|
|
163
164
|
return !!N;
|
|
164
|
-
}, Me = 250,
|
|
165
|
+
}, Me = 250, Ie = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, K = [
|
|
165
166
|
"resize",
|
|
166
167
|
"load",
|
|
167
168
|
"transitionend",
|
|
@@ -178,7 +179,7 @@ var g = function(e) {
|
|
|
178
179
|
"focus"
|
|
179
180
|
], Q = function(e) {
|
|
180
181
|
return e === void 0 && (e = 0), Date.now() + e;
|
|
181
|
-
}, I = !1,
|
|
182
|
+
}, I = !1, Le = function() {
|
|
182
183
|
function e() {
|
|
183
184
|
var t = this;
|
|
184
185
|
this.stopped = !0, this.listener = function() {
|
|
@@ -190,12 +191,12 @@ var g = function(e) {
|
|
|
190
191
|
if (t === void 0 && (t = Me), !I) {
|
|
191
192
|
I = !0;
|
|
192
193
|
var n = Q(t);
|
|
193
|
-
|
|
194
|
+
De(function() {
|
|
194
195
|
var i = !1;
|
|
195
196
|
try {
|
|
196
|
-
i =
|
|
197
|
+
i = Ce();
|
|
197
198
|
} finally {
|
|
198
|
-
if (I = !1, t = n - Q(), !
|
|
199
|
+
if (I = !1, t = n - Q(), !Ae())
|
|
199
200
|
return;
|
|
200
201
|
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
201
202
|
}
|
|
@@ -205,7 +206,7 @@ var g = function(e) {
|
|
|
205
206
|
this.stop(), this.run();
|
|
206
207
|
}, e.prototype.observe = function() {
|
|
207
208
|
var t = this, r = function() {
|
|
208
|
-
return t.observer && t.observer.observe(document.body,
|
|
209
|
+
return t.observer && t.observer.observe(document.body, Ie);
|
|
209
210
|
};
|
|
210
211
|
document.body ? r() : E.addEventListener("DOMContentLoaded", r);
|
|
211
212
|
}, e.prototype.start = function() {
|
|
@@ -219,11 +220,11 @@ var g = function(e) {
|
|
|
219
220
|
return E.removeEventListener(r, t.listener, !0);
|
|
220
221
|
}), this.stopped = !0);
|
|
221
222
|
}, e;
|
|
222
|
-
}(), W = new
|
|
223
|
+
}(), W = new Le(), Z = function(e) {
|
|
223
224
|
!N && e > 0 && W.start(), N += e, !N && W.stop();
|
|
224
|
-
},
|
|
225
|
-
return !P(e) && !
|
|
226
|
-
},
|
|
225
|
+
}, We = function(e) {
|
|
226
|
+
return !P(e) && !ye(e) && getComputedStyle(e).display === "inline";
|
|
227
|
+
}, Pe = function() {
|
|
227
228
|
function e(t, r) {
|
|
228
229
|
this.target = t, this.observedBox = r || y.CONTENT_BOX, this.lastReportedSize = {
|
|
229
230
|
inlineSize: 0,
|
|
@@ -231,10 +232,10 @@ var g = function(e) {
|
|
|
231
232
|
};
|
|
232
233
|
}
|
|
233
234
|
return e.prototype.isActive = function() {
|
|
234
|
-
var t =
|
|
235
|
-
return
|
|
235
|
+
var t = se(this.target, this.observedBox, !0);
|
|
236
|
+
return We(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
236
237
|
}, e;
|
|
237
|
-
}(),
|
|
238
|
+
}(), Ge = /* @__PURE__ */ function() {
|
|
238
239
|
function e(t, r) {
|
|
239
240
|
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
240
241
|
}
|
|
@@ -248,11 +249,11 @@ var g = function(e) {
|
|
|
248
249
|
function e() {
|
|
249
250
|
}
|
|
250
251
|
return e.connect = function(t, r) {
|
|
251
|
-
var n = new
|
|
252
|
+
var n = new Ge(t, r);
|
|
252
253
|
_.set(t, n);
|
|
253
254
|
}, e.observe = function(t, r, n) {
|
|
254
255
|
var i = _.get(t), o = i.observationTargets.length === 0;
|
|
255
|
-
ee(i.observationTargets, r) < 0 && (o && b.push(i), i.observationTargets.push(new
|
|
256
|
+
ee(i.observationTargets, r) < 0 && (o && b.push(i), i.observationTargets.push(new Pe(r, n && n.box)), Z(1), W.schedule());
|
|
256
257
|
}, e.unobserve = function(t, r) {
|
|
257
258
|
var n = _.get(t), i = ee(n.observationTargets, r), o = n.observationTargets.length === 1;
|
|
258
259
|
i >= 0 && (o && b.splice(b.indexOf(n), 1), n.observationTargets.splice(i, 1), Z(-1));
|
|
@@ -262,7 +263,7 @@ var g = function(e) {
|
|
|
262
263
|
return r.unobserve(t, i.target);
|
|
263
264
|
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
264
265
|
}, e;
|
|
265
|
-
}(),
|
|
266
|
+
}(), Fe = function() {
|
|
266
267
|
function e(t) {
|
|
267
268
|
if (arguments.length === 0)
|
|
268
269
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
@@ -288,63 +289,63 @@ var g = function(e) {
|
|
|
288
289
|
return "function ResizeObserver () { [polyfill code] }";
|
|
289
290
|
}, e;
|
|
290
291
|
}();
|
|
291
|
-
const
|
|
292
|
-
root:
|
|
293
|
-
list:
|
|
292
|
+
const He = (e, t, r) => Math.min(Math.max(e, t), r), Ve = "_root_ce14e_2", Xe = "_list_ce14e_14", ve = {
|
|
293
|
+
root: Ve,
|
|
294
|
+
list: Xe,
|
|
294
295
|
"start-gradient": "_start-gradient_ce14e_24",
|
|
295
296
|
"end-gradient": "_end-gradient_ce14e_28",
|
|
296
297
|
"item-wrapper": "_item-wrapper_ce14e_39",
|
|
297
298
|
"item-content": "_item-content_ce14e_44",
|
|
298
299
|
"item-separator": "_item-separator_ce14e_58"
|
|
299
|
-
}, L =
|
|
300
|
-
({
|
|
301
|
-
const
|
|
302
|
-
return /* @__PURE__ */ te("li", { "aria-label": "breadcrumb", className: L("item-wrapper"), "data-testid":
|
|
303
|
-
|
|
300
|
+
}, L = re(ve), qe = ze(
|
|
301
|
+
({ as: e = "a", children: t, "data-testid": r, isActive: n, separator: i, ...o }, s) => {
|
|
302
|
+
const c = o.href || o.to;
|
|
303
|
+
return /* @__PURE__ */ te("li", { "aria-label": "breadcrumb", className: L("item-wrapper"), "data-testid": r, children: [
|
|
304
|
+
i ? /* @__PURE__ */ R("span", { className: L("item-separator"), role: "presentation", children: i }) : null,
|
|
304
305
|
/* @__PURE__ */ R(
|
|
305
|
-
|
|
306
|
+
e,
|
|
306
307
|
{
|
|
307
|
-
"aria-current":
|
|
308
|
-
"aria-disabled": !
|
|
309
|
-
...
|
|
310
|
-
className: L("item-content",
|
|
311
|
-
ref:
|
|
312
|
-
children:
|
|
308
|
+
"aria-current": n ? "page" : void 0,
|
|
309
|
+
"aria-disabled": !c,
|
|
310
|
+
...o,
|
|
311
|
+
className: L("item-content", o.className),
|
|
312
|
+
ref: s,
|
|
313
|
+
children: t
|
|
313
314
|
}
|
|
314
315
|
)
|
|
315
316
|
] });
|
|
316
317
|
}
|
|
317
|
-
), k =
|
|
318
|
+
), k = re(ve), $e = he(
|
|
318
319
|
({ children: e, lastChildNotClickable: t = !0, separator: r = /* @__PURE__ */ R(me, { size: "xs" }), ...n }, i) => {
|
|
319
|
-
const o = pe.toArray(e).filter(Boolean), s = o.length,
|
|
320
|
-
const
|
|
320
|
+
const o = pe.toArray(e).filter(Boolean), s = o.length, c = o.map((w, a) => {
|
|
321
|
+
const l = s === 1 || s === a + 1;
|
|
321
322
|
return be(w, {
|
|
322
|
-
isActive:
|
|
323
|
+
isActive: l && t,
|
|
323
324
|
key: `breadcrumb-${a}`,
|
|
324
|
-
separator:
|
|
325
|
+
separator: l ? void 0 : r,
|
|
325
326
|
...w.props
|
|
326
327
|
});
|
|
327
|
-
}), { endGradient:
|
|
328
|
+
}), { endGradient: v, listRef: u, onListScroll: h, startGradient: f } = Je();
|
|
328
329
|
return /* @__PURE__ */ te("nav", { ref: i, ...n, className: k("root", n.className), children: [
|
|
329
330
|
f,
|
|
330
|
-
/* @__PURE__ */ R("ol", { className: k("list"), dir: "rtl", onScroll: h, ref:
|
|
331
|
-
|
|
331
|
+
/* @__PURE__ */ R("ol", { className: k("list"), dir: "rtl", onScroll: h, ref: u, children: c.reverse() }),
|
|
332
|
+
v
|
|
332
333
|
] });
|
|
333
334
|
}
|
|
334
|
-
),
|
|
335
|
-
Item:
|
|
336
|
-
}),
|
|
337
|
-
const e =
|
|
338
|
-
a && (a.style.transform = `scale3d(${
|
|
339
|
-
},
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
}, []),
|
|
335
|
+
), tt = Object.assign($e, {
|
|
336
|
+
Item: qe
|
|
337
|
+
}), Je = () => {
|
|
338
|
+
const e = A(null), t = A(), r = A(), [n, i] = V(!1), [o, s] = V(0), c = (a, l) => {
|
|
339
|
+
a && (a.style.transform = `scale3d(${l}, 1, 1)`);
|
|
340
|
+
}, v = X((a) => {
|
|
341
|
+
const l = 1 - a;
|
|
342
|
+
c(t.current, l), c(r.current, a);
|
|
343
|
+
}, []), u = X(() => {
|
|
343
344
|
const {
|
|
344
|
-
current: { offsetWidth: a, scrollLeft:
|
|
345
|
-
} = e, p = m - a, O =
|
|
346
|
-
|
|
347
|
-
}, [o,
|
|
345
|
+
current: { offsetWidth: a, scrollLeft: l, scrollWidth: m }
|
|
346
|
+
} = e, p = m - a, O = He(Math.abs(l - o), 0, p) / p;
|
|
347
|
+
v(O);
|
|
348
|
+
}, [o, v]), h = ge(
|
|
348
349
|
() => xe(
|
|
349
350
|
(a) => {
|
|
350
351
|
const [
|
|
@@ -352,9 +353,9 @@ const Fe = (e, t, r) => Math.min(Math.max(e, t), r), He = "_root_ce14e_2", Ve =
|
|
|
352
353
|
// Is offsetWidth really needed ?
|
|
353
354
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
354
355
|
// @ts-ignore
|
|
355
|
-
target: { offsetWidth:
|
|
356
|
+
target: { offsetWidth: l, scrollLeft: m, scrollWidth: p }
|
|
356
357
|
}
|
|
357
|
-
] = a, x = p -
|
|
358
|
+
] = a, x = p - l;
|
|
358
359
|
o || s(m === 0 ? 0 : x), i(x > 0);
|
|
359
360
|
},
|
|
360
361
|
300,
|
|
@@ -363,11 +364,11 @@ const Fe = (e, t, r) => Math.min(Math.max(e, t), r), He = "_root_ce14e_2", Ve =
|
|
|
363
364
|
[o]
|
|
364
365
|
);
|
|
365
366
|
q(() => {
|
|
366
|
-
const a = new
|
|
367
|
+
const a = new Fe(h);
|
|
367
368
|
return a.observe(e.current), () => a.disconnect();
|
|
368
369
|
}, []), q(() => {
|
|
369
|
-
t.current && r.current &&
|
|
370
|
-
}, [n,
|
|
370
|
+
t.current && r.current && v(0);
|
|
371
|
+
}, [n, v]);
|
|
371
372
|
const f = n ? /* @__PURE__ */ R(
|
|
372
373
|
"span",
|
|
373
374
|
{
|
|
@@ -381,9 +382,9 @@ const Fe = (e, t, r) => Math.min(Math.max(e, t), r), He = "_root_ce14e_2", Ve =
|
|
|
381
382
|
className: k("end-gradient", "bg-linear-to-l from-neutral-10 to-transparent"),
|
|
382
383
|
ref: r
|
|
383
384
|
}
|
|
384
|
-
) : null, listRef: e, onListScroll:
|
|
385
|
+
) : null, listRef: e, onListScroll: u, startGradient: f };
|
|
385
386
|
};
|
|
386
387
|
export {
|
|
387
|
-
|
|
388
|
-
|
|
388
|
+
tt as Breadcrumb,
|
|
389
|
+
$e as BreadcrumbComponent
|
|
389
390
|
};
|
package/dist/Modal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
3
3
|
import { u as C } from "./RTNCFSKZ-P4icqVD0.js";
|
|
4
4
|
import { D as I, u as y } from "./NI3IVY7K-DxnarnKs.js";
|
|
5
|
-
import { forwardRef as
|
|
5
|
+
import { forwardRef as i, isValidElement as B, cloneElement as S, useState as A, useEffect as T } from "react";
|
|
6
6
|
import { c as n } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { f as z } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
8
8
|
import { D as v } from "./DSAASPLT-COUlh0RL.js";
|
|
@@ -12,7 +12,7 @@ import { Button as E } from "./Button.js";
|
|
|
12
12
|
import { Text as m } from "./Text.js";
|
|
13
13
|
import { CloseButton as M } from "./CloseButton.js";
|
|
14
14
|
import { D as H } from "./ZTXFEM5L-BEA_1pIo.js";
|
|
15
|
-
const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1vbnu_117",
|
|
15
|
+
const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1vbnu_117", l = {
|
|
16
16
|
root: R,
|
|
17
17
|
"asset-backdrop": "_asset-backdrop_1vbnu_8",
|
|
18
18
|
hideOnInteractOutside: W,
|
|
@@ -23,43 +23,44 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
|
|
|
23
23
|
"asset-content": "_asset-content_1vbnu_96",
|
|
24
24
|
dialog: F,
|
|
25
25
|
"close-button": "_close-button_1vbnu_159"
|
|
26
|
-
}, V = n(
|
|
27
|
-
({ hideOnInteractOutside: t, ...e },
|
|
26
|
+
}, V = n(l), q = ({ children: t, ...e }) => /* @__PURE__ */ s(E, { className: V("close-button"), shape: "circle", variant: "secondary", ...e, children: t }), G = n(l), J = i(
|
|
27
|
+
({ hideOnInteractOutside: t, ...e }, o) => /* @__PURE__ */ s(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: G("asset-backdrop", t && "hideOnInteractOutside"),
|
|
31
31
|
...e,
|
|
32
|
-
ref:
|
|
33
|
-
children: /* @__PURE__ */
|
|
32
|
+
ref: o,
|
|
33
|
+
children: /* @__PURE__ */ s(
|
|
34
34
|
v,
|
|
35
35
|
{
|
|
36
|
-
render: /* @__PURE__ */
|
|
36
|
+
render: /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(j, {}) })
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
|
-
), K = n(
|
|
41
|
+
), K = n(l), L = ({
|
|
42
42
|
children: t,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
className: e,
|
|
44
|
+
...o
|
|
45
|
+
}) => /* @__PURE__ */ s("div", { className: K("root", "asset-content", e), ...o, children: t }), P = n(l), N = ({ children: t, className: e, ...o }) => /* @__PURE__ */ s(m, { as: "p", className: P("asset-title", e), lines: 2, variant: "h4", ...o, children: t }), g = n(l), Q = i(
|
|
46
|
+
({ children: t, customContent: e, subtitle: o, title: r, ...a }, c) => /* @__PURE__ */ d("div", { className: g("root", "asset-wrapper"), ref: c, ...a, children: [
|
|
46
47
|
t,
|
|
47
48
|
/* @__PURE__ */ d("div", { className: g("root", "asset-title-wrapper"), children: [
|
|
48
49
|
e,
|
|
49
|
-
!e &&
|
|
50
|
-
!e && r ? /* @__PURE__ */
|
|
50
|
+
!e && o ? /* @__PURE__ */ s(m, { variant: "subtitle-sm", children: o }) : null,
|
|
51
|
+
!e && r ? /* @__PURE__ */ s(N, { children: r }) : null
|
|
51
52
|
] })
|
|
52
53
|
] })
|
|
53
|
-
), U = n(
|
|
54
|
+
), U = n(l), X = ({
|
|
54
55
|
children: t,
|
|
55
56
|
...e
|
|
56
|
-
}) => /* @__PURE__ */
|
|
57
|
+
}) => /* @__PURE__ */ s("div", { className: U("root", "dialog"), ...e, children: t }), Y = n(l), Z = ({ children: t }) => /* @__PURE__ */ s("div", { className: Y("root", "iframe-wrapper"), children: t }), tt = Object.assign(X, {
|
|
57
58
|
AssetWithTitle: Q,
|
|
58
59
|
Backdrop: J,
|
|
59
60
|
Content: L,
|
|
60
61
|
Iframe: Z,
|
|
61
62
|
Title: N
|
|
62
|
-
}), et = "_root_4g0z0_4", ot = "_body_4g0z0_48", st = "_footer_4g0z0_48", rt = "_header_4g0z0_48", nt = "_scrollable_4g0z0_60", at = "_content_4g0z0_66", ct = "_close_4g0z0_66", it = "_backdrop_4g0z0_85", lt = "_hideOnInteractOutside_4g0z0_96", _t = "_icon_4g0z0_127",
|
|
63
|
+
}), et = "_root_4g0z0_4", ot = "_body_4g0z0_48", st = "_footer_4g0z0_48", rt = "_header_4g0z0_48", nt = "_scrollable_4g0z0_60", at = "_content_4g0z0_66", ct = "_close_4g0z0_66", it = "_backdrop_4g0z0_85", lt = "_hideOnInteractOutside_4g0z0_96", _t = "_icon_4g0z0_127", _ = {
|
|
63
64
|
root: et,
|
|
64
65
|
body: ot,
|
|
65
66
|
footer: st,
|
|
@@ -81,43 +82,51 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
|
|
|
81
82
|
"footer-information": "_footer-information_4g0z0_163",
|
|
82
83
|
"footer-information-title": "_footer-information-title_4g0z0_170",
|
|
83
84
|
"footer-information-subtitle": "_footer-information-subtitle_4g0z0_174"
|
|
84
|
-
}, dt = n(
|
|
85
|
-
({ backdrop: t, hideOnInteractOutside: e, ...
|
|
85
|
+
}, dt = n(_), mt = i(
|
|
86
|
+
({ backdrop: t, hideOnInteractOutside: e, ...o }, r) => t === !0 ? /* @__PURE__ */ s(
|
|
86
87
|
"div",
|
|
87
88
|
{
|
|
88
89
|
className: dt("backdrop", e && "hideOnInteractOutside"),
|
|
89
90
|
ref: r,
|
|
90
|
-
...
|
|
91
|
+
...o
|
|
91
92
|
}
|
|
92
|
-
) : B(t) ? S(t, { ref: r, ...
|
|
93
|
-
), ut = n(
|
|
94
|
-
({ children: t,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
) : B(t) ? S(t, { ref: r, ...o }) : null
|
|
94
|
+
), ut = n(_), ft = i(({ className: t, ...e }, o) => /* @__PURE__ */ s("section", { className: ut("body", t), ref: o, ...e })), pt = n(_), x = (t) => /* @__PURE__ */ s(v, { render: /* @__PURE__ */ s(M, { className: pt("close"), ...t }) }), ht = n(_), bt = i(
|
|
95
|
+
({ children: t, className: e, withClosingButton: o = !0, ...r }, a) => /* @__PURE__ */ d(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: (ht("content", o && "with-close-button"), e),
|
|
99
|
+
ref: a,
|
|
100
|
+
...r,
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ s(x, {}),
|
|
103
|
+
t
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
), u = n(_), gt = i(
|
|
108
|
+
({ children: t, className: e, information: o, ...r }, a) => /* @__PURE__ */ d("footer", { className: u("footer", e), ref: a, ...r, children: [
|
|
109
|
+
t ? /* @__PURE__ */ s("div", { className: u("footer-children-wrapper"), children: t }) : null,
|
|
110
|
+
o ? /* @__PURE__ */ d("div", { className: u("footer-information"), children: [
|
|
111
|
+
/* @__PURE__ */ s(m, { className: u("footer-information-title"), variant: "subtitle-sm", children: o.title }),
|
|
112
|
+
/* @__PURE__ */ s(m, { className: u("footer-information-subtitle"), variant: "sm", children: o.subtitle })
|
|
104
113
|
] }) : null
|
|
105
114
|
] })
|
|
106
|
-
), p = n(
|
|
107
|
-
({
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
|
|
115
|
+
), p = n(_), zt = i(
|
|
116
|
+
({ className: t, icon: e, subtitle: o, title: r, ...a }, c) => /* @__PURE__ */ d("header", { className: p("header", e && "icon", t), ref: c, ...a, children: [
|
|
117
|
+
/* @__PURE__ */ s(x, {}),
|
|
118
|
+
e,
|
|
119
|
+
/* @__PURE__ */ s(m, { className: p("header-title"), variant: "h4", children: r }),
|
|
120
|
+
o ? /* @__PURE__ */ s(m, { className: p("header-subtitle"), children: o }) : null
|
|
112
121
|
] })
|
|
113
122
|
), vt = z(
|
|
114
|
-
({ as: t, store: e, ...
|
|
115
|
-
), Nt = n(
|
|
123
|
+
({ as: t, store: e, ...o }, r) => /* @__PURE__ */ s(H, { ref: r, render: t ? /* @__PURE__ */ s(t, {}) : void 0, store: e, ...o })
|
|
124
|
+
), Nt = n(_);
|
|
116
125
|
function Et(t) {
|
|
117
|
-
const { onClose: e, setOpen:
|
|
126
|
+
const { onClose: e, setOpen: o, ...r } = t || {};
|
|
118
127
|
return y({
|
|
119
|
-
setOpen: (
|
|
120
|
-
!
|
|
128
|
+
setOpen: (c) => {
|
|
129
|
+
!c && e && e(), o == null || o(c);
|
|
121
130
|
},
|
|
122
131
|
...r
|
|
123
132
|
});
|
|
@@ -127,10 +136,10 @@ const xt = z(
|
|
|
127
136
|
ariaLabel: t,
|
|
128
137
|
/** for render property */
|
|
129
138
|
as: e,
|
|
130
|
-
backdrop:
|
|
139
|
+
backdrop: o = !0,
|
|
131
140
|
children: r,
|
|
132
|
-
className:
|
|
133
|
-
hideOnInteractOutside:
|
|
141
|
+
className: a,
|
|
142
|
+
hideOnInteractOutside: c = !0,
|
|
134
143
|
size: $ = "lg",
|
|
135
144
|
store: h,
|
|
136
145
|
...w
|
|
@@ -138,13 +147,13 @@ const xt = z(
|
|
|
138
147
|
const [D, k] = A(!1), { contentElement: f, open: b } = C(h);
|
|
139
148
|
return T(() => {
|
|
140
149
|
b && f && k(f.scrollHeight > f.offsetHeight);
|
|
141
|
-
}, [f, b]), /* @__PURE__ */
|
|
150
|
+
}, [f, b]), /* @__PURE__ */ s(
|
|
142
151
|
I,
|
|
143
152
|
{
|
|
144
|
-
backdrop: /* @__PURE__ */
|
|
145
|
-
hideOnInteractOutside:
|
|
153
|
+
backdrop: /* @__PURE__ */ s(mt, { backdrop: o, hideOnInteractOutside: c }),
|
|
154
|
+
hideOnInteractOutside: c,
|
|
146
155
|
ref: O,
|
|
147
|
-
render: e ? /* @__PURE__ */
|
|
156
|
+
render: e ? /* @__PURE__ */ s(e, {}) : /* @__PURE__ */ s("div", { className: Nt("root", `size-${$}`, D && "scrollable", a) }),
|
|
148
157
|
store: h,
|
|
149
158
|
...w,
|
|
150
159
|
"aria-label": t,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BreadcrumbItemOptions } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* @name Breadcrumb.Item
|
|
4
4
|
*/
|
|
5
|
-
export declare const Item: import('
|
|
5
|
+
export declare const Item: import('../../utils').FunctionComponentWithAs<"a", BreadcrumbItemOptions>;
|
|
@@ -2,5 +2,5 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { BreadcrumbProps } from './types';
|
|
3
3
|
export declare const BreadcrumbComponent: React.ForwardRefExoticComponent<Omit<BreadcrumbProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<BreadcrumbProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
5
|
-
Item:
|
|
5
|
+
Item: import('../../utils').FunctionComponentWithAs<"a", import('./types').BreadcrumbItemOptions>;
|
|
6
6
|
};
|
|
@@ -6,12 +6,11 @@ interface BreadcrumbOptions {
|
|
|
6
6
|
separator?: React.ReactNode | string;
|
|
7
7
|
}
|
|
8
8
|
export type BreadcrumbProps = BreadcrumbOptions & ComponentPropsWithRef<'div'> & HTMLAttributes<HTMLDivElement>;
|
|
9
|
-
interface BreadcrumbItemOptions {
|
|
9
|
+
export interface BreadcrumbItemOptions {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
'data-testid'?: string;
|
|
12
12
|
isActive?: boolean;
|
|
13
13
|
separator?: React.ReactNode | string;
|
|
14
14
|
to?: string;
|
|
15
15
|
}
|
|
16
|
-
export type BreadcrumbItemProps = BreadcrumbItemOptions & ComponentPropsWithRef<'a'> & HTMLAttributes<HTMLAnchorElement>;
|
|
17
16
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HTMLAttributes, default as React } from 'react';
|
|
2
|
-
export declare const AssetContent: ({ children, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AssetContent: ({ children, className, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TextProps } from '../../Text/types';
|
|
2
|
-
export declare const AssetTitle: ({ children, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AssetTitle: ({ children, className, ...rest }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const Assets: (({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
2
2
|
AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
3
|
Backdrop: import('react').ForwardRefExoticComponent<import('../types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
-
Content: ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
Content: ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
Iframe: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
Title: ({ children, ...rest }: import('../../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Title: ({ children, className, ...rest }: import('../../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name Modal.Content
|
|
3
3
|
*/
|
|
4
|
-
export declare const Content: import('react').ForwardRefExoticComponent<{
|
|
4
|
+
export declare const Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
withClosingButton?: boolean;
|
|
6
6
|
} & {
|
|
7
7
|
children?: import('react').ReactNode | undefined;
|
|
@@ -4,7 +4,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
|
|
|
4
4
|
Body: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
|
|
5
5
|
children?: import('react').ReactNode | undefined;
|
|
6
6
|
} & import('react').RefAttributes<HTMLElement>>;
|
|
7
|
-
Content: import('react').ForwardRefExoticComponent<{
|
|
7
|
+
Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
8
8
|
withClosingButton?: boolean;
|
|
9
9
|
} & {
|
|
10
10
|
children?: import('react').ReactNode | undefined;
|
|
@@ -16,7 +16,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
|
|
|
16
16
|
export declare const AssetModal: (({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element) & {
|
|
17
17
|
AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./Assets/types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
18
|
Backdrop: import('react').ForwardRefExoticComponent<import('./types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
19
|
-
Content: ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
Content: ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
Iframe: ({ children }: React.PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
Title: ({ children, ...rest }: import('../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
Title: ({ children, className, ...rest }: import('../Text/types').TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
};
|
|
@@ -27,7 +27,7 @@ export interface HeaderOptions {
|
|
|
27
27
|
}
|
|
28
28
|
export type HeaderProps = MergeProps<HeaderOptions, HTMLAttributes<HTMLDivElement>>;
|
|
29
29
|
export type BodyProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
30
|
-
export type ContentProps = PropsWithChildren<{
|
|
30
|
+
export type ContentProps = PropsWithChildren<HTMLAttributes<HTMLDivElement> & {
|
|
31
31
|
/**
|
|
32
32
|
* show or hide the closing button
|
|
33
33
|
*/
|