@nationaldesignstudio/react 0.5.4 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,18 +1,24 @@
1
1
  import { Accordion as Accordion$1 } from '@base-ui-components/react/accordion';
2
- import * as React11 from 'react';
2
+ import * as React14 from 'react';
3
3
  import { createContext, useState, useRef, useCallback, useEffect, useMemo, useContext } from 'react';
4
4
  import { tv, cnBase } from 'tailwind-variants';
5
- export { cnBase as cn } from 'tailwind-variants';
5
+ export { cnBase as twMerge } from 'tailwind-variants';
6
+ import { clsx } from 'clsx';
6
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
8
  import { useRender } from '@base-ui-components/react/use-render';
8
9
  import { Button as Button$1 } from '@base-ui-components/react/button';
9
10
  import { Popover as Popover$1 } from '@base-ui-components/react/popover';
10
11
  import { Select as Select$1 } from '@base-ui-components/react/select';
12
+ import { ChevronDown, Check, ChevronUp } from 'lucide-react';
11
13
  import { Tooltip as Tooltip$1 } from '@base-ui-components/react/tooltip';
12
- import { Dialog } from '@base-ui-components/react/dialog';
14
+ import { MediaController, MediaLoadingIndicator, MediaControlBar, MediaPlayButton, MediaMuteButton, MediaVolumeRange, MediaTimeDisplay, MediaTimeRange } from 'media-chrome/react';
15
+ import { Dialog as Dialog$1 } from '@base-ui-components/react/dialog';
13
16
  import { Slot } from '@radix-ui/react-slot';
14
17
 
15
18
  // src/components/atoms/accordion/accordion.tsx
