solid-uix 0.1.1 → 0.2.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/dist/button/button.stories.d.ts +26 -0
- package/dist/label/label.d.ts +2 -0
- package/dist/label/label.stories.d.ts +19 -0
- package/dist/label/label.types.d.ts +2 -0
- package/dist/main.css +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +76 -64
- package/dist/main.umd.cjs +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: (props: import('./button.types').ButtonProps) => import("solid-js").JSX.Element;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
args: {
|
|
10
|
+
children: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
onClick: import('storybook/test').Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const Primary: {
|
|
17
|
+
args: {
|
|
18
|
+
children: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const Disabled: {
|
|
22
|
+
args: {
|
|
23
|
+
children: string;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: (props: import('./label.types').LabelProps) => import("solid-js").JSX.Element;
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {};
|
|
9
|
+
args: {
|
|
10
|
+
children: string;
|
|
11
|
+
onClick: import('storybook/test').Mock<(...args: any[]) => any>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const Default: {
|
|
16
|
+
args: {
|
|
17
|
+
children: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
:root{--colors-black-100: #efeff4;--colors-black-100-transparent: #efeff410;--colors-black-150: #d9d9df;--colors-black-200: #c1c2cb;--colors-black-300: #acadb6;--colors-black-400: #9495a0;--colors-black-500: #777987;--colors-black-600: #61636d;--colors-black-700: #494a56;--colors-black-800: #22232a;--colors-black-850: #17181e;--colors-black-900: #0a0b11;--colors-accent-500: #ec5990;color:var(--colors-black-100);background-color:var(--colors-black-900);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}._button_knpbv_1{height:48px;box-sizing:border-box;border:none;width:100%;min-width:164px;background:var(--colors-accent-500);border-radius:6px;padding:0 10px;transition:background .3s;font-family:Inter;font-weight:500;font-size:16px;line-height:22px;letter-spacing:0%;text-align:center;color:var(--colors-black-100);cursor:pointer}._button_knpbv_1:disabled{background:var(--colors-black-700);pointer-events:none}._button_knpbv_1:focus-visible{outline:1px solid var(--colors-black-100)}._label_16ku5_1{margin-bottom:6px;font-family:Inter;font-weight:400;font-size:14px;line-height:18px;letter-spacing:0%;color:var(--colors-black-300)}
|
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createRenderEffect as g, untrack as
|
|
2
|
-
const
|
|
1
|
+
import { createRenderEffect as g, untrack as O, sharedConfig as y, mergeProps as x } from "solid-js";
|
|
2
|
+
const k = ["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"], B = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...k]), M = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), j = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3
3
|
className: "class",
|
|
4
4
|
htmlFor: "for"
|
|
5
|
-
}),
|
|
5
|
+
}), I = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6
6
|
class: "className",
|
|
7
7
|
novalidate: {
|
|
8
8
|
$: "noValidate",
|
|
@@ -31,12 +31,12 @@ const S = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "cont
|
|
|
31
31
|
TEXTAREA: 1
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
function
|
|
35
|
-
const t =
|
|
34
|
+
function V(i, e) {
|
|
35
|
+
const t = I[i];
|
|
36
36
|
return typeof t == "object" ? t[e] ? t.$ : void 0 : t;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
function
|
|
38
|
+
const D = /* @__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 H(i, e, t) {
|
|
40
40
|
let l = t.length, o = e.length, s = l, f = 0, n = 0, c = e[o - 1].nextSibling, r = null;
|
|
41
41
|
for (; f < o || n < s; ) {
|
|
42
42
|
if (e[f] === t[n]) {
|
|
@@ -46,29 +46,29 @@ function I(i, e, t) {
|
|
|
46
46
|
for (; e[o - 1] === t[s - 1]; )
|
|
47
47
|
o--, s--;
|
|
48
48
|
if (o === f) {
|
|
49
|
-
const
|
|
50
|
-
for (; n < s; ) i.insertBefore(t[n++],
|
|
49
|
+
const a = s < l ? n ? t[n - 1].nextSibling : t[s - n] : c;
|
|
50
|
+
for (; n < s; ) i.insertBefore(t[n++], a);
|
|
51
51
|
} else if (s === n)
|
|
52
52
|
for (; f < o; )
|
|
53
53
|
(!r || !r.has(e[f])) && e[f].remove(), f++;
|
|
54
54
|
else if (e[f] === t[s - 1] && t[n] === e[o - 1]) {
|
|
55
|
-
const
|
|
56
|
-
i.insertBefore(t[n++], e[f++].nextSibling), i.insertBefore(t[--s],
|
|
55
|
+
const a = e[--o].nextSibling;
|
|
56
|
+
i.insertBefore(t[n++], e[f++].nextSibling), i.insertBefore(t[--s], a), e[o] = t[s];
|
|
57
57
|
} else {
|
|
58
58
|
if (!r) {
|
|
59
59
|
r = /* @__PURE__ */ new Map();
|
|
60
|
-
let
|
|
61
|
-
for (;
|
|
60
|
+
let u = n;
|
|
61
|
+
for (; u < s; ) r.set(t[u], u++);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
65
|
-
if (n <
|
|
66
|
-
let
|
|
67
|
-
for (; ++
|
|
68
|
-
|
|
69
|
-
if (
|
|
63
|
+
const a = r.get(e[f]);
|
|
64
|
+
if (a != null)
|
|
65
|
+
if (n < a && a < s) {
|
|
66
|
+
let u = f, d = 1, h;
|
|
67
|
+
for (; ++u < o && u < s && !((h = r.get(e[u])) == null || h !== a + d); )
|
|
68
|
+
d++;
|
|
69
|
+
if (d > a - n) {
|
|
70
70
|
const $ = e[f];
|
|
71
|
-
for (; n <
|
|
71
|
+
for (; n < a; ) i.insertBefore(t[n++], $);
|
|
72
72
|
} else i.replaceChild(t[n++], e[f++]);
|
|
73
73
|
} else f++;
|
|
74
74
|
else e[f++].remove();
|
|
@@ -76,7 +76,7 @@ function I(i, e, t) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
const E = "_$DX_DELEGATE";
|
|
79
|
-
function
|
|
79
|
+
function _(i, e, t, l) {
|
|
80
80
|
let o;
|
|
81
81
|
const s = () => {
|
|
82
82
|
const n = document.createElement("template");
|
|
@@ -84,7 +84,7 @@ function V(i, e, t, l) {
|
|
|
84
84
|
}, f = () => (o || (o = s())).cloneNode(!0);
|
|
85
85
|
return f.cloneNode = f, f;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function U(i, e = window.document) {
|
|
88
88
|
const t = e[E] || (e[E] = /* @__PURE__ */ new Set());
|
|
89
89
|
for (let l = 0, o = i.length; l < o; l++) {
|
|
90
90
|
const s = i[l];
|
|
@@ -94,13 +94,13 @@ function D(i, e = window.document) {
|
|
|
94
94
|
function w(i, e, t) {
|
|
95
95
|
m(i) || (t == null ? i.removeAttribute(e) : i.setAttribute(e, t));
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function F(i, e, t) {
|
|
98
98
|
m(i) || (t ? i.setAttribute(e, "") : i.removeAttribute(e));
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function G(i, e) {
|
|
101
101
|
m(i) || (e == null ? i.removeAttribute("class") : i.className = e);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function K(i, e, t, l) {
|
|
104
104
|
if (l)
|
|
105
105
|
Array.isArray(t) ? (i[`$$${e}`] = t[0], i[`$$${e}Data`] = t[1]) : i[`$$${e}`] = t;
|
|
106
106
|
else if (Array.isArray(t)) {
|
|
@@ -108,7 +108,7 @@ function F(i, e, t, l) {
|
|
|
108
108
|
i.addEventListener(e, t[0] = (s) => o.call(i, t[1], s));
|
|
109
109
|
} else i.addEventListener(e, t, typeof t != "function" && t);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function R(i, e, t = {}) {
|
|
112
112
|
const l = Object.keys(e || {}), o = Object.keys(t);
|
|
113
113
|
let s, f;
|
|
114
114
|
for (s = 0, f = o.length; s < f; s++) {
|
|
@@ -121,7 +121,7 @@ function G(i, e, t = {}) {
|
|
|
121
121
|
}
|
|
122
122
|
return t;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function q(i, e, t) {
|
|
125
125
|
if (!e) return t ? w(i, "style") : e;
|
|
126
126
|
const l = i.style;
|
|
127
127
|
if (typeof e == "string") return l.cssText = e;
|
|
@@ -133,16 +133,16 @@ function K(i, e, t) {
|
|
|
133
133
|
o = e[s], o !== t[s] && (l.setProperty(s, o), t[s] = o);
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function P(i, e = {}, t, l) {
|
|
137
137
|
const o = {};
|
|
138
|
-
return g(() => typeof e.ref == "function" &&
|
|
138
|
+
return g(() => typeof e.ref == "function" && X(e.ref, i)), g(() => Y(i, e, t, !0, o, !0)), o;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
140
|
+
function X(i, e, t) {
|
|
141
|
+
return O(() => i(e, t));
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
if (typeof e != "function") return
|
|
145
|
-
g((o) =>
|
|
143
|
+
function S(i, e, t, l) {
|
|
144
|
+
if (typeof e != "function") return A(i, e, l, t);
|
|
145
|
+
g((o) => A(i, e(), o, t), l);
|
|
146
146
|
}
|
|
147
147
|
function Y(i, e, t, l, o = {}, s = !1) {
|
|
148
148
|
e || (e = {});
|
|
@@ -169,34 +169,34 @@ function T(i, e, t) {
|
|
|
169
169
|
for (let o = 0, s = l.length; o < s; o++) i.classList.toggle(l[o], t);
|
|
170
170
|
}
|
|
171
171
|
function N(i, e, t, l, o, s, f) {
|
|
172
|
-
let n, c, r,
|
|
173
|
-
if (e === "style") return
|
|
174
|
-
if (e === "classList") return
|
|
172
|
+
let n, c, r, a, u;
|
|
173
|
+
if (e === "style") return q(i, t, l);
|
|
174
|
+
if (e === "classList") return R(i, t, l);
|
|
175
175
|
if (t === l) return l;
|
|
176
176
|
if (e === "ref")
|
|
177
177
|
s || t(i);
|
|
178
178
|
else if (e.slice(0, 3) === "on:") {
|
|
179
|
-
const
|
|
180
|
-
l && i.removeEventListener(
|
|
179
|
+
const d = e.slice(3);
|
|
180
|
+
l && i.removeEventListener(d, l, typeof l != "function" && l), t && i.addEventListener(d, t, typeof t != "function" && t);
|
|
181
181
|
} else if (e.slice(0, 10) === "oncapture:") {
|
|
182
|
-
const
|
|
183
|
-
l && i.removeEventListener(
|
|
182
|
+
const d = e.slice(10);
|
|
183
|
+
l && i.removeEventListener(d, l, !0), t && i.addEventListener(d, t, !0);
|
|
184
184
|
} else if (e.slice(0, 2) === "on") {
|
|
185
|
-
const
|
|
185
|
+
const d = e.slice(2).toLowerCase(), h = D.has(d);
|
|
186
186
|
if (!h && l) {
|
|
187
187
|
const $ = Array.isArray(l) ? l[0] : l;
|
|
188
|
-
i.removeEventListener(
|
|
188
|
+
i.removeEventListener(d, $);
|
|
189
189
|
}
|
|
190
|
-
(h || t) && (
|
|
190
|
+
(h || t) && (K(i, d, t, h), h && U([d]));
|
|
191
191
|
} else if (e.slice(0, 5) === "attr:")
|
|
192
192
|
w(i, e.slice(5), t);
|
|
193
193
|
else if (e.slice(0, 5) === "bool:")
|
|
194
|
-
|
|
195
|
-
else if ((
|
|
196
|
-
if (
|
|
194
|
+
F(i, e.slice(5), t);
|
|
195
|
+
else if ((u = e.slice(0, 5) === "prop:") || (r = M.has(e)) || (a = V(e, i.tagName)) || (c = B.has(e)) || (n = i.nodeName.includes("-") || "is" in f)) {
|
|
196
|
+
if (u)
|
|
197
197
|
e = e.slice(5), c = !0;
|
|
198
198
|
else if (m(i)) return t;
|
|
199
|
-
e === "class" || e === "className" ?
|
|
199
|
+
e === "class" || e === "className" ? G(i, t) : n && !c && !r ? i[J(e)] = t : i[a || e] = t;
|
|
200
200
|
} else
|
|
201
201
|
w(i, j[e] || e, t);
|
|
202
202
|
return t;
|
|
@@ -237,7 +237,7 @@ function Q(i) {
|
|
|
237
237
|
} else n();
|
|
238
238
|
s(l);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function A(i, e, t, l, o) {
|
|
241
241
|
const s = m(i);
|
|
242
242
|
if (s) {
|
|
243
243
|
!t && (t = [...i.childNodes]);
|
|
@@ -257,24 +257,24 @@ function b(i, e, t, l, o) {
|
|
|
257
257
|
t !== "" && typeof t == "string" ? t = i.firstChild.data = e : t = i.textContent = e;
|
|
258
258
|
} else if (e == null || f === "boolean") {
|
|
259
259
|
if (s) return t;
|
|
260
|
-
t =
|
|
260
|
+
t = b(i, t, l);
|
|
261
261
|
} else {
|
|
262
262
|
if (f === "function")
|
|
263
263
|
return g(() => {
|
|
264
264
|
let n = e();
|
|
265
265
|
for (; typeof n == "function"; ) n = n();
|
|
266
|
-
t =
|
|
266
|
+
t = A(i, n, t, l);
|
|
267
267
|
}), () => t;
|
|
268
268
|
if (Array.isArray(e)) {
|
|
269
269
|
const n = [], c = t && Array.isArray(t);
|
|
270
270
|
if (C(n, e, t, o))
|
|
271
|
-
return g(() => t =
|
|
271
|
+
return g(() => t = A(i, n, t, l, !0)), () => t;
|
|
272
272
|
if (s)
|
|
273
273
|
return n.length ? t = [...i.childNodes] : t;
|
|
274
|
-
n.length === 0 ? t =
|
|
274
|
+
n.length === 0 ? t = b(i, t, l) : c ? t.length === 0 ? L(i, n, l) : H(i, t, n) : (t && b(i), L(i, n)), t = n;
|
|
275
275
|
} else if (e.nodeType) {
|
|
276
276
|
if (s && e.parentNode) return t = e;
|
|
277
|
-
Array.isArray(t) ?
|
|
277
|
+
Array.isArray(t) ? b(i, t, null, e) : t == null || t === "" || !i.firstChild ? i.appendChild(e) : i.replaceChild(e, i.firstChild), t = e;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
return t;
|
|
@@ -294,8 +294,8 @@ function C(i, e, t, l) {
|
|
|
294
294
|
} else
|
|
295
295
|
i.push(n), o = !0;
|
|
296
296
|
else {
|
|
297
|
-
const
|
|
298
|
-
c && c.nodeType === 3 && c.data ===
|
|
297
|
+
const a = String(n);
|
|
298
|
+
c && c.nodeType === 3 && c.data === a ? i.push(c) : i.push(document.createTextNode(a));
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
return o;
|
|
@@ -303,7 +303,7 @@ function C(i, e, t, l) {
|
|
|
303
303
|
function L(i, e, t = null) {
|
|
304
304
|
for (let l = 0, o = e.length; l < o; l++) i.insertBefore(e[l], t);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function b(i, e, t, l) {
|
|
307
307
|
if (t === void 0) return i.textContent = "";
|
|
308
308
|
const o = l || document.createTextNode("");
|
|
309
309
|
if (e.length) {
|
|
@@ -318,18 +318,30 @@ function A(i, e, t, l) {
|
|
|
318
318
|
} else i.insertBefore(o, t);
|
|
319
319
|
return [o];
|
|
320
320
|
}
|
|
321
|
-
const W = "
|
|
321
|
+
const W = "_button_knpbv_1", Z = {
|
|
322
322
|
button: W
|
|
323
323
|
};
|
|
324
|
-
var z = /* @__PURE__ */
|
|
325
|
-
const
|
|
324
|
+
var z = /* @__PURE__ */ _("<button type=button>");
|
|
325
|
+
const ie = (i) => (() => {
|
|
326
326
|
var e = z();
|
|
327
|
-
return
|
|
327
|
+
return P(e, x(i, {
|
|
328
328
|
get class() {
|
|
329
329
|
return Z.button;
|
|
330
330
|
}
|
|
331
|
-
}), !1),
|
|
331
|
+
}), !1), S(e, () => i.children), e;
|
|
332
|
+
})(), p = "_label_16ku5_1", v = {
|
|
333
|
+
label: p
|
|
334
|
+
};
|
|
335
|
+
var ee = /* @__PURE__ */ _("<label>");
|
|
336
|
+
const ne = (i) => (() => {
|
|
337
|
+
var e = ee();
|
|
338
|
+
return P(e, x({
|
|
339
|
+
get class() {
|
|
340
|
+
return v.label;
|
|
341
|
+
}
|
|
342
|
+
}, i), !1), S(e, () => i.children), e;
|
|
332
343
|
})();
|
|
333
344
|
export {
|
|
334
|
-
|
|
345
|
+
ie as Button,
|
|
346
|
+
ne as Label
|
|
335
347
|
};
|
package/dist/main.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(y,
|
|
1
|
+
(function(y,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("solid-js")):typeof define=="function"&&define.amd?define(["exports","solid-js"],a):(y=typeof globalThis<"u"?globalThis:y||self,a(y["solid-uix"]={},y.solid))})(this,function(y,a){"use strict";const _=["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"],j=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline",..._]),O=new Set(["innerHTML","textContent","innerText","children"]),k=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),B=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 M(n,e){const t=B[n];return typeof t=="object"?t[e]?t.$:void 0:t}const I=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 V(n,e,t){let l=t.length,o=e.length,s=l,f=0,i=0,c=e[o-1].nextSibling,r=null;for(;f<o||i<s;){if(e[f]===t[i]){f++,i++;continue}for(;e[o-1]===t[s-1];)o--,s--;if(o===f){const u=s<l?i?t[i-1].nextSibling:t[s-i]:c;for(;i<s;)n.insertBefore(t[i++],u)}else if(s===i)for(;f<o;)(!r||!r.has(e[f]))&&e[f].remove(),f++;else if(e[f]===t[s-1]&&t[i]===e[o-1]){const u=e[--o].nextSibling;n.insertBefore(t[i++],e[f++].nextSibling),n.insertBefore(t[--s],u),e[o]=t[s]}else{if(!r){r=new Map;let h=i;for(;h<s;)r.set(t[h],h++)}const u=r.get(e[f]);if(u!=null)if(i<u&&u<s){let h=f,d=1,g;for(;++h<o&&h<s&&!((g=r.get(e[h]))==null||g!==u+d);)d++;if(d>u-i){const E=e[f];for(;i<u;)n.insertBefore(t[i++],E)}else n.replaceChild(t[i++],e[f++])}else f++;else e[f++].remove()}}}const T="_$DX_DELEGATE";function w(n,e,t,l){let o;const s=()=>{const i=document.createElement("template");return i.innerHTML=n,i.content.firstChild},f=()=>(o||(o=s())).cloneNode(!0);return f.cloneNode=f,f}function R(n,e=window.document){const t=e[T]||(e[T]=new Set);for(let l=0,o=n.length;l<o;l++){const s=n[l];t.has(s)||(t.add(s),e.addEventListener(s,Y))}}function $(n,e,t){m(n)||(t==null?n.removeAttribute(e):n.setAttribute(e,t))}function D(n,e,t){m(n)||(t?n.setAttribute(e,""):n.removeAttribute(e))}function H(n,e){m(n)||(e==null?n.removeAttribute("class"):n.className=e)}function U(n,e,t,l){if(l)Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t;else if(Array.isArray(t)){const o=t[0];n.addEventListener(e,t[0]=s=>o.call(n,t[1],s))}else n.addEventListener(e,t,typeof t!="function"&&t)}function q(n,e,t={}){const l=Object.keys(e||{}),o=Object.keys(t);let s,f;for(s=0,f=o.length;s<f;s++){const i=o[s];!i||i==="undefined"||e[i]||(x(n,i,!1),delete t[i])}for(s=0,f=l.length;s<f;s++){const i=l[s],c=!!e[i];!i||i==="undefined"||t[i]===c||!c||(x(n,i,!0),t[i]=c)}return t}function F(n,e,t){if(!e)return t?$(n,"style"):e;const l=n.style;if(typeof e=="string")return l.cssText=e;typeof t=="string"&&(l.cssText=t=void 0),t||(t={}),e||(e={});let o,s;for(s in t)e[s]==null&&l.removeProperty(s),delete t[s];for(s in e)o=e[s],o!==t[s]&&(l.setProperty(s,o),t[s]=o);return t}function N(n,e={},t,l){const o={};return a.createRenderEffect(()=>typeof e.ref=="function"&&G(e.ref,n)),a.createRenderEffect(()=>K(n,e,t,!0,o,!0)),o}function G(n,e,t){return a.untrack(()=>n(e,t))}function L(n,e,t,l){if(typeof e!="function")return b(n,e,l,t);a.createRenderEffect(o=>b(n,e(),o,t),l)}function K(n,e,t,l,o={},s=!1){e||(e={});for(const f in o)if(!(f in e)){if(f==="children")continue;o[f]=P(n,f,null,o[f],t,s,e)}for(const f in e){if(f==="children")continue;const i=e[f];o[f]=P(n,f,i,o[f],t,s,e)}}function m(n){return!!a.sharedConfig.context&&!a.sharedConfig.done&&(!n||n.isConnected)}function X(n){return n.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function x(n,e,t){const l=e.trim().split(/\s+/);for(let o=0,s=l.length;o<s;o++)n.classList.toggle(l[o],t)}function P(n,e,t,l,o,s,f){let i,c,r,u,h;if(e==="style")return F(n,t,l);if(e==="classList")return q(n,t,l);if(t===l)return l;if(e==="ref")s||t(n);else if(e.slice(0,3)==="on:"){const d=e.slice(3);l&&n.removeEventListener(d,l,typeof l!="function"&&l),t&&n.addEventListener(d,t,typeof t!="function"&&t)}else if(e.slice(0,10)==="oncapture:"){const d=e.slice(10);l&&n.removeEventListener(d,l,!0),t&&n.addEventListener(d,t,!0)}else if(e.slice(0,2)==="on"){const d=e.slice(2).toLowerCase(),g=I.has(d);if(!g&&l){const E=Array.isArray(l)?l[0]:l;n.removeEventListener(d,E)}(g||t)&&(U(n,d,t,g),g&&R([d]))}else if(e.slice(0,5)==="attr:")$(n,e.slice(5),t);else if(e.slice(0,5)==="bool:")D(n,e.slice(5),t);else if((h=e.slice(0,5)==="prop:")||(r=O.has(e))||(u=M(e,n.tagName))||(c=j.has(e))||(i=n.nodeName.includes("-")||"is"in f)){if(h)e=e.slice(5),c=!0;else if(m(n))return t;e==="class"||e==="className"?H(n,t):i&&!c&&!r?n[X(e)]=t:n[u||e]=t}else $(n,k[e]||e,t);return t}function Y(n){if(a.sharedConfig.registry&&a.sharedConfig.events&&a.sharedConfig.events.find(([c,r])=>r===n))return;let e=n.target;const t=`$$${n.type}`,l=n.target,o=n.currentTarget,s=c=>Object.defineProperty(n,"target",{configurable:!0,value:c}),f=()=>{const c=e[t];if(c&&!e.disabled){const r=e[`${t}Data`];if(r!==void 0?c.call(e,r,n):c.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&s(e.host),!0},i=()=>{for(;f()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),a.sharedConfig.registry&&!a.sharedConfig.done&&(a.sharedConfig.done=_$HY.done=!0),n.composedPath){const c=n.composedPath();s(c[0]);for(let r=0;r<c.length-2&&(e=c[r],!!f());r++){if(e._$host){e=e._$host,i();break}if(e.parentNode===o)break}}else i();s(l)}function b(n,e,t,l,o){const s=m(n);if(s){!t&&(t=[...n.childNodes]);let i=[];for(let c=0;c<t.length;c++){const r=t[c];r.nodeType===8&&r.data.slice(0,2)==="!$"?r.remove():i.push(r)}t=i}for(;typeof t=="function";)t=t();if(e===t)return t;const f=typeof e;if(n=n,f==="string"||f==="number"){if(s||f==="number"&&(e=e.toString(),e===t))return t;t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||f==="boolean"){if(s)return t;t=A(n,t,l)}else{if(f==="function")return a.createRenderEffect(()=>{let i=e();for(;typeof i=="function";)i=i();t=b(n,i,t,l)}),()=>t;if(Array.isArray(e)){const i=[],c=t&&Array.isArray(t);if(C(i,e,t,o))return a.createRenderEffect(()=>t=b(n,i,t,l,!0)),()=>t;if(s)return i.length?t=[...n.childNodes]:t;i.length===0?t=A(n,t,l):c?t.length===0?S(n,i,l):V(n,t,i):(t&&A(n),S(n,i)),t=i}else if(e.nodeType){if(s&&e.parentNode)return t=e;Array.isArray(t)?A(n,t,null,e):t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild),t=e}}return t}function C(n,e,t,l){let o=!1;for(let s=0,f=e.length;s<f;s++){let i=e[s],c=t&&t[n.length],r;if(!(i==null||i===!0||i===!1))if((r=typeof i)=="object"&&i.nodeType)n.push(i);else if(Array.isArray(i))o=C(n,i,c)||o;else if(r==="function")if(l){for(;typeof i=="function";)i=i();o=C(n,Array.isArray(i)?i:[i],Array.isArray(c)?c:[c])||o}else n.push(i),o=!0;else{const u=String(i);c&&c.nodeType===3&&c.data===u?n.push(c):n.push(document.createTextNode(u))}}return o}function S(n,e,t=null){for(let l=0,o=e.length;l<o;l++)n.insertBefore(e[l],t)}function A(n,e,t,l){if(t===void 0)return n.textContent="";const o=l||document.createTextNode("");if(e.length){let s=!1;for(let f=e.length-1;f>=0;f--){const i=e[f];if(o!==i){const c=i.parentNode===n;!s&&!f?c?n.replaceChild(o,i):n.insertBefore(o,t):c&&i.remove()}else s=!0}}else n.insertBefore(o,t);return[o]}const Q={button:"_button_knpbv_1"};var W=w("<button type=button>");const Z=n=>(()=>{var e=W();return N(e,a.mergeProps(n,{get class(){return Q.button}}),!1),L(e,()=>n.children),e})(),z={label:"_label_16ku5_1"};var J=w("<label>");const p=n=>(()=>{var e=J();return N(e,a.mergeProps({get class(){return z.label}},n),!1),L(e,()=>n.children),e})();y.Button=Z,y.Label=p,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-uix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/main.umd.cjs",
|
|
6
6
|
"module": "./dist/main.js",
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
"dist",
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
|
+
"workspaces": [
|
|
23
|
+
"src-storybook"
|
|
24
|
+
],
|
|
22
25
|
"peerDependencies": {
|
|
23
26
|
"solid-js": "^1.9.5"
|
|
24
27
|
},
|
|
@@ -34,7 +37,8 @@
|
|
|
34
37
|
},
|
|
35
38
|
"scripts": {
|
|
36
39
|
"build": "tsc && vite build",
|
|
37
|
-
"test": "vitest run"
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"start": "cd src-storybook && npm start"
|
|
38
42
|
},
|
|
39
43
|
"author": "thorn_pear",
|
|
40
44
|
"license": "ISC",
|