@sandurtech/sandui 0.0.2 → 0.1.1
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/README.md +23 -5
- package/dist/index.d.ts +1 -284
- package/dist/sandui.js +1536 -902
- package/dist/sandui.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/sandui.js
CHANGED
|
@@ -1,269 +1,269 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
1
|
+
import Wn, { forwardRef as f, useContext as ve, createContext as ye, useState as F, useId as O, Children as be, isValidElement as X, useMemo as E, useCallback as A, useRef as z, useEffect as K, cloneElement as sn } from "react";
|
|
2
|
+
import { createPortal as rn } from "react-dom";
|
|
3
|
+
var Se = { exports: {} }, ce = {};
|
|
4
|
+
var Xe;
|
|
5
|
+
function Un() {
|
|
6
|
+
if (Xe) return ce;
|
|
7
|
+
Xe = 1;
|
|
8
8
|
var s = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
-
function
|
|
9
|
+
function n(t, r, o) {
|
|
10
10
|
var c = null;
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
for (var
|
|
14
|
-
|
|
15
|
-
} else
|
|
16
|
-
return r =
|
|
11
|
+
if (o !== void 0 && (c = "" + o), r.key !== void 0 && (c = "" + r.key), "key" in r) {
|
|
12
|
+
o = {};
|
|
13
|
+
for (var d in r)
|
|
14
|
+
d !== "key" && (o[d] = r[d]);
|
|
15
|
+
} else o = r;
|
|
16
|
+
return r = o.ref, {
|
|
17
17
|
$$typeof: s,
|
|
18
18
|
type: t,
|
|
19
19
|
key: c,
|
|
20
20
|
ref: r !== void 0 ? r : null,
|
|
21
|
-
props:
|
|
21
|
+
props: o
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return ce.Fragment = e, ce.jsx = n, ce.jsxs = n, ce;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
function s(
|
|
31
|
-
if (
|
|
32
|
-
if (typeof
|
|
33
|
-
return
|
|
34
|
-
if (typeof
|
|
35
|
-
switch (
|
|
36
|
-
case
|
|
26
|
+
var ie = {};
|
|
27
|
+
var Ze;
|
|
28
|
+
function Jn() {
|
|
29
|
+
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
30
|
+
function s(u) {
|
|
31
|
+
if (u == null) return null;
|
|
32
|
+
if (typeof u == "function")
|
|
33
|
+
return u.$$typeof === S ? null : u.displayName || u.name || null;
|
|
34
|
+
if (typeof u == "string") return u;
|
|
35
|
+
switch (u) {
|
|
36
|
+
case j:
|
|
37
37
|
return "Fragment";
|
|
38
|
-
case
|
|
38
|
+
case D:
|
|
39
39
|
return "Profiler";
|
|
40
|
-
case
|
|
40
|
+
case y:
|
|
41
41
|
return "StrictMode";
|
|
42
|
-
case
|
|
42
|
+
case Z:
|
|
43
43
|
return "Suspense";
|
|
44
|
-
case
|
|
44
|
+
case W:
|
|
45
45
|
return "SuspenseList";
|
|
46
|
-
case
|
|
46
|
+
case Ce:
|
|
47
47
|
return "Activity";
|
|
48
48
|
}
|
|
49
|
-
if (typeof
|
|
50
|
-
switch (typeof
|
|
49
|
+
if (typeof u == "object")
|
|
50
|
+
switch (typeof u.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
|
-
),
|
|
53
|
-
case
|
|
52
|
+
), u.$$typeof) {
|
|
53
|
+
case g:
|
|
54
54
|
return "Portal";
|
|
55
|
-
case
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
return (
|
|
59
|
-
case
|
|
60
|
-
var
|
|
61
|
-
return
|
|
62
|
-
case
|
|
63
|
-
return
|
|
64
|
-
case
|
|
65
|
-
|
|
55
|
+
case Y:
|
|
56
|
+
return u.displayName || "Context";
|
|
57
|
+
case P:
|
|
58
|
+
return (u._context.displayName || "Context") + ".Consumer";
|
|
59
|
+
case I:
|
|
60
|
+
var x = u.render;
|
|
61
|
+
return u = u.displayName, u || (u = x.displayName || x.name || "", u = u !== "" ? "ForwardRef(" + u + ")" : "ForwardRef"), u;
|
|
62
|
+
case oe:
|
|
63
|
+
return x = u.displayName || null, x !== null ? x : s(u.type) || "Memo";
|
|
64
|
+
case U:
|
|
65
|
+
x = u._payload, u = u._init;
|
|
66
66
|
try {
|
|
67
|
-
return s(
|
|
67
|
+
return s(u(x));
|
|
68
68
|
} catch {
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
function e(
|
|
74
|
-
return "" +
|
|
73
|
+
function e(u) {
|
|
74
|
+
return "" + u;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function n(u) {
|
|
77
77
|
try {
|
|
78
|
-
e(
|
|
79
|
-
var
|
|
78
|
+
e(u);
|
|
79
|
+
var x = !1;
|
|
80
80
|
} catch {
|
|
81
|
-
|
|
81
|
+
x = !0;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
var
|
|
86
|
-
return
|
|
87
|
-
|
|
83
|
+
if (x) {
|
|
84
|
+
x = console;
|
|
85
|
+
var N = x.error, k = typeof Symbol == "function" && Symbol.toStringTag && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
86
|
+
return N.call(
|
|
87
|
+
x,
|
|
88
88
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
89
|
-
|
|
90
|
-
), e(
|
|
89
|
+
k
|
|
90
|
+
), e(u);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function t(
|
|
94
|
-
if (
|
|
95
|
-
if (typeof
|
|
93
|
+
function t(u) {
|
|
94
|
+
if (u === j) return "<>";
|
|
95
|
+
if (typeof u == "object" && u !== null && u.$$typeof === U)
|
|
96
96
|
return "<...>";
|
|
97
97
|
try {
|
|
98
|
-
var
|
|
99
|
-
return
|
|
98
|
+
var x = s(u);
|
|
99
|
+
return x ? "<" + x + ">" : "<...>";
|
|
100
100
|
} catch {
|
|
101
101
|
return "<...>";
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function r() {
|
|
105
|
-
var
|
|
106
|
-
return
|
|
105
|
+
var u = q.A;
|
|
106
|
+
return u === null ? null : u.getOwner();
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function o() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function c(
|
|
112
|
-
if (
|
|
113
|
-
var
|
|
114
|
-
if (
|
|
111
|
+
function c(u) {
|
|
112
|
+
if (Q.call(u, "key")) {
|
|
113
|
+
var x = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
114
|
+
if (x && x.isReactWarning) return !1;
|
|
115
115
|
}
|
|
116
|
-
return
|
|
116
|
+
return u.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
function
|
|
120
|
-
|
|
118
|
+
function d(u, x) {
|
|
119
|
+
function N() {
|
|
120
|
+
Ke || (Ke = !0, console.error(
|
|
121
121
|
"%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)",
|
|
122
|
-
|
|
122
|
+
x
|
|
123
123
|
));
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
get:
|
|
125
|
+
N.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
126
|
+
get: N,
|
|
127
127
|
configurable: !0
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
130
|
function l() {
|
|
131
|
-
var
|
|
132
|
-
return
|
|
131
|
+
var u = s(this.type);
|
|
132
|
+
return Ye[u] || (Ye[u] = !0, console.error(
|
|
133
133
|
"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."
|
|
134
|
-
)),
|
|
134
|
+
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
135
135
|
}
|
|
136
|
-
function u
|
|
137
|
-
var
|
|
138
|
-
return
|
|
139
|
-
$$typeof:
|
|
140
|
-
type:
|
|
141
|
-
key:
|
|
142
|
-
props:
|
|
143
|
-
_owner:
|
|
144
|
-
}, (
|
|
136
|
+
function i(u, x, N, k, ge, Ee) {
|
|
137
|
+
var w = N.ref;
|
|
138
|
+
return u = {
|
|
139
|
+
$$typeof: b,
|
|
140
|
+
type: u,
|
|
141
|
+
key: x,
|
|
142
|
+
props: N,
|
|
143
|
+
_owner: k
|
|
144
|
+
}, (w !== void 0 ? w : null) !== null ? Object.defineProperty(u, "ref", {
|
|
145
145
|
enumerable: !1,
|
|
146
146
|
get: l
|
|
147
|
-
}) : Object.defineProperty(
|
|
147
|
+
}) : Object.defineProperty(u, "ref", { enumerable: !1, value: null }), u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
148
148
|
configurable: !1,
|
|
149
149
|
enumerable: !1,
|
|
150
150
|
writable: !0,
|
|
151
151
|
value: 0
|
|
152
|
-
}), Object.defineProperty(
|
|
152
|
+
}), Object.defineProperty(u, "_debugInfo", {
|
|
153
153
|
configurable: !1,
|
|
154
154
|
enumerable: !1,
|
|
155
155
|
writable: !0,
|
|
156
156
|
value: null
|
|
157
|
-
}), Object.defineProperty(
|
|
157
|
+
}), Object.defineProperty(u, "_debugStack", {
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
162
|
-
}), Object.defineProperty(
|
|
161
|
+
value: ge
|
|
162
|
+
}), Object.defineProperty(u, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
165
165
|
writable: !0,
|
|
166
|
-
value:
|
|
167
|
-
}), Object.freeze && (Object.freeze(
|
|
166
|
+
value: Ee
|
|
167
|
+
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
for (
|
|
175
|
-
|
|
176
|
-
Object.freeze && Object.freeze(
|
|
169
|
+
function _(u, x, N, k, ge, Ee) {
|
|
170
|
+
var w = x.children;
|
|
171
|
+
if (w !== void 0)
|
|
172
|
+
if (k)
|
|
173
|
+
if (Kn(w)) {
|
|
174
|
+
for (k = 0; k < w.length; k++)
|
|
175
|
+
p(w[k]);
|
|
176
|
+
Object.freeze && Object.freeze(w);
|
|
177
177
|
} else
|
|
178
178
|
console.error(
|
|
179
179
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
180
180
|
);
|
|
181
|
-
else
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
var
|
|
185
|
-
return
|
|
181
|
+
else p(w);
|
|
182
|
+
if (Q.call(x, "key")) {
|
|
183
|
+
w = s(u);
|
|
184
|
+
var ee = Object.keys(x).filter(function(Yn) {
|
|
185
|
+
return Yn !== "key";
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
k = 0 < ee.length ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}", Je[w + k] || (ee = 0 < ee.length ? "{" + ee.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
188
|
`A props object containing a "key" prop is being spread into JSX:
|
|
189
189
|
let props = %s;
|
|
190
190
|
<%s {...props} />
|
|
191
191
|
React keys must be passed directly to JSX without using spread:
|
|
192
192
|
let props = %s;
|
|
193
193
|
<%s key={someKey} {...props} />`,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
),
|
|
194
|
+
k,
|
|
195
|
+
w,
|
|
196
|
+
ee,
|
|
197
|
+
w
|
|
198
|
+
), Je[w + k] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (
|
|
201
|
-
|
|
202
|
-
for (var
|
|
203
|
-
|
|
204
|
-
} else
|
|
205
|
-
return
|
|
206
|
-
|
|
207
|
-
typeof
|
|
208
|
-
),
|
|
209
|
-
|
|
200
|
+
if (w = null, N !== void 0 && (n(N), w = "" + N), c(x) && (n(x.key), w = "" + x.key), "key" in x) {
|
|
201
|
+
N = {};
|
|
202
|
+
for (var Re in x)
|
|
203
|
+
Re !== "key" && (N[Re] = x[Re]);
|
|
204
|
+
} else N = x;
|
|
205
|
+
return w && d(
|
|
206
|
+
N,
|
|
207
|
+
typeof u == "function" ? u.displayName || u.name || "Unknown" : u
|
|
208
|
+
), i(
|
|
209
|
+
u,
|
|
210
|
+
w,
|
|
210
211
|
N,
|
|
211
|
-
y,
|
|
212
212
|
r(),
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
ge,
|
|
214
|
+
Ee
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
|
|
217
|
+
function p(u) {
|
|
218
|
+
h(u) ? u._store && (u._store.validated = 1) : typeof u == "object" && u !== null && u.$$typeof === U && (u._payload.status === "fulfilled" ? h(u._payload.value) && u._payload.value._store && (u._payload.value._store.validated = 1) : u._store && (u._store.validated = 1));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return typeof
|
|
220
|
+
function h(u) {
|
|
221
|
+
return typeof u == "object" && u !== null && u.$$typeof === b;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var v = Wn, b = /* @__PURE__ */ Symbol.for("react.transitional.element"), g = /* @__PURE__ */ Symbol.for("react.portal"), j = /* @__PURE__ */ Symbol.for("react.fragment"), y = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), P = /* @__PURE__ */ Symbol.for("react.consumer"), Y = /* @__PURE__ */ Symbol.for("react.context"), I = /* @__PURE__ */ Symbol.for("react.forward_ref"), Z = /* @__PURE__ */ Symbol.for("react.suspense"), W = /* @__PURE__ */ Symbol.for("react.suspense_list"), oe = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), Ce = /* @__PURE__ */ Symbol.for("react.activity"), S = /* @__PURE__ */ Symbol.for("react.client.reference"), q = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, Kn = Array.isArray, $e = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
227
|
-
react_stack_bottom_frame: function(
|
|
228
|
-
return
|
|
226
|
+
v = {
|
|
227
|
+
react_stack_bottom_frame: function(u) {
|
|
228
|
+
return u();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
)(),
|
|
235
|
-
|
|
236
|
-
var
|
|
237
|
-
return
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
var Ke, Ye = {}, We = v.react_stack_bottom_frame.bind(
|
|
232
|
+
v,
|
|
233
|
+
o
|
|
234
|
+
)(), Ue = $e(t(o)), Je = {};
|
|
235
|
+
ie.Fragment = j, ie.jsx = function(u, x, N) {
|
|
236
|
+
var k = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
237
|
+
return _(
|
|
238
|
+
u,
|
|
239
|
+
x,
|
|
240
|
+
N,
|
|
241
241
|
!1,
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
k ? Error("react-stack-top-frame") : We,
|
|
243
|
+
k ? $e(t(u)) : Ue
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
245
|
+
}, ie.jsxs = function(u, x, N) {
|
|
246
|
+
var k = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
247
|
+
return _(
|
|
248
|
+
u,
|
|
249
|
+
x,
|
|
250
|
+
N,
|
|
251
251
|
!0,
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
k ? Error("react-stack-top-frame") : We,
|
|
253
|
+
k ? $e(t(u)) : Ue
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), ie;
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
260
|
-
return
|
|
258
|
+
var Qe;
|
|
259
|
+
function Xn() {
|
|
260
|
+
return Qe || (Qe = 1, process.env.NODE_ENV === "production" ? Se.exports = Un() : Se.exports = Jn()), Se.exports;
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
function
|
|
262
|
+
var a = Xn();
|
|
263
|
+
function m(...s) {
|
|
264
264
|
return s.filter(Boolean).join(" ");
|
|
265
265
|
}
|
|
266
|
-
const
|
|
266
|
+
const Zn = {
|
|
267
267
|
none: "0",
|
|
268
268
|
"2xs": "var(--sand-space-1)",
|
|
269
269
|
xs: "var(--sand-space-2)",
|
|
@@ -273,38 +273,41 @@ const la = {
|
|
|
273
273
|
xl: "var(--sand-space-6)",
|
|
274
274
|
"2xl": "var(--sand-space-7)",
|
|
275
275
|
"3xl": "var(--sand-space-8)"
|
|
276
|
-
},
|
|
276
|
+
}, Qn = {
|
|
277
277
|
sm: "var(--radius-sm)",
|
|
278
278
|
md: "var(--radius-md)",
|
|
279
279
|
lg: "var(--radius-lg)",
|
|
280
280
|
xl: "var(--radius-xl)",
|
|
281
281
|
full: "var(--radius-full)"
|
|
282
282
|
};
|
|
283
|
-
function
|
|
283
|
+
function me(s) {
|
|
284
284
|
if (s !== void 0)
|
|
285
|
-
return typeof s == "number" ? `${s}px` :
|
|
285
|
+
return typeof s == "number" ? `${s}px` : Zn[s] ?? s;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function on(s) {
|
|
288
288
|
if (s !== void 0)
|
|
289
|
-
return typeof s == "number" ? `${s}px` :
|
|
289
|
+
return typeof s == "number" ? `${s}px` : Qn[s] ?? s;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
return
|
|
291
|
+
function C(s, e, n) {
|
|
292
|
+
return n === void 0 ? s : {
|
|
293
293
|
...s,
|
|
294
|
-
[e]:
|
|
294
|
+
[e]: n
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
if (
|
|
297
|
+
function cn(s, e, n) {
|
|
298
|
+
if (n === void 0)
|
|
299
299
|
return s;
|
|
300
|
-
if (typeof a != "object" || a === null || Array.isArray(a))
|
|
301
|
-
return j(s, `--${e}`, String(a));
|
|
302
300
|
let t = s;
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
if (typeof n != "object" || n === null || Array.isArray(n))
|
|
302
|
+
return C(t, `--${e}`, String(n));
|
|
303
|
+
for (const [r, o] of Object.entries(n))
|
|
304
|
+
if (o !== void 0) {
|
|
305
|
+
const c = r === "base" ? `--${e}` : `--${e}-${r}`;
|
|
306
|
+
t = C(t, c, String(o));
|
|
307
|
+
}
|
|
305
308
|
return t;
|
|
306
309
|
}
|
|
307
|
-
function
|
|
310
|
+
function ea(s) {
|
|
308
311
|
return Array.from(
|
|
309
312
|
s.querySelectorAll(
|
|
310
313
|
[
|
|
@@ -318,66 +321,71 @@ function _a(s) {
|
|
|
318
321
|
)
|
|
319
322
|
).filter((e) => !e.hasAttribute("disabled") && !e.getAttribute("aria-hidden"));
|
|
320
323
|
}
|
|
321
|
-
function
|
|
322
|
-
if (
|
|
324
|
+
function ke(s, e, n, t) {
|
|
325
|
+
if (n !== 0)
|
|
323
326
|
switch (s.key) {
|
|
324
327
|
case "ArrowRight":
|
|
325
328
|
case "ArrowDown":
|
|
326
|
-
s.preventDefault(), t((e + 1) %
|
|
329
|
+
s.preventDefault(), t((e + 1) % n);
|
|
327
330
|
break;
|
|
328
331
|
case "ArrowLeft":
|
|
329
332
|
case "ArrowUp":
|
|
330
|
-
s.preventDefault(), t((e - 1 +
|
|
333
|
+
s.preventDefault(), t((e - 1 + n) % n);
|
|
331
334
|
break;
|
|
332
335
|
case "Home":
|
|
333
336
|
s.preventDefault(), t(0);
|
|
334
337
|
break;
|
|
335
338
|
case "End":
|
|
336
|
-
s.preventDefault(), t(
|
|
339
|
+
s.preventDefault(), t(n - 1);
|
|
337
340
|
break;
|
|
338
341
|
}
|
|
339
342
|
}
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
const dn = ye({}), na = () => ve(dn);
|
|
344
|
+
function Ps({ children: s, icons: e, renderIcon: n }) {
|
|
345
|
+
return /* @__PURE__ */ a.jsx(dn.Provider, { value: { map: e, renderIcon: n }, children: s });
|
|
346
|
+
}
|
|
347
|
+
const B = f(function({ icon: e, size: n, fill: t, className: r, style: o, ...c }, d) {
|
|
348
|
+
const { map: l, renderIcon: i } = na(), _ = typeof e == "string" ? l?.[e] ?? e : e;
|
|
349
|
+
if (typeof _ == "function") {
|
|
350
|
+
const p = _;
|
|
351
|
+
return /* @__PURE__ */ a.jsx(
|
|
352
|
+
p,
|
|
345
353
|
{
|
|
346
|
-
ref:
|
|
347
|
-
width:
|
|
348
|
-
height:
|
|
349
|
-
className:
|
|
354
|
+
ref: d,
|
|
355
|
+
width: n ?? 18,
|
|
356
|
+
height: n ?? 18,
|
|
357
|
+
className: m(r),
|
|
350
358
|
...c
|
|
351
359
|
}
|
|
352
360
|
);
|
|
353
361
|
}
|
|
354
|
-
return /* @__PURE__ */ n.jsx(
|
|
362
|
+
return typeof _ == "string" && i ? /* @__PURE__ */ a.jsx(a.Fragment, { children: i(_, { size: n, fill: t, className: r, style: o, ...c }) }) : /* @__PURE__ */ a.jsx(
|
|
355
363
|
"span",
|
|
356
364
|
{
|
|
357
|
-
ref:
|
|
358
|
-
className:
|
|
365
|
+
ref: d,
|
|
366
|
+
className: m("material-symbols-rounded", r),
|
|
359
367
|
style: {
|
|
360
|
-
fontSize:
|
|
368
|
+
fontSize: n,
|
|
361
369
|
fontVariationSettings: t ? "'FILL' 1" : void 0,
|
|
362
370
|
display: "inline-flex",
|
|
363
371
|
alignItems: "center",
|
|
364
372
|
justifyContent: "center",
|
|
365
|
-
...
|
|
373
|
+
...o
|
|
366
374
|
},
|
|
367
375
|
"aria-hidden": c["aria-label"] ? void 0 : !0,
|
|
368
376
|
...c,
|
|
369
|
-
children:
|
|
377
|
+
children: _
|
|
370
378
|
}
|
|
371
379
|
);
|
|
372
380
|
});
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
alert:
|
|
376
|
-
icon:
|
|
377
|
-
content:
|
|
378
|
-
title:
|
|
379
|
-
description:
|
|
380
|
-
},
|
|
381
|
+
B.displayName = "SandIcon";
|
|
382
|
+
const aa = "_alert_f8qp0_1", ta = "_icon_f8qp0_13", sa = "_content_f8qp0_25", ra = "_title_f8qp0_30", oa = "_description_f8qp0_35", de = {
|
|
383
|
+
alert: aa,
|
|
384
|
+
icon: ta,
|
|
385
|
+
content: sa,
|
|
386
|
+
title: ra,
|
|
387
|
+
description: oa
|
|
388
|
+
}, ca = {
|
|
381
389
|
info: {
|
|
382
390
|
icon: "info",
|
|
383
391
|
color: "var(--color-info)",
|
|
@@ -398,75 +406,76 @@ const ma = "_alert_f8qp0_1", fa = "_icon_f8qp0_13", pa = "_content_f8qp0_25", ba
|
|
|
398
406
|
color: "var(--color-error)",
|
|
399
407
|
soft: "var(--color-error-soft)"
|
|
400
408
|
}
|
|
401
|
-
},
|
|
402
|
-
const
|
|
403
|
-
return /* @__PURE__ */
|
|
409
|
+
}, ia = f(function({ status: e = "info", title: n, description: t, className: r, style: o, children: c, ...d }, l) {
|
|
410
|
+
const i = ca[e];
|
|
411
|
+
return /* @__PURE__ */ a.jsxs(
|
|
404
412
|
"div",
|
|
405
413
|
{
|
|
406
414
|
ref: l,
|
|
407
415
|
role: "status",
|
|
408
|
-
className:
|
|
416
|
+
className: m(de.alert, r),
|
|
409
417
|
style: {
|
|
410
|
-
"--sand-alert-border":
|
|
411
|
-
"--sand-alert-bg": `color-mix(in srgb, ${
|
|
412
|
-
"--sand-alert-soft":
|
|
413
|
-
"--sand-alert-color":
|
|
414
|
-
...
|
|
418
|
+
"--sand-alert-border": i.color,
|
|
419
|
+
"--sand-alert-bg": `color-mix(in srgb, ${i.soft} 74%, var(--theme-surface))`,
|
|
420
|
+
"--sand-alert-soft": i.soft,
|
|
421
|
+
"--sand-alert-color": i.color,
|
|
422
|
+
...o
|
|
415
423
|
},
|
|
416
|
-
...
|
|
424
|
+
...d,
|
|
417
425
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
|
|
421
|
-
t && /* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ a.jsx("span", { className: de.icon, children: /* @__PURE__ */ a.jsx(B, { icon: i.icon, size: 20 }) }),
|
|
427
|
+
/* @__PURE__ */ a.jsxs("div", { className: de.content, children: [
|
|
428
|
+
n && /* @__PURE__ */ a.jsx("div", { className: de.title, children: n }),
|
|
429
|
+
t && /* @__PURE__ */ a.jsx("div", { className: de.description, children: t }),
|
|
422
430
|
c
|
|
423
431
|
] })
|
|
424
432
|
]
|
|
425
433
|
}
|
|
426
434
|
);
|
|
427
435
|
});
|
|
428
|
-
|
|
429
|
-
const
|
|
430
|
-
accordion:
|
|
431
|
-
item:
|
|
432
|
-
trigger:
|
|
433
|
-
triggerMain:
|
|
434
|
-
itemIcon:
|
|
435
|
-
triggerText:
|
|
436
|
-
title:
|
|
437
|
-
|
|
438
|
-
content:
|
|
439
|
-
contentOpen:
|
|
440
|
-
contentInner:
|
|
441
|
-
chevron:
|
|
442
|
-
chevronOpen:
|
|
443
|
-
},
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
436
|
+
ia.displayName = "SandAlert";
|
|
437
|
+
const da = "_accordion_hg6cu_1", la = "_item_hg6cu_7", ua = "_trigger_hg6cu_23", _a = "_triggerMain_hg6cu_37", pa = "_itemIcon_hg6cu_45", ma = "_triggerText_hg6cu_64", fa = "_title_hg6cu_71", ba = "_descriptionFull_hg6cu_79", ha = "_content_hg6cu_88", va = "_contentOpen_hg6cu_94", ya = "_contentInner_hg6cu_98", xa = "_chevron_hg6cu_106", ga = "_chevronOpen_hg6cu_112", M = {
|
|
438
|
+
accordion: da,
|
|
439
|
+
item: la,
|
|
440
|
+
trigger: ua,
|
|
441
|
+
triggerMain: _a,
|
|
442
|
+
itemIcon: pa,
|
|
443
|
+
triggerText: ma,
|
|
444
|
+
title: fa,
|
|
445
|
+
descriptionFull: ba,
|
|
446
|
+
content: ha,
|
|
447
|
+
contentOpen: va,
|
|
448
|
+
contentInner: ya,
|
|
449
|
+
chevron: xa,
|
|
450
|
+
chevronOpen: ga
|
|
451
|
+
}, ln = () => null;
|
|
452
|
+
ln.displayName = "SandAccordionItem";
|
|
453
|
+
const Sa = f(function({ items: e = [], defaultOpen: n, className: t, children: r, ...o }, c) {
|
|
454
|
+
const [d, l] = F(n), i = O(), _ = [...e];
|
|
455
|
+
return be.forEach(r, (p) => {
|
|
456
|
+
X(p) && p.type === ln && _.push(p.props);
|
|
457
|
+
}), /* @__PURE__ */ a.jsx("div", { ref: c, className: m(M.accordion, t), ...o, children: _.map((p) => {
|
|
458
|
+
const h = d === p.id, v = `${i}-trigger-${p.id}`, b = `${i}-content-${p.id}`;
|
|
459
|
+
return /* @__PURE__ */ a.jsxs("div", { className: m(M.item, h && M.itemOpen), "data-state": h ? "open" : "closed", children: [
|
|
460
|
+
/* @__PURE__ */ a.jsxs(
|
|
449
461
|
"button",
|
|
450
462
|
{
|
|
451
|
-
id:
|
|
463
|
+
id: v,
|
|
452
464
|
type: "button",
|
|
453
|
-
className:
|
|
454
|
-
"aria-expanded":
|
|
455
|
-
"aria-controls":
|
|
456
|
-
onClick: () =>
|
|
465
|
+
className: M.trigger,
|
|
466
|
+
"aria-expanded": h,
|
|
467
|
+
"aria-controls": b,
|
|
468
|
+
onClick: () => l((g) => g === p.id ? void 0 : p.id),
|
|
457
469
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
|
|
460
|
-
/* @__PURE__ */
|
|
461
|
-
/* @__PURE__ */ n.jsx("span", { className: $.title, children: u.title }),
|
|
462
|
-
u.description && /* @__PURE__ */ n.jsx("span", { className: $.description, children: u.description })
|
|
463
|
-
] })
|
|
470
|
+
/* @__PURE__ */ a.jsxs("div", { className: M.triggerMain, children: [
|
|
471
|
+
p.icon && /* @__PURE__ */ a.jsx(B, { icon: p.icon, className: M.itemIcon, size: 24, "aria-hidden": "true" }),
|
|
472
|
+
/* @__PURE__ */ a.jsx("div", { className: M.triggerText, children: /* @__PURE__ */ a.jsx("span", { className: M.title, children: p.title }) })
|
|
464
473
|
] }),
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
|
|
474
|
+
/* @__PURE__ */ a.jsx(
|
|
475
|
+
B,
|
|
467
476
|
{
|
|
468
477
|
icon: "expand_more",
|
|
469
|
-
className:
|
|
478
|
+
className: m(M.chevron, h && M.chevronOpen),
|
|
470
479
|
size: 20,
|
|
471
480
|
"aria-hidden": "true"
|
|
472
481
|
}
|
|
@@ -474,162 +483,258 @@ const ya = "_accordion_rsxio_1", ga = "_item_rsxio_7", Sa = "_trigger_rsxio_26",
|
|
|
474
483
|
]
|
|
475
484
|
}
|
|
476
485
|
),
|
|
477
|
-
/* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ a.jsx(
|
|
478
487
|
"div",
|
|
479
488
|
{
|
|
480
|
-
id:
|
|
481
|
-
"aria-labelledby":
|
|
482
|
-
className:
|
|
489
|
+
id: b,
|
|
490
|
+
"aria-labelledby": v,
|
|
491
|
+
className: m(M.content, h && M.contentOpen),
|
|
483
492
|
role: "region",
|
|
484
|
-
children: /* @__PURE__ */
|
|
493
|
+
children: /* @__PURE__ */ a.jsxs("div", { className: M.contentInner, children: [
|
|
494
|
+
p.description && /* @__PURE__ */ a.jsx("p", { className: M.descriptionFull, children: p.description }),
|
|
495
|
+
p.content
|
|
496
|
+
] })
|
|
485
497
|
}
|
|
486
498
|
)
|
|
487
|
-
] },
|
|
499
|
+
] }, p.id);
|
|
488
500
|
}) });
|
|
489
501
|
});
|
|
490
|
-
|
|
491
|
-
const
|
|
502
|
+
Sa.displayName = "SandAccordion";
|
|
503
|
+
const ja = "_avatar_tjyvl_1", Na = "_image_tjyvl_57", ka = "_initials_tjyvl_63", wa = "_group_tjyvl_67", se = {
|
|
504
|
+
avatar: ja,
|
|
505
|
+
"variant-circle": "_variant-circle_tjyvl_15",
|
|
506
|
+
"variant-rounded": "_variant-rounded_tjyvl_19",
|
|
507
|
+
"variant-square": "_variant-square_tjyvl_23",
|
|
508
|
+
"size-xs": "_size-xs_tjyvl_27",
|
|
509
|
+
"size-sm": "_size-sm_tjyvl_33",
|
|
510
|
+
"size-md": "_size-md_tjyvl_39",
|
|
511
|
+
"size-lg": "_size-lg_tjyvl_45",
|
|
512
|
+
"size-xl": "_size-xl_tjyvl_51",
|
|
513
|
+
image: Na,
|
|
514
|
+
initials: ka,
|
|
515
|
+
group: wa
|
|
516
|
+
}, Ta = f(function({ src: e, initials: n, name: t, size: r = "md", variant: o = "circle", className: c = "", style: d, ...l }, i) {
|
|
517
|
+
const _ = typeof r == "number" ? {
|
|
518
|
+
width: r,
|
|
519
|
+
height: r,
|
|
520
|
+
fontSize: r * 0.4
|
|
521
|
+
} : void 0, p = n ?? t?.split(" ").map((h) => h[0]).join("").toUpperCase().slice(0, 2);
|
|
522
|
+
return /* @__PURE__ */ a.jsx(
|
|
523
|
+
"div",
|
|
524
|
+
{
|
|
525
|
+
ref: i,
|
|
526
|
+
className: m(
|
|
527
|
+
se.avatar,
|
|
528
|
+
typeof r == "string" && se[`size-${r}`],
|
|
529
|
+
se[`variant-${o}`],
|
|
530
|
+
c
|
|
531
|
+
),
|
|
532
|
+
style: { ..._, ...d },
|
|
533
|
+
...l,
|
|
534
|
+
children: e ? /* @__PURE__ */ a.jsx("img", { src: e, alt: t, className: se.image }) : /* @__PURE__ */ a.jsx("span", { className: se.initials, children: p })
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
});
|
|
538
|
+
Ta.displayName = "SandAvatar";
|
|
539
|
+
const Ia = f(function({ children: e, max: n, size: t = "md", className: r = "", ...o }, c) {
|
|
540
|
+
return /* @__PURE__ */ a.jsx("div", { ref: c, className: m(se.group, r), ...o, children: e });
|
|
541
|
+
});
|
|
542
|
+
Ia.displayName = "SandAvatarGroup";
|
|
543
|
+
const en = {
|
|
492
544
|
"sand-badge": "_sand-badge_ezp2k_1",
|
|
493
545
|
"sand-badge-primary": "_sand-badge-primary_ezp2k_15",
|
|
494
546
|
"sand-badge-secondary": "_sand-badge-secondary_ezp2k_21",
|
|
495
547
|
"sand-badge-success": "_sand-badge-success_ezp2k_27",
|
|
496
548
|
"sand-badge-failed": "_sand-badge-failed_ezp2k_33"
|
|
497
|
-
},
|
|
498
|
-
const
|
|
499
|
-
return /* @__PURE__ */
|
|
549
|
+
}, Ca = f(function({ variant: e = "primary", className: n = "", ...t }, r) {
|
|
550
|
+
const o = E(() => en[`sand-badge-${e}`], [e]);
|
|
551
|
+
return /* @__PURE__ */ a.jsx(
|
|
500
552
|
"span",
|
|
501
553
|
{
|
|
502
554
|
ref: r,
|
|
503
|
-
className:
|
|
555
|
+
className: m(en["sand-badge"], o, n),
|
|
504
556
|
...t
|
|
505
557
|
}
|
|
506
558
|
);
|
|
507
559
|
});
|
|
508
|
-
|
|
509
|
-
const
|
|
510
|
-
"sand-breadcrumbs": "_sand-
|
|
511
|
-
"sand-breadcrumb-item": "_sand-breadcrumb-
|
|
512
|
-
"sand-breadcrumb-link": "_sand-breadcrumb-
|
|
513
|
-
"sand-breadcrumb-current": "_sand-breadcrumb-
|
|
514
|
-
"sand-breadcrumb-separator": "_sand-breadcrumb-
|
|
515
|
-
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
560
|
+
Ca.displayName = "SandBadge";
|
|
561
|
+
const le = {
|
|
562
|
+
"sand-breadcrumbs": "_sand-breadcrumbs_cngwf_1",
|
|
563
|
+
"sand-breadcrumb-item": "_sand-breadcrumb-item_cngwf_10",
|
|
564
|
+
"sand-breadcrumb-link": "_sand-breadcrumb-link_cngwf_17",
|
|
565
|
+
"sand-breadcrumb-current": "_sand-breadcrumb-current_cngwf_32",
|
|
566
|
+
"sand-breadcrumb-separator": "_sand-breadcrumb-separator_cngwf_37"
|
|
567
|
+
}, un = () => null;
|
|
568
|
+
un.displayName = "SandBreadcrumbItem";
|
|
569
|
+
const $a = f(function({ items: e = [], className: n = "", "aria-label": t = "Breadcrumb", children: r, ...o }, c) {
|
|
570
|
+
const d = E(() => {
|
|
571
|
+
const i = [...e];
|
|
572
|
+
return be.forEach(r, (_) => {
|
|
573
|
+
X(_) && _.type === un && i.push(_.props);
|
|
574
|
+
}), i;
|
|
575
|
+
}, [e, r]), l = E(
|
|
576
|
+
() => d.map((i, _) => {
|
|
577
|
+
const p = _ === d.length - 1;
|
|
578
|
+
return /* @__PURE__ */ a.jsxs("li", { className: le["sand-breadcrumb-item"], children: [
|
|
579
|
+
i.href && !p ? /* @__PURE__ */ a.jsx("a", { href: i.href, className: le["sand-breadcrumb-link"], children: i.label }) : /* @__PURE__ */ a.jsx(
|
|
521
580
|
"span",
|
|
522
581
|
{
|
|
523
|
-
"aria-current":
|
|
524
|
-
className:
|
|
582
|
+
"aria-current": p ? "page" : void 0,
|
|
583
|
+
className: p ? le["sand-breadcrumb-current"] : void 0,
|
|
525
584
|
children: i.label
|
|
526
585
|
}
|
|
527
586
|
),
|
|
528
|
-
!
|
|
529
|
-
] }, `${String(i.label)}-${
|
|
587
|
+
!p && /* @__PURE__ */ a.jsx("span", { className: m(le["sand-breadcrumb-separator"], "material-symbols-rounded"), "aria-hidden": "true", children: "chevron_right" })
|
|
588
|
+
] }, `${String(i.label)}-${_}`);
|
|
530
589
|
}),
|
|
531
|
-
[
|
|
590
|
+
[d]
|
|
532
591
|
);
|
|
533
|
-
return /* @__PURE__ */
|
|
592
|
+
return /* @__PURE__ */ a.jsx("nav", { ref: c, "aria-label": t, className: m(le["sand-breadcrumbs"], n), ...o, children: /* @__PURE__ */ a.jsx("ol", { children: l }) });
|
|
534
593
|
});
|
|
535
|
-
|
|
536
|
-
const
|
|
537
|
-
box:
|
|
538
|
-
surface:
|
|
539
|
-
inline:
|
|
540
|
-
},
|
|
594
|
+
$a.displayName = "SandBreadcrumbs";
|
|
595
|
+
const Ea = "_box_t20vf_1", Ra = "_surface_t20vf_19", Aa = "_inline_t20vf_27", fe = {
|
|
596
|
+
box: Ea,
|
|
597
|
+
surface: Ra,
|
|
598
|
+
inline: Aa
|
|
599
|
+
}, Oa = {
|
|
541
600
|
stretch: "stretch",
|
|
542
601
|
start: "flex-start",
|
|
543
602
|
center: "center",
|
|
544
603
|
end: "flex-end",
|
|
545
604
|
baseline: "baseline"
|
|
546
|
-
},
|
|
605
|
+
}, Ma = {
|
|
547
606
|
start: "flex-start",
|
|
548
607
|
center: "center",
|
|
549
608
|
end: "flex-end",
|
|
550
609
|
between: "space-between",
|
|
551
610
|
around: "space-around",
|
|
552
611
|
evenly: "space-evenly"
|
|
553
|
-
},
|
|
612
|
+
}, za = f(function({
|
|
554
613
|
as: e,
|
|
555
|
-
padding:
|
|
614
|
+
padding: n,
|
|
556
615
|
margin: t,
|
|
557
616
|
gap: r,
|
|
558
|
-
align:
|
|
617
|
+
align: o,
|
|
559
618
|
justify: c,
|
|
560
|
-
surface:
|
|
619
|
+
surface: d,
|
|
561
620
|
inline: l,
|
|
562
|
-
width:
|
|
563
|
-
radius:
|
|
564
|
-
shadow:
|
|
565
|
-
className:
|
|
566
|
-
style:
|
|
567
|
-
...
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
let
|
|
571
|
-
return
|
|
572
|
-
|
|
621
|
+
width: i,
|
|
622
|
+
radius: _,
|
|
623
|
+
shadow: p = "none",
|
|
624
|
+
className: h,
|
|
625
|
+
style: v,
|
|
626
|
+
...b
|
|
627
|
+
}, g) {
|
|
628
|
+
const j = e ?? "div";
|
|
629
|
+
let y = v;
|
|
630
|
+
return y = C(y, "--sand-padding", me(n)), y = C(y, "--sand-margin", me(t)), y = C(y, "--sand-gap", me(r)), y = C(y, "--sand-align", o ? Oa[o] : void 0), y = C(y, "--sand-justify", c ? Ma[c] : void 0), y = C(y, "--sand-width", typeof i == "number" ? `${i}px` : i), y = C(y, "--sand-box-radius", on(_)), y = C(
|
|
631
|
+
y,
|
|
573
632
|
"--sand-box-shadow",
|
|
574
|
-
|
|
575
|
-
), /* @__PURE__ */
|
|
576
|
-
|
|
633
|
+
p === "none" ? "none" : `var(--shadow-${p})`
|
|
634
|
+
), /* @__PURE__ */ a.jsx(
|
|
635
|
+
j,
|
|
636
|
+
{
|
|
637
|
+
ref: g,
|
|
638
|
+
className: m(fe.box, d && fe.surface, l && fe.inline, h),
|
|
639
|
+
style: y,
|
|
640
|
+
...b
|
|
641
|
+
}
|
|
642
|
+
);
|
|
643
|
+
});
|
|
644
|
+
za.displayName = "SandBox";
|
|
645
|
+
const Da = "_chip_1o3za_1", Pa = "_clickable_1o3za_16", La = "_startIcon_1o3za_61", Ba = "_label_1o3za_66", Fa = "_closeButton_1o3za_70", ne = {
|
|
646
|
+
chip: Da,
|
|
647
|
+
clickable: Pa,
|
|
648
|
+
"variant-primary": "_variant-primary_1o3za_26",
|
|
649
|
+
"variant-secondary": "_variant-secondary_1o3za_31",
|
|
650
|
+
"variant-success": "_variant-success_1o3za_36",
|
|
651
|
+
"variant-warning": "_variant-warning_1o3za_41",
|
|
652
|
+
"variant-error": "_variant-error_1o3za_46",
|
|
653
|
+
"variant-outline": "_variant-outline_1o3za_51",
|
|
654
|
+
startIcon: La,
|
|
655
|
+
label: Ba,
|
|
656
|
+
closeButton: Fa
|
|
657
|
+
}, _n = f(function({ variant: e = "primary", icon: n, onClose: t, clickable: r, children: o, className: c = "", ...d }, l) {
|
|
658
|
+
return /* @__PURE__ */ a.jsxs(
|
|
659
|
+
"span",
|
|
577
660
|
{
|
|
578
|
-
ref:
|
|
579
|
-
className:
|
|
580
|
-
|
|
581
|
-
|
|
661
|
+
ref: l,
|
|
662
|
+
className: m(
|
|
663
|
+
ne.chip,
|
|
664
|
+
ne[`variant-${e}`],
|
|
665
|
+
r && ne.clickable,
|
|
666
|
+
c
|
|
667
|
+
),
|
|
668
|
+
role: r ? "button" : void 0,
|
|
669
|
+
tabIndex: r ? 0 : void 0,
|
|
670
|
+
...d,
|
|
671
|
+
children: [
|
|
672
|
+
n && /* @__PURE__ */ a.jsx(B, { icon: n, size: 16, className: ne.startIcon }),
|
|
673
|
+
/* @__PURE__ */ a.jsx("span", { className: ne.label, children: o }),
|
|
674
|
+
t && /* @__PURE__ */ a.jsx(
|
|
675
|
+
"button",
|
|
676
|
+
{
|
|
677
|
+
type: "button",
|
|
678
|
+
className: ne.closeButton,
|
|
679
|
+
onClick: (i) => {
|
|
680
|
+
i.stopPropagation(), t();
|
|
681
|
+
},
|
|
682
|
+
"aria-label": "Remove",
|
|
683
|
+
children: /* @__PURE__ */ a.jsx(B, { icon: "close", size: 14 })
|
|
684
|
+
}
|
|
685
|
+
)
|
|
686
|
+
]
|
|
582
687
|
}
|
|
583
688
|
);
|
|
584
689
|
});
|
|
585
|
-
|
|
586
|
-
const
|
|
690
|
+
_n.displayName = "SandChip";
|
|
691
|
+
const Ls = _n, nn = {
|
|
587
692
|
"sand-btn": "_sand-btn_9p0tq_1",
|
|
588
693
|
"sand-btn-primary": "_sand-btn-primary_9p0tq_28",
|
|
589
694
|
"sand-btn-secondary": "_sand-btn-secondary_9p0tq_39",
|
|
590
695
|
"sand-btn-outline": "_sand-btn-outline_9p0tq_49",
|
|
591
696
|
"sand-btn-success": "_sand-btn-success_9p0tq_59",
|
|
592
697
|
"sand-btn-failed": "_sand-btn-failed_9p0tq_69"
|
|
593
|
-
},
|
|
594
|
-
const c =
|
|
595
|
-
return /* @__PURE__ */
|
|
698
|
+
}, Ae = f(function({ variant: e = "primary", className: n = "", type: t = "button", ...r }, o) {
|
|
699
|
+
const c = E(() => nn[`sand-btn-${e}`], [e]);
|
|
700
|
+
return /* @__PURE__ */ a.jsx(
|
|
596
701
|
"button",
|
|
597
702
|
{
|
|
598
|
-
ref:
|
|
599
|
-
className:
|
|
703
|
+
ref: o,
|
|
704
|
+
className: m(nn["sand-btn"], c, n),
|
|
600
705
|
type: t,
|
|
601
706
|
...r
|
|
602
707
|
}
|
|
603
708
|
);
|
|
604
709
|
});
|
|
605
|
-
|
|
606
|
-
const
|
|
710
|
+
Ae.displayName = "SandButton";
|
|
711
|
+
const je = {
|
|
607
712
|
"sand-card": "_sand-card_hf89l_1",
|
|
608
713
|
"sand-card-header": "_sand-card-header_hf89l_14",
|
|
609
714
|
"sand-card-body": "_sand-card-body_hf89l_22",
|
|
610
715
|
"sand-card-footer": "_sand-card-footer_hf89l_29"
|
|
611
|
-
},
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
e && /* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
|
|
716
|
+
}, qa = f(function({ header: e, footer: n, children: t, className: r = "", ...o }, c) {
|
|
717
|
+
return /* @__PURE__ */ a.jsxs("article", { ref: c, className: m(je["sand-card"], r), ...o, children: [
|
|
718
|
+
e && /* @__PURE__ */ a.jsx("header", { className: je["sand-card-header"], children: e }),
|
|
719
|
+
/* @__PURE__ */ a.jsx("div", { className: je["sand-card-body"], children: t }),
|
|
720
|
+
n && /* @__PURE__ */ a.jsx("footer", { className: je["sand-card-footer"], children: n })
|
|
616
721
|
] });
|
|
617
722
|
});
|
|
618
|
-
|
|
619
|
-
const
|
|
723
|
+
qa.displayName = "SandCard";
|
|
724
|
+
const Va = "_active_1i66s_73", re = {
|
|
620
725
|
"sand-code-block": "_sand-code-block_1i66s_1",
|
|
621
726
|
"sand-copy-btn": "_sand-copy-btn_1i66s_20",
|
|
622
727
|
"sand-code-tabs": "_sand-code-tabs_1i66s_40",
|
|
623
728
|
"sand-tab-headers": "_sand-tab-headers_1i66s_51",
|
|
624
729
|
"sand-tab-btn": "_sand-tab-btn_1i66s_58",
|
|
625
|
-
active:
|
|
730
|
+
active: Va
|
|
626
731
|
};
|
|
627
732
|
function Ha(s) {
|
|
628
733
|
if (!s) return "";
|
|
629
734
|
let e = s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
630
|
-
const
|
|
631
|
-
const c = `___TOKEN_${
|
|
632
|
-
return
|
|
735
|
+
const n = [], t = (r, o) => {
|
|
736
|
+
const c = `___TOKEN_${n.length}___`;
|
|
737
|
+
return n.push(`<span class="token-${o}">${r}</span>`), c;
|
|
633
738
|
};
|
|
634
739
|
return e = e.replace(/\/\/.*/g, (r) => t(r, "comment")), e = e.replace(/\/\*[\s\S]*?\*\//g, (r) => t(r, "comment")), e = e.replace(/(["'`])(?:\\.|[^\\])*?\1/g, (r) => t(r, "string")), e = e.replace(/\b(true|false|null|undefined)\b/g, (r) => t(r, "boolean")), e = e.replace(
|
|
635
740
|
/\b(const|let|var|function|return|if|else|for|while|import|export|from|default|class|extends|type|interface|enum|async|await|try|catch|finally|throw|new|this|super|public|private|protected|readonly|static|get|set|as|in|of|void|any|number|string|boolean|symbol|bigint)\b/g,
|
|
@@ -637,77 +742,77 @@ function Ha(s) {
|
|
|
637
742
|
), e = e.replace(
|
|
638
743
|
/\b(React|useState|useEffect|useMemo|useCallback|useId|useRef|forwardRef|ComponentPropsWithoutRef|ReactNode|FC|HTMLAttributes)\b/g,
|
|
639
744
|
(r) => t(r, "class")
|
|
640
|
-
), e = e.replace(/\b([a-z_][a-z0-9_]*)(?=\s*\()/gi, (r) => t(r, "function")), e = e.replace(/<[A-Z][a-zA-Z0-9]*/g, (r) => t(r, "component")), e = e.replace(/<\/?[a-z][a-z0-9]*/g, (r) => t(r, "tag")), e = e.replace(/<\/[a-zA-Z0-9]+>/gi, (r) => t(r, "tag")), e = e.replace(/\b([a-z][a-zA-Z0-9]*)(?=\s*=\s*[{"])/g, (r) => t(r, "attr")), e = e.replace(/\b(\d+)\b/g, (r) => t(r, "number")), e = e.replace(/(=>|===|==|=|\+|-|\*|\/|&&|\|\||!)/g, (r) => t(r, "operator")),
|
|
641
|
-
e = e.replace(`___TOKEN_${
|
|
745
|
+
), e = e.replace(/\b([a-z_][a-z0-9_]*)(?=\s*\()/gi, (r) => t(r, "function")), e = e.replace(/<[A-Z][a-zA-Z0-9]*/g, (r) => t(r, "component")), e = e.replace(/<\/?[a-z][a-z0-9]*/g, (r) => t(r, "tag")), e = e.replace(/<\/[a-zA-Z0-9]+>/gi, (r) => t(r, "tag")), e = e.replace(/\b([a-z][a-zA-Z0-9]*)(?=\s*=\s*[{"])/g, (r) => t(r, "attr")), e = e.replace(/\b(\d+)\b/g, (r) => t(r, "number")), e = e.replace(/(=>|===|==|=|\+|-|\*|\/|&&|\|\||!)/g, (r) => t(r, "operator")), n.forEach((r, o) => {
|
|
746
|
+
e = e.replace(`___TOKEN_${o}___`, r);
|
|
642
747
|
}), e;
|
|
643
748
|
}
|
|
644
|
-
const
|
|
645
|
-
const [
|
|
749
|
+
const pn = f(function({ code: e, className: n = "", ...t }, r) {
|
|
750
|
+
const [o, c] = F(!1), d = A(() => {
|
|
646
751
|
navigator.clipboard.writeText(e).then(() => {
|
|
647
752
|
c(!0), setTimeout(() => c(!1), 2e3);
|
|
648
753
|
});
|
|
649
|
-
}, [e]), l =
|
|
650
|
-
return /* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
754
|
+
}, [e]), l = E(() => Ha(e), [e]);
|
|
755
|
+
return /* @__PURE__ */ a.jsxs("pre", { ref: r, className: m(re["sand-code-block"], n), ...t, children: [
|
|
756
|
+
/* @__PURE__ */ a.jsx(
|
|
652
757
|
"button",
|
|
653
758
|
{
|
|
654
|
-
className:
|
|
655
|
-
onClick:
|
|
759
|
+
className: re["sand-copy-btn"],
|
|
760
|
+
onClick: d,
|
|
656
761
|
type: "button",
|
|
657
|
-
"aria-label":
|
|
658
|
-
children:
|
|
762
|
+
"aria-label": o ? "Code copied to clipboard" : "Copy code to clipboard",
|
|
763
|
+
children: o ? "Copied" : "Copy"
|
|
659
764
|
}
|
|
660
765
|
),
|
|
661
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ a.jsx("code", { dangerouslySetInnerHTML: { __html: l } })
|
|
662
767
|
] });
|
|
663
768
|
});
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
const [
|
|
667
|
-
(
|
|
668
|
-
i(
|
|
769
|
+
pn.displayName = "SandCodeBlock";
|
|
770
|
+
const Ga = f(function({ items: e, tabs: n, defaultTab: t = 0, className: r = "", onTabChange: o }, c) {
|
|
771
|
+
const d = E(() => e ?? n ?? [], [e, n]), [l, i] = F(t), _ = O(), p = z([]), h = A(
|
|
772
|
+
(b) => {
|
|
773
|
+
i(b), o?.(b), p.current[b]?.focus();
|
|
669
774
|
},
|
|
670
|
-
[
|
|
671
|
-
),
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
775
|
+
[o]
|
|
776
|
+
), v = E(() => d[l]?.code ?? "", [l, d]);
|
|
777
|
+
return /* @__PURE__ */ a.jsxs("div", { ref: c, className: m(re["sand-code-tabs"], r), children: [
|
|
778
|
+
/* @__PURE__ */ a.jsx("div", { className: re["sand-tab-headers"], role: "tablist", "aria-label": "Code examples", children: d.map((b, g) => /* @__PURE__ */ a.jsx(
|
|
674
779
|
"button",
|
|
675
780
|
{
|
|
676
|
-
ref: (
|
|
677
|
-
|
|
781
|
+
ref: (j) => {
|
|
782
|
+
p.current[g] = j;
|
|
678
783
|
},
|
|
679
|
-
className:
|
|
784
|
+
className: m(re["sand-tab-btn"], l === g && re.active),
|
|
680
785
|
type: "button",
|
|
681
786
|
role: "tab",
|
|
682
|
-
"aria-selected":
|
|
683
|
-
"aria-controls": `${
|
|
684
|
-
id: `${
|
|
685
|
-
tabIndex:
|
|
686
|
-
onClick: () =>
|
|
687
|
-
onKeyDown: (
|
|
688
|
-
children:
|
|
787
|
+
"aria-selected": l === g,
|
|
788
|
+
"aria-controls": `${_}-code-panel-${g}`,
|
|
789
|
+
id: `${_}-code-tab-${g}`,
|
|
790
|
+
tabIndex: l === g ? 0 : -1,
|
|
791
|
+
onClick: () => h(g),
|
|
792
|
+
onKeyDown: (j) => ke(j, g, d.length, (y) => h(y)),
|
|
793
|
+
children: b.name
|
|
689
794
|
},
|
|
690
|
-
|
|
795
|
+
g
|
|
691
796
|
)) }),
|
|
692
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ a.jsx(
|
|
693
798
|
"div",
|
|
694
799
|
{
|
|
695
800
|
role: "tabpanel",
|
|
696
|
-
id: `${
|
|
697
|
-
"aria-labelledby": `${
|
|
698
|
-
children: /* @__PURE__ */
|
|
801
|
+
id: `${_}-code-panel-${l}`,
|
|
802
|
+
"aria-labelledby": `${_}-code-tab-${l}`,
|
|
803
|
+
children: /* @__PURE__ */ a.jsx(pn, { code: v })
|
|
699
804
|
}
|
|
700
805
|
)
|
|
701
806
|
] });
|
|
702
807
|
});
|
|
703
|
-
|
|
704
|
-
const
|
|
808
|
+
Ga.displayName = "SandCodeTabs";
|
|
809
|
+
const Ka = {
|
|
705
810
|
"sand-divider": "_sand-divider_svs0p_1"
|
|
706
|
-
},
|
|
707
|
-
return /* @__PURE__ */
|
|
811
|
+
}, Ya = f(function({ className: e = "", ...n }, t) {
|
|
812
|
+
return /* @__PURE__ */ a.jsx("hr", { ref: t, className: m(Ka["sand-divider"], e), ...n });
|
|
708
813
|
});
|
|
709
|
-
|
|
710
|
-
const
|
|
814
|
+
Ya.displayName = "SandDivider";
|
|
815
|
+
const V = {
|
|
711
816
|
"sand-feedback": "_sand-feedback_1fyl0_1",
|
|
712
817
|
"sand-feedback-toast": "_sand-feedback-toast_1fyl0_12",
|
|
713
818
|
"sand-feedback-snackbar": "_sand-feedback-snackbar_1fyl0_18",
|
|
@@ -720,170 +825,239 @@ const A = {
|
|
|
720
825
|
"sand-feedback-success": "_sand-feedback-success_1fyl0_65",
|
|
721
826
|
"sand-feedback-failed": "_sand-feedback-failed_1fyl0_72",
|
|
722
827
|
"sand-feedback-info": "_sand-feedback-info_1fyl0_79"
|
|
723
|
-
},
|
|
828
|
+
}, Wa = {
|
|
724
829
|
info: "info",
|
|
725
830
|
success: "check_circle",
|
|
726
831
|
failed: "error"
|
|
727
|
-
},
|
|
728
|
-
const
|
|
729
|
-
return /* @__PURE__ */
|
|
832
|
+
}, mn = f(function({ heading: e, message: n, action: t, variant: r = "info", className: o = "", mode: c, ...d }, l) {
|
|
833
|
+
const i = E(() => Wa[r], [r]), _ = r === "failed" ? "alert" : "status";
|
|
834
|
+
return /* @__PURE__ */ a.jsx(
|
|
730
835
|
"div",
|
|
731
836
|
{
|
|
732
837
|
ref: l,
|
|
733
|
-
role:
|
|
838
|
+
role: _,
|
|
734
839
|
"aria-live": r === "failed" ? "assertive" : "polite",
|
|
735
|
-
className:
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
840
|
+
className: m(
|
|
841
|
+
V["sand-feedback"],
|
|
842
|
+
V[`sand-feedback-${c}`],
|
|
843
|
+
V[`sand-feedback-${r}`],
|
|
844
|
+
o
|
|
740
845
|
),
|
|
741
|
-
...
|
|
742
|
-
children: /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
e && /* @__PURE__ */
|
|
746
|
-
/* @__PURE__ */
|
|
846
|
+
...d,
|
|
847
|
+
children: /* @__PURE__ */ a.jsxs("div", { className: V["sand-feedback-row"], children: [
|
|
848
|
+
/* @__PURE__ */ a.jsx("span", { className: m(V["sand-feedback-icon"], "material-symbols-rounded"), "aria-hidden": "true", children: i }),
|
|
849
|
+
/* @__PURE__ */ a.jsxs("div", { className: V["sand-feedback-content"], children: [
|
|
850
|
+
e && /* @__PURE__ */ a.jsx("span", { className: V["sand-feedback-title"], children: e }),
|
|
851
|
+
/* @__PURE__ */ a.jsx("span", { className: V["sand-feedback-message"], children: n })
|
|
747
852
|
] }),
|
|
748
|
-
t && /* @__PURE__ */
|
|
853
|
+
t && /* @__PURE__ */ a.jsx("div", { className: V["sand-feedback-action"], children: t })
|
|
749
854
|
] })
|
|
750
855
|
}
|
|
751
856
|
);
|
|
752
|
-
}),
|
|
753
|
-
return /* @__PURE__ */
|
|
857
|
+
}), Ua = f(function(e, n) {
|
|
858
|
+
return /* @__PURE__ */ a.jsx(mn, { ref: n, mode: "toast", ...e });
|
|
754
859
|
});
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
return /* @__PURE__ */
|
|
860
|
+
Ua.displayName = "SandToast";
|
|
861
|
+
const Ja = f(function(e, n) {
|
|
862
|
+
return /* @__PURE__ */ a.jsx(mn, { ref: n, mode: "snackbar", ...e });
|
|
758
863
|
});
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
grid:
|
|
762
|
-
item:
|
|
763
|
-
},
|
|
764
|
-
let
|
|
765
|
-
return
|
|
864
|
+
Ja.displayName = "SandSnackbar";
|
|
865
|
+
const Xa = "_grid_g8kr4_1", Za = "_item_g8kr4_7", fn = {
|
|
866
|
+
grid: Xa,
|
|
867
|
+
item: Za
|
|
868
|
+
}, bn = f(function({ columns: e = 12, gap: n = "md", className: t, style: r, ...o }, c) {
|
|
869
|
+
let d = r;
|
|
870
|
+
return d = cn(d, "sand-grid-columns", e), d = C(d, "--sand-grid-gap", me(n)), /* @__PURE__ */ a.jsx("div", { ref: c, className: m(fn.grid, t), style: d, ...o });
|
|
766
871
|
});
|
|
767
|
-
|
|
768
|
-
const
|
|
872
|
+
bn.displayName = "SandGrid";
|
|
873
|
+
const hn = f(function({ span: e = 1, className: n, style: t, ...r }, o) {
|
|
769
874
|
let c = t;
|
|
770
|
-
return c =
|
|
875
|
+
return c = cn(c, "sand-grid-span", e), /* @__PURE__ */ a.jsx("div", { ref: o, className: m(fn.item, n), style: c, ...r });
|
|
771
876
|
});
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
Item:
|
|
775
|
-
}),
|
|
877
|
+
hn.displayName = "SandGrid.Item";
|
|
878
|
+
const Bs = Object.assign(bn, {
|
|
879
|
+
Item: hn
|
|
880
|
+
}), he = {
|
|
776
881
|
"sand-form-group": "_sand-form-group_6kvlc_1",
|
|
777
882
|
"sand-label": "_sand-label_6kvlc_8",
|
|
778
883
|
"sand-input": "_sand-input_6kvlc_17",
|
|
779
884
|
"sand-input-error": "_sand-input-error_6kvlc_37",
|
|
780
885
|
"sand-helper-text-error": "_sand-helper-text-error_6kvlc_45"
|
|
781
|
-
},
|
|
782
|
-
return /* @__PURE__ */
|
|
783
|
-
e && /* @__PURE__ */
|
|
784
|
-
|
|
886
|
+
}, xe = f(function({ label: e, children: n, className: t = "", htmlFor: r, ...o }, c) {
|
|
887
|
+
return /* @__PURE__ */ a.jsxs("div", { ref: c, className: m(he["sand-form-group"], t), ...o, children: [
|
|
888
|
+
e && /* @__PURE__ */ a.jsx("label", { className: he["sand-label"], htmlFor: r, children: e }),
|
|
889
|
+
n
|
|
785
890
|
] });
|
|
786
891
|
});
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
return /* @__PURE__ */
|
|
892
|
+
xe.displayName = "SandFormGroup";
|
|
893
|
+
const vn = f(function({ error: e, className: n = "", ...t }, r) {
|
|
894
|
+
return /* @__PURE__ */ a.jsx(
|
|
790
895
|
"input",
|
|
791
896
|
{
|
|
792
897
|
ref: r,
|
|
793
|
-
className:
|
|
898
|
+
className: m(he["sand-input"], e && he["sand-input-error"], n),
|
|
794
899
|
"aria-invalid": e || t["aria-invalid"],
|
|
795
900
|
...t
|
|
796
901
|
}
|
|
797
902
|
);
|
|
798
903
|
});
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
const
|
|
802
|
-
() => [c,
|
|
803
|
-
[c,
|
|
904
|
+
vn.displayName = "SandInput";
|
|
905
|
+
const Qa = f(function({ label: e, helperText: n, error: t, groupClassName: r, className: o = "", "aria-describedby": c, ...d }, l) {
|
|
906
|
+
const i = O(), _ = d.id ?? i, p = n ? `${_}-help` : void 0, h = E(
|
|
907
|
+
() => [c, p].filter(Boolean).join(" ") || void 0,
|
|
908
|
+
[c, p]
|
|
804
909
|
);
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
|
|
910
|
+
return /* @__PURE__ */ a.jsxs(xe, { label: e, className: r, htmlFor: _, children: [
|
|
911
|
+
/* @__PURE__ */ a.jsx(
|
|
912
|
+
vn,
|
|
808
913
|
{
|
|
809
914
|
ref: l,
|
|
810
|
-
id:
|
|
915
|
+
id: _,
|
|
811
916
|
error: t,
|
|
812
|
-
className:
|
|
813
|
-
"aria-describedby":
|
|
814
|
-
...
|
|
917
|
+
className: o,
|
|
918
|
+
"aria-describedby": h,
|
|
919
|
+
...d
|
|
815
920
|
}
|
|
816
921
|
),
|
|
817
|
-
|
|
922
|
+
n && /* @__PURE__ */ a.jsx("span", { id: p, className: t ? he["sand-helper-text-error"] : "", children: n })
|
|
818
923
|
] });
|
|
819
924
|
});
|
|
820
|
-
|
|
821
|
-
const
|
|
925
|
+
Qa.displayName = "SandInputGroup";
|
|
926
|
+
const et = {
|
|
822
927
|
"sand-kbd": "_sand-kbd_mo78g_1"
|
|
823
|
-
},
|
|
824
|
-
return /* @__PURE__ */
|
|
928
|
+
}, nt = f(function({ className: e = "", ...n }, t) {
|
|
929
|
+
return /* @__PURE__ */ a.jsx("kbd", { ref: t, className: m(et["sand-kbd"], e), ...n });
|
|
825
930
|
});
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
loader:
|
|
829
|
-
skeleton:
|
|
830
|
-
},
|
|
831
|
-
return /* @__PURE__ */
|
|
931
|
+
nt.displayName = "SandKBD";
|
|
932
|
+
const at = "_loader_1onos_1", tt = "_skeleton_1onos_10", yn = {
|
|
933
|
+
loader: at,
|
|
934
|
+
skeleton: tt
|
|
935
|
+
}, st = f(function({ size: e = 40, className: n, style: t, ...r }, o) {
|
|
936
|
+
return /* @__PURE__ */ a.jsx(
|
|
832
937
|
"span",
|
|
833
938
|
{
|
|
834
|
-
ref:
|
|
835
|
-
className:
|
|
939
|
+
ref: o,
|
|
940
|
+
className: m(yn.loader, n),
|
|
836
941
|
style: { "--sand-loader-size": `${e}px`, ...t },
|
|
837
942
|
...r
|
|
838
943
|
}
|
|
839
944
|
);
|
|
840
945
|
});
|
|
841
|
-
|
|
842
|
-
const
|
|
843
|
-
return /* @__PURE__ */
|
|
946
|
+
st.displayName = "SandLoader";
|
|
947
|
+
const rt = f(function({ width: e = "100%", height: n = 16, radius: t = "md", className: r, style: o, ...c }, d) {
|
|
948
|
+
return /* @__PURE__ */ a.jsx(
|
|
844
949
|
"div",
|
|
845
950
|
{
|
|
846
|
-
ref:
|
|
951
|
+
ref: d,
|
|
847
952
|
"aria-hidden": "true",
|
|
848
|
-
className:
|
|
953
|
+
className: m(yn.skeleton, r),
|
|
849
954
|
style: {
|
|
850
955
|
width: e,
|
|
851
|
-
height:
|
|
852
|
-
"--sand-skeleton-radius":
|
|
853
|
-
...
|
|
956
|
+
height: n,
|
|
957
|
+
"--sand-skeleton-radius": on(t),
|
|
958
|
+
...o
|
|
854
959
|
},
|
|
855
960
|
...c
|
|
856
961
|
}
|
|
857
962
|
);
|
|
858
963
|
});
|
|
859
|
-
|
|
860
|
-
const
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
964
|
+
rt.displayName = "SandSkeleton";
|
|
965
|
+
const ot = "_container_x9f0c_1", ct = "_slider_x9f0c_8", it = "_error_x9f0c_43", dt = "_valueDisplay_x9f0c_50", lt = "_helper_x9f0c_58", ae = {
|
|
966
|
+
container: ot,
|
|
967
|
+
slider: ct,
|
|
968
|
+
error: it,
|
|
969
|
+
valueDisplay: dt,
|
|
970
|
+
helper: lt,
|
|
971
|
+
"helper-error": "_helper-error_x9f0c_64"
|
|
972
|
+
}, ut = f(function({ label: e, helperText: n, error: t, className: r = "", ...o }, c) {
|
|
973
|
+
const d = O(), l = o.id ?? d, i = n ? `${l}-help` : void 0;
|
|
974
|
+
return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: l, children: [
|
|
975
|
+
/* @__PURE__ */ a.jsxs("div", { className: ae.container, children: [
|
|
976
|
+
/* @__PURE__ */ a.jsx(
|
|
977
|
+
"input",
|
|
978
|
+
{
|
|
979
|
+
ref: c,
|
|
980
|
+
id: l,
|
|
981
|
+
type: "range",
|
|
982
|
+
className: m(ae.slider, t && ae.error, r),
|
|
983
|
+
"aria-invalid": t || void 0,
|
|
984
|
+
"aria-describedby": i,
|
|
985
|
+
...o
|
|
986
|
+
}
|
|
987
|
+
),
|
|
988
|
+
o.value !== void 0 && /* @__PURE__ */ a.jsx("span", { className: ae.valueDisplay, children: o.value })
|
|
989
|
+
] }),
|
|
990
|
+
n && /* @__PURE__ */ a.jsx("span", { id: i, className: m(ae.helper, t && ae["helper-error"]), children: n })
|
|
991
|
+
] });
|
|
872
992
|
});
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
|
|
993
|
+
ut.displayName = "SandSlider";
|
|
994
|
+
const G = {
|
|
995
|
+
"sand-container": "_sand-container_plvlx_1",
|
|
996
|
+
"sand-header": "_sand-header_plvlx_7",
|
|
997
|
+
"sand-tool-layout": "_sand-tool-layout_plvlx_17",
|
|
998
|
+
"sand-tool-panel": "_sand-tool-panel_plvlx_24",
|
|
999
|
+
"sand-result-panel": "_sand-result-panel_plvlx_34",
|
|
1000
|
+
"sand-microservice-layout": "_sand-microservice-layout_plvlx_47",
|
|
1001
|
+
"sand-microservice-sidebar": "_sand-microservice-sidebar_plvlx_54",
|
|
1002
|
+
"sand-microservice-content": "_sand-microservice-content_plvlx_67",
|
|
1003
|
+
"sand-microservice-main": "_sand-microservice-main_plvlx_74"
|
|
1004
|
+
}, _t = f(function({ className: e = "", ...n }, t) {
|
|
1005
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(G["sand-container"], e), ...n });
|
|
876
1006
|
});
|
|
877
|
-
|
|
878
|
-
const
|
|
879
|
-
return /* @__PURE__ */
|
|
1007
|
+
_t.displayName = "SandContainer";
|
|
1008
|
+
const pt = f(function({ className: e = "", ...n }, t) {
|
|
1009
|
+
return /* @__PURE__ */ a.jsx("header", { ref: t, className: m(G["sand-header"], e), ...n });
|
|
880
1010
|
});
|
|
881
|
-
|
|
882
|
-
const
|
|
883
|
-
|
|
1011
|
+
pt.displayName = "SandHeader";
|
|
1012
|
+
const Me = f(
|
|
1013
|
+
function({ className: e = "", ...n }, t) {
|
|
1014
|
+
return /* @__PURE__ */ a.jsx("aside", { ref: t, className: m(G["sand-tool-panel"], e), ...n });
|
|
1015
|
+
}
|
|
1016
|
+
);
|
|
1017
|
+
Me.displayName = "SandAppLayout.Sidebar";
|
|
1018
|
+
const ze = f(
|
|
1019
|
+
function({ className: e = "", ...n }, t) {
|
|
1020
|
+
return /* @__PURE__ */ a.jsx("main", { ref: t, className: m(G["sand-result-panel"], e), ...n });
|
|
1021
|
+
}
|
|
1022
|
+
);
|
|
1023
|
+
ze.displayName = "SandAppLayout.Main";
|
|
1024
|
+
const mt = f(
|
|
1025
|
+
function({ className: e = "", ...n }, t) {
|
|
1026
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(G["sand-tool-layout"], e), ...n });
|
|
1027
|
+
}
|
|
1028
|
+
), xn = Object.assign(mt, {
|
|
1029
|
+
Sidebar: Me,
|
|
1030
|
+
Main: ze
|
|
884
1031
|
});
|
|
885
|
-
|
|
886
|
-
const
|
|
1032
|
+
xn.displayName = "SandAppLayout";
|
|
1033
|
+
const Fs = xn, qs = Me, Vs = ze, gn = f(
|
|
1034
|
+
function({ children: e, className: n = "", ...t }, r) {
|
|
1035
|
+
return /* @__PURE__ */ a.jsx("aside", { ref: r, className: m(G["sand-microservice-sidebar"], n), ...t, children: e });
|
|
1036
|
+
}
|
|
1037
|
+
);
|
|
1038
|
+
gn.displayName = "SandMicroserviceLayout.Sidebar";
|
|
1039
|
+
const Sn = f(
|
|
1040
|
+
function({ children: e, className: n = "", ...t }, r) {
|
|
1041
|
+
return /* @__PURE__ */ a.jsx("div", { ref: r, className: m(G["sand-microservice-content"], n), ...t, children: e });
|
|
1042
|
+
}
|
|
1043
|
+
);
|
|
1044
|
+
Sn.displayName = "SandMicroserviceLayout.Content";
|
|
1045
|
+
const jn = f(
|
|
1046
|
+
function({ children: e, className: n = "", ...t }, r) {
|
|
1047
|
+
return /* @__PURE__ */ a.jsx("main", { ref: r, className: m(G["sand-microservice-main"], n), ...t, children: e });
|
|
1048
|
+
}
|
|
1049
|
+
);
|
|
1050
|
+
jn.displayName = "SandMicroserviceLayout.Main";
|
|
1051
|
+
const we = f(
|
|
1052
|
+
function({ children: e, className: n = "", ...t }, r) {
|
|
1053
|
+
return /* @__PURE__ */ a.jsx("div", { ref: r, className: m(G["sand-microservice-layout"], n), ...t, children: e });
|
|
1054
|
+
}
|
|
1055
|
+
);
|
|
1056
|
+
we.displayName = "SandMicroserviceLayout";
|
|
1057
|
+
we.Sidebar = gn;
|
|
1058
|
+
we.Content = Sn;
|
|
1059
|
+
we.Main = jn;
|
|
1060
|
+
const H = {
|
|
887
1061
|
"sand-modal-root": "_sand-modal-root_1e60v_1",
|
|
888
1062
|
"sand-modal-backdrop": "_sand-modal-backdrop_1e60v_11",
|
|
889
1063
|
"sand-modal-panel": "_sand-modal-panel_1e60v_22",
|
|
@@ -893,346 +1067,627 @@ const M = {
|
|
|
893
1067
|
"sand-modal-close": "_sand-modal-close_1e60v_59",
|
|
894
1068
|
"sand-modal-body": "_sand-modal-body_1e60v_78",
|
|
895
1069
|
"sand-modal-footer": "_sand-modal-footer_1e60v_86"
|
|
896
|
-
}
|
|
897
|
-
function
|
|
898
|
-
const
|
|
1070
|
+
};
|
|
1071
|
+
function Te(s, e) {
|
|
1072
|
+
const { enabled: n, initialFocusRef: t } = e, r = z(null), o = A(
|
|
1073
|
+
(c) => {
|
|
1074
|
+
if (!n || !s.current || c.key !== "Tab")
|
|
1075
|
+
return;
|
|
1076
|
+
const d = ea(s.current);
|
|
1077
|
+
if (d.length === 0) {
|
|
1078
|
+
c.preventDefault(), s.current.focus();
|
|
1079
|
+
return;
|
|
1080
|
+
}
|
|
1081
|
+
const l = d[0], i = d[d.length - 1], _ = document.activeElement;
|
|
1082
|
+
c.shiftKey && _ === l ? (c.preventDefault(), i.focus()) : !c.shiftKey && _ === i && (c.preventDefault(), l.focus());
|
|
1083
|
+
},
|
|
1084
|
+
[n, s]
|
|
1085
|
+
);
|
|
1086
|
+
K(() => {
|
|
1087
|
+
if (!n) {
|
|
1088
|
+
r.current && (r.current.focus(), r.current = null);
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
r.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1092
|
+
const d = setTimeout(() => {
|
|
1093
|
+
const l = t?.current || s.current;
|
|
1094
|
+
l && l.focus();
|
|
1095
|
+
}, 16);
|
|
1096
|
+
return window.addEventListener("keydown", o), () => {
|
|
1097
|
+
window.removeEventListener("keydown", o), clearTimeout(d);
|
|
1098
|
+
};
|
|
1099
|
+
}, [n, o, t, s]);
|
|
1100
|
+
}
|
|
1101
|
+
const Nn = f(function({ as: e, direction: n = "column", gap: t = "md", align: r, justify: o, wrap: c, surface: d, className: l, style: i, ..._ }, p) {
|
|
1102
|
+
const h = e ?? "div";
|
|
1103
|
+
let v = i;
|
|
1104
|
+
return v = C(v, "--sand-display", "flex"), v = C(v, "--sand-gap", me(t)), v = C(v, "--sand-align", r), v = C(v, "--sand-justify", o), v = C(v, "--sand-stack-direction", n), v = C(v, "--sand-stack-wrap", c ? "wrap" : "nowrap"), /* @__PURE__ */ a.jsx(
|
|
1105
|
+
h,
|
|
1106
|
+
{
|
|
1107
|
+
ref: p,
|
|
1108
|
+
className: m(fe.box, d && fe.surface, l),
|
|
1109
|
+
style: {
|
|
1110
|
+
flexDirection: "var(--sand-stack-direction)",
|
|
1111
|
+
flexWrap: "var(--sand-stack-wrap)",
|
|
1112
|
+
...v
|
|
1113
|
+
},
|
|
1114
|
+
..._
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1117
|
+
});
|
|
1118
|
+
Nn.displayName = "SandStack";
|
|
1119
|
+
const kn = ye(null);
|
|
1120
|
+
function wn() {
|
|
1121
|
+
const s = ve(kn);
|
|
899
1122
|
if (!s)
|
|
900
1123
|
throw new Error("SandModal sub-components must be used within SandModal.");
|
|
901
1124
|
return s;
|
|
902
1125
|
}
|
|
903
|
-
const
|
|
904
|
-
return /* @__PURE__ */
|
|
1126
|
+
const De = f(function({ className: e = "", ...n }, t) {
|
|
1127
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-header"], e), ...n });
|
|
905
1128
|
});
|
|
906
|
-
|
|
907
|
-
const
|
|
908
|
-
return /* @__PURE__ */
|
|
1129
|
+
De.displayName = "SandModal.Header";
|
|
1130
|
+
const Pe = f(function({ className: e = "", ...n }, t) {
|
|
1131
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-body"], e), ...n });
|
|
909
1132
|
});
|
|
910
|
-
|
|
911
|
-
const
|
|
912
|
-
return /* @__PURE__ */
|
|
1133
|
+
Pe.displayName = "SandModal.Body";
|
|
1134
|
+
const Le = f(function({ className: e = "", ...n }, t) {
|
|
1135
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, className: m(H["sand-modal-footer"], e), ...n });
|
|
913
1136
|
});
|
|
914
|
-
|
|
915
|
-
const
|
|
916
|
-
const { titleId: r } =
|
|
917
|
-
return /* @__PURE__ */
|
|
1137
|
+
Le.displayName = "SandModal.Footer";
|
|
1138
|
+
const Be = f(function({ className: e = "", ...n }, t) {
|
|
1139
|
+
const { titleId: r } = wn();
|
|
1140
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, id: r, className: m(H["sand-modal-title"], e), ...n });
|
|
918
1141
|
});
|
|
919
|
-
|
|
920
|
-
const
|
|
921
|
-
const { descriptionId: r } =
|
|
922
|
-
return /* @__PURE__ */
|
|
1142
|
+
Be.displayName = "SandModal.Title";
|
|
1143
|
+
const Fe = f(function({ className: e = "", ...n }, t) {
|
|
1144
|
+
const { descriptionId: r } = wn();
|
|
1145
|
+
return /* @__PURE__ */ a.jsx("div", { ref: t, id: r, className: m(H["sand-modal-description"], e), ...n });
|
|
923
1146
|
});
|
|
924
|
-
|
|
925
|
-
const
|
|
1147
|
+
Fe.displayName = "SandModal.Description";
|
|
1148
|
+
const Tn = f(function({
|
|
926
1149
|
open: e,
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1150
|
+
isOpen: n,
|
|
1151
|
+
onClose: t,
|
|
1152
|
+
title: r,
|
|
1153
|
+
description: o,
|
|
1154
|
+
footer: c,
|
|
1155
|
+
closeOnOverlay: d = !0,
|
|
1156
|
+
initialFocusRef: l,
|
|
1157
|
+
children: i,
|
|
1158
|
+
className: _ = "",
|
|
1159
|
+
...p
|
|
1160
|
+
}, h) {
|
|
1161
|
+
const v = e ?? n ?? !1, b = O(), g = O(), j = z(null), y = z(null), D = E(
|
|
1162
|
+
() => ({ titleId: b, descriptionId: g }),
|
|
1163
|
+
[g, b]
|
|
1164
|
+
), P = A(
|
|
1165
|
+
(I) => {
|
|
1166
|
+
y.current = I, typeof h == "function" ? h(I) : h && (h.current = I);
|
|
943
1167
|
},
|
|
944
|
-
[
|
|
945
|
-
)
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
const O = _a(T.current);
|
|
954
|
-
if (O.length === 0) {
|
|
955
|
-
w.preventDefault(), T.current.focus();
|
|
956
|
-
return;
|
|
957
|
-
}
|
|
958
|
-
const ae = O[0], ne = O[O.length - 1], te = document.activeElement;
|
|
959
|
-
w.shiftKey && te === ae ? (w.preventDefault(), ne.focus()) : !w.shiftKey && te === ne && (w.preventDefault(), ae.focus());
|
|
1168
|
+
[h]
|
|
1169
|
+
);
|
|
1170
|
+
Te(y, {
|
|
1171
|
+
enabled: v,
|
|
1172
|
+
initialFocusRef: l || j
|
|
1173
|
+
});
|
|
1174
|
+
const Y = A(
|
|
1175
|
+
(I) => {
|
|
1176
|
+
I.key === "Escape" && (I.preventDefault(), t());
|
|
960
1177
|
},
|
|
961
|
-
[
|
|
1178
|
+
[t]
|
|
962
1179
|
);
|
|
963
|
-
return
|
|
964
|
-
if (!
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
R.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
969
|
-
const w = document.body.style.overflow;
|
|
970
|
-
return document.body.style.overflow = "hidden", (i?.current ?? v.current ?? T.current)?.focus(), window.addEventListener("keydown", G), () => {
|
|
971
|
-
document.body.style.overflow = w, window.removeEventListener("keydown", G);
|
|
1180
|
+
return K(() => {
|
|
1181
|
+
if (!v) return;
|
|
1182
|
+
const I = document.body.style.overflow;
|
|
1183
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1184
|
+
document.body.style.overflow = I;
|
|
972
1185
|
};
|
|
973
|
-
}, [
|
|
974
|
-
/* @__PURE__ */
|
|
1186
|
+
}, [v]), v ? /* @__PURE__ */ a.jsxs("div", { className: H["sand-modal-root"], onKeyDown: Y, children: [
|
|
1187
|
+
/* @__PURE__ */ a.jsx(
|
|
975
1188
|
"button",
|
|
976
1189
|
{
|
|
977
1190
|
type: "button",
|
|
978
|
-
className:
|
|
1191
|
+
className: H["sand-modal-backdrop"],
|
|
979
1192
|
"aria-label": "Close dialog",
|
|
980
|
-
onClick:
|
|
1193
|
+
onClick: d ? t : void 0
|
|
981
1194
|
}
|
|
982
1195
|
),
|
|
983
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ a.jsx(
|
|
984
1197
|
"div",
|
|
985
1198
|
{
|
|
986
|
-
ref:
|
|
1199
|
+
ref: P,
|
|
987
1200
|
role: "dialog",
|
|
988
1201
|
"aria-modal": "true",
|
|
989
|
-
"aria-labelledby":
|
|
990
|
-
"aria-describedby":
|
|
991
|
-
className:
|
|
1202
|
+
"aria-labelledby": r ? b : void 0,
|
|
1203
|
+
"aria-describedby": o ? g : void 0,
|
|
1204
|
+
className: m(H["sand-modal-panel"], _),
|
|
992
1205
|
tabIndex: -1,
|
|
993
|
-
...
|
|
994
|
-
children: /* @__PURE__ */
|
|
995
|
-
(
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
|
|
998
|
-
|
|
1206
|
+
...p,
|
|
1207
|
+
children: /* @__PURE__ */ a.jsxs(kn.Provider, { value: D, children: [
|
|
1208
|
+
(r || o) && /* @__PURE__ */ a.jsxs(De, { children: [
|
|
1209
|
+
/* @__PURE__ */ a.jsxs("div", { children: [
|
|
1210
|
+
r && /* @__PURE__ */ a.jsx(Be, { children: r }),
|
|
1211
|
+
o && /* @__PURE__ */ a.jsx(Fe, { children: o })
|
|
999
1212
|
] }),
|
|
1000
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ a.jsx(
|
|
1001
1214
|
"button",
|
|
1002
1215
|
{
|
|
1003
|
-
ref:
|
|
1216
|
+
ref: j,
|
|
1004
1217
|
type: "button",
|
|
1005
|
-
className:
|
|
1006
|
-
onClick:
|
|
1218
|
+
className: H["sand-modal-close"],
|
|
1219
|
+
onClick: t,
|
|
1007
1220
|
"aria-label": "Close dialog",
|
|
1008
|
-
children: /* @__PURE__ */
|
|
1221
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "close" })
|
|
1009
1222
|
}
|
|
1010
1223
|
)
|
|
1011
1224
|
] }),
|
|
1012
|
-
/* @__PURE__ */
|
|
1013
|
-
|
|
1225
|
+
/* @__PURE__ */ a.jsx(Pe, { children: i }),
|
|
1226
|
+
c && /* @__PURE__ */ a.jsx(Le, { children: c })
|
|
1014
1227
|
] })
|
|
1015
1228
|
}
|
|
1016
1229
|
)
|
|
1017
1230
|
] }) : null;
|
|
1018
1231
|
});
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1021
|
-
Header:
|
|
1022
|
-
Body:
|
|
1023
|
-
Footer:
|
|
1024
|
-
Title:
|
|
1025
|
-
Description:
|
|
1026
|
-
})
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1232
|
+
Tn.displayName = "SandModal";
|
|
1233
|
+
const ft = Object.assign(Tn, {
|
|
1234
|
+
Header: De,
|
|
1235
|
+
Body: Pe,
|
|
1236
|
+
Footer: Le,
|
|
1237
|
+
Title: Be,
|
|
1238
|
+
Description: Fe
|
|
1239
|
+
});
|
|
1240
|
+
function Hs({
|
|
1241
|
+
onConfirm: s,
|
|
1242
|
+
onClose: e,
|
|
1243
|
+
confirmLabel: n = "Confirm",
|
|
1244
|
+
cancelLabel: t = "Cancel",
|
|
1245
|
+
confirmVariant: r = "primary",
|
|
1246
|
+
footer: o,
|
|
1247
|
+
children: c,
|
|
1248
|
+
...d
|
|
1249
|
+
}) {
|
|
1250
|
+
const l = o || /* @__PURE__ */ a.jsxs(Nn, { direction: "row", gap: "sm", justify: "flex-end", children: [
|
|
1251
|
+
/* @__PURE__ */ a.jsx(Ae, { variant: "outline", onClick: e, children: t }),
|
|
1252
|
+
/* @__PURE__ */ a.jsx(Ae, { variant: r, onClick: s, children: n })
|
|
1253
|
+
] });
|
|
1254
|
+
return /* @__PURE__ */ a.jsx(ft, { onClose: e, footer: l, ...d, children: c });
|
|
1255
|
+
}
|
|
1256
|
+
const bt = "_navbar_ce3ap_1", ht = "_container_ce3ap_11", vt = "_brand_ce3ap_20", yt = "_links_ce3ap_30", xt = "_link_ce3ap_30", gt = "_linkActive_ce3ap_55", St = "_mobileToggle_ce3ap_64", jt = "_overlay_ce3ap_86", Nt = "_overlayVisible_ce3ap_97", kt = "_drawer_ce3ap_102", wt = "_drawerOpen_ce3ap_118", Tt = "_drawerHeader_ce3ap_122", It = "_drawerTitle_ce3ap_130", Ct = "_drawerClose_ce3ap_136", $t = "_drawerContent_ce3ap_150", R = {
|
|
1257
|
+
navbar: bt,
|
|
1258
|
+
container: ht,
|
|
1259
|
+
brand: vt,
|
|
1260
|
+
links: yt,
|
|
1261
|
+
link: xt,
|
|
1262
|
+
linkActive: gt,
|
|
1263
|
+
mobileToggle: St,
|
|
1264
|
+
overlay: jt,
|
|
1265
|
+
overlayVisible: Nt,
|
|
1266
|
+
drawer: kt,
|
|
1267
|
+
drawerOpen: wt,
|
|
1268
|
+
drawerHeader: Tt,
|
|
1269
|
+
drawerTitle: It,
|
|
1270
|
+
drawerClose: Ct,
|
|
1271
|
+
drawerContent: $t
|
|
1272
|
+
}, Oe = () => null;
|
|
1273
|
+
Oe.displayName = "SandNavbarItem";
|
|
1274
|
+
const Gs = f(function({ brand: e, items: n = [], onMenuClick: t, className: r, children: o, ...c }, d) {
|
|
1275
|
+
const l = [...n];
|
|
1276
|
+
return be.forEach(o, (i) => {
|
|
1277
|
+
X(i) && i.type === Oe && l.push(i.props);
|
|
1278
|
+
}), /* @__PURE__ */ a.jsx("nav", { ref: d, className: m(R.navbar, r), ...c, children: /* @__PURE__ */ a.jsxs("div", { className: R.container, children: [
|
|
1279
|
+
/* @__PURE__ */ a.jsx("div", { className: R.brand, children: e }),
|
|
1280
|
+
/* @__PURE__ */ a.jsxs("div", { className: R.links, children: [
|
|
1281
|
+
l.map((i) => /* @__PURE__ */ a.jsx(
|
|
1047
1282
|
"a",
|
|
1048
1283
|
{
|
|
1049
|
-
href:
|
|
1050
|
-
className:
|
|
1051
|
-
children:
|
|
1284
|
+
href: i.href,
|
|
1285
|
+
className: m(R.link, i.active && R.linkActive),
|
|
1286
|
+
children: i.label
|
|
1052
1287
|
},
|
|
1053
|
-
|
|
1288
|
+
i.href
|
|
1054
1289
|
)),
|
|
1055
|
-
|
|
1290
|
+
be.map(o, (i) => X(i) && i.type === Oe ? null : i)
|
|
1056
1291
|
] }),
|
|
1057
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ a.jsx(
|
|
1058
1293
|
"button",
|
|
1059
1294
|
{
|
|
1060
1295
|
type: "button",
|
|
1061
|
-
className:
|
|
1296
|
+
className: R.mobileToggle,
|
|
1062
1297
|
onClick: t,
|
|
1063
1298
|
"aria-label": "Toggle menu",
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ a.jsx(B, { icon: "menu", size: 24 })
|
|
1065
1300
|
}
|
|
1066
1301
|
)
|
|
1067
1302
|
] }) });
|
|
1068
|
-
}),
|
|
1069
|
-
|
|
1070
|
-
|
|
1303
|
+
}), Et = f(function({ open: e, isOpen: n, onClose: t, title: r, children: o, className: c, ...d }, l) {
|
|
1304
|
+
const i = e ?? n ?? !1, _ = z(null), p = z(null), h = A(
|
|
1305
|
+
(b) => {
|
|
1306
|
+
_.current = b, typeof l == "function" ? l(b) : l && (l.current = b);
|
|
1307
|
+
},
|
|
1308
|
+
[l]
|
|
1309
|
+
);
|
|
1310
|
+
Te(_, {
|
|
1311
|
+
enabled: i,
|
|
1312
|
+
initialFocusRef: p
|
|
1313
|
+
});
|
|
1314
|
+
const v = A(
|
|
1315
|
+
(b) => {
|
|
1316
|
+
b.key === "Escape" && (b.preventDefault(), t());
|
|
1317
|
+
},
|
|
1318
|
+
[t]
|
|
1319
|
+
);
|
|
1320
|
+
return K(() => {
|
|
1321
|
+
if (!i) return;
|
|
1322
|
+
const b = document.body.style.overflow;
|
|
1323
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1324
|
+
document.body.style.overflow = b;
|
|
1325
|
+
};
|
|
1326
|
+
}, [i]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1327
|
+
/* @__PURE__ */ a.jsx(
|
|
1071
1328
|
"div",
|
|
1072
1329
|
{
|
|
1073
|
-
className:
|
|
1074
|
-
onClick:
|
|
1330
|
+
className: m(R.overlay, i && R.overlayVisible),
|
|
1331
|
+
onClick: t,
|
|
1075
1332
|
"aria-hidden": "true"
|
|
1076
1333
|
}
|
|
1077
1334
|
),
|
|
1078
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ a.jsxs(
|
|
1079
1336
|
"div",
|
|
1080
1337
|
{
|
|
1081
|
-
ref:
|
|
1082
|
-
className:
|
|
1338
|
+
ref: h,
|
|
1339
|
+
className: m(R.drawer, i && R.drawerOpen, c),
|
|
1083
1340
|
role: "dialog",
|
|
1084
1341
|
"aria-modal": "true",
|
|
1085
|
-
|
|
1342
|
+
onKeyDown: v,
|
|
1343
|
+
...d,
|
|
1086
1344
|
children: [
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
/* @__PURE__ */
|
|
1089
|
-
/* @__PURE__ */
|
|
1345
|
+
/* @__PURE__ */ a.jsxs("div", { className: R.drawerHeader, children: [
|
|
1346
|
+
/* @__PURE__ */ a.jsx("div", { className: R.drawerTitle, children: r }),
|
|
1347
|
+
/* @__PURE__ */ a.jsx(
|
|
1090
1348
|
"button",
|
|
1091
1349
|
{
|
|
1350
|
+
ref: p,
|
|
1092
1351
|
type: "button",
|
|
1093
|
-
className:
|
|
1094
|
-
onClick:
|
|
1352
|
+
className: R.drawerClose,
|
|
1353
|
+
onClick: t,
|
|
1095
1354
|
"aria-label": "Close menu",
|
|
1096
|
-
children: /* @__PURE__ */
|
|
1355
|
+
children: /* @__PURE__ */ a.jsx(B, { icon: "close", size: 24 })
|
|
1097
1356
|
}
|
|
1098
1357
|
)
|
|
1099
1358
|
] }),
|
|
1100
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ a.jsx("div", { className: R.drawerContent, children: o })
|
|
1101
1360
|
]
|
|
1102
1361
|
}
|
|
1103
1362
|
)
|
|
1104
1363
|
] });
|
|
1105
|
-
})
|
|
1364
|
+
});
|
|
1365
|
+
Et.displayName = "SandDrawer";
|
|
1366
|
+
const ue = {
|
|
1106
1367
|
"sand-pagination": "_sand-pagination_cizv5_1",
|
|
1107
1368
|
"sand-page-btn": "_sand-page-btn_cizv5_8",
|
|
1108
1369
|
"sand-page-btn-active": "_sand-page-btn-active_cizv5_36"
|
|
1109
|
-
},
|
|
1110
|
-
const
|
|
1111
|
-
(
|
|
1112
|
-
|
|
1370
|
+
}, Rt = f(function({ currentPage: e, totalPages: n, onPageChange: t, className: r = "", ...o }, c) {
|
|
1371
|
+
const d = E(() => Array.from({ length: n }, (_, p) => p + 1), [n]), l = A(
|
|
1372
|
+
(_) => {
|
|
1373
|
+
_ < 1 || _ > n || _ === e || t?.(_);
|
|
1113
1374
|
},
|
|
1114
|
-
[e, t,
|
|
1115
|
-
),
|
|
1116
|
-
(
|
|
1117
|
-
|
|
1375
|
+
[e, t, n]
|
|
1376
|
+
), i = A(
|
|
1377
|
+
(_) => {
|
|
1378
|
+
ke(_, e - 1, n, (p) => l(p + 1));
|
|
1118
1379
|
},
|
|
1119
|
-
[e, l,
|
|
1380
|
+
[e, l, n]
|
|
1120
1381
|
);
|
|
1121
|
-
return /* @__PURE__ */
|
|
1382
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1122
1383
|
"nav",
|
|
1123
1384
|
{
|
|
1124
1385
|
ref: c,
|
|
1125
1386
|
"aria-label": "Pagination",
|
|
1126
|
-
className:
|
|
1127
|
-
onKeyDown:
|
|
1128
|
-
...
|
|
1387
|
+
className: m(ue["sand-pagination"], r),
|
|
1388
|
+
onKeyDown: i,
|
|
1389
|
+
...o,
|
|
1129
1390
|
children: [
|
|
1130
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ a.jsx(
|
|
1131
1392
|
"button",
|
|
1132
1393
|
{
|
|
1133
1394
|
type: "button",
|
|
1134
|
-
className:
|
|
1395
|
+
className: ue["sand-page-btn"],
|
|
1135
1396
|
disabled: e === 1,
|
|
1136
1397
|
"aria-label": "Previous page",
|
|
1137
1398
|
onClick: () => l(e - 1),
|
|
1138
|
-
children: /* @__PURE__ */
|
|
1399
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_left" })
|
|
1139
1400
|
}
|
|
1140
1401
|
),
|
|
1141
|
-
|
|
1402
|
+
d.map((_) => /* @__PURE__ */ a.jsx(
|
|
1142
1403
|
"button",
|
|
1143
1404
|
{
|
|
1144
1405
|
type: "button",
|
|
1145
|
-
"aria-current":
|
|
1146
|
-
"aria-label": `Page ${
|
|
1147
|
-
className:
|
|
1148
|
-
onClick: () => l(
|
|
1149
|
-
children:
|
|
1406
|
+
"aria-current": _ === e ? "page" : void 0,
|
|
1407
|
+
"aria-label": `Page ${_}`,
|
|
1408
|
+
className: m(ue["sand-page-btn"], _ === e && ue["sand-page-btn-active"]),
|
|
1409
|
+
onClick: () => l(_),
|
|
1410
|
+
children: _
|
|
1150
1411
|
},
|
|
1151
|
-
|
|
1412
|
+
_
|
|
1152
1413
|
)),
|
|
1153
|
-
/* @__PURE__ */
|
|
1414
|
+
/* @__PURE__ */ a.jsx(
|
|
1154
1415
|
"button",
|
|
1155
1416
|
{
|
|
1156
1417
|
type: "button",
|
|
1157
|
-
className:
|
|
1158
|
-
disabled: e ===
|
|
1418
|
+
className: ue["sand-page-btn"],
|
|
1419
|
+
disabled: e === n,
|
|
1159
1420
|
"aria-label": "Next page",
|
|
1160
1421
|
onClick: () => l(e + 1),
|
|
1161
|
-
children: /* @__PURE__ */
|
|
1422
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "material-symbols-rounded", "aria-hidden": "true", children: "chevron_right" })
|
|
1162
1423
|
}
|
|
1163
1424
|
)
|
|
1164
1425
|
]
|
|
1165
1426
|
}
|
|
1166
1427
|
);
|
|
1167
1428
|
});
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1429
|
+
Rt.displayName = "SandPagination";
|
|
1430
|
+
function In(s = {}) {
|
|
1431
|
+
const { isOpen: e, defaultIsOpen: n, onClose: t, onOpen: r } = s, [o, c] = F(n || !1), d = e !== void 0, l = d ? e : o, i = A(() => {
|
|
1432
|
+
d || c(!0), r?.();
|
|
1433
|
+
}, [d, r]), _ = A(() => {
|
|
1434
|
+
d || c(!1), t?.();
|
|
1435
|
+
}, [d, t]), p = A(() => {
|
|
1436
|
+
l ? _() : i();
|
|
1437
|
+
}, [l, i, _]);
|
|
1438
|
+
return {
|
|
1439
|
+
isOpen: l,
|
|
1440
|
+
onOpen: i,
|
|
1441
|
+
onClose: _,
|
|
1442
|
+
onToggle: p,
|
|
1443
|
+
setIsOpen: c
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
const At = "_content_1b598_1", Ot = {
|
|
1447
|
+
content: At
|
|
1448
|
+
}, Cn = ye(null), $n = () => {
|
|
1449
|
+
const s = ve(Cn);
|
|
1450
|
+
if (!s) throw new Error("Popover components must be used within SandPopover");
|
|
1451
|
+
return s;
|
|
1452
|
+
};
|
|
1453
|
+
function qe({ children: s, defaultOpen: e, open: n, onOpenChange: t }) {
|
|
1454
|
+
const r = O(), o = z(null), { isOpen: c, onClose: d, onToggle: l } = In({
|
|
1455
|
+
isOpen: n,
|
|
1456
|
+
defaultIsOpen: e,
|
|
1457
|
+
onClose: () => t?.(!1),
|
|
1458
|
+
onOpen: () => t?.(!0)
|
|
1459
|
+
}), i = E(() => ({
|
|
1460
|
+
isOpen: c,
|
|
1461
|
+
onClose: d,
|
|
1462
|
+
onToggle: l,
|
|
1463
|
+
triggerRef: o,
|
|
1464
|
+
popoverId: r
|
|
1465
|
+
}), [c, d, l, r]);
|
|
1466
|
+
return /* @__PURE__ */ a.jsx(Cn.Provider, { value: i, children: s });
|
|
1467
|
+
}
|
|
1468
|
+
function Mt({ children: s }) {
|
|
1469
|
+
const { onToggle: e, isOpen: n, triggerRef: t, popoverId: r } = $n();
|
|
1470
|
+
return X(s) ? sn(s, {
|
|
1471
|
+
ref: t,
|
|
1472
|
+
onClick: (o) => {
|
|
1473
|
+
s.props.onClick?.(o), e();
|
|
1474
|
+
},
|
|
1475
|
+
"aria-haspopup": "dialog",
|
|
1476
|
+
"aria-expanded": n,
|
|
1477
|
+
"aria-controls": r
|
|
1478
|
+
}) : s;
|
|
1479
|
+
}
|
|
1480
|
+
const zt = f(function({ children: e, width: n, className: t = "", style: r, ...o }, c) {
|
|
1481
|
+
const { isOpen: d, onClose: l, triggerRef: i, popoverId: _ } = $n(), p = z(null);
|
|
1482
|
+
return Te(p, { enabled: d }), K(() => {
|
|
1483
|
+
if (!d) return;
|
|
1484
|
+
const h = (v) => {
|
|
1485
|
+
v instanceof KeyboardEvent && v.key === "Escape" && (l(), i.current?.focus()), v instanceof MouseEvent && p.current && !p.current.contains(v.target) && i.current && !i.current.contains(v.target) && l();
|
|
1486
|
+
};
|
|
1487
|
+
return document.addEventListener("mousedown", h), document.addEventListener("keydown", h), () => {
|
|
1488
|
+
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", h);
|
|
1489
|
+
};
|
|
1490
|
+
}, [d, l, i]), d ? rn(
|
|
1491
|
+
/* @__PURE__ */ a.jsx(
|
|
1492
|
+
"div",
|
|
1493
|
+
{
|
|
1494
|
+
ref: (h) => {
|
|
1495
|
+
p.current = h, typeof c == "function" ? c(h) : c && (c.current = h);
|
|
1496
|
+
},
|
|
1497
|
+
id: _,
|
|
1498
|
+
role: "dialog",
|
|
1499
|
+
className: m(Ot.content, t),
|
|
1500
|
+
style: {
|
|
1501
|
+
width: n,
|
|
1502
|
+
...r
|
|
1503
|
+
},
|
|
1504
|
+
...o,
|
|
1505
|
+
children: e
|
|
1506
|
+
}
|
|
1507
|
+
),
|
|
1508
|
+
document.body
|
|
1509
|
+
) : null;
|
|
1510
|
+
});
|
|
1511
|
+
qe.Trigger = Mt;
|
|
1512
|
+
qe.Content = zt;
|
|
1513
|
+
qe.displayName = "SandPopover";
|
|
1514
|
+
const Dt = "_track_1b1ni_1", Pt = "_bar_1b1ni_8", Lt = "_ring_1b1ni_15", Bt = "_ringTrack_1b1ni_19", Ft = "_ringValue_1b1ni_24", qt = "_label_1b1ni_32", te = {
|
|
1515
|
+
track: Dt,
|
|
1516
|
+
bar: Pt,
|
|
1517
|
+
ring: Lt,
|
|
1518
|
+
ringTrack: Bt,
|
|
1519
|
+
ringValue: Ft,
|
|
1520
|
+
label: qt
|
|
1176
1521
|
};
|
|
1177
|
-
function
|
|
1522
|
+
function Vt(s, e) {
|
|
1178
1523
|
return Math.min(Math.max(s, 0), e);
|
|
1179
1524
|
}
|
|
1180
|
-
const
|
|
1181
|
-
const
|
|
1182
|
-
if (
|
|
1183
|
-
const
|
|
1184
|
-
return /* @__PURE__ */
|
|
1525
|
+
const Ht = f(function({ value: e, max: n = 100, size: t = 96, thickness: r = 8, variant: o = "linear", showValue: c, className: d, style: l, ...i }, _) {
|
|
1526
|
+
const p = Vt(e, n), h = p / n * 100;
|
|
1527
|
+
if (o === "circular") {
|
|
1528
|
+
const v = (t - r) / 2, b = 2 * Math.PI * v, g = b - h / 100 * b;
|
|
1529
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1185
1530
|
"div",
|
|
1186
1531
|
{
|
|
1187
|
-
ref:
|
|
1532
|
+
ref: _,
|
|
1188
1533
|
role: "progressbar",
|
|
1189
1534
|
"aria-valuemin": 0,
|
|
1190
|
-
"aria-valuemax":
|
|
1191
|
-
"aria-valuenow":
|
|
1192
|
-
className:
|
|
1535
|
+
"aria-valuemax": n,
|
|
1536
|
+
"aria-valuenow": p,
|
|
1537
|
+
className: m(d),
|
|
1193
1538
|
style: { position: "relative", width: t, height: t, ...l },
|
|
1194
|
-
...
|
|
1539
|
+
...i,
|
|
1195
1540
|
children: [
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ a.jsxs("svg", { className: te.ring, width: t, height: t, viewBox: `0 0 ${t} ${t}`, children: [
|
|
1542
|
+
/* @__PURE__ */ a.jsx("circle", { className: te.ringTrack, cx: t / 2, cy: t / 2, r: v, strokeWidth: r }),
|
|
1543
|
+
/* @__PURE__ */ a.jsx(
|
|
1199
1544
|
"circle",
|
|
1200
1545
|
{
|
|
1201
|
-
className:
|
|
1546
|
+
className: te.ringValue,
|
|
1202
1547
|
cx: t / 2,
|
|
1203
1548
|
cy: t / 2,
|
|
1204
|
-
r:
|
|
1549
|
+
r: v,
|
|
1205
1550
|
strokeWidth: r,
|
|
1206
|
-
strokeDasharray:
|
|
1207
|
-
strokeDashoffset:
|
|
1551
|
+
strokeDasharray: b,
|
|
1552
|
+
strokeDashoffset: g
|
|
1208
1553
|
}
|
|
1209
1554
|
)
|
|
1210
1555
|
] }),
|
|
1211
|
-
c && /* @__PURE__ */
|
|
1212
|
-
Math.round(
|
|
1556
|
+
c && /* @__PURE__ */ a.jsxs("span", { className: te.label, children: [
|
|
1557
|
+
Math.round(h),
|
|
1213
1558
|
"%"
|
|
1214
1559
|
] })
|
|
1215
1560
|
]
|
|
1216
1561
|
}
|
|
1217
1562
|
);
|
|
1218
1563
|
}
|
|
1219
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ a.jsx(
|
|
1220
1565
|
"div",
|
|
1221
1566
|
{
|
|
1222
|
-
ref:
|
|
1567
|
+
ref: _,
|
|
1223
1568
|
role: "progressbar",
|
|
1224
1569
|
"aria-valuemin": 0,
|
|
1225
|
-
"aria-valuemax":
|
|
1226
|
-
"aria-valuenow":
|
|
1227
|
-
className:
|
|
1570
|
+
"aria-valuemax": n,
|
|
1571
|
+
"aria-valuenow": p,
|
|
1572
|
+
className: m(te.track, d),
|
|
1228
1573
|
style: { height: r, ...l },
|
|
1229
|
-
...
|
|
1230
|
-
children: /* @__PURE__ */
|
|
1574
|
+
...i,
|
|
1575
|
+
children: /* @__PURE__ */ a.jsx("div", { className: te.bar, style: { width: `${h}%` } })
|
|
1231
1576
|
}
|
|
1232
1577
|
);
|
|
1233
1578
|
});
|
|
1234
|
-
|
|
1235
|
-
const
|
|
1579
|
+
Ht.displayName = "SandProgress";
|
|
1580
|
+
const Gt = "_container_15onh_1", Kt = "_nativeSelect_15onh_6", Yt = "_trigger_15onh_18", Wt = "_triggerActive_15onh_43", Ut = "_error_15onh_47", Jt = "_value_15onh_55", Xt = "_placeholder_15onh_62", Zt = "_chevron_15onh_66", Qt = "_chevronOpen_15onh_72", es = "_listbox_15onh_76", ns = "_option_15onh_93", as = "_optionSelected_15onh_109", ts = "_optionDisabled_15onh_118", ss = "_checkIcon_15onh_124", rs = "_helper_15onh_128", $ = {
|
|
1581
|
+
container: Gt,
|
|
1582
|
+
nativeSelect: Kt,
|
|
1583
|
+
trigger: Yt,
|
|
1584
|
+
triggerActive: Wt,
|
|
1585
|
+
error: Ut,
|
|
1586
|
+
value: Jt,
|
|
1587
|
+
placeholder: Xt,
|
|
1588
|
+
chevron: Zt,
|
|
1589
|
+
chevronOpen: Qt,
|
|
1590
|
+
listbox: es,
|
|
1591
|
+
option: ns,
|
|
1592
|
+
optionSelected: as,
|
|
1593
|
+
optionDisabled: ts,
|
|
1594
|
+
checkIcon: ss,
|
|
1595
|
+
helper: rs,
|
|
1596
|
+
"helper-error": "_helper-error_15onh_134"
|
|
1597
|
+
}, os = f(function({ label: e, helperText: n, error: t, options: r = [], placeholder: o = "Select an option...", value: c, defaultValue: d, onChange: l, className: i = "", ..._ }, p) {
|
|
1598
|
+
const h = O(), v = _.id ?? h, b = n ? `${v}-help` : void 0, [g, j] = F(d ?? c ?? ""), { isOpen: y, onOpen: D, onClose: P, onToggle: Y } = In(), I = z(null), Z = z(null), W = z(null), oe = r.find((S) => S.value === (c ?? g)), U = A((S) => {
|
|
1599
|
+
j(S), l?.(S), P(), W.current?.focus();
|
|
1600
|
+
}, [l, P]);
|
|
1601
|
+
Te(Z, { enabled: y }), K(() => {
|
|
1602
|
+
if (!y) return;
|
|
1603
|
+
const S = (q) => {
|
|
1604
|
+
I.current && !I.current.contains(q.target) && P();
|
|
1605
|
+
};
|
|
1606
|
+
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
1607
|
+
}, [y, P]);
|
|
1608
|
+
const Ce = (S) => {
|
|
1609
|
+
S.key === "Escape" && (P(), W.current?.focus()), S.key === "ArrowDown" && !y && D();
|
|
1610
|
+
};
|
|
1611
|
+
return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: v, children: [
|
|
1612
|
+
/* @__PURE__ */ a.jsxs("div", { ref: I, className: $.container, onKeyDown: Ce, children: [
|
|
1613
|
+
/* @__PURE__ */ a.jsxs(
|
|
1614
|
+
"select",
|
|
1615
|
+
{
|
|
1616
|
+
ref: p,
|
|
1617
|
+
id: v,
|
|
1618
|
+
value: c ?? g,
|
|
1619
|
+
onChange: (S) => U(S.target.value),
|
|
1620
|
+
className: $.nativeSelect,
|
|
1621
|
+
tabIndex: -1,
|
|
1622
|
+
"aria-hidden": "true",
|
|
1623
|
+
..._,
|
|
1624
|
+
children: [
|
|
1625
|
+
/* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: o }),
|
|
1626
|
+
r.map((S) => /* @__PURE__ */ a.jsx("option", { value: S.value, disabled: S.disabled, children: S.label }, S.value))
|
|
1627
|
+
]
|
|
1628
|
+
}
|
|
1629
|
+
),
|
|
1630
|
+
/* @__PURE__ */ a.jsxs(
|
|
1631
|
+
"button",
|
|
1632
|
+
{
|
|
1633
|
+
ref: W,
|
|
1634
|
+
type: "button",
|
|
1635
|
+
"aria-haspopup": "listbox",
|
|
1636
|
+
"aria-expanded": y,
|
|
1637
|
+
"aria-labelledby": `${v}-label`,
|
|
1638
|
+
className: m(
|
|
1639
|
+
$.trigger,
|
|
1640
|
+
t && $.error,
|
|
1641
|
+
y && $.triggerActive,
|
|
1642
|
+
i
|
|
1643
|
+
),
|
|
1644
|
+
onClick: Y,
|
|
1645
|
+
children: [
|
|
1646
|
+
/* @__PURE__ */ a.jsx("span", { className: m($.value, !oe && $.placeholder), children: oe ? oe.label : o }),
|
|
1647
|
+
/* @__PURE__ */ a.jsx(B, { icon: "expand_more", size: 20, className: m($.chevron, y && $.chevronOpen) })
|
|
1648
|
+
]
|
|
1649
|
+
}
|
|
1650
|
+
),
|
|
1651
|
+
y && /* @__PURE__ */ a.jsx(
|
|
1652
|
+
"ul",
|
|
1653
|
+
{
|
|
1654
|
+
ref: Z,
|
|
1655
|
+
role: "listbox",
|
|
1656
|
+
className: $.listbox,
|
|
1657
|
+
"aria-labelledby": `${v}-label`,
|
|
1658
|
+
children: r.map((S) => {
|
|
1659
|
+
const q = S.value === (c ?? g);
|
|
1660
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1661
|
+
"li",
|
|
1662
|
+
{
|
|
1663
|
+
role: "option",
|
|
1664
|
+
"aria-selected": q,
|
|
1665
|
+
className: m(
|
|
1666
|
+
$.option,
|
|
1667
|
+
q && $.optionSelected,
|
|
1668
|
+
S.disabled && $.optionDisabled
|
|
1669
|
+
),
|
|
1670
|
+
onClick: () => !S.disabled && U(S.value),
|
|
1671
|
+
tabIndex: S.disabled ? void 0 : 0,
|
|
1672
|
+
onKeyDown: (Q) => {
|
|
1673
|
+
(Q.key === "Enter" || Q.key === " ") && (Q.preventDefault(), !S.disabled && U(S.value));
|
|
1674
|
+
},
|
|
1675
|
+
children: [
|
|
1676
|
+
S.label,
|
|
1677
|
+
q && /* @__PURE__ */ a.jsx(B, { icon: "check", size: 18, className: $.checkIcon })
|
|
1678
|
+
]
|
|
1679
|
+
},
|
|
1680
|
+
S.value
|
|
1681
|
+
);
|
|
1682
|
+
})
|
|
1683
|
+
}
|
|
1684
|
+
)
|
|
1685
|
+
] }),
|
|
1686
|
+
n && /* @__PURE__ */ a.jsx("span", { id: b, className: m($.helper, t && $["helper-error"]), children: n })
|
|
1687
|
+
] });
|
|
1688
|
+
});
|
|
1689
|
+
os.displayName = "SandSelect";
|
|
1690
|
+
const T = {
|
|
1236
1691
|
"sand-choice-group": "_sand-choice-group_viqgz_1",
|
|
1237
1692
|
"sand-choice-row": "_sand-choice-row_viqgz_7",
|
|
1238
1693
|
"sand-choice-input": "_sand-choice-input_viqgz_16",
|
|
@@ -1244,331 +1699,510 @@ const k = {
|
|
|
1244
1699
|
"sand-choice-content": "_sand-choice-content_viqgz_123",
|
|
1245
1700
|
"sand-choice-label": "_sand-choice-label_viqgz_129",
|
|
1246
1701
|
"sand-choice-description": "_sand-choice-description_viqgz_134"
|
|
1247
|
-
},
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
e && /* @__PURE__ */
|
|
1250
|
-
] }),
|
|
1251
|
-
const
|
|
1252
|
-
return /* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1702
|
+
}, Ve = ({ label: s, description: e }) => /* @__PURE__ */ a.jsxs("span", { className: T["sand-choice-content"], children: [
|
|
1703
|
+
/* @__PURE__ */ a.jsx("span", { className: T["sand-choice-label"], children: s }),
|
|
1704
|
+
e && /* @__PURE__ */ a.jsx("span", { className: T["sand-choice-description"], children: e })
|
|
1705
|
+
] }), En = f(function({ label: e, description: n, id: t, className: r = "", ...o }, c) {
|
|
1706
|
+
const d = O(), l = t ?? d;
|
|
1707
|
+
return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: l, children: [
|
|
1708
|
+
/* @__PURE__ */ a.jsx("input", { ref: c, id: l, type: "checkbox", className: T["sand-choice-input"], ...o }),
|
|
1709
|
+
/* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-checkbox"]), "aria-hidden": "true", children: /* @__PURE__ */ a.jsx("span", { className: m(T["sand-checkbox-icon"], "material-symbols-rounded"), children: "check" }) }),
|
|
1710
|
+
/* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
|
|
1256
1711
|
] });
|
|
1257
1712
|
});
|
|
1258
|
-
|
|
1259
|
-
const
|
|
1260
|
-
const l =
|
|
1261
|
-
if (
|
|
1713
|
+
En.displayName = "SandCheckbox";
|
|
1714
|
+
const Rn = f(function({ label: e, description: n, id: t, className: r = "", onKeyDown: o, ...c }, d) {
|
|
1715
|
+
const l = O(), i = t ?? l, _ = (p) => {
|
|
1716
|
+
if (o?.(p), p.defaultPrevented || !c.name)
|
|
1262
1717
|
return;
|
|
1263
|
-
const
|
|
1718
|
+
const h = Array.from(
|
|
1264
1719
|
document.querySelectorAll(`input[type="radio"][name="${c.name}"]`)
|
|
1265
|
-
),
|
|
1266
|
-
|
|
1267
|
-
|
|
1720
|
+
), v = h.findIndex((b) => b.id === i);
|
|
1721
|
+
ke(p, v, h.length, (b) => {
|
|
1722
|
+
h[b]?.focus(), h[b]?.click();
|
|
1268
1723
|
});
|
|
1269
1724
|
};
|
|
1270
|
-
return /* @__PURE__ */
|
|
1271
|
-
/* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
/* @__PURE__ */
|
|
1725
|
+
return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: i, children: [
|
|
1726
|
+
/* @__PURE__ */ a.jsx("input", { ref: d, id: i, type: "radio", className: T["sand-choice-input"], onKeyDown: _, ...c }),
|
|
1727
|
+
/* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-radio"]), "aria-hidden": "true" }),
|
|
1728
|
+
/* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
|
|
1274
1729
|
] });
|
|
1275
1730
|
});
|
|
1276
|
-
|
|
1277
|
-
const
|
|
1278
|
-
const
|
|
1279
|
-
return /* @__PURE__ */
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
/* @__PURE__ */
|
|
1731
|
+
Rn.displayName = "SandRadio";
|
|
1732
|
+
const An = f(function({ label: e, description: n, id: t, className: r = "", ...o }, c) {
|
|
1733
|
+
const d = O(), l = t ?? d;
|
|
1734
|
+
return /* @__PURE__ */ a.jsxs("label", { className: m(T["sand-choice-row"], r), htmlFor: l, children: [
|
|
1735
|
+
/* @__PURE__ */ a.jsx("input", { ref: c, id: l, type: "checkbox", role: "switch", className: T["sand-choice-input"], ...o }),
|
|
1736
|
+
/* @__PURE__ */ a.jsx("span", { className: m(T["sand-choice-control"], T["sand-switch"]), "aria-hidden": "true" }),
|
|
1737
|
+
/* @__PURE__ */ a.jsx(Ve, { label: e, description: n })
|
|
1283
1738
|
] });
|
|
1284
1739
|
});
|
|
1285
|
-
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
{
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1740
|
+
An.displayName = "SandSwitch";
|
|
1741
|
+
const cs = f(function({ className: e = "", label: n, options: t = [], type: r = "radio", name: o, value: c, onChange: d, children: l, ...i }, _) {
|
|
1742
|
+
const p = O(), h = o ?? p, v = (b) => {
|
|
1743
|
+
if (r === "checkbox" || r === "switch") {
|
|
1744
|
+
const g = Array.isArray(c) ? c : [], j = g.includes(b) ? g.filter((y) => y !== b) : [...g, b];
|
|
1745
|
+
d?.(j);
|
|
1746
|
+
} else
|
|
1747
|
+
d?.(b);
|
|
1748
|
+
};
|
|
1749
|
+
return /* @__PURE__ */ a.jsxs("div", { ref: _, role: "group", "aria-label": typeof n == "string" ? n : void 0, className: m(T["sand-choice-group"], e), ...i, children: [
|
|
1750
|
+
n && /* @__PURE__ */ a.jsx("div", { className: T["sand-choice-group-label"], children: n }),
|
|
1751
|
+
/* @__PURE__ */ a.jsxs("div", { className: T["sand-choice-group-content"], children: [
|
|
1752
|
+
t.map((b) => {
|
|
1753
|
+
const g = Array.isArray(c) ? c.includes(b.value) : c === b.value, j = {
|
|
1754
|
+
key: b.value,
|
|
1755
|
+
name: h,
|
|
1756
|
+
label: b.label,
|
|
1757
|
+
description: b.description,
|
|
1758
|
+
disabled: b.disabled,
|
|
1759
|
+
checked: g,
|
|
1760
|
+
onChange: () => v(b.value)
|
|
1761
|
+
};
|
|
1762
|
+
return r === "checkbox" ? /* @__PURE__ */ a.jsx(En, { ...j }) : r === "switch" ? /* @__PURE__ */ a.jsx(An, { ...j }) : /* @__PURE__ */ a.jsx(Rn, { ...j });
|
|
1763
|
+
}),
|
|
1764
|
+
l
|
|
1765
|
+
] })
|
|
1766
|
+
] });
|
|
1306
1767
|
});
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1309
|
-
wrapper:
|
|
1310
|
-
table:
|
|
1311
|
-
stickyHeader:
|
|
1312
|
-
striped:
|
|
1313
|
-
hoverable:
|
|
1314
|
-
},
|
|
1315
|
-
|
|
1768
|
+
cs.displayName = "SandChoiceGroup";
|
|
1769
|
+
const is = "_wrapper_1142m_1", ds = "_table_1142m_9", ls = "_stickyHeader_1142m_36", us = "_striped_1142m_42", _s = "_hoverable_1142m_50", _e = {
|
|
1770
|
+
wrapper: is,
|
|
1771
|
+
table: ds,
|
|
1772
|
+
stickyHeader: ls,
|
|
1773
|
+
striped: us,
|
|
1774
|
+
hoverable: _s
|
|
1775
|
+
}, ps = f(function({ striped: e, hoverable: n = !0, stickyHeader: t, className: r, wrapperProps: o, items: c, data: d, children: l, ...i }, _) {
|
|
1776
|
+
const p = c ?? d;
|
|
1777
|
+
return /* @__PURE__ */ a.jsx("div", { ...o, className: m(_e.wrapper, o?.className), children: /* @__PURE__ */ a.jsxs(
|
|
1316
1778
|
"table",
|
|
1317
1779
|
{
|
|
1318
|
-
ref:
|
|
1319
|
-
className:
|
|
1320
|
-
...
|
|
1780
|
+
ref: _,
|
|
1781
|
+
className: m(_e.table, e && _e.striped, n && _e.hoverable, t && _e.stickyHeader, r),
|
|
1782
|
+
...i,
|
|
1783
|
+
children: [
|
|
1784
|
+
l,
|
|
1785
|
+
p && !l && /* @__PURE__ */ a.jsx("tbody", { children: p.map((h, v) => /* @__PURE__ */ a.jsx("tr", { children: Object.values(h).map((b, g) => /* @__PURE__ */ a.jsx("td", { children: b }, g)) }, v)) })
|
|
1786
|
+
]
|
|
1321
1787
|
}
|
|
1322
1788
|
) });
|
|
1789
|
+
}), On = f(
|
|
1790
|
+
({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("thead", { ref: n, ...e, children: s })
|
|
1791
|
+
);
|
|
1792
|
+
On.displayName = "SandTable.Header";
|
|
1793
|
+
const Mn = f(
|
|
1794
|
+
({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("tbody", { ref: n, ...e, children: s })
|
|
1795
|
+
);
|
|
1796
|
+
Mn.displayName = "SandTable.Body";
|
|
1797
|
+
const zn = f(
|
|
1798
|
+
({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("tr", { ref: n, ...e, children: s })
|
|
1799
|
+
);
|
|
1800
|
+
zn.displayName = "SandTable.Row";
|
|
1801
|
+
const Dn = f(
|
|
1802
|
+
({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("td", { ref: n, ...e, children: s })
|
|
1803
|
+
);
|
|
1804
|
+
Dn.displayName = "SandTable.Cell";
|
|
1805
|
+
const Pn = f(
|
|
1806
|
+
({ children: s, ...e }, n) => /* @__PURE__ */ a.jsx("th", { ref: n, ...e, children: s })
|
|
1807
|
+
);
|
|
1808
|
+
Pn.displayName = "SandTable.HeaderCell";
|
|
1809
|
+
const Ks = Object.assign(ps, {
|
|
1810
|
+
Header: On,
|
|
1811
|
+
Body: Mn,
|
|
1812
|
+
Row: zn,
|
|
1813
|
+
Cell: Dn,
|
|
1814
|
+
HeaderCell: Pn
|
|
1815
|
+
}), ms = "_textarea_14lbs_1", fs = "_error_14lbs_23", bs = "_helper_14lbs_31", pe = {
|
|
1816
|
+
textarea: ms,
|
|
1817
|
+
error: fs,
|
|
1818
|
+
helper: bs,
|
|
1819
|
+
"helper-error": "_helper-error_14lbs_37",
|
|
1820
|
+
"resize-none": "_resize-none_14lbs_42",
|
|
1821
|
+
"resize-both": "_resize-both_14lbs_46",
|
|
1822
|
+
"resize-horizontal": "_resize-horizontal_14lbs_50",
|
|
1823
|
+
"resize-vertical": "_resize-vertical_14lbs_54"
|
|
1824
|
+
}, hs = f(function({ label: e, helperText: n, error: t, resize: r = "vertical", className: o = "", ...c }, d) {
|
|
1825
|
+
const l = O(), i = c.id ?? l, _ = n ? `${i}-help` : void 0;
|
|
1826
|
+
return /* @__PURE__ */ a.jsxs(xe, { label: e, htmlFor: i, children: [
|
|
1827
|
+
/* @__PURE__ */ a.jsx(
|
|
1828
|
+
"textarea",
|
|
1829
|
+
{
|
|
1830
|
+
ref: d,
|
|
1831
|
+
id: i,
|
|
1832
|
+
className: m(
|
|
1833
|
+
pe.textarea,
|
|
1834
|
+
t && pe.error,
|
|
1835
|
+
pe[`resize-${r}`],
|
|
1836
|
+
o
|
|
1837
|
+
),
|
|
1838
|
+
"aria-invalid": t || void 0,
|
|
1839
|
+
"aria-describedby": _,
|
|
1840
|
+
...c
|
|
1841
|
+
}
|
|
1842
|
+
),
|
|
1843
|
+
n && /* @__PURE__ */ a.jsx("span", { id: _, className: m(pe.helper, t && pe["helper-error"]), children: n })
|
|
1844
|
+
] });
|
|
1323
1845
|
});
|
|
1324
|
-
|
|
1325
|
-
const
|
|
1326
|
-
root:
|
|
1327
|
-
list:
|
|
1328
|
-
trigger:
|
|
1329
|
-
active:
|
|
1330
|
-
indicator:
|
|
1331
|
-
panel:
|
|
1332
|
-
};
|
|
1333
|
-
|
|
1334
|
-
|
|
1846
|
+
hs.displayName = "SandTextarea";
|
|
1847
|
+
const vs = "_root_yi163_1", ys = "_list_yi163_6", xs = "_trigger_yi163_18", gs = "_active_yi163_41", Ss = "_indicator_yi163_45", js = "_panel_yi163_57", L = {
|
|
1848
|
+
root: vs,
|
|
1849
|
+
list: ys,
|
|
1850
|
+
trigger: xs,
|
|
1851
|
+
active: gs,
|
|
1852
|
+
indicator: Ss,
|
|
1853
|
+
panel: js
|
|
1854
|
+
}, He = () => null;
|
|
1855
|
+
He.displayName = "SandTabItem";
|
|
1856
|
+
const Ln = ye(void 0);
|
|
1857
|
+
function Bn() {
|
|
1858
|
+
const s = ve(Ln);
|
|
1859
|
+
if (!s)
|
|
1860
|
+
throw new Error("Tabs components must be used within a SandTabs component");
|
|
1861
|
+
return s;
|
|
1862
|
+
}
|
|
1863
|
+
function Ie({ items: s = [], defaultValue: e, value: n, onChange: t, className: r, children: o, ...c }) {
|
|
1864
|
+
const d = O(), l = E(() => {
|
|
1865
|
+
const y = [...s];
|
|
1866
|
+
return be.forEach(o, (D) => {
|
|
1867
|
+
X(D) && D.type === He && y.push(D.props);
|
|
1868
|
+
}), y;
|
|
1869
|
+
}, [s, o]), [i, _] = F(e ?? l[0]?.id), p = n ?? i, h = A((y) => {
|
|
1870
|
+
_(y), t?.(y);
|
|
1871
|
+
}, [t]), v = E(() => ({
|
|
1872
|
+
activeId: p,
|
|
1873
|
+
setActiveId: h,
|
|
1874
|
+
baseId: d
|
|
1875
|
+
}), [p, h, d]), b = Math.max(l.findIndex((y) => y.id === p), 0), g = E(
|
|
1335
1876
|
() => ({
|
|
1336
|
-
"--sand-tabs-left": `calc(4px + ${
|
|
1337
|
-
"--sand-tabs-width": `calc((100% - 8px) / ${Math.max(
|
|
1877
|
+
"--sand-tabs-left": `calc(4px + ${b} * (100% - 8px) / ${Math.max(l.length, 1)})`,
|
|
1878
|
+
"--sand-tabs-width": `calc((100% - 8px) / ${Math.max(l.length, 1)})`
|
|
1338
1879
|
}),
|
|
1339
|
-
[
|
|
1340
|
-
);
|
|
1341
|
-
return /* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
|
|
1345
|
-
const
|
|
1346
|
-
return /* @__PURE__ */
|
|
1880
|
+
[b, l.length]
|
|
1881
|
+
), j = l.length > 0;
|
|
1882
|
+
return /* @__PURE__ */ a.jsx(Ln.Provider, { value: v, children: /* @__PURE__ */ a.jsx("div", { className: m(L.root, r), ...c, children: j ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1883
|
+
/* @__PURE__ */ a.jsxs("div", { role: "tablist", "aria-label": "Tabs", className: L.list, style: g, children: [
|
|
1884
|
+
/* @__PURE__ */ a.jsx("span", { "aria-hidden": "true", className: L.indicator }),
|
|
1885
|
+
l.map((y, D) => {
|
|
1886
|
+
const P = `${d}-tab-${y.id}`, Y = `${d}-panel-${y.id}`, I = y.id === p;
|
|
1887
|
+
return /* @__PURE__ */ a.jsx(
|
|
1347
1888
|
"button",
|
|
1348
1889
|
{
|
|
1349
|
-
id:
|
|
1890
|
+
id: P,
|
|
1350
1891
|
role: "tab",
|
|
1351
1892
|
type: "button",
|
|
1352
|
-
tabIndex:
|
|
1353
|
-
"aria-selected":
|
|
1354
|
-
"aria-controls":
|
|
1355
|
-
className:
|
|
1356
|
-
onClick: () =>
|
|
1357
|
-
onKeyDown: (
|
|
1358
|
-
children:
|
|
1893
|
+
tabIndex: I ? 0 : -1,
|
|
1894
|
+
"aria-selected": I,
|
|
1895
|
+
"aria-controls": Y,
|
|
1896
|
+
className: m(L.trigger, I && L.active),
|
|
1897
|
+
onClick: () => h(y.id),
|
|
1898
|
+
onKeyDown: (Z) => ke(Z, D, l.length, (W) => h(l[W].id)),
|
|
1899
|
+
children: y.label
|
|
1359
1900
|
},
|
|
1360
|
-
|
|
1901
|
+
y.id
|
|
1361
1902
|
);
|
|
1362
1903
|
})
|
|
1363
1904
|
] }),
|
|
1364
|
-
l && /* @__PURE__ */
|
|
1905
|
+
l[b] && /* @__PURE__ */ a.jsx(
|
|
1365
1906
|
"div",
|
|
1366
1907
|
{
|
|
1367
|
-
id: `${
|
|
1908
|
+
id: `${d}-panel-${l[b].id}`,
|
|
1368
1909
|
role: "tabpanel",
|
|
1369
|
-
"aria-labelledby": `${
|
|
1370
|
-
className:
|
|
1371
|
-
children: l.content
|
|
1910
|
+
"aria-labelledby": `${d}-tab-${l[b].id}`,
|
|
1911
|
+
className: L.panel,
|
|
1912
|
+
children: l[b].content
|
|
1372
1913
|
}
|
|
1373
1914
|
)
|
|
1374
|
-
] });
|
|
1915
|
+
] }) : o }) });
|
|
1375
1916
|
}
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1917
|
+
const Fn = ({ children: s, className: e, style: n, ...t }) => /* @__PURE__ */ a.jsx("div", { role: "tablist", className: m(L.list, e), style: n, ...t, children: s });
|
|
1918
|
+
Fn.displayName = "SandTabs.List";
|
|
1919
|
+
const qn = ({ value: s, children: e, className: n, ...t }) => {
|
|
1920
|
+
const { activeId: r, setActiveId: o, baseId: c } = Bn(), d = r === s;
|
|
1921
|
+
return /* @__PURE__ */ a.jsx(
|
|
1922
|
+
"button",
|
|
1923
|
+
{
|
|
1924
|
+
role: "tab",
|
|
1925
|
+
type: "button",
|
|
1926
|
+
id: `${c}-tab-${s}`,
|
|
1927
|
+
"aria-selected": d,
|
|
1928
|
+
"aria-controls": `${c}-panel-${s}`,
|
|
1929
|
+
tabIndex: d ? 0 : -1,
|
|
1930
|
+
className: m(L.trigger, d && L.active, n),
|
|
1931
|
+
onClick: () => o(s),
|
|
1932
|
+
...t,
|
|
1933
|
+
children: e
|
|
1934
|
+
}
|
|
1935
|
+
);
|
|
1936
|
+
};
|
|
1937
|
+
qn.displayName = "SandTabs.Trigger";
|
|
1938
|
+
const Vn = ({ value: s, children: e, className: n, ...t }) => {
|
|
1939
|
+
const { activeId: r, baseId: o } = Bn();
|
|
1940
|
+
return r === s ? /* @__PURE__ */ a.jsx(
|
|
1941
|
+
"div",
|
|
1942
|
+
{
|
|
1943
|
+
role: "tabpanel",
|
|
1944
|
+
id: `${o}-panel-${s}`,
|
|
1945
|
+
"aria-labelledby": `${o}-tab-${s}`,
|
|
1946
|
+
className: m(L.panel, n),
|
|
1947
|
+
...t,
|
|
1948
|
+
children: e
|
|
1949
|
+
}
|
|
1950
|
+
) : null;
|
|
1951
|
+
};
|
|
1952
|
+
Vn.displayName = "SandTabs.Panel";
|
|
1953
|
+
Ie.List = Fn;
|
|
1954
|
+
Ie.Trigger = qn;
|
|
1955
|
+
Ie.Panel = Vn;
|
|
1956
|
+
Ie.Item = He;
|
|
1957
|
+
const Hn = ye(null);
|
|
1958
|
+
function an(s) {
|
|
1378
1959
|
return s !== "system" ? s : typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
1379
1960
|
}
|
|
1380
|
-
function
|
|
1961
|
+
function Ns(s) {
|
|
1381
1962
|
if (!s)
|
|
1382
1963
|
return;
|
|
1383
1964
|
const e = {};
|
|
1384
1965
|
return s.accent && (e["--sand-accent"] = s.accent), s.accentDark && (e["--sand-accent-dark"] = s.accentDark), s.surface && (e["--theme-surface"] = s.surface), s.surfaceVariant && (e["--theme-surface-variant"] = s.surfaceVariant), s.text && (e["--theme-text"] = s.text), s.textMuted && (e["--theme-text-muted"] = s.textMuted), s.border && (e["--theme-border"] = s.border), s.shadowSm && (e["--shadow-sm"] = s.shadowSm), s.shadowMd && (e["--shadow-md"] = s.shadowMd), s.shadowLg && (e["--shadow-lg"] = s.shadowLg), e;
|
|
1385
1966
|
}
|
|
1386
|
-
function
|
|
1967
|
+
function Ys({
|
|
1387
1968
|
children: s,
|
|
1388
1969
|
defaultTheme: e = "system",
|
|
1389
|
-
theme:
|
|
1970
|
+
theme: n,
|
|
1390
1971
|
tokens: t,
|
|
1391
1972
|
className: r,
|
|
1392
|
-
root:
|
|
1973
|
+
root: o = !1
|
|
1393
1974
|
}) {
|
|
1394
|
-
const [c,
|
|
1395
|
-
|
|
1396
|
-
!
|
|
1397
|
-
}, [
|
|
1398
|
-
const
|
|
1975
|
+
const [c, d] = F(e), l = n ?? c, i = an(l);
|
|
1976
|
+
K(() => {
|
|
1977
|
+
!o || typeof document > "u" || (document.documentElement.dataset.theme = i);
|
|
1978
|
+
}, [i, o]);
|
|
1979
|
+
const _ = E(
|
|
1399
1980
|
() => ({
|
|
1400
1981
|
theme: l,
|
|
1401
|
-
resolvedTheme:
|
|
1402
|
-
setTheme:
|
|
1403
|
-
toggleTheme: () =>
|
|
1982
|
+
resolvedTheme: i,
|
|
1983
|
+
setTheme: d,
|
|
1984
|
+
toggleTheme: () => d((p) => an(p) === "dark" ? "light" : "dark")
|
|
1404
1985
|
}),
|
|
1405
|
-
[
|
|
1986
|
+
[i, l]
|
|
1406
1987
|
);
|
|
1407
|
-
return /* @__PURE__ */
|
|
1988
|
+
return /* @__PURE__ */ a.jsx(Hn.Provider, { value: _, children: /* @__PURE__ */ a.jsx("div", { className: r, "data-theme": i, style: Ns(t), children: s }) });
|
|
1408
1989
|
}
|
|
1409
|
-
function
|
|
1410
|
-
const s =
|
|
1990
|
+
function Ws() {
|
|
1991
|
+
const s = ve(Hn);
|
|
1411
1992
|
if (!s)
|
|
1412
1993
|
throw new Error("useSandTheme must be used within SandThemeProvider.");
|
|
1413
1994
|
return s;
|
|
1414
1995
|
}
|
|
1415
|
-
const
|
|
1416
|
-
title:
|
|
1417
|
-
text:
|
|
1418
|
-
code:
|
|
1419
|
-
gradient:
|
|
1420
|
-
muted:
|
|
1421
|
-
},
|
|
1996
|
+
const ks = "_title_huapx_1", ws = "_text_huapx_8", Ts = "_code_huapx_14", Is = "_gradient_huapx_25", Cs = "_muted_huapx_31", J = {
|
|
1997
|
+
title: ks,
|
|
1998
|
+
text: ws,
|
|
1999
|
+
code: Ts,
|
|
2000
|
+
gradient: Is,
|
|
2001
|
+
muted: Cs
|
|
2002
|
+
}, Ge = {
|
|
1422
2003
|
regular: 400,
|
|
1423
2004
|
medium: 500,
|
|
1424
2005
|
semibold: 600,
|
|
1425
2006
|
bold: 700
|
|
1426
|
-
},
|
|
2007
|
+
}, $s = {
|
|
1427
2008
|
xs: "1rem",
|
|
1428
2009
|
sm: "1.25rem",
|
|
1429
2010
|
md: "1.5rem",
|
|
1430
2011
|
lg: "2rem",
|
|
1431
2012
|
xl: "2.75rem",
|
|
1432
2013
|
display: "clamp(3rem, 6vw, 4.75rem)"
|
|
1433
|
-
},
|
|
2014
|
+
}, Gn = {
|
|
1434
2015
|
xs: "0.75rem",
|
|
1435
2016
|
sm: "0.875rem",
|
|
1436
2017
|
md: "1rem",
|
|
1437
2018
|
lg: "1.125rem",
|
|
1438
2019
|
xl: "1.25rem"
|
|
1439
|
-
},
|
|
1440
|
-
const
|
|
1441
|
-
return /* @__PURE__ */
|
|
1442
|
-
|
|
2020
|
+
}, Es = f(function({ as: e, level: n = 2, size: t = "lg", weight: r = "semibold", gradient: o, muted: c, className: d, style: l, ...i }, _) {
|
|
2021
|
+
const p = e ?? `h${n}`;
|
|
2022
|
+
return /* @__PURE__ */ a.jsx(
|
|
2023
|
+
p,
|
|
1443
2024
|
{
|
|
1444
|
-
ref:
|
|
1445
|
-
className:
|
|
1446
|
-
style: { fontSize:
|
|
1447
|
-
...
|
|
2025
|
+
ref: _,
|
|
2026
|
+
className: m(J.title, o && J.gradient, c && J.muted, d),
|
|
2027
|
+
style: { fontSize: $s[t], fontWeight: Ge[r], ...l },
|
|
2028
|
+
...i
|
|
1448
2029
|
}
|
|
1449
2030
|
);
|
|
1450
2031
|
});
|
|
1451
|
-
|
|
1452
|
-
const
|
|
1453
|
-
const
|
|
1454
|
-
return /* @__PURE__ */
|
|
1455
|
-
|
|
2032
|
+
Es.displayName = "SandTitle";
|
|
2033
|
+
const Rs = f(function({ as: e, size: n = "md", weight: t = "regular", gradient: r, muted: o, className: c, style: d, ...l }, i) {
|
|
2034
|
+
const _ = e ?? "p";
|
|
2035
|
+
return /* @__PURE__ */ a.jsx(
|
|
2036
|
+
_,
|
|
1456
2037
|
{
|
|
1457
|
-
ref:
|
|
1458
|
-
className:
|
|
1459
|
-
style: { fontSize:
|
|
2038
|
+
ref: i,
|
|
2039
|
+
className: m(J.text, r && J.gradient, o && J.muted, c),
|
|
2040
|
+
style: { fontSize: Gn[n], fontWeight: Ge[t], ...d },
|
|
1460
2041
|
...l
|
|
1461
2042
|
}
|
|
1462
2043
|
);
|
|
1463
2044
|
});
|
|
1464
|
-
|
|
1465
|
-
const
|
|
1466
|
-
const
|
|
1467
|
-
return /* @__PURE__ */
|
|
1468
|
-
|
|
2045
|
+
Rs.displayName = "SandText";
|
|
2046
|
+
const As = f(function({ as: e, block: n, size: t = "sm", weight: r = "medium", className: o, style: c, ...d }, l) {
|
|
2047
|
+
const i = e ?? (n ? "pre" : "code");
|
|
2048
|
+
return /* @__PURE__ */ a.jsx(
|
|
2049
|
+
i,
|
|
1469
2050
|
{
|
|
1470
2051
|
ref: l,
|
|
1471
|
-
className:
|
|
2052
|
+
className: m(J.code, o),
|
|
1472
2053
|
style: {
|
|
1473
|
-
fontSize:
|
|
1474
|
-
fontWeight:
|
|
1475
|
-
display:
|
|
1476
|
-
whiteSpace:
|
|
2054
|
+
fontSize: Gn[t],
|
|
2055
|
+
fontWeight: Ge[r],
|
|
2056
|
+
display: n ? "block" : void 0,
|
|
2057
|
+
whiteSpace: n ? "pre-wrap" : void 0,
|
|
1477
2058
|
...c
|
|
1478
2059
|
},
|
|
1479
|
-
...
|
|
2060
|
+
...d
|
|
1480
2061
|
}
|
|
1481
2062
|
);
|
|
1482
2063
|
});
|
|
1483
|
-
|
|
1484
|
-
const
|
|
1485
|
-
trigger:
|
|
1486
|
-
content:
|
|
2064
|
+
As.displayName = "SandCode";
|
|
2065
|
+
const Os = "_trigger_ehjfy_1", Ms = "_content_ehjfy_5", tn = {
|
|
2066
|
+
trigger: Os,
|
|
2067
|
+
content: Ms
|
|
1487
2068
|
};
|
|
1488
|
-
function
|
|
1489
|
-
const
|
|
1490
|
-
if (!
|
|
2069
|
+
function Us({ content: s, title: e, children: n }) {
|
|
2070
|
+
const t = O(), [r, o] = F(null), c = s ?? e;
|
|
2071
|
+
if (!X(n))
|
|
1491
2072
|
return null;
|
|
1492
2073
|
const d = (i) => {
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
-
top:
|
|
1496
|
-
left:
|
|
2074
|
+
const _ = i.getBoundingClientRect();
|
|
2075
|
+
o({
|
|
2076
|
+
top: _.bottom + 10,
|
|
2077
|
+
left: _.left + _.width / 2
|
|
1497
2078
|
});
|
|
1498
|
-
},
|
|
1499
|
-
"aria-describedby":
|
|
2079
|
+
}, l = sn(n, {
|
|
2080
|
+
"aria-describedby": t,
|
|
1500
2081
|
onMouseEnter: (i) => {
|
|
1501
|
-
d(i.currentTarget),
|
|
2082
|
+
d(i.currentTarget), n.props.onMouseEnter?.(i);
|
|
1502
2083
|
},
|
|
1503
2084
|
onMouseLeave: (i) => {
|
|
1504
|
-
|
|
2085
|
+
o(null), n.props.onMouseLeave?.(i);
|
|
1505
2086
|
},
|
|
1506
2087
|
onFocus: (i) => {
|
|
1507
|
-
d(i.currentTarget),
|
|
2088
|
+
d(i.currentTarget), n.props.onFocus?.(i);
|
|
1508
2089
|
},
|
|
1509
2090
|
onBlur: (i) => {
|
|
1510
|
-
|
|
2091
|
+
o(null), n.props.onBlur?.(i);
|
|
1511
2092
|
}
|
|
1512
2093
|
});
|
|
1513
|
-
return /* @__PURE__ */
|
|
1514
|
-
/* @__PURE__ */
|
|
1515
|
-
|
|
1516
|
-
/* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2095
|
+
/* @__PURE__ */ a.jsx("span", { className: tn.trigger, children: l }),
|
|
2096
|
+
r && typeof document < "u" ? rn(
|
|
2097
|
+
/* @__PURE__ */ a.jsx(
|
|
1517
2098
|
"div",
|
|
1518
2099
|
{
|
|
1519
|
-
id:
|
|
2100
|
+
id: t,
|
|
1520
2101
|
role: "tooltip",
|
|
1521
|
-
className:
|
|
1522
|
-
style: { top:
|
|
1523
|
-
children:
|
|
2102
|
+
className: tn.content,
|
|
2103
|
+
style: { top: r.top, left: r.left, transform: "translateX(-50%)" },
|
|
2104
|
+
children: c
|
|
1524
2105
|
}
|
|
1525
2106
|
),
|
|
1526
2107
|
document.body
|
|
1527
2108
|
) : null
|
|
1528
2109
|
] });
|
|
1529
2110
|
}
|
|
2111
|
+
function Js(s) {
|
|
2112
|
+
const { value: e, defaultValue: n, onChange: t } = s, [r, o] = F(n), c = e !== void 0, d = c ? e : r, l = z(t);
|
|
2113
|
+
K(() => {
|
|
2114
|
+
l.current = t;
|
|
2115
|
+
});
|
|
2116
|
+
const i = A(
|
|
2117
|
+
(_) => {
|
|
2118
|
+
const p = typeof _ == "function" ? _(d) : _;
|
|
2119
|
+
c || o(p), l.current?.(p);
|
|
2120
|
+
},
|
|
2121
|
+
[c, d]
|
|
2122
|
+
);
|
|
2123
|
+
return [d, i];
|
|
2124
|
+
}
|
|
2125
|
+
const Ne = {
|
|
2126
|
+
sm: 640,
|
|
2127
|
+
md: 768,
|
|
2128
|
+
lg: 1024,
|
|
2129
|
+
xl: 1280
|
|
2130
|
+
};
|
|
2131
|
+
function Xs() {
|
|
2132
|
+
const [s, e] = F("base");
|
|
2133
|
+
return K(() => {
|
|
2134
|
+
const n = () => {
|
|
2135
|
+
const t = window.innerWidth;
|
|
2136
|
+
t >= Ne.xl ? e("xl") : t >= Ne.lg ? e("lg") : t >= Ne.md ? e("md") : t >= Ne.sm ? e("sm") : e("base");
|
|
2137
|
+
};
|
|
2138
|
+
return n(), window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
|
|
2139
|
+
}, []), s;
|
|
2140
|
+
}
|
|
1530
2141
|
export {
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
2142
|
+
Sa as SandAccordion,
|
|
2143
|
+
ln as SandAccordionItem,
|
|
2144
|
+
ia as SandAlert,
|
|
2145
|
+
xn as SandAppLayout,
|
|
2146
|
+
Ta as SandAvatar,
|
|
2147
|
+
Ia as SandAvatarGroup,
|
|
2148
|
+
Ca as SandBadge,
|
|
2149
|
+
za as SandBox,
|
|
2150
|
+
un as SandBreadcrumbItem,
|
|
2151
|
+
$a as SandBreadcrumbs,
|
|
2152
|
+
Ae as SandButton,
|
|
2153
|
+
qa as SandCard,
|
|
2154
|
+
En as SandCheckbox,
|
|
2155
|
+
_n as SandChip,
|
|
2156
|
+
cs as SandChoiceGroup,
|
|
2157
|
+
As as SandCode,
|
|
2158
|
+
pn as SandCodeBlock,
|
|
2159
|
+
Ga as SandCodeTabs,
|
|
2160
|
+
_t as SandContainer,
|
|
2161
|
+
Hs as SandDialog,
|
|
2162
|
+
Ya as SandDivider,
|
|
2163
|
+
Et as SandDrawer,
|
|
2164
|
+
xe as SandFormGroup,
|
|
2165
|
+
Bs as SandGrid,
|
|
2166
|
+
pt as SandHeader,
|
|
2167
|
+
B as SandIcon,
|
|
2168
|
+
Ps as SandIconProvider,
|
|
2169
|
+
vn as SandInput,
|
|
2170
|
+
Qa as SandInputGroup,
|
|
2171
|
+
nt as SandKBD,
|
|
2172
|
+
st as SandLoader,
|
|
2173
|
+
we as SandMicroserviceLayout,
|
|
2174
|
+
ft as SandModal,
|
|
2175
|
+
Gs as SandNavbar,
|
|
2176
|
+
Oe as SandNavbarItem,
|
|
2177
|
+
Rt as SandPagination,
|
|
2178
|
+
qe as SandPopover,
|
|
2179
|
+
zt as SandPopoverContent,
|
|
2180
|
+
Mt as SandPopoverTrigger,
|
|
2181
|
+
Ht as SandProgress,
|
|
2182
|
+
Rn as SandRadio,
|
|
2183
|
+
Vs as SandResultPanel,
|
|
2184
|
+
os as SandSelect,
|
|
2185
|
+
rt as SandSkeleton,
|
|
2186
|
+
ut as SandSlider,
|
|
2187
|
+
Ja as SandSnackbar,
|
|
2188
|
+
Nn as SandStack,
|
|
2189
|
+
An as SandSwitch,
|
|
2190
|
+
He as SandTabItem,
|
|
2191
|
+
Ks as SandTable,
|
|
2192
|
+
Ie as SandTabs,
|
|
2193
|
+
Ls as SandTag,
|
|
2194
|
+
Rs as SandText,
|
|
2195
|
+
hs as SandTextarea,
|
|
2196
|
+
Ys as SandThemeProvider,
|
|
2197
|
+
Es as SandTitle,
|
|
2198
|
+
Ua as SandToast,
|
|
2199
|
+
Fs as SandToolLayout,
|
|
2200
|
+
qs as SandToolPanel,
|
|
2201
|
+
Us as SandTooltip,
|
|
2202
|
+
Xs as useBreakpoint,
|
|
2203
|
+
Js as useControllableState,
|
|
2204
|
+
In as useDisclosure,
|
|
2205
|
+
Te as useFocusTrap,
|
|
2206
|
+
na as useSandIcon,
|
|
2207
|
+
Ws as useSandTheme
|
|
1574
2208
|
};
|