@donkit-ai/design-system 1.0.6 → 1.0.8

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.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import A, { useState as I, useRef as L, useEffect as B } from "react";
2
- import C from "react-dom";
1
+ import A, { useState as T, useRef as L, useEffect as B } from "react";
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 T = {
4
+ const g = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
@@ -18,27 +18,27 @@ 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 le;
21
+ var ce;
22
22
  function ye() {
23
- if (le) return G;
24
- le = 1;
23
+ if (ce) return G;
24
+ ce = 1;
25
25
  var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
26
- function s(c, n, a) {
27
- var l = null;
28
- if (a !== void 0 && (l = "" + a), n.key !== void 0 && (l = "" + n.key), "key" in n) {
26
+ function r(l, n, a) {
27
+ var i = null;
28
+ if (a !== void 0 && (i = "" + a), n.key !== void 0 && (i = "" + n.key), "key" in n) {
29
29
  a = {};
30
- for (var i in n)
31
- i !== "key" && (a[i] = n[i]);
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
34
  $$typeof: t,
35
- type: c,
36
- key: l,
35
+ type: l,
36
+ key: i,
37
37
  ref: n !== void 0 ? n : null,
38
38
  props: a
39
39
  };
40
40
  }
41
- return G.Fragment = e, G.jsx = s, G.jsxs = s, G;
41
+ return G.Fragment = e, G.jsx = r, G.jsxs = r, G;
42
42
  }
43
43
  var q = {};
44
44
  /**
@@ -65,7 +65,7 @@ function Ee() {
65
65
  return "Profiler";
66
66
  case $:
67
67
  return "StrictMode";
68
- case g:
68
+ case I:
69
69
  return "Suspense";
70
70
  case P:
71
71
  return "SuspenseList";
@@ -99,7 +99,7 @@ function Ee() {
99
99
  function e(o) {
100
100
  return "" + o;
101
101
  }
102
- function s(o) {
102
+ function r(o) {
103
103
  try {
104
104
  e(o);
105
105
  var h = !1;
@@ -116,7 +116,7 @@ function Ee() {
116
116
  ), e(o);
117
117
  }
118
118
  }
119
- function c(o) {
119
+ function l(o) {
120
120
  if (o === k) return "<>";
121
121
  if (typeof o == "object" && o !== null && o.$$typeof === U)
122
122
  return "<...>";
@@ -134,14 +134,14 @@ function Ee() {
134
134
  function a() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
- function l(o) {
137
+ function i(o) {
138
138
  if (X.call(o, "key")) {
139
139
  var h = Object.getOwnPropertyDescriptor(o, "key").get;
140
140
  if (h && h.isReactWarning) return !1;
141
141
  }
142
142
  return o.key !== void 0;
143
143
  }
144
- function i(o, h) {
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)",
@@ -159,7 +159,7 @@ function Ee() {
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, J, Z) {
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: J
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, J, Z) {
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)
@@ -210,7 +210,7 @@ function Ee() {
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}", ce[E + y] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
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
- ), ce[E + y] = !0);
224
+ ), le[E + y] = !0);
225
225
  }
226
- if (E = null, N !== void 0 && (s(N), E = "" + N), l(h) && (s(h.key), E = "" + h.key), "key" in h) {
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 && i(
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
- J,
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"), S = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), g = 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() {
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(c(a)), ce = {};
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(c(o)) : oe
269
+ y ? W(l(o)) : oe
270
270
  );
271
271
  }, q.jsxs = function(o, h, N) {
272
272
  var y = 1e4 > F.recentlyCreatedOwnerStacks++;
@@ -276,22 +276,22 @@ 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(c(o)) : oe
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 r = ee.exports;
285
+ var s = ee.exports;
286
286
  function ke({
287
287
  children: t,
288
288
  variant: e = "primary",
289
- size: s = "m",
290
- fullWidth: c = !1,
289
+ size: r = "m",
290
+ fullWidth: l = !1,
291
291
  icon: n,
292
292
  disabled: a = !1,
293
- onClick: l,
294
- type: i = "button",
293
+ onClick: i,
294
+ type: c = "button",
295
295
  href: p,
296
296
  "aria-label": f,
297
297
  ...d
@@ -299,13 +299,13 @@ function ke({
299
299
  const u = n && !t, x = [
300
300
  "ds-button",
301
301
  `ds-button--${e}`,
302
- `ds-button--${s}`,
303
- c && "ds-button--full",
302
+ `ds-button--${r}`,
303
+ l && "ds-button--full",
304
304
  u && "ds-button--icon-only"
305
- ].filter(Boolean).join(" "), b = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
306
- n && !u && /* @__PURE__ */ r.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n }),
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
307
  t,
308
- u && /* @__PURE__ */ r.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n })
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) => {
@@ -313,9 +313,9 @@ function ke({
313
313
  v.preventDefault();
314
314
  return;
315
315
  }
316
- v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), l == null || l(v));
316
+ v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), i == null || i(v));
317
317
  };
