@lundal/zed-solid 0.0.15 → 0.0.17
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.d.ts +0 -1
- package/dist/Card.d.ts +0 -1
- package/dist/CheckBox.d.ts +0 -1
- package/dist/CheckBoxes.d.ts +0 -1
- package/dist/Column.d.ts +0 -1
- package/dist/Dialog.d.ts +0 -1
- package/dist/Field.d.ts +0 -1
- package/dist/Form.d.ts +0 -1
- package/dist/Header.d.ts +1 -1
- package/dist/Headings.d.ts +0 -1
- package/dist/Icon.d.ts +1 -2
- package/dist/IconButton.d.ts +0 -1
- package/dist/Link.d.ts +0 -1
- package/dist/Message.d.ts +0 -1
- package/dist/Nav.d.ts +0 -1
- package/dist/{NavHeader.d.ts → NavHeading.d.ts} +2 -3
- package/dist/NavLink.d.ts +0 -1
- package/dist/Page.d.ts +0 -1
- package/dist/RadioButtons.d.ts +0 -1
- package/dist/Row.d.ts +0 -1
- package/dist/Select.d.ts +0 -1
- package/dist/Spinner.d.ts +0 -1
- package/dist/TextBox.d.ts +0 -1
- package/dist/example.d.ts +0 -1
- package/dist/{style.css → index.css} +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +117 -131
- package/dist/signals/createForm.d.ts +0 -1
- package/dist/signals/createInterval.d.ts +0 -1
- package/dist/signals/createSize.d.ts +0 -1
- package/package.json +6 -6
package/dist/Button.d.ts
CHANGED
package/dist/Card.d.ts
CHANGED
package/dist/CheckBox.d.ts
CHANGED
package/dist/CheckBoxes.d.ts
CHANGED
package/dist/Column.d.ts
CHANGED
package/dist/Dialog.d.ts
CHANGED
package/dist/Field.d.ts
CHANGED
package/dist/Form.d.ts
CHANGED
package/dist/Header.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
|
-
|
|
3
2
|
export type HeaderProps = {
|
|
4
3
|
class?: string;
|
|
5
4
|
style?: JSX.CSSProperties;
|
|
6
5
|
appIcon: JSX.Element;
|
|
7
6
|
appName: string;
|
|
7
|
+
buttons?: JSX.Element;
|
|
8
8
|
children?: JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
export declare function Header(props: HeaderProps): JSX.Element;
|
package/dist/Headings.d.ts
CHANGED
package/dist/Icon.d.ts
CHANGED
package/dist/IconButton.d.ts
CHANGED
package/dist/Link.d.ts
CHANGED
package/dist/Message.d.ts
CHANGED
package/dist/Nav.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
|
-
|
|
3
|
-
export type NavHeaderProps = {
|
|
2
|
+
export type NavHeadingProps = {
|
|
4
3
|
class?: string;
|
|
5
4
|
style?: JSX.CSSProperties;
|
|
6
5
|
children: JSX.Element;
|
|
7
6
|
};
|
|
8
|
-
export declare function
|
|
7
|
+
export declare function NavHeading(props: NavHeadingProps): JSX.Element;
|
package/dist/NavLink.d.ts
CHANGED
package/dist/Page.d.ts
CHANGED
package/dist/RadioButtons.d.ts
CHANGED
package/dist/Row.d.ts
CHANGED
package/dist/Select.d.ts
CHANGED
package/dist/Spinner.d.ts
CHANGED
package/dist/TextBox.d.ts
CHANGED
package/dist/example.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
export * from './Button.tsx';
|
|
3
2
|
export * from './Card.tsx';
|
|
4
3
|
export * from './CheckBox.tsx';
|
|
@@ -14,7 +13,7 @@ export * from './IconButton.tsx';
|
|
|
14
13
|
export * from './Link.tsx';
|
|
15
14
|
export * from './Message.tsx';
|
|
16
15
|
export * from './Nav.tsx';
|
|
17
|
-
export * from './
|
|
16
|
+
export * from './NavHeading.tsx';
|
|
18
17
|
export * from './NavLink.tsx';
|
|
19
18
|
export * from './Page.tsx';
|
|
20
19
|
export * from './RadioButtons.tsx';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './index.css';
|
|
2
2
|
import "@fontsource/inter/400.css";
|
|
3
3
|
import "@fontsource/inter/500.css";
|
|
4
4
|
import { sharedConfig, createRenderEffect, untrack, createComponent, For, createMemo, createSignal, onMount, onCleanup } from "solid-js";
|
|
@@ -17,12 +17,10 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
17
17
|
}
|
|
18
18
|
if (aEnd === aStart) {
|
|
19
19
|
const node = bEnd < bLength ? bStart ? b[bStart - 1].nextSibling : b[bEnd - bStart] : after;
|
|
20
|
-
while (bStart < bEnd)
|
|
21
|
-
parentNode.insertBefore(b[bStart++], node);
|
|
20
|
+
while (bStart < bEnd) parentNode.insertBefore(b[bStart++], node);
|
|
22
21
|
} else if (bEnd === bStart) {
|
|
23
22
|
while (aStart < aEnd) {
|
|
24
|
-
if (!map || !map.has(a[aStart]))
|
|
25
|
-
a[aStart].remove();
|
|
23
|
+
if (!map || !map.has(a[aStart])) a[aStart].remove();
|
|
26
24
|
aStart++;
|
|
27
25
|
}
|
|
28
26
|
} else if (a[aStart] === b[bEnd - 1] && b[bStart] === a[aEnd - 1]) {
|
|
@@ -34,40 +32,34 @@ function reconcileArrays(parentNode, a, b) {
|
|
|
34
32
|
if (!map) {
|
|
35
33
|
map = /* @__PURE__ */ new Map();
|
|
36
34
|
let i = bStart;
|
|
37
|
-
while (i < bEnd)
|
|
38
|
-
map.set(b[i], i++);
|
|
35
|
+
while (i < bEnd) map.set(b[i], i++);
|
|
39
36
|
}
|
|
40
37
|
const index = map.get(a[aStart]);
|
|
41
38
|
if (index != null) {
|
|
42
39
|
if (bStart < index && index < bEnd) {
|
|
43
40
|
let i = aStart, sequence = 1, t;
|
|
44
41
|
while (++i < aEnd && i < bEnd) {
|
|
45
|
-
if ((t = map.get(a[i])) == null || t !== index + sequence)
|
|
46
|
-
break;
|
|
42
|
+
if ((t = map.get(a[i])) == null || t !== index + sequence) break;
|
|
47
43
|
sequence++;
|
|
48
44
|
}
|
|
49
45
|
if (sequence > index - bStart) {
|
|
50
46
|
const node = a[aStart];
|
|
51
|
-
while (bStart < index)
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
} else
|
|
56
|
-
aStart++;
|
|
57
|
-
} else
|
|
58
|
-
a[aStart++].remove();
|
|
47
|
+
while (bStart < index) parentNode.insertBefore(b[bStart++], node);
|
|
48
|
+
} else parentNode.replaceChild(b[bStart++], a[aStart++]);
|
|
49
|
+
} else aStart++;
|
|
50
|
+
} else a[aStart++].remove();
|
|
59
51
|
}
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
54
|
const $$EVENTS = "_$DX_DELEGATE";
|
|
63
|
-
function template(html,
|
|
55
|
+
function template(html, isImportNode, isSVG) {
|
|
64
56
|
let node;
|
|
65
57
|
const create = () => {
|
|
66
58
|
const t = document.createElement("template");
|
|
67
59
|
t.innerHTML = html;
|
|
68
60
|
return isSVG ? t.content.firstChild.firstChild : t.content.firstChild;
|
|
69
61
|
};
|
|
70
|
-
const fn =
|
|
62
|
+
const fn = isImportNode ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
|
|
71
63
|
fn.cloneNode = fn;
|
|
72
64
|
return fn;
|
|
73
65
|
}
|
|
@@ -82,27 +74,19 @@ function delegateEvents(eventNames, document2 = window.document) {
|
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
function setAttribute(node, name, value) {
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
node.removeAttribute(name);
|
|
89
|
-
else
|
|
90
|
-
node.setAttribute(name, value);
|
|
77
|
+
if (isHydrating(node)) return;
|
|
78
|
+
if (value == null) node.removeAttribute(name);
|
|
79
|
+
else node.setAttribute(name, value);
|
|
91
80
|
}
|
|
92
81
|
function className(node, value) {
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
node.removeAttribute("class");
|
|
97
|
-
else
|
|
98
|
-
node.className = value;
|
|
82
|
+
if (isHydrating(node)) return;
|
|
83
|
+
if (value == null) node.removeAttribute("class");
|
|
84
|
+
else node.className = value;
|
|
99
85
|
}
|
|
100
86
|
function style(node, value, prev) {
|
|
101
|
-
if (!value)
|
|
102
|
-
return prev ? setAttribute(node, "style") : value;
|
|
87
|
+
if (!value) return prev ? setAttribute(node, "style") : value;
|
|
103
88
|
const nodeStyle = node.style;
|
|
104
|
-
if (typeof value === "string")
|
|
105
|
-
return nodeStyle.cssText = value;
|
|
89
|
+
if (typeof value === "string") return nodeStyle.cssText = value;
|
|
106
90
|
typeof prev === "string" && (nodeStyle.cssText = prev = void 0);
|
|
107
91
|
prev || (prev = {});
|
|
108
92
|
value || (value = {});
|
|
@@ -124,87 +108,103 @@ function use(fn, element, arg) {
|
|
|
124
108
|
return untrack(() => fn(element, arg));
|
|
125
109
|
}
|
|
126
110
|
function insert(parent, accessor, marker, initial) {
|
|
127
|
-
if (marker !== void 0 && !initial)
|
|
128
|
-
|
|
129
|
-
if (typeof accessor !== "function")
|
|
130
|
-
return insertExpression(parent, accessor, initial, marker);
|
|
111
|
+
if (marker !== void 0 && !initial) initial = [];
|
|
112
|
+
if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
|
|
131
113
|
createRenderEffect((current) => insertExpression(parent, accessor(), current, marker), initial);
|
|
132
114
|
}
|
|
115
|
+
function isHydrating(node) {
|
|
116
|
+
return !!sharedConfig.context && !sharedConfig.done && (!node || node.isConnected);
|
|
117
|
+
}
|
|
133
118
|
function eventHandler(e) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
if (e.target !== node) {
|
|
137
|
-
Object.defineProperty(e, "target", {
|
|
138
|
-
configurable: true,
|
|
139
|
-
value: node
|
|
140
|
-
});
|
|
119
|
+
if (sharedConfig.registry && sharedConfig.events) {
|
|
120
|
+
if (sharedConfig.events.find(([el, ev]) => ev === e)) return;
|
|
141
121
|
}
|
|
142
|
-
|
|
122
|
+
let node = e.target;
|
|
123
|
+
const key = `$$${e.type}`;
|
|
124
|
+
const oriTarget = e.target;
|
|
125
|
+
const oriCurrentTarget = e.currentTarget;
|
|
126
|
+
const retarget = (value) => Object.defineProperty(e, "target", {
|
|
143
127
|
configurable: true,
|
|
144
|
-
|
|
145
|
-
return node || document;
|
|
146
|
-
}
|
|
128
|
+
value
|
|
147
129
|
});
|
|
148
|
-
|
|
149
|
-
sharedConfig.done = _$HY.done = true;
|
|
150
|
-
while (node) {
|
|
130
|
+
const handleNode = () => {
|
|
151
131
|
const handler = node[key];
|
|
152
132
|
if (handler && !node.disabled) {
|
|
153
133
|
const data = node[`${key}Data`];
|
|
154
134
|
data !== void 0 ? handler.call(node, data, e) : handler.call(node, e);
|
|
155
|
-
if (e.cancelBubble)
|
|
156
|
-
return;
|
|
135
|
+
if (e.cancelBubble) return;
|
|
157
136
|
}
|
|
158
|
-
node
|
|
159
|
-
|
|
137
|
+
node.host && typeof node.host !== "string" && !node.host._$host && node.contains(e.target) && retarget(node.host);
|
|
138
|
+
return true;
|
|
139
|
+
};
|
|
140
|
+
const walkUpTree = () => {
|
|
141
|
+
while (handleNode() && (node = node._$host || node.parentNode || node.host)) ;
|
|
142
|
+
};
|
|
143
|
+
Object.defineProperty(e, "currentTarget", {
|
|
144
|
+
configurable: true,
|
|
145
|
+
get() {
|
|
146
|
+
return node || document;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
|
|
150
|
+
if (e.composedPath) {
|
|
151
|
+
const path = e.composedPath();
|
|
152
|
+
retarget(path[0]);
|
|
153
|
+
for (let i = 0; i < path.length - 2; i++) {
|
|
154
|
+
node = path[i];
|
|
155
|
+
if (!handleNode()) break;
|
|
156
|
+
if (node._$host) {
|
|
157
|
+
node = node._$host;
|
|
158
|
+
walkUpTree();
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (node.parentNode === oriCurrentTarget) {
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
} else walkUpTree();
|
|
166
|
+
retarget(oriTarget);
|
|
160
167
|
}
|
|
161
168
|
function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
162
|
-
const hydrating =
|
|
169
|
+
const hydrating = isHydrating(parent);
|
|
163
170
|
if (hydrating) {
|
|
164
171
|
!current && (current = [...parent.childNodes]);
|
|
165
172
|
let cleaned = [];
|
|
166
173
|
for (let i = 0; i < current.length; i++) {
|
|
167
174
|
const node = current[i];
|
|
168
|
-
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$")
|
|
169
|
-
|
|
170
|
-
else
|
|
171
|
-
cleaned.push(node);
|
|
175
|
+
if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();
|
|
176
|
+
else cleaned.push(node);
|
|
172
177
|
}
|
|
173
178
|
current = cleaned;
|
|
174
179
|
}
|
|
175
|
-
while (typeof current === "function")
|
|
176
|
-
|
|
177
|
-
if (value === current)
|
|
178
|
-
return current;
|
|
180
|
+
while (typeof current === "function") current = current();
|
|
181
|
+
if (value === current) return current;
|
|
179
182
|
const t = typeof value, multi = marker !== void 0;
|
|
180
183
|
parent = multi && current[0] && current[0].parentNode || parent;
|
|
181
184
|
if (t === "string" || t === "number") {
|
|
182
|
-
if (hydrating)
|
|
183
|
-
|
|
184
|
-
if (t === "number")
|
|
185
|
+
if (hydrating) return current;
|
|
186
|
+
if (t === "number") {
|
|
185
187
|
value = value.toString();
|
|
188
|
+
if (value === current) return current;
|
|
189
|
+
}
|
|
186
190
|
if (multi) {
|
|
187
191
|
let node = current[0];
|
|
188
192
|
if (node && node.nodeType === 3) {
|
|
189
193
|
node.data !== value && (node.data = value);
|
|
190
|
-
} else
|
|
191
|
-
node = document.createTextNode(value);
|
|
194
|
+
} else node = document.createTextNode(value);
|
|
192
195
|
current = cleanChildren(parent, current, marker, node);
|
|
193
196
|
} else {
|
|
194
197
|
if (current !== "" && typeof current === "string") {
|
|
195
198
|
current = parent.firstChild.data = value;
|
|
196
|
-
} else
|
|
197
|
-
current = parent.textContent = value;
|
|
199
|
+
} else current = parent.textContent = value;
|
|
198
200
|
}
|
|
199
201
|
} else if (value == null || t === "boolean") {
|
|
200
|
-
if (hydrating)
|
|
201
|
-
return current;
|
|
202
|
+
if (hydrating) return current;
|
|
202
203
|
current = cleanChildren(parent, current, marker);
|
|
203
204
|
} else if (t === "function") {
|
|
204
205
|
createRenderEffect(() => {
|
|
205
206
|
let v = value();
|
|
206
|
-
while (typeof v === "function")
|
|
207
|
-
v = v();
|
|
207
|
+
while (typeof v === "function") v = v();
|
|
208
208
|
current = insertExpression(parent, v, current, marker);
|
|
209
209
|
});
|
|
210
210
|
return () => current;
|
|
@@ -216,60 +216,50 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
|
|
|
216
216
|
return () => current;
|
|
217
217
|
}
|
|
218
218
|
if (hydrating) {
|
|
219
|
-
if (!array.length)
|
|
220
|
-
|
|
221
|
-
if (marker === void 0)
|
|
222
|
-
return [...parent.childNodes];
|
|
219
|
+
if (!array.length) return current;
|
|
220
|
+
if (marker === void 0) return current = [...parent.childNodes];
|
|
223
221
|
let node = array[0];
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
222
|
+
if (node.parentNode !== parent) return current;
|
|
223
|
+
const nodes = [node];
|
|
224
|
+
while ((node = node.nextSibling) !== marker) nodes.push(node);
|
|
227
225
|
return current = nodes;
|
|
228
226
|
}
|
|
229
227
|
if (array.length === 0) {
|
|
230
228
|
current = cleanChildren(parent, current, marker);
|
|
231
|
-
if (multi)
|
|
232
|
-
return current;
|
|
229
|
+
if (multi) return current;
|
|
233
230
|
} else if (currentArray) {
|
|
234
231
|
if (current.length === 0) {
|
|
235
232
|
appendNodes(parent, array, marker);
|
|
236
|
-
} else
|
|
237
|
-
reconcileArrays(parent, current, array);
|
|
233
|
+
} else reconcileArrays(parent, current, array);
|
|
238
234
|
} else {
|
|
239
235
|
current && cleanChildren(parent);
|
|
240
236
|
appendNodes(parent, array);
|
|
241
237
|
}
|
|
242
238
|
current = array;
|
|
243
239
|
} else if (value.nodeType) {
|
|
244
|
-
if (hydrating && value.parentNode)
|
|
245
|
-
return current = multi ? [value] : value;
|
|
240
|
+
if (hydrating && value.parentNode) return current = multi ? [value] : value;
|
|
246
241
|
if (Array.isArray(current)) {
|
|
247
|
-
if (multi)
|
|
248
|
-
return current = cleanChildren(parent, current, marker, value);
|
|
242
|
+
if (multi) return current = cleanChildren(parent, current, marker, value);
|
|
249
243
|
cleanChildren(parent, current, null, value);
|
|
250
244
|
} else if (current == null || current === "" || !parent.firstChild) {
|
|
251
245
|
parent.appendChild(value);
|
|
252
|
-
} else
|
|
253
|
-
parent.replaceChild(value, parent.firstChild);
|
|
246
|
+
} else parent.replaceChild(value, parent.firstChild);
|
|
254
247
|
current = value;
|
|
255
|
-
} else
|
|
256
|
-
;
|
|
248
|
+
} else ;
|
|
257
249
|
return current;
|
|
258
250
|
}
|
|
259
251
|
function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
260
252
|
let dynamic = false;
|
|
261
253
|
for (let i = 0, len = array.length; i < len; i++) {
|
|
262
254
|
let item = array[i], prev = current && current[normalized.length], t;
|
|
263
|
-
if (item == null || item === true || item === false)
|
|
264
|
-
;
|
|
255
|
+
if (item == null || item === true || item === false) ;
|
|
265
256
|
else if ((t = typeof item) === "object" && item.nodeType) {
|
|
266
257
|
normalized.push(item);
|
|
267
258
|
} else if (Array.isArray(item)) {
|
|
268
259
|
dynamic = normalizeIncomingArray(normalized, item, prev) || dynamic;
|
|
269
260
|
} else if (t === "function") {
|
|
270
261
|
if (unwrap) {
|
|
271
|
-
while (typeof item === "function")
|
|
272
|
-
item = item();
|
|
262
|
+
while (typeof item === "function") item = item();
|
|
273
263
|
dynamic = normalizeIncomingArray(
|
|
274
264
|
normalized,
|
|
275
265
|
Array.isArray(item) ? item : [item],
|
|
@@ -281,21 +271,17 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
|
|
|
281
271
|
}
|
|
282
272
|
} else {
|
|
283
273
|
const value = String(item);
|
|
284
|
-
if (prev && prev.nodeType === 3 && prev.data === value)
|
|
285
|
-
|
|
286
|
-
else
|
|
287
|
-
normalized.push(document.createTextNode(value));
|
|
274
|
+
if (prev && prev.nodeType === 3 && prev.data === value) normalized.push(prev);
|
|
275
|
+
else normalized.push(document.createTextNode(value));
|
|
288
276
|
}
|
|
289
277
|
}
|
|
290
278
|
return dynamic;
|
|
291
279
|
}
|
|
292
280
|
function appendNodes(parent, array, marker = null) {
|
|
293
|
-
for (let i = 0, len = array.length; i < len; i++)
|
|
294
|
-
parent.insertBefore(array[i], marker);
|
|
281
|
+
for (let i = 0, len = array.length; i < len; i++) parent.insertBefore(array[i], marker);
|
|
295
282
|
}
|
|
296
283
|
function cleanChildren(parent, current, marker, replacement) {
|
|
297
|
-
if (marker === void 0)
|
|
298
|
-
return parent.textContent = "";
|
|
284
|
+
if (marker === void 0) return parent.textContent = "";
|
|
299
285
|
const node = replacement || document.createTextNode("");
|
|
300
286
|
if (current.length) {
|
|
301
287
|
let inserted = false;
|
|
@@ -305,22 +291,16 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
305
291
|
const isParent = el.parentNode === parent;
|
|
306
292
|
if (!inserted && !i)
|
|
307
293
|
isParent ? parent.replaceChild(node, el) : parent.insertBefore(node, marker);
|
|
308
|
-
else
|
|
309
|
-
|
|
310
|
-
} else
|
|
311
|
-
inserted = true;
|
|
294
|
+
else isParent && el.remove();
|
|
295
|
+
} else inserted = true;
|
|
312
296
|
}
|
|
313
|
-
} else
|
|
314
|
-
parent.insertBefore(node, marker);
|
|
297
|
+
} else parent.insertBefore(node, marker);
|
|
315
298
|
return [node];
|
|
316
299
|
}
|
|
317
300
|
function mergeClasses(a, b) {
|
|
318
|
-
if (a && b)
|
|
319
|
-
|
|
320
|
-
if (
|
|
321
|
-
return a;
|
|
322
|
-
if (b)
|
|
323
|
-
return b;
|
|
301
|
+
if (a && b) return `${a} ${b}`;
|
|
302
|
+
if (a) return a;
|
|
303
|
+
if (b) return b;
|
|
324
304
|
return void 0;
|
|
325
305
|
}
|
|
326
306
|
var _tmpl$$l = /* @__PURE__ */ template(`<button>`);
|
|
@@ -576,13 +556,14 @@ function Form(props) {
|
|
|
576
556
|
return _el$;
|
|
577
557
|
})();
|
|
578
558
|
}
|
|
579
|
-
var _tmpl$$d = /* @__PURE__ */ template(`<header><a class=z-header--app href=/><span></span></a><div class=z-header--buttons>`);
|
|
559
|
+
var _tmpl$$d = /* @__PURE__ */ template(`<header><a class=z-header--app href=/><span></span></a><div class=z-header--children></div><div class=z-header--buttons>`);
|
|
580
560
|
function Header(props) {
|
|
581
561
|
return (() => {
|
|
582
|
-
var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
|
|
562
|
+
var _el$ = _tmpl$$d(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.nextSibling;
|
|
583
563
|
insert(_el$2, () => props.appIcon, _el$3);
|
|
584
564
|
insert(_el$3, () => props.appName);
|
|
585
565
|
insert(_el$4, () => props.children);
|
|
566
|
+
insert(_el$5, () => props.buttons);
|
|
586
567
|
createRenderEffect((_p$) => {
|
|
587
568
|
var _v$ = mergeClasses("z-header", props.class), _v$2 = props.style;
|
|
588
569
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
@@ -726,22 +707,27 @@ function Link(props) {
|
|
|
726
707
|
}
|
|
727
708
|
});
|
|
728
709
|
}
|
|
729
|
-
|
|
710
|
+
/*!
|
|
711
|
+
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
|
|
712
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
713
|
+
* Copyright 2024 Fonticons, Inc.
|
|
714
|
+
*/
|
|
715
|
+
const faCircleCheck = {
|
|
730
716
|
prefix: "fas",
|
|
731
717
|
iconName: "circle-check",
|
|
732
718
|
icon: [512, 512, [61533, "check-circle"], "f058", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]
|
|
733
719
|
};
|
|
734
|
-
|
|
720
|
+
const faCircleInfo = {
|
|
735
721
|
prefix: "fas",
|
|
736
722
|
iconName: "circle-info",
|
|
737
|
-
icon: [512, 512, ["info-circle"], "f05a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216
|
|
723
|
+
icon: [512, 512, ["info-circle"], "f05a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]
|
|
738
724
|
};
|
|
739
|
-
|
|
725
|
+
const faTriangleExclamation = {
|
|
740
726
|
prefix: "fas",
|
|
741
727
|
iconName: "triangle-exclamation",
|
|
742
|
-
icon: [512, 512, [9888, "exclamation-triangle", "warning"], "f071", "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472
|
|
728
|
+
icon: [512, 512, [9888, "exclamation-triangle", "warning"], "f071", "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]
|
|
743
729
|
};
|
|
744
|
-
|
|
730
|
+
const faCircleXmark = {
|
|
745
731
|
prefix: "fas",
|
|
746
732
|
iconName: "circle-xmark",
|
|
747
733
|
icon: [512, 512, [61532, "times-circle", "xmark-circle"], "f057", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"]
|
|
@@ -802,12 +788,12 @@ function Nav(props) {
|
|
|
802
788
|
})();
|
|
803
789
|
}
|
|
804
790
|
var _tmpl$$7 = /* @__PURE__ */ template(`<div>`);
|
|
805
|
-
function
|
|
791
|
+
function NavHeading(props) {
|
|
806
792
|
return (() => {
|
|
807
793
|
var _el$ = _tmpl$$7();
|
|
808
794
|
insert(_el$, () => props.children);
|
|
809
795
|
createRenderEffect((_p$) => {
|
|
810
|
-
var _v$ = mergeClasses("z-nav--
|
|
796
|
+
var _v$ = mergeClasses("z-nav--heading", props.class), _v$2 = props.style;
|
|
811
797
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
812
798
|
_p$.t = style(_el$, _v$2, _p$.t);
|
|
813
799
|
return _p$;
|
|
@@ -1110,7 +1096,7 @@ export {
|
|
|
1110
1096
|
Link,
|
|
1111
1097
|
Message,
|
|
1112
1098
|
Nav,
|
|
1113
|
-
|
|
1099
|
+
NavHeading,
|
|
1114
1100
|
NavLink,
|
|
1115
1101
|
Page,
|
|
1116
1102
|
RadioButtons,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lundal/zed-solid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"@fortawesome/free-regular-svg-icons": "6",
|
|
19
19
|
"@fortawesome/free-solid-svg-icons": "6",
|
|
20
20
|
"@lundal/zed-css": "file:../css",
|
|
21
|
-
"@solidjs/router": "0.
|
|
21
|
+
"@solidjs/router": "0.15",
|
|
22
22
|
"solid-js": "1",
|
|
23
23
|
"prettier": "3",
|
|
24
24
|
"typescript": "5",
|
|
25
|
-
"vite": "
|
|
26
|
-
"vite-plugin-dts": "
|
|
25
|
+
"vite": "6",
|
|
26
|
+
"vite-plugin-dts": "4",
|
|
27
27
|
"vite-plugin-libcss": "1",
|
|
28
28
|
"vite-plugin-solid": "2"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@solidjs/router": "
|
|
32
|
-
"solid-js": "
|
|
31
|
+
"@solidjs/router": "*",
|
|
32
|
+
"solid-js": "*"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
35
|
"@fortawesome/free-solid-svg-icons": "6"
|