@donkit-ai/design-system 1.1.23 → 1.1.25

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