@donkit-ai/design-system 1.1.30 → 1.3.0

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