@ship-it-ui/ui 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -79,6 +79,7 @@ __export(index_exports, {
79
79
  DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
80
80
  DropdownMenuRoot: () => DropdownMenuRoot,
81
81
  DropdownMenuTrigger: () => DropdownMenuTrigger,
82
+ Dropzone: () => Dropzone,
82
83
  EmptyState: () => EmptyState,
83
84
  FAB: () => FAB,
84
85
  Field: () => Field,
@@ -100,6 +101,7 @@ __export(index_exports, {
100
101
  MenubarMenu: () => MenubarMenu,
101
102
  MenubarSeparator: () => MenubarSeparator,
102
103
  MenubarTrigger: () => MenubarTrigger,
104
+ NavBar: () => NavBar,
103
105
  NavItem: () => NavItem,
104
106
  NavSection: () => NavSection,
105
107
  OTP: () => OTP,
@@ -1007,6 +1009,7 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1007
1009
  className,
1008
1010
  value,
1009
1011
  defaultValue,
1012
+ onValueChange,
1010
1013
  thumbLabels,
1011
1014
  "aria-label": ariaLabel,
1012
1015
  "aria-labelledby": ariaLabelledBy,
@@ -1014,7 +1017,20 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1014
1017
  }, ref) {
1015
1018
  const arrValue = Array.isArray(value) ? value : value !== void 0 ? [value] : void 0;
1016
1019
  const arrDefault = Array.isArray(defaultValue) ? defaultValue : defaultValue !== void 0 ? [defaultValue] : void 0;
1017
- const display = arrValue?.[0] ?? arrDefault?.[0] ?? props.min ?? 0;
1020
+ const isControlled = arrValue !== void 0;
1021
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react20.useState)(arrDefault);
1022
+ const currentValue = isControlled ? arrValue : uncontrolledValue;
1023
+ const wasScalar = !Array.isArray(value ?? defaultValue) && (value ?? defaultValue) !== void 0;
1024
+ const handleValueChange = (0, import_react20.useCallback)(
1025
+ (next) => {
1026
+ if (!isControlled) setUncontrolledValue(next);
1027
+ if (onValueChange) {
1028
+ onValueChange(wasScalar ? next[0] ?? 0 : next);
1029
+ }
1030
+ },
1031
+ [isControlled, onValueChange, wasScalar]
1032
+ );
1033
+ const display = currentValue?.[0] ?? props.min ?? 0;
1018
1034
  const thumbCount = (arrValue ?? arrDefault)?.length ?? 1;
1019
1035
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1020
1036
  "span",
@@ -1028,6 +1044,7 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1028
1044
  {
1029
1045
  value: arrValue,
1030
1046
  defaultValue: arrDefault,
1047
+ onValueChange: handleValueChange,
1031
1048
  className: "relative flex h-4 flex-1 touch-none items-center select-none",
1032
1049
  ...props,
1033
1050
  children: [
@@ -3182,10 +3199,91 @@ var Dots = (0, import_react51.forwardRef)(function Dots2({ total, current, onCha
3182
3199
  });
3183
3200
  Dots.displayName = "Dots";
3184
3201
 
3185
- // src/patterns/EmptyState/EmptyState.tsx
3186
- var import_class_variance_authority10 = require("class-variance-authority");
3202
+ // src/patterns/Dropzone/Dropzone.tsx
3187
3203
  var import_react52 = require("react");
3188
3204
  var import_jsx_runtime45 = require("react/jsx-runtime");
3205
+ function listToArray(list) {
3206
+ if (!list) return [];
3207
+ return Array.from(list);
3208
+ }
3209
+ var Dropzone = (0, import_react52.forwardRef)(function Dropzone2({
3210
+ onFiles,
3211
+ accept,
3212
+ multiple = true,
3213
+ title = "Drop files to ingest",
3214
+ description,
3215
+ icon = "\u21A5",
3216
+ disabled,
3217
+ className,
3218
+ ...props
3219
+ }, ref) {
3220
+ const [isDragging, setIsDragging] = (0, import_react52.useState)(false);
3221
+ const onDragOver = (e) => {
3222
+ if (disabled) return;
3223
+ e.preventDefault();
3224
+ setIsDragging(true);
3225
+ };
3226
+ const onDragLeave = () => setIsDragging(false);
3227
+ const onDrop = (e) => {
3228
+ if (disabled) return;
3229
+ e.preventDefault();
3230
+ setIsDragging(false);
3231
+ const files = listToArray(e.dataTransfer.files);
3232
+ if (files.length) onFiles?.(files);
3233
+ };
3234
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3235
+ "label",
3236
+ {
3237
+ ref,
3238
+ onDragOver,
3239
+ onDragLeave,
3240
+ onDrop,
3241
+ className: cn(
3242
+ "rounded-base flex max-w-[420px] cursor-pointer flex-col items-center border-[1.5px] border-dashed p-8 text-center",
3243
+ "transition-[background,border] duration-(--duration-micro)",
3244
+ "focus-within:ring-accent-dim focus-within:ring-[3px]",
3245
+ isDragging ? "border-accent bg-accent-dim" : "border-border-strong bg-panel hover:bg-panel-2",
3246
+ disabled && "pointer-events-none cursor-not-allowed opacity-50",
3247
+ className
3248
+ ),
3249
+ ...props,
3250
+ children: [
3251
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3252
+ "input",
3253
+ {
3254
+ type: "file",
3255
+ accept,
3256
+ multiple,
3257
+ disabled,
3258
+ "aria-label": typeof title === "string" ? title : "Upload files",
3259
+ className: "sr-only",
3260
+ onChange: (e) => {
3261
+ const files = listToArray(e.target.files);
3262
+ if (files.length) onFiles?.(files);
3263
+ e.target.value = "";
3264
+ }
3265
+ }
3266
+ ),
3267
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3268
+ "div",
3269
+ {
3270
+ "aria-hidden": true,
3271
+ className: cn("mb-2 text-[28px]", isDragging ? "text-accent" : "text-text-dim"),
3272
+ children: icon
3273
+ }
3274
+ ),
3275
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mb-1 text-[13px] font-medium", children: title }),
3276
+ description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-text-dim text-[11px]", children: description })
3277
+ ]
3278
+ }
3279
+ );
3280
+ });
3281
+ Dropzone.displayName = "Dropzone";
3282
+
3283
+ // src/patterns/EmptyState/EmptyState.tsx
3284
+ var import_class_variance_authority10 = require("class-variance-authority");
3285
+ var import_react53 = require("react");
3286
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3189
3287
  var plateStyles = (0, import_class_variance_authority10.cva)("grid h-12 w-12 place-items-center rounded-base text-[22px]", {
3190
3288
  variants: {
3191
3289
  tone: {
@@ -3198,8 +3296,8 @@ var plateStyles = (0, import_class_variance_authority10.cva)("grid h-12 w-12 pla
3198
3296
  },
3199
3297
  defaultVariants: { tone: "neutral" }
3200
3298
  });
3201
- var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, title, description, action, chips, tone, className, ...props }, ref) {
3202
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3299
+ var EmptyState = (0, import_react53.forwardRef)(function EmptyState2({ icon, title, description, action, chips, tone, className, ...props }, ref) {
3300
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3203
3301
  "div",
3204
3302
  {
3205
3303
  ref,
@@ -3209,10 +3307,10 @@ var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, tit
3209
3307
  ),
3210
3308
  ...props,
3211
3309
  children: [
3212
- icon != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": true, className: plateStyles({ tone: tone ?? "neutral" }), children: icon }),
3213
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-[14px] font-medium", children: title }),
3214
- description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-text-muted max-w-[260px] text-[12px] leading-[1.5]", children: description }),
3215
- chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex w-full flex-col gap-1", children: chips.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3310
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { "aria-hidden": true, className: plateStyles({ tone: tone ?? "neutral" }), children: icon }),
3311
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-[14px] font-medium", children: title }),
3312
+ description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-text-muted max-w-[260px] text-[12px] leading-[1.5]", children: description }),
3313
+ chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex w-full flex-col gap-1", children: chips.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3216
3314
  "button",
3217
3315
  {
3218
3316
  type: "button",
@@ -3234,18 +3332,18 @@ var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, tit
3234
3332
  EmptyState.displayName = "EmptyState";
3235
3333
 
3236
3334
  // src/patterns/FileChip/FileChip.tsx
3237
- var import_react53 = require("react");
3238
- var import_jsx_runtime46 = require("react/jsx-runtime");
3335
+ var import_react54 = require("react");
3336
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3239
3337
  function deriveExt(name) {
3240
3338
  const dot = name.lastIndexOf(".");
3241
3339
  if (dot < 0) return "FILE";
3242
3340
  return name.slice(dot + 1).slice(0, 4).toUpperCase();
3243
3341
  }
3244
- var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, progress, icon, onRemove, failed, className, ...props }, ref) {
3342
+ var FileChip = (0, import_react54.forwardRef)(function FileChip2({ name, size, progress, icon, onRemove, failed, className, ...props }, ref) {
3245
3343
  const ext = deriveExt(name);
3246
3344
  const showProgress = typeof progress === "number";
3247
3345
  const isComplete = showProgress && progress >= 100;
3248
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3346
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3249
3347
  "div",
3250
3348
  {
3251
3349
  ref,
@@ -3255,7 +3353,7 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3255
3353
  ),
3256
3354
  ...props,
3257
3355
  children: [
3258
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3356
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3259
3357
  "span",
3260
3358
  {
3261
3359
  "aria-hidden": true,
@@ -3263,17 +3361,17 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3263
3361
  children: icon ?? ext
3264
3362
  }
3265
3363
  ),
3266
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
3267
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "truncate text-[12px] font-medium", children: name }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("font-mono text-[10px]", failed ? "text-err" : "text-text-dim"), children: [
3364
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "min-w-0 flex-1", children: [
3365
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "truncate text-[12px] font-medium", children: name }),
3366
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("font-mono text-[10px]", failed ? "text-err" : "text-text-dim"), children: [
3269
3367
  size,
3270
- showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
3368
+ showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
3271
3369
  " \xB7 ",
3272
3370
  Math.round(progress),
3273
3371
  "%"
3274
3372
  ] })
3275
3373
  ] }),
3276
- showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "bg-panel mt-1 h-[2px] overflow-hidden rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3374
+ showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-panel mt-1 h-[2px] overflow-hidden rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3277
3375
  "div",
3278
3376
  {
3279
3377
  className: cn(
@@ -3284,7 +3382,7 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3284
3382
  }
3285
3383
  ) })
