@donkit-ai/design-system 1.3.10 → 1.3.12
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/high-contrast.css +92 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +33 -0
- package/dist/index.es.js +929 -868
- package/dist/light.css +79 -0
- package/dist/tokens.css +1 -1
- package/package.json +8 -4
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import L, { useState as k, useRef as
|
|
2
|
-
import { Check as re, X as ee, ChevronDown as ne, Minus as
|
|
1
|
+
import L, { useState as k, useRef as N, useEffect as R, useLayoutEffect as Ee, useId as ke } from "react";
|
|
2
|
+
import { Check as re, X as ee, ChevronDown as ne, Minus as ge, Plus as $e, XCircle as de, AlertTriangle as ue, CheckCircle as fe, Info as me, ChevronUp as Te, ChevronsUpDown as Re, ChevronLeft as Ie, ChevronRight as je, Copy as Se, Brain as Ae } from "lucide-react";
|
|
3
3
|
import ae from "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const A = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
7
7
|
3: 24,
|
|
8
8
|
4: 28,
|
|
9
9
|
5: 48
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var le = { exports: {} }, se = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
@@ -19,28 +19,28 @@ var ce = { exports: {} }, te = {};
|
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
21
|
var pe;
|
|
22
|
-
function
|
|
23
|
-
if (pe) return
|
|
22
|
+
function Be() {
|
|
23
|
+
if (pe) return se;
|
|
24
24
|
pe = 1;
|
|
25
|
-
var
|
|
26
|
-
function r(
|
|
25
|
+
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
26
|
+
function r(a, o, n) {
|
|
27
27
|
var i = null;
|
|
28
|
-
if (n !== void 0 && (i = "" + n),
|
|
28
|
+
if (n !== void 0 && (i = "" + n), o.key !== void 0 && (i = "" + o.key), "key" in o) {
|
|
29
29
|
n = {};
|
|
30
|
-
for (var
|
|
31
|
-
|
|
32
|
-
} else n =
|
|
33
|
-
return
|
|
34
|
-
$$typeof:
|
|
35
|
-
type:
|
|
30
|
+
for (var c in o)
|
|
31
|
+
c !== "key" && (n[c] = o[c]);
|
|
32
|
+
} else n = o;
|
|
33
|
+
return o = n.ref, {
|
|
34
|
+
$$typeof: t,
|
|
35
|
+
type: a,
|
|
36
36
|
key: i,
|
|
37
|
-
ref:
|
|
37
|
+
ref: o !== void 0 ? o : null,
|
|
38
38
|
props: n
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return se.Fragment = s, se.jsx = r, se.jsxs = r, se;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var te = {};
|
|
44
44
|
/**
|
|
45
45
|
* @license React
|
|
46
46
|
* react-jsx-runtime.development.js
|
|
@@ -51,273 +51,273 @@ var se = {};
|
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
53
|
var he;
|
|
54
|
-
function
|
|
54
|
+
function De() {
|
|
55
55
|
return he || (he = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
|
-
function
|
|
57
|
-
if (
|
|
58
|
-
if (typeof
|
|
59
|
-
return
|
|
60
|
-
if (typeof
|
|
61
|
-
switch (
|
|
62
|
-
case
|
|
56
|
+
function t(l) {
|
|
57
|
+
if (l == null) return null;
|
|
58
|
+
if (typeof l == "function")
|
|
59
|
+
return l.$$typeof === G ? null : l.displayName || l.name || null;
|
|
60
|
+
if (typeof l == "string") return l;
|
|
61
|
+
switch (l) {
|
|
62
|
+
case g:
|
|
63
63
|
return "Fragment";
|
|
64
|
-
case
|
|
64
|
+
case P:
|
|
65
65
|
return "Profiler";
|
|
66
|
-
case
|
|
66
|
+
case y:
|
|
67
67
|
return "StrictMode";
|
|
68
68
|
case O:
|
|
69
69
|
return "Suspense";
|
|
70
70
|
case q:
|
|
71
71
|
return "SuspenseList";
|
|
72
|
-
case
|
|
72
|
+
case C:
|
|
73
73
|
return "Activity";
|
|
74
74
|
}
|
|
75
|
-
if (typeof
|
|
76
|
-
switch (typeof
|
|
75
|
+
if (typeof l == "object")
|
|
76
|
+
switch (typeof l.tag == "number" && console.error(
|
|
77
77
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
78
|
-
),
|
|
78
|
+
), l.$$typeof) {
|
|
79
79
|
case w:
|
|
80
80
|
return "Portal";
|
|
81
|
-
case
|
|
82
|
-
return
|
|
83
|
-
case
|
|
84
|
-
return (
|
|
81
|
+
case $:
|
|
82
|
+
return l.displayName || "Context";
|
|
83
|
+
case I:
|
|
84
|
+
return (l._context.displayName || "Context") + ".Consumer";
|
|
85
85
|
case F:
|
|
86
|
-
var
|
|
87
|
-
return
|
|
86
|
+
var b = l.render;
|
|
87
|
+
return l = l.displayName, l || (l = b.displayName || b.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
88
88
|
case M:
|
|
89
|
-
return
|
|
89
|
+
return b = l.displayName || null, b !== null ? b : t(l.type) || "Memo";
|
|
90
90
|
case W:
|
|
91
|
-
|
|
91
|
+
b = l._payload, l = l._init;
|
|
92
92
|
try {
|
|
93
|
-
return
|
|
93
|
+
return t(l(b));
|
|
94
94
|
} catch {
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
return "" +
|
|
99
|
+
function s(l) {
|
|
100
|
+
return "" + l;
|
|
101
101
|
}
|
|
102
|
-
function r(
|
|
102
|
+
function r(l) {
|
|
103
103
|
try {
|
|
104
|
-
|
|
105
|
-
var
|
|
104
|
+
s(l);
|
|
105
|
+
var b = !1;
|
|
106
106
|
} catch {
|
|
107
|
-
|
|
107
|
+
b = !0;
|
|
108
108
|
}
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
var
|
|
112
|
-
return
|
|
113
|
-
|
|
109
|
+
if (b) {
|
|
110
|
+
b = console;
|
|
111
|
+
var E = b.error, S = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
112
|
+
return E.call(
|
|
113
|
+
b,
|
|
114
114
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
115
|
-
|
|
116
|
-
),
|
|
115
|
+
S
|
|
116
|
+
), s(l);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
if (
|
|
121
|
-
if (typeof
|
|
119
|
+
function a(l) {
|
|
120
|
+
if (l === g) return "<>";
|
|
121
|
+
if (typeof l == "object" && l !== null && l.$$typeof === W)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
124
|
+
var b = t(l);
|
|
125
|
+
return b ? "<" + b + ">" : "<...>";
|
|
126
126
|
} catch {
|
|
127
127
|
return "<...>";
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
var
|
|
132
|
-
return
|
|
130
|
+
function o() {
|
|
131
|
+
var l = H.A;
|
|
132
|
+
return l === null ? null : l.getOwner();
|
|
133
133
|
}
|
|
134
134
|
function n() {
|
|
135
135
|
return Error("react-stack-top-frame");
|
|
136
136
|
}
|
|
137
|
-
function i(
|
|
138
|
-
if (
|
|
139
|
-
var
|
|
140
|
-
if (
|
|
137
|
+
function i(l) {
|
|
138
|
+
if (V.call(l, "key")) {
|
|
139
|
+
var b = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
140
|
+
if (b && b.isReactWarning) return !1;
|
|
141
141
|
}
|
|
142
|
-
return
|
|
142
|
+
return l.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function l
|
|
145
|
-
function
|
|
146
|
-
|
|
144
|
+
function c(l, b) {
|
|
145
|
+
function E() {
|
|
146
|
+
T || (T = !0, console.error(
|
|
147
147
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
148
|
-
|
|
148
|
+
b
|
|
149
149
|
));
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
get:
|
|
151
|
+
E.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
152
|
+
get: E,
|
|
153
153
|
configurable: !0
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
function m() {
|
|
157
|
-
var
|
|
158
|
-
return
|
|
157
|
+
var l = t(this.type);
|
|
158
|
+
return D[l] || (D[l] = !0, console.error(
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
|
-
)),
|
|
160
|
+
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
161
161
|
}
|
|
162
|
-
function u(
|
|
163
|
-
var
|
|
164
|
-
return
|
|
162
|
+
function u(l, b, E, S, K, X) {
|
|
163
|
+
var B = E.ref;
|
|
164
|
+
return l = {
|
|
165
165
|
$$typeof: _,
|
|
166
|
-
type:
|
|
167
|
-
key:
|
|
168
|
-
props:
|
|
169
|
-
_owner:
|
|
170
|
-
}, (
|
|
166
|
+
type: l,
|
|
167
|
+
key: b,
|
|
168
|
+
props: E,
|
|
169
|
+
_owner: S
|
|
170
|
+
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(l, "ref", {
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
get: m
|
|
173
|
-
}) : Object.defineProperty(
|
|
173
|
+
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: 0
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(l, "_debugInfo", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
182
|
value: null
|
|
183
|
-
}), Object.defineProperty(
|
|
183
|
+
}), Object.defineProperty(l, "_debugStack", {
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
187
|
value: K
|
|
188
|
-
}), Object.defineProperty(
|
|
188
|
+
}), Object.defineProperty(l, "_debugTask", {
|
|
189
189
|
configurable: !1,
|
|
190
190
|
enumerable: !1,
|
|
191
191
|
writable: !0,
|
|
192
192
|
value: X
|
|
193
|
-
}), Object.freeze && (Object.freeze(
|
|
193
|
+
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
194
194
|
}
|
|
195
|
-
function p(
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
if (
|
|
199
|
-
if (h(
|
|
200
|
-
for (
|
|
201
|
-
f(
|
|
202
|
-
Object.freeze && Object.freeze(
|
|
195
|
+
function p(l, b, E, S, K, X) {
|
|
196
|
+
var B = b.children;
|
|
197
|
+
if (B !== void 0)
|
|
198
|
+
if (S)
|
|
199
|
+
if (h(B)) {
|
|
200
|
+
for (S = 0; S < B.length; S++)
|
|
201
|
+
f(B[S]);
|
|
202
|
+
Object.freeze && Object.freeze(B);
|
|
203
203
|
} else
|
|
204
204
|
console.error(
|
|
205
205
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
206
206
|
);
|
|
207
|
-
else f(
|
|
208
|
-
if (
|
|
209
|
-
|
|
210
|
-
var J = Object.keys(
|
|
207
|
+
else f(B);
|
|
208
|
+
if (V.call(b, "key")) {
|
|
209
|
+
B = t(l);
|
|
210
|
+
var J = Object.keys(b).filter(function(ye) {
|
|
211
211
|
return ye !== "key";
|
|
212
212
|
});
|
|
213
|
-
|
|
213
|
+
S = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", j[B + S] || (J = 0 < J.length ? "{" + J.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
214
214
|
`A props object containing a "key" prop is being spread into JSX:
|
|
215
215
|
let props = %s;
|
|
216
216
|
<%s {...props} />
|
|
217
217
|
React keys must be passed directly to JSX without using spread:
|
|
218
218
|
let props = %s;
|
|
219
219
|
<%s key={someKey} {...props} />`,
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
S,
|
|
221
|
+
B,
|
|
222
222
|
J,
|
|
223
|
-
|
|
224
|
-
), j[
|
|
223
|
+
B
|
|
224
|
+
), j[B + S] = !0);
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
for (var oe in
|
|
229
|
-
oe !== "key" && (
|
|
230
|
-
} else
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
typeof
|
|
226
|
+
if (B = null, E !== void 0 && (r(E), B = "" + E), i(b) && (r(b.key), B = "" + b.key), "key" in b) {
|
|
227
|
+
E = {};
|
|
228
|
+
for (var oe in b)
|
|
229
|
+
oe !== "key" && (E[oe] = b[oe]);
|
|
230
|
+
} else E = b;
|
|
231
|
+
return B && c(
|
|
232
|
+
E,
|
|
233
|
+
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
234
234
|
), u(
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
l,
|
|
236
|
+
B,
|
|
237
|
+
E,
|
|
238
|
+
o(),
|
|
239
239
|
K,
|
|
240
240
|
X
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
function f(
|
|
244
|
-
|
|
243
|
+
function f(l) {
|
|
244
|
+
x(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === W && (l._payload.status === "fulfilled" ? x(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
return typeof
|
|
246
|
+
function x(l) {
|
|
247
|
+
return typeof l == "object" && l !== null && l.$$typeof === _;
|
|
248
248
|
}
|
|
249
|
-
var d = L, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"),
|
|
249
|
+
var d = L, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), C = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), H = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, h = Array.isArray, v = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
d = {
|
|
253
|
-
react_stack_bottom_frame: function(
|
|
254
|
-
return
|
|
253
|
+
react_stack_bottom_frame: function(l) {
|
|
254
|
+
return l();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var
|
|
257
|
+
var T, D = {}, z = d.react_stack_bottom_frame.bind(
|
|
258
258
|
d,
|
|
259
259
|
n
|
|
260
|
-
)(), U = v(
|
|
261
|
-
|
|
262
|
-
var
|
|
260
|
+
)(), U = v(a(n)), j = {};
|
|
261
|
+
te.Fragment = g, te.jsx = function(l, b, E) {
|
|
262
|
+
var S = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return p(
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
l,
|
|
265
|
+
b,
|
|
266
|
+
E,
|
|
267
267
|
!1,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
S ? Error("react-stack-top-frame") : z,
|
|
269
|
+
S ? v(a(l)) : U
|
|
270
270
|
);
|
|
271
|
-
},
|
|
272
|
-
var
|
|
271
|
+
}, te.jsxs = function(l, b, E) {
|
|
272
|
+
var S = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
273
273
|
return p(
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
274
|
+
l,
|
|
275
|
+
b,
|
|
276
|
+
E,
|
|
277
277
|
!0,
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
S ? Error("react-stack-top-frame") : z,
|
|
279
|
+
S ? v(a(l)) : U
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
|
-
}()),
|
|
282
|
+
}()), te;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ?
|
|
285
|
-
var e =
|
|
286
|
-
function
|
|
284
|
+
process.env.NODE_ENV === "production" ? le.exports = Be() : le.exports = De();
|
|
285
|
+
var e = le.exports;
|
|
286
|
+
function Pe({ size: t = "m", color: s = "default", className: r = "", ...a }) {
|
|
287
287
|
return /* @__PURE__ */ e.jsx(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
290
|
-
className: ["ds-spinner", `ds-spinner--${
|
|
290
|
+
className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${s}`, r].filter(Boolean).join(" "),
|
|
291
291
|
role: "status",
|
|
292
292
|
"aria-label": "Loading",
|
|
293
|
-
...
|
|
293
|
+
...a
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
const Oe = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
298
|
function _e({
|
|
299
|
-
children:
|
|
300
|
-
variant:
|
|
299
|
+
children: t,
|
|
300
|
+
variant: s = "primary",
|
|
301
301
|
size: r = "m",
|
|
302
|
-
fullWidth:
|
|
303
|
-
icon:
|
|
302
|
+
fullWidth: a = !1,
|
|
303
|
+
icon: o,
|
|
304
304
|
disabled: n = !1,
|
|
305
305
|
state: i = "idle",
|
|
306
|
-
onClick:
|
|
306
|
+
onClick: c,
|
|
307
307
|
type: m = "button",
|
|
308
308
|
href: u,
|
|
309
309
|
"aria-label": p,
|
|
310
310
|
...f
|
|
311
311
|
}) {
|
|
312
|
-
const
|
|
312
|
+
const x = o && !t, d = i === "loading", _ = i === "success", w = i === "error", g = d || _ || w, y = r === "xs" ? "s" : "m", P = Oe[r] ?? 16, I = d ? /* @__PURE__ */ e.jsx(Pe, { size: y }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: P, strokeWidth: 2.5 }) }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: P, strokeWidth: 2.5 }) }) : null, $ = [
|
|
313
313
|
"ds-button",
|
|
314
|
-
`ds-button--${
|
|
314
|
+
`ds-button--${s}`,
|
|
315
315
|
`ds-button--${r}`,
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
a && "ds-button--full",
|
|
317
|
+
x && "ds-button--icon-only"
|
|
318
318
|
].filter(Boolean).join(" "), F = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
g ? I : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
|
|
320
|
+
t
|
|
321
321
|
] });
|
|
322
322
|
if (u) {
|
|
323
323
|
const q = (M) => {
|
|
@@ -325,12 +325,12 @@ function _e({
|
|
|
325
325
|
M.preventDefault();
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
M.metaKey || M.ctrlKey || M.button === 1 || (M.preventDefault(),
|
|
328
|
+
M.metaKey || M.ctrlKey || M.button === 1 || (M.preventDefault(), c == null || c(M));
|
|
329
329
|
};
|
|
330
330
|
return /* @__PURE__ */ e.jsx(
|
|
331
331
|
"a",
|
|
332
332
|
{
|
|
333
|
-
className:
|
|
333
|
+
className: $,
|
|
334
334
|
href: n || d ? void 0 : u,
|
|
335
335
|
onClick: q,
|
|
336
336
|
"aria-label": p,
|
|
@@ -346,9 +346,9 @@ function _e({
|
|
|
346
346
|
"button",
|
|
347
347
|
{
|
|
348
348
|
type: m,
|
|
349
|
-
className:
|
|
349
|
+
className: $,
|
|
350
350
|
disabled: n,
|
|
351
|
-
onClick: d ? void 0 :
|
|
351
|
+
onClick: d ? void 0 : c,
|
|
352
352
|
"aria-label": p,
|
|
353
353
|
"aria-busy": d ? "true" : void 0,
|
|
354
354
|
"data-state": F,
|
|
@@ -357,31 +357,31 @@ function _e({
|
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
label:
|
|
362
|
-
error:
|
|
360
|
+
function cs({
|
|
361
|
+
label: t,
|
|
362
|
+
error: s,
|
|
363
363
|
hint: r,
|
|
364
|
-
fullWidth:
|
|
365
|
-
icon:
|
|
364
|
+
fullWidth: a = !0,
|
|
365
|
+
icon: o,
|
|
366
366
|
iconRight: n,
|
|
367
367
|
onIconRightClick: i,
|
|
368
|
-
size:
|
|
368
|
+
size: c = "m",
|
|
369
369
|
disabled: m,
|
|
370
370
|
id: u,
|
|
371
371
|
...p
|
|
372
372
|
}) {
|
|
373
|
-
const f = u || `input-${L.useId()}`,
|
|
374
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${
|
|
375
|
-
|
|
373
|
+
const f = u || `input-${L.useId()}`, x = r ? `${f}-hint` : void 0, d = s ? `${f}-error` : void 0, _ = d || x;
|
|
374
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
|
|
375
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: t }),
|
|
376
376
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
377
|
-
|
|
377
|
+
o && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${c}`, "aria-hidden": "true", children: o }),
|
|
378
378
|
/* @__PURE__ */ e.jsx(
|
|
379
379
|
"input",
|
|
380
380
|
{
|
|
381
381
|
id: f,
|
|
382
|
-
className: `ds-input ds-input--${
|
|
382
|
+
className: `ds-input ds-input--${c} ${o ? "ds-input--with-icon" : ""} ${n ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
|
|
383
383
|
disabled: m,
|
|
384
|
-
"aria-invalid":
|
|
384
|
+
"aria-invalid": s ? "true" : "false",
|
|
385
385
|
"aria-describedby": _,
|
|
386
386
|
...p
|
|
387
387
|
}
|
|
@@ -390,7 +390,7 @@ function lt({
|
|
|
390
390
|
"button",
|
|
391
391
|
{
|
|
392
392
|
type: "button",
|
|
393
|
-
className: `ds-input-icon-right ds-input-icon-right--${
|
|
393
|
+
className: `ds-input-icon-right ds-input-icon-right--${c}`,
|
|
394
394
|
onClick: i,
|
|
395
395
|
tabIndex: -1,
|
|
396
396
|
"aria-label": "Toggle visibility",
|
|
@@ -398,144 +398,144 @@ function lt({
|
|
|
398
398
|
}
|
|
399
399
|
)
|
|
400
400
|
] }),
|
|
401
|
-
r && !
|
|
402
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children:
|
|
401
|
+
r && !s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-input-hint", children: r }),
|
|
402
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: d, className: "ds-input-error", role: "alert", children: s }) }) })
|
|
403
403
|
] });
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
label:
|
|
407
|
-
error:
|
|
405
|
+
function ds({
|
|
406
|
+
label: t,
|
|
407
|
+
error: s,
|
|
408
408
|
hint: r,
|
|
409
|
-
fullWidth:
|
|
410
|
-
size:
|
|
409
|
+
fullWidth: a = !0,
|
|
410
|
+
size: o = "m",
|
|
411
411
|
disabled: n,
|
|
412
412
|
id: i,
|
|
413
|
-
resize:
|
|
413
|
+
resize: c = !0,
|
|
414
414
|
rows: m = 3,
|
|
415
415
|
...u
|
|
416
416
|
}) {
|
|
417
|
-
const p = i || `textarea-${L.useId()}`, f = r ? `${p}-hint` : void 0,
|
|
418
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${
|
|
419
|
-
|
|
417
|
+
const p = i || `textarea-${L.useId()}`, f = r ? `${p}-hint` : void 0, x = s ? `${p}-error` : void 0, d = x || f;
|
|
418
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
419
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: p, children: t }),
|
|
420
420
|
/* @__PURE__ */ e.jsx(
|
|
421
421
|
"textarea",
|
|
422
422
|
{
|
|
423
423
|
id: p,
|
|
424
|
-
className: `ds-textarea ds-textarea--${
|
|
424
|
+
className: `ds-textarea ds-textarea--${o} ${s ? "ds-textarea--error" : ""} ${c ? "" : "ds-textarea--no-resize"}`,
|
|
425
425
|
disabled: n,
|
|
426
|
-
"aria-invalid":
|
|
426
|
+
"aria-invalid": s ? "true" : "false",
|
|
427
427
|
"aria-describedby": d,
|
|
428
428
|
rows: m,
|
|
429
429
|
...u
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
|
-
r && !
|
|
433
|
-
|
|
432
|
+
r && !s && /* @__PURE__ */ e.jsx("span", { id: f, className: "ds-textarea-hint", children: r }),
|
|
433
|
+
s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: s })
|
|
434
434
|
] });
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
label:
|
|
438
|
-
value:
|
|
436
|
+
function us({
|
|
437
|
+
label: t,
|
|
438
|
+
value: s,
|
|
439
439
|
onChange: r,
|
|
440
|
-
options:
|
|
441
|
-
placeholder:
|
|
440
|
+
options: a = [],
|
|
441
|
+
placeholder: o = "Select option",
|
|
442
442
|
error: n,
|
|
443
443
|
fullWidth: i = !0,
|
|
444
|
-
size:
|
|
444
|
+
size: c = "m",
|
|
445
445
|
disabled: m = !1,
|
|
446
446
|
id: u,
|
|
447
447
|
...p
|
|
448
448
|
}) {
|
|
449
|
-
const [f,
|
|
450
|
-
d || (_(!0),
|
|
451
|
-
var
|
|
452
|
-
|
|
449
|
+
const [f, x] = k(!1), [d, _] = k(!1), [w, g] = k({}), [y, P] = k("down"), [I, $] = k(-1), F = N(null), O = N(null), q = N(null), M = N(null), W = u || `select-${L.useId()}`, C = `${W}-label`, G = n ? `${W}-error` : void 0, H = 150, V = (j = !1) => {
|
|
450
|
+
d || (_(!0), $(-1), M.current = setTimeout(() => {
|
|
451
|
+
var l;
|
|
452
|
+
x(!1), _(!1), j && ((l = q.current) == null || l.focus());
|
|
453
453
|
}, H));
|
|
454
454
|
}, h = (j) => {
|
|
455
455
|
clearTimeout(M.current), _(!1);
|
|
456
|
-
const
|
|
457
|
-
|
|
456
|
+
const l = j !== void 0 ? j : Math.max(a.findIndex((b) => b.value === s), 0);
|
|
457
|
+
$(l), x(!0);
|
|
458
458
|
};
|
|
459
|
-
|
|
459
|
+
R(() => () => clearTimeout(M.current), []);
|
|
460
460
|
const v = () => {
|
|
461
461
|
var X;
|
|
462
462
|
const j = (X = F.current) == null ? void 0 : X.getBoundingClientRect();
|
|
463
463
|
if (!j) return;
|
|
464
|
-
const
|
|
465
|
-
|
|
466
|
-
K ? { bottom:
|
|
464
|
+
const l = window.innerHeight, b = l - j.bottom, E = j.top, K = b < 300 && E > b;
|
|
465
|
+
P(K ? "up" : "down"), g(
|
|
466
|
+
K ? { bottom: l - j.top + 4, left: j.left, width: j.width } : { top: j.bottom + 4, left: j.left, width: j.width }
|
|
467
467
|
);
|
|
468
468
|
};
|
|
469
|
-
|
|
469
|
+
R(() => {
|
|
470
470
|
if (f)
|
|
471
471
|
return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
|
|
472
472
|
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
|
|
473
473
|
};
|
|
474
|
-
}, [f]),
|
|
475
|
-
const j = (
|
|
476
|
-
F.current && !F.current.contains(
|
|
474
|
+
}, [f]), R(() => {
|
|
475
|
+
const j = (l) => {
|
|
476
|
+
F.current && !F.current.contains(l.target) && O.current && !O.current.contains(l.target) && V();
|
|
477
477
|
};
|
|
478
478
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
479
|
-
}, [d]),
|
|
480
|
-
var
|
|
481
|
-
if (!f ||
|
|
482
|
-
(
|
|
483
|
-
}, [
|
|
484
|
-
const
|
|
479
|
+
}, [d]), R(() => {
|
|
480
|
+
var l;
|
|
481
|
+
if (!f || I < 0 || !O.current) return;
|
|
482
|
+
(l = O.current.querySelectorAll(".ds-select-option")[I]) == null || l.scrollIntoView({ block: "nearest" });
|
|
483
|
+
}, [I, f]);
|
|
484
|
+
const T = (j) => {
|
|
485
485
|
switch (j.key) {
|
|
486
486
|
case "ArrowDown":
|
|
487
|
-
j.preventDefault(), f ?
|
|
487
|
+
j.preventDefault(), f ? $((l) => Math.min(l + 1, a.length - 1)) : h();
|
|
488
488
|
break;
|
|
489
489
|
case "ArrowUp":
|
|
490
|
-
j.preventDefault(), f ?
|
|
490
|
+
j.preventDefault(), f ? $((l) => Math.max(l - 1, 0)) : h(a.length - 1);
|
|
491
491
|
break;
|
|
492
492
|
case "Home":
|
|
493
|
-
f && (j.preventDefault(),
|
|
493
|
+
f && (j.preventDefault(), $(0));
|
|
494
494
|
break;
|
|
495
495
|
case "End":
|
|
496
|
-
f && (j.preventDefault(),
|
|
496
|
+
f && (j.preventDefault(), $(a.length - 1));
|
|
497
497
|
break;
|
|
498
498
|
case "Enter":
|
|
499
499
|
case " ":
|
|
500
|
-
j.preventDefault(), f ?
|
|
500
|
+
j.preventDefault(), f ? I >= 0 && (r == null || r(a[I].value), V(!0)) : h();
|
|
501
501
|
break;
|
|
502
502
|
case "Escape":
|
|
503
|
-
f && (j.preventDefault(),
|
|
503
|
+
f && (j.preventDefault(), V(!0));
|
|
504
504
|
break;
|
|
505
505
|
case "Tab":
|
|
506
|
-
f &&
|
|
506
|
+
f && V(!1);
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
|
-
},
|
|
509
|
+
}, D = a.find((j) => j.value === s), z = c === "xs" ? A[1] : c === "small" ? A[2] : A[3], U = f && /* @__PURE__ */ e.jsx(
|
|
510
510
|
"div",
|
|
511
511
|
{
|
|
512
512
|
ref: O,
|
|
513
513
|
role: "listbox",
|
|
514
|
-
"aria-labelledby":
|
|
514
|
+
"aria-labelledby": t ? C : void 0,
|
|
515
515
|
tabIndex: -1,
|
|
516
516
|
className: [
|
|
517
517
|
"ds-select-dropdown",
|
|
518
|
-
`ds-select-dropdown--${
|
|
519
|
-
`ds-select-dropdown--${
|
|
518
|
+
`ds-select-dropdown--${c}`,
|
|
519
|
+
`ds-select-dropdown--${y}`,
|
|
520
520
|
d && "ds-select-dropdown--closing"
|
|
521
521
|
].filter(Boolean).join(" "),
|
|
522
522
|
style: w,
|
|
523
|
-
children:
|
|
523
|
+
children: a.map((j, l) => /* @__PURE__ */ e.jsx(
|
|
524
524
|
"button",
|
|
525
525
|
{
|
|
526
|
-
id: `${W}-opt-${
|
|
526
|
+
id: `${W}-opt-${l}`,
|
|
527
527
|
type: "button",
|
|
528
528
|
role: "option",
|
|
529
529
|
tabIndex: -1,
|
|
530
|
-
"aria-selected":
|
|
530
|
+
"aria-selected": s === j.value,
|
|
531
531
|
className: [
|
|
532
532
|
"ds-select-option",
|
|
533
|
-
`ds-select-option--${
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
`ds-select-option--${c}`,
|
|
534
|
+
s === j.value && "ds-select-option--selected",
|
|
535
|
+
l === I && "ds-select-option--active"
|
|
536
536
|
].filter(Boolean).join(" "),
|
|
537
537
|
onClick: () => {
|
|
538
|
-
r == null || r(j.value),
|
|
538
|
+
r == null || r(j.value), V(!0);
|
|
539
539
|
},
|
|
540
540
|
children: j.label
|
|
541
541
|
},
|
|
@@ -544,7 +544,7 @@ function ut({
|
|
|
544
544
|
}
|
|
545
545
|
);
|
|
546
546
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
547
|
-
|
|
547
|
+
t && /* @__PURE__ */ e.jsx("label", { id: C, className: "ds-select-label", children: t }),
|
|
548
548
|
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: F, children: /* @__PURE__ */ e.jsxs(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
@@ -554,25 +554,25 @@ function ut({
|
|
|
554
554
|
role: "combobox",
|
|
555
555
|
"aria-haspopup": "listbox",
|
|
556
556
|
"aria-expanded": f,
|
|
557
|
-
"aria-activedescendant": f &&
|
|
558
|
-
"aria-labelledby":
|
|
557
|
+
"aria-activedescendant": f && I >= 0 ? `${W}-opt-${I}` : void 0,
|
|
558
|
+
"aria-labelledby": t ? C : void 0,
|
|
559
559
|
"aria-invalid": n ? "true" : "false",
|
|
560
560
|
"aria-describedby": G,
|
|
561
|
-
className: `ds-select-trigger ds-select-trigger--${
|
|
561
|
+
className: `ds-select-trigger ds-select-trigger--${c} ${n ? "ds-select-trigger--error" : ""}`,
|
|
562
562
|
onClick: () => {
|
|
563
|
-
m || (f ?
|
|
563
|
+
m || (f ? V() : h());
|
|
564
564
|
},
|
|
565
|
-
onKeyDown:
|
|
565
|
+
onKeyDown: T,
|
|
566
566
|
disabled: m,
|
|
567
567
|
...p,
|
|
568
568
|
children: [
|
|
569
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
569
|
+
/* @__PURE__ */ e.jsx("span", { className: D ? "" : "ds-select-placeholder", children: (D == null ? void 0 : D.label) || o }),
|
|
570
570
|
/* @__PURE__ */ e.jsx(
|
|
571
571
|
ne,
|
|
572
572
|
{
|
|
573
573
|
size: z,
|
|
574
574
|
strokeWidth: 1.5,
|
|
575
|
-
className: `ds-select-icon ${f &&
|
|
575
|
+
className: `ds-select-icon ${f && y === "down" ? "ds-select-icon--open" : ""} ${f && y === "up" ? "ds-select-icon--up" : ""}`,
|
|
576
576
|
"aria-hidden": "true"
|
|
577
577
|
}
|
|
578
578
|
)
|
|
@@ -583,60 +583,60 @@ function ut({
|
|
|
583
583
|
typeof document < "u" && ae.createPortal(U, document.body)
|
|
584
584
|
] });
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
label:
|
|
588
|
-
value:
|
|
586
|
+
function fs({
|
|
587
|
+
label: t,
|
|
588
|
+
value: s = 0,
|
|
589
589
|
onChange: r,
|
|
590
|
-
min:
|
|
591
|
-
max:
|
|
590
|
+
min: a = 0,
|
|
591
|
+
max: o = 100,
|
|
592
592
|
step: n = 1,
|
|
593
593
|
size: i = "m",
|
|
594
|
-
disabled:
|
|
594
|
+
disabled: c = !1,
|
|
595
595
|
hint: m,
|
|
596
596
|
error: u,
|
|
597
597
|
...p
|
|
598
598
|
}) {
|
|
599
599
|
const f = () => {
|
|
600
|
-
if (
|
|
601
|
-
const
|
|
602
|
-
r == null || r(
|
|
603
|
-
},
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
r == null || r(
|
|
607
|
-
}, d = (
|
|
608
|
-
if (
|
|
609
|
-
const
|
|
610
|
-
if (
|
|
611
|
-
r == null || r(
|
|
600
|
+
if (c) return;
|
|
601
|
+
const y = Math.min(Number(s) + n, o);
|
|
602
|
+
r == null || r(y);
|
|
603
|
+
}, x = () => {
|
|
604
|
+
if (c) return;
|
|
605
|
+
const y = Math.max(Number(s) - n, a);
|
|
606
|
+
r == null || r(y);
|
|
607
|
+
}, d = (y) => {
|
|
608
|
+
if (c) return;
|
|
609
|
+
const P = y.target.value;
|
|
610
|
+
if (P === "") {
|
|
611
|
+
r == null || r(a);
|
|
612
612
|
return;
|
|
613
613
|
}
|
|
614
|
-
const
|
|
615
|
-
if (!isNaN(
|
|
616
|
-
const
|
|
617
|
-
r == null || r(
|
|
614
|
+
const I = Number(P);
|
|
615
|
+
if (!isNaN(I)) {
|
|
616
|
+
const $ = Math.min(Math.max(I, a), o);
|
|
617
|
+
r == null || r($);
|
|
618
618
|
}
|
|
619
619
|
}, _ = [
|
|
620
620
|
"ds-stepper-wrapper",
|
|
621
|
-
|
|
621
|
+
c && "ds-stepper-wrapper--disabled",
|
|
622
622
|
u && "ds-stepper-wrapper--error"
|
|
623
623
|
].filter(Boolean).join(" "), w = [
|
|
624
624
|
"ds-stepper",
|
|
625
625
|
`ds-stepper--${i}`,
|
|
626
|
-
|
|
627
|
-
].filter(Boolean).join(" "),
|
|
626
|
+
c && "ds-stepper--disabled"
|
|
627
|
+
].filter(Boolean).join(" "), g = i === "xs" ? A[1] : i === "small" ? A[2] : A[3];
|
|
628
628
|
return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
|
|
629
|
-
|
|
629
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
630
630
|
/* @__PURE__ */ e.jsxs("div", { className: w, children: [
|
|
631
631
|
/* @__PURE__ */ e.jsx(
|
|
632
632
|
"button",
|
|
633
633
|
{
|
|
634
634
|
type: "button",
|
|
635
635
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
636
|
-
onClick:
|
|
637
|
-
disabled:
|
|
636
|
+
onClick: x,
|
|
637
|
+
disabled: c || s <= a,
|
|
638
638
|
"aria-label": "Decrease",
|
|
639
|
-
children: /* @__PURE__ */ e.jsx(
|
|
639
|
+
children: /* @__PURE__ */ e.jsx(ge, { size: g, strokeWidth: 1.5 })
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
642
|
/* @__PURE__ */ e.jsx(
|
|
@@ -644,12 +644,12 @@ function ft({
|
|
|
644
644
|
{
|
|
645
645
|
type: "number",
|
|
646
646
|
className: "ds-stepper-input",
|
|
647
|
-
value:
|
|
647
|
+
value: s,
|
|
648
648
|
onChange: d,
|
|
649
|
-
min:
|
|
650
|
-
max:
|
|
649
|
+
min: a,
|
|
650
|
+
max: o,
|
|
651
651
|
step: n,
|
|
652
|
-
disabled:
|
|
652
|
+
disabled: c,
|
|
653
653
|
...p
|
|
654
654
|
}
|
|
655
655
|
),
|
|
@@ -659,9 +659,9 @@ function ft({
|
|
|
659
659
|
type: "button",
|
|
660
660
|
className: "ds-stepper-button ds-stepper-button--plus",
|
|
661
661
|
onClick: f,
|
|
662
|
-
disabled:
|
|
662
|
+
disabled: c || s >= o,
|
|
663
663
|
"aria-label": "Increase",
|
|
664
|
-
children: /* @__PURE__ */ e.jsx(
|
|
664
|
+
children: /* @__PURE__ */ e.jsx($e, { size: g, strokeWidth: 1.5 })
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
] }),
|
|
@@ -670,19 +670,19 @@ function ft({
|
|
|
670
670
|
] });
|
|
671
671
|
}
|
|
672
672
|
function Le({
|
|
673
|
-
children:
|
|
674
|
-
padding:
|
|
673
|
+
children: t,
|
|
674
|
+
padding: s = "m",
|
|
675
675
|
variant: r = "info",
|
|
676
|
-
hover:
|
|
676
|
+
hover: a = !1,
|
|
677
677
|
// deprecated, use variant="interactive"
|
|
678
|
-
onClick:
|
|
678
|
+
onClick: o,
|
|
679
679
|
href: n,
|
|
680
680
|
disabled: i = !1,
|
|
681
|
-
...
|
|
681
|
+
...c
|
|
682
682
|
}) {
|
|
683
|
-
const u = (
|
|
683
|
+
const u = (a ? "interactive" : r) === "interactive" || o || n, p = [
|
|
684
684
|
"ds-card",
|
|
685
|
-
`ds-card--${
|
|
685
|
+
`ds-card--${s}`,
|
|
686
686
|
u && "ds-card--interactive"
|
|
687
687
|
].filter(Boolean).join(" ");
|
|
688
688
|
if (n) {
|
|
@@ -691,7 +691,7 @@ function Le({
|
|
|
691
691
|
_.preventDefault();
|
|
692
692
|
return;
|
|
693
693
|
}
|
|
694
|
-
_.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(),
|
|
694
|
+
_.metaKey || _.ctrlKey || _.button === 1 || (_.preventDefault(), o == null || o(_));
|
|
695
695
|
};
|
|
696
696
|
return /* @__PURE__ */ e.jsx(
|
|
697
697
|
"a",
|
|
@@ -700,61 +700,61 @@ function Le({
|
|
|
700
700
|
href: i ? void 0 : n,
|
|
701
701
|
onClick: d,
|
|
702
702
|
"aria-disabled": i ? "true" : void 0,
|
|
703
|
-
...
|
|
704
|
-
children:
|
|
703
|
+
...c,
|
|
704
|
+
children: t
|
|
705
705
|
}
|
|
706
706
|
);
|
|
707
707
|
}
|
|
708
|
-
const f = u &&
|
|
708
|
+
const f = u && o ? "button" : "div", x = u && o ? {
|
|
709
709
|
type: "button",
|
|
710
|
-
onClick:
|
|
710
|
+
onClick: o,
|
|
711
711
|
disabled: i
|
|
712
712
|
} : {};
|
|
713
713
|
return /* @__PURE__ */ e.jsx(
|
|
714
714
|
f,
|
|
715
715
|
{
|
|
716
716
|
className: p,
|
|
717
|
-
role: u && !
|
|
718
|
-
...
|
|
719
|
-
...
|
|
720
|
-
children:
|
|
717
|
+
role: u && !o ? "article" : void 0,
|
|
718
|
+
...x,
|
|
719
|
+
...c,
|
|
720
|
+
children: t
|
|
721
721
|
}
|
|
722
722
|
);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...
|
|
724
|
+
function ms({ children: t, ...s }) {
|
|
725
|
+
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...
|
|
727
|
+
function ps({ children: t, ...s }) {
|
|
728
|
+
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...
|
|
730
|
+
function hs({ children: t, ...s }) {
|
|
731
|
+
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...
|
|
733
|
+
function xs({ children: t, ...s }) {
|
|
734
|
+
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${
|
|
736
|
+
function bs({ children: t, secondary: s = !1, ...r }) {
|
|
737
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...r, children: t });
|
|
738
738
|
}
|
|
739
|
-
function Me({ children:
|
|
740
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${
|
|
739
|
+
function Me({ children: t, secondary: s = !1, ...r }) {
|
|
740
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...r, children: t });
|
|
741
741
|
}
|
|
742
|
-
function we({ children:
|
|
743
|
-
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${
|
|
742
|
+
function we({ children: t, secondary: s = !1, ...r }) {
|
|
743
|
+
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...r, children: t });
|
|
744
744
|
}
|
|
745
745
|
function ie({
|
|
746
|
-
children:
|
|
747
|
-
variant:
|
|
746
|
+
children: t,
|
|
747
|
+
variant: s = "default",
|
|
748
748
|
size: r = "m",
|
|
749
|
-
role:
|
|
750
|
-
...
|
|
749
|
+
role: a,
|
|
750
|
+
...o
|
|
751
751
|
}) {
|
|
752
752
|
const n = [
|
|
753
753
|
"ds-badge",
|
|
754
|
-
`ds-badge--${
|
|
754
|
+
`ds-badge--${s}`,
|
|
755
755
|
`ds-badge--${r}`
|
|
756
|
-
].filter(Boolean).join(" "), i =
|
|
757
|
-
return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...
|
|
756
|
+
].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
|
|
757
|
+
return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...o, children: t });
|
|
758
758
|
}
|
|
759
759
|
const We = {
|
|
760
760
|
info: me,
|
|
@@ -762,47 +762,47 @@ const We = {
|
|
|
762
762
|
warning: ue,
|
|
763
763
|
error: de
|
|
764
764
|
};
|
|
765
|
-
function
|
|
766
|
-
children:
|
|
767
|
-
variant:
|
|
765
|
+
function vs({
|
|
766
|
+
children: t,
|
|
767
|
+
variant: s = "info",
|
|
768
768
|
title: r,
|
|
769
|
-
onClose:
|
|
770
|
-
role:
|
|
769
|
+
onClose: a,
|
|
770
|
+
role: o,
|
|
771
771
|
...n
|
|
772
772
|
}) {
|
|
773
|
-
const i = We[
|
|
774
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${
|
|
775
|
-
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
773
|
+
const i = We[s], c = o || (s === "error" ? "alert" : "status");
|
|
774
|
+
return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${s} ${r ? "" : "ds-alert--no-title"}`, role: c, ...n, children: [
|
|
775
|
+
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
|
|
776
776
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
|
|
777
777
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
|
|
778
|
-
|
|
778
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: t })
|
|
779
779
|
] }),
|
|
780
|
-
|
|
780
|
+
a && /* @__PURE__ */ e.jsx(
|
|
781
781
|
"button",
|
|
782
782
|
{
|
|
783
783
|
type: "button",
|
|
784
784
|
className: "ds-alert__close",
|
|
785
|
-
onClick:
|
|
785
|
+
onClick: a,
|
|
786
786
|
"aria-label": "Close alert",
|
|
787
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
787
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: A[3], strokeWidth: 1.5 })
|
|
788
788
|
}
|
|
789
789
|
)
|
|
790
790
|
] });
|
|
791
791
|
}
|
|
792
792
|
const ze = 200;
|
|
793
|
-
function
|
|
794
|
-
children:
|
|
795
|
-
title:
|
|
793
|
+
function js({
|
|
794
|
+
children: t,
|
|
795
|
+
title: s,
|
|
796
796
|
onClose: r,
|
|
797
|
-
size:
|
|
798
|
-
...
|
|
797
|
+
size: a = "m",
|
|
798
|
+
...o
|
|
799
799
|
}) {
|
|
800
|
-
const n =
|
|
801
|
-
!r ||
|
|
800
|
+
const n = N(null), i = L.useId(), [c, m] = k(!1), u = () => {
|
|
801
|
+
!r || c || (m(!0), setTimeout(() => {
|
|
802
802
|
m(!1), r();
|
|
803
803
|
}, ze));
|
|
804
804
|
};
|
|
805
|
-
|
|
805
|
+
R(() => {
|
|
806
806
|
const d = (w) => {
|
|
807
807
|
w.key === "Escape" && u();
|
|
808
808
|
}, _ = (w) => {
|
|
@@ -811,71 +811,71 @@ function jt({
|
|
|
811
811
|
return document.addEventListener("keydown", d), document.addEventListener("mousedown", _), () => {
|
|
812
812
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
|
|
813
813
|
};
|
|
814
|
-
}, [r,
|
|
815
|
-
const p = L.Children.toArray(
|
|
816
|
-
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay",
|
|
814
|
+
}, [r, c]);
|
|
815
|
+
const p = L.Children.toArray(t), f = p.find((d) => (d == null ? void 0 : d.type) === xe), x = p.filter((d) => (d == null ? void 0 : d.type) !== xe);
|
|
816
|
+
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", c && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...o, children: /* @__PURE__ */ e.jsxs(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
819
|
-
className: `ds-modal ds-modal--${
|
|
819
|
+
className: `ds-modal ds-modal--${a}`,
|
|
820
820
|
ref: n,
|
|
821
821
|
role: "dialog",
|
|
822
822
|
"aria-modal": "true",
|
|
823
|
-
"aria-labelledby":
|
|
823
|
+
"aria-labelledby": s ? i : void 0,
|
|
824
824
|
children: [
|
|
825
|
-
(
|
|
826
|
-
|
|
825
|
+
(s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
|
|
826
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-modal__title", children: s }),
|
|
827
827
|
r && /* @__PURE__ */ e.jsx(
|
|
828
828
|
_e,
|
|
829
829
|
{
|
|
830
830
|
variant: "ghost",
|
|
831
831
|
size: "small",
|
|
832
|
-
icon: /* @__PURE__ */ e.jsx(ee, { size:
|
|
832
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: A[2], strokeWidth: 1.5 }),
|
|
833
833
|
onClick: u,
|
|
834
834
|
"aria-label": "Close modal"
|
|
835
835
|
}
|
|
836
836
|
)
|
|
837
837
|
] }),
|
|
838
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children:
|
|
838
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: x }),
|
|
839
839
|
f
|
|
840
840
|
]
|
|
841
841
|
}
|
|
842
842
|
) });
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children:
|
|
844
|
+
function xe({ children: t }) {
|
|
845
|
+
return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
846
846
|
}
|
|
847
847
|
function Fe({
|
|
848
|
-
children:
|
|
849
|
-
title:
|
|
848
|
+
children: t,
|
|
849
|
+
title: s = "Code",
|
|
850
850
|
defaultExpanded: r = !1,
|
|
851
|
-
expanded:
|
|
852
|
-
onToggle:
|
|
851
|
+
expanded: a,
|
|
852
|
+
onToggle: o,
|
|
853
853
|
padding: n = "s",
|
|
854
854
|
className: i = "",
|
|
855
|
-
...
|
|
855
|
+
...c
|
|
856
856
|
}) {
|
|
857
|
-
const [m, u] = k(r), p =
|
|
858
|
-
p ?
|
|
857
|
+
const [m, u] = k(r), p = a !== void 0, f = p ? a : m, x = () => {
|
|
858
|
+
p ? o == null || o(!a) : u((_) => !_);
|
|
859
859
|
}, d = [
|
|
860
860
|
"ds-code-accordion",
|
|
861
861
|
`ds-code-accordion--${n}`,
|
|
862
862
|
f && "ds-code-accordion--expanded",
|
|
863
863
|
i
|
|
864
864
|
].filter(Boolean).join(" ");
|
|
865
|
-
return /* @__PURE__ */ e.jsxs("div", { className: d, ...
|
|
865
|
+
return /* @__PURE__ */ e.jsxs("div", { className: d, ...c, children: [
|
|
866
866
|
/* @__PURE__ */ e.jsxs(
|
|
867
867
|
"button",
|
|
868
868
|
{
|
|
869
869
|
type: "button",
|
|
870
870
|
className: "ds-code-accordion__header",
|
|
871
|
-
onClick:
|
|
871
|
+
onClick: x,
|
|
872
872
|
"aria-expanded": f,
|
|
873
873
|
children: [
|
|
874
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children:
|
|
874
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: s }),
|
|
875
875
|
/* @__PURE__ */ e.jsx(
|
|
876
876
|
ne,
|
|
877
877
|
{
|
|
878
|
-
size:
|
|
878
|
+
size: A[2],
|
|
879
879
|
strokeWidth: 1.5,
|
|
880
880
|
className: `ds-code-accordion__icon ${f ? "ds-code-accordion__icon--expanded" : ""}`
|
|
881
881
|
}
|
|
@@ -883,43 +883,43 @@ function Fe({
|
|
|
883
883
|
]
|
|
884
884
|
}
|
|
885
885
|
),
|
|
886
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre", children: /* @__PURE__ */ e.jsx("code", { children:
|
|
886
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
|
|
887
887
|
] });
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
return
|
|
889
|
+
function _s({ children: t, block: s = !1, collapsible: r = !1, title: a = "Code", defaultExpanded: o = !1, ...n }) {
|
|
890
|
+
return s ? r ? /* @__PURE__ */ e.jsx(Fe, { title: a, defaultExpanded: o, ...n, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: t });
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
const
|
|
892
|
+
function ws({ href: t, children: s, onClick: r, target: a, rel: o, ...n }) {
|
|
893
|
+
const c = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
|
|
894
894
|
return /* @__PURE__ */ e.jsx(
|
|
895
895
|
"a",
|
|
896
896
|
{
|
|
897
|
-
href:
|
|
897
|
+
href: t,
|
|
898
898
|
className: "ds-link",
|
|
899
899
|
onClick: r,
|
|
900
|
-
target:
|
|
901
|
-
rel:
|
|
900
|
+
target: a,
|
|
901
|
+
rel: c,
|
|
902
902
|
...n,
|
|
903
|
-
children:
|
|
903
|
+
children: s
|
|
904
904
|
}
|
|
905
905
|
);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...
|
|
907
|
+
function Ns({ children: t, size: s = "m", variant: r = "ghost", ...a }) {
|
|
908
|
+
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: L.Children.map(t, (o) => L.isValidElement(o) ? L.cloneElement(o, { size: s, variant: r }) : o) });
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
const u = i && !
|
|
910
|
+
function ys({ children: t, selected: s = !1, onClick: r, size: a = "m", variant: o = "ghost", disabled: n = !1, icon: i, href: c, ...m }) {
|
|
911
|
+
const u = i && !t, p = [
|
|
912
912
|
"ds-tab",
|
|
913
|
-
`ds-tab--${o}`,
|
|
914
913
|
`ds-tab--${a}`,
|
|
915
|
-
|
|
914
|
+
`ds-tab--${o}`,
|
|
915
|
+
s && "ds-tab--selected",
|
|
916
916
|
u && "ds-tab--icon-only"
|
|
917
917
|
].filter(Boolean).join(" "), f = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
918
918
|
i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
|
|
919
|
-
|
|
919
|
+
t
|
|
920
920
|
] });
|
|
921
|
-
if (
|
|
922
|
-
const
|
|
921
|
+
if (c) {
|
|
922
|
+
const x = (d) => {
|
|
923
923
|
if (n) {
|
|
924
924
|
d.preventDefault();
|
|
925
925
|
return;
|
|
@@ -930,11 +930,11 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
930
930
|
"a",
|
|
931
931
|
{
|
|
932
932
|
role: "tab",
|
|
933
|
-
"aria-current":
|
|
933
|
+
"aria-current": s ? "page" : void 0,
|
|
934
934
|
"aria-disabled": n ? "true" : void 0,
|
|
935
935
|
className: p,
|
|
936
|
-
href: n ? void 0 :
|
|
937
|
-
onClick:
|
|
936
|
+
href: n ? void 0 : c,
|
|
937
|
+
onClick: x,
|
|
938
938
|
...m,
|
|
939
939
|
children: f
|
|
940
940
|
}
|
|
@@ -944,7 +944,7 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
944
944
|
"button",
|
|
945
945
|
{
|
|
946
946
|
role: "tab",
|
|
947
|
-
"aria-selected":
|
|
947
|
+
"aria-selected": s,
|
|
948
948
|
className: p,
|
|
949
949
|
onClick: r,
|
|
950
950
|
disabled: n,
|
|
@@ -953,24 +953,24 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
const n =
|
|
956
|
+
function Es({ options: t, value: s, onChange: r, size: a = "m", disabled: o = !1 }) {
|
|
957
|
+
const n = N(null), i = N(null), [c, m] = k(!1), u = N(!1), p = N(null), f = N(null), x = () => {
|
|
958
958
|
if (!n.current) return;
|
|
959
|
-
const d = n.current.querySelector(`[data-value="${
|
|
959
|
+
const d = n.current.querySelector(`[data-value="${s}"]`);
|
|
960
960
|
if (!d) return;
|
|
961
|
-
const _ = n.current.getBoundingClientRect(), w = d.getBoundingClientRect(),
|
|
962
|
-
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left =
|
|
961
|
+
const _ = n.current.getBoundingClientRect(), w = d.getBoundingClientRect(), g = w.left - _.left, y = w.width;
|
|
962
|
+
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = g + "px", i.current.style.width = y + "px", u.current = !1) : (m(!0), requestAnimationFrame(() => {
|
|
963
963
|
if (!i.current || !n.current) return;
|
|
964
|
-
const
|
|
965
|
-
if (!
|
|
966
|
-
const
|
|
967
|
-
i.current.style.transition = "none", i.current.style.left =
|
|
964
|
+
const P = n.current.querySelector(`[data-value="${s}"]`);
|
|
965
|
+
if (!P) return;
|
|
966
|
+
const I = n.current.getBoundingClientRect(), $ = P.getBoundingClientRect();
|
|
967
|
+
i.current.style.transition = "none", i.current.style.left = $.left - I.left + "px", i.current.style.width = $.width + "px";
|
|
968
968
|
}));
|
|
969
969
|
};
|
|
970
|
-
return f.current =
|
|
971
|
-
const d = p.current !==
|
|
972
|
-
p.current =
|
|
973
|
-
}),
|
|
970
|
+
return f.current = x, Ee(() => {
|
|
971
|
+
const d = p.current !== s;
|
|
972
|
+
p.current = s, u.current = c && d, x();
|
|
973
|
+
}), R(() => {
|
|
974
974
|
if (!n.current) return;
|
|
975
975
|
const d = new ResizeObserver(() => {
|
|
976
976
|
u.current = !1, f.current();
|
|
@@ -981,13 +981,13 @@ function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
|
|
|
981
981
|
{
|
|
982
982
|
className: [
|
|
983
983
|
"ds-seg",
|
|
984
|
-
`ds-seg--${
|
|
985
|
-
|
|
984
|
+
`ds-seg--${a}`,
|
|
985
|
+
o && "ds-seg--disabled"
|
|
986
986
|
].filter(Boolean).join(" "),
|
|
987
987
|
ref: n,
|
|
988
988
|
role: "group",
|
|
989
989
|
children: [
|
|
990
|
-
|
|
990
|
+
c && /* @__PURE__ */ e.jsx(
|
|
991
991
|
"div",
|
|
992
992
|
{
|
|
993
993
|
ref: i,
|
|
@@ -995,15 +995,15 @@ function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
|
|
|
995
995
|
"aria-hidden": "true"
|
|
996
996
|
}
|
|
997
997
|
),
|
|
998
|
-
|
|
998
|
+
t.map((d) => /* @__PURE__ */ e.jsxs(
|
|
999
999
|
"button",
|
|
1000
1000
|
{
|
|
1001
1001
|
type: "button",
|
|
1002
1002
|
"data-value": d.value,
|
|
1003
|
-
className: ["ds-seg__btn",
|
|
1004
|
-
onClick: () => !
|
|
1005
|
-
"aria-pressed":
|
|
1006
|
-
disabled:
|
|
1003
|
+
className: ["ds-seg__btn", s === d.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
|
|
1004
|
+
onClick: () => !o && r(d.value),
|
|
1005
|
+
"aria-pressed": s === d.value,
|
|
1006
|
+
disabled: o,
|
|
1007
1007
|
children: [
|
|
1008
1008
|
d.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: d.icon }),
|
|
1009
1009
|
d.label
|
|
@@ -1015,23 +1015,23 @@ function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
|
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1019
|
-
children:
|
|
1020
|
-
title:
|
|
1018
|
+
function Ve({
|
|
1019
|
+
children: t,
|
|
1020
|
+
title: s,
|
|
1021
1021
|
defaultExpanded: r = !1,
|
|
1022
|
-
expanded:
|
|
1023
|
-
onToggle:
|
|
1022
|
+
expanded: a,
|
|
1023
|
+
onToggle: o,
|
|
1024
1024
|
padding: n = "m",
|
|
1025
1025
|
...i
|
|
1026
1026
|
}) {
|
|
1027
|
-
const [
|
|
1028
|
-
u ?
|
|
1029
|
-
},
|
|
1027
|
+
const [c, m] = k(r), u = a !== void 0, p = u ? a : c, f = () => {
|
|
1028
|
+
u ? o == null || o(!a) : m((d) => !d);
|
|
1029
|
+
}, x = [
|
|
1030
1030
|
"ds-accordion",
|
|
1031
1031
|
`ds-accordion--${n}`,
|
|
1032
1032
|
p && "ds-accordion--expanded"
|
|
1033
1033
|
].filter(Boolean).join(" ");
|
|
1034
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1034
|
+
return /* @__PURE__ */ e.jsxs("div", { className: x, ...i, children: [
|
|
1035
1035
|
/* @__PURE__ */ e.jsxs(
|
|
1036
1036
|
"button",
|
|
1037
1037
|
{
|
|
@@ -1040,11 +1040,11 @@ function Ce({
|
|
|
1040
1040
|
onClick: f,
|
|
1041
1041
|
"aria-expanded": p,
|
|
1042
1042
|
children: [
|
|
1043
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children:
|
|
1043
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
|
|
1044
1044
|
/* @__PURE__ */ e.jsx(
|
|
1045
1045
|
ne,
|
|
1046
1046
|
{
|
|
1047
|
-
size:
|
|
1047
|
+
size: A[2],
|
|
1048
1048
|
strokeWidth: 1.5,
|
|
1049
1049
|
className: `ds-accordion__icon ${p ? "ds-accordion__icon--expanded" : ""}`
|
|
1050
1050
|
}
|
|
@@ -1052,75 +1052,75 @@ function Ce({
|
|
|
1052
1052
|
]
|
|
1053
1053
|
}
|
|
1054
1054
|
),
|
|
1055
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children:
|
|
1055
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: t }) }) })
|
|
1056
1056
|
] });
|
|
1057
1057
|
}
|
|
1058
1058
|
const Y = 8, Z = 8;
|
|
1059
|
-
function
|
|
1060
|
-
const
|
|
1061
|
-
let
|
|
1062
|
-
switch (
|
|
1059
|
+
function Ce(t, s, r) {
|
|
1060
|
+
const a = window.innerWidth;
|
|
1061
|
+
let o, n;
|
|
1062
|
+
switch (t) {
|
|
1063
1063
|
case "top":
|
|
1064
|
-
|
|
1064
|
+
o = s.top - r.height - Y, n = s.left + s.width / 2 - r.width / 2;
|
|
1065
1065
|
break;
|
|
1066
1066
|
case "bottom":
|
|
1067
|
-
|
|
1067
|
+
o = s.bottom + Y, n = s.left + s.width / 2 - r.width / 2;
|
|
1068
1068
|
break;
|
|
1069
1069
|
case "left":
|
|
1070
|
-
|
|
1070
|
+
o = s.top + s.height / 2 - r.height / 2, n = s.left - r.width - Y;
|
|
1071
1071
|
break;
|
|
1072
1072
|
case "right":
|
|
1073
|
-
|
|
1073
|
+
o = s.top + s.height / 2 - r.height / 2, n = s.right + Y;
|
|
1074
1074
|
break;
|
|
1075
1075
|
default:
|
|
1076
|
-
|
|
1076
|
+
o = s.bottom + Y, n = s.left;
|
|
1077
1077
|
}
|
|
1078
|
-
const i = Math.max(Z, Math.min(
|
|
1079
|
-
return { top:
|
|
1080
|
-
}
|
|
1081
|
-
function Ue(
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1084
|
-
if (
|
|
1085
|
-
if (
|
|
1086
|
-
if (
|
|
1087
|
-
const n = Math.max(
|
|
1088
|
-
return n ===
|
|
1089
|
-
}
|
|
1090
|
-
function
|
|
1091
|
-
const [
|
|
1078
|
+
const i = Math.max(Z, Math.min(a - r.width - Z, n)), c = n - i;
|
|
1079
|
+
return { top: o, left: i, arrowOffset: c };
|
|
1080
|
+
}
|
|
1081
|
+
function Ue(t, s, r) {
|
|
1082
|
+
const a = window.innerWidth, o = window.innerHeight;
|
|
1083
|
+
if (t.top >= s + Y + Z) return "top";
|
|
1084
|
+
if (o - t.bottom >= s + Y + Z) return "bottom";
|
|
1085
|
+
if (a - t.right >= r + Y + Z) return "right";
|
|
1086
|
+
if (t.left >= r + Y + Z) return "left";
|
|
1087
|
+
const n = Math.max(t.top, o - t.bottom, t.left, a - t.right);
|
|
1088
|
+
return n === t.top ? "top" : n === o - t.bottom ? "bottom" : n === a - t.right ? "right" : "left";
|
|
1089
|
+
}
|
|
1090
|
+
function ks({ children: t, content: s, position: r, ...a }) {
|
|
1091
|
+
const [o, n] = k(!1), [i, c] = k({ visibility: "hidden" }), [m, u] = k(r || "top"), p = N(null), f = N(null), x = N(!1), d = () => {
|
|
1092
1092
|
if (!p.current || !f.current) return;
|
|
1093
|
-
const w = p.current.getBoundingClientRect(),
|
|
1094
|
-
u(
|
|
1093
|
+
const w = p.current.getBoundingClientRect(), g = f.current.getBoundingClientRect(), y = r || Ue(w, g.height, g.width), { top: P, left: I, arrowOffset: $ } = Ce(y, w, g);
|
|
1094
|
+
u(y), c({
|
|
1095
1095
|
position: "fixed",
|
|
1096
|
-
top:
|
|
1097
|
-
left:
|
|
1096
|
+
top: P,
|
|
1097
|
+
left: I,
|
|
1098
1098
|
visibility: "visible",
|
|
1099
|
-
"--arrow-offset": `${
|
|
1099
|
+
"--arrow-offset": `${$}px`
|
|
1100
1100
|
});
|
|
1101
1101
|
};
|
|
1102
|
-
if (
|
|
1103
|
-
if (!
|
|
1104
|
-
|
|
1102
|
+
if (R(() => {
|
|
1103
|
+
if (!o) return;
|
|
1104
|
+
c({ position: "fixed", visibility: "hidden" });
|
|
1105
1105
|
const w = requestAnimationFrame(d);
|
|
1106
1106
|
return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
|
|
1107
1107
|
cancelAnimationFrame(w), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
|
|
1108
1108
|
};
|
|
1109
|
-
}, [
|
|
1110
|
-
if (!
|
|
1111
|
-
const w = (
|
|
1112
|
-
p.current && !p.current.contains(
|
|
1109
|
+
}, [o, r]), R(() => {
|
|
1110
|
+
if (!o) return;
|
|
1111
|
+
const w = (g) => {
|
|
1112
|
+
p.current && !p.current.contains(g.target) && n(!1);
|
|
1113
1113
|
};
|
|
1114
1114
|
return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
|
|
1115
|
-
}, [
|
|
1116
|
-
const _ =
|
|
1115
|
+
}, [o]), !s) return t;
|
|
1116
|
+
const _ = o && /* @__PURE__ */ e.jsx(
|
|
1117
1117
|
"div",
|
|
1118
1118
|
{
|
|
1119
1119
|
ref: f,
|
|
1120
1120
|
className: `ds-tooltip ds-tooltip--${m}`,
|
|
1121
1121
|
role: "tooltip",
|
|
1122
1122
|
style: i,
|
|
1123
|
-
children:
|
|
1123
|
+
children: s
|
|
1124
1124
|
}
|
|
1125
1125
|
);
|
|
1126
1126
|
return /* @__PURE__ */ e.jsxs(
|
|
@@ -1129,81 +1129,81 @@ function Et({ children: s, content: t, position: r, ...o }) {
|
|
|
1129
1129
|
ref: p,
|
|
1130
1130
|
className: "ds-tooltip-wrapper",
|
|
1131
1131
|
onMouseEnter: () => {
|
|
1132
|
-
|
|
1132
|
+
x.current || n(!0);
|
|
1133
1133
|
},
|
|
1134
1134
|
onMouseLeave: () => {
|
|
1135
|
-
|
|
1135
|
+
x.current || n(!1);
|
|
1136
1136
|
},
|
|
1137
1137
|
onTouchStart: () => {
|
|
1138
|
-
|
|
1138
|
+
x.current = !0, n((w) => !w);
|
|
1139
1139
|
},
|
|
1140
|
-
...
|
|
1140
|
+
...a,
|
|
1141
1141
|
children: [
|
|
1142
|
-
|
|
1142
|
+
t,
|
|
1143
1143
|
typeof document < "u" && ae.createPortal(_, document.body)
|
|
1144
1144
|
]
|
|
1145
1145
|
}
|
|
1146
1146
|
);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
checked:
|
|
1150
|
-
onChange:
|
|
1148
|
+
function gs({
|
|
1149
|
+
checked: t = !1,
|
|
1150
|
+
onChange: s,
|
|
1151
1151
|
size: r = "m",
|
|
1152
|
-
disabled:
|
|
1153
|
-
label:
|
|
1152
|
+
disabled: a = !1,
|
|
1153
|
+
label: o,
|
|
1154
1154
|
id: n,
|
|
1155
1155
|
...i
|
|
1156
1156
|
}) {
|
|
1157
|
-
const
|
|
1157
|
+
const c = n || `toggle-${L.useId()}`, m = [
|
|
1158
1158
|
"ds-toggle",
|
|
1159
1159
|
`ds-toggle--${r}`,
|
|
1160
|
-
|
|
1160
|
+
a && "ds-toggle--disabled"
|
|
1161
1161
|
].filter(Boolean).join(" ");
|
|
1162
|
-
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor:
|
|
1162
|
+
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: c, children: [
|
|
1163
1163
|
/* @__PURE__ */ e.jsx(
|
|
1164
1164
|
"input",
|
|
1165
1165
|
{
|
|
1166
1166
|
type: "checkbox",
|
|
1167
|
-
id:
|
|
1167
|
+
id: c,
|
|
1168
1168
|
className: "ds-toggle__input",
|
|
1169
|
-
checked:
|
|
1170
|
-
onChange: (u) =>
|
|
1171
|
-
disabled:
|
|
1169
|
+
checked: t,
|
|
1170
|
+
onChange: (u) => s == null ? void 0 : s(u.target.checked),
|
|
1171
|
+
disabled: a,
|
|
1172
1172
|
...i
|
|
1173
1173
|
}
|
|
1174
1174
|
),
|
|
1175
1175
|
/* @__PURE__ */ e.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__thumb" }) }),
|
|
1176
|
-
|
|
1176
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
|
|
1177
1177
|
] });
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1180
|
-
checked:
|
|
1181
|
-
onChange:
|
|
1179
|
+
function $s({
|
|
1180
|
+
checked: t = !1,
|
|
1181
|
+
onChange: s,
|
|
1182
1182
|
size: r = "m",
|
|
1183
|
-
disabled:
|
|
1184
|
-
label:
|
|
1183
|
+
disabled: a = !1,
|
|
1184
|
+
label: o,
|
|
1185
1185
|
id: n,
|
|
1186
1186
|
...i
|
|
1187
1187
|
}) {
|
|
1188
|
-
const
|
|
1188
|
+
const c = n || `checkbox-${L.useId()}`, m = [
|
|
1189
1189
|
"ds-checkbox",
|
|
1190
1190
|
`ds-checkbox--${r}`,
|
|
1191
|
-
|
|
1191
|
+
a && "ds-checkbox--disabled"
|
|
1192
1192
|
].filter(Boolean).join(" "), u = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
|
|
1193
|
-
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor:
|
|
1193
|
+
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: c, children: [
|
|
1194
1194
|
/* @__PURE__ */ e.jsx(
|
|
1195
1195
|
"input",
|
|
1196
1196
|
{
|
|
1197
1197
|
type: "checkbox",
|
|
1198
|
-
id:
|
|
1198
|
+
id: c,
|
|
1199
1199
|
className: "ds-checkbox__input",
|
|
1200
|
-
checked:
|
|
1201
|
-
onChange: (p) =>
|
|
1202
|
-
disabled:
|
|
1200
|
+
checked: t,
|
|
1201
|
+
onChange: (p) => s == null ? void 0 : s(p.target.checked),
|
|
1202
|
+
disabled: a,
|
|
1203
1203
|
...i
|
|
1204
1204
|
}
|
|
1205
1205
|
),
|
|
1206
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children:
|
|
1206
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
|
|
1207
1207
|
re,
|
|
1208
1208
|
{
|
|
1209
1209
|
size: u,
|
|
@@ -1211,24 +1211,24 @@ function gt({
|
|
|
1211
1211
|
className: "ds-checkbox__icon"
|
|
1212
1212
|
}
|
|
1213
1213
|
) }),
|
|
1214
|
-
|
|
1214
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
|
|
1215
1215
|
] });
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1218
|
-
checked:
|
|
1219
|
-
onChange:
|
|
1217
|
+
function Ts({
|
|
1218
|
+
checked: t = !1,
|
|
1219
|
+
onChange: s,
|
|
1220
1220
|
size: r = "m",
|
|
1221
|
-
disabled:
|
|
1222
|
-
label:
|
|
1221
|
+
disabled: a = !1,
|
|
1222
|
+
label: o,
|
|
1223
1223
|
name: n,
|
|
1224
1224
|
value: i,
|
|
1225
|
-
id:
|
|
1225
|
+
id: c,
|
|
1226
1226
|
...m
|
|
1227
1227
|
}) {
|
|
1228
|
-
const u =
|
|
1228
|
+
const u = c || `radio-${L.useId()}`, p = [
|
|
1229
1229
|
"ds-radio",
|
|
1230
1230
|
`ds-radio--${r}`,
|
|
1231
|
-
|
|
1231
|
+
a && "ds-radio--disabled"
|
|
1232
1232
|
].filter(Boolean).join(" ");
|
|
1233
1233
|
return /* @__PURE__ */ e.jsxs("label", { className: p, htmlFor: u, children: [
|
|
1234
1234
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1237,131 +1237,131 @@ function Rt({
|
|
|
1237
1237
|
type: "radio",
|
|
1238
1238
|
id: u,
|
|
1239
1239
|
className: "ds-radio__input",
|
|
1240
|
-
checked:
|
|
1241
|
-
onChange: (f) =>
|
|
1242
|
-
disabled:
|
|
1240
|
+
checked: t,
|
|
1241
|
+
onChange: (f) => s == null ? void 0 : s(f.target.checked),
|
|
1242
|
+
disabled: a,
|
|
1243
1243
|
name: n,
|
|
1244
1244
|
value: i,
|
|
1245
1245
|
...m
|
|
1246
1246
|
}
|
|
1247
1247
|
),
|
|
1248
1248
|
/* @__PURE__ */ e.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ e.jsx("span", { className: "ds-radio__dot" }) }),
|
|
1249
|
-
|
|
1249
|
+
o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
|
|
1250
1250
|
] });
|
|
1251
1251
|
}
|
|
1252
|
-
function Ye({ width:
|
|
1252
|
+
function Ye({ width: t, height: s, shape: r = "rect", aspectRatio: a, className: o = "", style: n = {}, ...i }) {
|
|
1253
1253
|
return /* @__PURE__ */ e.jsx(
|
|
1254
1254
|
"span",
|
|
1255
1255
|
{
|
|
1256
|
-
className: ["ds-skeleton", `ds-skeleton--${r}`,
|
|
1257
|
-
style: { width:
|
|
1256
|
+
className: ["ds-skeleton", `ds-skeleton--${r}`, o].filter(Boolean).join(" "),
|
|
1257
|
+
style: { width: t, height: s, aspectRatio: a, ...n },
|
|
1258
1258
|
"aria-hidden": "true",
|
|
1259
1259
|
...i
|
|
1260
1260
|
}
|
|
1261
1261
|
);
|
|
1262
1262
|
}
|
|
1263
|
-
function qe({ lines:
|
|
1263
|
+
function qe({ lines: t = 1, lastLineWidth: s = "70%", gap: r, className: a = "", style: o = {}, ...n }) {
|
|
1264
1264
|
return /* @__PURE__ */ e.jsx(
|
|
1265
1265
|
"span",
|
|
1266
1266
|
{
|
|
1267
|
-
className: ["ds-skeleton-text",
|
|
1268
|
-
style: { gap: r, ...
|
|
1267
|
+
className: ["ds-skeleton-text", a].filter(Boolean).join(" "),
|
|
1268
|
+
style: { gap: r, ...o },
|
|
1269
1269
|
"aria-hidden": "true",
|
|
1270
1270
|
...n,
|
|
1271
|
-
children: Array.from({ length:
|
|
1271
|
+
children: Array.from({ length: t }, (i, c) => /* @__PURE__ */ e.jsx(
|
|
1272
1272
|
"span",
|
|
1273
1273
|
{
|
|
1274
1274
|
className: "ds-skeleton ds-skeleton--text",
|
|
1275
|
-
style:
|
|
1275
|
+
style: c === t - 1 && t > 1 ? { width: s } : void 0
|
|
1276
1276
|
},
|
|
1277
|
-
|
|
1277
|
+
c
|
|
1278
1278
|
))
|
|
1279
1279
|
}
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
1282
|
Ye.Text = qe;
|
|
1283
|
-
function He(
|
|
1284
|
-
let
|
|
1285
|
-
for (let r = 0; r <
|
|
1286
|
-
|
|
1287
|
-
return
|
|
1288
|
-
}
|
|
1289
|
-
function Ke(
|
|
1290
|
-
if (!
|
|
1291
|
-
const
|
|
1292
|
-
return
|
|
1293
|
-
}
|
|
1294
|
-
function
|
|
1295
|
-
const
|
|
1283
|
+
function He(t) {
|
|
1284
|
+
let s = 2166136261;
|
|
1285
|
+
for (let r = 0; r < t.length; r++)
|
|
1286
|
+
s ^= t.charCodeAt(r), s = Math.imul(s, 16777619) >>> 0;
|
|
1287
|
+
return s % 360;
|
|
1288
|
+
}
|
|
1289
|
+
function Ke(t) {
|
|
1290
|
+
if (!t) return "";
|
|
1291
|
+
const s = t.trim().split(/\s+/);
|
|
1292
|
+
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1293
|
+
}
|
|
1294
|
+
function Rs({ seed: t, icon: s, src: r, size: a = 32, className: o = "", style: n = {}, ...i }) {
|
|
1295
|
+
const c = He(t ?? ""), [m, u] = k(!1), p = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Ke(t) });
|
|
1296
1296
|
return /* @__PURE__ */ e.jsx(
|
|
1297
1297
|
"div",
|
|
1298
1298
|
{
|
|
1299
|
-
className: ["ds-avatar",
|
|
1300
|
-
style: { width:
|
|
1299
|
+
className: ["ds-avatar", o].filter(Boolean).join(" "),
|
|
1300
|
+
style: { width: a, height: a, "--ds-avatar-h": c, ...n },
|
|
1301
1301
|
"aria-hidden": "true",
|
|
1302
1302
|
...i,
|
|
1303
1303
|
children: r && !m ? /* @__PURE__ */ e.jsx("img", { src: r, alt: "", onError: () => u(!0) }) : p
|
|
1304
1304
|
}
|
|
1305
1305
|
);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
children:
|
|
1309
|
-
size:
|
|
1307
|
+
function Is({
|
|
1308
|
+
children: t,
|
|
1309
|
+
size: s = "compact",
|
|
1310
1310
|
stickyTop: r,
|
|
1311
|
-
maxHeight:
|
|
1312
|
-
className:
|
|
1311
|
+
maxHeight: a,
|
|
1312
|
+
className: o = "",
|
|
1313
1313
|
style: n = {},
|
|
1314
1314
|
...i
|
|
1315
1315
|
}) {
|
|
1316
|
-
const
|
|
1317
|
-
...
|
|
1316
|
+
const c = {
|
|
1317
|
+
...a ? { maxHeight: a } : {},
|
|
1318
1318
|
...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
|
|
1319
1319
|
...n
|
|
1320
1320
|
};
|
|
1321
1321
|
return /* @__PURE__ */ e.jsx(
|
|
1322
1322
|
"div",
|
|
1323
1323
|
{
|
|
1324
|
-
className: ["ds-table-wrap",
|
|
1325
|
-
style:
|
|
1324
|
+
className: ["ds-table-wrap", a ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
|
|
1325
|
+
style: c,
|
|
1326
1326
|
children: /* @__PURE__ */ e.jsx(
|
|
1327
1327
|
"table",
|
|
1328
1328
|
{
|
|
1329
|
-
className: ["ds-table", `ds-table--${
|
|
1329
|
+
className: ["ds-table", `ds-table--${s}`, o].filter(Boolean).join(" "),
|
|
1330
1330
|
...i,
|
|
1331
|
-
children:
|
|
1331
|
+
children: t
|
|
1332
1332
|
}
|
|
1333
1333
|
)
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1338
|
-
return /* @__PURE__ */ e.jsx("thead", { ...
|
|
1337
|
+
function Ss({ children: t, ...s }) {
|
|
1338
|
+
return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1341
|
-
return /* @__PURE__ */ e.jsx("tbody", { ...
|
|
1340
|
+
function As({ children: t, ...s }) {
|
|
1341
|
+
return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Bs({ children: t, interactive: s, selected: r, subheader: a, className: o = "", onClick: n, ...i }) {
|
|
1344
1344
|
return /* @__PURE__ */ e.jsx(
|
|
1345
1345
|
"tr",
|
|
1346
1346
|
{
|
|
1347
1347
|
className: [
|
|
1348
1348
|
"ds-table-row",
|
|
1349
|
-
|
|
1349
|
+
s || n ? "ds-table-row--interactive" : "",
|
|
1350
1350
|
r ? "ds-table-row--selected" : "",
|
|
1351
|
-
|
|
1352
|
-
|
|
1351
|
+
a ? "ds-table-row--subheader" : "",
|
|
1352
|
+
o
|
|
1353
1353
|
].filter(Boolean).join(" "),
|
|
1354
1354
|
onClick: n,
|
|
1355
1355
|
...i,
|
|
1356
|
-
children:
|
|
1356
|
+
children: t
|
|
1357
1357
|
}
|
|
1358
1358
|
);
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan:
|
|
1360
|
+
function Ds({ children: t, colSpan: s = 999, ...r }) {
|
|
1361
|
+
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1364
|
-
const m = !!
|
|
1363
|
+
function Ps({ children: t, align: s = "left", sortDir: r, onSort: a, width: o, className: n = "", style: i = {}, ...c }) {
|
|
1364
|
+
const m = !!a || r !== void 0, u = r === "asc" ? Te : r === "desc" ? ne : Re;
|
|
1365
1365
|
return /* @__PURE__ */ e.jsx(
|
|
1366
1366
|
"th",
|
|
1367
1367
|
{
|
|
@@ -1369,160 +1369,160 @@ function Bt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, c
|
|
|
1369
1369
|
"ds-th",
|
|
1370
1370
|
m ? "ds-th--sortable" : "",
|
|
1371
1371
|
r ? "ds-th--sorted" : "",
|
|
1372
|
-
|
|
1372
|
+
s !== "left" ? `ds-table-cell--${s}` : "",
|
|
1373
1373
|
n
|
|
1374
1374
|
].filter(Boolean).join(" "),
|
|
1375
|
-
onClick:
|
|
1376
|
-
style: { width:
|
|
1377
|
-
...
|
|
1375
|
+
onClick: a,
|
|
1376
|
+
style: { width: o, ...i },
|
|
1377
|
+
...c,
|
|
1378
1378
|
children: m ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
|
|
1379
|
-
|
|
1379
|
+
t,
|
|
1380
1380
|
/* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(u, { size: 11, strokeWidth: 2.5 }) })
|
|
1381
|
-
] }) :
|
|
1381
|
+
] }) : t
|
|
1382
1382
|
}
|
|
1383
1383
|
);
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function Os({ children: t, align: s = "left", secondary: r, muted: a, truncate: o, nowrap: n, className: i = "", ...c }) {
|
|
1386
1386
|
return /* @__PURE__ */ e.jsx(
|
|
1387
1387
|
"td",
|
|
1388
1388
|
{
|
|
1389
1389
|
className: [
|
|
1390
1390
|
"ds-td",
|
|
1391
|
-
|
|
1391
|
+
s !== "left" ? `ds-table-cell--${s}` : "",
|
|
1392
1392
|
r ? "ds-table-cell--secondary" : "",
|
|
1393
|
-
|
|
1394
|
-
|
|
1393
|
+
a ? "ds-table-cell--muted" : "",
|
|
1394
|
+
o ? "ds-table-cell--truncate" : "",
|
|
1395
1395
|
n ? "ds-table-cell--nowrap" : "",
|
|
1396
1396
|
i
|
|
1397
1397
|
].filter(Boolean).join(" "),
|
|
1398
|
-
...
|
|
1399
|
-
children:
|
|
1398
|
+
...c,
|
|
1399
|
+
children: t
|
|
1400
1400
|
}
|
|
1401
1401
|
);
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1404
|
-
icon:
|
|
1405
|
-
title:
|
|
1403
|
+
function Ls({
|
|
1404
|
+
icon: t,
|
|
1405
|
+
title: s,
|
|
1406
1406
|
description: r,
|
|
1407
|
-
action:
|
|
1408
|
-
size:
|
|
1407
|
+
action: a,
|
|
1408
|
+
size: o = "m",
|
|
1409
1409
|
className: n = "",
|
|
1410
1410
|
...i
|
|
1411
1411
|
}) {
|
|
1412
1412
|
return /* @__PURE__ */ e.jsxs(
|
|
1413
1413
|
"div",
|
|
1414
1414
|
{
|
|
1415
|
-
className: ["ds-empty-state", `ds-empty-state--${
|
|
1415
|
+
className: ["ds-empty-state", `ds-empty-state--${o}`, n].filter(Boolean).join(" "),
|
|
1416
1416
|
...i,
|
|
1417
1417
|
children: [
|
|
1418
|
-
|
|
1419
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children:
|
|
1418
|
+
t && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__icon", children: t }),
|
|
1419
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__title", children: s }),
|
|
1420
1420
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__description", children: r }),
|
|
1421
|
-
|
|
1421
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-empty-state__action", children: a })
|
|
1422
1422
|
]
|
|
1423
1423
|
}
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1427
|
-
label:
|
|
1428
|
-
hint:
|
|
1426
|
+
function Ms({
|
|
1427
|
+
label: t,
|
|
1428
|
+
hint: s,
|
|
1429
1429
|
error: r,
|
|
1430
|
-
required:
|
|
1431
|
-
disabled:
|
|
1430
|
+
required: a = !1,
|
|
1431
|
+
disabled: o = !1,
|
|
1432
1432
|
htmlFor: n,
|
|
1433
1433
|
children: i,
|
|
1434
|
-
className:
|
|
1434
|
+
className: c = "",
|
|
1435
1435
|
style: m,
|
|
1436
1436
|
...u
|
|
1437
1437
|
}) {
|
|
1438
|
-
const p = L.useId(), f = n ?? p,
|
|
1438
|
+
const p = L.useId(), f = n ?? p, x = `${f}-hint`, d = `${f}-error`;
|
|
1439
1439
|
return /* @__PURE__ */ e.jsxs(
|
|
1440
1440
|
"div",
|
|
1441
1441
|
{
|
|
1442
|
-
className: `ds-field${
|
|
1442
|
+
className: `ds-field${c ? ` ${c}` : ""}`,
|
|
1443
1443
|
"data-state": r ? "error" : void 0,
|
|
1444
|
-
"data-required":
|
|
1445
|
-
"data-disabled":
|
|
1444
|
+
"data-required": a ? "" : void 0,
|
|
1445
|
+
"data-disabled": o ? "" : void 0,
|
|
1446
1446
|
style: m,
|
|
1447
1447
|
...u,
|
|
1448
1448
|
children: [
|
|
1449
|
-
|
|
1449
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: f, children: t }),
|
|
1450
1450
|
/* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
|
|
1451
|
-
|
|
1451
|
+
s && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: x, children: s }),
|
|
1452
1452
|
r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: d, role: "alert", children: r })
|
|
1453
1453
|
]
|
|
1454
1454
|
}
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Ws({ label: t, value: s, delta: r, size: a = "m", inline: o = !1, className: n = "", style: i, ...c }) {
|
|
1458
1458
|
const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
|
|
1459
1459
|
return /* @__PURE__ */ e.jsxs(
|
|
1460
1460
|
"div",
|
|
1461
1461
|
{
|
|
1462
1462
|
className: [
|
|
1463
1463
|
"ds-stat",
|
|
1464
|
-
`ds-stat--${
|
|
1465
|
-
|
|
1464
|
+
`ds-stat--${a}`,
|
|
1465
|
+
o && "ds-stat--inline",
|
|
1466
1466
|
n
|
|
1467
1467
|
].filter(Boolean).join(" "),
|
|
1468
1468
|
style: i,
|
|
1469
|
-
...
|
|
1469
|
+
...c,
|
|
1470
1470
|
children: [
|
|
1471
|
-
|
|
1472
|
-
|
|
1471
|
+
t && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-label", children: t }),
|
|
1472
|
+
s != null && /* @__PURE__ */ e.jsx("span", { className: "ds-stat-value", children: s }),
|
|
1473
1473
|
r != null && /* @__PURE__ */ e.jsx("span", { className: `ds-stat-delta ds-stat-delta--${m}`, children: r })
|
|
1474
1474
|
]
|
|
1475
1475
|
}
|
|
1476
1476
|
);
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1479
|
-
children:
|
|
1480
|
-
separator:
|
|
1478
|
+
function zs({
|
|
1479
|
+
children: t,
|
|
1480
|
+
separator: s = "/",
|
|
1481
1481
|
"aria-label": r = "Breadcrumb",
|
|
1482
|
-
className:
|
|
1483
|
-
style:
|
|
1482
|
+
className: a = "",
|
|
1483
|
+
style: o,
|
|
1484
1484
|
...n
|
|
1485
1485
|
}) {
|
|
1486
|
-
const i = L.Children.toArray(
|
|
1486
|
+
const i = L.Children.toArray(t).filter(Boolean);
|
|
1487
1487
|
return /* @__PURE__ */ e.jsx(
|
|
1488
1488
|
"nav",
|
|
1489
1489
|
{
|
|
1490
|
-
className: `ds-breadcrumb${
|
|
1490
|
+
className: `ds-breadcrumb${a ? ` ${a}` : ""}`,
|
|
1491
1491
|
"aria-label": r,
|
|
1492
|
-
style:
|
|
1492
|
+
style: o,
|
|
1493
1493
|
...n,
|
|
1494
|
-
children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((
|
|
1495
|
-
|
|
1496
|
-
m < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children:
|
|
1494
|
+
children: /* @__PURE__ */ e.jsx("ol", { className: "ds-breadcrumb-list", children: i.map((c, m) => /* @__PURE__ */ e.jsxs("li", { className: "ds-breadcrumb-item", children: [
|
|
1495
|
+
c,
|
|
1496
|
+
m < i.length - 1 && /* @__PURE__ */ e.jsx("span", { className: "ds-breadcrumb-sep", "aria-hidden": "true", children: s })
|
|
1497
1497
|
] }, m)) })
|
|
1498
1498
|
}
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1502
|
-
page:
|
|
1503
|
-
total:
|
|
1501
|
+
function Fs({
|
|
1502
|
+
page: t,
|
|
1503
|
+
total: s,
|
|
1504
1504
|
onChange: r,
|
|
1505
|
-
siblings:
|
|
1506
|
-
"aria-label":
|
|
1505
|
+
siblings: a = 1,
|
|
1506
|
+
"aria-label": o = "Pagination",
|
|
1507
1507
|
className: n = "",
|
|
1508
1508
|
style: i,
|
|
1509
|
-
...
|
|
1509
|
+
...c
|
|
1510
1510
|
}) {
|
|
1511
|
-
const m = Ge(
|
|
1511
|
+
const m = Ge(t, s, a);
|
|
1512
1512
|
return /* @__PURE__ */ e.jsxs(
|
|
1513
1513
|
"nav",
|
|
1514
1514
|
{
|
|
1515
1515
|
className: `ds-pagination${n ? ` ${n}` : ""}`,
|
|
1516
|
-
"aria-label":
|
|
1516
|
+
"aria-label": o,
|
|
1517
1517
|
style: i,
|
|
1518
|
-
...
|
|
1518
|
+
...c,
|
|
1519
1519
|
children: [
|
|
1520
1520
|
/* @__PURE__ */ e.jsx(
|
|
1521
1521
|
"button",
|
|
1522
1522
|
{
|
|
1523
1523
|
className: "ds-pagination-arrow",
|
|
1524
|
-
onClick: () => r == null ? void 0 : r(
|
|
1525
|
-
disabled:
|
|
1524
|
+
onClick: () => r == null ? void 0 : r(t - 1),
|
|
1525
|
+
disabled: t <= 1,
|
|
1526
1526
|
"aria-label": "Previous page",
|
|
1527
1527
|
children: /* @__PURE__ */ e.jsx(Ie, { size: 16 })
|
|
1528
1528
|
}
|
|
@@ -1531,9 +1531,9 @@ function Ft({
|
|
|
1531
1531
|
(u, p) => u === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${p}`) : /* @__PURE__ */ e.jsx(
|
|
1532
1532
|
"button",
|
|
1533
1533
|
{
|
|
1534
|
-
className: `ds-pagination-page${u ===
|
|
1535
|
-
onClick: () => u !==
|
|
1536
|
-
"aria-current": u ===
|
|
1534
|
+
className: `ds-pagination-page${u === t ? " ds-pagination-page--current" : ""}`,
|
|
1535
|
+
onClick: () => u !== t && (r == null ? void 0 : r(u)),
|
|
1536
|
+
"aria-current": u === t ? "page" : void 0,
|
|
1537
1537
|
"aria-label": `Page ${u}`,
|
|
1538
1538
|
children: u
|
|
1539
1539
|
},
|
|
@@ -1544,8 +1544,8 @@ function Ft({
|
|
|
1544
1544
|
"button",
|
|
1545
1545
|
{
|
|
1546
1546
|
className: "ds-pagination-arrow",
|
|
1547
|
-
onClick: () => r == null ? void 0 : r(
|
|
1548
|
-
disabled:
|
|
1547
|
+
onClick: () => r == null ? void 0 : r(t + 1),
|
|
1548
|
+
disabled: t >= s,
|
|
1549
1549
|
"aria-label": "Next page",
|
|
1550
1550
|
children: /* @__PURE__ */ e.jsx(je, { size: 16 })
|
|
1551
1551
|
}
|
|
@@ -1554,27 +1554,27 @@ function Ft({
|
|
|
1554
1554
|
}
|
|
1555
1555
|
);
|
|
1556
1556
|
}
|
|
1557
|
-
function Ge(
|
|
1558
|
-
if (
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1561
|
-
for (let i =
|
|
1562
|
-
return
|
|
1557
|
+
function Ge(t, s, r) {
|
|
1558
|
+
if (s <= 7) return Array.from({ length: s }, (i, c) => c + 1);
|
|
1559
|
+
const a = Math.max(2, t - r), o = Math.min(s - 1, t + r), n = [1];
|
|
1560
|
+
a > 2 && n.push("…");
|
|
1561
|
+
for (let i = a; i <= o; i++) n.push(i);
|
|
1562
|
+
return o < s - 1 && n.push("…"), n.push(s), n;
|
|
1563
1563
|
}
|
|
1564
1564
|
const Xe = 200;
|
|
1565
|
-
function
|
|
1566
|
-
children:
|
|
1567
|
-
title:
|
|
1565
|
+
function Vs({
|
|
1566
|
+
children: t,
|
|
1567
|
+
title: s,
|
|
1568
1568
|
onClose: r,
|
|
1569
|
-
side:
|
|
1570
|
-
...
|
|
1569
|
+
side: a = "right",
|
|
1570
|
+
...o
|
|
1571
1571
|
}) {
|
|
1572
|
-
const n =
|
|
1573
|
-
!r ||
|
|
1572
|
+
const n = N(null), i = L.useId(), [c, m] = k(!1), u = () => {
|
|
1573
|
+
!r || c || (m(!0), setTimeout(() => {
|
|
1574
1574
|
m(!1), r();
|
|
1575
1575
|
}, Xe));
|
|
1576
1576
|
};
|
|
1577
|
-
|
|
1577
|
+
R(() => {
|
|
1578
1578
|
const d = (w) => {
|
|
1579
1579
|
w.key === "Escape" && u();
|
|
1580
1580
|
}, _ = (w) => {
|
|
@@ -1583,28 +1583,28 @@ function Ct({
|
|
|
1583
1583
|
return document.addEventListener("keydown", d), document.addEventListener("mousedown", _), () => {
|
|
1584
1584
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
|
|
1585
1585
|
};
|
|
1586
|
-
}, [r,
|
|
1587
|
-
const p = L.Children.toArray(
|
|
1586
|
+
}, [r, c]);
|
|
1587
|
+
const p = L.Children.toArray(t), f = p.find((d) => (d == null ? void 0 : d.type) === be), x = p.filter((d) => (d == null ? void 0 : d.type) !== be);
|
|
1588
1588
|
return /* @__PURE__ */ e.jsx(
|
|
1589
1589
|
"div",
|
|
1590
1590
|
{
|
|
1591
|
-
className: ["ds-drawer-overlay",
|
|
1592
|
-
...
|
|
1591
|
+
className: ["ds-drawer-overlay", c && "ds-drawer-overlay--closing"].filter(Boolean).join(" "),
|
|
1592
|
+
...o,
|
|
1593
1593
|
children: /* @__PURE__ */ e.jsxs(
|
|
1594
1594
|
"aside",
|
|
1595
1595
|
{
|
|
1596
|
-
className: ["ds-drawer",
|
|
1597
|
-
"data-side":
|
|
1596
|
+
className: ["ds-drawer", c && "ds-drawer--closing"].filter(Boolean).join(" "),
|
|
1597
|
+
"data-side": a,
|
|
1598
1598
|
ref: n,
|
|
1599
1599
|
role: "dialog",
|
|
1600
1600
|
"aria-modal": "true",
|
|
1601
|
-
"aria-labelledby":
|
|
1601
|
+
"aria-labelledby": s ? i : void 0,
|
|
1602
1602
|
children: [
|
|
1603
1603
|
/* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
|
|
1604
|
-
|
|
1605
|
-
r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1604
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: s }),
|
|
1605
|
+
r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: A[2], strokeWidth: 1.5 }) })
|
|
1606
1606
|
] }),
|
|
1607
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children:
|
|
1607
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: x }),
|
|
1608
1608
|
f
|
|
1609
1609
|
]
|
|
1610
1610
|
}
|
|
@@ -1612,8 +1612,8 @@ function Ct({
|
|
|
1612
1612
|
}
|
|
1613
1613
|
);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1616
|
-
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children:
|
|
1615
|
+
function be({ children: t }) {
|
|
1616
|
+
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
|
|
1617
1617
|
}
|
|
1618
1618
|
const Je = {
|
|
1619
1619
|
info: me,
|
|
@@ -1621,131 +1621,131 @@ const Je = {
|
|
|
1621
1621
|
warning: ue,
|
|
1622
1622
|
error: de
|
|
1623
1623
|
};
|
|
1624
|
-
function
|
|
1625
|
-
children:
|
|
1626
|
-
variant:
|
|
1624
|
+
function Cs({
|
|
1625
|
+
children: t,
|
|
1626
|
+
variant: s = "info",
|
|
1627
1627
|
action: r,
|
|
1628
|
-
onAction:
|
|
1629
|
-
onDismiss:
|
|
1628
|
+
onAction: a,
|
|
1629
|
+
onDismiss: o,
|
|
1630
1630
|
role: n,
|
|
1631
1631
|
...i
|
|
1632
1632
|
}) {
|
|
1633
|
-
const
|
|
1633
|
+
const c = Je[s], m = n || (s === "error" ? "alert" : "status");
|
|
1634
1634
|
return /* @__PURE__ */ e.jsxs(
|
|
1635
1635
|
"div",
|
|
1636
1636
|
{
|
|
1637
|
-
className: `ds-banner ds-banner--${
|
|
1637
|
+
className: `ds-banner ds-banner--${s}`,
|
|
1638
1638
|
role: m,
|
|
1639
1639
|
...i,
|
|
1640
1640
|
children: [
|
|
1641
|
-
|
|
1642
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children:
|
|
1641
|
+
c && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(c, { size: A[2], strokeWidth: 1.5 }) }),
|
|
1642
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: t }),
|
|
1643
1643
|
r && /* @__PURE__ */ e.jsx(
|
|
1644
1644
|
"button",
|
|
1645
1645
|
{
|
|
1646
1646
|
type: "button",
|
|
1647
1647
|
className: "ds-banner-action",
|
|
1648
|
-
onClick:
|
|
1648
|
+
onClick: a,
|
|
1649
1649
|
children: r
|
|
1650
1650
|
}
|
|
1651
1651
|
),
|
|
1652
|
-
|
|
1652
|
+
o && /* @__PURE__ */ e.jsx(
|
|
1653
1653
|
"button",
|
|
1654
1654
|
{
|
|
1655
1655
|
type: "button",
|
|
1656
1656
|
className: "ds-banner-dismiss",
|
|
1657
|
-
onClick:
|
|
1657
|
+
onClick: o,
|
|
1658
1658
|
"aria-label": "Dismiss",
|
|
1659
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1659
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: A[2], strokeWidth: 1.5 })
|
|
1660
1660
|
}
|
|
1661
1661
|
)
|
|
1662
1662
|
]
|
|
1663
1663
|
}
|
|
1664
1664
|
);
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1667
|
-
trigger:
|
|
1668
|
-
items:
|
|
1666
|
+
function Us({
|
|
1667
|
+
trigger: t,
|
|
1668
|
+
items: s = [],
|
|
1669
1669
|
open: r,
|
|
1670
|
-
onOpenChange:
|
|
1671
|
-
align:
|
|
1670
|
+
onOpenChange: a,
|
|
1671
|
+
align: o = "left",
|
|
1672
1672
|
className: n = "",
|
|
1673
1673
|
style: i,
|
|
1674
|
-
...
|
|
1674
|
+
...c
|
|
1675
1675
|
}) {
|
|
1676
|
-
const [m, u] = k(!1), [p, f] = k(!1),
|
|
1677
|
-
if (
|
|
1678
|
-
|
|
1676
|
+
const [m, u] = k(!1), [p, f] = k(!1), x = r !== void 0, d = x ? r : m, _ = N(null), w = N(null), g = N(null), y = N(null), [P, I] = k({}), $ = N(null), F = 150, O = () => {
|
|
1677
|
+
if (x)
|
|
1678
|
+
a == null || a(!1);
|
|
1679
1679
|
else {
|
|
1680
1680
|
if (p) return;
|
|
1681
|
-
f(!0),
|
|
1681
|
+
f(!0), $.current = setTimeout(() => {
|
|
1682
1682
|
u(!1), f(!1);
|
|
1683
1683
|
}, F);
|
|
1684
1684
|
}
|
|
1685
1685
|
}, q = () => {
|
|
1686
1686
|
const h = !d;
|
|
1687
|
-
|
|
1687
|
+
x ? a == null || a(h) : h ? (clearTimeout($.current), f(!1), u(!0)) : O();
|
|
1688
1688
|
}, M = () => {
|
|
1689
|
-
d || (
|
|
1689
|
+
d || (x ? a == null || a(!0) : (clearTimeout($.current), f(!1), u(!0)));
|
|
1690
1690
|
};
|
|
1691
|
-
|
|
1691
|
+
R(() => () => clearTimeout($.current), []), R(() => {
|
|
1692
1692
|
if (!d) return;
|
|
1693
1693
|
const h = () => {
|
|
1694
|
-
var
|
|
1695
|
-
const v = (
|
|
1696
|
-
v &&
|
|
1697
|
-
|
|
1694
|
+
var T;
|
|
1695
|
+
const v = (T = _.current) == null ? void 0 : T.getBoundingClientRect();
|
|
1696
|
+
v && I(
|
|
1697
|
+
o === "right" ? { top: v.bottom + 4, right: window.innerWidth - v.right } : { top: v.bottom + 4, left: v.left }
|
|
1698
1698
|
);
|
|
1699
1699
|
};
|
|
1700
1700
|
return h(), window.addEventListener("scroll", h, !0), window.addEventListener("resize", h), () => {
|
|
1701
1701
|
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
1702
1702
|
};
|
|
1703
|
-
}, [d,
|
|
1703
|
+
}, [d, o]);
|
|
1704
1704
|
const W = () => {
|
|
1705
1705
|
var v;
|
|
1706
|
-
const h = (v =
|
|
1706
|
+
const h = (v = g.current) == null ? void 0 : v.querySelector(
|
|
1707
1707
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
1708
1708
|
);
|
|
1709
1709
|
h == null || h.focus();
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1711
|
+
R(() => {
|
|
1712
1712
|
if (!d) return;
|
|
1713
|
-
const h = (
|
|
1714
|
-
var
|
|
1715
|
-
!((
|
|
1716
|
-
}, v = (
|
|
1717
|
-
|
|
1713
|
+
const h = (T) => {
|
|
1714
|
+
var D, z;
|
|
1715
|
+
!((D = _.current) != null && D.contains(T.target)) && !((z = w.current) != null && z.contains(T.target)) && O();
|
|
1716
|
+
}, v = (T) => {
|
|
1717
|
+
T.key === "Escape" && (O(), W());
|
|
1718
1718
|
};
|
|
1719
1719
|
return document.addEventListener("mousedown", h), document.addEventListener("keydown", v), () => {
|
|
1720
1720
|
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", v);
|
|
1721
1721
|
};
|
|
1722
|
-
}, [d]),
|
|
1723
|
-
if (!d || !
|
|
1724
|
-
const h =
|
|
1725
|
-
v == null || v.focus(),
|
|
1722
|
+
}, [d]), R(() => {
|
|
1723
|
+
if (!d || !y.current || !w.current) return;
|
|
1724
|
+
const h = C(), v = y.current === "last" ? h[h.length - 1] : h[0];
|
|
1725
|
+
v == null || v.focus(), y.current = null;
|
|
1726
1726
|
}, [d]);
|
|
1727
|
-
const
|
|
1727
|
+
const C = () => w.current ? [...w.current.querySelectorAll(
|
|
1728
1728
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
1729
1729
|
)] : [], G = (h) => {
|
|
1730
|
-
var v,
|
|
1730
|
+
var v, T;
|
|
1731
1731
|
if (h.key === "ArrowDown")
|
|
1732
|
-
h.preventDefault(), d ? (v =
|
|
1732
|
+
h.preventDefault(), d ? (v = C()[0]) == null || v.focus() : (y.current = "first", M());
|
|
1733
1733
|
else if (h.key === "ArrowUp")
|
|
1734
1734
|
if (h.preventDefault(), !d)
|
|
1735
|
-
|
|
1735
|
+
y.current = "last", M();
|
|
1736
1736
|
else {
|
|
1737
|
-
const
|
|
1738
|
-
(
|
|
1737
|
+
const D = C();
|
|
1738
|
+
(T = D[D.length - 1]) == null || T.focus();
|
|
1739
1739
|
}
|
|
1740
1740
|
}, H = (h) => {
|
|
1741
|
-
var
|
|
1742
|
-
const v =
|
|
1741
|
+
var D, z, U, j;
|
|
1742
|
+
const v = C(), T = v.findIndex((l) => l === document.activeElement);
|
|
1743
1743
|
switch (h.key) {
|
|
1744
1744
|
case "ArrowDown":
|
|
1745
|
-
h.preventDefault(), (
|
|
1745
|
+
h.preventDefault(), (D = v[Math.min(T + 1, v.length - 1)]) == null || D.focus();
|
|
1746
1746
|
break;
|
|
1747
1747
|
case "ArrowUp":
|
|
1748
|
-
h.preventDefault(),
|
|
1748
|
+
h.preventDefault(), T <= 0 ? W() : (z = v[T - 1]) == null || z.focus();
|
|
1749
1749
|
break;
|
|
1750
1750
|
case "Home":
|
|
1751
1751
|
h.preventDefault(), (U = v[0]) == null || U.focus();
|
|
@@ -1757,19 +1757,19 @@ function Ut({
|
|
|
1757
1757
|
O();
|
|
1758
1758
|
break;
|
|
1759
1759
|
}
|
|
1760
|
-
},
|
|
1760
|
+
}, V = d && /* @__PURE__ */ e.jsx(
|
|
1761
1761
|
"div",
|
|
1762
1762
|
{
|
|
1763
1763
|
ref: w,
|
|
1764
1764
|
role: "menu",
|
|
1765
1765
|
className: [
|
|
1766
1766
|
"ds-dropdown__menu",
|
|
1767
|
-
`ds-dropdown__menu--${
|
|
1767
|
+
`ds-dropdown__menu--${o}`,
|
|
1768
1768
|
p && "ds-dropdown__menu--closing"
|
|
1769
1769
|
].filter(Boolean).join(" "),
|
|
1770
|
-
style:
|
|
1770
|
+
style: P,
|
|
1771
1771
|
onKeyDown: H,
|
|
1772
|
-
children:
|
|
1772
|
+
children: s.map((h, v) => {
|
|
1773
1773
|
if (h.separator)
|
|
1774
1774
|
return /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__separator" }, v);
|
|
1775
1775
|
if (h.type === "section")
|
|
@@ -1777,9 +1777,9 @@ function Ut({
|
|
|
1777
1777
|
h.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: h.label }),
|
|
1778
1778
|
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: h.content })
|
|
1779
1779
|
] }, v);
|
|
1780
|
-
const
|
|
1780
|
+
const T = !!h.href, D = T ? "a" : "button", z = T ? { href: h.disabled ? void 0 : h.href, "aria-disabled": h.disabled ? "true" : void 0 } : { type: "button", disabled: h.disabled };
|
|
1781
1781
|
return /* @__PURE__ */ e.jsxs(
|
|
1782
|
-
|
|
1782
|
+
D,
|
|
1783
1783
|
{
|
|
1784
1784
|
role: "menuitem",
|
|
1785
1785
|
className: [
|
|
@@ -1808,38 +1808,38 @@ function Ut({
|
|
|
1808
1808
|
ref: _,
|
|
1809
1809
|
className: ["ds-dropdown", n].filter(Boolean).join(" "),
|
|
1810
1810
|
style: i,
|
|
1811
|
-
...
|
|
1811
|
+
...c,
|
|
1812
1812
|
children: [
|
|
1813
1813
|
/* @__PURE__ */ e.jsx(
|
|
1814
1814
|
"div",
|
|
1815
1815
|
{
|
|
1816
|
-
ref:
|
|
1816
|
+
ref: g,
|
|
1817
1817
|
className: "ds-dropdown__trigger",
|
|
1818
1818
|
onClick: q,
|
|
1819
1819
|
onKeyDown: G,
|
|
1820
|
-
children:
|
|
1820
|
+
children: t
|
|
1821
1821
|
}
|
|
1822
1822
|
),
|
|
1823
|
-
typeof document < "u" && ae.createPortal(
|
|
1823
|
+
typeof document < "u" && ae.createPortal(V, document.body)
|
|
1824
1824
|
]
|
|
1825
1825
|
}
|
|
1826
1826
|
);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
value:
|
|
1830
|
-
size:
|
|
1828
|
+
function Ys({
|
|
1829
|
+
value: t = 0,
|
|
1830
|
+
size: s = "m",
|
|
1831
1831
|
variant: r = "default",
|
|
1832
|
-
showValue:
|
|
1833
|
-
min:
|
|
1832
|
+
showValue: a = !1,
|
|
1833
|
+
min: o = 2,
|
|
1834
1834
|
animate: n = !0
|
|
1835
1835
|
}) {
|
|
1836
|
-
const i = Math.min(100, Math.max(0,
|
|
1836
|
+
const i = Math.min(100, Math.max(0, t)), c = Math.max(o, i), m = r === "auto" ? i >= 70 ? "success" : i >= 50 ? "warning" : "danger" : r;
|
|
1837
1837
|
return /* @__PURE__ */ e.jsxs(
|
|
1838
1838
|
"div",
|
|
1839
1839
|
{
|
|
1840
1840
|
className: [
|
|
1841
1841
|
"ds-progress",
|
|
1842
|
-
`ds-progress--${
|
|
1842
|
+
`ds-progress--${s}`,
|
|
1843
1843
|
!n && "ds-progress--instant"
|
|
1844
1844
|
].filter(Boolean).join(" "),
|
|
1845
1845
|
role: "progressbar",
|
|
@@ -1851,10 +1851,10 @@ function Yt({
|
|
|
1851
1851
|
"div",
|
|
1852
1852
|
{
|
|
1853
1853
|
className: `ds-progress__fill ds-progress__fill--${m}`,
|
|
1854
|
-
style: { width: `${
|
|
1854
|
+
style: { width: `${c}%` }
|
|
1855
1855
|
}
|
|
1856
1856
|
) }),
|
|
1857
|
-
|
|
1857
|
+
a && /* @__PURE__ */ e.jsxs("span", { className: "ds-progress__value", children: [
|
|
1858
1858
|
Math.round(i),
|
|
1859
1859
|
"%"
|
|
1860
1860
|
] })
|
|
@@ -1862,63 +1862,63 @@ function Yt({
|
|
|
1862
1862
|
}
|
|
1863
1863
|
);
|
|
1864
1864
|
}
|
|
1865
|
-
const Ze = (
|
|
1866
|
-
function
|
|
1867
|
-
const [r,
|
|
1868
|
-
return
|
|
1865
|
+
const Ze = (t) => 1 - Math.pow(1 - t, 3), Qe = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1866
|
+
function es(t, { duration: s = 600 } = {}) {
|
|
1867
|
+
const [r, a] = k(t), o = N(t), n = N(null);
|
|
1868
|
+
return R(() => {
|
|
1869
1869
|
if (Qe()) {
|
|
1870
|
-
|
|
1870
|
+
a(t), o.current = t;
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
|
-
const i =
|
|
1874
|
-
if (
|
|
1873
|
+
const i = o.current, c = t - i;
|
|
1874
|
+
if (c === 0) return;
|
|
1875
1875
|
let m = null;
|
|
1876
1876
|
const u = (p) => {
|
|
1877
1877
|
m || (m = p);
|
|
1878
|
-
const f = Math.min((p - m) /
|
|
1879
|
-
|
|
1878
|
+
const f = Math.min((p - m) / s, 1);
|
|
1879
|
+
a(i + c * Ze(f)), f < 1 ? n.current = requestAnimationFrame(u) : o.current = t;
|
|
1880
1880
|
};
|
|
1881
1881
|
return n.current = requestAnimationFrame(u), () => cancelAnimationFrame(n.current);
|
|
1882
|
-
}, [
|
|
1882
|
+
}, [t, s]), r;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
value:
|
|
1886
|
-
duration:
|
|
1884
|
+
function qs({
|
|
1885
|
+
value: t,
|
|
1886
|
+
duration: s = 600,
|
|
1887
1887
|
decimals: r = 0,
|
|
1888
|
-
prefix:
|
|
1889
|
-
suffix:
|
|
1888
|
+
prefix: a = "",
|
|
1889
|
+
suffix: o = ""
|
|
1890
1890
|
}) {
|
|
1891
|
-
const i =
|
|
1892
|
-
return `${
|
|
1891
|
+
const i = es(t, { duration: s }).toFixed(r);
|
|
1892
|
+
return `${a}${i}${o}`;
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const
|
|
1896
|
-
return
|
|
1897
|
-
const i =
|
|
1894
|
+
function ss({ threshold: t = 0.1, rootMargin: s = "0px", once: r = !1 } = {}) {
|
|
1895
|
+
const a = N(null), [o, n] = k(!1);
|
|
1896
|
+
return R(() => {
|
|
1897
|
+
const i = a.current;
|
|
1898
1898
|
if (!i) return;
|
|
1899
|
-
const
|
|
1899
|
+
const c = new IntersectionObserver(
|
|
1900
1900
|
([m]) => {
|
|
1901
|
-
m.isIntersecting ? (n(!0), r &&
|
|
1901
|
+
m.isIntersecting ? (n(!0), r && c.disconnect()) : r || n(!1);
|
|
1902
1902
|
},
|
|
1903
|
-
{ threshold:
|
|
1903
|
+
{ threshold: t, rootMargin: s }
|
|
1904
1904
|
);
|
|
1905
|
-
return
|
|
1906
|
-
}, [
|
|
1905
|
+
return c.observe(i), () => c.disconnect();
|
|
1906
|
+
}, [t, s, r]), { ref: a, inView: o };
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1909
|
-
children:
|
|
1910
|
-
as:
|
|
1908
|
+
function Hs({
|
|
1909
|
+
children: t,
|
|
1910
|
+
as: s = "div",
|
|
1911
1911
|
once: r = !1,
|
|
1912
|
-
threshold:
|
|
1913
|
-
rootMargin:
|
|
1912
|
+
threshold: a = 0.1,
|
|
1913
|
+
rootMargin: o = "0px",
|
|
1914
1914
|
onEnter: n,
|
|
1915
1915
|
onLeave: i,
|
|
1916
|
-
...
|
|
1916
|
+
...c
|
|
1917
1917
|
}) {
|
|
1918
|
-
const { ref: m, inView: u } =
|
|
1919
|
-
return
|
|
1918
|
+
const { ref: m, inView: u } = ss({ threshold: a, rootMargin: o, once: r }), p = N(!1);
|
|
1919
|
+
return R(() => {
|
|
1920
1920
|
u && !p.current && (n == null || n()), !u && p.current && (i == null || i()), p.current = u;
|
|
1921
|
-
}, [u]), /* @__PURE__ */ e.jsx(
|
|
1921
|
+
}, [u]), /* @__PURE__ */ e.jsx(s, { ref: m, ...c, children: typeof t == "function" ? t(u) : t });
|
|
1922
1922
|
}
|
|
1923
1923
|
const ve = {
|
|
1924
1924
|
default: me,
|
|
@@ -1927,125 +1927,125 @@ const ve = {
|
|
|
1927
1927
|
error: de
|
|
1928
1928
|
};
|
|
1929
1929
|
let Q = [];
|
|
1930
|
-
const
|
|
1930
|
+
const ce = /* @__PURE__ */ new Set();
|
|
1931
1931
|
function Ne() {
|
|
1932
|
-
|
|
1932
|
+
ce.forEach((t) => t([...Q]));
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1935
|
-
Q = [...Q,
|
|
1934
|
+
function ts(t) {
|
|
1935
|
+
Q = [...Q, t], Ne();
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1938
|
-
Q = Q.filter((
|
|
1937
|
+
function rs(t) {
|
|
1938
|
+
Q = Q.filter((s) => s.id !== t), Ne();
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const
|
|
1942
|
-
|
|
1940
|
+
function Ks() {
|
|
1941
|
+
const t = (s, r = {}) => {
|
|
1942
|
+
ts({
|
|
1943
1943
|
id: `${Date.now()}-${Math.random()}`,
|
|
1944
|
-
message:
|
|
1944
|
+
message: s,
|
|
1945
1945
|
type: "default",
|
|
1946
1946
|
duration: 4e3,
|
|
1947
1947
|
...r
|
|
1948
1948
|
});
|
|
1949
1949
|
};
|
|
1950
|
-
return
|
|
1950
|
+
return t.success = (s, r) => t(s, { ...r, type: "success" }), t.error = (s, r) => t(s, { ...r, type: "error" }), t.warning = (s, r) => t(s, { ...r, type: "warning" }), { toast: t };
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const [r,
|
|
1954
|
-
|
|
1952
|
+
function ns({ data: t, onDismiss: s }) {
|
|
1953
|
+
const [r, a] = k(!1), o = N(null);
|
|
1954
|
+
R(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => n(), t.duration)), () => clearTimeout(o.current)), []);
|
|
1955
1955
|
function n() {
|
|
1956
|
-
|
|
1956
|
+
a(!1), setTimeout(() => s(t.id), 250);
|
|
1957
1957
|
}
|
|
1958
|
-
const i = ve[
|
|
1958
|
+
const i = ve[t.type] ?? ve.default;
|
|
1959
1959
|
return /* @__PURE__ */ e.jsxs(
|
|
1960
1960
|
"div",
|
|
1961
1961
|
{
|
|
1962
1962
|
className: [
|
|
1963
1963
|
"ds-toast",
|
|
1964
|
-
`ds-toast--${
|
|
1964
|
+
`ds-toast--${t.type}`,
|
|
1965
1965
|
r && "ds-toast--visible"
|
|
1966
1966
|
].filter(Boolean).join(" "),
|
|
1967
|
-
role:
|
|
1967
|
+
role: t.type === "error" ? "alert" : "status",
|
|
1968
1968
|
"aria-live": "polite",
|
|
1969
1969
|
children: [
|
|
1970
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
1971
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children:
|
|
1970
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: A[3], strokeWidth: 1.5 }) }),
|
|
1971
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: t.message }),
|
|
1972
1972
|
/* @__PURE__ */ e.jsx(
|
|
1973
1973
|
"button",
|
|
1974
1974
|
{
|
|
1975
1975
|
className: "ds-toast__close",
|
|
1976
1976
|
onClick: n,
|
|
1977
1977
|
"aria-label": "Закрыть",
|
|
1978
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1978
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: A[3], strokeWidth: 1.5 })
|
|
1979
1979
|
}
|
|
1980
1980
|
)
|
|
1981
1981
|
]
|
|
1982
1982
|
}
|
|
1983
1983
|
);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1986
|
-
const [
|
|
1987
|
-
return
|
|
1988
|
-
/* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${
|
|
1985
|
+
function Gs({ position: t = "bottom-right" }) {
|
|
1986
|
+
const [s, r] = k(() => [...Q]);
|
|
1987
|
+
return R(() => (ce.add(r), () => ce.delete(r)), []), !s.length || typeof document > "u" ? null : ae.createPortal(
|
|
1988
|
+
/* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(ns, { data: a, onDismiss: rs }, a.id)) }),
|
|
1989
1989
|
document.body
|
|
1990
1990
|
);
|
|
1991
1991
|
}
|
|
1992
|
-
const
|
|
1992
|
+
const as = {
|
|
1993
1993
|
running: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "info", children: "Running..." }),
|
|
1994
1994
|
success: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "success", children: "Done" }),
|
|
1995
1995
|
error: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "error", children: "Error" })
|
|
1996
1996
|
};
|
|
1997
|
-
function
|
|
1998
|
-
label:
|
|
1999
|
-
status:
|
|
1997
|
+
function Xs({
|
|
1998
|
+
label: t,
|
|
1999
|
+
status: s = "idle",
|
|
2000
2000
|
icon: r,
|
|
2001
|
-
badge:
|
|
2002
|
-
defaultExpanded:
|
|
2001
|
+
badge: a,
|
|
2002
|
+
defaultExpanded: o = !1,
|
|
2003
2003
|
expanded: n,
|
|
2004
2004
|
onToggle: i,
|
|
2005
|
-
padding:
|
|
2005
|
+
padding: c = "s",
|
|
2006
2006
|
children: m,
|
|
2007
2007
|
...u
|
|
2008
2008
|
}) {
|
|
2009
|
-
const f = `tc-body-${
|
|
2010
|
-
_ ? i == null || i(!n) : d((
|
|
2009
|
+
const f = `tc-body-${ke().replace(/:/g, "")}`, [x, d] = k(o), _ = n !== void 0, w = _ ? n : x, g = () => {
|
|
2010
|
+
_ ? i == null || i(!n) : d((y) => !y);
|
|
2011
2011
|
};
|
|
2012
|
-
return /* @__PURE__ */ e.jsxs(Le, { padding:
|
|
2012
|
+
return /* @__PURE__ */ e.jsxs(Le, { padding: c, ...u, children: [
|
|
2013
2013
|
/* @__PURE__ */ e.jsxs(
|
|
2014
2014
|
"button",
|
|
2015
2015
|
{
|
|
2016
2016
|
type: "button",
|
|
2017
2017
|
className: "ds-tool-card__header",
|
|
2018
|
-
onClick:
|
|
2018
|
+
onClick: g,
|
|
2019
2019
|
"aria-expanded": w,
|
|
2020
2020
|
"aria-controls": f,
|
|
2021
2021
|
children: [
|
|
2022
2022
|
/* @__PURE__ */ e.jsx(
|
|
2023
2023
|
je,
|
|
2024
2024
|
{
|
|
2025
|
-
size:
|
|
2025
|
+
size: A[1],
|
|
2026
2026
|
strokeWidth: 1.5,
|
|
2027
2027
|
className: `ds-tool-card__chevron${w ? " ds-tool-card__chevron--expanded" : ""}`
|
|
2028
2028
|
}
|
|
2029
2029
|
),
|
|
2030
2030
|
r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
|
|
2031
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children:
|
|
2032
|
-
|
|
2033
|
-
|
|
2031
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2032
|
+
as[s],
|
|
2033
|
+
a
|
|
2034
2034
|
]
|
|
2035
2035
|
}
|
|
2036
2036
|
),
|
|
2037
2037
|
w && /* @__PURE__ */ e.jsx("div", { id: f, className: "ds-tool-card__body", children: m })
|
|
2038
2038
|
] });
|
|
2039
2039
|
}
|
|
2040
|
-
function
|
|
2041
|
-
text:
|
|
2042
|
-
size:
|
|
2040
|
+
function Js({
|
|
2041
|
+
text: t,
|
|
2042
|
+
size: s = "xs",
|
|
2043
2043
|
timeout: r = 2e3,
|
|
2044
|
-
"aria-label":
|
|
2045
|
-
...
|
|
2044
|
+
"aria-label": a = "Copy to clipboard",
|
|
2045
|
+
...o
|
|
2046
2046
|
}) {
|
|
2047
|
-
const [n, i] = k(!1),
|
|
2048
|
-
navigator.clipboard.writeText(
|
|
2047
|
+
const [n, i] = k(!1), c = () => {
|
|
2048
|
+
navigator.clipboard.writeText(t).then(() => {
|
|
2049
2049
|
i(!0), setTimeout(() => i(!1), r);
|
|
2050
2050
|
});
|
|
2051
2051
|
};
|
|
@@ -2053,49 +2053,49 @@ function Jt({
|
|
|
2053
2053
|
_e,
|
|
2054
2054
|
{
|
|
2055
2055
|
variant: "ghost",
|
|
2056
|
-
size:
|
|
2057
|
-
icon: n ? /* @__PURE__ */ e.jsx(re, { size:
|
|
2058
|
-
"aria-label":
|
|
2059
|
-
onClick:
|
|
2060
|
-
...
|
|
2056
|
+
size: s,
|
|
2057
|
+
icon: n ? /* @__PURE__ */ e.jsx(re, { size: A[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Se, { size: A[1], strokeWidth: 1.5 }),
|
|
2058
|
+
"aria-label": a,
|
|
2059
|
+
onClick: c,
|
|
2060
|
+
...o
|
|
2061
2061
|
}
|
|
2062
2062
|
);
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2065
|
-
const [
|
|
2066
|
-
return
|
|
2067
|
-
|
|
2068
|
-
}, [
|
|
2069
|
-
|
|
2064
|
+
function Zs({ content: t, streaming: s = !1, ...r }) {
|
|
2065
|
+
const [a, o] = k(s);
|
|
2066
|
+
return R(() => {
|
|
2067
|
+
o(!!s);
|
|
2068
|
+
}, [s]), /* @__PURE__ */ e.jsx(
|
|
2069
|
+
Ve,
|
|
2070
2070
|
{
|
|
2071
|
-
expanded:
|
|
2072
|
-
onToggle:
|
|
2071
|
+
expanded: a,
|
|
2072
|
+
onToggle: o,
|
|
2073
2073
|
padding: "s",
|
|
2074
2074
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2075
|
-
/* @__PURE__ */ e.jsx(Ae, { size:
|
|
2075
|
+
/* @__PURE__ */ e.jsx(Ae, { size: A[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2076
2076
|
/* @__PURE__ */ e.jsx(Me, { secondary: !0, children: "Thinking" })
|
|
2077
2077
|
] }),
|
|
2078
2078
|
...r,
|
|
2079
2079
|
children: /* @__PURE__ */ e.jsxs(we, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2080
|
-
|
|
2081
|
-
|
|
2080
|
+
t,
|
|
2081
|
+
s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
|
|
2082
2082
|
] })
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
count:
|
|
2088
|
-
current:
|
|
2086
|
+
function Qs({
|
|
2087
|
+
count: t,
|
|
2088
|
+
current: s = 0,
|
|
2089
2089
|
done: r = [],
|
|
2090
|
-
onChange:
|
|
2091
|
-
showCounter:
|
|
2090
|
+
onChange: a,
|
|
2091
|
+
showCounter: o = !0,
|
|
2092
2092
|
className: n = "",
|
|
2093
2093
|
"aria-label": i = "Steps",
|
|
2094
|
-
...
|
|
2094
|
+
...c
|
|
2095
2095
|
}) {
|
|
2096
|
-
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...
|
|
2097
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length:
|
|
2098
|
-
const p = u ===
|
|
2096
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...c, children: [
|
|
2097
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (m, u) => {
|
|
2098
|
+
const p = u === s, f = r.includes(u) && !p, x = a && (u <= s || r.includes(u)), d = [
|
|
2099
2099
|
"ds-step-indicator__dot",
|
|
2100
2100
|
p && "ds-step-indicator__dot--active",
|
|
2101
2101
|
f && "ds-step-indicator__dot--done"
|
|
@@ -2108,78 +2108,139 @@ function Qt({
|
|
|
2108
2108
|
role: "tab",
|
|
2109
2109
|
"aria-selected": p,
|
|
2110
2110
|
"aria-label": `Step ${u + 1}`,
|
|
2111
|
-
disabled: !
|
|
2112
|
-
onClick: () =>
|
|
2111
|
+
disabled: !x || u === s,
|
|
2112
|
+
onClick: () => a == null ? void 0 : a(u),
|
|
2113
2113
|
children: f ? /* @__PURE__ */ e.jsx(re, { size: 8, strokeWidth: 3 }) : null
|
|
2114
2114
|
},
|
|
2115
2115
|
u
|
|
2116
2116
|
);
|
|
2117
2117
|
}) }),
|
|
2118
|
-
|
|
2119
|
-
|
|
2118
|
+
o && /* @__PURE__ */ e.jsxs(we, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2119
|
+
s + 1,
|
|
2120
2120
|
" / ",
|
|
2121
|
-
|
|
2121
|
+
t
|
|
2122
2122
|
] })
|
|
2123
2123
|
] });
|
|
2124
2124
|
}
|
|
2125
|
+
function et({
|
|
2126
|
+
content: t,
|
|
2127
|
+
isStreaming: s = !1,
|
|
2128
|
+
cursor: r = "line",
|
|
2129
|
+
onChunk: a,
|
|
2130
|
+
className: o = "",
|
|
2131
|
+
...n
|
|
2132
|
+
}) {
|
|
2133
|
+
const i = N(t);
|
|
2134
|
+
return R(() => {
|
|
2135
|
+
t !== i.current && (a == null || a(t), i.current = t);
|
|
2136
|
+
}, [t, a]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", o].filter(Boolean).join(" "), ...n, children: [
|
|
2137
|
+
t,
|
|
2138
|
+
s && r !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${r}`, "aria-hidden": "true" })
|
|
2139
|
+
] });
|
|
2140
|
+
}
|
|
2141
|
+
function st({
|
|
2142
|
+
role: t = "assistant",
|
|
2143
|
+
header: s,
|
|
2144
|
+
footer: r,
|
|
2145
|
+
attachments: a,
|
|
2146
|
+
isStreaming: o = !1,
|
|
2147
|
+
children: n,
|
|
2148
|
+
className: i = "",
|
|
2149
|
+
...c
|
|
2150
|
+
}) {
|
|
2151
|
+
const m = [
|
|
2152
|
+
"ds-chat-message",
|
|
2153
|
+
`ds-chat-message--${t}`,
|
|
2154
|
+
o && "ds-chat-message--streaming",
|
|
2155
|
+
i
|
|
2156
|
+
].filter(Boolean).join(" ");
|
|
2157
|
+
return t === "system" ? /* @__PURE__ */ e.jsx("div", { className: m, ...c, children: /* @__PURE__ */ e.jsx("span", { className: "ds-chat-message__system-label", children: n }) }) : t === "user" ? /* @__PURE__ */ e.jsxs("div", { className: m, ...c, children: [
|
|
2158
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
|
|
2159
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__bubble", children: n }),
|
|
2160
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
|
|
2161
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: m, ...c, children: [
|
|
2162
|
+
s && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__header", children: s }),
|
|
2163
|
+
a && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__attachments", children: a }),
|
|
2164
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__body", children: n }),
|
|
2165
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: r })
|
|
2166
|
+
] });
|
|
2167
|
+
}
|
|
2168
|
+
function tt(t, { containerRef: s, smartPause: r = !0 } = {}) {
|
|
2169
|
+
const a = N(!1), o = N(0);
|
|
2170
|
+
R(() => {
|
|
2171
|
+
const n = s == null ? void 0 : s.current;
|
|
2172
|
+
if (!n) return;
|
|
2173
|
+
const i = () => {
|
|
2174
|
+
const c = n.scrollHeight - n.scrollTop - n.clientHeight < 64;
|
|
2175
|
+
!c && n.scrollTop < o.current && (a.current = !0), c && (a.current = !1), o.current = n.scrollTop;
|
|
2176
|
+
};
|
|
2177
|
+
return n.addEventListener("scroll", i, { passive: !0 }), () => n.removeEventListener("scroll", i);
|
|
2178
|
+
}, [s]), R(() => {
|
|
2179
|
+
const n = s == null ? void 0 : s.current;
|
|
2180
|
+
n && (r && a.current || (n.scrollTop = n.scrollHeight));
|
|
2181
|
+
}, t);
|
|
2182
|
+
}
|
|
2125
2183
|
export {
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2184
|
+
Ve as Accordion,
|
|
2185
|
+
vs as Alert,
|
|
2186
|
+
qs as AnimatedNumber,
|
|
2187
|
+
Rs as Avatar,
|
|
2130
2188
|
ie as Badge,
|
|
2131
|
-
|
|
2132
|
-
|
|
2189
|
+
Cs as Banner,
|
|
2190
|
+
zs as Breadcrumb,
|
|
2133
2191
|
_e as Button,
|
|
2134
2192
|
Le as Card,
|
|
2135
|
-
|
|
2136
|
-
|
|
2193
|
+
st as ChatMessage,
|
|
2194
|
+
$s as Checkbox,
|
|
2195
|
+
_s as Code,
|
|
2137
2196
|
Fe as CodeAccordion,
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2197
|
+
Js as CopyButton,
|
|
2198
|
+
Vs as Drawer,
|
|
2199
|
+
be as DrawerFooter,
|
|
2200
|
+
Us as Dropdown,
|
|
2201
|
+
Ls as EmptyState,
|
|
2202
|
+
Ms as FormField,
|
|
2203
|
+
ms as H1,
|
|
2204
|
+
ps as H2,
|
|
2205
|
+
hs as H3,
|
|
2206
|
+
xs as H4,
|
|
2207
|
+
Hs as InView,
|
|
2208
|
+
cs as Input,
|
|
2209
|
+
ws as Link,
|
|
2210
|
+
js as Modal,
|
|
2211
|
+
xe as ModalFooter,
|
|
2212
|
+
bs as P1,
|
|
2154
2213
|
Me as P2,
|
|
2155
2214
|
we as P3,
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2215
|
+
Fs as Pagination,
|
|
2216
|
+
Ys as ProgressBar,
|
|
2217
|
+
Ts as Radio,
|
|
2218
|
+
Zs as ReasoningBlock,
|
|
2219
|
+
Es as SegmentedControl,
|
|
2220
|
+
us as Select,
|
|
2162
2221
|
Ye as Skeleton,
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2222
|
+
Pe as Spinner,
|
|
2223
|
+
Ws as Stat,
|
|
2224
|
+
Qs as StepIndicator,
|
|
2225
|
+
fs as Stepper,
|
|
2226
|
+
et as StreamingText,
|
|
2227
|
+
ys as Tab,
|
|
2228
|
+
Is as Table,
|
|
2229
|
+
As as TableBody,
|
|
2230
|
+
Ss as TableHead,
|
|
2231
|
+
Bs as TableRow,
|
|
2232
|
+
Ds as TableSubheaderRow,
|
|
2233
|
+
Ns as Tabs,
|
|
2234
|
+
Os as Td,
|
|
2235
|
+
ds as Textarea,
|
|
2236
|
+
Ps as Th,
|
|
2237
|
+
Gs as ToastContainer,
|
|
2238
|
+
gs as Toggle,
|
|
2239
|
+
Xs as ToolCallCard,
|
|
2240
|
+
ks as Tooltip,
|
|
2241
|
+
A as iconSizes,
|
|
2242
|
+
es as useAnimatedNumber,
|
|
2243
|
+
ss as useInView,
|
|
2244
|
+
tt as useStreamScroll,
|
|
2245
|
+
Ks as useToast
|
|
2185
2246
|
};
|