@work-rjkashyap/unified-ui 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { expandHeight, fadeIn, overlayBackdrop, modalContent, popSubtle, slideUp, slideDown, fadeInFast, scaleIn, staggerContainerFast, slideUpSm, pop, staggerContainer, shakeX, slidePanelBottom, slidePanelTop, slidePanelRight, slidePanelLeft, countUp, slideInFromRight, slideInFromLeft, staggerContainerSlow, numberRoll } from './chunk-3OZJ4JLW.mjs';
1
+ import { expandHeight, fadeIn, overlayBackdrop, modalContent, popSubtle, slideUp, slideDown, fadeInFast, scaleIn, staggerContainerFast, slideUpSm, pop, staggerContainer, shakeX, slidePanelBottom, slidePanelTop, slidePanelRight, slidePanelLeft, countUp, slideInFromRight, slideInFromLeft, staggerContainerSlow } from './chunk-PLRSH37T.mjs';
2
2
  import { focusRingClasses, focusRingCompactClasses, focusRingInsetClasses } from './chunk-MBYCK2JJ.mjs';
3
3
  import { cn, composeRefs } from './chunk-ZT3PCXDF.mjs';
4
4
  import { cva } from 'class-variance-authority';
@@ -552,7 +552,39 @@ var Callout = forwardRef(
552
552
  );
553
553
  Callout.displayName = "Callout";
554
554
  var calloutVariants = alertVariants;
555
- var AlertDialog = AlertDialog$1.Root;
555
+ var AlertDialogContext = createContext({
556
+ open: false
557
+ });
558
+ function useAlertDialogContext() {
559
+ return useContext(AlertDialogContext);
560
+ }
561
+ function AlertDialog({
562
+ children,
563
+ open: controlledOpen,
564
+ onOpenChange,
565
+ defaultOpen = false,
566
+ ...rest
567
+ }) {
568
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
569
+ const isControlled = controlledOpen !== void 0;
570
+ const open = isControlled ? controlledOpen : uncontrolledOpen;
571
+ const handleOpenChange = useCallback(
572
+ (next) => {
573
+ if (!isControlled) setUncontrolledOpen(next);
574
+ onOpenChange?.(next);
575
+ },
576
+ [isControlled, onOpenChange]
577
+ );
578
+ return /* @__PURE__ */ jsx(AlertDialogContext.Provider, { value: { open }, children: /* @__PURE__ */ jsx(
579
+ AlertDialog$1.Root,
580
+ {
581
+ open,
582
+ onOpenChange: handleOpenChange,
583
+ ...rest,
584
+ children
585
+ }
586
+ ) });
587
+ }
556
588
  AlertDialog.displayName = "AlertDialog";
557
589
  var AlertDialogTrigger = AlertDialog$1.Trigger;
558
590
  AlertDialogTrigger.displayName = "AlertDialogTrigger";
@@ -560,7 +592,7 @@ var AlertDialogPortal = AlertDialog$1.Portal;
560
592
  AlertDialogPortal.displayName = "AlertDialogPortal";