3286
3384
  ] }),
3287
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3385
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3288
3386
  "button",
3289
3387
  {
3290
3388
  type: "button",
@@ -3305,10 +3403,10 @@ FileChip.displayName = "FileChip";
3305
3403
 
3306
3404
  // src/patterns/Menubar/Menubar.tsx
3307
3405
  var RadixMenubar = __toESM(require("@radix-ui/react-menubar"), 1);
3308
- var import_react54 = require("react");
3309
- var import_jsx_runtime47 = require("react/jsx-runtime");
3310
- var Menubar = (0, import_react54.forwardRef)(function Menubar2({ className, ...props }, ref) {
3311
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3406
+ var import_react55 = require("react");
3407
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3408
+ var Menubar = (0, import_react55.forwardRef)(function Menubar2({ className, ...props }, ref) {
3409
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3312
3410
  RadixMenubar.Root,
3313
3411
  {
3314
3412
  ref,
@@ -3322,9 +3420,9 @@ var Menubar = (0, import_react54.forwardRef)(function Menubar2({ className, ...p
3322
3420
  });
3323
3421
  Menubar.displayName = "Menubar";
3324
3422
  var MenubarMenu = RadixMenubar.Menu;
3325
- var MenubarTrigger = (0, import_react54.forwardRef)(
3423
+ var MenubarTrigger = (0, import_react55.forwardRef)(
3326
3424
  function MenubarTrigger2({ className, ...props }, ref) {
3327
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3425
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3328
3426
  RadixMenubar.Trigger,
3329
3427
  {
3330
3428
  ref,
@@ -3341,9 +3439,9 @@ var MenubarTrigger = (0, import_react54.forwardRef)(
3341
3439
  }
3342
3440
  );
3343
3441
  MenubarTrigger.displayName = "MenubarTrigger";
3344
- var MenubarContent = (0, import_react54.forwardRef)(
3442
+ var MenubarContent = (0, import_react55.forwardRef)(
3345
3443
  function MenubarContent2({ className, sideOffset = 6, align = "start", ...props }, ref) {
3346
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RadixMenubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3444
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadixMenubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3347
3445
  RadixMenubar.Content,
3348
3446
  {
3349
3447
  ref,
@@ -3365,24 +3463,24 @@ var itemBase3 = cn(
3365
3463
  "data-[highlighted]:bg-panel-2",
3366
3464
  "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
3367
3465
  );
3368
- var MenubarItem = (0, import_react54.forwardRef)(function MenubarItem2({ trailing, destructive, className, children, ...props }, ref) {
3369
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3466
+ var MenubarItem = (0, import_react55.forwardRef)(function MenubarItem2({ trailing, destructive, className, children, ...props }, ref) {
3467
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3370
3468
  RadixMenubar.Item,
3371
3469
  {
3372
3470
  ref,
3373
3471
  className: cn(itemBase3, destructive ? "text-err" : "text-text", className),
3374
3472
  ...props,
3375
3473
  children: [
3376
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex-1", children }),
3377
- trailing && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
3474
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1", children }),
3475
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
3378
3476
  ]
3379
3477
  }
3380
3478
  );
3381
3479
  });
3382
3480
  MenubarItem.displayName = "MenubarItem";
3383
- var MenubarSeparator = (0, import_react54.forwardRef)(
3481
+ var MenubarSeparator = (0, import_react55.forwardRef)(
3384
3482
  function MenubarSeparator2({ className, ...props }, ref) {
3385
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3483
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3386
3484
  RadixMenubar.Separator,
3387
3485
  {
3388
3486
  ref,
@@ -3394,9 +3492,505 @@ var MenubarSeparator = (0, import_react54.forwardRef)(
3394
3492
  );
3395
3493
  MenubarSeparator.displayName = "MenubarSeparator";
3396
3494
 
3495
+ // src/patterns/NavBar/NavBar.tsx
3496
+ var RadixNav = __toESM(require("@radix-ui/react-navigation-menu"), 1);
3497
+ var import_react57 = require("react");
3498
+
3499
+ // src/patterns/Sidebar/Sidebar.tsx
3500
+ var import_react56 = require("react");
3501
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3502
+ var Sidebar = (0, import_react56.forwardRef)(function Sidebar2({ width = 240, className, style, ...props }, ref) {
3503
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3504
+ "aside",
3505
+ {
3506
+ ref,
3507
+ style: { width, ...style },
3508
+ className: cn(
3509
+ "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
3510
+ className
3511
+ ),
3512
+ ...props
3513
+ }
3514
+ );
3515
+ });
3516
+ Sidebar.displayName = "Sidebar";
3517
+ var NavItem = (0, import_react56.forwardRef)(
3518
+ function NavItem2({ icon, label, active, badge, href, disabled, className, ...props }, ref) {
3519
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3520
+ icon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: icon }),
3521
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1 truncate", children: label }),
3522
+ badge != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3523
+ "span",
3524
+ {
3525
+ className: cn(
3526
+ "rounded-xs px-[6px] py-px font-mono text-[10px]",
3527
+ active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
3528
+ ),
3529
+ children: badge
3530
+ }
3531
+ )
3532
+ ] });
3533
+ const baseClass = cn(
3534
+ "flex cursor-pointer items-center gap-[10px] rounded-xs px-2 py-[6px] text-[13px] outline-none",
3535
+ "transition-colors duration-(--duration-micro)",
3536
+ "focus-visible:ring-[3px] focus-visible:ring-accent-dim",
3537
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3538
+ disabled && "opacity-50 pointer-events-none",
3539
+ className
3540
+ );
3541
+ if (href) {
3542
+ const anchorProps = props;
3543
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3544
+ "a",
3545
+ {
3546
+ ref,
3547
+ href,
3548
+ "aria-current": active ? "page" : void 0,
3549
+ "aria-disabled": disabled || void 0,
3550
+ className: baseClass,
3551
+ ...anchorProps,
3552
+ children: inner
3553
+ }
3554
+ );
3555
+ }
3556
+ const buttonProps = props;
3557
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3558
+ "button",
3559
+ {
3560
+ ref,
3561
+ type: "button",
3562
+ "aria-current": active ? "page" : void 0,
3563
+ disabled,
3564
+ className: cn(baseClass, "w-full text-left"),
3565
+ ...buttonProps,
3566
+ children: inner
3567
+ }
3568
+ );
3569
+ }
3570
+ );
3571
+ NavItem.displayName = "NavItem";
3572
+ var NavSection = (0, import_react56.forwardRef)(function NavSection2({
3573
+ label,
3574
+ icon,
3575
+ action,
3576
+ collapsible = false,
3577
+ defaultOpen = true,
3578
+ open,
3579
+ onOpenChange,
3580
+ indent = 0,
3581
+ className,
3582
+ children,
3583
+ ...props
3584
+ }, ref) {
3585
+ const isControlled = open !== void 0;
3586
+ const [internalOpen, setInternalOpen] = (0, import_react56.useState)(defaultOpen);
3587
+ const isOpen = !collapsible || (isControlled ? open : internalOpen);
3588
+ const toggle = (0, import_react56.useCallback)(() => {
3589
+ const next = !isOpen;
3590
+ if (!isControlled) setInternalOpen(next);
3591
+ onOpenChange?.(next);
3592
+ }, [isOpen, isControlled, onOpenChange]);
3593
+ const eyebrowClass = "text-text-dim flex items-center gap-[6px] px-2 pt-2 font-mono text-[9px] tracking-[1.4px] uppercase";
3594
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
3595
+ collapsible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3596
+ "button",
3597
+ {
3598
+ type: "button",
3599
+ "aria-expanded": isOpen,
3600
+ onClick: toggle,
3601
+ className: cn(
3602
+ eyebrowClass,
3603
+ "cursor-pointer rounded-xs outline-none",
3604
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3605
+ "hover:text-text-muted"
3606
+ ),
3607
+ children: [
3608
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
3609
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1 text-left", children: label }),
3610
+ action,
3611
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-70", children: isOpen ? "\u25BE" : "\u25B8" })
3612
+ ]
3613
+ }
3614
+ ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: eyebrowClass, children: [
3615
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
3616
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1", children: label }),
3617
+ action
3618
+ ] }),
3619
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3620
+ "div",
3621
+ {
3622
+ className: cn("flex flex-col gap-[2px]", indent > 0 && "border-border ml-2 border-l"),
3623
+ style: indent > 0 ? { paddingLeft: indent } : void 0,
3624
+ children
3625
+ }
3626
+ )
3627
+ ] });
3628
+ });
3629
+ NavSection.displayName = "NavSection";
3630
+
3631
+ // src/patterns/NavBar/NavBar.tsx
3632
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3633
+ function isActiveTree(item, activeId) {
3634
+ if (item.id === activeId) return true;
3635
+ return item.children?.some((c) => isActiveTree(c, activeId)) ?? false;
3636
+ }
3637
+ var NavBar = (0, import_react57.forwardRef)(function NavBar2({
3638
+ orientation = "horizontal",
3639
+ items,
3640
+ brand,
3641
+ actions,
3642
+ value,
3643
+ defaultValue,
3644
+ onValueChange,
3645
+ width = 240,
3646
+ responsive = true,
3647
+ className,
3648
+ ...props
3649
+ }, ref) {
3650
+ const isControlled = value !== void 0;
3651
+ const [internalValue, setInternalValue] = (0, import_react57.useState)(defaultValue);
3652
+ const activeId = isControlled ? value : internalValue;
3653
+ const [drawerOpen, setDrawerOpen] = (0, import_react57.useState)(false);
3654
+ const select = (0, import_react57.useCallback)(
3655
+ (id) => {
3656
+ if (!isControlled) setInternalValue(id);
3657
+ onValueChange?.(id);
3658
+ },
3659
+ [isControlled, onValueChange]
3660
+ );
3661
+ const handleItemActivate = (0, import_react57.useCallback)(
3662
+ (id) => {
3663
+ select(id);
3664
+ setDrawerOpen(false);
3665
+ },
3666
+ [select]
3667
+ );
3668
+ const drawerBody = (
3669
+ // Distinct aria-label from the desktop <aside>'s <nav> below — when the
3670
+ // drawer is open on a viewport that's resizing past `md`, both navs can
3671
+ // sit in the DOM together. Identical accessible names would trip axe's
3672
+ // `landmark-unique` rule.
3673
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("nav", { "aria-label": "Mobile navigation", className: "flex flex-col gap-1", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3674
+ VerticalItem,
3675
+ {
3676
+ item,
3677
+ activeId,
3678
+ onActivate: handleItemActivate
3679
+ },
3680
+ item.id
3681
+ )) })
3682
+ );
3683
+ const mobileBar = responsive ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3684
+ "div",
3685
+ {
3686
+ className: cn(
3687
+ "border-border bg-panel z-overlay sticky top-0 flex h-[52px] items-center gap-4 border-b px-5 md:hidden"
3688
+ ),
3689
+ children: [
3690
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3691
+ "button",
3692
+ {
3693
+ type: "button",
3694
+ onClick: () => setDrawerOpen(true),
3695
+ "aria-label": "Open navigation",
3696
+ className: "text-text-muted hover:text-text focus-visible:ring-accent-dim rounded-xs px-2 py-1 text-[18px] outline-none focus-visible:ring-[3px]",
3697
+ children: "\u2630"
3698
+ }
3699
+ ),
3700
+ brand && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex flex-1 items-center text-[13px] font-medium whitespace-nowrap", children: brand }),
3701
+ actions && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center gap-3", children: actions })
3702
+ ]
3703
+ }
3704
+ ) : null;
3705
+ if (orientation === "horizontal") {
3706
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3707
+ mobileBar,
3708
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3709
+ "header",
3710
+ {
3711
+ ref,
3712
+ className: cn(
3713
+ "border-border bg-panel flex h-[52px] items-center gap-4 border-b px-5",
3714
+ responsive && "hidden md:flex",
3715
+ className
3716
+ ),
3717
+ ...props,
3718
+ children: [
3719
+ brand && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "shrink-0 text-[13px] font-medium whitespace-nowrap", children: brand }),
3720
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(RadixNav.Root, { className: "relative flex-1", delayDuration: 120, children: [
3721
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.List, { className: "m-0! flex list-none! items-center gap-1 p-0! [&_li]:m-0!", children: items.map(
3722
+ (item) => item.children?.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3723
+ HorizontalDropdown,
3724
+ {
3725
+ item,
3726
+ active: isActiveTree(item, activeId),
3727
+ activeId,
3728
+ onActivate: handleItemActivate
3729
+ },
3730
+ item.id
3731
+ ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3732
+ HorizontalLink,
3733
+ {
3734
+ item,
3735
+ active: item.id === activeId,
3736
+ onActivate: handleItemActivate
3737
+ }
3738
+ ) }, item.id)
3739
+ ) }),
3740
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "z-popover absolute top-full left-0 flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Viewport, { className: "origin-top-left data-[state=open]:animate-[ship-fade-in_120ms_var(--easing-out)]" }) })
3741
+ ] }),
3742
+ actions && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center gap-3", children: actions })
3743
+ ]
3744
+ }
3745
+ ),
3746
+ responsive && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3747
+ Drawer,
3748
+ {
3749
+ open: drawerOpen,
3750
+ onOpenChange: setDrawerOpen,
3751
+ side: "left",
3752
+ title: brand ?? "Navigation",
3753
+ width: 300,
3754
+ children: drawerBody
3755
+ }
3756
+ )
3757
+ ] });
3758
+ }
3759
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3760
+ mobileBar,
3761
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3762
+ "aside",
3763
+ {
3764
+ ref,
3765
+ "aria-label": "Primary navigation",
3766
+ style: { width },
3767
+ className: cn(
3768
+ "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
3769
+ responsive && "hidden md:flex",
3770
+ className
3771
+ ),
3772
+ ...props,
3773
+ children: [
3774
+ brand && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "px-2 py-1 text-[13px] font-medium", children: brand }),
3775
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("nav", { "aria-label": "Sidebar navigation", className: "flex flex-1 flex-col gap-1 overflow-y-auto", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3776
+ VerticalItem,
3777
+ {
3778
+ item,
3779
+ activeId,
3780
+ onActivate: handleItemActivate
3781
+ },
3782
+ item.id
3783
+ )) }),
3784
+ actions && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "border-border mt-auto flex flex-col gap-2 border-t pt-3", children: actions })
3785
+ ]
3786
+ }
3787
+ ),
3788
+ responsive && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3789
+ Drawer,
3790
+ {
3791
+ open: drawerOpen,
3792
+ onOpenChange: setDrawerOpen,
3793
+ side: "left",
3794
+ title: brand ?? "Navigation",
3795
+ width: 300,
3796
+ children: drawerBody
3797
+ }
3798
+ )
3799
+ ] });
3800
+ });
3801
+ NavBar.displayName = "NavBar";
3802
+ function HorizontalLink({ item, active, onActivate }) {
3803
+ const baseClass = cn(
3804
+ "flex items-center gap-[6px] rounded-xs px-3 py-[6px] text-[13px] outline-none",
3805
+ "transition-colors duration-(--duration-micro)",
3806
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3807
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3808
+ item.disabled && "pointer-events-none opacity-50"
3809
+ );
3810
+ const handleClick = (e) => {
3811
+ if (item.disabled) {
3812
+ e.preventDefault();
3813
+ return;
3814
+ }
3815
+ onActivate(item.id);
3816
+ };
3817
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3818
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
3819
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: item.label }),
3820
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ItemBadge, { active, children: item.badge })
3821
+ ] });
3822
+ if (item.href) {
3823
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3824
+ "a",
3825
+ {
3826
+ href: item.href,
3827
+ "aria-current": active ? "page" : void 0,
3828
+ "aria-disabled": item.disabled || void 0,
3829
+ className: baseClass,
3830
+ onClick: handleClick,
3831
+ children: inner
3832
+ }
3833
+ ) });
3834
+ }
3835
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3836
+ "button",
3837
+ {
3838
+ type: "button",
3839
+ "aria-current": active ? "page" : void 0,
3840
+ disabled: item.disabled,
3841
+ className: baseClass,
3842
+ onClick: handleClick,
3843
+ children: inner
3844
+ }
3845
+ ) });
3846
+ }
3847
+ function HorizontalDropdown({ item, active, activeId, onActivate }) {
3848
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(RadixNav.Item, { children: [
3849
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3850
+ RadixNav.Trigger,
3851
+ {
3852
+ className: cn(
3853
+ "group flex items-center gap-1 rounded-xs px-3 py-[6px] text-[13px] outline-none",
3854
+ "transition-colors duration-(--duration-micro)",
3855
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3856
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3857
+ "data-[state=open]:bg-panel-2"
3858
+ ),
3859
+ disabled: item.disabled,
3860
+ children: [
3861
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
3862
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: item.label }),
3863
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3864
+ "span",
3865
+ {
3866
+ "aria-hidden": true,
3867
+ className: "ml-1 text-[10px] opacity-70 transition-transform group-data-[state=open]:rotate-180",
3868
+ children: "\u25BE"
3869
+ }
3870
+ )
3871
+ ]
3872
+ }
3873
+ ),
3874
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Content, { className: "border-border bg-panel min-w-[220px] rounded-xs border p-2 shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { className: "m-0! flex list-none! flex-col gap-[2px] p-0! [&_li]:m-0!", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DropdownLink, { item: child, active: child.id === activeId, onActivate }) }, child.id)) }) })
3875
+ ] });
3876
+ }
3877
+ function DropdownLink({ item, active, onActivate }) {
3878
+ const baseClass = cn(
3879
+ "flex w-full items-center gap-2 rounded-xs px-2 py-[6px] text-left text-[13px] outline-none",
3880
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3881
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3882
+ item.disabled && "pointer-events-none opacity-50"
3883
+ );
3884
+ const handleClick = (e) => {
3885
+ if (item.disabled) {
3886
+ e.preventDefault();
3887
+ return;
3888
+ }
3889
+ onActivate(item.id);
3890
+ };
3891
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
3892
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
3893
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "flex-1", children: item.label }),
3894
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ItemBadge, { active, children: item.badge })
3895
+ ] });
3896
+ if (item.href) {
3897
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3898
+ "a",
3899
+ {
3900
+ href: item.href,
3901
+ "aria-current": active ? "page" : void 0,
3902
+ "aria-disabled": item.disabled || void 0,
3903
+ className: baseClass,
3904
+ onClick: handleClick,
3905
+ children: inner
3906
+ }
3907
+ ) });
3908
+ }
3909
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3910
+ "button",
3911
+ {
3912
+ type: "button",
3913
+ "aria-current": active ? "page" : void 0,
3914
+ disabled: item.disabled,
3915
+ className: baseClass,
3916
+ onClick: handleClick,
3917
+ children: inner
3918
+ }
3919
+ ) });
3920
+ }
3921
+ function VerticalItem({ item, activeId, onActivate }) {
3922
+ const hasChildren = (item.children?.length ?? 0) > 0;
3923
+ const treeActive = isActiveTree(item, activeId);
3924
+ const [open, setOpen] = (0, import_react57.useState)(treeActive);
3925
+ const prevTreeActive = (0, import_react57.useRef)(treeActive);
3926
+ (0, import_react57.useEffect)(() => {
3927
+ if (treeActive && !prevTreeActive.current) setOpen(true);
3928
+ prevTreeActive.current = treeActive;
3929
+ }, [treeActive]);
3930
+ if (!hasChildren) {
3931
+ const handleClick = (e) => {
3932
+ if (item.disabled) {
3933
+ e.preventDefault();
3934
+ return;
3935
+ }
3936
+ onActivate(item.id);
3937
+ };
3938
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3939
+ NavItem,
3940
+ {
3941
+ icon: item.icon,
3942
+ label: item.label,
3943
+ active: item.id === activeId,
3944
+ badge: item.badge,
3945
+ disabled: item.disabled,
3946
+ href: item.href,
3947
+ onClick: handleClick
3948
+ }
3949
+ );
3950
+ }
3951
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col", children: [
3952
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3953
+ "button",
3954
+ {
3955
+ type: "button",
3956
+ "aria-expanded": open,
3957
+ onClick: () => setOpen((o) => !o),
3958
+ disabled: item.disabled,
3959
+ className: cn(
3960
+ "flex w-full items-center gap-[10px] rounded-xs px-2 py-[6px] text-left text-[13px] outline-none",
3961
+ "transition-colors duration-(--duration-micro)",
3962
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3963
+ treeActive ? "text-text" : "text-text-muted",
3964
+ "hover:bg-panel-2",
3965
+ item.disabled && "pointer-events-none opacity-50"
3966
+ ),
3967
+ children: [
3968
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: item.icon }),
3969
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "flex-1 truncate", children: item.label }),
3970
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ItemBadge, { active: treeActive, children: item.badge }),
3971
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-60", children: open ? "\u25BE" : "\u25B8" })
3972
+ ]
3973
+ }
3974
+ ),
3975
+ open && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "border-border mt-1 ml-[18px] flex flex-col gap-[2px] border-l pl-3", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(VerticalItem, { item: child, activeId, onActivate }, child.id)) })
3976
+ ] });
3977
+ }
3978
+ function ItemBadge({ active, children }) {
3979
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3980
+ "span",
3981
+ {
3982
+ className: cn(
3983
+ "rounded-xs px-[6px] py-px font-mono text-[10px]",
3984
+ active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
3985
+ ),
3986
+ children
3987
+ }
3988
+ );
3989
+ }
3990
+
3397
3991
  // src/patterns/Pagination/Pagination.tsx