318
- return /* @__PURE__ */ r.jsx(
318
+ return /* @__PURE__ */ s.jsx(
319
319
  "a",
320
320
  {
321
321
  className: x,
@@ -328,84 +328,84 @@ function ke({
328
328
  }
329
329
  );
330
330
  }
331
- return /* @__PURE__ */ r.jsx(
331
+ return /* @__PURE__ */ s.jsx(
332
332
  "button",
333
333
  {
334
- type: i,
334
+ type: c,
335
335
  className: x,
336
336
  disabled: a,
337
- onClick: l,
337
+ onClick: i,
338
338
  "aria-label": f,
339
339
  ...d,
340
340
  children: b
341
341
  }
342
342
  );
343
343
  }
344
- function De({
344
+ function Me({
345
345
  label: t,
346
346
  error: e,
347
- hint: s,
348
- fullWidth: c = !0,
347
+ hint: r,
348
+ fullWidth: l = !0,
349
349
  icon: n,
350
350
  iconRight: a,
351
- onIconRightClick: l,
352
- size: i = "m",
351
+ onIconRightClick: i,
352
+ size: c = "m",
353
353
  disabled: p,
354
354
  id: f,
355
355
  ...d
356
356
  }) {
357
- const u = f || `input-${A.useId()}`, x = s ? `${u}-hint` : void 0, b = e ? `${u}-error` : void 0, j = b || x;
358
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-input-wrapper ${c ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""}`, children: [
359
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-input-label", htmlFor: u, children: t }),
360
- /* @__PURE__ */ r.jsxs("div", { className: "ds-input-container", children: [
361
- n && /* @__PURE__ */ r.jsx("span", { className: `ds-input-icon ds-input-icon--${i}`, "aria-hidden": "true", children: n }),
362
- /* @__PURE__ */ r.jsx(
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__ */ 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--${i} ${n ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${e ? "ds-input--error" : ""}`,
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__ */ r.jsx(
373
+ a && /* @__PURE__ */ s.jsx(
374
374
  "button",
375
375
  {
376
376
  type: "button",
377
- className: `ds-input-icon-right ds-input-icon-right--${i}`,
378
- onClick: l,
377
+ className: `ds-input-icon-right ds-input-icon-right--${c}`,
378
+ onClick: i,
379
379
  tabIndex: -1,
380
380
  "aria-label": "Toggle visibility",
381
381
  children: a
382
382
  }
383
383
  )
384
384
  ] }),
385
- s && !e && /* @__PURE__ */ r.jsx("span", { id: x, className: "ds-input-hint", children: s }),
386
- e && /* @__PURE__ */ r.jsx("span", { id: b, className: "ds-input-error", role: "alert", children: e })
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 Me({
389
+ function Fe({
390
390
  label: t,
391
391
  error: e,
392
- hint: s,
393
- fullWidth: c = !0,
392
+ hint: r,
393
+ fullWidth: l = !0,
394
394
  size: n = "m",
395
395
  disabled: a,
396
- id: l,
397
- resize: i = !0,
396
+ id: i,
397
+ resize: c = !0,
398
398
  rows: p = 3,
399
399
  ...f
400
400
  }) {
401
- const d = l || `textarea-${A.useId()}`, u = s ? `${d}-hint` : void 0, x = e ? `${d}-error` : void 0, b = x || u;
402
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-textarea-wrapper ${c ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
403
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
404
- /* @__PURE__ */ r.jsx(
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__ */ 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" : ""} ${i ? "" : "ds-textarea--no-resize"}`,
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
- s && !e && /* @__PURE__ */ r.jsx("span", { id: u, className: "ds-textarea-hint", children: s }),
417
- e && /* @__PURE__ */ r.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: e })
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 Fe({
420
+ function We({
421
421
  label: t,
422
422
  value: e,
423
- onChange: s,
424
- options: c = [],
423
+ onChange: r,
424
+ options: l = [],
425
425
  placeholder: n = "Select option",
426
426
  error: a,
427
- fullWidth: l = !0,
428
- size: i = "m",
427
+ fullWidth: i = !0,
428
+ size: c = "m",
429
429
  disabled: p = !1,
430
430
  id: f,
431
431
  ...d
432
432
  }) {
433
- const [u, x] = I(!1), [b, j] = I({}), [v, k] = I("down"), $ = L(null), S = L(null), m = f || `select-${A.useId()}`, _ = `${m}-label`, R = a ? `${m}-error` : void 0, g = () => {
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;
@@ -441,8 +441,8 @@ function Fe({
441
441
  };
442
442
  B(() => {
443
443
  if (u)
444
- return g(), window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
445
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
444
+ return I(), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
445
+ window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
446
446
  };
447
447
  }, [u]), B(() => {
448
448
  const w = (D) => {
@@ -450,23 +450,23 @@ function Fe({
450
450
  };
451
451
  return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
452
452
  }, []);
453
- const P = c.find((w) => w.value === e), M = i === "xs" ? T[1] : i === "small" ? T[2] : T[3], U = u && /* @__PURE__ */ r.jsx(
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
456
  ref: S,
457
457
  role: "listbox",
458
458
  "aria-labelledby": t ? _ : void 0,
459
- className: `ds-select-dropdown ds-select-dropdown--${i} ds-select-dropdown--${v}`,
459
+ className: `ds-select-dropdown ds-select-dropdown--${c} ds-select-dropdown--${v}`,
460
460
  style: b,
461
- children: c.map((w) => /* @__PURE__ */ r.jsx(
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--${i} ${e === w.value ? "ds-select-option--selected" : ""}`,
467
+ className: `ds-select-option ds-select-option--${c} ${e === w.value ? "ds-select-option--selected" : ""}`,
468
468
  onClick: () => {
469
- s == null || s(w.value), x(!1);
469
+ r == null || r(w.value), x(!1);
470
470
  },
471
471
  children: w.label
472
472
  },
@@ -474,9 +474,9 @@ function Fe({
474
474
  ))
475
475
  }
476
476
  );
477
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-select-wrapper ${l ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
478
- t && /* @__PURE__ */ r.jsx("label", { id: _, className: "ds-select-label", children: t }),
479
- /* @__PURE__ */ r.jsx("div", { className: "ds-select-container", ref: $, children: /* @__PURE__ */ r.jsxs(
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",
@@ -487,13 +487,13 @@ function Fe({
487
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--${i} ${a ? "ds-select-trigger--error" : ""}`,
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__ */ r.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || n }),
496
- /* @__PURE__ */ r.jsx(
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,128 +505,128 @@ function Fe({
505
505
  ]
506
506
  }
507
507
  ) }),
508
- a && /* @__PURE__ */ r.jsx("span", { id: R, className: "ds-select-error", role: "alert", children: a }),
509
- typeof document < "u" && C.createPortal(U, document.body)
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 We({
512
+ function Ye({
513
513
  label: t,
514
514
  value: e = 0,
515
- onChange: s,
516
- min: c = 0,
515
+ onChange: r,
516
+ min: l = 0,
517
517
  max: n = 100,
518
518
  step: a = 1,
519
- size: l = "m",
520
- disabled: i = !1,
519
+ size: i = "m",
520
+ disabled: c = !1,
521
521
  hint: p,
522
522
  error: f,
523
523
  ...d
524
524
  }) {
525
525
  const u = () => {
526
- if (i) return;
526
+ if (c) return;
527
527
  const $ = Math.min(Number(e) + a, n);
528
- s == null || s($);
528
+ r == null || r($);
529
529
  }, x = () => {
530
- if (i) return;
531
- const $ = Math.max(Number(e) - a, c);
532
- s == null || s($);
530
+ if (c) return;
531
+ const $ = Math.max(Number(e) - a, l);
532
+ r == null || r($);
533
533
  }, b = ($) => {
534
- if (i) return;
534
+ if (c) return;
535
535
  const S = $.target.value;
536
536
  if (S === "") {
537
- s == null || s(c);
537
+ r == null || r(l);
538
538
  return;
539
539
  }
540
540
  const m = Number(S);
541
541
  if (!isNaN(m)) {
542
- const _ = Math.min(Math.max(m, c), n);
543
- s == null || s(_);
542
+ const _ = Math.min(Math.max(m, l), n);
543
+ r == null || r(_);
544
544
  }
545
545
  }, j = [
546
546
  "ds-stepper-wrapper",
547
- i && "ds-stepper-wrapper--disabled",
547
+ c && "ds-stepper-wrapper--disabled",
548
548
  f && "ds-stepper-wrapper--error"
549
549
  ].filter(Boolean).join(" "), v = [
550
550
  "ds-stepper",
551
- `ds-stepper--${l}`,
552
- i && "ds-stepper--disabled"
553
- ].filter(Boolean).join(" "), k = l === "xs" ? T[1] : l === "small" ? T[2] : T[3];
554
- return /* @__PURE__ */ r.jsxs("div", { className: j, children: [
555
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-stepper-label", children: t }),
556
- /* @__PURE__ */ r.jsxs("div", { className: v, children: [
557
- /* @__PURE__ */ r.jsx(
551
+ `ds-stepper--${i}`,
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: i || e <= c,
563
+ disabled: c || e <= l,
564
564
  "aria-label": "Decrease",
565
- children: /* @__PURE__ */ r.jsx(ve, { size: k, strokeWidth: 1.5 })
565
+ children: /* @__PURE__ */ s.jsx(ve, { size: k, strokeWidth: 1.5 })
566
566
  }
567
567
  ),
568
- /* @__PURE__ */ r.jsx(
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: c,
575
+ min: l,
576
576
  max: n,
577
577
  step: a,
578
- disabled: i,
578
+ disabled: c,
579
579
  ...d
580
580
  }
581
581
  ),
582
- /* @__PURE__ */ r.jsx(
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: i || e >= n,
588
+ disabled: c || e >= n,
589
589
  "aria-label": "Increase",
590
- children: /* @__PURE__ */ r.jsx(je, { size: k, strokeWidth: 1.5 })
590
+ children: /* @__PURE__ */ s.jsx(je, { size: k, strokeWidth: 1.5 })
591
591
  }
592
592
  )
593
593
  ] }),
594
- p && !f && /* @__PURE__ */ r.jsx("div", { className: "ds-stepper-hint", children: p }),
595
- f && /* @__PURE__ */ r.jsx("div", { className: "ds-stepper-error", children: f })
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 Ye({
598
+ function ze({
599
599
  children: t,
600
600
  padding: e = "m",
601
- variant: s = "info",
602
- hover: c = !1,
601
+ variant: r = "info",
602
+ hover: l = !1,
603
603
  // deprecated, use variant="interactive"
604
604
  onClick: n,
605
605
  href: a,
606
- disabled: l = !1,
607
- ...i
606
+ disabled: i = !1,
607
+ ...c
608
608
  }) {
609
- const f = (c ? "interactive" : s) === "interactive" || n || a, d = [
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"
613
613
  ].filter(Boolean).join(" ");
614
614
  if (a) {
615
615
  const b = (j) => {
616
- if (l) {
616
+ if (i) {
617
617
  j.preventDefault();
618
618
  return;
619
619
  }
620
620
  j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), n == null || n(j));
621
621
  };
622
- return /* @__PURE__ */ r.jsx(
622
+ return /* @__PURE__ */ s.jsx(
623
623
  "a",
624
624
  {
625
625
  className: d,
626
- href: l ? void 0 : a,
626
+ href: i ? void 0 : a,
627
627
  onClick: b,
628
- "aria-disabled": l ? "true" : void 0,
629
- ...i,
628
+ "aria-disabled": i ? "true" : void 0,
629
+ ...c,
630
630
  children: t
631
631
  }
632
632
  );
@@ -634,53 +634,53 @@ function Ye({
634
634
  const u = f && n ? "button" : "div", x = f && n ? {
635
635
  type: "button",
636
636
  onClick: n,
637
- disabled: l
637
+ disabled: i
638
638
  } : {};
639
- return /* @__PURE__ */ r.jsx(
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
- ...i,
645
+ ...c,
646
646
  children: t
647
647
  }
648
648
  );
649
649
  }
650
- function ze({ children: t, ...e }) {
651
- return /* @__PURE__ */ r.jsx("h1", { className: "ds-h1", ...e, children: t });
652
- }
653
650
  function Ve({ children: t, ...e }) {
654
- return /* @__PURE__ */ r.jsx("h2", { className: "ds-h2", ...e, children: t });
651
+ return /* @__PURE__ */ s.jsx("h1", { className: "ds-h1", ...e, children: t });
655
652
  }
656
653
  function Ue({ children: t, ...e }) {
657
- return /* @__PURE__ */ r.jsx("h3", { className: "ds-h3", ...e, children: t });
654
+ return /* @__PURE__ */ s.jsx("h2", { className: "ds-h2", ...e, children: t });
658
655
  }
659
656
  function He({ children: t, ...e }) {
660
- return /* @__PURE__ */ r.jsx("h4", { className: "ds-h4", ...e, children: t });
657
+ return /* @__PURE__ */ s.jsx("h3", { className: "ds-h3", ...e, children: t });
658
+ }
659
+ function Ge({ children: t, ...e }) {
660
+ return /* @__PURE__ */ s.jsx("h4", { className: "ds-h4", ...e, children: t });
661
661
  }
662
- function Ge({ children: t, secondary: e = !1, ...s }) {
663
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p1 ${e ? "ds-p1--secondary" : ""}`, ...s, children: t });
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 qe({ children: t, secondary: e = !1, ...s }) {
666
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p2 ${e ? "ds-p2--secondary" : ""}`, ...s, children: t });
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 Xe({ children: t, secondary: e = !1, ...s }) {
669
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p3 ${e ? "ds-p3--secondary" : ""}`, ...s, children: t });
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
672
  children: t,
673
673
  variant: e = "default",
674
- size: s = "m",
675
- role: c,
674
+ size: r = "m",
675
+ role: l,
676
676
  ...n
677
677
  }) {
678
678
  const a = [
679
679
  "ds-badge",
680
680
  `ds-badge--${e}`,
681
- `ds-badge--${s}`
682
- ].filter(Boolean).join(" "), l = c || (["info", "success", "warning", "error"].includes(e) ? "status" : void 0);
683
- return /* @__PURE__ */ r.jsx("span", { className: a, role: l, ...n, children: t });
681
+ `ds-badge--${r}`
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,102 +688,102 @@ const $e = {
688
688
  warning: me,
689
689
  error: fe
690
690
  };
691
- function Ce({
691
+ function Ke({
692
692
  children: t,
693
693
  variant: e = "info",
694
- title: s,
695
- onClose: c,
694
+ title: r,
695
+ onClose: l,
696
696
  role: n,
697
697
  ...a
698
698
  }) {
699
- const l = $e[e], i = n || (e === "error" ? "alert" : "status");
700
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-alert ds-alert--${e} ${s ? "" : "ds-alert--no-title"}`, role: i, ...a, children: [
701
- l && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ r.jsx(l, { size: T[3], strokeWidth: 1.5 }) }),
702
- /* @__PURE__ */ r.jsxs("div", { className: "ds-alert__content", children: [
703
- s && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__title", children: s }),
704
- t && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__message", children: t })
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
- c && /* @__PURE__ */ r.jsx(
706
+ l && /* @__PURE__ */ s.jsx(
707
707
  "button",
708
708
  {
709
709
  type: "button",
710
710
  className: "ds-alert__close",
711
- onClick: c,
711
+ onClick: l,
712
712
  "aria-label": "Close alert",
713
- children: /* @__PURE__ */ r.jsx(se, { size: T[3], strokeWidth: 1.5 })
713
+ children: /* @__PURE__ */ s.jsx(se, { size: g[3], strokeWidth: 1.5 })
714
714
  }
715
715
  )
716
716
  ] });
717
717
  }
718
- function Ke({
718
+ function Ze({
719
719
  children: t,
720
720
  title: e,
721
- onClose: s,
722
- size: c = "m",
721
+ onClose: r,
722
+ size: l = "m",
723
723
  ...n
724
724
  }) {
725
- const a = L(null), l = A.useId();
725
+ const a = L(null), i = A.useId();
726
726
  B(() => {
727
727
  const d = (x) => {
728
- x.key === "Escape" && (s == null || s());
728
+ x.key === "Escape" && (r == null || r());
729
729
  }, u = (x) => {
730
- a.current && !a.current.contains(x.target) && (s == null || s());
730
+ a.current && !a.current.contains(x.target) && (r == null || r());
731
731
  };
732
732
  return document.addEventListener("keydown", d), document.addEventListener("mousedown", u), () => {
733
733
  document.removeEventListener("keydown", d), document.removeEventListener("mousedown", u);
734
734
  };
735
- }, [s]);
736
- const i = A.Children.toArray(t), p = i.find((d) => (d == null ? void 0 : d.type) === de), f = i.filter((d) => (d == null ? void 0 : d.type) !== de);
737
- return /* @__PURE__ */ r.jsx("div", { className: "ds-modal-overlay", ...n, children: /* @__PURE__ */ r.jsxs(
735
+ }, [r]);
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--${c}`,
740
+ className: `ds-modal ds-modal--${l}`,
741
741
  ref: a,
742
742
  role: "dialog",
743
743
  "aria-modal": "true",
744
- "aria-labelledby": e ? l : void 0,
744
+ "aria-labelledby": e ? i : void 0,
745
745
  children: [
746
- (e || s) && /* @__PURE__ */ r.jsxs("div", { className: "ds-modal__header", children: [
747
- e && /* @__PURE__ */ r.jsx("h3", { id: l, className: "ds-modal__title", children: e }),
748
- s && /* @__PURE__ */ r.jsx(
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__ */ r.jsx(se, { size: T[2], strokeWidth: 1.5 }),
754
- onClick: s,
753
+ icon: /* @__PURE__ */ s.jsx(se, { size: g[2], strokeWidth: 1.5 }),
754
+ onClick: r,
755
755
  "aria-label": "Close modal"
756
756
  }
757
757
  )
758
758
  ] }),
759
- /* @__PURE__ */ r.jsx("div", { className: "ds-modal__body", children: f }),
759
+ /* @__PURE__ */ s.jsx("div", { className: "ds-modal__body", children: f }),
760
760
  p
761
761
  ]
762
762
  }
763
763
  ) });
764
764
  }
765
765
  function de({ children: t }) {
766
- return /* @__PURE__ */ r.jsx("div", { className: "ds-modal__footer", children: t });
766
+ return /* @__PURE__ */ s.jsx("div", { className: "ds-modal__footer", children: t });
767
767
  }
768
768
  function Re({
769
769
  children: t,
770
770
  title: e = "Code",
771
- defaultExpanded: s = !1,
772
- expanded: c,
771
+ defaultExpanded: r = !1,
772
+ expanded: l,
773
773
  onToggle: n,
774
774
  padding: a = "s",
775
- className: l = "",
776
- ...i
775
+ className: i = "",
776
+ ...c
777
777
  }) {
778
- const [p, f] = I(s), d = c !== void 0, u = d ? c : p, x = () => {
779
- d ? n == null || n(!c) : f((j) => !j);
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
- l
783
+ i
784
784
  ].filter(Boolean).join(" ");
785
- return /* @__PURE__ */ r.jsxs("div", { className: b, ...i, children: [
786
- /* @__PURE__ */ r.jsxs(
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__ */ r.jsx("span", { className: "ds-code-accordion__title", children: e }),
795
- /* @__PURE__ */ r.jsx(
794
+ /* @__PURE__ */ s.jsx("span", { className: "ds-code-accordion__title", children: e }),
795
+ /* @__PURE__ */ s.jsx(
796
796
  K,
797
797
  {
798
- size: T[2],
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,93 +803,93 @@ function Re({
803
803
  ]
804
804
  }
805
805
  ),
806
- u && /* @__PURE__ */ r.jsx("pre", { className: "ds-code-accordion__content", children: /* @__PURE__ */ r.jsx("code", { children: t }) })
806
+ u && /* @__PURE__ */ s.jsx("pre", { className: "ds-code-accordion__content", children: /* @__PURE__ */ s.jsx("code", { children: t }) })
807
807
  ] });
808
808
  }
809
- function Ze({ children: t, block: e = !1, collapsible: s = !1, title: c = "Code", defaultExpanded: n = !1, ...a }) {
810
- return e ? s ? /* @__PURE__ */ r.jsx(Re, { title: c, defaultExpanded: n, ...a, children: t }) : /* @__PURE__ */ r.jsx("pre", { className: "ds-code-block", ...a, children: /* @__PURE__ */ r.jsx("code", { children: t }) }) : /* @__PURE__ */ r.jsx("code", { className: "ds-code-inline", ...a, children: t });
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 Qe({ href: t, children: e, onClick: s, target: c, rel: n, ...a }) {
813
- const i = c === "_blank" ? n ? `${n} noopener noreferrer` : "noopener noreferrer" : n;
814
- return /* @__PURE__ */ r.jsx(
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
817
  href: t,
818
818
  className: "ds-link",
819
- onClick: s,
820
- target: c,
821
- rel: i,
819
+ onClick: r,
820
+ target: l,
821
+ rel: c,
822
822
  ...a,
823
823
  children: e
824
824
  }
825
825
  );
826
826
  }
827
- function et({ children: t, size: e = "m", variant: s = "ghost", ...c }) {
828
- return /* @__PURE__ */ r.jsx("div", { className: "ds-tabs", role: "tablist", ...c, children: A.Children.map(t, (n) => A.isValidElement(n) ? A.cloneElement(n, { size: e, variant: s }) : n) });
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 tt({ children: t, selected: e = !1, onClick: s, size: c = "m", variant: n = "ghost", disabled: a = !1, icon: l, href: i, ...p }) {
831
- const f = l && !t, d = [
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--${c}`,
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__ */ r.jsxs(r.Fragment, { children: [
838
- l && /* @__PURE__ */ r.jsx("span", { className: "ds-tab-icon", children: l }),
837
+ ].filter(Boolean).join(" "), u = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
838
+ i && /* @__PURE__ */ s.jsx("span", { className: "ds-tab-icon", children: i }),
839
839
  t
840
840
  ] });
841
- if (i) {
841
+ if (c) {
842
842
  const x = (b) => {
843
843
  if (a) {
844
844
  b.preventDefault();
845
845
  return;
846
846
  }
847
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), s == null || s(b));
847
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), r == null || r(b));
848
848
  };
849
- return /* @__PURE__ */ r.jsx(
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 : i,
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__ */ r.jsx(
863
+ return /* @__PURE__ */ s.jsx(
864
864
  "button",
865
865
  {
866
866
  role: "tab",
867
867
  "aria-selected": e,
868
868
  className: d,
869
- onClick: s,
869
+ onClick: r,
870
870
  disabled: a,
871
871
  ...p,
872
872
  children: u
873
873
  }
874
874
  );
875
875
  }
876
- function st({
876
+ function rt({
877
877
  children: t,
878
878
  title: e,
879
- defaultExpanded: s = !1,
880
- expanded: c,
879
+ defaultExpanded: r = !1,
880
+ expanded: l,
881
881
  onToggle: n,
882
882
  padding: a = "m",
883
- ...l
883
+ ...i
884
884
  }) {
885
- const [i, p] = I(s), f = c !== void 0, d = f ? c : i, u = () => {
886
- f ? n == null || n(!c) : p((b) => !b);
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__ */ r.jsxs("div", { className: x, ...l, children: [
892
- /* @__PURE__ */ r.jsxs(
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__ */ r.jsx("span", { className: "ds-accordion__title", children: e }),
901
- /* @__PURE__ */ r.jsx(
900
+ /* @__PURE__ */ s.jsx("span", { className: "ds-accordion__title", children: e }),
901
+ /* @__PURE__ */ s.jsx(
902
902
  K,
903
903
  {
904
- size: T[2],
904
+ size: g[2],
905
905
  strokeWidth: 1.5,
906
906
  className: `ds-accordion__icon ${d ? "ds-accordion__icon--expanded" : ""}`
907
907
  }
@@ -909,46 +909,46 @@ function st({
909
909
  ]
910
910
  }
911
911
  ),
912
- d && /* @__PURE__ */ r.jsx("div", { className: "ds-accordion__content", children: t })
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(t, e, s) {
917
- const c = window.innerWidth;
916
+ function Te(t, e, r) {
917
+ const l = window.innerWidth;
918
918
  let n, a;
919
919
  switch (t) {
920
920
  case "top":
921
- n = e.top - s.height - O, a = e.left + e.width / 2 - s.width / 2;
921
+ n = e.top - r.height - O, a = e.left + e.width / 2 - r.width / 2;
922
922
  break;
923
923
  case "bottom":
924
- n = e.bottom + O, a = e.left + e.width / 2 - s.width / 2;
924
+ n = e.bottom + O, a = e.left + e.width / 2 - r.width / 2;
925
925
  break;
926
926
  case "left":
927
- n = e.top + e.height / 2 - s.height / 2, a = e.left - s.width - O;
927
+ n = e.top + e.height / 2 - r.height / 2, a = e.left - r.width - O;
928
928
  break;
929
929
  case "right":
930
- n = e.top + e.height / 2 - s.height / 2, a = e.right + O;
930
+ n = e.top + e.height / 2 - r.height / 2, a = e.right + O;
931
931
  break;
932
932
  default:
933
933
  n = e.bottom + O, a = e.left;
934
934
  }
935
- const l = Math.max(z, Math.min(c - s.width - z, a)), i = a - l;
936
- return { top: n, left: l, arrowOffset: i };
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 Se(t, e, s) {
939
- const c = window.innerWidth, n = window.innerHeight;
938
+ function ge(t, e, r) {
939
+ const l = window.innerWidth, n = window.innerHeight;
940
940
  if (t.top >= e + O + z) return "top";
941
941
  if (n - t.bottom >= e + O + z) return "bottom";
942
- if (c - t.right >= s + O + z) return "right";
943
- if (t.left >= s + O + z) return "left";
944
- const a = Math.max(t.top, n - t.bottom, t.left, c - t.right);
945
- return a === t.top ? "top" : a === n - t.bottom ? "bottom" : a === c - t.right ? "right" : "left";
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 rt({ children: t, content: e, position: s, ...c }) {
948
- const [n, a] = I(!1), [l, i] = I({ visibility: "hidden" }), [p, f] = I(s || "top"), d = L(null), u = L(null), x = L(!1), b = () => {
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(), $ = s || Se(v, k.height, k.width), { top: S, left: m, arrowOffset: _ } = Te($, v, k);
951
- f($), i({
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
953
  top: S,
954
954
  left: m,
@@ -958,29 +958,29 @@ function rt({ children: t, content: e, position: s, ...c }) {
958
958
  };
959
959
  if (B(() => {
960
960
  if (!n) return;
961
- i({ position: "fixed", visibility: "hidden" });
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);
965
965
  };
966
- }, [n, s]), B(() => {
966
+ }, [n, r]), B(() => {
967
967
  if (!n) return;
968
968
  const v = (k) => {
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
972
  }, [n]), !e) return t;
973
- const j = n && /* @__PURE__ */ r.jsx(
973
+ const j = n && /* @__PURE__ */ s.jsx(
974
974
  "div",
975
975
  {
976
976
  ref: u,
977
977
  className: `ds-tooltip ds-tooltip--${p}`,
978
978
  role: "tooltip",
979
- style: l,
979
+ style: i,
980
980
  children: e
981
981
  }
982
982
  );
983
- return /* @__PURE__ */ r.jsxs(
983
+ return /* @__PURE__ */ s.jsxs(
984
984
  "div",
985
985
  {
986
986
  ref: d,
@@ -994,73 +994,73 @@ function rt({ children: t, content: e, position: s, ...c }) {
994
994
  onTouchStart: () => {
995
995
  x.current = !0, a((v) => !v);
996
996
  },
997
- ...c,
997
+ ...l,
998
998
  children: [
999
999
  t,
1000
- typeof document < "u" && C.createPortal(j, document.body)
1000
+ typeof document < "u" && J.createPortal(j, document.body)
1001
1001
  ]
1002
1002
  }
1003
1003
  );
1004
1004
  }
1005
- function nt({
1005
+ function at({
1006
1006
  checked: t = !1,
1007
1007
  onChange: e,
1008
- size: s = "m",
1009
- disabled: c = !1,
1008
+ size: r = "m",
1009
+ disabled: l = !1,
1010
1010
  label: n,
1011
1011
  id: a,
1012
- ...l
1012
+ ...i
1013
1013
  }) {
1014
- const i = a || `toggle-${A.useId()}`, p = [
1014
+ const c = a || `toggle-${A.useId()}`, p = [
1015
1015
  "ds-toggle",
1016
- `ds-toggle--${s}`,
1017
- c && "ds-toggle--disabled"
1016
+ `ds-toggle--${r}`,
1017
+ l && "ds-toggle--disabled"
1018
1018
  ].filter(Boolean).join(" ");
1019
- return /* @__PURE__ */ r.jsxs("label", { className: p, htmlFor: i, children: [
1020
- /* @__PURE__ */ r.jsx(
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: i,
1024
+ id: c,
1025
1025
  className: "ds-toggle__input",
1026
1026
  checked: t,
1027
1027
  onChange: (f) => e == null ? void 0 : e(f.target.checked),
1028
- disabled: c,
1029
- ...l
1028
+ disabled: l,
1029
+ ...i
1030
1030
  }
1031
1031
  ),
1032
- /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__thumb" }) }),
1033
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__label", children: n })
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 at({
1036
+ function ot({
1037
1037
  checked: t = !1,
1038
1038
  onChange: e,
1039
- size: s = "m",
1040
- disabled: c = !1,
1039
+ size: r = "m",
1040
+ disabled: l = !1,
1041
1041
  label: n,
1042
1042
  id: a,
1043
- ...l
1043
+ ...i
1044
1044
  }) {
1045
- const i = a || `checkbox-${A.useId()}`, p = [
1045
+ const c = a || `checkbox-${A.useId()}`, p = [
1046
1046
  "ds-checkbox",
1047
- `ds-checkbox--${s}`,
1048
- c && "ds-checkbox--disabled"
1049
- ].filter(Boolean).join(" "), f = s === "xs" ? 10 : s === "small" ? 14 : s === "large" ? 20 : 16;
1050
- return /* @__PURE__ */ r.jsxs("label", { className: p, htmlFor: i, children: [
1051
- /* @__PURE__ */ r.jsx(
1047
+ `ds-checkbox--${r}`,
1048
+ l && "ds-checkbox--disabled"
1049
+ ].filter(Boolean).join(" "), f = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
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: i,
1055
+ id: c,
1056
1056
  className: "ds-checkbox__input",
1057
1057
  checked: t,
1058
1058
  onChange: (d) => e == null ? void 0 : e(d.target.checked),
1059
- disabled: c,
1060
- ...l
1059
+ disabled: l,
1060
+ ...i
1061
1061
  }
1062
1062
  ),
1063
- /* @__PURE__ */ r.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ r.jsx(
1063
+ /* @__PURE__ */ s.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ s.jsx(
1064
1064
  _e,
1065
1065
  {
1066
1066
  size: f,
@@ -1068,27 +1068,27 @@ function at({
1068
1068
  className: "ds-checkbox__icon"
1069
1069
  }
1070
1070
  ) }),
1071
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-checkbox__label", children: n })
1071
+ n && /* @__PURE__ */ s.jsx("span", { className: "ds-checkbox__label", children: n })
1072
1072
  ] });
1073
1073
  }
1074
- function ot({
1074
+ function lt({
1075
1075
  checked: t = !1,
1076
1076
  onChange: e,
1077
- size: s = "m",
1078
- disabled: c = !1,
1077
+ size: r = "m",
1078
+ disabled: l = !1,
1079
1079
  label: n,
1080
1080
  name: a,
1081
- value: l,
1082
- id: i,
1081
+ value: i,
1082
+ id: c,
1083
1083
  ...p
1084
1084
  }) {
1085
- const f = i || `radio-${A.useId()}`, d = [
1085
+ const f = c || `radio-${A.useId()}`, d = [
1086
1086
  "ds-radio",
1087
- `ds-radio--${s}`,
1088
- c && "ds-radio--disabled"
1087
+ `ds-radio--${r}`,
1088
+ l && "ds-radio--disabled"
1089
1089
  ].filter(Boolean).join(" ");
1090
- return /* @__PURE__ */ r.jsxs("label", { className: d, htmlFor: f, children: [
1091
- /* @__PURE__ */ r.jsx(
1090
+ return /* @__PURE__ */ s.jsxs("label", { className: d, htmlFor: f, children: [
1091
+ /* @__PURE__ */ s.jsx(
1092
1092
  "input",
1093
1093
  {
1094
1094
  type: "radio",
@@ -1096,102 +1096,107 @@ function ot({
1096
1096
  className: "ds-radio__input",
1097
1097
  checked: t,
1098
1098
  onChange: (u) => e == null ? void 0 : e(u.target.checked),
1099
- disabled: c,
1099
+ disabled: l,
1100
1100
  name: a,
1101
- value: l,
1101
+ value: i,
1102
1102
  ...p
1103
1103
  }
1104
1104
  ),
1105
- /* @__PURE__ */ r.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ r.jsx("span", { className: "ds-radio__dot" }) }),
1106
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-radio__label", children: n })
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: t = "m", color: e = "default", className: s = "", ...c }) {
1110
- return /* @__PURE__ */ r.jsx(
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--${t}`, `ds-spinner--${e}`, s].filter(Boolean).join(" "),
1113
+ className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${e}`, r].filter(Boolean).join(" "),
1114
1114
  role: "status",
1115
1115
  "aria-label": "Loading",
1116
- ...c
1116
+ ...l
1117
1117
  }
1118
1118
  );
1119
1119
  }
1120
- function lt({ width: t, height: e, shape: s = "rect", className: c = "", style: n = {}, ...a }) {
1121
- return /* @__PURE__ */ r.jsx(
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--${s}`, c].filter(Boolean).join(" "),
1124
+ className: ["ds-skeleton", `ds-skeleton--${r}`, l].filter(Boolean).join(" "),
1125
1125
  style: { width: t, height: e, ...n },
1126
1126
  "aria-hidden": "true",
1127
1127
  ...a
1128
1128
  }
1129
1129
  );
1130
1130
  }
1131
- function ge(t) {
1131
+ function Se(t) {
1132
1132
  let e = 2166136261;
1133
- for (let s = 0; s < t.length; s++)
1134
- e ^= t.charCodeAt(s), e = Math.imul(e, 16777619) >>> 0;
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 it({ seed: t, icon: e, size: s = 32, className: c = "", style: n = {}, ...a }) {
1138
- const l = ge(t ?? "");
1139
- return /* @__PURE__ */ r.jsx(
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
- className: ["ds-avatar", c].filter(Boolean).join(" "),
1143
- style: { width: s, height: s, "--ds-avatar-h": l, ...n },
1147
+ className: ["ds-avatar", n].filter(Boolean).join(" "),
1148
+ style: { width: l, height: l, "--ds-avatar-h": c, ...a },
1144
1149
  "aria-hidden": "true",
1145
- ...a,
1146
- children: e
1150
+ ...i,
1151
+ children: r && !p ? /* @__PURE__ */ s.jsx("img", { src: r, alt: "", onError: () => f(!0) }) : d
1147
1152
  }
1148
1153
  );
1149
1154
  }
1150
- function dt({
1155
+ function ut({
1151
1156
  children: t,
1152
1157
  size: e = "compact",
1153
- stickyTop: s,
1154
- maxHeight: c,
1158
+ stickyTop: r,
1159
+ maxHeight: l,
1155
1160
  className: n = "",
1156
1161
  style: a = {},
1157
- ...l
1162
+ ...i
1158
1163
  }) {
1159
- const i = {
1160
- ...c ? { maxHeight: c } : {},
1161
- ...s !== void 0 ? { "--ds-table-sticky-top": typeof s == "number" ? `${s}px` : s } : {},
1164
+ const c = {
1165
+ ...l ? { maxHeight: l } : {},
1166
+ ...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
1162
1167
  ...a
1163
1168
  };
1164
- return /* @__PURE__ */ r.jsx(
1169
+ return /* @__PURE__ */ s.jsx(
1165
1170
  "div",
1166
1171
  {
1167
- className: ["ds-table-wrap", c ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1168
- style: i,
1169
- children: /* @__PURE__ */ r.jsx(
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
- ...l,
1178
+ ...i,
1174
1179
  children: t
1175
1180
  }
1176
1181
  )
1177
1182
  }
1178
1183
  );
1179
1184
  }
1180
- function ut({ children: t, ...e }) {
1181
- return /* @__PURE__ */ r.jsx("thead", { ...e, children: t });
1182
- }
1183
1185
  function ft({ children: t, ...e }) {
1184
- return /* @__PURE__ */ r.jsx("tbody", { ...e, children: t });
1186
+ return /* @__PURE__ */ s.jsx("thead", { ...e, children: t });
1187
+ }
1188
+ function mt({ children: t, ...e }) {
1189
+ return /* @__PURE__ */ s.jsx("tbody", { ...e, children: t });
1185
1190
  }
1186
- function mt({ children: t, interactive: e, selected: s, className: c = "", onClick: n, ...a }) {
1187
- return /* @__PURE__ */ r.jsx(
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
- s ? "ds-table-row--selected" : "",
1194
- c
1198
+ r ? "ds-table-row--selected" : "",
1199
+ l
1195
1200
  ].filter(Boolean).join(" "),
1196
1201
  onClick: n,
1197
1202
  ...a,
@@ -1199,84 +1204,84 @@ function mt({ children: t, interactive: e, selected: s, className: c = "", onCli
1199
1204
  }
1200
1205
  );
1201
1206
  }
1202
- function pt({ children: t, align: e = "left", sortDir: s, onSort: c, width: n, className: a = "", style: l = {}, ...i }) {
1203
- const p = !!c || s !== void 0, f = s === "asc" ? we : s === "desc" ? K : Ne;
1204
- return /* @__PURE__ */ r.jsx(
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: [
1208
1213
  "ds-th",
1209
1214
  p ? "ds-th--sortable" : "",
1210
- s ? "ds-th--sorted" : "",
1215
+ r ? "ds-th--sorted" : "",
1211
1216
  e !== "left" ? `ds-table-cell--${e}` : "",
1212
1217
  a
1213
1218
  ].filter(Boolean).join(" "),
1214
- onClick: c,
1215
- style: { width: n, ...l },
1216
- ...i,
1217
- children: p ? /* @__PURE__ */ r.jsxs("span", { className: "ds-th__inner", children: [
1219
+ onClick: l,
1220
+ style: { width: n, ...i },
1221
+ ...c,
1222
+ children: p ? /* @__PURE__ */ s.jsxs("span", { className: "ds-th__inner", children: [
1218
1223
  t,
1219
- /* @__PURE__ */ r.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ r.jsx(f, { size: 11, strokeWidth: 2.5 }) })
1224
+ /* @__PURE__ */ s.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ s.jsx(f, { size: 11, strokeWidth: 2.5 }) })
1220
1225
  ] }) : t
1221
1226
  }
1222
1227
  );
1223
1228
  }
1224
- function bt({ children: t, align: e = "left", secondary: s, muted: c, truncate: n, nowrap: a, className: l = "", ...i }) {
1225
- return /* @__PURE__ */ r.jsx(
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
- s ? "ds-table-cell--secondary" : "",
1232
- c ? "ds-table-cell--muted" : "",
1236
+ r ? "ds-table-cell--secondary" : "",
1237
+ l ? "ds-table-cell--muted" : "",
1233
1238
  n ? "ds-table-cell--truncate" : "",
1234
1239
  a ? "ds-table-cell--nowrap" : "",
1235
- l
1240
+ i
1236
1241
  ].filter(Boolean).join(" "),
1237
- ...i,
1242
+ ...c,
1238
1243
  children: t
1239
1244
  }
1240
1245
  );
1241
1246
  }
1242
- function ht({
1247
+ function xt({
1243
1248
  icon: t,
1244
1249
  title: e,
1245
- description: s,
1246
- action: c,
1250
+ description: r,
1251
+ action: l,
1247
1252
  size: n = "m",
1248
1253
  className: a = "",
1249
- ...l
1254
+ ...i
1250
1255
  }) {
1251
- return /* @__PURE__ */ r.jsxs(
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
- ...l,
1260
+ ...i,
1256
1261
  children: [
1257
- t && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__icon", children: t }),
1258
- /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__title", children: e }),
1259
- s && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__description", children: s }),
1260
- c && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__action", children: c })
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 xt({
1270
+ function vt({
1266
1271
  trigger: t,
1267
1272
  items: e = [],
1268
- open: s,
1269
- onOpenChange: c,
1273
+ open: r,
1274
+ onOpenChange: l,
1270
1275
  align: n = "left",
1271
1276
  className: a = "",
1272
- style: l,
1273
- ...i
1277
+ style: i,
1278
+ ...c
1274
1279
  }) {
1275
- const [p, f] = I(!1), d = s !== void 0, u = d ? s : p, x = L(null), b = L(null), [j, v] = I({}), k = () => {
1276
- d ? c == null || c(!1) : f(!1);
1280
+ const [p, f] = T(!1), d = r !== void 0, u = d ? r : p, x = L(null), b = L(null), [j, v] = T({}), k = () => {
1281
+ d ? l == null || l(!1) : f(!1);
1277
1282
  }, $ = () => {
1278
1283
  const m = !u;
1279
- d ? c == null || c(m) : f(m);
1284
+ d ? l == null || l(m) : f(m);
1280
1285
  };
1281
1286
  B(() => {
1282
1287
  if (!u) return;
@@ -1293,8 +1298,8 @@ function xt({
1293
1298
  }, [u, n]), B(() => {
1294
1299
  if (!u) return;
1295
1300
  const m = (R) => {
1296
- var g, P;
1297
- !((g = x.current) != null && g.contains(R.target)) && !((P = b.current) != null && P.contains(R.target)) && k();
1301
+ var I, P;
1302
+ !((I = x.current) != null && I.contains(R.target)) && !((P = b.current) != null && P.contains(R.target)) && k();
1298
1303
  }, _ = (R) => {
1299
1304
  R.key === "Escape" && k();
1300
1305
  };
@@ -1302,7 +1307,7 @@ function xt({
1302
1307
  document.removeEventListener("mousedown", m), document.removeEventListener("keydown", _);
1303
1308
  };
1304
1309
  }, [u]);
1305
- const S = u && /* @__PURE__ */ r.jsx(
1310
+ const S = u && /* @__PURE__ */ s.jsx(
1306
1311
  "div",
1307
1312
  {
1308
1313
  ref: b,
@@ -1310,15 +1315,15 @@ function xt({
1310
1315
  style: j,
1311
1316
  children: e.map((m, _) => {
1312
1317
  if (m.separator)
1313
- return /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__separator" }, _);
1318
+ return /* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__separator" }, _);
1314
1319
  if (m.type === "section")
1315
- return /* @__PURE__ */ r.jsxs("div", { className: "ds-dropdown__section", children: [
1316
- m.label && /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__section-label", children: m.label }),
1317
- /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__section-content", children: m.content })
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
- const R = !!m.href, g = 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__ */ r.jsxs(
1321
- g,
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 };
1325
+ return /* @__PURE__ */ s.jsxs(
1326
+ I,
1322
1327
  {
1323
1328
  className: [
1324
1329
  "ds-dropdown__item",
@@ -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__ */ r.jsx("span", { className: "ds-dropdown__item-icon", children: m.icon }),
1334
- /* @__PURE__ */ r.jsx("span", { className: "ds-dropdown__item-label", children: m.label }),
1335
- m.shortcut && /* @__PURE__ */ r.jsx("span", { className: "ds-dropdown__item-shortcut", children: m.shortcut })
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__ */ r.jsxs(
1348
+ return /* @__PURE__ */ s.jsxs(
1344
1349
  "div",
1345
1350
  {
1346
1351
  ref: x,
1347
1352
  className: ["ds-dropdown", a].filter(Boolean).join(" "),
1348
- style: l,
1349
- ...i,
1353
+ style: i,
1354
+ ...c,
1350
1355
  children: [
1351
- /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__trigger", onClick: $, children: t }),
1352
- typeof document < "u" && C.createPortal(S, document.body)
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
  );
@@ -1368,101 +1373,101 @@ function he() {
1368
1373
  function Ae(t) {
1369
1374
  V = [...V, t], he();
1370
1375
  }
1371
- function Ie(t) {
1376
+ function Pe(t) {
1372
1377
  V = V.filter((e) => e.id !== t), he();
1373
1378
  }
1374
- function vt() {
1375
- const t = (e, s = {}) => {
1379
+ function jt() {
1380
+ const t = (e, r = {}) => {
1376
1381
  Ae({
1377
1382
  id: `${Date.now()}-${Math.random()}`,
1378
1383
  message: e,
1379
1384
  type: "default",
1380
1385
  duration: 4e3,
1381
- ...s
1386
+ ...r
1382
1387
  });
1383
1388
  };
1384
- return t.success = (e, s) => t(e, { ...s, type: "success" }), t.error = (e, s) => t(e, { ...s, type: "error" }), t.warning = (e, s) => t(e, { ...s, type: "warning" }), { toast: t };
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 Pe({ data: t, onDismiss: e }) {
1387
- const [s, c] = I(!1), n = L(null);
1388
- B(() => (requestAnimationFrame(() => c(!0)), t.duration > 0 && (n.current = setTimeout(() => a(), t.duration)), () => clearTimeout(n.current)), []);
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
- c(!1), setTimeout(() => e(t.id), 250);
1395
+ l(!1), setTimeout(() => e(t.id), 250);
1391
1396
  }
1392
- const l = ue[t.type] ?? ue.default;
1393
- return /* @__PURE__ */ r.jsxs(
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
1403
  `ds-toast--${t.type}`,
1399
- s && "ds-toast--visible"
1404
+ r && "ds-toast--visible"
1400
1405
  ].filter(Boolean).join(" "),
1401
1406
  role: t.type === "error" ? "alert" : "status",
1402
1407
  "aria-live": "polite",
1403
1408
  children: [
1404
- /* @__PURE__ */ r.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ r.jsx(l, { size: T[3], strokeWidth: 1.5 }) }),
1405
- /* @__PURE__ */ r.jsx("span", { className: "ds-toast__message", children: t.message }),
1406
- /* @__PURE__ */ r.jsx(
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__ */ r.jsx(se, { size: T[3], strokeWidth: 1.5 })
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 jt({ position: t = "bottom-right" }) {
1420
- const [e, s] = I(() => [...V]);
1421
- return B(() => (te.add(s), () => te.delete(s)), []), !e.length || typeof document > "u" ? null : C.createPortal(
1422
- /* @__PURE__ */ r.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: e.map((c) => /* @__PURE__ */ r.jsx(Pe, { data: c, onDismiss: Ie }, c.id)) }),
1424
+ function _t({ position: t = "bottom-right" }) {
1425
+ const [e, r] = T(() => [...V]);
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
- st as Accordion,
1428
- Ce as Alert,
1429
- it as Avatar,
1432
+ rt as Accordion,
1433
+ Ke as Alert,
1434
+ dt as Avatar,
1430
1435
  Je as Badge,
1431
1436
  ke as Button,
1432
- Ye as Card,
1433
- at as Checkbox,
1434
- Ze as Code,
1437
+ ze as Card,
1438
+ ot as Checkbox,
1439
+ Qe as Code,
1435
1440
  Re as CodeAccordion,
1436
- xt as Dropdown,
1437
- ht as EmptyState,
1438
- ze as H1,
1439
- Ve as H2,
1440
- Ue as H3,
1441
- He as H4,
1442
- De as Input,
1443
- Qe as Link,
1444
- Ke as Modal,
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
- Ge as P1,
1447
- qe as P2,
1448
- Xe as P3,
1449
- ot as Radio,
1450
- Fe as Select,
1451
- lt as Skeleton,
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
- We as Stepper,
1454
- tt as Tab,
1455
- dt as Table,
1456
- ft as TableBody,
1457
- ut as TableHead,
1458
- mt as TableRow,
1459
- et as Tabs,
1460
- bt as Td,
1461
- Me as Textarea,
1462
- pt as Th,
1463
- jt as ToastContainer,
1464
- nt as Toggle,
1465
- rt as Tooltip,
1466
- T as iconSizes,
1467
- vt as useToast
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
  };