561
593
  var AlertDialogOverlay = forwardRef(function AlertDialogOverlay2({ className, ...rest }, ref) {
562
594
  const shouldReduce = useReducedMotion();
563
- return /* @__PURE__ */ jsx(AlertDialog$1.Overlay, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
595
+ return /* @__PURE__ */ jsx(AlertDialog$1.Overlay, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
564
596
  motion.div,
565
597
  {
566
598
  className: cn(
@@ -579,9 +611,10 @@ var AlertDialogOverlay = forwardRef(function AlertDialogOverlay2({ className, ..
579
611
  AlertDialogOverlay.displayName = "AlertDialogOverlay";
580
612
  var AlertDialogContent = forwardRef(function AlertDialogContent2({ className, children, ...rest }, ref) {
581
613
  const shouldReduce = useReducedMotion();
582
- return /* @__PURE__ */ jsxs(AlertDialog$1.Portal, { children: [
614
+ const { open } = useAlertDialogContext();
615
+ return /* @__PURE__ */ jsx(AlertDialog$1.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
583
616
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
584
- /* @__PURE__ */ jsx(AlertDialog$1.Content, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
617
+ /* @__PURE__ */ jsx(AlertDialog$1.Content, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
585
618
  motion.div,
586
619
  {
587
620
  className: cn(
@@ -604,7 +637,7 @@ var AlertDialogContent = forwardRef(function AlertDialogContent2({ className, ch
604
637
  children
605
638
  }
606
639
  ) })
607
- ] });
640
+ ] }) }) });
608
641
  });
609
642
  AlertDialogContent.displayName = "AlertDialogContent";
610
643
  function AlertDialogHeader({
@@ -1825,7 +1858,7 @@ var Button = forwardRef(
1825
1858
  loading && /* @__PURE__ */ jsx(ButtonSpinner, { className: size === "sm" ? "size-3.5" : "size-4" }),
1826
1859
  loading && loadingText ? /* @__PURE__ */ jsx("span", { children: loadingText }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1827
1860
  !loading && iconLeft && /* @__PURE__ */ jsx("span", { className: "shrink-0", "aria-hidden": "true", children: iconLeft }),
1828
- children && /* @__PURE__ */ jsx("span", { className: cn(loading && !loadingText && "invisible"), children }),
1861
+ children && /* @__PURE__ */ jsx("span", { className: cn("inline-flex items-center gap-[inherit]", loading && !loadingText && "invisible"), children }),
1829
1862
  !loading && iconRight && /* @__PURE__ */ jsx("span", { className: "shrink-0", "aria-hidden": "true", children: iconRight })
1830
1863
  ] })
1831
1864
  ]
@@ -2310,21 +2343,17 @@ var CardContext = createContext({ padding: "compact" });
2310
2343
  function useCardContext() {
2311
2344
  return useContext(CardContext);
2312
2345
  }
2313
- var cardPaddingMap = {
2314
- compact: "p-(--ds-padding-card)",
2315
- comfortable: "p-6"
2316
- };
2317
2346
  var slotPaddingXMap = {
2318
2347
  compact: "px-(--ds-padding-card)",
2319
2348
  comfortable: "px-6"
2320
2349
  };
2321
- var slotPaddingTopMap = {
2322
- compact: "pt-(--ds-padding-card)",
2323
- comfortable: "pt-6"
2350
+ var cardVerticalPaddingMap = {
2351
+ compact: "py-(--ds-padding-card)",
2352
+ comfortable: "py-6"
2324
2353
  };
2325
- var slotPaddingBottomMap = {
2326
- compact: "pb-(--ds-padding-card)",
2327
- comfortable: "pb-6"
2354
+ var cardGapMap = {
2355
+ compact: "gap-(--ds-gap-default,0.75rem)",
2356
+ comfortable: "gap-4"
2328
2357
  };
2329
2358
  var cardVariants = cva(
2330
2359
  // Base styles — shared across all variants
@@ -2418,6 +2447,8 @@ var Card = forwardRef(function Card2({
2418
2447
  className: cn(
2419
2448
  "not-prose",
2420
2449
  cardVariants({ variant, fullWidth }),
2450
+ cardVerticalPaddingMap[padding],
2451
+ cardGapMap[padding],
2421
2452
  className
2422
2453
  ),
2423
2454
  "data-ds": "",
@@ -2445,9 +2476,7 @@ var CardHeader = forwardRef(
2445
2476
  className: cn(
2446
2477
  "flex flex-col gap-1.5",
2447
2478
  slotPaddingXMap[padding],
2448
- slotPaddingTopMap[padding],
2449
- slotPaddingBottomMap[padding],
2450
- bordered && "border-b border-border-muted",
2479
+ bordered && "pb-(--ds-padding-card) border-b border-border-muted",
2451
2480
  className
2452
2481
  ),
2453
2482
  "data-ds": "",
@@ -2468,7 +2497,7 @@ var CardBody = forwardRef(
2468
2497
  ref,
2469
2498
  className: cn(
2470
2499
  "flex flex-col gap-2 flex-1",
2471
- cardPaddingMap[padding],
2500
+ slotPaddingXMap[padding],
2472
2501
  className
2473
2502
  ),
2474
2503
  "data-ds": "",
@@ -2490,9 +2519,7 @@ var CardFooter = forwardRef(
2490
2519
  className: cn(
2491
2520
  "flex items-center gap-2",
2492
2521
  slotPaddingXMap[padding],
2493
- slotPaddingTopMap[padding],
2494
- slotPaddingBottomMap[padding],
2495
- bordered && "border-t border-border-muted",
2522
+ bordered && "pt-(--ds-padding-card) border-t border-border-muted",
2496
2523
  alignMap[align],
2497
2524
  className
2498
2525
  ),
@@ -2870,7 +2897,7 @@ var Checkbox = forwardRef(function Checkbox2({
2870
2897
  )
2871
2898
  }
2872
2899
  ),
2873
- (label || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
2900
+ (label || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
2874
2901
  label && /* @__PURE__ */ jsx(
2875
2902
  "label",
2876
2903
  {
@@ -4167,6 +4194,41 @@ var Combobox = forwardRef(
4167
4194
  }
4168
4195
  );
4169
4196
  Combobox.displayName = "Combobox";
4197
+ var kbdVariants = cva(
4198
+ [
4199
+ "inline-flex items-center gap-0.5",
4200
+ "font-mono font-medium leading-none",
4201
+ "rounded border border-border",
4202
+ "bg-muted text-muted-foreground",
4203
+ "shadow-[0_1px_0_1px_hsl(var(--border))]",
4204
+ "select-none whitespace-nowrap"
4205
+ ],
4206
+ {
4207
+ variants: {
4208
+ size: {
4209
+ sm: "px-1.5 py-0.5 text-[10px]",
4210
+ md: "px-2 py-1 text-xs",
4211
+ lg: "px-2.5 py-1 text-sm"
4212
+ }
4213
+ },
4214
+ defaultVariants: { size: "md" }
4215
+ }
4216
+ );
4217
+ var Kbd = forwardRef(function Kbd2({ size = "md", className, children, ...rest }, ref) {
4218
+ return /* @__PURE__ */ jsx(
4219
+ "kbd",
4220
+ {
4221
+ ref,
4222
+ className: cn(kbdVariants({ size }), className),
4223
+ "data-ds": "",
4224
+ "data-ds-component": "kbd",
4225
+ "data-ds-size": size,
4226
+ ...rest,
4227
+ children
4228
+ }
4229
+ );
4230
+ });
4231
+ Kbd.displayName = "Kbd";
4170
4232
  function SearchIcon2({ className }) {
4171
4233
  return /* @__PURE__ */ jsxs(
4172
4234
  "svg",
@@ -4189,8 +4251,20 @@ function SearchIcon2({ className }) {
4189
4251
  }
4190
4252
  );
4191
4253
  }
4192
- function KbdHint({ keys }) {
4193
- return /* @__PURE__ */ jsx("kbd", { className: "inline-flex items-center gap-0.5 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: keys });
4254
+ function ShortcutKeys({ keys }) {
4255
+ const modifiers = /* @__PURE__ */ new Set(["\u2318", "\u21E7", "\u2325", "\u2303"]);
4256
+ const tokens = [];
4257
+ let rest = keys;
4258
+ while (rest.length > 0) {
4259
+ if (modifiers.has(rest[0])) {
4260
+ tokens.push(rest[0]);
4261
+ rest = rest.slice(1);
4262
+ } else {
4263
+ tokens.push(rest);
4264
+ break;
4265
+ }
4266
+ }
4267
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-center gap-0.5", children: tokens.map((token, i) => /* @__PURE__ */ jsx(Kbd, { size: "sm", children: token }, i)) });
4194
4268
  }
4195
4269
  function matchesSearch(item, query) {
4196
4270
  if (!query) return true;
@@ -4265,30 +4339,39 @@ function Command({
4265
4339
  el?.scrollIntoView({ block: "nearest" });
4266
4340
  }, []);
4267
4341
  let flatIndex = 0;
4268
- return /* @__PURE__ */ jsx(Dialog$1.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
4269
- /* @__PURE__ */ jsx(
4270
- Dialog$1.Overlay,
4342
+ const shouldReduce = useReducedMotion();
4343
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { open, onOpenChange, children: /* @__PURE__ */ jsx(Dialog$1.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
4344
+ /* @__PURE__ */ jsx(Dialog$1.Overlay, { forceMount: true, asChild: true, children: /* @__PURE__ */ jsx(
4345
+ motion.div,
4271
4346
  {
4272
4347
  className: cn(
4273
- "fixed inset-0 z-[var(--z-modal)] bg-black/50",
4274
- "data-[state=open]:animate-in data-[state=open]:fade-in-0",
4275
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
4276
- )
4348
+ "fixed inset-0 z-[var(--z-modal)] bg-black/50"
4349
+ ),
4350
+ variants: shouldReduce ? void 0 : overlayBackdrop.variants,
4351
+ initial: shouldReduce ? { opacity: 0 } : "initial",
4352
+ animate: shouldReduce ? { opacity: 1 } : "animate",
4353
+ exit: shouldReduce ? { opacity: 0 } : "exit",
4354
+ transition: shouldReduce ? { duration: 0.15 } : overlayBackdrop.transition,
4355
+ "data-ds-animated": ""
4277
4356
  }
4278
- ),
4279
- /* @__PURE__ */ jsxs(
4280
- Dialog$1.Content,
4357
+ ) }),
4358
+ /* @__PURE__ */ jsx(Dialog$1.Content, { forceMount: true, asChild: true, children: /* @__PURE__ */ jsxs(
4359
+ motion.div,
4281
4360
  {
4282
4361
  className: cn(
4283
4362
  "fixed left-1/2 top-[20%] z-[var(--z-modal)]",
4284
4363
  "w-full max-w-lg -translate-x-1/2",
4285
4364
  "rounded-lg border border-border bg-background shadow-xl",
4286
- "overflow-hidden",
4287
- "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-top-4",
4288
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
4365
+ "overflow-hidden"
4289
4366
  ),
4367
+ variants: shouldReduce ? void 0 : modalContent.variants,
4368
+ initial: shouldReduce ? { opacity: 0 } : "initial",
4369
+ animate: shouldReduce ? { opacity: 1 } : "animate",
4370
+ exit: shouldReduce ? { opacity: 0 } : "exit",
4371
+ transition: shouldReduce ? { duration: 0.2 } : modalContent.transition,
4290
4372
  "data-ds": "",
4291
4373
  "data-ds-component": "command",
4374
+ "data-ds-animated": "",
4292
4375
  "aria-label": "Command Palette",
4293
4376
  children: [
4294
4377
  /* @__PURE__ */ jsx(Dialog$1.Title, { className: "sr-only", children: "Command Palette" }),
@@ -4320,7 +4403,7 @@ function Command({
4320
4403
  )
4321
4404
  }
4322
4405
  ),
4323
- /* @__PURE__ */ jsx(KbdHint, { keys: "Esc" })
4406
+ /* @__PURE__ */ jsx(ShortcutKeys, { keys: "Esc" })
4324
4407
  ] }),
4325
4408
  /* @__PURE__ */ jsx(
4326
4409
  "div",
@@ -4382,7 +4465,7 @@ function Command({
4382
4465
  /* @__PURE__ */ jsx("p", { className: "truncate font-medium", children: item.label }),
4383
4466
  item.description && /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-muted-foreground", children: item.description })
4384
4467
  ] }),
4385
- item.shortcut && /* @__PURE__ */ jsx(KbdHint, { keys: item.shortcut })
4468
+ item.shortcut && /* @__PURE__ */ jsx(ShortcutKeys, { keys: item.shortcut })
4386
4469
  ]
4387
4470
  },
4388
4471
  item.id
@@ -4394,22 +4477,22 @@ function Command({
4394
4477
  ),
4395
4478
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-t border-border px-3 py-2", children: [
4396
4479
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
4397
- /* @__PURE__ */ jsx(KbdHint, { keys: "\u2191\u2193" }),
4480
+ /* @__PURE__ */ jsx(ShortcutKeys, { keys: "\u2191\u2193" }),
4398
4481
  " navigate"
4399
4482
  ] }),
4400
4483
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
4401
- /* @__PURE__ */ jsx(KbdHint, { keys: "\u21B5" }),
4484
+ /* @__PURE__ */ jsx(ShortcutKeys, { keys: "\u21B5" }),
4402
4485
  " select"
4403
4486
  ] }),
4404
4487
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
4405
- /* @__PURE__ */ jsx(KbdHint, { keys: "Esc" }),
4488
+ /* @__PURE__ */ jsx(ShortcutKeys, { keys: "Esc" }),
4406
4489
  " close"
4407
4490
  ] })
4408
4491
  ] })
4409
4492
  ]
4410
4493
  }
4411
- )
4412
- ] }) });
4494
+ ) })
4495
+ ] }) }) }) });
4413
4496
  }