3398
- var import_react55 = require("react");
3399
- var import_jsx_runtime48 = require("react/jsx-runtime");
3992
+ var import_react58 = require("react");
3993
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3400
3994
  function buildRange(page, total, siblings) {
3401
3995
  if (total <= 0) return [];
3402
3996
  const items = [];
@@ -3409,9 +4003,9 @@ function buildRange(page, total, siblings) {
3409
4003
  if (total > 1) items.push(total);
3410
4004
  return items;
3411
4005
  }
3412
- var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, total, onPageChange, siblings = 1, className, ...props }, ref) {
4006
+ var Pagination = (0, import_react58.forwardRef)(function Pagination2({ page, total, onPageChange, siblings = 1, className, ...props }, ref) {
3413
4007
  const items = buildRange(page, total, siblings);
3414
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4008
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3415
4009
  "nav",
3416
4010
  {
3417
4011
  ref,
@@ -3419,7 +4013,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3419
4013
  className: cn("inline-flex items-center gap-1", className),
3420
4014
  ...props,
3421
4015
  children: [
3422
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4016
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3423
4017
  IconButton,
3424
4018
  {
3425
4019
  size: "sm",
@@ -3432,7 +4026,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3432
4026
  ),
3433
4027
  items.map((item, i) => {
3434
4028
  if (item === "start-ellipsis" || item === "end-ellipsis") {
3435
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4029
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3436
4030
  "span",
3437
4031
  {
3438
4032
  "aria-hidden": true,
@@ -3443,7 +4037,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3443
4037
  );
3444
4038
  }
3445
4039
  const isActive = item === page;
3446
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4040
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3447
4041
  "button",
3448
4042
  {
3449
4043
  type: "button",
@@ -3461,7 +4055,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3461
4055
  item
3462
4056
  );
3463
4057
  }),
3464
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4058
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3465
4059
  IconButton,
3466
4060
  {
3467
4061
  size: "sm",
@@ -3480,8 +4074,8 @@ Pagination.displayName = "Pagination";
3480
4074
 
3481
4075
  // src/patterns/Progress/Progress.tsx
3482
4076
  var import_class_variance_authority11 = require("class-variance-authority");
3483
- var import_react56 = require("react");
3484
- var import_jsx_runtime49 = require("react/jsx-runtime");
4077
+ var import_react59 = require("react");
4078
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3485
4079
  var trackStyles = (0, import_class_variance_authority11.cva)("w-full rounded-full bg-panel-2 overflow-hidden", {
3486
4080
  variants: {
3487
4081
  size: {
@@ -3503,7 +4097,7 @@ var fillStyles = (0, import_class_variance_authority11.cva)("h-full rounded-full
3503
4097
  },
3504
4098
  defaultVariants: { tone: "accent" }
3505
4099
  });
3506
- var Progress = (0, import_react56.forwardRef)(function Progress2({
4100
+ var Progress = (0, import_react59.forwardRef)(function Progress2({
3507
4101
  value = 0,
3508
4102
  max = 100,
3509
4103
  indeterminate = false,
@@ -3517,15 +4111,15 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3517
4111
  const clamped = Math.min(max, Math.max(0, value));
3518
4112
  const pct = max > 0 ? clamped / max * 100 : 0;
3519
4113
  const display = Math.round(pct);
3520
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3521
- label != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex text-[12px]", children: [
3522
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-text-muted", children: label }),
3523
- showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-text ml-auto font-mono tabular-nums", children: [
4114
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
4115
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex text-[12px]", children: [
4116
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-muted", children: label }),
4117
+ showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-text ml-auto font-mono tabular-nums", children: [
3524
4118
  display,
3525
4119
  "%"
3526
4120
  ] })
3527
4121
  ] }),
3528
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4122
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3529
4123
  "div",
3530
4124
  {
3531
4125
  role: "progressbar",
@@ -3534,7 +4128,7 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3534
4128
  "aria-valuenow": indeterminate ? void 0 : display,
3535
4129
  "aria-label": typeof label === "string" ? label : void 0,
3536
4130
  className: trackStyles({ size }),
3537
- children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4131
+ children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3538
4132
  "span",
3539
4133
  {
3540
4134
  "aria-hidden": true,
@@ -3544,7 +4138,7 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3544
4138
  "animate-[ship-indeterminate_1.4s_linear_infinite]"
3545
4139
  )
3546
4140
  }
3547
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: fillStyles({ tone }), style: { width: `${pct}%` } })
4141
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { "aria-hidden": true, className: fillStyles({ tone }), style: { width: `${pct}%` } })
3548
4142
  }
3549
4143
  )
3550
4144
  ] });
