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