@slipstream-ui/core 0.4.0 → 0.5.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.
Files changed (92) hide show
  1. package/dist/index.d.mts +296 -15
  2. package/dist/index.d.ts +296 -15
  3. package/dist/index.js +1047 -473
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1096 -530
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/app-shell.manifest.json +50 -0
  8. package/dist/manifests/badge.manifest.json +9 -4
  9. package/dist/manifests/breadcrumb.manifest.json +6 -0
  10. package/dist/manifests/button.manifest.json +14 -0
  11. package/dist/manifests/confirm-dialog.manifest.json +132 -0
  12. package/dist/manifests/data-table.manifest.json +50 -0
  13. package/dist/manifests/dialog.manifest.json +7 -0
  14. package/dist/manifests/drawer.manifest.json +7 -0
  15. package/dist/manifests/link.manifest.json +106 -0
  16. package/dist/manifests/page-header.manifest.json +30 -0
  17. package/dist/manifests/pagination.manifest.json +6 -0
  18. package/dist/manifests/prose.manifest.json +75 -0
  19. package/dist/manifests/search.manifest.json +41 -9
  20. package/dist/manifests/section-heading.manifest.json +108 -0
  21. package/dist/manifests/select.manifest.json +6 -0
  22. package/dist/manifests/site-footer.manifest.json +94 -0
  23. package/dist/manifests/site-header.manifest.json +130 -0
  24. package/dist/manifests/table-of-contents.manifest.json +87 -0
  25. package/package.json +2 -2
  26. package/src/components/alert/Alert.tsx +2 -2
  27. package/src/components/app-shell/AppShell.test.tsx +49 -1
  28. package/src/components/app-shell/AppShell.tsx +147 -43
  29. package/src/components/badge/Badge.test.tsx +21 -0
  30. package/src/components/badge/Badge.tsx +6 -0
  31. package/src/components/breadcrumb/Breadcrumb.test.tsx +16 -0
  32. package/src/components/breadcrumb/Breadcrumb.tsx +10 -5
  33. package/src/components/button/Button.test.tsx +40 -2
  34. package/src/components/button/Button.tsx +31 -7
  35. package/src/components/confirm-dialog/ConfirmDialog.test.tsx +46 -0
  36. package/src/components/confirm-dialog/ConfirmDialog.tsx +86 -0
  37. package/src/components/confirm-dialog/index.ts +1 -0
  38. package/src/components/data-table/DataTable.test.tsx +92 -0
  39. package/src/components/data-table/DataTable.tsx +98 -7
  40. package/src/components/dialog/Dialog.test.tsx +7 -0
  41. package/src/components/dialog/Dialog.tsx +4 -1
  42. package/src/components/drawer/Drawer.test.tsx +11 -2
  43. package/src/components/drawer/Drawer.tsx +5 -2
  44. package/src/components/input/Input.tsx +1 -0
  45. package/src/components/link/Link.test.tsx +60 -0
  46. package/src/components/link/Link.tsx +85 -0
  47. package/src/components/link/index.ts +1 -0
  48. package/src/components/page-header/PageHeader.test.tsx +17 -0
  49. package/src/components/page-header/PageHeader.tsx +22 -6
  50. package/src/components/pagination/Pagination.test.tsx +8 -0
  51. package/src/components/pagination/Pagination.tsx +16 -6
  52. package/src/components/prose/Prose.test.tsx +35 -0
  53. package/src/components/prose/Prose.tsx +61 -0
  54. package/src/components/prose/index.ts +1 -0
  55. package/src/components/search/Search.test.tsx +16 -0
  56. package/src/components/search/Search.tsx +11 -2
  57. package/src/components/section-heading/SectionHeading.test.tsx +32 -0
  58. package/src/components/section-heading/SectionHeading.tsx +54 -0
  59. package/src/components/section-heading/index.ts +1 -0
  60. package/src/components/select/Select.tsx +9 -7
  61. package/src/components/site-footer/SiteFooter.test.tsx +30 -0
  62. package/src/components/site-footer/SiteFooter.tsx +79 -0
  63. package/src/components/site-footer/index.ts +1 -0
  64. package/src/components/site-header/SiteHeader.test.tsx +53 -0
  65. package/src/components/site-header/SiteHeader.tsx +124 -0
  66. package/src/components/site-header/index.ts +1 -0
  67. package/src/components/switch/Switch.test.tsx +10 -0
  68. package/src/components/switch/Switch.tsx +8 -3
  69. package/src/components/table-of-contents/TableOfContents.test.tsx +31 -0
  70. package/src/components/table-of-contents/TableOfContents.tsx +100 -0
  71. package/src/components/table-of-contents/index.ts +1 -0
  72. package/src/components/textarea/Textarea.tsx +1 -0
  73. package/src/index.ts +7 -0
  74. package/src/manifests/app-shell.manifest.json +50 -0
  75. package/src/manifests/badge.manifest.json +9 -4
  76. package/src/manifests/breadcrumb.manifest.json +6 -0
  77. package/src/manifests/button.manifest.json +14 -0
  78. package/src/manifests/confirm-dialog.manifest.json +132 -0
  79. package/src/manifests/data-table.manifest.json +50 -0
  80. package/src/manifests/dialog.manifest.json +7 -0
  81. package/src/manifests/drawer.manifest.json +7 -0
  82. package/src/manifests/link.manifest.json +106 -0
  83. package/src/manifests/page-header.manifest.json +30 -0
  84. package/src/manifests/pagination.manifest.json +6 -0
  85. package/src/manifests/prose.manifest.json +75 -0
  86. package/src/manifests/search.manifest.json +41 -9
  87. package/src/manifests/section-heading.manifest.json +108 -0
  88. package/src/manifests/select.manifest.json +6 -0
  89. package/src/manifests/site-footer.manifest.json +94 -0
  90. package/src/manifests/site-header.manifest.json +130 -0
  91. package/src/manifests/table-of-contents.manifest.json +87 -0
  92. package/src/test/tailwind-v4.test.ts +103 -0
package/dist/index.mjs CHANGED
@@ -110,6 +110,7 @@ function Drawer({
110
110
  height,
111
111
  closeOnBackdrop = true,
112
112
  showClose = true,
113
+ closeLabel = "Close drawer",
113
114
  initialFocusRef,
114
115
  ariaLabel,
115
116
  animate = false
@@ -206,8 +207,8 @@ function Drawer({
206
207
  {
207
208
  type: "button",
208
209
  onClick: () => onOpenChange(false),
209
- "aria-label": "Close drawer",
210
- className: "-mr-1 rounded p-1 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
210
+ "aria-label": closeLabel,
211
+ className: "-me-1 rounded p-1 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
211
212
  children: "\u2715"
212
213
  }
213
214
  )
@@ -224,6 +225,14 @@ function Drawer({
224
225
 
225
226
  // src/components/app-shell/AppShell.tsx
226
227
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
228
+ function containsActive(item, activeHref) {
229
+ if (!activeHref) return false;
230
+ if (item.href === activeHref) return true;
231
+ return (item.children ?? []).some((child) => containsActive(child, activeHref));
232
+ }
233
+ var itemClass = "flex w-full items-center gap-2.5 rounded-md px-2.5 py-2 text-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
234
+ var activeClass = "bg-primary/10 font-medium text-primary";
235
+ var idleClass = "text-muted-foreground hover:bg-accent hover:text-accent-foreground";
227
236
  function Sidebar({
228
237
  sections,
229
238
  heading,
@@ -231,50 +240,131 @@ function Sidebar({
231
240
  activeHref,
232
241
  linkComponent,
233
242
  label = "Primary",
243
+ collapsible = false,
244
+ defaultCollapsed = false,
245
+ collapsed: collapsedProp,
246
+ onCollapsedChange,
247
+ defaultExpanded = [],
234
248
  className,
235
249
  ...props
236
250
  }) {
237
- const Link = linkComponent ?? "a";
238
- return /* @__PURE__ */ jsxs2("div", { className: cn("flex h-full min-h-0 flex-col gap-6 p-4", className), ...props, children: [
239
- heading && /* @__PURE__ */ jsx2("div", { className: "px-2", children: heading }),
240
- /* @__PURE__ */ jsx2("nav", { "aria-label": label, className: "flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto", children: sections.map((section, index) => /* @__PURE__ */ jsxs2("div", { children: [
241
- section.title && /* @__PURE__ */ jsx2("p", { className: "mb-1.5 px-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: section.title }),
242
- /* @__PURE__ */ jsx2("ul", { className: "space-y-0.5", children: section.items.map((item) => {
243
- const active = item.active ?? (activeHref !== void 0 && item.href === activeHref);
244
- return /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs2(
245
- Link,
251
+ const Link3 = linkComponent ?? "a";
252
+ const [internalCollapsed, setInternalCollapsed] = React3.useState(defaultCollapsed);
253
+ const collapsed = collapsedProp ?? internalCollapsed;
254
+ const [openGroups, setOpenGroups] = React3.useState(defaultExpanded);
255
+ const isOpen = (item) => collapsed ? false : openGroups.includes(item.href) || containsActive(item, activeHref);
256
+ const toggleGroup = (href) => {
257
+ setOpenGroups(
258
+ (current) => current.includes(href) ? current.filter((entry) => entry !== href) : [...current, href]
259
+ );
260
+ };
261
+ const toggleCollapsed = () => {
262
+ const next = !collapsed;
263
+ if (collapsedProp === void 0) setInternalCollapsed(next);
264
+ onCollapsedChange?.(next);
265
+ };
266
+ const renderItems = (items, depth = 0) => /* @__PURE__ */ jsx2("ul", { className: cn("space-y-0.5", depth > 0 && "ml-3.5 border-l border-border pl-2.5"), children: items.map((item) => {
267
+ const active = item.active ?? containsActive(item, activeHref);
268
+ const hasChildren = Boolean(item.children?.length);
269
+ const expanded = hasChildren && isOpen(item);
270
+ const panelId = `sidebar-group-${item.href.replace(/[^a-z0-9-]/gi, "-")}`;
271
+ if (hasChildren) {
272
+ return /* @__PURE__ */ jsxs2("li", { children: [
273
+ /* @__PURE__ */ jsxs2(
274
+ "button",
246
275
  {
247
- href: item.href,
248
- "aria-current": active ? "page" : void 0,
249
- className: cn(
250
- "flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm transition-colors",
251
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
252
- active ? "bg-primary/10 font-medium text-primary" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
253
- ),
276
+ type: "button",
277
+ "aria-expanded": expanded,
278
+ "aria-controls": expanded ? panelId : void 0,
279
+ onClick: () => toggleGroup(item.href),
280
+ title: collapsed ? item.label : void 0,
281
+ className: cn(itemClass, active ? activeClass : idleClass, collapsed && "justify-center px-0"),
254
282
  children: [
255
283
  item.icon && /* @__PURE__ */ jsx2("span", { className: "shrink-0 [&_svg]:size-4", children: item.icon }),
256
- /* @__PURE__ */ jsx2("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
257
- item.badge && /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-xs", children: item.badge })
284
+ /* @__PURE__ */ jsx2("span", { className: cn("min-w-0 flex-1 truncate text-left", collapsed && "sr-only"), children: item.label }),
285
+ !collapsed && /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: cn("shrink-0 text-xs transition-transform", expanded && "rotate-90"), children: "\u203A" })
258
286
  ]
259
287
  }
260
- ) }, item.href);
261
- }) })
262
- ] }, section.title ?? `section-${index}`)) }),
263
- footer && /* @__PURE__ */ jsx2("div", { className: "border-t border-border pt-4", children: footer })
264
- ] });
288
+ ),
289
+ expanded && /* @__PURE__ */ jsx2("div", { id: panelId, children: renderItems(item.children, depth + 1) })
290
+ ] }, item.href);
291
+ }
292
+ return /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs2(
293
+ Link3,
294
+ {
295
+ href: item.href,
296
+ "aria-current": active ? "page" : void 0,
297
+ title: collapsed ? item.label : void 0,
298
+ className: cn(itemClass, active ? activeClass : idleClass, collapsed && "justify-center px-0"),
299
+ children: [
300
+ item.icon && /* @__PURE__ */ jsx2("span", { className: "shrink-0 [&_svg]:size-4", children: item.icon }),
301
+ /* @__PURE__ */ jsx2("span", { className: cn("min-w-0 flex-1 truncate", collapsed && "sr-only"), children: item.label }),
302
+ !collapsed && item.badge && /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-xs", children: item.badge })
303
+ ]
304
+ }
305
+ ) }, item.href);
306
+ }) });
307
+ return /* @__PURE__ */ jsxs2(
308
+ "div",
309
+ {
310
+ "data-collapsed": collapsed || void 0,
311
+ className: cn("flex h-full min-h-0 flex-col gap-5 p-3", className),
312
+ ...props,
313
+ children: [
314
+ heading && /* @__PURE__ */ jsx2("div", { className: cn("px-1", collapsed && "sr-only"), children: heading }),
315
+ /* @__PURE__ */ jsx2("nav", { "aria-label": label, className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", children: sections.map((section, index) => /* @__PURE__ */ jsxs2("div", { children: [
316
+ section.title && /* @__PURE__ */ jsx2("p", { className: cn("mb-1.5 px-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", collapsed && "sr-only"), children: section.title }),
317
+ renderItems(section.items)
318
+ ] }, section.title ?? `section-${index}`)) }),
319
+ collapsible && /* @__PURE__ */ jsx2(
320
+ "button",
321
+ {
322
+ type: "button",
323
+ onClick: toggleCollapsed,
324
+ "aria-expanded": !collapsed,
325
+ "aria-label": collapsed ? "Expand navigation" : "Collapse navigation",
326
+ className: cn(itemClass, idleClass, "justify-center"),
327
+ children: /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: cn("transition-transform", collapsed && "rotate-180"), children: "\xAB" })
328
+ }
329
+ ),
330
+ footer && !collapsed && /* @__PURE__ */ jsx2("div", { className: "border-t border-border pt-3", children: footer })
331
+ ]
332
+ }
333
+ );
265
334
  }
335
+ var hideAt = {
336
+ sm: "hidden sm:block",
337
+ md: "hidden md:block",
338
+ lg: "hidden lg:block"
339
+ };
340
+ var showBelow = {
341
+ sm: "sm:hidden",
342
+ md: "md:hidden",
343
+ lg: "lg:hidden"
344
+ };
266
345
  function AppShell({
267
346
  sidebar,
268
347
  header,
269
348
  hideMobileMenu = false,
270
349
  sidebarWidth = "w-64",
350
+ mobileBreakpoint = "md",
271
351
  className,
272
352
  children,
273
353
  ...props
274
354
  }) {
275
355
  const [mobileOpen, setMobileOpen] = React3.useState(false);
276
356
  return /* @__PURE__ */ jsxs2("div", { className: cn("flex min-h-screen bg-background text-foreground", className), ...props, children: [
277
- sidebar && /* @__PURE__ */ jsx2("aside", { className: cn("hidden shrink-0 border-r border-border md:block", sidebarWidth), children: sidebar }),
357
+ sidebar && /* @__PURE__ */ jsx2(
358
+ "aside",
359
+ {
360
+ className: cn(
361
+ "shrink-0 border-r border-border has-[[data-collapsed]]:w-16",
362
+ hideAt[mobileBreakpoint],
363
+ sidebarWidth
364
+ ),
365
+ children: sidebar
366
+ }
367
+ ),
278
368
  /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 flex-col", children: [
279
369
  (header || sidebar && !hideMobileMenu) && /* @__PURE__ */ jsxs2("header", { className: "sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-background/80 px-4 backdrop-blur supports-[backdrop-filter]:bg-background/60", children: [
280
370
  sidebar && !hideMobileMenu && /* @__PURE__ */ jsx2(
@@ -283,7 +373,7 @@ function AppShell({
283
373
  type: "button",
284
374
  onClick: () => setMobileOpen(true),
285
375
  "aria-label": "Open navigation",
286
- className: "rounded-md border border-border p-2 text-muted-foreground hover:bg-muted md:hidden",
376
+ className: cn("rounded-md border border-border p-2 text-muted-foreground hover:bg-muted", showBelow[mobileBreakpoint]),
287
377
  children: /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", children: "\u2630" })
288
378
  }
289
379
  ),
@@ -291,18 +381,7 @@ function AppShell({
291
381
  ] }),
292
382
  /* @__PURE__ */ jsx2("main", { className: "min-w-0 flex-1", children })
293
383
  ] }),
294
- sidebar && /* @__PURE__ */ jsx2(
295
- Drawer,
296
- {
297
- open: mobileOpen,
298
- onOpenChange: setMobileOpen,
299
- title: "Navigation",
300
- side: "left",
301
- size: "sm",
302
- animate: true,
303
- children: sidebar
304
- }
305
- )
384
+ sidebar && /* @__PURE__ */ jsx2(Drawer, { open: mobileOpen, onOpenChange: setMobileOpen, title: "Navigation", side: "left", size: "sm", animate: true, children: sidebar })
306
385
  ] });
307
386
  }
308
387
 