@@ -3552,15 +4146,15 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3552
4146
  Progress.displayName = "Progress";
3553
4147
 
3554
4148
  // src/patterns/RadialProgress/RadialProgress.tsx
3555
- var import_react57 = require("react");
3556
- var import_jsx_runtime50 = require("react/jsx-runtime");
4149
+ var import_react60 = require("react");
4150
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3557
4151
  var toneStrokeClass = {
3558
4152
  accent: "stroke-accent",
3559
4153
  ok: "stroke-ok",
3560
4154
  warn: "stroke-warn",
3561
4155
  err: "stroke-err"
3562
4156
  };
3563
- var RadialProgress = (0, import_react57.forwardRef)(
4157
+ var RadialProgress = (0, import_react60.forwardRef)(
3564
4158
  function RadialProgress2({
3565
4159
  value,
3566
4160
  max = 100,
@@ -3578,7 +4172,7 @@ var RadialProgress = (0, import_react57.forwardRef)(
3578
4172
  const c = 2 * Math.PI * r;
3579
4173
  const dash = pct / 100 * c;
3580
4174
  const resolvedTone = tone ?? (clamped >= max ? "ok" : "accent");
3581
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
3582
4176
  "div",
3583
4177
  {
3584
4178
  ref,
@@ -3591,8 +4185,8 @@ var RadialProgress = (0, import_react57.forwardRef)(
3591
4185
  style: { width: size, height: size },
3592
4186
  ...props,
3593
4187
  children: [
3594
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
3595
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4188
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
4189
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3596
4190
  "circle",
3597
4191
  {
3598
4192
  cx: size / 2,
@@ -3603,7 +4197,7 @@ var RadialProgress = (0, import_react57.forwardRef)(
3603
4197
  className: "stroke-panel-2"
3604
4198
  }
3605
4199
  ),
3606
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4200
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3607
4201
  "circle",
3608
4202
  {
3609
4203
  cx: size / 2,
@@ -3621,7 +4215,7 @@ var RadialProgress = (0, import_react57.forwardRef)(
3621
4215
  }
3622
4216
  )
3623
4217
  ] }),
3624
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute inset-0 grid place-items-center font-mono text-[11px] font-medium tabular-nums", children: children ?? `${Math.round(pct)}%` })
4218
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "absolute inset-0 grid place-items-center font-mono text-[11px] font-medium tabular-nums", children: children ?? `${Math.round(pct)}%` })
3625
4219
  ]
3626
4220
  }
3627
4221
  );
