@lundal/zed-solid 0.0.14 → 0.0.16

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 CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type ButtonProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Card.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type CardProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type CheckBoxProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  type Option = {
4
3
  label: string;
5
4
  value: boolean;
package/dist/Column.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type ColumnProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Dialog.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type DialogProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Field.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Accessor, JSX } from 'solid-js';
2
-
3
2
  type ExtraProps = {
4
3
  id: string;
5
4
  invalid: boolean;
package/dist/Form.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type FormProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Header.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type HeaderProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type HeadingProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Icon.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { IconDefinition } from '@fortawesome/fontawesome-common-types';
2
1
  import { JSX } from 'solid-js';
3
-
2
+ import { IconDefinition } from '@fortawesome/fontawesome-common-types';
4
3
  export type IconProps = {
5
4
  class?: string;
6
5
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type IconButtonProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Link.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type LinkProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Message.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type MessageProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Nav.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type NavProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type NavHeaderProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/NavLink.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type NavLinkProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Page.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type PageProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  type Option<T> = {
4
3
  label: string;
5
4
  value: T;
package/dist/Row.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type RowProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/Select.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  type Option<T> = {
4
3
  label: string;
5
4
  value: T;
package/dist/Spinner.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type SpinnerProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
package/dist/TextBox.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { JSX } from 'solid-js';
2
-
3
2
  export type TextBoxProps = {
4
3
  class?: string;
5
4
  style?: JSX.CSSProperties;
@@ -8,6 +7,7 @@ export type TextBoxProps = {
8
7
  errorId: string | undefined;
9
8
  autocomplete?: string;
10
9
  hidden?: boolean;
10
+ placeholder?: string;
11
11
  value: string;
12
12
  onChange: (value: string) => void;
13
13
  };
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';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import './style.css';
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
- parentNode.insertBefore(b[bStart++], node);
53
- } else
54
- parentNode.replaceChild(b[bStart++], a[aStart++]);
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, isCE, isSVG) {
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 = isCE ? () => untrack(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
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 (!!sharedConfig.context && node.isConnected)
86
- return;
87
- if (value == null)
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 (!!sharedConfig.context && node.isConnected)
94
- return;
95
- if (value == null)
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
- initial = [];
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
- const key = `$$${e.type}`;
135
- let node = e.composedPath && e.composedPath()[0] || e.target;
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
- Object.defineProperty(e, "currentTarget", {
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
- get() {
145
- return node || document;
146
- }
128
+ value
147
129
  });
148
- if (sharedConfig.registry && !sharedConfig.done)
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 = node._$host || node.parentNode || node.host;
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 = !!sharedConfig.context && parent.isConnected;
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
- node.remove();
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
- current = current();
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
- return current;
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
- return current;
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
- let nodes = [node];
225
- while ((node = node.nextSibling) !== marker)
226
- nodes.push(node);
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
- normalized.push(prev);
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
- isParent && el.remove();
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
- return `${a} ${b}`;
320
- if (a)
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>`);
@@ -726,22 +706,27 @@ function Link(props) {
726
706
  }
727
707
  });
728
708
  }
729
- var faCircleCheck = {
709
+ /*!
710
+ * Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
711
+ * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
712
+ * Copyright 2024 Fonticons, Inc.
713
+ */
714
+ const faCircleCheck = {
730
715
  prefix: "fas",
731
716
  iconName: "circle-check",
732
717
  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
718
  };
734
- var faCircleInfo = {
719
+ const faCircleInfo = {
735
720
  prefix: "fas",
736
721
  iconName: "circle-info",
737
- icon: [512, 512, ["info-circle"], "f05a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-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"]
722
+ 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
723
  };
739
- var faTriangleExclamation = {
724
+ const faTriangleExclamation = {
740
725
  prefix: "fas",
741
726
  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 480H40c-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 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]
727
+ 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
728
  };
744
- var faCircleXmark = {
729
+ const faCircleXmark = {
745
730
  prefix: "fas",
746
731
  iconName: "circle-xmark",
747
732
  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"]
@@ -993,7 +978,7 @@ function TextBox(props) {
993
978
  var _el$ = _tmpl$();
994
979
  _el$.$$input = (e) => props.onChange(e.target.value);
995
980
  createRenderEffect((_p$) => {
996
- var _v$ = mergeClasses("z-textbox", props.class), _v$2 = props.style, _v$3 = props.autocomplete ?? "off", _v$4 = props.hidden ? "password" : "text", _v$5 = props.id, _v$6 = props.invalid, _v$7 = props.errorId;
981
+ var _v$ = mergeClasses("z-textbox", props.class), _v$2 = props.style, _v$3 = props.autocomplete ?? "off", _v$4 = props.hidden ? "password" : "text", _v$5 = props.id, _v$6 = props.invalid, _v$7 = props.errorId, _v$8 = props.placeholder;
997
982
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
998
983
  _p$.t = style(_el$, _v$2, _p$.t);
999
984
  _v$3 !== _p$.a && setAttribute(_el$, "autocomplete", _p$.a = _v$3);
@@ -1001,6 +986,7 @@ function TextBox(props) {
1001
986
  _v$5 !== _p$.i && setAttribute(_el$, "id", _p$.i = _v$5);
1002
987
  _v$6 !== _p$.n && setAttribute(_el$, "aria-invalid", _p$.n = _v$6);
1003
988
  _v$7 !== _p$.s && setAttribute(_el$, "aria-errormessage", _p$.s = _v$7);
989
+ _v$8 !== _p$.h && setAttribute(_el$, "placeholder", _p$.h = _v$8);
1004
990
  return _p$;
1005
991
  }, {
1006
992
  e: void 0,
@@ -1009,7 +995,8 @@ function TextBox(props) {
1009
995
  o: void 0,
1010
996
  i: void 0,
1011
997
  n: void 0,
1012
- s: void 0
998
+ s: void 0,
999
+ h: void 0
1013
1000
  });
1014
1001
  createRenderEffect(() => _el$.value = props.value);
1015
1002
  return _el$;
@@ -1,5 +1,4 @@
1
1
  import { Accessor } from 'solid-js';
2
-
3
2
  type Options<Fields, Errors, Success, Failure> = {
4
3
  initiator: () => Fields;
5
4
  validator: (fields: Fields) => Errors;
@@ -1,5 +1,4 @@
1
1
  import { Accessor } from 'solid-js';
2
-
3
2
  /**
4
3
  * Create a readonly signal that is recomputed at regular intervals
5
4
  *
@@ -1,5 +1,4 @@
1
1
  import { Accessor } from 'solid-js';
2
-
3
2
  type Size = {
4
3
  width: number;
5
4
  height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lundal/zed-solid",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
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.13",
21
+ "@solidjs/router": "0.15",
22
22
  "solid-js": "1",
23
23
  "prettier": "3",
24
24
  "typescript": "5",
25
- "vite": "5",
26
- "vite-plugin-dts": "3",
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": "0.13",
32
- "solid-js": "1"
31
+ "@solidjs/router": "*",
32
+ "solid-js": "*"
33
33
  },
34
34
  "optionalDependencies": {
35
35
  "@fortawesome/free-solid-svg-icons": "6"
File without changes