19
+ function cn(...inputs) {
20
+ return cnBase(clsx(inputs));
21
+ }
16
22
  var accordionVariants = tv({
17
23
  base: "flex flex-col",
18
24
  variants: {
@@ -66,10 +72,10 @@ var accordionPanelVariants = tv({
66
72
  colorScheme: "light"
67
73
  }
68
74
  });
69
- var AccordionContext = React11.createContext({
75
+ var AccordionContext = React14.createContext({
70
76
  colorScheme: "light"
71
77
  });
72
- var Accordion = React11.forwardRef(
78
+ var Accordion = React14.forwardRef(
73
79
  ({
74
80
  className,
75
81
  allowMultiple = false,
@@ -77,7 +83,7 @@ var Accordion = React11.forwardRef(
77
83
  colorScheme = "light",
78
84
  children
79
85
  }, ref) => {
80
- const defaultValue = React11.useMemo(() => {
86
+ const defaultValue = React14.useMemo(() => {
81
87
  if (!defaultExpanded) return void 0;
82
88
  if (Array.isArray(defaultExpanded)) return defaultExpanded;
83
89
  return [defaultExpanded];
@@ -95,9 +101,9 @@ var Accordion = React11.forwardRef(
95
101
  }
96
102
  );
97
103
  Accordion.displayName = "Accordion";
98
- var AccordionItem = React11.forwardRef(
104
+ var AccordionItem = React14.forwardRef(
99
105
  ({ className, id, title, children }, ref) => {
100
- const { colorScheme } = React11.useContext(AccordionContext);
106
+ const { colorScheme } = React14.useContext(AccordionContext);
101
107
  return /* @__PURE__ */ jsxs(
102
108
  Accordion$1.Item,
103
109
  {
@@ -114,7 +120,7 @@ var AccordionItem = React11.forwardRef(
114
120
  /* @__PURE__ */ jsx(
115
121
  "span",
116
122
  {
117
- className: cnBase(
123
+ className: cn(
118
124
  "text-base transition-transform duration-200",
119
125
  "[[data-open]_&]:rotate-45"
120
126
  ),
@@ -127,7 +133,7 @@ var AccordionItem = React11.forwardRef(
127
133
  /* @__PURE__ */ jsx(
128
134
  Accordion$1.Panel,
129
135
  {
130
- className: cnBase(
136
+ className: cn(
131
137
  "h-[var(--accordion-panel-height)] overflow-hidden",
132
138
  "transition-[height] duration-300 ease-out",
133
139
  "[&[data-starting-style]]:h-0 [&[data-ending-style]]:h-0"
@@ -144,7 +150,7 @@ AccordionItem.displayName = "AccordionItem";
144
150
  var backgroundVariants = tv({
145
151
  base: "absolute inset-0"
146
152
  });
147
- var Background = React11.forwardRef(
153
+ var Background = React14.forwardRef(
148
154
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
149
155
  "div",
150
156
  {
@@ -237,7 +243,7 @@ BackgroundVideo.displayName = "Background.Video";
237
243
  var backgroundStreamVariants = tv({
238
244
  base: "absolute inset-0 size-full border-0 scale-[1.5] object-cover"
239
245
  });
240
- var BackgroundStream = React11.forwardRef(
246
+ var BackgroundStream = React14.forwardRef(
241
247
  ({
242
248
  className,
243
249
  videoId,
@@ -277,7 +283,7 @@ BackgroundStream.displayName = "Background.Stream";
277
283
  var backgroundOverlayVariants = tv({
278
284
  base: "absolute inset-0 bg-bg-overlay"
279
285
  });
280
- var BackgroundOverlay = React11.forwardRef(({ className, opacity = 0.4, style, ...props }, ref) => /* @__PURE__ */ jsx(
286
+ var BackgroundOverlay = React14.forwardRef(({ className, opacity = 0.4, style, ...props }, ref) => /* @__PURE__ */ jsx(
281
287
  "div",
282
288
  {
283
289
  ref,
@@ -294,7 +300,7 @@ BackgroundOverlay.displayName = "Background.Overlay";
294
300
  var backgroundGradientVariants = tv({
295
301
  base: "absolute inset-0"
296
302
  });
297
- var BackgroundGradient = React11.forwardRef(
303
+ var BackgroundGradient = React14.forwardRef(
298
304
  ({
299
305
  className,
300
306
  direction = "to-b",
@@ -330,6 +336,258 @@ var BackgroundCompound = Object.assign(Background, {
330
336
  Overlay: BackgroundOverlay,
331
337
  Gradient: BackgroundGradient
332
338
  });
339
+ var blurredVideoBackdropVariants = tv({
340
+ base: [
341
+ "absolute",
342
+ "pointer-events-none",
343
+ "select-none",
344
+ "will-change-contents",
345
+ "transform-gpu"
346
+ ],
347
+ variants: {
348
+ /**
349
+ * Blur intensity level.
350
+ * Higher values provide more diffused backgrounds.
351
+ */
352
+ blur: {
353
+ low: "",
354
+ medium: "",
355
+ high: "",
356
+ extreme: ""
357
+ },
358
+ /**
359
+ * Gradient overlay for visual depth.
360
+ */
361
+ overlay: {
362
+ none: "",
363
+ vignette: "",
364
+ "top-bottom": ""
365
+ }
366
+ },
367
+ defaultVariants: {
368
+ blur: "high",
369
+ overlay: "none"
370
+ }
371
+ });
372
+ var canvasVariants = tv({
373
+ base: ["w-full", "h-full", "object-cover"]
374
+ });
375
+ var gradientOverlayVariants = tv({
376
+ base: ["absolute", "inset-0", "pointer-events-none"]
377
+ });
378
+ var OVERLAY_GRADIENTS = {
379
+ vignette: "radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.4) 100%)",
380
+ "top-bottom": "linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.4) 100%)"
381
+ };
382
+ var BLUR_AMOUNTS = {
383
+ low: 40,
384
+ medium: 80,
385
+ high: 100,
386
+ extreme: 120
387
+ };
388
+ function useCanvasBlur({
389
+ videoRef,
390
+ blurAmount,
391
+ enabled = true,
392
+ targetFps = 30,
393
+ scale = 0.5
394
+ }) {
395
+ const canvasRef = React14.useRef(null);
396
+ const ctxRef = React14.useRef(null);
397
+ const [isRendering, setIsRendering] = React14.useState(false);
398
+ const [metrics, setMetrics] = React14.useState({ fps: 0, frameTime: 0 });
399
+ const [videoReady, setVideoReady] = React14.useState(false);
400
+ const lastFrameTimeRef = React14.useRef(0);
401
+ const frameCountRef = React14.useRef(0);
402
+ const fpsIntervalRef = React14.useRef(0);
403
+ const frameInterval = 1e3 / targetFps;
404
+ React14.useEffect(() => {
405
+ if (!enabled) return;
406
+ const checkRef = () => {
407
+ if (videoRef.current && canvasRef.current) {
408
+ setVideoReady(true);
409
+ }
410
+ };
411
+ checkRef();
412
+ const frameId = requestAnimationFrame(checkRef);
413
+ const timeoutId = setTimeout(checkRef, 100);
414
+ const timeoutId2 = setTimeout(checkRef, 500);
415
+ return () => {
416
+ cancelAnimationFrame(frameId);
417
+ clearTimeout(timeoutId);
418
+ clearTimeout(timeoutId2);
419
+ };
420
+ }, [enabled, videoRef]);
421
+ React14.useEffect(() => {
422
+ if (!enabled || !videoReady) return;
423
+ const video = videoRef.current;
424
+ const canvas = canvasRef.current;
425
+ if (!video || !canvas) return;
426
+ const ctx = canvas.getContext("2d", {
427
+ alpha: false,
428
+ desynchronized: true
429
+ // Reduces latency
430
+ });
431
+ if (!ctx) return;
432
+ ctxRef.current = ctx;
433
+ let animationFrameId;
434
+ let isActive = true;
435
+ const updateCanvasSize = () => {
436
+ if (video.videoWidth && video.videoHeight) {
437
+ canvas.width = Math.floor(video.videoWidth * scale);
438
+ canvas.height = Math.floor(video.videoHeight * scale);
439
+ }
440
+ };
441
+ const render = (timestamp) => {
442
+ if (!isActive || !video || !ctx) return;
443
+ const elapsed = timestamp - lastFrameTimeRef.current;
444
+ if (elapsed >= frameInterval) {
445
+ const frameStart = performance.now();
446
+ if (canvas.width === 0 || canvas.height === 0) {
447
+ updateCanvasSize();
448
+ }
449
+ if (video.readyState >= 2 && !video.paused) {
450
+ ctx.filter = `blur(${blurAmount * scale}px)`;
451
+ ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
452
+ setIsRendering(true);
453
+ }
454
+ const frameTime = performance.now() - frameStart;
455
+ frameCountRef.current++;
456
+ if (timestamp - fpsIntervalRef.current >= 1e3) {
457
+ setMetrics({
458
+ fps: frameCountRef.current,
459
+ frameTime: Math.round(frameTime * 100) / 100
460
+ });
461
+ frameCountRef.current = 0;
462
+ fpsIntervalRef.current = timestamp;
463
+ }
464
+ lastFrameTimeRef.current = timestamp - elapsed % frameInterval;
465
+ }
466
+ animationFrameId = requestAnimationFrame(render);
467
+ };
468
+ const handleLoadedMetadata = () => {
469
+ updateCanvasSize();
470
+ };
471
+ const handlePlay = () => {
472
+ if (isActive) {
473
+ animationFrameId = requestAnimationFrame(render);
474
+ }
475
+ };
476
+ const handlePause = () => {
477
+ setIsRendering(false);
478
+ };
479
+ video.addEventListener("loadedmetadata", handleLoadedMetadata);
480
+ video.addEventListener("play", handlePlay);
481
+ video.addEventListener("pause", handlePause);
482
+ if (video.readyState >= 1) {
483
+ updateCanvasSize();
484
+ }
485
+ if (!video.paused) {
486
+ animationFrameId = requestAnimationFrame(render);
487
+ }
488
+ return () => {
489
+ isActive = false;
490
+ cancelAnimationFrame(animationFrameId);
491
+ video.removeEventListener("loadedmetadata", handleLoadedMetadata);
492
+ video.removeEventListener("play", handlePlay);
493
+ video.removeEventListener("pause", handlePause);
494
+ setIsRendering(false);
495
+ };
496
+ }, [enabled, videoReady, videoRef, blurAmount, frameInterval, scale]);
497
+ return {
498
+ canvasRef,
499
+ isRendering,
500
+ metrics
501
+ };
502
+ }
503
+ var BlurredVideoBackdrop = React14.forwardRef(
504
+ ({
505
+ className,
506
+ videoRef,
507
+ blur = "high",
508
+ overlay = "none",
509
+ opacity = 0.6,
510
+ extension = 120,
511
+ targetFps = 30,
512
+ scale = 0.5,
513
+ showMetrics = false,
514
+ style,
515
+ ...props
516
+ }, ref) => {
517
+ const blurAmount = BLUR_AMOUNTS[blur ?? "high"];
518
+ const { canvasRef, isRendering, metrics } = useCanvasBlur({
519
+ videoRef,
520
+ blurAmount,
521
+ enabled: true,
522
+ targetFps,
523
+ scale
524
+ });
525
+ return /* @__PURE__ */ jsxs(
526
+ "div",
527
+ {
528
+ ref,
529
+ className: cn(
530
+ blurredVideoBackdropVariants({ blur, overlay }),
531
+ className
532
+ ),
533
+ style: {
534
+ inset: `-${extension}px`,
535
+ opacity,
536
+ contain: "layout style paint",
537
+ ...style
538
+ },
539
+ "data-blur": blur ?? "high",
540
+ "data-overlay": overlay ?? "none",
541
+ "data-rendering": isRendering,
542
+ "aria-hidden": "true",
543
+ ...props,
544
+ children: [
545
+ /* @__PURE__ */ jsx(
546
+ "canvas",
547
+ {
548
+ ref: canvasRef,
549
+ className: cn(
550
+ canvasVariants(),
551
+ // Scale up the low-res canvas to fill container
552
+ "scale-[2]",
553
+ // Inverse of 0.5 scale factor
554
+ "origin-center"
555
+ ),
556
+ style: {
557
+ // Additional CSS blur for smoother appearance
558
+ filter: `blur(${blurAmount * 0.3}px)`
559
+ }
560
+ }
561
+ ),
562
+ overlay && overlay !== "none" && /* @__PURE__ */ jsx(
563
+ "div",
564
+ {
565
+ className: gradientOverlayVariants(),
566
+ style: { background: OVERLAY_GRADIENTS[overlay] }
567
+ }
568
+ ),
569
+ showMetrics && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-8 left-8 z-10 bg-black/80 text-white typography-caption px-8 py-4 rounded-4 font-mono", children: [
570
+ /* @__PURE__ */ jsxs("div", { children: [
571
+ "FPS: ",
572
+ metrics.fps
573
+ ] }),
574
+ /* @__PURE__ */ jsxs("div", { children: [
575
+ "Frame: ",
576
+ metrics.frameTime,
577
+ "ms"
578
+ ] }),
579
+ /* @__PURE__ */ jsxs("div", { children: [
580
+ "Scale: ",
581
+ scale,
582
+ "x"
583
+ ] })
584
+ ] })
585
+ ]
586
+ }
587
+ );
588
+ }
589
+ );
590
+ BlurredVideoBackdrop.displayName = "BlurredVideoBackdrop";
333
591
 
334
592
  // src/lib/theme.ts
335
593
  var FONT_SIZES = [
@@ -549,7 +807,7 @@ function hasThemeValues(theme) {
549
807
  if (!theme) return false;
550
808
  return Object.values(theme).some((v) => v !== void 0 && v !== null);
551
809
  }
552
- var Button = React11.forwardRef(
810
+ var Button = React14.forwardRef(
553
811
  ({ className, variant, size, render, nativeButton, theme, style, ...props }, ref) => {
554
812
  const isNativeButton = nativeButton ?? render === void 0;
555
813
  const hasTheme = hasThemeValues(theme);
@@ -579,7 +837,7 @@ var Button = React11.forwardRef(
579
837
  );
580
838
  Button.displayName = "Button";
581
839
  var iconButtonVariants = tv({
582
- base: "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
840
+ base: "inline-flex items-center justify-center whitespace-nowrap transition-colors duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&>svg]:shrink-0",
583
841
  variants: {
584
842
  variant: {
585
843
  // Primary - filled brand button
@@ -596,15 +854,21 @@ var iconButtonVariants = tv({
596
854
  "ghost-inverse": "bg-button-ghost-inverse-bg text-button-ghost-inverse-text hover:bg-button-ghost-inverse-bg-hover hover:text-button-ghost-inverse-text-hover border-transparent focus-visible:ring-gray-50 focus-visible:ring-offset-gray-1000"
597
855
  },
598
856
  size: {
599
- sm: "size-28 rounded-surface-button-small",
600
- md: "size-40 rounded-surface-button-medium",
601
- lg: "size-56 rounded-surface-button-large"
857
+ sm: "size-28",
858
+ md: "size-40",
859
+ lg: "size-56"
602
860
  },
603
861
  rounded: {
604
862
  default: "",
605
863
  full: "rounded-full"
606
864
  }
607
865
  },
866
+ compoundVariants: [
867
+ // Apply size-specific rounded only when rounded is "default"
868
+ { size: "sm", rounded: "default", class: "rounded-surface-button-small" },
869
+ { size: "md", rounded: "default", class: "rounded-surface-button-medium" },
870
+ { size: "lg", rounded: "default", class: "rounded-surface-button-large" }
871
+ ],
608
872
  defaultVariants: {
609
873
  variant: "primary",
610
874
  size: "md",
@@ -703,7 +967,7 @@ var inputVariants = tv({
703
967
  error: false
704
968
  }
705
969
  });
706
- var Input = React11.forwardRef(
970
+ var Input = React14.forwardRef(
707
971
  ({ className, size, error, type = "text", ...props }, ref) => {
708
972
  return /* @__PURE__ */ jsx(
709
973
  "input",
@@ -711,7 +975,7 @@ var Input = React11.forwardRef(
711
975
  ref,
712
976
  type,
713
977
  "aria-invalid": error || void 0,
714
- className: cnBase(inputVariants({ size, error, class: className })),
978
+ className: cn(inputVariants({ size, error, class: className })),
715
979
  "data-size": size ?? "default",
716
980
  "data-error": error ?? false,
717
981
  ...props
@@ -803,7 +1067,7 @@ function InputGroup({ className, size, disabled, ...props }) {
803
1067
  "data-slot": "input-group",
804
1068
  "data-disabled": disabled || void 0,
805
1069
  disabled,
806
- className: cnBase(
1070
+ className: cn(
807
1071
  "p-0 m-0 min-w-0",
808
1072
  inputGroupVariants({ size, class: className })
809
1073
  ),
@@ -842,7 +1106,7 @@ function InputGroupAddon({
842
1106
  {
843
1107
  "data-slot": "input-group-addon",
844
1108
  "data-align": align,
845
- className: cnBase(inputGroupAddonVariants({ align, class: className })),
1109
+ className: cn(inputGroupAddonVariants({ align, class: className })),
846
1110
  onClick: handleClick,
847
1111
  onKeyDown: handleKeyDown,
848
1112
  ...props
@@ -881,7 +1145,7 @@ function InputGroupButton({
881
1145
  type,
882
1146
  "data-size": size,
883
1147
  variant,
884
- className: cnBase(inputGroupButtonVariants({ size, class: className })),
1148
+ className: cn(inputGroupButtonVariants({ size, class: className })),
885
1149
  ...props
886
1150
  }
887
1151
  );
@@ -890,7 +1154,7 @@ function InputGroupText({ className, ...props }) {
890
1154
  return /* @__PURE__ */ jsx(
891
1155
  "span",
892
1156
  {
893
- className: cnBase(
1157
+ className: cn(
894
1158
  "flex items-center gap-6 typography-ui-text-sm text-text-muted",
895
1159
  "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-16",
896
1160
  className
@@ -904,7 +1168,7 @@ function InputGroupInput({ className, ...props }) {
904
1168
  "input",
905
1169
  {
906
1170
  "data-slot": "input-group-control",
907
- className: cnBase(
1171
+ className: cn(
908
1172
  "flex-1 min-w-0 h-full w-full",
909
1173
  "border-0 bg-transparent shadow-none outline-none",
910
1174
  "typography-ui-text-sm text-left placeholder:text-text-muted",
@@ -921,7 +1185,7 @@ function InputGroupTextarea({ className, ...props }) {
921
1185
  "textarea",
922
1186
  {
923
1187
  "data-slot": "input-group-control",
924
- className: cnBase(
1188
+ className: cn(
925
1189
  "flex-1 min-w-0 w-full resize-none",
926
1190
  "border-0 bg-transparent shadow-none outline-none",
927
1191
  "typography-ui-text-sm text-left placeholder:text-text-muted",
@@ -933,9 +1197,9 @@ function InputGroupTextarea({ className, ...props }) {
933
1197
  }
934
1198
  );
935
1199
  }
936
- var NdstudioFooter = React11.forwardRef(
1200
+ var NdstudioFooter = React14.forwardRef(
937
1201
  ({ className, href = "https://ndstudio.gov", ...props }, ref) => {
938
- return /* @__PURE__ */ jsx("div", { ref, className: cnBase("text-center", className), ...props, children: /* @__PURE__ */ jsxs("p", { className: "typography-label-large uppercase text-ivory-alpha-75", children: [
1202
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("text-center", className), ...props, children: /* @__PURE__ */ jsxs("p", { className: "typography-label-large uppercase text-ivory-alpha-75", children: [
939
1203
  "Designed and Engineered in DC by",
940
1204
  " ",
941
1205
  /* @__PURE__ */ jsxs(
@@ -988,7 +1252,7 @@ var dotBaseVariants = tv({
988
1252
  variant: "charcoal"
989
1253
  }
990
1254
  });
991
- var PagerControl = React11.forwardRef(
1255
+ var PagerControl = React14.forwardRef(
992
1256
  ({
993
1257
  className,
994
1258
  size,
@@ -1002,12 +1266,12 @@ var PagerControl = React11.forwardRef(
1002
1266
  loop = true,
1003
1267
  ...props
1004
1268
  }, ref) => {
1005
- const [internalIndex, setInternalIndex] = React11.useState(0);
1006
- const [isPaused, setIsPaused] = React11.useState(false);
1007
- const [progress, setProgress] = React11.useState(0);
1269
+ const [internalIndex, setInternalIndex] = React14.useState(0);
1270
+ const [isPaused, setIsPaused] = React14.useState(false);
1271
+ const [progress, setProgress] = React14.useState(0);
1008
1272
  const activeIndex = controlledIndex !== void 0 ? controlledIndex : internalIndex;
1009
1273
  const isControlled = controlledIndex !== void 0;
1010
- React11.useEffect(() => {
1274
+ React14.useEffect(() => {
1011
1275
  if (import.meta.env?.DEV) {
1012
1276
  if (count < 1) {
1013
1277
  console.warn("PagerControl: count must be at least 1");
@@ -1030,10 +1294,10 @@ var PagerControl = React11.forwardRef(
1030
1294
  }
1031
1295
  }, [count, controlledIndex, isControlled, onChange]);
1032
1296
  const safeActiveIndex = Math.max(0, Math.min(activeIndex, count - 1));
1033
- const animationFrameRef = React11.useRef(null);
1034
- const startTimeRef = React11.useRef(null);
1035
- const pausedProgressRef = React11.useRef(0);
1036
- const goToNext = React11.useCallback(() => {
1297
+ const animationFrameRef = React14.useRef(null);
1298
+ const startTimeRef = React14.useRef(null);
1299
+ const pausedProgressRef = React14.useRef(0);
1300
+ const goToNext = React14.useCallback(() => {
1037
1301
  const nextIndex = safeActiveIndex + 1;
1038
1302
  if (nextIndex >= count) {
1039
1303
  if (loop) {
@@ -1045,7 +1309,7 @@ var PagerControl = React11.forwardRef(
1045
1309
  onChange?.(nextIndex);
1046
1310
  }
1047
1311
  }, [safeActiveIndex, count, loop, isControlled, onChange]);
1048
- const goToIndex = React11.useCallback(
1312
+ const goToIndex = React14.useCallback(
1049
1313
  (index) => {
1050
1314
  if (!isControlled) setInternalIndex(index);
1051
1315
  onChange?.(index);
@@ -1055,7 +1319,7 @@ var PagerControl = React11.forwardRef(
1055
1319
  },
1056
1320
  [isControlled, onChange]
1057
1321
  );
1058
- React11.useEffect(() => {
1322
+ React14.useEffect(() => {
1059
1323
  if (!autoPlay || duration2 <= 0 || isPaused) {
1060
1324
  if (animationFrameRef.current) {
1061
1325
  cancelAnimationFrame(animationFrameRef.current);
@@ -1086,19 +1350,19 @@ var PagerControl = React11.forwardRef(
1086
1350
  }
1087
1351
  };
1088
1352
  }, [autoPlay, duration2, isPaused, goToNext]);
1089
- const handleMouseEnter = React11.useCallback(() => {
1353
+ const handleMouseEnter = React14.useCallback(() => {
1090
1354
  if (pauseOnHover) {
1091
1355
  pausedProgressRef.current = progress;
1092
1356
  startTimeRef.current = null;
1093
1357
  setIsPaused(true);
1094
1358
  }
1095
1359
  }, [pauseOnHover, progress]);
1096
- const handleMouseLeave = React11.useCallback(() => {
1360
+ const handleMouseLeave = React14.useCallback(() => {
1097
1361
  if (pauseOnHover) {
1098
1362
  setIsPaused(false);
1099
1363
  }
1100
1364
  }, [pauseOnHover]);
1101
- React11.useEffect(() => {
1365
+ React14.useEffect(() => {
1102
1366
  if (isControlled) {
1103
1367
  setProgress(0);
1104
1368
  pausedProgressRef.current = 0;
@@ -1163,7 +1427,7 @@ var PagerControl = React11.forwardRef(
1163
1427
  role: "tab",
1164
1428
  "aria-selected": true,
1165
1429
  "aria-label": `Page ${index + 1} of ${count}, current`,
1166
- className: cnBase(
1430
+ className: cn(
1167
1431
  "relative cursor-pointer overflow-hidden rounded-full transition-all duration-500 ease-[cubic-bezier(0.23,1,0.32,1)]",
1168
1432
  dotBaseVariants({ size, variant }),
1169
1433
  getDotWidth(true),
@@ -1173,7 +1437,7 @@ var PagerControl = React11.forwardRef(
1173
1437
  children: /* @__PURE__ */ jsx(
1174
1438
  "div",
1175
1439
  {
1176
- className: cnBase(
1440
+ className: cn(
1177
1441
  "absolute top-0 bottom-0 left-0 h-full rounded-full",
1178
1442
  getProgressFillClass()
1179
1443
  ),
@@ -1193,7 +1457,7 @@ var PagerControl = React11.forwardRef(
1193
1457
  role: "tab",
1194
1458
  "aria-selected": false,
1195
1459
  "aria-label": `Go to page ${index + 1} of ${count}`,
1196
- className: cnBase(
1460
+ className: cn(
1197
1461
  dotBaseVariants({ size, variant }),
1198
1462
  getDotWidth(false),
1199
1463
  getInactiveClasses()
@@ -1233,7 +1497,7 @@ var FloatingArrowSvg = ({
1233
1497
  height: "10",
1234
1498
  viewBox: "0 0 20 10",
1235
1499
  fill: "none",
1236
- className: cnBase("block", className),
1500
+ className: cn("block", className),
1237
1501
  "aria-hidden": "true",
1238
1502
  children: [
1239
1503
  /* @__PURE__ */ jsx(
@@ -1293,9 +1557,9 @@ var popoverArrowVariants = floatingArrowVariants;
1293
1557
  var PopoverRoot = ({ children, ...props }) => {
1294
1558
  return /* @__PURE__ */ jsx(Popover$1.Root, { ...props, children });
1295
1559
  };
1296
- var PopoverTrigger = React11.forwardRef(
1560
+ var PopoverTrigger = React14.forwardRef(
1297
1561
  ({ className, children, ...props }, ref) => {
1298
- const isSingleElement = React11.isValidElement(children);
1562
+ const isSingleElement = React14.isValidElement(children);
1299
1563
  if (isSingleElement) {
1300
1564
  return /* @__PURE__ */ jsx(
1301
1565
  Popover$1.Trigger,
@@ -1314,52 +1578,52 @@ PopoverTrigger.displayName = "PopoverTrigger";
1314
1578
  var PopoverPortal = ({ children, ...props }) => {
1315
1579
  return /* @__PURE__ */ jsx(Popover$1.Portal, { ...props, children });
1316
1580
  };
1317
- var PopoverBackdrop = React11.forwardRef(
1581
+ var PopoverBackdrop = React14.forwardRef(
1318
1582
  ({ className, ...props }, ref) => {
1319
1583
  return /* @__PURE__ */ jsx(
1320
1584
  Popover$1.Backdrop,
1321
1585
  {
1322
1586
  ref,
1323
- className: cnBase("fixed inset-0 z-40", className),
1587
+ className: cn("fixed inset-0 z-40", className),
1324
1588
  ...props
1325
1589
  }
1326
1590
  );
1327
1591
  }
1328
1592
  );
1329
1593
  PopoverBackdrop.displayName = "PopoverBackdrop";
1330
- var PopoverPositioner = React11.forwardRef(({ className, side = "bottom", sideOffset = 8, ...props }, ref) => {
1594
+ var PopoverPositioner = React14.forwardRef(({ className, side = "bottom", sideOffset = 8, ...props }, ref) => {
1331
1595
  return /* @__PURE__ */ jsx(
1332
1596
  Popover$1.Positioner,
1333
1597
  {
1334
1598
  ref,
1335
1599
  side,
1336
1600
  sideOffset,
1337
- className: cnBase("z-50", className),
1601
+ className: cn("z-50", className),
1338
1602
  ...props
1339
1603
  }
1340
1604
  );
1341
1605
  });
1342
1606
  PopoverPositioner.displayName = "PopoverPositioner";
1343
- var PopoverPopup = React11.forwardRef(
1607
+ var PopoverPopup = React14.forwardRef(
1344
1608
  ({ className, variant, ...props }, ref) => {
1345
1609
  return /* @__PURE__ */ jsx(
1346
1610
  Popover$1.Popup,
1347
1611
  {
1348
1612
  ref,
1349
- className: cnBase(popoverPopupVariants({ variant }), className),
1613
+ className: cn(popoverPopupVariants({ variant }), className),
1350
1614
  ...props
1351
1615
  }
1352
1616
  );
1353
1617
  }
1354
1618
  );
1355
1619
  PopoverPopup.displayName = "PopoverPopup";
1356
- var PopoverArrow = React11.forwardRef(
1620
+ var PopoverArrow = React14.forwardRef(
1357
1621
  ({ className, ...props }, ref) => {
1358
1622
  return /* @__PURE__ */ jsx(
1359
1623
  Popover$1.Arrow,
1360
1624
  {
1361
1625
  ref,
1362
- className: cnBase(popoverArrowVariants(), className),
1626
+ className: cn(popoverArrowVariants(), className),
1363
1627
  ...props,
1364
1628
  children: /* @__PURE__ */ jsx(
1365
1629
  FloatingArrowSvg,
@@ -1373,25 +1637,25 @@ var PopoverArrow = React11.forwardRef(
1373
1637
  }
1374
1638
  );
1375
1639
  PopoverArrow.displayName = "PopoverArrow";
1376
- var PopoverTitle = React11.forwardRef(
1640
+ var PopoverTitle = React14.forwardRef(
1377
1641
  ({ className, ...props }, ref) => {
1378
1642
  return /* @__PURE__ */ jsx(
1379
1643
  Popover$1.Title,
1380
1644
  {
1381
1645
  ref,
1382
- className: cnBase("typography-body-md-md font-semibold", className),
1646
+ className: cn("typography-body-md-md font-semibold", className),
1383
1647
  ...props
1384
1648
  }
1385
1649
  );
1386
1650
  }
1387
1651
  );
1388
1652
  PopoverTitle.displayName = "PopoverTitle";
1389
- var PopoverDescription = React11.forwardRef(({ className, ...props }, ref) => {
1653
+ var PopoverDescription = React14.forwardRef(({ className, ...props }, ref) => {
1390
1654
  return /* @__PURE__ */ jsx(
1391
1655
  Popover$1.Description,
1392
1656
  {
1393
1657
  ref,
1394
- className: cnBase(
1658
+ className: cn(
1395
1659
  "typography-body-sm-md text-overlay-text-muted mt-8",
1396
1660
  className
1397
1661
  ),
@@ -1400,13 +1664,13 @@ var PopoverDescription = React11.forwardRef(({ className, ...props }, ref) => {
1400
1664
  );
1401
1665
  });
1402
1666
  PopoverDescription.displayName = "PopoverDescription";
1403
- var PopoverClose = React11.forwardRef(
1667
+ var PopoverClose = React14.forwardRef(
1404
1668
  ({ className, ...props }, ref) => {
1405
1669
  return /* @__PURE__ */ jsx(
1406
1670
  Popover$1.Close,
1407
1671
  {
1408
1672
  ref,
1409
- className: cnBase(
1673
+ className: cn(
1410
1674
  "absolute right-8 top-8 rounded-surface-ui-small p-4",
1411
1675
  "text-overlay-text-muted hover:text-overlay-text",
1412
1676
  "hover:bg-bg-section focus:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
@@ -1491,7 +1755,9 @@ var selectTriggerVariants = tv({
1491
1755
  // Override disabled to use data attribute (Base UI pattern)
1492
1756
  "data-[disabled]:bg-ui-control-background-disabled data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
1493
1757
  // Open state styling
1494
- "data-[popup-open]:border-ui-accent-base data-[popup-open]:ring-4 data-[popup-open]:ring-ui-color-focus data-[popup-open]:bg-ui-control-background"
1758
+ "data-[popup-open]:border-ui-accent-base data-[popup-open]:ring-4 data-[popup-open]:ring-ui-color-focus data-[popup-open]:bg-ui-control-background",
1759
+ // Invalid state (aria-invalid)
1760
+ "aria-[invalid=true]:border-ui-error-color aria-[invalid=true]:ring-ui-error-color/20"
1495
1761
  ],
1496
1762
  variants: {
1497
1763
  size: formControlSizes,
@@ -1505,19 +1771,25 @@ var selectTriggerVariants = tv({
1505
1771
  var selectPopupVariants = tv({
1506
1772
  base: [
1507
1773
  // Layout - match trigger width using CSS custom property from Base UI
1508
- "flex flex-col gap-2 p-10",
1774
+ "flex flex-col gap-2 p-8",
1509
1775
  "w-[var(--anchor-width)]",
1510
- // Background and border - uses surface ui radius for theming support
1511
- "bg-ui-control-background border border-solid border-ui-color-border-active rounded-surface-ui-medium",
1512
- // Focus ring shadow (ui-focus-state from Figma)
1513
- "ring-4 ring-ui-color-focus",
1776
+ // Background - uses overlay token
1777
+ "bg-overlay-background",
1778
+ // Border - uses overlay token for subtle border
1779
+ "border border-overlay-border",
1780
+ // Border radius - uses overlay token for consistency with other overlays
1781
+ "rounded-surface-overlay",
1782
+ // Shadow for elevation
1783
+ "shadow-lg",
1514
1784
  // Animation
1515
1785
  "origin-[var(--transform-origin)]",
1516
1786
  "transition-[transform,scale,opacity] duration-150",
1517
1787
  "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
1518
1788
  "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
1519
1789
  // Ensure it's above other content
1520
- "z-50"
1790
+ "z-50",
1791
+ // Scrollable support
1792
+ "overflow-y-auto max-h-[var(--available-height,300px)]"
1521
1793
  ]
1522
1794
  });
1523
1795
  var selectOptionVariants = tv({
@@ -1542,112 +1814,115 @@ var selectOptionVariants = tv({
1542
1814
  "data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed"
1543
1815
  ]
1544
1816
  });
1545
- var SelectChevronIcon = ({ className }) => /* @__PURE__ */ jsx(
1546
- "svg",
1547
- {
1548
- className: cnBase("size-16 text-gray-500 shrink-0", className),
1549
- viewBox: "0 0 16 16",
1550
- fill: "none",
1551
- xmlns: "http://www.w3.org/2000/svg",
1552
- "aria-hidden": "true",
1553
- children: /* @__PURE__ */ jsx(
1554
- "path",
1555
- {
1556
- d: "M4 6L8 10L12 6",
1557
- stroke: "currentColor",
1558
- strokeWidth: "1.5",
1559
- strokeLinecap: "round",
1560
- strokeLinejoin: "round"
1561
- }
1562
- )
1563
- }
1564
- );
1565
- var CheckIcon = ({ className }) => /* @__PURE__ */ jsx(
1566
- "svg",
1567
- {
1568
- className: cnBase("size-14 shrink-0", className),
1569
- viewBox: "0 0 14 14",
1570
- fill: "none",
1571
- xmlns: "http://www.w3.org/2000/svg",
1572
- "aria-hidden": "true",
1573
- children: /* @__PURE__ */ jsx(
1574
- "path",
1575
- {
1576
- d: "M11.6666 3.5L5.24992 9.91667L2.33325 7",
1577
- stroke: "currentColor",
1578
- strokeWidth: "1.5",
1579
- strokeLinecap: "round",
1580
- strokeLinejoin: "round"
1581
- }
1582
- )
1583
- }
1584
- );
1817
+ var selectSeparatorVariants = tv({
1818
+ base: ["h-px my-6 -mx-8", "bg-overlay-border"]
1819
+ });
1820
+ var selectScrollArrowVariants = tv({
1821
+ base: [
1822
+ "flex items-center justify-center",
1823
+ "py-4",
1824
+ "text-text-muted",
1825
+ "cursor-default",
1826
+ // Sticky positioning for scroll indicators
1827
+ "data-[direction=up]:sticky data-[direction=up]:top-0",
1828
+ "data-[direction=down]:sticky data-[direction=down]:bottom-0",
1829
+ "bg-overlay-background"
1830
+ ]
1831
+ });
1585
1832
  var SelectRoot = ({
1586
1833
  children,
1587
1834
  ...props
1588
1835
  }) => {
1589
1836
  return /* @__PURE__ */ jsx(Select$1.Root, { ...props, children });
1590
1837
  };
1591
- var SelectTrigger = React11.forwardRef(
1592
- ({ className, size, error, placeholder = "Select option...", ...props }, ref) => {
1838
+ var SelectTrigger = React14.forwardRef(
1839
+ ({
1840
+ className,
1841
+ size,
1842
+ error,
1843
+ placeholder = "Select option...",
1844
+ "aria-label": ariaLabel,
1845
+ ...props
1846
+ }, ref) => {
1593
1847
  return /* @__PURE__ */ jsxs(
1594
1848
  Select$1.Trigger,
1595
1849
  {
1596
1850
  ref,
1597
- className: cnBase(selectTriggerVariants({ size, error }), className),
1851
+ "aria-label": ariaLabel ?? placeholder,
1852
+ "aria-invalid": error || void 0,
1853
+ className: cn(selectTriggerVariants({ size, error }), className),
1854
+ "data-size": size ?? "default",
1855
+ "data-error": error ?? false,
1598
1856
  ...props,
1599
1857
  children: [
1600
1858
  /* @__PURE__ */ jsx(Select$1.Value, { children: (value) => value ? value : /* @__PURE__ */ jsx("span", { className: "text-text-muted", children: placeholder }) }),
1601
- /* @__PURE__ */ jsx(Select$1.Icon, { children: /* @__PURE__ */ jsx(SelectChevronIcon, {}) })
1859
+ /* @__PURE__ */ jsx(Select$1.Icon, { "aria-hidden": "true", children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-16 text-gray-500 shrink-0" }) })
1602
1860
  ]
1603
1861
  }
1604
1862
  );
1605
1863
  }
1606
1864
  );
1607
1865
  SelectTrigger.displayName = "SelectTrigger";
1608
- var SelectPopup = React11.forwardRef(
1609
- ({ className, children, ...props }, ref) => {
1610
- return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, { side: "bottom", sideOffset: 4, align: "start", children: /* @__PURE__ */ jsx(
1611
- Select$1.Popup,
1866
+ var SelectValue = React14.forwardRef(
1867
+ ({ className, placeholder = "Select option...", ...props }, ref) => {
1868
+ return /* @__PURE__ */ jsx(Select$1.Value, { ref, className, ...props, children: (value) => value ? value : /* @__PURE__ */ jsx("span", { className: "text-text-muted", children: placeholder }) });
1869
+ }
1870
+ );
1871
+ SelectValue.displayName = "SelectValue";
1872
+ var SelectPopup = React14.forwardRef(
1873
+ ({ className, children, alignItemWithTrigger = true, ...props }, ref) => {
1874
+ return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(
1875
+ Select$1.Positioner,
1612
1876
  {
1613
- ref,
1614
- className: cnBase(selectPopupVariants(), className),
1615
- ...props,
1616
- children
1877
+ side: "bottom",
1878
+ sideOffset: 4,
1879
+ align: "start",
1880
+ alignItemWithTrigger,
1881
+ children: /* @__PURE__ */ jsx(
1882
+ Select$1.Popup,
1883
+ {
1884
+ ref,
1885
+ className: cn(selectPopupVariants(), className),
1886
+ ...props,
1887
+ children
1888
+ }
1889
+ )
1617
1890
  }
1618
- ) }) });
1891
+ ) });
1619
1892
  }
1620
1893
  );
1621
1894
  SelectPopup.displayName = "SelectPopup";
1622
- var SelectOption = React11.forwardRef(
1895
+ var SelectContent = SelectPopup;
1896
+ var SelectOption = React14.forwardRef(
1623
1897
  ({ className, children, ...props }, ref) => {
1624
1898
  return /* @__PURE__ */ jsxs(
1625
1899
  Select$1.Item,
1626
1900
  {
1627
1901
  ref,
1628
- className: cnBase(selectOptionVariants(), className),
1902
+ className: cn(selectOptionVariants(), className),
1629
1903
  ...props,
1630
1904
  children: [
1631
1905
  /* @__PURE__ */ jsx(Select$1.ItemText, { children }),
1632
- /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
1906
+ /* @__PURE__ */ jsx(Select$1.ItemIndicator, { "aria-hidden": "true", children: /* @__PURE__ */ jsx(Check, { className: "size-14 shrink-0" }) })
1633
1907
  ]
1634
1908
  }
1635
1909
  );
1636
1910
  }
1637
1911
  );
1638
1912
  SelectOption.displayName = "SelectOption";
1639
- var SelectGroup = React11.forwardRef(
1913
+ var SelectItem = SelectOption;
1914
+ var SelectGroup = React14.forwardRef(
1640
1915
  ({ className, children, ...props }, ref) => {
1641
1916
  return /* @__PURE__ */ jsx(Select$1.Group, { ref, className, ...props, children });
1642
1917
  }
1643
1918
  );
1644
1919
  SelectGroup.displayName = "SelectGroup";
1645
- var SelectGroupLabel = React11.forwardRef(({ className, children, ...props }, ref) => {
1920
+ var SelectGroupLabel = React14.forwardRef(({ className, children, ...props }, ref) => {
1646
1921
  return /* @__PURE__ */ jsx(
1647
1922
  Select$1.GroupLabel,
1648
1923
  {
1649
1924
  ref,
1650
- className: cnBase(
1925
+ className: cn(
1651
1926
  "px-12 py-6 typography-body-sm-sm font-medium text-text-muted uppercase tracking-wide",
1652
1927
  className
1653
1928
  ),
@@ -1657,12 +1932,61 @@ var SelectGroupLabel = React11.forwardRef(({ className, children, ...props }, re
1657
1932
  );
1658
1933
  });
1659
1934
  SelectGroupLabel.displayName = "SelectGroupLabel";
1935
+ var SelectLabel = SelectGroupLabel;
1936
+ var SelectSeparator = React14.forwardRef(
1937
+ ({ className, ...props }, ref) => {
1938
+ return /* @__PURE__ */ jsx(
1939
+ Select$1.Separator,
1940
+ {
1941
+ ref,
1942
+ className: cn(selectSeparatorVariants(), className),
1943
+ ...props
1944
+ }
1945
+ );
1946
+ }
1947
+ );
1948
+ SelectSeparator.displayName = "SelectSeparator";
1949
+ var SelectScrollUpArrow = React14.forwardRef(({ className, ...props }, ref) => {
1950
+ return /* @__PURE__ */ jsx(
1951
+ Select$1.ScrollUpArrow,
1952
+ {
1953
+ ref,
1954
+ "data-direction": "up",
1955
+ "aria-label": "Scroll up",
1956
+ className: cn(selectScrollArrowVariants(), className),
1957
+ ...props,
1958
+ children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-12", "aria-hidden": "true" })
1959
+ }
1960
+ );
1961
+ });
1962
+ SelectScrollUpArrow.displayName = "SelectScrollUpArrow";
1963
+ var SelectScrollDownArrow = React14.forwardRef(({ className, ...props }, ref) => {
1964
+ return /* @__PURE__ */ jsx(
1965
+ Select$1.ScrollDownArrow,
1966
+ {
1967
+ ref,
1968
+ "data-direction": "down",
1969
+ "aria-label": "Scroll down",
1970
+ className: cn(selectScrollArrowVariants(), className),
1971
+ ...props,
1972
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-12", "aria-hidden": "true" })
1973
+ }
1974
+ );
1975
+ });
1976
+ SelectScrollDownArrow.displayName = "SelectScrollDownArrow";
1660
1977
  var Select = Object.assign(SelectRoot, {
1661
1978
  Trigger: SelectTrigger,
1979
+ Value: SelectValue,
1662
1980
  Popup: SelectPopup,
1981
+ Content: SelectContent,
1663
1982
  Option: SelectOption,
1983
+ Item: SelectItem,
1664
1984
  Group: SelectGroup,
1665
- GroupLabel: SelectGroupLabel
1985
+ GroupLabel: SelectGroupLabel,
1986
+ Label: SelectLabel,
1987
+ Separator: SelectSeparator,
1988
+ ScrollUpArrow: SelectScrollUpArrow,
1989
+ ScrollDownArrow: SelectScrollDownArrow
1666
1990
  });
1667
1991
  var tooltipPopupVariants = tv({
1668
1992
  base: [
@@ -1703,9 +2027,9 @@ var TooltipProvider = ({ children, ...props }) => {
1703
2027
  var TooltipRoot = ({ children, ...props }) => {
1704
2028
  return /* @__PURE__ */ jsx(Tooltip$1.Root, { ...props, children });
1705
2029
  };
1706
- var TooltipTrigger = React11.forwardRef(
2030
+ var TooltipTrigger = React14.forwardRef(
1707
2031
  ({ className, children, ...props }, ref) => {
1708
- const isSingleElement = React11.isValidElement(children);
2032
+ const isSingleElement = React14.isValidElement(children);
1709
2033
  if (isSingleElement) {
1710
2034
  return /* @__PURE__ */ jsx(
1711
2035
  Tooltip$1.Trigger,
@@ -1724,7 +2048,7 @@ TooltipTrigger.displayName = "TooltipTrigger";
1724
2048
  var TooltipPortal = ({ children, ...props }) => {
1725
2049
  return /* @__PURE__ */ jsx(Tooltip$1.Portal, { ...props, children });
1726
2050
  };
1727
- var TooltipPositioner = React11.forwardRef(({ className, side = "top", sideOffset = 8, ...props }, ref) => {
2051
+ var TooltipPositioner = React14.forwardRef(({ className, side = "top", sideOffset = 8, ...props }, ref) => {
1728
2052
  return /* @__PURE__ */ jsx(
1729
2053
  Tooltip$1.Positioner,
1730
2054
  {
@@ -1737,27 +2061,27 @@ var TooltipPositioner = React11.forwardRef(({ className, side = "top", sideOffse
1737
2061
  );
1738
2062
  });
1739
2063
  TooltipPositioner.displayName = "TooltipPositioner";
1740
- var TooltipPopup = React11.forwardRef(
2064
+ var TooltipPopup = React14.forwardRef(
1741
2065
  ({ className, variant, ...props }, ref) => {
1742
2066
  return /* @__PURE__ */ jsx(
1743
2067
  Tooltip$1.Popup,
1744
2068
  {
1745
2069
  ref,
1746
2070
  role: "tooltip",
1747
- className: cnBase(tooltipPopupVariants({ variant }), className),
2071
+ className: cn(tooltipPopupVariants({ variant }), className),
1748
2072
  ...props
1749
2073
  }
1750
2074
  );
1751
2075
  }
1752
2076
  );
1753
2077
  TooltipPopup.displayName = "TooltipPopup";
1754
- var TooltipArrow = React11.forwardRef(
2078
+ var TooltipArrow = React14.forwardRef(
1755
2079
  ({ className, ...props }, ref) => {
1756
2080
  return /* @__PURE__ */ jsx(
1757
2081
  Tooltip$1.Arrow,
1758
2082
  {
1759
2083
  ref,
1760
- className: cnBase(tooltipArrowVariants(), className),
2084
+ className: cn(tooltipArrowVariants(), className),
1761
2085
  ...props,
1762
2086
  children: /* @__PURE__ */ jsx(FloatingArrowSvg, { fillClassName: "fill-tooltip-bg" })
1763
2087
  }
@@ -1804,6 +2128,870 @@ var TooltipParts = Object.assign(TooltipRoot, {
1804
2128
  Popup: TooltipPopup,
1805
2129
  Arrow: TooltipArrow
1806
2130
  });
2131
+ var captionOverlayVariants = tv({
2132
+ base: [
2133
+ // Positioning - absolute at bottom of video container
2134
+ "pointer-events-none",
2135
+ "absolute right-0 left-0",
2136
+ "z-10",
2137
+ "flex justify-center",
2138
+ "px-4"
2139
+ ],
2140
+ variants: {
2141
+ position: {
2142
+ bottom: "bottom-64",
2143
+ "bottom-sm": "bottom-24"
2144
+ }
2145
+ },
2146
+ defaultVariants: {
2147
+ position: "bottom-sm"
2148
+ }
2149
+ });
2150
+ var captionTextVariants = tv({
2151
+ base: [
2152
+ "flex items-center justify-center",
2153
+ "w-fit max-w-[80%]",
2154
+ "gap-10",
2155
+ "px-12 py-6",
2156
+ "text-center",
2157
+ "font-normal leading-[1.4]",
2158
+ "rounded-6",
2159
+ "bg-video-player-caption-bg text-video-player-caption-text"
2160
+ ],
2161
+ variants: {
2162
+ size: {
2163
+ sm: "text-14",
2164
+ md: "[font-size:clamp(16px,2vw,24px)]",
2165
+ lg: "text-24"
2166
+ }
2167
+ },
2168
+ defaultVariants: {
2169
+ size: "md"
2170
+ }
2171
+ });
2172
+ var CaptionOverlay = React14.forwardRef(
2173
+ ({ className, cue, text, position, size, ...props }, ref) => {
2174
+ const displayText = cue?.text ?? text;
2175
+ if (!displayText) {
2176
+ return null;
2177
+ }
2178
+ return /* @__PURE__ */ jsx(
2179
+ "output",
2180
+ {
2181
+ ref,
2182
+ className: cn(captionOverlayVariants({ position }), className),
2183
+ "aria-live": "polite",
2184
+ "aria-label": "Video caption",
2185
+ ...props,
2186
+ children: /* @__PURE__ */ jsx("span", { className: captionTextVariants({ size }), children: displayText })
2187
+ }
2188
+ );
2189
+ }
2190
+ );
2191
+ CaptionOverlay.displayName = "CaptionOverlay";
2192
+ function parseVttTimestamp(timestamp) {
2193
+ const parts = timestamp.trim().split(":");
2194
+ let hours = 0;
2195
+ let minutes = 0;
2196
+ let seconds = 0;
2197
+ if (parts.length === 3) {
2198
+ hours = Number.parseInt(parts[0], 10);
2199
+ minutes = Number.parseInt(parts[1], 10);
2200
+ seconds = Number.parseFloat(parts[2]);
2201
+ } else if (parts.length === 2) {
2202
+ minutes = Number.parseInt(parts[0], 10);
2203
+ seconds = Number.parseFloat(parts[1]);
2204
+ }
2205
+ return hours * 3600 + minutes * 60 + seconds;
2206
+ }
2207
+ function parseVtt(vttContent) {
2208
+ const cues = [];
2209
+ const lines = vttContent.trim().split("\n");
2210
+ let i = 0;
2211
+ while (i < lines.length && !lines[i].includes("-->")) {
2212
+ i++;
2213
+ }
2214
+ while (i < lines.length) {
2215
+ const line = lines[i].trim();
2216
+ if (line.includes("-->")) {
2217
+ const [startStr, endStr] = line.split("-->").map((s) => s.trim());
2218
+ const endParts = endStr.split(" ");
2219
+ const endTime = parseVttTimestamp(endParts[0]);
2220
+ const startTime = parseVttTimestamp(startStr);
2221
+ const textLines = [];
2222
+ i++;
2223
+ while (i < lines.length && lines[i].trim() !== "" && !lines[i].includes("-->")) {
2224
+ if (!/^\d+$/.test(lines[i].trim())) {
2225
+ textLines.push(lines[i].trim());
2226
+ }
2227
+ i++;
2228
+ }
2229
+ if (textLines.length > 0) {
2230
+ cues.push({
2231
+ id: `cue-${cues.length}`,
2232
+ startTime,
2233
+ endTime,
2234
+ text: textLines.join("\n")
2235
+ });
2236
+ }
2237
+ } else {
2238
+ i++;
2239
+ }
2240
+ }
2241
+ return cues;
2242
+ }
2243
+ function stripVttTags(text) {
2244
+ return text.replace(/<\/?[^>]+(>|$)/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").trim();
2245
+ }
2246
+ function useCaptions(options = {}) {
2247
+ const { src, content, stripTags = true, currentTime: externalTime } = options;
2248
+ const [cues, setCues] = React14.useState([]);
2249
+ const [internalTime, setInternalTime] = React14.useState(0);
2250
+ const [isLoading, setIsLoading] = React14.useState(false);
2251
+ const [error, setError] = React14.useState(null);
2252
+ const currentTime = externalTime ?? internalTime;
2253
+ React14.useEffect(() => {
2254
+ if (content) {
2255
+ const parsed = parseVtt(content);
2256
+ setCues(
2257
+ stripTags ? parsed.map((cue) => ({ ...cue, text: stripVttTags(cue.text) })) : parsed
2258
+ );
2259
+ return;
2260
+ }
2261
+ if (!src) {
2262
+ setCues([]);
2263
+ return;
2264
+ }
2265
+ setIsLoading(true);
2266
+ setError(null);
2267
+ fetch(src).then((response) => {
2268
+ if (!response.ok) {
2269
+ throw new Error(`Failed to fetch captions: ${response.status}`);
2270
+ }
2271
+ return response.text();
2272
+ }).then((vttContent) => {
2273
+ const parsed = parseVtt(vttContent);
2274
+ setCues(
2275
+ stripTags ? parsed.map((cue) => ({ ...cue, text: stripVttTags(cue.text) })) : parsed
2276
+ );
2277
+ }).catch((err) => {
2278
+ setError(err instanceof Error ? err : new Error(String(err)));
2279
+ }).finally(() => {
2280
+ setIsLoading(false);
2281
+ });
2282
+ }, [src, content, stripTags]);
2283
+ const activeCue = React14.useMemo(() => {
2284
+ return cues.find(
2285
+ (cue) => currentTime >= cue.startTime && currentTime <= cue.endTime
2286
+ ) ?? null;
2287
+ }, [cues, currentTime]);
2288
+ const handleSetCurrentTime = React14.useCallback((time) => {
2289
+ setInternalTime(time);
2290
+ }, []);
2291
+ return {
2292
+ cues,
2293
+ activeCue,
2294
+ setCurrentTime: handleSetCurrentTime,
2295
+ isLoading,
2296
+ error
2297
+ };
2298
+ }
2299
+ function useVideoKeyboard({
2300
+ videoRef,
2301
+ enabled = true,
2302
+ seekAmount = 5,
2303
+ volumeStep = 0.1,
2304
+ onTogglePlay,
2305
+ onToggleFullscreen,
2306
+ onToggleCaptions,
2307
+ onShowControls
2308
+ }) {
2309
+ const handleKeyDown = React14.useCallback(
2310
+ (e) => {
2311
+ if (!enabled) return;
2312
+ const video = videoRef.current;
2313
+ if (!video) return;
2314
+ const target = e.target;
2315
+ if (target.tagName === "BUTTON" || target.tagName === "INPUT" || target.tagName === "TEXTAREA" || target.closest("button") || target.closest("input") || target.closest("[role='slider']")) {
2316
+ return;
2317
+ }
2318
+ let handled = false;
2319
+ switch (e.key) {
2320
+ // Play/Pause
2321
+ case " ":
2322
+ case "Spacebar":
2323
+ case "k":
2324
+ if (onTogglePlay) {
2325
+ onTogglePlay();
2326
+ } else {
2327
+ if (video.paused) {
2328
+ video.play().catch(() => {
2329
+ });
2330
+ } else {
2331
+ video.pause();
2332
+ }
2333
+ }
2334
+ handled = true;
2335
+ break;
2336
+ // Seek backward
2337
+ case "ArrowLeft":
2338
+ case "j":
2339
+ video.currentTime = Math.max(0, video.currentTime - seekAmount);
2340
+ handled = true;
2341
+ break;
2342
+ // Seek forward
2343
+ case "ArrowRight":
2344
+ case "l":
2345
+ video.currentTime = Math.min(
2346
+ video.duration || 0,
2347
+ video.currentTime + seekAmount
2348
+ );
2349
+ handled = true;
2350
+ break;
2351
+ // Volume up
2352
+ case "ArrowUp":
2353
+ video.volume = Math.min(1, video.volume + volumeStep);
2354
+ video.muted = false;
2355
+ handled = true;
2356
+ break;
2357
+ // Volume down
2358
+ case "ArrowDown":
2359
+ video.volume = Math.max(0, video.volume - volumeStep);
2360
+ handled = true;
2361
+ break;
2362
+ // Toggle mute
2363
+ case "m":
2364
+ case "M":
2365
+ video.muted = !video.muted;
2366
+ handled = true;
2367
+ break;
2368
+ // Toggle fullscreen
2369
+ case "f":
2370
+ case "F":
2371
+ onToggleFullscreen?.();
2372
+ handled = true;
2373
+ break;
2374
+ // Toggle captions
2375
+ case "c":
2376
+ case "C":
2377
+ onToggleCaptions?.();
2378
+ handled = true;
2379
+ break;
2380
+ // Jump to start
2381
+ case "Home":
2382
+ video.currentTime = 0;
2383
+ handled = true;
2384
+ break;
2385
+ // Jump to end
2386
+ case "End":
2387
+ video.currentTime = video.duration || 0;
2388
+ handled = true;
2389
+ break;
2390
+ // Number keys for percentage seeking (0-9)
2391
+ case "0":
2392
+ case "1":
2393
+ case "2":
2394
+ case "3":
2395
+ case "4":
2396
+ case "5":
2397
+ case "6":
2398
+ case "7":
2399
+ case "8":
2400
+ case "9":
2401
+ if (video.duration) {
2402
+ const percent = parseInt(e.key, 10) / 10;
2403
+ video.currentTime = video.duration * percent;
2404
+ handled = true;
2405
+ }
2406
+ break;
2407
+ }
2408
+ if (handled) {
2409
+ e.preventDefault();
2410
+ e.stopPropagation();
2411
+ onShowControls?.();
2412
+ }
2413
+ },
2414
+ [
2415
+ enabled,
2416
+ videoRef,
2417
+ seekAmount,
2418
+ volumeStep,
2419
+ onTogglePlay,
2420
+ onToggleFullscreen,
2421
+ onToggleCaptions,
2422
+ onShowControls
2423
+ ]
2424
+ );
2425
+ const containerProps = React14.useMemo(
2426
+ () => ({
2427
+ onKeyDown: handleKeyDown,
2428
+ tabIndex: 0,
2429
+ role: "application",
2430
+ "aria-label": "Video player, press space to play or pause"
2431
+ }),
2432
+ [handleKeyDown]
2433
+ );
2434
+ return {
2435
+ handleKeyDown,
2436
+ containerProps
2437
+ };
2438
+ }
2439
+ var videoPlayerVariants = tv({
2440
+ base: [
2441
+ "relative",
2442
+ "bg-black",
2443
+ "overflow-hidden",
2444
+ // Focus styling for keyboard navigation
2445
+ "focus:outline-none",
2446
+ "focus-visible:ring-2",
2447
+ "focus-visible:ring-white/50"
2448
+ ],
2449
+ variants: {
2450
+ aspectRatio: {
2451
+ "16/9": "aspect-video",
2452
+ "4/3": "aspect-[4/3]",
2453
+ "1/1": "aspect-square",
2454
+ "9/16": "aspect-[9/16]",
2455
+ auto: ""
2456
+ },
2457
+ rounded: {
2458
+ none: "",
2459
+ sm: "rounded-4",
2460
+ md: "rounded-8",
2461
+ lg: "rounded-12"
2462
+ }
2463
+ },
2464
+ defaultVariants: {
2465
+ aspectRatio: "16/9",
2466
+ rounded: "none"
2467
+ }
2468
+ });
2469
+ var mediaControllerVariants = tv({
2470
+ base: [
2471
+ "absolute inset-0",
2472
+ "w-full h-full",
2473
+ // Button styling - transparent base, hover shows background
2474
+ "[--media-control-background:transparent]",
2475
+ "[--media-control-hover-background:var(--color-video-player-button-bg-hover)]",
2476
+ "[--media-control-padding:8px]",
2477
+ "[--media-control-height:36px]",
2478
+ "[--media-button-icon-width:20px]",
2479
+ "[--media-button-icon-height:20px]",
2480
+ // Progress bar / range styling
2481
+ "[--media-range-track-background:var(--color-video-player-progress-bg)]",
2482
+ "[--media-range-bar-color:var(--color-video-player-progress-fill)]",
2483
+ "[--media-range-track-height:4px]",
2484
+ "[--media-range-track-border-radius:2px]",
2485
+ "[--media-range-thumb-background:var(--color-video-player-progress-fill)]",
2486
+ "[--media-range-thumb-height:12px]",
2487
+ "[--media-range-thumb-width:12px]",
2488
+ "[--media-range-thumb-border-radius:50%]",
2489
+ // Text/icon colors
2490
+ "[--media-icon-color:var(--color-video-player-controls-text)]",
2491
+ "[--media-primary-color:var(--color-video-player-controls-text)]",
2492
+ "[--media-secondary-color:transparent]",
2493
+ "[--media-text-color:var(--color-video-player-controls-text)]",
2494
+ "[--media-font-size:14px]",
2495
+ // Time display styling
2496
+ "[--media-time-display-background:transparent]"
2497
+ ]
2498
+ });
2499
+ var mediaButtonStyles = {
2500
+ padding: "8px",
2501
+ borderRadius: "50%",
2502
+ // Tooltip styling - consistent across all buttons
2503
+ "--media-tooltip-background": "var(--color-video-player-tooltip-bg)",
2504
+ "--media-tooltip-arrow-display": "none",
2505
+ "--media-tooltip-distance": "8px"
2506
+ };
2507
+ var timeRangeStyles = {
2508
+ flex: 1,
2509
+ background: "transparent",
2510
+ // Preview tooltip styling - consistent with button tooltips
2511
+ "--media-box-arrow-display": "none",
2512
+ "--media-preview-box-margin": "0 0 8px 0",
2513
+ "--media-preview-time-margin": "0 0 8px 0",
2514
+ "--media-preview-time-background": "var(--color-video-player-tooltip-bg)"
2515
+ };
2516
+ var volumeRangeStyles = {
2517
+ width: "80px",
2518
+ background: "transparent",
2519
+ // Tooltip styling - consistent with button tooltips
2520
+ "--media-tooltip-background": "var(--color-video-player-tooltip-bg)",
2521
+ "--media-tooltip-arrow-display": "none",
2522
+ "--media-tooltip-distance": "8px"
2523
+ };
2524
+ var timeDisplayStyles = {
2525
+ background: "transparent",
2526
+ fontFamily: "monospace",
2527
+ fontSize: "14px",
2528
+ color: "white",
2529
+ whiteSpace: "nowrap"
2530
+ };
2531
+ var controlBarVariants = tv({
2532
+ base: [
2533
+ // Layout handled in inline styles, but we need flex
2534
+ "flex items-center",
2535
+ // Background using semantic token
2536
+ "bg-video-player-controls-bg",
2537
+ // Animation
2538
+ "transition-all duration-300"
2539
+ ],
2540
+ variants: {
2541
+ visible: {
2542
+ true: "opacity-100 translate-y-0",
2543
+ false: "opacity-0 translate-y-16 pointer-events-none"
2544
+ }
2545
+ },
2546
+ defaultVariants: {
2547
+ visible: true
2548
+ }
2549
+ });
2550
+ var controlButtonVariants = tv({
2551
+ base: [
2552
+ "flex items-center justify-center",
2553
+ "p-8 rounded-full",
2554
+ // Transparent by default, background on hover
2555
+ "bg-transparent",
2556
+ "text-video-player-controls-text",
2557
+ "hover:bg-video-player-button-bg-hover",
2558
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-video-player-progress-bg",
2559
+ "transition-colors duration-150",
2560
+ "cursor-pointer"
2561
+ ]
2562
+ });
2563
+ var loadingOverlayVariants = tv({
2564
+ base: [
2565
+ "absolute inset-0",
2566
+ "flex items-center justify-center",
2567
+ "bg-black/50",
2568
+ "pointer-events-none",
2569
+ "z-10"
2570
+ ]
2571
+ });
2572
+ function useHlsInternal(videoRef, src, enabled) {
2573
+ const [isLoading, setIsLoading] = React14.useState(true);
2574
+ const [error, setError] = React14.useState(null);
2575
+ const hlsRef = React14.useRef(null);
2576
+ React14.useEffect(() => {
2577
+ if (!src || !videoRef.current) {
2578
+ return;
2579
+ }
2580
+ const video = videoRef.current;
2581
+ const isHlsSource = src.includes(".m3u8");
2582
+ if (!isHlsSource) {
2583
+ video.src = src;
2584
+ setIsLoading(false);
2585
+ return;
2586
+ }
2587
+ if (video.canPlayType("application/vnd.apple.mpegurl")) {
2588
+ video.src = src;
2589
+ setIsLoading(false);
2590
+ return;
2591
+ }
2592
+ const loadHls = async () => {
2593
+ try {
2594
+ const HlsModule = await import('hls.js');
2595
+ const Hls = HlsModule.default;
2596
+ if (!Hls.isSupported()) {
2597
+ video.src = src;
2598
+ setIsLoading(false);
2599
+ return;
2600
+ }
2601
+ const hls = new Hls({
2602
+ enableWorker: true,
2603
+ lowLatencyMode: false
2604
+ });
2605
+ hls.loadSource(src);
2606
+ hls.attachMedia(video);
2607
+ hls.on(Hls.Events.MANIFEST_PARSED, () => {
2608
+ setIsLoading(false);
2609
+ });
2610
+ hls.on(
2611
+ Hls.Events.ERROR,
2612
+ (_event, data) => {
2613
+ if (data.fatal) {
2614
+ setError(new Error(`HLS error: ${data.details}`));
2615
+ setIsLoading(false);
2616
+ }
2617
+ }
2618
+ );
2619
+ hlsRef.current = hls;
2620
+ } catch {
2621
+ video.src = src;
2622
+ setIsLoading(false);
2623
+ }
2624
+ };
2625
+ loadHls();
2626
+ return () => {
2627
+ if (hlsRef.current) {
2628
+ hlsRef.current.destroy();
2629
+ hlsRef.current = null;
2630
+ }
2631
+ };
2632
+ }, [enabled, src, videoRef]);
2633
+ return { isLoading, error };
2634
+ }
2635
+ var VideoPlayer = React14.forwardRef(
2636
+ ({
2637
+ className,
2638
+ src,
2639
+ cloudflare,
2640
+ poster,
2641
+ captionsSrc,
2642
+ autoPlay = false,
2643
+ loop = false,
2644
+ muted = false,
2645
+ controls = true,
2646
+ autoHideControls = true,
2647
+ autoHideDelay = 3e3,
2648
+ captionsEnabled: initialCaptionsEnabled = false,
2649
+ aspectRatio,
2650
+ rounded,
2651
+ onPlay,
2652
+ onPause,
2653
+ onEnded,
2654
+ onTimeUpdate,
2655
+ onError,
2656
+ videoRef: externalVideoRef,
2657
+ ...props
2658
+ }, ref) => {
2659
+ const containerRef = React14.useRef(null);
2660
+ const internalVideoRef = React14.useRef(null);
2661
+ const controlsTimeoutRef = React14.useRef(null);
2662
+ const [isPlaying, setIsPlaying] = React14.useState(false);
2663
+ const [currentTime, setCurrentTime] = React14.useState(0);
2664
+ const [controlsVisible, setControlsVisible] = React14.useState(true);
2665
+ const [captionsEnabled, setCaptionsEnabled] = React14.useState(
2666
+ initialCaptionsEnabled
2667
+ );
2668
+ const [isFullscreen, setIsFullscreen] = React14.useState(false);
2669
+ const videoSrc = React14.useMemo(() => {
2670
+ if (cloudflare) {
2671
+ return `https://customer-${cloudflare.customerCode}.cloudflarestream.com/${cloudflare.videoId}/manifest/video.m3u8`;
2672
+ }
2673
+ return src;
2674
+ }, [cloudflare, src]);
2675
+ const { isLoading, error: hlsError } = useHlsInternal(
2676
+ internalVideoRef,
2677
+ videoSrc,
2678
+ true
2679
+ );
2680
+ const { activeCue } = useCaptions({
2681
+ src: captionsSrc,
2682
+ currentTime
2683
+ });
2684
+ React14.useEffect(() => {
2685
+ if (externalVideoRef) {
2686
+ externalVideoRef.current = internalVideoRef.current;
2687
+ }
2688
+ }, [externalVideoRef]);
2689
+ React14.useImperativeHandle(
2690
+ ref,
2691
+ () => containerRef.current
2692
+ );
2693
+ React14.useEffect(() => {
2694
+ if (hlsError && onError) {
2695
+ onError(hlsError);
2696
+ }
2697
+ }, [hlsError, onError]);
2698
+ React14.useEffect(() => {
2699
+ const video = internalVideoRef.current;
2700
+ if (!video) return;
2701
+ const handlePlay = () => {
2702
+ setIsPlaying(true);
2703
+ onPlay?.();
2704
+ };
2705
+ const handlePause = () => {
2706
+ setIsPlaying(false);
2707
+ onPause?.();
2708
+ };
2709
+ const handleEnded = () => {
2710
+ setIsPlaying(false);
2711
+ onEnded?.();
2712
+ };
2713
+ const handleTimeUpdate = () => {
2714
+ setCurrentTime(video.currentTime);
2715
+ onTimeUpdate?.(video.currentTime);
2716
+ };
2717
+ const handleCanPlay = () => {
2718
+ if (autoPlay) {
2719
+ video.play().catch(() => {
2720
+ });
2721
+ }
2722
+ };
2723
+ video.addEventListener("play", handlePlay);
2724
+ video.addEventListener("pause", handlePause);
2725
+ video.addEventListener("ended", handleEnded);
2726
+ video.addEventListener("timeupdate", handleTimeUpdate);
2727
+ video.addEventListener("canplay", handleCanPlay);
2728
+ return () => {
2729
+ video.removeEventListener("play", handlePlay);
2730
+ video.removeEventListener("pause", handlePause);
2731
+ video.removeEventListener("ended", handleEnded);
2732
+ video.removeEventListener("timeupdate", handleTimeUpdate);
2733
+ video.removeEventListener("canplay", handleCanPlay);
2734
+ };
2735
+ }, [autoPlay, onPlay, onPause, onEnded, onTimeUpdate]);
2736
+ React14.useEffect(() => {
2737
+ if (!autoHideControls || !isPlaying || !controlsVisible) return;
2738
+ controlsTimeoutRef.current = setTimeout(() => {
2739
+ setControlsVisible(false);
2740
+ }, autoHideDelay);
2741
+ return () => {
2742
+ if (controlsTimeoutRef.current) {
2743
+ clearTimeout(controlsTimeoutRef.current);
2744
+ }
2745
+ };
2746
+ }, [autoHideControls, isPlaying, controlsVisible, autoHideDelay]);
2747
+ React14.useEffect(() => {
2748
+ const handleFullscreenChange = () => {
2749
+ setIsFullscreen(!!document.fullscreenElement);
2750
+ };
2751
+ document.addEventListener("fullscreenchange", handleFullscreenChange);
2752
+ document.addEventListener(
2753
+ "webkitfullscreenchange",
2754
+ handleFullscreenChange
2755
+ );
2756
+ return () => {
2757
+ document.removeEventListener(
2758
+ "fullscreenchange",
2759
+ handleFullscreenChange
2760
+ );
2761
+ document.removeEventListener(
2762
+ "webkitfullscreenchange",
2763
+ handleFullscreenChange
2764
+ );
2765
+ };
2766
+ }, []);
2767
+ const togglePlay = React14.useCallback(() => {
2768
+ const video = internalVideoRef.current;
2769
+ if (!video) return;
2770
+ if (video.paused) {
2771
+ video.play().catch(() => {
2772
+ });
2773
+ } else {
2774
+ video.pause();
2775
+ }
2776
+ }, []);
2777
+ const toggleCaptions = React14.useCallback(() => {
2778
+ setCaptionsEnabled((prev) => !prev);
2779
+ }, []);
2780
+ const toggleFullscreen = React14.useCallback(() => {
2781
+ if (!document.fullscreenElement) {
2782
+ containerRef.current?.requestFullscreen();
2783
+ } else {
2784
+ document.exitFullscreen();
2785
+ }
2786
+ }, []);
2787
+ const showControls = React14.useCallback(() => {
2788
+ setControlsVisible(true);
2789
+ if (controlsTimeoutRef.current) {
2790
+ clearTimeout(controlsTimeoutRef.current);
2791
+ }
2792
+ }, []);
2793
+ const handleMouseLeave = React14.useCallback(() => {
2794
+ if (autoHideControls && isPlaying) {
2795
+ setControlsVisible(false);
2796
+ }
2797
+ }, [autoHideControls, isPlaying]);
2798
+ const { containerProps: keyboardProps } = useVideoKeyboard({
2799
+ videoRef: internalVideoRef,
2800
+ onTogglePlay: togglePlay,
2801
+ onToggleFullscreen: toggleFullscreen,
2802
+ onToggleCaptions: captionsSrc ? toggleCaptions : void 0,
2803
+ onShowControls: showControls
2804
+ });
2805
+ return (
2806
+ // biome-ignore lint/a11y/noStaticElementInteractions: role is applied via keyboardProps spread
2807
+ /* @__PURE__ */ jsxs(
2808
+ "div",
2809
+ {
2810
+ ref: containerRef,
2811
+ className: cn(videoPlayerVariants({ aspectRatio, rounded }), className),
2812
+ onMouseMove: showControls,
2813
+ onMouseLeave: handleMouseLeave,
2814
+ ...keyboardProps,
2815
+ ...props,
2816
+ children: [
2817
+ controls ? /* @__PURE__ */ jsxs(
2818
+ MediaController,
2819
+ {
2820
+ noAutohide: true,
2821
+ className: mediaControllerVariants(),
2822
+ children: [
2823
+ /* @__PURE__ */ jsx(
2824
+ "video",
2825
+ {
2826
+ ref: internalVideoRef,
2827
+ slot: "media",
2828
+ poster,
2829
+ loop,
2830
+ muted,
2831
+ playsInline: true,
2832
+ crossOrigin: "anonymous",
2833
+ className: "w-full h-full object-contain"
2834
+ }
2835
+ ),
2836
+ /* @__PURE__ */ jsx(MediaLoadingIndicator, { slot: "centered-chrome", noAutohide: true }),
2837
+ /* @__PURE__ */ jsx(
2838
+ "div",
2839
+ {
2840
+ onClick: togglePlay,
2841
+ className: "absolute inset-0 cursor-pointer z-[1]",
2842
+ "aria-hidden": "true"
2843
+ }
2844
+ ),
2845
+ /* @__PURE__ */ jsxs(
2846
+ MediaControlBar,
2847
+ {
2848
+ className: controlBarVariants({ visible: controlsVisible }),
2849
+ onClick: (e) => e.stopPropagation(),
2850
+ style: {
2851
+ position: "absolute",
2852
+ left: "24px",
2853
+ right: "24px",
2854
+ bottom: "24px",
2855
+ gap: "12px",
2856
+ padding: "8px 16px",
2857
+ borderRadius: "9999px",
2858
+ backdropFilter: "blur(10px)",
2859
+ WebkitBackdropFilter: "blur(10px)",
2860
+ zIndex: 2
2861
+ },
2862
+ children: [
2863
+ /* @__PURE__ */ jsx(MediaPlayButton, { style: mediaButtonStyles }),
2864
+ /* @__PURE__ */ jsx(MediaMuteButton, { style: mediaButtonStyles }),
2865
+ /* @__PURE__ */ jsx(MediaVolumeRange, { style: volumeRangeStyles }),
2866
+ /* @__PURE__ */ jsx(
2867
+ MediaTimeDisplay,
2868
+ {
2869
+ style: timeDisplayStyles,
2870
+ showDuration: true,
2871
+ noToggle: true
2872
+ }
2873
+ ),
2874
+ /* @__PURE__ */ jsx(MediaTimeRange, { style: timeRangeStyles }),
2875
+ captionsSrc && /* @__PURE__ */ jsx(
2876
+ "button",
2877
+ {
2878
+ type: "button",
2879
+ className: controlButtonVariants(),
2880
+ onClick: (e) => {
2881
+ e.stopPropagation();
2882
+ toggleCaptions();
2883
+ },
2884
+ "aria-label": captionsEnabled ? "Disable captions" : "Enable captions",
2885
+ "aria-pressed": captionsEnabled,
2886
+ children: /* @__PURE__ */ jsx(CaptionsIcon, { enabled: captionsEnabled })
2887
+ }
2888
+ ),
2889
+ /* @__PURE__ */ jsx(
2890
+ "button",
2891
+ {
2892
+ type: "button",
2893
+ className: controlButtonVariants(),
2894
+ onClick: (e) => {
2895
+ e.stopPropagation();
2896
+ toggleFullscreen();
2897
+ },
2898
+ "aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
2899
+ children: /* @__PURE__ */ jsx(FullscreenIcon, { isFullscreen })
2900
+ }
2901
+ )
2902
+ ]
2903
+ }
2904
+ )
2905
+ ]
2906
+ }
2907
+ ) : (
2908
+ /* Video without controls */
2909
+ /* @__PURE__ */ jsx(
2910
+ "video",
2911
+ {
2912
+ ref: internalVideoRef,
2913
+ poster,
2914
+ loop,
2915
+ muted,
2916
+ playsInline: true,
2917
+ crossOrigin: "anonymous",
2918
+ className: "w-full h-full object-contain",
2919
+ onClick: togglePlay
2920
+ }
2921
+ )
2922
+ ),
2923
+ isLoading && /* @__PURE__ */ jsx("div", { className: loadingOverlayVariants(), children: /* @__PURE__ */ jsx("div", { className: "w-40 h-40 border-3 border-white/30 border-t-white rounded-full animate-spin" }) }),
2924
+ hlsError && /* @__PURE__ */ jsx("div", { className: loadingOverlayVariants(), children: /* @__PURE__ */ jsxs("div", { className: "text-white text-center px-16", children: [
2925
+ /* @__PURE__ */ jsx("p", { className: "typography-body-sm-sm", children: "Failed to load video" }),
2926
+ /* @__PURE__ */ jsx("p", { className: "typography-caption text-white/60 mt-4", children: hlsError.message })
2927
+ ] }) }),
2928
+ captionsEnabled && activeCue && /* @__PURE__ */ jsx(CaptionOverlay, { cue: activeCue })
2929
+ ]
2930
+ }
2931
+ )
2932
+ );
2933
+ }
2934
+ );
2935
+ VideoPlayer.displayName = "VideoPlayer";
2936
+ var CaptionsIcon = ({ enabled }) => /* @__PURE__ */ jsx(
2937
+ "svg",
2938
+ {
2939
+ className: "w-20 h-20",
2940
+ viewBox: "0 0 24 24",
2941
+ fill: "currentColor",
2942
+ "aria-hidden": "true",
2943
+ children: enabled ? (
2944
+ // Captions On
2945
+ /* @__PURE__ */ jsx("path", { d: "M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z" })
2946
+ ) : (
2947
+ // Captions Off (with strike-through)
2948
+ /* @__PURE__ */ jsxs(Fragment, { children: [
2949
+ /* @__PURE__ */ jsx("path", { d: "M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z" }),
2950
+ /* @__PURE__ */ jsx(
2951
+ "line",
2952
+ {
2953
+ x1: "4",
2954
+ y1: "20",
2955
+ x2: "20",
2956
+ y2: "4",
2957
+ stroke: "currentColor",
2958
+ strokeWidth: "2"
2959
+ }
2960
+ )
2961
+ ] })
2962
+ )
2963
+ }
2964
+ );
2965
+ var FullscreenIcon = ({ isFullscreen }) => /* @__PURE__ */ jsx(
2966
+ "svg",
2967
+ {
2968
+ className: "w-20 h-20",
2969
+ viewBox: "0 0 24 24",
2970
+ fill: "none",
2971
+ stroke: "currentColor",
2972
+ strokeWidth: "2",
2973
+ strokeLinecap: "round",
2974
+ strokeLinejoin: "round",
2975
+ "aria-hidden": "true",
2976
+ children: isFullscreen ? (
2977
+ // Minimize (exit fullscreen)
2978
+ /* @__PURE__ */ jsxs(Fragment, { children: [
2979
+ /* @__PURE__ */ jsx("polyline", { points: "4 14 10 14 10 20" }),
2980
+ /* @__PURE__ */ jsx("polyline", { points: "20 10 14 10 14 4" }),
2981
+ /* @__PURE__ */ jsx("line", { x1: "14", y1: "10", x2: "21", y2: "3" }),
2982
+ /* @__PURE__ */ jsx("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
2983
+ ] })
2984
+ ) : (
2985
+ // Maximize (enter fullscreen)
2986
+ /* @__PURE__ */ jsxs(Fragment, { children: [
2987
+ /* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
2988
+ /* @__PURE__ */ jsx("polyline", { points: "9 21 3 21 3 15" }),
2989
+ /* @__PURE__ */ jsx("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
2990
+ /* @__PURE__ */ jsx("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
2991
+ ] })
2992
+ )
2993
+ }
2994
+ );
1807
2995
  function GridOverlay({
1808
2996
  columnOpacity = 0.15,
1809
2997
  borderOpacity = 0.3,
@@ -1958,49 +3146,648 @@ function DevToolbar({ defaultExpanded = false }) {
1958
3146
  className: `bg-gray-1100 rounded-radius-16 shadow-lg flex flex-col items-center overflow-hidden px-12 py-8 ${isExpanded ? "gap-4" : ""}`,
1959
3147
  children: [
1960
3148
  /* @__PURE__ */ jsx(
1961
- "div",
3149
+ "div",
3150
+ {
3151
+ className: `
3152
+ grid transition-all duration-300 ease-out
3153
+ ${isExpanded ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}
3154
+ `,
3155
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
3156
+ "button",
3157
+ {
3158
+ type: "button",
3159
+ onClick: toggleGrid,
3160
+ className: `
3161
+ size-40 rounded-full flex items-center justify-center transition-colors
3162
+ ${showGrid ? "text-gray-50" : "text-gray-400 hover:text-gray-50 hover:bg-alpha-white-10"}
3163
+ `,
3164
+ title: "Toggle Grid (\u2318G)",
3165
+ "aria-label": "Toggle grid overlay",
3166
+ children: /* @__PURE__ */ jsx(GridIcon, { active: showGrid })
3167
+ }
3168
+ ) })
3169
+ }
3170
+ ),
3171
+ /* @__PURE__ */ jsx(
3172
+ "button",
3173
+ {
3174
+ type: "button",
3175
+ onMouseDown: handleBarMouseDown,
3176
+ onTouchStart: handleBarTouchStart,
3177
+ onClick: handleBarClick,
3178
+ className: `
3179
+ w-32 h-4 bg-gray-50 rounded-full transition-opacity
3180
+ ${isDragging ? "opacity-100 cursor-grabbing" : "opacity-60 hover:opacity-100 cursor-grab"}
3181
+ `,
3182
+ "aria-label": isExpanded ? "Close dev tools" : "Open dev tools"
3183
+ }
3184
+ )
3185
+ ]
3186
+ }
3187
+ )
3188
+ }
3189
+ )
3190
+ ] });
3191
+ }
3192
+ var dialogBackdropVariants = tv({
3193
+ base: [
3194
+ // Fixed positioning to cover viewport
3195
+ "fixed inset-0",
3196
+ // Semi-transparent black background using alpha token
3197
+ "bg-alpha-black-50",
3198
+ // Smooth opacity transition
3199
+ "transition-opacity duration-200",
3200
+ // Animation states
3201
+ "data-[starting-style]:opacity-0",
3202
+ "data-[ending-style]:opacity-0",
3203
+ // Ensure backdrop covers full viewport on iOS
3204
+ "min-h-dvh"
3205
+ ]
3206
+ });
3207
+ var dialogPopupVariants = tv({
3208
+ base: [
3209
+ // Fixed positioning, centered
3210
+ "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
3211
+ // Layout
3212
+ "flex flex-col",
3213
+ // Max dimensions with viewport margin (24px on each side = 48px total)
3214
+ "max-h-[calc(100vh-48px)] max-w-[calc(100vw-48px)]",
3215
+ // Ensure above backdrop
3216
+ "z-50",
3217
+ // Animation
3218
+ "transition-all duration-200",
3219
+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
3220
+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
3221
+ // Focus outline
3222
+ "outline-none"
3223
+ ],
3224
+ variants: {
3225
+ size: {
3226
+ sm: "w-full sm:max-w-[400px]",
3227
+ md: "w-full sm:max-w-[560px]",
3228
+ lg: "w-full sm:max-w-[720px]",
3229
+ xl: "w-full sm:max-w-[960px]",
3230
+ full: "w-[calc(100vw-48px)] h-[calc(100vh-48px)]"
3231
+ },
3232
+ variant: {
3233
+ default: [
3234
+ // Background - uses overlay background token
3235
+ "bg-overlay-background",
3236
+ // Border - uses overlay border token
3237
+ "border border-overlay-border",
3238
+ // Text - uses overlay text token
3239
+ "text-overlay-text",
3240
+ // Border radius - uses surface overlay token
3241
+ "rounded-surface-overlay",
3242
+ // Shadow for elevation
3243
+ "shadow-xl"
3244
+ ],
3245
+ minimal: [
3246
+ // Transparent background, no border/shadow
3247
+ "bg-black",
3248
+ "border-0",
3249
+ "text-white",
3250
+ "rounded-8",
3251
+ "shadow-none",
3252
+ "overflow-hidden"
3253
+ ]
3254
+ }
3255
+ },
3256
+ compoundVariants: [
3257
+ // Default variant padding by size
3258
+ { variant: "default", size: "sm", class: "p-24" },
3259
+ { variant: "default", size: "md", class: "p-32" },
3260
+ { variant: "default", size: "lg", class: "p-32" },
3261
+ { variant: "default", size: "xl", class: "p-40" },
3262
+ { variant: "default", size: "full", class: "p-40" },
3263
+ // Minimal variant has no padding
3264
+ { variant: "minimal", size: "sm", class: "p-0" },
3265
+ { variant: "minimal", size: "md", class: "p-0" },
3266
+ { variant: "minimal", size: "lg", class: "p-0" },
3267
+ { variant: "minimal", size: "xl", class: "p-0" },
3268
+ { variant: "minimal", size: "full", class: "p-0" }
3269
+ ],
3270
+ defaultVariants: {
3271
+ size: "md",
3272
+ variant: "default"
3273
+ }
3274
+ });
3275
+ var DialogRoot = ({ children, ...props }) => {
3276
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { ...props, children });
3277
+ };
3278
+ var DialogTrigger = React14.forwardRef(
3279
+ ({ className, children, ...props }, ref) => {
3280
+ const isSingleElement = React14.isValidElement(children);
3281
+ if (isSingleElement) {
3282
+ return /* @__PURE__ */ jsx(
3283
+ Dialog$1.Trigger,
3284
+ {
3285
+ ref,
3286
+ className,
3287
+ render: children,
3288
+ ...props
3289
+ }
3290
+ );
3291
+ }
3292
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, { ref, className, ...props, children });
3293
+ }
3294
+ );
3295
+ DialogTrigger.displayName = "DialogTrigger";
3296
+ var DialogPortal = ({ children, ...props }) => {
3297
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { ...props, children });
3298
+ };
3299
+ var DialogBackdrop = React14.forwardRef(
3300
+ ({ className, ...props }, ref) => {
3301
+ return /* @__PURE__ */ jsx(
3302
+ Dialog$1.Backdrop,
3303
+ {
3304
+ ref,
3305
+ className: cn(dialogBackdropVariants(), className),
3306
+ ...props
3307
+ }
3308
+ );
3309
+ }
3310
+ );
3311
+ DialogBackdrop.displayName = "DialogBackdrop";
3312
+ var DialogPopup = React14.forwardRef(
3313
+ ({ className, size, variant, ...props }, ref) => {
3314
+ return /* @__PURE__ */ jsx(
3315
+ Dialog$1.Popup,
3316
+ {
3317
+ ref,
3318
+ className: cn(dialogPopupVariants({ size, variant }), className),
3319
+ ...props
3320
+ }
3321
+ );
3322
+ }
3323
+ );
3324
+ DialogPopup.displayName = "DialogPopup";
3325
+ var DialogTitle = React14.forwardRef(
3326
+ ({ className, ...props }, ref) => {
3327
+ return /* @__PURE__ */ jsx(
3328
+ Dialog$1.Title,
3329
+ {
3330
+ ref,
3331
+ className: cn("typography-h4-md font-semibold mb-8", className),
3332
+ ...props
3333
+ }
3334
+ );
3335
+ }
3336
+ );
3337
+ DialogTitle.displayName = "DialogTitle";
3338
+ var DialogDescription = React14.forwardRef(({ className, ...props }, ref) => {
3339
+ return /* @__PURE__ */ jsx(
3340
+ Dialog$1.Description,
3341
+ {
3342
+ ref,
3343
+ className: cn("typography-body-md-md text-overlay-text-muted", className),
3344
+ ...props
3345
+ }
3346
+ );
3347
+ });
3348
+ DialogDescription.displayName = "DialogDescription";
3349
+ var DialogClose = React14.forwardRef(
3350
+ ({ className, ...props }, ref) => {
3351
+ return /* @__PURE__ */ jsx(
3352
+ Dialog$1.Close,
3353
+ {
3354
+ ref,
3355
+ className: cn(
3356
+ "absolute right-16 top-16 rounded-surface-ui-small p-8",
3357
+ "text-overlay-text-muted hover:text-overlay-text",
3358
+ "hover:bg-bg-section",
3359
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
3360
+ "transition-colors duration-150",
3361
+ className
3362
+ ),
3363
+ ...props
3364
+ }
3365
+ );
3366
+ }
3367
+ );
3368
+ DialogClose.displayName = "DialogClose";
3369
+ var DialogBody = React14.forwardRef(
3370
+ ({ className, ...props }, ref) => {
3371
+ return /* @__PURE__ */ jsx(
3372
+ "div",
3373
+ {
3374
+ ref,
3375
+ className: cn("flex-1 overflow-y-auto", className),
3376
+ ...props
3377
+ }
3378
+ );
3379
+ }
3380
+ );
3381
+ DialogBody.displayName = "DialogBody";
3382
+ var DialogFooter = React14.forwardRef(
3383
+ ({ className, ...props }, ref) => {
3384
+ return /* @__PURE__ */ jsx(
3385
+ "div",
3386
+ {
3387
+ ref,
3388
+ className: cn(
3389
+ "flex items-center justify-end gap-12 pt-24 mt-auto",
3390
+ className
3391
+ ),
3392
+ ...props
3393
+ }
3394
+ );
3395
+ }
3396
+ );
3397
+ DialogFooter.displayName = "DialogFooter";
3398
+ var Dialog = ({
3399
+ children,
3400
+ trigger,
3401
+ title,
3402
+ description,
3403
+ size = "md",
3404
+ variant = "default",
3405
+ showClose = true,
3406
+ open,
3407
+ defaultOpen,
3408
+ onOpenChange,
3409
+ className
3410
+ }) => {
3411
+ return /* @__PURE__ */ jsxs(
3412
+ DialogRoot,
3413
+ {
3414
+ open,
3415
+ defaultOpen,
3416
+ onOpenChange,
3417
+ children: [
3418
+ trigger && /* @__PURE__ */ jsx(DialogTrigger, { children: trigger }),
3419
+ /* @__PURE__ */ jsxs(DialogPortal, { children: [
3420
+ /* @__PURE__ */ jsx(DialogBackdrop, {}),
3421
+ /* @__PURE__ */ jsxs(DialogPopup, { size, variant, className, children: [
3422
+ showClose && /* @__PURE__ */ jsxs(DialogClose, { children: [
3423
+ /* @__PURE__ */ jsx(
3424
+ "svg",
1962
3425
  {
1963
- className: `
1964
- grid transition-all duration-300 ease-out
1965
- ${isExpanded ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}
1966
- `,
1967
- children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
1968
- "button",
3426
+ width: "16",
3427
+ height: "16",
3428
+ viewBox: "0 0 16 16",
3429
+ fill: "none",
3430
+ "aria-hidden": "true",
3431
+ children: /* @__PURE__ */ jsx(
3432
+ "path",
1969
3433
  {
1970
- type: "button",
1971
- onClick: toggleGrid,
1972
- className: `
1973
- size-40 rounded-full flex items-center justify-center transition-colors
1974
- ${showGrid ? "text-gray-50" : "text-gray-400 hover:text-gray-50 hover:bg-alpha-white-10"}
1975
- `,
1976
- title: "Toggle Grid (\u2318G)",
1977
- "aria-label": "Toggle grid overlay",
1978
- children: /* @__PURE__ */ jsx(GridIcon, { active: showGrid })
3434
+ d: "M2 2L14 14M2 14L14 2",
3435
+ stroke: "currentColor",
3436
+ strokeWidth: "2",
3437
+ strokeLinecap: "round"
1979
3438
  }
1980
- ) })
3439
+ )
1981
3440
  }
1982
3441
  ),
1983
- /* @__PURE__ */ jsx(
1984
- "button",
1985
- {
1986
- type: "button",
1987
- onMouseDown: handleBarMouseDown,
1988
- onTouchStart: handleBarTouchStart,
1989
- onClick: handleBarClick,
1990
- className: `
1991
- w-32 h-4 bg-gray-50 rounded-full transition-opacity
1992
- ${isDragging ? "opacity-100 cursor-grabbing" : "opacity-60 hover:opacity-100 cursor-grab"}
1993
- `,
1994
- "aria-label": isExpanded ? "Close dev tools" : "Open dev tools"
1995
- }
1996
- )
1997
- ]
1998
- }
1999
- )
3442
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
3443
+ ] }),
3444
+ title && /* @__PURE__ */ jsx(DialogTitle, { children: title }),
3445
+ description && /* @__PURE__ */ jsx(DialogDescription, { children: description }),
3446
+ /* @__PURE__ */ jsx(DialogBody, { children })
3447
+ ] })
3448
+ ] })
3449
+ ]
3450
+ }
3451
+ );
3452
+ };
3453
+ var DialogParts = Object.assign(DialogRoot, {
3454
+ Root: DialogRoot,
3455
+ Trigger: DialogTrigger,
3456
+ Portal: DialogPortal,
3457
+ Backdrop: DialogBackdrop,
3458
+ Popup: DialogPopup,
3459
+ Title: DialogTitle,
3460
+ Description: DialogDescription,
3461
+ Close: DialogClose,
3462
+ Body: DialogBody,
3463
+ Footer: DialogFooter
3464
+ });
3465
+ var videoDialogVariants = tv({
3466
+ base: [
3467
+ // Fixed positioning covering viewport
3468
+ "fixed inset-0",
3469
+ // Dark background base
3470
+ "bg-black",
3471
+ // Flex centering for the video
3472
+ "flex items-center justify-center",
3473
+ // Animation
3474
+ "transition-opacity duration-300",
3475
+ "data-[starting-style]:opacity-0",
3476
+ "data-[ending-style]:opacity-0",
3477
+ // Focus outline
3478
+ "outline-none"
3479
+ ]
3480
+ });
3481
+ var closeButtonVariants = tv({
3482
+ base: [
3483
+ // Positioning
3484
+ "absolute z-50",
3485
+ // Size and shape
3486
+ "w-48 h-48 rounded-full",
3487
+ // Colors
3488
+ "bg-black/60 text-white",
3489
+ "hover:bg-black/80",
3490
+ // Transition
3491
+ "transition-all duration-150",
3492
+ // Focus
3493
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",
3494
+ // Flex centering for icon
3495
+ "flex items-center justify-center",
3496
+ // Cursor
3497
+ "cursor-pointer"
3498
+ ],
3499
+ variants: {
3500
+ position: {
3501
+ "top-right": "top-24 right-24",
3502
+ "top-left": "top-24 left-24"
3503
+ }
3504
+ },
3505
+ defaultVariants: {
3506
+ position: "top-right"
3507
+ }
3508
+ });
3509
+ var videoContainerVariants = tv({
3510
+ base: [
3511
+ // Relative for z-index
3512
+ "relative z-10",
3513
+ // Fill available space
3514
+ "w-full h-full",
3515
+ // Flex to center the video
3516
+ "flex items-center justify-center",
3517
+ // Padding from viewport edges
3518
+ "p-16 sm:p-24 lg:p-32"
3519
+ ]
3520
+ });
3521
+ var VideoDialog = React14.forwardRef(
3522
+ ({
3523
+ trigger,
3524
+ src,
3525
+ cloudflare,
3526
+ blur = "high",
3527
+ overlay = "vignette",
3528
+ backdropOpacity = 0.6,
3529
+ showClose = true,
3530
+ closePosition = "top-right",
3531
+ rounded = "lg",
3532
+ open: controlledOpen,
3533
+ defaultOpen,
3534
+ onOpenChange,
3535
+ className,
3536
+ autoPlay,
3537
+ ...videoProps
3538
+ }, ref) => {
3539
+ const [internalOpen, setInternalOpen] = React14.useState(
3540
+ defaultOpen ?? false
3541
+ );
3542
+ const isControlled = controlledOpen !== void 0;
3543
+ const open = isControlled ? controlledOpen : internalOpen;
3544
+ const handleOpenChange = React14.useCallback(
3545
+ (newOpen) => {
3546
+ if (!isControlled) {
3547
+ setInternalOpen(newOpen);
3548
+ }
3549
+ onOpenChange?.(newOpen);
3550
+ },
3551
+ [isControlled, onOpenChange]
3552
+ );
3553
+ const primaryVideoRef = React14.useRef(null);
3554
+ return /* @__PURE__ */ jsxs(
3555
+ Dialog$1.Root,
3556
+ {
3557
+ open,
3558
+ defaultOpen,
3559
+ onOpenChange: handleOpenChange,
3560
+ children: [
3561
+ /* @__PURE__ */ jsx(
3562
+ Dialog$1.Trigger,
3563
+ {
3564
+ render: React14.isValidElement(trigger) ? trigger : void 0,
3565
+ children: !React14.isValidElement(trigger) ? trigger : void 0
3566
+ }
3567
+ ),
3568
+ /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsxs(
3569
+ Dialog$1.Popup,
3570
+ {
3571
+ ref,
3572
+ className: cn(videoDialogVariants(), className),
3573
+ "data-component": "video-dialog",
3574
+ children: [
3575
+ /* @__PURE__ */ jsx(
3576
+ BlurredVideoBackdrop,
3577
+ {
3578
+ videoRef: primaryVideoRef,
3579
+ blur,
3580
+ overlay,
3581
+ opacity: backdropOpacity,
3582
+ extension: 120
3583
+ }
3584
+ ),
3585
+ showClose && /* @__PURE__ */ jsxs(
3586
+ Dialog$1.Close,
3587
+ {
3588
+ className: closeButtonVariants({ position: closePosition }),
3589
+ children: [
3590
+ /* @__PURE__ */ jsx(
3591
+ "svg",
3592
+ {
3593
+ width: "20",
3594
+ height: "20",
3595
+ viewBox: "0 0 20 20",
3596
+ fill: "none",
3597
+ "aria-hidden": "true",
3598
+ children: /* @__PURE__ */ jsx(
3599
+ "path",
3600
+ {
3601
+ d: "M4 4L16 16M4 16L16 4",
3602
+ stroke: "currentColor",
3603
+ strokeWidth: "2",
3604
+ strokeLinecap: "round"
3605
+ }
3606
+ )
3607
+ }
3608
+ ),
3609
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
3610
+ ]
3611
+ }
3612
+ ),
3613
+ /* @__PURE__ */ jsx("div", { className: videoContainerVariants(), children: /* @__PURE__ */ jsx(
3614
+ VideoPlayer,
3615
+ {
3616
+ src,
3617
+ cloudflare,
3618
+ videoRef: primaryVideoRef,
3619
+ rounded,
3620
+ autoPlay: autoPlay ?? open,
3621
+ aspectRatio: "16/9",
3622
+ style: {
3623
+ width: "min(100%, calc((100vh - 64px) * 16 / 9))",
3624
+ maxHeight: "calc(100vh - 64px)"
3625
+ },
3626
+ ...videoProps
3627
+ }
3628
+ ) })
3629
+ ]
3630
+ }
3631
+ ) })
3632
+ ]
2000
3633
  }
2001
- )
2002
- ] });
3634
+ );
3635
+ }
3636
+ );
3637
+ VideoDialog.displayName = "VideoDialog";
3638
+ var VideoWithBackdropContext = React14.createContext(null);
3639
+ function useVideoWithBackdropContext() {
3640
+ const context = React14.useContext(VideoWithBackdropContext);
3641
+ if (!context) {
3642
+ throw new Error(
3643
+ "VideoWithBackdrop compound components must be used within VideoWithBackdrop.Root"
3644
+ );
3645
+ }
3646
+ return context;
2003
3647
  }
3648
+ var videoWithBackdropVariants = tv({
3649
+ base: ["relative", "overflow-hidden", "bg-black"],
3650
+ variants: {
3651
+ /**
3652
+ * Full-height mode for dialogs.
3653
+ */
3654
+ fullHeight: {
3655
+ true: "h-full w-full",
3656
+ false: ""
3657
+ }
3658
+ },
3659
+ defaultVariants: {
3660
+ fullHeight: false
3661
+ }
3662
+ });
3663
+ var contentVariants = tv({
3664
+ base: ["relative", "z-10", "flex", "items-center", "justify-center"],
3665
+ variants: {
3666
+ fullHeight: {
3667
+ true: "h-full w-full",
3668
+ false: ""
3669
+ },
3670
+ padding: {
3671
+ none: "",
3672
+ sm: "p-16",
3673
+ md: "p-24",
3674
+ lg: "p-48"
3675
+ }
3676
+ },
3677
+ defaultVariants: {
3678
+ fullHeight: false,
3679
+ padding: "md"
3680
+ }
3681
+ });
3682
+ var VideoWithBackdropRoot = React14.forwardRef(({ className, src, cloudflare, fullHeight, children, ...props }, ref) => {
3683
+ const videoRef = React14.useRef(null);
3684
+ const contextValue = React14.useMemo(
3685
+ () => ({ videoRef, src, cloudflare }),
3686
+ [src, cloudflare]
3687
+ );
3688
+ return /* @__PURE__ */ jsx(VideoWithBackdropContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
3689
+ "div",
3690
+ {
3691
+ ref,
3692
+ className: cn(videoWithBackdropVariants({ fullHeight }), className),
3693
+ "data-full-height": fullHeight ?? false,
3694
+ ...props,
3695
+ children
3696
+ }
3697
+ ) });
3698
+ });
3699
+ VideoWithBackdropRoot.displayName = "VideoWithBackdropRoot";
3700
+ var VideoWithBackdropBackdrop = React14.forwardRef(({ ...props }, ref) => {
3701
+ const { videoRef } = useVideoWithBackdropContext();
3702
+ return /* @__PURE__ */ jsx(BlurredVideoBackdrop, { ref, videoRef, ...props });
3703
+ });
3704
+ VideoWithBackdropBackdrop.displayName = "VideoWithBackdropBackdrop";
3705
+ var VideoWithBackdropContent = React14.forwardRef(({ className, fullHeight, padding, children, ...props }, ref) => {
3706
+ return /* @__PURE__ */ jsx(
3707
+ "div",
3708
+ {
3709
+ ref,
3710
+ className: cn(contentVariants({ fullHeight, padding }), className),
3711
+ ...props,
3712
+ children
3713
+ }
3714
+ );
3715
+ });
3716
+ VideoWithBackdropContent.displayName = "VideoWithBackdropContent";
3717
+ var VideoWithBackdropVideo = React14.forwardRef(({ className, maxWidth = "960px", cloudflare, src, ...props }, ref) => {
3718
+ const context = useVideoWithBackdropContext();
3719
+ const videoCloudflare = cloudflare ?? context.cloudflare;
3720
+ const videoSrc = src ?? context.src;
3721
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("w-full", className), style: { maxWidth }, children: /* @__PURE__ */ jsx(
3722
+ VideoPlayer,
3723
+ {
3724
+ cloudflare: videoCloudflare,
3725
+ src: videoSrc,
3726
+ videoRef: context.videoRef,
3727
+ ...props
3728
+ }
3729
+ ) });
3730
+ });
3731
+ VideoWithBackdropVideo.displayName = "VideoWithBackdropVideo";
3732
+ var VideoWithBackdrop = React14.forwardRef(
3733
+ ({
3734
+ src,
3735
+ cloudflare,
3736
+ blur = "high",
3737
+ overlay = "vignette",
3738
+ backdropOpacity = 0.6,
3739
+ maxWidth = "960px",
3740
+ padding = "md",
3741
+ rounded = "lg",
3742
+ className,
3743
+ targetFps = 30,
3744
+ scale = 0.5,
3745
+ ...videoProps
3746
+ }, ref) => {
3747
+ const videoRef = React14.useRef(null);
3748
+ return /* @__PURE__ */ jsxs(
3749
+ "div",
3750
+ {
3751
+ ref,
3752
+ className: cn(
3753
+ videoWithBackdropVariants({ fullHeight: true }),
3754
+ className
3755
+ ),
3756
+ "data-component": "video-with-backdrop",
3757
+ children: [
3758
+ /* @__PURE__ */ jsx(
3759
+ BlurredVideoBackdrop,
3760
+ {
3761
+ videoRef,
3762
+ blur,
3763
+ overlay,
3764
+ opacity: backdropOpacity,
3765
+ targetFps,
3766
+ scale
3767
+ }
3768
+ ),
3769
+ /* @__PURE__ */ jsx("div", { className: cn(contentVariants({ fullHeight: true, padding })), children: /* @__PURE__ */ jsx("div", { className: "w-full", style: { maxWidth }, children: /* @__PURE__ */ jsx(
3770
+ VideoPlayer,
3771
+ {
3772
+ src,
3773
+ cloudflare,
3774
+ videoRef,
3775
+ rounded,
3776
+ ...videoProps
3777
+ }
3778
+ ) }) })
3779
+ ]
3780
+ }
3781
+ );
3782
+ }
3783
+ );
3784
+ VideoWithBackdrop.displayName = "VideoWithBackdrop";
3785
+ var VideoWithBackdropParts = Object.assign(VideoWithBackdropRoot, {
3786
+ Root: VideoWithBackdropRoot,
3787
+ Backdrop: VideoWithBackdropBackdrop,
3788
+ Content: VideoWithBackdropContent,
3789
+ Video: VideoWithBackdropVideo
3790
+ });
2004
3791
  var cardVariants = tv({
2005
3792
  base: "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid",
2006
3793
  variants: {
@@ -2018,7 +3805,7 @@ var cardVariants = tv({
2018
3805
  layout: "vertical"
2019
3806
  }
2020
3807
  });
2021
- var Card = React11.forwardRef(
3808
+ var Card = React14.forwardRef(
2022
3809
  ({ className, layout, ...props }, ref) => {
2023
3810
  return /* @__PURE__ */ jsx(
2024
3811
  "div",
@@ -2040,7 +3827,7 @@ var cardImageVariants = tv({
2040
3827
  "[.flex-row>&]:aspect-auto [.flex-row>&]:w-2/5 [.flex-row>&]:self-stretch"
2041
3828
  ]
2042
3829
  });
2043
- var CardImage = React11.forwardRef(
3830
+ var CardImage = React14.forwardRef(
2044
3831
  ({ className, src, alt = "", ...props }, ref) => {
2045
3832
  return /* @__PURE__ */ jsx(
2046
3833
  "div",
@@ -2075,7 +3862,7 @@ var cardContentVariants = tv({
2075
3862
  }
2076
3863
  }
2077
3864
  });
2078
- var CardContent = React11.forwardRef(
3865
+ var CardContent = React14.forwardRef(
2079
3866
  ({ className, justify, ...props }, ref) => {
2080
3867
  return /* @__PURE__ */ jsx(
2081
3868
  "div",
@@ -2091,7 +3878,7 @@ CardContent.displayName = "CardContent";
2091
3878
  var cardEyebrowVariants = tv({
2092
3879
  base: "typography-overline text-text-muted uppercase tracking-wider"
2093
3880
  });
2094
- var CardEyebrow = React11.forwardRef(
3881
+ var CardEyebrow = React14.forwardRef(
2095
3882
  ({ className, ...props }, ref) => {
2096
3883
  return /* @__PURE__ */ jsx(
2097
3884
  "p",
@@ -2107,7 +3894,7 @@ CardEyebrow.displayName = "CardEyebrow";
2107
3894
  var cardTitleVariants = tv({
2108
3895
  base: "typography-h5 text-text-primary"
2109
3896
  });
2110
- var CardTitle = React11.forwardRef(
3897
+ var CardTitle = React14.forwardRef(
2111
3898
  ({ className, as: Component = "h3", ...props }, ref) => {
2112
3899
  return /* @__PURE__ */ jsx(
2113
3900
  Component,
@@ -2123,7 +3910,7 @@ CardTitle.displayName = "CardTitle";
2123
3910
  var cardDescriptionVariants = tv({
2124
3911
  base: "typography-body-small text-text-secondary"
2125
3912
  });
2126
- var CardDescription = React11.forwardRef(({ className, ...props }, ref) => {
3913
+ var CardDescription = React14.forwardRef(({ className, ...props }, ref) => {
2127
3914
  return /* @__PURE__ */ jsx(
2128
3915
  "p",
2129
3916
  {
@@ -2137,7 +3924,7 @@ CardDescription.displayName = "CardDescription";
2137
3924
  var cardBodyVariants = tv({
2138
3925
  base: "flex w-full flex-col gap-spatial-card-small-gap"
2139
3926
  });
2140
- var CardBody = React11.forwardRef(
3927
+ var CardBody = React14.forwardRef(
2141
3928
  ({ className, ...props }, ref) => {
2142
3929
  return /* @__PURE__ */ jsx(
2143
3930
  "div",
@@ -2153,7 +3940,7 @@ CardBody.displayName = "CardBody";
2153
3940
  var cardActionsVariants = tv({
2154
3941
  base: "flex gap-12"
2155
3942
  });
2156
- var CardActions = React11.forwardRef(
3943
+ var CardActions = React14.forwardRef(
2157
3944
  ({ className, ...props }, ref) => {
2158
3945
  return /* @__PURE__ */ jsx(
2159
3946
  "div",
@@ -2166,16 +3953,16 @@ var CardActions = React11.forwardRef(
2166
3953
  }
2167
3954
  );
2168
3955
  CardActions.displayName = "CardActions";
2169
- var NavbarContext = React11.createContext({
3956
+ var NavbarContext = React14.createContext({
2170
3957
  isMobileMenuOpen: false,
2171
3958
  setIsMobileMenuOpen: () => {
2172
3959
  }
2173
3960
  });
2174
- var Navbar = React11.forwardRef(
3961
+ var Navbar = React14.forwardRef(
2175
3962
  ({ className, children, ...props }, ref) => {
2176
- const [isMobileMenuOpen, setIsMobileMenuOpen] = React11.useState(false);
2177
- const navRef = React11.useRef(null);
2178
- React11.useEffect(() => {
3963
+ const [isMobileMenuOpen, setIsMobileMenuOpen] = React14.useState(false);
3964
+ const navRef = React14.useRef(null);
3965
+ React14.useEffect(() => {
2179
3966
  const updateHeight = () => {
2180
3967
  if (navRef.current) {
2181
3968
  const height = navRef.current.offsetHeight;
@@ -2189,7 +3976,7 @@ var Navbar = React11.forwardRef(
2189
3976
  window.addEventListener("resize", updateHeight);
2190
3977
  return () => window.removeEventListener("resize", updateHeight);
2191
3978
  }, []);
2192
- const mergedRef = React11.useCallback(
3979
+ const mergedRef = React14.useCallback(
2193
3980
  (node) => {
2194
3981
  navRef.current = node;
2195
3982
  if (typeof ref === "function") {
@@ -2204,19 +3991,19 @@ var Navbar = React11.forwardRef(
2204
3991
  "nav",
2205
3992
  {
2206
3993
  ref: mergedRef,
2207
- className: cnBase("relative z-50 w-full bg-gray-50", className),
3994
+ className: cn("relative z-50 w-full bg-gray-50", className),
2208
3995
  ...props,
2209
3996
  children: /* @__PURE__ */ jsx(
2210
3997
  "div",
2211
3998
  {
2212
- className: cnBase(
3999
+ className: cn(
2213
4000
  "flex w-full items-center justify-between",
2214
4001
  // Mobile
2215
- "px-spacing-component-navbar-padding-x-mobile py-spacing-component-navbar-padding-y-mobile",
4002
+ "px-spatial-component-navbar-padding-x-mobile py-spatial-component-navbar-padding-y-mobile",
2216
4003
  // Tablet
2217
- "md:px-spacing-component-navbar-padding-x-tablet md:py-spacing-component-navbar-padding-y-tablet",
4004
+ "md:px-spatial-component-navbar-padding-x-tablet md:py-spatial-component-navbar-padding-y-tablet",
2218
4005
  // Desktop
2219
- "xl:px-spacing-component-navbar-padding-x-desktop xl:py-spacing-component-navbar-padding-y-desktop"
4006
+ "xl:px-spatial-component-navbar-padding-x-desktop xl:py-spatial-component-navbar-padding-y-desktop"
2220
4007
  ),
2221
4008
  children
2222
4009
  }
@@ -2226,21 +4013,21 @@ var Navbar = React11.forwardRef(
2226
4013
  }
2227
4014
  );
2228
4015
  Navbar.displayName = "Navbar";
2229
- var NavbarBrand = React11.forwardRef(
4016
+ var NavbarBrand = React14.forwardRef(
2230
4017
  ({ className, asChild = false, ...props }, ref) => {
2231
4018
  const Comp = asChild ? Slot : "div";
2232
- return /* @__PURE__ */ jsx(Comp, { ref, className: cnBase("shrink-0", className), ...props });
4019
+ return /* @__PURE__ */ jsx(Comp, { ref, className: cn("shrink-0", className), ...props });
2233
4020
  }
2234
4021
  );
2235
4022
  NavbarBrand.displayName = "NavbarBrand";
2236
- var NavbarLinks = React11.forwardRef(
4023
+ var NavbarLinks = React14.forwardRef(
2237
4024
  ({ className, ...props }, ref) => {
2238
4025
  return /* @__PURE__ */ jsx(
2239
4026
  "div",
2240
4027
  {
2241
4028
  ref,
2242
- className: cnBase(
2243
- "hidden items-center gap-spacing-component-navbar-gap-links md:flex",
4029
+ className: cn(
4030
+ "hidden items-center gap-spatial-component-navbar-gap-links md:flex",
2244
4031
  className
2245
4032
  ),
2246
4033
  ...props
@@ -2249,14 +4036,14 @@ var NavbarLinks = React11.forwardRef(
2249
4036
  }
2250
4037
  );
2251
4038
  NavbarLinks.displayName = "NavbarLinks";
2252
- var NavbarLink = React11.forwardRef(
4039
+ var NavbarLink = React14.forwardRef(
2253
4040
  ({ className, asChild = false, active, ...props }, ref) => {
2254
4041
  const Comp = asChild ? Slot : "a";
2255
4042
  return /* @__PURE__ */ jsx(
2256
4043
  Comp,
2257
4044
  {
2258
4045
  ref,
2259
- className: cnBase(
4046
+ className: cn(
2260
4047
  "typography-body-small font-medium text-gray-900 transition-colors hover:text-gray-700",
2261
4048
  active && "text-gray-1100",
2262
4049
  className
@@ -2267,14 +4054,14 @@ var NavbarLink = React11.forwardRef(
2267
4054
  }
2268
4055
  );
2269
4056
  NavbarLink.displayName = "NavbarLink";
2270
- var NavbarActions = React11.forwardRef(
4057
+ var NavbarActions = React14.forwardRef(
2271
4058
  ({ className, ...props }, ref) => {
2272
4059
  return /* @__PURE__ */ jsx(
2273
4060
  "div",
2274
4061
  {
2275
4062
  ref,
2276
- className: cnBase(
2277
- "flex items-center gap-spacing-component-navbar-gap-actions",
4063
+ className: cn(
4064
+ "flex items-center gap-spatial-component-navbar-gap-actions",
2278
4065
  className
2279
4066
  ),
2280
4067
  ...props
@@ -2283,13 +4070,13 @@ var NavbarActions = React11.forwardRef(
2283
4070
  }
2284
4071
  );
2285
4072
  NavbarActions.displayName = "NavbarActions";
2286
- var NavbarMobileMenu = React11.forwardRef(({ className, children, ...props }, ref) => {
2287
- const { isMobileMenuOpen, setIsMobileMenuOpen } = React11.useContext(NavbarContext);
2288
- return /* @__PURE__ */ jsx(Dialog.Root, { open: isMobileMenuOpen, onOpenChange: setIsMobileMenuOpen, children: /* @__PURE__ */ jsx(Dialog.Portal, { children: /* @__PURE__ */ jsxs(
2289
- Dialog.Popup,
4073
+ var NavbarMobileMenu = React14.forwardRef(({ className, children, ...props }, ref) => {
4074
+ const { isMobileMenuOpen, setIsMobileMenuOpen } = React14.useContext(NavbarContext);
4075
+ return /* @__PURE__ */ jsx(Dialog$1.Root, { open: isMobileMenuOpen, onOpenChange: setIsMobileMenuOpen, children: /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsxs(
4076
+ Dialog$1.Popup,
2290
4077
  {
2291
4078
  ref,
2292
- className: cnBase(
4079
+ className: cn(
2293
4080
  "fixed inset-0 z-50 bg-gray-50 md:hidden",
2294
4081
  // Position below navbar
2295
4082
  "pt-[calc(var(--navbar-height,60px)+1px)]",
@@ -2299,16 +4086,16 @@ var NavbarMobileMenu = React11.forwardRef(({ className, children, ...props }, re
2299
4086
  ),
2300
4087
  ...props,
2301
4088
  children: [
2302
- /* @__PURE__ */ jsx(Dialog.Title, { className: "sr-only", children: "Navigation menu" }),
4089
+ /* @__PURE__ */ jsx(Dialog$1.Title, { className: "sr-only", children: "Navigation menu" }),
2303
4090
  /* @__PURE__ */ jsx(
2304
4091
  "div",
2305
4092
  {
2306
- className: cnBase(
4093
+ className: cn(
2307
4094
  "flex flex-col",
2308
4095
  // Padding matching navbar
2309
- "px-spacing-component-navbar-padding-x-mobile py-spacing-component-navbar-padding-y-tablet",
4096
+ "px-spatial-component-navbar-padding-x-mobile py-spatial-component-navbar-padding-y-tablet",
2310
4097
  // Gap between links
2311
- "gap-spacing-component-navbar-gap-mobile-menu"
4098
+ "gap-spatial-component-navbar-gap-mobile-menu"
2312
4099
  ),
2313
4100
  children
2314
4101
  }
@@ -2318,8 +4105,8 @@ var NavbarMobileMenu = React11.forwardRef(({ className, children, ...props }, re
2318
4105
  ) }) });
2319
4106
  });
2320
4107
  NavbarMobileMenu.displayName = "NavbarMobileMenu";
2321
- var NavbarMobileMenuButton = React11.forwardRef(({ className, asChild = false, children, ...props }, ref) => {
2322
- const { isMobileMenuOpen, setIsMobileMenuOpen } = React11.useContext(NavbarContext);
4108
+ var NavbarMobileMenuButton = React14.forwardRef(({ className, asChild = false, children, ...props }, ref) => {
4109
+ const { isMobileMenuOpen, setIsMobileMenuOpen } = React14.useContext(NavbarContext);
2323
4110
  const handleClick = () => {
2324
4111
  setIsMobileMenuOpen(!isMobileMenuOpen);
2325
4112
  };
@@ -2347,15 +4134,15 @@ var NavbarMobileMenuButton = React11.forwardRef(({ className, asChild = false, c
2347
4134
  "aria-expanded": isMobileMenuOpen,
2348
4135
  "aria-controls": "navbar-mobile-menu",
2349
4136
  onClick: handleClick,
2350
- className: cnBase("transition-colors", className),
4137
+ className: cn("transition-colors", className),
2351
4138
  ...props,
2352
4139
  children
2353
4140
  }
2354
4141
  );
2355
4142
  });
2356
4143
  NavbarMobileMenuButton.displayName = "NavbarMobileMenuButton";
2357
- var NavbarMobileMenuLink = React11.forwardRef(({ className, asChild = false, active, onClick, ...props }, ref) => {
2358
- const { setIsMobileMenuOpen } = React11.useContext(NavbarContext);
4144
+ var NavbarMobileMenuLink = React14.forwardRef(({ className, asChild = false, active, onClick, ...props }, ref) => {
4145
+ const { setIsMobileMenuOpen } = React14.useContext(NavbarContext);
2359
4146
  const Comp = asChild ? Slot : "a";
2360
4147
  const handleClick = (event) => {
2361
4148
  setIsMobileMenuOpen(false);
@@ -2365,9 +4152,9 @@ var NavbarMobileMenuLink = React11.forwardRef(({ className, asChild = false, act
2365
4152
  Comp,
2366
4153
  {
2367
4154
  ref,
2368
- className: cnBase(
4155
+ className: cn(
2369
4156
  "typography-body-medium font-medium text-gray-900 transition-colors hover:text-gray-700",
2370
- "py-spacing-component-navbar-padding-y-mobile",
4157
+ "py-spatial-component-navbar-padding-y-mobile",
2371
4158
  active && "text-gray-1100",
2372
4159
  className
2373
4160
  ),
@@ -2401,7 +4188,7 @@ var usGovBannerVariants = tv({
2401
4188
  variant: "default"
2402
4189
  }
2403
4190
  });
2404
- var USGovBanner = React11.forwardRef(
4191
+ var USGovBanner = React14.forwardRef(
2405
4192
  ({
2406
4193
  className,
2407
4194
  variant,
@@ -2488,7 +4275,7 @@ var bannerVariants = tv({
2488
4275
  colorScheme: "light"
2489
4276
  }
2490
4277
  });
2491
- var Banner = React11.forwardRef(
4278
+ var Banner = React14.forwardRef(
2492
4279
  ({ className, colorScheme, heading, description, action, ...props }, ref) => {
2493
4280
  return /* @__PURE__ */ jsx(
2494
4281
  "section",
@@ -2499,7 +4286,7 @@ var Banner = React11.forwardRef(
2499
4286
  children: /* @__PURE__ */ jsxs(
2500
4287
  "div",
2501
4288
  {
2502
- className: cnBase(
4289
+ className: cn(
2503
4290
  // Uses primitive spacing tokens
2504
4291
  "flex flex-col md:flex-row gap-20 items-start md:items-center md:justify-between",
2505
4292
  colorScheme === "dark" && "border-t border-gray-700 py-36"
@@ -2509,7 +4296,7 @@ var Banner = React11.forwardRef(
2509
4296
  /* @__PURE__ */ jsx(
2510
4297
  "h2",
2511
4298
  {
2512
- className: cnBase(
4299
+ className: cn(
2513
4300
  "typography-subheading-small",
2514
4301
  colorScheme === "dark" ? "text-gray-100" : "text-gray-900"
2515
4302
  ),
@@ -2519,7 +4306,7 @@ var Banner = React11.forwardRef(
2519
4306
  /* @__PURE__ */ jsx(
2520
4307
  "p",
2521
4308
  {
2522
- className: cnBase(
4309
+ className: cn(
2523
4310
  "typography-body-small",
2524
4311
  colorScheme === "dark" ? "text-gray-500" : "text-gray-800"
2525
4312
  ),
@@ -2555,7 +4342,7 @@ var cardGridVariants = tv({
2555
4342
  variant: "A"
2556
4343
  }
2557
4344
  });
2558
- var CardGrid = React11.forwardRef(
4345
+ var CardGrid = React14.forwardRef(
2559
4346
  ({ className, variant, title, cards, ...props }, ref) => {
2560
4347
  return /* @__PURE__ */ jsxs(
2561
4348
  "section",
@@ -2567,7 +4354,7 @@ var CardGrid = React11.forwardRef(
2567
4354
  /* @__PURE__ */ jsx(
2568
4355
  "h2",
2569
4356
  {
2570
- className: cnBase(
4357
+ className: cn(
2571
4358
  "col-full",
2572
4359
  "typography-h4 text-gray-900",
2573
4360
  // Gap after title: mobile default, md: 56px, lg: 64px
@@ -2579,7 +4366,7 @@ var CardGrid = React11.forwardRef(
2579
4366
  /* @__PURE__ */ jsx(
2580
4367
  "div",
2581
4368
  {
2582
- className: cnBase(
4369
+ className: cn(
2583
4370
  "col-full",
2584
4371
  // Mobile: single column
2585
4372
  "grid grid-cols-1 gap-20",
@@ -2588,7 +4375,7 @@ var CardGrid = React11.forwardRef(
2588
4375
  // Desktop: 3 columns for variant A, 2 columns for variant B
2589
4376
  variant === "A" && "lg:grid-cols-3"
2590
4377
  ),
2591
- children: React11.Children.toArray(cards).map((card) => /* @__PURE__ */ jsx("div", { children: card }, card.key))
4378
+ children: React14.Children.toArray(cards).map((card) => /* @__PURE__ */ jsx("div", { children: card }, card.key))
2592
4379
  }
2593
4380
  )
2594
4381
  ]
@@ -2623,7 +4410,7 @@ var twoColumnSectionVariants = tv({
2623
4410
  layout: "asymmetric"
2624
4411
  }
2625
4412
  });
2626
- var TwoColumnSection = React11.forwardRef(
4413
+ var TwoColumnSection = React14.forwardRef(
2627
4414
  ({
2628
4415
  className,
2629
4416
  colorScheme = "dark",
@@ -2646,7 +4433,7 @@ var TwoColumnSection = React11.forwardRef(
2646
4433
  children: /* @__PURE__ */ jsxs(
2647
4434
  "div",
2648
4435
  {
2649
- className: cnBase(
4436
+ className: cn(
2650
4437
  "border-t pt-36",
2651
4438
  colorScheme === "dark" ? "border-gray-700" : "border-gray-300",
2652
4439
  // Grid layout - uses primitive spacing tokens
@@ -2657,7 +4444,7 @@ var TwoColumnSection = React11.forwardRef(
2657
4444
  /* @__PURE__ */ jsx(
2658
4445
  "h2",
2659
4446
  {
2660
- className: cnBase(
4447
+ className: cn(
2661
4448
  "typography-subheading-medium",
2662
4449
  colorScheme === "dark" ? "text-gray-100" : "text-gray-900",
2663
4450
  // Column span based on layout
@@ -2669,7 +4456,7 @@ var TwoColumnSection = React11.forwardRef(
2669
4456
  /* @__PURE__ */ jsxs(
2670
4457
  "div",
2671
4458
  {
2672
- className: cnBase(
4459
+ className: cn(
2673
4460
  "flex flex-col gap-56",
2674
4461
  layout !== "equal" && "lg:col-span-15"
2675
4462
  ),
@@ -2677,7 +4464,7 @@ var TwoColumnSection = React11.forwardRef(
2677
4464
  lead && /* @__PURE__ */ jsx(
2678
4465
  "div",
2679
4466
  {
2680
- className: cnBase(
4467
+ className: cn(
2681
4468
  "typography-body-large",
2682
4469
  colorScheme === "dark" ? "text-gray-100" : "text-gray-900"
2683
4470
  ),
@@ -2687,7 +4474,7 @@ var TwoColumnSection = React11.forwardRef(
2687
4474
  /* @__PURE__ */ jsx(
2688
4475
  "div",
2689
4476
  {
2690
- className: cnBase(
4477
+ className: cn(
2691
4478
  "typography-body-medium flex flex-col gap-[1em]",
2692
4479
  colorScheme === "dark" ? "text-gray-400" : "text-gray-600"
2693
4480
  ),
@@ -2705,7 +4492,7 @@ var TwoColumnSection = React11.forwardRef(
2705
4492
  }
2706
4493
  );
2707
4494
  TwoColumnSection.displayName = "TwoColumnSection";
2708
- var FaqSection = React11.forwardRef(
4495
+ var FaqSection = React14.forwardRef(
2709
4496
  ({
2710
4497
  className,
2711
4498
  colorScheme = "light",
@@ -2721,7 +4508,7 @@ var FaqSection = React11.forwardRef(
2721
4508
  colorScheme,
2722
4509
  layout: layout ?? void 0,
2723
4510
  title,
2724
- className: cnBase(
4511
+ className: cn(
2725
4512
  // Override title typography to be larger
2726
4513
  "[&_h2]:typography-h4",
2727
4514
  // Accordion typography overrides
@@ -2795,7 +4582,7 @@ var heroContentVariants = tv({
2795
4582
  "lg:p-72"
2796
4583
  ]
2797
4584
  });
2798
- var HeroHeader = React11.forwardRef(
4585
+ var HeroHeader = React14.forwardRef(
2799
4586
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2800
4587
  "div",
2801
4588
  {
@@ -2806,7 +4593,7 @@ var HeroHeader = React11.forwardRef(
2806
4593
  )
2807
4594
  );
2808
4595
  HeroHeader.displayName = "Hero.Header";
2809
- var HeroContent = React11.forwardRef(
4596
+ var HeroContent = React14.forwardRef(
2810
4597
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2811
4598
  "div",
2812
4599
  {
@@ -2820,7 +4607,7 @@ HeroContent.displayName = "Hero.Content";
2820
4607
  function isColorString(background) {
2821
4608
  return typeof background === "string" && (background.startsWith("#") || background.startsWith("rgb") || background.startsWith("hsl") || /^(var\(|[a-z]+$)/i.test(background));
2822
4609
  }
2823
- var Hero = React11.forwardRef(
4610
+ var Hero = React14.forwardRef(
2824
4611
  ({
2825
4612
  className,
2826
4613
  children,
@@ -2881,13 +4668,13 @@ var Hero = React11.forwardRef(
2881
4668
  Hero.displayName = "Hero";
2882
4669
  Hero.Header = HeroHeader;
2883
4670
  Hero.Content = HeroContent;
2884
- var Prose = React11.forwardRef(
4671
+ var Prose = React14.forwardRef(
2885
4672
  ({ className, children, ...props }, ref) => {
2886
4673
  return /* @__PURE__ */ jsx(
2887
4674
  "div",
2888
4675
  {
2889
4676
  ref,
2890
- className: cnBase(
4677
+ className: cn(
2891
4678
  "flex w-full max-w-[700px] flex-col overflow-hidden",
2892
4679
  // Responsive gap between sections
2893
4680
  "gap-56 md:gap-72 xl:gap-96",
@@ -2900,7 +4687,7 @@ var Prose = React11.forwardRef(
2900
4687
  }
2901
4688
  );
2902
4689
  Prose.displayName = "Prose";
2903
- var ProseSection = React11.forwardRef(
4690
+ var ProseSection = React14.forwardRef(
2904
4691
  ({ className, heading, as = "h2", children, ...props }, ref) => {
2905
4692
  const Heading = as;
2906
4693
  const headingClass = as === "h2" ? "typography-h3" : "typography-h4";
@@ -2908,7 +4695,7 @@ var ProseSection = React11.forwardRef(
2908
4695
  "section",
2909
4696
  {
2910
4697
  ref,
2911
- className: cnBase(
4698
+ className: cn(
2912
4699
  "flex w-full flex-col",
2913
4700
  // Responsive gap between heading and body
2914
4701
  "gap-24 md:gap-40",
@@ -2916,7 +4703,7 @@ var ProseSection = React11.forwardRef(
2916
4703
  ),
2917
4704
  ...props,
2918
4705
  children: [
2919
- /* @__PURE__ */ jsx(Heading, { className: cnBase(headingClass, "text-gray-900"), children: heading }),
4706
+ /* @__PURE__ */ jsx(Heading, { className: cn(headingClass, "text-gray-900"), children: heading }),
2920
4707
  /* @__PURE__ */ jsx("div", { className: "typography-body-medium flex flex-col gap-[1em] text-gray-800 break-words", children })
2921
4708
  ]
2922
4709
  }
@@ -2969,7 +4756,7 @@ var quoteBlockVariants = tv({
2969
4756
  size: "default"
2970
4757
  }
2971
4758
  });
2972
- var QuoteBlock = React11.forwardRef(
4759
+ var QuoteBlock = React14.forwardRef(
2973
4760
  ({
2974
4761
  className,
2975
4762
  quote,
@@ -3067,7 +4854,7 @@ var riverVariants = tv({
3067
4854
  variant: "A"
3068
4855
  }
3069
4856
  });
3070
- var River = React11.forwardRef(
4857
+ var River = React14.forwardRef(
3071
4858
  ({
3072
4859
  className,
3073
4860
  variant,
@@ -3081,7 +4868,7 @@ var River = React11.forwardRef(
3081
4868
  const contentColumn = /* @__PURE__ */ jsxs(
3082
4869
  "div",
3083
4870
  {
3084
- className: cnBase(
4871
+ className: cn(
3085
4872
  "flex flex-col",
3086
4873
  // Full width on mobile/tablet, 9 cols on desktop
3087
4874
  "lg:col-span-9"
@@ -3094,7 +4881,7 @@ var River = React11.forwardRef(
3094
4881
  /* @__PURE__ */ jsxs(
3095
4882
  "div",
3096
4883
  {
3097
- className: cnBase("flex flex-row gap-16 mt-36", "[&>*]:flex-shrink-0"),
4884
+ className: cn("flex flex-row gap-16 mt-36", "[&>*]:flex-shrink-0"),
3098
4885
  children: [
3099
4886
  primaryAction,
3100
4887
  secondaryAction
@@ -3107,7 +4894,7 @@ var River = React11.forwardRef(
3107
4894
  const mediaColumn = /* @__PURE__ */ jsx(
3108
4895
  "div",
3109
4896
  {
3110
- className: cnBase(
4897
+ className: cn(
3111
4898
  // Full width on mobile/tablet, 15 cols on desktop
3112
4899
  "lg:col-span-15",
3113
4900
  // Ensure media fills the container
@@ -3125,7 +4912,7 @@ var River = React11.forwardRef(
3125
4912
  children: /* @__PURE__ */ jsx(
3126
4913
  "div",
3127
4914
  {
3128
- className: cnBase("grid grid-cols-1 gap-36", "lg:grid-cols-24 lg:gap-36"),
4915
+ className: cn("grid grid-cols-1 gap-36", "lg:grid-cols-24 lg:gap-36"),
3129
4916
  children: variant === "B" ? /* @__PURE__ */ jsxs(Fragment, { children: [
3130
4917
  mediaColumn,
3131
4918
  contentColumn
@@ -3164,7 +4951,7 @@ var toutVariants = tv({
3164
4951
  align: "left"
3165
4952
  }
3166
4953
  });
3167
- var Tout = React11.forwardRef(
4954
+ var Tout = React14.forwardRef(
3168
4955
  ({
3169
4956
  className,
3170
4957
  colorScheme = "light",
@@ -3204,7 +4991,7 @@ var Tout = React11.forwardRef(
3204
4991
  /* @__PURE__ */ jsx(
3205
4992
  "div",
3206
4993
  {
3207
- className: cnBase(
4994
+ className: cn(
3208
4995
  // Position above background
3209
4996
  "relative z-10",
3210
4997
  // Grid setup with responsive columns
@@ -3235,7 +5022,7 @@ var Tout = React11.forwardRef(
3235
5022
  children: /* @__PURE__ */ jsxs(
3236
5023
  "div",
3237
5024
  {
3238
- className: cnBase(
5025
+ className: cn(
3239
5026
  // Flex container for content
3240
5027
  "flex flex-col",
3241
5028
  isCentered ? "justify-start items-center" : "justify-end",
@@ -3250,7 +5037,7 @@ var Tout = React11.forwardRef(
3250
5037
  /* @__PURE__ */ jsxs(
3251
5038
  "div",
3252
5039
  {
3253
- className: cnBase(
5040
+ className: cn(
3254
5041
  "flex flex-col gap-16",
3255
5042
  isCentered && "items-center text-center"
3256
5043
  ),
@@ -3258,7 +5045,7 @@ var Tout = React11.forwardRef(
3258
5045
  /* @__PURE__ */ jsx(
3259
5046
  "h2",
3260
5047
  {
3261
- className: cnBase(
5048
+ className: cn(
3262
5049
  "typography-h4",
3263
5050
  isDark ? "text-gray-100" : "text-gray-900"
3264
5051
  ),
@@ -3271,7 +5058,7 @@ var Tout = React11.forwardRef(
3271
5058
  body && /* @__PURE__ */ jsx(
3272
5059
  "p",
3273
5060
  {
3274
- className: cnBase(
5061
+ className: cn(
3275
5062
  "typography-body-small",
3276
5063
  isDark ? "text-gray-400" : "text-gray-800"
3277
5064
  ),
@@ -3287,7 +5074,7 @@ var Tout = React11.forwardRef(
3287
5074
  /* @__PURE__ */ jsxs(
3288
5075
  "div",
3289
5076
  {
3290
- className: cnBase(
5077
+ className: cn(
3291
5078
  "flex flex-row",
3292
5079
  isCentered ? "justify-center" : "items-start",
3293
5080
  // Responsive gap between buttons
@@ -3312,6 +5099,90 @@ var Tout = React11.forwardRef(
3312
5099
  }
3313
5100
  );
3314
5101
  Tout.displayName = "Tout";
5102
+ var BREAKPOINTS = {
5103
+ sm: 320,
5104
+ md: 768,
5105
+ lg: 1440
5106
+ };
5107
+ function getCurrentBreakpoint(width) {
5108
+ if (width >= BREAKPOINTS.lg) return "lg";
5109
+ if (width >= BREAKPOINTS.md) return "md";
5110
+ return "sm";
5111
+ }
5112
+ function useBreakpoint() {
5113
+ const [breakpoint, setBreakpoint] = React14.useState(() => {
5114
+ if (typeof window === "undefined") return "sm";
5115
+ return getCurrentBreakpoint(window.innerWidth);
5116
+ });
5117
+ React14.useEffect(() => {
5118
+ const handleResize = () => {
5119
+ setBreakpoint(getCurrentBreakpoint(window.innerWidth));
5120
+ };
5121
+ handleResize();
5122
+ window.addEventListener("resize", handleResize);
5123
+ return () => window.removeEventListener("resize", handleResize);
5124
+ }, []);
5125
+ return breakpoint;
5126
+ }
5127
+ function useMinBreakpoint(breakpoint) {
5128
+ const [matches, setMatches] = React14.useState(() => {
5129
+ if (typeof window === "undefined") return false;
5130
+ return window.innerWidth >= BREAKPOINTS[breakpoint];
5131
+ });
5132
+ React14.useEffect(() => {
5133
+ const mediaQuery = window.matchMedia(
5134
+ `(min-width: ${BREAKPOINTS[breakpoint]}px)`
5135
+ );
5136
+ setMatches(mediaQuery.matches);
5137
+ const handleChange = (event) => {
5138
+ setMatches(event.matches);
5139
+ };
5140
+ mediaQuery.addEventListener("change", handleChange);
5141
+ return () => mediaQuery.removeEventListener("change", handleChange);
5142
+ }, [breakpoint]);
5143
+ return matches;
5144
+ }
5145
+ function useMaxBreakpoint(breakpoint) {
5146
+ const [matches, setMatches] = React14.useState(() => {
5147
+ if (typeof window === "undefined") return false;
5148
+ return window.innerWidth < BREAKPOINTS[breakpoint];
5149
+ });
5150
+ React14.useEffect(() => {
5151
+ const mediaQuery = window.matchMedia(
5152
+ `(max-width: ${BREAKPOINTS[breakpoint] - 1}px)`
5153
+ );
5154
+ setMatches(mediaQuery.matches);
5155
+ const handleChange = (event) => {
5156
+ setMatches(event.matches);
5157
+ };
5158
+ mediaQuery.addEventListener("change", handleChange);
5159
+ return () => mediaQuery.removeEventListener("change", handleChange);
5160
+ }, [breakpoint]);
5161
+ return matches;
5162
+ }
5163
+ function useEventListener(eventName, handler, element, options) {
5164
+ const savedHandler = React14.useRef(handler);
5165
+ React14.useLayoutEffect(() => {
5166
+ savedHandler.current = handler;
5167
+ }, [handler]);
5168
+ React14.useEffect(() => {
5169
+ const targetElement = element ?? window;
5170
+ if (!targetElement?.addEventListener) {
5171
+ return;
5172
+ }
5173
+ const eventListener = (event) => {
5174
+ savedHandler.current(event);
5175
+ };
5176
+ targetElement.addEventListener(eventName, eventListener, options);
5177
+ return () => {
5178
+ targetElement.removeEventListener(
5179
+ eventName,
5180
+ eventListener,
5181
+ options
5182
+ );
5183
+ };
5184
+ }, [eventName, element, options]);
5185
+ }
3315
5186
 
3316
5187
  // ../tokens/dist/collections/types.js
3317
5188
  function isColorValue(value) {
@@ -3588,6 +5459,70 @@ var baseColorTokens = {
3588
5459
  $type: "color",
3589
5460
  $value: "{primitive.color.blue.v250}"
3590
5461
  }
5462
+ },
5463
+ // Video Player tokens (color-video-player-*)
5464
+ // Used for fullscreen video modal, controls, and captions
5465
+ "video-player": {
5466
+ "controls-bg": {
5467
+ $type: "color",
5468
+ $value: "{primitive.color.alpha-black.40}",
5469
+ $description: "Video controls bar background (glassmorphic)"
5470
+ },
5471
+ "controls-text": {
5472
+ $type: "color",
5473
+ $value: "{primitive.color.white}",
5474
+ $description: "Video controls text and icons"
5475
+ },
5476
+ "controls-hover": {
5477
+ $type: "color",
5478
+ $value: "{primitive.color.alpha-white.20}",
5479
+ $description: "Video controls hover state"
5480
+ },
5481
+ "button-bg": {
5482
+ $type: "color",
5483
+ $value: "{primitive.color.alpha-white.10}",
5484
+ $description: "Control button background (visible on dark video)"
5485
+ },
5486
+ "button-bg-hover": {
5487
+ $type: "color",
5488
+ $value: "{primitive.color.alpha-white.20}",
5489
+ $description: "Control button hover background"
5490
+ },
5491
+ "button-bg-active": {
5492
+ $type: "color",
5493
+ $value: "{primitive.color.alpha-white.30}",
5494
+ $description: "Control button active/pressed background"
5495
+ },
5496
+ "caption-bg": {
5497
+ $type: "color",
5498
+ $value: "{primitive.color.alpha-black.70}",
5499
+ $description: "Caption background overlay"
5500
+ },
5501
+ "caption-text": {
5502
+ $type: "color",
5503
+ $value: "{primitive.color.white}",
5504
+ $description: "Caption text color"
5505
+ },
5506
+ "backdrop-overlay": {
5507
+ $type: "color",
5508
+ $value: "{primitive.color.alpha-black.90}",
5509
+ $description: "Modal backdrop overlay"
5510
+ },
5511
+ "progress-bg": {
5512
+ $type: "color",
5513
+ $value: "{primitive.color.alpha-white.30}",
5514
+ $description: "Progress bar track background"
5515
+ },
5516
+ "progress-fill": {
5517
+ $type: "color",
5518
+ $value: "{primitive.color.white}",
5519
+ $description: "Progress bar fill color"
5520
+ },
5521
+ "tooltip-bg": {
5522
+ $type: "color",
5523
+ $value: "{primitive.color.alpha-black.90}",
5524
+ $description: "Video tooltip background"
5525
+ }
3591
5526
  }
3592
5527
  }
3593
5528
  }
@@ -6119,6 +8054,59 @@ var baseSpatialTokens = {
6119
8054
  $description: "Gap in mobile menu items"
6120
8055
  }
6121
8056
  }
8057
+ },
8058
+ /**
8059
+ * Video Player Spacing Tokens
8060
+ *
8061
+ * Spacing for video player controls, captions, and overlays.
8062
+ */
8063
+ "video-player": {
8064
+ controls: {
8065
+ height: {
8066
+ $type: "dimension",
8067
+ $value: "{primitive.spacing.48}",
8068
+ $description: "Height of video player controls bar"
8069
+ },
8070
+ padding: {
8071
+ $type: "dimension",
8072
+ $value: "{primitive.spacing.16}",
8073
+ $description: "Padding inside controls bar"
8074
+ },
8075
+ gap: {
8076
+ $type: "dimension",
8077
+ $value: "{primitive.spacing.12}",
8078
+ $description: "Gap between control buttons"
8079
+ }
8080
+ },
8081
+ caption: {
8082
+ "padding-x": {
8083
+ $type: "dimension",
8084
+ $value: "{primitive.spacing.16}",
8085
+ $description: "Horizontal padding for caption text"
8086
+ },
8087
+ "padding-y": {
8088
+ $type: "dimension",
8089
+ $value: "{primitive.spacing.8}",
8090
+ $description: "Vertical padding for caption text"
8091
+ },
8092
+ "offset-bottom": {
8093
+ $type: "dimension",
8094
+ $value: "{primitive.spacing.64}",
8095
+ $description: "Distance from bottom of video to caption"
8096
+ }
8097
+ },
8098
+ "close-button": {
8099
+ size: {
8100
+ $type: "dimension",
8101
+ $value: "{primitive.spacing.40}",
8102
+ $description: "Size of close button"
8103
+ },
8104
+ offset: {
8105
+ $type: "dimension",
8106
+ $value: "{primitive.spacing.16}",
8107
+ $description: "Offset from top-right corner"
8108
+ }
8109
+ }
6122
8110
  }
6123
8111
  },
6124
8112
  /**
@@ -7282,6 +9270,6 @@ function filterCSSVars(cssVars, prefix) {
7282
9270
  return result;
7283
9271
  }
7284
9272
 
7285
- export { Accordion, AccordionItem, BackgroundCompound as Background, BackgroundGradient, BackgroundImage, BackgroundOverlay, BackgroundStream, BackgroundVideo, Banner, Button, Card, CardActions, CardBody, CardContent, CardDescription, CardEyebrow, CardGrid, CardImage, CardTitle, DEFAULT_TITLE_TYPOGRAPHY, DevToolbar, FONT_SIZES, FaqSection, GridOverlay, Hero, BackgroundCompound as HeroBackground, BackgroundImage as HeroBackgroundImage, BackgroundStream as HeroBackgroundStream, BackgroundVideo as HeroBackgroundVideo, HeroContent, BackgroundGradient as HeroGradient, HeroHeader, BackgroundOverlay as HeroOverlay, IconButton, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Navbar, NavbarActions, NavbarBrand, NavbarLink, NavbarLinks, NavbarMobileMenu, NavbarMobileMenuButton, NavbarMobileMenuLink, NdstudioFooter, PagerControl, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverParts, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, Prose, ProseSection, QuoteBlock, River, Select, SelectGroup, SelectGroupLabel, SelectOption, SelectPopup, SelectRoot, SelectTrigger, ThemeProvider, Tooltip, TooltipArrow, TooltipParts, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipRoot, TooltipTrigger, Tout, TwoColumnSection, USGovBanner, applyTheme, backgroundGradientVariants, backgroundImageVariants, backgroundOverlayVariants, backgroundStreamVariants, backgroundVariants, backgroundVideoVariants, bannerVariants, buttonThemeToStyleVars, buttonVariants, cardGridVariants, cardVariants, createThemeStyle, filterCSSVars, fontSizeToClass, getToken, heroContentVariants, heroHeaderVariants, heroVariants, iconButtonVariants, inputGroupAddonVariants, inputGroupVariants, inputVariants, mergeCSSVars, pagerControlVariants, popoverArrowVariants, popoverPopupVariants, quoteBlockVariants, removeTheme, responsiveTypographyClass, riverVariants, selectOptionVariants, selectPopupVariants, selectTriggerVariants, themeToStyleVars, toCSSVars, tooltipArrowVariants, tooltipPopupVariants, twoColumnSectionVariants, useCSSVars, useTheme, useThemeTokens };
9273
+ export { Accordion, AccordionItem, BLUR_AMOUNTS, BREAKPOINTS, BackgroundCompound as Background, BackgroundGradient, BackgroundImage, BackgroundOverlay, BackgroundStream, BackgroundVideo, Banner, BlurredVideoBackdrop, Button, CaptionOverlay, Card, CardActions, CardBody, CardContent, CardDescription, CardEyebrow, CardGrid, CardImage, CardTitle, DEFAULT_TITLE_TYPOGRAPHY, DevToolbar, Dialog, DialogBackdrop, DialogBody, DialogClose, DialogDescription, DialogFooter, DialogParts, DialogPopup, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, FONT_SIZES, FaqSection, GridOverlay, Hero, BackgroundCompound as HeroBackground, BackgroundImage as HeroBackgroundImage, BackgroundStream as HeroBackgroundStream, BackgroundVideo as HeroBackgroundVideo, HeroContent, BackgroundGradient as HeroGradient, HeroHeader, BackgroundOverlay as HeroOverlay, IconButton, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Navbar, NavbarActions, NavbarBrand, NavbarLink, NavbarLinks, NavbarMobileMenu, NavbarMobileMenuButton, NavbarMobileMenuLink, NdstudioFooter, PagerControl, Popover, PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverParts, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, Prose, ProseSection, QuoteBlock, River, Select, SelectGroup, SelectGroupLabel, SelectOption, SelectPopup, SelectRoot, SelectTrigger, ThemeProvider, Tooltip, TooltipArrow, TooltipParts, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipRoot, TooltipTrigger, Tout, TwoColumnSection, USGovBanner, VideoDialog, VideoPlayer, VideoWithBackdrop, VideoWithBackdropBackdrop, VideoWithBackdropContent, VideoWithBackdropParts, VideoWithBackdropRoot, VideoWithBackdropVideo, applyTheme, backgroundGradientVariants, backgroundImageVariants, backgroundOverlayVariants, backgroundStreamVariants, backgroundVariants, backgroundVideoVariants, bannerVariants, blurredVideoBackdropVariants, buttonThemeToStyleVars, buttonVariants, canvasVariants, captionOverlayVariants, cardGridVariants, cardVariants, closeButtonVariants, cn, controlBarVariants, controlButtonVariants, createThemeStyle, dialogBackdropVariants, dialogPopupVariants, filterCSSVars, fontSizeToClass, getToken, gradientOverlayVariants, heroContentVariants, heroHeaderVariants, heroVariants, iconButtonVariants, inputGroupAddonVariants, inputGroupVariants, inputVariants, loadingOverlayVariants, mediaControllerVariants, mergeCSSVars, pagerControlVariants, popoverArrowVariants, popoverPopupVariants, quoteBlockVariants, removeTheme, responsiveTypographyClass, riverVariants, selectOptionVariants, selectPopupVariants, selectTriggerVariants, themeToStyleVars, toCSSVars, tooltipArrowVariants, tooltipPopupVariants, twoColumnSectionVariants, useBreakpoint, useCSSVars, useCanvasBlur, useCaptions, useEventListener, useMaxBreakpoint, useMinBreakpoint, useTheme, useThemeTokens, useVideoKeyboard, videoContainerVariants, videoDialogVariants, videoPlayerVariants, videoWithBackdropVariants };
7286
9274
  //# sourceMappingURL=index.js.map
7287
9275
  //# sourceMappingURL=index.js.map