@@ -3629,93 +4223,9 @@ var RadialProgress = (0, import_react57.forwardRef)(
3629
4223
  );
3630
4224
  RadialProgress.displayName = "RadialProgress";
3631
4225
 
3632
- // src/patterns/Sidebar/Sidebar.tsx
3633
- var import_react58 = require("react");
3634
- var import_jsx_runtime51 = require("react/jsx-runtime");
3635
- var Sidebar = (0, import_react58.forwardRef)(function Sidebar2({ width = 240, className, style, ...props }, ref) {
3636
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3637
- "aside",
3638
- {
3639
- ref,
3640
- style: { width, ...style },
3641
- className: cn(
3642
- "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
3643
- className
3644
- ),
3645
- ...props
3646
- }
3647
- );
3648
- });
3649
- Sidebar.displayName = "Sidebar";
3650
- var NavItem = (0, import_react58.forwardRef)(
3651
- function NavItem2({ icon, label, active, badge, href, disabled, className, ...props }, ref) {
3652
- const inner = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
3653
- icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: icon }),
3654
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-1 truncate", children: label }),
3655
- badge != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3656
- "span",
3657
- {
3658
- className: cn(
3659
- "rounded-xs px-[6px] py-px font-mono text-[10px]",
3660
- active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
3661
- ),
3662
- children: badge
3663
- }
3664
- )
3665
- ] });
3666
- const baseClass = cn(
3667
- "flex cursor-pointer items-center gap-[10px] rounded-xs px-2 py-[6px] text-[13px] outline-none",
3668
- "transition-colors duration-(--duration-micro)",
3669
- "focus-visible:ring-[3px] focus-visible:ring-accent-dim",
3670
- active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3671
- disabled && "opacity-50 pointer-events-none",
3672
- className
3673
- );
3674
- if (href) {
3675
- const anchorProps = props;
3676
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3677
- "a",
3678
- {
3679
- ref,
3680
- href,
3681
- "aria-current": active ? "page" : void 0,
3682
- "aria-disabled": disabled || void 0,
3683
- className: baseClass,
3684
- ...anchorProps,
3685
- children: inner
3686
- }
3687
- );
3688
- }
3689
- const buttonProps = props;
3690
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3691
- "button",
3692
- {
3693
- ref,
3694
- type: "button",
3695
- "aria-current": active ? "page" : void 0,
3696
- disabled,
3697
- className: cn(baseClass, "w-full text-left"),
3698
- ...buttonProps,
3699
- children: inner
3700
- }
3701
- );
3702
- }
3703
- );
3704
- NavItem.displayName = "NavItem";
3705
- var NavSection = (0, import_react58.forwardRef)(function NavSection2({ label, action, className, children, ...props }, ref) {
3706
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
3707
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-text-dim flex items-center px-2 pt-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
3708
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-1", children: label }),
3709
- action
3710
- ] }),
3711
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-[2px]", children })
3712
- ] });
3713
- });
3714
- NavSection.displayName = "NavSection";
3715
-
3716
4226
  // src/patterns/Sparkline/Sparkline.tsx
