@apliteni/apliteni-ui 0.61.2 → 0.63.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.
@@ -14,9 +14,37 @@ function Icon({ name }) {
14
14
  );
15
15
  }
16
16
 
17
- // src/primitives/Button.tsx
18
- import { forwardRef, useImperativeHandle, useLayoutEffect, useRef } from "react";
17
+ // src/Checkbox.tsx
18
+ import { forwardRef } from "react";
19
19
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
20
+ var Checkbox = forwardRef(function Checkbox2({
21
+ label,
22
+ type = "checkbox",
23
+ ...props
24
+ }, ref) {
25
+ return /* @__PURE__ */ jsxs("label", { className: "ui-check", children: [
26
+ /* @__PURE__ */ jsx2("input", { ...props, ref, type }),
27
+ /* @__PURE__ */ jsx2("span", { children: label })
28
+ ] });
29
+ });
30
+
31
+ // src/Switch.tsx
32
+ import { forwardRef as forwardRef2 } from "react";
33
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
34
+ var Switch = forwardRef2(function Switch2({
35
+ label,
36
+ className,
37
+ ...props
38
+ }, ref) {
39
+ return /* @__PURE__ */ jsxs2("label", { className: ["ui-switch", className].filter(Boolean).join(" "), children: [
40
+ /* @__PURE__ */ jsx3("input", { "aria-label": label || "Toggle", ...props, ref, type: "checkbox" }),
41
+ /* @__PURE__ */ jsx3("span", { className: "ui-switch__track" })
42
+ ] });
43
+ });
44
+
45
+ // src/primitives/Button.tsx
46
+ import { forwardRef as forwardRef3, useImperativeHandle, useLayoutEffect, useRef } from "react";
47
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
20
48
  var announcers = /* @__PURE__ */ new WeakMap();
21
49
  function acquireAnnouncer(doc) {
22
50
  let entry = announcers.get(doc);
@@ -48,7 +76,7 @@ function acquireAnnouncer(doc) {
48
76
  };
49
77
  }
50
78
  var cx = (...a) => a.filter(Boolean).join(" ");
