@ikonai/sdk-react-ui-radix 0.0.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/components/radix-box.d.ts +2 -0
- package/components/radix-button.d.ts +2 -0
- package/components/radix-heading.d.ts +2 -0
- package/components/radix-text-area.d.ts +2 -0
- package/components/radix-text-field.d.ts +2 -0
- package/components/radix-text.d.ts +2 -0
- package/index.css +1 -0
- package/index.d.ts +8 -0
- package/index.js +788 -0
- package/package.json +19 -0
- package/radix-core.d.ts +9 -0
- package/radix-module.d.ts +5 -0
package/index.js
ADDED
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import sr, { memo as A } from "react";
|
|
3
|
+
import * as nr from "react-dom";
|
|
4
|
+
function ar(e) {
|
|
5
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
+
}
|
|
7
|
+
var L = { exports: {} }, k = {};
|
|
8
|
+
/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-jsx-runtime.production.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/
|
|
17
|
+
var de;
|
|
18
|
+
function or() {
|
|
19
|
+
if (de) return k;
|
|
20
|
+
de = 1;
|
|
21
|
+
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
22
|
+
function t(a, s, n) {
|
|
23
|
+
var i = null;
|
|
24
|
+
if (n !== void 0 && (i = "" + n), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
25
|
+
n = {};
|
|
26
|
+
for (var l in s)
|
|
27
|
+
l !== "key" && (n[l] = s[l]);
|
|
28
|
+
} else n = s;
|
|
29
|
+
return s = n.ref, {
|
|
30
|
+
$$typeof: e,
|
|
31
|
+
type: a,
|
|
32
|
+
key: i,
|
|
33
|
+
ref: s !== void 0 ? s : null,
|
|
34
|
+
props: n
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return k.Fragment = r, k.jsx = t, k.jsxs = t, k;
|
|
38
|
+
}
|
|
39
|
+
var V = {};
|
|
40
|
+
/**
|
|
41
|
+
* @license React
|
|
42
|
+
* react-jsx-runtime.development.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/
|
|
49
|
+
var fe;
|
|
50
|
+
function ir() {
|
|
51
|
+
return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
+
function e(o) {
|
|
53
|
+
if (o == null) return null;
|
|
54
|
+
if (typeof o == "function")
|
|
55
|
+
return o.$$typeof === er ? null : o.displayName || o.name || null;
|
|
56
|
+
if (typeof o == "string") return o;
|
|
57
|
+
switch (o) {
|
|
58
|
+
case N:
|
|
59
|
+
return "Fragment";
|
|
60
|
+
case Ue:
|
|
61
|
+
return "Profiler";
|
|
62
|
+
case He:
|
|
63
|
+
return "StrictMode";
|
|
64
|
+
case Ge:
|
|
65
|
+
return "Suspense";
|
|
66
|
+
case Ke:
|
|
67
|
+
return "SuspenseList";
|
|
68
|
+
case Qe:
|
|
69
|
+
return "Activity";
|
|
70
|
+
}
|
|
71
|
+
if (typeof o == "object")
|
|
72
|
+
switch (typeof o.tag == "number" && console.error(
|
|
73
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
|
+
), o.$$typeof) {
|
|
75
|
+
case j:
|
|
76
|
+
return "Portal";
|
|
77
|
+
case Je:
|
|
78
|
+
return (o.displayName || "Context") + ".Provider";
|
|
79
|
+
case qe:
|
|
80
|
+
return (o._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case Xe:
|
|
82
|
+
var p = o.render;
|
|
83
|
+
return o = o.displayName, o || (o = p.displayName || p.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
84
|
+
case Ze:
|
|
85
|
+
return p = o.displayName || null, p !== null ? p : e(o.type) || "Memo";
|
|
86
|
+
case ae:
|
|
87
|
+
p = o._payload, o = o._init;
|
|
88
|
+
try {
|
|
89
|
+
return e(o(p));
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
function r(o) {
|
|
96
|
+
return "" + o;
|
|
97
|
+
}
|
|
98
|
+
function t(o) {
|
|
99
|
+
try {
|
|
100
|
+
r(o);
|
|
101
|
+
var p = !1;
|
|
102
|
+
} catch {
|
|
103
|
+
p = !0;
|
|
104
|
+
}
|
|
105
|
+
if (p) {
|
|
106
|
+
p = console;
|
|
107
|
+
var v = p.error, g = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
108
|
+
return v.call(
|
|
109
|
+
p,
|
|
110
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
+
g
|
|
112
|
+
), r(o);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function a(o) {
|
|
116
|
+
if (o === N) return "<>";
|
|
117
|
+
if (typeof o == "object" && o !== null && o.$$typeof === ae)
|
|
118
|
+
return "<...>";
|
|
119
|
+
try {
|
|
120
|
+
var p = e(o);
|
|
121
|
+
return p ? "<" + p + ">" : "<...>";
|
|
122
|
+
} catch {
|
|
123
|
+
return "<...>";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function s() {
|
|
127
|
+
var o = U.A;
|
|
128
|
+
return o === null ? null : o.getOwner();
|
|
129
|
+
}
|
|
130
|
+
function n() {
|
|
131
|
+
return Error("react-stack-top-frame");
|
|
132
|
+
}
|
|
133
|
+
function i(o) {
|
|
134
|
+
if (oe.call(o, "key")) {
|
|
135
|
+
var p = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
136
|
+
if (p && p.isReactWarning) return !1;
|
|
137
|
+
}
|
|
138
|
+
return o.key !== void 0;
|
|
139
|
+
}
|
|
140
|
+
function l(o, p) {
|
|
141
|
+
function v() {
|
|
142
|
+
ie || (ie = !0, console.error(
|
|
143
|
+
"%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)",
|
|
144
|
+
p
|
|
145
|
+
));
|
|
146
|
+
}
|
|
147
|
+
v.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
148
|
+
get: v,
|
|
149
|
+
configurable: !0
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function u() {
|
|
153
|
+
var o = e(this.type);
|
|
154
|
+
return le[o] || (le[o] = !0, console.error(
|
|
155
|
+
"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."
|
|
156
|
+
)), o = this.props.ref, o !== void 0 ? o : null;
|
|
157
|
+
}
|
|
158
|
+
function d(o, p, v, g, $, x, J, X) {
|
|
159
|
+
return v = x.ref, o = {
|
|
160
|
+
$$typeof: P,
|
|
161
|
+
type: o,
|
|
162
|
+
key: p,
|
|
163
|
+
props: x,
|
|
164
|
+
_owner: $
|
|
165
|
+
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(o, "ref", {
|
|
166
|
+
enumerable: !1,
|
|
167
|
+
get: u
|
|
168
|
+
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: 0
|
|
173
|
+
}), Object.defineProperty(o, "_debugInfo", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: null
|
|
178
|
+
}), Object.defineProperty(o, "_debugStack", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: J
|
|
183
|
+
}), Object.defineProperty(o, "_debugTask", {
|
|
184
|
+
configurable: !1,
|
|
185
|
+
enumerable: !1,
|
|
186
|
+
writable: !0,
|
|
187
|
+
value: X
|
|
188
|
+
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
189
|
+
}
|
|
190
|
+
function m(o, p, v, g, $, x, J, X) {
|
|
191
|
+
var h = p.children;
|
|
192
|
+
if (h !== void 0)
|
|
193
|
+
if (g)
|
|
194
|
+
if (rr(h)) {
|
|
195
|
+
for (g = 0; g < h.length; g++)
|
|
196
|
+
y(h[g]);
|
|
197
|
+
Object.freeze && Object.freeze(h);
|
|
198
|
+
} else
|
|
199
|
+
console.error(
|
|
200
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
|
+
);
|
|
202
|
+
else y(h);
|
|
203
|
+
if (oe.call(p, "key")) {
|
|
204
|
+
h = e(o);
|
|
205
|
+
var C = Object.keys(p).filter(function(tr) {
|
|
206
|
+
return tr !== "key";
|
|
207
|
+
});
|
|
208
|
+
g = 0 < C.length ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}", pe[h + g] || (C = 0 < C.length ? "{" + C.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
210
|
+
let props = %s;
|
|
211
|
+
<%s {...props} />
|
|
212
|
+
React keys must be passed directly to JSX without using spread:
|
|
213
|
+
let props = %s;
|
|
214
|
+
<%s key={someKey} {...props} />`,
|
|
215
|
+
g,
|
|
216
|
+
h,
|
|
217
|
+
C,
|
|
218
|
+
h
|
|
219
|
+
), pe[h + g] = !0);
|
|
220
|
+
}
|
|
221
|
+
if (h = null, v !== void 0 && (t(v), h = "" + v), i(p) && (t(p.key), h = "" + p.key), "key" in p) {
|
|
222
|
+
v = {};
|
|
223
|
+
for (var G in p)
|
|
224
|
+
G !== "key" && (v[G] = p[G]);
|
|
225
|
+
} else v = p;
|
|
226
|
+
return h && l(
|
|
227
|
+
v,
|
|
228
|
+
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
229
|
+
), d(
|
|
230
|
+
o,
|
|
231
|
+
h,
|
|
232
|
+
x,
|
|
233
|
+
$,
|
|
234
|
+
s(),
|
|
235
|
+
v,
|
|
236
|
+
J,
|
|
237
|
+
X
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
function y(o) {
|
|
241
|
+
typeof o == "object" && o !== null && o.$$typeof === P && o._store && (o._store.validated = 1);
|
|
242
|
+
}
|
|
243
|
+
var f = sr, P = Symbol.for("react.transitional.element"), j = Symbol.for("react.portal"), N = Symbol.for("react.fragment"), He = Symbol.for("react.strict_mode"), Ue = Symbol.for("react.profiler"), qe = Symbol.for("react.consumer"), Je = Symbol.for("react.context"), Xe = Symbol.for("react.forward_ref"), Ge = Symbol.for("react.suspense"), Ke = Symbol.for("react.suspense_list"), Ze = Symbol.for("react.memo"), ae = Symbol.for("react.lazy"), Qe = Symbol.for("react.activity"), er = Symbol.for("react.client.reference"), U = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, oe = Object.prototype.hasOwnProperty, rr = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
244
|
+
return null;
|
|
245
|
+
};
|
|
246
|
+
f = {
|
|
247
|
+
"react-stack-bottom-frame": function(o) {
|
|
248
|
+
return o();
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
var ie, le = {}, ue = f["react-stack-bottom-frame"].bind(
|
|
252
|
+
f,
|
|
253
|
+
n
|
|
254
|
+
)(), ce = q(a(n)), pe = {};
|
|
255
|
+
V.Fragment = N, V.jsx = function(o, p, v, g, $) {
|
|
256
|
+
var x = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return m(
|
|
258
|
+
o,
|
|
259
|
+
p,
|
|
260
|
+
v,
|
|
261
|
+
!1,
|
|
262
|
+
g,
|
|
263
|
+
$,
|
|
264
|
+
x ? Error("react-stack-top-frame") : ue,
|
|
265
|
+
x ? q(a(o)) : ce
|
|
266
|
+
);
|
|
267
|
+
}, V.jsxs = function(o, p, v, g, $) {
|
|
268
|
+
var x = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return m(
|
|
270
|
+
o,
|
|
271
|
+
p,
|
|
272
|
+
v,
|
|
273
|
+
!0,
|
|
274
|
+
g,
|
|
275
|
+
$,
|
|
276
|
+
x ? Error("react-stack-top-frame") : ue,
|
|
277
|
+
x ? q(a(o)) : ce
|
|
278
|
+
);
|
|
279
|
+
};
|
|
280
|
+
}()), V;
|
|
281
|
+
}
|
|
282
|
+
var me;
|
|
283
|
+
function lr() {
|
|
284
|
+
return me || (me = 1, process.env.NODE_ENV === "production" ? L.exports = or() : L.exports = ir()), L.exports;
|
|
285
|
+
}
|
|
286
|
+
var E = lr();
|
|
287
|
+
function ve(e, r) {
|
|
288
|
+
if (typeof e == "function")
|
|
289
|
+
return e(r);
|
|
290
|
+
e != null && (e.current = r);
|
|
291
|
+
}
|
|
292
|
+
function Ne(...e) {
|
|
293
|
+
return (r) => {
|
|
294
|
+
let t = !1;
|
|
295
|
+
const a = e.map((s) => {
|
|
296
|
+
const n = ve(s, r);
|
|
297
|
+
return !t && typeof n == "function" && (t = !0), n;
|
|
298
|
+
});
|
|
299
|
+
if (t)
|
|
300
|
+
return () => {
|
|
301
|
+
for (let s = 0; s < a.length; s++) {
|
|
302
|
+
const n = a[s];
|
|
303
|
+
typeof n == "function" ? n() : ve(e[s], null);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
// @__NO_SIDE_EFFECTS__
|
|
309
|
+
function Re(e) {
|
|
310
|
+
const r = /* @__PURE__ */ ur(e), t = c.forwardRef((a, s) => {
|
|
311
|
+
const { children: n, ...i } = a, l = c.Children.toArray(n), u = l.find(pr);
|
|
312
|
+
if (u) {
|
|
313
|
+
const d = u.props.children, m = l.map((y) => y === u ? c.Children.count(d) > 1 ? c.Children.only(null) : c.isValidElement(d) ? d.props.children : null : y);
|
|
314
|
+
return /* @__PURE__ */ E.jsx(r, { ...i, ref: s, children: c.isValidElement(d) ? c.cloneElement(d, void 0, m) : null });
|
|
315
|
+
}
|
|
316
|
+
return /* @__PURE__ */ E.jsx(r, { ...i, ref: s, children: n });
|
|
317
|
+
});
|
|
318
|
+
return t.displayName = `${e}.Slot`, t;
|
|
319
|
+
}
|
|
320
|
+
var M = /* @__PURE__ */ Re("Slot");
|
|
321
|
+
// @__NO_SIDE_EFFECTS__
|
|
322
|
+
function ur(e) {
|
|
323
|
+
const r = c.forwardRef((t, a) => {
|
|
324
|
+
const { children: s, ...n } = t;
|
|
325
|
+
if (c.isValidElement(s)) {
|
|
326
|
+
const i = fr(s), l = dr(n, s.props);
|
|
327
|
+
return s.type !== c.Fragment && (l.ref = a ? Ne(a, i) : i), c.cloneElement(s, l);
|
|
328
|
+
}
|
|
329
|
+
return c.Children.count(s) > 1 ? c.Children.only(null) : null;
|
|
330
|
+
});
|
|
331
|
+
return r.displayName = `${e}.SlotClone`, r;
|
|
332
|
+
}
|
|
333
|
+
var cr = Symbol("radix.slottable");
|
|
334
|
+
function pr(e) {
|
|
335
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === cr;
|
|
336
|
+
}
|
|
337
|
+
function dr(e, r) {
|
|
338
|
+
const t = { ...r };
|
|
339
|
+
for (const a in r) {
|
|
340
|
+
const s = e[a], n = r[a];
|
|
341
|
+
/^on[A-Z]/.test(a) ? s && n ? t[a] = (...l) => {
|
|
342
|
+
const u = n(...l);
|
|
343
|
+
return s(...l), u;
|
|
344
|
+
} : s && (t[a] = s) : a === "style" ? t[a] = { ...s, ...n } : a === "className" && (t[a] = [s, n].filter(Boolean).join(" "));
|
|
345
|
+
}
|
|
346
|
+
return { ...e, ...t };
|
|
347
|
+
}
|
|
348
|
+
function fr(e) {
|
|
349
|
+
let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
350
|
+
return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
351
|
+
}
|
|
352
|
+
var mr = [
|
|
353
|
+
"a",
|
|
354
|
+
"button",
|
|
355
|
+
"div",
|
|
356
|
+
"form",
|
|
357
|
+
"h2",
|
|
358
|
+
"h3",
|
|
359
|
+
"img",
|
|
360
|
+
"input",
|
|
361
|
+
"label",
|
|
362
|
+
"li",
|
|
363
|
+
"nav",
|
|
364
|
+
"ol",
|
|
365
|
+
"p",
|
|
366
|
+
"select",
|
|
367
|
+
"span",
|
|
368
|
+
"svg",
|
|
369
|
+
"ul"
|
|
370
|
+
], ee = mr.reduce((e, r) => {
|
|
371
|
+
const t = /* @__PURE__ */ Re(`Primitive.${r}`), a = c.forwardRef((s, n) => {
|
|
372
|
+
const { asChild: i, ...l } = s, u = i ? t : r;
|
|
373
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E.jsx(u, { ...l, ref: n });
|
|
374
|
+
});
|
|
375
|
+
return a.displayName = `Primitive.${r}`, { ...e, [r]: a };
|
|
376
|
+
}, {});
|
|
377
|
+
function vr(e, r) {
|
|
378
|
+
e && nr.flushSync(() => e.dispatchEvent(r));
|
|
379
|
+
}
|
|
380
|
+
var yr = Object.freeze({
|
|
381
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
382
|
+
position: "absolute",
|
|
383
|
+
border: 0,
|
|
384
|
+
width: 1,
|
|
385
|
+
height: 1,
|
|
386
|
+
padding: 0,
|
|
387
|
+
margin: -1,
|
|
388
|
+
overflow: "hidden",
|
|
389
|
+
clip: "rect(0, 0, 0, 0)",
|
|
390
|
+
whiteSpace: "nowrap",
|
|
391
|
+
wordWrap: "normal"
|
|
392
|
+
}), gr = "VisuallyHidden", xe = c.forwardRef(
|
|
393
|
+
(e, r) => /* @__PURE__ */ E.jsx(
|
|
394
|
+
ee.span,
|
|
395
|
+
{
|
|
396
|
+
...e,
|
|
397
|
+
ref: r,
|
|
398
|
+
style: { ...yr, ...e.style }
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
);
|
|
402
|
+
xe.displayName = gr;
|
|
403
|
+
var hr = xe, K = { exports: {} };
|
|
404
|
+
/*!
|
|
405
|
+
Copyright (c) 2018 Jed Watson.
|
|
406
|
+
Licensed under the MIT License (MIT), see
|
|
407
|
+
http://jedwatson.github.io/classnames
|
|
408
|
+
*/
|
|
409
|
+
var ye;
|
|
410
|
+
function br() {
|
|
411
|
+
return ye || (ye = 1, function(e) {
|
|
412
|
+
(function() {
|
|
413
|
+
var r = {}.hasOwnProperty;
|
|
414
|
+
function t() {
|
|
415
|
+
for (var n = "", i = 0; i < arguments.length; i++) {
|
|
416
|
+
var l = arguments[i];
|
|
417
|
+
l && (n = s(n, a(l)));
|
|
418
|
+
}
|
|
419
|
+
return n;
|
|
420
|
+
}
|
|
421
|
+
function a(n) {
|
|
422
|
+
if (typeof n == "string" || typeof n == "number")
|
|
423
|
+
return n;
|
|
424
|
+
if (typeof n != "object")
|
|
425
|
+
return "";
|
|
426
|
+
if (Array.isArray(n))
|
|
427
|
+
return t.apply(null, n);
|
|
428
|
+
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
429
|
+
return n.toString();
|
|
430
|
+
var i = "";
|
|
431
|
+
for (var l in n)
|
|
432
|
+
r.call(n, l) && n[l] && (i = s(i, l));
|
|
433
|
+
return i;
|
|
434
|
+
}
|
|
435
|
+
function s(n, i) {
|
|
436
|
+
return i ? n ? n + " " + i : n + i : n;
|
|
437
|
+
}
|
|
438
|
+
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
439
|
+
})();
|
|
440
|
+
}(K)), K.exports;
|
|
441
|
+
}
|
|
442
|
+
var Nr = br();
|
|
443
|
+
const b = /* @__PURE__ */ ar(Nr), D = { asChild: { type: "boolean" } }, Rr = { width: { type: "string", className: "rt-r-w", customProperties: ["--width"], responsive: !0 }, minWidth: { type: "string", className: "rt-r-min-w", customProperties: ["--min-width"], responsive: !0 }, maxWidth: { type: "string", className: "rt-r-max-w", customProperties: ["--max-width"], responsive: !0 } }, xr = { height: { type: "string", className: "rt-r-h", customProperties: ["--height"], responsive: !0 }, minHeight: { type: "string", className: "rt-r-min-h", customProperties: ["--min-height"], responsive: !0 }, maxHeight: { type: "string", className: "rt-r-max-h", customProperties: ["--max-height"], responsive: !0 } }, Ee = ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"], z = { color: { type: "enum", values: Ee, default: void 0 } }, Er = { color: { type: "enum", values: Ee, default: "" } }, re = { highContrast: { type: "boolean", className: "rt-high-contrast", default: void 0 } }, wr = ["normal", "start", "end", "both"], we = { trim: { type: "enum", className: "rt-r-lt", values: wr, responsive: !0 } }, Pr = ["left", "center", "right"], Pe = { align: { type: "enum", className: "rt-r-ta", values: Pr, responsive: !0 } }, $r = ["wrap", "nowrap", "pretty", "balance"], $e = { wrap: { type: "enum", className: "rt-r-tw", values: $r, responsive: !0 } }, Se = { truncate: { type: "boolean", className: "rt-truncate" } }, Sr = ["light", "regular", "medium", "bold"], Te = { weight: { type: "enum", className: "rt-r-weight", values: Sr, responsive: !0 } }, Tr = ["h1", "h2", "h3", "h4", "h5", "h6"], _r = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], jr = { as: { type: "enum", values: Tr, default: "h1" }, ...D, size: { type: "enum", className: "rt-r-size", values: _r, default: "6", responsive: !0 }, ...Te, ...Pe, ...we, ...Se, ...$e, ...z, ...re }, te = ["initial", "xs", "sm", "md", "lg", "xl"];
|
|
444
|
+
function _e(e, r) {
|
|
445
|
+
return Object.prototype.hasOwnProperty.call(e, r);
|
|
446
|
+
}
|
|
447
|
+
function F(e) {
|
|
448
|
+
return typeof e == "object" && Object.keys(e).some((r) => te.includes(r));
|
|
449
|
+
}
|
|
450
|
+
function Cr({ className: e, customProperties: r, ...t }) {
|
|
451
|
+
const a = je({ allowArbitraryValues: !0, className: e, ...t }), s = Ar({ customProperties: r, ...t });
|
|
452
|
+
return [a, s];
|
|
453
|
+
}
|
|
454
|
+
function je({ allowArbitraryValues: e, value: r, className: t, propValues: a, parseValue: s = (n) => n }) {
|
|
455
|
+
const n = [];
|
|
456
|
+
if (r) {
|
|
457
|
+
if (typeof r == "string" && a.includes(r)) return ge(t, r, s);
|
|
458
|
+
if (F(r)) {
|
|
459
|
+
const i = r;
|
|
460
|
+
for (const l in i) {
|
|
461
|
+
if (!_e(i, l) || !te.includes(l)) continue;
|
|
462
|
+
const u = i[l];
|
|
463
|
+
if (u !== void 0) {
|
|
464
|
+
if (a.includes(u)) {
|
|
465
|
+
const d = ge(t, u, s), m = l === "initial" ? d : `${l}:${d}`;
|
|
466
|
+
n.push(m);
|
|
467
|
+
} else if (e) {
|
|
468
|
+
const d = l === "initial" ? t : `${l}:${t}`;
|
|
469
|
+
n.push(d);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
return n.join(" ");
|
|
474
|
+
}
|
|
475
|
+
if (e) return t;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
function ge(e, r, t) {
|
|
479
|
+
const a = e ? "-" : "", s = t(r), n = s?.startsWith("-"), i = n ? "-" : "", l = n ? s?.substring(1) : s;
|
|
480
|
+
return `${i}${e}${a}${l}`;
|
|
481
|
+
}
|
|
482
|
+
function Ar({ customProperties: e, value: r, propValues: t, parseValue: a = (s) => s }) {
|
|
483
|
+
let s = {};
|
|
484
|
+
if (!(!r || typeof r == "string" && t.includes(r))) {
|
|
485
|
+
if (typeof r == "string" && (s = Object.fromEntries(e.map((n) => [n, r]))), F(r)) {
|
|
486
|
+
const n = r;
|
|
487
|
+
for (const i in n) {
|
|
488
|
+
if (!_e(n, i) || !te.includes(i)) continue;
|
|
489
|
+
const l = n[i];
|
|
490
|
+
if (!t.includes(l)) for (const u of e) s = { [i === "initial" ? u : `${u}-${i}`]: l, ...s };
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
for (const n in s) {
|
|
494
|
+
const i = s[n];
|
|
495
|
+
i !== void 0 && (s[n] = a(i));
|
|
496
|
+
}
|
|
497
|
+
return s;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
function he(...e) {
|
|
501
|
+
let r = {};
|
|
502
|
+
for (const t of e) t && (r = { ...r, ...t });
|
|
503
|
+
return Object.keys(r).length ? r : void 0;
|
|
504
|
+
}
|
|
505
|
+
function Or(...e) {
|
|
506
|
+
return Object.assign({}, ...e);
|
|
507
|
+
}
|
|
508
|
+
function w(e, ...r) {
|
|
509
|
+
let t, a;
|
|
510
|
+
const s = { ...e }, n = Or(...r);
|
|
511
|
+
for (const i in n) {
|
|
512
|
+
let l = s[i];
|
|
513
|
+
const u = n[i];
|
|
514
|
+
if (u.default !== void 0 && l === void 0 && (l = u.default), u.type === "enum" && ![u.default, ...u.values].includes(l) && !F(l) && (l = u.default), s[i] = l, "className" in u && u.className) {
|
|
515
|
+
delete s[i];
|
|
516
|
+
const d = "responsive" in u;
|
|
517
|
+
if (!l || F(l) && !d) continue;
|
|
518
|
+
if (F(l) && (u.default !== void 0 && l.initial === void 0 && (l.initial = u.default), u.type === "enum" && ([u.default, ...u.values].includes(l.initial) || (l.initial = u.default))), u.type === "enum") {
|
|
519
|
+
const m = je({ allowArbitraryValues: !1, value: l, className: u.className, propValues: u.values, parseValue: u.parseValue });
|
|
520
|
+
t = b(t, m);
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
if (u.type === "string" || u.type === "enum | string") {
|
|
524
|
+
const m = u.type === "string" ? [] : u.values, [y, f] = Cr({ className: u.className, customProperties: u.customProperties, propValues: m, parseValue: u.parseValue, value: l });
|
|
525
|
+
a = he(a, f), t = b(t, y);
|
|
526
|
+
continue;
|
|
527
|
+
}
|
|
528
|
+
if (u.type === "boolean" && l) {
|
|
529
|
+
t = b(t, u.className);
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
return s.className = b(t, e.className), s.style = he(a, e.style), s;
|
|
535
|
+
}
|
|
536
|
+
const T = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], S = { m: { type: "enum | string", values: T, responsive: !0, className: "rt-r-m", customProperties: ["--m"] }, mx: { type: "enum | string", values: T, responsive: !0, className: "rt-r-mx", customProperties: ["--ml", "--mr"] }, my: { type: "enum | string", values: T, responsive: !0, className: "rt-r-my", customProperties: ["--mt", "--mb"] }, mt: { type: "enum | string", values: T, responsive: !0, className: "rt-r-mt", customProperties: ["--mt"] }, mr: { type: "enum | string", values: T, responsive: !0, className: "rt-r-mr", customProperties: ["--mr"] }, mb: { type: "enum | string", values: T, responsive: !0, className: "rt-r-mb", customProperties: ["--mb"] }, ml: { type: "enum | string", values: T, responsive: !0, className: "rt-r-ml", customProperties: ["--ml"] } }, Ce = c.forwardRef((e, r) => {
|
|
537
|
+
const { children: t, className: a, asChild: s, as: n = "h1", color: i, ...l } = w(e, jr, S);
|
|
538
|
+
return c.createElement(M, { "data-accent-color": i, ...l, ref: r, className: b("rt-Heading", a) }, s ? t : c.createElement(n, null, t));
|
|
539
|
+
});
|
|
540
|
+
Ce.displayName = "Heading";
|
|
541
|
+
const kr = ["span", "div", "label", "p"], Vr = ["1", "2", "3", "4", "5", "6", "7", "8", "9"], Ir = { as: { type: "enum", values: kr, default: "span" }, ...D, size: { type: "enum", className: "rt-r-size", values: Vr, responsive: !0 }, ...Te, ...Pe, ...we, ...Se, ...$e, ...z, ...re }, Ae = c.forwardRef((e, r) => {
|
|
542
|
+
const { children: t, className: a, asChild: s, as: n = "span", color: i, ...l } = w(e, Ir, S);
|
|
543
|
+
return c.createElement(M, { "data-accent-color": i, ...l, ref: r, className: b("rt-Text", a) }, s ? t : c.createElement(n, null, t));
|
|
544
|
+
});
|
|
545
|
+
Ae.displayName = "Text";
|
|
546
|
+
const Fr = ["none", "small", "medium", "large", "full"], se = { radius: { type: "enum", values: Fr, default: void 0 } }, Oe = M, Dr = ["div", "span"], zr = ["none", "inline", "inline-block", "block", "contents"], Lr = { as: { type: "enum", values: Dr, default: "div" }, ...D, display: { type: "enum", className: "rt-r-display", values: zr, responsive: !0 } }, _ = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], Y = { p: { type: "enum | string", className: "rt-r-p", customProperties: ["--p"], values: _, responsive: !0 }, px: { type: "enum | string", className: "rt-r-px", customProperties: ["--pl", "--pr"], values: _, responsive: !0 }, py: { type: "enum | string", className: "rt-r-py", customProperties: ["--pt", "--pb"], values: _, responsive: !0 }, pt: { type: "enum | string", className: "rt-r-pt", customProperties: ["--pt"], values: _, responsive: !0 }, pr: { type: "enum | string", className: "rt-r-pr", customProperties: ["--pr"], values: _, responsive: !0 }, pb: { type: "enum | string", className: "rt-r-pb", customProperties: ["--pb"], values: _, responsive: !0 }, pl: { type: "enum | string", className: "rt-r-pl", customProperties: ["--pl"], values: _, responsive: !0 } }, Z = ["visible", "hidden", "clip", "scroll", "auto"], Yr = ["static", "relative", "absolute", "fixed", "sticky"], I = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], Br = ["0", "1"], Wr = ["0", "1"], ke = { ...Y, ...Rr, ...xr, position: { type: "enum", className: "rt-r-position", values: Yr, responsive: !0 }, inset: { type: "enum | string", className: "rt-r-inset", customProperties: ["--inset"], values: I, responsive: !0 }, top: { type: "enum | string", className: "rt-r-top", customProperties: ["--top"], values: I, responsive: !0 }, right: { type: "enum | string", className: "rt-r-right", customProperties: ["--right"], values: I, responsive: !0 }, bottom: { type: "enum | string", className: "rt-r-bottom", customProperties: ["--bottom"], values: I, responsive: !0 }, left: { type: "enum | string", className: "rt-r-left", customProperties: ["--left"], values: I, responsive: !0 }, overflow: { type: "enum", className: "rt-r-overflow", values: Z, responsive: !0 }, overflowX: { type: "enum", className: "rt-r-ox", values: Z, responsive: !0 }, overflowY: { type: "enum", className: "rt-r-oy", values: Z, responsive: !0 }, flexBasis: { type: "string", className: "rt-r-fb", customProperties: ["--flex-basis"], responsive: !0 }, flexShrink: { type: "enum | string", className: "rt-r-fs", customProperties: ["--flex-shrink"], values: Br, responsive: !0 }, flexGrow: { type: "enum | string", className: "rt-r-fg", customProperties: ["--flex-grow"], values: Wr, responsive: !0 }, gridArea: { type: "string", className: "rt-r-ga", customProperties: ["--grid-area"], responsive: !0 }, gridColumn: { type: "string", className: "rt-r-gc", customProperties: ["--grid-column"], responsive: !0 }, gridColumnStart: { type: "string", className: "rt-r-gcs", customProperties: ["--grid-column-start"], responsive: !0 }, gridColumnEnd: { type: "string", className: "rt-r-gce", customProperties: ["--grid-column-end"], responsive: !0 }, gridRow: { type: "string", className: "rt-r-gr", customProperties: ["--grid-row"], responsive: !0 }, gridRowStart: { type: "string", className: "rt-r-grs", customProperties: ["--grid-row-start"], responsive: !0 }, gridRowEnd: { type: "string", className: "rt-r-gre", customProperties: ["--grid-row-end"], responsive: !0 } }, Ve = c.forwardRef((e, r) => {
|
|
547
|
+
const { className: t, asChild: a, as: s = "div", ...n } = w(e, Lr, ke, S);
|
|
548
|
+
return c.createElement(a ? Oe : s, { ...n, ref: r, className: b("rt-Box", t) });
|
|
549
|
+
});
|
|
550
|
+
Ve.displayName = "Box";
|
|
551
|
+
const Mr = ["1", "2", "3", "4"], Hr = ["classic", "solid", "soft", "surface", "outline", "ghost"], be = { ...D, size: { type: "enum", className: "rt-r-size", values: Mr, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: Hr, default: "solid" }, ...Er, ...re, ...se, loading: { type: "boolean", className: "rt-loading", default: !1 } }, Q = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], Ur = { gap: { type: "enum | string", className: "rt-r-gap", customProperties: ["--gap"], values: Q, responsive: !0 }, gapX: { type: "enum | string", className: "rt-r-cg", customProperties: ["--column-gap"], values: Q, responsive: !0 }, gapY: { type: "enum | string", className: "rt-r-rg", customProperties: ["--row-gap"], values: Q, responsive: !0 } }, qr = ["div", "span"], Jr = ["none", "inline-flex", "flex"], Xr = ["row", "column", "row-reverse", "column-reverse"], Gr = ["start", "center", "end", "baseline", "stretch"], Kr = ["start", "center", "end", "between"], Zr = ["nowrap", "wrap", "wrap-reverse"], Ie = { as: { type: "enum", values: qr, default: "div" }, ...D, display: { type: "enum", className: "rt-r-display", values: Jr, responsive: !0 }, direction: { type: "enum", className: "rt-r-fd", values: Xr, responsive: !0 }, align: { type: "enum", className: "rt-r-ai", values: Gr, responsive: !0 }, justify: { type: "enum", className: "rt-r-jc", values: Kr, parseValue: Qr, responsive: !0 }, wrap: { type: "enum", className: "rt-r-fw", values: Zr, responsive: !0 }, ...Ur };
|
|
552
|
+
function Qr(e) {
|
|
553
|
+
return e === "between" ? "space-between" : e;
|
|
554
|
+
}
|
|
555
|
+
const B = c.forwardRef((e, r) => {
|
|
556
|
+
const { className: t, asChild: a, as: s = "div", ...n } = w(e, Ie, ke, S);
|
|
557
|
+
return c.createElement(a ? Oe : s, { ...n, ref: r, className: b("rt-Flex", t) });
|
|
558
|
+
});
|
|
559
|
+
B.displayName = "Flex";
|
|
560
|
+
const et = ["1", "2", "3"], rt = { size: { type: "enum", className: "rt-r-size", values: et, default: "2", responsive: !0 }, loading: { type: "boolean", default: !0 } }, Fe = c.forwardRef((e, r) => {
|
|
561
|
+
const { className: t, children: a, loading: s, ...n } = w(e, rt, S);
|
|
562
|
+
if (!s) return a;
|
|
563
|
+
const i = c.createElement("span", { ...n, ref: r, className: b("rt-Spinner", t) }, c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }), c.createElement("span", { className: "rt-SpinnerLeaf" }));
|
|
564
|
+
return a === void 0 ? i : c.createElement(B, { asChild: !0, position: "relative", align: "center", justify: "center" }, c.createElement("span", null, c.createElement("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0 }, a), c.createElement(B, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0" }, c.createElement("span", null, i))));
|
|
565
|
+
});
|
|
566
|
+
Fe.displayName = "Spinner";
|
|
567
|
+
const tt = hr;
|
|
568
|
+
function st(e, r) {
|
|
569
|
+
if (e !== void 0) return typeof e == "string" ? r(e) : Object.fromEntries(Object.entries(e).map(([t, a]) => [t, r(a)]));
|
|
570
|
+
}
|
|
571
|
+
function nt(e) {
|
|
572
|
+
switch (e) {
|
|
573
|
+
case "1":
|
|
574
|
+
return "1";
|
|
575
|
+
case "2":
|
|
576
|
+
case "3":
|
|
577
|
+
return "2";
|
|
578
|
+
case "4":
|
|
579
|
+
return "3";
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const De = c.forwardRef((e, r) => {
|
|
583
|
+
const { size: t = be.size.default } = e, { className: a, children: s, asChild: n, color: i, radius: l, disabled: u = e.loading, ...d } = w(e, be, S), m = n ? M : "button";
|
|
584
|
+
return c.createElement(m, { "data-disabled": u || void 0, "data-accent-color": i, "data-radius": l, ...d, ref: r, className: b("rt-reset", "rt-BaseButton", a), disabled: u }, e.loading ? c.createElement(c.Fragment, null, c.createElement("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0 }, s), c.createElement(tt, null, s), c.createElement(B, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0" }, c.createElement("span", null, c.createElement(Fe, { size: st(t, nt) })))) : s);
|
|
585
|
+
});
|
|
586
|
+
De.displayName = "BaseButton";
|
|
587
|
+
const ze = c.forwardRef(({ className: e, ...r }, t) => c.createElement(De, { ...r, ref: t, className: b("rt-Button", e) }));
|
|
588
|
+
ze.displayName = "Button";
|
|
589
|
+
var Le = ee;
|
|
590
|
+
Le.dispatchDiscreteCustomEvent = vr;
|
|
591
|
+
Le.Root = ee;
|
|
592
|
+
const at = ["1", "2", "3"], ot = ["classic", "surface", "soft"], it = ["none", "vertical", "horizontal", "both"], lt = { size: { type: "enum", className: "rt-r-size", values: at, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: ot, default: "surface" }, resize: { type: "enum", className: "rt-r-resize", values: it, responsive: !0 }, ...z, ...se }, Ye = c.forwardRef((e, r) => {
|
|
593
|
+
const { className: t, color: a, radius: s, style: n, ...i } = w(e, lt, S);
|
|
594
|
+
return c.createElement("div", { "data-accent-color": a, "data-radius": s, className: b("rt-TextAreaRoot", t), style: n }, c.createElement("textarea", { className: "rt-reset rt-TextAreaInput", ref: r, ...i }));
|
|
595
|
+
});
|
|
596
|
+
Ye.displayName = "TextArea";
|
|
597
|
+
const ut = ["1", "2", "3"], ct = ["classic", "surface", "soft"], pt = { size: { type: "enum", className: "rt-r-size", values: ut, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: ct, default: "surface" }, ...z, ...se }, dt = ["left", "right"], ft = { side: { type: "enum", values: dt }, ...z, gap: Ie.gap, px: Y.px, pl: Y.pl, pr: Y.pr }, Be = c.forwardRef((e, r) => {
|
|
598
|
+
const t = c.useRef(null), { children: a, className: s, color: n, radius: i, style: l, ...u } = w(e, pt, S);
|
|
599
|
+
return c.createElement("div", { "data-accent-color": n, "data-radius": i, style: l, className: b("rt-TextFieldRoot", s), onPointerDown: (d) => {
|
|
600
|
+
const m = d.target;
|
|
601
|
+
if (m.closest("input, button, a")) return;
|
|
602
|
+
const y = t.current;
|
|
603
|
+
if (!y) return;
|
|
604
|
+
const f = m.closest(`
|
|
605
|
+
.rt-TextFieldSlot[data-side='right'],
|
|
606
|
+
.rt-TextFieldSlot:not([data-side='right']) ~ .rt-TextFieldSlot:not([data-side='left'])
|
|
607
|
+
`) ? y.value.length : 0;
|
|
608
|
+
requestAnimationFrame(() => {
|
|
609
|
+
try {
|
|
610
|
+
y.setSelectionRange(f, f);
|
|
611
|
+
} catch {
|
|
612
|
+
}
|
|
613
|
+
y.focus();
|
|
614
|
+
});
|
|
615
|
+
} }, c.createElement("input", { spellCheck: "false", ...u, ref: Ne(t, r), className: "rt-reset rt-TextFieldInput" }), a);
|
|
616
|
+
});
|
|
617
|
+
Be.displayName = "TextField.Root";
|
|
618
|
+
const mt = c.forwardRef((e, r) => {
|
|
619
|
+
const { className: t, color: a, side: s, ...n } = w(e, ft);
|
|
620
|
+
return c.createElement("div", { "data-accent-color": a, "data-side": s, ...n, ref: r, className: b("rt-TextFieldSlot", t) });
|
|
621
|
+
});
|
|
622
|
+
mt.displayName = "TextField.Slot";
|
|
623
|
+
function R(e) {
|
|
624
|
+
if (e != null) {
|
|
625
|
+
if (typeof e == "string")
|
|
626
|
+
return e;
|
|
627
|
+
if (typeof e == "number" || typeof e == "boolean")
|
|
628
|
+
return String(e);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
function ne(e) {
|
|
632
|
+
if (e != null) {
|
|
633
|
+
if (typeof e == "boolean")
|
|
634
|
+
return e;
|
|
635
|
+
if (e === "true") return !0;
|
|
636
|
+
if (e === "false") return !1;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
function vt(e) {
|
|
640
|
+
if (typeof e == "number")
|
|
641
|
+
return e;
|
|
642
|
+
if (typeof e == "string") {
|
|
643
|
+
const r = Number(e);
|
|
644
|
+
return Number.isFinite(r) ? r : void 0;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
function W(e) {
|
|
648
|
+
return R(e)?.trim() ?? void 0;
|
|
649
|
+
}
|
|
650
|
+
function H(...e) {
|
|
651
|
+
const r = [];
|
|
652
|
+
for (const t of e) {
|
|
653
|
+
if (Array.isArray(t)) {
|
|
654
|
+
for (const a of t) {
|
|
655
|
+
const s = a.trim();
|
|
656
|
+
s && r.push(s);
|
|
657
|
+
}
|
|
658
|
+
continue;
|
|
659
|
+
}
|
|
660
|
+
typeof t == "string" && t.trim() && r.push(t.trim());
|
|
661
|
+
}
|
|
662
|
+
return r.length > 0 ? r.join(" ") : void 0;
|
|
663
|
+
}
|
|
664
|
+
function O(e, r = /* @__PURE__ */ new Set()) {
|
|
665
|
+
if (!e)
|
|
666
|
+
return {};
|
|
667
|
+
const t = {};
|
|
668
|
+
for (const [a, s] of Object.entries(e))
|
|
669
|
+
r.has(a) || s != null && (typeof s == "string" || typeof s == "number" || typeof s == "boolean") && (t[a] = s);
|
|
670
|
+
return t;
|
|
671
|
+
}
|
|
672
|
+
function We(e, r) {
|
|
673
|
+
if (e)
|
|
674
|
+
return () => {
|
|
675
|
+
r(e);
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
function Me(e, r) {
|
|
679
|
+
if (e)
|
|
680
|
+
return (t) => r(e, t);
|
|
681
|
+
}
|
|
682
|
+
function yt() {
|
|
683
|
+
const e = A(function({ node: t, context: a, className: s }) {
|
|
684
|
+
const n = O(t.props), i = a.renderChildren(t.children ?? []);
|
|
685
|
+
return /* @__PURE__ */ E.jsx(Ve, { className: s, ...n, children: i });
|
|
686
|
+
});
|
|
687
|
+
return (r) => {
|
|
688
|
+
if (r.type === "radix-box")
|
|
689
|
+
return e;
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
function gt() {
|
|
693
|
+
const e = /* @__PURE__ */ new Set(["label", "disabled", "onInvokeId"]), r = A(function({ node: a, context: s, className: n }) {
|
|
694
|
+
const i = R(a.props?.label), l = ne(a.props?.disabled), d = { ...O(a.props, e) };
|
|
695
|
+
l === !0 && (d.disabled = !0);
|
|
696
|
+
const m = We(W(a.props?.onInvokeId), s.dispatchAction);
|
|
697
|
+
m && (d.onClick = m);
|
|
698
|
+
const y = [];
|
|
699
|
+
i !== void 0 && y.push(i);
|
|
700
|
+
const f = s.renderChildren(a.children ?? []);
|
|
701
|
+
return f != null && y.push(f), /* @__PURE__ */ E.jsx(ze, { className: H("radix-button", n), ...d, children: y });
|
|
702
|
+
});
|
|
703
|
+
return (t) => {
|
|
704
|
+
if (t.type === "radix-button")
|
|
705
|
+
return r;
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
function ht() {
|
|
709
|
+
const e = /* @__PURE__ */ new Set(["content"]), r = A(function({ node: a, context: s, className: n }) {
|
|
710
|
+
const i = R(a.props?.content), l = O(a.props, e), u = [];
|
|
711
|
+
i !== void 0 && u.push(i);
|
|
712
|
+
const d = s.renderChildren(a.children ?? []);
|
|
713
|
+
return d != null && u.push(d), /* @__PURE__ */ E.jsx(Ce, { className: H("radix-heading", n), ...l, children: u });
|
|
714
|
+
});
|
|
715
|
+
return (t) => {
|
|
716
|
+
if (t.type === "radix-heading")
|
|
717
|
+
return r;
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
function bt() {
|
|
721
|
+
const e = A(function({ node: t, context: a, className: s }) {
|
|
722
|
+
const n = R(t.props?.content), i = O(t.props), l = [];
|
|
723
|
+
n !== void 0 && l.push(n);
|
|
724
|
+
const u = a.renderChildren(t.children ?? []);
|
|
725
|
+
return u != null && l.push(u), /* @__PURE__ */ E.jsx(Ae, { className: s, ...i, children: l });
|
|
726
|
+
});
|
|
727
|
+
return (r) => {
|
|
728
|
+
if (r.type === "radix-text")
|
|
729
|
+
return e;
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
function Nt() {
|
|
733
|
+
const e = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "rows", "onValueChangeId", "onInvokeId"]), r = A(function({ node: a, context: s, className: n }) {
|
|
734
|
+
const i = R(a.props?.value), l = R(a.props?.defaultValue), u = R(a.props?.placeholder), d = ne(a.props?.disabled), m = vt(a.props?.rows), f = { ...O(a.props, e) };
|
|
735
|
+
i !== void 0 ? f.value = i : l !== void 0 && (f.defaultValue = l), u && (f.placeholder = u), d !== void 0 && (f.disabled = d), m !== void 0 && (f.rows = m);
|
|
736
|
+
const P = Me(W(a.props?.onValueChangeId), s.dispatchAction), j = We(W(a.props?.onInvokeId), s.dispatchAction);
|
|
737
|
+
return P && (f.onChange = (N) => {
|
|
738
|
+
P(N?.target?.value ?? "");
|
|
739
|
+
}), j && (f.onKeyDown = (N) => {
|
|
740
|
+
N.key !== "Enter" || N.shiftKey || N.altKey || N.metaKey || N.nativeEvent?.isComposing || (N.preventDefault(), j());
|
|
741
|
+
}), /* @__PURE__ */ E.jsx(Ye, { className: H("radix-text-area", n), ...f });
|
|
742
|
+
});
|
|
743
|
+
return (t) => {
|
|
744
|
+
if (t.type === "radix-text-area")
|
|
745
|
+
return r;
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function Rt() {
|
|
749
|
+
const e = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "type", "onValueChangeId"]), r = A(function({ node: a, context: s, className: n }) {
|
|
750
|
+
const i = R(a.props?.value), l = R(a.props?.defaultValue), u = R(a.props?.placeholder), d = ne(a.props?.disabled), m = R(a.props?.type), f = { ...O(a.props, e) };
|
|
751
|
+
i !== void 0 ? f.value = i : l !== void 0 && (f.defaultValue = l), u && (f.placeholder = u), d !== void 0 && (f.disabled = d), m && (f.type = m);
|
|
752
|
+
const P = Me(W(a.props?.onValueChangeId), s.dispatchAction);
|
|
753
|
+
return P && (f.onChange = (j) => {
|
|
754
|
+
P(j?.target?.value ?? "");
|
|
755
|
+
}), /* @__PURE__ */ E.jsx(Be, { className: H("radix-text-field", n), ...f });
|
|
756
|
+
});
|
|
757
|
+
return (t) => {
|
|
758
|
+
if (t.type === "radix-text-field")
|
|
759
|
+
return r;
|
|
760
|
+
};
|
|
761
|
+
}
|
|
762
|
+
const xt = "radix", Et = () => wt();
|
|
763
|
+
function $t(e) {
|
|
764
|
+
e.registerModule(xt, Et);
|
|
765
|
+
}
|
|
766
|
+
function wt() {
|
|
767
|
+
return [yt(), gt(), ht(), Nt(), Rt(), bt()];
|
|
768
|
+
}
|
|
769
|
+
export {
|
|
770
|
+
xt as IKON_UI_RADIX_MODULE,
|
|
771
|
+
H as combineClassNames,
|
|
772
|
+
yt as createRadixBoxResolver,
|
|
773
|
+
gt as createRadixButtonResolver,
|
|
774
|
+
ht as createRadixHeadingResolver,
|
|
775
|
+
wt as createRadixResolvers,
|
|
776
|
+
Nt as createRadixTextAreaResolver,
|
|
777
|
+
Rt as createRadixTextFieldResolver,
|
|
778
|
+
bt as createRadixTextResolver,
|
|
779
|
+
Me as createStringDispatcher,
|
|
780
|
+
We as createVoidDispatcher,
|
|
781
|
+
Et as loadRadixModule,
|
|
782
|
+
O as pickPrimitiveProps,
|
|
783
|
+
$t as registerRadixModule,
|
|
784
|
+
W as toActionId,
|
|
785
|
+
ne as toBooleanValue,
|
|
786
|
+
vt as toNumberValue,
|
|
787
|
+
R as toStringValue
|
|
788
|
+
};
|