4414
4497
  Command.displayName = "Command";
4415
4498
  var CommandTrigger = forwardRef(function CommandTrigger2({ label = "Search commands...", onClick, className }, ref) {
@@ -4434,7 +4517,7 @@ var CommandTrigger = forwardRef(function CommandTrigger2({ label = "Search comma
4434
4517
  children: [
4435
4518
  /* @__PURE__ */ jsx(SearchIcon2, { className: "size-3.5 shrink-0" }),
4436
4519
  /* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: label }),
4437
- /* @__PURE__ */ jsx(KbdHint, { keys: "\u2318K" })
4520
+ /* @__PURE__ */ jsx(ShortcutKeys, { keys: "\u2318K" })
4438
4521
  ]
4439
4522
  }
4440
4523
  );
@@ -4945,8 +5028,8 @@ CopyButton.displayName = "CopyButton";
4945
5028
  var dataListVariants = cva(["w-full"], {
4946
5029
  variants: {
4947
5030
  orientation: {
4948
- horizontal: "grid grid-cols-[auto_1fr] gap-x-6 gap-y-3",
4949
- vertical: "flex flex-col gap-3"
5031
+ horizontal: "grid grid-cols-[auto_1fr] items-baseline gap-x-6",
5032
+ vertical: "flex flex-col gap-2"
4950
5033
  },
4951
5034
  size: {
4952
5035
  sm: "text-xs",
@@ -4972,7 +5055,7 @@ var DataListTerm = forwardRef(
4972
5055
  DataListTerm.displayName = "DataListTerm";
4973
5056
  var DataListDetail = forwardRef(
4974
5057
  function DataListDetail2({ className, children, ...rest }, ref) {
4975
- return /* @__PURE__ */ jsx("dd", { ref, className: cn("text-foreground", className), ...rest, children });
5058
+ return /* @__PURE__ */ jsx("dd", { ref, className: cn("text-foreground m-0", className), ...rest, children });
4976
5059
  }
4977
5060
  );
4978
5061
  DataListDetail.displayName = "DataListDetail";
@@ -4987,6 +5070,7 @@ var DataList = forwardRef(
4987
5070
  }, ref) {
4988
5071
  const shouldReduce = useReducedMotion();
4989
5072
  const isHorizontal = orientation === "horizontal";
5073
+ const horizontalCellPadding = "py-2";
4990
5074
  return /* @__PURE__ */ jsx(
4991
5075
  motion.dl,
4992
5076
  {
@@ -5013,7 +5097,8 @@ var DataList = forwardRef(
5013
5097
  DataListTerm,
5014
5098
  {
5015
5099
  className: cn(
5016
- dividers && i > 0 && "pt-3 border-t border-border"
5100
+ horizontalCellPadding,
5101
+ dividers && i > 0 && "border-t border-border"
5017
5102
  ),
5018
5103
  children: item.term
5019
5104
  }
@@ -5022,7 +5107,8 @@ var DataList = forwardRef(
5022
5107
  DataListDetail,
5023
5108
  {
5024
5109
  className: cn(
5025
- dividers && i > 0 && "pt-3 border-t border-border"
5110
+ horizontalCellPadding,
5111
+ dividers && i > 0 && "border-t border-border"
5026
5112
  ),
5027
5113
  children: item.detail
5028
5114
  }
@@ -8437,7 +8523,7 @@ function Dropdown({
8437
8523
  "div",
8438
8524
  {
8439
8525
  className: cn(
8440
- "absolute top-full z-[var(--z-dropdown,40)] mt-1",
8526
+ "absolute top-full z-[var(--z-dropdown)] mt-1",
8441
8527
  align === "end" ? "right-0" : "left-0",
8442
8528
  "min-w-[8rem] rounded-md py-1",
8443
8529
  "border border-border bg-popover text-popover-foreground",
@@ -9859,6 +9945,10 @@ var dialogContentVariants = cva(
9859
9945
  }
9860
9946
  }
9861
9947
  );
9948
+ var DialogContext = createContext({ open: false });
9949
+ function useDialogContext() {
9950
+ return useContext(DialogContext);
9951
+ }
9862
9952
  function CloseIcon2({ className }) {
9863
9953
  return /* @__PURE__ */ jsxs(
9864
9954
  "svg",
@@ -9879,8 +9969,32 @@ function CloseIcon2({ className }) {
9879
9969
  }
9880
9970
  );
9881
9971
  }
9882
- function Dialog({ children, ...rest }) {
9883
- return /* @__PURE__ */ jsx(Dialog$1.Root, { ...rest, children });
9972
+ function Dialog({
9973
+ children,
9974
+ open: controlledOpen,
9975
+ onOpenChange,
9976
+ defaultOpen = false,
9977
+ ...rest
9978
+ }) {
9979
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
9980
+ const isControlled = controlledOpen !== void 0;
9981
+ const open = isControlled ? controlledOpen : uncontrolledOpen;
9982
+ const handleOpenChange = useCallback(
9983
+ (next) => {
9984
+ if (!isControlled) setUncontrolledOpen(next);
9985
+ onOpenChange?.(next);
9986
+ },
9987
+ [isControlled, onOpenChange]
9988
+ );
9989
+ return /* @__PURE__ */ jsx(DialogContext.Provider, { value: { open }, children: /* @__PURE__ */ jsx(
9990
+ Dialog$1.Root,
9991
+ {
9992
+ open,
9993
+ onOpenChange: handleOpenChange,
9994
+ ...rest,
9995
+ children
9996
+ }
9997
+ ) });
9884
9998
  }
9885
9999
  Dialog.displayName = "Dialog";
9886
10000
  var DialogTrigger = forwardRef(function DialogTrigger2({ className, ...rest }, ref) {
@@ -9898,7 +10012,7 @@ var DialogTrigger = forwardRef(function DialogTrigger2({ className, ...rest }, r
9898
10012
  DialogTrigger.displayName = "DialogTrigger";
9899
10013
  var DialogOverlay = forwardRef(function DialogOverlay2({ className, ...rest }, ref) {
9900
10014
  const shouldReduce = useReducedMotion();
9901
- return /* @__PURE__ */ jsx(Dialog$1.Overlay, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
10015
+ return /* @__PURE__ */ jsx(Dialog$1.Overlay, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
9902
10016
  motion.div,
9903
10017
  {
9904
10018
  className: cn(
@@ -9926,9 +10040,10 @@ var DialogContent = forwardRef(function DialogContent2({
9926
10040
  ...rest
9927
10041
  }, ref) {
9928
10042
  const shouldReduce = useReducedMotion();
9929
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
10043
+ const { open } = useDialogContext();
10044
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
9930
10045
  /* @__PURE__ */ jsx(DialogOverlay, { className: overlayClassName }),
9931
- /* @__PURE__ */ jsx(Dialog$1.Content, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsxs(
10046
+ /* @__PURE__ */ jsx(Dialog$1.Content, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsxs(
9932
10047
  motion.div,
9933
10048
  {
9934
10049
  className: cn(
@@ -9965,7 +10080,7 @@ var DialogContent = forwardRef(function DialogContent2({
9965
10080
  ]
9966
10081
  }
9967
10082
  ) })
9968
- ] });
10083
+ ] }) }) });
9969
10084
  });
9970
10085
  DialogContent.displayName = "DialogContent";
9971
10086
  function DialogHeader({
@@ -11369,7 +11484,7 @@ var addonVariants = cva(
11369
11484
  [
11370
11485
  "inline-flex items-center justify-center shrink-0",
11371
11486
  "bg-muted text-muted-foreground font-medium",
11372
- "px-3 select-none",
11487
+ "select-none",
11373
11488
  "border-border"
11374
11489
  ],
11375
11490
  {
@@ -11387,21 +11502,51 @@ var addonVariants = cva(
11387
11502
  defaultVariants: { position: "left", size: "md" }
11388
11503
  }
11389
11504
  );
11390
- var prefixSuffixVariants = cva(
11391
- [
11392
- "inline-flex items-center shrink-0",
11393
- "text-muted-foreground pointer-events-none"
11394
- ],
11395
- {
11396
- variants: {
11397
- position: {
11398
- left: "pl-3",
11399
- right: "pr-3"
11400
- }
11401
- },
11402
- defaultVariants: { position: "left" }
11403
- }
11404
- );
11505
+ var iconSizeMap5 = {
11506
+ sm: "[&>svg]:size-3.5",
11507
+ md: "[&>svg]:size-4",
11508
+ lg: "[&>svg]:size-4"
11509
+ };
11510
+ var prefixPaddingMap = {
11511
+ sm: "pl-2",
11512
+ md: "pl-3",
11513
+ lg: "pl-3"
11514
+ };
11515
+ var suffixPaddingMap = {
11516
+ sm: "pr-2",
11517
+ md: "pr-3",
11518
+ lg: "pr-3"
11519
+ };
11520
+ var inputLeftPaddingWithPrefix = {
11521
+ sm: "pl-1.5",
11522
+ md: "pl-2",
11523
+ lg: "pl-2"
11524
+ };
11525
+ var inputLeftPaddingWithAddon = {
11526
+ sm: "pl-2",
11527
+ md: "pl-3",
11528
+ lg: "pl-3"
11529
+ };
11530
+ var inputLeftPaddingWithoutPrefix = {
11531
+ sm: "pl-2",
11532
+ md: "pl-3",
11533
+ lg: "pl-3"
11534
+ };
11535
+ var inputRightPaddingWithSuffix = {
11536
+ sm: "pr-1.5",
11537
+ md: "pr-2",
11538
+ lg: "pr-2"
11539
+ };
11540
+ var inputRightPaddingWithAddon = {
11541
+ sm: "pr-2",
11542
+ md: "pr-3",
11543
+ lg: "pr-3"
11544
+ };
11545
+ var inputRightPaddingWithoutSuffix = {
11546
+ sm: "pr-2",
11547
+ md: "pr-3",
11548
+ lg: "pr-3"
11549
+ };
11405
11550
  var InputGroup = forwardRef(
11406
11551
  function InputGroup2({
11407
11552
  size = "md",
@@ -11417,7 +11562,11 @@ var InputGroup = forwardRef(
11417
11562
  inputProps,
11418
11563
  children
11419
11564
  }, ref) {
11420
- const iconSize = size === "lg" ? "size-4" : "size-3.5";
11565
+ const hasPrefix = !!prefix;
11566
+ const hasSuffix = !!suffix;
11567
+ const hasAddonRight = !!addonRight;
11568
+ const inputPaddingLeft = hasPrefix ? inputLeftPaddingWithPrefix[size] : addonLeft ? inputLeftPaddingWithAddon[size] : inputLeftPaddingWithoutPrefix[size];
11569
+ const inputPaddingRight = hasSuffix ? inputRightPaddingWithSuffix[size] : hasAddonRight ? inputRightPaddingWithAddon[size] : inputRightPaddingWithoutSuffix[size];
11421
11570
  return /* @__PURE__ */ jsxs(
11422
11571
  "div",
11423
11572
  {
@@ -11433,8 +11582,10 @@ var InputGroup = forwardRef(
11433
11582
  "span",
11434
11583
  {
11435
11584
  className: cn(
11436
- prefixSuffixVariants({ position: "left" }),
11437
- `[&>svg]:${iconSize}`
11585
+ "inline-flex items-center justify-center shrink-0",
11586
+ "text-muted-foreground pointer-events-none",
11587
+ prefixPaddingMap[size],
11588
+ iconSizeMap5[size]
11438
11589
  ),
11439
11590
  children: prefix
11440
11591
  }
@@ -11444,10 +11595,10 @@ var InputGroup = forwardRef(
11444
11595
  {
11445
11596
  disabled,
11446
11597
  className: cn(
11447
- "flex-1 h-full bg-transparent outline-none text-foreground",
11598
+ "flex-1 h-full bg-transparent outline-none text-foreground min-w-0",
11448
11599
  "placeholder:text-muted-foreground",
11449
- !prefix && "pl-3",
11450
- !suffix && !addonRight && "pr-3",
11600
+ inputPaddingLeft,
11601
+ inputPaddingRight,
11451
11602
  inputClassName
11452
11603
  ),
11453
11604
  ...inputProps
@@ -11457,8 +11608,10 @@ var InputGroup = forwardRef(
11457
11608
  "span",
11458
11609
  {
11459
11610
  className: cn(
11460
- prefixSuffixVariants({ position: "right" }),
11461
- `[&>svg]:${iconSize}`
11611
+ "inline-flex items-center justify-center shrink-0",
11612
+ "text-muted-foreground pointer-events-none",
11613
+ suffixPaddingMap[size],
11614
+ iconSizeMap5[size]
11462
11615
  ),
11463
11616
  children: suffix
11464
11617
  }
@@ -11470,41 +11623,6 @@ var InputGroup = forwardRef(
11470
11623
  }
11471
11624
  );
11472
11625
  InputGroup.displayName = "InputGroup";
11473
- var kbdVariants = cva(
11474
- [
11475
- "inline-flex items-center gap-0.5",
11476
- "font-mono font-medium leading-none",
11477
- "rounded border border-border",
11478
- "bg-muted text-muted-foreground",
11479
- "shadow-[0_1px_0_1px_hsl(var(--border))]",
11480
- "select-none whitespace-nowrap"
11481
- ],
11482
- {
11483
- variants: {
11484
- size: {
11485
- sm: "px-1.5 py-0.5 text-[10px]",
11486
- md: "px-2 py-1 text-xs",
11487
- lg: "px-2.5 py-1 text-sm"
11488
- }
11489
- },
11490
- defaultVariants: { size: "md" }
11491
- }
11492
- );
11493
- var Kbd = forwardRef(function Kbd2({ size = "md", className, children, ...rest }, ref) {
11494
- return /* @__PURE__ */ jsx(
11495
- "kbd",
11496
- {
11497
- ref,
11498
- className: cn(kbdVariants({ size }), className),
11499
- "data-ds": "",
11500
- "data-ds-component": "kbd",
11501
- "data-ds-size": size,
11502
- ...rest,
11503
- children
11504
- }
11505
- );
11506
- });
11507
- Kbd.displayName = "Kbd";
11508
11626
  var labelVariants = cva(
11509
11627
  // Base styles — shared across all sizes
11510
11628
  [
@@ -12225,10 +12343,16 @@ function roundToPrecision(value, precision) {
12225
12343
  const factor = 10 ** precision;
12226
12344
  return Math.round(value * factor) / factor;
12227
12345
  }
12346
+ var ROLL_DISTANCE = 12;
12347
+ var ROLL_TRANSITION = {
12348
+ duration: 0.2,
12349
+ ease: [0.4, 0, 0.2, 1]
12350
+ };
12228
12351
  function AnimatedValue({
12229
12352
  value,
12230
12353
  formatValue,
12231
- shouldReduce
12354
+ shouldReduce,
12355
+ direction
12232
12356
  }) {
12233
12357
  const [displayValue, setDisplayValue] = useState(value);
12234
12358
  const [key, setKey] = useState(0);
@@ -12239,6 +12363,13 @@ function AnimatedValue({
12239
12363
  if (shouldReduce) {
12240
12364
  return /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formatValue(displayValue) });
12241
12365
  }
12366
+ const enterY = direction === "down" ? -ROLL_DISTANCE : ROLL_DISTANCE;
12367
+ const exitY = direction === "down" ? ROLL_DISTANCE : -ROLL_DISTANCE;
12368
+ const variants = {
12369
+ initial: { opacity: 0, y: enterY },
12370
+ animate: { opacity: 1, y: 0 },
12371
+ exit: { opacity: 0, y: exitY }
12372
+ };
12242
12373
  return /* @__PURE__ */ jsx(
12243
12374
  "span",
12244
12375
  {
@@ -12249,11 +12380,11 @@ function AnimatedValue({
12249
12380
  motion.span,
12250
12381
  {
12251
12382
  className: "inline-block tabular-nums",
12252
- variants: numberRoll.variants,
12383
+ variants,
12253
12384
  initial: "initial",
12254
12385
  animate: "animate",
12255
12386
  exit: "exit",
12256
- transition: numberRoll.transition,
12387
+ transition: ROLL_TRANSITION,
12257
12388
  "data-ds-animated": "",
12258
12389
  children: formatValue(displayValue)
12259
12390
  },
@@ -12267,7 +12398,7 @@ var buttonWidthMap = {
12267
12398
  md: "w-8",
12268
12399
  lg: "w-9"
12269
12400
  };
12270
- var iconSizeMap5 = {
12401
+ var iconSizeMap6 = {
12271
12402
  sm: "size-3",
12272
12403
  md: "size-3.5",
12273
12404
  lg: "size-4"
@@ -12303,13 +12434,27 @@ var NumberInput = forwardRef(
12303
12434
  () => roundToPrecision(clamp(defaultValue, min2, max2), precision)
12304
12435
  );
12305
12436
  const [inputRaw, setInputRaw] = useState(null);
12437
+ const [direction, setDirection] = useState("none");
12306
12438
  const inputRef = useRef(null);
12439
+ const prevValueRef = useRef(
12440
+ controlledValue ?? roundToPrecision(clamp(defaultValue, min2, max2), precision)
12441
+ );
12307
12442
  const currentValue = controlledValue !== void 0 ? controlledValue : internalValue;
12443
+ useEffect(() => {
12444
+ if (controlledValue !== void 0 && controlledValue !== prevValueRef.current) {
12445
+ setDirection(controlledValue > prevValueRef.current ? "up" : "down");
12446
+ prevValueRef.current = controlledValue;
12447
+ }
12448
+ }, [controlledValue]);
12308
12449
  const resolvedFormat = formatValue ?? ((v) => v.toFixed(precision));
12309
12450
  const resolvedParse = parseValue ?? ((raw) => Number.parseFloat(raw.replace(/[^0-9.-]/g, "")));
12310
12451
  const commit = useCallback(
12311
12452
  (next) => {
12312
12453
  const clamped = roundToPrecision(clamp(next, min2, max2), precision);
12454
+ if (clamped !== currentValue) {
12455
+ setDirection(clamped > currentValue ? "up" : "down");
12456
+ prevValueRef.current = clamped;
12457
+ }
12313
12458
  if (controlledValue === void 0) {
12314
12459
  setInternalValue(clamped);
12315
12460
  }
@@ -12422,7 +12567,7 @@ var NumberInput = forwardRef(
12422
12567
  buttonWidthMap[size],
12423
12568
  "border-r border-input/60"
12424
12569
  ),
12425
- children: /* @__PURE__ */ jsx(MinusIcon, { className: iconSizeMap5[size] })
12570
+ children: /* @__PURE__ */ jsx(MinusIcon, { className: iconSizeMap6[size] })
12426
12571
  }
12427
12572
  ),
12428
12573
  /* @__PURE__ */ jsx("div", { className: "relative flex-1 flex items-center justify-center", children: inputRaw !== null ? (
@@ -12470,7 +12615,8 @@ var NumberInput = forwardRef(
12470
12615
  {
12471
12616
  value: currentValue,
12472
12617
  formatValue: resolvedFormat,
12473
- shouldReduce: shouldReduce ?? false
12618
+ shouldReduce: shouldReduce ?? false,
12619
+ direction
12474
12620
  }
12475
12621
  )
12476
12622
  }
@@ -12489,7 +12635,7 @@ var NumberInput = forwardRef(
12489
12635
  buttonWidthMap[size],
12490
12636
  "border-l border-input/60"
12491
12637
  ),
12492
- children: /* @__PURE__ */ jsx(PlusIcon, { className: iconSizeMap5[size] })
12638
+ children: /* @__PURE__ */ jsx(PlusIcon, { className: iconSizeMap6[size] })
12493
12639
  }
12494
12640
  )
12495
12641
  ]
@@ -12592,7 +12738,7 @@ function computePageRange(currentPage, totalPages, siblings, boundary) {
12592
12738
  }
12593
12739
  return items;
12594
12740
  }
12595
- var iconSizeMap6 = {
12741
+ var iconSizeMap7 = {
12596
12742
  sm: "size-3.5",
12597
12743
  md: "size-4"
12598
12744
  };
@@ -12665,7 +12811,7 @@ var Pagination = forwardRef(
12665
12811
  })
12666
12812
  ),
12667
12813
  "aria-label": prevLabel,
12668
- children: /* @__PURE__ */ jsx(ChevronLeftIcon2, { className: iconSizeMap6[size] })
12814
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon2, { className: iconSizeMap7[size] })
12669
12815
  }
12670
12816
  ),
12671
12817
  /* @__PURE__ */ jsxs(
@@ -12697,7 +12843,7 @@ var Pagination = forwardRef(
12697
12843
  })
12698
12844
  ),
12699
12845
  "aria-label": nextLabel,
12700
- children: /* @__PURE__ */ jsx(ChevronRightIcon6, { className: iconSizeMap6[size] })
12846
+ children: /* @__PURE__ */ jsx(ChevronRightIcon6, { className: iconSizeMap7[size] })
12701
12847
  }
12702
12848
  )
12703
12849
  ]
@@ -12725,7 +12871,7 @@ var Pagination = forwardRef(
12725
12871
  className: cn(paginationButtonVariants({ size, active: false })),
12726
12872
  "aria-label": prevLabel,
12727
12873
  children: [
12728
- /* @__PURE__ */ jsx(ChevronLeftIcon2, { className: iconSizeMap6[size] }),
12874
+ /* @__PURE__ */ jsx(ChevronLeftIcon2, { className: iconSizeMap7[size] }),
12729
12875
  /* @__PURE__ */ jsx("span", { className: "sr-only sm:not-sr-only", children: prevLabel })
12730
12876
  ]
12731
12877
  }
@@ -12775,7 +12921,7 @@ var Pagination = forwardRef(
12775
12921
  "aria-label": nextLabel,
12776
12922
  children: [
12777
12923
  /* @__PURE__ */ jsx("span", { className: "sr-only sm:not-sr-only", children: nextLabel }),
12778
- /* @__PURE__ */ jsx(ChevronRightIcon6, { className: iconSizeMap6[size] })
12924
+ /* @__PURE__ */ jsx(ChevronRightIcon6, { className: iconSizeMap7[size] })
12779
12925
  ]
12780
12926
  }
12781
12927
  )
@@ -13612,7 +13758,7 @@ var RadioGroupItem = forwardRef(function RadioGroupItem2({ value, label, descrip
13612
13758
  )
13613
13759
  }
13614
13760
  ),
13615
- (label || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
13761
+ (label || description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
13616
13762
  label && /* @__PURE__ */ jsx(
13617
13763
  "label",
13618
13764
  {
@@ -14020,11 +14166,20 @@ function LoaderIcon({ className }) {
14020
14166
  }
14021
14167
  );
14022
14168
  }
14023
- var iconSizeMap7 = {
14169
+ var iconSizeMap8 = {
14024
14170
  sm: "size-3.5",
14025
14171
  md: "size-4",
14026
14172
  lg: "size-4"
14027
14173
  };
14174
+ function useIsMac() {
14175
+ const [isMac, setIsMac] = useState(false);
14176
+ useEffect(() => {
14177
+ setIsMac(
14178
+ typeof navigator !== "undefined" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.userAgent)
14179
+ );
14180
+ }, []);
14181
+ return isMac;
14182
+ }
14028
14183
  var SearchInput = forwardRef(
14029
14184
  function SearchInput2({
14030
14185
  value: controlledValue,
@@ -14043,9 +14198,11 @@ var SearchInput = forwardRef(
14043
14198
  ...rest
14044
14199
  }, ref) {
14045
14200
  const shouldReduce = useReducedMotion();
14201
+ const isMac = useIsMac();
14046
14202
  const [internalValue, setInternalValue] = useState(defaultValue);
14047
14203
  const debounceTimer = useRef(null);
14048
14204
  const inputRef = useRef(null);
14205
+ useImperativeHandle(ref, () => inputRef.current);
14049
14206
  const currentValue = controlledValue !== void 0 ? controlledValue : internalValue;
14050
14207
  const hasValue = currentValue.length > 0;
14051
14208
  const handleChange = useCallback(
@@ -14067,21 +14224,19 @@ var SearchInput = forwardRef(
14067
14224
  if (controlledValue === void 0) setInternalValue("");
14068
14225
  onChange?.("");
14069
14226
  onDebouncedChange?.("");
14070
- const inputEl = ref?.current ?? inputRef.current;
14071
- inputEl?.focus();
14072
- }, [controlledValue, onChange, onDebouncedChange, ref]);
14227
+ inputRef.current?.focus();
14228
+ }, [controlledValue, onChange, onDebouncedChange]);
14073
14229
  useEffect(() => {
14074
14230
  if (!shortcut) return;
14075
14231
  const handler = (e) => {
14076
14232
  if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === shortcut.toLowerCase()) {
14077
14233
  e.preventDefault();
14078
- const inputEl = ref?.current ?? inputRef.current;
14079
- inputEl?.focus();
14234
+ inputRef.current?.focus();
14080
14235
  }
14081
14236
  };
14082
14237
  window.addEventListener("keydown", handler);
14083
14238
  return () => window.removeEventListener("keydown", handler);
14084
- }, [shortcut, ref]);
14239
+ }, [shortcut]);
14085
14240
  return /* @__PURE__ */ jsxs(
14086
14241
  "div",
14087
14242
  {
@@ -14090,11 +14245,11 @@ var SearchInput = forwardRef(
14090
14245
  "data-ds-component": "search-input",
14091
14246
  "data-ds-size": size,
14092
14247
  children: [
14093
- /* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground pointer-events-none", children: loading ? /* @__PURE__ */ jsx(LoaderIcon, { className: iconSizeMap7[size] }) : /* @__PURE__ */ jsx(SearchIcon3, { className: iconSizeMap7[size] }) }),
14248
+ /* @__PURE__ */ jsx("span", { className: "shrink-0 text-muted-foreground pointer-events-none", children: loading ? /* @__PURE__ */ jsx(LoaderIcon, { className: iconSizeMap8[size] }) : /* @__PURE__ */ jsx(SearchIcon3, { className: iconSizeMap8[size] }) }),
14094
14249
  /* @__PURE__ */ jsx(
14095
14250
  "input",
14096
14251
  {
14097
- ref: ref ?? inputRef,
14252
+ ref: inputRef,
14098
14253
  type: "search",
14099
14254
  value: currentValue,
14100
14255
  onChange: handleChange,
@@ -14127,20 +14282,26 @@ var SearchInput = forwardRef(
14127
14282
  exit: shouldReduce ? { opacity: 0 } : "exit",
14128
14283
  transition: shouldReduce ? { duration: 0.1 } : fadeInFast.transition,
14129
14284
  "data-ds-animated": "",
14130
- children: /* @__PURE__ */ jsx(XIcon5, { className: iconSizeMap7[size] })
14285
+ children: /* @__PURE__ */ jsx(XIcon5, { className: iconSizeMap8[size] })
14131
14286
  },
14132
14287
  "clear"
14133
14288
  ) }),
14134
- shortcut && !hasValue && /* @__PURE__ */ jsx(
14289
+ shortcut && !hasValue && /* @__PURE__ */ jsxs(
14135
14290
  "kbd",
14136
14291
  {
14137
14292
  className: cn(
14138
- "hidden sm:inline-flex items-center gap-0.5 rounded border border-border",
14139
- "bg-muted text-muted-foreground font-mono font-medium",
14293
+ "hidden sm:inline-flex items-center gap-0.5",
14294
+ "rounded-md border border-border",
14295
+ "bg-muted/80 text-muted-foreground",
14296
+ "font-sans font-medium tracking-wide",
14297
+ "shadow-[0_1px_0_1px_rgba(0,0,0,0.15)] dark:shadow-[0_1px_0_1px_rgba(255,255,255,0.06)]",
14140
14298
  "pointer-events-none select-none",
14141
- size === "sm" ? "px-1 py-0.5 text-[9px]" : "px-1.5 py-0.5 text-[10px]"
14299
+ size === "sm" ? "h-5 min-w-5 px-1 text-[10px]" : "h-6 min-w-6 px-1.5 text-[11px]"
14142
14300
  ),
14143
- children: shortcut
14301
+ children: [
14302
+ /* @__PURE__ */ jsx("span", { className: "opacity-70", children: isMac ? "\u2318" : "Ctrl" }),
14303
+ /* @__PURE__ */ jsx("span", { children: shortcut.toUpperCase() })
14304
+ ]
14144
14305
  }
14145
14306
  )
14146
14307
  ] })
@@ -14246,7 +14407,7 @@ function CheckIconInternal({ className }) {
14246
14407
  }
14247
14408
  );
14248
14409
  }
14249
- var iconSizeMap8 = {
14410
+ var iconSizeMap9 = {
14250
14411
  sm: "size-3.5",
14251
14412
  md: "size-4",
14252
14413
  lg: "size-4"
@@ -14268,7 +14429,7 @@ var SelectTrigger = forwardRef(function SelectTrigger2({ className, children, va
14268
14429
  /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
14269
14430
  ChevronDownIcon4,
14270
14431
  {
14271
- className: cn(iconSizeMap8[size], "shrink-0 text-muted-foreground")
14432
+ className: cn(iconSizeMap9[size], "shrink-0 text-muted-foreground")
14272
14433
  }
14273
14434
  ) })
14274
14435
  ]
@@ -14549,6 +14710,10 @@ var sheetContentVariants = cva(
14549
14710
  }
14550
14711
  }
14551
14712
  );
14713
+ var SheetContext = createContext({ open: false });
14714
+ function useSheetContext() {
14715
+ return useContext(SheetContext);
14716
+ }
14552
14717
  function CloseIcon4({ className }) {
14553
14718
  return /* @__PURE__ */ jsxs(
14554
14719
  "svg",
@@ -14569,8 +14734,32 @@ function CloseIcon4({ className }) {
14569
14734
  }
14570
14735
  );
14571
14736
  }
14572
- function Sheet({ children, ...rest }) {
14573
- return /* @__PURE__ */ jsx(Dialog$1.Root, { ...rest, children });
14737
+ function Sheet({
14738
+ children,
14739
+ open: controlledOpen,
14740
+ onOpenChange,
14741
+ defaultOpen = false,
14742
+ ...rest
14743
+ }) {
14744
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
14745
+ const isControlled = controlledOpen !== void 0;
14746
+ const open = isControlled ? controlledOpen : uncontrolledOpen;
14747
+ const handleOpenChange = useCallback(
14748
+ (next) => {
14749
+ if (!isControlled) setUncontrolledOpen(next);
14750
+ onOpenChange?.(next);
14751
+ },
14752
+ [isControlled, onOpenChange]
14753
+ );
14754
+ return /* @__PURE__ */ jsx(SheetContext.Provider, { value: { open }, children: /* @__PURE__ */ jsx(
14755
+ Dialog$1.Root,
14756
+ {
14757
+ open,
14758
+ onOpenChange: handleOpenChange,
14759
+ ...rest,
14760
+ children
14761
+ }
14762
+ ) });
14574
14763
  }
14575
14764
  Sheet.displayName = "Sheet";
14576
14765
  var SheetTrigger = forwardRef(function SheetTrigger2({ className, ...rest }, ref) {
@@ -14588,7 +14777,7 @@ var SheetTrigger = forwardRef(function SheetTrigger2({ className, ...rest }, ref
14588
14777
  SheetTrigger.displayName = "SheetTrigger";
14589
14778
  var SheetOverlay = forwardRef(function SheetOverlay2({ className, ...rest }, ref) {
14590
14779
  const shouldReduce = useReducedMotion();
14591
- return /* @__PURE__ */ jsx(Dialog$1.Overlay, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
14780
+ return /* @__PURE__ */ jsx(Dialog$1.Overlay, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsx(
14592
14781
  motion.div,
14593
14782
  {
14594
14783
  className: cn(
@@ -14623,10 +14812,11 @@ var SheetContent = forwardRef(function SheetContent2({
14623
14812
  ...rest
14624
14813
  }, ref) {
14625
14814
  const shouldReduce = useReducedMotion();
14815
+ const { open } = useSheetContext();
14626
14816
  const preset = sidePresetMap[side];
14627
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
14817
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsxs(Fragment, { children: [
14628
14818
  /* @__PURE__ */ jsx(SheetOverlay, { className: overlayClassName }),
14629
- /* @__PURE__ */ jsx(Dialog$1.Content, { ref, asChild: true, ...rest, children: /* @__PURE__ */ jsxs(
14819
+ /* @__PURE__ */ jsx(Dialog$1.Content, { ref, forceMount: true, asChild: true, ...rest, children: /* @__PURE__ */ jsxs(
14630
14820
  motion.div,
14631
14821
  {
14632
14822
  className: cn(
@@ -14664,7 +14854,7 @@ var SheetContent = forwardRef(function SheetContent2({
14664
14854
  ]
14665
14855
  }
14666
14856
  ) })
14667
- ] });
14857
+ ] }) }) });
14668
14858
  });
14669
14859
  SheetContent.displayName = "SheetContent";
14670
14860
  function SheetHeader({ className, children }) {
@@ -15539,35 +15729,33 @@ function SliderThumbItem({
15539
15729
  shouldReduce
15540
15730
  }) {
15541
15731
  const [isActive, setIsActive] = useState(false);
15542
- return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
15543
- showTooltip && /* @__PURE__ */ jsx(
15544
- SliderTooltip,
15545
- {
15546
- value,
15547
- visible: isActive,
15548
- format: formatTooltip
15549
- }
15550
- ),
15551
- /* @__PURE__ */ jsx(
15552
- MotionThumb,
15553
- {
15554
- className: cn(sliderThumbVariants({ variant, size })),
15555
- onMouseEnter: () => setIsActive(true),
15556
- onMouseLeave: () => setIsActive(false),
15557
- onFocus: () => setIsActive(true),
15558
- onBlur: () => setIsActive(false),
15559
- whileTap: shouldReduce ? void 0 : {
15560
- scale: 1.2,
15561
- transition: { type: "spring", stiffness: 400, damping: 25 }
15562
- },
15563
- whileHover: shouldReduce ? void 0 : {
15564
- scale: 1.1,
15565
- transition: { type: "spring", stiffness: 400, damping: 30 }
15566
- },
15567
- "data-ds-animated": ""
15568
- }
15569
- )
15570
- ] });
15732
+ return /* @__PURE__ */ jsx(
15733
+ MotionThumb,
15734
+ {
15735
+ className: cn("relative overflow-visible", sliderThumbVariants({ variant, size })),
15736
+ onMouseEnter: () => setIsActive(true),
15737
+ onMouseLeave: () => setIsActive(false),
15738
+ onFocus: () => setIsActive(true),
15739
+ onBlur: () => setIsActive(false),
15740
+ whileTap: shouldReduce ? void 0 : {
15741
+ scale: 1.2,
15742
+ transition: { type: "spring", stiffness: 400, damping: 25 }
15743
+ },
15744
+ whileHover: shouldReduce ? void 0 : {
15745
+ scale: 1.1,
15746
+ transition: { type: "spring", stiffness: 400, damping: 30 }
15747
+ },
15748
+ "data-ds-animated": "",
15749
+ children: showTooltip && /* @__PURE__ */ jsx(
15750
+ SliderTooltip,
15751
+ {
15752
+ value,
15753
+ visible: isActive,
15754
+ format: formatTooltip
15755
+ }
15756
+ )
15757
+ }
15758
+ );
15571
15759
  }
15572
15760
  var Slider = forwardRef(function Slider2({
15573
15761
  variant = "default",
@@ -16385,7 +16573,7 @@ var Switch = forwardRef(function Switch2({
16385
16573
  if (!label) {
16386
16574
  return switchElement;
16387
16575
  }
16388
- const labelBlock = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
16576
+ const labelBlock = /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
16389
16577
  /* @__PURE__ */ jsx(
16390
16578
  "label",
16391
16579
  {
@@ -16417,7 +16605,7 @@ var Switch = forwardRef(function Switch2({
16417
16605
  "div",
16418
16606
  {
16419
16607
  className: cn(
16420
- "inline-flex items-center gap-3",
16608
+ "flex items-center gap-3",
16421
16609
  // Reverse order when label is on the left
16422
16610
  labelPosition === "left" ? "flex-row" : "flex-row-reverse",
16423
16611
  // Align to start when description is present
@@ -16962,7 +17150,7 @@ var dotSizeMap2 = {
16962
17150
  md: "size-3",
16963
17151
  lg: "size-4"
16964
17152
  };
16965
- var iconSizeMap9 = {
17153
+ var iconSizeMap10 = {
16966
17154
  sm: "size-6",
16967
17155
  md: "size-8",
16968
17156
  lg: "size-10"
@@ -17000,7 +17188,7 @@ var TimelineItem = forwardRef(
17000
17188
  {
17001
17189
  className: cn(
17002
17190
  "flex items-center justify-center rounded-full shrink-0 z-10",
17003
- iconSizeMap9[size],
17191
+ iconSizeMap10[size],
17004
17192
  statusIconColorMap[status]
17005
17193
  ),
17006
17194
  children: icon
@@ -18795,7 +18983,7 @@ function TreeItem({ node, depth }) {
18795
18983
  exit: { height: 0, opacity: 0, overflow: "hidden" },
18796
18984
  transition: motionTransition,
18797
18985
  className: cn(
18798
- "relative",
18986
+ "relative list-none",
18799
18987
  showLines && "before:absolute before:left-[calc(var(--tree-indent))] before:top-0 before:bottom-2 before:w-px before:bg-border"
18800
18988
  ),
18801
18989
  style: {
@@ -18922,7 +19110,7 @@ var TreeView = forwardRef(
18922
19110
  {
18923
19111
  ref,
18924
19112
  role: "tree",
18925
- className: cn("text-sm", className),
19113
+ className: cn("list-none text-sm", className),
18926
19114
  "data-ds": "",
18927
19115
  "data-ds-component": "tree-view",
18928
19116
  children: items.map((item) => /* @__PURE__ */ jsx(TreeItem, { node: item, depth: 0 }, item.id))
@@ -18986,7 +19174,7 @@ var VirtualList = forwardRef(function VirtualList2({
18986
19174
  {
18987
19175
  ref: containerRef,
18988
19176
  className: cn(
18989
- "flex items-center justify-center border border-border rounded-lg bg-background",
19177
+ "flex items-center justify-center rounded-lg border border-border bg-background shadow-sm not-prose",
18990
19178
  className
18991
19179
  ),
18992
19180
  style: { height },
@@ -19003,7 +19191,14 @@ var VirtualList = forwardRef(function VirtualList2({
19003
19191
  /* @__PURE__ */ jsx(
19004
19192
  "div",
19005
19193
  {
19006
- className: cn("absolute left-0 right-0", itemClassName),
19194
+ className: cn(
19195
+ "absolute left-0 right-0 flex items-center",
19196
+ "transition-colors duration-fast ease-standard",
19197
+ "hover:bg-muted/50",
19198
+ "border-b border-border/50",
19199
+ "[&_p]:m-0 [&_p]:leading-tight [&_span]:leading-tight",
19200
+ itemClassName
19201
+ ),
19007
19202
  style: {
19008
19203
  height: itemHeight,
19009
19204
  top: i * itemHeight
@@ -19022,7 +19217,12 @@ var VirtualList = forwardRef(function VirtualList2({
19022
19217
  {
19023
19218
  ref: containerRef,
19024
19219
  className: cn(
19025
- "relative overflow-auto border border-border rounded-lg bg-background",
19220
+ "relative overflow-auto rounded-lg border border-border bg-background",
19221
+ "shadow-sm not-prose",
19222
+ "[scrollbar-width:thin] [scrollbar-color:hsl(var(--border))_transparent]",
19223
+ "[&::-webkit-scrollbar]:w-1.5",
19224
+ "[&::-webkit-scrollbar-track]:bg-transparent",
19225
+ "[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border",
19026
19226
  className
19027
19227
  ),
19028
19228
  style: { height },
@@ -19032,7 +19232,7 @@ var VirtualList = forwardRef(function VirtualList2({
19032
19232
  "data-ds-component": "virtual-list",
19033
19233
  children: [
19034
19234
  /* @__PURE__ */ jsx("div", { className: "relative w-full", style: { height: totalHeight }, children: visibleItems }),
19035
- loading && /* @__PURE__ */ jsx("div", { className: "sticky bottom-0 flex items-center justify-center py-3 bg-background/80 backdrop-blur-sm", children: loadingIndicator ?? /* @__PURE__ */ jsx("div", { className: "size-5 animate-spin rounded-full border-2 border-border border-t-primary" }) })
19235
+ loading && /* @__PURE__ */ jsx("div", { className: "sticky bottom-0 flex items-center justify-center py-3 bg-background/80 backdrop-blur-sm border-t border-border/50", children: loadingIndicator ?? /* @__PURE__ */ jsx("div", { className: "size-5 animate-spin rounded-full border-2 border-border border-t-primary" }) })
19036
19236
  ]
19037
19237
  }
19038
19238
  );