solid-uix 0.1.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 +7 -0
- package/dist/button/button.d.ts +2 -0
- package/dist/button/button.types.d.ts +2 -0
- package/dist/main.css +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +335 -0
- package/dist/main.umd.cjs +1 -0
- package/package.json +54 -0
package/README.md
ADDED
package/dist/main.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._button_14ajs_1{height:48px;box-sizing:border-box;border:none;width:100%;background:#ec5990;border-radius:6px;padding:0 10px;transition:all .3s;margin-top:1rem;font-family:Inter;font-weight:500;font-size:16px;line-height:22px;letter-spacing:0%;text-align:center;color:#fff}._button_14ajs_1:focus{outline:1px solid white}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from './button/button';
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import { createRenderEffect as g, untrack as x, sharedConfig as y, mergeProps as P } from "solid-js";
|
|
2
|
+
const S = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], O = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...S]), _ = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), j = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3
|
+
className: "class",
|
|
4
|
+
htmlFor: "for"
|
|
5
|
+
}), B = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6
|
+
class: "className",
|
|
7
|
+
novalidate: {
|
|
8
|
+
$: "noValidate",
|
|
9
|
+
FORM: 1
|
|
10
|
+
},
|
|
11
|
+
formnovalidate: {
|
|
12
|
+
$: "formNoValidate",
|
|
13
|
+
BUTTON: 1,
|
|
14
|
+
INPUT: 1
|
|
15
|
+
},
|
|
16
|
+
ismap: {
|
|
17
|
+
$: "isMap",
|
|
18
|
+
IMG: 1
|
|
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 M(i, e) {
|
|
35
|
+
const t = B[i];
|
|
36
|
+
return typeof t == "object" ? t[e] ? t.$ : void 0 : t;
|
|
37
|
+
}
|
|
38
|
+
const k = /* @__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"]);
|
|
39
|
+
function I(i, e, t) {
|
|
40
|
+
let l = t.length, o = e.length, s = l, f = 0, n = 0, c = e[o - 1].nextSibling, r = null;
|
|
41
|
+
for (; f < o || n < s; ) {
|
|
42
|
+
if (e[f] === t[n]) {
|
|
43
|
+
f++, n++;
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
for (; e[o - 1] === t[s - 1]; )
|
|
47
|
+
o--, s--;
|
|
48
|
+
if (o === f) {
|
|
49
|
+
const d = s < l ? n ? t[n - 1].nextSibling : t[s - n] : c;
|
|
50
|
+
for (; n < s; ) i.insertBefore(t[n++], d);
|
|
51
|
+
} else if (s === n)
|
|
52
|
+
for (; f < o; )
|
|
53
|
+
(!r || !r.has(e[f])) && e[f].remove(), f++;
|
|
54
|
+
else if (e[f] === t[s - 1] && t[n] === e[o - 1]) {
|
|
55
|
+
const d = e[--o].nextSibling;
|
|
56
|
+
i.insertBefore(t[n++], e[f++].nextSibling), i.insertBefore(t[--s], d), e[o] = t[s];
|
|
57
|
+
} else {
|
|
58
|
+
if (!r) {
|
|
59
|
+
r = /* @__PURE__ */ new Map();
|
|
60
|
+
let a = n;
|
|
61
|
+
for (; a < s; ) r.set(t[a], a++);
|
|
62
|
+
}
|
|
63
|
+
const d = r.get(e[f]);
|
|
64
|
+
if (d != null)
|
|
65
|
+
if (n < d && d < s) {
|
|
66
|
+
let a = f, u = 1, h;
|
|
67
|
+
for (; ++a < o && a < s && !((h = r.get(e[a])) == null || h !== d + u); )
|
|
68
|
+
u++;
|
|
69
|
+
if (u > d - n) {
|
|
70
|
+
const $ = e[f];
|
|
71
|
+
for (; n < d; ) i.insertBefore(t[n++], $);
|
|
72
|
+
} else i.replaceChild(t[n++], e[f++]);
|
|
73
|
+
} else f++;
|
|
74
|
+
else e[f++].remove();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const E = "_$DX_DELEGATE";
|
|
79
|
+
function V(i, e, t, l) {
|
|
80
|
+
let o;
|
|
81
|
+
const s = () => {
|
|
82
|
+
const n = document.createElement("template");
|
|
83
|
+
return n.innerHTML = i, n.content.firstChild;
|
|
84
|
+
}, f = () => (o || (o = s())).cloneNode(!0);
|
|
85
|
+
return f.cloneNode = f, f;
|
|
86
|
+
}
|
|
87
|
+
function D(i, e = window.document) {
|
|
88
|
+
const t = e[E] || (e[E] = /* @__PURE__ */ new Set());
|
|
89
|
+
for (let l = 0, o = i.length; l < o; l++) {
|
|
90
|
+
const s = i[l];
|
|
91
|
+
t.has(s) || (t.add(s), e.addEventListener(s, Q));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function w(i, e, t) {
|
|
95
|
+
m(i) || (t == null ? i.removeAttribute(e) : i.setAttribute(e, t));
|
|
96
|
+
}
|
|
97
|
+
function H(i, e, t) {
|
|
98
|
+
m(i) || (t ? i.setAttribute(e, "") : i.removeAttribute(e));
|
|
99
|
+
}
|
|
100
|
+
function U(i, e) {
|
|
101
|
+
m(i) || (e == null ? i.removeAttribute("class") : i.className = e);
|
|
102
|
+
}
|
|
103
|
+
function F(i, e, t, l) {
|
|
104
|
+
if (l)
|
|
105
|
+
Array.isArray(t) ? (i[`$$${e}`] = t[0], i[`$$${e}Data`] = t[1]) : i[`$$${e}`] = t;
|
|
106
|
+
else if (Array.isArray(t)) {
|
|
107
|
+
const o = t[0];
|
|
108
|
+
i.addEventListener(e, t[0] = (s) => o.call(i, t[1], s));
|
|
109
|
+
} else i.addEventListener(e, t, typeof t != "function" && t);
|
|
110
|
+
}
|
|
111
|
+
function G(i, e, t = {}) {
|
|
112
|
+
const l = Object.keys(e || {}), o = Object.keys(t);
|
|
113
|
+
let s, f;
|
|
114
|
+
for (s = 0, f = o.length; s < f; s++) {
|
|
115
|
+
const n = o[s];
|
|
116
|
+
!n || n === "undefined" || e[n] || (T(i, n, !1), delete t[n]);
|
|
117
|
+
}
|
|
118
|
+
for (s = 0, f = l.length; s < f; s++) {
|
|
119
|
+
const n = l[s], c = !!e[n];
|
|
120
|
+
!n || n === "undefined" || t[n] === c || !c || (T(i, n, !0), t[n] = c);
|
|
121
|
+
}
|
|
122
|
+
return t;
|
|
123
|
+
}
|
|
124
|
+
function K(i, e, t) {
|
|
125
|
+
if (!e) return t ? w(i, "style") : e;
|
|
126
|
+
const l = i.style;
|
|
127
|
+
if (typeof e == "string") return l.cssText = e;
|
|
128
|
+
typeof t == "string" && (l.cssText = t = void 0), t || (t = {}), e || (e = {});
|
|
129
|
+
let o, s;
|
|
130
|
+
for (s in t)
|
|
131
|
+
e[s] == null && l.removeProperty(s), delete t[s];
|
|
132
|
+
for (s in e)
|
|
133
|
+
o = e[s], o !== t[s] && (l.setProperty(s, o), t[s] = o);
|
|
134
|
+
return t;
|
|
135
|
+
}
|
|
136
|
+
function R(i, e = {}, t, l) {
|
|
137
|
+
const o = {};
|
|
138
|
+
return g(() => typeof e.ref == "function" && q(e.ref, i)), g(() => Y(i, e, t, !0, o, !0)), o;
|
|
139
|
+
}
|
|
140
|
+
function q(i, e, t) {
|
|
141
|
+
return x(() => i(e, t));
|
|
142
|
+
}
|
|
143
|
+
function X(i, e, t, l) {
|
|
144
|
+
if (typeof e != "function") return b(i, e, l, t);
|
|
145
|
+
g((o) => b(i, e(), o, t), l);
|
|
146
|
+
}
|
|
147
|
+
function Y(i, e, t, l, o = {}, s = !1) {
|
|
148
|
+
e || (e = {});
|
|
149
|
+
for (const f in o)
|
|
150
|
+
if (!(f in e)) {
|
|
151
|
+
if (f === "children") continue;
|
|
152
|
+
o[f] = N(i, f, null, o[f], t, s, e);
|
|
153
|
+
}
|
|
154
|
+
for (const f in e) {
|
|
155
|
+
if (f === "children")
|
|
156
|
+
continue;
|
|
157
|
+
const n = e[f];
|
|
158
|
+
o[f] = N(i, f, n, o[f], t, s, e);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function m(i) {
|
|
162
|
+
return !!y.context && !y.done && (!i || i.isConnected);
|
|
163
|
+
}
|
|
164
|
+
function J(i) {
|
|
165
|
+
return i.toLowerCase().replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
166
|
+
}
|
|
167
|
+
function T(i, e, t) {
|
|
168
|
+
const l = e.trim().split(/\s+/);
|
|
169
|
+
for (let o = 0, s = l.length; o < s; o++) i.classList.toggle(l[o], t);
|
|
170
|
+
}
|
|
171
|
+
function N(i, e, t, l, o, s, f) {
|
|
172
|
+
let n, c, r, d, a;
|
|
173
|
+
if (e === "style") return K(i, t, l);
|
|
174
|
+
if (e === "classList") return G(i, t, l);
|
|
175
|
+
if (t === l) return l;
|
|
176
|
+
if (e === "ref")
|
|
177
|
+
s || t(i);
|
|
178
|
+
else if (e.slice(0, 3) === "on:") {
|
|
179
|
+
const u = e.slice(3);
|
|
180
|
+
l && i.removeEventListener(u, l, typeof l != "function" && l), t && i.addEventListener(u, t, typeof t != "function" && t);
|
|
181
|
+
} else if (e.slice(0, 10) === "oncapture:") {
|
|
182
|
+
const u = e.slice(10);
|
|
183
|
+
l && i.removeEventListener(u, l, !0), t && i.addEventListener(u, t, !0);
|
|
184
|
+
} else if (e.slice(0, 2) === "on") {
|
|
185
|
+
const u = e.slice(2).toLowerCase(), h = k.has(u);
|
|
186
|
+
if (!h && l) {
|
|
187
|
+
const $ = Array.isArray(l) ? l[0] : l;
|
|
188
|
+
i.removeEventListener(u, $);
|
|
189
|
+
}
|
|
190
|
+
(h || t) && (F(i, u, t, h), h && D([u]));
|
|
191
|
+
} else if (e.slice(0, 5) === "attr:")
|
|
192
|
+
w(i, e.slice(5), t);
|
|
193
|
+
else if (e.slice(0, 5) === "bool:")
|
|
194
|
+
H(i, e.slice(5), t);
|
|
195
|
+
else if ((a = e.slice(0, 5) === "prop:") || (r = _.has(e)) || (d = M(e, i.tagName)) || (c = O.has(e)) || (n = i.nodeName.includes("-") || "is" in f)) {
|
|
196
|
+
if (a)
|
|
197
|
+
e = e.slice(5), c = !0;
|
|
198
|
+
else if (m(i)) return t;
|
|
199
|
+
e === "class" || e === "className" ? U(i, t) : n && !c && !r ? i[J(e)] = t : i[d || e] = t;
|
|
200
|
+
} else
|
|
201
|
+
w(i, j[e] || e, t);
|
|
202
|
+
return t;
|
|
203
|
+
}
|
|
204
|
+
function Q(i) {
|
|
205
|
+
if (y.registry && y.events && y.events.find(([c, r]) => r === i))
|
|
206
|
+
return;
|
|
207
|
+
let e = i.target;
|
|
208
|
+
const t = `$$${i.type}`, l = i.target, o = i.currentTarget, s = (c) => Object.defineProperty(i, "target", {
|
|
209
|
+
configurable: !0,
|
|
210
|
+
value: c
|
|
211
|
+
}), f = () => {
|
|
212
|
+
const c = e[t];
|
|
213
|
+
if (c && !e.disabled) {
|
|
214
|
+
const r = e[`${t}Data`];
|
|
215
|
+
if (r !== void 0 ? c.call(e, r, i) : c.call(e, i), i.cancelBubble) return;
|
|
216
|
+
}
|
|
217
|
+
return e.host && typeof e.host != "string" && !e.host._$host && e.contains(i.target) && s(e.host), !0;
|
|
218
|
+
}, n = () => {
|
|
219
|
+
for (; f() && (e = e._$host || e.parentNode || e.host); ) ;
|
|
220
|
+
};
|
|
221
|
+
if (Object.defineProperty(i, "currentTarget", {
|
|
222
|
+
configurable: !0,
|
|
223
|
+
get() {
|
|
224
|
+
return e || document;
|
|
225
|
+
}
|
|
226
|
+
}), y.registry && !y.done && (y.done = _$HY.done = !0), i.composedPath) {
|
|
227
|
+
const c = i.composedPath();
|
|
228
|
+
s(c[0]);
|
|
229
|
+
for (let r = 0; r < c.length - 2 && (e = c[r], !!f()); r++) {
|
|
230
|
+
if (e._$host) {
|
|
231
|
+
e = e._$host, n();
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
if (e.parentNode === o)
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
} else n();
|
|
238
|
+
s(l);
|
|
239
|
+
}
|
|
240
|
+
function b(i, e, t, l, o) {
|
|
241
|
+
const s = m(i);
|
|
242
|
+
if (s) {
|
|
243
|
+
!t && (t = [...i.childNodes]);
|
|
244
|
+
let n = [];
|
|
245
|
+
for (let c = 0; c < t.length; c++) {
|
|
246
|
+
const r = t[c];
|
|
247
|
+
r.nodeType === 8 && r.data.slice(0, 2) === "!$" ? r.remove() : n.push(r);
|
|
248
|
+
}
|
|
249
|
+
t = n;
|
|
250
|
+
}
|
|
251
|
+
for (; typeof t == "function"; ) t = t();
|
|
252
|
+
if (e === t) return t;
|
|
253
|
+
const f = typeof e;
|
|
254
|
+
if (i = i, f === "string" || f === "number") {
|
|
255
|
+
if (s || f === "number" && (e = e.toString(), e === t))
|
|
256
|
+
return t;
|
|
257
|
+
t !== "" && typeof t == "string" ? t = i.firstChild.data = e : t = i.textContent = e;
|
|
258
|
+
} else if (e == null || f === "boolean") {
|
|
259
|
+
if (s) return t;
|
|
260
|
+
t = A(i, t, l);
|
|
261
|
+
} else {
|
|
262
|
+
if (f === "function")
|
|
263
|
+
return g(() => {
|
|
264
|
+
let n = e();
|
|
265
|
+
for (; typeof n == "function"; ) n = n();
|
|
266
|
+
t = b(i, n, t, l);
|
|
267
|
+
}), () => t;
|
|
268
|
+
if (Array.isArray(e)) {
|
|
269
|
+
const n = [], c = t && Array.isArray(t);
|
|
270
|
+
if (C(n, e, t, o))
|
|
271
|
+
return g(() => t = b(i, n, t, l, !0)), () => t;
|
|
272
|
+
if (s)
|
|
273
|
+
return n.length ? t = [...i.childNodes] : t;
|
|
274
|
+
n.length === 0 ? t = A(i, t, l) : c ? t.length === 0 ? L(i, n, l) : I(i, t, n) : (t && A(i), L(i, n)), t = n;
|
|
275
|
+
} else if (e.nodeType) {
|
|
276
|
+
if (s && e.parentNode) return t = e;
|
|
277
|
+
Array.isArray(t) ? A(i, t, null, e) : t == null || t === "" || !i.firstChild ? i.appendChild(e) : i.replaceChild(e, i.firstChild), t = e;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return t;
|
|
281
|
+
}
|
|
282
|
+
function C(i, e, t, l) {
|
|
283
|
+
let o = !1;
|
|
284
|
+
for (let s = 0, f = e.length; s < f; s++) {
|
|
285
|
+
let n = e[s], c = t && t[i.length], r;
|
|
286
|
+
if (!(n == null || n === !0 || n === !1)) if ((r = typeof n) == "object" && n.nodeType)
|
|
287
|
+
i.push(n);
|
|
288
|
+
else if (Array.isArray(n))
|
|
289
|
+
o = C(i, n, c) || o;
|
|
290
|
+
else if (r === "function")
|
|
291
|
+
if (l) {
|
|
292
|
+
for (; typeof n == "function"; ) n = n();
|
|
293
|
+
o = C(i, Array.isArray(n) ? n : [n], Array.isArray(c) ? c : [c]) || o;
|
|
294
|
+
} else
|
|
295
|
+
i.push(n), o = !0;
|
|
296
|
+
else {
|
|
297
|
+
const d = String(n);
|
|
298
|
+
c && c.nodeType === 3 && c.data === d ? i.push(c) : i.push(document.createTextNode(d));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return o;
|
|
302
|
+
}
|
|
303
|
+
function L(i, e, t = null) {
|
|
304
|
+
for (let l = 0, o = e.length; l < o; l++) i.insertBefore(e[l], t);
|
|
305
|
+
}
|
|
306
|
+
function A(i, e, t, l) {
|
|
307
|
+
if (t === void 0) return i.textContent = "";
|
|
308
|
+
const o = l || document.createTextNode("");
|
|
309
|
+
if (e.length) {
|
|
310
|
+
let s = !1;
|
|
311
|
+
for (let f = e.length - 1; f >= 0; f--) {
|
|
312
|
+
const n = e[f];
|
|
313
|
+
if (o !== n) {
|
|
314
|
+
const c = n.parentNode === i;
|
|
315
|
+
!s && !f ? c ? i.replaceChild(o, n) : i.insertBefore(o, t) : c && n.remove();
|
|
316
|
+
} else s = !0;
|
|
317
|
+
}
|
|
318
|
+
} else i.insertBefore(o, t);
|
|
319
|
+
return [o];
|
|
320
|
+
}
|
|
321
|
+
const W = "_button_14ajs_1", Z = {
|
|
322
|
+
button: W
|
|
323
|
+
};
|
|
324
|
+
var z = /* @__PURE__ */ V("<button type=button>");
|
|
325
|
+
const v = (i) => (() => {
|
|
326
|
+
var e = z();
|
|
327
|
+
return R(e, P(i, {
|
|
328
|
+
get class() {
|
|
329
|
+
return Z.button;
|
|
330
|
+
}
|
|
331
|
+
}), !1), X(e, () => i.children), e;
|
|
332
|
+
})();
|
|
333
|
+
export {
|
|
334
|
+
v as Button
|
|
335
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(y,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("solid-js")):typeof define=="function"&&define.amd?define(["exports","solid-js"],d):(y=typeof globalThis<"u"?globalThis:y||self,d(y["solid-uix"]={},y.solid))})(this,function(y,d){"use strict";const L=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],P=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline",...L]),S=new Set(["innerHTML","textContent","innerText","children"]),j=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),O=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function _(i,e){const t=O[i];return typeof t=="object"?t[e]?t.$:void 0:t}const B=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);function M(i,e,t){let f=t.length,o=e.length,s=f,l=0,n=0,c=e[o-1].nextSibling,r=null;for(;l<o||n<s;){if(e[l]===t[n]){l++,n++;continue}for(;e[o-1]===t[s-1];)o--,s--;if(o===l){const u=s<f?n?t[n-1].nextSibling:t[s-n]:c;for(;n<s;)i.insertBefore(t[n++],u)}else if(s===n)for(;l<o;)(!r||!r.has(e[l]))&&e[l].remove(),l++;else if(e[l]===t[s-1]&&t[n]===e[o-1]){const u=e[--o].nextSibling;i.insertBefore(t[n++],e[l++].nextSibling),i.insertBefore(t[--s],u),e[o]=t[s]}else{if(!r){r=new Map;let h=n;for(;h<s;)r.set(t[h],h++)}const u=r.get(e[l]);if(u!=null)if(n<u&&u<s){let h=l,a=1,g;for(;++h<o&&h<s&&!((g=r.get(e[h]))==null||g!==u+a);)a++;if(a>u-n){const E=e[l];for(;n<u;)i.insertBefore(t[n++],E)}else i.replaceChild(t[n++],e[l++])}else l++;else e[l++].remove()}}}const T="_$DX_DELEGATE";function k(i,e,t,f){let o;const s=()=>{const n=document.createElement("template");return n.innerHTML=i,n.content.firstChild},l=()=>(o||(o=s())).cloneNode(!0);return l.cloneNode=l,l}function I(i,e=window.document){const t=e[T]||(e[T]=new Set);for(let f=0,o=i.length;f<o;f++){const s=i[f];t.has(s)||(t.add(s),e.addEventListener(s,Y))}}function C(i,e,t){m(i)||(t==null?i.removeAttribute(e):i.setAttribute(e,t))}function V(i,e,t){m(i)||(t?i.setAttribute(e,""):i.removeAttribute(e))}function R(i,e){m(i)||(e==null?i.removeAttribute("class"):i.className=e)}function D(i,e,t,f){if(f)Array.isArray(t)?(i[`$$${e}`]=t[0],i[`$$${e}Data`]=t[1]):i[`$$${e}`]=t;else if(Array.isArray(t)){const o=t[0];i.addEventListener(e,t[0]=s=>o.call(i,t[1],s))}else i.addEventListener(e,t,typeof t!="function"&&t)}function H(i,e,t={}){const f=Object.keys(e||{}),o=Object.keys(t);let s,l;for(s=0,l=o.length;s<l;s++){const n=o[s];!n||n==="undefined"||e[n]||(w(i,n,!1),delete t[n])}for(s=0,l=f.length;s<l;s++){const n=f[s],c=!!e[n];!n||n==="undefined"||t[n]===c||!c||(w(i,n,!0),t[n]=c)}return t}function U(i,e,t){if(!e)return t?C(i,"style"):e;const f=i.style;if(typeof e=="string")return f.cssText=e;typeof t=="string"&&(f.cssText=t=void 0),t||(t={}),e||(e={});let o,s;for(s in t)e[s]==null&&f.removeProperty(s),delete t[s];for(s in e)o=e[s],o!==t[s]&&(f.setProperty(s,o),t[s]=o);return t}function q(i,e={},t,f){const o={};return d.createRenderEffect(()=>typeof e.ref=="function"&&F(e.ref,i)),d.createRenderEffect(()=>K(i,e,t,!0,o,!0)),o}function F(i,e,t){return d.untrack(()=>i(e,t))}function G(i,e,t,f){if(typeof e!="function")return b(i,e,f,t);d.createRenderEffect(o=>b(i,e(),o,t),f)}function K(i,e,t,f,o={},s=!1){e||(e={});for(const l in o)if(!(l in e)){if(l==="children")continue;o[l]=N(i,l,null,o[l],t,s,e)}for(const l in e){if(l==="children")continue;const n=e[l];o[l]=N(i,l,n,o[l],t,s,e)}}function m(i){return!!d.sharedConfig.context&&!d.sharedConfig.done&&(!i||i.isConnected)}function X(i){return i.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function w(i,e,t){const f=e.trim().split(/\s+/);for(let o=0,s=f.length;o<s;o++)i.classList.toggle(f[o],t)}function N(i,e,t,f,o,s,l){let n,c,r,u,h;if(e==="style")return U(i,t,f);if(e==="classList")return H(i,t,f);if(t===f)return f;if(e==="ref")s||t(i);else if(e.slice(0,3)==="on:"){const a=e.slice(3);f&&i.removeEventListener(a,f,typeof f!="function"&&f),t&&i.addEventListener(a,t,typeof t!="function"&&t)}else if(e.slice(0,10)==="oncapture:"){const a=e.slice(10);f&&i.removeEventListener(a,f,!0),t&&i.addEventListener(a,t,!0)}else if(e.slice(0,2)==="on"){const a=e.slice(2).toLowerCase(),g=B.has(a);if(!g&&f){const E=Array.isArray(f)?f[0]:f;i.removeEventListener(a,E)}(g||t)&&(D(i,a,t,g),g&&I([a]))}else if(e.slice(0,5)==="attr:")C(i,e.slice(5),t);else if(e.slice(0,5)==="bool:")V(i,e.slice(5),t);else if((h=e.slice(0,5)==="prop:")||(r=S.has(e))||(u=_(e,i.tagName))||(c=P.has(e))||(n=i.nodeName.includes("-")||"is"in l)){if(h)e=e.slice(5),c=!0;else if(m(i))return t;e==="class"||e==="className"?R(i,t):n&&!c&&!r?i[X(e)]=t:i[u||e]=t}else C(i,j[e]||e,t);return t}function Y(i){if(d.sharedConfig.registry&&d.sharedConfig.events&&d.sharedConfig.events.find(([c,r])=>r===i))return;let e=i.target;const t=`$$${i.type}`,f=i.target,o=i.currentTarget,s=c=>Object.defineProperty(i,"target",{configurable:!0,value:c}),l=()=>{const c=e[t];if(c&&!e.disabled){const r=e[`${t}Data`];if(r!==void 0?c.call(e,r,i):c.call(e,i),i.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(i.target)&&s(e.host),!0},n=()=>{for(;l()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(i,"currentTarget",{configurable:!0,get(){return e||document}}),d.sharedConfig.registry&&!d.sharedConfig.done&&(d.sharedConfig.done=_$HY.done=!0),i.composedPath){const c=i.composedPath();s(c[0]);for(let r=0;r<c.length-2&&(e=c[r],!!l());r++){if(e._$host){e=e._$host,n();break}if(e.parentNode===o)break}}else n();s(f)}function b(i,e,t,f,o){const s=m(i);if(s){!t&&(t=[...i.childNodes]);let n=[];for(let c=0;c<t.length;c++){const r=t[c];r.nodeType===8&&r.data.slice(0,2)==="!$"?r.remove():n.push(r)}t=n}for(;typeof t=="function";)t=t();if(e===t)return t;const l=typeof e;if(i=i,l==="string"||l==="number"){if(s||l==="number"&&(e=e.toString(),e===t))return t;t!==""&&typeof t=="string"?t=i.firstChild.data=e:t=i.textContent=e}else if(e==null||l==="boolean"){if(s)return t;t=A(i,t,f)}else{if(l==="function")return d.createRenderEffect(()=>{let n=e();for(;typeof n=="function";)n=n();t=b(i,n,t,f)}),()=>t;if(Array.isArray(e)){const n=[],c=t&&Array.isArray(t);if($(n,e,t,o))return d.createRenderEffect(()=>t=b(i,n,t,f,!0)),()=>t;if(s)return n.length?t=[...i.childNodes]:t;n.length===0?t=A(i,t,f):c?t.length===0?x(i,n,f):M(i,t,n):(t&&A(i),x(i,n)),t=n}else if(e.nodeType){if(s&&e.parentNode)return t=e;Array.isArray(t)?A(i,t,null,e):t==null||t===""||!i.firstChild?i.appendChild(e):i.replaceChild(e,i.firstChild),t=e}}return t}function $(i,e,t,f){let o=!1;for(let s=0,l=e.length;s<l;s++){let n=e[s],c=t&&t[i.length],r;if(!(n==null||n===!0||n===!1))if((r=typeof n)=="object"&&n.nodeType)i.push(n);else if(Array.isArray(n))o=$(i,n,c)||o;else if(r==="function")if(f){for(;typeof n=="function";)n=n();o=$(i,Array.isArray(n)?n:[n],Array.isArray(c)?c:[c])||o}else i.push(n),o=!0;else{const u=String(n);c&&c.nodeType===3&&c.data===u?i.push(c):i.push(document.createTextNode(u))}}return o}function x(i,e,t=null){for(let f=0,o=e.length;f<o;f++)i.insertBefore(e[f],t)}function A(i,e,t,f){if(t===void 0)return i.textContent="";const o=f||document.createTextNode("");if(e.length){let s=!1;for(let l=e.length-1;l>=0;l--){const n=e[l];if(o!==n){const c=n.parentNode===i;!s&&!l?c?i.replaceChild(o,n):i.insertBefore(o,t):c&&n.remove()}else s=!0}}else i.insertBefore(o,t);return[o]}const Q={button:"_button_14ajs_1"};var W=k("<button type=button>");const Z=i=>(()=>{var e=W();return q(e,d.mergeProps(i,{get class(){return Q.button}}),!1),G(e,()=>i.children),e})();y.Button=Z,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-uix",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/main.umd.cjs",
|
|
6
|
+
"module": "./dist/main.js",
|
|
7
|
+
"types": "./dist/main.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/main.js",
|
|
11
|
+
"require": "./dist/main.umd.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./dist/main.css": {
|
|
14
|
+
"import": "./dist/main.css",
|
|
15
|
+
"require": "./dist/main.css"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"solid-js": "^1.9.5"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@solidjs/testing-library": "^0.8.10",
|
|
27
|
+
"@testing-library/user-event": "^14.6.1",
|
|
28
|
+
"happy-dom": "^17.4.4",
|
|
29
|
+
"typescript": "~5.7.2",
|
|
30
|
+
"vite": "^6.0.11",
|
|
31
|
+
"vite-plugin-dts": "^4.5.0",
|
|
32
|
+
"vite-plugin-solid": "^2.11.6",
|
|
33
|
+
"vitest": "^3.1.1"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc && vite build",
|
|
37
|
+
"test": "vitest run"
|
|
38
|
+
},
|
|
39
|
+
"author": "thorn_pear",
|
|
40
|
+
"license": "ISC",
|
|
41
|
+
"description": "",
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/tatsmaki/solid-ui.git"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"solid",
|
|
48
|
+
"solid-component",
|
|
49
|
+
"solid-components",
|
|
50
|
+
"components",
|
|
51
|
+
"typescript",
|
|
52
|
+
"ui"
|
|
53
|
+
]
|
|
54
|
+
}
|