@donkit-ai/design-system 1.0.7 → 1.0.9
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/index.cjs.js +3 -3
- package/dist/index.es.js +416 -411
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import A, { useState as T, useRef as L, useEffect as B } from "react";
|
|
2
|
-
import
|
|
2
|
+
import J from "react-dom";
|
|
3
3
|
import { ChevronDown as K, Minus as ve, Plus as je, XCircle as fe, AlertTriangle as me, CheckCircle as pe, Info as be, X as se, Check as _e, ChevronUp as we, ChevronsUpDown as Ne } from "lucide-react";
|
|
4
|
-
const
|
|
4
|
+
const g = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
7
7
|
3: 24,
|
|
@@ -18,21 +18,21 @@ var ee = { exports: {} }, G = {};
|
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
21
|
+
var ce;
|
|
22
22
|
function ye() {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
function r(
|
|
23
|
+
if (ce) return G;
|
|
24
|
+
ce = 1;
|
|
25
|
+
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
26
|
+
function r(l, n, a) {
|
|
27
27
|
var i = null;
|
|
28
28
|
if (a !== void 0 && (i = "" + a), n.key !== void 0 && (i = "" + n.key), "key" in n) {
|
|
29
29
|
a = {};
|
|
30
|
-
for (var
|
|
31
|
-
|
|
30
|
+
for (var c in n)
|
|
31
|
+
c !== "key" && (a[c] = n[c]);
|
|
32
32
|
} else a = n;
|
|
33
33
|
return n = a.ref, {
|
|
34
|
-
$$typeof:
|
|
35
|
-
type:
|
|
34
|
+
$$typeof: t,
|
|
35
|
+
type: l,
|
|
36
36
|
key: i,
|
|
37
37
|
ref: n !== void 0 ? n : null,
|
|
38
38
|
props: a
|
|
@@ -53,7 +53,7 @@ var q = {};
|
|
|
53
53
|
var ie;
|
|
54
54
|
function Ee() {
|
|
55
55
|
return ie || (ie = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
|
-
function
|
|
56
|
+
function t(o) {
|
|
57
57
|
if (o == null) return null;
|
|
58
58
|
if (typeof o == "function")
|
|
59
59
|
return o.$$typeof === D ? null : o.displayName || o.name || null;
|
|
@@ -61,7 +61,7 @@ function Ee() {
|
|
|
61
61
|
switch (o) {
|
|
62
62
|
case k:
|
|
63
63
|
return "Fragment";
|
|
64
|
-
case
|
|
64
|
+
case S:
|
|
65
65
|
return "Profiler";
|
|
66
66
|
case $:
|
|
67
67
|
return "StrictMode";
|
|
@@ -86,11 +86,11 @@ function Ee() {
|
|
|
86
86
|
var h = o.render;
|
|
87
87
|
return o = o.displayName, o || (o = h.displayName || h.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
88
88
|
case M:
|
|
89
|
-
return h = o.displayName || null, h !== null ? h :
|
|
89
|
+
return h = o.displayName || null, h !== null ? h : t(o.type) || "Memo";
|
|
90
90
|
case U:
|
|
91
91
|
h = o._payload, o = o._init;
|
|
92
92
|
try {
|
|
93
|
-
return
|
|
93
|
+
return t(o(h));
|
|
94
94
|
} catch {
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -116,12 +116,12 @@ function Ee() {
|
|
|
116
116
|
), e(o);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function l(o) {
|
|
120
120
|
if (o === k) return "<>";
|
|
121
121
|
if (typeof o == "object" && o !== null && o.$$typeof === U)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
124
|
-
var h =
|
|
124
|
+
var h = t(o);
|
|
125
125
|
return h ? "<" + h + ">" : "<...>";
|
|
126
126
|
} catch {
|
|
127
127
|
return "<...>";
|
|
@@ -141,7 +141,7 @@ function Ee() {
|
|
|
141
141
|
}
|
|
142
142
|
return o.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function c(o, h) {
|
|
145
145
|
function N() {
|
|
146
146
|
H || (H = !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)",
|
|
@@ -154,12 +154,12 @@ function Ee() {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
function p() {
|
|
157
|
-
var o =
|
|
157
|
+
var o = t(this.type);
|
|
158
158
|
return ne[o] || (ne[o] = !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
|
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
161
161
|
}
|
|
162
|
-
function f(o, h, N, y,
|
|
162
|
+
function f(o, h, N, y, C, Z) {
|
|
163
163
|
var E = N.ref;
|
|
164
164
|
return o = {
|
|
165
165
|
$$typeof: j,
|
|
@@ -184,7 +184,7 @@ function Ee() {
|
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: C
|
|
188
188
|
}), Object.defineProperty(o, "_debugTask", {
|
|
189
189
|
configurable: !1,
|
|
190
190
|
enumerable: !1,
|
|
@@ -192,7 +192,7 @@ function Ee() {
|
|
|
192
192
|
value: Z
|
|
193
193
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
194
194
|
}
|
|
195
|
-
function d(o, h, N, y,
|
|
195
|
+
function d(o, h, N, y, C, Z) {
|
|
196
196
|
var E = h.children;
|
|
197
197
|
if (E !== void 0)
|
|
198
198
|
if (y)
|
|
@@ -206,11 +206,11 @@ function Ee() {
|
|
|
206
206
|
);
|
|
207
207
|
else u(E);
|
|
208
208
|
if (X.call(h, "key")) {
|
|
209
|
-
E =
|
|
209
|
+
E = t(o);
|
|
210
210
|
var Y = Object.keys(h).filter(function(xe) {
|
|
211
211
|
return xe !== "key";
|
|
212
212
|
});
|
|
213
|
-
y = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
213
|
+
y = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", le[E + y] || (Y = 0 < Y.length ? "{" + Y.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} />
|
|
@@ -221,14 +221,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
221
221
|
E,
|
|
222
222
|
Y,
|
|
223
223
|
E
|
|
224
|
-
),
|
|
224
|
+
), le[E + y] = !0);
|
|
225
225
|
}
|
|
226
226
|
if (E = null, N !== void 0 && (r(N), E = "" + N), i(h) && (r(h.key), E = "" + h.key), "key" in h) {
|
|
227
227
|
N = {};
|
|
228
228
|
for (var Q in h)
|
|
229
229
|
Q !== "key" && (N[Q] = h[Q]);
|
|
230
230
|
} else N = h;
|
|
231
|
-
return E &&
|
|
231
|
+
return E && c(
|
|
232
232
|
N,
|
|
233
233
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
234
234
|
), f(
|
|
@@ -236,7 +236,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
236
236
|
E,
|
|
237
237
|
N,
|
|
238
238
|
n(),
|
|
239
|
-
|
|
239
|
+
C,
|
|
240
240
|
Z
|
|
241
241
|
);
|
|
242
242
|
}
|
|
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
function x(o) {
|
|
247
247
|
return typeof o == "object" && o !== null && o.$$typeof === j;
|
|
248
248
|
}
|
|
249
|
-
var b = A, j = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"),
|
|
249
|
+
var b = A, j = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), F = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, re = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
b = {
|
|
@@ -257,7 +257,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
257
257
|
var H, ne = {}, ae = b.react_stack_bottom_frame.bind(
|
|
258
258
|
b,
|
|
259
259
|
a
|
|
260
|
-
)(), oe = W(
|
|
260
|
+
)(), oe = W(l(a)), le = {};
|
|
261
261
|
q.Fragment = k, q.jsx = function(o, h, N) {
|
|
262
262
|
var y = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return d(
|
|
@@ -266,7 +266,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
266
266
|
N,
|
|
267
267
|
!1,
|
|
268
268
|
y ? Error("react-stack-top-frame") : ae,
|
|
269
|
-
y ? W(
|
|
269
|
+
y ? W(l(o)) : oe
|
|
270
270
|
);
|
|
271
271
|
}, q.jsxs = function(o, h, N) {
|
|
272
272
|
var y = 1e4 > F.recentlyCreatedOwnerStacks++;
|
|
@@ -276,36 +276,36 @@ React keys must be passed directly to JSX without using spread:
|
|
|
276
276
|
N,
|
|
277
277
|
!0,
|
|
278
278
|
y ? Error("react-stack-top-frame") : ae,
|
|
279
|
-
y ? W(
|
|
279
|
+
y ? W(l(o)) : oe
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
282
|
}()), q;
|
|
283
283
|
}
|
|
284
284
|
process.env.NODE_ENV === "production" ? ee.exports = ye() : ee.exports = Ee();
|
|
285
|
-
var
|
|
285
|
+
var s = ee.exports;
|
|
286
286
|
function ke({
|
|
287
|
-
children:
|
|
287
|
+
children: t,
|
|
288
288
|
variant: e = "primary",
|
|
289
289
|
size: r = "m",
|
|
290
|
-
fullWidth:
|
|
290
|
+
fullWidth: l = !1,
|
|
291
291
|
icon: n,
|
|
292
292
|
disabled: a = !1,
|
|
293
293
|
onClick: i,
|
|
294
|
-
type:
|
|
294
|
+
type: c = "button",
|
|
295
295
|
href: p,
|
|
296
296
|
"aria-label": f,
|
|
297
297
|
...d
|
|
298
298
|
}) {
|
|
299
|
-
const u = n && !
|
|
299
|
+
const u = n && !t, x = [
|
|
300
300
|
"ds-button",
|
|
301
301
|
`ds-button--${e}`,
|
|
302
302
|
`ds-button--${r}`,
|
|
303
|
-
|
|
303
|
+
l && "ds-button--full",
|
|
304
304
|
u && "ds-button--icon-only"
|
|
305
|
-
].filter(Boolean).join(" "), b = /* @__PURE__ */
|
|
306
|
-
n && !u && /* @__PURE__ */
|
|
307
|
-
|
|
308
|
-
u && /* @__PURE__ */
|
|
305
|
+
].filter(Boolean).join(" "), b = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
306
|
+
n && !u && /* @__PURE__ */ s.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n }),
|
|
307
|
+
t,
|
|
308
|
+
u && /* @__PURE__ */ s.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n })
|
|
309
309
|
] });
|
|
310
310
|
if (p) {
|
|
311
311
|
const j = (v) => {
|
|
@@ -315,7 +315,7 @@ function ke({
|
|
|
315
315
|
}
|
|
316
316
|
v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), i == null || i(v));
|
|
317
317
|
};
|
|
318
|
-
return /* @__PURE__ */
|
|
318
|
+
return /* @__PURE__ */ s.jsx(
|
|
319
319
|
"a",
|
|
320
320
|
{
|
|
321
321
|
className: x,
|
|
@@ -328,10 +328,10 @@ function ke({
|
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
return /* @__PURE__ */
|
|
331
|
+
return /* @__PURE__ */ s.jsx(
|
|
332
332
|
"button",
|
|
333
333
|
{
|
|
334
|
-
type:
|
|
334
|
+
type: c,
|
|
335
335
|
className: x,
|
|
336
336
|
disabled: a,
|
|
337
337
|
onClick: i,
|
|
@@ -341,40 +341,40 @@ function ke({
|
|
|
341
341
|
}
|
|
342
342
|
);
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
label:
|
|
344
|
+
function Me({
|
|
345
|
+
label: t,
|
|
346
346
|
error: e,
|
|
347
347
|
hint: r,
|
|
348
|
-
fullWidth:
|
|
348
|
+
fullWidth: l = !0,
|
|
349
349
|
icon: n,
|
|
350
350
|
iconRight: a,
|
|
351
351
|
onIconRightClick: i,
|
|
352
|
-
size:
|
|
352
|
+
size: c = "m",
|
|
353
353
|
disabled: p,
|
|
354
354
|
id: f,
|
|
355
355
|
...d
|
|
356
356
|
}) {
|
|
357
357
|
const u = f || `input-${A.useId()}`, x = r ? `${u}-hint` : void 0, b = e ? `${u}-error` : void 0, j = b || x;
|
|
358
|
-
return /* @__PURE__ */
|
|
359
|
-
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
n && /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-input-wrapper ${l ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""}`, children: [
|
|
359
|
+
t && /* @__PURE__ */ s.jsx("label", { className: "ds-input-label", htmlFor: u, children: t }),
|
|
360
|
+
/* @__PURE__ */ s.jsxs("div", { className: "ds-input-container", children: [
|
|
361
|
+
n && /* @__PURE__ */ s.jsx("span", { className: `ds-input-icon ds-input-icon--${c}`, "aria-hidden": "true", children: n }),
|
|
362
|
+
/* @__PURE__ */ s.jsx(
|
|
363
363
|
"input",
|
|
364
364
|
{
|
|
365
365
|
id: u,
|
|
366
|
-
className: `ds-input ds-input--${
|
|
366
|
+
className: `ds-input ds-input--${c} ${n ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${e ? "ds-input--error" : ""}`,
|
|
367
367
|
disabled: p,
|
|
368
368
|
"aria-invalid": e ? "true" : "false",
|
|
369
369
|
"aria-describedby": j,
|
|
370
370
|
...d
|
|
371
371
|
}
|
|
372
372
|
),
|
|
373
|
-
a && /* @__PURE__ */
|
|
373
|
+
a && /* @__PURE__ */ s.jsx(
|
|
374
374
|
"button",
|
|
375
375
|
{
|
|
376
376
|
type: "button",
|
|
377
|
-
className: `ds-input-icon-right ds-input-icon-right--${
|
|
377
|
+
className: `ds-input-icon-right ds-input-icon-right--${c}`,
|
|
378
378
|
onClick: i,
|
|
379
379
|
tabIndex: -1,
|
|
380
380
|
"aria-label": "Toggle visibility",
|
|
@@ -382,30 +382,30 @@ function De({
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
] }),
|
|
385
|
-
r && !e && /* @__PURE__ */
|
|
386
|
-
e && /* @__PURE__ */
|
|
385
|
+
r && !e && /* @__PURE__ */ s.jsx("span", { id: x, className: "ds-input-hint", children: r }),
|
|
386
|
+
e && /* @__PURE__ */ s.jsx("span", { id: b, className: "ds-input-error", role: "alert", children: e })
|
|
387
387
|
] });
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
label:
|
|
389
|
+
function Fe({
|
|
390
|
+
label: t,
|
|
391
391
|
error: e,
|
|
392
392
|
hint: r,
|
|
393
|
-
fullWidth:
|
|
393
|
+
fullWidth: l = !0,
|
|
394
394
|
size: n = "m",
|
|
395
395
|
disabled: a,
|
|
396
396
|
id: i,
|
|
397
|
-
resize:
|
|
397
|
+
resize: c = !0,
|
|
398
398
|
rows: p = 3,
|
|
399
399
|
...f
|
|
400
400
|
}) {
|
|
401
401
|
const d = i || `textarea-${A.useId()}`, u = r ? `${d}-hint` : void 0, x = e ? `${d}-error` : void 0, b = x || u;
|
|
402
|
-
return /* @__PURE__ */
|
|
403
|
-
|
|
404
|
-
/* @__PURE__ */
|
|
402
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-textarea-wrapper ${l ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
403
|
+
t && /* @__PURE__ */ s.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
|
|
404
|
+
/* @__PURE__ */ s.jsx(
|
|
405
405
|
"textarea",
|
|
406
406
|
{
|
|
407
407
|
id: d,
|
|
408
|
-
className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${
|
|
408
|
+
className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${c ? "" : "ds-textarea--no-resize"}`,
|
|
409
409
|
disabled: a,
|
|
410
410
|
"aria-invalid": e ? "true" : "false",
|
|
411
411
|
"aria-describedby": b,
|
|
@@ -413,24 +413,24 @@ function Me({
|
|
|
413
413
|
...f
|
|
414
414
|
}
|
|
415
415
|
),
|
|
416
|
-
r && !e && /* @__PURE__ */
|
|
417
|
-
e && /* @__PURE__ */
|
|
416
|
+
r && !e && /* @__PURE__ */ s.jsx("span", { id: u, className: "ds-textarea-hint", children: r }),
|
|
417
|
+
e && /* @__PURE__ */ s.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: e })
|
|
418
418
|
] });
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
label:
|
|
420
|
+
function We({
|
|
421
|
+
label: t,
|
|
422
422
|
value: e,
|
|
423
423
|
onChange: r,
|
|
424
|
-
options:
|
|
424
|
+
options: l = [],
|
|
425
425
|
placeholder: n = "Select option",
|
|
426
426
|
error: a,
|
|
427
427
|
fullWidth: i = !0,
|
|
428
|
-
size:
|
|
428
|
+
size: c = "m",
|
|
429
429
|
disabled: p = !1,
|
|
430
430
|
id: f,
|
|
431
431
|
...d
|
|
432
432
|
}) {
|
|
433
|
-
const [u, x] = T(!1), [b, j] = T({}), [v, k] = T("down"), $ = L(null),
|
|
433
|
+
const [u, x] = T(!1), [b, j] = T({}), [v, k] = T("down"), $ = L(null), S = L(null), m = f || `select-${A.useId()}`, _ = `${m}-label`, R = a ? `${m}-error` : void 0, I = () => {
|
|
434
434
|
var H;
|
|
435
435
|
const w = (H = $.current) == null ? void 0 : H.getBoundingClientRect();
|
|
436
436
|
if (!w) return;
|
|
@@ -446,25 +446,25 @@ function Fe({
|
|
|
446
446
|
};
|
|
447
447
|
}, [u]), B(() => {
|
|
448
448
|
const w = (D) => {
|
|
449
|
-
$.current && !$.current.contains(D.target) &&
|
|
449
|
+
$.current && !$.current.contains(D.target) && S.current && !S.current.contains(D.target) && x(!1);
|
|
450
450
|
};
|
|
451
451
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
452
452
|
}, []);
|
|
453
|
-
const P =
|
|
453
|
+
const P = l.find((w) => w.value === e), M = c === "xs" ? g[1] : c === "small" ? g[2] : g[3], U = u && /* @__PURE__ */ s.jsx(
|
|
454
454
|
"div",
|
|
455
455
|
{
|
|
456
|
-
ref:
|
|
456
|
+
ref: S,
|
|
457
457
|
role: "listbox",
|
|
458
|
-
"aria-labelledby":
|
|
459
|
-
className: `ds-select-dropdown ds-select-dropdown--${
|
|
458
|
+
"aria-labelledby": t ? _ : void 0,
|
|
459
|
+
className: `ds-select-dropdown ds-select-dropdown--${c} ds-select-dropdown--${v}`,
|
|
460
460
|
style: b,
|
|
461
|
-
children:
|
|
461
|
+
children: l.map((w) => /* @__PURE__ */ s.jsx(
|
|
462
462
|
"button",
|
|
463
463
|
{
|
|
464
464
|
type: "button",
|
|
465
465
|
role: "option",
|
|
466
466
|
"aria-selected": e === w.value,
|
|
467
|
-
className: `ds-select-option ds-select-option--${
|
|
467
|
+
className: `ds-select-option ds-select-option--${c} ${e === w.value ? "ds-select-option--selected" : ""}`,
|
|
468
468
|
onClick: () => {
|
|
469
469
|
r == null || r(w.value), x(!1);
|
|
470
470
|
},
|
|
@@ -474,9 +474,9 @@ function Fe({
|
|
|
474
474
|
))
|
|
475
475
|
}
|
|
476
476
|
);
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
|
|
479
|
-
/* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
478
|
+
t && /* @__PURE__ */ s.jsx("label", { id: _, className: "ds-select-label", children: t }),
|
|
479
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-select-container", ref: $, children: /* @__PURE__ */ s.jsxs(
|
|
480
480
|
"button",
|
|
481
481
|
{
|
|
482
482
|
type: "button",
|
|
@@ -484,16 +484,16 @@ function Fe({
|
|
|
484
484
|
role: "combobox",
|
|
485
485
|
"aria-haspopup": "listbox",
|
|
486
486
|
"aria-expanded": u,
|
|
487
|
-
"aria-labelledby":
|
|
487
|
+
"aria-labelledby": t ? _ : void 0,
|
|
488
488
|
"aria-invalid": a ? "true" : "false",
|
|
489
489
|
"aria-describedby": R,
|
|
490
|
-
className: `ds-select-trigger ds-select-trigger--${
|
|
490
|
+
className: `ds-select-trigger ds-select-trigger--${c} ${a ? "ds-select-trigger--error" : ""}`,
|
|
491
491
|
onClick: () => !p && x(!u),
|
|
492
492
|
disabled: p,
|
|
493
493
|
...d,
|
|
494
494
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ s.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || n }),
|
|
496
|
+
/* @__PURE__ */ s.jsx(
|
|
497
497
|
K,
|
|
498
498
|
{
|
|
499
499
|
size: M,
|
|
@@ -505,108 +505,108 @@ function Fe({
|
|
|
505
505
|
]
|
|
506
506
|
}
|
|
507
507
|
) }),
|
|
508
|
-
a && /* @__PURE__ */
|
|
509
|
-
typeof document < "u" &&
|
|
508
|
+
a && /* @__PURE__ */ s.jsx("span", { id: R, className: "ds-select-error", role: "alert", children: a }),
|
|
509
|
+
typeof document < "u" && J.createPortal(U, document.body)
|
|
510
510
|
] });
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
label:
|
|
512
|
+
function Ye({
|
|
513
|
+
label: t,
|
|
514
514
|
value: e = 0,
|
|
515
515
|
onChange: r,
|
|
516
|
-
min:
|
|
516
|
+
min: l = 0,
|
|
517
517
|
max: n = 100,
|
|
518
518
|
step: a = 1,
|
|
519
519
|
size: i = "m",
|
|
520
|
-
disabled:
|
|
520
|
+
disabled: c = !1,
|
|
521
521
|
hint: p,
|
|
522
522
|
error: f,
|
|
523
523
|
...d
|
|
524
524
|
}) {
|
|
525
525
|
const u = () => {
|
|
526
|
-
if (
|
|
526
|
+
if (c) return;
|
|
527
527
|
const $ = Math.min(Number(e) + a, n);
|
|
528
528
|
r == null || r($);
|
|
529
529
|
}, x = () => {
|
|
530
|
-
if (
|
|
531
|
-
const $ = Math.max(Number(e) - a,
|
|
530
|
+
if (c) return;
|
|
531
|
+
const $ = Math.max(Number(e) - a, l);
|
|
532
532
|
r == null || r($);
|
|
533
533
|
}, b = ($) => {
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
537
|
-
r == null || r(
|
|
534
|
+
if (c) return;
|
|
535
|
+
const S = $.target.value;
|
|
536
|
+
if (S === "") {
|
|
537
|
+
r == null || r(l);
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const m = Number(
|
|
540
|
+
const m = Number(S);
|
|
541
541
|
if (!isNaN(m)) {
|
|
542
|
-
const _ = Math.min(Math.max(m,
|
|
542
|
+
const _ = Math.min(Math.max(m, l), n);
|
|
543
543
|
r == null || r(_);
|
|
544
544
|
}
|
|
545
545
|
}, j = [
|
|
546
546
|
"ds-stepper-wrapper",
|
|
547
|
-
|
|
547
|
+
c && "ds-stepper-wrapper--disabled",
|
|
548
548
|
f && "ds-stepper-wrapper--error"
|
|
549
549
|
].filter(Boolean).join(" "), v = [
|
|
550
550
|
"ds-stepper",
|
|
551
551
|
`ds-stepper--${i}`,
|
|
552
|
-
|
|
553
|
-
].filter(Boolean).join(" "), k = i === "xs" ?
|
|
554
|
-
return /* @__PURE__ */
|
|
555
|
-
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
552
|
+
c && "ds-stepper--disabled"
|
|
553
|
+
].filter(Boolean).join(" "), k = i === "xs" ? g[1] : i === "small" ? g[2] : g[3];
|
|
554
|
+
return /* @__PURE__ */ s.jsxs("div", { className: j, children: [
|
|
555
|
+
t && /* @__PURE__ */ s.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
556
|
+
/* @__PURE__ */ s.jsxs("div", { className: v, children: [
|
|
557
|
+
/* @__PURE__ */ s.jsx(
|
|
558
558
|
"button",
|
|
559
559
|
{
|
|
560
560
|
type: "button",
|
|
561
561
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
562
562
|
onClick: x,
|
|
563
|
-
disabled:
|
|
563
|
+
disabled: c || e <= l,
|
|
564
564
|
"aria-label": "Decrease",
|
|
565
|
-
children: /* @__PURE__ */
|
|
565
|
+
children: /* @__PURE__ */ s.jsx(ve, { size: k, strokeWidth: 1.5 })
|
|
566
566
|
}
|
|
567
567
|
),
|
|
568
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ s.jsx(
|
|
569
569
|
"input",
|
|
570
570
|
{
|
|
571
571
|
type: "number",
|
|
572
572
|
className: "ds-stepper-input",
|
|
573
573
|
value: e,
|
|
574
574
|
onChange: b,
|
|
575
|
-
min:
|
|
575
|
+
min: l,
|
|
576
576
|
max: n,
|
|
577
577
|
step: a,
|
|
578
|
-
disabled:
|
|
578
|
+
disabled: c,
|
|
579
579
|
...d
|
|
580
580
|
}
|
|
581
581
|
),
|
|
582
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ s.jsx(
|
|
583
583
|
"button",
|
|
584
584
|
{
|
|
585
585
|
type: "button",
|
|
586
586
|
className: "ds-stepper-button ds-stepper-button--plus",
|
|
587
587
|
onClick: u,
|
|
588
|
-
disabled:
|
|
588
|
+
disabled: c || e >= n,
|
|
589
589
|
"aria-label": "Increase",
|
|
590
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ s.jsx(je, { size: k, strokeWidth: 1.5 })
|
|
591
591
|
}
|
|
592
592
|
)
|
|
593
593
|
] }),
|
|
594
|
-
p && !f && /* @__PURE__ */
|
|
595
|
-
f && /* @__PURE__ */
|
|
594
|
+
p && !f && /* @__PURE__ */ s.jsx("div", { className: "ds-stepper-hint", children: p }),
|
|
595
|
+
f && /* @__PURE__ */ s.jsx("div", { className: "ds-stepper-error", children: f })
|
|
596
596
|
] });
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
children:
|
|
598
|
+
function ze({
|
|
599
|
+
children: t,
|
|
600
600
|
padding: e = "m",
|
|
601
601
|
variant: r = "info",
|
|
602
|
-
hover:
|
|
602
|
+
hover: l = !1,
|
|
603
603
|
// deprecated, use variant="interactive"
|
|
604
604
|
onClick: n,
|
|
605
605
|
href: a,
|
|
606
606
|
disabled: i = !1,
|
|
607
|
-
...
|
|
607
|
+
...c
|
|
608
608
|
}) {
|
|
609
|
-
const f = (
|
|
609
|
+
const f = (l ? "interactive" : r) === "interactive" || n || a, d = [
|
|
610
610
|
"ds-card",
|
|
611
611
|
`ds-card--${e}`,
|
|
612
612
|
f && "ds-card--interactive"
|
|
@@ -619,15 +619,15 @@ function Ye({
|
|
|
619
619
|
}
|
|
620
620
|
j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), n == null || n(j));
|
|
621
621
|
};
|
|
622
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ s.jsx(
|
|
623
623
|
"a",
|
|
624
624
|
{
|
|
625
625
|
className: d,
|
|
626
626
|
href: i ? void 0 : a,
|
|
627
627
|
onClick: b,
|
|
628
628
|
"aria-disabled": i ? "true" : void 0,
|
|
629
|
-
...
|
|
630
|
-
children:
|
|
629
|
+
...c,
|
|
630
|
+
children: t
|
|
631
631
|
}
|
|
632
632
|
);
|
|
633
633
|
}
|
|
@@ -636,51 +636,51 @@ function Ye({
|
|
|
636
636
|
onClick: n,
|
|
637
637
|
disabled: i
|
|
638
638
|
} : {};
|
|
639
|
-
return /* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ s.jsx(
|
|
640
640
|
u,
|
|
641
641
|
{
|
|
642
642
|
className: d,
|
|
643
643
|
role: f && !n ? "article" : void 0,
|
|
644
644
|
...x,
|
|
645
|
-
...
|
|
646
|
-
children:
|
|
645
|
+
...c,
|
|
646
|
+
children: t
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
651
|
-
return /* @__PURE__ */
|
|
650
|
+
function Ve({ children: t, ...e }) {
|
|
651
|
+
return /* @__PURE__ */ s.jsx("h1", { className: "ds-h1", ...e, children: t });
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
return /* @__PURE__ */
|
|
653
|
+
function Ue({ children: t, ...e }) {
|
|
654
|
+
return /* @__PURE__ */ s.jsx("h2", { className: "ds-h2", ...e, children: t });
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return /* @__PURE__ */
|
|
656
|
+
function He({ children: t, ...e }) {
|
|
657
|
+
return /* @__PURE__ */ s.jsx("h3", { className: "ds-h3", ...e, children: t });
|
|
658
658
|
}
|
|
659
|
-
function
|
|
660
|
-
return /* @__PURE__ */
|
|
659
|
+
function Ge({ children: t, ...e }) {
|
|
660
|
+
return /* @__PURE__ */ s.jsx("h4", { className: "ds-h4", ...e, children: t });
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return /* @__PURE__ */
|
|
662
|
+
function qe({ children: t, secondary: e = !1, ...r }) {
|
|
663
|
+
return /* @__PURE__ */ s.jsx("p", { className: `ds-p1 ${e ? "ds-p1--secondary" : ""}`, ...r, children: t });
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return /* @__PURE__ */
|
|
665
|
+
function Xe({ children: t, secondary: e = !1, ...r }) {
|
|
666
|
+
return /* @__PURE__ */ s.jsx("p", { className: `ds-p2 ${e ? "ds-p2--secondary" : ""}`, ...r, children: t });
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return /* @__PURE__ */
|
|
668
|
+
function Ce({ children: t, secondary: e = !1, ...r }) {
|
|
669
|
+
return /* @__PURE__ */ s.jsx("p", { className: `ds-p3 ${e ? "ds-p3--secondary" : ""}`, ...r, children: t });
|
|
670
670
|
}
|
|
671
671
|
function Je({
|
|
672
|
-
children:
|
|
672
|
+
children: t,
|
|
673
673
|
variant: e = "default",
|
|
674
674
|
size: r = "m",
|
|
675
|
-
role:
|
|
675
|
+
role: l,
|
|
676
676
|
...n
|
|
677
677
|
}) {
|
|
678
678
|
const a = [
|
|
679
679
|
"ds-badge",
|
|
680
680
|
`ds-badge--${e}`,
|
|
681
681
|
`ds-badge--${r}`
|
|
682
|
-
].filter(Boolean).join(" "), i =
|
|
683
|
-
return /* @__PURE__ */
|
|
682
|
+
].filter(Boolean).join(" "), i = l || (["info", "success", "warning", "error"].includes(e) ? "status" : void 0);
|
|
683
|
+
return /* @__PURE__ */ s.jsx("span", { className: a, role: i, ...n, children: t });
|
|
684
684
|
}
|
|
685
685
|
const $e = {
|
|
686
686
|
info: be,
|
|
@@ -688,38 +688,38 @@ const $e = {
|
|
|
688
688
|
warning: me,
|
|
689
689
|
error: fe
|
|
690
690
|
};
|
|
691
|
-
function
|
|
692
|
-
children:
|
|
691
|
+
function Ke({
|
|
692
|
+
children: t,
|
|
693
693
|
variant: e = "info",
|
|
694
694
|
title: r,
|
|
695
|
-
onClose:
|
|
695
|
+
onClose: l,
|
|
696
696
|
role: n,
|
|
697
697
|
...a
|
|
698
698
|
}) {
|
|
699
|
-
const i = $e[e],
|
|
700
|
-
return /* @__PURE__ */
|
|
701
|
-
i && /* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
r && /* @__PURE__ */
|
|
704
|
-
|
|
699
|
+
const i = $e[e], c = n || (e === "error" ? "alert" : "status");
|
|
700
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-alert ds-alert--${e} ${r ? "" : "ds-alert--no-title"}`, role: c, ...a, children: [
|
|
701
|
+
i && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ s.jsx(i, { size: g[3], strokeWidth: 1.5 }) }),
|
|
702
|
+
/* @__PURE__ */ s.jsxs("div", { className: "ds-alert__content", children: [
|
|
703
|
+
r && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__title", children: r }),
|
|
704
|
+
t && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__message", children: t })
|
|
705
705
|
] }),
|
|
706
|
-
|
|
706
|
+
l && /* @__PURE__ */ s.jsx(
|
|
707
707
|
"button",
|
|
708
708
|
{
|
|
709
709
|
type: "button",
|
|
710
710
|
className: "ds-alert__close",
|
|
711
|
-
onClick:
|
|
711
|
+
onClick: l,
|
|
712
712
|
"aria-label": "Close alert",
|
|
713
|
-
children: /* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ s.jsx(se, { size: g[3], strokeWidth: 1.5 })
|
|
714
714
|
}
|
|
715
715
|
)
|
|
716
716
|
] });
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
children:
|
|
718
|
+
function Ze({
|
|
719
|
+
children: t,
|
|
720
720
|
title: e,
|
|
721
721
|
onClose: r,
|
|
722
|
-
size:
|
|
722
|
+
size: l = "m",
|
|
723
723
|
...n
|
|
724
724
|
}) {
|
|
725
725
|
const a = L(null), i = A.useId();
|
|
@@ -733,57 +733,57 @@ function Ke({
|
|
|
733
733
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", u);
|
|
734
734
|
};
|
|
735
735
|
}, [r]);
|
|
736
|
-
const
|
|
737
|
-
return /* @__PURE__ */
|
|
736
|
+
const c = A.Children.toArray(t), p = c.find((d) => (d == null ? void 0 : d.type) === de), f = c.filter((d) => (d == null ? void 0 : d.type) !== de);
|
|
737
|
+
return /* @__PURE__ */ s.jsx("div", { className: "ds-modal-overlay", ...n, children: /* @__PURE__ */ s.jsxs(
|
|
738
738
|
"div",
|
|
739
739
|
{
|
|
740
|
-
className: `ds-modal ds-modal--${
|
|
740
|
+
className: `ds-modal ds-modal--${l}`,
|
|
741
741
|
ref: a,
|
|
742
742
|
role: "dialog",
|
|
743
743
|
"aria-modal": "true",
|
|
744
744
|
"aria-labelledby": e ? i : void 0,
|
|
745
745
|
children: [
|
|
746
|
-
(e || r) && /* @__PURE__ */
|
|
747
|
-
e && /* @__PURE__ */
|
|
748
|
-
r && /* @__PURE__ */
|
|
746
|
+
(e || r) && /* @__PURE__ */ s.jsxs("div", { className: "ds-modal__header", children: [
|
|
747
|
+
e && /* @__PURE__ */ s.jsx("h3", { id: i, className: "ds-modal__title", children: e }),
|
|
748
|
+
r && /* @__PURE__ */ s.jsx(
|
|
749
749
|
ke,
|
|
750
750
|
{
|
|
751
751
|
variant: "ghost",
|
|
752
752
|
size: "small",
|
|
753
|
-
icon: /* @__PURE__ */
|
|
753
|
+
icon: /* @__PURE__ */ s.jsx(se, { size: g[2], strokeWidth: 1.5 }),
|
|
754
754
|
onClick: r,
|
|
755
755
|
"aria-label": "Close modal"
|
|
756
756
|
}
|
|
757
757
|
)
|
|
758
758
|
] }),
|
|
759
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-modal__body", children: f }),
|
|
760
760
|
p
|
|
761
761
|
]
|
|
762
762
|
}
|
|
763
763
|
) });
|
|
764
764
|
}
|
|
765
|
-
function de({ children:
|
|
766
|
-
return /* @__PURE__ */
|
|
765
|
+
function de({ children: t }) {
|
|
766
|
+
return /* @__PURE__ */ s.jsx("div", { className: "ds-modal__footer", children: t });
|
|
767
767
|
}
|
|
768
768
|
function Re({
|
|
769
|
-
children:
|
|
769
|
+
children: t,
|
|
770
770
|
title: e = "Code",
|
|
771
771
|
defaultExpanded: r = !1,
|
|
772
|
-
expanded:
|
|
772
|
+
expanded: l,
|
|
773
773
|
onToggle: n,
|
|
774
774
|
padding: a = "s",
|
|
775
775
|
className: i = "",
|
|
776
|
-
...
|
|
776
|
+
...c
|
|
777
777
|
}) {
|
|
778
|
-
const [p, f] = T(r), d =
|
|
779
|
-
d ? n == null || n(!
|
|
778
|
+
const [p, f] = T(r), d = l !== void 0, u = d ? l : p, x = () => {
|
|
779
|
+
d ? n == null || n(!l) : f((j) => !j);
|
|
780
780
|
}, b = [
|
|
781
781
|
"ds-code-accordion",
|
|
782
782
|
`ds-code-accordion--${a}`,
|
|
783
783
|
i
|
|
784
784
|
].filter(Boolean).join(" ");
|
|
785
|
-
return /* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ s.jsxs("div", { className: b, ...c, children: [
|
|
786
|
+
/* @__PURE__ */ s.jsxs(
|
|
787
787
|
"button",
|
|
788
788
|
{
|
|
789
789
|
type: "button",
|
|
@@ -791,11 +791,11 @@ function Re({
|
|
|
791
791
|
onClick: x,
|
|
792
792
|
"aria-expanded": u,
|
|
793
793
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-code-accordion__title", children: e }),
|
|
795
|
+
/* @__PURE__ */ s.jsx(
|
|
796
796
|
K,
|
|
797
797
|
{
|
|
798
|
-
size:
|
|
798
|
+
size: g[2],
|
|
799
799
|
strokeWidth: 1.5,
|
|
800
800
|
className: `ds-code-accordion__icon ${u ? "ds-code-accordion__icon--expanded" : ""}`
|
|
801
801
|
}
|
|
@@ -803,42 +803,42 @@ function Re({
|
|
|
803
803
|
]
|
|
804
804
|
}
|
|
805
805
|
),
|
|
806
|
-
u && /* @__PURE__ */
|
|
806
|
+
u && /* @__PURE__ */ s.jsx("pre", { className: "ds-code-accordion__content", children: /* @__PURE__ */ s.jsx("code", { children: t }) })
|
|
807
807
|
] });
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
return e ? r ? /* @__PURE__ */
|
|
809
|
+
function Qe({ children: t, block: e = !1, collapsible: r = !1, title: l = "Code", defaultExpanded: n = !1, ...a }) {
|
|
810
|
+
return e ? r ? /* @__PURE__ */ s.jsx(Re, { title: l, defaultExpanded: n, ...a, children: t }) : /* @__PURE__ */ s.jsx("pre", { className: "ds-code-block", ...a, children: /* @__PURE__ */ s.jsx("code", { children: t }) }) : /* @__PURE__ */ s.jsx("code", { className: "ds-code-inline", ...a, children: t });
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
const
|
|
814
|
-
return /* @__PURE__ */
|
|
812
|
+
function et({ href: t, children: e, onClick: r, target: l, rel: n, ...a }) {
|
|
813
|
+
const c = l === "_blank" ? n ? `${n} noopener noreferrer` : "noopener noreferrer" : n;
|
|
814
|
+
return /* @__PURE__ */ s.jsx(
|
|
815
815
|
"a",
|
|
816
816
|
{
|
|
817
|
-
href:
|
|
817
|
+
href: t,
|
|
818
818
|
className: "ds-link",
|
|
819
819
|
onClick: r,
|
|
820
|
-
target:
|
|
821
|
-
rel:
|
|
820
|
+
target: l,
|
|
821
|
+
rel: c,
|
|
822
822
|
...a,
|
|
823
823
|
children: e
|
|
824
824
|
}
|
|
825
825
|
);
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
return /* @__PURE__ */
|
|
827
|
+
function tt({ children: t, size: e = "m", variant: r = "ghost", ...l }) {
|
|
828
|
+
return /* @__PURE__ */ s.jsx("div", { className: "ds-tabs", role: "tablist", ...l, children: A.Children.map(t, (n) => A.isValidElement(n) ? A.cloneElement(n, { size: e, variant: r }) : n) });
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
const f = i && !
|
|
830
|
+
function st({ children: t, selected: e = !1, onClick: r, size: l = "m", variant: n = "ghost", disabled: a = !1, icon: i, href: c, ...p }) {
|
|
831
|
+
const f = i && !t, d = [
|
|
832
832
|
"ds-tab",
|
|
833
|
-
`ds-tab--${
|
|
833
|
+
`ds-tab--${l}`,
|
|
834
834
|
`ds-tab--${n}`,
|
|
835
835
|
e && "ds-tab--selected",
|
|
836
836
|
f && "ds-tab--icon-only"
|
|
837
|
-
].filter(Boolean).join(" "), u = /* @__PURE__ */
|
|
838
|
-
i && /* @__PURE__ */
|
|
839
|
-
|
|
837
|
+
].filter(Boolean).join(" "), u = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
838
|
+
i && /* @__PURE__ */ s.jsx("span", { className: "ds-tab-icon", children: i }),
|
|
839
|
+
t
|
|
840
840
|
] });
|
|
841
|
-
if (
|
|
841
|
+
if (c) {
|
|
842
842
|
const x = (b) => {
|
|
843
843
|
if (a) {
|
|
844
844
|
b.preventDefault();
|
|
@@ -846,21 +846,21 @@ function tt({ children: s, selected: e = !1, onClick: r, size: c = "m", variant:
|
|
|
846
846
|
}
|
|
847
847
|
b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), r == null || r(b));
|
|
848
848
|
};
|
|
849
|
-
return /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ s.jsx(
|
|
850
850
|
"a",
|
|
851
851
|
{
|
|
852
852
|
role: "tab",
|
|
853
853
|
"aria-current": e ? "page" : void 0,
|
|
854
854
|
"aria-disabled": a ? "true" : void 0,
|
|
855
855
|
className: d,
|
|
856
|
-
href: a ? void 0 :
|
|
856
|
+
href: a ? void 0 : c,
|
|
857
857
|
onClick: x,
|
|
858
858
|
...p,
|
|
859
859
|
children: u
|
|
860
860
|
}
|
|
861
861
|
);
|
|
862
862
|
}
|
|
863
|
-
return /* @__PURE__ */
|
|
863
|
+
return /* @__PURE__ */ s.jsx(
|
|
864
864
|
"button",
|
|
865
865
|
{
|
|
866
866
|
role: "tab",
|
|
@@ -873,23 +873,23 @@ function tt({ children: s, selected: e = !1, onClick: r, size: c = "m", variant:
|
|
|
873
873
|
}
|
|
874
874
|
);
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
children:
|
|
876
|
+
function rt({
|
|
877
|
+
children: t,
|
|
878
878
|
title: e,
|
|
879
879
|
defaultExpanded: r = !1,
|
|
880
|
-
expanded:
|
|
880
|
+
expanded: l,
|
|
881
881
|
onToggle: n,
|
|
882
882
|
padding: a = "m",
|
|
883
883
|
...i
|
|
884
884
|
}) {
|
|
885
|
-
const [
|
|
886
|
-
f ? n == null || n(!
|
|
885
|
+
const [c, p] = T(r), f = l !== void 0, d = f ? l : c, u = () => {
|
|
886
|
+
f ? n == null || n(!l) : p((b) => !b);
|
|
887
887
|
}, x = [
|
|
888
888
|
"ds-accordion",
|
|
889
889
|
`ds-accordion--${a}`
|
|
890
890
|
].filter(Boolean).join(" ");
|
|
891
|
-
return /* @__PURE__ */
|
|
892
|
-
/* @__PURE__ */
|
|
891
|
+
return /* @__PURE__ */ s.jsxs("div", { className: x, ...i, children: [
|
|
892
|
+
/* @__PURE__ */ s.jsxs(
|
|
893
893
|
"button",
|
|
894
894
|
{
|
|
895
895
|
type: "button",
|
|
@@ -897,11 +897,11 @@ function st({
|
|
|
897
897
|
onClick: u,
|
|
898
898
|
"aria-expanded": d,
|
|
899
899
|
children: [
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-accordion__title", children: e }),
|
|
901
|
+
/* @__PURE__ */ s.jsx(
|
|
902
902
|
K,
|
|
903
903
|
{
|
|
904
|
-
size:
|
|
904
|
+
size: g[2],
|
|
905
905
|
strokeWidth: 1.5,
|
|
906
906
|
className: `ds-accordion__icon ${d ? "ds-accordion__icon--expanded" : ""}`
|
|
907
907
|
}
|
|
@@ -909,14 +909,14 @@ function st({
|
|
|
909
909
|
]
|
|
910
910
|
}
|
|
911
911
|
),
|
|
912
|
-
d && /* @__PURE__ */
|
|
912
|
+
d && /* @__PURE__ */ s.jsx("div", { className: "ds-accordion__content", children: t })
|
|
913
913
|
] });
|
|
914
914
|
}
|
|
915
915
|
const O = 8, z = 8;
|
|
916
|
-
function Te(
|
|
917
|
-
const
|
|
916
|
+
function Te(t, e, r) {
|
|
917
|
+
const l = window.innerWidth;
|
|
918
918
|
let n, a;
|
|
919
|
-
switch (
|
|
919
|
+
switch (t) {
|
|
920
920
|
case "top":
|
|
921
921
|
n = e.top - r.height - O, a = e.left + e.width / 2 - r.width / 2;
|
|
922
922
|
break;
|
|
@@ -932,25 +932,25 @@ function Te(s, e, r) {
|
|
|
932
932
|
default:
|
|
933
933
|
n = e.bottom + O, a = e.left;
|
|
934
934
|
}
|
|
935
|
-
const i = Math.max(z, Math.min(
|
|
936
|
-
return { top: n, left: i, arrowOffset:
|
|
935
|
+
const i = Math.max(z, Math.min(l - r.width - z, a)), c = a - i;
|
|
936
|
+
return { top: n, left: i, arrowOffset: c };
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
const
|
|
940
|
-
if (
|
|
941
|
-
if (n -
|
|
942
|
-
if (
|
|
943
|
-
if (
|
|
944
|
-
const a = Math.max(
|
|
945
|
-
return a ===
|
|
938
|
+
function ge(t, e, r) {
|
|
939
|
+
const l = window.innerWidth, n = window.innerHeight;
|
|
940
|
+
if (t.top >= e + O + z) return "top";
|
|
941
|
+
if (n - t.bottom >= e + O + z) return "bottom";
|
|
942
|
+
if (l - t.right >= r + O + z) return "right";
|
|
943
|
+
if (t.left >= r + O + z) return "left";
|
|
944
|
+
const a = Math.max(t.top, n - t.bottom, t.left, l - t.right);
|
|
945
|
+
return a === t.top ? "top" : a === n - t.bottom ? "bottom" : a === l - t.right ? "right" : "left";
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const [n, a] = T(!1), [i,
|
|
947
|
+
function nt({ children: t, content: e, position: r, ...l }) {
|
|
948
|
+
const [n, a] = T(!1), [i, c] = T({ visibility: "hidden" }), [p, f] = T(r || "top"), d = L(null), u = L(null), x = L(!1), b = () => {
|
|
949
949
|
if (!d.current || !u.current) return;
|
|
950
|
-
const v = d.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), $ = r ||
|
|
951
|
-
f($),
|
|
950
|
+
const v = d.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), $ = r || ge(v, k.height, k.width), { top: S, left: m, arrowOffset: _ } = Te($, v, k);
|
|
951
|
+
f($), c({
|
|
952
952
|
position: "fixed",
|
|
953
|
-
top:
|
|
953
|
+
top: S,
|
|
954
954
|
left: m,
|
|
955
955
|
visibility: "visible",
|
|
956
956
|
"--arrow-offset": `${_}px`
|
|
@@ -958,7 +958,7 @@ function rt({ children: s, content: e, position: r, ...c }) {
|
|
|
958
958
|
};
|
|
959
959
|
if (B(() => {
|
|
960
960
|
if (!n) return;
|
|
961
|
-
|
|
961
|
+
c({ position: "fixed", visibility: "hidden" });
|
|
962
962
|
const v = requestAnimationFrame(b);
|
|
963
963
|
return window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
|
|
964
964
|
cancelAnimationFrame(v), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
|
|
@@ -969,8 +969,8 @@ function rt({ children: s, content: e, position: r, ...c }) {
|
|
|
969
969
|
d.current && !d.current.contains(k.target) && a(!1);
|
|
970
970
|
};
|
|
971
971
|
return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
|
|
972
|
-
}, [n]), !e) return
|
|
973
|
-
const j = n && /* @__PURE__ */
|
|
972
|
+
}, [n]), !e) return t;
|
|
973
|
+
const j = n && /* @__PURE__ */ s.jsx(
|
|
974
974
|
"div",
|
|
975
975
|
{
|
|
976
976
|
ref: u,
|
|
@@ -980,7 +980,7 @@ function rt({ children: s, content: e, position: r, ...c }) {
|
|
|
980
980
|
children: e
|
|
981
981
|
}
|
|
982
982
|
);
|
|
983
|
-
return /* @__PURE__ */
|
|
983
|
+
return /* @__PURE__ */ s.jsxs(
|
|
984
984
|
"div",
|
|
985
985
|
{
|
|
986
986
|
ref: d,
|
|
@@ -994,73 +994,73 @@ function rt({ children: s, content: e, position: r, ...c }) {
|
|
|
994
994
|
onTouchStart: () => {
|
|
995
995
|
x.current = !0, a((v) => !v);
|
|
996
996
|
},
|
|
997
|
-
...
|
|
997
|
+
...l,
|
|
998
998
|
children: [
|
|
999
|
-
|
|
1000
|
-
typeof document < "u" &&
|
|
999
|
+
t,
|
|
1000
|
+
typeof document < "u" && J.createPortal(j, document.body)
|
|
1001
1001
|
]
|
|
1002
1002
|
}
|
|
1003
1003
|
);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1006
|
-
checked:
|
|
1005
|
+
function at({
|
|
1006
|
+
checked: t = !1,
|
|
1007
1007
|
onChange: e,
|
|
1008
1008
|
size: r = "m",
|
|
1009
|
-
disabled:
|
|
1009
|
+
disabled: l = !1,
|
|
1010
1010
|
label: n,
|
|
1011
1011
|
id: a,
|
|
1012
1012
|
...i
|
|
1013
1013
|
}) {
|
|
1014
|
-
const
|
|
1014
|
+
const c = a || `toggle-${A.useId()}`, p = [
|
|
1015
1015
|
"ds-toggle",
|
|
1016
1016
|
`ds-toggle--${r}`,
|
|
1017
|
-
|
|
1017
|
+
l && "ds-toggle--disabled"
|
|
1018
1018
|
].filter(Boolean).join(" ");
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor: c, children: [
|
|
1020
|
+
/* @__PURE__ */ s.jsx(
|
|
1021
1021
|
"input",
|
|
1022
1022
|
{
|
|
1023
1023
|
type: "checkbox",
|
|
1024
|
-
id:
|
|
1024
|
+
id: c,
|
|
1025
1025
|
className: "ds-toggle__input",
|
|
1026
|
-
checked:
|
|
1026
|
+
checked: t,
|
|
1027
1027
|
onChange: (f) => e == null ? void 0 : e(f.target.checked),
|
|
1028
|
-
disabled:
|
|
1028
|
+
disabled: l,
|
|
1029
1029
|
...i
|
|
1030
1030
|
}
|
|
1031
1031
|
),
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
n && /* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ s.jsx("span", { className: "ds-toggle__thumb" }) }),
|
|
1033
|
+
n && /* @__PURE__ */ s.jsx("span", { className: "ds-toggle__label", children: n })
|
|
1034
1034
|
] });
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1037
|
-
checked:
|
|
1036
|
+
function ot({
|
|
1037
|
+
checked: t = !1,
|
|
1038
1038
|
onChange: e,
|
|
1039
1039
|
size: r = "m",
|
|
1040
|
-
disabled:
|
|
1040
|
+
disabled: l = !1,
|
|
1041
1041
|
label: n,
|
|
1042
1042
|
id: a,
|
|
1043
1043
|
...i
|
|
1044
1044
|
}) {
|
|
1045
|
-
const
|
|
1045
|
+
const c = a || `checkbox-${A.useId()}`, p = [
|
|
1046
1046
|
"ds-checkbox",
|
|
1047
1047
|
`ds-checkbox--${r}`,
|
|
1048
|
-
|
|
1048
|
+
l && "ds-checkbox--disabled"
|
|
1049
1049
|
].filter(Boolean).join(" "), f = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
|
|
1050
|
-
return /* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor: c, children: [
|
|
1051
|
+
/* @__PURE__ */ s.jsx(
|
|
1052
1052
|
"input",
|
|
1053
1053
|
{
|
|
1054
1054
|
type: "checkbox",
|
|
1055
|
-
id:
|
|
1055
|
+
id: c,
|
|
1056
1056
|
className: "ds-checkbox__input",
|
|
1057
|
-
checked:
|
|
1057
|
+
checked: t,
|
|
1058
1058
|
onChange: (d) => e == null ? void 0 : e(d.target.checked),
|
|
1059
|
-
disabled:
|
|
1059
|
+
disabled: l,
|
|
1060
1060
|
...i
|
|
1061
1061
|
}
|
|
1062
1062
|
),
|
|
1063
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ s.jsx(
|
|
1064
1064
|
_e,
|
|
1065
1065
|
{
|
|
1066
1066
|
size: f,
|
|
@@ -1068,140 +1068,145 @@ function at({
|
|
|
1068
1068
|
className: "ds-checkbox__icon"
|
|
1069
1069
|
}
|
|
1070
1070
|
) }),
|
|
1071
|
-
n && /* @__PURE__ */
|
|
1071
|
+
n && /* @__PURE__ */ s.jsx("span", { className: "ds-checkbox__label", children: n })
|
|
1072
1072
|
] });
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
checked:
|
|
1074
|
+
function lt({
|
|
1075
|
+
checked: t = !1,
|
|
1076
1076
|
onChange: e,
|
|
1077
1077
|
size: r = "m",
|
|
1078
|
-
disabled:
|
|
1078
|
+
disabled: l = !1,
|
|
1079
1079
|
label: n,
|
|
1080
1080
|
name: a,
|
|
1081
1081
|
value: i,
|
|
1082
|
-
id:
|
|
1082
|
+
id: c,
|
|
1083
1083
|
...p
|
|
1084
1084
|
}) {
|
|
1085
|
-
const f =
|
|
1085
|
+
const f = c || `radio-${A.useId()}`, d = [
|
|
1086
1086
|
"ds-radio",
|
|
1087
1087
|
`ds-radio--${r}`,
|
|
1088
|
-
|
|
1088
|
+
l && "ds-radio--disabled"
|
|
1089
1089
|
].filter(Boolean).join(" ");
|
|
1090
|
-
return /* @__PURE__ */
|
|
1091
|
-
/* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ s.jsxs("label", { className: d, htmlFor: f, children: [
|
|
1091
|
+
/* @__PURE__ */ s.jsx(
|
|
1092
1092
|
"input",
|
|
1093
1093
|
{
|
|
1094
1094
|
type: "radio",
|
|
1095
1095
|
id: f,
|
|
1096
1096
|
className: "ds-radio__input",
|
|
1097
|
-
checked:
|
|
1097
|
+
checked: t,
|
|
1098
1098
|
onChange: (u) => e == null ? void 0 : e(u.target.checked),
|
|
1099
|
-
disabled:
|
|
1099
|
+
disabled: l,
|
|
1100
1100
|
name: a,
|
|
1101
1101
|
value: i,
|
|
1102
1102
|
...p
|
|
1103
1103
|
}
|
|
1104
1104
|
),
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
n && /* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ s.jsx("span", { className: "ds-radio__dot" }) }),
|
|
1106
|
+
n && /* @__PURE__ */ s.jsx("span", { className: "ds-radio__label", children: n })
|
|
1107
1107
|
] });
|
|
1108
1108
|
}
|
|
1109
|
-
function ct({ size:
|
|
1110
|
-
return /* @__PURE__ */
|
|
1109
|
+
function ct({ size: t = "m", color: e = "default", className: r = "", ...l }) {
|
|
1110
|
+
return /* @__PURE__ */ s.jsx(
|
|
1111
1111
|
"span",
|
|
1112
1112
|
{
|
|
1113
|
-
className: ["ds-spinner", `ds-spinner--${
|
|
1113
|
+
className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${e}`, r].filter(Boolean).join(" "),
|
|
1114
1114
|
role: "status",
|
|
1115
1115
|
"aria-label": "Loading",
|
|
1116
|
-
...
|
|
1116
|
+
...l
|
|
1117
1117
|
}
|
|
1118
1118
|
);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return /* @__PURE__ */
|
|
1120
|
+
function it({ width: t, height: e, shape: r = "rect", className: l = "", style: n = {}, ...a }) {
|
|
1121
|
+
return /* @__PURE__ */ s.jsx(
|
|
1122
1122
|
"span",
|
|
1123
1123
|
{
|
|
1124
|
-
className: ["ds-skeleton", `ds-skeleton--${r}`,
|
|
1125
|
-
style: { width:
|
|
1124
|
+
className: ["ds-skeleton", `ds-skeleton--${r}`, l].filter(Boolean).join(" "),
|
|
1125
|
+
style: { width: t, height: e, ...n },
|
|
1126
1126
|
"aria-hidden": "true",
|
|
1127
1127
|
...a
|
|
1128
1128
|
}
|
|
1129
1129
|
);
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function Se(t) {
|
|
1132
1132
|
let e = 2166136261;
|
|
1133
|
-
for (let r = 0; r <
|
|
1134
|
-
e ^=
|
|
1133
|
+
for (let r = 0; r < t.length; r++)
|
|
1134
|
+
e ^= t.charCodeAt(r), e = Math.imul(e, 16777619) >>> 0;
|
|
1135
1135
|
return e % 360;
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1138
|
-
|
|
1139
|
-
|
|
1137
|
+
function Ie(t) {
|
|
1138
|
+
if (!t) return "";
|
|
1139
|
+
const e = t.trim().split(/\s+/);
|
|
1140
|
+
return e.length >= 2 ? (e[0][0] + e[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1141
|
+
}
|
|
1142
|
+
function dt({ seed: t, icon: e, src: r, size: l = 32, className: n = "", style: a = {}, ...i }) {
|
|
1143
|
+
const c = Se(t ?? ""), [p, f] = T(!1), d = e ?? /* @__PURE__ */ s.jsx("span", { className: "ds-avatar__initials", children: Ie(t) });
|
|
1144
|
+
return /* @__PURE__ */ s.jsx(
|
|
1140
1145
|
"div",
|
|
1141
1146
|
{
|
|
1142
1147
|
className: ["ds-avatar", n].filter(Boolean).join(" "),
|
|
1143
|
-
style: { width:
|
|
1148
|
+
style: { width: l, height: l, "--ds-avatar-h": c, ...a },
|
|
1144
1149
|
"aria-hidden": "true",
|
|
1145
1150
|
...i,
|
|
1146
|
-
children: r && !p ? /* @__PURE__ */
|
|
1151
|
+
children: r && !p ? /* @__PURE__ */ s.jsx("img", { src: r, alt: "", onError: () => f(!0) }) : d
|
|
1147
1152
|
}
|
|
1148
1153
|
);
|
|
1149
1154
|
}
|
|
1150
|
-
function
|
|
1151
|
-
children:
|
|
1155
|
+
function ut({
|
|
1156
|
+
children: t,
|
|
1152
1157
|
size: e = "compact",
|
|
1153
1158
|
stickyTop: r,
|
|
1154
|
-
maxHeight:
|
|
1159
|
+
maxHeight: l,
|
|
1155
1160
|
className: n = "",
|
|
1156
1161
|
style: a = {},
|
|
1157
1162
|
...i
|
|
1158
1163
|
}) {
|
|
1159
|
-
const
|
|
1160
|
-
...
|
|
1164
|
+
const c = {
|
|
1165
|
+
...l ? { maxHeight: l } : {},
|
|
1161
1166
|
...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
|
|
1162
1167
|
...a
|
|
1163
1168
|
};
|
|
1164
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ s.jsx(
|
|
1165
1170
|
"div",
|
|
1166
1171
|
{
|
|
1167
|
-
className: ["ds-table-wrap",
|
|
1168
|
-
style:
|
|
1169
|
-
children: /* @__PURE__ */
|
|
1172
|
+
className: ["ds-table-wrap", l ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
|
|
1173
|
+
style: c,
|
|
1174
|
+
children: /* @__PURE__ */ s.jsx(
|
|
1170
1175
|
"table",
|
|
1171
1176
|
{
|
|
1172
1177
|
className: ["ds-table", `ds-table--${e}`, n].filter(Boolean).join(" "),
|
|
1173
1178
|
...i,
|
|
1174
|
-
children:
|
|
1179
|
+
children: t
|
|
1175
1180
|
}
|
|
1176
1181
|
)
|
|
1177
1182
|
}
|
|
1178
1183
|
);
|
|
1179
1184
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return /* @__PURE__ */
|
|
1185
|
+
function ft({ children: t, ...e }) {
|
|
1186
|
+
return /* @__PURE__ */ s.jsx("thead", { ...e, children: t });
|
|
1182
1187
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return /* @__PURE__ */
|
|
1188
|
+
function mt({ children: t, ...e }) {
|
|
1189
|
+
return /* @__PURE__ */ s.jsx("tbody", { ...e, children: t });
|
|
1185
1190
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return /* @__PURE__ */
|
|
1191
|
+
function pt({ children: t, interactive: e, selected: r, className: l = "", onClick: n, ...a }) {
|
|
1192
|
+
return /* @__PURE__ */ s.jsx(
|
|
1188
1193
|
"tr",
|
|
1189
1194
|
{
|
|
1190
1195
|
className: [
|
|
1191
1196
|
"ds-table-row",
|
|
1192
1197
|
e || n ? "ds-table-row--interactive" : "",
|
|
1193
1198
|
r ? "ds-table-row--selected" : "",
|
|
1194
|
-
|
|
1199
|
+
l
|
|
1195
1200
|
].filter(Boolean).join(" "),
|
|
1196
1201
|
onClick: n,
|
|
1197
1202
|
...a,
|
|
1198
|
-
children:
|
|
1203
|
+
children: t
|
|
1199
1204
|
}
|
|
1200
1205
|
);
|
|
1201
1206
|
}
|
|
1202
|
-
function
|
|
1203
|
-
const p = !!
|
|
1204
|
-
return /* @__PURE__ */
|
|
1207
|
+
function bt({ children: t, align: e = "left", sortDir: r, onSort: l, width: n, className: a = "", style: i = {}, ...c }) {
|
|
1208
|
+
const p = !!l || r !== void 0, f = r === "asc" ? we : r === "desc" ? K : Ne;
|
|
1209
|
+
return /* @__PURE__ */ s.jsx(
|
|
1205
1210
|
"th",
|
|
1206
1211
|
{
|
|
1207
1212
|
className: [
|
|
@@ -1211,72 +1216,72 @@ function pt({ children: s, align: e = "left", sortDir: r, onSort: c, width: n, c
|
|
|
1211
1216
|
e !== "left" ? `ds-table-cell--${e}` : "",
|
|
1212
1217
|
a
|
|
1213
1218
|
].filter(Boolean).join(" "),
|
|
1214
|
-
onClick:
|
|
1219
|
+
onClick: l,
|
|
1215
1220
|
style: { width: n, ...i },
|
|
1216
|
-
...
|
|
1217
|
-
children: p ? /* @__PURE__ */
|
|
1218
|
-
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
] }) :
|
|
1221
|
+
...c,
|
|
1222
|
+
children: p ? /* @__PURE__ */ s.jsxs("span", { className: "ds-th__inner", children: [
|
|
1223
|
+
t,
|
|
1224
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ s.jsx(f, { size: 11, strokeWidth: 2.5 }) })
|
|
1225
|
+
] }) : t
|
|
1221
1226
|
}
|
|
1222
1227
|
);
|
|
1223
1228
|
}
|
|
1224
|
-
function
|
|
1225
|
-
return /* @__PURE__ */
|
|
1229
|
+
function ht({ children: t, align: e = "left", secondary: r, muted: l, truncate: n, nowrap: a, className: i = "", ...c }) {
|
|
1230
|
+
return /* @__PURE__ */ s.jsx(
|
|
1226
1231
|
"td",
|
|
1227
1232
|
{
|
|
1228
1233
|
className: [
|
|
1229
1234
|
"ds-td",
|
|
1230
1235
|
e !== "left" ? `ds-table-cell--${e}` : "",
|
|
1231
1236
|
r ? "ds-table-cell--secondary" : "",
|
|
1232
|
-
|
|
1237
|
+
l ? "ds-table-cell--muted" : "",
|
|
1233
1238
|
n ? "ds-table-cell--truncate" : "",
|
|
1234
1239
|
a ? "ds-table-cell--nowrap" : "",
|
|
1235
1240
|
i
|
|
1236
1241
|
].filter(Boolean).join(" "),
|
|
1237
|
-
...
|
|
1238
|
-
children:
|
|
1242
|
+
...c,
|
|
1243
|
+
children: t
|
|
1239
1244
|
}
|
|
1240
1245
|
);
|
|
1241
1246
|
}
|
|
1242
|
-
function
|
|
1243
|
-
icon:
|
|
1247
|
+
function xt({
|
|
1248
|
+
icon: t,
|
|
1244
1249
|
title: e,
|
|
1245
1250
|
description: r,
|
|
1246
|
-
action:
|
|
1251
|
+
action: l,
|
|
1247
1252
|
size: n = "m",
|
|
1248
1253
|
className: a = "",
|
|
1249
1254
|
...i
|
|
1250
1255
|
}) {
|
|
1251
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1252
1257
|
"div",
|
|
1253
1258
|
{
|
|
1254
1259
|
className: ["ds-empty-state", `ds-empty-state--${n}`, a].filter(Boolean).join(" "),
|
|
1255
1260
|
...i,
|
|
1256
1261
|
children: [
|
|
1257
|
-
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
r && /* @__PURE__ */
|
|
1260
|
-
|
|
1262
|
+
t && /* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__icon", children: t }),
|
|
1263
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__title", children: e }),
|
|
1264
|
+
r && /* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__description", children: r }),
|
|
1265
|
+
l && /* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__action", children: l })
|
|
1261
1266
|
]
|
|
1262
1267
|
}
|
|
1263
1268
|
);
|
|
1264
1269
|
}
|
|
1265
|
-
function
|
|
1266
|
-
trigger:
|
|
1270
|
+
function vt({
|
|
1271
|
+
trigger: t,
|
|
1267
1272
|
items: e = [],
|
|
1268
1273
|
open: r,
|
|
1269
|
-
onOpenChange:
|
|
1274
|
+
onOpenChange: l,
|
|
1270
1275
|
align: n = "left",
|
|
1271
1276
|
className: a = "",
|
|
1272
1277
|
style: i,
|
|
1273
|
-
...
|
|
1278
|
+
...c
|
|
1274
1279
|
}) {
|
|
1275
1280
|
const [p, f] = T(!1), d = r !== void 0, u = d ? r : p, x = L(null), b = L(null), [j, v] = T({}), k = () => {
|
|
1276
|
-
d ?
|
|
1281
|
+
d ? l == null || l(!1) : f(!1);
|
|
1277
1282
|
}, $ = () => {
|
|
1278
1283
|
const m = !u;
|
|
1279
|
-
d ?
|
|
1284
|
+
d ? l == null || l(m) : f(m);
|
|
1280
1285
|
};
|
|
1281
1286
|
B(() => {
|
|
1282
1287
|
if (!u) return;
|
|
@@ -1302,7 +1307,7 @@ function xt({
|
|
|
1302
1307
|
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", _);
|
|
1303
1308
|
};
|
|
1304
1309
|
}, [u]);
|
|
1305
|
-
const
|
|
1310
|
+
const S = u && /* @__PURE__ */ s.jsx(
|
|
1306
1311
|
"div",
|
|
1307
1312
|
{
|
|
1308
1313
|
ref: b,
|
|
@@ -1310,14 +1315,14 @@ function xt({
|
|
|
1310
1315
|
style: j,
|
|
1311
1316
|
children: e.map((m, _) => {
|
|
1312
1317
|
if (m.separator)
|
|
1313
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__separator" }, _);
|
|
1314
1319
|
if (m.type === "section")
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
m.label && /* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */
|
|
1320
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "ds-dropdown__section", children: [
|
|
1321
|
+
m.label && /* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__section-label", children: m.label }),
|
|
1322
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__section-content", children: m.content })
|
|
1318
1323
|
] }, _);
|
|
1319
1324
|
const R = !!m.href, I = R ? "a" : "button", P = R ? { href: m.disabled ? void 0 : m.href, "aria-disabled": m.disabled ? "true" : void 0 } : { type: "button", disabled: m.disabled };
|
|
1320
|
-
return /* @__PURE__ */
|
|
1325
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1321
1326
|
I,
|
|
1322
1327
|
{
|
|
1323
1328
|
className: [
|
|
@@ -1330,9 +1335,9 @@ function xt({
|
|
|
1330
1335
|
(M = m.onClick) == null || M.call(m), k();
|
|
1331
1336
|
},
|
|
1332
1337
|
children: [
|
|
1333
|
-
m.icon && /* @__PURE__ */
|
|
1334
|
-
/* @__PURE__ */
|
|
1335
|
-
m.shortcut && /* @__PURE__ */
|
|
1338
|
+
m.icon && /* @__PURE__ */ s.jsx("span", { className: "ds-dropdown__item-icon", children: m.icon }),
|
|
1339
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-dropdown__item-label", children: m.label }),
|
|
1340
|
+
m.shortcut && /* @__PURE__ */ s.jsx("span", { className: "ds-dropdown__item-shortcut", children: m.shortcut })
|
|
1336
1341
|
]
|
|
1337
1342
|
},
|
|
1338
1343
|
_
|
|
@@ -1340,16 +1345,16 @@ function xt({
|
|
|
1340
1345
|
})
|
|
1341
1346
|
}
|
|
1342
1347
|
);
|
|
1343
|
-
return /* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1344
1349
|
"div",
|
|
1345
1350
|
{
|
|
1346
1351
|
ref: x,
|
|
1347
1352
|
className: ["ds-dropdown", a].filter(Boolean).join(" "),
|
|
1348
1353
|
style: i,
|
|
1349
|
-
...
|
|
1354
|
+
...c,
|
|
1350
1355
|
children: [
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
typeof document < "u" &&
|
|
1356
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__trigger", onClick: $, children: t }),
|
|
1357
|
+
typeof document < "u" && J.createPortal(S, document.body)
|
|
1353
1358
|
]
|
|
1354
1359
|
}
|
|
1355
1360
|
);
|
|
@@ -1363,17 +1368,17 @@ const ue = {
|
|
|
1363
1368
|
let V = [];
|
|
1364
1369
|
const te = /* @__PURE__ */ new Set();
|
|
1365
1370
|
function he() {
|
|
1366
|
-
te.forEach((
|
|
1371
|
+
te.forEach((t) => t([...V]));
|
|
1367
1372
|
}
|
|
1368
|
-
function
|
|
1369
|
-
V = [...V,
|
|
1373
|
+
function Ae(t) {
|
|
1374
|
+
V = [...V, t], he();
|
|
1370
1375
|
}
|
|
1371
|
-
function
|
|
1372
|
-
V = V.filter((e) => e.id !==
|
|
1376
|
+
function Pe(t) {
|
|
1377
|
+
V = V.filter((e) => e.id !== t), he();
|
|
1373
1378
|
}
|
|
1374
|
-
function
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1379
|
+
function jt() {
|
|
1380
|
+
const t = (e, r = {}) => {
|
|
1381
|
+
Ae({
|
|
1377
1382
|
id: `${Date.now()}-${Math.random()}`,
|
|
1378
1383
|
message: e,
|
|
1379
1384
|
type: "default",
|
|
@@ -1381,88 +1386,88 @@ function vt() {
|
|
|
1381
1386
|
...r
|
|
1382
1387
|
});
|
|
1383
1388
|
};
|
|
1384
|
-
return
|
|
1389
|
+
return t.success = (e, r) => t(e, { ...r, type: "success" }), t.error = (e, r) => t(e, { ...r, type: "error" }), t.warning = (e, r) => t(e, { ...r, type: "warning" }), { toast: t };
|
|
1385
1390
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const [r,
|
|
1388
|
-
B(() => (requestAnimationFrame(() =>
|
|
1391
|
+
function Oe({ data: t, onDismiss: e }) {
|
|
1392
|
+
const [r, l] = T(!1), n = L(null);
|
|
1393
|
+
B(() => (requestAnimationFrame(() => l(!0)), t.duration > 0 && (n.current = setTimeout(() => a(), t.duration)), () => clearTimeout(n.current)), []);
|
|
1389
1394
|
function a() {
|
|
1390
|
-
|
|
1395
|
+
l(!1), setTimeout(() => e(t.id), 250);
|
|
1391
1396
|
}
|
|
1392
|
-
const i = ue[
|
|
1393
|
-
return /* @__PURE__ */
|
|
1397
|
+
const i = ue[t.type] ?? ue.default;
|
|
1398
|
+
return /* @__PURE__ */ s.jsxs(
|
|
1394
1399
|
"div",
|
|
1395
1400
|
{
|
|
1396
1401
|
className: [
|
|
1397
1402
|
"ds-toast",
|
|
1398
|
-
`ds-toast--${
|
|
1403
|
+
`ds-toast--${t.type}`,
|
|
1399
1404
|
r && "ds-toast--visible"
|
|
1400
1405
|
].filter(Boolean).join(" "),
|
|
1401
|
-
role:
|
|
1406
|
+
role: t.type === "error" ? "alert" : "status",
|
|
1402
1407
|
"aria-live": "polite",
|
|
1403
1408
|
children: [
|
|
1404
|
-
/* @__PURE__ */
|
|
1405
|
-
/* @__PURE__ */
|
|
1406
|
-
/* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ s.jsx(i, { size: g[3], strokeWidth: 1.5 }) }),
|
|
1410
|
+
/* @__PURE__ */ s.jsx("span", { className: "ds-toast__message", children: t.message }),
|
|
1411
|
+
/* @__PURE__ */ s.jsx(
|
|
1407
1412
|
"button",
|
|
1408
1413
|
{
|
|
1409
1414
|
className: "ds-toast__close",
|
|
1410
1415
|
onClick: a,
|
|
1411
1416
|
"aria-label": "Закрыть",
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1417
|
+
children: /* @__PURE__ */ s.jsx(se, { size: g[3], strokeWidth: 1.5 })
|
|
1413
1418
|
}
|
|
1414
1419
|
)
|
|
1415
1420
|
]
|
|
1416
1421
|
}
|
|
1417
1422
|
);
|
|
1418
1423
|
}
|
|
1419
|
-
function
|
|
1424
|
+
function _t({ position: t = "bottom-right" }) {
|
|
1420
1425
|
const [e, r] = T(() => [...V]);
|
|
1421
|
-
return B(() => (te.add(r), () => te.delete(r)), []), !e.length || typeof document > "u" ? null :
|
|
1422
|
-
/* @__PURE__ */
|
|
1426
|
+
return B(() => (te.add(r), () => te.delete(r)), []), !e.length || typeof document > "u" ? null : J.createPortal(
|
|
1427
|
+
/* @__PURE__ */ s.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: e.map((l) => /* @__PURE__ */ s.jsx(Oe, { data: l, onDismiss: Pe }, l.id)) }),
|
|
1423
1428
|
document.body
|
|
1424
1429
|
);
|
|
1425
1430
|
}
|
|
1426
1431
|
export {
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1432
|
+
rt as Accordion,
|
|
1433
|
+
Ke as Alert,
|
|
1434
|
+
dt as Avatar,
|
|
1430
1435
|
Je as Badge,
|
|
1431
1436
|
ke as Button,
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1437
|
+
ze as Card,
|
|
1438
|
+
ot as Checkbox,
|
|
1439
|
+
Qe as Code,
|
|
1435
1440
|
Re as CodeAccordion,
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1441
|
+
vt as Dropdown,
|
|
1442
|
+
xt as EmptyState,
|
|
1443
|
+
Ve as H1,
|
|
1444
|
+
Ue as H2,
|
|
1445
|
+
He as H3,
|
|
1446
|
+
Ge as H4,
|
|
1447
|
+
Me as Input,
|
|
1448
|
+
et as Link,
|
|
1449
|
+
Ze as Modal,
|
|
1445
1450
|
de as ModalFooter,
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1451
|
+
qe as P1,
|
|
1452
|
+
Xe as P2,
|
|
1453
|
+
Ce as P3,
|
|
1454
|
+
lt as Radio,
|
|
1455
|
+
We as Select,
|
|
1456
|
+
it as Skeleton,
|
|
1452
1457
|
ct as Spinner,
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1458
|
+
Ye as Stepper,
|
|
1459
|
+
st as Tab,
|
|
1460
|
+
ut as Table,
|
|
1461
|
+
mt as TableBody,
|
|
1462
|
+
ft as TableHead,
|
|
1463
|
+
pt as TableRow,
|
|
1464
|
+
tt as Tabs,
|
|
1465
|
+
ht as Td,
|
|
1466
|
+
Fe as Textarea,
|
|
1467
|
+
bt as Th,
|
|
1468
|
+
_t as ToastContainer,
|
|
1469
|
+
at as Toggle,
|
|
1470
|
+
nt as Tooltip,
|
|
1471
|
+
g as iconSizes,
|
|
1472
|
+
jt as useToast
|
|
1468
1473
|
};
|