3717
- var import_react59 = require("react");
3718
- var import_jsx_runtime52 = require("react/jsx-runtime");
4227
+ var import_react61 = require("react");
4228
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3719
4229
  function buildPath(values, w, h) {
3720
4230
  if (values.length === 0) return { line: "", area: "" };
3721
4231
  const pad = 2;
@@ -3734,7 +4244,7 @@ function buildPath(values, w, h) {
3734
4244
  )} L${pad.toFixed(2)},${(h - pad).toFixed(2)} Z`;
3735
4245
  return { line, area };
3736
4246
  }
3737
- var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
4247
+ var Sparkline = (0, import_react61.forwardRef)(function Sparkline2({
3738
4248
  values,
3739
4249
  width = 160,
3740
4250
  height = 32,
@@ -3745,8 +4255,8 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3745
4255
  "aria-label": ariaLabel = "Trend",
3746
4256
  ...props
3747
4257
  }, ref) {
3748
- const { line, area } = (0, import_react59.useMemo)(() => buildPath(values, width, height), [values, width, height]);
3749
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4258
+ const { line, area } = (0, import_react61.useMemo)(() => buildPath(values, width, height), [values, width, height]);
4259
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
3750
4260
  "svg",
3751
4261
  {
3752
4262
  ref,
@@ -3758,8 +4268,8 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3758
4268
  className: cn("inline-block", className),
3759
4269
  ...props,
3760
4270
  children: [
3761
- fill && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: area, fill: stroke, fillOpacity: 0.16, stroke: "none" }),
3762
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4271
+ fill && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: area, fill: stroke, fillOpacity: 0.16, stroke: "none" }),
4272
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3763
4273
  "path",
3764
4274
  {
3765
4275
  d: line,
@@ -3777,16 +4287,16 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3777
4287
  Sparkline.displayName = "Sparkline";
3778
4288
 
3779
4289
  // src/patterns/Spinner/Spinner.tsx
3780
- var import_react60 = require("react");
3781
- var import_jsx_runtime53 = require("react/jsx-runtime");
4290
+ var import_react62 = require("react");
4291
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3782
4292
  var sizes = {
3783
4293
  sm: { box: "h-3 w-3", border: "border-[2px]" },
3784
4294
  md: { box: "h-4 w-4", border: "border-[2px]" },
3785
4295
  lg: { box: "h-5 w-5", border: "border-[2px]" }
3786
4296
  };
3787
- var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", label = "Loading", className, ...props }, ref) {
4297
+ var Spinner2 = (0, import_react62.forwardRef)(function Spinner3({ size = "md", label = "Loading", className, ...props }, ref) {
3788
4298
  const s = sizes[size];
3789
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4299
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3790
4300
  "span",
3791
4301
  {
3792
4302
  ref,
@@ -3794,7 +4304,7 @@ var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", l
3794
4304
  "aria-label": label,
3795
4305
  className: cn("inline-block", className),
3796
4306
  ...props,
3797
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4307
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3798
4308
  "span",
3799
4309
  {
3800
4310
  "aria-hidden": true,
@@ -3811,8 +4321,8 @@ var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", l
3811
4321
  Spinner2.displayName = "Spinner";
3812
4322
 
3813
4323
  // src/patterns/Stepper/Stepper.tsx
3814
- var import_react61 = require("react");
3815
- var import_jsx_runtime54 = require("react/jsx-runtime");
4324
+ var import_react63 = require("react");
4325
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3816
4326
  var dotBase = "h-6 w-6 rounded-full grid place-items-center text-[11px] font-mono font-semibold border";
3817
4327
  var dotStateClass = {
3818
4328
  done: "bg-accent text-on-accent border-accent",
@@ -3829,8 +4339,8 @@ function stateFor(index, current) {
3829
4339
  if (index === current) return "current";
3830
4340
  return "upcoming";
3831
4341
  }
3832
- var Stepper = (0, import_react61.forwardRef)(function Stepper2({ steps, current, className, ...props }, ref) {
3833
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4342
+ var Stepper = (0, import_react63.forwardRef)(function Stepper2({ steps, current, className, ...props }, ref) {
4343
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3834
4344
  "ol",
3835
4345
  {
3836
4346
  ref,
@@ -3842,19 +4352,19 @@ var Stepper = (0, import_react61.forwardRef)(function Stepper2({ steps, current,
3842
4352
  const id = typeof step === "string" ? void 0 : step.id;
3843
4353
  const state = stateFor(i, current);
3844
4354
  const connectorActive = i < current;
3845
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react61.Fragment, { children: [
3846
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4355
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react63.Fragment, { children: [
4356
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
3847
4357
  "li",
3848
4358
  {
3849
4359
  "aria-current": state === "current" ? "step" : void 0,
3850
4360
  className: "flex items-center gap-2",
3851
4361
  children: [
3852
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: cn(dotBase, dotStateClass[state]), children: state === "done" ? "\u2713" : i + 1 }),
3853
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-[12px]", labelStateClass[state]), children: label })
4362
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { "aria-hidden": true, className: cn(dotBase, dotStateClass[state]), children: state === "done" ? "\u2713" : i + 1 }),
4363
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: cn("text-[12px]", labelStateClass[state]), children: label })
3854
4364
  ]
3855
4365
  }
3856
4366
  ),
3857
- i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4367
+ i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3858
4368
  "span",
3859
4369
  {
3860
4370
  "aria-hidden": true,
@@ -3871,9 +4381,9 @@ Stepper.displayName = "Stepper";
3871
4381
  // src/patterns/Tabs/Tabs.tsx
3872
4382
  var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
3873
4383
  var import_class_variance_authority12 = require("class-variance-authority");
3874
- var import_react62 = require("react");
3875
- var import_jsx_runtime55 = require("react/jsx-runtime");
3876
- var TabsVariantContext = (0, import_react62.createContext)("underline");
4384
+ var import_react64 = require("react");
4385
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4386
+ var TabsVariantContext = (0, import_react64.createContext)("underline");
3877
4387
  var tabsListStyles = (0, import_class_variance_authority12.cva)("", {
3878
4388
  variants: {
3879
4389
  variant: {
@@ -3903,8 +4413,8 @@ var tabsTriggerStyles = (0, import_class_variance_authority12.cva)(
3903
4413
  }
3904
4414
  }
3905
4415
  );
3906
- var Tabs = (0, import_react62.forwardRef)(function Tabs2({ variant = "underline", className, ...props }, ref) {
3907
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4416
+ var Tabs = (0, import_react64.forwardRef)(function Tabs2({ variant = "underline", className, ...props }, ref) {
4417
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3908
4418
  RadixTabs.Root,
3909
4419
  {
3910
4420
  ref,
@@ -3914,14 +4424,14 @@ var Tabs = (0, import_react62.forwardRef)(function Tabs2({ variant = "underline"
3914
4424
  ) });
3915
4425
  });
3916
4426
  Tabs.displayName = "Tabs";
3917
- var TabsList = (0, import_react62.forwardRef)(function TabsList2({ className, ...props }, ref) {
3918
- const variant = (0, import_react62.useContext)(TabsVariantContext);
3919
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(RadixTabs.List, { ref, className: cn(tabsListStyles({ variant }), className), ...props });
4427
+ var TabsList = (0, import_react64.forwardRef)(function TabsList2({ className, ...props }, ref) {
4428
+ const variant = (0, import_react64.useContext)(TabsVariantContext);
4429
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RadixTabs.List, { ref, className: cn(tabsListStyles({ variant }), className), ...props });
3920
4430
  });
3921
4431
  TabsList.displayName = "TabsList";
3922
- var Tab = (0, import_react62.forwardRef)(function Tab2({ className, ...props }, ref) {
3923
- const variant = (0, import_react62.useContext)(TabsVariantContext);
3924
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4432
+ var Tab = (0, import_react64.forwardRef)(function Tab2({ className, ...props }, ref) {
4433
+ const variant = (0, import_react64.useContext)(TabsVariantContext);
4434
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3925
4435
  RadixTabs.Trigger,
3926
4436
  {
3927
4437
  ref,
@@ -3931,9 +4441,9 @@ var Tab = (0, import_react62.forwardRef)(function Tab2({ className, ...props },
3931
4441
  );
3932
4442
  });
3933
4443
  Tab.displayName = "Tab";
3934
- var TabsContent = (0, import_react62.forwardRef)(
4444
+ var TabsContent = (0, import_react64.forwardRef)(
3935
4445
  function TabsContent2({ className, ...props }, ref) {
3936
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4446
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3937
4447
  RadixTabs.Content,
3938
4448
  {
3939
4449
  ref,
@@ -3949,8 +4459,8 @@ var TabsContent = (0, import_react62.forwardRef)(
3949
4459
  TabsContent.displayName = "TabsContent";
3950
4460
 
3951
4461
  // src/patterns/Timeline/Timeline.tsx
3952
- var import_react63 = require("react");
3953
- var import_jsx_runtime56 = require("react/jsx-runtime");
4462
+ var import_react65 = require("react");
4463
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3954
4464
  var ringClass = {
3955
4465
  accent: "border-accent",
3956
4466
  ok: "border-ok",
@@ -3958,8 +4468,8 @@ var ringClass = {
3958
4468
  err: "border-err",
3959
4469
  muted: "border-text-dim"
3960
4470
  };
3961
- var Timeline = (0, import_react63.forwardRef)(function Timeline2({ events, className, children, ...props }, ref) {
3962
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4471
+ var Timeline = (0, import_react65.forwardRef)(function Timeline2({ events, className, children, ...props }, ref) {
4472
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3963
4473
  "ol",
3964
4474
  {
3965
4475
  ref,
@@ -3969,14 +4479,14 @@ var Timeline = (0, import_react63.forwardRef)(function Timeline2({ events, class
3969
4479
  className
3970
4480
  ),
3971
4481
  ...props,
3972
- children: events ? events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TimelineItem, { tone: e.tone, time: e.time, description: e.description, children: e.title }, i)) : children
4482
+ children: events ? events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TimelineItem, { tone: e.tone, time: e.time, description: e.description, children: e.title }, i)) : children
3973
4483
  }
3974
4484
  );
3975
4485
  });
3976
4486
  Timeline.displayName = "Timeline";
3977
- var TimelineItem = (0, import_react63.forwardRef)(function TimelineItem2({ tone = "accent", description, time, className, children, ...props }, ref) {
3978
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("li", { ref, className: cn("relative mb-[18px] last:mb-0", className), ...props, children: [
3979
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4487
+ var TimelineItem = (0, import_react65.forwardRef)(function TimelineItem2({ tone = "accent", description, time, className, children, ...props }, ref) {
4488
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { ref, className: cn("relative mb-[18px] last:mb-0", className), ...props, children: [
4489
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3980
4490
  "span",
3981
4491
  {
3982
4492
  "aria-hidden": true,
@@ -3986,18 +4496,18 @@ var TimelineItem = (0, import_react63.forwardRef)(function TimelineItem2({ tone
3986
4496
  )
3987
4497
  }
3988
4498
  ),
3989
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-[13px] font-medium", children }),
3990
- description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-text-muted text-[12px]", children: description }),
3991
- time && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-text-dim mt-[2px] font-mono text-[10px]", children: time })
4499
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-[13px] font-medium", children }),
4500
+ description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-text-muted text-[12px]", children: description }),
4501
+ time && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-text-dim mt-[2px] font-mono text-[10px]", children: time })
3992
4502
  ] });
3993
4503
  });
3994
4504
  TimelineItem.displayName = "TimelineItem";
3995
4505
 
3996
4506
  // src/patterns/Topbar/Topbar.tsx
3997
- var import_react64 = require("react");
3998
- var import_jsx_runtime57 = require("react/jsx-runtime");
3999
- var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, actions, className, children, ...props }, ref) {
4000
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4507
+ var import_react66 = require("react");
4508
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4509
+ var Topbar = (0, import_react66.forwardRef)(function Topbar2({ title, leading, actions, className, children, ...props }, ref) {
4510
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
4001
4511
  "header",
4002
4512
  {
4003
4513
  ref,
@@ -4008,9 +4518,9 @@ var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, a
4008
4518
  ...props,
4009
4519
  children: [
4010
4520
  leading,
4011
- title && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-[13px] font-medium", children: title }),
4012
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-1 items-center" }),
4013
- actions && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center gap-3", children: actions }),
4521
+ title && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "text-[13px] font-medium", children: title }),
4522
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-1 items-center" }),
4523
+ actions && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex items-center gap-3", children: actions }),
4014
4524
  children
4015
4525
  ]
4016
4526
  }
@@ -4019,8 +4529,8 @@ var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, a
4019
4529
  Topbar.displayName = "Topbar";
4020
4530
 
4021
4531
  // src/patterns/Tree/Tree.tsx
4022
- var import_react65 = require("react");
4023
- var import_jsx_runtime58 = require("react/jsx-runtime");
4532
+ var import_react67 = require("react");
4533
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4024
4534
  var EMPTY_SET2 = /* @__PURE__ */ new Set();
4025
4535
  function flattenVisible(items, expanded, level, parentId, out) {
4026
4536
  for (const item of items) {
@@ -4031,7 +4541,7 @@ function flattenVisible(items, expanded, level, parentId, out) {
4031
4541
  }
4032
4542
  }
4033
4543
  }
4034
- var Tree = (0, import_react65.forwardRef)(function Tree2({
4544
+ var Tree = (0, import_react67.forwardRef)(function Tree2({
4035
4545
  items,
4036
4546
  expanded: expandedProp,
4037
4547
  defaultExpanded,
@@ -4054,24 +4564,24 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4054
4564
  onChange: onValueChange
4055
4565
  });
4056
4566
  const expandedSet = expanded ?? EMPTY_SET2;
4057
- const flatVisible = (0, import_react65.useMemo)(() => {
4567
+ const flatVisible = (0, import_react67.useMemo)(() => {
4058
4568
  const out = [];
4059
4569
  flattenVisible(items, expandedSet, 1, null, out);
4060
4570
  return out;
4061
4571
  }, [items, expandedSet]);
4062
- const [activeId, setActiveId] = (0, import_react65.useState)(null);
4063
- (0, import_react65.useEffect)(() => {
4572
+ const [activeId, setActiveId] = (0, import_react67.useState)(null);
4573
+ (0, import_react67.useEffect)(() => {
4064
4574
  if (activeId && !flatVisible.some((f) => f.id === activeId)) {
4065
4575
  setActiveId(null);
4066
4576
  }
4067
4577
  }, [activeId, flatVisible]);
4068
- const tabStopId = (0, import_react65.useMemo)(() => {
4578
+ const tabStopId = (0, import_react67.useMemo)(() => {
4069
4579
  if (activeId && flatVisible.some((f) => f.id === activeId)) return activeId;
4070
4580
  if (value && flatVisible.some((f) => f.id === value)) return value;
4071
4581
  return flatVisible[0]?.id ?? null;
4072
4582
  }, [activeId, flatVisible, value]);
4073
- const listRef = (0, import_react65.useRef)(null);
4074
- const setRefs = (0, import_react65.useCallback)(
4583
+ const listRef = (0, import_react67.useRef)(null);
4584
+ const setRefs = (0, import_react67.useCallback)(
4075
4585
  (node) => {
4076
4586
  listRef.current = node;
4077
4587
  if (typeof ref === "function") ref(node);
@@ -4079,20 +4589,20 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4079
4589
  },
4080
4590
  [ref]
4081
4591
  );
4082
- const focusItem = (0, import_react65.useCallback)((id) => {
4592
+ const focusItem = (0, import_react67.useCallback)((id) => {
4083
4593
  const root = listRef.current;
4084
4594
  if (!root) return;
4085
4595
  const el = root.querySelector(`[data-treeitem-id="${CSS.escape(id)}"]`);
4086
4596
  el?.focus();
4087
4597
  }, []);
4088
- const moveActive = (0, import_react65.useCallback)(
4598
+ const moveActive = (0, import_react67.useCallback)(
4089
4599
  (id) => {
4090
4600
  setActiveId(id);
4091
4601
  queueMicrotask(() => focusItem(id));
4092
4602
  },
4093
4603
  [focusItem]
4094
4604
  );
4095
- const toggle = (0, import_react65.useCallback)(
4605
+ const toggle = (0, import_react67.useCallback)(
4096
4606
  (id) => {
4097
4607
  setExpanded((prev) => {
4098
4608
  const next = new Set(prev ?? EMPTY_SET2);
@@ -4103,7 +4613,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4103
4613
  },
4104
4614
  [setExpanded]
4105
4615
  );
4106
- const expand = (0, import_react65.useCallback)(
4616
+ const expand = (0, import_react67.useCallback)(
4107
4617
  (id) => {
4108
4618
  setExpanded((prev) => {
4109
4619
  const base = prev ?? EMPTY_SET2;
@@ -4115,7 +4625,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4115
4625
  },
4116
4626
  [setExpanded]
4117
4627
  );
4118
- const collapse = (0, import_react65.useCallback)(
4628
+ const collapse = (0, import_react67.useCallback)(
4119
4629
  (id) => {
4120
4630
  setExpanded((prev) => {
4121
4631
  const base = prev ?? EMPTY_SET2;
@@ -4127,13 +4637,13 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4127
4637
  },
4128
4638
  [setExpanded]
4129
4639
  );
4130
- const selectItem = (0, import_react65.useCallback)(
4640
+ const selectItem = (0, import_react67.useCallback)(
4131
4641
  (id) => {
4132
4642
  setValue(id);
4133
4643
  },
4134
4644
  [setValue]
4135
4645
  );
4136
- const handleKeyDown = (0, import_react65.useCallback)(
4646
+ const handleKeyDown = (0, import_react67.useCallback)(
4137
4647
  (e) => {
4138
4648
  onKeyDown?.(e);
4139
4649
  if (e.defaultPrevented) return;
@@ -4213,7 +4723,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4213
4723
  toggle
4214
4724
  ]
4215
4725
  );
4216
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4726
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4217
4727
  "ul",
4218
4728
  {
4219
4729
  ref: setRefs,
@@ -4221,7 +4731,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4221
4731
  className: cn("flex flex-col gap-px text-[12px]", className),
4222
4732
  onKeyDown: handleKeyDown,
4223
4733
  ...props,
4224
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4734
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4225
4735
  TreeItemRow,
4226
4736
  {
4227
4737
  item,
@@ -4256,8 +4766,8 @@ function TreeItemRow({
4256
4766
  const isExpanded = hasChildren && expanded.has(item.id);
4257
4767
  const isSelected = selected === item.id;
4258
4768
  const isTabStop = tabStopId === item.id;
4259
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { role: "none", children: [
4260
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4769
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("li", { role: "none", children: [
4770
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
4261
4771
  "div",
4262
4772
  {
4263
4773
  role: "treeitem",
@@ -4280,14 +4790,14 @@ function TreeItemRow({
4280
4790
  isSelected ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2"
4281
4791
  ),
4282
4792
  children: [
4283
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: "text-text-dim grid w-3 place-items-center text-[10px]", children: hasChildren ? isExpanded ? "\u25BE" : "\u25B8" : "" }),
4284
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: "text-[12px] opacity-80", children: item.icon }),
4285
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "flex-1 truncate", children: item.label }),
4793
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "aria-hidden": true, className: "text-text-dim grid w-3 place-items-center text-[10px]", children: hasChildren ? isExpanded ? "\u25BE" : "\u25B8" : "" }),
4794
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "aria-hidden": true, className: "text-[12px] opacity-80", children: item.icon }),
4795
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "flex-1 truncate", children: item.label }),
4286
4796
  item.trailing
4287
4797
  ]
4288
4798
  }
4289
4799
  ),
4290
- hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { role: "group", className: "flex flex-col gap-px", children: (item.children ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4800
+ hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ul", { role: "group", className: "flex flex-col gap-px", children: (item.children ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4291
4801
  TreeItemRow,
4292
4802
  {
4293
4803
  item: child,
@@ -4352,6 +4862,7 @@ function TreeItemRow({
4352
4862
  DropdownMenuRadioGroup,
4353
4863
  DropdownMenuRoot,
4354
4864
  DropdownMenuTrigger,
4865
+ Dropzone,
4355
4866
  EmptyState,
4356
4867
  FAB,
4357
4868
  Field,
@@ -4373,6 +4884,7 @@ function TreeItemRow({
4373
4884
  MenubarMenu,
4374
4885
  MenubarSeparator,
4375
4886
  MenubarTrigger,
4887
+ NavBar,
4376
4888
  NavItem,
4377
4889
  NavSection,
4378
4890
  OTP,