@@ -310,26 +389,28 @@ function AppShell({
310
389
  import * as React4 from "react";
311
390
  import { Slot } from "@radix-ui/react-slot";
312
391
  import { cva } from "class-variance-authority";
313
- import { jsx as jsx3 } from "react/jsx-runtime";
392
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
314
393
  var buttonVariants = cva(
315
394
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
316
395
  {
317
396
  variants: {
318
397
  variant: {
319
398
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
399
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
320
400
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
401
+ danger: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
321
402
  // Semantic status variants — foregrounds are the paired AA tokens
322
403
  // (white on dark green, ink on amber/cyan) in both themes.
323
404
  success: "bg-success text-success-foreground hover:bg-success/90",
324
405
  warning: "bg-warning text-warning-foreground hover:bg-warning/90",
325
406
  info: "bg-info text-info-foreground hover:bg-info/90",
326
407
  outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
327
- // Colored outlines: semantic border + label on the page surface, with
328
- // a faint tint on hover — mirrors the Alert variant recipe.
408
+ // Colored outlines: semantic border + AA ink label on the page
409
+ // surface, with a faint tint on hover - mirrors the Alert recipe.
329
410
  "outline-destructive": "border border-destructive/50 bg-background text-destructive hover:border-destructive hover:bg-destructive/10",
330
411
  "outline-success": "border border-success/50 bg-background text-success hover:border-success hover:bg-success/10",
331
- "outline-warning": "border border-warning/50 bg-background text-warning hover:border-warning hover:bg-warning/10",
332
- "outline-info": "border border-info/50 bg-background text-info hover:border-info hover:bg-info/10",
412
+ "outline-warning": "border border-warning/50 bg-background text-warning-ink hover:border-warning hover:bg-warning/10",
413
+ "outline-info": "border border-info/50 bg-background text-info-ink hover:border-info hover:bg-info/10",
333
414
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
334
415
  ghost: "hover:bg-accent hover:text-accent-foreground",
335
416
  link: "text-primary underline-offset-4 hover:underline"
@@ -348,14 +429,30 @@ var buttonVariants = cva(
348
429
  }
349
430
  );
350
431
  var Button = React4.forwardRef(
351
- ({ className, variant, size, asChild = false, ...props }, ref) => {
432
+ ({ className, variant, size, asChild = false, loading = false, loadingLabel = "Loading", disabled, children, ...props }, ref) => {
352
433
  const Comp = asChild ? Slot : "button";
353
- return /* @__PURE__ */ jsx3(
354
- Comp,
434
+ if (asChild) {
435
+ return /* @__PURE__ */ jsx3(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props, children });
436
+ }
437
+ return /* @__PURE__ */ jsxs3(
438
+ "button",
355
439
  {
356
440
  className: cn(buttonVariants({ variant, size, className })),
357
441
  ref,
358
- ...props
442
+ disabled: disabled || loading,
443
+ "aria-busy": loading || void 0,
444
+ ...props,
445
+ children: [
446
+ loading && /* @__PURE__ */ jsx3(
447
+ "span",
448
+ {
449
+ "aria-hidden": "true",
450
+ className: "h-4 w-4 shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent"
451
+ }
452
+ ),
453
+ loading && /* @__PURE__ */ jsx3("span", { className: "sr-only", children: loadingLabel }),
454
+ children
455
+ ]
359
456
  }
360
457
  );
361
458
  }
@@ -402,6 +499,7 @@ var Input = React6.forwardRef(
402
499
  "placeholder:text-muted-foreground",
403
500
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
404
501
  "disabled:cursor-not-allowed disabled:opacity-50",
502
+ "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20",
405
503
  className
406
504
  ),
407
505
  ref,
@@ -428,6 +526,7 @@ var Textarea = React7.forwardRef(
428
526
  "placeholder:text-muted-foreground",
429
527
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
430
528
  "disabled:cursor-not-allowed disabled:opacity-50",
529
+ "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20",
431
530
  className
432
531
  ),
433
532
  ...props
@@ -438,15 +537,15 @@ Textarea.displayName = "Textarea";
438
537
 
439
538
  // src/components/select/Select.tsx
440
539
  import * as React8 from "react";
441
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
442
- var Select = React8.forwardRef(function Select2({ options, groups, label, placeholder, multiple = false, value, defaultValue, onChange, id, className, ...props }, ref) {
540
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
541
+ var Select = React8.forwardRef(function Select2({ options, groups, label, placeholder, multiple = false, value, defaultValue, onChange, onValueChange, id, className, ...props }, ref) {
443
542
  const generatedId = React8.useId();
444
543
  const selectId = id ?? generatedId;
445
544
  const labelId = `${selectId}-label`;
446
545
  const renderOption = (option) => /* @__PURE__ */ jsx7("option", { value: option.value, disabled: option.disabled, children: option.label }, option.value);
447
- return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1.5", children: [
546
+ return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1.5", children: [
448
547
  label && /* @__PURE__ */ jsx7("label", { id: labelId, htmlFor: selectId, className: "text-sm font-medium", children: label }),
449
- /* @__PURE__ */ jsxs3(
548
+ /* @__PURE__ */ jsxs4(
450
549
  "select",
451
550
  {
452
551
  ref,
@@ -458,17 +557,15 @@ var Select = React8.forwardRef(function Select2({ options, groups, label, placeh
458
557
  multiple && "min-h-32",
459
558
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
460
559
  "disabled:cursor-not-allowed disabled:opacity-50",
560
+ "aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20",
461
561
  className
462
562
  ),
463
563
  value,
464
564
  defaultValue,
465
565
  onChange: (event) => {
466
- if (!onChange) return;
467
- if (multiple) {
468
- onChange(Array.from(event.target.selectedOptions, (option) => option.value));
469
- return;
470
- }
471
- onChange(event.target.value);
566
+ const next = multiple ? Array.from(event.target.selectedOptions, (option) => option.value) : event.target.value;
567
+ onChange?.(next);
568
+ onValueChange?.(next);
472
569
  },
473
570
  ...props,
474
571
  children: [
@@ -562,6 +659,12 @@ var badgeVariants = cva2(
562
659
  variants: {
563
660
  variant: {
564
661
  default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
662
+ // Aliases used by shadcn/Bootstrap-style codebases.
663
+ primary: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
664
+ danger: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
665
+ success: "border-transparent bg-success text-success-foreground hover:bg-success/80",
666
+ warning: "border-transparent bg-warning text-warning-foreground hover:bg-warning/80",
667
+ info: "border-transparent bg-info text-info-foreground hover:bg-info/80",
565
668
  secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
566
669
  destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
567
670
  outline: "text-foreground"
@@ -650,7 +753,7 @@ function Spinner({ className, size, label = "Loading...", ...props }) {
650
753
 
651
754
  // src/components/toast/Toast.tsx
652
755
  import * as React12 from "react";
653
- import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
756
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
654
757
  var ToastContext = React12.createContext(null);
655
758
  var DEFAULT_DURATION = 5e3;
656
759
  function ToastProvider({ children, label = "Notifications" }) {
@@ -687,7 +790,7 @@ function ToastProvider({ children, label = "Notifications" }) {
687
790
  };
688
791
  }, []);
689
792
  const value = React12.useMemo(() => ({ toasts: toasts2, toast: toast2, dismiss: dismiss2 }), [toasts2, toast2, dismiss2]);
690
- return /* @__PURE__ */ jsxs4(ToastContext.Provider, { value, children: [
793
+ return /* @__PURE__ */ jsxs5(ToastContext.Provider, { value, children: [
691
794
  children,
692
795
  /* @__PURE__ */ jsx12(ToastRegion, { toasts: toasts2, onDismiss: dismiss2, label })
693
796
  ] });
@@ -707,9 +810,9 @@ function ToastRegion({
707
810
  {
708
811
  "aria-label": label,
709
812
  className: "fixed bottom-4 right-4 z-50 flex w-full max-w-sm flex-col gap-2",
710
- children: toasts2.map((entry) => /* @__PURE__ */ jsxs4("li", { className: "rounded-lg border border-border bg-card p-4 shadow-lg", children: [
711
- /* @__PURE__ */ jsxs4("div", { role: "status", className: "flex items-start justify-between gap-3", children: [
712
- /* @__PURE__ */ jsxs4("div", { children: [
813
+ children: toasts2.map((entry) => /* @__PURE__ */ jsxs5("li", { className: "rounded-lg border border-border bg-card p-4 shadow-lg", children: [
814
+ /* @__PURE__ */ jsxs5("div", { role: "status", className: "flex items-start justify-between gap-3", children: [
815
+ /* @__PURE__ */ jsxs5("div", { children: [
713
816
  /* @__PURE__ */ jsx12("p", { className: "text-sm font-semibold", children: entry.title }),
714
817
  entry.description && /* @__PURE__ */ jsx12("p", { className: "mt-1 text-sm text-muted-foreground", children: entry.description })
715
818
  ] }),
@@ -806,7 +909,7 @@ function getToastServerSnapshot() {
806
909
  }
807
910
 
808
911
  // src/components/toast/Toaster.tsx
809
- import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
912
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
810
913
  var positionClasses = {
811
914
  "top-left": "left-4 top-4 items-start",
812
915
  "top-center": "left-1/2 top-4 -translate-x-1/2 items-center",
@@ -845,9 +948,9 @@ function Toaster({ position = "bottom-right", label = "Notifications", richColor
845
948
  "rounded-lg border p-4 shadow-lg",
846
949
  richColors ? richClasses[variant] : "border-border bg-card"
847
950
  ),
848
- children: /* @__PURE__ */ jsxs5("div", { role: "status", className: "flex items-start gap-3", children: [
951
+ children: /* @__PURE__ */ jsxs6("div", { role: "status", className: "flex items-start gap-3", children: [
849
952
  /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", className: cn("mt-1 h-2 w-2 shrink-0 rounded-full", dotClasses[variant]) }),
850
- /* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
953
+ /* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1", children: [
851
954
  /* @__PURE__ */ jsx13("p", { className: "text-sm font-semibold", children: entry.title }),
852
955
  entry.description && /* @__PURE__ */ jsx13("p", { className: "mt-1 text-sm text-muted-foreground", children: entry.description }),
853
956
  entry.action && /* @__PURE__ */ jsx13(
@@ -885,7 +988,7 @@ function Toaster({ position = "bottom-right", label = "Notifications", richColor
885
988
  // src/components/dialog/Dialog.tsx
886
989
  import * as React14 from "react";
887
990
  import { createPortal as createPortal2 } from "react-dom";
888
- import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
991
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
889
992
  var FOCUSABLE2 = 'a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
890
993
  var sizeClasses2 = {
891
994
  sm: "max-w-sm",
@@ -925,6 +1028,7 @@ function Dialog({
925
1028
  bodyClassName,
926
1029
  closeOnBackdrop = true,
927
1030
  showClose = true,
1031
+ closeLabel = "Close dialog",
928
1032
  initialFocusRef,
929
1033
  ariaLabel,
930
1034
  animate = false
@@ -1003,9 +1107,9 @@ function Dialog({
1003
1107
  sizeClasses2[size],
1004
1108
  motion
1005
1109
  ),
1006
- children: /* @__PURE__ */ jsxs6(DialogIdsContext.Provider, { value: { titleId, descriptionId }, children: [
1007
- header ?? /* @__PURE__ */ jsxs6(DialogHeader, { children: [
1008
- /* @__PURE__ */ jsxs6("div", { className: "min-w-0", children: [
1110
+ children: /* @__PURE__ */ jsxs7(DialogIdsContext.Provider, { value: { titleId, descriptionId }, children: [
1111
+ header ?? /* @__PURE__ */ jsxs7(DialogHeader, { children: [
1112
+ /* @__PURE__ */ jsxs7("div", { className: "min-w-0", children: [
1009
1113
  title && /* @__PURE__ */ jsx14(DialogTitle, { children: title }),
1010
1114
  description && /* @__PURE__ */ jsx14(DialogDescription, { children: description })
1011
1115
  ] }),
@@ -1014,7 +1118,7 @@ function Dialog({
1014
1118
  {
1015
1119
  type: "button",
1016
1120
  onClick: () => onOpenChange(false),
1017
- "aria-label": "Close dialog",
1121
+ "aria-label": closeLabel,
1018
1122
  className: "rounded p-1 text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1019
1123
  children: "\u2715"
1020
1124
  }
@@ -1043,17 +1147,17 @@ function Dialog({
1043
1147
 
1044
1148
  // src/components/table-card/TableCard.tsx
1045
1149
  import * as React15 from "react";
1046
- import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1150
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1047
1151
  var TableCard = React15.forwardRef(function TableCard2({ title, description, actions, toolbar, children, footer, flush = true, className, ...props }, ref) {
1048
- return /* @__PURE__ */ jsxs7(
1152
+ return /* @__PURE__ */ jsxs8(
1049
1153
  "div",
1050
1154
  {
1051
1155
  ref,
1052
1156
  className: cn("overflow-hidden rounded-xl border border-border bg-card text-card-foreground", className),
1053
1157
  ...props,
1054
1158
  children: [
1055
- (title || description || actions) && /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
1056
- /* @__PURE__ */ jsxs7("div", { className: "min-w-0", children: [
1159
+ (title || description || actions) && /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-start justify-between gap-3 border-b border-border px-4 py-3", children: [
1160
+ /* @__PURE__ */ jsxs8("div", { className: "min-w-0", children: [
1057
1161
  title && /* @__PURE__ */ jsx15("h2", { className: "text-sm font-semibold", children: title }),
1058
1162
  description && /* @__PURE__ */ jsx15("p", { className: "mt-0.5 text-sm text-muted-foreground", children: description })
1059
1163
  ] }),
@@ -1070,7 +1174,7 @@ var TableCard = React15.forwardRef(function TableCard2({ title, description, act
1070
1174
  // src/components/select-menu/SelectMenu.tsx
1071
1175
  import * as React16 from "react";
1072
1176
  import { createPortal as createPortal3 } from "react-dom";
1073
- import { Fragment, jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
1177
+ import { Fragment, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1074
1178
  function useOutsideClose(open, close, refs) {
1075
1179
  React16.useEffect(() => {
1076
1180
  if (!open) return;
@@ -1245,10 +1349,10 @@ var SelectMenu = React16.forwardRef(function SelectMenu2({
1245
1349
  });
1246
1350
  return out;
1247
1351
  }, [items]);
1248
- return /* @__PURE__ */ jsxs8(Fragment, { children: [
1352
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
1249
1353
  /* @__PURE__ */ jsx16("span", { id: labelId, className: "sr-only", children: typeof buttonProps["aria-label"] === "string" ? buttonProps["aria-label"] : "Select" }),
1250
1354
  name && selectedValues.map((selected) => /* @__PURE__ */ jsx16("input", { type: "hidden", name, value: selected }, selected)),
1251
- /* @__PURE__ */ jsxs8(
1355
+ /* @__PURE__ */ jsxs9(
1252
1356
  "button",
1253
1357
  {
1254
1358
  ref: setTriggerRef,
@@ -1318,9 +1422,9 @@ var SelectMenu = React16.forwardRef(function SelectMenu2({
1318
1422
  children: renderItem ? renderItem(row.item, {
1319
1423
  selected: selectedValues.includes(row.item.value),
1320
1424
  active: row.index === activeIndex
1321
- }) : /* @__PURE__ */ jsxs8(Fragment, { children: [
1425
+ }) : /* @__PURE__ */ jsxs9(Fragment, { children: [
1322
1426
  row.item.icon && /* @__PURE__ */ jsx16("span", { className: "mt-0.5 shrink-0 [&_svg]:size-4", children: row.item.icon }),
1323
- /* @__PURE__ */ jsxs8("span", { className: "min-w-0 flex-1", children: [
1427
+ /* @__PURE__ */ jsxs9("span", { className: "min-w-0 flex-1", children: [
1324
1428
  /* @__PURE__ */ jsx16("span", { className: "block", children: row.item.label }),
1325
1429
  row.item.description && /* @__PURE__ */ jsx16("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: row.item.description })
1326
1430
  ] }),
@@ -1462,9 +1566,10 @@ function useCombobox({
1462
1566
  }
1463
1567
 
1464
1568
  // src/components/search/Search.tsx
1465
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
1569
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1466
1570
  function Search({
1467
1571
  options,
1572
+ value,
1468
1573
  defaultValue,
1469
1574
  onValueChange,
1470
1575
  placeholder = "Search\u2026",
@@ -1475,11 +1580,15 @@ function Search({
1475
1580
  className,
1476
1581
  "aria-label": ariaLabel
1477
1582
  }) {
1583
+ const activeValue = value === void 0 ? defaultValue : value ?? void 0;
1478
1584
  const selected = React18.useMemo(
1479
- () => options.find((option) => option.value === defaultValue),
1480
- [options, defaultValue]
1585
+ () => options.find((option) => option.value === activeValue),
1586
+ [options, activeValue]
1481
1587
  );
1482
1588
  const [query, setQuery] = React18.useState(selected?.label ?? "");
1589
+ React18.useEffect(() => {
1590
+ if (value !== void 0) setQuery(selected?.label ?? "");
1591
+ }, [value, selected]);
1483
1592
  const filtered = React18.useMemo(() => {
1484
1593
  if (!query.trim()) return options;
1485
1594
  const q = query.trim().toLowerCase();
@@ -1499,7 +1608,7 @@ function Search({
1499
1608
  onValueChange?.(item.value);
1500
1609
  combobox.setOpen(false);
1501
1610
  };
1502
- return /* @__PURE__ */ jsxs9("div", { ref: combobox.anchorRef, className: cn("relative w-full", className), children: [
1611
+ return /* @__PURE__ */ jsxs10("div", { ref: combobox.anchorRef, className: cn("relative w-full", className), children: [
1503
1612
  /* @__PURE__ */ jsx17(
1504
1613
  Input,
1505
1614
  {
@@ -1538,7 +1647,7 @@ function Search({
1538
1647
  zIndex: 50
1539
1648
  },
1540
1649
  className: "max-h-64 overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",
1541
- children: filtered.length === 0 ? /* @__PURE__ */ jsx17("li", { role: "presentation", className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filtered.map((option, index) => /* @__PURE__ */ jsxs9(
1650
+ children: filtered.length === 0 ? /* @__PURE__ */ jsx17("li", { role: "presentation", className: "px-3 py-2 text-sm text-muted-foreground", children: emptyText }) : filtered.map((option, index) => /* @__PURE__ */ jsxs10(
1542
1651
  "li",
1543
1652
  {
1544
1653
  id: combobox.optionId(index),
@@ -1568,7 +1677,7 @@ function Search({
1568
1677
  // src/components/autocomplete/Autocomplete.tsx
1569
1678
  import * as React19 from "react";
1570
1679
  import { createPortal as createPortal5 } from "react-dom";
1571
- import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1680
+ import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
1572
1681
  function normalize(entry) {
1573
1682
  if (typeof entry === "string") return { value: entry, label: entry };
1574
1683
  return { value: entry.value, label: entry.label ?? entry.value, group: entry.group, description: entry.description };
@@ -1647,7 +1756,7 @@ function Autocomplete({
1647
1756
  });
1648
1757
  return out;
1649
1758
  }, [items]);
1650
- return /* @__PURE__ */ jsxs10("div", { ref: combobox.anchorRef, className: cn("relative w-full", className), children: [
1759
+ return /* @__PURE__ */ jsxs11("div", { ref: combobox.anchorRef, className: cn("relative w-full", className), children: [
1651
1760
  /* @__PURE__ */ jsx18(
1652
1761
  Input,
1653
1762
  {
@@ -1726,7 +1835,7 @@ function Autocomplete({
1726
1835
  "cursor-pointer rounded-sm px-3 py-1.5 text-sm outline-none",
1727
1836
  combobox.activeIndex === entry.index ? "bg-accent text-accent-foreground" : "hover:bg-accent/60"
1728
1837
  ),
1729
- children: renderOption ? renderOption(entry.option, { active: combobox.activeIndex === entry.index }) : /* @__PURE__ */ jsxs10(Fragment2, { children: [
1838
+ children: renderOption ? renderOption(entry.option, { active: combobox.activeIndex === entry.index }) : /* @__PURE__ */ jsxs11(Fragment2, { children: [
1730
1839
  /* @__PURE__ */ jsx18("span", { className: "block", children: entry.option.label }),
1731
1840
  entry.option.description && /* @__PURE__ */ jsx18("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: entry.option.description })
1732
1841
  ] })
@@ -1767,7 +1876,7 @@ Checkbox.displayName = "Checkbox";
1767
1876
 
1768
1877
  // src/components/checkbox/CheckboxGroup.tsx
1769
1878
  import * as React21 from "react";
1770
- import { jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
1879
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
1771
1880
  var CheckboxGroupContext = React21.createContext({
1772
1881
  name: "",
1773
1882
  values: [],
@@ -1783,7 +1892,7 @@ var CheckboxGroup = React21.forwardRef(
1783
1892
  if (value === void 0) setInternalValue(updated);
1784
1893
  onValueChange?.(updated);
1785
1894
  };
1786
- return /* @__PURE__ */ jsxs11("fieldset", { ref, className: cn(orientation === "vertical" ? "space-y-2" : "flex flex-row flex-wrap gap-x-4 gap-y-2", className), children: [
1895
+ return /* @__PURE__ */ jsxs12("fieldset", { ref, className: cn(orientation === "vertical" ? "space-y-2" : "flex flex-row flex-wrap gap-x-4 gap-y-2", className), children: [
1787
1896
  legend && /* @__PURE__ */ jsx20("legend", { className: "text-sm font-medium", children: legend }),
1788
1897
  /* @__PURE__ */ jsx20(CheckboxGroupContext.Provider, { value: { name, values: currentValue, toggle }, children }),
1789
1898
  error && /* @__PURE__ */ jsx20("p", { role: "alert", className: "text-xs text-destructive", children: error })
@@ -1796,7 +1905,7 @@ var CheckboxGroupItem = React21.forwardRef(
1796
1905
  const group = React21.useContext(CheckboxGroupContext);
1797
1906
  const generatedId = React21.useId();
1798
1907
  const inputId = id ?? generatedId;
1799
- return /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
1908
+ return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
1800
1909
  /* @__PURE__ */ jsx20(
1801
1910
  Checkbox,
1802
1911
  {
@@ -1825,7 +1934,7 @@ CheckboxGroupItem.displayName = "CheckboxGroupItem";
1825
1934
 
1826
1935
  // src/components/radio/Radio.tsx
1827
1936
  import * as React22 from "react";
1828
- import { jsx as jsx21, jsxs as jsxs12 } from "react/jsx-runtime";
1937
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
1829
1938
  var Radio = React22.forwardRef(
1830
1939
  ({ className, checked, onCheckedChange, ...props }, ref) => /* @__PURE__ */ jsx21(
1831
1940
  "input",
@@ -1854,7 +1963,7 @@ var RadioGroup = React22.forwardRef(
1854
1963
  if (value === void 0) setInternalValue(next);
1855
1964
  onValueChange?.(next);
1856
1965
  };
1857
- return /* @__PURE__ */ jsxs12(
1966
+ return /* @__PURE__ */ jsxs13(
1858
1967
  "fieldset",
1859
1968
  {
1860
1969
  ref,
@@ -1883,7 +1992,7 @@ var RadioGroupItem = React22.forwardRef(
1883
1992
  const group = React22.useContext(RadioGroupContext);
1884
1993
  const generatedId = React22.useId();
1885
1994
  const inputId = id ?? generatedId;
1886
- return /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
1995
+ return /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
1887
1996
  /* @__PURE__ */ jsx21(
1888
1997
  Radio,
1889
1998
  {
@@ -1905,13 +2014,13 @@ RadioGroupItem.displayName = "RadioGroupItem";
1905
2014
 
1906
2015
  // src/components/radio/RadioCard.tsx
1907
2016
  import * as React23 from "react";
1908
- import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
2017
+ import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
1909
2018
  var RadioCard = React23.forwardRef(
1910
2019
  ({ value, title, description, children, rounded = true, disabled, className, id }, ref) => {
1911
2020
  const group = React23.useContext(RadioGroupContext);
1912
2021
  const generatedId = React23.useId();
1913
2022
  const inputId = id ?? generatedId;
1914
- return /* @__PURE__ */ jsxs13(
2023
+ return /* @__PURE__ */ jsxs14(
1915
2024
  "label",
1916
2025
  {
1917
2026
  ref,
@@ -1968,9 +2077,9 @@ Label.displayName = "Label";
1968
2077
 
1969
2078
  // src/components/fieldset/Fieldset.tsx
1970
2079
  import * as React25 from "react";
1971
- import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
2080
+ import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
1972
2081
  var Fieldset = React25.forwardRef(
1973
- ({ legend, description, error, className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
2082
+ ({ legend, description, error, className, children, ...props }, ref) => /* @__PURE__ */ jsxs15(
1974
2083
  "fieldset",
1975
2084
  {
1976
2085
  ref,
@@ -1993,7 +2102,7 @@ import * as React27 from "react";
1993
2102
  // src/components/tooltip/Tooltip.tsx
1994
2103
  import * as React26 from "react";
1995
2104
  import { createPortal as createPortal6 } from "react-dom";
1996
- import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2105
+ import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
1997
2106
  var GAP = 8;
1998
2107
  var Tooltip = React26.forwardRef(
1999
2108
  ({ content, side = "top", delay = 300, className, children }, ref) => {
@@ -2034,7 +2143,7 @@ var Tooltip = React26.forwardRef(
2034
2143
  const trigger = React26.cloneElement(children, {
2035
2144
  "aria-describedby": open ? id : void 0
2036
2145
  });
2037
- return /* @__PURE__ */ jsxs15(
2146
+ return /* @__PURE__ */ jsxs16(
2038
2147
  "div",
2039
2148
  {
2040
2149
  ref: (node) => {
@@ -2076,7 +2185,7 @@ var Tooltip = React26.forwardRef(
2076
2185
  Tooltip.displayName = "Tooltip";
2077
2186
 
2078
2187
  // src/components/form-field/FormField.tsx
2079
- import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2188
+ import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
2080
2189
  var FormField = ({
2081
2190
  id,
2082
2191
  label,
@@ -2101,9 +2210,9 @@ var FormField = ({
2101
2210
  ...error ? { "aria-invalid": true } : {}
2102
2211
  });
2103
2212
  }
2104
- const labelNode = /* @__PURE__ */ jsxs16(Label, { htmlFor: id, className: labelHidden ? "sr-only" : void 0, children: [
2213
+ const labelNode = /* @__PURE__ */ jsxs17(Label, { htmlFor: id, className: labelHidden ? "sr-only" : void 0, children: [
2105
2214
  label,
2106
- required && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2215
+ required && /* @__PURE__ */ jsxs17(Fragment4, { children: [
2107
2216
  " ",
2108
2217
  /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "ml-0.5 text-destructive", children: "*" })
2109
2218
  ] })
@@ -2119,13 +2228,13 @@ var FormField = ({
2119
2228
  ) }) : null;
2120
2229
  const hintOrError = error ? /* @__PURE__ */ jsx26("p", { id: errorId, role: "alert", className: "text-xs text-destructive", children: error }) : hint ? /* @__PURE__ */ jsx26("p", { id: hintId, className: "text-xs text-muted-foreground", children: hint }) : null;
2121
2230
  if (labelPlacement === "left") {
2122
- return /* @__PURE__ */ jsx26("div", { className: cn("flex min-w-0 flex-col gap-1.5", className), children: /* @__PURE__ */ jsxs16("div", { className: "flex items-start gap-3", children: [
2123
- /* @__PURE__ */ jsxs16("div", { className: "flex w-40 shrink-0 items-center gap-1 pt-2", children: [
2231
+ return /* @__PURE__ */ jsx26("div", { className: cn("flex min-w-0 flex-col gap-1.5", className), children: /* @__PURE__ */ jsxs17("div", { className: "flex items-start gap-3", children: [
2232
+ /* @__PURE__ */ jsxs17("div", { className: "flex w-40 shrink-0 items-center gap-1 pt-2", children: [
2124
2233
  labelNode,
2125
2234
  tooltipNode
2126
2235
  ] }),
2127
- /* @__PURE__ */ jsxs16("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
2128
- /* @__PURE__ */ jsxs16("div", { className: "flex min-w-0 items-center gap-2", children: [
2236
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
2237
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 items-center gap-2", children: [
2129
2238
  /* @__PURE__ */ jsx26("div", { className: "min-w-0 flex-1", children: control }),
2130
2239
  trailing && /* @__PURE__ */ jsx26("span", { className: "shrink-0 text-xs text-muted-foreground", children: trailing })
2131
2240
  ] }),
@@ -2133,9 +2242,9 @@ var FormField = ({
2133
2242
  ] })
2134
2243
  ] }) });
2135
2244
  }
2136
- return /* @__PURE__ */ jsxs16("div", { className: cn("flex min-w-0 flex-col gap-1.5", className), children: [
2137
- /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between gap-2", children: [
2138
- /* @__PURE__ */ jsxs16("span", { className: "flex min-w-0 items-center", children: [
2245
+ return /* @__PURE__ */ jsxs17("div", { className: cn("flex min-w-0 flex-col gap-1.5", className), children: [
2246
+ /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between gap-2", children: [
2247
+ /* @__PURE__ */ jsxs17("span", { className: "flex min-w-0 items-center", children: [
2139
2248
  labelNode,
2140
2249
  tooltipNode
2141
2250
  ] }),
@@ -2174,7 +2283,7 @@ Form.displayName = "Form";
2174
2283
 
2175
2284
  // src/components/form-layout/FormLayout.tsx
2176
2285
  import * as React29 from "react";
2177
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2286
+ import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2178
2287
  var GRID_COLUMNS = {
2179
2288
  1: "grid-cols-1",
2180
2289
  2: "grid-cols-2",
@@ -2196,7 +2305,7 @@ var FormLayout = React29.forwardRef(
2196
2305
  }, ref) => {
2197
2306
  const Tag = as;
2198
2307
  const gapResolved = resolveGap(gap ?? "md");
2199
- return /* @__PURE__ */ jsxs17(
2308
+ return /* @__PURE__ */ jsxs18(
2200
2309
  Tag,
2201
2310
  {
2202
2311
  ref,
@@ -2223,44 +2332,47 @@ FormLayout.displayName = "FormLayout";
2223
2332
 
2224
2333
  // src/components/switch/Switch.tsx
2225
2334
  import * as React30 from "react";
2226
- import { jsx as jsx29 } from "react/jsx-runtime";
2335
+ import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
2227
2336
  var Switch = React30.forwardRef(
2228
- ({ className, checked, defaultChecked, onCheckedChange, disabled, ...props }, ref) => {
2337
+ ({ className, checked, defaultChecked, onCheckedChange, disabled, name, ...props }, ref) => {
2229
2338
  const [internalChecked, setInternalChecked] = React30.useState(defaultChecked ?? false);
2230
2339
  const isOn = checked ?? internalChecked;
2231
2340
  const toggle = () => {
2232
2341
  if (checked === void 0) setInternalChecked((prev) => !prev);
2233
2342
  onCheckedChange?.(!isOn);
2234
2343
  };
2235
- return /* @__PURE__ */ jsx29(
2236
- "button",
2237
- {
2238
- type: "button",
2239
- role: "switch",
2240
- "aria-checked": isOn,
2241
- ref,
2242
- disabled,
2243
- onClick: toggle,
2244
- className: cn(
2245
- "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
2246
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
2247
- "disabled:cursor-not-allowed disabled:opacity-50",
2248
- isOn ? "bg-primary" : "bg-input",
2249
- className
2250
- ),
2251
- ...props,
2252
- children: /* @__PURE__ */ jsx29(
2253
- "span",
2254
- {
2255
- "aria-hidden": "true",
2256
- className: cn(
2257
- "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg transition-transform",
2258
- isOn ? "translate-x-4" : "translate-x-0"
2259
- )
2260
- }
2261
- )
2262
- }
2263
- );
2344
+ return /* @__PURE__ */ jsxs19(Fragment5, { children: [
2345
+ name && isOn && /* @__PURE__ */ jsx29("input", { type: "hidden", name, value: "on" }),
2346
+ /* @__PURE__ */ jsx29(
2347
+ "button",
2348
+ {
2349
+ type: "button",
2350
+ role: "switch",
2351
+ "aria-checked": isOn,
2352
+ ref,
2353
+ disabled,
2354
+ onClick: toggle,
2355
+ className: cn(
2356
+ "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors",
2357
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
2358
+ "disabled:cursor-not-allowed disabled:opacity-50",
2359
+ isOn ? "bg-primary" : "bg-input",
2360
+ className
2361
+ ),
2362
+ ...props,
2363
+ children: /* @__PURE__ */ jsx29(
2364
+ "span",
2365
+ {
2366
+ "aria-hidden": "true",
2367
+ className: cn(
2368
+ "pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg transition-transform",
2369
+ isOn ? "translate-x-4" : "translate-x-0"
2370
+ )
2371
+ }
2372
+ )
2373
+ }
2374
+ )
2375
+ ] });
2264
2376
  }
2265
2377
  );
2266
2378
  Switch.displayName = "Switch";
@@ -2574,16 +2686,291 @@ var CardFooter = React35.forwardRef(
2574
2686
  );
2575
2687
  CardFooter.displayName = "CardFooter";
2576
2688
 
2577
- // src/components/accordion/Accordion.tsx
2689
+ // src/components/confirm-dialog/ConfirmDialog.tsx
2578
2690
  import * as React36 from "react";
2579
- import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
2580
- var AccordionContext = React36.createContext({
2691
+ import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
2692
+ function ConfirmDialog({
2693
+ open,
2694
+ onOpenChange,
2695
+ title,
2696
+ description,
2697
+ confirmLabel = "Confirm",
2698
+ cancelLabel = "Cancel",
2699
+ destructive = false,
2700
+ onConfirm,
2701
+ closeOnConfirm = true,
2702
+ children
2703
+ }) {
2704
+ const [pending, setPending] = React36.useState(false);
2705
+ const handleConfirm = async () => {
2706
+ try {
2707
+ setPending(true);
2708
+ await onConfirm();
2709
+ if (closeOnConfirm) onOpenChange(false);
2710
+ } finally {
2711
+ setPending(false);
2712
+ }
2713
+ };
2714
+ return /* @__PURE__ */ jsx35(
2715
+ Dialog,
2716
+ {
2717
+ open,
2718
+ onOpenChange: (next) => {
2719
+ if (pending) return;
2720
+ onOpenChange(next);
2721
+ },
2722
+ title,
2723
+ description,
2724
+ size: "sm",
2725
+ footer: /* @__PURE__ */ jsxs20(DialogFooter, { children: [
2726
+ /* @__PURE__ */ jsx35(Button, { variant: "ghost", onClick: () => onOpenChange(false), disabled: pending, children: cancelLabel }),
2727
+ /* @__PURE__ */ jsx35(
2728
+ Button,
2729
+ {
2730
+ variant: destructive ? "destructive" : "default",
2731
+ onClick: handleConfirm,
2732
+ loading: pending,
2733
+ children: confirmLabel
2734
+ }
2735
+ )
2736
+ ] }),
2737
+ children
2738
+ }
2739
+ );
2740
+ }
2741
+
2742
+ // src/components/table-of-contents/TableOfContents.tsx
2743
+ import * as React37 from "react";
2744
+ import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
2745
+ function TableOfContents({
2746
+ headings,
2747
+ activeId,
2748
+ label = "On this page",
2749
+ sticky = true,
2750
+ className,
2751
+ ...props
2752
+ }) {
2753
+ return /* @__PURE__ */ jsxs21(
2754
+ "nav",
2755
+ {
2756
+ "aria-label": label,
2757
+ className: cn("text-sm", sticky && "sticky top-20 max-h-[calc(100vh-6rem)] overflow-y-auto", className),
2758
+ ...props,
2759
+ children: [
2760
+ /* @__PURE__ */ jsx36("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
2761
+ /* @__PURE__ */ jsx36("ul", { className: "space-y-1 border-l border-border", children: headings.map((heading) => {
2762
+ const active = heading.id === activeId;
2763
+ return /* @__PURE__ */ jsx36("li", { style: { paddingLeft: `${(heading.level - 2) * 0.75}rem` }, children: /* @__PURE__ */ jsx36(
2764
+ "a",
2765
+ {
2766
+ href: `#${heading.id}`,
2767
+ "aria-current": active ? "location" : void 0,
2768
+ className: cn(
2769
+ "-ml-px block border-l py-1 pl-3 transition-colors",
2770
+ active ? "border-primary font-medium text-primary" : "border-transparent text-muted-foreground hover:border-border hover:text-foreground"
2771
+ ),
2772
+ children: heading.text
2773
+ }
2774
+ ) }, heading.id);
2775
+ }) })
2776
+ ]
2777
+ }
2778
+ );
2779
+ }
2780
+ function useScrollSpy(ids, options) {
2781
+ const [activeId, setActiveId] = React37.useState();
2782
+ const idKey = ids.join("|");
2783
+ const rootMargin = options?.rootMargin ?? "0px 0px -70% 0px";
2784
+ React37.useEffect(() => {
2785
+ if (idKey.length === 0 || typeof IntersectionObserver === "undefined") return;
2786
+ const elements = idKey.split("|").map((id) => document.getElementById(id)).filter((element) => element !== null);
2787
+ if (elements.length === 0) return;
2788
+ const observer = new IntersectionObserver(
2789
+ (entries) => {
2790
+ const visible = entries.filter((entry) => entry.isIntersecting).sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top);
2791
+ if (visible[0]) setActiveId(visible[0].target.id);
2792
+ return;
2793
+ },
2794
+ { rootMargin, threshold: 0 }
2795
+ );
2796
+ elements.forEach((element) => observer.observe(element));
2797
+ return () => observer.disconnect();
2798
+ }, [idKey, rootMargin]);
2799
+ return activeId;
2800
+ }
2801
+
2802
+ // src/components/prose/Prose.tsx
2803
+ import * as React38 from "react";
2804
+ import { jsx as jsx37 } from "react/jsx-runtime";
2805
+ var sizeClasses3 = {
2806
+ sm: "text-sm [&_h2]:text-xl [&_h3]:text-lg",
2807
+ md: "text-base [&_h2]:text-2xl [&_h3]:text-xl",
2808
+ lg: "text-lg [&_h2]:text-3xl [&_h3]:text-2xl"
2809
+ };
2810
+ var Prose = React38.forwardRef(function Prose2({ size = "md", className, ...props }, ref) {
2811
+ return /* @__PURE__ */ jsx37(
2812
+ "div",
2813
+ {
2814
+ ref,
2815
+ className: cn(
2816
+ "max-w-none text-foreground",
2817
+ sizeClasses3[size],
2818
+ // Headings
2819
+ "[&_h1]:mb-4 [&_h1]:mt-10 [&_h1]:scroll-mt-24 [&_h1]:text-3xl [&_h1]:font-bold [&_h1]:tracking-tight",
2820
+ "[&_h2]:mb-3 [&_h2]:mt-9 [&_h2]:scroll-mt-24 [&_h2]:font-semibold [&_h2]:tracking-tight",
2821
+ "[&_h3]:mb-2 [&_h3]:mt-7 [&_h3]:scroll-mt-24 [&_h3]:font-semibold",
2822
+ "[&_h4]:mb-2 [&_h4]:mt-6 [&_h4]:scroll-mt-24 [&_h4]:font-semibold",
2823
+ // Body copy
2824
+ "[&_p]:my-4 [&_p]:leading-7",
2825
+ "[&_a]:text-primary [&_a]:underline [&_a]:decoration-primary/40 [&_a]:underline-offset-4 hover:[&_a]:decoration-primary",
2826
+ "[&_strong]:font-semibold [&_strong]:text-foreground [&_em]:italic",
2827
+ "[&_ul]:my-4 [&_ul]:list-disc [&_ul]:space-y-1.5 [&_ul]:pl-6",
2828
+ "[&_ol]:my-4 [&_ol]:list-decimal [&_ol]:space-y-1.5 [&_ol]:pl-6",
2829
+ "[&_li]:leading-7 [&_li>p]:my-0",
2830
+ "[&_blockquote]:my-6 [&_blockquote]:border-l-2 [&_blockquote]:border-primary/40 [&_blockquote]:pl-4 [&_blockquote]:italic [&_blockquote]:text-muted-foreground",
2831
+ // Code
2832
+ "[&_code]:rounded [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.875em]",
2833
+ "[&_pre]:my-5 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-border [&_pre]:bg-muted/50 [&_pre]:p-4",
2834
+ "[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-sm",
2835
+ // Media, rules, tables
2836
+ "[&_hr]:my-8 [&_hr]:border-border",
2837
+ "[&_img]:my-6 [&_img]:rounded-lg [&_img]:border [&_img]:border-border",
2838
+ "[&_figure]:my-6 [&_figcaption]:mt-2 [&_figcaption]:text-center [&_figcaption]:text-xs [&_figcaption]:text-muted-foreground",
2839
+ "[&_table]:my-6 [&_table]:w-full [&_table]:border-collapse [&_table]:text-sm",
2840
+ "[&_th]:border-b [&_th]:border-border [&_th]:px-3 [&_th]:py-2 [&_th]:text-left [&_th]:font-semibold",
2841
+ "[&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:py-2",
2842
+ className
2843
+ ),
2844
+ ...props
2845
+ }
2846
+ );
2847
+ });
2848
+
2849
+ // src/components/site-footer/SiteFooter.tsx
2850
+ import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
2851
+ function SiteFooter({
2852
+ brand,
2853
+ tagline,
2854
+ columns,
2855
+ legal,
2856
+ linkComponent,
2857
+ className,
2858
+ ...props
2859
+ }) {
2860
+ const Link3 = linkComponent ?? "a";
2861
+ return /* @__PURE__ */ jsxs22("footer", { className: cn("border-t border-border bg-muted/30", className), ...props, children: [
2862
+ /* @__PURE__ */ jsxs22("div", { className: "mx-auto grid w-full max-w-7xl gap-8 px-4 py-12 sm:grid-cols-2 sm:px-6 lg:grid-cols-4", children: [
2863
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0", children: [
2864
+ brand,
2865
+ tagline && /* @__PURE__ */ jsx38("p", { className: "mt-3 max-w-56 text-sm text-muted-foreground", children: tagline })
2866
+ ] }),
2867
+ columns.map((column) => /* @__PURE__ */ jsxs22("div", { children: [
2868
+ /* @__PURE__ */ jsx38("h3", { className: "mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground", children: column.title }),
2869
+ /* @__PURE__ */ jsx38("ul", { className: "space-y-2 text-sm", children: column.links.map((link) => /* @__PURE__ */ jsx38("li", { children: /* @__PURE__ */ jsx38(
2870
+ Link3,
2871
+ {
2872
+ href: link.href,
2873
+ ...link.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
2874
+ className: "text-muted-foreground transition-colors hover:text-foreground",
2875
+ children: link.label
2876
+ }
2877
+ ) }, `${column.title}-${link.href}-${link.label}`)) })
2878
+ ] }, column.title))
2879
+ ] }),
2880
+ legal && /* @__PURE__ */ jsx38("div", { className: "border-t border-border", children: /* @__PURE__ */ jsx38("div", { className: "mx-auto flex w-full max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-4 text-xs text-muted-foreground sm:px-6", children: legal }) })
2881
+ ] });
2882
+ }
2883
+
2884
+ // src/components/site-header/SiteHeader.tsx
2885
+ import * as React39 from "react";
2886
+ import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
2887
+ function isActive(itemHref, activeHref, match) {
2888
+ if (!activeHref) return false;
2889
+ if (itemHref === activeHref) return true;
2890
+ if (match === "exact") return false;
2891
+ return activeHref === itemHref || activeHref.startsWith(itemHref.endsWith("/") ? itemHref : `${itemHref}/`);
2892
+ }
2893
+ function SiteHeader({
2894
+ brand,
2895
+ items,
2896
+ activeHref,
2897
+ match = "prefix",
2898
+ actions,
2899
+ linkComponent,
2900
+ sticky = true,
2901
+ mobileLabel = "Menu",
2902
+ className,
2903
+ ...props
2904
+ }) {
2905
+ const [mobileOpen, setMobileOpen] = React39.useState(false);
2906
+ const Link3 = linkComponent ?? "a";
2907
+ const navLink = (item, extra) => {
2908
+ const active = isActive(item.href, activeHref, match);
2909
+ return /* @__PURE__ */ jsx39(
2910
+ Link3,
2911
+ {
2912
+ href: item.href,
2913
+ "aria-current": active ? "page" : void 0,
2914
+ ...item.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
2915
+ onClick: extra === "mobile" ? () => setMobileOpen(false) : void 0,
2916
+ className: cn(
2917
+ "rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2918
+ extra === "mobile" ? "block rounded-md px-3 py-2 text-base hover:bg-accent" : "text-sm hover:text-foreground",
2919
+ active ? "font-medium text-foreground" : "text-muted-foreground"
2920
+ ),
2921
+ children: item.label
2922
+ },
2923
+ item.href
2924
+ );
2925
+ };
2926
+ return /* @__PURE__ */ jsxs23(Fragment6, { children: [
2927
+ /* @__PURE__ */ jsx39(
2928
+ "header",
2929
+ {
2930
+ className: cn(
2931
+ "w-full border-b border-border bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60",
2932
+ sticky && "sticky top-0 z-40",
2933
+ className
2934
+ ),
2935
+ ...props,
2936
+ children: /* @__PURE__ */ jsxs23("nav", { className: "mx-auto flex h-14 w-full max-w-7xl items-center justify-between gap-4 px-4 sm:px-6", children: [
2937
+ /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 items-center gap-6", children: [
2938
+ /* @__PURE__ */ jsx39(Link3, { href: "/", "aria-label": "Home", className: "flex shrink-0 items-center", children: brand }),
2939
+ /* @__PURE__ */ jsx39("div", { className: "hidden items-center gap-5 md:flex", children: items.map((item) => navLink(item)) })
2940
+ ] }),
2941
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
2942
+ actions,
2943
+ /* @__PURE__ */ jsx39(
2944
+ "button",
2945
+ {
2946
+ type: "button",
2947
+ onClick: () => setMobileOpen(true),
2948
+ "aria-label": "Open menu",
2949
+ className: "rounded-md border border-border p-2 text-muted-foreground hover:bg-muted md:hidden",
2950
+ children: /* @__PURE__ */ jsx39("span", { "aria-hidden": "true", children: "\u2630" })
2951
+ }
2952
+ )
2953
+ ] })
2954
+ ] })
2955
+ }
2956
+ ),
2957
+ /* @__PURE__ */ jsxs23(Drawer, { open: mobileOpen, onOpenChange: setMobileOpen, title: mobileLabel, side: "right", size: "sm", animate: true, children: [
2958
+ /* @__PURE__ */ jsx39("nav", { "aria-label": "Mobile", className: "flex flex-col gap-1", children: items.map((item) => navLink(item, "mobile")) }),
2959
+ actions && /* @__PURE__ */ jsx39("div", { className: "mt-4 border-t border-border pt-4", children: actions })
2960
+ ] })
2961
+ ] });
2962
+ }
2963
+
2964
+ // src/components/accordion/Accordion.tsx
2965
+ import * as React40 from "react";
2966
+ import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
2967
+ var AccordionContext = React40.createContext({
2581
2968
  openItems: /* @__PURE__ */ new Set(),
2582
2969
  toggle: () => {
2583
2970
  },
2584
2971
  collapsible: true
2585
2972
  });
2586
- var Accordion = React36.forwardRef(
2973
+ var Accordion = React40.forwardRef(
2587
2974
  ({
2588
2975
  value,
2589
2976
  defaultValue = [],
@@ -2595,9 +2982,9 @@ var Accordion = React36.forwardRef(
2595
2982
  style,
2596
2983
  children
2597
2984
  }, ref) => {
2598
- const [internalOpen, setInternalOpen] = React36.useState(defaultValue);
2985
+ const [internalOpen, setInternalOpen] = React40.useState(defaultValue);
2599
2986
  const current = value ?? internalOpen;
2600
- const toggle = React36.useCallback(
2987
+ const toggle = React40.useCallback(
2601
2988
  (id) => {
2602
2989
  const next = current.includes(id) ? current.filter((item) => item !== id) : collapsible ? [id] : [...current, id];
2603
2990
  if (value === void 0) setInternalOpen(next);
@@ -2606,7 +2993,7 @@ var Accordion = React36.forwardRef(
2606
2993
  [current, collapsible, value, onValueChange]
2607
2994
  );
2608
2995
  const gapResolved = resolveGap(gap);
2609
- return /* @__PURE__ */ jsx35(
2996
+ return /* @__PURE__ */ jsx40(
2610
2997
  "div",
2611
2998
  {
2612
2999
  ref,
@@ -2619,25 +3006,25 @@ var Accordion = React36.forwardRef(
2619
3006
  className
2620
3007
  ),
2621
3008
  style: { ...gapResolved.style, ...style },
2622
- children: /* @__PURE__ */ jsx35(AccordionContext.Provider, { value: { openItems: new Set(current), toggle, collapsible }, children })
3009
+ children: /* @__PURE__ */ jsx40(AccordionContext.Provider, { value: { openItems: new Set(current), toggle, collapsible }, children })
2623
3010
  }
2624
3011
  );
2625
3012
  }
2626
3013
  );
2627
3014
  Accordion.displayName = "Accordion";
2628
- var AccordionItem = React36.forwardRef(
2629
- ({ id, className, children }, ref) => /* @__PURE__ */ jsx35("div", { ref, "data-accordion-item": id, className, children: /* @__PURE__ */ jsx35(AccordionItemContext.Provider, { value: { id }, children }) })
3015
+ var AccordionItem = React40.forwardRef(
3016
+ ({ id, className, children }, ref) => /* @__PURE__ */ jsx40("div", { ref, "data-accordion-item": id, className, children: /* @__PURE__ */ jsx40(AccordionItemContext.Provider, { value: { id }, children }) })
2630
3017
  );
2631
3018
  AccordionItem.displayName = "AccordionItem";
2632
- var AccordionItemContext = React36.createContext({ id: "" });
2633
- var AccordionTrigger = React36.forwardRef(
3019
+ var AccordionItemContext = React40.createContext({ id: "" });
3020
+ var AccordionTrigger = React40.forwardRef(
2634
3021
  ({ className, children, icon, ...props }, ref) => {
2635
- const { id } = React36.useContext(AccordionItemContext);
2636
- const { openItems, toggle } = React36.useContext(AccordionContext);
3022
+ const { id } = React40.useContext(AccordionItemContext);
3023
+ const { openItems, toggle } = React40.useContext(AccordionContext);
2637
3024
  const open = openItems.has(id);
2638
3025
  const panelId = `${id}-panel`;
2639
3026
  const triggerId = `${id}-trigger`;
2640
- return /* @__PURE__ */ jsxs18(
3027
+ return /* @__PURE__ */ jsxs24(
2641
3028
  "button",
2642
3029
  {
2643
3030
  ref,
@@ -2656,7 +3043,7 @@ var AccordionTrigger = React36.forwardRef(
2656
3043
  ...props,
2657
3044
  children: [
2658
3045
  children,
2659
- icon ?? /* @__PURE__ */ jsx35(
3046
+ icon ?? /* @__PURE__ */ jsx40(
2660
3047
  "svg",
2661
3048
  {
2662
3049
  "aria-hidden": "true",
@@ -2666,7 +3053,7 @@ var AccordionTrigger = React36.forwardRef(
2666
3053
  strokeWidth: "2",
2667
3054
  strokeLinecap: "round",
2668
3055
  className: cn("h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180"),
2669
- children: /* @__PURE__ */ jsx35("polyline", { points: "6 9 12 15 18 9" })
3056
+ children: /* @__PURE__ */ jsx40("polyline", { points: "6 9 12 15 18 9" })
2670
3057
  }
2671
3058
  )
2672
3059
  ]
@@ -2675,13 +3062,13 @@ var AccordionTrigger = React36.forwardRef(
2675
3062
  }
2676
3063
  );
2677
3064
  AccordionTrigger.displayName = "AccordionTrigger";
2678
- var AccordionContent = React36.forwardRef(
3065
+ var AccordionContent = React40.forwardRef(
2679
3066
  ({ className, children, ...props }, ref) => {
2680
- const { id } = React36.useContext(AccordionItemContext);
2681
- const { openItems } = React36.useContext(AccordionContext);
3067
+ const { id } = React40.useContext(AccordionItemContext);
3068
+ const { openItems } = React40.useContext(AccordionContext);
2682
3069
  const open = openItems.has(id);
2683
- const [expanded, setExpanded] = React36.useState(open);
2684
- React36.useEffect(() => {
3070
+ const [expanded, setExpanded] = React40.useState(open);
3071
+ React40.useEffect(() => {
2685
3072
  if (!open) {
2686
3073
  setExpanded(false);
2687
3074
  return;
@@ -2700,7 +3087,7 @@ var AccordionContent = React36.forwardRef(
2700
3087
  cancelAnimationFrame(second);
2701
3088
  };
2702
3089
  }, [open]);
2703
- return /* @__PURE__ */ jsx35(
3090
+ return /* @__PURE__ */ jsx40(
2704
3091
  "div",
2705
3092
  {
2706
3093
  ref,
@@ -2719,7 +3106,7 @@ var AccordionContent = React36.forwardRef(
2719
3106
  className
2720
3107
  ),
2721
3108
  ...props,
2722
- children: /* @__PURE__ */ jsx35("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx35("div", { className: "px-4 pb-3 text-sm text-muted-foreground", children }) })
3109
+ children: /* @__PURE__ */ jsx40("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx40("div", { className: "px-4 pb-3 text-sm text-muted-foreground", children }) })
2723
3110
  }
2724
3111
  );
2725
3112
  }
@@ -2727,10 +3114,10 @@ var AccordionContent = React36.forwardRef(
2727
3114
  AccordionContent.displayName = "AccordionContent";
2728
3115
 
2729
3116
  // src/components/table/Table.tsx
2730
- import * as React37 from "react";
2731
- import { jsx as jsx36 } from "react/jsx-runtime";
2732
- var Table = React37.forwardRef(
2733
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx36(
3117
+ import * as React41 from "react";
3118
+ import { jsx as jsx41 } from "react/jsx-runtime";
3119
+ var Table = React41.forwardRef(
3120
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx41(
2734
3121
  "table",
2735
3122
  {
2736
3123
  ref,
@@ -2740,16 +3127,16 @@ var Table = React37.forwardRef(
2740
3127
  ) })
2741
3128
  );
2742
3129
  Table.displayName = "Table";
2743
- var TableHeader = React37.forwardRef(
2744
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
3130
+ var TableHeader = React41.forwardRef(
3131
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41("thead", { ref, className: cn("[&_tr]:border-b", className), ...props })
2745
3132
  );
2746
3133
  TableHeader.displayName = "TableHeader";
2747
- var TableBody = React37.forwardRef(
2748
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
3134
+ var TableBody = React41.forwardRef(
3135
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props })
2749
3136
  );
2750
3137
  TableBody.displayName = "TableBody";
2751
- var TableFooter = React37.forwardRef(
2752
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
3138
+ var TableFooter = React41.forwardRef(
3139
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
2753
3140
  "tfoot",
2754
3141
  {
2755
3142
  ref,
@@ -2759,8 +3146,8 @@ var TableFooter = React37.forwardRef(
2759
3146
  )
2760
3147
  );
2761
3148
  TableFooter.displayName = "TableFooter";
2762
- var TableRow = React37.forwardRef(
2763
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
3149
+ var TableRow = React41.forwardRef(
3150
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
2764
3151
  "tr",
2765
3152
  {
2766
3153
  ref,
@@ -2773,8 +3160,8 @@ var TableRow = React37.forwardRef(
2773
3160
  )
2774
3161
  );
2775
3162
  TableRow.displayName = "TableRow";
2776
- var TableHead = React37.forwardRef(
2777
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
3163
+ var TableHead = React41.forwardRef(
3164
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41(
2778
3165
  "th",
2779
3166
  {
2780
3167
  ref,
@@ -2788,23 +3175,23 @@ var TableHead = React37.forwardRef(
2788
3175
  )
2789
3176
  );
2790
3177
  TableHead.displayName = "TableHead";
2791
- var TableCell = React37.forwardRef(
2792
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("td", { ref, className: cn("px-3 py-2 align-middle", className), ...props })
3178
+ var TableCell = React41.forwardRef(
3179
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41("td", { ref, className: cn("px-3 py-2 align-middle", className), ...props })
2793
3180
  );
2794
3181
  TableCell.displayName = "TableCell";
2795
- var TableCaption = React37.forwardRef(
2796
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx36("caption", { ref, className: cn("mt-3 text-xs text-muted-foreground", className), ...props })
3182
+ var TableCaption = React41.forwardRef(
3183
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx41("caption", { ref, className: cn("mt-3 text-xs text-muted-foreground", className), ...props })
2797
3184
  );
2798
3185
  TableCaption.displayName = "TableCaption";
2799
3186
 
2800
3187
  // src/components/data-table/DataTable.tsx
2801
- import * as React39 from "react";
3188
+ import * as React43 from "react";
2802
3189
 
2803
3190
  // src/components/pagination/Pagination.tsx
2804
- import * as React38 from "react";
2805
- import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
3191
+ import * as React42 from "react";
3192
+ import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
2806
3193
  var controlClass = "inline-flex h-8 items-center rounded-md border border-border px-2.5 text-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";
2807
- var Pagination = React38.forwardRef(
3194
+ var Pagination = React42.forwardRef(
2808
3195
  ({
2809
3196
  page: pageProp,
2810
3197
  pageCount: pageCountProp,
@@ -2820,6 +3207,7 @@ var Pagination = React38.forwardRef(
2820
3207
  showFirst,
2821
3208
  showLast,
2822
3209
  icons,
3210
+ labels,
2823
3211
  className,
2824
3212
  ...props
2825
3213
  }, ref) => {
@@ -2839,38 +3227,38 @@ var Pagination = React38.forwardRef(
2839
3227
  const summaryEnabled = showSummary ?? (total !== void 0 && pageSize !== void 0);
2840
3228
  const rangeStart = pageSize !== void 0 ? (page - 1) * pageSize + 1 : void 0;
2841
3229
  const rangeEnd = pageSize !== void 0 && total !== void 0 ? Math.min(total, page * pageSize) : void 0;
2842
- const nav = /* @__PURE__ */ jsxs19(
3230
+ const nav = /* @__PURE__ */ jsxs25(
2843
3231
  "nav",
2844
3232
  {
2845
3233
  ref,
2846
- "aria-label": "Pagination",
3234
+ "aria-label": labels?.pagination ?? "Pagination",
2847
3235
  className: cn("flex items-center justify-center gap-1", summaryEnabled ? void 0 : className),
2848
3236
  ...props,
2849
3237
  children: [
2850
- withFirst && /* @__PURE__ */ jsx37(
3238
+ withFirst && /* @__PURE__ */ jsx42(
2851
3239
  "button",
2852
3240
  {
2853
3241
  type: "button",
2854
3242
  onClick: () => onPageChange?.(1),
2855
3243
  disabled: page <= 1,
2856
- "aria-label": "First page",
3244
+ "aria-label": labels?.first ?? "First page",
2857
3245
  className: controlClass,
2858
3246
  children: icons?.first ?? "\xAB"
2859
3247
  }
2860
3248
  ),
2861
- /* @__PURE__ */ jsx37(
3249
+ /* @__PURE__ */ jsx42(
2862
3250
  "button",
2863
3251
  {
2864
3252
  type: "button",
2865
3253
  onClick: () => onPageChange?.(page - 1),
2866
3254
  disabled: page <= 1,
2867
- "aria-label": "Previous page",
3255
+ "aria-label": labels?.previous ?? "Previous page",
2868
3256
  className: controlClass,
2869
3257
  children: icons?.previous ?? "\u2039"
2870
3258
  }
2871
3259
  ),
2872
3260
  pages.map(
2873
- (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx37(
3261
+ (entry, index) => entry === "ellipsis" ? /* @__PURE__ */ jsx42(
2874
3262
  "span",
2875
3263
  {
2876
3264
  "aria-hidden": "true",
@@ -2878,13 +3266,13 @@ var Pagination = React38.forwardRef(
2878
3266
  children: "\u2026"
2879
3267
  },
2880
3268
  `ellipsis-${index}`
2881
- ) : /* @__PURE__ */ jsx37(
3269
+ ) : /* @__PURE__ */ jsx42(
2882
3270
  "button",
2883
3271
  {
2884
3272
  type: "button",
2885
3273
  onClick: () => onPageChange?.(entry),
2886
3274
  "aria-current": entry === page ? "page" : void 0,
2887
- "aria-label": `Page ${entry}`,
3275
+ "aria-label": labels?.page?.(entry) ?? `Page ${entry}`,
2888
3276
  className: cn(
2889
3277
  "inline-flex h-8 w-8 items-center justify-center rounded-md border text-sm transition-colors",
2890
3278
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -2895,24 +3283,24 @@ var Pagination = React38.forwardRef(
2895
3283
  entry
2896
3284
  )
2897
3285
  ),
2898
- /* @__PURE__ */ jsx37(
3286
+ /* @__PURE__ */ jsx42(
2899
3287
  "button",
2900
3288
  {
2901
3289
  type: "button",
2902
3290
  onClick: () => onPageChange?.(page + 1),
2903
3291
  disabled: page >= pageCount,
2904
- "aria-label": "Next page",
3292
+ "aria-label": labels?.next ?? "Next page",
2905
3293
  className: controlClass,
2906
3294
  children: icons?.next ?? "\u203A"
2907
3295
  }
2908
3296
  ),
2909
- withLast && /* @__PURE__ */ jsx37(
3297
+ withLast && /* @__PURE__ */ jsx42(
2910
3298
  "button",
2911
3299
  {
2912
3300
  type: "button",
2913
3301
  onClick: () => onPageChange?.(pageCount),
2914
3302
  disabled: page >= pageCount,
2915
- "aria-label": "Last page",
3303
+ "aria-label": labels?.last ?? "Last page",
2916
3304
  className: controlClass,
2917
3305
  children: icons?.last ?? "\xBB"
2918
3306
  }
@@ -2921,8 +3309,8 @@ var Pagination = React38.forwardRef(
2921
3309
  }
2922
3310
  );
2923
3311
  if (!summaryEnabled) return nav;
2924
- return /* @__PURE__ */ jsxs19("div", { className: cn("flex flex-wrap items-center justify-between gap-3", className), children: [
2925
- /* @__PURE__ */ jsx37("p", { className: "text-sm text-muted-foreground", children: rangeStart !== void 0 && rangeEnd !== void 0 && total !== void 0 ? `Showing ${rangeStart}\u2013${rangeEnd} of ${total} ${itemLabel}` : `Page ${page} of ${pageCount}` }),
3312
+ return /* @__PURE__ */ jsxs25("div", { className: cn("flex flex-wrap items-center justify-between gap-3", className), children: [
3313
+ /* @__PURE__ */ jsx42("p", { className: "text-sm text-muted-foreground", children: rangeStart !== void 0 && rangeEnd !== void 0 && total !== void 0 ? `Showing ${rangeStart}\u2013${rangeEnd} of ${total} ${itemLabel}` : `Page ${page} of ${pageCount}` }),
2926
3314
  nav
2927
3315
  ] });
2928
3316
  }
@@ -2930,7 +3318,7 @@ var Pagination = React38.forwardRef(
2930
3318
  Pagination.displayName = "Pagination";
2931
3319
 
2932
3320
  // src/components/data-table/DataTable.tsx
2933
- import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
3321
+ import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
2934
3322
  function compareValues(a, b) {
2935
3323
  if (typeof a === "number" && typeof b === "number") return a - b;
2936
3324
  if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();
@@ -2951,8 +3339,16 @@ function DataTable({
2951
3339
  pageSize,
2952
3340
  page,
2953
3341
  onPageChange,
3342
+ pageCount: pageCountProp,
3343
+ total,
3344
+ manualPagination = false,
3345
+ selectedRowIds,
3346
+ onSelectedRowIdsChange,
3347
+ isRowSelectable,
3348
+ bulkActions,
2954
3349
  onRowClick,
2955
3350
  emptyMessage = "No results.",
3351
+ selectAllLabel = "Select all rows",
2956
3352
  stickyHeader,
2957
3353
  density = "default",
2958
3354
  zebra,
@@ -2960,9 +3356,9 @@ function DataTable({
2960
3356
  loadingRows,
2961
3357
  className
2962
3358
  }) {
2963
- const [internalSort, setInternalSort] = React39.useState(defaultSort);
2964
- const [internalPage, setInternalPage] = React39.useState(1);
2965
- const sort = React39.useMemo(() => {
3359
+ const [internalSort, setInternalSort] = React43.useState(defaultSort);
3360
+ const [internalPage, setInternalPage] = React43.useState(1);
3361
+ const sort = React43.useMemo(() => {
2966
3362
  if (sortKey !== void 0) {
2967
3363
  return sortKey === null ? null : { key: sortKey, dir: sortDir ?? "asc" };
2968
3364
  }
@@ -2979,7 +3375,7 @@ function DataTable({
2979
3375
  if (page === void 0) setInternalPage(next);
2980
3376
  onPageChange?.(next);
2981
3377
  };
2982
- const sorted = React39.useMemo(() => {
3378
+ const sorted = React43.useMemo(() => {
2983
3379
  if (!sort) return data;
2984
3380
  const column = columns.find((c) => c.key === sort.key);
2985
3381
  if (!column) return data;
@@ -2994,9 +3390,34 @@ function DataTable({
2994
3390
  });
2995
3391
  return copy;
2996
3392
  }, [data, sort, columns]);
2997
- const pageCount = pageSize ? Math.max(1, Math.ceil(sorted.length / pageSize)) : 0;
3393
+ const effectiveTotal = total ?? sorted.length;
3394
+ const computedPageCount = pageSize ? Math.max(1, Math.ceil(effectiveTotal / pageSize)) : 0;
3395
+ const pageCount = pageCountProp ?? computedPageCount;
2998
3396
  const safePage = Math.min(currentPage, pageCount || 1);
2999
- const visible = pageSize ? sorted.slice((safePage - 1) * pageSize, safePage * pageSize) : sorted;
3397
+ const visible = manualPagination ? data : pageSize ? sorted.slice((safePage - 1) * pageSize, safePage * pageSize) : sorted;
3398
+ const [internalSelected, setInternalSelected] = React43.useState([]);
3399
+ const selectionEnabled = selectedRowIds !== void 0 || onSelectedRowIdsChange !== void 0;
3400
+ const selectedIds = selectedRowIds ?? internalSelected;
3401
+ const selectedSet = React43.useMemo(() => new Set(selectedIds), [selectedIds]);
3402
+ const selectableVisible = isRowSelectable ? visible.filter(isRowSelectable) : visible;
3403
+ const allSelected = selectableVisible.length > 0 && selectableVisible.every((row) => selectedSet.has(rowId(row)));
3404
+ const someSelected = selectableVisible.some((row) => selectedSet.has(rowId(row)));
3405
+ const commitSelection = (next) => {
3406
+ if (selectedRowIds === void 0) setInternalSelected(next);
3407
+ onSelectedRowIdsChange?.(next);
3408
+ };
3409
+ const toggleAll = () => {
3410
+ if (allSelected) {
3411
+ const visibleIds = new Set(selectableVisible.map((row) => rowId(row)));
3412
+ commitSelection(selectedIds.filter((id) => !visibleIds.has(id)));
3413
+ return;
3414
+ }
3415
+ const merged = /* @__PURE__ */ new Set([...selectedIds, ...selectableVisible.map((row) => rowId(row))]);
3416
+ commitSelection([...merged]);
3417
+ };
3418
+ const toggleRow = (id) => {
3419
+ commitSelection(selectedSet.has(id) ? selectedIds.filter((entry) => entry !== id) : [...selectedIds, id]);
3420
+ };
3000
3421
  const cellValue = (row, column, index) => {
3001
3422
  if (column.cell) return column.cell(row, index);
3002
3423
  const raw = row[column.key];
@@ -3005,53 +3426,76 @@ function DataTable({
3005
3426
  return String(raw);
3006
3427
  };
3007
3428
  const alignClass = (align) => align === "right" ? "text-right" : align === "center" ? "text-center" : "text-left";
3008
- return /* @__PURE__ */ jsxs20("div", { className: cn("w-full space-y-3", className), children: [
3009
- /* @__PURE__ */ jsx38("div", { className: "w-full overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxs20(
3429
+ return /* @__PURE__ */ jsxs26("div", { className: cn("w-full space-y-3", className), children: [
3430
+ selectionEnabled && selectedIds.length > 0 && bulkActions && /* @__PURE__ */ jsxs26("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-sm", children: [
3431
+ /* @__PURE__ */ jsxs26("span", { className: "font-medium", children: [
3432
+ selectedIds.length,
3433
+ " selected"
3434
+ ] }),
3435
+ /* @__PURE__ */ jsx43("div", { className: "flex flex-wrap items-center gap-2", children: bulkActions })
3436
+ ] }),
3437
+ /* @__PURE__ */ jsx43("div", { className: "w-full overflow-x-auto rounded-lg border border-border", children: /* @__PURE__ */ jsxs26(
3010
3438
  "table",
3011
3439
  {
3012
3440
  className: cn("w-full caption-bottom", density === "compact" ? "text-xs" : "text-sm"),
3013
3441
  children: [
3014
- caption && /* @__PURE__ */ jsx38("caption", { className: "px-3 py-2 text-left text-xs text-muted-foreground", children: caption }),
3015
- /* @__PURE__ */ jsx38("thead", { className: cn("bg-muted/50", stickyHeader && "sticky top-0 z-10 bg-background"), children: /* @__PURE__ */ jsx38("tr", { children: columns.map((column) => {
3016
- const isSorted = sort?.key === column.key;
3017
- const ariaSort = !column.sortable ? void 0 : isSorted ? sort.dir === "asc" ? "ascending" : "descending" : "none";
3018
- return /* @__PURE__ */ jsx38(
3019
- "th",
3442
+ caption && /* @__PURE__ */ jsx43("caption", { className: "px-3 py-2 text-left text-xs text-muted-foreground", children: caption }),
3443
+ /* @__PURE__ */ jsx43("thead", { className: cn("bg-muted/50", stickyHeader && "sticky top-0 z-10 bg-background"), children: /* @__PURE__ */ jsxs26("tr", { children: [
3444
+ selectionEnabled && /* @__PURE__ */ jsx43("th", { scope: "col", className: "w-10 border-b border-border px-3 py-2", children: /* @__PURE__ */ jsx43(
3445
+ Checkbox,
3020
3446
  {
3021
- scope: "col",
3022
- "aria-sort": ariaSort,
3023
- className: cn(
3024
- "border-b border-border px-3 py-2 font-medium",
3025
- alignClass(column.align),
3026
- column.className
3027
- ),
3028
- children: column.sortable ? /* @__PURE__ */ jsxs20(
3029
- "button",
3030
- {
3031
- type: "button",
3032
- onClick: () => applySort(column.key),
3033
- className: "inline-flex items-center gap-1 rounded px-1 py-0.5 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3034
- children: [
3035
- column.header,
3036
- /* @__PURE__ */ jsx38("span", { "aria-hidden": "true", className: "text-[10px] text-muted-foreground", children: renderSortIcon ? renderSortIcon(isSorted ? sort.dir === "asc" ? "asc" : "desc" : "none") : isSorted ? sort.dir === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
3037
- ]
3038
- }
3039
- ) : column.header
3040
- },
3041
- column.key
3042
- );
3043
- }) }) }),
3044
- /* @__PURE__ */ jsx38("tbody", { "aria-busy": loading || void 0, children: loading ? Array.from(
3447
+ "aria-label": selectAllLabel,
3448
+ checked: allSelected,
3449
+ ref: (node) => {
3450
+ if (node) node.indeterminate = someSelected && !allSelected;
3451
+ },
3452
+ onCheckedChange: toggleAll
3453
+ }
3454
+ ) }),
3455
+ columns.map((column) => {
3456
+ const isSorted = sort?.key === column.key;
3457
+ const ariaSort = !column.sortable ? void 0 : isSorted ? sort.dir === "asc" ? "ascending" : "descending" : "none";
3458
+ return /* @__PURE__ */ jsx43(
3459
+ "th",
3460
+ {
3461
+ scope: "col",
3462
+ "aria-sort": ariaSort,
3463
+ className: cn(
3464
+ "border-b border-border px-3 py-2 font-medium",
3465
+ alignClass(column.align),
3466
+ column.className
3467
+ ),
3468
+ children: column.sortable ? /* @__PURE__ */ jsxs26(
3469
+ "button",
3470
+ {
3471
+ type: "button",
3472
+ onClick: () => applySort(column.key),
3473
+ className: "inline-flex items-center gap-1 rounded px-1 py-0.5 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3474
+ children: [
3475
+ column.header,
3476
+ /* @__PURE__ */ jsx43("span", { "aria-hidden": "true", className: "text-[10px] text-muted-foreground", children: renderSortIcon ? renderSortIcon(isSorted ? sort.dir === "asc" ? "asc" : "desc" : "none") : isSorted ? sort.dir === "asc" ? "\u25B2" : "\u25BC" : "\u2195" })
3477
+ ]
3478
+ }
3479
+ ) : column.header
3480
+ },
3481
+ column.key
3482
+ );
3483
+ })
3484
+ ] }) }),
3485
+ /* @__PURE__ */ jsx43("tbody", { "aria-busy": loading || void 0, children: loading ? Array.from(
3045
3486
  { length: (loadingRows ?? pageSize ?? Math.min(visible.length, 5)) || 5 },
3046
- (_, skeletonRow) => /* @__PURE__ */ jsx38("tr", { children: columns.map((column) => /* @__PURE__ */ jsx38("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ jsx38(Skeleton, { className: density === "compact" ? "h-3 w-full" : "h-4 w-full" }) }, column.key)) }, `skeleton-${skeletonRow}`)
3047
- ) : visible.length === 0 ? /* @__PURE__ */ jsx38("tr", { children: /* @__PURE__ */ jsx38(
3487
+ (_, skeletonRow) => /* @__PURE__ */ jsxs26("tr", { children: [
3488
+ selectionEnabled && /* @__PURE__ */ jsx43("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ jsx43(Skeleton, { className: "h-4 w-4" }) }),
3489
+ columns.map((column) => /* @__PURE__ */ jsx43("td", { className: cn("px-3 py-2", density === "compact" && "px-2 py-1"), children: /* @__PURE__ */ jsx43(Skeleton, { className: density === "compact" ? "h-3 w-full" : "h-4 w-full" }) }, column.key))
3490
+ ] }, `skeleton-${skeletonRow}`)
3491
+ ) : visible.length === 0 ? /* @__PURE__ */ jsx43("tr", { children: /* @__PURE__ */ jsx43(
3048
3492
  "td",
3049
3493
  {
3050
- colSpan: columns.length,
3494
+ colSpan: columns.length + (selectionEnabled ? 1 : 0),
3051
3495
  className: "px-3 py-8 text-center text-sm text-muted-foreground",
3052
3496
  children: emptyMessage
3053
3497
  }
3054
- ) }) : visible.map((row, index) => /* @__PURE__ */ jsx38(
3498
+ ) }) : visible.map((row, index) => /* @__PURE__ */ jsxs26(
3055
3499
  "tr",
3056
3500
  {
3057
3501
  tabIndex: onRowClick ? 0 : void 0,
@@ -3067,35 +3511,53 @@ function DataTable({
3067
3511
  zebra && "[&:nth-child(odd)]:bg-muted/30",
3068
3512
  onRowClick && "cursor-pointer transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"
3069
3513
  ),
3070
- children: columns.map((column) => /* @__PURE__ */ jsx38(
3071
- "td",
3072
- {
3073
- className: cn(
3074
- "align-middle",
3075
- density === "compact" ? "px-2 py-1" : "px-3 py-2",
3076
- alignClass(column.align),
3077
- column.className
3078
- ),
3079
- children: column.onClick ? /* @__PURE__ */ jsx38(
3080
- "button",
3081
- {
3082
- type: "button",
3083
- onClick: () => column.onClick(row),
3084
- className: "block w-full rounded px-1.5 py-0.5 text-left transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3085
- children: cellValue(row, column, index)
3086
- }
3087
- ) : cellValue(row, column, index)
3088
- },
3089
- column.key
3090
- ))
3514
+ children: [
3515
+ selectionEnabled && /* @__PURE__ */ jsx43(
3516
+ "td",
3517
+ {
3518
+ className: cn("align-middle", density === "compact" ? "px-2 py-1" : "px-3 py-2"),
3519
+ onClick: (event) => event.stopPropagation(),
3520
+ children: /* @__PURE__ */ jsx43(
3521
+ Checkbox,
3522
+ {
3523
+ "aria-label": `Select row ${rowId(row)}`,
3524
+ checked: selectedSet.has(rowId(row)),
3525
+ disabled: isRowSelectable ? !isRowSelectable(row) : void 0,
3526
+ onCheckedChange: () => toggleRow(rowId(row))
3527
+ }
3528
+ )
3529
+ }
3530
+ ),
3531
+ columns.map((column) => /* @__PURE__ */ jsx43(
3532
+ "td",
3533
+ {
3534
+ className: cn(
3535
+ "align-middle",
3536
+ density === "compact" ? "px-2 py-1" : "px-3 py-2",
3537
+ alignClass(column.align),
3538
+ column.className
3539
+ ),
3540
+ children: column.onClick ? /* @__PURE__ */ jsx43(
3541
+ "button",
3542
+ {
3543
+ type: "button",
3544
+ onClick: () => column.onClick(row),
3545
+ className: "block w-full rounded px-1.5 py-0.5 text-left transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3546
+ children: cellValue(row, column, index)
3547
+ }
3548
+ ) : cellValue(row, column, index)
3549
+ },
3550
+ column.key
3551
+ ))
3552
+ ]
3091
3553
  },
3092
3554
  rowId(row)
3093
3555
  )) })
3094
3556
  ]
3095
3557
  }
3096
3558
  ) }),
3097
- pageSize && pageCount > 1 && /* @__PURE__ */ jsxs20("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
3098
- /* @__PURE__ */ jsxs20(
3559
+ pageSize && pageCount > 1 && /* @__PURE__ */ jsxs26("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-2", children: [
3560
+ /* @__PURE__ */ jsxs26(
3099
3561
  "p",
3100
3562
  {
3101
3563
  className: "min-h-8 leading-none text-xs text-muted-foreground",
@@ -3103,23 +3565,23 @@ function DataTable({
3103
3565
  children: [
3104
3566
  (safePage - 1) * pageSize + 1,
3105
3567
  "\u2013",
3106
- Math.min(safePage * pageSize, sorted.length),
3568
+ Math.min(safePage * pageSize, effectiveTotal),
3107
3569
  " of",
3108
3570
  " ",
3109
- sorted.length
3571
+ effectiveTotal
3110
3572
  ]
3111
3573
  }
3112
3574
  ),
3113
- /* @__PURE__ */ jsx38(Pagination, { page: safePage, pageCount, onPageChange: setPage })
3575
+ /* @__PURE__ */ jsx43(Pagination, { page: safePage, pageCount, onPageChange: setPage })
3114
3576
  ] })
3115
3577
  ] });
3116
3578
  }
3117
3579
 
3118
3580
  // src/components/list/List.tsx
3119
- import * as React40 from "react";
3120
- import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
3121
- var List = React40.forwardRef(
3122
- ({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */ jsx39(
3581
+ import * as React44 from "react";
3582
+ import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
3583
+ var List = React44.forwardRef(
3584
+ ({ divided, bordered, size = "default", className, ...props }, ref) => /* @__PURE__ */ jsx44(
3123
3585
  "ul",
3124
3586
  {
3125
3587
  ref,
@@ -3135,7 +3597,7 @@ var List = React40.forwardRef(
3135
3597
  )
3136
3598
  );
3137
3599
  List.displayName = "List";
3138
- var ListItem = React40.forwardRef(
3600
+ var ListItem = React44.forwardRef(
3139
3601
  ({ leading, trailing, selected, onClick, description, disabled, className, children, ...props }, ref) => {
3140
3602
  const padding = "px-3 py-2.5";
3141
3603
  const rowClass = cn(
@@ -3145,23 +3607,77 @@ var ListItem = React40.forwardRef(
3145
3607
  disabled && "opacity-50",
3146
3608
  className
3147
3609
  );
3148
- const body = /* @__PURE__ */ jsxs21(Fragment5, { children: [
3149
- leading && /* @__PURE__ */ jsx39("span", { className: "flex shrink-0 items-center", children: leading }),
3150
- /* @__PURE__ */ jsxs21("span", { className: "min-w-0 flex-1", children: [
3151
- /* @__PURE__ */ jsx39("span", { className: "block truncate", children }),
3152
- description && /* @__PURE__ */ jsx39("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: description })
3610
+ const body = /* @__PURE__ */ jsxs27(Fragment7, { children: [
3611
+ leading && /* @__PURE__ */ jsx44("span", { className: "flex shrink-0 items-center", children: leading }),
3612
+ /* @__PURE__ */ jsxs27("span", { className: "min-w-0 flex-1", children: [
3613
+ /* @__PURE__ */ jsx44("span", { className: "block truncate", children }),
3614
+ description && /* @__PURE__ */ jsx44("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: description })
3153
3615
  ] }),
3154
- trailing && /* @__PURE__ */ jsx39("span", { className: "flex shrink-0 items-center text-xs text-muted-foreground", children: trailing })
3616
+ trailing && /* @__PURE__ */ jsx44("span", { className: "flex shrink-0 items-center text-xs text-muted-foreground", children: trailing })
3155
3617
  ] });
3156
- return /* @__PURE__ */ jsx39("li", { ref, ...props, children: onClick ? /* @__PURE__ */ jsx39("button", { type: "button", onClick, disabled, className: cn(padding, rowClass), children: body }) : /* @__PURE__ */ jsx39("div", { className: cn(padding, rowClass), children: body }) });
3618
+ return /* @__PURE__ */ jsx44("li", { ref, ...props, children: onClick ? /* @__PURE__ */ jsx44("button", { type: "button", onClick, disabled, className: cn(padding, rowClass), children: body }) : /* @__PURE__ */ jsx44("div", { className: cn(padding, rowClass), children: body }) });
3157
3619
  }
3158
3620
  );
3159
3621
  ListItem.displayName = "ListItem";
3160
3622
 
3623
+ // src/components/link/Link.tsx
3624
+ import * as React45 from "react";
3625
+ import { Slot as Slot4 } from "@radix-ui/react-slot";
3626
+ import { cva as cva6 } from "class-variance-authority";
3627
+ import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
3628
+ var linkVariants = cva6("inline-flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded-sm", {
3629
+ variants: {
3630
+ variant: {
3631
+ default: "text-primary hover:underline underline-offset-4",
3632
+ muted: "text-muted-foreground hover:text-foreground",
3633
+ underline: "underline underline-offset-4 hover:text-primary",
3634
+ arrow: "font-medium text-primary hover:underline underline-offset-4",
3635
+ external: "text-primary hover:underline underline-offset-4"
3636
+ }
3637
+ },
3638
+ defaultVariants: { variant: "default" }
3639
+ });
3640
+ var ABSOLUTE = /^https?:\/\//i;
3641
+ var Link = React45.forwardRef(function Link2({ className, variant, asChild = false, external, target, rel, children, ...props }, ref) {
3642
+ const isAbsolute = typeof props.href === "string" && ABSOLUTE.test(props.href);
3643
+ const isExternal = external ?? isAbsolute;
3644
+ const Comp = asChild ? Slot4 : "a";
3645
+ if (asChild) {
3646
+ return /* @__PURE__ */ jsx45(
3647
+ Comp,
3648
+ {
3649
+ ref,
3650
+ className: cn(linkVariants({ variant }), className),
3651
+ target: isExternal ? target ?? "_blank" : target,
3652
+ rel: isExternal ? rel ?? "noopener noreferrer" : rel,
3653
+ ...props,
3654
+ children
3655
+ }
3656
+ );
3657
+ }
3658
+ return /* @__PURE__ */ jsxs28(
3659
+ Comp,
3660
+ {
3661
+ ref,
3662
+ className: cn(linkVariants({ variant }), className),
3663
+ target: isExternal ? target ?? "_blank" : target,
3664
+ rel: isExternal ? rel ?? "noopener noreferrer" : rel,
3665
+ ...props,
3666
+ children: [
3667
+ children,
3668
+ isExternal && variant !== "muted" && /* @__PURE__ */ jsxs28(Fragment8, { children: [
3669
+ /* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "text-[0.75em]", children: "\u2197" }),
3670
+ /* @__PURE__ */ jsx45("span", { className: "sr-only", children: "(opens in a new tab)" })
3671
+ ] })
3672
+ ]
3673
+ }
3674
+ );
3675
+ });
3676
+
3161
3677
  // src/components/text/Text.tsx
3162
- import * as React41 from "react";
3163
- import { jsx as jsx40 } from "react/jsx-runtime";
3164
- var sizeClasses3 = {
3678
+ import * as React46 from "react";
3679
+ import { jsx as jsx46 } from "react/jsx-runtime";
3680
+ var sizeClasses4 = {
3165
3681
  xs: "text-xs",
3166
3682
  sm: "text-sm",
3167
3683
  base: "text-base",
@@ -3174,15 +3690,15 @@ var weightClasses = {
3174
3690
  semibold: "font-semibold",
3175
3691
  bold: "font-bold"
3176
3692
  };
3177
- var Text = React41.forwardRef(
3693
+ var Text = React46.forwardRef(
3178
3694
  ({ inline, size = "base", weight, muted, className, ...props }, ref) => {
3179
3695
  const Tag = inline ? "span" : "p";
3180
- return /* @__PURE__ */ jsx40(
3696
+ return /* @__PURE__ */ jsx46(
3181
3697
  Tag,
3182
3698
  {
3183
3699
  ref,
3184
3700
  className: cn(
3185
- sizeClasses3[size],
3701
+ sizeClasses4[size],
3186
3702
  weight && weightClasses[weight],
3187
3703
  muted && "text-muted-foreground",
3188
3704
  inline ? "inline" : "block",
@@ -3196,8 +3712,8 @@ var Text = React41.forwardRef(
3196
3712
  Text.displayName = "Text";
3197
3713
 
3198
3714
  // src/components/heading/Heading.tsx
3199
- import * as React42 from "react";
3200
- import { jsx as jsx41 } from "react/jsx-runtime";
3715
+ import * as React47 from "react";
3716
+ import { jsx as jsx47 } from "react/jsx-runtime";
3201
3717
  var levelClasses = {
3202
3718
  1: "text-4xl",
3203
3719
  2: "text-3xl",
@@ -3206,7 +3722,7 @@ var levelClasses = {
3206
3722
  5: "text-lg",
3207
3723
  6: "text-base"
3208
3724
  };
3209
- var sizeClasses4 = {
3725
+ var sizeClasses5 = {
3210
3726
  sm: "text-lg",
3211
3727
  md: "text-xl",
3212
3728
  lg: "text-2xl",
@@ -3214,16 +3730,16 @@ var sizeClasses4 = {
3214
3730
  "2xl": "text-4xl",
3215
3731
  "3xl": "text-5xl"
3216
3732
  };
3217
- var Heading = React42.forwardRef(
3733
+ var Heading = React47.forwardRef(
3218
3734
  ({ level, size, muted, className, ...props }, ref) => {
3219
3735
  const Tag = `h${level}`;
3220
- return /* @__PURE__ */ jsx41(
3736
+ return /* @__PURE__ */ jsx47(
3221
3737
  Tag,
3222
3738
  {
3223
3739
  ref,
3224
3740
  className: cn(
3225
3741
  "font-semibold tracking-tight",
3226
- size ? sizeClasses4[size] : levelClasses[level],
3742
+ size ? sizeClasses5[size] : levelClasses[level],
3227
3743
  muted && "text-muted-foreground",
3228
3744
  className
3229
3745
  ),
@@ -3235,10 +3751,10 @@ var Heading = React42.forwardRef(
3235
3751
  Heading.displayName = "Heading";
3236
3752
 
3237
3753
  // src/components/empty-state/EmptyState.tsx
3238
- import * as React43 from "react";
3239
- import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
3240
- var EmptyState = React43.forwardRef(function EmptyState2({ icon, title, description, action, secondaryAction, size = "md", className, children, ...props }, ref) {
3241
- return /* @__PURE__ */ jsxs22(
3754
+ import * as React48 from "react";
3755
+ import { jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
3756
+ var EmptyState = React48.forwardRef(function EmptyState2({ icon, title, description, action, secondaryAction, size = "md", className, children, ...props }, ref) {
3757
+ return /* @__PURE__ */ jsxs29(
3242
3758
  "div",
3243
3759
  {
3244
3760
  ref,
@@ -3249,11 +3765,11 @@ var EmptyState = React43.forwardRef(function EmptyState2({ icon, title, descript
3249
3765
  ),
3250
3766
  ...props,
3251
3767
  children: [
3252
- icon && /* @__PURE__ */ jsx42("div", { className: "text-muted-foreground [&_svg]:size-8", children: icon }),
3253
- /* @__PURE__ */ jsx42("p", { className: cn("font-semibold", size === "md" ? "text-base" : "text-sm"), children: title }),
3254
- description && /* @__PURE__ */ jsx42("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }),
3768
+ icon && /* @__PURE__ */ jsx48("div", { className: "text-muted-foreground [&_svg]:size-8", children: icon }),
3769
+ /* @__PURE__ */ jsx48("p", { className: cn("font-semibold", size === "md" ? "text-base" : "text-sm"), children: title }),
3770
+ description && /* @__PURE__ */ jsx48("p", { className: "max-w-sm text-sm text-muted-foreground", children: description }),
3255
3771
  children,
3256
- (action || secondaryAction) && /* @__PURE__ */ jsxs22("div", { className: "mt-1 flex flex-wrap items-center justify-center gap-2", children: [
3772
+ (action || secondaryAction) && /* @__PURE__ */ jsxs29("div", { className: "mt-1 flex flex-wrap items-center justify-center gap-2", children: [
3257
3773
  action,
3258
3774
  secondaryAction
3259
3775
  ] })
@@ -3263,57 +3779,96 @@ var EmptyState = React43.forwardRef(function EmptyState2({ icon, title, descript
3263
3779
  });
3264
3780
 
3265
3781
  // src/components/page-header/PageHeader.tsx
3266
- import * as React44 from "react";
3267
- import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
3268
- var PageHeader = React44.forwardRef(function PageHeader2({ title, description, breadcrumbs, actions, className, children, ...props }, ref) {
3269
- return /* @__PURE__ */ jsxs23("div", { ref, className: cn("flex flex-col gap-2", className), ...props, children: [
3270
- breadcrumbs && /* @__PURE__ */ jsx43("div", { className: "text-sm text-muted-foreground", children: breadcrumbs }),
3271
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
3272
- /* @__PURE__ */ jsxs23("div", { className: "min-w-0", children: [
3273
- /* @__PURE__ */ jsx43("h1", { className: "text-2xl font-semibold tracking-tight", children: title }),
3274
- description && /* @__PURE__ */ jsx43("p", { className: "mt-1 max-w-2xl text-sm text-muted-foreground", children: description })
3782
+ import * as React49 from "react";
3783
+ import { jsx as jsx49, jsxs as jsxs30 } from "react/jsx-runtime";
3784
+ var sizeClasses6 = {
3785
+ sm: "text-xl",
3786
+ md: "text-2xl",
3787
+ lg: "text-3xl",
3788
+ hero: "text-4xl sm:text-5xl lg:text-[3.4rem] lg:leading-[1.1]"
3789
+ };
3790
+ var PageHeader = React49.forwardRef(function PageHeader2({ title, description, breadcrumbs, actions, eyebrow, size = "md", align = "left", className, children, ...props }, ref) {
3791
+ return /* @__PURE__ */ jsxs30("div", { ref, className: cn("flex flex-col gap-2", align === "center" && "items-center text-center", className), ...props, children: [
3792
+ breadcrumbs && /* @__PURE__ */ jsx49("div", { className: "text-sm text-muted-foreground", children: breadcrumbs }),
3793
+ eyebrow && /* @__PURE__ */ jsx49("p", { className: "text-xs font-medium uppercase tracking-wide text-primary", children: eyebrow }),
3794
+ /* @__PURE__ */ jsxs30("div", { className: cn("flex w-full flex-wrap items-start justify-between gap-3", align === "center" && "justify-center"), children: [
3795
+ /* @__PURE__ */ jsxs30("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
3796
+ /* @__PURE__ */ jsx49("h1", { className: cn("font-semibold tracking-tight", sizeClasses6[size]), children: title }),
3797
+ description && /* @__PURE__ */ jsx49("p", { className: "mt-2 max-w-2xl text-base text-muted-foreground", children: description })
3275
3798
  ] }),
3276
- actions && /* @__PURE__ */ jsx43("div", { className: "flex shrink-0 items-center gap-2", children: actions })
3799
+ actions && /* @__PURE__ */ jsx49("div", { className: "flex shrink-0 items-center gap-2", children: actions })
3277
3800
  ] }),
3278
- children && /* @__PURE__ */ jsx43("div", { className: "mt-2", children })
3801
+ children && /* @__PURE__ */ jsx49("div", { className: "mt-2", children })
3279
3802
  ] });
3280
3803
  });
3281
3804
 
3805
+ // src/components/section-heading/SectionHeading.tsx
3806
+ import * as React50 from "react";
3807
+ import { jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
3808
+ var sizeClasses7 = {
3809
+ sm: "text-lg",
3810
+ md: "text-2xl",
3811
+ lg: "text-3xl"
3812
+ };
3813
+ var SectionHeading = React50.forwardRef(function SectionHeading2({ title, description, eyebrow, actions, level = 2, align = "left", size = "md", className, ...props }, ref) {
3814
+ const Heading2 = `h${level}`;
3815
+ return /* @__PURE__ */ jsxs31(
3816
+ "div",
3817
+ {
3818
+ ref,
3819
+ className: cn(
3820
+ "flex flex-col gap-2",
3821
+ align === "center" ? "items-center text-center" : "sm:flex-row sm:items-end sm:justify-between",
3822
+ className
3823
+ ),
3824
+ ...props,
3825
+ children: [
3826
+ /* @__PURE__ */ jsxs31("div", { className: cn("min-w-0", align === "center" && "flex flex-col items-center"), children: [
3827
+ eyebrow && /* @__PURE__ */ jsx50("p", { className: "mb-1 text-xs font-medium uppercase tracking-wide text-primary", children: eyebrow }),
3828
+ /* @__PURE__ */ jsx50(Heading2, { className: cn("font-semibold tracking-tight", sizeClasses7[size]), children: title }),
3829
+ description && /* @__PURE__ */ jsx50("p", { className: cn("mt-2 max-w-2xl text-muted-foreground", align === "center" ? "mx-auto" : ""), children: description })
3830
+ ] }),
3831
+ actions && /* @__PURE__ */ jsx50("div", { className: "flex shrink-0 items-center gap-2", children: actions })
3832
+ ]
3833
+ }
3834
+ );
3835
+ });
3836
+
3282
3837
  // src/components/metric-card/MetricCard.tsx
3283
- import * as React45 from "react";
3284
- import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
3838
+ import * as React51 from "react";
3839
+ import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
3285
3840
  var trendClasses = {
3286
3841
  up: "text-success",
3287
3842
  down: "text-destructive",
3288
3843
  flat: "text-muted-foreground"
3289
3844
  };
3290
3845
  var trendGlyph = { up: "\u2191", down: "\u2193", flat: "\u2192" };
3291
- var MetricCard = React45.forwardRef(function MetricCard2({ label, value, hint, delta, trend = "flat", icon, className, ...props }, ref) {
3292
- return /* @__PURE__ */ jsxs24("div", { ref, className: cn("rounded-xl border border-border bg-card p-5", className), ...props, children: [
3293
- /* @__PURE__ */ jsxs24("div", { className: "flex items-start justify-between gap-3", children: [
3294
- /* @__PURE__ */ jsx44("p", { className: "text-sm text-muted-foreground", children: label }),
3295
- icon && /* @__PURE__ */ jsx44("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
3846
+ var MetricCard = React51.forwardRef(function MetricCard2({ label, value, hint, delta, trend = "flat", icon, className, ...props }, ref) {
3847
+ return /* @__PURE__ */ jsxs32("div", { ref, className: cn("rounded-xl border border-border bg-card p-5", className), ...props, children: [
3848
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-start justify-between gap-3", children: [
3849
+ /* @__PURE__ */ jsx51("p", { className: "text-sm text-muted-foreground", children: label }),
3850
+ icon && /* @__PURE__ */ jsx51("span", { className: "text-muted-foreground [&_svg]:size-4", children: icon })
3296
3851
  ] }),
3297
- /* @__PURE__ */ jsx44("p", { className: "mt-2 text-2xl font-semibold tabular-nums", children: value }),
3298
- (delta || hint) && /* @__PURE__ */ jsxs24("p", { className: "mt-1 flex items-center gap-2 text-sm", children: [
3299
- delta && /* @__PURE__ */ jsxs24("span", { className: cn("font-medium tabular-nums", trendClasses[trend]), children: [
3300
- /* @__PURE__ */ jsx44("span", { "aria-hidden": "true", children: trendGlyph[trend] }),
3852
+ /* @__PURE__ */ jsx51("p", { className: "mt-2 text-2xl font-semibold tabular-nums", children: value }),
3853
+ (delta || hint) && /* @__PURE__ */ jsxs32("p", { className: "mt-1 flex items-center gap-2 text-sm", children: [
3854
+ delta && /* @__PURE__ */ jsxs32("span", { className: cn("font-medium tabular-nums", trendClasses[trend]), children: [
3855
+ /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", children: trendGlyph[trend] }),
3301
3856
  " ",
3302
3857
  delta
3303
3858
  ] }),
3304
- hint && /* @__PURE__ */ jsx44("span", { className: "text-muted-foreground", children: hint })
3859
+ hint && /* @__PURE__ */ jsx51("span", { className: "text-muted-foreground", children: hint })
3305
3860
  ] })
3306
3861
  ] });
3307
3862
  });
3308
3863
 
3309
3864
  // src/components/password-input/PasswordInput.tsx
3310
- import * as React46 from "react";
3311
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
3312
- var PasswordInput = React46.forwardRef(function PasswordInput2({ className, showLabel = "Show password", hideLabel = "Hide password", ...props }, ref) {
3313
- const [visible, setVisible] = React46.useState(false);
3314
- return /* @__PURE__ */ jsxs25("div", { className: cn("relative flex items-center", className), children: [
3315
- /* @__PURE__ */ jsx45(Input, { ref, type: visible ? "text" : "password", className: "pr-24", ...props }),
3316
- /* @__PURE__ */ jsx45(
3865
+ import * as React52 from "react";
3866
+ import { jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
3867
+ var PasswordInput = React52.forwardRef(function PasswordInput2({ className, showLabel = "Show password", hideLabel = "Hide password", ...props }, ref) {
3868
+ const [visible, setVisible] = React52.useState(false);
3869
+ return /* @__PURE__ */ jsxs33("div", { className: cn("relative flex items-center", className), children: [
3870
+ /* @__PURE__ */ jsx52(Input, { ref, type: visible ? "text" : "password", className: "pr-24", ...props }),
3871
+ /* @__PURE__ */ jsx52(
3317
3872
  Button,
3318
3873
  {
3319
3874
  type: "button",
@@ -3330,37 +3885,37 @@ var PasswordInput = React46.forwardRef(function PasswordInput2({ className, show
3330
3885
  });
3331
3886
 
3332
3887
  // src/components/auth-layout/AuthLayout.tsx
3333
- import * as React47 from "react";
3334
- import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3335
- var sizeClasses5 = {
3888
+ import * as React53 from "react";
3889
+ import { jsx as jsx53, jsxs as jsxs34 } from "react/jsx-runtime";
3890
+ var sizeClasses8 = {
3336
3891
  sm: "max-w-sm",
3337
3892
  md: "max-w-md",
3338
3893
  lg: "max-w-lg"
3339
3894
  };
3340
- var AuthLayout = React47.forwardRef(function AuthLayout2({ title, description, brand, footer, children, size = "md", className, ...props }, ref) {
3341
- return /* @__PURE__ */ jsxs26(
3895
+ var AuthLayout = React53.forwardRef(function AuthLayout2({ title, description, brand, footer, children, size = "md", className, ...props }, ref) {
3896
+ return /* @__PURE__ */ jsxs34(
3342
3897
  "div",
3343
3898
  {
3344
3899
  ref,
3345
3900
  className: cn("flex min-h-screen flex-col items-center justify-center bg-muted/30 px-4 py-12", className),
3346
3901
  ...props,
3347
3902
  children: [
3348
- brand && /* @__PURE__ */ jsx46("div", { className: "mb-6", children: brand }),
3349
- /* @__PURE__ */ jsxs26("div", { className: cn("w-full rounded-xl border border-border bg-card p-6 shadow-sm sm:p-8", sizeClasses5[size]), children: [
3350
- /* @__PURE__ */ jsx46("h1", { className: "text-xl font-semibold tracking-tight", children: title }),
3351
- description && /* @__PURE__ */ jsx46("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
3352
- /* @__PURE__ */ jsx46("div", { className: "mt-6", children })
3903
+ brand && /* @__PURE__ */ jsx53("div", { className: "mb-6", children: brand }),
3904
+ /* @__PURE__ */ jsxs34("div", { className: cn("w-full rounded-xl border border-border bg-card p-6 shadow-sm sm:p-8", sizeClasses8[size]), children: [
3905
+ /* @__PURE__ */ jsx53("h1", { className: "text-xl font-semibold tracking-tight", children: title }),
3906
+ description && /* @__PURE__ */ jsx53("p", { className: "mt-1 text-sm text-muted-foreground", children: description }),
3907
+ /* @__PURE__ */ jsx53("div", { className: "mt-6", children })
3353
3908
  ] }),
3354
- footer && /* @__PURE__ */ jsx46("div", { className: "mt-6 text-center text-sm text-muted-foreground", children: footer })
3909
+ footer && /* @__PURE__ */ jsx53("div", { className: "mt-6 text-center text-sm text-muted-foreground", children: footer })
3355
3910
  ]
3356
3911
  }
3357
3912
  );
3358
3913
  });
3359
3914
 
3360
3915
  // src/components/filter-bar/FilterBar.tsx
3361
- import * as React48 from "react";
3362
- import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3363
- var FilterBar = React48.forwardRef(function FilterBar2({
3916
+ import * as React54 from "react";
3917
+ import { jsx as jsx54, jsxs as jsxs35 } from "react/jsx-runtime";
3918
+ var FilterBar = React54.forwardRef(function FilterBar2({
3364
3919
  searchValue,
3365
3920
  onSearchChange,
3366
3921
  searchPlaceholder = "Search\u2026",
@@ -3371,7 +3926,7 @@ var FilterBar = React48.forwardRef(function FilterBar2({
3371
3926
  children,
3372
3927
  ...props
3373
3928
  }, ref) {
3374
- return /* @__PURE__ */ jsxs27(
3929
+ return /* @__PURE__ */ jsxs35(
3375
3930
  "div",
3376
3931
  {
3377
3932
  ref,
@@ -3382,7 +3937,7 @@ var FilterBar = React48.forwardRef(function FilterBar2({
3382
3937
  ),
3383
3938
  ...props,
3384
3939
  children: [
3385
- onSearchChange !== void 0 && /* @__PURE__ */ jsx47(
3940
+ onSearchChange !== void 0 && /* @__PURE__ */ jsx54(
3386
3941
  Input,
3387
3942
  {
3388
3943
  type: "search",
@@ -3393,29 +3948,29 @@ var FilterBar = React48.forwardRef(function FilterBar2({
3393
3948
  className: "h-9 w-full min-w-40 flex-1 sm:w-auto"
3394
3949
  }
3395
3950
  ),
3396
- /* @__PURE__ */ jsx47("div", { className: "flex flex-wrap items-center gap-2", children }),
3397
- onReset && /* @__PURE__ */ jsxs27(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, children: [
3951
+ /* @__PURE__ */ jsx54("div", { className: "flex flex-wrap items-center gap-2", children }),
3952
+ onReset && /* @__PURE__ */ jsxs35(Button, { type: "button", variant: "ghost", size: "sm", onClick: onReset, children: [
3398
3953
  "Reset",
3399
3954
  activeCount > 0 ? ` (${activeCount})` : ""
3400
3955
  ] }),
3401
- trailing && /* @__PURE__ */ jsx47("div", { className: "ml-auto flex items-center gap-2", children: trailing })
3956
+ trailing && /* @__PURE__ */ jsx54("div", { className: "ml-auto flex items-center gap-2", children: trailing })
3402
3957
  ]
3403
3958
  }
3404
3959
  );
3405
3960
  });
3406
3961
 
3407
3962
  // src/components/date-picker/DatePicker.tsx
3408
- import * as React49 from "react";
3409
- import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3410
- var DatePicker = React49.forwardRef(function DatePicker2({ value, defaultValue, onValueChange, clearable = false, className, ...props }, ref) {
3411
- const [internal, setInternal] = React49.useState(defaultValue ?? "");
3963
+ import * as React55 from "react";
3964
+ import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
3965
+ var DatePicker = React55.forwardRef(function DatePicker2({ value, defaultValue, onValueChange, clearable = false, className, ...props }, ref) {
3966
+ const [internal, setInternal] = React55.useState(defaultValue ?? "");
3412
3967
  const current = value ?? internal;
3413
3968
  const commit = (next) => {
3414
3969
  if (value === void 0) setInternal(next);
3415
3970
  onValueChange?.(next);
3416
3971
  };
3417
- return /* @__PURE__ */ jsxs28("div", { className: cn("relative flex items-center", className), children: [
3418
- /* @__PURE__ */ jsx48(
3972
+ return /* @__PURE__ */ jsxs36("div", { className: cn("relative flex items-center", className), children: [
3973
+ /* @__PURE__ */ jsx55(
3419
3974
  Input,
3420
3975
  {
3421
3976
  ref,
@@ -3426,7 +3981,7 @@ var DatePicker = React49.forwardRef(function DatePicker2({ value, defaultValue,
3426
3981
  ...props
3427
3982
  }
3428
3983
  ),
3429
- clearable && current && /* @__PURE__ */ jsx48(
3984
+ clearable && current && /* @__PURE__ */ jsx55(
3430
3985
  "button",
3431
3986
  {
3432
3987
  type: "button",
@@ -3440,17 +3995,17 @@ var DatePicker = React49.forwardRef(function DatePicker2({ value, defaultValue,
3440
3995
  });
3441
3996
 
3442
3997
  // src/components/time-picker/TimePicker.tsx
3443
- import * as React50 from "react";
3444
- import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
3445
- var TimePicker = React50.forwardRef(function TimePicker2({ value, defaultValue, onValueChange, clearable = false, className, ...props }, ref) {
3446
- const [internal, setInternal] = React50.useState(defaultValue ?? "");
3998
+ import * as React56 from "react";
3999
+ import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
4000
+ var TimePicker = React56.forwardRef(function TimePicker2({ value, defaultValue, onValueChange, clearable = false, className, ...props }, ref) {
4001
+ const [internal, setInternal] = React56.useState(defaultValue ?? "");
3447
4002
  const current = value ?? internal;
3448
4003
  const commit = (next) => {
3449
4004
  if (value === void 0) setInternal(next);
3450
4005
  onValueChange?.(next);
3451
4006
  };
3452
- return /* @__PURE__ */ jsxs29("div", { className: cn("relative flex items-center", className), children: [
3453
- /* @__PURE__ */ jsx49(
4007
+ return /* @__PURE__ */ jsxs37("div", { className: cn("relative flex items-center", className), children: [
4008
+ /* @__PURE__ */ jsx56(
3454
4009
  Input,
3455
4010
  {
3456
4011
  ref,
@@ -3461,7 +4016,7 @@ var TimePicker = React50.forwardRef(function TimePicker2({ value, defaultValue,
3461
4016
  ...props
3462
4017
  }
3463
4018
  ),
3464
- clearable && current && /* @__PURE__ */ jsx49(
4019
+ clearable && current && /* @__PURE__ */ jsx56(
3465
4020
  "button",
3466
4021
  {
3467
4022
  type: "button",
@@ -3475,10 +4030,10 @@ var TimePicker = React50.forwardRef(function TimePicker2({ value, defaultValue,
3475
4030
  });
3476
4031
 
3477
4032
  // src/components/stepper/Stepper.tsx
3478
- import * as React51 from "react";
3479
- import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
3480
- var Stepper = React51.forwardRef(function Stepper2({ steps, current, orientation = "horizontal", onStepClick, className, ...props }, ref) {
3481
- return /* @__PURE__ */ jsx50(
4033
+ import * as React57 from "react";
4034
+ import { Fragment as Fragment9, jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
4035
+ var Stepper = React57.forwardRef(function Stepper2({ steps, current, orientation = "horizontal", onStepClick, className, ...props }, ref) {
4036
+ return /* @__PURE__ */ jsx57(
3482
4037
  "ol",
3483
4038
  {
3484
4039
  ref,
@@ -3491,8 +4046,8 @@ var Stepper = React51.forwardRef(function Stepper2({ steps, current, orientation
3491
4046
  children: steps.map((step, index) => {
3492
4047
  const state = index < current ? "complete" : index === current ? "current" : "upcoming";
3493
4048
  const interactive = Boolean(onStepClick);
3494
- const content = /* @__PURE__ */ jsxs30(Fragment6, { children: [
3495
- /* @__PURE__ */ jsx50(
4049
+ const content = /* @__PURE__ */ jsxs38(Fragment9, { children: [
4050
+ /* @__PURE__ */ jsx57(
3496
4051
  "span",
3497
4052
  {
3498
4053
  "aria-hidden": "true",
@@ -3505,14 +4060,14 @@ var Stepper = React51.forwardRef(function Stepper2({ steps, current, orientation
3505
4060
  children: state === "complete" ? "\u2713" : index + 1
3506
4061
  }
3507
4062
  ),
3508
- /* @__PURE__ */ jsxs30("span", { className: "min-w-0", children: [
3509
- /* @__PURE__ */ jsx50("span", { className: cn("block text-sm", state === "upcoming" ? "text-muted-foreground" : "font-medium"), children: step.label }),
3510
- step.description && /* @__PURE__ */ jsx50("span", { className: "block text-xs text-muted-foreground", children: step.description }),
3511
- /* @__PURE__ */ jsx50("span", { className: "sr-only", children: state === "complete" ? " (completed)" : state === "current" ? " (current step)" : " (upcoming)" })
4063
+ /* @__PURE__ */ jsxs38("span", { className: "min-w-0", children: [
4064
+ /* @__PURE__ */ jsx57("span", { className: cn("block text-sm", state === "upcoming" ? "text-muted-foreground" : "font-medium"), children: step.label }),
4065
+ step.description && /* @__PURE__ */ jsx57("span", { className: "block text-xs text-muted-foreground", children: step.description }),
4066
+ /* @__PURE__ */ jsx57("span", { className: "sr-only", children: state === "complete" ? " (completed)" : state === "current" ? " (current step)" : " (upcoming)" })
3512
4067
  ] })
3513
4068
  ] });
3514
- return /* @__PURE__ */ jsxs30("li", { className: "flex min-w-0 items-start gap-2", children: [
3515
- interactive ? /* @__PURE__ */ jsx50(
4069
+ return /* @__PURE__ */ jsxs38("li", { className: "flex min-w-0 items-start gap-2", children: [
4070
+ interactive ? /* @__PURE__ */ jsx57(
3516
4071
  "button",
3517
4072
  {
3518
4073
  type: "button",
@@ -3521,8 +4076,8 @@ var Stepper = React51.forwardRef(function Stepper2({ steps, current, orientation
3521
4076
  className: "flex items-start gap-2 rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3522
4077
  children: content
3523
4078
  }
3524
- ) : /* @__PURE__ */ jsx50("div", { "aria-current": state === "current" ? "step" : void 0, className: "flex items-start gap-2", children: content }),
3525
- orientation === "horizontal" && index < steps.length - 1 && /* @__PURE__ */ jsx50("span", { "aria-hidden": "true", className: "mt-3.5 hidden h-px w-8 bg-border sm:block" })
4079
+ ) : /* @__PURE__ */ jsx57("div", { "aria-current": state === "current" ? "step" : void 0, className: "flex items-start gap-2", children: content }),
4080
+ orientation === "horizontal" && index < steps.length - 1 && /* @__PURE__ */ jsx57("span", { "aria-hidden": "true", className: "mt-3.5 hidden h-px w-8 bg-border sm:block" })
3526
4081
  ] }, step.label);
3527
4082
  })
3528
4083
  }
@@ -3530,14 +4085,14 @@ var Stepper = React51.forwardRef(function Stepper2({ steps, current, orientation
3530
4085
  });
3531
4086
 
3532
4087
  // src/components/file-upload/FileUpload.tsx
3533
- import * as React52 from "react";
3534
- import { jsx as jsx51, jsxs as jsxs31 } from "react/jsx-runtime";
4088
+ import * as React58 from "react";
4089
+ import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
3535
4090
  function formatSize(bytes) {
3536
4091
  if (bytes < 1024) return `${bytes} B`;
3537
4092
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
3538
4093
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
3539
4094
  }
3540
- var FileUpload = React52.forwardRef(function FileUpload2({
4095
+ var FileUpload = React58.forwardRef(function FileUpload2({
3541
4096
  files,
3542
4097
  defaultFiles,
3543
4098
  onFilesChange,
@@ -3551,10 +4106,10 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3551
4106
  id,
3552
4107
  ...props
3553
4108
  }, ref) {
3554
- const [internal, setInternal] = React52.useState(defaultFiles ?? []);
3555
- const [dragging, setDragging] = React52.useState(false);
4109
+ const [internal, setInternal] = React58.useState(defaultFiles ?? []);
4110
+ const [dragging, setDragging] = React58.useState(false);
3556
4111
  const current = files ?? internal;
3557
- const generatedId = React52.useId();
4112
+ const generatedId = React58.useId();
3558
4113
  const inputId = id ?? generatedId;
3559
4114
  const commit = (next) => {
3560
4115
  if (files === void 0) setInternal(next);
@@ -3565,8 +4120,8 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3565
4120
  const list = Array.from(incoming);
3566
4121
  commit(multiple ? [...current, ...list] : list.slice(0, 1));
3567
4122
  };
3568
- return /* @__PURE__ */ jsxs31("div", { className: cn("flex flex-col gap-3", className), children: [
3569
- /* @__PURE__ */ jsxs31(
4123
+ return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col gap-3", className), children: [
4124
+ /* @__PURE__ */ jsxs39(
3570
4125
  "div",
3571
4126
  {
3572
4127
  onDragOver: (event) => {
@@ -3587,9 +4142,9 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3587
4142
  disabled && "opacity-50"
3588
4143
  ),
3589
4144
  children: [
3590
- /* @__PURE__ */ jsxs31("label", { htmlFor: inputId, className: cn("block text-sm", disabled ? "cursor-not-allowed" : "cursor-pointer"), children: [
4145
+ /* @__PURE__ */ jsxs39("label", { htmlFor: inputId, className: cn("block text-sm", disabled ? "cursor-not-allowed" : "cursor-pointer"), children: [
3591
4146
  label,
3592
- /* @__PURE__ */ jsx51(
4147
+ /* @__PURE__ */ jsx58(
3593
4148
  "input",
3594
4149
  {
3595
4150
  ref,
@@ -3607,15 +4162,15 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3607
4162
  }
3608
4163
  )
3609
4164
  ] }),
3610
- /* @__PURE__ */ jsx51("p", { className: "mt-1 text-xs text-muted-foreground", children: hint ?? (accept ? `Accepted: ${accept}` : "Any file type") })
4165
+ /* @__PURE__ */ jsx58("p", { className: "mt-1 text-xs text-muted-foreground", children: hint ?? (accept ? `Accepted: ${accept}` : "Any file type") })
3611
4166
  ]
3612
4167
  }
3613
4168
  ),
3614
- current.length > 0 && /* @__PURE__ */ jsx51("ul", { "aria-label": "Selected files", className: "space-y-2", children: current.map((file) => /* @__PURE__ */ jsxs31("li", { className: "flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2", children: [
3615
- /* @__PURE__ */ jsxs31("div", { className: "min-w-0", children: [
3616
- /* @__PURE__ */ jsx51("p", { className: "truncate text-sm", children: file.name }),
3617
- /* @__PURE__ */ jsx51("p", { className: "text-xs text-muted-foreground", children: formatSize(file.size) }),
3618
- progress?.[file.name] !== void 0 && /* @__PURE__ */ jsx51(
4169
+ current.length > 0 && /* @__PURE__ */ jsx58("ul", { "aria-label": "Selected files", className: "space-y-2", children: current.map((file) => /* @__PURE__ */ jsxs39("li", { className: "flex items-center justify-between gap-3 rounded-md border border-border px-3 py-2", children: [
4170
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0", children: [
4171
+ /* @__PURE__ */ jsx58("p", { className: "truncate text-sm", children: file.name }),
4172
+ /* @__PURE__ */ jsx58("p", { className: "text-xs text-muted-foreground", children: formatSize(file.size) }),
4173
+ progress?.[file.name] !== void 0 && /* @__PURE__ */ jsx58(
3619
4174
  "div",
3620
4175
  {
3621
4176
  role: "progressbar",
@@ -3624,11 +4179,11 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3624
4179
  "aria-valuemax": 100,
3625
4180
  "aria-label": `Uploading ${file.name}`,
3626
4181
  className: "mt-1 h-1.5 w-40 overflow-hidden rounded-full bg-muted",
3627
- children: /* @__PURE__ */ jsx51("div", { className: "h-full bg-primary", style: { width: `${progress[file.name]}%` } })
4182
+ children: /* @__PURE__ */ jsx58("div", { className: "h-full bg-primary", style: { width: `${progress[file.name]}%` } })
3628
4183
  }
3629
4184
  )
3630
4185
  ] }),
3631
- /* @__PURE__ */ jsx51(
4186
+ /* @__PURE__ */ jsx58(
3632
4187
  "button",
3633
4188
  {
3634
4189
  type: "button",
@@ -3643,12 +4198,12 @@ var FileUpload = React52.forwardRef(function FileUpload2({
3643
4198
  });
3644
4199
 
3645
4200
  // src/components/timeline/Timeline.tsx
3646
- import * as React53 from "react";
3647
- import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
3648
- var Timeline = React53.forwardRef(function Timeline2({ items, className, ...props }, ref) {
3649
- return /* @__PURE__ */ jsx52("ol", { ref, className: cn("relative flex flex-col gap-6", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs32("li", { className: "relative flex gap-4", children: [
3650
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center", children: [
3651
- /* @__PURE__ */ jsx52(
4201
+ import * as React59 from "react";
4202
+ import { jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
4203
+ var Timeline = React59.forwardRef(function Timeline2({ items, className, ...props }, ref) {
4204
+ return /* @__PURE__ */ jsx59("ol", { ref, className: cn("relative flex flex-col gap-6", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs40("li", { className: "relative flex gap-4", children: [
4205
+ /* @__PURE__ */ jsxs40("div", { className: "flex flex-col items-center", children: [
4206
+ /* @__PURE__ */ jsx59(
3652
4207
  "span",
3653
4208
  {
3654
4209
  "aria-hidden": "true",
@@ -3658,24 +4213,24 @@ var Timeline = React53.forwardRef(function Timeline2({ items, className, ...prop
3658
4213
  )
3659
4214
  }
3660
4215
  ),
3661
- index < items.length - 1 && /* @__PURE__ */ jsx52("span", { "aria-hidden": "true", className: "mt-1 w-px flex-1 bg-border" })
4216
+ index < items.length - 1 && /* @__PURE__ */ jsx59("span", { "aria-hidden": "true", className: "mt-1 w-px flex-1 bg-border" })
3662
4217
  ] }),
3663
- /* @__PURE__ */ jsxs32("div", { className: cn("min-w-0 pb-1", item.muted && "opacity-60"), children: [
3664
- item.period && /* @__PURE__ */ jsx52("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: item.period }),
3665
- /* @__PURE__ */ jsx52("p", { className: "text-sm font-semibold", children: item.title }),
3666
- item.description && /* @__PURE__ */ jsx52("p", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
3667
- item.icon && /* @__PURE__ */ jsx52("div", { className: "mt-1 text-muted-foreground [&_svg]:size-4", children: item.icon })
4218
+ /* @__PURE__ */ jsxs40("div", { className: cn("min-w-0 pb-1", item.muted && "opacity-60"), children: [
4219
+ item.period && /* @__PURE__ */ jsx59("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: item.period }),
4220
+ /* @__PURE__ */ jsx59("p", { className: "text-sm font-semibold", children: item.title }),
4221
+ item.description && /* @__PURE__ */ jsx59("p", { className: "mt-1 text-sm text-muted-foreground", children: item.description }),
4222
+ item.icon && /* @__PURE__ */ jsx59("div", { className: "mt-1 text-muted-foreground [&_svg]:size-4", children: item.icon })
3668
4223
  ] })
3669
4224
  ] }, `${item.title}-${index}`)) });
3670
4225
  });
3671
4226
 
3672
4227
  // src/components/block/Block.tsx
3673
- import * as React54 from "react";
3674
- import { jsx as jsx53 } from "react/jsx-runtime";
3675
- var Block = React54.forwardRef(
4228
+ import * as React60 from "react";
4229
+ import { jsx as jsx60 } from "react/jsx-runtime";
4230
+ var Block = React60.forwardRef(
3676
4231
  ({ as = "div", inline, muted, className, ...props }, ref) => {
3677
4232
  const Tag = inline ? "span" : as;
3678
- return /* @__PURE__ */ jsx53(
4233
+ return /* @__PURE__ */ jsx60(
3679
4234
  Tag,
3680
4235
  {
3681
4236
  ref,
@@ -3688,8 +4243,8 @@ var Block = React54.forwardRef(
3688
4243
  Block.displayName = "Block";
3689
4244
 
3690
4245
  // src/components/flex/Flex.tsx
3691
- import * as React55 from "react";
3692
- import { jsx as jsx54 } from "react/jsx-runtime";
4246
+ import * as React61 from "react";
4247
+ import { jsx as jsx61 } from "react/jsx-runtime";
3693
4248
  var justifyClasses = {
3694
4249
  start: "justify-start",
3695
4250
  center: "justify-center",
@@ -3705,11 +4260,11 @@ var alignClasses = {
3705
4260
  stretch: "items-stretch",
3706
4261
  baseline: "items-baseline"
3707
4262
  };
3708
- var Flex = React55.forwardRef(
4263
+ var Flex = React61.forwardRef(
3709
4264
  ({ direction = "row", align, justify, wrap, gap = "md", as = "div", className, style, ...props }, ref) => {
3710
4265
  const Tag = as;
3711
4266
  const gapResolved = resolveGap(gap);
3712
- return /* @__PURE__ */ jsx54(
4267
+ return /* @__PURE__ */ jsx61(
3713
4268
  Tag,
3714
4269
  {
3715
4270
  ref,
@@ -3736,7 +4291,7 @@ var selfAlignClasses = {
3736
4291
  stretch: "self-stretch",
3737
4292
  baseline: "self-baseline"
3738
4293
  };
3739
- var FlexItem = React55.forwardRef(
4294
+ var FlexItem = React61.forwardRef(
3740
4295
  ({ grow, shrink, basis, align, as = "div", className, ...props }, ref) => {
3741
4296
  const Tag = as;
3742
4297
  const style = {
@@ -3744,7 +4299,7 @@ var FlexItem = React55.forwardRef(
3744
4299
  ...shrink === false ? { flexShrink: 0 } : typeof shrink === "string" && shrink ? { flexShrink: Number(shrink) || shrink } : {},
3745
4300
  ...basis ? { flexBasis: basis } : {}
3746
4301
  };
3747
- return /* @__PURE__ */ jsx54(
4302
+ return /* @__PURE__ */ jsx61(
3748
4303
  Tag,
3749
4304
  {
3750
4305
  ref,
@@ -3758,8 +4313,8 @@ var FlexItem = React55.forwardRef(
3758
4313
  FlexItem.displayName = "FlexItem";
3759
4314
 
3760
4315
  // src/components/grid/Grid.tsx
3761
- import * as React56 from "react";
3762
- import { jsx as jsx55 } from "react/jsx-runtime";
4316
+ import * as React62 from "react";
4317
+ import { jsx as jsx62 } from "react/jsx-runtime";
3763
4318
  var BASE_COLS = {
3764
4319
  1: "grid-cols-1",
3765
4320
  2: "grid-cols-2",
@@ -3824,11 +4379,11 @@ var LG_COL_SPAN = {
3824
4379
  5: "lg:col-span-5",
3825
4380
  6: "lg:col-span-6"
3826
4381
  };
3827
- var Grid = React56.forwardRef(
4382
+ var Grid = React62.forwardRef(
3828
4383
  ({ cols, smCols, mdCols, lgCols, minCol, gap = "md", as = "div", className, style, ...props }, ref) => {
3829
4384
  const Tag = as;
3830
4385
  const gapResolved = resolveGap(gap);
3831
- return /* @__PURE__ */ jsx55(
4386
+ return /* @__PURE__ */ jsx62(
3832
4387
  Tag,
3833
4388
  {
3834
4389
  ref,
@@ -3852,10 +4407,10 @@ var Grid = React56.forwardRef(
3852
4407
  }
3853
4408
  );
3854
4409
  Grid.displayName = "Grid";
3855
- var GridItem = React56.forwardRef(
4410
+ var GridItem = React62.forwardRef(
3856
4411
  ({ span, smSpan, mdSpan, lgSpan, as = "div", className, ...props }, ref) => {
3857
4412
  const Tag = as;
3858
- return /* @__PURE__ */ jsx55(
4413
+ return /* @__PURE__ */ jsx62(
3859
4414
  Tag,
3860
4415
  {
3861
4416
  ref,
@@ -3874,11 +4429,11 @@ var GridItem = React56.forwardRef(
3874
4429
  GridItem.displayName = "GridItem";
3875
4430
 
3876
4431
  // src/components/menu/Menu.tsx
3877
- import * as React57 from "react";
4432
+ import * as React63 from "react";
3878
4433
  import { createPortal as createPortal7 } from "react-dom";
3879
- import { Slot as Slot4 } from "@radix-ui/react-slot";
3880
- import { jsx as jsx56 } from "react/jsx-runtime";
3881
- var MenuContext = React57.createContext({
4434
+ import { Slot as Slot5 } from "@radix-ui/react-slot";
4435
+ import { jsx as jsx63 } from "react/jsx-runtime";
4436
+ var MenuContext = React63.createContext({
3882
4437
  open: false,
3883
4438
  setOpen: () => {
3884
4439
  },
@@ -3887,13 +4442,13 @@ var MenuContext = React57.createContext({
3887
4442
  },
3888
4443
  wrapperRef: { current: null }
3889
4444
  });
3890
- var Menu = React57.forwardRef(
4445
+ var Menu = React63.forwardRef(
3891
4446
  ({ open, onOpenChange, className, children }, ref) => {
3892
- const [internalOpen, setInternalOpen] = React57.useState(false);
3893
- const [activeIndex, setActiveIndex] = React57.useState(-1);
4447
+ const [internalOpen, setInternalOpen] = React63.useState(false);
4448
+ const [activeIndex, setActiveIndex] = React63.useState(-1);
3894
4449
  const current = open ?? internalOpen;
3895
- const wrapperRef = React57.useRef(null);
3896
- const setRefs = React57.useCallback(
4450
+ const wrapperRef = React63.useRef(null);
4451
+ const setRefs = React63.useCallback(
3897
4452
  (node) => {
3898
4453
  wrapperRef.current = node;
3899
4454
  if (typeof ref === "function") ref(node);
@@ -3901,7 +4456,7 @@ var Menu = React57.forwardRef(
3901
4456
  },
3902
4457
  [ref]
3903
4458
  );
3904
- const setOpen = React57.useCallback(
4459
+ const setOpen = React63.useCallback(
3905
4460
  (next) => {
3906
4461
  if (open === void 0) setInternalOpen(next);
3907
4462
  onOpenChange?.(next);
@@ -3909,7 +4464,7 @@ var Menu = React57.forwardRef(
3909
4464
  },
3910
4465
  [open, onOpenChange]
3911
4466
  );
3912
- return /* @__PURE__ */ jsx56("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx56(
4467
+ return /* @__PURE__ */ jsx63("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx63(
3913
4468
  MenuContext.Provider,
3914
4469
  {
3915
4470
  value: { open: current, setOpen, activeIndex, setActiveIndex, wrapperRef },
@@ -3919,10 +4474,10 @@ var Menu = React57.forwardRef(
3919
4474
  }
3920
4475
  );
3921
4476
  Menu.displayName = "Menu";
3922
- var MenuTrigger = React57.forwardRef(
4477
+ var MenuTrigger = React63.forwardRef(
3923
4478
  ({ className, children, ...props }, ref) => {
3924
- const { open, setOpen } = React57.useContext(MenuContext);
3925
- return /* @__PURE__ */ jsx56(
4479
+ const { open, setOpen } = React63.useContext(MenuContext);
4480
+ return /* @__PURE__ */ jsx63(
3926
4481
  "button",
3927
4482
  {
3928
4483
  ref,
@@ -3942,13 +4497,13 @@ var MenuTrigger = React57.forwardRef(
3942
4497
  }
3943
4498
  );
3944
4499
  MenuTrigger.displayName = "MenuTrigger";
3945
- var MenuContent = React57.forwardRef(
4500
+ var MenuContent = React63.forwardRef(
3946
4501
  ({ className, children, ...props }, ref) => {
3947
- const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } = React57.useContext(MenuContext);
3948
- const contentRef = React57.useRef(null);
3949
- const [pos, setPos] = React57.useState(null);
3950
- const itemsRef = React57.useRef([]);
3951
- React57.useLayoutEffect(() => {
4502
+ const { open, setOpen, activeIndex, setActiveIndex, wrapperRef } = React63.useContext(MenuContext);
4503
+ const contentRef = React63.useRef(null);
4504
+ const [pos, setPos] = React63.useState(null);
4505
+ const itemsRef = React63.useRef([]);
4506
+ React63.useLayoutEffect(() => {
3952
4507
  if (!open) {
3953
4508
  setPos(null);
3954
4509
  return;
@@ -3968,7 +4523,7 @@ var MenuContent = React57.forwardRef(
3968
4523
  window.removeEventListener("resize", measure);
3969
4524
  };
3970
4525
  }, [open, setOpen, wrapperRef]);
3971
- React57.useEffect(() => {
4526
+ React63.useEffect(() => {
3972
4527
  if (!open) return;
3973
4528
  function onPointerDown(event) {
3974
4529
  if (!contentRef.current?.contains(event.target)) setOpen(false);
@@ -3976,7 +4531,7 @@ var MenuContent = React57.forwardRef(
3976
4531
  document.addEventListener("pointerdown", onPointerDown);
3977
4532
  return () => document.removeEventListener("pointerdown", onPointerDown);
3978
4533
  }, [open, setOpen]);
3979
- React57.useEffect(() => {
4534
+ React63.useEffect(() => {
3980
4535
  if (open && pos && contentRef.current) {
3981
4536
  itemsRef.current = Array.from(
3982
4537
  contentRef.current.querySelectorAll('[role="menuitem"]:not([disabled])')
@@ -4012,7 +4567,7 @@ var MenuContent = React57.forwardRef(
4012
4567
  };
4013
4568
  if (!open || !pos || typeof document === "undefined") return null;
4014
4569
  return createPortal7(
4015
- /* @__PURE__ */ jsx56(
4570
+ /* @__PURE__ */ jsx63(
4016
4571
  "div",
4017
4572
  {
4018
4573
  ref: (node) => {
@@ -4036,12 +4591,12 @@ var MenuContent = React57.forwardRef(
4036
4591
  }
4037
4592
  );
4038
4593
  MenuContent.displayName = "MenuContent";
4039
- var MenuItem = React57.forwardRef(
4594
+ var MenuItem = React63.forwardRef(
4040
4595
  ({ className, destructive, asChild = false, onClick, ...props }, ref) => {
4041
- const { setOpen } = React57.useContext(MenuContext);
4042
- const Comp = asChild ? Slot4 : "button";
4596
+ const { setOpen } = React63.useContext(MenuContext);
4597
+ const Comp = asChild ? Slot5 : "button";
4043
4598
  const typeProp = asChild ? {} : { type: "button" };
4044
- return /* @__PURE__ */ jsx56(
4599
+ return /* @__PURE__ */ jsx63(
4045
4600
  Comp,
4046
4601
  {
4047
4602
  ref,
@@ -4063,12 +4618,12 @@ var MenuItem = React57.forwardRef(
4063
4618
  }
4064
4619
  );
4065
4620
  MenuItem.displayName = "MenuItem";
4066
- var MenuSeparator = React57.forwardRef(
4067
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx56("div", { ref, role: "separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props })
4621
+ var MenuSeparator = React63.forwardRef(
4622
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx63("div", { ref, role: "separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props })
4068
4623
  );
4069
4624
  MenuSeparator.displayName = "MenuSeparator";
4070
- var MenuLabel = React57.forwardRef(
4071
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx56(
4625
+ var MenuLabel = React63.forwardRef(
4626
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx63(
4072
4627
  "div",
4073
4628
  {
4074
4629
  ref,
@@ -4080,10 +4635,10 @@ var MenuLabel = React57.forwardRef(
4080
4635
  MenuLabel.displayName = "MenuLabel";
4081
4636
 
4082
4637
  // src/components/alert/Alert.tsx
4083
- import * as React58 from "react";
4084
- import { cva as cva6 } from "class-variance-authority";
4085
- import { jsx as jsx57 } from "react/jsx-runtime";
4086
- var alertVariants = cva6(
4638
+ import * as React64 from "react";
4639
+ import { cva as cva7 } from "class-variance-authority";
4640
+ import { jsx as jsx64 } from "react/jsx-runtime";
4641
+ var alertVariants = cva7(
4087
4642
  "relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
4088
4643
  {
4089
4644
  variants: {
@@ -4091,8 +4646,8 @@ var alertVariants = cva6(
4091
4646
  default: "bg-background text-foreground border-border",
4092
4647
  destructive: "border-destructive/50 text-destructive bg-destructive/10 [&>svg]:text-destructive",
4093
4648
  success: "border-success/50 text-success bg-success/10 [&>svg]:text-success",
4094
- warning: "border-warning/50 text-warning bg-warning/10 [&>svg]:text-warning",
4095
- info: "border-info/50 text-info bg-info/10 [&>svg]:text-info"
4649
+ warning: "border-warning/50 text-warning-ink bg-warning/10 [&>svg]:text-warning-ink",
4650
+ info: "border-info/50 text-info-ink bg-info/10 [&>svg]:text-info-ink"
4096
4651
  }
4097
4652
  },
4098
4653
  defaultVariants: {
@@ -4100,8 +4655,8 @@ var alertVariants = cva6(
4100
4655
  }
4101
4656
  }
4102
4657
  );
4103
- var Alert = React58.forwardRef(
4104
- ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx57(
4658
+ var Alert = React64.forwardRef(
4659
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx64(
4105
4660
  "div",
4106
4661
  {
4107
4662
  ref,
@@ -4112,8 +4667,8 @@ var Alert = React58.forwardRef(
4112
4667
  )
4113
4668
  );
4114
4669
  Alert.displayName = "Alert";
4115
- var AlertTitle = React58.forwardRef(
4116
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
4670
+ var AlertTitle = React64.forwardRef(
4671
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx64(
4117
4672
  "h5",
4118
4673
  {
4119
4674
  ref,
@@ -4123,8 +4678,8 @@ var AlertTitle = React58.forwardRef(
4123
4678
  )
4124
4679
  );
4125
4680
  AlertTitle.displayName = "AlertTitle";
4126
- var AlertDescription = React58.forwardRef(
4127
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx57(
4681
+ var AlertDescription = React64.forwardRef(
4682
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx64(
4128
4683
  "div",
4129
4684
  {
4130
4685
  ref,
@@ -4136,10 +4691,10 @@ var AlertDescription = React58.forwardRef(
4136
4691
  AlertDescription.displayName = "AlertDescription";
4137
4692
 
4138
4693
  // src/components/popover/Popover.tsx
4139
- import * as React59 from "react";
4694
+ import * as React65 from "react";
4140
4695
  import { createPortal as createPortal8 } from "react-dom";
4141
- import { jsx as jsx58 } from "react/jsx-runtime";
4142
- var PopoverContext = React59.createContext({
4696
+ import { jsx as jsx65 } from "react/jsx-runtime";
4697
+ var PopoverContext = React65.createContext({
4143
4698
  open: false,
4144
4699
  setOpen: () => {
4145
4700
  },
@@ -4147,14 +4702,14 @@ var PopoverContext = React59.createContext({
4147
4702
  contentId: "",
4148
4703
  wrapperRef: { current: null }
4149
4704
  });
4150
- var Popover = React59.forwardRef(
4705
+ var Popover = React65.forwardRef(
4151
4706
  ({ open, onOpenChange, className, children }, ref) => {
4152
- const [internalOpen, setInternalOpen] = React59.useState(false);
4707
+ const [internalOpen, setInternalOpen] = React65.useState(false);
4153
4708
  const current = open ?? internalOpen;
4154
- const triggerId = React59.useId();
4155
- const contentId = React59.useId();
4156
- const wrapperRef = React59.useRef(null);
4157
- const setRefs = React59.useCallback(
4709
+ const triggerId = React65.useId();
4710
+ const contentId = React65.useId();
4711
+ const wrapperRef = React65.useRef(null);
4712
+ const setRefs = React65.useCallback(
4158
4713
  (node) => {
4159
4714
  wrapperRef.current = node;
4160
4715
  if (typeof ref === "function") ref(node);
@@ -4162,14 +4717,14 @@ var Popover = React59.forwardRef(
4162
4717
  },
4163
4718
  [ref]
4164
4719
  );
4165
- const setOpen = React59.useCallback(
4720
+ const setOpen = React65.useCallback(
4166
4721
  (next) => {
4167
4722
  if (open === void 0) setInternalOpen(next);
4168
4723
  onOpenChange?.(next);
4169
4724
  },
4170
4725
  [open, onOpenChange]
4171
4726
  );
4172
- return /* @__PURE__ */ jsx58("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx58(
4727
+ return /* @__PURE__ */ jsx65("div", { ref: setRefs, className: cn("relative inline-block", className), children: /* @__PURE__ */ jsx65(
4173
4728
  PopoverContext.Provider,
4174
4729
  {
4175
4730
  value: { open: current, setOpen, triggerId, contentId, wrapperRef },
@@ -4179,10 +4734,10 @@ var Popover = React59.forwardRef(
4179
4734
  }
4180
4735
  );
4181
4736
  Popover.displayName = "Popover";
4182
- var PopoverTrigger = React59.forwardRef(
4737
+ var PopoverTrigger = React65.forwardRef(
4183
4738
  ({ className, children, onClick, ...props }, ref) => {
4184
- const { open, setOpen, triggerId, contentId } = React59.useContext(PopoverContext);
4185
- return /* @__PURE__ */ jsx58(
4739
+ const { open, setOpen, triggerId, contentId } = React65.useContext(PopoverContext);
4740
+ return /* @__PURE__ */ jsx65(
4186
4741
  "button",
4187
4742
  {
4188
4743
  ref,
@@ -4207,12 +4762,12 @@ var PopoverTrigger = React59.forwardRef(
4207
4762
  }
4208
4763
  );
4209
4764
  PopoverTrigger.displayName = "PopoverTrigger";
4210
- var PopoverContent = React59.forwardRef(
4765
+ var PopoverContent = React65.forwardRef(
4211
4766
  ({ className, children, onKeyDown, ...props }, ref) => {
4212
- const { open, setOpen, triggerId, contentId, wrapperRef } = React59.useContext(PopoverContext);
4213
- const contentRef = React59.useRef(null);
4214
- const [pos, setPos] = React59.useState(null);
4215
- React59.useLayoutEffect(() => {
4767
+ const { open, setOpen, triggerId, contentId, wrapperRef } = React65.useContext(PopoverContext);
4768
+ const contentRef = React65.useRef(null);
4769
+ const [pos, setPos] = React65.useState(null);
4770
+ React65.useLayoutEffect(() => {
4216
4771
  if (!open) {
4217
4772
  setPos(null);
4218
4773
  return;
@@ -4232,7 +4787,7 @@ var PopoverContent = React59.forwardRef(
4232
4787
  window.removeEventListener("resize", measure);
4233
4788
  };
4234
4789
  }, [open, setOpen, wrapperRef]);
4235
- React59.useEffect(() => {
4790
+ React65.useEffect(() => {
4236
4791
  if (!open) return;
4237
4792
  function onPointerDown(event) {
4238
4793
  if (!contentRef.current?.contains(event.target)) setOpen(false);
@@ -4240,14 +4795,14 @@ var PopoverContent = React59.forwardRef(
4240
4795
  document.addEventListener("pointerdown", onPointerDown);
4241
4796
  return () => document.removeEventListener("pointerdown", onPointerDown);
4242
4797
  }, [open, setOpen]);
4243
- React59.useEffect(() => {
4798
+ React65.useEffect(() => {
4244
4799
  if (open && pos && contentRef.current) {
4245
4800
  contentRef.current.focus();
4246
4801
  }
4247
4802
  }, [open, pos]);
4248
4803
  if (!open || !pos || typeof document === "undefined") return null;
4249
4804
  return createPortal8(
4250
- /* @__PURE__ */ jsx58(
4805
+ /* @__PURE__ */ jsx65(
4251
4806
  "div",
4252
4807
  {
4253
4808
  ref: (node) => {
@@ -4282,43 +4837,46 @@ var PopoverContent = React59.forwardRef(
4282
4837
  PopoverContent.displayName = "PopoverContent";
4283
4838
 
4284
4839
  // src/components/breadcrumb/Breadcrumb.tsx
4285
- import * as React60 from "react";
4286
- import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
4287
- var Breadcrumb = React60.forwardRef(
4288
- ({ items, separator = "/", onItemClick, className, ...props }, ref) => /* @__PURE__ */ jsx59(
4289
- "nav",
4290
- {
4291
- ref,
4292
- "aria-label": "Breadcrumb",
4293
- className: cn("flex items-center space-x-1.5 text-sm text-muted-foreground", className),
4294
- ...props,
4295
- children: /* @__PURE__ */ jsx59("ol", { className: "flex flex-wrap items-center space-x-1.5", children: items.map((item, index) => {
4296
- const isLast = index === items.length - 1;
4297
- return /* @__PURE__ */ jsxs33("li", { className: "flex items-center space-x-1.5", children: [
4298
- index > 0 && /* @__PURE__ */ jsx59("span", { "aria-hidden": "true", className: "text-muted-foreground/50", children: separator }),
4299
- item.href && !isLast ? /* @__PURE__ */ jsx59(
4300
- "a",
4301
- {
4302
- href: item.href,
4303
- className: "transition-colors hover:text-foreground",
4304
- onClick: onItemClick ? (event) => {
4305
- event.preventDefault();
4306
- onItemClick(item, index);
4307
- } : void 0,
4308
- children: item.label
4309
- }
4310
- ) : /* @__PURE__ */ jsx59(
4311
- "span",
4312
- {
4313
- "aria-current": isLast ? "page" : void 0,
4314
- className: isLast ? "font-medium text-foreground" : void 0,
4315
- children: item.label
4316
- }
4317
- )
4318
- ] }, `${item.label}-${index}`);
4319
- }) })
4320
- }
4321
- )
4840
+ import * as React66 from "react";
4841
+ import { jsx as jsx66, jsxs as jsxs41 } from "react/jsx-runtime";
4842
+ var Breadcrumb = React66.forwardRef(
4843
+ ({ items, separator = "/", onItemClick, linkComponent, className, ...props }, ref) => {
4844
+ const LinkEl = linkComponent ?? "a";
4845
+ return /* @__PURE__ */ jsx66(
4846
+ "nav",
4847
+ {
4848
+ ref,
4849
+ "aria-label": "Breadcrumb",
4850
+ className: cn("flex items-center space-x-1.5 text-sm text-muted-foreground", className),
4851
+ ...props,
4852
+ children: /* @__PURE__ */ jsx66("ol", { className: "flex flex-wrap items-center space-x-1.5", children: items.map((item, index) => {
4853
+ const isLast = index === items.length - 1;
4854
+ return /* @__PURE__ */ jsxs41("li", { className: "flex items-center space-x-1.5", children: [
4855
+ index > 0 && /* @__PURE__ */ jsx66("span", { "aria-hidden": "true", className: "text-muted-foreground/50", children: separator }),
4856
+ item.href && !isLast ? /* @__PURE__ */ jsx66(
4857
+ LinkEl,
4858
+ {
4859
+ href: item.href,
4860
+ className: "transition-colors hover:text-foreground",
4861
+ onClick: onItemClick ? (event) => {
4862
+ event.preventDefault();
4863
+ onItemClick(item, index);
4864
+ } : void 0,
4865
+ children: item.label
4866
+ }
4867
+ ) : /* @__PURE__ */ jsx66(
4868
+ "span",
4869
+ {
4870
+ "aria-current": isLast ? "page" : void 0,
4871
+ className: isLast ? "font-medium text-foreground" : void 0,
4872
+ children: item.label
4873
+ }
4874
+ )
4875
+ ] }, `${item.label}-${index}`);
4876
+ }) })
4877
+ }
4878
+ );
4879
+ }
4322
4880
  );
4323
4881
  Breadcrumb.displayName = "Breadcrumb";
4324
4882
  export {
@@ -4349,6 +4907,7 @@ export {
4349
4907
  Checkbox,
4350
4908
  CheckboxGroup,
4351
4909
  CheckboxGroupItem,
4910
+ ConfirmDialog,
4352
4911
  DataTable,
4353
4912
  DatePicker,
4354
4913
  Dialog,
@@ -4375,6 +4934,7 @@ export {
4375
4934
  InputGroup,
4376
4935
  InputGroupAddon,
4377
4936
  Label,
4937
+ Link,
4378
4938
  List,
4379
4939
  ListItem,
4380
4940
  Menu,
@@ -4391,16 +4951,20 @@ export {
4391
4951
  PopoverContent,
4392
4952
  PopoverTrigger,
4393
4953
  Progress,
4954
+ Prose,
4394
4955
  Radio,
4395
4956
  RadioCard,
4396
4957
  RadioGroup,
4397
4958
  RadioGroupContext,
4398
4959
  RadioGroupItem,
4399
4960
  Search,
4961
+ SectionHeading,
4400
4962
  Select,
4401
4963
  SelectMenu,
4402
4964
  Separator,
4403
4965
  Sidebar,
4966
+ SiteFooter,
4967
+ SiteHeader,
4404
4968
  Skeleton,
4405
4969
  Spinner,
4406
4970
  Stepper,
@@ -4413,6 +4977,7 @@ export {
4413
4977
  TableFooter,
4414
4978
  TableHead,
4415
4979
  TableHeader,
4980
+ TableOfContents,
4416
4981
  TableRow,
4417
4982
  Tabs,
4418
4983
  TabsContent,
@@ -4436,6 +5001,7 @@ export {
4436
5001
  toast,
4437
5002
  useCombobox,
4438
5003
  usePresence,
5004
+ useScrollSpy,
4439
5005
  useToast
4440
5006
  };
4441
5007
  //# sourceMappingURL=index.mjs.map