@apliteni/apliteni-ui 0.131.0 → 0.133.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.
@@ -219,8 +219,7 @@ var Button = forwardRef3(function Button2({
219
219
  // src/primitives/Badge.tsx
220
220
  import { jsx as jsx5 } from "react/jsx-runtime";
221
221
  function Badge({ variant = "neutral", children }) {
222
- const cls = ["ui-badge", variant !== "neutral" && `ui-badge--${variant}`].filter(Boolean).join(" ");
223
- return /* @__PURE__ */ jsx5("span", { className: cls, children });
222
+ return /* @__PURE__ */ jsx5("span", { className: `ui-badge ui-badge--${variant}`, children });
224
223
  }
225
224
 
226
225
  // src/primitives/Avatar.tsx
@@ -2115,6 +2114,10 @@ import {
2115
2114
  transitionMs as transitionMs2,
2116
2115
  dropdownViewportFit,
2117
2116
  dropdownHeightFit,
2117
+ dropdownLift,
2118
+ dropdownReveal,
2119
+ dropdownRest,
2120
+ dropdownSnap,
2118
2121
  filterPanelRow
2119
2122
  } from "@apliteni/apliteni-ui";
2120
2123
 
@@ -2199,6 +2202,7 @@ function Dropdown({
2199
2202
  const trigger = useRef11(null);
2200
2203
  const field = useRef11(null);
2201
2204
  const landOn = useRef11(null);
2205
+ const revealed = useRef11(false);
2202
2206
  const at = useRef11("");
2203
2207
  const auto = useId8().replace(/:/g, "");
2204
2208
  const uid = id ?? auto;
@@ -2352,24 +2356,39 @@ function Dropdown({
2352
2356
  };
2353
2357
  }, [open]);
2354
2358
  useIsoLayoutEffect(() => {
2355
- if (!open) return;
2356
2359
  const el = panel.current;
2357
- if (!el) return;
2360
+ if (!el || !root.current) return void 0;
2361
+ return dropdownRest(root.current, el, open);
2362
+ }, [open]);
2363
+ useIsoLayoutEffect(() => {
2364
+ const dd = root.current;
2365
+ const el = panel.current;
2366
+ if (!open || !el || !dd) return;
2358
2367
  const size = () => {
2359
- const avail = dropdownHeightFit(root.current, el);
2368
+ const avail = dropdownHeightFit(dd, el);
2360
2369
  if (avail == null) return;
2361
2370
  if (Number.isFinite(avail)) el.style.setProperty("--ui-dropdown-avail", `${avail}px`);
2362
2371
  else el.style.removeProperty("--ui-dropdown-avail");
2363
- const cap2 = el.ownerDocument.defaultView?.getComputedStyle(el).getPropertyValue("--ui-dropdown-cap").trim();
2364
- el.classList.toggle("is-unbounded", !Number.isFinite(avail) && !cap2);
2372
+ el.classList.toggle("is-unbounded", !Number.isFinite(avail));
2373
+ dropdownSnap(dd, el);
2365
2374
  };
2375
+ dropdownLift(dd, el);
2366
2376
  size();
2377
+ revealed.current = dropdownReveal(dd, el) !== 0;
2378
+ const follow = () => {
2379
+ if (el.hasAttribute("data-dd-lifted")) dropdownLift(dd, el);
2380
+ };
2381
+ const resize = () => {
2382
+ dropdownLift(dd, el);
2383
+ size();
2384
+ dropdownReveal(dd, el);
2385
+ };
2367
2386
  const view = el.ownerDocument?.defaultView ?? window;
2368
- view.addEventListener("scroll", size, true);
2369
- view.addEventListener("resize", size);
2387
+ view.addEventListener("scroll", follow, true);
2388
+ view.addEventListener("resize", resize);
2370
2389
  return () => {
2371
- view.removeEventListener("scroll", size, true);
2372
- view.removeEventListener("resize", size);
2390
+ view.removeEventListener("scroll", follow, true);
2391
+ view.removeEventListener("resize", resize);
2373
2392
  };
2374
2393
  }, [open, direction]);
2375
2394
  useIsoLayoutEffect(() => {
@@ -2390,7 +2409,7 @@ function Dropdown({
2390
2409
  panel.current.style.minWidth = "";
2391
2410
  if (panel.current.offsetWidth) panel.current.style.minWidth = `${panel.current.offsetWidth}px`;
2392
2411
  }
2393
- field.current?.focus();
2412
+ field.current?.focus(revealed.current ? { preventScroll: true } : void 0);
2394
2413
  return;
2395
2414
  }
2396
2415
  if (want == null) return;
@@ -2398,7 +2417,7 @@ function Dropdown({
2398
2417
  if (!els.length) return;
2399
2418
  const sel = els.findIndex((el) => el.getAttribute("aria-selected") === "true");
2400
2419
  const to = want === "selected" ? sel >= 0 ? sel : 0 : want;
2401
- (els[to] || els[0]).focus();
2420
+ (els[to] || els[0]).focus(revealed.current ? { preventScroll: true } : void 0);
2402
2421
  }, [open]);
2403
2422
  useIsoLayoutEffect(() => {
2404
2423
  if (!sx || !open || !active) return;
@@ -2415,6 +2434,7 @@ function Dropdown({
2415
2434
  const el = panel.current;
2416
2435
  if (!el || el.closest(".ui-filter-bar")) return;
2417
2436
  const fit = () => {
2437
+ if (el.hasAttribute("data-dd-lifted")) return;
2418
2438
  let got = dropdownViewportFit(el);
2419
2439
  if (!got) return;
2420
2440
  el.style.setProperty("--ui-dropdown-ceiling", got.max > 0 ? `${got.max}px` : "");
@@ -2522,6 +2542,7 @@ function Dropdown({
2522
2542
  e.preventDefault();
2523
2543
  const els = itemsIn(panel.current);
2524
2544
  els[els.length - 1]?.focus();
2545
+ dropdownReveal(root.current, panel.current);
2525
2546
  } else if ((e.key === "Enter" || e.key === " ") && open && e.target.matches?.("[data-dd-item]")) {
2526
2547
  e.preventDefault();
2527
2548
  e.target.click();
@@ -3291,7 +3312,31 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
3291
3312
 
3292
3313
  // src/FileDrop.tsx
3293
3314
  import { useRef as useRef17, useState as useState12 } from "react";
3294
- import { Fragment as Fragment10, jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3315
+
3316
+ // src/EmptyState.tsx
3317
+ import { icon as kitIcon2, illo } from "@apliteni/apliteni-ui";
3318
+ import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3319
+ var cases = {
3320
+ "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
3321
+ "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
3322
+ "not-found": { title: "We can't find that page", sub: "Check the address or return to the home page.", icon: "folder" },
3323
+ "not-yet-built": { title: "This ships later", sub: "This screen is not available yet. Check back later.", icon: "clock" }
3324
+ };
3325
+ function EmptyState({ variant = "first-run", title, sub, icon: icon8, art, actions }) {
3326
+ const preset = cases[variant];
3327
+ const heading = title ?? preset.title;
3328
+ const guidance = sub ?? preset.sub;
3329
+ const glyph = icon8 ?? preset.icon;
3330
+ return /* @__PURE__ */ jsxs26("div", { className: "ui-empty", children: [
3331
+ art ? typeof art === "string" ? /* @__PURE__ */ jsx31("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx31("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx31("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
3332
+ heading && /* @__PURE__ */ jsx31("div", { className: "ui-empty__title", children: heading }),
3333
+ guidance && /* @__PURE__ */ jsx31("div", { className: "ui-empty__sub", children: guidance }),
3334
+ actions && /* @__PURE__ */ jsx31("div", { className: "ui-empty__actions", children: actions })
3335
+ ] });
3336
+ }
3337
+
3338
+ // src/FileDrop.tsx
3339
+ import { Fragment as Fragment10, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3295
3340
  var MARKS = {
3296
3341
  uploading: "clock",
3297
3342
  done: "circleCheck",
@@ -3311,6 +3356,8 @@ var cx7 = (...a) => a.filter(Boolean).join(" ");
3311
3356
  function FileDrop({
3312
3357
  label = "Upload",
3313
3358
  note,
3359
+ title,
3360
+ multiple,
3314
3361
  accept,
3315
3362
  dropLabel = "Drop to upload",
3316
3363
  removeLabel = "Remove",
@@ -3319,6 +3366,7 @@ function FileDrop({
3319
3366
  dragging,
3320
3367
  disabled,
3321
3368
  onFile,
3369
+ onFiles,
3322
3370
  onRemove,
3323
3371
  onRetry,
3324
3372
  children,
@@ -3334,118 +3382,155 @@ function FileDrop({
3334
3382
  const showSize = Boolean(file?.size) && status !== "error";
3335
3383
  const showTarget = (dragging ?? over) && !disabled;
3336
3384
  const take = (chosen) => {
3337
- if (chosen && !disabled) onFile?.(chosen);
3385
+ if (!chosen.length || disabled) return;
3386
+ onFile?.(chosen[0]);
3387
+ onFiles?.(chosen);
3338
3388
  };
3339
- return /* @__PURE__ */ jsxs26(
3389
+ const pick = () => {
3390
+ if (!disabled) input.current?.click();
3391
+ };
3392
+ const picker = /* @__PURE__ */ jsx32(
3393
+ "input",
3394
+ {
3395
+ ref: input,
3396
+ type: "file",
3397
+ accept,
3398
+ multiple,
3399
+ disabled,
3400
+ hidden: true,
3401
+ tabIndex: -1,
3402
+ onClick: (event) => event.stopPropagation(),
3403
+ onChange: (event) => {
3404
+ take(Array.from(event.currentTarget.files ?? []));
3405
+ event.currentTarget.value = "";
3406
+ }
3407
+ }
3408
+ );
3409
+ const drag = {
3410
+ onDragOver: (event) => {
3411
+ if (disabled || !carriesFiles(event)) return;
3412
+ event.preventDefault();
3413
+ setOver(true);
3414
+ },
3415
+ onDragLeave: (event) => {
3416
+ if (!event.currentTarget.contains(event.relatedTarget)) setOver(false);
3417
+ },
3418
+ onDrop: (event) => {
3419
+ if (disabled || !carriesFiles(event)) return;
3420
+ event.preventDefault();
3421
+ setOver(false);
3422
+ take(Array.from(event.dataTransfer.files));
3423
+ }
3424
+ };
3425
+ if (title !== void 0) return /* @__PURE__ */ jsxs27(
3340
3426
  "div",
3341
3427
  {
3342
- className: cx7("ui-drop", disabled && "is-disabled", className),
3343
- onDragOver: (event) => {
3344
- if (disabled || !carriesFiles(event)) return;
3345
- event.preventDefault();
3346
- setOver(true);
3347
- },
3348
- onDragLeave: (event) => {
3349
- if (!event.currentTarget.contains(event.relatedTarget)) setOver(false);
3350
- },
3351
- onDrop: (event) => {
3352
- if (disabled || !carriesFiles(event)) return;
3353
- event.preventDefault();
3354
- setOver(false);
3355
- take(event.dataTransfer.files[0]);
3356
- },
3428
+ className: cx7("ui-drop", "ui-drop--area", showTarget && "is-dragging", disabled && "is-disabled", className),
3429
+ onClick: pick,
3430
+ ...drag,
3357
3431
  children: [
3358
- children,
3359
- /* @__PURE__ */ jsxs26("div", { className: "ui-drop__row", children: [
3360
- file ? /* @__PURE__ */ jsxs26("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
3361
- /* @__PURE__ */ jsxs26("div", { className: "ui-drop__line", children: [
3362
- /* @__PURE__ */ jsxs26("span", { className: "ui-drop__name", title: file.name, children: [
3363
- /* @__PURE__ */ jsx31("span", { className: "ui-drop__stem", children: stem }),
3364
- /* @__PURE__ */ jsx31("span", { className: "ui-drop__ext", children: ext })
3365
- ] }),
3366
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs26("span", { className: "ui-drop__actions", children: [
3367
- status === "error" && onRetry && /* @__PURE__ */ jsx31(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
3368
- onRemove && /* @__PURE__ */ jsx31(
3369
- Button,
3370
- {
3371
- variant: "ghost",
3372
- size: "sm",
3373
- onClick: onRemove,
3374
- disabled,
3375
- children: removeLabel
3376
- }
3377
- )
3378
- ] })
3379
- ] }),
3380
- (showSize || showWord) && /* @__PURE__ */ jsxs26(
3381
- "div",
3382
- {
3383
- className: cx7("ui-drop__facts", status === "error" && "ui-drop__error"),
3384
- role: status === "error" ? "alert" : void 0,
3385
- children: [
3386
- showSize && /* @__PURE__ */ jsx31("span", { className: "ui-drop__size", children: file.size }),
3387
- showWord && /* @__PURE__ */ jsxs26("span", { className: "ui-drop__state", children: [
3388
- /* @__PURE__ */ jsx31(Icon, { name: MARKS[status] }),
3389
- /* @__PURE__ */ jsx31("span", { className: "ui-drop__word", title: word, children: word })
3390
- ] })
3391
- ]
3392
- }
3393
- ),
3394
- hasBar && /* @__PURE__ */ jsx31(
3395
- "span",
3396
- {
3397
- className: "ui-drop__bar",
3398
- role: "progressbar",
3399
- "aria-label": `${word} ${file.name}`,
3400
- "aria-valuenow": file.progress,
3401
- "aria-valuemin": 0,
3402
- "aria-valuemax": 100,
3403
- children: /* @__PURE__ */ jsx31("span", { style: { width: `${file.progress}%` } })
3404
- }
3405
- )
3406
- ] }) : /* @__PURE__ */ jsxs26(Fragment10, { children: [
3407
- /* @__PURE__ */ jsx31(
3432
+ /* @__PURE__ */ jsx32(
3433
+ EmptyState,
3434
+ {
3435
+ icon: "upload",
3436
+ title,
3437
+ sub: note ?? "",
3438
+ actions: /* @__PURE__ */ jsx32(
3408
3439
  Button,
3409
3440
  {
3441
+ variant: "primary",
3410
3442
  size: "sm",
3411
3443
  icon: "upload",
3412
3444
  disabled,
3413
- onClick: () => input.current?.click(),
3445
+ onClick: (event) => {
3446
+ event.stopPropagation();
3447
+ pick();
3448
+ },
3414
3449
  children: label
3415
3450
  }
3416
- ),
3417
- note && /* @__PURE__ */ jsx31("p", { className: "ui-drop__note", children: note })
3418
- ] }),
3419
- /* @__PURE__ */ jsx31(
3420
- "input",
3421
- {
3422
- ref: input,
3423
- type: "file",
3424
- accept,
3425
- disabled,
3426
- hidden: true,
3427
- tabIndex: -1,
3428
- onChange: (event) => {
3429
- take(event.currentTarget.files?.[0]);
3430
- event.currentTarget.value = "";
3431
- }
3432
- }
3433
- )
3434
- ] }),
3435
- showTarget && /* @__PURE__ */ jsx31("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
3451
+ )
3452
+ }
3453
+ ),
3454
+ picker
3436
3455
  ]
3437
3456
  }
3438
3457
  );
3458
+ return /* @__PURE__ */ jsxs27("div", { className: cx7("ui-drop", disabled && "is-disabled", className), ...drag, children: [
3459
+ children,
3460
+ /* @__PURE__ */ jsxs27("div", { className: "ui-drop__row", children: [
3461
+ file ? /* @__PURE__ */ jsxs27("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
3462
+ /* @__PURE__ */ jsxs27("div", { className: "ui-drop__line", children: [
3463
+ /* @__PURE__ */ jsxs27("span", { className: "ui-drop__name", title: file.name, children: [
3464
+ /* @__PURE__ */ jsx32("span", { className: "ui-drop__stem", children: stem }),
3465
+ /* @__PURE__ */ jsx32("span", { className: "ui-drop__ext", children: ext })
3466
+ ] }),
3467
+ (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs27("span", { className: "ui-drop__actions", children: [
3468
+ status === "error" && onRetry && /* @__PURE__ */ jsx32(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
3469
+ onRemove && /* @__PURE__ */ jsx32(
3470
+ Button,
3471
+ {
3472
+ variant: "ghost",
3473
+ size: "sm",
3474
+ onClick: onRemove,
3475
+ disabled,
3476
+ children: removeLabel
3477
+ }
3478
+ )
3479
+ ] })
3480
+ ] }),
3481
+ (showSize || showWord) && /* @__PURE__ */ jsxs27(
3482
+ "div",
3483
+ {
3484
+ className: cx7("ui-drop__facts", status === "error" && "ui-drop__error"),
3485
+ role: status === "error" ? "alert" : void 0,
3486
+ children: [
3487
+ showSize && /* @__PURE__ */ jsx32("span", { className: "ui-drop__size", children: file.size }),
3488
+ showWord && /* @__PURE__ */ jsxs27("span", { className: "ui-drop__state", children: [
3489
+ /* @__PURE__ */ jsx32(Icon, { name: MARKS[status] }),
3490
+ /* @__PURE__ */ jsx32("span", { className: "ui-drop__word", title: word, children: word })
3491
+ ] })
3492
+ ]
3493
+ }
3494
+ ),
3495
+ hasBar && /* @__PURE__ */ jsx32(
3496
+ "span",
3497
+ {
3498
+ className: "ui-drop__bar",
3499
+ role: "progressbar",
3500
+ "aria-label": `${word} ${file.name}`,
3501
+ "aria-valuenow": file.progress,
3502
+ "aria-valuemin": 0,
3503
+ "aria-valuemax": 100,
3504
+ children: /* @__PURE__ */ jsx32("span", { style: { width: `${file.progress}%` } })
3505
+ }
3506
+ )
3507
+ ] }) : /* @__PURE__ */ jsxs27(Fragment10, { children: [
3508
+ /* @__PURE__ */ jsx32(
3509
+ Button,
3510
+ {
3511
+ size: "sm",
3512
+ icon: "upload",
3513
+ disabled,
3514
+ onClick: pick,
3515
+ children: label
3516
+ }
3517
+ ),
3518
+ note && /* @__PURE__ */ jsx32("p", { className: "ui-drop__note", children: note })
3519
+ ] }),
3520
+ picker
3521
+ ] }),
3522
+ showTarget && /* @__PURE__ */ jsx32("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
3523
+ ] });
3439
3524
  }
3440
3525
 
3441
3526
  // src/SearchField.tsx
3442
3527
  import { forwardRef as forwardRef7 } from "react";
3443
3528
  import { icon as icon6 } from "@apliteni/apliteni-ui";
3444
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3529
+ import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3445
3530
  var SearchField = forwardRef7(function SearchField2({ ariaLabel, className, ...props }, ref) {
3446
- return /* @__PURE__ */ jsxs27("div", { className: "ui-input-group", children: [
3447
- /* @__PURE__ */ jsx32("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
3448
- /* @__PURE__ */ jsx32(
3531
+ return /* @__PURE__ */ jsxs28("div", { className: "ui-input-group", children: [
3532
+ /* @__PURE__ */ jsx33("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
3533
+ /* @__PURE__ */ jsx33(
3449
3534
  "input",
3450
3535
  {
3451
3536
  ref,
@@ -3461,7 +3546,7 @@ var SearchField = forwardRef7(function SearchField2({ ariaLabel, className, ...p
3461
3546
  // src/Toast.tsx
3462
3547
  import { createContext as createContext3, useCallback as useCallback6, useContext as useContext3, useEffect as useEffect12, useLayoutEffect as useLayoutEffect4, useRef as useRef18, useState as useState13 } from "react";
3463
3548
  import { createPortal as createPortal4 } from "react-dom";
3464
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3549
+ import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3465
3550
  var Context = createContext3(null);
3466
3551
  var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
3467
3552
  function useToast() {
@@ -3509,7 +3594,7 @@ function Notice({ notice, remove }) {
3509
3594
  remaining.current = Math.max(0, remaining.current - (Date.now() - started));
3510
3595
  };
3511
3596
  }, [dismiss, leaving2, paused, timed]);
3512
- return /* @__PURE__ */ jsxs28(
3597
+ return /* @__PURE__ */ jsxs29(
3513
3598
  "div",
3514
3599
  {
3515
3600
  ref: root,
@@ -3523,12 +3608,12 @@ function Notice({ notice, remove }) {
3523
3608
  if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
3524
3609
  },
3525
3610
  children: [
3526
- /* @__PURE__ */ jsx33("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx33(Icon, { name: glyphs[tone] }) }),
3527
- /* @__PURE__ */ jsxs28("div", { className: "ui-toast__body", children: [
3528
- /* @__PURE__ */ jsx33("div", { className: "ui-toast__title", children: notice.title }),
3529
- !notice.compact && notice.text && /* @__PURE__ */ jsx33("div", { className: "ui-toast__text", children: notice.text })
3611
+ /* @__PURE__ */ jsx34("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx34(Icon, { name: glyphs[tone] }) }),
3612
+ /* @__PURE__ */ jsxs29("div", { className: "ui-toast__body", children: [
3613
+ /* @__PURE__ */ jsx34("div", { className: "ui-toast__title", children: notice.title }),
3614
+ !notice.compact && notice.text && /* @__PURE__ */ jsx34("div", { className: "ui-toast__text", children: notice.text })
3530
3615
  ] }),
3531
- notice.action && /* @__PURE__ */ jsx33(
3616
+ notice.action && /* @__PURE__ */ jsx34(
3532
3617
  "button",
3533
3618
  {
3534
3619
  type: "button",
@@ -3543,8 +3628,8 @@ function Notice({ notice, remove }) {
3543
3628
  children: notice.action.label
3544
3629
  }
3545
3630
  ),
3546
- notice.dismissible !== false && /* @__PURE__ */ jsx33("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx33(Icon, { name: "x" }) }),
3547
- timed && /* @__PURE__ */ jsx33(
3631
+ notice.dismissible !== false && /* @__PURE__ */ jsx34("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx34(Icon, { name: "x" }) }),
3632
+ timed && /* @__PURE__ */ jsx34(
3548
3633
  "span",
3549
3634
  {
3550
3635
  className: "ui-toast__timer is-running",
@@ -3586,10 +3671,10 @@ function Toast({ children }) {
3586
3671
  setEntries((current) => [...current, { id, notice, remove }]);
3587
3672
  }, []);
3588
3673
  usePublishedReach(stack2, entries.length);
3589
- return /* @__PURE__ */ jsxs28(Context.Provider, { value: push, children: [
3674
+ return /* @__PURE__ */ jsxs29(Context.Provider, { value: push, children: [
3590
3675
  children,
3591
3676
  typeof document !== "undefined" && createPortal4(
3592
- /* @__PURE__ */ jsx33("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx33(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
3677
+ /* @__PURE__ */ jsx34("div", { className: "ui-toast-stack rx-toast-stack", ref: stack2, children: entries.map((entry) => /* @__PURE__ */ jsx34(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) }),
3593
3678
  document.body
3594
3679
  )
3595
3680
  ] });
@@ -3602,7 +3687,7 @@ import { paletteHotkey, prism, railCollapsed } from "@apliteni/apliteni-ui";
3602
3687
  // src/SidebarNav.tsx
3603
3688
  import { forwardRef as forwardRef8, useEffect as useEffect13, useId as useId11, useState as useState14 } from "react";
3604
3689
  import { ENTRANCE_FALLBACK_MS } from "@apliteni/apliteni-ui/motion";
3605
- import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3690
+ import { Fragment as Fragment11, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3606
3691
  var badgeText = (badge) => typeof badge === "object" ? badge.text : badge;
3607
3692
  function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3608
3693
  const uid = useId11();
@@ -3628,15 +3713,15 @@ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3628
3713
  item.disabled && "is-disabled",
3629
3714
  item.danger && "is-danger"
3630
3715
  ].filter(Boolean).join(" ");
3631
- const children = /* @__PURE__ */ jsxs29(Fragment11, { children: [
3632
- (item.leading ?? item.icon) && /* @__PURE__ */ jsx34("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx34(Icon, { name: item.icon }) }),
3633
- /* @__PURE__ */ jsx34("span", { className: "ui-nav__label", children: item.label }),
3634
- count != null && count !== "" && /* @__PURE__ */ jsx34("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
3635
- group && /* @__PURE__ */ jsx34("span", { className: "ui-nav__caret", "aria-hidden": "true" })
3716
+ const children = /* @__PURE__ */ jsxs30(Fragment11, { children: [
3717
+ (item.leading ?? item.icon) && /* @__PURE__ */ jsx35("span", { className: "ui-nav__ic", children: item.leading ?? /* @__PURE__ */ jsx35(Icon, { name: item.icon }) }),
3718
+ /* @__PURE__ */ jsx35("span", { className: "ui-nav__label", children: item.label }),
3719
+ count != null && count !== "" && /* @__PURE__ */ jsx35("span", { className: `ui-nav__badge is-${typeof item.badge === "object" ? item.badge.tone ?? "neutral" : "neutral"}`, children: count }),
3720
+ group && /* @__PURE__ */ jsx35("span", { className: "ui-nav__caret", "aria-hidden": "true" })
3636
3721
  ] });
3637
3722
  const common = { className, "aria-label": name, title: collapsed ? name : void 0, children };
3638
- if (group) return /* @__PURE__ */ jsxs29("li", { className: `ui-nav__group${open ? " is-open" : ""}`, children: [
3639
- /* @__PURE__ */ jsx34(
3723
+ if (group) return /* @__PURE__ */ jsxs30("li", { className: `ui-nav__group${open ? " is-open" : ""}`, children: [
3724
+ /* @__PURE__ */ jsx35(
3640
3725
  "button",
3641
3726
  {
3642
3727
  ...common,
@@ -3650,22 +3735,22 @@ function Row({ item, active, activeIs, collapsed, renderLink, sub }) {
3650
3735
  }
3651
3736
  }
3652
3737
  ),
3653
- /* @__PURE__ */ jsx34("ul", { id: uid, className: `ui-nav__sub${entering ? " is-entering" : ""}`, hidden: !open, onAnimationEnd: () => setEntering(false), children: item.items.map((child) => /* @__PURE__ */ jsx34(Row, { item: child, active, activeIs, collapsed, renderLink, sub: true }, child.id)) })
3738
+ /* @__PURE__ */ jsx35("ul", { id: uid, className: `ui-nav__sub${entering ? " is-entering" : ""}`, hidden: !open, onAnimationEnd: () => setEntering(false), children: item.items.map((child) => /* @__PURE__ */ jsx35(Row, { item: child, active, activeIs, collapsed, renderLink, sub: true }, child.id)) })
3654
3739
  ] });
3655
- if (item.disabled) return /* @__PURE__ */ jsx34("li", { children: /* @__PURE__ */ jsx34("span", { ...common, role: "link", "aria-disabled": "true" }) });
3740
+ if (item.disabled) return /* @__PURE__ */ jsx35("li", { children: /* @__PURE__ */ jsx35("span", { ...common, role: "link", "aria-disabled": "true" }) });
3656
3741
  const props = {
3657
3742
  ...common,
3658
3743
  href: item.href ?? `#${item.id}`,
3659
3744
  target: item.target,
3660
3745
  "aria-current": isActive ? activeIs === "section" ? "true" : "page" : void 0
3661
3746
  };
3662
- return /* @__PURE__ */ jsx34("li", { children: renderLink ? renderLink(item, props) : /* @__PURE__ */ jsx34("a", { ...props }) });
3747
+ return /* @__PURE__ */ jsx35("li", { children: renderLink ? renderLink(item, props) : /* @__PURE__ */ jsx35("a", { ...props }) });
3663
3748
  }
3664
3749
  function Section({ section, ...props }) {
3665
3750
  const uid = useId11();
3666
- return /* @__PURE__ */ jsxs29("div", { className: "ui-nav__section", children: [
3667
- section.label && /* @__PURE__ */ jsx34("div", { className: "ui-nav__cap", id: uid, "aria-hidden": props.collapsed || void 0, children: section.label }),
3668
- /* @__PURE__ */ jsx34("ul", { className: "ui-nav__list", "aria-labelledby": section.label ? uid : void 0, children: section.items.map((item) => /* @__PURE__ */ jsx34(Row, { item, ...props }, item.id)) })
3751
+ return /* @__PURE__ */ jsxs30("div", { className: "ui-nav__section", children: [
3752
+ section.label && /* @__PURE__ */ jsx35("div", { className: "ui-nav__cap", id: uid, "aria-hidden": props.collapsed || void 0, children: section.label }),
3753
+ /* @__PURE__ */ jsx35("ul", { className: "ui-nav__list", "aria-labelledby": section.label ? uid : void 0, children: section.items.map((item) => /* @__PURE__ */ jsx35(Row, { item, ...props }, item.id)) })
3669
3754
  ] });
3670
3755
  }
3671
3756
  var SidebarNav = forwardRef8(function SidebarNav2({
@@ -3680,8 +3765,8 @@ var SidebarNav = forwardRef8(function SidebarNav2({
3680
3765
  "aria-label": label = "Sidebar",
3681
3766
  ...rest
3682
3767
  }, ref) {
3683
- return /* @__PURE__ */ jsxs29("nav", { ...rest, ref, "aria-label": label, className: ["ui-nav", "ui-nav--side", collapsed && "is-collapsed", className].filter(Boolean).join(" "), children: [
3684
- (sections?.length ? sections : [{ items }]).map((section, index) => /* @__PURE__ */ jsx34(
3768
+ return /* @__PURE__ */ jsxs30("nav", { ...rest, ref, "aria-label": label, className: ["ui-nav", "ui-nav--side", collapsed && "is-collapsed", className].filter(Boolean).join(" "), children: [
3769
+ (sections?.length ? sections : [{ items }]).map((section, index) => /* @__PURE__ */ jsx35(
3685
3770
  Section,
3686
3771
  {
3687
3772
  section,
@@ -3692,14 +3777,14 @@ var SidebarNav = forwardRef8(function SidebarNav2({
3692
3777
  },
3693
3778
  index
3694
3779
  )),
3695
- footer && /* @__PURE__ */ jsx34("div", { className: "ui-nav__foot", children: footer })
3780
+ footer && /* @__PURE__ */ jsx35("div", { className: "ui-nav__foot", children: footer })
3696
3781
  ] });
3697
3782
  });
3698
3783
 
3699
3784
  // src/ThemeToggle.tsx
3700
3785
  import { useSyncExternalStore } from "react";
3701
3786
  import { themeIcon } from "@apliteni/apliteni-ui";
3702
- import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3787
+ import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3703
3788
  var STORAGE_KEY = "apliteni-strategy-theme";
3704
3789
  var CHOICE_EVENT = "apliteni-theme-choice";
3705
3790
  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')})()`;
@@ -3757,10 +3842,10 @@ function ThemeToggle({ labelled = false }) {
3757
3842
  }
3758
3843
  window.dispatchEvent(new Event(CHOICE_EVENT));
3759
3844
  };
3760
- const button = /* @__PURE__ */ jsx35("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx35("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
3761
- return labelled ? /* @__PURE__ */ jsxs30("span", { className: "ui-theme-toggle", children: [
3845
+ const button = /* @__PURE__ */ jsx36("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx36("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
3846
+ return labelled ? /* @__PURE__ */ jsxs31("span", { className: "ui-theme-toggle", children: [
3762
3847
  button,
3763
- /* @__PURE__ */ jsxs30("span", { children: [
3848
+ /* @__PURE__ */ jsxs31("span", { children: [
3764
3849
  label,
3765
3850
  " theme"
3766
3851
  ] })
@@ -3768,7 +3853,7 @@ function ThemeToggle({ labelled = false }) {
3768
3853
  }
3769
3854
 
3770
3855
  // src/AppShell.tsx
3771
- import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3856
+ import { Fragment as Fragment12, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3772
3857
  var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
3773
3858
  function AppShell({
3774
3859
  sections,
@@ -3833,7 +3918,7 @@ function AppShell({
3833
3918
  } catch {
3834
3919
  }
3835
3920
  };
3836
- const sidebar = (label) => /* @__PURE__ */ jsx36(
3921
+ const sidebar = (label) => /* @__PURE__ */ jsx37(
3837
3922
  SidebarNav,
3838
3923
  {
3839
3924
  "aria-label": label,
@@ -3845,33 +3930,33 @@ function AppShell({
3845
3930
  const linkProps = { ...props, onClick: (event) => {
3846
3931
  if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMenu(false);
3847
3932
  } };
3848
- return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx36("a", { ...linkProps });
3933
+ return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx37("a", { ...linkProps });
3849
3934
  }
3850
3935
  }
3851
3936
  );
3852
3937
  const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
3853
3938
  const navigable = sections.length > 1 || Boolean(back);
3854
- const lockup = /* @__PURE__ */ jsxs31("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
3855
- brand ?? /* @__PURE__ */ jsx36("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
3856
- /* @__PURE__ */ jsx36("span", { children: word })
3939
+ const lockup = /* @__PURE__ */ jsxs32("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
3940
+ brand ?? /* @__PURE__ */ jsx37("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
3941
+ /* @__PURE__ */ jsx37("span", { children: word })
3857
3942
  ] });
3858
- return /* @__PURE__ */ jsxs31("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
3859
- navigable && /* @__PURE__ */ jsxs31("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
3860
- /* @__PURE__ */ jsx36("div", { className: "ui-app__head", children: lockup }),
3943
+ return /* @__PURE__ */ jsxs32("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
3944
+ navigable && /* @__PURE__ */ jsxs32("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
3945
+ /* @__PURE__ */ jsx37("div", { className: "ui-app__head", children: lockup }),
3861
3946
  sidebar("Sections"),
3862
- /* @__PURE__ */ jsx36("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx36("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs31("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
3863
- /* @__PURE__ */ jsx36("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs31("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
3864
- /* @__PURE__ */ jsx36("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
3865
- /* @__PURE__ */ jsx36("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
3866
- /* @__PURE__ */ jsx36("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
3947
+ /* @__PURE__ */ jsx37("div", { className: "ui-app__foot", children: /* @__PURE__ */ jsx37("div", { className: "ui-app__fold-row", children: /* @__PURE__ */ jsxs32("button", { type: "button", className: "ui-nav__item ui-app__fold", "aria-expanded": !collapsed, "aria-label": foldLabel, onClick: fold, children: [
3948
+ /* @__PURE__ */ jsx37("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs32("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
3949
+ /* @__PURE__ */ jsx37("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
3950
+ /* @__PURE__ */ jsx37("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
3951
+ /* @__PURE__ */ jsx37("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
3867
3952
  ] }) }),
3868
- /* @__PURE__ */ jsx36("span", { className: "ui-nav__label", children: foldLabel })
3953
+ /* @__PURE__ */ jsx37("span", { className: "ui-nav__label", children: foldLabel })
3869
3954
  ] }) }) })
3870
3955
  ] }),
3871
- /* @__PURE__ */ jsxs31("div", { className: "ui-app__well", children: [
3872
- /* @__PURE__ */ jsxs31("header", { className: "ui-app__bar", children: [
3873
- navigable && /* @__PURE__ */ jsxs31(Fragment12, { children: [
3874
- /* @__PURE__ */ jsx36(
3956
+ /* @__PURE__ */ jsxs32("div", { className: "ui-app__well", children: [
3957
+ /* @__PURE__ */ jsxs32("header", { className: "ui-app__bar", children: [
3958
+ navigable && /* @__PURE__ */ jsxs32(Fragment12, { children: [
3959
+ /* @__PURE__ */ jsx37(
3875
3960
  Button,
3876
3961
  {
3877
3962
  ref: menuButton,
@@ -3885,19 +3970,19 @@ function AppShell({
3885
3970
  onClick: () => setMenu(true)
3886
3971
  }
3887
3972
  ),
3888
- /* @__PURE__ */ jsx36("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx36("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
3973
+ /* @__PURE__ */ jsx37("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx37("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
3889
3974
  ] }),
3890
3975
  !navigable && lockup,
3891
- /* @__PURE__ */ jsxs31("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
3892
- /* @__PURE__ */ jsx36("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx36(Icon, { name: "search" }) }),
3893
- /* @__PURE__ */ jsx36("span", { className: "ui-app__search-txt", children: searchLabel }),
3894
- /* @__PURE__ */ jsx36("span", { className: "ui-app__search-short", "aria-hidden": "true", children: searchShortLabel }),
3895
- /* @__PURE__ */ jsx36("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
3976
+ /* @__PURE__ */ jsxs32("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
3977
+ /* @__PURE__ */ jsx37("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx37(Icon, { name: "search" }) }),
3978
+ /* @__PURE__ */ jsx37("span", { className: "ui-app__search-txt", children: searchLabel }),
3979
+ /* @__PURE__ */ jsx37("span", { className: "ui-app__search-short", "aria-hidden": "true", children: searchShortLabel }),
3980
+ /* @__PURE__ */ jsx37("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
3896
3981
  ] }),
3897
- /* @__PURE__ */ jsx36("span", { className: "ui-app__bar-gap" }),
3898
- bandControl && /* @__PURE__ */ jsx36("span", { className: "ui-react-app__band-control", children: bandControl }),
3899
- /* @__PURE__ */ jsx36(ThemeToggle, {}),
3900
- /* @__PURE__ */ jsx36("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx36(
3982
+ /* @__PURE__ */ jsx37("span", { className: "ui-app__bar-gap" }),
3983
+ bandControl && /* @__PURE__ */ jsx37("span", { className: "ui-react-app__band-control", children: bandControl }),
3984
+ /* @__PURE__ */ jsx37(ThemeToggle, {}),
3985
+ /* @__PURE__ */ jsx37("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx37(
3901
3986
  Dropdown,
3902
3987
  {
3903
3988
  variant: "menu",
@@ -3906,48 +3991,26 @@ function AppShell({
3906
3991
  ariaLabel: `Signed in as ${account.name}, ${account.email}`,
3907
3992
  triggerClass: "ui-app__user-trigger",
3908
3993
  panelClass: "ui-app__user-panel",
3909
- triggerContent: /* @__PURE__ */ jsx36("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx36(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
3910
- header: /* @__PURE__ */ jsxs31("div", { className: "ui-dropdown__head", children: [
3911
- /* @__PURE__ */ jsx36("b", { children: account.name }),
3912
- /* @__PURE__ */ jsx36("span", { children: account.email })
3994
+ triggerContent: /* @__PURE__ */ jsx37("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx37(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
3995
+ header: /* @__PURE__ */ jsxs32("div", { className: "ui-dropdown__head", children: [
3996
+ /* @__PURE__ */ jsx37("b", { children: account.name }),
3997
+ /* @__PURE__ */ jsx37("span", { children: account.email })
3913
3998
  ] }),
3914
3999
  items: [{ label: "Sign out", icon: "logout", danger: true }],
3915
4000
  onSelect: onSignOut
3916
4001
  }
3917
4002
  ) })
3918
4003
  ] }),
3919
- /* @__PURE__ */ jsxs31("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
3920
- back && /* @__PURE__ */ jsx36(BackLink, { ...back }),
3921
- /* @__PURE__ */ jsx36("h1", { children: title }),
3922
- lede && /* @__PURE__ */ jsx36("p", { className: "ui-app__sub", children: lede }),
3923
- actions && /* @__PURE__ */ jsx36("div", { className: "ui-react-app__actions", children: actions }),
3924
- /* @__PURE__ */ jsx36("div", { className: "ui-app__body", children })
4004
+ /* @__PURE__ */ jsxs32("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
4005
+ back && /* @__PURE__ */ jsx37(BackLink, { ...back }),
4006
+ /* @__PURE__ */ jsx37("h1", { children: title }),
4007
+ lede && /* @__PURE__ */ jsx37("p", { className: "ui-app__sub", children: lede }),
4008
+ actions && /* @__PURE__ */ jsx37("div", { className: "ui-react-app__actions", children: actions }),
4009
+ /* @__PURE__ */ jsx37("div", { className: "ui-app__body", children })
3925
4010
  ] })
3926
4011
  ] }),
3927
- navigable && /* @__PURE__ */ jsx36(Drawer, { open: menu, onClose: () => setMenu(false), title: word, side: "left", size: "sm", children: /* @__PURE__ */ jsx36("div", { className: "ui-react-app__menu", children: sidebar("Menu sections") }) }),
3928
- /* @__PURE__ */ jsx36(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
3929
- ] });
3930
- }
3931
-
3932
- // src/EmptyState.tsx
3933
- import { icon as kitIcon2, illo } from "@apliteni/apliteni-ui";
3934
- import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
3935
- var cases = {
3936
- "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
3937
- "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
3938
- "not-found": { title: "We can't find that page", sub: "Check the address or return to the home page.", icon: "folder" },
3939
- "not-yet-built": { title: "This ships later", sub: "This screen is not available yet. Check back later.", icon: "clock" }
3940
- };
3941
- function EmptyState({ variant = "first-run", title, sub, icon: icon8, art, actions }) {
3942
- const preset = cases[variant];
3943
- const heading = title ?? preset.title;
3944
- const guidance = sub ?? preset.sub;
3945
- const glyph = icon8 ?? preset.icon;
3946
- return /* @__PURE__ */ jsxs32("div", { className: "ui-empty", children: [
3947
- art ? typeof art === "string" ? /* @__PURE__ */ jsx37("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx37("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph ? /* @__PURE__ */ jsx37("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon2(glyph) } }) : null,
3948
- heading && /* @__PURE__ */ jsx37("div", { className: "ui-empty__title", children: heading }),
3949
- guidance && /* @__PURE__ */ jsx37("div", { className: "ui-empty__sub", children: guidance }),
3950
- actions && /* @__PURE__ */ jsx37("div", { className: "ui-empty__actions", children: actions })
4012
+ navigable && /* @__PURE__ */ jsx37(Drawer, { open: menu, onClose: () => setMenu(false), title: word, side: "left", size: "sm", children: /* @__PURE__ */ jsx37("div", { className: "ui-react-app__menu", children: sidebar("Menu sections") }) }),
4013
+ /* @__PURE__ */ jsx37(CommandPalette, { ...palette ?? { groups: [{ items: sections.map((section) => ({ id: section.href, ...section })) }] }, open: search, onClose: () => setSearch(false) })
3951
4014
  ] });
3952
4015
  }
3953
4016