solid-uix 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/dist/main.css +1 -1
- package/dist/main.js +233 -538
- package/dist/main.js.map +1 -0
- package/dist/ssr/main.js +395 -0
- package/dist/ssr/main.js.map +1 -0
- package/dist/{button → types/button}/button.d.ts +2 -0
- package/dist/{field → types/field}/field.types.d.ts +1 -1
- package/dist/types/link/link.d.ts +2 -0
- package/dist/types/link/link.stories.d.ts +48 -0
- package/dist/types/link/link.types.d.ts +6 -0
- package/dist/{main.d.ts → types/main.d.ts} +3 -1
- package/dist/types/text_area/text_area.d.ts +2 -0
- package/dist/types/text_area/text_area.stories.d.ts +38 -0
- package/dist/types/text_area/text_area.types.d.ts +4 -0
- package/dist/types/text_input/text_input.stories.d.ts +30 -0
- package/package.json +10 -9
- package/dist/main.umd.cjs +0 -1
- /package/dist/{button → types/button}/button.types.d.ts +0 -0
- /package/dist/{checkbox → types/checkbox}/checkbox.d.ts +0 -0
- /package/dist/{checkbox → types/checkbox}/checkbox.stories.d.ts +0 -0
- /package/dist/{checkbox → types/checkbox}/checkbox.types.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/dialog.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/dialog.types.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/provider/context.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/provider/context.types.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/provider/provider.d.ts +0 -0
- /package/dist/{dialog → types/dialog}/provider/provider.types.d.ts +0 -0
- /package/dist/{field → types/field}/field.context.d.ts +0 -0
- /package/dist/{field → types/field}/field.d.ts +0 -0
- /package/dist/{list → types/list}/list.d.ts +0 -0
- /package/dist/{list → types/list}/list.types.d.ts +0 -0
- /package/dist/{select → types/select}/select.d.ts +0 -0
- /package/dist/{select → types/select}/select.types.d.ts +0 -0
- /package/dist/{text_input → types/text_input}/text_input.d.ts +0 -0
- /package/dist/{text_input → types/text_input}/text_input.types.d.ts +0 -0
- /package/dist/{utils → types/utils}/cls.d.ts +0 -0
- /package/dist/{utils → types/utils}/message.d.ts +0 -0
- /package/dist/{utils → types/utils}/noop.d.ts +0 -0
- /package/dist/{utils → types/utils}/string.d.ts +0 -0
package/dist/main.js
CHANGED
|
@@ -1,629 +1,324 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
nomodule: {
|
|
21
|
-
$: "noModule",
|
|
22
|
-
SCRIPT: 1
|
|
23
|
-
},
|
|
24
|
-
playsinline: {
|
|
25
|
-
$: "playsInline",
|
|
26
|
-
VIDEO: 1
|
|
27
|
-
},
|
|
28
|
-
readonly: {
|
|
29
|
-
$: "readOnly",
|
|
30
|
-
INPUT: 1,
|
|
31
|
-
TEXTAREA: 1
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
function ae(n, e) {
|
|
35
|
-
const t = ce[n];
|
|
36
|
-
return typeof t == "object" ? t[e] ? t.$ : void 0 : t;
|
|
37
|
-
}
|
|
38
|
-
const fe = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), q = (n) => w(() => n());
|
|
39
|
-
function de(n, e, t) {
|
|
40
|
-
let s = t.length, i = e.length, l = s, c = 0, o = 0, r = e[i - 1].nextSibling, a = null;
|
|
41
|
-
for (; c < i || o < l; ) {
|
|
42
|
-
if (e[c] === t[o]) {
|
|
43
|
-
c++, o++;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
for (; e[i - 1] === t[l - 1]; )
|
|
47
|
-
i--, l--;
|
|
48
|
-
if (i === c) {
|
|
49
|
-
const f = l < s ? o ? t[o - 1].nextSibling : t[l - o] : r;
|
|
50
|
-
for (; o < l; ) n.insertBefore(t[o++], f);
|
|
51
|
-
} else if (l === o)
|
|
52
|
-
for (; c < i; )
|
|
53
|
-
(!a || !a.has(e[c])) && e[c].remove(), c++;
|
|
54
|
-
else if (e[c] === t[l - 1] && t[o] === e[i - 1]) {
|
|
55
|
-
const f = e[--i].nextSibling;
|
|
56
|
-
n.insertBefore(t[o++], e[c++].nextSibling), n.insertBefore(t[--l], f), e[i] = t[l];
|
|
57
|
-
} else {
|
|
58
|
-
if (!a) {
|
|
59
|
-
a = /* @__PURE__ */ new Map();
|
|
60
|
-
let u = o;
|
|
61
|
-
for (; u < l; ) a.set(t[u], u++);
|
|
62
|
-
}
|
|
63
|
-
const f = a.get(e[c]);
|
|
64
|
-
if (f != null)
|
|
65
|
-
if (o < f && f < l) {
|
|
66
|
-
let u = c, d = 1, C;
|
|
67
|
-
for (; ++u < i && u < l && !((C = a.get(e[u])) == null || C !== f + d); )
|
|
68
|
-
d++;
|
|
69
|
-
if (d > f - o) {
|
|
70
|
-
const V = e[c];
|
|
71
|
-
for (; o < f; ) n.insertBefore(t[o++], V);
|
|
72
|
-
} else n.replaceChild(t[o++], e[c++]);
|
|
73
|
-
} else c++;
|
|
74
|
-
else e[c++].remove();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
const G = "_$DX_DELEGATE";
|
|
79
|
-
function h(n, e, t, s) {
|
|
80
|
-
let i;
|
|
81
|
-
const l = () => {
|
|
82
|
-
const o = document.createElement("template");
|
|
83
|
-
return o.innerHTML = n, o.content.firstChild;
|
|
84
|
-
}, c = () => (i || (i = l())).cloneNode(!0);
|
|
85
|
-
return c.cloneNode = c, c;
|
|
86
|
-
}
|
|
87
|
-
function ue(n, e = window.document) {
|
|
88
|
-
const t = e[G] || (e[G] = /* @__PURE__ */ new Set());
|
|
89
|
-
for (let s = 0, i = n.length; s < i; s++) {
|
|
90
|
-
const l = n[s];
|
|
91
|
-
t.has(l) || (t.add(l), e.addEventListener(l, $e));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function S(n, e, t) {
|
|
95
|
-
M(n) || (t == null ? n.removeAttribute(e) : n.setAttribute(e, t));
|
|
96
|
-
}
|
|
97
|
-
function ge(n, e, t) {
|
|
98
|
-
M(n) || (t ? n.setAttribute(e, "") : n.removeAttribute(e));
|
|
99
|
-
}
|
|
100
|
-
function P(n, e) {
|
|
101
|
-
M(n) || (e == null ? n.removeAttribute("class") : n.className = e);
|
|
102
|
-
}
|
|
103
|
-
function he(n, e, t, s) {
|
|
104
|
-
if (s)
|
|
105
|
-
Array.isArray(t) ? (n[`$$${e}`] = t[0], n[`$$${e}Data`] = t[1]) : n[`$$${e}`] = t;
|
|
106
|
-
else if (Array.isArray(t)) {
|
|
107
|
-
const i = t[0];
|
|
108
|
-
n.addEventListener(e, t[0] = (l) => i.call(n, t[1], l));
|
|
109
|
-
} else n.addEventListener(e, t, typeof t != "function" && t);
|
|
110
|
-
}
|
|
111
|
-
function ye(n, e, t = {}) {
|
|
112
|
-
const s = Object.keys(e || {}), i = Object.keys(t);
|
|
113
|
-
let l, c;
|
|
114
|
-
for (l = 0, c = i.length; l < c; l++) {
|
|
115
|
-
const o = i[l];
|
|
116
|
-
!o || o === "undefined" || e[o] || (K(n, o, !1), delete t[o]);
|
|
117
|
-
}
|
|
118
|
-
for (l = 0, c = s.length; l < c; l++) {
|
|
119
|
-
const o = s[l], r = !!e[o];
|
|
120
|
-
!o || o === "undefined" || t[o] === r || !r || (K(n, o, !0), t[o] = r);
|
|
121
|
-
}
|
|
122
|
-
return t;
|
|
123
|
-
}
|
|
124
|
-
function be(n, e, t) {
|
|
125
|
-
if (!e) return t ? S(n, "style") : e;
|
|
126
|
-
const s = n.style;
|
|
127
|
-
if (typeof e == "string") return s.cssText = e;
|
|
128
|
-
typeof t == "string" && (s.cssText = t = void 0), t || (t = {}), e || (e = {});
|
|
129
|
-
let i, l;
|
|
130
|
-
for (l in t)
|
|
131
|
-
e[l] == null && s.removeProperty(l), delete t[l];
|
|
132
|
-
for (l in e)
|
|
133
|
-
i = e[l], i !== t[l] && (s.setProperty(l, i), t[l] = i);
|
|
134
|
-
return t;
|
|
135
|
-
}
|
|
136
|
-
function b(n, e = {}, t, s) {
|
|
137
|
-
const i = {};
|
|
138
|
-
return s || $(() => i.children = N(n, e.children, i.children)), $(() => typeof e.ref == "function" && z(e.ref, n)), $(() => _e(n, e, t, !0, i, !0)), i;
|
|
139
|
-
}
|
|
140
|
-
function z(n, e, t) {
|
|
141
|
-
return ne(() => n(e, t));
|
|
142
|
-
}
|
|
143
|
-
function y(n, e, t, s) {
|
|
144
|
-
if (t !== void 0 && !s && (s = []), typeof e != "function") return N(n, e, s, t);
|
|
145
|
-
$((i) => N(n, e(), i, t), s);
|
|
146
|
-
}
|
|
147
|
-
function _e(n, e, t, s, i = {}, l = !1) {
|
|
148
|
-
e || (e = {});
|
|
149
|
-
for (const c in i)
|
|
150
|
-
if (!(c in e)) {
|
|
151
|
-
if (c === "children") continue;
|
|
152
|
-
i[c] = R(n, c, null, i[c], t, l, e);
|
|
153
|
-
}
|
|
154
|
-
for (const c in e) {
|
|
155
|
-
if (c === "children")
|
|
156
|
-
continue;
|
|
157
|
-
const o = e[c];
|
|
158
|
-
i[c] = R(n, c, o, i[c], t, l, e);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
function M(n) {
|
|
162
|
-
return !!m.context && !m.done && (!n || n.isConnected);
|
|
163
|
-
}
|
|
164
|
-
function me(n) {
|
|
165
|
-
return n.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
166
|
-
}
|
|
167
|
-
function K(n, e, t) {
|
|
168
|
-
const s = e.trim().split(/\s+/);
|
|
169
|
-
for (let i = 0, l = s.length; i < l; i++) n.classList.toggle(s[i], t);
|
|
170
|
-
}
|
|
171
|
-
function R(n, e, t, s, i, l, c) {
|
|
172
|
-
let o, r, a, f, u;
|
|
173
|
-
if (e === "style") return be(n, t, s);
|
|
174
|
-
if (e === "classList") return ye(n, t, s);
|
|
175
|
-
if (t === s) return s;
|
|
176
|
-
if (e === "ref")
|
|
177
|
-
l || t(n);
|
|
178
|
-
else if (e.slice(0, 3) === "on:") {
|
|
179
|
-
const d = e.slice(3);
|
|
180
|
-
s && n.removeEventListener(d, s, typeof s != "function" && s), t && n.addEventListener(d, t, typeof t != "function" && t);
|
|
181
|
-
} else if (e.slice(0, 10) === "oncapture:") {
|
|
182
|
-
const d = e.slice(10);
|
|
183
|
-
s && n.removeEventListener(d, s, !0), t && n.addEventListener(d, t, !0);
|
|
184
|
-
} else if (e.slice(0, 2) === "on") {
|
|
185
|
-
const d = e.slice(2).toLowerCase(), C = fe.has(d);
|
|
186
|
-
if (!C && s) {
|
|
187
|
-
const V = Array.isArray(s) ? s[0] : s;
|
|
188
|
-
n.removeEventListener(d, V);
|
|
189
|
-
}
|
|
190
|
-
(C || t) && (he(n, d, t, C), C && ue([d]));
|
|
191
|
-
} else if (e.slice(0, 5) === "attr:")
|
|
192
|
-
S(n, e.slice(5), t);
|
|
193
|
-
else if (e.slice(0, 5) === "bool:")
|
|
194
|
-
ge(n, e.slice(5), t);
|
|
195
|
-
else if ((u = e.slice(0, 5) === "prop:") || (a = le.has(e)) || (f = ae(e, n.tagName)) || (r = oe.has(e)) || (o = n.nodeName.includes("-") || "is" in c)) {
|
|
196
|
-
if (u)
|
|
197
|
-
e = e.slice(5), r = !0;
|
|
198
|
-
else if (M(n)) return t;
|
|
199
|
-
e === "class" || e === "className" ? P(n, t) : o && !r && !a ? n[me(e)] = t : n[f || e] = t;
|
|
200
|
-
} else
|
|
201
|
-
S(n, re[e] || e, t);
|
|
202
|
-
return t;
|
|
203
|
-
}
|
|
204
|
-
function $e(n) {
|
|
205
|
-
if (m.registry && m.events && m.events.find(([r, a]) => a === n))
|
|
206
|
-
return;
|
|
207
|
-
let e = n.target;
|
|
208
|
-
const t = `$$${n.type}`, s = n.target, i = n.currentTarget, l = (r) => Object.defineProperty(n, "target", {
|
|
209
|
-
configurable: !0,
|
|
210
|
-
value: r
|
|
211
|
-
}), c = () => {
|
|
212
|
-
const r = e[t];
|
|
213
|
-
if (r && !e.disabled) {
|
|
214
|
-
const a = e[`${t}Data`];
|
|
215
|
-
if (a !== void 0 ? r.call(e, a, n) : r.call(e, n), n.cancelBubble) return;
|
|
216
|
-
}
|
|
217
|
-
return e.host && typeof e.host != "string" && !e.host._$host && e.contains(n.target) && l(e.host), !0;
|
|
218
|
-
}, o = () => {
|
|
219
|
-
for (; c() && (e = e._$host || e.parentNode || e.host); ) ;
|
|
220
|
-
};
|
|
221
|
-
if (Object.defineProperty(n, "currentTarget", {
|
|
222
|
-
configurable: !0,
|
|
223
|
-
get() {
|
|
224
|
-
return e || document;
|
|
225
|
-
}
|
|
226
|
-
}), m.registry && !m.done && (m.done = _$HY.done = !0), n.composedPath) {
|
|
227
|
-
const r = n.composedPath();
|
|
228
|
-
l(r[0]);
|
|
229
|
-
for (let a = 0; a < r.length - 2 && (e = r[a], !!c()); a++) {
|
|
230
|
-
if (e._$host) {
|
|
231
|
-
e = e._$host, o();
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
if (e.parentNode === i)
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
} else o();
|
|
238
|
-
l(s);
|
|
239
|
-
}
|
|
240
|
-
function N(n, e, t, s, i) {
|
|
241
|
-
const l = M(n);
|
|
242
|
-
if (l) {
|
|
243
|
-
!t && (t = [...n.childNodes]);
|
|
244
|
-
let r = [];
|
|
245
|
-
for (let a = 0; a < t.length; a++) {
|
|
246
|
-
const f = t[a];
|
|
247
|
-
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : r.push(f);
|
|
248
|
-
}
|
|
249
|
-
t = r;
|
|
250
|
-
}
|
|
251
|
-
for (; typeof t == "function"; ) t = t();
|
|
252
|
-
if (e === t) return t;
|
|
253
|
-
const c = typeof e, o = s !== void 0;
|
|
254
|
-
if (n = o && t[0] && t[0].parentNode || n, c === "string" || c === "number") {
|
|
255
|
-
if (l || c === "number" && (e = e.toString(), e === t))
|
|
256
|
-
return t;
|
|
257
|
-
if (o) {
|
|
258
|
-
let r = t[0];
|
|
259
|
-
r && r.nodeType === 3 ? r.data !== e && (r.data = e) : r = document.createTextNode(e), t = x(n, t, s, r);
|
|
260
|
-
} else
|
|
261
|
-
t !== "" && typeof t == "string" ? t = n.firstChild.data = e : t = n.textContent = e;
|
|
262
|
-
} else if (e == null || c === "boolean") {
|
|
263
|
-
if (l) return t;
|
|
264
|
-
t = x(n, t, s);
|
|
265
|
-
} else {
|
|
266
|
-
if (c === "function")
|
|
267
|
-
return $(() => {
|
|
268
|
-
let r = e();
|
|
269
|
-
for (; typeof r == "function"; ) r = r();
|
|
270
|
-
t = N(n, r, t, s);
|
|
271
|
-
}), () => t;
|
|
272
|
-
if (Array.isArray(e)) {
|
|
273
|
-
const r = [], a = t && Array.isArray(t);
|
|
274
|
-
if (H(r, e, t, i))
|
|
275
|
-
return $(() => t = N(n, r, t, s, !0)), () => t;
|
|
276
|
-
if (l) {
|
|
277
|
-
if (!r.length) return t;
|
|
278
|
-
if (s === void 0) return t = [...n.childNodes];
|
|
279
|
-
let f = r[0];
|
|
280
|
-
if (f.parentNode !== n) return t;
|
|
281
|
-
const u = [f];
|
|
282
|
-
for (; (f = f.nextSibling) !== s; ) u.push(f);
|
|
283
|
-
return t = u;
|
|
1
|
+
import { template as i, spread as u, mergeProps as c, insert as d, createComponent as x, memo as E, setAttribute as N, effect as O, className as M, use as U } from "solid-js/web";
|
|
2
|
+
import { mergeProps as z, splitProps as g, createContext as S, useContext as w, createUniqueId as p, createSignal as P, createMemo as k, createEffect as L, children as A, Show as G } from "solid-js";
|
|
3
|
+
const _ = (...e) => e.filter(Boolean).join(" "), J = "_button_1x3l8_1", K = "_solid_1x3l8_29", Q = "_outlined_1x3l8_44", W = "_link_1x3l8_60", T = {
|
|
4
|
+
button: J,
|
|
5
|
+
solid: K,
|
|
6
|
+
outlined: Q,
|
|
7
|
+
link: W
|
|
8
|
+
};
|
|
9
|
+
var X = /* @__PURE__ */ i("<button type=button>");
|
|
10
|
+
const Y = {
|
|
11
|
+
variant: "solid"
|
|
12
|
+
}, Ue = (e) => {
|
|
13
|
+
const t = z(Y, e), [n, r] = g(t, ["class", "variant"]);
|
|
14
|
+
return (() => {
|
|
15
|
+
var s = X();
|
|
16
|
+
return u(s, c(r, {
|
|
17
|
+
get class() {
|
|
18
|
+
return _(T.button, n.class, n.variant === "solid" && T.solid, n.variant === "outlined" && T.outlined);
|
|
284
19
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return t;
|
|
299
|
-
}
|
|
300
|
-
function H(n, e, t, s) {
|
|
301
|
-
let i = !1;
|
|
302
|
-
for (let l = 0, c = e.length; l < c; l++) {
|
|
303
|
-
let o = e[l], r = t && t[n.length], a;
|
|
304
|
-
if (!(o == null || o === !0 || o === !1)) if ((a = typeof o) == "object" && o.nodeType)
|
|
305
|
-
n.push(o);
|
|
306
|
-
else if (Array.isArray(o))
|
|
307
|
-
i = H(n, o, r) || i;
|
|
308
|
-
else if (a === "function")
|
|
309
|
-
if (s) {
|
|
310
|
-
for (; typeof o == "function"; ) o = o();
|
|
311
|
-
i = H(n, Array.isArray(o) ? o : [o], Array.isArray(r) ? r : [r]) || i;
|
|
312
|
-
} else
|
|
313
|
-
n.push(o), i = !0;
|
|
314
|
-
else {
|
|
315
|
-
const f = String(o);
|
|
316
|
-
r && r.nodeType === 3 && r.data === f ? n.push(r) : n.push(document.createTextNode(f));
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return i;
|
|
320
|
-
}
|
|
321
|
-
function X(n, e, t = null) {
|
|
322
|
-
for (let s = 0, i = e.length; s < i; s++) n.insertBefore(e[s], t);
|
|
323
|
-
}
|
|
324
|
-
function x(n, e, t, s) {
|
|
325
|
-
if (t === void 0) return n.textContent = "";
|
|
326
|
-
const i = s || document.createTextNode("");
|
|
327
|
-
if (e.length) {
|
|
328
|
-
let l = !1;
|
|
329
|
-
for (let c = e.length - 1; c >= 0; c--) {
|
|
330
|
-
const o = e[c];
|
|
331
|
-
if (i !== o) {
|
|
332
|
-
const r = o.parentNode === n;
|
|
333
|
-
!l && !c ? r ? n.replaceChild(i, o) : n.insertBefore(i, t) : r && o.remove();
|
|
334
|
-
} else l = !0;
|
|
335
|
-
}
|
|
336
|
-
} else n.insertBefore(i, t);
|
|
337
|
-
return [i];
|
|
338
|
-
}
|
|
339
|
-
const Ce = "_button_12jrf_1", xe = {
|
|
340
|
-
button: Ce
|
|
341
|
-
}, _ = (...n) => n.filter(Boolean).join(" ");
|
|
342
|
-
var Ae = /* @__PURE__ */ h("<button type=button>");
|
|
343
|
-
const ct = (n) => {
|
|
344
|
-
const [e, t] = A(n, ["variant"]);
|
|
20
|
+
}), !1, !0), d(s, () => r.children), s;
|
|
21
|
+
})();
|
|
22
|
+
}, Z = "_link_yqbjv_1", ee = "_underline_yqbjv_14", te = "_secondary_yqbjv_18", re = "_disabled_yqbjv_22", D = {
|
|
23
|
+
link: Z,
|
|
24
|
+
underline: ee,
|
|
25
|
+
secondary: te,
|
|
26
|
+
disabled: re
|
|
27
|
+
};
|
|
28
|
+
var ne = /* @__PURE__ */ i("<a>");
|
|
29
|
+
const ze = (e) => {
|
|
30
|
+
const [t, n] = g(e, ["class", "disabled", "color", "underline"]);
|
|
345
31
|
return (() => {
|
|
346
|
-
var
|
|
347
|
-
return
|
|
32
|
+
var r = ne();
|
|
33
|
+
return u(r, c(n, {
|
|
348
34
|
get class() {
|
|
349
|
-
return _(
|
|
35
|
+
return _(D.link, t.class, t.disabled && D.disabled, t.color === "secondary" && D.secondary, t.underline === "always" && D.underline);
|
|
36
|
+
},
|
|
37
|
+
get "aria-disabled"() {
|
|
38
|
+
return t.disabled;
|
|
350
39
|
}
|
|
351
|
-
}), !1, !0),
|
|
40
|
+
}), !1, !0), d(r, () => n.children), r;
|
|
352
41
|
})();
|
|
353
|
-
},
|
|
354
|
-
checkbox:
|
|
355
|
-
input:
|
|
356
|
-
indicator:
|
|
357
|
-
label:
|
|
358
|
-
disabled:
|
|
42
|
+
}, se = "_checkbox_1npj4_1", le = "_input_1npj4_8", oe = "_indicator_1npj4_18", ae = "_label_1npj4_37", ie = "_disabled_1npj4_46", $ = {
|
|
43
|
+
checkbox: se,
|
|
44
|
+
input: le,
|
|
45
|
+
indicator: oe,
|
|
46
|
+
label: ae,
|
|
47
|
+
disabled: ie
|
|
48
|
+
}, ce = (e) => e.level === "error", q = (e) => {
|
|
49
|
+
if (e.length)
|
|
50
|
+
return e.map((t) => t.id).join(" ");
|
|
51
|
+
}, m = () => {
|
|
52
|
+
}, h = (e) => () => e, F = () => () => {
|
|
53
|
+
}, de = {
|
|
54
|
+
fieldId: void 0,
|
|
55
|
+
error: h(!1),
|
|
56
|
+
ariaDescribedBy: h(void 0),
|
|
57
|
+
ariaErrorMessage: h(void 0),
|
|
58
|
+
setMessage: m
|
|
59
|
+
}, R = S(de, {}), B = () => w(R), ue = (e) => {
|
|
60
|
+
const t = p(), [n, r] = P([]), s = k(() => e.error), l = k(() => q(n())), b = k(() => q(n().filter(ce))), f = (o) => {
|
|
61
|
+
r((a) => [...a, o]);
|
|
62
|
+
};
|
|
63
|
+
return x(R.Provider, {
|
|
64
|
+
value: {
|
|
65
|
+
fieldId: t,
|
|
66
|
+
error: s,
|
|
67
|
+
setMessage: f,
|
|
68
|
+
ariaDescribedBy: l,
|
|
69
|
+
ariaErrorMessage: b
|
|
70
|
+
},
|
|
71
|
+
get children() {
|
|
72
|
+
return e.children;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
359
75
|
};
|
|
360
|
-
var
|
|
361
|
-
const
|
|
362
|
-
const [
|
|
76
|
+
var _e = /* @__PURE__ */ i("<span><input><span>"), ge = /* @__PURE__ */ i("<label>");
|
|
77
|
+
const Ge = (e) => {
|
|
78
|
+
const [t, n] = g(e, ["label", "error", "class"]), r = B(), s = p();
|
|
363
79
|
return (() => {
|
|
364
|
-
var
|
|
365
|
-
return b
|
|
80
|
+
var l = _e(), b = l.firstChild, f = b.nextSibling;
|
|
81
|
+
return u(b, c(n, {
|
|
366
82
|
id: s,
|
|
367
83
|
type: "checkbox",
|
|
368
84
|
get class() {
|
|
369
|
-
return
|
|
85
|
+
return $.input;
|
|
86
|
+
},
|
|
87
|
+
get "aria-describedby"() {
|
|
88
|
+
return r.ariaDescribedBy();
|
|
370
89
|
},
|
|
371
90
|
get "aria-invalid"() {
|
|
372
|
-
return !!
|
|
91
|
+
return r.error() || !!t.error;
|
|
92
|
+
},
|
|
93
|
+
get "aria-errormessage"() {
|
|
94
|
+
return r.ariaErrorMessage();
|
|
373
95
|
}
|
|
374
|
-
}), !1, !1),
|
|
375
|
-
var o =
|
|
96
|
+
}), !1, !1), d(l, (() => {
|
|
97
|
+
var o = E(() => !!t.label);
|
|
376
98
|
return () => o() && (() => {
|
|
377
|
-
var
|
|
378
|
-
return
|
|
99
|
+
var a = ge();
|
|
100
|
+
return N(a, "for", s), d(a, () => t.label), O(() => M(a, $.label)), a;
|
|
379
101
|
})();
|
|
380
|
-
})(), null),
|
|
381
|
-
var
|
|
382
|
-
return
|
|
102
|
+
})(), null), O((o) => {
|
|
103
|
+
var a = _($.checkbox, t.class, n.disabled && $.disabled), C = $.indicator;
|
|
104
|
+
return a !== o.e && M(l, o.e = a), C !== o.t && M(f, o.t = C), o;
|
|
383
105
|
}, {
|
|
384
106
|
e: void 0,
|
|
385
107
|
t: void 0
|
|
386
|
-
}),
|
|
108
|
+
}), l;
|
|
387
109
|
})();
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
return n.map((e) => e.id).join(" ");
|
|
391
|
-
}, D = () => {
|
|
392
|
-
}, L = (n) => () => n, J = () => () => {
|
|
393
|
-
}, Me = {
|
|
394
|
-
fieldId: "",
|
|
395
|
-
error: L(!1),
|
|
396
|
-
ariaDescribedBy: L(void 0),
|
|
397
|
-
ariaErrorMessage: L(void 0),
|
|
398
|
-
setMessage: D
|
|
399
|
-
}, p = Q(Me, {}), v = () => W(p), je = (n) => {
|
|
400
|
-
const e = B(), [t, s] = F([]), i = w(() => n.error), l = w(() => Y(t())), c = w(() => Y(t().filter(Ie))), o = (r) => {
|
|
401
|
-
s((a) => [...a, r]);
|
|
402
|
-
};
|
|
403
|
-
return I(p.Provider, {
|
|
404
|
-
value: {
|
|
405
|
-
fieldId: e,
|
|
406
|
-
error: i,
|
|
407
|
-
setMessage: o,
|
|
408
|
-
ariaDescribedBy: l,
|
|
409
|
-
ariaErrorMessage: c
|
|
410
|
-
},
|
|
411
|
-
get children() {
|
|
412
|
-
return n.children;
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
}, Pe = "_input_1nlce_1", Se = {
|
|
416
|
-
input: Pe
|
|
110
|
+
}, be = "_input_vvaje_1", ve = {
|
|
111
|
+
input: be
|
|
417
112
|
};
|
|
418
|
-
var
|
|
419
|
-
const
|
|
420
|
-
const [
|
|
113
|
+
var fe = /* @__PURE__ */ i("<input>");
|
|
114
|
+
const Je = (e) => {
|
|
115
|
+
const [t, n] = g(e, ["error", "class"]), r = B();
|
|
421
116
|
return (() => {
|
|
422
|
-
var
|
|
423
|
-
return
|
|
117
|
+
var s = fe();
|
|
118
|
+
return u(s, c(n, {
|
|
424
119
|
get class() {
|
|
425
|
-
return _(
|
|
120
|
+
return _(ve.input, t.class);
|
|
426
121
|
},
|
|
427
122
|
get id() {
|
|
428
|
-
return
|
|
123
|
+
return r.fieldId;
|
|
429
124
|
},
|
|
430
125
|
get "aria-describedby"() {
|
|
431
|
-
return
|
|
126
|
+
return r.ariaDescribedBy();
|
|
432
127
|
},
|
|
433
128
|
get "aria-invalid"() {
|
|
434
|
-
return
|
|
129
|
+
return r.error() || !!t.error;
|
|
435
130
|
},
|
|
436
131
|
get "aria-errormessage"() {
|
|
437
|
-
return
|
|
132
|
+
return r.ariaErrorMessage();
|
|
438
133
|
}
|
|
439
|
-
}), !1, !1),
|
|
134
|
+
}), !1, !1), s;
|
|
440
135
|
})();
|
|
441
|
-
},
|
|
136
|
+
}, $e = {
|
|
442
137
|
setDialogRef() {
|
|
443
138
|
},
|
|
444
|
-
ariaLabelledBy:
|
|
445
|
-
ariaDescribedBy:
|
|
446
|
-
setTitleId:
|
|
447
|
-
setDescriptionId:
|
|
448
|
-
openDialog:
|
|
449
|
-
closeDialog:
|
|
450
|
-
onOpenChange:
|
|
451
|
-
onBeforeClose:
|
|
452
|
-
},
|
|
453
|
-
let
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
}, [
|
|
457
|
-
|
|
458
|
-
e == null || e.showModal(), (f = n.onOpenChange) == null || f.call(n, !0);
|
|
139
|
+
ariaLabelledBy: h(void 0),
|
|
140
|
+
ariaDescribedBy: h(void 0),
|
|
141
|
+
setTitleId: F(),
|
|
142
|
+
setDescriptionId: F(),
|
|
143
|
+
openDialog: m,
|
|
144
|
+
closeDialog: m,
|
|
145
|
+
onOpenChange: m,
|
|
146
|
+
onBeforeClose: m
|
|
147
|
+
}, H = S($e), y = () => w(H), me = (e) => {
|
|
148
|
+
let t;
|
|
149
|
+
const n = (C) => {
|
|
150
|
+
t = C;
|
|
151
|
+
}, [r, s] = P(), [l, b] = P(), f = k(() => e.isOpen), o = () => {
|
|
152
|
+
t?.showModal(), e.onOpenChange?.(!0);
|
|
459
153
|
}, a = () => {
|
|
460
|
-
|
|
154
|
+
t?.requestClose();
|
|
461
155
|
};
|
|
462
|
-
return
|
|
463
|
-
|
|
464
|
-
}),
|
|
156
|
+
return L(() => {
|
|
157
|
+
f() ? o() : a();
|
|
158
|
+
}), x(H.Provider, {
|
|
465
159
|
get value() {
|
|
466
160
|
return {
|
|
467
|
-
ariaLabelledBy:
|
|
161
|
+
ariaLabelledBy: r,
|
|
468
162
|
ariaDescribedBy: l,
|
|
469
|
-
setDialogRef:
|
|
470
|
-
setTitleId:
|
|
471
|
-
setDescriptionId:
|
|
472
|
-
openDialog:
|
|
163
|
+
setDialogRef: n,
|
|
164
|
+
setTitleId: s,
|
|
165
|
+
setDescriptionId: b,
|
|
166
|
+
openDialog: o,
|
|
473
167
|
closeDialog: a,
|
|
474
|
-
onOpenChange:
|
|
475
|
-
onBeforeClose:
|
|
168
|
+
onOpenChange: e.onOpenChange,
|
|
169
|
+
onBeforeClose: e.onBeforeClose
|
|
476
170
|
};
|
|
477
171
|
},
|
|
478
172
|
get children() {
|
|
479
|
-
return
|
|
173
|
+
return e.children;
|
|
480
174
|
}
|
|
481
175
|
});
|
|
482
|
-
},
|
|
483
|
-
dialog:
|
|
484
|
-
title:
|
|
485
|
-
description:
|
|
486
|
-
actions:
|
|
176
|
+
}, he = "_dialog_1klsa_1", xe = "_title_1klsa_16", pe = "_description_1klsa_26", ye = "_actions_1klsa_37", I = {
|
|
177
|
+
dialog: he,
|
|
178
|
+
title: xe,
|
|
179
|
+
description: pe,
|
|
180
|
+
actions: ye
|
|
487
181
|
};
|
|
488
|
-
var
|
|
489
|
-
const
|
|
182
|
+
var Ce = /* @__PURE__ */ i("<dialog>"), De = /* @__PURE__ */ i("<h2>"), ke = /* @__PURE__ */ i("<p>"), je = /* @__PURE__ */ i("<div>");
|
|
183
|
+
const v = (e) => x(me, c(e, {
|
|
490
184
|
get children() {
|
|
491
|
-
return
|
|
185
|
+
return e.children;
|
|
492
186
|
}
|
|
493
|
-
})),
|
|
494
|
-
const
|
|
495
|
-
return
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
}),
|
|
499
|
-
},
|
|
500
|
-
const
|
|
187
|
+
})), Be = (e) => {
|
|
188
|
+
const t = y(), n = A(() => e.children);
|
|
189
|
+
return L(() => {
|
|
190
|
+
const r = n();
|
|
191
|
+
r instanceof HTMLElement && (r.onclick = t.openDialog);
|
|
192
|
+
}), E(n);
|
|
193
|
+
}, Ie = (e) => {
|
|
194
|
+
const t = y();
|
|
501
195
|
return (() => {
|
|
502
|
-
var
|
|
503
|
-
return
|
|
504
|
-
|
|
505
|
-
},
|
|
196
|
+
var n = Ce();
|
|
197
|
+
return U((r) => {
|
|
198
|
+
e.ref = r, t.setDialogRef(r);
|
|
199
|
+
}, n), u(n, c(e, {
|
|
506
200
|
get class() {
|
|
507
|
-
return _(
|
|
201
|
+
return _(I.dialog, e.class);
|
|
508
202
|
},
|
|
509
203
|
get "aria-labelledby"() {
|
|
510
|
-
return
|
|
204
|
+
return t.ariaLabelledBy();
|
|
511
205
|
},
|
|
512
206
|
get "aria-describedby"() {
|
|
513
|
-
return
|
|
514
|
-
},
|
|
515
|
-
onClose: () => {
|
|
516
|
-
var s;
|
|
517
|
-
return (s = e.onOpenChange) == null ? void 0 : s.call(e, !1);
|
|
207
|
+
return t.ariaDescribedBy();
|
|
518
208
|
},
|
|
209
|
+
onClose: () => t.onOpenChange?.(!1),
|
|
519
210
|
get onCancel() {
|
|
520
|
-
return
|
|
211
|
+
return t.onBeforeClose;
|
|
521
212
|
}
|
|
522
|
-
}), !1, !0),
|
|
213
|
+
}), !1, !0), d(n, () => e.children), n;
|
|
523
214
|
})();
|
|
524
|
-
},
|
|
525
|
-
const
|
|
526
|
-
return
|
|
527
|
-
var
|
|
528
|
-
return
|
|
529
|
-
id:
|
|
215
|
+
}, Me = (e) => {
|
|
216
|
+
const t = y(), n = p();
|
|
217
|
+
return t.setTitleId(n), (() => {
|
|
218
|
+
var r = De();
|
|
219
|
+
return u(r, c(e, {
|
|
220
|
+
id: n,
|
|
530
221
|
get class() {
|
|
531
|
-
return _(
|
|
222
|
+
return _(I.title, e.class);
|
|
532
223
|
}
|
|
533
|
-
}), !1, !0),
|
|
224
|
+
}), !1, !0), d(r, () => e.children), r;
|
|
534
225
|
})();
|
|
535
|
-
},
|
|
536
|
-
const
|
|
537
|
-
return
|
|
538
|
-
var
|
|
539
|
-
return
|
|
540
|
-
id:
|
|
226
|
+
}, Te = (e) => {
|
|
227
|
+
const t = y(), n = p();
|
|
228
|
+
return t.setDescriptionId(n), (() => {
|
|
229
|
+
var r = ke();
|
|
230
|
+
return u(r, c(e, {
|
|
231
|
+
id: n,
|
|
541
232
|
get class() {
|
|
542
|
-
return _(
|
|
233
|
+
return _(I.description, e.class);
|
|
543
234
|
}
|
|
544
|
-
}), !1, !0),
|
|
235
|
+
}), !1, !0), d(r, () => e.children), r;
|
|
545
236
|
})();
|
|
546
|
-
},
|
|
547
|
-
const
|
|
548
|
-
return
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
}),
|
|
552
|
-
},
|
|
553
|
-
var
|
|
554
|
-
return
|
|
237
|
+
}, Pe = (e) => {
|
|
238
|
+
const t = y(), n = A(() => e.children);
|
|
239
|
+
return L(() => {
|
|
240
|
+
const r = n();
|
|
241
|
+
r instanceof HTMLElement && (r.onclick = t.closeDialog);
|
|
242
|
+
}), E(n);
|
|
243
|
+
}, Ee = (e) => (() => {
|
|
244
|
+
var t = je();
|
|
245
|
+
return u(t, c(e, {
|
|
555
246
|
get class() {
|
|
556
|
-
return _(
|
|
247
|
+
return _(I.actions, e.class);
|
|
557
248
|
}
|
|
558
|
-
}), !1, !0),
|
|
249
|
+
}), !1, !0), d(t, () => e.children), t;
|
|
559
250
|
})();
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
field:
|
|
568
|
-
label:
|
|
569
|
-
message:
|
|
570
|
-
error:
|
|
251
|
+
v.Trigger = Be;
|
|
252
|
+
v.Content = Ie;
|
|
253
|
+
v.Title = Me;
|
|
254
|
+
v.Description = Te;
|
|
255
|
+
v.Close = Pe;
|
|
256
|
+
v.Actions = Ee;
|
|
257
|
+
const Le = "_field_1ijme_1", Oe = "_label_1ijme_7", qe = "_message_1ijme_19", Fe = "_error_1ijme_31", j = {
|
|
258
|
+
field: Le,
|
|
259
|
+
label: Oe,
|
|
260
|
+
message: qe,
|
|
261
|
+
error: Fe
|
|
571
262
|
};
|
|
572
|
-
var
|
|
573
|
-
const
|
|
574
|
-
const [
|
|
575
|
-
return
|
|
263
|
+
var Se = /* @__PURE__ */ i("<div>"), we = /* @__PURE__ */ i("<label>"), Ae = /* @__PURE__ */ i("<p>");
|
|
264
|
+
const V = (e) => {
|
|
265
|
+
const [t, n] = g(e, ["class", "error"]);
|
|
266
|
+
return x(ue, {
|
|
576
267
|
get error() {
|
|
577
|
-
return !!
|
|
268
|
+
return !!t.error;
|
|
578
269
|
},
|
|
579
270
|
get children() {
|
|
580
|
-
var
|
|
581
|
-
return
|
|
271
|
+
var r = Se();
|
|
272
|
+
return u(r, c(n, {
|
|
582
273
|
get class() {
|
|
583
|
-
return _(
|
|
274
|
+
return _(j.field, t.class);
|
|
584
275
|
}
|
|
585
|
-
}), !1, !0),
|
|
276
|
+
}), !1, !0), d(r, () => e.children), r;
|
|
586
277
|
}
|
|
587
278
|
});
|
|
588
|
-
},
|
|
589
|
-
const [
|
|
279
|
+
}, Re = (e) => {
|
|
280
|
+
const [t, n] = g(e, ["class"]), r = B();
|
|
590
281
|
return (() => {
|
|
591
|
-
var
|
|
592
|
-
return
|
|
282
|
+
var s = we();
|
|
283
|
+
return u(s, c(n, {
|
|
593
284
|
get for() {
|
|
594
|
-
return
|
|
285
|
+
return r.fieldId;
|
|
595
286
|
},
|
|
596
287
|
get class() {
|
|
597
|
-
return _(
|
|
288
|
+
return _(j.label, t.class);
|
|
598
289
|
}
|
|
599
|
-
}), !1, !0),
|
|
290
|
+
}), !1, !0), d(s, () => n.children), s;
|
|
600
291
|
})();
|
|
601
|
-
},
|
|
602
|
-
const [
|
|
603
|
-
return
|
|
604
|
-
level:
|
|
605
|
-
id:
|
|
606
|
-
}),
|
|
292
|
+
}, He = (e) => {
|
|
293
|
+
const [t, n] = g(e, ["class", "level"]), r = B(), s = p();
|
|
294
|
+
return r.setMessage({
|
|
295
|
+
level: t.level || "info",
|
|
296
|
+
id: s
|
|
297
|
+
}), x(G, {
|
|
607
298
|
get when() {
|
|
608
|
-
return
|
|
299
|
+
return n.children;
|
|
609
300
|
},
|
|
610
301
|
get children() {
|
|
611
|
-
var l =
|
|
612
|
-
return
|
|
613
|
-
id:
|
|
302
|
+
var l = Ae();
|
|
303
|
+
return u(l, c(n, {
|
|
304
|
+
id: s,
|
|
614
305
|
get class() {
|
|
615
|
-
return _(
|
|
306
|
+
return _(j.message, t.class, t.level === "error" && j.error);
|
|
616
307
|
}
|
|
617
|
-
}), !1, !0),
|
|
308
|
+
}), !1, !0), d(l, () => n.children), l;
|
|
618
309
|
}
|
|
619
310
|
});
|
|
620
311
|
};
|
|
621
|
-
|
|
622
|
-
|
|
312
|
+
V.Label = Re;
|
|
313
|
+
V.Message = He;
|
|
623
314
|
export {
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
315
|
+
Ue as Button,
|
|
316
|
+
Ge as Checkbox,
|
|
317
|
+
v as Dialog,
|
|
318
|
+
V as Field,
|
|
319
|
+
ze as Link,
|
|
320
|
+
Je as TextInput,
|
|
321
|
+
T as buttonSx,
|
|
322
|
+
_ as cls
|
|
629
323
|
};
|
|
324
|
+
//# sourceMappingURL=main.js.map
|