@donkit-ai/design-system 1.1.31 → 1.3.0

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