@auldrant/ui 0.0.0 → 0.5.1
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/auldrant-ui.css +1 -1
- package/dist/auldrant-ui.js +461 -340
- package/dist/components/Form.d.ts +2 -0
- package/dist/components/FormField.d.ts +4 -0
- package/dist/components/RadioGroup.d.ts +2 -0
- package/dist/components/Table.d.ts +2 -0
- package/dist/scripts/types.d.ts +2 -0
- package/dist/scripts/utils.d.ts +18 -0
- package/package.json +20 -5
- package/CHANGELOG.md +0 -58
package/dist/auldrant-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._button_4gn7y_1{padding:.5em 1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-primary);color:var(--aui-color-background);font:inherit;cursor:pointer}._button_4gn7y_1:hover{background:var(--aui-color-primary-hover)}._card_awzw5_1{display:grid;gap:.5em;padding:1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-surface)}.
|
|
1
|
+
._button_4gn7y_1{padding:.5em 1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-primary);color:var(--aui-color-background);font:inherit;cursor:pointer}._button_4gn7y_1:hover{background:var(--aui-color-primary-hover)}._card_awzw5_1{display:grid;gap:.5em;padding:1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-surface)}._field_17xwz_1{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.5em}._error_17xwz_12{grid-column:2}._form_jr324_1{display:grid;gap:1em}._actions_jr324_6{display:grid;grid-auto-flow:column;justify-content:start;gap:.5em}._status_jr324_13{margin:0;font-size:.875em;color:var(--aui-color-text-muted)}._field_7l9ux_1{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:.5em}._label_7l9ux_8{padding-top:.25em}._required_7l9ux_12{color:var(--aui-color-error)}._error_7l9ux_16{grid-column:2}._nav_778nl_1{display:grid;gap:.5em}._title_778nl_6{font-weight:700}._wrapper_1mu6v_1{display:grid;grid-template-columns:1fr auto}._input_1mu6v_6{border-top-right-radius:0;border-bottom-right-radius:0;border-right:none}._toggle_1mu6v_13{padding:.375em .75em;border:1px solid var(--aui-color-border);border-top-right-radius:.25em;border-bottom-right-radius:.25em;background:var(--aui-color-background);color:var(--aui-color-text);font:inherit;font-size:.875em;cursor:pointer}._toggle_1mu6v_13:hover:not(:disabled){background:var(--aui-color-background-hover, var(--aui-color-background))}._fieldset_lymkd_1{border:none;padding:0}._legend_lymkd_6{font-weight:700;margin-bottom:.5em}._option_lymkd_11{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.5em;margin-bottom:.25em}._section_4nogy_1{display:grid;gap:1em}._skip_xbsul_1{position:absolute;top:-100%;left:0;padding:.5em 1em;background:var(--aui-color-background);color:var(--aui-color-primary);z-index:1000}._skip_xbsul_1:focus{top:0}._table_dls60_1{width:100%;border-collapse:collapse}._caption_dls60_6{text-align:left;padding:.5em 0;font-weight:700}._table_dls60_1 th,._table_dls60_1 td{padding:.5em;text-align:left;border-bottom:1px solid var(--aui-color-border)}._table_dls60_1 th{font-weight:700;color:var(--aui-color-text)}._table_dls60_1 td{color:var(--aui-color-text)}._focus-ring_4u8pk_3:focus-visible{outline:2px solid var(--aui-color-focus-ring);outline-offset:2px}._disabled_4u8pk_8:disabled{opacity:.5;cursor:not-allowed}._text-input_4u8pk_13{padding:.375em .5em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-background);color:var(--aui-color-text);font:inherit}._link_4u8pk_22{color:var(--aui-color-primary);text-decoration:underline;cursor:pointer}._link_4u8pk_22:hover{color:var(--aui-color-primary-hover)}._check-input_4u8pk_32{accent-color:var(--aui-color-primary)}._field-error_4u8pk_36{margin:0;font-size:.875em;color:var(--aui-color-error)}._visually-hidden_4u8pk_42{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._wrapper_1kyv1_1{display:grid;gap:.25em}._textarea_1kyv1_6{resize:vertical}._counter_1kyv1_11{justify-self:end;font-size:.875em;color:var(--aui-color-text-muted)}._theme_13mb7_1{display:contents}
|
package/dist/auldrant-ui.js
CHANGED
|
@@ -1,424 +1,545 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { signal as
|
|
4
|
-
function
|
|
1
|
+
import { jsx as r, jsxs as b, Fragment as W } from "preact/jsx-runtime";
|
|
2
|
+
import { useId as f } from "preact/hooks";
|
|
3
|
+
import { signal as j, useSignal as x, effect as M } from "@preact/signals";
|
|
4
|
+
function m(...t) {
|
|
5
5
|
return t.filter(Boolean).join(" ");
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
function g(...t) {
|
|
8
|
+
return t.filter(Boolean).join(" ") || void 0;
|
|
9
|
+
}
|
|
10
|
+
const V = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", J = {
|
|
11
|
+
button: V
|
|
12
|
+
}, D = (t) => {
|
|
13
|
+
const { label: e, onClick: n, type: s = "button", disabled: l, class: c } = t;
|
|
14
|
+
return /* @__PURE__ */ r("button", { type: s, class: m(J.button, c), onClick: n, disabled: l, children: e });
|
|
15
|
+
}, K = "_card_awzw5_1", Q = {
|
|
16
|
+
card: K
|
|
17
|
+
}, Ye = (t) => {
|
|
18
|
+
const { children: e, class: n } = t;
|
|
19
|
+
return /* @__PURE__ */ r("div", { class: m(Q.card, n), children: e });
|
|
20
|
+
}, X = "_field_17xwz_1", Y = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Z = "_error_17xwz_12 _field-error_4u8pk_36", q = {
|
|
21
|
+
field: X,
|
|
22
|
+
input: Y,
|
|
23
|
+
error: Z
|
|
24
|
+
}, Ze = (t) => {
|
|
25
|
+
const { label: e, name: n, checked: s, required: l, disabled: c, error: a, onChange: d, class: i } = t, h = f(), p = `${h}-error`;
|
|
26
|
+
return /* @__PURE__ */ b("div", { class: m(q.field, i), children: [
|
|
27
|
+
/* @__PURE__ */ r(
|
|
24
28
|
"input",
|
|
25
29
|
{
|
|
26
|
-
id:
|
|
27
|
-
class:
|
|
30
|
+
id: h,
|
|
31
|
+
class: q.input,
|
|
28
32
|
type: "checkbox",
|
|
29
|
-
name:
|
|
30
|
-
checked:
|
|
31
|
-
required:
|
|
33
|
+
name: n,
|
|
34
|
+
checked: s,
|
|
35
|
+
required: l,
|
|
32
36
|
disabled: c,
|
|
33
|
-
|
|
37
|
+
"aria-invalid": !!a || void 0,
|
|
38
|
+
"aria-describedby": g(a && p),
|
|
39
|
+
onChange: d && ((u) => d(u.target.checked))
|
|
34
40
|
}
|
|
35
41
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ r("label", { for: h, children: e }),
|
|
43
|
+
a && /* @__PURE__ */ r("p", { id: p, class: q.error, role: "alert", children: a })
|
|
37
44
|
] });
|
|
38
|
-
},
|
|
39
|
-
link:
|
|
40
|
-
},
|
|
41
|
-
const { href: e, fileName:
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
},
|
|
44
|
-
form:
|
|
45
|
-
actions:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
}, ee = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", te = {
|
|
46
|
+
link: ee
|
|
47
|
+
}, et = (t) => {
|
|
48
|
+
const { href: e, fileName: n, label: s, class: l } = t;
|
|
49
|
+
return /* @__PURE__ */ r("a", { href: e, download: n, class: m(te.link, l), children: s });
|
|
50
|
+
}, ne = "_form_jr324_1", se = "_actions_jr324_6", le = "_status_jr324_13", L = {
|
|
51
|
+
form: ne,
|
|
52
|
+
actions: se,
|
|
53
|
+
status: le
|
|
54
|
+
}, tt = (t) => {
|
|
55
|
+
const {
|
|
56
|
+
onSubmit: e,
|
|
57
|
+
submitLabel: n = "Submit",
|
|
58
|
+
resetLabel: s,
|
|
59
|
+
status: l,
|
|
60
|
+
children: c,
|
|
61
|
+
class: a
|
|
62
|
+
} = t;
|
|
63
|
+
return /* @__PURE__ */ b(
|
|
49
64
|
"form",
|
|
50
65
|
{
|
|
51
|
-
class:
|
|
52
|
-
onSubmit: (
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
e(
|
|
66
|
+
class: m(L.form, a),
|
|
67
|
+
onSubmit: (d) => {
|
|
68
|
+
d.preventDefault();
|
|
69
|
+
const i = new FormData(d.currentTarget);
|
|
70
|
+
e(i);
|
|
56
71
|
},
|
|
57
72
|
children: [
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
] })
|
|
73
|
+
c,
|
|
74
|
+
/* @__PURE__ */ b("div", { class: L.actions, children: [
|
|
75
|
+
/* @__PURE__ */ r(D, { type: "submit", label: n }),
|
|
76
|
+
s && /* @__PURE__ */ r(D, { type: "reset", label: s })
|
|
77
|
+
] }),
|
|
78
|
+
l && /* @__PURE__ */ r("output", { class: L.status, children: l })
|
|
63
79
|
]
|
|
64
80
|
}
|
|
65
81
|
);
|
|
66
|
-
},
|
|
67
|
-
field:
|
|
68
|
-
label:
|
|
69
|
-
required:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
}, re = "_field_7l9ux_1", ae = "_label_7l9ux_8", ce = "_required_7l9ux_12", oe = "_error_7l9ux_16 _field-error_4u8pk_36", S = {
|
|
83
|
+
field: re,
|
|
84
|
+
label: ae,
|
|
85
|
+
required: ce,
|
|
86
|
+
error: oe
|
|
87
|
+
}, w = (t) => {
|
|
88
|
+
const { for: e, label: n, required: s, error: l, errorId: c, children: a, class: d } = t;
|
|
89
|
+
return /* @__PURE__ */ b("div", { class: m(S.field, d), children: [
|
|
90
|
+
/* @__PURE__ */ b("label", { class: S.label, for: e, children: [
|
|
91
|
+
n,
|
|
75
92
|
":",
|
|
76
|
-
|
|
93
|
+
s && /* @__PURE__ */ b("span", { class: S.required, "aria-hidden": "true", children: [
|
|
77
94
|
" ",
|
|
78
95
|
"*"
|
|
79
96
|
] })
|
|
80
97
|
] }),
|
|
81
|
-
|
|
98
|
+
a,
|
|
99
|
+
l && /* @__PURE__ */ r("p", { id: c, class: S.error, role: "alert", children: l })
|
|
82
100
|
] });
|
|
83
|
-
},
|
|
84
|
-
input:
|
|
85
|
-
},
|
|
101
|
+
}, ie = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", de = {
|
|
102
|
+
input: ie
|
|
103
|
+
}, ue = {
|
|
86
104
|
email: "email",
|
|
87
105
|
tel: "tel",
|
|
88
106
|
url: "url"
|
|
89
|
-
},
|
|
107
|
+
}, nt = (t) => {
|
|
90
108
|
const {
|
|
91
109
|
label: e,
|
|
92
|
-
name:
|
|
93
|
-
type:
|
|
94
|
-
value:
|
|
110
|
+
name: n,
|
|
111
|
+
type: s = "text",
|
|
112
|
+
value: l,
|
|
95
113
|
placeholder: c,
|
|
96
|
-
maxLength:
|
|
114
|
+
maxLength: a,
|
|
97
115
|
autocomplete: d,
|
|
98
|
-
readOnly:
|
|
99
|
-
pattern:
|
|
100
|
-
required:
|
|
101
|
-
disabled:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
readOnly: i,
|
|
117
|
+
pattern: h,
|
|
118
|
+
required: p,
|
|
119
|
+
disabled: u,
|
|
120
|
+
error: _,
|
|
121
|
+
onInput: o,
|
|
122
|
+
class: v
|
|
123
|
+
} = t, k = f(), y = `${k}-error`;
|
|
124
|
+
return /* @__PURE__ */ r(
|
|
125
|
+
w,
|
|
107
126
|
{
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
label: e,
|
|
128
|
+
for: k,
|
|
129
|
+
required: p,
|
|
130
|
+
error: _,
|
|
131
|
+
errorId: y,
|
|
132
|
+
class: v,
|
|
133
|
+
children: /* @__PURE__ */ r(
|
|
134
|
+
"input",
|
|
135
|
+
{
|
|
136
|
+
id: k,
|
|
137
|
+
class: de.input,
|
|
138
|
+
type: s,
|
|
139
|
+
name: n,
|
|
140
|
+
value: l,
|
|
141
|
+
placeholder: c,
|
|
142
|
+
maxLength: a,
|
|
143
|
+
autoComplete: d ?? ue[s],
|
|
144
|
+
readOnly: i,
|
|
145
|
+
pattern: h,
|
|
146
|
+
required: p,
|
|
147
|
+
disabled: u,
|
|
148
|
+
"aria-invalid": !!_ || void 0,
|
|
149
|
+
"aria-describedby": g(_ && y),
|
|
150
|
+
onInput: o && ((I) => o(I.target.value))
|
|
151
|
+
}
|
|
152
|
+
)
|
|
121
153
|
}
|
|
122
|
-
)
|
|
123
|
-
},
|
|
124
|
-
function
|
|
154
|
+
);
|
|
155
|
+
}, P = j(window.location.pathname), A = j(window.location.hash.slice(1));
|
|
156
|
+
function _e(t) {
|
|
125
157
|
const e = t.indexOf("#");
|
|
126
|
-
let
|
|
127
|
-
e >= 0 && (
|
|
128
|
-
const
|
|
129
|
-
let c = "",
|
|
130
|
-
return
|
|
158
|
+
let n = "", s = t;
|
|
159
|
+
e >= 0 && (n = t.slice(e + 1), s = t.slice(0, e));
|
|
160
|
+
const l = s.indexOf("?");
|
|
161
|
+
let c = "", a = s;
|
|
162
|
+
return l >= 0 && (c = s.slice(l), a = s.slice(0, l)), { pathname: a || "/", search: c, hash: n };
|
|
131
163
|
}
|
|
132
|
-
function
|
|
133
|
-
const { pathname:
|
|
134
|
-
e?.replace ? history.replaceState(null, "", c) : history.pushState(null, "", c),
|
|
164
|
+
function pe(t, e) {
|
|
165
|
+
const { pathname: n, search: s, hash: l } = _e(t), c = n + s + (l ? `#${l}` : "");
|
|
166
|
+
e?.replace ? history.replaceState(null, "", c) : history.pushState(null, "", c), P.value = n, A.value = l;
|
|
135
167
|
}
|
|
136
168
|
window.addEventListener("popstate", () => {
|
|
137
|
-
|
|
169
|
+
P.value = window.location.pathname, A.value = window.location.hash.slice(1);
|
|
138
170
|
});
|
|
139
|
-
const
|
|
140
|
-
link:
|
|
171
|
+
const he = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", F = {
|
|
172
|
+
link: he
|
|
141
173
|
};
|
|
142
|
-
function
|
|
174
|
+
function be(t) {
|
|
143
175
|
try {
|
|
144
176
|
return new URL(t, window.location.href).origin !== window.location.origin;
|
|
145
177
|
} catch {
|
|
146
178
|
return !1;
|
|
147
179
|
}
|
|
148
180
|
}
|
|
149
|
-
const
|
|
150
|
-
const { href: e, children:
|
|
151
|
-
return
|
|
181
|
+
const st = (t) => {
|
|
182
|
+
const { href: e, children: n, external: s, class: l } = t;
|
|
183
|
+
return s ?? be(e) ? /* @__PURE__ */ r("a", { href: e, class: m(F.link, l), rel: "noopener noreferrer", children: n }) : /* @__PURE__ */ r(
|
|
152
184
|
"a",
|
|
153
185
|
{
|
|
154
186
|
href: e,
|
|
155
|
-
class:
|
|
156
|
-
onClick: (
|
|
157
|
-
|
|
187
|
+
class: m(F.link, l),
|
|
188
|
+
onClick: (a) => {
|
|
189
|
+
a.preventDefault(), pe(e);
|
|
158
190
|
},
|
|
159
|
-
children:
|
|
191
|
+
children: n
|
|
160
192
|
}
|
|
161
193
|
);
|
|
162
|
-
},
|
|
163
|
-
nav:
|
|
164
|
-
title:
|
|
165
|
-
},
|
|
166
|
-
const { title: e, children:
|
|
167
|
-
return /* @__PURE__ */
|
|
168
|
-
e && /* @__PURE__ */
|
|
169
|
-
|
|
194
|
+
}, me = "_nav_778nl_1", ve = "_title_778nl_6", O = {
|
|
195
|
+
nav: me,
|
|
196
|
+
title: ve
|
|
197
|
+
}, lt = (t) => {
|
|
198
|
+
const { title: e, children: n, class: s } = t, l = f();
|
|
199
|
+
return /* @__PURE__ */ b("nav", { class: m(O.nav, s), "aria-labelledby": e ? l : void 0, children: [
|
|
200
|
+
e && /* @__PURE__ */ r("h2", { id: l, class: O.title, children: e }),
|
|
201
|
+
n
|
|
170
202
|
] });
|
|
171
|
-
},
|
|
172
|
-
input:
|
|
173
|
-
},
|
|
203
|
+
}, fe = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", ke = {
|
|
204
|
+
input: fe
|
|
205
|
+
}, rt = (t) => {
|
|
174
206
|
const {
|
|
175
207
|
label: e,
|
|
176
|
-
name:
|
|
177
|
-
min:
|
|
178
|
-
max:
|
|
208
|
+
name: n,
|
|
209
|
+
min: s,
|
|
210
|
+
max: l,
|
|
179
211
|
step: c,
|
|
180
|
-
value:
|
|
212
|
+
value: a,
|
|
181
213
|
placeholder: d,
|
|
182
|
-
required:
|
|
183
|
-
disabled:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
214
|
+
required: i,
|
|
215
|
+
disabled: h,
|
|
216
|
+
error: p,
|
|
217
|
+
onInput: u,
|
|
218
|
+
class: _
|
|
219
|
+
} = t, o = f(), v = `${o}-error`;
|
|
220
|
+
return /* @__PURE__ */ r(
|
|
221
|
+
w,
|
|
189
222
|
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
223
|
+
label: e,
|
|
224
|
+
for: o,
|
|
225
|
+
required: i,
|
|
226
|
+
error: p,
|
|
227
|
+
errorId: v,
|
|
228
|
+
class: _,
|
|
229
|
+
children: /* @__PURE__ */ r(
|
|
230
|
+
"input",
|
|
231
|
+
{
|
|
232
|
+
id: o,
|
|
233
|
+
class: ke.input,
|
|
234
|
+
type: "number",
|
|
235
|
+
name: n,
|
|
236
|
+
min: s,
|
|
237
|
+
max: l,
|
|
238
|
+
step: c,
|
|
239
|
+
value: a,
|
|
240
|
+
placeholder: d,
|
|
241
|
+
required: i,
|
|
242
|
+
disabled: h,
|
|
243
|
+
"aria-invalid": !!p || void 0,
|
|
244
|
+
"aria-describedby": g(p && v),
|
|
245
|
+
onInput: u && ((k) => u(k.target.valueAsNumber))
|
|
246
|
+
}
|
|
247
|
+
)
|
|
202
248
|
}
|
|
203
|
-
)
|
|
204
|
-
},
|
|
205
|
-
wrapper:
|
|
206
|
-
input:
|
|
207
|
-
toggle:
|
|
208
|
-
},
|
|
249
|
+
);
|
|
250
|
+
}, ge = "_wrapper_1mu6v_1", ye = "_input_1mu6v_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", $e = "_toggle_1mu6v_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", T = {
|
|
251
|
+
wrapper: ge,
|
|
252
|
+
input: ye,
|
|
253
|
+
toggle: $e
|
|
254
|
+
}, xe = {
|
|
209
255
|
current: "current-password",
|
|
210
256
|
new: "new-password"
|
|
211
|
-
},
|
|
257
|
+
}, at = (t) => {
|
|
212
258
|
const {
|
|
213
259
|
label: e,
|
|
214
|
-
name:
|
|
215
|
-
purpose:
|
|
216
|
-
value:
|
|
260
|
+
name: n,
|
|
261
|
+
purpose: s,
|
|
262
|
+
value: l,
|
|
217
263
|
placeholder: c,
|
|
218
|
-
required:
|
|
264
|
+
required: a,
|
|
219
265
|
disabled: d,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
disabled: d,
|
|
236
|
-
onInput: u && ((p) => u(p.target.value))
|
|
237
|
-
}
|
|
238
|
-
),
|
|
239
|
-
/* @__PURE__ */ a(
|
|
240
|
-
"button",
|
|
241
|
-
{
|
|
242
|
-
type: "button",
|
|
243
|
-
class: y.toggle,
|
|
244
|
-
disabled: d,
|
|
245
|
-
onClick: () => {
|
|
246
|
-
i.value = !i.value;
|
|
247
|
-
},
|
|
248
|
-
children: i.value ? "Hide password" : "Show password"
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] }) });
|
|
252
|
-
}, de = "_fieldset_19vke_1", ue = "_legend_19vke_6", _e = "_option_19vke_11", pe = "_input_19vke_19 _check-input_4m0e1_32 _focus-ring_4m0e1_3", w = {
|
|
253
|
-
fieldset: de,
|
|
254
|
-
legend: ue,
|
|
255
|
-
option: _e,
|
|
256
|
-
input: pe
|
|
257
|
-
}, ze = (t) => {
|
|
258
|
-
const { legend: e, name: l, options: n, value: s, required: c, disabled: o, onChange: d, class: u } = t, m = b();
|
|
259
|
-
return /* @__PURE__ */ _("fieldset", { class: h(w.fieldset, u), children: [
|
|
260
|
-
/* @__PURE__ */ a("legend", { class: w.legend, children: e }),
|
|
261
|
-
n.map((r) => {
|
|
262
|
-
const i = `${m}-${r.value}`;
|
|
263
|
-
return /* @__PURE__ */ _("div", { class: w.option, children: [
|
|
264
|
-
/* @__PURE__ */ a(
|
|
266
|
+
error: i,
|
|
267
|
+
onInput: h,
|
|
268
|
+
class: p
|
|
269
|
+
} = t, u = f(), _ = `${u}-error`, o = x(!1);
|
|
270
|
+
return /* @__PURE__ */ r(
|
|
271
|
+
w,
|
|
272
|
+
{
|
|
273
|
+
label: e,
|
|
274
|
+
for: u,
|
|
275
|
+
required: a,
|
|
276
|
+
error: i,
|
|
277
|
+
errorId: _,
|
|
278
|
+
class: p,
|
|
279
|
+
children: /* @__PURE__ */ b("div", { class: T.wrapper, children: [
|
|
280
|
+
/* @__PURE__ */ r(
|
|
265
281
|
"input",
|
|
266
282
|
{
|
|
267
|
-
id:
|
|
268
|
-
class:
|
|
269
|
-
type: "
|
|
270
|
-
name:
|
|
271
|
-
value:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
283
|
+
id: u,
|
|
284
|
+
class: T.input,
|
|
285
|
+
type: o.value ? "text" : "password",
|
|
286
|
+
name: n,
|
|
287
|
+
value: l,
|
|
288
|
+
placeholder: c,
|
|
289
|
+
autoComplete: xe[s],
|
|
290
|
+
required: a,
|
|
291
|
+
disabled: d,
|
|
292
|
+
"aria-invalid": !!i || void 0,
|
|
293
|
+
"aria-describedby": g(i && _),
|
|
294
|
+
onInput: h && ((v) => h(v.target.value))
|
|
276
295
|
}
|
|
277
296
|
),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
297
|
+
/* @__PURE__ */ r(
|
|
298
|
+
"button",
|
|
299
|
+
{
|
|
300
|
+
type: "button",
|
|
301
|
+
class: T.toggle,
|
|
302
|
+
disabled: d,
|
|
303
|
+
onClick: () => {
|
|
304
|
+
o.value = !o.value;
|
|
305
|
+
},
|
|
306
|
+
children: o.value ? "Hide password" : "Show password"
|
|
307
|
+
}
|
|
308
|
+
)
|
|
309
|
+
] })
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
}, we = "_fieldset_lymkd_1", Ie = "_legend_lymkd_6", Ne = "_option_lymkd_11", Ce = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", Se = "_error_lymkd_23 _field-error_4u8pk_36", $ = {
|
|
313
|
+
fieldset: we,
|
|
314
|
+
legend: Ie,
|
|
315
|
+
option: Ne,
|
|
316
|
+
input: Ce,
|
|
317
|
+
error: Se
|
|
318
|
+
}, ct = (t) => {
|
|
319
|
+
const {
|
|
320
|
+
legend: e,
|
|
321
|
+
name: n,
|
|
322
|
+
options: s,
|
|
323
|
+
value: l,
|
|
324
|
+
required: c,
|
|
325
|
+
disabled: a,
|
|
326
|
+
error: d,
|
|
327
|
+
onChange: i,
|
|
328
|
+
class: h
|
|
329
|
+
} = t, p = f(), u = `${p}-error`;
|
|
330
|
+
return /* @__PURE__ */ b(
|
|
331
|
+
"fieldset",
|
|
332
|
+
{
|
|
333
|
+
class: m($.fieldset, h),
|
|
334
|
+
"aria-invalid": !!d || void 0,
|
|
335
|
+
"aria-describedby": g(d && u),
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ r("legend", { class: $.legend, children: e }),
|
|
338
|
+
s.map((_) => {
|
|
339
|
+
const o = `${p}-${_.value}`;
|
|
340
|
+
return /* @__PURE__ */ b("div", { class: $.option, children: [
|
|
341
|
+
/* @__PURE__ */ r(
|
|
342
|
+
"input",
|
|
343
|
+
{
|
|
344
|
+
id: o,
|
|
345
|
+
class: $.input,
|
|
346
|
+
type: "radio",
|
|
347
|
+
name: n,
|
|
348
|
+
value: _.value,
|
|
349
|
+
checked: l === _.value,
|
|
350
|
+
required: c,
|
|
351
|
+
disabled: a,
|
|
352
|
+
onChange: i && (() => i(_.value))
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ r("label", { for: o, children: _.label })
|
|
356
|
+
] }, _.value);
|
|
357
|
+
}),
|
|
358
|
+
d && /* @__PURE__ */ r("p", { id: u, class: $.error, role: "alert", children: d })
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
}, ot = (t) => {
|
|
363
|
+
const { path: e, children: n } = t, s = P.value;
|
|
284
364
|
if (e.endsWith("/*")) {
|
|
285
|
-
const
|
|
286
|
-
if (!
|
|
365
|
+
const l = e.slice(0, -1);
|
|
366
|
+
if (!s.startsWith(l) && s !== l.slice(0, -1))
|
|
287
367
|
return null;
|
|
288
|
-
} else if (
|
|
368
|
+
} else if (s !== e)
|
|
289
369
|
return null;
|
|
290
|
-
return /* @__PURE__ */
|
|
291
|
-
},
|
|
292
|
-
section:
|
|
293
|
-
},
|
|
294
|
-
const { title: e, level:
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */ a
|
|
297
|
-
|
|
370
|
+
return /* @__PURE__ */ r(W, { children: n });
|
|
371
|
+
}, qe = "_section_4nogy_1", Le = {
|
|
372
|
+
section: qe
|
|
373
|
+
}, it = (t) => {
|
|
374
|
+
const { title: e, level: n = 2, children: s, class: l } = t, c = f(), a = `h${n}`;
|
|
375
|
+
return /* @__PURE__ */ b("section", { class: m(Le.section, l), "aria-labelledby": c, children: [
|
|
376
|
+
/* @__PURE__ */ r(a, { id: c, children: e }),
|
|
377
|
+
s
|
|
298
378
|
] });
|
|
299
|
-
},
|
|
300
|
-
select:
|
|
301
|
-
},
|
|
379
|
+
}, Te = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ee = {
|
|
380
|
+
select: Te
|
|
381
|
+
}, je = (t) => "options" in t, dt = (t) => {
|
|
302
382
|
const {
|
|
303
383
|
label: e,
|
|
304
|
-
name:
|
|
305
|
-
value:
|
|
306
|
-
placeholder:
|
|
384
|
+
name: n,
|
|
385
|
+
value: s,
|
|
386
|
+
placeholder: l,
|
|
307
387
|
options: c,
|
|
308
|
-
required:
|
|
388
|
+
required: a,
|
|
309
389
|
disabled: d,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
390
|
+
error: i,
|
|
391
|
+
onChange: h,
|
|
392
|
+
class: p
|
|
393
|
+
} = t, u = f(), _ = `${u}-error`;
|
|
394
|
+
return /* @__PURE__ */ r(
|
|
395
|
+
w,
|
|
315
396
|
{
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
397
|
+
label: e,
|
|
398
|
+
for: u,
|
|
399
|
+
required: a,
|
|
400
|
+
error: i,
|
|
401
|
+
errorId: _,
|
|
402
|
+
class: p,
|
|
403
|
+
children: /* @__PURE__ */ b(
|
|
404
|
+
"select",
|
|
405
|
+
{
|
|
406
|
+
id: u,
|
|
407
|
+
class: Ee.select,
|
|
408
|
+
name: n,
|
|
409
|
+
value: s,
|
|
410
|
+
required: a,
|
|
411
|
+
disabled: d,
|
|
412
|
+
"aria-invalid": !!i || void 0,
|
|
413
|
+
"aria-describedby": g(i && _),
|
|
414
|
+
onChange: h && ((o) => h(o.target.value)),
|
|
415
|
+
children: [
|
|
416
|
+
l && /* @__PURE__ */ r("option", { value: "", disabled: !0, children: l }),
|
|
417
|
+
c.map(
|
|
418
|
+
(o) => je(o) ? /* @__PURE__ */ r("optgroup", { label: o.label, children: o.options.map((v) => /* @__PURE__ */ r("option", { value: v.value, children: v.label }, v.value)) }, o.label) : /* @__PURE__ */ r("option", { value: o.value, children: o.label }, o.value)
|
|
419
|
+
)
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
)
|
|
329
423
|
}
|
|
330
|
-
)
|
|
331
|
-
},
|
|
332
|
-
skip:
|
|
333
|
-
},
|
|
334
|
-
const { target: e = "#main", label:
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
},
|
|
337
|
-
table:
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/* @__PURE__ */
|
|
424
|
+
);
|
|
425
|
+
}, Pe = "_skip_xbsul_1 _focus-ring_4u8pk_3", He = {
|
|
426
|
+
skip: Pe
|
|
427
|
+
}, ut = (t) => {
|
|
428
|
+
const { target: e = "#main", label: n = "Skip to main content", class: s } = t;
|
|
429
|
+
return /* @__PURE__ */ r("a", { href: e, class: m(He.skip, s), children: n });
|
|
430
|
+
}, Be = "_table_dls60_1", De = "_caption_dls60_6", R = {
|
|
431
|
+
table: Be,
|
|
432
|
+
caption: De
|
|
433
|
+
}, _t = (t) => {
|
|
434
|
+
const { caption: e, headers: n, data: s, class: l } = t;
|
|
435
|
+
return /* @__PURE__ */ b("table", { class: m(R.table, l), children: [
|
|
436
|
+
/* @__PURE__ */ r("caption", { class: R.caption, children: e }),
|
|
437
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: n.map((c, a) => /* @__PURE__ */ r("th", { scope: "col", children: c }, `${c}-${a}`)) }) }),
|
|
438
|
+
/* @__PURE__ */ r("tbody", { children: s.map((c, a) => /* @__PURE__ */ r("tr", { children: c.map((d, i) => /* @__PURE__ */ r("td", { children: d }, `${n[i]}-${a}-${i}`)) }, a)) })
|
|
343
439
|
] });
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
440
|
+
}, Fe = "_hidden_19nib_1 _visually-hidden_4u8pk_42", Oe = {
|
|
441
|
+
hidden: Fe
|
|
442
|
+
}, Re = (t) => {
|
|
443
|
+
const { children: e } = t;
|
|
444
|
+
return /* @__PURE__ */ r("span", { class: Oe.hidden, children: e });
|
|
445
|
+
}, ze = "_wrapper_1kyv1_1", Ae = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ue = "_counter_1kyv1_11", E = {
|
|
446
|
+
wrapper: ze,
|
|
447
|
+
textarea: Ae,
|
|
448
|
+
counter: Ue
|
|
449
|
+
}, z = [75, 90, 100], Ge = 10;
|
|
450
|
+
function We(t) {
|
|
451
|
+
for (let e = z.length - 1; e >= 0; e--) {
|
|
452
|
+
const n = z[e];
|
|
453
|
+
if (n !== void 0 && t >= n)
|
|
454
|
+
return n;
|
|
455
|
+
}
|
|
456
|
+
return 0;
|
|
457
|
+
}
|
|
458
|
+
const pt = (t) => {
|
|
349
459
|
const {
|
|
350
460
|
label: e,
|
|
351
|
-
name:
|
|
352
|
-
maxChars:
|
|
353
|
-
value:
|
|
461
|
+
name: n,
|
|
462
|
+
maxChars: s,
|
|
463
|
+
value: l,
|
|
354
464
|
placeholder: c,
|
|
355
|
-
required:
|
|
465
|
+
required: a,
|
|
356
466
|
disabled: d,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
467
|
+
error: i,
|
|
468
|
+
onInput: h,
|
|
469
|
+
class: p
|
|
470
|
+
} = t, u = f(), _ = `${u}-error`, o = `${u}-counter`, v = x(l?.length ?? 0), k = x(""), y = x(0), I = x(!1);
|
|
471
|
+
return /* @__PURE__ */ r(
|
|
472
|
+
w,
|
|
473
|
+
{
|
|
474
|
+
label: e,
|
|
475
|
+
for: u,
|
|
476
|
+
required: a,
|
|
477
|
+
error: i,
|
|
478
|
+
errorId: _,
|
|
479
|
+
class: p,
|
|
480
|
+
children: /* @__PURE__ */ b("div", { class: E.wrapper, children: [
|
|
481
|
+
/* @__PURE__ */ r(
|
|
482
|
+
"textarea",
|
|
483
|
+
{
|
|
484
|
+
id: u,
|
|
485
|
+
class: E.textarea,
|
|
486
|
+
name: n,
|
|
487
|
+
maxLength: s,
|
|
488
|
+
placeholder: c,
|
|
489
|
+
required: a,
|
|
490
|
+
disabled: d,
|
|
491
|
+
"aria-invalid": !!i || void 0,
|
|
492
|
+
"aria-describedby": g(i && _, o),
|
|
493
|
+
onInput: (U) => {
|
|
494
|
+
const N = U.target.value;
|
|
495
|
+
v.value = N.length;
|
|
496
|
+
const C = s - N.length, G = N.length / s * 100, H = We(G), B = !I.value && C <= Ge && C > 0;
|
|
497
|
+
(H > y.value || B) && (k.value = `${C} character${C === 1 ? "" : "s"} remaining`, y.value = H, B && (I.value = !0)), h?.(N);
|
|
498
|
+
},
|
|
499
|
+
children: l
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ b("span", { id: o, class: E.counter, children: [
|
|
503
|
+
v,
|
|
504
|
+
" / ",
|
|
505
|
+
s
|
|
506
|
+
] }),
|
|
507
|
+
/* @__PURE__ */ r(Re, { children: /* @__PURE__ */ r("span", { "aria-live": "polite", children: k }) })
|
|
508
|
+
] })
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
}, Me = "_theme_13mb7_1", Ve = {
|
|
512
|
+
theme: Me
|
|
513
|
+
}, ht = (t) => {
|
|
514
|
+
const { children: e, class: n } = t;
|
|
515
|
+
return /* @__PURE__ */ r("div", { class: m(Ve.theme, n), children: e });
|
|
516
|
+
}, Je = j(document.title);
|
|
517
|
+
M(() => {
|
|
518
|
+
document.title = Je.value;
|
|
398
519
|
});
|
|
399
520
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
521
|
+
D as Button,
|
|
522
|
+
Ye as Card,
|
|
523
|
+
Ze as Checkbox,
|
|
524
|
+
et as DownloadLink,
|
|
525
|
+
tt as Form,
|
|
526
|
+
nt as Input,
|
|
527
|
+
st as Link,
|
|
528
|
+
lt as Nav,
|
|
529
|
+
rt as NumberInput,
|
|
530
|
+
at as PasswordInput,
|
|
531
|
+
ct as RadioGroup,
|
|
532
|
+
ot as Route,
|
|
533
|
+
it as Section,
|
|
534
|
+
dt as Select,
|
|
535
|
+
ut as SkipLink,
|
|
536
|
+
_t as Table,
|
|
537
|
+
pt as Textarea,
|
|
538
|
+
ht as Theme,
|
|
539
|
+
Re as VisuallyHidden,
|
|
540
|
+
m as cx,
|
|
541
|
+
A as hash,
|
|
542
|
+
P as location,
|
|
543
|
+
pe as navigate,
|
|
544
|
+
Je as title
|
|
424
545
|
};
|
|
@@ -8,6 +8,8 @@ interface IFormProps extends IBaseProps {
|
|
|
8
8
|
submitLabel?: string;
|
|
9
9
|
/** Label for the optional reset button. Omit to hide. */
|
|
10
10
|
resetLabel?: string;
|
|
11
|
+
/** Status message displayed after submission (e.g., success/failure feedback). */
|
|
12
|
+
status?: string;
|
|
11
13
|
/** Form field children. */
|
|
12
14
|
children: ComponentChildren;
|
|
13
15
|
}
|
|
@@ -8,6 +8,10 @@ interface IFormFieldProps extends IBaseProps {
|
|
|
8
8
|
for: string;
|
|
9
9
|
/** Whether the field shows a required indicator. Accepts `undefined` for prop forwarding. */
|
|
10
10
|
required?: boolean | undefined;
|
|
11
|
+
/** Error message to display below the input. Accepts `undefined` for prop forwarding. */
|
|
12
|
+
error?: string | undefined;
|
|
13
|
+
/** ID for the error message element (used for aria-describedby on the input). Accepts `undefined` for prop forwarding. */
|
|
14
|
+
errorId?: string | undefined;
|
|
11
15
|
/** Field input element(s). */
|
|
12
16
|
children: ComponentChildren;
|
|
13
17
|
}
|
|
@@ -21,6 +21,8 @@ interface IRadioGroupProps extends IBaseProps {
|
|
|
21
21
|
required?: boolean;
|
|
22
22
|
/** Whether the group is disabled. */
|
|
23
23
|
disabled?: boolean;
|
|
24
|
+
/** Error message. When set, renders an error message and marks the fieldset as invalid. */
|
|
25
|
+
error?: string;
|
|
24
26
|
/** Called with the selected value on change. */
|
|
25
27
|
onChange?: (value: string) => void;
|
|
26
28
|
}
|
|
@@ -2,6 +2,8 @@ import { IBaseProps } from '../scripts/types';
|
|
|
2
2
|
import { ComponentChildren, FunctionComponent } from 'preact';
|
|
3
3
|
/** Props for {@link Table}. */
|
|
4
4
|
interface ITableProps extends IBaseProps {
|
|
5
|
+
/** Accessible table name. Rendered as a `<caption>` element. */
|
|
6
|
+
caption: string;
|
|
5
7
|
/** Column header labels. */
|
|
6
8
|
headers: string[];
|
|
7
9
|
/** Row data as a 2D array of renderable content. */
|
package/dist/scripts/types.d.ts
CHANGED
package/dist/scripts/utils.d.ts
CHANGED
|
@@ -33,3 +33,21 @@
|
|
|
33
33
|
* @returns Space-separated class string, or empty string if no truthy values.
|
|
34
34
|
*/
|
|
35
35
|
export declare function cx(...classes: (string | false | undefined)[]): string;
|
|
36
|
+
/**
|
|
37
|
+
* Compose `aria-describedby` from a list of element IDs, filtering falsy values.
|
|
38
|
+
*
|
|
39
|
+
* Returns `undefined` when no truthy IDs remain — this keeps the attribute off the
|
|
40
|
+
* element entirely rather than rendering an empty string.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* // Single description
|
|
44
|
+
* describeBy(error && errorId) // "field-error" | undefined
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Multiple descriptions
|
|
48
|
+
* describeBy(error && errorId, counterId) // "field-error counter" | undefined
|
|
49
|
+
*
|
|
50
|
+
* @param ids - IDs to compose. `false` and `undefined` values are filtered out.
|
|
51
|
+
* @returns Space-separated ID string, or `undefined` if empty.
|
|
52
|
+
*/
|
|
53
|
+
export declare function describeBy(...ids: (string | false | undefined)[]): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auldrant/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Accessible Preact component library with design tokens and CSS modules",
|
|
6
6
|
"author": "Colonel Jade",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/coloneljade/auldrant-ui"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"preact",
|
|
14
|
+
"components",
|
|
15
|
+
"ui",
|
|
16
|
+
"component-library",
|
|
17
|
+
"accessibility",
|
|
18
|
+
"a11y",
|
|
19
|
+
"css-modules",
|
|
20
|
+
"design-tokens",
|
|
21
|
+
"typescript"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
10
26
|
"module": "./dist/auldrant-ui.js",
|
|
11
27
|
"types": "./dist/index.d.ts",
|
|
12
28
|
"exports": {
|
|
@@ -19,8 +35,7 @@
|
|
|
19
35
|
"files": [
|
|
20
36
|
"dist",
|
|
21
37
|
"README.md",
|
|
22
|
-
"LICENSE"
|
|
23
|
-
"CHANGELOG.md"
|
|
38
|
+
"LICENSE"
|
|
24
39
|
],
|
|
25
40
|
"sideEffects": [
|
|
26
41
|
"**/*.css"
|
package/CHANGELOG.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
-
|
|
8
|
-
## [0.4.0] - 2026-02-26
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
- **feat(test)**: add axe-core a11y test suite (19 files, setup helpers, 18 test files) ([#20](https://github.com/coloneljade/auldrant-ui/pull/20))
|
|
13
|
-
- **refactor(test)**: migrate a11y assertions out of behavioral tests (cleanup + deletions) ([#20](https://github.com/coloneljade/auldrant-ui/pull/20))
|
|
14
|
-
- **docs(rules)**: mandate AAA comments and WCAG SC references in tests ([#20](https://github.com/coloneljade/auldrant-ui/pull/20))
|
|
15
|
-
|
|
16
|
-
## [0.3.0] - 2026-02-25
|
|
17
|
-
|
|
18
|
-
### Added
|
|
19
|
-
|
|
20
|
-
- Configure Vite, TypeScript, Biome, devcontainer, and test setup ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
21
|
-
- Add routing and title signals for SPA navigation ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
22
|
-
- Shared types, utilities, and composable CSS classes ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
23
|
-
- Semantic HTML-first — native elements before ARIA ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
24
|
-
- CSS Grid layout, em-based spacing, CSS modules ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
25
|
-
- Accessible form field management (`FormField` wrapper) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
26
|
-
- SkipLink and Nav for keyboard navigation ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
27
|
-
- Type-safe component props (TypeScript strict mode) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
28
|
-
- Comprehensive test coverage (114 tests) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
29
|
-
- Pit of success design principle for component APIs ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
30
|
-
- Binary tools principle (Biome fixes, not manual edits) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
31
|
-
- Mandatory skills workflow (staging, pushing, PRs) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
32
|
-
- Import aliases (`@components`, `@scripts`, `@signals`, `@styles`) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
33
|
-
- **Head component** — meta/document head management (issue #18) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
34
|
-
- **Form data typing** — generic type parameter for typed onSubmit (issue #8) ([#7](https://github.com/coloneljade/auldrant-ui/pull/7))
|
|
35
|
-
|
|
36
|
-
## [0.2.0] - 2026-02-24
|
|
37
|
-
|
|
38
|
-
### Added
|
|
39
|
-
|
|
40
|
-
- Remove CJS output and UMD name — ESM-only library ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
41
|
-
- Fix CI publish failure by skipping lefthook in CI environment ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
42
|
-
- Add `@components` and `@styles` import path aliases (tsconfig + vite) ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
43
|
-
- Add GitHub CLI feature and YAML extension to devcontainer ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
44
|
-
- Create VSCode tasks for all project scripts (test, build, check, typecheck, storybook) ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
45
|
-
- Add component base types (BaseProps, FieldProps) and cx() class utility ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
46
|
-
|
|
47
|
-
## [0.1.0] - 2026-02-24
|
|
48
|
-
|
|
49
|
-
### Added
|
|
50
|
-
|
|
51
|
-
- Remove CJS output and UMD name — ESM-only library ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
52
|
-
- Fix CI publish failure by skipping lefthook in CI environment ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
53
|
-
- Add `@components` and `@styles` import path aliases (tsconfig + vite) ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
54
|
-
- Add GitHub CLI feature and YAML extension to devcontainer ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
55
|
-
- Create VSCode tasks for all project scripts (test, build, check, typecheck, storybook) ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
56
|
-
- Add component base types (BaseProps, FieldProps) and cx() class utility ([#6](https://github.com/coloneljade/auldrant-ui/pull/6))
|
|
57
|
-
|
|
58
|
-
## [Unreleased]
|