51
- var Button = forwardRef(function Button2({
79
+ var Button = forwardRef3(function Button2({
52
80
  variant = "secondary",
53
81
  size = "md",
54
82
  icon: icon6,
@@ -110,7 +138,7 @@ var Button = forwardRef(function Button2({
110
138
  const labelled = rest["aria-label"] != null || rest["aria-labelledby"] != null;
111
139
  const fallback = typeof children === "string" && children.trim() ? children.trim() : icon6;
112
140
  const named = iconOnly && !labelled && fallback ? { "aria-label": fallback, title: rest.title ?? fallback } : {};
113
- return /* @__PURE__ */ jsxs(
141
+ return /* @__PURE__ */ jsxs3(
114
142
  "button",
115
143
  {
116
144
  ref: buttonRef,
@@ -142,13 +170,13 @@ var Button = forwardRef(function Button2({
142
170
  if (!blockKey(event)) onKeyUp?.(event);
143
171
  },
144
172
  children: [
145
- icon6 && /* @__PURE__ */ jsx2(Icon, { name: icon6 }),
146
- !iconOnly && renderedChildren != null && /* @__PURE__ */ jsx2("span", { className: "ui-btn__label-slot", children: /* @__PURE__ */ jsx2("span", { className: "ui-btn__label", ref: labelRef, children: renderedChildren }) }),
147
- iconRight && /* @__PURE__ */ jsx2(Icon, { name: iconRight }),
148
- busy && /* @__PURE__ */ jsxs("span", { className: "ui-btn__dots", "aria-hidden": "true", children: [
149
- /* @__PURE__ */ jsx2("i", {}),
150
- /* @__PURE__ */ jsx2("i", {}),
151
- /* @__PURE__ */ jsx2("i", {})
173
+ icon6 && /* @__PURE__ */ jsx4(Icon, { name: icon6 }),
174
+ !iconOnly && renderedChildren != null && /* @__PURE__ */ jsx4("span", { className: "ui-btn__label-slot", children: /* @__PURE__ */ jsx4("span", { className: "ui-btn__label", ref: labelRef, children: renderedChildren }) }),
175
+ iconRight && /* @__PURE__ */ jsx4(Icon, { name: iconRight }),
176
+ busy && /* @__PURE__ */ jsxs3("span", { className: "ui-btn__dots", "aria-hidden": "true", children: [
177
+ /* @__PURE__ */ jsx4("i", {}),
178
+ /* @__PURE__ */ jsx4("i", {}),
179
+ /* @__PURE__ */ jsx4("i", {})
152
180
  ] })
153
181
  ]
154
182
  }
@@ -156,35 +184,35 @@ var Button = forwardRef(function Button2({
156
184
  });
157
185
 
158
186
  // src/primitives/Badge.tsx
159
- import { jsx as jsx3 } from "react/jsx-runtime";
187
+ import { jsx as jsx5 } from "react/jsx-runtime";
160
188
  function Badge({ variant = "neutral", children }) {
161
189
  const cls = ["ui-badge", variant !== "neutral" && `ui-badge--${variant}`].filter(Boolean).join(" ");
162
- return /* @__PURE__ */ jsx3("span", { className: cls, children });
190
+ return /* @__PURE__ */ jsx5("span", { className: cls, children });
163
191
  }
164
192
 
165
193
  // src/primitives/Pill.tsx
166
- import { forwardRef as forwardRef2 } from "react";
167
- import { jsx as jsx4 } from "react/jsx-runtime";
168
- var Pill = forwardRef2(function Pill2({
194
+ import { forwardRef as forwardRef4 } from "react";
195
+ import { jsx as jsx6 } from "react/jsx-runtime";
196
+ var Pill = forwardRef4(function Pill2({
169
197
  variant,
170
198
  className,
171
199
  ...rest
172
200
  }, ref) {
173
201
  const classes = ["ui-pill", variant && `ui-pill--${variant}`, className].filter(Boolean).join(" ");
174
- return /* @__PURE__ */ jsx4("span", { ...rest, ref, className: classes });
202
+ return /* @__PURE__ */ jsx6("span", { ...rest, ref, className: classes });
175
203
  });
176
204
 
177
205
  // src/primitives/StatusDot.tsx
178
- import { forwardRef as forwardRef3 } from "react";
179
- import { jsx as jsx5 } from "react/jsx-runtime";
180
- var StatusDot = forwardRef3(function StatusDot2({
206
+ import { forwardRef as forwardRef5 } from "react";
207
+ import { jsx as jsx7 } from "react/jsx-runtime";
208
+ var StatusDot = forwardRef5(function StatusDot2({
181
209
  live = false,
182
210
  className,
183
211
  ...rest
184
212
  }, ref) {
185
213
  const labelled = Boolean(rest["aria-label"]?.trim() || rest["aria-labelledby"]?.trim());
186
214
  const classes = ["ui-dot", live && "is-live", className].filter(Boolean).join(" ");
187
- return /* @__PURE__ */ jsx5(
215
+ return /* @__PURE__ */ jsx7(
188
216
  "span",
189
217
  {
190
218
  role: labelled ? "img" : void 0,
@@ -197,27 +225,27 @@ var StatusDot = forwardRef3(function StatusDot2({
197
225
  });
198
226
 
199
227
  // src/primitives/Card.tsx
200
- import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
228
+ import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
201
229
  function Card({ title, sub, level = 2, children }) {
202
230
  const n = Number(level);
203
231
  const Heading = `h${[2, 3, 4, 5, 6].includes(n) ? n : 2}`;
204
232
  const titled = title != null && title !== false && title !== "";
205
- return /* @__PURE__ */ jsxs2("div", { className: "ui-card", children: [
206
- titled && /* @__PURE__ */ jsx6(Heading, { className: "ui-card__title", children: title }),
207
- sub != null && /* @__PURE__ */ jsx6("div", { className: "ui-card__sub", children: sub }),
233
+ return /* @__PURE__ */ jsxs4("div", { className: "ui-card", children: [
234
+ titled && /* @__PURE__ */ jsx8(Heading, { className: "ui-card__title", children: title }),
235
+ sub != null && /* @__PURE__ */ jsx8("div", { className: "ui-card__sub", children: sub }),
208
236
  children
209
237
  ] });
210
238
  }
211
239
 
212
240
  // src/primitives/Callout.tsx
213
241
  import { calloutIcons, icon as kitIcon } from "@apliteni/apliteni-ui";
214
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
242
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
215
243
  function Callout({ variant, icon: icon6 = calloutIcons[variant ?? "neutral"], children, actions }) {
216
- return /* @__PURE__ */ jsxs3("div", { className: `ui-callout${variant && variant !== "neutral" ? ` ui-callout--${variant}` : ""}`, role: variant === "danger" ? "alert" : void 0, children: [
217
- /* @__PURE__ */ jsx7("span", { className: "ui-callout__icon", dangerouslySetInnerHTML: { __html: kitIcon(icon6) } }),
218
- /* @__PURE__ */ jsxs3("div", { className: "ui-callout__body", children: [
244
+ return /* @__PURE__ */ jsxs5("div", { className: `ui-callout${variant && variant !== "neutral" ? ` ui-callout--${variant}` : ""}`, role: variant === "danger" ? "alert" : void 0, children: [
245
+ /* @__PURE__ */ jsx9("span", { className: "ui-callout__icon", dangerouslySetInnerHTML: { __html: kitIcon(icon6) } }),
246
+ /* @__PURE__ */ jsxs5("div", { className: "ui-callout__body", children: [
219
247
  children,
220
- actions != null && /* @__PURE__ */ jsx7("div", { className: "ui-toolbar ui-callout__actions", children: actions })
248
+ actions != null && /* @__PURE__ */ jsx9("div", { className: "ui-toolbar ui-callout__actions", children: actions })
221
249
  ] })
222
250
  ] });
223
251
  }
@@ -227,7 +255,7 @@ import { useId as useId2 } from "react";
227
255
 
228
256
  // src/Tooltip.tsx
229
257
  import { useEffect, useId, useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState } from "react";
230
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
258
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
231
259
  function Tooltip({ text: text2, children }) {
232
260
  const id = useId();
233
261
  const host = useRef2(null);
@@ -283,8 +311,8 @@ function Tooltip({ text: text2, children }) {
283
311
  view.removeEventListener("resize", place);
284
312
  };
285
313
  }, [open]);
286
- return /* @__PURE__ */ jsxs4("span", { ref: host, className: "ui-tip-host", style: { display: "inline-block" }, children: [
287
- /* @__PURE__ */ jsx8(
314
+ return /* @__PURE__ */ jsxs6("span", { ref: host, className: "ui-tip-host", style: { display: "inline-block" }, children: [
315
+ /* @__PURE__ */ jsx10(
288
316
  "span",
289
317
  {
290
318
  ref: trigger,
@@ -321,12 +349,12 @@ function Tooltip({ text: text2, children }) {
321
349
  children
322
350
  }
323
351
  ),
324
- /* @__PURE__ */ jsx8("span", { ref: tip, id, role: "tooltip", className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx8("span", { className: "ui-tip__label", children: text2 }) })
352
+ /* @__PURE__ */ jsx10("span", { ref: tip, id, role: "tooltip", className: `ui-tip${open ? " is-open" : ""}`, children: /* @__PURE__ */ jsx10("span", { className: "ui-tip__label", children: text2 }) })
325
353
  ] });
326
354
  }
327
355
 
328
356
  // src/primitives/StatBand.tsx
329
- import { Fragment, jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
357
+ import { Fragment, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
330
358
  var GLYPH = { up: "arrowUp", down: "arrowDown", flat: "minus" };
331
359
  var directionOf = (text2) => {
332
360
  const t = text2.trim();
@@ -335,15 +363,15 @@ var directionOf = (text2) => {
335
363
  var hasChange = (d) => !!d && d.value != null && d.value !== "";
336
364
  function Delta({ delta, basisId }) {
337
365
  if (!hasChange(delta)) {
338
- return /* @__PURE__ */ jsx9("dd", { className: "ui-stat__delta ui-stat__delta--none", children: delta.none || "No earlier figure" });
366
+ return /* @__PURE__ */ jsx11("dd", { className: "ui-stat__delta ui-stat__delta--none", children: delta.none || "No earlier figure" });
339
367
  }
340
368
  const dir = delta.direction && GLYPH[delta.direction] ? delta.direction : directionOf(delta.value);
341
- return /* @__PURE__ */ jsxs5("dd", { className: "ui-stat__delta", "aria-describedby": !delta.basis && basisId ? basisId : void 0, children: [
342
- /* @__PURE__ */ jsx9(Icon, { name: GLYPH[dir] }),
343
- delta.tooltip ? /* @__PURE__ */ jsx9(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx9("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx9("span", { className: "ui-stat__change", children: delta.value }),
344
- delta.basis ? /* @__PURE__ */ jsxs5(Fragment, { children: [
369
+ return /* @__PURE__ */ jsxs7("dd", { className: "ui-stat__delta", "aria-describedby": !delta.basis && basisId ? basisId : void 0, children: [
370
+ /* @__PURE__ */ jsx11(Icon, { name: GLYPH[dir] }),
371
+ delta.tooltip ? /* @__PURE__ */ jsx11(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx11("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx11("span", { className: "ui-stat__change", children: delta.value }),
372
+ delta.basis ? /* @__PURE__ */ jsxs7(Fragment, { children: [
345
373
  " ",
346
- /* @__PURE__ */ jsx9("span", { className: "ui-stat__basis", children: delta.basis })
374
+ /* @__PURE__ */ jsx11("span", { className: "ui-stat__basis", children: delta.basis })
347
375
  ] }) : null
348
376
  ] });
349
377
  }
@@ -352,16 +380,16 @@ function StatBand({ stats, variant = "tiles", basis, basisId: sharedBasisId, lab
352
380
  const v = ["band", "tiles", "open"].includes(variant) ? variant : "tiles";
353
381
  const basisId = basis ? `${id || auto}-basis` : sharedBasisId;
354
382
  const root = ["ui-stats", `ui-stats--${v}`, v === "band" && "ui-card"].filter(Boolean).join(" ");
355
- return /* @__PURE__ */ jsxs5("div", { className: root, role: label ? "group" : void 0, "aria-label": label || void 0, children: [
356
- basis ? /* @__PURE__ */ jsx9("p", { className: "ui-stats__basis", id: basisId, children: basis }) : null,
357
- /* @__PURE__ */ jsx9("dl", { className: "ui-stats__list", children: stats.map((s, i) => {
383
+ return /* @__PURE__ */ jsxs7("div", { className: root, role: label ? "group" : void 0, "aria-label": label || void 0, children: [
384
+ basis ? /* @__PURE__ */ jsx11("p", { className: "ui-stats__basis", id: basisId, children: basis }) : null,
385
+ /* @__PURE__ */ jsx11("dl", { className: "ui-stats__list", children: stats.map((s, i) => {
358
386
  const tone = hasChange(s.delta) && (s.delta.tone === "good" || s.delta.tone === "bad") ? s.delta.tone : "";
359
387
  const cls = ["ui-stat", tone && `ui-stat--${tone}`, v === "tiles" && "ui-card ui-card--pad-sm"].filter(Boolean).join(" ");
360
- return /* @__PURE__ */ jsxs5("div", { className: cls, children: [
361
- /* @__PURE__ */ jsx9("dt", { className: "ui-stat__label", children: s.label }),
362
- /* @__PURE__ */ jsx9("dd", { className: "ui-stat__value", children: s.value }),
363
- s.delta ? /* @__PURE__ */ jsx9(Delta, { delta: s.delta, basisId }) : null,
364
- s.trend ? /* @__PURE__ */ jsx9("dd", { className: "ui-stat__trend", children: s.trend }) : null
388
+ return /* @__PURE__ */ jsxs7("div", { className: cls, children: [
389
+ /* @__PURE__ */ jsx11("dt", { className: "ui-stat__label", children: s.label }),
390
+ /* @__PURE__ */ jsx11("dd", { className: "ui-stat__value", children: s.value }),
391
+ s.delta ? /* @__PURE__ */ jsx11(Delta, { delta: s.delta, basisId }) : null,
392
+ s.trend ? /* @__PURE__ */ jsx11("dd", { className: "ui-stat__trend", children: s.trend }) : null
365
393
  ] }, `${s.label}-${i}`);
366
394
  }) })
367
395
  ] });
@@ -585,7 +613,7 @@ function useDialog(active, { root, panel, body, initialFocus }, onClose) {
585
613
  }
586
614
 
587
615
  // src/Modal.tsx
588
- import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
616
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
589
617
  function Modal({ open, title, onClose, footer, children, initialFocusRef, role = "dialog" }) {
590
618
  const id = useId3();
591
619
  const titleId = `${id}-title`;
@@ -597,7 +625,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
597
625
  const scope = useDialog(shown, { root, panel, body, initialFocus: initialFocusRef }, onClose);
598
626
  if (!mounted) return null;
599
627
  return createPortal(
600
- /* @__PURE__ */ jsx10(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsx10("div", { className: shown ? "rx-scrim is-open" : "rx-scrim", ref: root, onMouseDown: dismissOnScrim(onClose), children: /* @__PURE__ */ jsxs6(
628
+ /* @__PURE__ */ jsx12(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsx12("div", { className: shown ? "rx-scrim is-open" : "rx-scrim", ref: root, onMouseDown: dismissOnScrim(onClose), children: /* @__PURE__ */ jsxs8(
601
629
  "div",
602
630
  {
603
631
  className: "rx-modal",
@@ -608,12 +636,12 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
608
636
  tabIndex: -1,
609
637
  ref: panel,
610
638
  children: [
611
- /* @__PURE__ */ jsxs6("div", { className: "rx-modal__head", children: [
612
- /* @__PURE__ */ jsx10("h2", { className: "rx-modal__title", id: titleId, children: title }),
613
- /* @__PURE__ */ jsx10(Button, { variant: "ghost", size: "sm", iconOnly: true, icon: "x", "aria-label": "Close", onClick: onClose })
639
+ /* @__PURE__ */ jsxs8("div", { className: "rx-modal__head", children: [
640
+ /* @__PURE__ */ jsx12("h2", { className: "rx-modal__title", id: titleId, children: title }),
641
+ /* @__PURE__ */ jsx12(Button, { variant: "ghost", size: "sm", iconOnly: true, icon: "x", "aria-label": "Close", onClick: onClose })
614
642
  ] }),
615
- /* @__PURE__ */ jsx10("div", { className: "rx-modal__body", id: bodyId, ref: body, children }),
616
- footer && /* @__PURE__ */ jsx10("div", { className: "rx-modal__foot", children: footer })
643
+ /* @__PURE__ */ jsx12("div", { className: "rx-modal__body", id: bodyId, ref: body, children }),
644
+ footer && /* @__PURE__ */ jsx12("div", { className: "rx-modal__foot", children: footer })
617
645
  ]
618
646
  }
619
647
  ) }) }),
@@ -622,7 +650,7 @@ function Modal({ open, title, onClose, footer, children, initialFocusRef, role =
622
650
  }
623
651
 
624
652
  // src/Confirm.tsx
625
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
653
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
626
654
  function Confirm({
627
655
  open,
628
656
  title,
@@ -635,7 +663,7 @@ function Confirm({
635
663
  onCancel
636
664
  }) {
637
665
  const safeAction = useRef5(null);
638
- return /* @__PURE__ */ jsx11(
666
+ return /* @__PURE__ */ jsx13(
639
667
  Modal,
640
668
  {
641
669
  open,
@@ -643,9 +671,9 @@ function Confirm({
643
671
  onClose: onCancel,
644
672
  role: "alertdialog",
645
673
  initialFocusRef: safeAction,
646
- footer: /* @__PURE__ */ jsxs7(Fragment2, { children: [
647
- /* @__PURE__ */ jsx11(Button, { ref: safeAction, variant: "ghost", onClick: onCancel, children: cancelLabel }),
648
- /* @__PURE__ */ jsx11(Button, { variant: danger ? "danger" : "primary", busy, onClick: onConfirm, children: confirmLabel })
674
+ footer: /* @__PURE__ */ jsxs9(Fragment2, { children: [
675
+ /* @__PURE__ */ jsx13(Button, { ref: safeAction, variant: "ghost", onClick: onCancel, children: cancelLabel }),
676
+ /* @__PURE__ */ jsx13(Button, { variant: danger ? "danger" : "primary", busy, onClick: onConfirm, children: confirmLabel })
649
677
  ] }),
650
678
  children: body
651
679
  }
@@ -655,7 +683,7 @@ function Confirm({
655
683
  // src/Drawer.tsx
656
684
  import { useId as useId4, useRef as useRef6 } from "react";
657
685
  import { createPortal as createPortal2 } from "react-dom";
658
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
686
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
659
687
  function Drawer({
660
688
  open,
661
689
  title,
@@ -675,9 +703,9 @@ function Drawer({
675
703
  if (!mounted) return null;
676
704
  const cls = ["ui-drawer", `ui-drawer--${side}`, `ui-drawer--${size}`, shown && "is-open"].filter(Boolean).join(" ");
677
705
  return createPortal2(
678
- /* @__PURE__ */ jsx12(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs8("div", { className: cls, ref: root, children: [
679
- /* @__PURE__ */ jsx12("div", { className: "ui-drawer__scrim", onMouseDown: dismissOnScrim(onClose) }),
680
- /* @__PURE__ */ jsxs8(
706
+ /* @__PURE__ */ jsx14(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs10("div", { className: cls, ref: root, children: [
707
+ /* @__PURE__ */ jsx14("div", { className: "ui-drawer__scrim", onMouseDown: dismissOnScrim(onClose) }),
708
+ /* @__PURE__ */ jsxs10(
681
709
  "aside",
682
710
  {
683
711
  className: "ui-drawer__panel",
@@ -687,12 +715,12 @@ function Drawer({
687
715
  tabIndex: -1,
688
716
  ref: panel,
689
717
  children: [
690
- /* @__PURE__ */ jsxs8("header", { className: "ui-drawer__header", children: [
691
- /* @__PURE__ */ jsx12("h2", { className: "ui-drawer__title", id: titleId, children: title }),
692
- /* @__PURE__ */ jsx12("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx12(Icon, { name: "x" }) })
718
+ /* @__PURE__ */ jsxs10("header", { className: "ui-drawer__header", children: [
719
+ /* @__PURE__ */ jsx14("h2", { className: "ui-drawer__title", id: titleId, children: title }),
720
+ /* @__PURE__ */ jsx14("button", { type: "button", className: "ui-drawer__close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx14(Icon, { name: "x" }) })
693
721
  ] }),
694
- /* @__PURE__ */ jsx12("div", { className: "ui-drawer__body", ref: body, children }),
695
- footer && /* @__PURE__ */ jsx12("footer", { className: "ui-drawer__footer", children: footer })
722
+ /* @__PURE__ */ jsx14("div", { className: "ui-drawer__body", ref: body, children }),
723
+ footer && /* @__PURE__ */ jsx14("footer", { className: "ui-drawer__footer", children: footer })
696
724
  ]
697
725
  }
698
726
  )
@@ -705,9 +733,9 @@ function Drawer({
705
733
  import { useCallback, useEffect as useEffect3, useId as useId5, useMemo, useRef as useRef7, useState as useState3 } from "react";
706
734
  import { createPortal as createPortal3 } from "react-dom";
707
735
  import { rankGroups, icon as icon2 } from "@apliteni/apliteni-ui";
708
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
736
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
709
737
  var cx2 = (...a) => a.filter(Boolean).join(" ");
710
- var Glyph = ({ name, className }) => /* @__PURE__ */ jsx13("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon2(name) } });
738
+ var Glyph = ({ name, className }) => /* @__PURE__ */ jsx15("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon2(name) } });
711
739
  var keysOf = (shortcut) => shortcut == null ? [] : Array.isArray(shortcut) ? shortcut : [shortcut];
712
740
  function CommandPalette({
713
741
  open,
@@ -772,9 +800,9 @@ function CommandPalette({
772
800
  const listId = `${uid}-list`;
773
801
  let n = 0;
774
802
  return createPortal3(
775
- /* @__PURE__ */ jsx13(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs9("div", { className: cx2("ui-cmdk", density === "roomy" && "ui-cmdk--roomy", "is-open"), ref: root, children: [
776
- /* @__PURE__ */ jsx13("div", { className: "ui-cmdk__scrim", onMouseDown: dismissOnScrim(onClose) }),
777
- /* @__PURE__ */ jsxs9(
803
+ /* @__PURE__ */ jsx15(DialogScope.Provider, { value: scope, children: /* @__PURE__ */ jsxs11("div", { className: cx2("ui-cmdk", density === "roomy" && "ui-cmdk--roomy", "is-open"), ref: root, children: [
804
+ /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__scrim", onMouseDown: dismissOnScrim(onClose) }),
805
+ /* @__PURE__ */ jsxs11(
778
806
  "div",
779
807
  {
780
808
  className: "ui-cmdk__panel",
@@ -785,9 +813,9 @@ function CommandPalette({
785
813
  ref: panel,
786
814
  onKeyDown,
787
815
  children: [
788
- /* @__PURE__ */ jsxs9("div", { className: "ui-cmdk__search", ref: search, children: [
789
- /* @__PURE__ */ jsx13(Glyph, { name: "search", className: "ui-cmdk__search-ic" }),
790
- /* @__PURE__ */ jsx13(
816
+ /* @__PURE__ */ jsxs11("div", { className: "ui-cmdk__search", ref: search, children: [
817
+ /* @__PURE__ */ jsx15(Glyph, { name: "search", className: "ui-cmdk__search-ic" }),
818
+ /* @__PURE__ */ jsx15(
791
819
  "input",
792
820
  {
793
821
  className: "ui-cmdk__input",
@@ -809,19 +837,19 @@ function CommandPalette({
809
837
  }
810
838
  )
811
839
  ] }),
812
- /* @__PURE__ */ jsx13("div", { className: "ui-cmdk__list", id: listId, role: "listbox", "aria-label": `${label} results`, children: shown.map((group, gi) => /* @__PURE__ */ jsxs9(
840
+ /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__list", id: listId, role: "listbox", "aria-label": `${label} results`, children: shown.map((group, gi) => /* @__PURE__ */ jsxs11(
813
841
  "div",
814
842
  {
815
843
  className: "ui-cmdk__group",
816
844
  role: "group",
817
845
  "aria-labelledby": group.label ? `${uid}-g${gi}` : void 0,
818
846
  children: [
819
- group.label && /* @__PURE__ */ jsx13("div", { className: "ui-cmdk__group-head", id: `${uid}-g${gi}`, children: group.label }),
847
+ group.label && /* @__PURE__ */ jsx15("div", { className: "ui-cmdk__group-head", id: `${uid}-g${gi}`, children: group.label }),
820
848
  group.items.map((item) => {
821
849
  const disabled = isDisabled(item);
822
850
  const id = `${uid}-o${n++}`;
823
851
  const on = item === active;
824
- return /* @__PURE__ */ jsxs9(
852
+ return /* @__PURE__ */ jsxs11(
825
853
  "div",
826
854
  {
827
855
  id,
@@ -841,13 +869,13 @@ function CommandPalette({
841
869
  },
842
870
  onClick: (e) => run(item, e.metaKey || e.ctrlKey),
843
871
  children: [
844
- item.icon && /* @__PURE__ */ jsx13(Glyph, { name: item.icon, className: "ui-cmdk__ic" }),
845
- /* @__PURE__ */ jsxs9("span", { className: "ui-cmdk__main", children: [
846
- /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__label", children: item.label }),
847
- item.description && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__desc", children: item.description })
872
+ item.icon && /* @__PURE__ */ jsx15(Glyph, { name: item.icon, className: "ui-cmdk__ic" }),
873
+ /* @__PURE__ */ jsxs11("span", { className: "ui-cmdk__main", children: [
874
+ /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__label", children: item.label }),
875
+ item.description && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__desc", children: item.description })
848
876
  ] }),
849
- item.badge && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__badge", children: item.badge }),
850
- keysOf(item.shortcut).length > 0 && /* @__PURE__ */ jsx13("span", { className: "ui-cmdk__keys", "aria-hidden": "true", children: keysOf(item.shortcut).map((k) => /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: k }, k)) })
877
+ item.badge && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__badge", children: item.badge }),
878
+ keysOf(item.shortcut).length > 0 && /* @__PURE__ */ jsx15("span", { className: "ui-cmdk__keys", "aria-hidden": "true", children: keysOf(item.shortcut).map((k) => /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: k }, k)) })
851
879
  ]
852
880
  },
853
881
  item.id
@@ -857,20 +885,20 @@ function CommandPalette({
857
885
  },
858
886
  group.label ?? `g${gi}`
859
887
  )) }),
860
- /* @__PURE__ */ jsx13("p", { className: "ui-cmdk__empty", hidden: countOf(shown) > 0, children: empty }),
861
- /* @__PURE__ */ jsx13("p", { className: "ui-sr", role: "status", "aria-live": "polite", children: countOf(shown) === 0 ? "No results" : `${countOf(shown)} result${countOf(shown) === 1 ? "" : "s"}` }),
862
- hint && /* @__PURE__ */ jsxs9("div", { className: "ui-cmdk__foot", "aria-hidden": "true", children: [
863
- /* @__PURE__ */ jsxs9("span", { children: [
864
- /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u2191" }),
865
- /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u2193" }),
888
+ /* @__PURE__ */ jsx15("p", { className: "ui-cmdk__empty", hidden: countOf(shown) > 0, children: empty }),
889
+ /* @__PURE__ */ jsx15("p", { className: "ui-sr", role: "status", "aria-live": "polite", children: countOf(shown) === 0 ? "No results" : `${countOf(shown)} result${countOf(shown) === 1 ? "" : "s"}` }),
890
+ hint && /* @__PURE__ */ jsxs11("div", { className: "ui-cmdk__foot", "aria-hidden": "true", children: [
891
+ /* @__PURE__ */ jsxs11("span", { children: [
892
+ /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u2191" }),
893
+ /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u2193" }),
866
894
  " move"
867
895
  ] }),
868
- /* @__PURE__ */ jsxs9("span", { children: [
869
- /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "\u21B5" }),
896
+ /* @__PURE__ */ jsxs11("span", { children: [
897
+ /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "\u21B5" }),
870
898
  " run"
871
899
  ] }),
872
- /* @__PURE__ */ jsxs9("span", { children: [
873
- /* @__PURE__ */ jsx13("kbd", { className: "ui-cmdk__key", children: "esc" }),
900
+ /* @__PURE__ */ jsxs11("span", { children: [
901
+ /* @__PURE__ */ jsx15("kbd", { className: "ui-cmdk__key", children: "esc" }),
874
902
  " close"
875
903
  ] })
876
904
  ] })
@@ -901,7 +929,7 @@ import { DEFAULT_PAGE_SIZE as DEFAULT_PAGE_SIZE2 } from "@apliteni/apliteni-ui";
901
929
  // src/Pagination.tsx
902
930
  import { useEffect as useEffect4, useId as useId6, useRef as useRef8, useState as useState4 } from "react";
903
931
  import { DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
904
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
932
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
905
933
  var GHOST_SM = "ui-btn ui-btn--ghost ui-btn--sm";
906
934
  var VARIANTS = ["steps", "numbered", "jump"];
907
935
  var cx3 = (...a) => a.filter(Boolean).join(" ");
@@ -993,7 +1021,7 @@ function Pagination({
993
1021
  const step = (label_, target, disabled) => (
994
1022
  // A control at an end is disabled and stays where it is: removing it slides
995
1023
  // the next control under a pointer already travelling toward it.
996
- /* @__PURE__ */ jsx14(
1024
+ /* @__PURE__ */ jsx16(
997
1025
  "button",
998
1026
  {
999
1027
  type: "button",
@@ -1032,14 +1060,14 @@ function Pagination({
1032
1060
  if (single) {
1033
1061
  steps = null;
1034
1062
  } else if (!counted) {
1035
- steps = /* @__PURE__ */ jsxs10("div", { className: "ui-pager__steps", children: [
1063
+ steps = /* @__PURE__ */ jsxs12("div", { className: "ui-pager__steps", children: [
1036
1064
  step("Prev", Math.max(1, at - 1), atStart),
1037
1065
  step("Next", at + 1, !hasMore)
1038
1066
  ] });
1039
1067
  } else {
1040
1068
  let middle = null;
1041
1069
  if (kind === "numbered") {
1042
- middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */ jsx14("span", { className: "ui-pager__gap", "aria-hidden": "true", children: "\u2026" }, `gap${i}`) : /* @__PURE__ */ jsx14(
1070
+ middle = slotsFor(at, last).map((n, i) => n == null ? /* @__PURE__ */ jsx16("span", { className: "ui-pager__gap", "aria-hidden": "true", children: "\u2026" }, `gap${i}`) : /* @__PURE__ */ jsx16(
1043
1071
  "button",
1044
1072
  {
1045
1073
  type: "button",
@@ -1054,9 +1082,9 @@ function Pagination({
1054
1082
  n
1055
1083
  ));
1056
1084
  } else if (kind === "jump") {
1057
- middle = /* @__PURE__ */ jsxs10("span", { className: "ui-pager__jump", children: [
1058
- /* @__PURE__ */ jsx14("label", { htmlFor: `${uid}-jump`, children: "Page" }),
1059
- /* @__PURE__ */ jsx14(
1085
+ middle = /* @__PURE__ */ jsxs12("span", { className: "ui-pager__jump", children: [
1086
+ /* @__PURE__ */ jsx16("label", { htmlFor: `${uid}-jump`, children: "Page" }),
1087
+ /* @__PURE__ */ jsx16(
1060
1088
  "input",
1061
1089
  {
1062
1090
  className: "ui-input ui-pager__jump-input",
@@ -1079,13 +1107,13 @@ function Pagination({
1079
1107
  }
1080
1108
  }
1081
1109
  ),
1082
- /* @__PURE__ */ jsxs10("span", { className: "ui-pager__jump-of", children: [
1110
+ /* @__PURE__ */ jsxs12("span", { className: "ui-pager__jump-of", children: [
1083
1111
  "of ",
1084
1112
  fmt(last)
1085
1113
  ] })
1086
1114
  ] });
1087
1115
  }
1088
- steps = /* @__PURE__ */ jsxs10("div", { className: "ui-pager__steps", children: [
1116
+ steps = /* @__PURE__ */ jsxs12("div", { className: "ui-pager__steps", children: [
1089
1117
  ends ? step("First", 1, atStart) : null,
1090
1118
  step("Prev", Math.max(1, at - 1), atStart),
1091
1119
  middle,
@@ -1093,7 +1121,7 @@ function Pagination({
1093
1121
  ends ? step("Last", last, atEnd) : null
1094
1122
  ] });
1095
1123
  }
1096
- return /* @__PURE__ */ jsxs10(
1124
+ return /* @__PURE__ */ jsxs12(
1097
1125
  "nav",
1098
1126
  {
1099
1127
  ref: nav,
@@ -1101,10 +1129,10 @@ function Pagination({
1101
1129
  "aria-label": label,
1102
1130
  "aria-busy": loading ? true : void 0,
1103
1131
  children: [
1104
- /* @__PURE__ */ jsx14("p", { className: "ui-pager__status", "aria-live": "polite", "aria-atomic": "true", children: status }),
1105
- sizes.length ? /* @__PURE__ */ jsxs10("div", { className: "ui-pager__size", children: [
1106
- /* @__PURE__ */ jsx14("label", { className: "ui-pager__size-label", htmlFor: `${uid}-size`, children: "Rows" }),
1107
- /* @__PURE__ */ jsx14(
1132
+ /* @__PURE__ */ jsx16("p", { className: "ui-pager__status", "aria-live": "polite", "aria-atomic": "true", children: status }),
1133
+ sizes.length ? /* @__PURE__ */ jsxs12("div", { className: "ui-pager__size", children: [
1134
+ /* @__PURE__ */ jsx16("label", { className: "ui-pager__size-label", htmlFor: `${uid}-size`, children: "Rows" }),
1135
+ /* @__PURE__ */ jsx16(
1108
1136
  "select",
1109
1137
  {
1110
1138
  className: "ui-select ui-pager__size-select",
@@ -1112,7 +1140,7 @@ function Pagination({
1112
1140
  disabled: loading,
1113
1141
  value: size,
1114
1142
  onChange: (e) => onPageSizeChange?.(Number(e.target.value)),
1115
- children: sizes.map((s) => /* @__PURE__ */ jsx14("option", { value: s, children: fmt(s) }, s))
1143
+ children: sizes.map((s) => /* @__PURE__ */ jsx16("option", { value: s, children: fmt(s) }, s))
1116
1144
  }
1117
1145
  )
1118
1146
  ] }) : null,
@@ -1123,7 +1151,7 @@ function Pagination({
1123
1151
  }
1124
1152
 
1125
1153
  // src/DataTable.tsx
1126
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1154
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1127
1155
  var NO_SORT = { key: void 0, dir: -1 };
1128
1156
  function sortTableRows(rows, sort) {
1129
1157
  if (sort.key === void 0) return [...rows];
@@ -1216,7 +1244,7 @@ function DataTable({
1216
1244
  onSortChange?.(next);
1217
1245
  toFirstPage();
1218
1246
  };
1219
- const caret = (k) => /* @__PURE__ */ jsx15(
1247
+ const caret = (k) => /* @__PURE__ */ jsx17(
1220
1248
  "svg",
1221
1249
  {
1222
1250
  className: "rx-caret",
@@ -1228,19 +1256,19 @@ function DataTable({
1228
1256
  strokeLinejoin: "round",
1229
1257
  "aria-hidden": "true",
1230
1258
  focusable: "false",
1231
- children: sort.key === k ? /* @__PURE__ */ jsx15("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
1232
- /* @__PURE__ */ jsx15("path", { d: "m8 9 4-4 4 4" }),
1233
- /* @__PURE__ */ jsx15("path", { d: "m8 15 4 4 4-4" })
1259
+ children: sort.key === k ? /* @__PURE__ */ jsx17("path", { d: "m8 10 4 4 4-4" }) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
1260
+ /* @__PURE__ */ jsx17("path", { d: "m8 9 4-4 4 4" }),
1261
+ /* @__PURE__ */ jsx17("path", { d: "m8 15 4 4 4-4" })
1234
1262
  ] })
1235
1263
  }
1236
1264
  );
1237
1265
  const pageAllOn = selectable && slice.length > 0 && slice.every((r) => selected.has(r.name));
1238
- return /* @__PURE__ */ jsxs11(Fragment3, { children: [
1239
- scrollable && columnScroll.overflow && /* @__PURE__ */ jsxs11("div", { className: "ui-card__row", role: "group", "aria-label": `${scrollLabel} columns`, children: [
1240
- /* @__PURE__ */ jsx15(Button, { size: "sm", icon: "arrowLeft", "aria-controls": scrollId, disabled: columnScroll.start, onClick: () => scrollColumns(-1), children: "Previous columns" }),
1241
- /* @__PURE__ */ jsx15(Button, { size: "sm", iconRight: "arrowRight", "aria-controls": scrollId, disabled: columnScroll.end, onClick: () => scrollColumns(1), children: "More columns" })
1266
+ return /* @__PURE__ */ jsxs13(Fragment3, { children: [
1267
+ scrollable && columnScroll.overflow && /* @__PURE__ */ jsxs13("div", { className: "ui-card__row", role: "group", "aria-label": `${scrollLabel} columns`, children: [
1268
+ /* @__PURE__ */ jsx17(Button, { size: "sm", icon: "arrowLeft", "aria-controls": scrollId, disabled: columnScroll.start, onClick: () => scrollColumns(-1), children: "Previous columns" }),
1269
+ /* @__PURE__ */ jsx17(Button, { size: "sm", iconRight: "arrowRight", "aria-controls": scrollId, disabled: columnScroll.end, onClick: () => scrollColumns(1), children: "More columns" })
1242
1270
  ] }),
1243
- /* @__PURE__ */ jsx15(
1271
+ /* @__PURE__ */ jsx17(
1244
1272
  "div",
1245
1273
  {
1246
1274
  id: scrollId,
@@ -1250,14 +1278,14 @@ function DataTable({
1250
1278
  role: stickyHeader || pinnedIdentity ? "region" : void 0,
1251
1279
  "aria-label": stickyHeader || pinnedIdentity ? scrollLabel : void 0,
1252
1280
  tabIndex: stickyHeader || pinnedIdentity ? 0 : void 0,
1253
- children: /* @__PURE__ */ jsxs11(
1281
+ children: /* @__PURE__ */ jsxs13(
1254
1282
  "table",
1255
1283
  {
1256
1284
  className: ["ui-table ui-table--hover", (density === "dense" || !density && dense) && "ui-table--dense", density === "compact" && "ui-table--compact", stickyHeader && "ui-table--sticky", pinnedIdentity && "ui-table--pinned"].filter(Boolean).join(" "),
1257
1285
  "aria-busy": loading || void 0,
1258
1286
  children: [
1259
- /* @__PURE__ */ jsx15("thead", { children: /* @__PURE__ */ jsxs11("tr", { children: [
1260
- selectable ? /* @__PURE__ */ jsx15("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx15(
1287
+ /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs13("tr", { children: [
1288
+ selectable ? /* @__PURE__ */ jsx17("th", { scope: "col", className: "ui-table__selection", children: /* @__PURE__ */ jsx17(
1261
1289
  "input",
1262
1290
  {
1263
1291
  type: "checkbox",
@@ -1270,13 +1298,13 @@ function DataTable({
1270
1298
  // The sort control is a real <button> inside the header cell. It used to be
1271
1299
  // role="button" ON the <th>, which threw away the columnheader role and put
1272
1300
  // aria-sort on a role that forbids it.
1273
- /* @__PURE__ */ jsx15(
1301
+ /* @__PURE__ */ jsx17(
1274
1302
  "th",
1275
1303
  {
1276
1304
  scope: "col",
1277
1305
  className: [pinnedIdentity && columnIndex === 0 && "ui-table__identity", c.num && "ui-table__num", c.sortable && "rx-sortable"].filter(Boolean).join(" "),
1278
1306
  "aria-sort": sort.key === c.key ? sort.dir === 1 ? "ascending" : "descending" : c.sortable && sortIsKnown ? "none" : void 0,
1279
- children: c.sortable ? /* @__PURE__ */ jsxs11("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
1307
+ children: c.sortable ? /* @__PURE__ */ jsxs13("button", { type: "button", className: "rx-sort", onClick: () => onSort(c.key), children: [
1280
1308
  c.label,
1281
1309
  caret(c.key)
1282
1310
  ] }) : c.label
@@ -1285,10 +1313,10 @@ function DataTable({
1285
1313
  )
1286
1314
  ))
1287
1315
  ] }) }),
1288
- /* @__PURE__ */ jsxs11("tbody", { children: [
1289
- !slice.length && /* @__PURE__ */ jsx15("tr", { children: /* @__PURE__ */ jsx15("td", { colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
1290
- slice.map((r) => /* @__PURE__ */ jsxs11("tr", { children: [
1291
- selectable ? /* @__PURE__ */ jsx15("td", { className: "ui-table__selection", children: /* @__PURE__ */ jsx15(
1316
+ /* @__PURE__ */ jsxs13("tbody", { children: [
1317
+ !slice.length && /* @__PURE__ */ jsx17("tr", { children: /* @__PURE__ */ jsx17("td", { colSpan: columns.length + (selectable ? 1 : 0), children: loading ? "Loading rows\u2026" : empty }) }),
1318
+ slice.map((r) => /* @__PURE__ */ jsxs13("tr", { children: [
1319
+ selectable ? /* @__PURE__ */ jsx17("td", { className: "ui-table__selection", children: /* @__PURE__ */ jsx17(
1292
1320
  "input",
1293
1321
  {
1294
1322
  type: "checkbox",
@@ -1297,7 +1325,7 @@ function DataTable({
1297
1325
  onChange: () => onToggle(r.name)
1298
1326
  }
1299
1327
  ) }) : null,
1300
- columns.map((c, columnIndex) => /* @__PURE__ */ jsx15("td", { className: [c.num && "ui-table__num", pinnedIdentity && columnIndex === 0 && "ui-table__identity"].filter(Boolean).join(" "), children: c.render ? c.render(r) : String(r[c.key]) }, c.key))
1328
+ columns.map((c, columnIndex) => /* @__PURE__ */ jsx17("td", { className: [c.num && "ui-table__num", pinnedIdentity && columnIndex === 0 && "ui-table__identity"].filter(Boolean).join(" "), children: c.render ? c.render(r) : String(r[c.key]) }, c.key))
1301
1329
  ] }, r.name))
1302
1330
  ] })
1303
1331
  ]
@@ -1305,7 +1333,7 @@ function DataTable({
1305
1333
  )
1306
1334
  }
1307
1335
  ),
1308
- pager ? /* @__PURE__ */ jsx15(
1336
+ pager ? /* @__PURE__ */ jsx17(
1309
1337
  Pagination,
1310
1338
  {
1311
1339
  page,
@@ -1330,7 +1358,7 @@ function DataTable({
1330
1358
  import { PAGE_SIZES as KIT_PAGE_SIZES, DEFAULT_PAGE_SIZE as KIT_DEFAULT_PAGE_SIZE } from "@apliteni/apliteni-ui";
1331
1359
 
1332
1360
  // src/Loading.tsx
1333
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
1361
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1334
1362
  var cx4 = (...a) => a.filter(Boolean).join(" ");
1335
1363
  function Skeleton({ lines = 3, width, height, radius, className }) {
1336
1364
  const widths = Array.isArray(lines) ? lines : null;
@@ -1340,19 +1368,19 @@ function Skeleton({ lines = 3, width, height, radius, className }) {
1340
1368
  if (!w && !height && !radius) return void 0;
1341
1369
  return { ...w && { width: w }, ...height && { height }, ...radius && { borderRadius: radius } };
1342
1370
  };
1343
- return /* @__PURE__ */ jsx16("div", { className: cx4("ui-skel", className), "aria-hidden": "true", children: Array.from({ length: n }, (_, i) => /* @__PURE__ */ jsx16("span", { className: "ui-skel__bar m-skeleton", style: styleFor(i) }, i)) });
1371
+ return /* @__PURE__ */ jsx18("div", { className: cx4("ui-skel", className), "aria-hidden": "true", children: Array.from({ length: n }, (_, i) => /* @__PURE__ */ jsx18("span", { className: "ui-skel__bar m-skeleton", style: styleFor(i) }, i)) });
1344
1372
  }
1345
1373
  function SkeletonTable({ rows = 5, cols = 4, head = true }) {
1346
- const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */ jsx16("span", { className: "ui-skel__bar m-skeleton" }, i));
1347
- return /* @__PURE__ */ jsxs12(
1374
+ const cells = Array.from({ length: Math.max(1, cols) }, (_, i) => /* @__PURE__ */ jsx18("span", { className: "ui-skel__bar m-skeleton" }, i));
1375
+ return /* @__PURE__ */ jsxs14(
1348
1376
  "div",
1349
1377
  {
1350
1378
  className: "ui-skel ui-skel--table",
1351
1379
  style: { "--skel-cols": Math.max(1, cols) },
1352
1380
  "aria-hidden": "true",
1353
1381
  children: [
1354
- head && /* @__PURE__ */ jsx16("div", { className: "ui-skel__row ui-skel__row--head", children: cells }),
1355
- Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsx16("div", { className: "ui-skel__row", children: cells }, i))
1382
+ head && /* @__PURE__ */ jsx18("div", { className: "ui-skel__row ui-skel__row--head", children: cells }),
1383
+ Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsx18("div", { className: "ui-skel__row", children: cells }, i))
1356
1384
  ]
1357
1385
  }
1358
1386
  );
@@ -1365,7 +1393,7 @@ function BusyRegion({
1365
1393
  className,
1366
1394
  children
1367
1395
  }) {
1368
- return /* @__PURE__ */ jsxs12(
1396
+ return /* @__PURE__ */ jsxs14(
1369
1397
  "div",
1370
1398
  {
1371
1399
  className: cx4("ui-busy", className),
@@ -1373,8 +1401,8 @@ function BusyRegion({
1373
1401
  "aria-live": "polite",
1374
1402
  "aria-busy": busy,
1375
1403
  children: [
1376
- /* @__PURE__ */ jsx16("span", { className: "ui-sr", children: busy ? label : message }),
1377
- /* @__PURE__ */ jsx16("div", { className: "ui-busy__body", children: busy ? placeholder ?? /* @__PURE__ */ jsx16(Skeleton, { lines: 3 }) : children })
1404
+ /* @__PURE__ */ jsx18("span", { className: "ui-sr", children: busy ? label : message }),
1405
+ /* @__PURE__ */ jsx18("div", { className: "ui-busy__body", children: busy ? placeholder ?? /* @__PURE__ */ jsx18(Skeleton, { lines: 3 }) : children })
1378
1406
  ]
1379
1407
  }
1380
1408
  );
@@ -1387,15 +1415,15 @@ function Denied({
1387
1415
  className,
1388
1416
  children
1389
1417
  }) {
1390
- return /* @__PURE__ */ jsxs12("div", { className: cx4("ui-denied", className), children: [
1391
- /* @__PURE__ */ jsx16("div", { className: "ui-denied__seal", children: /* @__PURE__ */ jsx16(Icon, { name: icon6 }) }),
1392
- /* @__PURE__ */ jsx16("div", { className: "ui-denied__title", children: title }),
1393
- sub && /* @__PURE__ */ jsx16("div", { className: "ui-denied__sub", children: sub }),
1394
- need && /* @__PURE__ */ jsxs12("div", { className: "ui-denied__need", children: [
1418
+ return /* @__PURE__ */ jsxs14("div", { className: cx4("ui-denied", className), children: [
1419
+ /* @__PURE__ */ jsx18("div", { className: "ui-denied__seal", children: /* @__PURE__ */ jsx18(Icon, { name: icon6 }) }),
1420
+ /* @__PURE__ */ jsx18("div", { className: "ui-denied__title", children: title }),
1421
+ sub && /* @__PURE__ */ jsx18("div", { className: "ui-denied__sub", children: sub }),
1422
+ need && /* @__PURE__ */ jsxs14("div", { className: "ui-denied__need", children: [
1395
1423
  "Needs ",
1396
- /* @__PURE__ */ jsx16("code", { className: "ui-code", children: need })
1424
+ /* @__PURE__ */ jsx18("code", { className: "ui-code", children: need })
1397
1425
  ] }),
1398
- children && /* @__PURE__ */ jsx16("div", { className: "ui-denied__actions", children })
1426
+ children && /* @__PURE__ */ jsx18("div", { className: "ui-denied__actions", children })
1399
1427
  ] });
1400
1428
  }
1401
1429
 
@@ -1409,10 +1437,10 @@ import {
1409
1437
  useState as useState6
1410
1438
  } from "react";
1411
1439
  import { icon as icon3, dropdownMatch, dropdownFiltering } from "@apliteni/apliteni-ui";
1412
- import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
1440
+ import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1413
1441
  var cx5 = (...a) => a.filter(Boolean).join(" ");
1414
1442
  var isRow = (it) => Boolean(it) && it !== "---" && !it.separator;
1415
- var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */ jsx17(
1443
+ var Glyph2 = ({ name, className, hidden }) => /* @__PURE__ */ jsx19(
1416
1444
  "span",
1417
1445
  {
1418
1446
  className,
@@ -1425,7 +1453,7 @@ function RowBadge({ badge }) {
1425
1453
  const given = typeof badge === "string" ? "" : badge.tone || "";
1426
1454
  let tone = given || (/^live$/i.test(String(text2)) ? "live" : "neutral");
1427
1455
  if (!given && tone === "neutral" && /^(?:off|unset|disabled|archive|archived)$/i.test(text2)) tone = "state";
1428
- return /* @__PURE__ */ jsx17("span", { className: `ui-dropdown__badge is-${tone}`, children: text2 });
1456
+ return /* @__PURE__ */ jsx19("span", { className: `ui-dropdown__badge is-${tone}`, children: text2 });
1429
1457
  }
1430
1458
  var keyOf = (it) => it.value != null ? `v:${it.value}` : `l:${it.label}`;
1431
1459
  var itemsIn = (panel) => Array.from(panel?.querySelectorAll("[data-dd-item]") ?? []).filter((el) => el.getAttribute("aria-disabled") !== "true" && !el.hidden);
@@ -1640,7 +1668,7 @@ function Dropdown({
1640
1668
  };
1641
1669
  function renderRow(entry, key) {
1642
1670
  if (!isRow(entry)) {
1643
- return /* @__PURE__ */ jsx17("div", { className: "ui-dropdown__sep", role: "separator", hidden: filtering || void 0 }, key);
1671
+ return /* @__PURE__ */ jsx19("div", { className: "ui-dropdown__sep", role: "separator", hidden: filtering || void 0 }, key);
1644
1672
  }
1645
1673
  const disabled = !!entry.disabled;
1646
1674
  const selected = selectedOf(entry);
@@ -1662,23 +1690,23 @@ function Dropdown({
1662
1690
  ...asLink ? { href: entry.href, ...entry.target ? { target: entry.target } : null } : null,
1663
1691
  ...sx ? { id: rowIds.get(entry), hidden: hiddenBy(entry) || void 0 } : null,
1664
1692
  onClick: (e) => choose(entry, e),
1665
- children: /* @__PURE__ */ jsxs13(Fragment5, { children: [
1666
- entry.icon && /* @__PURE__ */ jsx17(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
1667
- /* @__PURE__ */ jsxs13("span", { className: "ui-dropdown__main", children: [
1668
- /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__label", children: entry.label }),
1669
- entry.description && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__desc", children: entry.description })
1693
+ children: /* @__PURE__ */ jsxs15(Fragment5, { children: [
1694
+ entry.icon && /* @__PURE__ */ jsx19(Glyph2, { name: entry.icon, className: "ui-dropdown__ic" }),
1695
+ /* @__PURE__ */ jsxs15("span", { className: "ui-dropdown__main", children: [
1696
+ /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__label", children: entry.label }),
1697
+ entry.description && /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__desc", children: entry.description })
1670
1698
  ] }),
1671
- entry.badge ? /* @__PURE__ */ jsx17(RowBadge, { badge: entry.badge }) : null,
1672
- asOption && /* @__PURE__ */ jsx17(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
1699
+ entry.badge ? /* @__PURE__ */ jsx19(RowBadge, { badge: entry.badge }) : null,
1700
+ asOption && /* @__PURE__ */ jsx19(Glyph2, { name: "check", className: "ui-dropdown__tick", hidden: true })
1673
1701
  ] })
1674
1702
  };
1675
- if (row) return /* @__PURE__ */ jsx17(Fragment4, { children: row(entry, props) }, key);
1703
+ if (row) return /* @__PURE__ */ jsx19(Fragment4, { children: row(entry, props) }, key);
1676
1704
  const Tag = asLink ? "a" : "div";
1677
- return /* @__PURE__ */ jsx17(Tag, { ...props }, key);
1705
+ return /* @__PURE__ */ jsx19(Tag, { ...props }, key);
1678
1706
  }
1679
1707
  const body = sections?.length ? sections.map((section, si) => {
1680
1708
  const gone = filtering && !(section.items || []).some((it) => isRow(it) && !hiddenBy(it));
1681
- return /* @__PURE__ */ jsxs13(
1709
+ return /* @__PURE__ */ jsxs15(
1682
1710
  "div",
1683
1711
  {
1684
1712
  className: "ui-dropdown__section",
@@ -1686,7 +1714,7 @@ function Dropdown({
1686
1714
  "aria-label": section.label || void 0,
1687
1715
  hidden: gone || void 0,
1688
1716
  children: [
1689
- section.label && /* @__PURE__ */ jsx17("div", { className: "ui-dropdown__group", role: "presentation", children: section.label }),
1717
+ section.label && /* @__PURE__ */ jsx19("div", { className: "ui-dropdown__group", role: "presentation", children: section.label }),
1690
1718
  (section.items || []).map((entry, i) => renderRow(entry, `s${si}-${i}`))
1691
1719
  ]
1692
1720
  },
@@ -1694,12 +1722,12 @@ function Dropdown({
1694
1722
  );
1695
1723
  }) : (items || []).map((entry, i) => renderRow(entry, `i${i}`));
1696
1724
  const cap = scroll && scroll !== true ? { maxHeight: typeof scroll === "number" ? `${scroll}px` : scroll } : void 0;
1697
- const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
1698
- /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
1699
- /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__none-hint", children: sx.hint })
1725
+ const none = sx && filtering && !visible.length ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
1726
+ /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__none-title", children: sx.empty.replace("{q}", () => query.trim()) }),
1727
+ /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__none-hint", children: sx.hint })
1700
1728
  ] }) : null;
1701
- return /* @__PURE__ */ jsxs13("div", { className: cx5("ui-dropdown", open && "open"), id, ref: root, onKeyDown, children: [
1702
- /* @__PURE__ */ jsxs13(
1729
+ return /* @__PURE__ */ jsxs15("div", { className: cx5("ui-dropdown", open && "open"), id, ref: root, onKeyDown, children: [
1730
+ /* @__PURE__ */ jsxs15(
1703
1731
  "button",
1704
1732
  {
1705
1733
  type: "button",
@@ -1714,15 +1742,15 @@ function Dropdown({
1714
1742
  setOpen(!open);
1715
1743
  },
1716
1744
  children: [
1717
- triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs13(Fragment5, { children: [
1718
- label && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__pre", children: label }),
1719
- /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__value", children: shown != null ? shown : placeholder })
1745
+ triggerContent != null ? triggerContent : /* @__PURE__ */ jsxs15(Fragment5, { children: [
1746
+ label && /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__pre", children: label }),
1747
+ /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__value", children: shown != null ? shown : placeholder })
1720
1748
  ] }),
1721
- chevron && /* @__PURE__ */ jsx17("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
1749
+ chevron && /* @__PURE__ */ jsx19("span", { className: "ui-dropdown__chevron", "aria-hidden": "true" })
1722
1750
  ]
1723
1751
  }
1724
1752
  ),
1725
- /* @__PURE__ */ jsxs13(
1753
+ /* @__PURE__ */ jsxs15(
1726
1754
  "div",
1727
1755
  {
1728
1756
  className: cx5(
@@ -1742,10 +1770,10 @@ function Dropdown({
1742
1770
  onMouseMove,
1743
1771
  children: [
1744
1772
  header,
1745
- sx ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
1746
- /* @__PURE__ */ jsxs13("div", { className: "ui-dropdown__search", children: [
1747
- /* @__PURE__ */ jsx17(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
1748
- /* @__PURE__ */ jsx17(
1773
+ sx ? /* @__PURE__ */ jsxs15(Fragment5, { children: [
1774
+ /* @__PURE__ */ jsxs15("div", { className: "ui-dropdown__search", children: [
1775
+ /* @__PURE__ */ jsx19(Glyph2, { name: "search", className: "ui-dropdown__search-ic", hidden: true }),
1776
+ /* @__PURE__ */ jsx19(
1749
1777
  "input",
1750
1778
  {
1751
1779
  className: "ui-dropdown__search-input",
@@ -1769,8 +1797,8 @@ function Dropdown({
1769
1797
  }
1770
1798
  )
1771
1799
  ] }),
1772
- /* @__PURE__ */ jsx17("div", { className: "ui-dropdown__list", role: "listbox", id: listId, "aria-label": name, style: cap, children: body }),
1773
- /* @__PURE__ */ jsx17(
1800
+ /* @__PURE__ */ jsx19("div", { className: "ui-dropdown__list", role: "listbox", id: listId, "aria-label": name, style: cap, children: body }),
1801
+ /* @__PURE__ */ jsx19(
1774
1802
  "div",
1775
1803
  {
1776
1804
  className: "ui-dropdown__none",
@@ -1795,7 +1823,7 @@ function strip(o) {
1795
1823
  }
1796
1824
 
1797
1825
  // src/BackLink.tsx
1798
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
1826
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1799
1827
  var BARE = "Back";
1800
1828
  var SCRIPTED = /^javascript:/i;
1801
1829
  var LEADING = /^[\u0000-\u0020]+/;
@@ -1814,7 +1842,7 @@ function BackLink({
1814
1842
  const name = text(label).replace(SAID, "");
1815
1843
  const bare = !name || name.toLowerCase() === BARE.toLowerCase();
1816
1844
  const Tag = as ?? "a";
1817
- return /* @__PURE__ */ jsxs14(
1845
+ return /* @__PURE__ */ jsxs16(
1818
1846
  Tag,
1819
1847
  {
1820
1848
  className: ["ui-back", className].filter(Boolean).join(" "),
@@ -1822,8 +1850,8 @@ function BackLink({
1822
1850
  "aria-label": bare ? void 0 : `${BARE} to ${name}`,
1823
1851
  ...rest,
1824
1852
  children: [
1825
- /* @__PURE__ */ jsx18(Icon, { name: "chevronLeft" }),
1826
- /* @__PURE__ */ jsx18("span", { className: "ui-back__label", children: bare ? BARE : name })
1853
+ /* @__PURE__ */ jsx20(Icon, { name: "chevronLeft" }),
1854
+ /* @__PURE__ */ jsx20("span", { className: "ui-back__label", children: bare ? BARE : name })
1827
1855
  ]
1828
1856
  }
1829
1857
  );
@@ -1831,41 +1859,41 @@ function BackLink({
1831
1859
 
1832
1860
  // src/TableValues.tsx
1833
1861
  import { formatNumericValue, formatDeltaValue } from "@apliteni/apliteni-ui";
1834
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1862
+ import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1835
1863
  function NumericValue(props) {
1836
1864
  const value = formatNumericValue(props);
1837
- return /* @__PURE__ */ jsx19("span", { children: /* @__PURE__ */ jsxs15("span", { className: "ui-value", "aria-label": value.missing, children: [
1865
+ return /* @__PURE__ */ jsx21("span", { children: /* @__PURE__ */ jsxs17("span", { className: "ui-value", "aria-label": value.missing, children: [
1838
1866
  value.text,
1839
- value.unit && /* @__PURE__ */ jsx19("span", { className: "ui-value__unit", children: value.unit })
1867
+ value.unit && /* @__PURE__ */ jsx21("span", { className: "ui-value__unit", children: value.unit })
1840
1868
  ] }) });
1841
1869
  }
1842
1870
  function DeltaValue(props) {
1843
1871
  const value = formatDeltaValue(props);
1844
- return /* @__PURE__ */ jsx19("span", { children: /* @__PURE__ */ jsx19("span", { className: value.className, "aria-describedby": value.basisId || void 0, children: value.text }) });
1872
+ return /* @__PURE__ */ jsx21("span", { children: /* @__PURE__ */ jsx21("span", { className: value.className, "aria-describedby": value.basisId || void 0, children: value.text }) });
1845
1873
  }
1846
1874
  function RowIdentity({ symbol, name, logo, href }) {
1847
1875
  const Tag = href ? "a" : "span";
1848
- return /* @__PURE__ */ jsxs15(Tag, { className: "ui-identity", href, children: [
1849
- /* @__PURE__ */ jsxs15("span", { className: "ui-identity__logo", "aria-hidden": "true", children: [
1850
- /* @__PURE__ */ jsx19("span", { children: symbol.slice(0, 1) }),
1851
- logo && /* @__PURE__ */ jsx19("img", { src: logo, alt: "", onLoad: (e) => {
1876
+ return /* @__PURE__ */ jsxs17(Tag, { className: "ui-identity", href, children: [
1877
+ /* @__PURE__ */ jsxs17("span", { className: "ui-identity__logo", "aria-hidden": "true", children: [
1878
+ /* @__PURE__ */ jsx21("span", { children: symbol.slice(0, 1) }),
1879
+ logo && /* @__PURE__ */ jsx21("img", { src: logo, alt: "", onLoad: (e) => {
1852
1880
  e.currentTarget.hidden = false;
1853
1881
  }, onError: (e) => {
1854
1882
  e.currentTarget.hidden = true;
1855
1883
  } })
1856
1884
  ] }),
1857
- /* @__PURE__ */ jsx19("span", { className: "ui-identity__symbol", children: symbol }),
1858
- /* @__PURE__ */ jsx19("span", { className: "ui-identity__name", children: name })
1885
+ /* @__PURE__ */ jsx21("span", { className: "ui-identity__symbol", children: symbol }),
1886
+ /* @__PURE__ */ jsx21("span", { className: "ui-identity__name", children: name })
1859
1887
  ] });
1860
1888
  }
1861
1889
 
1862
1890
  // src/Segmented.tsx
1863
1891
  import { segmentedNextIndex } from "@apliteni/apliteni-ui";
1864
- import { jsx as jsx20 } from "react/jsx-runtime";
1892
+ import { jsx as jsx22 } from "react/jsx-runtime";
1865
1893
  function Segmented({ options, value, onChange, label, appearance = "pill", disabled = false }) {
1866
1894
  const enabled = options.filter((o) => !o.disabled);
1867
1895
  const tabValue = enabled.some((o) => o.value === value) ? value : enabled[0]?.value;
1868
- return /* @__PURE__ */ jsx20("div", { className: `ui-seg${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx20(
1896
+ return /* @__PURE__ */ jsx22("div", { className: `ui-seg${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx22(
1869
1897
  "button",
1870
1898
  {
1871
1899
  type: "button",
@@ -1892,7 +1920,7 @@ function Segmented({ options, value, onChange, label, appearance = "pill", disab
1892
1920
 
1893
1921
  // src/FilterBar.tsx
1894
1922
  import { useRef as useRef11, useState as useState7 } from "react";
1895
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1923
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
1896
1924
  function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters", disabled = false, busy = false, onRemove, onClear, onChange }) {
1897
1925
  const bar = useRef11(null);
1898
1926
  const focused = useRef11(null);
@@ -1909,7 +1937,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1909
1937
  focused.current = null;
1910
1938
  (target || bar.current)?.focus();
1911
1939
  });
1912
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsxs16(
1940
+ return /* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsxs18(
1913
1941
  "fieldset",
1914
1942
  {
1915
1943
  ref: bar,
@@ -1922,8 +1950,8 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1922
1950
  if (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) focused.current = null;
1923
1951
  },
1924
1952
  children: [
1925
- /* @__PURE__ */ jsx21("legend", { className: "ui-filter-bar__legend", children: label }),
1926
- filters.map((filter, index) => /* @__PURE__ */ jsxs16(
1953
+ /* @__PURE__ */ jsx23("legend", { className: "ui-filter-bar__legend", children: label }),
1954
+ filters.map((filter, index) => /* @__PURE__ */ jsxs18(
1927
1955
  "fieldset",
1928
1956
  {
1929
1957
  className: "ui-filter-bar__chip",
@@ -1933,8 +1961,8 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1933
1961
  focused.current = { id: filter.id, index };
1934
1962
  },
1935
1963
  children: [
1936
- /* @__PURE__ */ jsx21("legend", { className: "ui-filter-bar__legend", children: filter.label }),
1937
- /* @__PURE__ */ jsx21(
1964
+ /* @__PURE__ */ jsx23("legend", { className: "ui-filter-bar__legend", children: filter.label }),
1965
+ /* @__PURE__ */ jsx23(
1938
1966
  Dropdown,
1939
1967
  {
1940
1968
  label: filter.label,
@@ -1949,7 +1977,7 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1949
1977
  }
1950
1978
  }
1951
1979
  ),
1952
- /* @__PURE__ */ jsx21(
1980
+ /* @__PURE__ */ jsx23(
1953
1981
  "button",
1954
1982
  {
1955
1983
  type: "button",
@@ -1966,9 +1994,9 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1966
1994
  },
1967
1995
  filter.id
1968
1996
  )),
1969
- /* @__PURE__ */ jsx21("span", { "data-filter-clear": "", onFocus: () => {
1997
+ /* @__PURE__ */ jsx23("span", { "data-filter-clear": "", onFocus: () => {
1970
1998
  focused.current = { id: null, index: 0 };
1971
- }, children: /* @__PURE__ */ jsx21(Button, { size: "sm", variant: "ghost", disabled: !filters.length, onClick: () => {
1999
+ }, children: /* @__PURE__ */ jsx23(Button, { size: "sm", variant: "ghost", disabled: !filters.length, onClick: () => {
1972
2000
  if (!blocked) onClear();
1973
2001
  }, children: clearLabel }) })
1974
2002
  ]
@@ -1977,32 +2005,32 @@ function FilterBar({ filters, label = "Filters", clearLabel = "Clear all filters
1977
2005
  }
1978
2006
 
1979
2007
  // src/KeyValueList.tsx
1980
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
2008
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1981
2009
  function detail({ value, redacted }) {
1982
- if (redacted) return /* @__PURE__ */ jsxs17("span", { className: "ui-kv__hidden", children: [
1983
- /* @__PURE__ */ jsx22(Icon, { name: "eyeOff" }),
2010
+ if (redacted) return /* @__PURE__ */ jsxs19("span", { className: "ui-kv__hidden", children: [
2011
+ /* @__PURE__ */ jsx24(Icon, { name: "eyeOff" }),
1984
2012
  "Hidden"
1985
2013
  ] });
1986
2014
  if (value == null) return "\u2014";
1987
2015
  return typeof value === "boolean" ? String(value) : value;
1988
2016
  }
1989
2017
  function KeyValueList({ rows, columns = 1, className, ...rest }) {
1990
- return /* @__PURE__ */ jsx22("dl", { ...rest, className: ["ui-kv", columns === 2 && "ui-kv--two-columns", className].filter(Boolean).join(" "), children: rows.map((row, index) => /* @__PURE__ */ jsxs17("div", { className: "ui-drawer__row", children: [
1991
- /* @__PURE__ */ jsx22("dt", { children: row.label }),
1992
- /* @__PURE__ */ jsx22("dd", { children: detail(row) })
2018
+ return /* @__PURE__ */ jsx24("dl", { ...rest, className: ["ui-kv", columns === 2 && "ui-kv--two-columns", className].filter(Boolean).join(" "), children: rows.map((row, index) => /* @__PURE__ */ jsxs19("div", { className: "ui-drawer__row", children: [
2019
+ /* @__PURE__ */ jsx24("dt", { children: row.label }),
2020
+ /* @__PURE__ */ jsx24("dd", { children: detail(row) })
1993
2021
  ] }, index)) });
1994
2022
  }
1995
2023
  function DrawerSection({ title, headingLevel = 3, className, children, ...rest }) {
1996
2024
  const Heading = `h${headingLevel}`;
1997
- return /* @__PURE__ */ jsxs17("section", { ...rest, className: ["ui-drawer__section", className].filter(Boolean).join(" "), children: [
1998
- title != null && /* @__PURE__ */ jsx22(Heading, { className: "ui-drawer__section-title", children: title }),
2025
+ return /* @__PURE__ */ jsxs19("section", { ...rest, className: ["ui-drawer__section", className].filter(Boolean).join(" "), children: [
2026
+ title != null && /* @__PURE__ */ jsx24(Heading, { className: "ui-drawer__section-title", children: title }),
1999
2027
  children
2000
2028
  ] });
2001
2029
  }
2002
2030
 
2003
2031
  // src/Snippet.tsx
2004
2032
  import { useEffect as useEffect7, useRef as useRef12, useState as useState8 } from "react";
2005
- import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
2033
+ import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
2006
2034
  function Snippet({ label = "shell", code = "", reveal = false, copyLabel = "Copy" }) {
2007
2035
  const [status, setStatus] = useState8("idle");
2008
2036
  const request = useRef12(0);
@@ -2027,22 +2055,22 @@ function Snippet({ label = "shell", code = "", reveal = false, copyLabel = "Copy
2027
2055
  if (current === request.current) setStatus("failed");
2028
2056
  }
2029
2057
  }
2030
- return /* @__PURE__ */ jsxs18("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
2031
- /* @__PURE__ */ jsxs18("div", { className: "ui-snippet__bar", children: [
2032
- /* @__PURE__ */ jsx23("span", { children: label }),
2033
- /* @__PURE__ */ jsxs18("button", { type: "button", className: "ui-snippet__copy", "aria-live": "polite", "aria-atomic": "true", onClick: copy, children: [
2034
- /* @__PURE__ */ jsx23(Icon, { name: status === "copied" ? "check" : "copy" }),
2058
+ return /* @__PURE__ */ jsxs20("div", { className: reveal ? "ui-snippet ui-snippet--reveal" : "ui-snippet", children: [
2059
+ /* @__PURE__ */ jsxs20("div", { className: "ui-snippet__bar", children: [
2060
+ /* @__PURE__ */ jsx25("span", { children: label }),
2061
+ /* @__PURE__ */ jsxs20("button", { type: "button", className: "ui-snippet__copy", "aria-live": "polite", "aria-atomic": "true", onClick: copy, children: [
2062
+ /* @__PURE__ */ jsx25(Icon, { name: status === "copied" ? "check" : "copy" }),
2035
2063
  status === "copied" ? "Copied" : status === "failed" ? "Copy failed" : copyLabel
2036
2064
  ] })
2037
2065
  ] }),
2038
- /* @__PURE__ */ jsx23("pre", { children: code })
2066
+ /* @__PURE__ */ jsx25("pre", { children: code })
2039
2067
  ] });
2040
2068
  }
2041
2069
 
2042
2070
  // src/Tabs.tsx
2043
2071
  import { useEffect as useEffect8, useId as useId9, useRef as useRef13 } from "react";
2044
2072
  import { playEntrance } from "@apliteni/apliteni-ui/motion";
2045
- import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
2073
+ import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
2046
2074
  function Tabs({ items, value, onChange, label }) {
2047
2075
  const id = useId9();
2048
2076
  const previous = useRef13(value);
@@ -2052,8 +2080,8 @@ function Tabs({ items, value, onChange, label }) {
2052
2080
  if (previous.current !== value) playEntrance(activePanel.current);
2053
2081
  previous.current = value;
2054
2082
  }, [value]);
2055
- return /* @__PURE__ */ jsxs19("div", { className: "ui-tabs", children: [
2056
- /* @__PURE__ */ jsx24("div", { className: "ui-tabs__list", role: "tablist", "aria-label": label, children: items.map((item, i) => /* @__PURE__ */ jsxs19(
2083
+ return /* @__PURE__ */ jsxs21("div", { className: "ui-tabs", children: [
2084
+ /* @__PURE__ */ jsx26("div", { className: "ui-tabs__list", role: "tablist", "aria-label": label, children: items.map((item, i) => /* @__PURE__ */ jsxs21(
2057
2085
  "button",
2058
2086
  {
2059
2087
  type: "button",
@@ -2091,7 +2119,7 @@ function Tabs({ items, value, onChange, label }) {
2091
2119
  },
2092
2120
  children: [
2093
2121
  item.label,
2094
- item.count != null && /* @__PURE__ */ jsxs19(Fragment6, { children: [
2122
+ item.count != null && /* @__PURE__ */ jsxs21(Fragment6, { children: [
2095
2123
  " ",
2096
2124
  item.count
2097
2125
  ] })
@@ -2099,7 +2127,7 @@ function Tabs({ items, value, onChange, label }) {
2099
2127
  },
2100
2128
  item.value
2101
2129
  )) }),
2102
- /* @__PURE__ */ jsx24("div", { className: "ui-tabs__panels", children: items.map((item, i) => /* @__PURE__ */ jsx24(
2130
+ /* @__PURE__ */ jsx26("div", { className: "ui-tabs__panels", children: items.map((item, i) => /* @__PURE__ */ jsx26(
2103
2131
  "div",
2104
2132
  {
2105
2133
  className: "ui-tabs__panel",
@@ -2119,7 +2147,7 @@ function Tabs({ items, value, onChange, label }) {
2119
2147
  // src/Timeline.tsx
2120
2148
  import { useEffect as useEffect9, useRef as useRef14 } from "react";
2121
2149
  import { playEntrance as playEntrance2, prefersReducedMotion } from "@apliteni/apliteni-ui/motion";
2122
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
2150
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
2123
2151
  var kindIcons = { person: "user", rule: "bolt", reversal: "refresh" };
2124
2152
  function Timeline({ events, className, ...rest }) {
2125
2153
  const previousIds = useRef14(new Set(events.map((event) => event.id)));
@@ -2136,7 +2164,7 @@ function Timeline({ events, className, ...rest }) {
2136
2164
  }
2137
2165
  previousIds.current = new Set(events.map((event) => event.id));
2138
2166
  }, [events]);
2139
- return /* @__PURE__ */ jsx25("ol", { ...rest, role: "list", className: ["ui-timeline", events.some((event) => event.kind) && "ui-timeline--kinds", className].filter(Boolean).join(" "), children: events.map((event, index) => /* @__PURE__ */ jsxs20(
2167
+ return /* @__PURE__ */ jsx27("ol", { ...rest, role: "list", className: ["ui-timeline", events.some((event) => event.kind) && "ui-timeline--kinds", className].filter(Boolean).join(" "), children: events.map((event, index) => /* @__PURE__ */ jsxs22(
2140
2168
  "li",
2141
2169
  {
2142
2170
  className: "ui-timeline__event",
@@ -2145,20 +2173,20 @@ function Timeline({ events, className, ...rest }) {
2145
2173
  else rows.current.delete(event.id);
2146
2174
  },
2147
2175
  children: [
2148
- /* @__PURE__ */ jsx25("span", { "aria-hidden": "true", className: [
2176
+ /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: [
2149
2177
  "ui-timeline__marker",
2150
2178
  event.kind && "ui-timeline__marker--kind",
2151
2179
  event.kind === "reversal" && "ui-timeline__marker--reversal"
2152
- ].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */ jsx25(Icon, { name: kindIcons[event.kind] }) }),
2153
- /* @__PURE__ */ jsxs20("div", { className: "ui-timeline__head", children: [
2154
- /* @__PURE__ */ jsx25("span", { className: "ui-timeline__actor", children: event.actor }),
2155
- /* @__PURE__ */ jsx25("time", { dateTime: event.dateTime, children: event.timestamp }),
2156
- index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */ jsx25("span", { className: "ui-timeline__relative", children: event.relativeTimestamp })
2180
+ ].filter(Boolean).join(" "), children: event.kind && /* @__PURE__ */ jsx27(Icon, { name: kindIcons[event.kind] }) }),
2181
+ /* @__PURE__ */ jsxs22("div", { className: "ui-timeline__head", children: [
2182
+ /* @__PURE__ */ jsx27("span", { className: "ui-timeline__actor", children: event.actor }),
2183
+ /* @__PURE__ */ jsx27("time", { dateTime: event.dateTime, children: event.timestamp }),
2184
+ index === events.length - 1 && event.relativeTimestamp && /* @__PURE__ */ jsx27("span", { className: "ui-timeline__relative", children: event.relativeTimestamp })
2157
2185
  ] }),
2158
- /* @__PURE__ */ jsx25("p", { className: "ui-timeline__description", children: event.description }),
2159
- (event.meta != null || event.undo) && /* @__PURE__ */ jsxs20("div", { className: "ui-timeline__meta", children: [
2160
- event.meta != null && /* @__PURE__ */ jsx25("span", { children: event.meta }),
2161
- event.undo && /* @__PURE__ */ jsx25(Button, { variant: "ghost", size: "xs", className: "ui-btn ui-btn--ghost ui-btn--xs ui-timeline__undo", "aria-label": event.undo.label, onClick: event.undo.onUndo, children: "Undo" })
2186
+ /* @__PURE__ */ jsx27("p", { className: "ui-timeline__description", children: event.description }),
2187
+ (event.meta != null || event.undo) && /* @__PURE__ */ jsxs22("div", { className: "ui-timeline__meta", children: [
2188
+ event.meta != null && /* @__PURE__ */ jsx27("span", { children: event.meta }),
2189
+ event.undo && /* @__PURE__ */ jsx27(Button, { variant: "ghost", size: "xs", className: "ui-btn ui-btn--ghost ui-btn--xs ui-timeline__undo", "aria-label": event.undo.label, onClick: event.undo.onUndo, children: "Undo" })
2162
2190
  ] })
2163
2191
  ]
2164
2192
  },
@@ -2167,20 +2195,20 @@ function Timeline({ events, className, ...rest }) {
2167
2195
  }
2168
2196
 
2169
2197
  // src/Field.tsx
2170
- import { forwardRef as forwardRef4, useEffect as useEffect10, useId as useId10, useRef as useRef15, useState as useState9 } from "react";
2198
+ import { forwardRef as forwardRef6, useEffect as useEffect10, useId as useId10, useRef as useRef15, useState as useState9 } from "react";
2171
2199
  import { esc, icon as icon4 } from "@apliteni/apliteni-ui";
2172
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
2200
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
2173
2201
  function messages(id, hint, error) {
2174
2202
  return [error && `${id}-error`, hint && `${id}-hint`].filter(Boolean).join(" ") || void 0;
2175
2203
  }
2176
2204
  function Frame({ id, label, hint, error, required, children }) {
2177
- return /* @__PURE__ */ jsxs21("div", { className: "ui-field", children: [
2178
- /* @__PURE__ */ jsxs21("label", { className: "ui-field__label", htmlFor: id, children: [
2205
+ return /* @__PURE__ */ jsxs23("div", { className: "ui-field", children: [
2206
+ /* @__PURE__ */ jsxs23("label", { className: "ui-field__label", htmlFor: id, children: [
2179
2207
  label,
2180
- required && /* @__PURE__ */ jsx26("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
2208
+ required && /* @__PURE__ */ jsx28("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
2181
2209
  ] }),
2182
2210
  children,
2183
- error && /* @__PURE__ */ jsx26(
2211
+ error && /* @__PURE__ */ jsx28(
2184
2212
  "div",
2185
2213
  {
2186
2214
  id: `${id}-error`,
@@ -2189,7 +2217,7 @@ function Frame({ id, label, hint, error, required, children }) {
2189
2217
  dangerouslySetInnerHTML: { __html: icon4("alert") + esc(error) }
2190
2218
  }
2191
2219
  ),
2192
- hint && /* @__PURE__ */ jsx26("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
2220
+ hint && /* @__PURE__ */ jsx28("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
2193
2221
  ] });
2194
2222
  }
2195
2223
  function wiring(id, hint, error) {
@@ -2198,13 +2226,13 @@ function wiring(id, hint, error) {
2198
2226
  function Field({ id: suppliedId, label, hint, error, required, children }) {
2199
2227
  const generatedId = useId10();
2200
2228
  const id = suppliedId ?? generatedId;
2201
- return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: children({ ...wiring(id, hint, error), required }) });
2229
+ return /* @__PURE__ */ jsx28(Frame, { ...{ id, label, hint, error, required }, children: children({ ...wiring(id, hint, error), required }) });
2202
2230
  }
2203
- var TextField = forwardRef4(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph, className = "", ...props }, ref) {
2231
+ var TextField = forwardRef6(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph, className = "", ...props }, ref) {
2204
2232
  const id = useId10();
2205
2233
  const hasUnit = type === "number" && !!unit;
2206
2234
  const describedBy = [messages(id, hint, error), hasUnit ? `${id}-unit` : ""].filter(Boolean).join(" ") || void 0;
2207
- const control = /* @__PURE__ */ jsx26(
2235
+ const control = /* @__PURE__ */ jsx28(
2208
2236
  "input",
2209
2237
  {
2210
2238
  ref,
@@ -2217,19 +2245,19 @@ var TextField = forwardRef4(function TextField2({ label, hint, error, required,
2217
2245
  className: `ui-input${error ? " is-invalid" : ""} ${className}`
2218
2246
  }
2219
2247
  );
2220
- const unitSpan = hasUnit ? /* @__PURE__ */ jsx26("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
2221
- return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: glyph ? /* @__PURE__ */ jsxs21("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
2222
- /* @__PURE__ */ jsx26("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon4(glyph) } }),
2248
+ const unitSpan = hasUnit ? /* @__PURE__ */ jsx28("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
2249
+ return /* @__PURE__ */ jsx28(Frame, { ...{ id, label, hint, error, required }, children: glyph ? /* @__PURE__ */ jsxs23("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
2250
+ /* @__PURE__ */ jsx28("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon4(glyph) } }),
2223
2251
  control,
2224
2252
  unitSpan
2225
- ] }) : hasUnit ? /* @__PURE__ */ jsxs21("div", { className: "ui-field-number", children: [
2253
+ ] }) : hasUnit ? /* @__PURE__ */ jsxs23("div", { className: "ui-field-number", children: [
2226
2254
  control,
2227
2255
  unitSpan
2228
2256
  ] }) : control });
2229
2257
  });
2230
2258
  function TextArea({ label, hint, error, required, className = "", ...props }) {
2231
2259
  const id = useId10();
2232
- return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx26(
2260
+ return /* @__PURE__ */ jsx28(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx28(
2233
2261
  "textarea",
2234
2262
  {
2235
2263
  rows: 4,
@@ -2242,7 +2270,7 @@ function TextArea({ label, hint, error, required, className = "", ...props }) {
2242
2270
  }
2243
2271
  function SelectField({ label, hint, error, required, className = "", children, ...props }) {
2244
2272
  const id = useId10();
2245
- return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx26(
2273
+ return /* @__PURE__ */ jsx28(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx28(
2246
2274
  "select",
2247
2275
  {
2248
2276
  ...props,
@@ -2271,7 +2299,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
2271
2299
  setFile(next);
2272
2300
  onFileChange?.(next);
2273
2301
  };
2274
- return /* @__PURE__ */ jsx26(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs21(
2302
+ return /* @__PURE__ */ jsx28(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs23(
2275
2303
  "div",
2276
2304
  {
2277
2305
  className: `ui-file${dragging && !disabled ? " is-dragging" : ""}${file ? " has-file" : ""}${error ? " is-invalid" : ""}${disabled ? " is-disabled" : ""}`,
@@ -2292,12 +2320,12 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
2292
2320
  update(transfer.files[0]);
2293
2321
  },
2294
2322
  children: [
2295
- /* @__PURE__ */ jsx26("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx26(Icon, { name: "upload" }) }),
2296
- /* @__PURE__ */ jsx26("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
2297
- /* @__PURE__ */ jsx26("div", { children: "or choose one from your device" }),
2298
- /* @__PURE__ */ jsxs21("span", { className: "ui-file__choose", children: [
2299
- /* @__PURE__ */ jsx26("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
2300
- /* @__PURE__ */ jsx26(
2323
+ /* @__PURE__ */ jsx28("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx28(Icon, { name: "upload" }) }),
2324
+ /* @__PURE__ */ jsx28("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
2325
+ /* @__PURE__ */ jsx28("div", { children: "or choose one from your device" }),
2326
+ /* @__PURE__ */ jsxs23("span", { className: "ui-file__choose", children: [
2327
+ /* @__PURE__ */ jsx28("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
2328
+ /* @__PURE__ */ jsx28(
2301
2329
  "input",
2302
2330
  {
2303
2331
  ...props,
@@ -2319,7 +2347,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
2319
2347
  // src/Toast.tsx
2320
2348
  import { createContext as createContext2, useCallback as useCallback3, useContext as useContext2, useEffect as useEffect11, useLayoutEffect as useLayoutEffect4, useRef as useRef16, useState as useState10 } from "react";
2321
2349
  import { createPortal as createPortal4 } from "react-dom";
2322
- import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
2350
+ import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
2323
2351
  var Context = createContext2(null);
2324
2352
  var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
2325
2353
  function useToast() {
@@ -2365,7 +2393,7 @@ function Notice({ notice, remove }) {
2365
2393
  remaining.current = Math.max(0, remaining.current - (Date.now() - started));
2366
2394
  };
2367
2395
  }, [dismiss, leaving2, notice.action, paused]);
2368
- return /* @__PURE__ */ jsxs22(
2396
+ return /* @__PURE__ */ jsxs24(
2369
2397
  "div",
2370
2398
  {
2371
2399
  ref: root,
@@ -2379,12 +2407,12 @@ function Notice({ notice, remove }) {
2379
2407
  if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
2380
2408
  },
2381
2409
  children: [
2382
- /* @__PURE__ */ jsx27("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx27(Icon, { name: glyphs[tone] }) }),
2383
- /* @__PURE__ */ jsxs22("div", { className: "ui-toast__body", children: [
2384
- /* @__PURE__ */ jsx27("div", { className: "ui-toast__title", children: notice.title }),
2385
- notice.text && /* @__PURE__ */ jsx27("div", { className: "ui-toast__text", children: notice.text })
2410
+ /* @__PURE__ */ jsx29("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx29(Icon, { name: glyphs[tone] }) }),
2411
+ /* @__PURE__ */ jsxs24("div", { className: "ui-toast__body", children: [
2412
+ /* @__PURE__ */ jsx29("div", { className: "ui-toast__title", children: notice.title }),
2413
+ notice.text && /* @__PURE__ */ jsx29("div", { className: "ui-toast__text", children: notice.text })
2386
2414
  ] }),
2387
- notice.action && /* @__PURE__ */ jsx27(
2415
+ notice.action && /* @__PURE__ */ jsx29(
2388
2416
  "button",
2389
2417
  {
2390
2418
  type: "button",
@@ -2399,8 +2427,8 @@ function Notice({ notice, remove }) {
2399
2427
  children: notice.action.label
2400
2428
  }
2401
2429
  ),
2402
- /* @__PURE__ */ jsx27("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx27(Icon, { name: "x" }) }),
2403
- !notice.action && /* @__PURE__ */ jsx27(
2430
+ /* @__PURE__ */ jsx29("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx29(Icon, { name: "x" }) }),
2431
+ !notice.action && /* @__PURE__ */ jsx29(
2404
2432
  "span",
2405
2433
  {
2406
2434
  className: "ui-toast__timer is-running",
@@ -2442,19 +2470,118 @@ function Toast({ children }) {
2442
2470
  setEntries((current) => [...current, { id, notice, remove }]);
2443
2471
  }, []);
2444
2472
  usePublishedReach(stack2, entries.length);
2445
- return /* @__PURE__ */ jsxs22(Context.Provider, { value: push, children: [
2473
+ return /* @__PURE__ */ jsxs24(Context.Provider, { value: push, children: [
2446
2474
  children,
2447
2475
  typeof document !== "undefined" && createPortal4(
2448
- /* @__PURE__ */ jsx27("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx27(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
2476
+ /* @__PURE__ */ jsx29("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx29(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
2449
2477
  document.body
2450
2478
  )
2451
2479
  ] });
2452
2480
  }
2453
2481
 
2454
2482
  // src/AppShell.tsx
2455
- import { useEffect as useEffect12, useId as useId11, useState as useState11 } from "react";
2483
+ import { useEffect as useEffect13, useId as useId12, useState as useState12 } from "react";
2456
2484
  import { applyTheme, paletteHotkey, prism, railCollapsed, themeIcon, themeName } from "@apliteni/apliteni-ui";
2457
- import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
2485
+
2486
+ // src/SidebarNav.tsx
2487
+ import { forwardRef as forwardRef7, useEffect as useEffect12, useId as useId11, useState as useState11 } from "react";
2488
+ import { ENTRANCE_FALLBACK_MS } from "@apliteni/apliteni-ui/motion";
2489
+ import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
2490
+ var badgeText = (badge) => typeof badge === "object" ? badge.text : badge;
2491
+ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
2492
+ const uid = useId11();
2493
+ const group = !sub && !!item.items?.length;
2494
+ const childActive = group && item.items.some((child) => child.id === active);
2495
+ const [expanded, setExpanded] = useState11();
2496
+ const open = expanded ?? item.defaultOpen ?? childActive;
2497
+ const [entering, setEntering] = useState11(false);
2498
+ useEffect12(() => {
2499
+ if (!entering) return;
2500
+ const timer = setTimeout(() => setEntering(false), ENTRANCE_FALLBACK_MS);
2501
+ return () => clearTimeout(timer);
2502
+ }, [entering]);
2503
+ const count = badgeText(item.badge);
2504
+ const name = `${item.label}${count == null || count === "" ? "" : ` ${count}`}`;
2505
+ const isActive = !group && item.id === active;
2506
+ const className = [
2507
+ "ui-nav__item",
2508
+ sub && "ui-nav__item--sub",
2509
+ group && "ui-nav__toggle",
2510
+ isActive && "is-active",
2511
+ childActive && "is-current",
2512
+ item.disabled && "is-disabled",
2513
+ item.danger && "is-danger"
2514
+ ].filter(Boolean).join(" ");
2515
+ const children = /* @__PURE__ */ jsxs25(Fragment7, { children: [
2516
+ (item.leading ?? item.icon) && /* @__PURE__ */ jsx30("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx30(Icon, { name: item.icon }) }),
2517
+ /* @__PURE__ */ jsx30("span", { className: "ui-nav__label", children: item.label }),
2518
+ count != null && count !== "" && /* @__PURE__ */ jsx30("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
2519
+ group && /* @__PURE__ */ jsx30("span", { className: "ui-nav__caret", "aria-hidden": "true" })
2520
+ ] });
2521
+ const common = { className, "aria-label": name, title: collapsed ? name : void 0, children };
2522
+ if (group) return /* @__PURE__ */ jsxs25("li", { className: `ui-nav__group${open ? " is-open" : ""}`, children: [
2523
+ /* @__PURE__ */ jsx30(
2524
+ "button",
2525
+ {
2526
+ ...common,
2527
+ type: "button",
2528
+ disabled: item.disabled,
2529
+ "aria-expanded": open,
2530
+ "aria-controls": uid,
2531
+ onClick: () => {
2532
+ setExpanded(!open);
2533
+ setEntering(!open);
2534
+ }
2535
+ }
2536
+ ),
2537
+ /* @__PURE__ */ jsx30("ul", { id: uid, className: `ui-nav__sub${entering ? " is-entering" : ""}`, hidden: !open, onAnimationEnd: () => setEntering(false), children: item.items.map((child) => /* @__PURE__ */ jsx30(Row, { item: child, active, activeIs, collapsed, renderLink, sub: true }, child.id)) })
2538
+ ] });
2539
+ if (item.disabled) return /* @__PURE__ */ jsx30("li", { children: /* @__PURE__ */ jsx30("span", { ...common, role: "link", "aria-disabled": "true" }) });
2540
+ const props = {
2541
+ ...common,
2542
+ href: item.href ?? `#${item.id}`,
2543
+ target: item.target,
2544
+ "aria-current": isActive ? activeIs === "section" ? "true" : "page" : void 0
2545
+ };
2546
+ return /* @__PURE__ */ jsx30("li", { children: renderLink ? renderLink(item, props) : /* @__PURE__ */ jsx30("a", { ...props }) });
2547
+ }
2548
+ function Section({ section, ...props }) {
2549
+ const uid = useId11();
2550
+ return /* @__PURE__ */ jsxs25("div", { className: "ui-nav__section", children: [
2551
+ section.label && /* @__PURE__ */ jsx30("div", { className: "ui-nav__cap", id: uid, "aria-hidden": props.collapsed || void 0, children: section.label }),
2552
+ /* @__PURE__ */ jsx30("ul", { className: "ui-nav__list", "aria-labelledby": section.label ? uid : void 0, children: section.items.map((item) => /* @__PURE__ */ jsx30(Row, { item, ...props }, item.id)) })
2553
+ ] });
2554
+ }
2555
+ var SidebarNav = forwardRef7(function SidebarNav2({
2556
+ items = [],
2557
+ sections,
2558
+ active,
2559
+ activeIs = "page",
2560
+ collapsed = false,
2561
+ footer,
2562
+ renderLink,
2563
+ className,
2564
+ "aria-label": label = "Sidebar",
2565
+ ...rest
2566
+ }, ref) {
2567
+ return /* @__PURE__ */ jsxs25("nav", { ...rest, ref, "aria-label": label, className: ["ui-nav", "ui-nav--side", collapsed && "is-collapsed", className].filter(Boolean).join(" "), children: [
2568
+ (sections?.length ? sections : [{ items }]).map((section, index) => /* @__PURE__ */ jsx30(
2569
+ Section,
2570
+ {
2571
+ section,
2572
+ active,
2573
+ activeIs,
2574
+ collapsed,
2575
+ renderLink
2576
+ },
2577
+ index
2578
+ )),
2579
+ footer && /* @__PURE__ */ jsx30("div", { className: "ui-nav__foot", children: footer })
2580
+ ] });
2581
+ });
2582
+
2583
+ // src/AppShell.tsx
2584
+ import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
2458
2585
  var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
2459
2586
  function AppShell({
2460
2587
  sections,
@@ -2475,21 +2602,21 @@ function AppShell({
2475
2602
  palette,
2476
2603
  renderLink
2477
2604
  }) {
2478
- const uid = useId11();
2479
- const [collapsed, setCollapsed] = useState11(defaultCollapsed);
2480
- const [search, setSearch] = useState11(false);
2481
- const [more, setMore] = useState11(false);
2482
- const [theme, setTheme] = useState11("dark");
2605
+ const uid = useId12();
2606
+ const [collapsed, setCollapsed] = useState12(defaultCollapsed);
2607
+ const [search, setSearch] = useState12(false);
2608
+ const [more, setMore] = useState12(false);
2609
+ const [theme, setTheme] = useState12("dark");
2483
2610
  const current = path(pathname);
2484
2611
  const active = sections.filter((section) => current === path(section.href) || path(section.href) !== "/" && current.startsWith(`${path(section.href)}/`)).sort((a, b) => path(b.href).length - path(a.href).length)[0];
2485
- useEffect12(() => {
2612
+ useEffect13(() => {
2486
2613
  setCollapsed(railCollapsed() ?? defaultCollapsed);
2487
2614
  }, [defaultCollapsed]);
2488
- useEffect12(() => {
2615
+ useEffect13(() => {
2489
2616
  setMore(false);
2490
2617
  setSearch(false);
2491
2618
  }, [pathname]);
2492
- useEffect12(() => {
2619
+ useEffect13(() => {
2493
2620
  const root = document.documentElement;
2494
2621
  const sync2 = () => setTheme(root.getAttribute("data-theme") === "light" ? "light" : "dark");
2495
2622
  sync2();
@@ -2497,7 +2624,7 @@ function AppShell({
2497
2624
  observer.observe(root, { attributes: true, attributeFilter: ["data-theme"] });
2498
2625
  return () => observer.disconnect();
2499
2626
  }, []);
2500
- useEffect12(() => {
2627
+ useEffect13(() => {
2501
2628
  const hotkey = (event) => {
2502
2629
  if (!(event.metaKey || event.ctrlKey) || event.altKey || event.shiftKey || event.key.toLowerCase() !== "k") return;
2503
2630
  const target = event.target;
@@ -2520,49 +2647,68 @@ function AppShell({
2520
2647
  const linkProps = {
2521
2648
  href: section.href,
2522
2649
  className: `ui-nav__item${section === active ? " is-active" : ""}`,
2523
- "aria-current": section === active ? "page" : void 0,
2650
+ // guidelines/going-back.md, section-lit: the same row, so the same reading as
2651
+ // the rail's. "page" here would announce the list as the page the reader is on.
2652
+ "aria-current": section === active ? back ? "true" : "page" : void 0,
2524
2653
  "aria-label": `${section.label}${section.count == null ? "" : ` ${section.count}`}`,
2525
2654
  onClick: (event) => {
2526
2655
  if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMore(false);
2527
2656
  },
2528
- children: /* @__PURE__ */ jsxs23(Fragment7, { children: [
2529
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx28(Icon, { name: section.icon }) }),
2530
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: section.label }),
2531
- section.count != null && /* @__PURE__ */ jsx28("span", { className: "ui-nav__badge", children: section.count })
2657
+ children: /* @__PURE__ */ jsxs26(Fragment8, { children: [
2658
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx31(Icon, { name: section.icon }) }),
2659
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__label", children: section.label }),
2660
+ section.count != null && /* @__PURE__ */ jsx31("span", { className: "ui-nav__badge is-neutral", children: section.count })
2532
2661
  ] })
2533
2662
  };
2534
- return /* @__PURE__ */ jsx28("li", { children: renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx28("a", { ...linkProps }) }, section.href);
2663
+ return /* @__PURE__ */ jsx31("li", { children: renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx31("a", { ...linkProps }) }, section.href);
2535
2664
  });
2665
+ const sidebar = (items, label) => /* @__PURE__ */ jsx31(
2666
+ SidebarNav,
2667
+ {
2668
+ "aria-label": label,
2669
+ items: items.map((section) => ({ ...section, id: section.href, badge: section.count })),
2670
+ active: active?.href,
2671
+ activeIs: back ? "section" : "page",
2672
+ renderLink: (item, props) => {
2673
+ const section = items.find((section2) => section2.href === item.id);
2674
+ const linkProps = { ...props, onClick: (event) => {
2675
+ if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMore(false);
2676
+ } };
2677
+ return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx31("a", { ...linkProps });
2678
+ }
2679
+ }
2680
+ );
2536
2681
  const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
2537
2682
  const visible = sections.length > 4 ? sections.slice(0, 3) : sections;
2538
2683
  const remaining = sections.slice(visible.length);
2539
2684
  const initials = account.name.trim().split(/\s+/).map((part) => part[0]).slice(0, 2).join("");
2540
- return /* @__PURE__ */ jsxs23("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
2541
- /* @__PURE__ */ jsxs23("div", { className: "ui-app__rail", children: [
2542
- /* @__PURE__ */ jsx28("div", { className: "ui-app__head", children: /* @__PURE__ */ jsxs23("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
2543
- brand ?? /* @__PURE__ */ jsx28("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
2544
- /* @__PURE__ */ jsx28("span", { children: word })
2685
+ return /* @__PURE__ */ jsxs26("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
2686
+ /* @__PURE__ */ jsxs26("div", { className: "ui-app__rail", children: [
2687
+ /* @__PURE__ */ jsx31("div", { className: "ui-app__head", children: /* @__PURE__ */ jsxs26("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
2688
+ brand ?? /* @__PURE__ */ jsx31("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
2689
+ /* @__PURE__ */ jsx31("span", { children: word })
2545
2690
  ] }) }),
2546
- /* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-nav--side", "aria-label": "Sections", children: /* @__PURE__ */ jsx28("ul", { className: "ui-nav__list", children: links(sections) }) }),
2547
- /* @__PURE__ */ jsx28("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx28("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs23("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
2548
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs23("svg", { className: "ui-icon", viewBox: "0 0 24 24", "aria-hidden": "true", children: [
2549
- /* @__PURE__ */ jsx28("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2550
- /* @__PURE__ */ jsx28("path", { className: "ui-app__fold-seam", d: "M9 3v18" })
2691
+ sidebar(sections, "Sections"),
2692
+ /* @__PURE__ */ jsx31("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx31("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs26("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
2693
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs26("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
2694
+ /* @__PURE__ */ jsx31("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
2695
+ /* @__PURE__ */ jsx31("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
2696
+ /* @__PURE__ */ jsx31("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
2551
2697
  ] }) }),
2552
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: foldLabel })
2698
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__label", children: foldLabel })
2553
2699
  ] }) }) })
2554
2700
  ] }),
2555
- /* @__PURE__ */ jsxs23("div", { className: "ui-app__well", children: [
2556
- /* @__PURE__ */ jsxs23("header", { className: "ui-app__bar", children: [
2557
- /* @__PURE__ */ jsxs23("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
2558
- /* @__PURE__ */ jsx28("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx28(Icon, { name: "search" }) }),
2559
- /* @__PURE__ */ jsx28("span", { className: "ui-app__search-txt", children: "Search or run a command\u2026" }),
2560
- /* @__PURE__ */ jsx28("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
2701
+ /* @__PURE__ */ jsxs26("div", { className: "ui-app__well", children: [
2702
+ /* @__PURE__ */ jsxs26("header", { className: "ui-app__bar", children: [
2703
+ /* @__PURE__ */ jsxs26("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
2704
+ /* @__PURE__ */ jsx31("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx31(Icon, { name: "search" }) }),
2705
+ /* @__PURE__ */ jsx31("span", { className: "ui-app__search-txt", children: "Search or run a command\u2026" }),
2706
+ /* @__PURE__ */ jsx31("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
2561
2707
  ] }),
2562
- /* @__PURE__ */ jsx28("span", { className: "ui-app__bar-gap" }),
2708
+ /* @__PURE__ */ jsx31("span", { className: "ui-app__bar-gap" }),
2563
2709
  bandControl,
2564
- /* @__PURE__ */ jsx28("button", { type: "button", className: "toggle", "aria-label": themeName(theme), title: themeName(theme), onClick: () => applyTheme(theme === "light" ? "dark" : "light"), children: /* @__PURE__ */ jsx28("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) }),
2565
- /* @__PURE__ */ jsx28("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx28(
2710
+ /* @__PURE__ */ jsx31("button", { type: "button", className: "toggle", "aria-label": themeName(theme), title: themeName(theme), onClick: () => applyTheme(theme === "light" ? "dark" : "light"), children: /* @__PURE__ */ jsx31("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) }),
2711
+ /* @__PURE__ */ jsx31("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx31(
2566
2712
  Dropdown,
2567
2713
  {
2568
2714
  variant: "menu",
@@ -2571,27 +2717,27 @@ function AppShell({
2571
2717
  ariaLabel: `Signed in as ${account.name}, ${account.email}`,
2572
2718
  triggerClass: "ui-app__user-trigger",
2573
2719
  panelClass: "ui-app__user-panel",
2574
- triggerContent: /* @__PURE__ */ jsx28("span", { className: "ui-app__av", "aria-hidden": "true", children: initials }),
2575
- header: /* @__PURE__ */ jsxs23("div", { className: "ui-dropdown__head", children: [
2576
- /* @__PURE__ */ jsx28("b", { children: account.name }),
2577
- /* @__PURE__ */ jsx28("span", { children: account.email })
2720
+ triggerContent: /* @__PURE__ */ jsx31("span", { className: "ui-app__av", "aria-hidden": "true", children: initials }),
2721
+ header: /* @__PURE__ */ jsxs26("div", { className: "ui-dropdown__head", children: [
2722
+ /* @__PURE__ */ jsx31("b", { children: account.name }),
2723
+ /* @__PURE__ */ jsx31("span", { children: account.email })
2578
2724
  ] }),
2579
2725
  items: [{ label: "Sign out", icon: "logout", danger: true }],
2580
2726
  onSelect: onSignOut
2581
2727
  }
2582
2728
  ) })
2583
2729
  ] }),
2584
- /* @__PURE__ */ jsxs23("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
2585
- back && /* @__PURE__ */ jsx28(BackLink, { ...back }),
2586
- /* @__PURE__ */ jsx28("h1", { children: title }),
2587
- lede && /* @__PURE__ */ jsx28("p", { className: "ui-app__sub", children: lede }),
2588
- actions && /* @__PURE__ */ jsx28("div", { className: "ui-react-app__actions", children: actions }),
2589
- /* @__PURE__ */ jsx28("div", { className: "ui-app__body", children })
2730
+ /* @__PURE__ */ jsxs26("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
2731
+ back && /* @__PURE__ */ jsx31(BackLink, { ...back }),
2732
+ /* @__PURE__ */ jsx31("h1", { children: title }),
2733
+ lede && /* @__PURE__ */ jsx31("p", { className: "ui-app__sub", children: lede }),
2734
+ actions && /* @__PURE__ */ jsx31("div", { className: "ui-react-app__actions", children: actions }),
2735
+ /* @__PURE__ */ jsx31("div", { className: "ui-app__body", children })
2590
2736
  ] })
2591
2737
  ] }),
2592
- /* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-react-app__bottom", "aria-label": "Sections on mobile", children: /* @__PURE__ */ jsxs23("ul", { className: "ui-nav__list", children: [
2738
+ /* @__PURE__ */ jsx31("nav", { className: "ui-nav ui-react-app__bottom", "aria-label": "Sections on mobile", children: /* @__PURE__ */ jsxs26("ul", { className: "ui-nav__list", children: [
2593
2739
  links(visible),
2594
- remaining.length > 0 && /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsxs23(
2740
+ remaining.length > 0 && /* @__PURE__ */ jsx31("li", { children: /* @__PURE__ */ jsxs26(
2595
2741
  "button",
2596
2742
  {
2597
2743
  type: "button",
@@ -2600,20 +2746,20 @@ function AppShell({
2600
2746
  "aria-expanded": more,
2601
2747
  onClick: () => setMore(true),
2602
2748
  children: [
2603
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx28(Icon, { name: "moreHorizontal" }) }),
2604
- /* @__PURE__ */ jsx28("span", { className: "ui-nav__label", children: "More" })
2749
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsx31(Icon, { name: "moreHorizontal" }) }),
2750
+ /* @__PURE__ */ jsx31("span", { className: "ui-nav__label", children: "More" })
2605
2751
  ]
2606
2752
  }
2607
2753
  ) })
2608
2754
  ] }) }),
2609
- /* @__PURE__ */ jsx28(Drawer, { open: more, onClose: () => setMore(false), title: "More sections", side: "bottom", children: /* @__PURE__ */ jsx28("nav", { className: "ui-nav ui-nav--side", "aria-label": "More sections", children: /* @__PURE__ */ jsx28("ul", { className: "ui-nav__list", children: links(remaining) }) }) }),
2610
- /* @__PURE__ */ jsx28(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
2755
+ /* @__PURE__ */ jsx31(Drawer, { open: more, onClose: () => setMore(false), title: "More sections", side: "bottom", children: sidebar(remaining, "More sections") }),
2756
+ /* @__PURE__ */ jsx31(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
2611
2757
  ] });
2612
2758
  }
2613
2759
 
2614
2760
  // src/EmptyState.tsx
2615
2761
  import { icon as kitIcon2, illo } from "@apliteni/apliteni-ui";
2616
- import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
2762
+ import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
2617
2763
  var cases = {
2618
2764
  "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
2619
2765
  "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
@@ -2625,18 +2771,18 @@ function EmptyState({ variant = "first-run", title, sub, icon: icon6, art, actio
2625
2771
  const heading = title ?? preset.title;
2626
2772
  const guidance = sub ?? preset.sub;
2627
2773
  const glyph = icon6 ?? preset.icon;
2628
- return /* @__PURE__ */ jsxs24("div", { className: "ui-empty", children: [
2629
- art ? typeof art === "string" ? /* @__PURE__ */ jsx29("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx29("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx29("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
2630
- heading && /* @__PURE__ */ jsx29("div", { className: "ui-empty__title", children: heading }),
2631
- guidance && /* @__PURE__ */ jsx29("div", { className: "ui-empty__sub", children: guidance }),
2632
- actions && /* @__PURE__ */ jsx29("div", { className: "ui-empty__actions", children: actions })
2774
+ return /* @__PURE__ */ jsxs27("div", { className: "ui-empty", children: [
2775
+ art ? typeof art === "string" ? /* @__PURE__ */ jsx32("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx32("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx32("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
2776
+ heading && /* @__PURE__ */ jsx32("div", { className: "ui-empty__title", children: heading }),
2777
+ guidance && /* @__PURE__ */ jsx32("div", { className: "ui-empty__sub", children: guidance }),
2778
+ actions && /* @__PURE__ */ jsx32("div", { className: "ui-empty__actions", children: actions })
2633
2779
  ] });
2634
2780
  }
2635
2781
 
2636
2782
  // src/ThemeToggle.tsx
2637
2783
  import { useSyncExternalStore } from "react";
2638
2784
  import { icon as icon5 } from "@apliteni/apliteni-ui";
2639
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
2785
+ import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
2640
2786
  var STORAGE_KEY = "apliteni-strategy-theme";
2641
2787
  var CHOICE_EVENT = "apliteni-theme-choice";
2642
2788
  var THEME_INIT_SCRIPT = `(()=>{let t;try{t=localStorage.getItem('apliteni-strategy-theme')}catch{}document.documentElement.setAttribute('data-theme',t==='dark'||t==='light'?t:window.matchMedia?.('(prefers-color-scheme: light)').matches?'light':'dark')})()`;
@@ -2694,10 +2840,10 @@ function ThemeToggle({ labelled = false }) {
2694
2840
  }
2695
2841
  window.dispatchEvent(new Event(CHOICE_EVENT));
2696
2842
  };
2697
- const button = /* @__PURE__ */ jsx30("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx30("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon5(theme === "auto" ? "monitor" : theme === "light" ? "sun" : "moon") } }) });
2698
- return labelled ? /* @__PURE__ */ jsxs25("span", { className: "ui-theme-toggle", children: [
2843
+ const button = /* @__PURE__ */ jsx33("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx33("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon5(theme === "auto" ? "monitor" : theme === "light" ? "sun" : "moon") } }) });
2844
+ return labelled ? /* @__PURE__ */ jsxs28("span", { className: "ui-theme-toggle", children: [
2699
2845
  button,
2700
- /* @__PURE__ */ jsxs25("span", { children: [
2846
+ /* @__PURE__ */ jsxs28("span", { children: [
2701
2847
  label,
2702
2848
  " theme"
2703
2849
  ] })
@@ -2715,6 +2861,7 @@ export {
2715
2861
  Button,
2716
2862
  Callout,
2717
2863
  Card,
2864
+ Checkbox,
2718
2865
  CommandPalette,
2719
2866
  Confirm,
2720
2867
  DEFAULT_PAGE_SIZE3 as DEFAULT_PAGE_SIZE,
@@ -2738,11 +2885,13 @@ export {
2738
2885
  RowIdentity,
2739
2886
  Segmented,
2740
2887
  SelectField,
2888
+ SidebarNav,
2741
2889
  Skeleton,
2742
2890
  SkeletonTable,
2743
2891
  Snippet,
2744
2892
  StatBand,
2745
2893
  StatusDot,
2894
+ Switch,
2746
2895
  THEME_INIT_SCRIPT,
2747
2896
  Tabs,
2748
2897
  TextArea,