@auldrant/ui 0.9.0 → 0.10.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/CHANGELOG.md +15 -0
- package/dist/auldrant-ui.css +1 -1
- package/dist/auldrant-ui.js +271 -253
- package/dist/components/Table.d.ts +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.10.0] - 2026-03-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add `rowHeader` prop to render first column as `<th scope="row">` for row identification ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
13
|
+
- Add `striped` prop for alternating row backgrounds for improved scanability ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
14
|
+
- Add `dense` prop to reduce cell padding for data-dense displays ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
15
|
+
- Add `captionHidden` prop to visually hide caption while keeping it accessible ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
16
|
+
- Refactor CSS to use class-based selectors (no raw element selectors) ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
17
|
+
- Add tests for new props and axe-core a11y verification ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
18
|
+
- Expand dev test page to showcase all Table variants ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
19
|
+
- Add CSS class-selector rule to style guide ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
20
|
+
- Update `/push` skill to return to main after pushing ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
21
|
+
- Update `/pr` skill to resolve feature branch when called from main ([#57](https://github.com/coloneljade/auldrant-ui/pull/57))
|
|
22
|
+
|
|
8
23
|
## [0.9.0] - 2026-03-05
|
|
9
24
|
|
|
10
25
|
### Added
|
package/dist/auldrant-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--aui-base-primary: oklch(.78 .18 160);--aui-base-white: #f5f5f5;--aui-base-black: #1a1a1a;--aui-base-error: oklch(.78 .22 27);--aui-base-success: oklch(.78 .18 145);--_aui-fg: var(--aui-base-white);--_aui-bg: var(--aui-base-black);--aui-color-text: var(--_aui-fg);--aui-color-text-muted: color-mix(in oklch, var(--_aui-fg) 82%, var(--_aui-bg));--aui-color-background: var(--_aui-bg);--aui-color-background-hover: color-mix(in oklch, var(--_aui-bg) 92%, var(--_aui-fg));--aui-color-surface: color-mix(in oklch, var(--_aui-bg) 97%, var(--_aui-fg));--aui-color-border: color-mix(in oklch, var(--_aui-bg) 50%, var(--_aui-fg));--aui-color-primary: var(--aui-base-primary);--aui-color-primary-hover: color-mix(in oklch, var(--aui-base-primary) 85%, var(--_aui-fg));--aui-color-focus-ring: var(--aui-base-primary);--aui-color-error: var(--aui-base-error);--aui-color-success: var(--aui-base-success)}@media(prefers-color-scheme:light){:root{--_aui-fg: var(--aui-base-black);--_aui-bg: var(--aui-base-white);--aui-color-primary: color-mix(in oklch, var(--aui-base-primary) 33%, var(--_aui-fg));--aui-color-primary-hover: color-mix(in oklch, var(--aui-base-primary) 25%, var(--_aui-fg));--aui-color-focus-ring: color-mix(in oklch, var(--aui-base-primary) 33%, var(--_aui-fg));--aui-color-error: color-mix(in oklch, var(--aui-base-error) 33%, var(--_aui-fg));--aui-color-success: color-mix(in oklch, var(--aui-base-success) 33%, var(--_aui-fg))}}.aui-blue{--aui-base-primary: oklch(.78 .18 260)}.aui-purple{--aui-base-primary: oklch(.78 .18 300)}.aui-teal{--aui-base-primary: oklch(.78 .15 195)}.aui-red{--aui-base-primary: oklch(.78 .22 27)}.aui-orange{--aui-base-primary: oklch(.78 .18 55)}.aui-yellow{--aui-base-primary: oklch(.78 .18 95)}._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}._dialog_1lxj9_1{border:none;padding:0;background:transparent;color:var(--aui-color-text);max-width:min(90vw,32em);width:100%}._dialog_1lxj9_1::backdrop{background:#0000007f}._panel_1lxj9_14{display:grid;gap:1em;padding:1.5em;border:1px solid var(--aui-color-border);border-radius:.5em;background:var(--aui-color-surface)}._header_1lxj9_23{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.5em}._title_1lxj9_30{margin:0;font-size:1.25em}._close_1lxj9_35{padding:.25em .5em;border:none;background:none;color:var(--aui-color-text-muted);font:inherit;font-size:1.25em;line-height:1;cursor:pointer}._close_1lxj9_35:hover{color:var(--aui-color-text)}._body_1lxj9_51{display:grid;gap:1em}._message_1lxj9_56{margin:0}._footer_1lxj9_60{display:grid;grid-auto-flow:column;justify-content:end;gap:.5em}._action_1lxj9_67{padding:.5em 1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-surface);color:var(--aui-color-text);font:inherit;cursor:pointer}._action_1lxj9_67:hover{background:var(--aui-color-background-hover)}._primary_1lxj9_82{background:var(--aui-color-primary);color:var(--aui-color-background);border-color:var(--aui-color-primary)}._primary_1lxj9_82:hover{background:var(--aui-color-primary-hover);border-color:var(--aui-color-primary-hover)}._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_16zfv_1{position:relative}._input_16zfv_5{width:100%;padding-right:2.5em}._toggle_16zfv_11{position:absolute;right:.5em;top:50%;transform:translateY(-50%);display:grid;place-items:center;padding:.25em;border:none;background:none;color:var(--aui-color-text);cursor:pointer}._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}.
|
|
1
|
+
:root{--aui-base-primary: oklch(.78 .18 160);--aui-base-white: #f5f5f5;--aui-base-black: #1a1a1a;--aui-base-error: oklch(.78 .22 27);--aui-base-success: oklch(.78 .18 145);--_aui-fg: var(--aui-base-white);--_aui-bg: var(--aui-base-black);--aui-color-text: var(--_aui-fg);--aui-color-text-muted: color-mix(in oklch, var(--_aui-fg) 82%, var(--_aui-bg));--aui-color-background: var(--_aui-bg);--aui-color-background-hover: color-mix(in oklch, var(--_aui-bg) 92%, var(--_aui-fg));--aui-color-surface: color-mix(in oklch, var(--_aui-bg) 97%, var(--_aui-fg));--aui-color-border: color-mix(in oklch, var(--_aui-bg) 50%, var(--_aui-fg));--aui-color-primary: var(--aui-base-primary);--aui-color-primary-hover: color-mix(in oklch, var(--aui-base-primary) 85%, var(--_aui-fg));--aui-color-focus-ring: var(--aui-base-primary);--aui-color-error: var(--aui-base-error);--aui-color-success: var(--aui-base-success)}@media(prefers-color-scheme:light){:root{--_aui-fg: var(--aui-base-black);--_aui-bg: var(--aui-base-white);--aui-color-primary: color-mix(in oklch, var(--aui-base-primary) 33%, var(--_aui-fg));--aui-color-primary-hover: color-mix(in oklch, var(--aui-base-primary) 25%, var(--_aui-fg));--aui-color-focus-ring: color-mix(in oklch, var(--aui-base-primary) 33%, var(--_aui-fg));--aui-color-error: color-mix(in oklch, var(--aui-base-error) 33%, var(--_aui-fg));--aui-color-success: color-mix(in oklch, var(--aui-base-success) 33%, var(--_aui-fg))}}.aui-blue{--aui-base-primary: oklch(.78 .18 260)}.aui-purple{--aui-base-primary: oklch(.78 .18 300)}.aui-teal{--aui-base-primary: oklch(.78 .15 195)}.aui-red{--aui-base-primary: oklch(.78 .22 27)}.aui-orange{--aui-base-primary: oklch(.78 .18 55)}.aui-yellow{--aui-base-primary: oklch(.78 .18 95)}._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}._dialog_1lxj9_1{border:none;padding:0;background:transparent;color:var(--aui-color-text);max-width:min(90vw,32em);width:100%}._dialog_1lxj9_1::backdrop{background:#0000007f}._panel_1lxj9_14{display:grid;gap:1em;padding:1.5em;border:1px solid var(--aui-color-border);border-radius:.5em;background:var(--aui-color-surface)}._header_1lxj9_23{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.5em}._title_1lxj9_30{margin:0;font-size:1.25em}._close_1lxj9_35{padding:.25em .5em;border:none;background:none;color:var(--aui-color-text-muted);font:inherit;font-size:1.25em;line-height:1;cursor:pointer}._close_1lxj9_35:hover{color:var(--aui-color-text)}._body_1lxj9_51{display:grid;gap:1em}._message_1lxj9_56{margin:0}._footer_1lxj9_60{display:grid;grid-auto-flow:column;justify-content:end;gap:.5em}._action_1lxj9_67{padding:.5em 1em;border:1px solid var(--aui-color-border);border-radius:.25em;background:var(--aui-color-surface);color:var(--aui-color-text);font:inherit;cursor:pointer}._action_1lxj9_67:hover{background:var(--aui-color-background-hover)}._primary_1lxj9_82{background:var(--aui-color-primary);color:var(--aui-color-background);border-color:var(--aui-color-primary)}._primary_1lxj9_82:hover{background:var(--aui-color-primary-hover);border-color:var(--aui-color-primary-hover)}._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_16zfv_1{position:relative}._input_16zfv_5{width:100%;padding-right:2.5em}._toggle_16zfv_11{position:absolute;right:.5em;top:50%;transform:translateY(-50%);display:grid;place-items:center;padding:.25em;border:none;background:none;color:var(--aui-color-text);cursor:pointer}._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_185y9_1{width:100%;border-collapse:collapse}._caption_185y9_6{text-align:left;padding:.5em 0;font-weight:700}._headerCell_185y9_16,._cell_185y9_17{padding:.5em;text-align:left;border-bottom:1px solid var(--aui-color-border)}._head_185y9_16{background:var(--aui-color-surface);border-bottom:2px solid var(--aui-color-border)}._head_185y9_16 ._headerCell_185y9_16{border-bottom:none}._headerCell_185y9_16{font-weight:700;color:var(--aui-color-text)}._cell_185y9_17{color:var(--aui-color-text)}._row_185y9_41:hover{background:var(--aui-color-background-hover)}._striped_185y9_45 ._row_185y9_41:nth-child(2n){background:var(--aui-color-surface)}._striped_185y9_45 ._row_185y9_41:hover{background:var(--aui-color-background-hover)}._dense_185y9_53 ._headerCell_185y9_16,._dense_185y9_53 ._cell_185y9_17{padding:.25em}._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_1x47p_11{display:contents;--aui-color-text: var(--_aui-fg);--aui-color-text-muted: color-mix(in oklch, var(--_aui-fg) 82%, var(--_aui-bg));--aui-color-background: var(--_aui-bg);--aui-color-background-hover: color-mix(in oklch, var(--_aui-bg) 92%, var(--_aui-fg));--aui-color-surface: color-mix(in oklch, var(--_aui-bg) 97%, var(--_aui-fg));--aui-color-border: color-mix(in oklch, var(--_aui-bg) 50%, var(--_aui-fg));--aui-color-primary: var(--aui-base-primary);--aui-color-primary-hover: color-mix(in oklch, var(--aui-base-primary) 85%, var(--_aui-fg));--aui-color-focus-ring: var(--aui-base-primary);--aui-color-error: var(--aui-base-error);--aui-color-success: var(--aui-base-success)}
|
package/dist/auldrant-ui.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as r, jsxs as m, Fragment as se } from "preact/jsx-runtime";
|
|
2
|
-
import { useId as
|
|
3
|
-
import { signal as
|
|
4
|
-
import { h as
|
|
2
|
+
import { useId as $, useRef as P, useEffect as H } from "preact/hooks";
|
|
3
|
+
import { signal as U, useSignal as D, effect as le } from "@preact/signals";
|
|
4
|
+
import { h as K, toChildArray as re } from "preact";
|
|
5
5
|
function v(...t) {
|
|
6
6
|
return t.filter(Boolean).join(" ");
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function N(...t) {
|
|
9
9
|
return t.filter(Boolean).join(" ") || void 0;
|
|
10
10
|
}
|
|
11
11
|
const ae = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", oe = {
|
|
12
12
|
button: ae
|
|
13
|
-
},
|
|
13
|
+
}, W = (t) => {
|
|
14
14
|
const { label: e, onClick: s, type: n = "button", disabled: l, class: a } = t;
|
|
15
15
|
return /* @__PURE__ */ r("button", { type: n, class: v(oe.button, a), onClick: s, disabled: l, children: e });
|
|
16
16
|
}, ce = "_card_awzw5_1", ie = {
|
|
17
17
|
card: ce
|
|
18
|
-
},
|
|
18
|
+
}, Pt = (t) => {
|
|
19
19
|
const { children: e, class: s } = t;
|
|
20
20
|
return /* @__PURE__ */ r("div", { class: v(ie.card, s), children: e });
|
|
21
21
|
}, de = "_field_17xwz_1", ue = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", _e = "_error_17xwz_12 _field-error_4u8pk_36", T = {
|
|
22
22
|
field: de,
|
|
23
23
|
input: ue,
|
|
24
24
|
error: _e
|
|
25
|
-
},
|
|
26
|
-
const { label: e, name: s, checked: n, required: l, disabled: a, error: o, onChange: c, class: i } = t, h =
|
|
25
|
+
}, Tt = (t) => {
|
|
26
|
+
const { label: e, name: s, checked: n, required: l, disabled: a, error: o, onChange: c, class: i } = t, h = $(), d = `${h}-error`;
|
|
27
27
|
return /* @__PURE__ */ m("div", { class: v(T.field, i), children: [
|
|
28
28
|
/* @__PURE__ */ r(
|
|
29
29
|
"input",
|
|
@@ -36,12 +36,12 @@ const ae = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", oe = {
|
|
|
36
36
|
required: l,
|
|
37
37
|
disabled: a,
|
|
38
38
|
"aria-invalid": !!o || void 0,
|
|
39
|
-
"aria-describedby":
|
|
40
|
-
onChange: c && ((
|
|
39
|
+
"aria-describedby": N(o && d),
|
|
40
|
+
onChange: c && ((f) => c(f.target.checked))
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
43
|
/* @__PURE__ */ r("label", { for: h, children: e }),
|
|
44
|
-
o && /* @__PURE__ */ r("p", { id:
|
|
44
|
+
o && /* @__PURE__ */ r("p", { id: d, class: T.error, role: "alert", children: o })
|
|
45
45
|
] });
|
|
46
46
|
}, pe = "_dialog_1lxj9_1", he = "_panel_1lxj9_14", fe = "_header_1lxj9_23", me = "_title_1lxj9_30", be = "_close_1lxj9_35 _focus-ring_4u8pk_3", ve = "_body_1lxj9_51", ke = "_message_1lxj9_56", ge = "_footer_1lxj9_60", ye = "_action_1lxj9_67 _focus-ring_4u8pk_3 _disabled_4u8pk_8", we = "_primary_1lxj9_82", y = {
|
|
47
47
|
dialog: pe,
|
|
@@ -82,60 +82,60 @@ const Y = (t) => {
|
|
|
82
82
|
defaultAction: c,
|
|
83
83
|
actions: i,
|
|
84
84
|
cancelLabel: h,
|
|
85
|
-
onCancel:
|
|
86
|
-
focusCancel:
|
|
87
|
-
children:
|
|
88
|
-
class:
|
|
89
|
-
} = t, b = P(null), g = P(null),
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
}, [e,
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
85
|
+
onCancel: d,
|
|
86
|
+
focusCancel: f,
|
|
87
|
+
children: _,
|
|
88
|
+
class: u
|
|
89
|
+
} = t, b = P(null), g = P(null), C = P(null), I = $();
|
|
90
|
+
H(() => {
|
|
91
|
+
const p = b.current;
|
|
92
|
+
p && (e && !p.open ? (p.showModal(), f && C.current ? C.current.focus() : g.current && g.current.focus()) : !e && p.open && p.close());
|
|
93
|
+
}, [e, f]), H(() => {
|
|
94
|
+
const p = b.current;
|
|
95
|
+
if (!p)
|
|
96
96
|
return;
|
|
97
|
-
const k = (
|
|
98
|
-
|
|
97
|
+
const k = (L) => {
|
|
98
|
+
L.preventDefault(), l();
|
|
99
99
|
};
|
|
100
|
-
return
|
|
101
|
-
}, [l]),
|
|
102
|
-
const
|
|
103
|
-
if (!
|
|
100
|
+
return p.addEventListener("cancel", k), () => p.removeEventListener("cancel", k);
|
|
101
|
+
}, [l]), H(() => {
|
|
102
|
+
const p = b.current;
|
|
103
|
+
if (!p || !e)
|
|
104
104
|
return;
|
|
105
105
|
const k = [...i ?? [], ...c ? [c] : []];
|
|
106
106
|
if (k.length === 0)
|
|
107
107
|
return;
|
|
108
|
-
const
|
|
108
|
+
const L = k.map((w) => ({
|
|
109
109
|
parsed: xe(w.shortcut),
|
|
110
110
|
handler: w.onClick
|
|
111
|
-
})),
|
|
112
|
-
for (const { parsed:
|
|
113
|
-
if (w.key.toLowerCase() ===
|
|
111
|
+
})), j = (w) => {
|
|
112
|
+
for (const { parsed: A, handler: ne } of L)
|
|
113
|
+
if (w.key.toLowerCase() === A.key && w.ctrlKey === A.ctrl && w.shiftKey === A.shift && w.altKey === A.alt) {
|
|
114
114
|
w.preventDefault(), ne();
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
-
return
|
|
119
|
-
}, [e, i, c]),
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
118
|
+
return p.addEventListener("keydown", j), () => p.removeEventListener("keydown", j);
|
|
119
|
+
}, [e, i, c]), H(() => {
|
|
120
|
+
const p = b.current;
|
|
121
|
+
if (!p || !e || !a)
|
|
122
122
|
return;
|
|
123
|
-
const k = (
|
|
124
|
-
|
|
123
|
+
const k = (L) => {
|
|
124
|
+
L.target === p && a();
|
|
125
125
|
};
|
|
126
|
-
return
|
|
126
|
+
return p.addEventListener("click", k), () => p.removeEventListener("click", k);
|
|
127
127
|
}, [e, a]);
|
|
128
|
-
const q = c ||
|
|
128
|
+
const q = c || d || i && i.length > 0;
|
|
129
129
|
return /* @__PURE__ */ r(
|
|
130
130
|
"dialog",
|
|
131
131
|
{
|
|
132
132
|
ref: b,
|
|
133
|
-
class: v(y.dialog,
|
|
134
|
-
"aria-labelledby":
|
|
133
|
+
class: v(y.dialog, u),
|
|
134
|
+
"aria-labelledby": I,
|
|
135
135
|
role: n ? "alertdialog" : void 0,
|
|
136
136
|
children: /* @__PURE__ */ m("div", { class: y.panel, children: [
|
|
137
137
|
/* @__PURE__ */ m("header", { class: y.header, children: [
|
|
138
|
-
/* @__PURE__ */ r("h2", { id:
|
|
138
|
+
/* @__PURE__ */ r("h2", { id: I, class: y.title, children: s }),
|
|
139
139
|
!n && /* @__PURE__ */ r(
|
|
140
140
|
"button",
|
|
141
141
|
{
|
|
@@ -149,23 +149,23 @@ const Y = (t) => {
|
|
|
149
149
|
] }),
|
|
150
150
|
/* @__PURE__ */ m("div", { class: y.body, children: [
|
|
151
151
|
o && /* @__PURE__ */ r("p", { class: y.message, children: o }),
|
|
152
|
-
|
|
152
|
+
_
|
|
153
153
|
] }),
|
|
154
154
|
q && /* @__PURE__ */ m("footer", { class: y.footer, children: [
|
|
155
|
-
i?.map((
|
|
155
|
+
i?.map((p) => /* @__PURE__ */ m(
|
|
156
156
|
"button",
|
|
157
157
|
{
|
|
158
158
|
type: "button",
|
|
159
159
|
class: y.action,
|
|
160
|
-
title:
|
|
161
|
-
onClick:
|
|
160
|
+
title: p.description,
|
|
161
|
+
onClick: p.onClick,
|
|
162
162
|
children: [
|
|
163
|
-
|
|
163
|
+
p.label,
|
|
164
164
|
" ",
|
|
165
|
-
z(
|
|
165
|
+
z(p.shortcut)
|
|
166
166
|
]
|
|
167
167
|
},
|
|
168
|
-
|
|
168
|
+
p.label
|
|
169
169
|
)),
|
|
170
170
|
c && /* @__PURE__ */ m(
|
|
171
171
|
"button",
|
|
@@ -182,14 +182,14 @@ const Y = (t) => {
|
|
|
182
182
|
]
|
|
183
183
|
}
|
|
184
184
|
),
|
|
185
|
-
|
|
185
|
+
d && /* @__PURE__ */ m(
|
|
186
186
|
"button",
|
|
187
187
|
{
|
|
188
|
-
ref:
|
|
188
|
+
ref: C,
|
|
189
189
|
type: "button",
|
|
190
190
|
class: y.action,
|
|
191
191
|
title: R.cancelDescription,
|
|
192
|
-
onClick:
|
|
192
|
+
onClick: d,
|
|
193
193
|
children: [
|
|
194
194
|
h ?? R.cancel,
|
|
195
195
|
" ",
|
|
@@ -201,7 +201,7 @@ const Y = (t) => {
|
|
|
201
201
|
] })
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
|
-
},
|
|
204
|
+
}, Rt = (t) => {
|
|
205
205
|
const {
|
|
206
206
|
open: e,
|
|
207
207
|
title: s,
|
|
@@ -228,14 +228,14 @@ const Y = (t) => {
|
|
|
228
228
|
);
|
|
229
229
|
}, $e = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Ce = {
|
|
230
230
|
link: $e
|
|
231
|
-
},
|
|
231
|
+
}, zt = (t) => {
|
|
232
232
|
const { href: e, fileName: s, label: n, class: l } = t;
|
|
233
233
|
return /* @__PURE__ */ r("a", { href: e, download: s, class: v(Ce.link, l), children: n });
|
|
234
|
-
}, Ie = "_form_jr324_1", Le = "_actions_jr324_6", Ne = "_status_jr324_13",
|
|
234
|
+
}, Ie = "_form_jr324_1", Le = "_actions_jr324_6", Ne = "_status_jr324_13", O = {
|
|
235
235
|
form: Ie,
|
|
236
236
|
actions: Le,
|
|
237
237
|
status: Ne
|
|
238
|
-
},
|
|
238
|
+
}, Ot = (t) => {
|
|
239
239
|
const {
|
|
240
240
|
onSubmit: e,
|
|
241
241
|
submitLabel: s = "Submit",
|
|
@@ -247,7 +247,7 @@ const Y = (t) => {
|
|
|
247
247
|
return /* @__PURE__ */ m(
|
|
248
248
|
"form",
|
|
249
249
|
{
|
|
250
|
-
class: v(
|
|
250
|
+
class: v(O.form, o),
|
|
251
251
|
onSubmit: (c) => {
|
|
252
252
|
c.preventDefault();
|
|
253
253
|
const i = new FormData(c.currentTarget);
|
|
@@ -255,11 +255,11 @@ const Y = (t) => {
|
|
|
255
255
|
},
|
|
256
256
|
children: [
|
|
257
257
|
a,
|
|
258
|
-
/* @__PURE__ */ m("div", { class:
|
|
259
|
-
/* @__PURE__ */ r(
|
|
260
|
-
n && /* @__PURE__ */ r(
|
|
258
|
+
/* @__PURE__ */ m("div", { class: O.actions, children: [
|
|
259
|
+
/* @__PURE__ */ r(W, { type: "submit", label: s }),
|
|
260
|
+
n && /* @__PURE__ */ r(W, { type: "reset", label: n })
|
|
261
261
|
] }),
|
|
262
|
-
l && /* @__PURE__ */ r("output", { class:
|
|
262
|
+
l && /* @__PURE__ */ r("output", { class: O.status, children: l })
|
|
263
263
|
]
|
|
264
264
|
}
|
|
265
265
|
);
|
|
@@ -268,7 +268,7 @@ const Y = (t) => {
|
|
|
268
268
|
label: Ee,
|
|
269
269
|
required: De,
|
|
270
270
|
error: Se
|
|
271
|
-
},
|
|
271
|
+
}, S = (t) => {
|
|
272
272
|
const { for: e, label: s, required: n, error: l, errorId: a, children: o, class: c } = t;
|
|
273
273
|
return /* @__PURE__ */ m("div", { class: v(B.field, c), children: [
|
|
274
274
|
/* @__PURE__ */ m("label", { class: B.label, for: e, children: [
|
|
@@ -282,13 +282,13 @@ const Y = (t) => {
|
|
|
282
282
|
o,
|
|
283
283
|
l && /* @__PURE__ */ r("p", { id: a, class: B.error, role: "alert", children: l })
|
|
284
284
|
] });
|
|
285
|
-
}, Ae = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8",
|
|
285
|
+
}, Ae = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", He = {
|
|
286
286
|
input: Ae
|
|
287
|
-
},
|
|
287
|
+
}, Be = {
|
|
288
288
|
email: "email",
|
|
289
289
|
tel: "tel",
|
|
290
290
|
url: "url"
|
|
291
|
-
},
|
|
291
|
+
}, Ft = (t) => {
|
|
292
292
|
const {
|
|
293
293
|
label: e,
|
|
294
294
|
name: s,
|
|
@@ -299,45 +299,45 @@ const Y = (t) => {
|
|
|
299
299
|
autocomplete: c,
|
|
300
300
|
readOnly: i,
|
|
301
301
|
pattern: h,
|
|
302
|
-
required:
|
|
303
|
-
disabled:
|
|
304
|
-
error:
|
|
305
|
-
onInput:
|
|
302
|
+
required: d,
|
|
303
|
+
disabled: f,
|
|
304
|
+
error: _,
|
|
305
|
+
onInput: u,
|
|
306
306
|
class: b
|
|
307
|
-
} = t, g =
|
|
307
|
+
} = t, g = $(), C = `${g}-error`;
|
|
308
308
|
return /* @__PURE__ */ r(
|
|
309
|
-
|
|
309
|
+
S,
|
|
310
310
|
{
|
|
311
311
|
label: e,
|
|
312
312
|
for: g,
|
|
313
|
-
required:
|
|
314
|
-
error:
|
|
315
|
-
errorId:
|
|
313
|
+
required: d,
|
|
314
|
+
error: _,
|
|
315
|
+
errorId: C,
|
|
316
316
|
class: b,
|
|
317
317
|
children: /* @__PURE__ */ r(
|
|
318
318
|
"input",
|
|
319
319
|
{
|
|
320
320
|
id: g,
|
|
321
|
-
class:
|
|
321
|
+
class: He.input,
|
|
322
322
|
type: n,
|
|
323
323
|
name: s,
|
|
324
324
|
value: l,
|
|
325
325
|
placeholder: a,
|
|
326
326
|
maxLength: o,
|
|
327
|
-
autoComplete: c ??
|
|
327
|
+
autoComplete: c ?? Be[n],
|
|
328
328
|
readOnly: i,
|
|
329
329
|
pattern: h,
|
|
330
|
-
required:
|
|
331
|
-
disabled:
|
|
332
|
-
"aria-invalid": !!
|
|
333
|
-
"aria-describedby":
|
|
334
|
-
onInput:
|
|
330
|
+
required: d,
|
|
331
|
+
disabled: f,
|
|
332
|
+
"aria-invalid": !!_ || void 0,
|
|
333
|
+
"aria-describedby": N(_ && C),
|
|
334
|
+
onInput: u && ((I) => u(I.target.value))
|
|
335
335
|
}
|
|
336
336
|
)
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
|
-
},
|
|
340
|
-
function
|
|
339
|
+
}, G = U(window.location.pathname), ee = U(window.location.hash.slice(1));
|
|
340
|
+
function qe(t) {
|
|
341
341
|
const e = t.indexOf("#");
|
|
342
342
|
let s = "", n = t;
|
|
343
343
|
e >= 0 && (s = t.slice(e + 1), n = t.slice(0, e));
|
|
@@ -345,37 +345,37 @@ function Pe(t) {
|
|
|
345
345
|
let a = "", o = n;
|
|
346
346
|
return l >= 0 && (a = n.slice(l), o = n.slice(0, l)), { pathname: o || "/", search: a, hash: s };
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const { pathname: s, search: n, hash: l } =
|
|
350
|
-
e?.replace ? history.replaceState(null, "", a) : history.pushState(null, "", a),
|
|
348
|
+
function Pe(t, e) {
|
|
349
|
+
const { pathname: s, search: n, hash: l } = qe(t), a = s + n + (l ? `#${l}` : "");
|
|
350
|
+
e?.replace ? history.replaceState(null, "", a) : history.pushState(null, "", a), G.value = s, ee.value = l;
|
|
351
351
|
}
|
|
352
352
|
window.addEventListener("popstate", () => {
|
|
353
|
-
|
|
353
|
+
G.value = window.location.pathname, ee.value = window.location.hash.slice(1);
|
|
354
354
|
});
|
|
355
|
-
const
|
|
356
|
-
link:
|
|
355
|
+
const Te = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Z = {
|
|
356
|
+
link: Te
|
|
357
357
|
};
|
|
358
|
-
function
|
|
358
|
+
function Re(t) {
|
|
359
359
|
try {
|
|
360
360
|
return new URL(t, window.location.href).origin !== window.location.origin;
|
|
361
361
|
} catch {
|
|
362
362
|
return !1;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
const
|
|
365
|
+
const Mt = (t) => {
|
|
366
366
|
const { href: e, children: s, external: n, class: l } = t;
|
|
367
|
-
return n ??
|
|
367
|
+
return n ?? Re(e) ? /* @__PURE__ */ r("a", { href: e, class: v(Z.link, l), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ r(
|
|
368
368
|
"a",
|
|
369
369
|
{
|
|
370
370
|
href: e,
|
|
371
|
-
class: v(
|
|
371
|
+
class: v(Z.link, l),
|
|
372
372
|
onClick: (o) => {
|
|
373
|
-
o.preventDefault(),
|
|
373
|
+
o.preventDefault(), Pe(e);
|
|
374
374
|
},
|
|
375
375
|
children: s
|
|
376
376
|
}
|
|
377
377
|
);
|
|
378
|
-
},
|
|
378
|
+
}, Kt = (t) => {
|
|
379
379
|
const {
|
|
380
380
|
open: e,
|
|
381
381
|
title: s,
|
|
@@ -386,7 +386,7 @@ const Pt = (t) => {
|
|
|
386
386
|
actions: c,
|
|
387
387
|
focusCancel: i,
|
|
388
388
|
children: h,
|
|
389
|
-
class:
|
|
389
|
+
class: d
|
|
390
390
|
} = t;
|
|
391
391
|
return /* @__PURE__ */ r(
|
|
392
392
|
Y,
|
|
@@ -401,22 +401,22 @@ const Pt = (t) => {
|
|
|
401
401
|
defaultAction: o,
|
|
402
402
|
actions: c,
|
|
403
403
|
focusCancel: i,
|
|
404
|
-
class:
|
|
404
|
+
class: d,
|
|
405
405
|
children: h
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
|
-
},
|
|
409
|
-
nav:
|
|
408
|
+
}, ze = "_nav_778nl_1", Oe = "_title_778nl_6", V = {
|
|
409
|
+
nav: ze,
|
|
410
410
|
title: Oe
|
|
411
|
-
},
|
|
412
|
-
const { title: e, children: s, class: n } = t, l =
|
|
413
|
-
return /* @__PURE__ */ m("nav", { class: v(
|
|
414
|
-
e && /* @__PURE__ */ r("h2", { id: l, class:
|
|
411
|
+
}, Ut = (t) => {
|
|
412
|
+
const { title: e, children: s, class: n } = t, l = $();
|
|
413
|
+
return /* @__PURE__ */ m("nav", { class: v(V.nav, n), "aria-labelledby": e ? l : void 0, children: [
|
|
414
|
+
e && /* @__PURE__ */ r("h2", { id: l, class: V.title, children: e }),
|
|
415
415
|
s
|
|
416
416
|
] });
|
|
417
417
|
}, Fe = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Me = {
|
|
418
418
|
input: Fe
|
|
419
|
-
},
|
|
419
|
+
}, Gt = (t) => {
|
|
420
420
|
const {
|
|
421
421
|
label: e,
|
|
422
422
|
name: s,
|
|
@@ -427,23 +427,23 @@ const Pt = (t) => {
|
|
|
427
427
|
placeholder: c,
|
|
428
428
|
required: i,
|
|
429
429
|
disabled: h,
|
|
430
|
-
error:
|
|
431
|
-
onInput:
|
|
432
|
-
class:
|
|
433
|
-
} = t,
|
|
430
|
+
error: d,
|
|
431
|
+
onInput: f,
|
|
432
|
+
class: _
|
|
433
|
+
} = t, u = $(), b = `${u}-error`;
|
|
434
434
|
return /* @__PURE__ */ r(
|
|
435
|
-
|
|
435
|
+
S,
|
|
436
436
|
{
|
|
437
437
|
label: e,
|
|
438
|
-
for:
|
|
438
|
+
for: u,
|
|
439
439
|
required: i,
|
|
440
|
-
error:
|
|
440
|
+
error: d,
|
|
441
441
|
errorId: b,
|
|
442
|
-
class:
|
|
442
|
+
class: _,
|
|
443
443
|
children: /* @__PURE__ */ r(
|
|
444
444
|
"input",
|
|
445
445
|
{
|
|
446
|
-
id:
|
|
446
|
+
id: u,
|
|
447
447
|
class: Me.input,
|
|
448
448
|
type: "number",
|
|
449
449
|
name: s,
|
|
@@ -454,25 +454,25 @@ const Pt = (t) => {
|
|
|
454
454
|
placeholder: c,
|
|
455
455
|
required: i,
|
|
456
456
|
disabled: h,
|
|
457
|
-
"aria-invalid": !!
|
|
458
|
-
"aria-describedby":
|
|
459
|
-
onInput:
|
|
457
|
+
"aria-invalid": !!d || void 0,
|
|
458
|
+
"aria-describedby": N(d && b),
|
|
459
|
+
onInput: f && ((g) => f(g.target.valueAsNumber))
|
|
460
460
|
}
|
|
461
461
|
)
|
|
462
462
|
}
|
|
463
463
|
);
|
|
464
|
-
}, Ke = "_wrapper_16zfv_1", Ue = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ge = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8",
|
|
464
|
+
}, Ke = "_wrapper_16zfv_1", Ue = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ge = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", F = {
|
|
465
465
|
wrapper: Ke,
|
|
466
466
|
input: Ue,
|
|
467
467
|
toggle: Ge
|
|
468
468
|
};
|
|
469
469
|
const We = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
|
|
470
|
-
const
|
|
470
|
+
const J = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
471
471
|
const Ze = (t) => t.replace(
|
|
472
472
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
473
473
|
(e, s, n) => n ? n.toUpperCase() : s.toLowerCase()
|
|
474
474
|
);
|
|
475
|
-
const
|
|
475
|
+
const Q = (t) => {
|
|
476
476
|
const e = Ze(t);
|
|
477
477
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
478
478
|
};
|
|
@@ -502,7 +502,7 @@ const Qe = ({
|
|
|
502
502
|
iconNode: a,
|
|
503
503
|
class: o = "",
|
|
504
504
|
...c
|
|
505
|
-
}) =>
|
|
505
|
+
}) => K(
|
|
506
506
|
"svg",
|
|
507
507
|
{
|
|
508
508
|
...Ve,
|
|
@@ -514,26 +514,36 @@ const Qe = ({
|
|
|
514
514
|
...!l && !Je(c) && { "aria-hidden": "true" },
|
|
515
515
|
...c
|
|
516
516
|
},
|
|
517
|
-
[...a.map(([i, h]) =>
|
|
517
|
+
[...a.map(([i, h]) => K(i, h)), ...re(l)]
|
|
518
518
|
);
|
|
519
519
|
const te = (t, e) => {
|
|
520
|
-
const s = ({ class: n = "", className: l = "", children: a, ...o }) =>
|
|
520
|
+
const s = ({ class: n = "", className: l = "", children: a, ...o }) => K(
|
|
521
521
|
Qe,
|
|
522
522
|
{
|
|
523
523
|
...o,
|
|
524
524
|
iconNode: e,
|
|
525
525
|
class: We(
|
|
526
|
-
`lucide-${
|
|
527
|
-
`lucide-${
|
|
526
|
+
`lucide-${J(Q(t))}`,
|
|
527
|
+
`lucide-${J(t)}`,
|
|
528
528
|
n,
|
|
529
529
|
l
|
|
530
530
|
)
|
|
531
531
|
},
|
|
532
532
|
a
|
|
533
533
|
);
|
|
534
|
-
return s.displayName =
|
|
534
|
+
return s.displayName = Q(t), s;
|
|
535
535
|
};
|
|
536
|
-
const Xe = te("eye
|
|
536
|
+
const Xe = te("eye", [
|
|
537
|
+
[
|
|
538
|
+
"path",
|
|
539
|
+
{
|
|
540
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
541
|
+
key: "1nclc0"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
545
|
+
]);
|
|
546
|
+
const Ye = te("eye-off", [
|
|
537
547
|
[
|
|
538
548
|
"path",
|
|
539
549
|
{
|
|
@@ -550,20 +560,10 @@ const Xe = te("eye-off", [
|
|
|
550
560
|
}
|
|
551
561
|
],
|
|
552
562
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
553
|
-
]);
|
|
554
|
-
const Ye = te("eye", [
|
|
555
|
-
[
|
|
556
|
-
"path",
|
|
557
|
-
{
|
|
558
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
559
|
-
key: "1nclc0"
|
|
560
|
-
}
|
|
561
|
-
],
|
|
562
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
563
563
|
]), et = {
|
|
564
564
|
current: "current-password",
|
|
565
565
|
new: "new-password"
|
|
566
|
-
},
|
|
566
|
+
}, Wt = (t) => {
|
|
567
567
|
const {
|
|
568
568
|
label: e,
|
|
569
569
|
name: s,
|
|
@@ -574,24 +574,24 @@ const Ye = te("eye", [
|
|
|
574
574
|
disabled: c,
|
|
575
575
|
error: i,
|
|
576
576
|
onInput: h,
|
|
577
|
-
class:
|
|
578
|
-
} = t,
|
|
577
|
+
class: d
|
|
578
|
+
} = t, f = $(), _ = `${f}-error`, u = D(!1);
|
|
579
579
|
return /* @__PURE__ */ r(
|
|
580
|
-
|
|
580
|
+
S,
|
|
581
581
|
{
|
|
582
582
|
label: e,
|
|
583
|
-
for:
|
|
583
|
+
for: f,
|
|
584
584
|
required: o,
|
|
585
585
|
error: i,
|
|
586
|
-
errorId:
|
|
587
|
-
class:
|
|
588
|
-
children: /* @__PURE__ */ m("div", { class:
|
|
586
|
+
errorId: _,
|
|
587
|
+
class: d,
|
|
588
|
+
children: /* @__PURE__ */ m("div", { class: F.wrapper, children: [
|
|
589
589
|
/* @__PURE__ */ r(
|
|
590
590
|
"input",
|
|
591
591
|
{
|
|
592
|
-
id:
|
|
593
|
-
class:
|
|
594
|
-
type:
|
|
592
|
+
id: f,
|
|
593
|
+
class: F.input,
|
|
594
|
+
type: u.value ? "text" : "password",
|
|
595
595
|
name: s,
|
|
596
596
|
value: l,
|
|
597
597
|
placeholder: a,
|
|
@@ -599,7 +599,7 @@ const Ye = te("eye", [
|
|
|
599
599
|
required: o,
|
|
600
600
|
disabled: c,
|
|
601
601
|
"aria-invalid": !!i || void 0,
|
|
602
|
-
"aria-describedby":
|
|
602
|
+
"aria-describedby": N(i && _),
|
|
603
603
|
onInput: h && ((b) => h(b.target.value))
|
|
604
604
|
}
|
|
605
605
|
),
|
|
@@ -607,25 +607,25 @@ const Ye = te("eye", [
|
|
|
607
607
|
"button",
|
|
608
608
|
{
|
|
609
609
|
type: "button",
|
|
610
|
-
class:
|
|
610
|
+
class: F.toggle,
|
|
611
611
|
disabled: c,
|
|
612
|
-
"aria-label":
|
|
612
|
+
"aria-label": u.value ? "Hide password" : "Show password",
|
|
613
613
|
onClick: () => {
|
|
614
|
-
|
|
614
|
+
u.value = !u.value;
|
|
615
615
|
},
|
|
616
|
-
children:
|
|
616
|
+
children: u.value ? /* @__PURE__ */ r(Ye, { size: "1em" }) : /* @__PURE__ */ r(Xe, { size: "1em" })
|
|
617
617
|
}
|
|
618
618
|
)
|
|
619
619
|
] })
|
|
620
620
|
}
|
|
621
621
|
);
|
|
622
|
-
}, tt = "_fieldset_lymkd_1", nt = "_legend_lymkd_6", st = "_option_lymkd_11", lt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", rt = "_error_lymkd_23 _field-error_4u8pk_36",
|
|
622
|
+
}, tt = "_fieldset_lymkd_1", nt = "_legend_lymkd_6", st = "_option_lymkd_11", lt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", rt = "_error_lymkd_23 _field-error_4u8pk_36", E = {
|
|
623
623
|
fieldset: tt,
|
|
624
624
|
legend: nt,
|
|
625
625
|
option: st,
|
|
626
626
|
input: lt,
|
|
627
627
|
error: rt
|
|
628
|
-
},
|
|
628
|
+
}, Zt = (t) => {
|
|
629
629
|
const {
|
|
630
630
|
legend: e,
|
|
631
631
|
name: s,
|
|
@@ -636,41 +636,41 @@ const Ye = te("eye", [
|
|
|
636
636
|
error: c,
|
|
637
637
|
onChange: i,
|
|
638
638
|
class: h
|
|
639
|
-
} = t,
|
|
639
|
+
} = t, d = $(), f = `${d}-error`;
|
|
640
640
|
return /* @__PURE__ */ m(
|
|
641
641
|
"fieldset",
|
|
642
642
|
{
|
|
643
|
-
class: v(
|
|
643
|
+
class: v(E.fieldset, h),
|
|
644
644
|
"aria-invalid": !!c || void 0,
|
|
645
|
-
"aria-describedby":
|
|
645
|
+
"aria-describedby": N(c && f),
|
|
646
646
|
children: [
|
|
647
|
-
/* @__PURE__ */ r("legend", { class:
|
|
648
|
-
n.map((
|
|
649
|
-
const
|
|
650
|
-
return /* @__PURE__ */ m("div", { class:
|
|
647
|
+
/* @__PURE__ */ r("legend", { class: E.legend, children: e }),
|
|
648
|
+
n.map((_) => {
|
|
649
|
+
const u = `${d}-${_.value}`;
|
|
650
|
+
return /* @__PURE__ */ m("div", { class: E.option, children: [
|
|
651
651
|
/* @__PURE__ */ r(
|
|
652
652
|
"input",
|
|
653
653
|
{
|
|
654
|
-
id:
|
|
655
|
-
class:
|
|
654
|
+
id: u,
|
|
655
|
+
class: E.input,
|
|
656
656
|
type: "radio",
|
|
657
657
|
name: s,
|
|
658
|
-
value:
|
|
659
|
-
checked: l ===
|
|
658
|
+
value: _.value,
|
|
659
|
+
checked: l === _.value,
|
|
660
660
|
required: a,
|
|
661
661
|
disabled: o,
|
|
662
|
-
onChange: i && (() => i(
|
|
662
|
+
onChange: i && (() => i(_.value))
|
|
663
663
|
}
|
|
664
664
|
),
|
|
665
|
-
/* @__PURE__ */ r("label", { for:
|
|
666
|
-
] },
|
|
665
|
+
/* @__PURE__ */ r("label", { for: u, children: _.label })
|
|
666
|
+
] }, _.value);
|
|
667
667
|
}),
|
|
668
|
-
c && /* @__PURE__ */ r("p", { id:
|
|
668
|
+
c && /* @__PURE__ */ r("p", { id: f, class: E.error, role: "alert", children: c })
|
|
669
669
|
]
|
|
670
670
|
}
|
|
671
671
|
);
|
|
672
|
-
},
|
|
673
|
-
const { path: e, children: s } = t, n =
|
|
672
|
+
}, Vt = (t) => {
|
|
673
|
+
const { path: e, children: s } = t, n = G.value;
|
|
674
674
|
if (e.endsWith("/*")) {
|
|
675
675
|
const l = e.slice(0, -1);
|
|
676
676
|
if (!n.startsWith(l) && n !== l.slice(0, -1))
|
|
@@ -680,15 +680,15 @@ const Ye = te("eye", [
|
|
|
680
680
|
return /* @__PURE__ */ r(se, { children: s });
|
|
681
681
|
}, at = "_section_4nogy_1", ot = {
|
|
682
682
|
section: at
|
|
683
|
-
},
|
|
684
|
-
const { title: e, level: s = 2, children: n, class: l } = t, a =
|
|
683
|
+
}, Jt = (t) => {
|
|
684
|
+
const { title: e, level: s = 2, children: n, class: l } = t, a = $(), o = `h${s}`;
|
|
685
685
|
return /* @__PURE__ */ m("section", { class: v(ot.section, l), "aria-labelledby": a, children: [
|
|
686
686
|
/* @__PURE__ */ r(o, { id: a, children: e }),
|
|
687
687
|
n
|
|
688
688
|
] });
|
|
689
689
|
}, ct = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", it = {
|
|
690
690
|
select: ct
|
|
691
|
-
}, dt = (t) => "options" in t,
|
|
691
|
+
}, dt = (t) => "options" in t, Qt = (t) => {
|
|
692
692
|
const {
|
|
693
693
|
label: e,
|
|
694
694
|
name: s,
|
|
@@ -699,33 +699,33 @@ const Ye = te("eye", [
|
|
|
699
699
|
disabled: c,
|
|
700
700
|
error: i,
|
|
701
701
|
onChange: h,
|
|
702
|
-
class:
|
|
703
|
-
} = t,
|
|
702
|
+
class: d
|
|
703
|
+
} = t, f = $(), _ = `${f}-error`;
|
|
704
704
|
return /* @__PURE__ */ r(
|
|
705
|
-
|
|
705
|
+
S,
|
|
706
706
|
{
|
|
707
707
|
label: e,
|
|
708
|
-
for:
|
|
708
|
+
for: f,
|
|
709
709
|
required: o,
|
|
710
710
|
error: i,
|
|
711
|
-
errorId:
|
|
712
|
-
class:
|
|
711
|
+
errorId: _,
|
|
712
|
+
class: d,
|
|
713
713
|
children: /* @__PURE__ */ m(
|
|
714
714
|
"select",
|
|
715
715
|
{
|
|
716
|
-
id:
|
|
716
|
+
id: f,
|
|
717
717
|
class: it.select,
|
|
718
718
|
name: s,
|
|
719
719
|
value: n,
|
|
720
720
|
required: o,
|
|
721
721
|
disabled: c,
|
|
722
722
|
"aria-invalid": !!i || void 0,
|
|
723
|
-
"aria-describedby":
|
|
724
|
-
onChange: h && ((
|
|
723
|
+
"aria-describedby": N(i && _),
|
|
724
|
+
onChange: h && ((u) => h(u.target.value)),
|
|
725
725
|
children: [
|
|
726
726
|
l && /* @__PURE__ */ r("option", { value: "", disabled: !0, children: l }),
|
|
727
727
|
a.map(
|
|
728
|
-
(
|
|
728
|
+
(u) => dt(u) ? /* @__PURE__ */ r("optgroup", { label: u.label, children: u.options.map((b) => /* @__PURE__ */ r("option", { value: b.value, children: b.label }, b.value)) }, u.label) : /* @__PURE__ */ r("option", { value: u.value, children: u.label }, u.value)
|
|
729
729
|
)
|
|
730
730
|
]
|
|
731
731
|
}
|
|
@@ -734,30 +734,48 @@ const Ye = te("eye", [
|
|
|
734
734
|
);
|
|
735
735
|
}, ut = "_skip_xbsul_1 _focus-ring_4u8pk_3", _t = {
|
|
736
736
|
skip: ut
|
|
737
|
-
},
|
|
737
|
+
}, Xt = (t) => {
|
|
738
738
|
const { target: e = "#main", label: s = "Skip to main content", class: n } = t;
|
|
739
739
|
return /* @__PURE__ */ r("a", { href: e, class: v(_t.skip, n), children: s });
|
|
740
|
-
}, pt = "
|
|
740
|
+
}, pt = "_table_185y9_1", ht = "_caption_185y9_6", ft = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", mt = "_headerCell_185y9_16", bt = "_cell_185y9_17", vt = "_head_185y9_16", kt = "_row_185y9_41", gt = "_striped_185y9_45", yt = "_dense_185y9_53", x = {
|
|
741
741
|
table: pt,
|
|
742
|
-
caption: ht
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
742
|
+
caption: ht,
|
|
743
|
+
captionHidden: ft,
|
|
744
|
+
headerCell: mt,
|
|
745
|
+
cell: bt,
|
|
746
|
+
head: vt,
|
|
747
|
+
row: kt,
|
|
748
|
+
striped: gt,
|
|
749
|
+
dense: yt
|
|
750
|
+
}, Yt = (t) => {
|
|
751
|
+
const {
|
|
752
|
+
caption: e,
|
|
753
|
+
headers: s,
|
|
754
|
+
data: n,
|
|
755
|
+
rowHeader: l,
|
|
756
|
+
striped: a,
|
|
757
|
+
dense: o,
|
|
758
|
+
captionHidden: c,
|
|
759
|
+
class: i
|
|
760
|
+
} = t;
|
|
761
|
+
return /* @__PURE__ */ m("table", { class: v(x.table, a && x.striped, o && x.dense, i), children: [
|
|
762
|
+
/* @__PURE__ */ r("caption", { class: v(x.caption, c && x.captionHidden), children: e }),
|
|
763
|
+
/* @__PURE__ */ r("thead", { class: x.head, children: /* @__PURE__ */ r("tr", { children: s.map((h, d) => /* @__PURE__ */ r("th", { class: x.headerCell, scope: "col", children: h }, `${h}-${d}`)) }) }),
|
|
764
|
+
/* @__PURE__ */ r("tbody", { children: n.map((h, d) => /* @__PURE__ */ r("tr", { class: x.row, children: h.map(
|
|
765
|
+
(f, _) => l && _ === 0 ? /* @__PURE__ */ r("th", { class: x.headerCell, scope: "row", children: f }, `${s[_]}-${d}-${_}`) : /* @__PURE__ */ r("td", { class: x.cell, children: f }, `${s[_]}-${d}-${_}`)
|
|
766
|
+
) }, d)) })
|
|
749
767
|
] });
|
|
750
|
-
},
|
|
751
|
-
hidden:
|
|
752
|
-
},
|
|
768
|
+
}, wt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", xt = {
|
|
769
|
+
hidden: wt
|
|
770
|
+
}, $t = (t) => {
|
|
753
771
|
const { children: e } = t;
|
|
754
|
-
return /* @__PURE__ */ r("span", { class:
|
|
755
|
-
},
|
|
756
|
-
wrapper:
|
|
757
|
-
textarea:
|
|
758
|
-
counter:
|
|
759
|
-
}, X = [75, 90, 100],
|
|
760
|
-
function
|
|
772
|
+
return /* @__PURE__ */ r("span", { class: xt.hidden, children: e });
|
|
773
|
+
}, Ct = "_wrapper_1kyv1_1", It = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Lt = "_counter_1kyv1_11", M = {
|
|
774
|
+
wrapper: Ct,
|
|
775
|
+
textarea: It,
|
|
776
|
+
counter: Lt
|
|
777
|
+
}, X = [75, 90, 100], Nt = 10;
|
|
778
|
+
function jt(t) {
|
|
761
779
|
for (let e = X.length - 1; e >= 0; e--) {
|
|
762
780
|
const s = X[e];
|
|
763
781
|
if (s !== void 0 && t >= s)
|
|
@@ -765,7 +783,7 @@ function wt(t) {
|
|
|
765
783
|
}
|
|
766
784
|
return 0;
|
|
767
785
|
}
|
|
768
|
-
const
|
|
786
|
+
const en = (t) => {
|
|
769
787
|
const {
|
|
770
788
|
label: e,
|
|
771
789
|
name: s,
|
|
@@ -776,90 +794,90 @@ const Wt = (t) => {
|
|
|
776
794
|
disabled: c,
|
|
777
795
|
error: i,
|
|
778
796
|
onInput: h,
|
|
779
|
-
class:
|
|
780
|
-
} = t,
|
|
797
|
+
class: d
|
|
798
|
+
} = t, f = $(), _ = `${f}-error`, u = `${f}-counter`, b = D(l?.length ?? 0), g = D(""), C = D(0), I = D(!1);
|
|
781
799
|
return /* @__PURE__ */ r(
|
|
782
|
-
|
|
800
|
+
S,
|
|
783
801
|
{
|
|
784
802
|
label: e,
|
|
785
|
-
for:
|
|
803
|
+
for: f,
|
|
786
804
|
required: o,
|
|
787
805
|
error: i,
|
|
788
|
-
errorId:
|
|
789
|
-
class:
|
|
790
|
-
children: /* @__PURE__ */ m("div", { class:
|
|
806
|
+
errorId: _,
|
|
807
|
+
class: d,
|
|
808
|
+
children: /* @__PURE__ */ m("div", { class: M.wrapper, children: [
|
|
791
809
|
/* @__PURE__ */ r(
|
|
792
810
|
"textarea",
|
|
793
811
|
{
|
|
794
|
-
id:
|
|
795
|
-
class:
|
|
812
|
+
id: f,
|
|
813
|
+
class: M.textarea,
|
|
796
814
|
name: s,
|
|
797
815
|
maxLength: n,
|
|
798
816
|
placeholder: a,
|
|
799
817
|
required: o,
|
|
800
818
|
disabled: c,
|
|
801
819
|
"aria-invalid": !!i || void 0,
|
|
802
|
-
"aria-describedby":
|
|
820
|
+
"aria-describedby": N(i && _, u),
|
|
803
821
|
onInput: (q) => {
|
|
804
|
-
const
|
|
805
|
-
b.value =
|
|
806
|
-
const k = n -
|
|
807
|
-
(
|
|
822
|
+
const p = q.target.value;
|
|
823
|
+
b.value = p.length;
|
|
824
|
+
const k = n - p.length, L = p.length / n * 100, j = jt(L), w = !I.value && k <= Nt && k > 0;
|
|
825
|
+
(j > C.value || w) && (g.value = `${k} character${k === 1 ? "" : "s"} remaining`, C.value = j, w && (I.value = !0)), h?.(p);
|
|
808
826
|
},
|
|
809
827
|
children: l
|
|
810
828
|
}
|
|
811
829
|
),
|
|
812
|
-
/* @__PURE__ */ m("span", { id:
|
|
830
|
+
/* @__PURE__ */ m("span", { id: u, class: M.counter, children: [
|
|
813
831
|
b,
|
|
814
832
|
" / ",
|
|
815
833
|
n
|
|
816
834
|
] }),
|
|
817
|
-
/* @__PURE__ */ r(
|
|
835
|
+
/* @__PURE__ */ r($t, { children: /* @__PURE__ */ r("span", { "aria-live": "polite", children: g }) })
|
|
818
836
|
] })
|
|
819
837
|
}
|
|
820
838
|
);
|
|
821
|
-
},
|
|
822
|
-
theme:
|
|
823
|
-
},
|
|
839
|
+
}, Et = "_theme_1x47p_11", Dt = {
|
|
840
|
+
theme: Et
|
|
841
|
+
}, tn = {
|
|
824
842
|
blue: "aui-blue",
|
|
825
843
|
purple: "aui-purple",
|
|
826
844
|
teal: "aui-teal",
|
|
827
845
|
red: "aui-red",
|
|
828
846
|
orange: "aui-orange",
|
|
829
847
|
yellow: "aui-yellow"
|
|
830
|
-
},
|
|
848
|
+
}, nn = (t) => {
|
|
831
849
|
const { children: e, class: s } = t;
|
|
832
|
-
return /* @__PURE__ */ r("div", { class: v(
|
|
833
|
-
},
|
|
850
|
+
return /* @__PURE__ */ r("div", { class: v(Dt.theme, s), children: e });
|
|
851
|
+
}, St = U(document.title);
|
|
834
852
|
le(() => {
|
|
835
|
-
document.title =
|
|
853
|
+
document.title = St.value;
|
|
836
854
|
});
|
|
837
855
|
export {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
856
|
+
W as Button,
|
|
857
|
+
Pt as Card,
|
|
858
|
+
Tt as Checkbox,
|
|
859
|
+
Rt as Dialog,
|
|
860
|
+
zt as DownloadLink,
|
|
861
|
+
Ot as Form,
|
|
862
|
+
Ft as Input,
|
|
863
|
+
Mt as Link,
|
|
864
|
+
Kt as Modal,
|
|
865
|
+
Ut as Nav,
|
|
866
|
+
Gt as NumberInput,
|
|
867
|
+
tn as Palette,
|
|
868
|
+
Wt as PasswordInput,
|
|
869
|
+
Zt as RadioGroup,
|
|
870
|
+
Vt as Route,
|
|
871
|
+
Jt as Section,
|
|
872
|
+
Qt as Select,
|
|
873
|
+
Xt as SkipLink,
|
|
874
|
+
Yt as Table,
|
|
875
|
+
en as Textarea,
|
|
876
|
+
nn as Theme,
|
|
877
|
+
$t as VisuallyHidden,
|
|
860
878
|
v as cx,
|
|
861
879
|
ee as hash,
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
880
|
+
G as location,
|
|
881
|
+
Pe as navigate,
|
|
882
|
+
St as title
|
|
865
883
|
};
|
|
@@ -8,6 +8,14 @@ interface ITableProps extends IBaseProps {
|
|
|
8
8
|
headers: string[];
|
|
9
9
|
/** Row data as a 2D array of renderable content. */
|
|
10
10
|
data: ComponentChildren[][];
|
|
11
|
+
/** Render the first column as `<th scope="row">` for row identification. */
|
|
12
|
+
rowHeader?: boolean;
|
|
13
|
+
/** Apply alternating row backgrounds for improved scanability. */
|
|
14
|
+
striped?: boolean;
|
|
15
|
+
/** Reduce cell padding for data-dense displays. */
|
|
16
|
+
dense?: boolean;
|
|
17
|
+
/** Visually hide the caption while keeping it accessible to screen readers. */
|
|
18
|
+
captionHidden?: boolean;
|
|
11
19
|
}
|
|
12
20
|
/**
|
|
13
21
|
* Accessible data table with required headers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auldrant/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Accessible Preact component library with design tokens and CSS modules",
|
|
6
6
|
"author": "Colonel Jade",
|
|
@@ -84,6 +84,6 @@
|
|
|
84
84
|
"preact": "^10.28.4"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"lucide-preact": "^0.
|
|
87
|
+
"lucide-preact": "^0.577.0"
|
|
88
88
|
}
|
|
89
89
|
}
|