@yuhuanowo/yunui 0.2.12 → 0.2.14

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { cn } from './chunk-TFZKMJGF.js';
2
+ import { cn } from './chunk-GHO4RCDR.js';
3
3
  import { useYunUI } from './chunk-U2LNRVMI.js';
4
4
  import * as React7 from 'react';
5
5
  import { forwardRef, useState, useEffect, useRef, useCallback, useId } from 'react';
@@ -268,7 +268,8 @@ function Modal({
268
268
  {
269
269
  ref: modalRef,
270
270
  className: cn(
271
- "card relative w-full shadow-2xl flex flex-col transition-all",
271
+ // Glassy surface (not the solid .card) to match Sheet/Dialog/navbar.
272
+ "relative w-full rounded-2xl border border-border bg-background/95 backdrop-blur-xl shadow-2xl flex flex-col transition-all",
272
273
  sizeClass,
273
274
  isClosing ? "scale-95 opacity-0" : "scale-100 opacity-100",
274
275
  className
@@ -281,7 +282,7 @@ function Modal({
281
282
  /* @__PURE__ */ jsxs("div", { className: "space-y-1 min-w-0", children: [
282
283
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
283
284
  /* @__PURE__ */ jsx("h2", { id: "modal-title", className: "text-lg font-semibold truncate", children: title }),
284
- showUnsavedBadge && /* @__PURE__ */ jsx("span", { className: "badge bg-amber-500/10 text-amber-600 border-amber-500/20 shrink-0", children: t("unsaved") })
285
+ showUnsavedBadge && /* @__PURE__ */ jsx("span", { className: "badge-warning shrink-0", children: t("unsaved") })
285
286
  ] }),
286
287
  subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground truncate", children: subtitle })
287
288
  ] }),
@@ -310,26 +311,26 @@ function Modal({
310
311
  var closeIdCounter2 = 0;
311
312
  var variantConfig = {
312
313
  danger: {
313
- iconBg: "bg-red-100 dark:bg-red-900/30",
314
- iconColor: "text-red-600 dark:text-red-400",
314
+ iconBg: "bg-error-soft",
315
+ iconColor: "text-error",
315
316
  buttonVariant: "red",
316
317
  Icon: Trash2
317
318
  },
318
319
  warning: {
319
- iconBg: "bg-amber-100 dark:bg-amber-900/30",
320
- iconColor: "text-amber-600 dark:text-amber-400",
320
+ iconBg: "bg-warning-soft",
321
+ iconColor: "text-warning",
321
322
  buttonVariant: "amber",
322
323
  Icon: RefreshCw
323
324
  },
324
325
  info: {
325
- iconBg: "bg-blue-100 dark:bg-blue-900/30",
326
- iconColor: "text-blue-600 dark:text-blue-400",
326
+ iconBg: "bg-info-soft",
327
+ iconColor: "text-info",
327
328
  buttonVariant: "default",
328
329
  Icon: Info
329
330
  },
330
331
  success: {
331
- iconBg: "bg-green-100 dark:bg-green-900/30",
332
- iconColor: "text-green-600 dark:text-green-400",
332
+ iconBg: "bg-success-soft",
333
+ iconColor: "text-success",
333
334
  buttonVariant: "default",
334
335
  Icon: CheckCircle
335
336
  }
@@ -350,11 +351,13 @@ function ConfirmModal({
350
351
  }) {
351
352
  const t = useYunUI().useT("components.confirmModal");
352
353
  const confirmButtonRef = useRef(null);
354
+ const dialogRef = useRef(null);
353
355
  const timeoutRef = useRef(null);
354
356
  const closeIdRef = useRef(0);
355
357
  const [isClosing, setIsClosing] = useState(false);
356
358
  const [mounted, setMounted] = useState(false);
357
359
  const config = variantConfig[variant];
360
+ useFocusTrap(dialogRef, isOpen && !isClosing && mounted);
358
361
  const _confirmText = confirmText ?? t("confirm");
359
362
  const _cancelText = cancelText ?? t("cancel");
360
363
  useEffect(() => {
@@ -436,6 +439,7 @@ function ConfirmModal({
436
439
  /* @__PURE__ */ jsx(
437
440
  "div",
438
441
  {
442
+ ref: dialogRef,
439
443
  className: cn(
440
444
  "card relative w-full max-w-sm shadow-2xl transition-all",
441
445
  isClosing ? "scale-95 opacity-0" : "scale-100 opacity-100",
@@ -536,11 +540,14 @@ function RegenerateConfirmModal({
536
540
  }
537
541
  function Sheet({ open, onClose, children, title, mobileOnly = false }) {
538
542
  const [mounted, setMounted] = useState(false);
543
+ const panelRef = useRef(null);
544
+ const titleId = useId();
539
545
  useEffect(() => {
540
546
  setMounted(true);
541
547
  return () => setMounted(false);
542
548
  }, []);
543
549
  useModalBehavior(open, onClose);
550
+ useFocusTrap(panelRef, open && mounted);
544
551
  if (!mounted) return null;
545
552
  return createPortal(
546
553
  /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -561,21 +568,25 @@ function Sheet({ open, onClose, children, title, mobileOnly = false }) {
561
568
  /* @__PURE__ */ jsxs(
562
569
  motion.div,
563
570
  {
571
+ ref: panelRef,
572
+ role: "dialog",
573
+ "aria-modal": "true",
574
+ "aria-labelledby": title ? titleId : void 0,
564
575
  initial: { x: "100%" },
565
576
  animate: { x: 0 },
566
577
  exit: { x: "100%" },
567
578
  transition: { type: "spring", damping: 30, stiffness: 300 },
568
- className: cn("fixed inset-y-0 right-0 w-[85vw] min-w-72 max-w-sm bg-card shadow-xl flex flex-col", mobileOnly && "lg:hidden"),
579
+ className: cn("fixed inset-y-3 right-3 w-[85vw] min-w-72 max-w-sm bg-background/95 backdrop-blur-xl shadow-2xl flex flex-col overflow-hidden rounded-2xl border border-border", mobileOnly && "lg:hidden"),
569
580
  style: { zIndex: 50 },
570
581
  onClick: (e) => e.stopPropagation(),
571
582
  children: [
572
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 border-b border-border shrink-0", children: [
573
- title && /* @__PURE__ */ jsx("h2", { className: "font-semibold text-sm", children: title }),
583
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-5 py-4 border-b border-border/60 shrink-0", children: [
584
+ title && /* @__PURE__ */ jsx("h2", { id: titleId, className: "font-semibold text-sm tracking-tight", children: title }),
574
585
  /* @__PURE__ */ jsx(
575
586
  "button",
576
587
  {
577
588
  onClick: onClose,
578
- className: "p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors ml-auto",
589
+ className: "-mr-1.5 p-1.5 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-colors ml-auto",
579
590
  "aria-label": "Close",
580
591
  children: /* @__PURE__ */ jsx(X, { size: 18 })
581
592
  }
@@ -591,7 +602,7 @@ function Sheet({ open, onClose, children, title, mobileOnly = false }) {
591
602
  );
592
603
  }
593
604
  var Checkbox = forwardRef(
594
- ({ checked, onCheckedChange, disabled = false, className = "", id }, ref) => {
605
+ ({ checked = false, onCheckedChange, disabled = false, className = "", id }, ref) => {
595
606
  const filled = checked === true || checked === "indeterminate";
596
607
  return /* @__PURE__ */ jsx(
597
608
  "button",
@@ -601,13 +612,13 @@ var Checkbox = forwardRef(
601
612
  role: "checkbox",
602
613
  "aria-checked": checked === "indeterminate" ? "mixed" : checked,
603
614
  id,
604
- onClick: () => !disabled && onCheckedChange(checked !== true),
615
+ onClick: () => !disabled && onCheckedChange?.(checked !== true),
605
616
  disabled,
606
617
  className: `
607
618
  w-4 h-4 rounded border-2 flex items-center justify-center
608
619
  transition-all duration-200 ease-in-out
609
620
  outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background
610
- ${filled ? "bg-primary border-primary text-primary-foreground" : "border-slate-300 dark:border-slate-600 bg-transparent hover:border-primary/50"}
621
+ ${filled ? "bg-primary border-primary text-primary-foreground" : "border-(--border-strong) bg-transparent hover:border-primary/50"}
611
622
  ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
612
623
  ${className}
613
624
  `,
@@ -724,7 +735,8 @@ function Combobox({
724
735
  {
725
736
  type: "button",
726
737
  onClick: clearValue,
727
- className: "absolute right-8 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1",
738
+ "aria-label": "Clear",
739
+ className: "absolute right-8 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1 outline-none focus-visible:ring-2 focus-visible:ring-ring",
728
740
  children: /* @__PURE__ */ jsx(X, { size: 14 })
729
741
  }
730
742
  ),
@@ -734,7 +746,8 @@ function Combobox({
734
746
  type: "button",
735
747
  onClick: () => !disabled && setIsOpen(!isOpen),
736
748
  disabled,
737
- className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1 disabled:opacity-50",
749
+ "aria-label": "Toggle options",
750
+ className: "absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors p-1 disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring",
738
751
  children: /* @__PURE__ */ jsx(ChevronDown, { size: 14, className: isOpen ? "rotate-180 transition-transform" : "" })
739
752
  }
740
753
  )
@@ -752,6 +765,7 @@ function Combobox({
752
765
  w-full px-3 py-2 text-left text-sm
753
766
  flex items-center gap-2
754
767
  hover:bg-(--bg-hover) transition-colors
768
+ outline-none focus-visible:ring-2 focus-visible:ring-ring
755
769
  ${isSelected ? "bg-primary/10 text-primary" : ""}
756
770
  `,
757
771
  children: [
@@ -778,7 +792,7 @@ function Combobox({
778
792
  {
779
793
  type: "button",
780
794
  onClick: () => handleSelect(inputValue),
781
- className: "\n w-full px-3 py-2 text-left text-sm\n flex items-center gap-2\n text-primary hover:bg-muted/50\n transition-colors\n ",
795
+ className: "\n w-full px-3 py-2 text-left text-sm\n flex items-center gap-2\n text-primary hover:bg-muted/50\n transition-colors\n outline-none focus-visible:ring-2 focus-visible:ring-ring\n ",
782
796
  children: [
783
797
  /* @__PURE__ */ jsx("span", { className: "text-lg", children: creatableIcon ?? "+" }),
784
798
  /* @__PURE__ */ jsx("span", { children: resolvedCreatableText.replace("{value}", inputValue) })
@@ -852,7 +866,7 @@ var RadioGroupItem = React7.forwardRef(({ className, ...props }, ref) => /* @__P
852
866
  ref,
853
867
  className: cn(
854
868
  "h-4 w-4 shrink-0 rounded-full border-2 flex items-center justify-center",
855
- "border-slate-300 dark:border-slate-600 bg-transparent",
869
+ "border-(--border-strong) bg-transparent",
856
870
  "transition-all duration-200 ease-in-out",
857
871
  "hover:border-primary/50",
858
872
  "data-[state=checked]:border-primary",
@@ -948,6 +962,20 @@ var colsMap = {
948
962
  11: "grid-cols-11",
949
963
  12: "grid-cols-12"
950
964
  };
965
+ var responsiveColsMap = {
966
+ 1: "grid-cols-1",
967
+ 2: "grid-cols-2",
968
+ 3: "grid-cols-1 sm:grid-cols-3",
969
+ 4: "grid-cols-2 sm:grid-cols-4",
970
+ 5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
971
+ 6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",
972
+ 7: "grid-cols-3 sm:grid-cols-4 lg:grid-cols-7",
973
+ 8: "grid-cols-3 sm:grid-cols-4 lg:grid-cols-8",
974
+ 9: "grid-cols-3 sm:grid-cols-4 lg:grid-cols-9",
975
+ 10: "grid-cols-3 sm:grid-cols-5 lg:grid-cols-10",
976
+ 11: "grid-cols-3 sm:grid-cols-5 lg:grid-cols-11",
977
+ 12: "grid-cols-3 sm:grid-cols-6 lg:grid-cols-12"
978
+ };
951
979
  var rowsMap = {
952
980
  1: "grid-rows-1",
953
981
  2: "grid-rows-2",
@@ -1002,7 +1030,7 @@ var Flex = React7.forwardRef(
1002
1030
  );
1003
1031
  Flex.displayName = "Flex";
1004
1032
  var Grid = React7.forwardRef(
1005
- ({ as, columns, rows, gap, align, padding, className, children, ...props }, ref) => {
1033
+ ({ as, columns, rows, gap, align, padding, responsive = true, className, children, ...props }, ref) => {
1006
1034
  const Comp = as ?? "div";
1007
1035
  return /* @__PURE__ */ jsx(
1008
1036
  Comp,
@@ -1010,7 +1038,7 @@ var Grid = React7.forwardRef(
1010
1038
  ref,
1011
1039
  className: cn(
1012
1040
  "grid",
1013
- columns !== void 0 && colsMap[columns],
1041
+ columns !== void 0 && (responsive ? responsiveColsMap[columns] : colsMap[columns]),
1014
1042
  rows !== void 0 && rowsMap[rows],
1015
1043
  gap !== void 0 && gapMap[gap],
1016
1044
  align && alignMap[align],
@@ -1165,8 +1193,6 @@ var BreadcrumbPage = React7.forwardRef(({ className, ...props }, ref) => /* @__P
1165
1193
  "span",
1166
1194
  {
1167
1195
  ref,
1168
- role: "link",
1169
- "aria-disabled": "true",
1170
1196
  "aria-current": "page",
1171
1197
  className: cn("font-medium text-foreground", className),
1172
1198
  ...props
@@ -1373,13 +1399,13 @@ var Input = React7.forwardRef(
1373
1399
  "focus:border-ring focus:ring-2 focus:ring-ring/20",
1374
1400
  "disabled:opacity-50 disabled:cursor-not-allowed",
1375
1401
  icon && "pl-10",
1376
- error ? "border-red-300 focus:border-red-400 dark:border-red-700" : "border-border",
1402
+ error ? "border-(--error) focus:border-(--error)" : "border-border",
1377
1403
  className
1378
1404
  ),
1379
1405
  ...props
1380
1406
  }
1381
1407
  ),
1382
- error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1408
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-error flex items-center gap-1", children: [
1383
1409
  /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
1384
1410
  error
1385
1411
  ] })
@@ -1406,13 +1432,13 @@ var Textarea = React7.forwardRef(
1406
1432
  "placeholder:text-muted-foreground",
1407
1433
  "focus:border-ring focus:ring-2 focus:ring-ring/20",
1408
1434
  "disabled:opacity-50 disabled:cursor-not-allowed",
1409
- error ? "border-red-300 dark:border-red-700" : "border-border",
1435
+ error ? "border-(--error) focus:border-(--error)" : "border-border",
1410
1436
  className
1411
1437
  ),
1412
1438
  ...props
1413
1439
  }
1414
1440
  ),
1415
- error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1441
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-error flex items-center gap-1", children: [
1416
1442
  /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
1417
1443
  error
1418
1444
  ] })
@@ -1434,7 +1460,7 @@ var PasswordInput = React7.forwardRef(
1434
1460
  className: cn(
1435
1461
  "flex items-center h-10 rounded-xl border bg-background transition-colors",
1436
1462
  "focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",
1437
- error ? "border-red-300 dark:border-red-700" : "border-border",
1463
+ error ? "border-(--error) focus:border-(--error)" : "border-border",
1438
1464
  disabled && "opacity-50",
1439
1465
  className
1440
1466
  ),
@@ -1468,7 +1494,7 @@ var PasswordInput = React7.forwardRef(
1468
1494
  ]
1469
1495
  }
1470
1496
  ),
1471
- error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1497
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-error flex items-center gap-1", children: [
1472
1498
  /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
1473
1499
  error
1474
1500
  ] })
@@ -1494,7 +1520,7 @@ var NumberInput = React7.forwardRef(
1494
1520
  {
1495
1521
  className: cn(
1496
1522
  "relative flex items-stretch rounded-xl border bg-background transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",
1497
- error ? "border-red-300 dark:border-red-700" : "border-border",
1523
+ error ? "border-(--error) focus:border-(--error)" : "border-border",
1498
1524
  disabled && "opacity-50",
1499
1525
  className
1500
1526
  ),
@@ -1543,7 +1569,7 @@ var NumberInput = React7.forwardRef(
1543
1569
  ]
1544
1570
  }
1545
1571
  ),
1546
- error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-red-500 flex items-center gap-1", children: [
1572
+ error && /* @__PURE__ */ jsxs("p", { id: errorId, className: "mt-1.5 text-xs text-error flex items-center gap-1", children: [
1547
1573
  /* @__PURE__ */ jsx(AlertCircle, { "aria-hidden": "true", className: "w-3 h-3" }),
1548
1574
  error
1549
1575
  ] })
@@ -1651,10 +1677,10 @@ Card.displayName = "Card";
1651
1677
  function Badge({ className, variant = "default", ...props }) {
1652
1678
  const variants = {
1653
1679
  default: "bg-muted text-foreground/80",
1654
- success: "bg-green-50 text-green-700 dark:bg-green-900/30 dark:text-green-400",
1655
- warning: "bg-amber-50 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400",
1656
- error: "bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-400",
1657
- info: "bg-blue-50 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"
1680
+ success: "bg-success-soft text-success",
1681
+ warning: "bg-warning-soft text-warning",
1682
+ error: "bg-error-soft text-error",
1683
+ info: "bg-info-soft text-info"
1658
1684
  };
1659
1685
  return /* @__PURE__ */ jsx(
1660
1686
  "span",
@@ -1690,10 +1716,10 @@ function Separator2({
1690
1716
  }
1691
1717
  function Alert({ className, variant = "info", title, icon, children, ...props }) {
1692
1718
  const styles = {
1693
- info: "bg-blue-50 text-blue-800 border-blue-200 dark:bg-blue-900/20 dark:text-blue-300 dark:border-blue-900",
1694
- success: "bg-green-50 text-green-800 border-green-200 dark:bg-green-900/20 dark:text-green-300 dark:border-green-900",
1695
- warning: "bg-amber-50 text-amber-800 border-amber-200 dark:bg-amber-900/20 dark:text-amber-300 dark:border-amber-900",
1696
- error: "bg-red-50 text-red-800 border-red-200 dark:bg-red-900/20 dark:text-red-300 dark:border-red-900"
1719
+ info: "bg-info-soft text-info border-info-soft",
1720
+ success: "bg-success-soft text-success border-success-soft",
1721
+ warning: "bg-warning-soft text-warning border-warning-soft",
1722
+ error: "bg-error-soft text-error border-error-soft"
1697
1723
  };
1698
1724
  const defaultIcon = {
1699
1725
  info: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" }),
@@ -1702,10 +1728,11 @@ function Alert({ className, variant = "info", title, icon, children, ...props })
1702
1728
  error: /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" })
1703
1729
  };
1704
1730
  const resolvedIcon = icon === void 0 ? defaultIcon[variant] : icon;
1731
+ const role = variant === "error" || variant === "warning" ? "alert" : "status";
1705
1732
  return /* @__PURE__ */ jsxs(
1706
1733
  "div",
1707
1734
  {
1708
- role: "alert",
1735
+ role,
1709
1736
  className: cn("flex gap-3 rounded-xl border p-3 text-sm", styles[variant], className),
1710
1737
  ...props,
1711
1738
  children: [
@@ -1751,10 +1778,10 @@ function StatusIndicator({
1751
1778
  ...props
1752
1779
  }) {
1753
1780
  const color = {
1754
- online: "bg-green-500",
1781
+ online: "bg-(--success)",
1755
1782
  offline: "bg-zinc-400",
1756
- busy: "bg-red-500",
1757
- away: "bg-amber-500",
1783
+ busy: "bg-(--error)",
1784
+ away: "bg-(--warning)",
1758
1785
  neutral: "bg-muted-foreground"
1759
1786
  }[status];
1760
1787
  return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1.5 text-sm", className), ...props, children: [
@@ -1771,6 +1798,21 @@ function StatusIndicator({
1771
1798
  children
1772
1799
  ] });
1773
1800
  }
1801
+ var inlineStatusConfig = {
1802
+ pending: { icon: Loader2, className: "text-warning" },
1803
+ processing: { icon: Loader2, className: "text-warning" },
1804
+ completed: { icon: CheckCircle2, className: "text-success" },
1805
+ failed: { icon: AlertCircle, className: "text-error" }
1806
+ };
1807
+ function InlineStatus({ status, label, progress, size = 12, className }) {
1808
+ const config = inlineStatusConfig[status];
1809
+ const Icon2 = config.icon;
1810
+ const isProcessing = status === "processing" || status === "pending";
1811
+ return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1", config.className, className), children: [
1812
+ /* @__PURE__ */ jsx(Icon2, { size, className: cn(isProcessing && "animate-spin") }),
1813
+ /* @__PURE__ */ jsx("span", { children: isProcessing && progress !== void 0 && progress > 0 ? `${progress}%` : label })
1814
+ ] });
1815
+ }
1774
1816
  function InlineCode({ className, ...props }) {
1775
1817
  return /* @__PURE__ */ jsx(
1776
1818
  "code",
@@ -1853,7 +1895,8 @@ var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) =
1853
1895
  ref,
1854
1896
  className: cn(
1855
1897
  "fixed left-[50%] top-[50%] z-50 w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%]",
1856
- "bg-card rounded-2xl shadow-2xl p-6",
1898
+ // Glassy surface to match Sheet/navbar/popover (unified overlay language).
1899
+ "bg-background/95 backdrop-blur-xl border border-border rounded-2xl shadow-2xl p-6",
1857
1900
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1858
1901
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1859
1902
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -1864,7 +1907,7 @@ var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) =
1864
1907
  ...props,
1865
1908
  children: [
1866
1909
  children,
1867
- /* @__PURE__ */ jsx(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-lg p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors", children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
1910
+ /* @__PURE__ */ jsx(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-lg p-1.5 text-muted-foreground hover:text-foreground hover:bg-muted transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring", children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }) })
1868
1911
  ]
1869
1912
  }
1870
1913
  )
@@ -1922,7 +1965,7 @@ var SelectContent = React7.forwardRef(({ className, children, position = "popper
1922
1965
  ref,
1923
1966
  position,
1924
1967
  className: cn(
1925
- "relative z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-popover shadow-lg",
1968
+ "relative z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-popover/90 backdrop-blur-xl shadow-lg",
1926
1969
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1927
1970
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1928
1971
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -1948,7 +1991,7 @@ var SelectItem = React7.forwardRef(({ className, children, ...props }, ref) => /
1948
1991
  {
1949
1992
  ref,
1950
1993
  className: cn(
1951
- "relative flex w-full cursor-pointer select-none items-center rounded-lg py-2 px-3 text-sm outline-none",
1994
+ "relative flex w-full cursor-pointer select-none items-center rounded-lg py-2 pl-8 pr-3 text-sm outline-none",
1952
1995
  "focus:bg-muted data-disabled:pointer-events-none data-disabled:opacity-50",
1953
1996
  className
1954
1997
  ),
@@ -2210,7 +2253,7 @@ var DropdownMenuSubTrigger = React7.forwardRef(({ className, inset, children, ..
2210
2253
  {
2211
2254
  ref,
2212
2255
  className: cn(
2213
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
2256
+ "flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none focus:bg-muted focus:text-foreground data-[state=open]:bg-muted",
2214
2257
  inset && "pl-8",
2215
2258
  className
2216
2259
  ),
@@ -2227,7 +2270,7 @@ var DropdownMenuSubContent = React7.forwardRef(({ className, ...props }, ref) =>
2227
2270
  {
2228
2271
  ref,
2229
2272
  className: cn(
2230
- "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2273
+ "z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-popover/90 backdrop-blur-xl p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2231
2274
  className
2232
2275
  ),
2233
2276
  ...props
@@ -2240,7 +2283,7 @@ var DropdownMenuContent = React7.forwardRef(({ className, sideOffset = 4, ...pro
2240
2283
  ref,
2241
2284
  sideOffset,
2242
2285
  className: cn(
2243
- "z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-popover p-1 text-popover-foreground shadow-md",
2286
+ "z-50 min-w-32 overflow-hidden rounded-xl border border-border bg-popover/90 backdrop-blur-xl p-1 text-popover-foreground shadow-md",
2244
2287
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
2245
2288
  className
2246
2289
  ),
@@ -2253,7 +2296,7 @@ var DropdownMenuItem = React7.forwardRef(({ className, inset, ...props }, ref) =
2253
2296
  {
2254
2297
  ref,
2255
2298
  className: cn(
2256
- "relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2299
+ "relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2257
2300
  inset && "pl-8",
2258
2301
  className
2259
2302
  ),
@@ -2267,7 +2310,7 @@ var DropdownMenuCheckboxItem = React7.forwardRef(({ className, children, checked
2267
2310
  {
2268
2311
  ref,
2269
2312
  className: cn(
2270
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2313
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2271
2314
  className
2272
2315
  ),
2273
2316
  checked,
@@ -2284,7 +2327,7 @@ var DropdownMenuRadioItem = React7.forwardRef(({ className, children, ...props }
2284
2327
  {
2285
2328
  ref,
2286
2329
  className: cn(
2287
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2330
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-muted focus:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
2288
2331
  className
2289
2332
  ),
2290
2333
  ...props,
@@ -2571,8 +2614,8 @@ function SegmentedSelect({
2571
2614
  "aria-pressed": value === opt.value,
2572
2615
  title: opt.desc,
2573
2616
  className: cn(
2574
- "inline-flex items-center justify-center gap-2 px-3 py-1.5 text-xs font-medium border rounded-lg whitespace-nowrap transition-all duration-150 ease cursor-pointer outline-none",
2575
- value === opt.value ? "text-foreground border-border-strong bg-accent-subtle hover:bg-accent-muted hover:shadow-xs" : "text-muted-foreground border-border-default bg-muted/50 hover:text-foreground hover:border-border-strong hover:bg-muted",
2617
+ "inline-flex items-center justify-center gap-2 px-3 py-1.5 text-xs font-medium border rounded-lg whitespace-nowrap transition-all duration-150 ease cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
2618
+ value === opt.value ? "text-foreground border-(--border-strong) bg-accent-subtle hover:bg-accent-muted hover:shadow-xs" : "text-muted-foreground border-(--border-default) bg-muted/50 hover:text-foreground hover:border-(--border-strong) hover:bg-muted",
2576
2619
  disabled && "opacity-50 cursor-not-allowed pointer-events-none"
2577
2620
  ),
2578
2621
  children: [
@@ -2613,7 +2656,7 @@ function ShinyButton({
2613
2656
  "div",
2614
2657
  {
2615
2658
  className: cn(
2616
- "group relative flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-(--text-primary) px-8 py-3 font-semibold text-background transition-all hover:ring-2 hover:ring-(--brand-primary) hover:ring-offset-2 hover:ring-offset-background",
2659
+ "group relative flex items-center justify-center gap-2 overflow-hidden rounded-xl bg-(--text-primary) px-8 py-3 font-semibold text-background transition-all hover:ring-2 hover:ring-(--accent) hover:ring-offset-2 hover:ring-offset-background",
2617
2660
  className
2618
2661
  ),
2619
2662
  children: [
@@ -2625,10 +2668,11 @@ function ShinyButton({
2625
2668
  ]
2626
2669
  }
2627
2670
  );
2671
+ const focusCls = "rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-(--accent) focus-visible:ring-offset-2 focus-visible:ring-offset-background";
2628
2672
  if (href) {
2629
- return /* @__PURE__ */ jsx(Link, { href, onClick, children: ButtonContent });
2673
+ return /* @__PURE__ */ jsx(Link, { href, onClick, className: focusCls, children: ButtonContent });
2630
2674
  }
2631
- return /* @__PURE__ */ jsx("button", { onClick, children: ButtonContent });
2675
+ return /* @__PURE__ */ jsx("button", { type: "button", onClick, className: focusCls, children: ButtonContent });
2632
2676
  }
2633
2677
  function Marquee({
2634
2678
  className,
@@ -2700,7 +2744,7 @@ var BentoCard = ({
2700
2744
  header,
2701
2745
  /* @__PURE__ */ jsxs("div", { className: "group-hover/bento:translate-x-2 transition duration-200", children: [
2702
2746
  /* @__PURE__ */ jsx("div", { className: "mb-2 text-[var(--text-primary)]", children: icon }),
2703
- /* @__PURE__ */ jsx("div", { className: "font-bold text-[var(--text-primary)] text-lg mb-2 mt-2", children: title }),
2747
+ /* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--text-primary)] text-lg mb-2 mt-2", children: title }),
2704
2748
  /* @__PURE__ */ jsx("div", { className: "font-normal text-[var(--text-secondary)] text-sm leading-relaxed", children: description })
2705
2749
  ] })
2706
2750
  ]
@@ -2739,7 +2783,7 @@ var PopoverContent = React7.forwardRef(({ className, align = "center", sideOffse
2739
2783
  sideOffset,
2740
2784
  side: "bottom",
2741
2785
  className: cn(
2742
- "z-50 origin-(--radix-popover-content-transform-origin) overflow-y-auto max-h-(--radix-popover-content-available-height) min-w-[240px] max-w-[98vw] rounded-xl border bg-fd-popover/60 backdrop-blur-lg p-2 text-sm text-fd-popover-foreground shadow-lg focus-visible:outline-none data-[state=closed]:animate-fd-popover-out data-[state=open]:animate-fd-popover-in",
2786
+ "z-50 origin-(--radix-popover-content-transform-origin) overflow-y-auto max-h-(--radix-popover-content-available-height) min-w-[240px] max-w-[98vw] rounded-xl border border-border bg-popover/95 backdrop-blur-lg p-2 text-sm text-popover-foreground shadow-lg focus-visible:outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
2743
2787
  className
2744
2788
  ),
2745
2789
  ...props
@@ -2762,27 +2806,27 @@ var sizeClasses = {
2762
2806
  var variantClasses = {
2763
2807
  default: {
2764
2808
  checkedTrack: "border-primary bg-primary/10",
2765
- uncheckedTrack: "border-slate-300 dark:border-slate-600 bg-transparent",
2809
+ uncheckedTrack: "border-(--border-strong) bg-muted",
2766
2810
  checkedThumb: "bg-primary",
2767
- uncheckedThumb: "bg-slate-300 dark:bg-slate-600"
2811
+ uncheckedThumb: "bg-(--border-strong)"
2768
2812
  },
2769
2813
  success: {
2770
- checkedTrack: "border-emerald-500 bg-emerald-500/10",
2771
- uncheckedTrack: "border-slate-300 dark:border-slate-600 bg-transparent",
2772
- checkedThumb: "bg-emerald-500",
2773
- uncheckedThumb: "bg-slate-300 dark:bg-slate-600"
2814
+ checkedTrack: "border-(--success) bg-success-soft",
2815
+ uncheckedTrack: "border-(--border-strong) bg-muted",
2816
+ checkedThumb: "bg-(--success)",
2817
+ uncheckedThumb: "bg-(--border-strong)"
2774
2818
  },
2775
2819
  warning: {
2776
- checkedTrack: "border-amber-500 bg-amber-500/10",
2777
- uncheckedTrack: "border-slate-300 dark:border-slate-600 bg-transparent",
2778
- checkedThumb: "bg-amber-500",
2779
- uncheckedThumb: "bg-slate-300 dark:bg-slate-600"
2820
+ checkedTrack: "border-(--warning) bg-warning-soft",
2821
+ uncheckedTrack: "border-(--border-strong) bg-muted",
2822
+ checkedThumb: "bg-(--warning)",
2823
+ uncheckedThumb: "bg-(--border-strong)"
2780
2824
  },
2781
2825
  danger: {
2782
- checkedTrack: "border-red-500 bg-red-500/10",
2783
- uncheckedTrack: "border-slate-300 dark:border-slate-600 bg-transparent",
2784
- checkedThumb: "bg-red-500",
2785
- uncheckedThumb: "bg-slate-300 dark:bg-slate-600"
2826
+ checkedTrack: "border-(--error) bg-error-soft",
2827
+ uncheckedTrack: "border-(--border-strong) bg-muted",
2828
+ checkedThumb: "bg-(--error)",
2829
+ uncheckedThumb: "bg-(--border-strong)"
2786
2830
  }
2787
2831
  };
2788
2832
  var Switch = forwardRef(
@@ -2854,25 +2898,25 @@ var toast = {
2854
2898
  success: (message, description) => {
2855
2899
  toast$1.success(message, {
2856
2900
  description,
2857
- icon: /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-green-500" })
2901
+ icon: /* @__PURE__ */ jsx(CheckCircle2, { className: "w-5 h-5 text-success" })
2858
2902
  });
2859
2903
  },
2860
2904
  error: (message, description) => {
2861
2905
  toast$1.error(message, {
2862
2906
  description,
2863
- icon: /* @__PURE__ */ jsx(AlertCircle, { className: "w-5 h-5 text-red-500" })
2907
+ icon: /* @__PURE__ */ jsx(AlertCircle, { className: "w-5 h-5 text-error" })
2864
2908
  });
2865
2909
  },
2866
2910
  info: (message, description) => {
2867
2911
  toast$1.info(message, {
2868
2912
  description,
2869
- icon: /* @__PURE__ */ jsx(Info, { className: "w-5 h-5 text-blue-500" })
2913
+ icon: /* @__PURE__ */ jsx(Info, { className: "w-5 h-5 text-info" })
2870
2914
  });
2871
2915
  },
2872
2916
  warning: (message, description) => {
2873
2917
  toast$1.warning(message, {
2874
2918
  description,
2875
- icon: /* @__PURE__ */ jsx(AlertTriangle, { className: "w-5 h-5 text-amber-500" })
2919
+ icon: /* @__PURE__ */ jsx(AlertTriangle, { className: "w-5 h-5 text-warning" })
2876
2920
  });
2877
2921
  },
2878
2922
  loading: (message) => {
@@ -2973,6 +3017,6 @@ function useYunUITheme(defaults = {}) {
2973
3017
  return [theme, update];
2974
3018
  }
2975
3019
 
2976
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AnimatedNumber, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Column, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, InlineCode, Input, Kbd, Label2 as Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, NumberInput, PageLoader, Pagination, PasswordInput, Popover, PopoverClose2 as PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, ShinyButton, Skeleton, Slider, Spinner, Stack, StatusIndicator, Steps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, YUNUI_PALETTES, applyTheme, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme };
2977
- //# sourceMappingURL=chunk-65XAR7FY.js.map
2978
- //# sourceMappingURL=chunk-65XAR7FY.js.map
3020
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AnimatedNumber, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BentoCard, BentoGrid, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Column, Combobox, ConfirmModal, CustomSelect, DeleteConfirmModal, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Flex, Grid, IconButton, InlineCode, InlineStatus, Input, Kbd, Label2 as Label, Marquee, Modal, MotionDiv, MotionSpan, NavTabs, NumberInput, PageLoader, Pagination, PasswordInput, Popover, PopoverClose2 as PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, RegenerateConfirmModal, Row, SearchInput, SegmentedSelect, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, ShinyButton, Skeleton, Slider, Spinner, Stack, StatusIndicator, Steps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, YUNUI_PALETTES, applyTheme, fadeIn, readTheme, staggerContainer, staggerItem, toast, useBodyScrollLock, useEscapeKey, useFocusTrap, useModalBehavior, useYunUITheme };
3021
+ //# sourceMappingURL=chunk-VXFEANVX.js.map
3022
+ //# sourceMappingURL=chunk-VXFEANVX.js.map