@nationaldesignstudio/react 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-registry.md +1286 -40
- package/dist/index.d.ts +1858 -139
- package/dist/index.js +2388 -326
- package/dist/index.js.map +1 -1
- package/dist/tokens.css +680 -0
- package/package.json +22 -2
- package/src/components/atoms/blurred-video-backdrop/blurred-video-backdrop.tsx +447 -0
- package/src/components/atoms/button/icon-button.tsx +10 -4
- package/src/components/atoms/select/select.tsx +202 -49
- package/src/components/atoms/video-player/caption-overlay.tsx +107 -0
- package/src/components/atoms/video-player/video-player.tsx +811 -0
- package/src/components/molecules/dialog/dialog.tsx +526 -0
- package/src/components/molecules/video-dialog/video-dialog.tsx +272 -0
- package/src/components/molecules/video-with-backdrop/video-with-backdrop.tsx +383 -0
- package/src/components/organisms/card/card.tsx +87 -12
- package/src/components/sections/hero/hero.tsx +35 -0
- package/src/hooks/index.ts +16 -0
- package/src/hooks/use-breakpoint.ts +145 -0
- package/src/hooks/use-captions.ts +247 -0
- package/src/hooks/use-video-keyboard.ts +230 -0
- package/src/lib/utils.ts +2 -2
- package/src/theme/index.ts +4 -0
- package/src/theme/theme-provider.tsx +48 -8
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ import { ButtonProps as ButtonProps$1 } from '@base-ui-components/react/button';
|
|
|
10
10
|
import { Popover as Popover$1 } from '@base-ui-components/react/popover';
|
|
11
11
|
import { Select as Select$1 } from '@base-ui-components/react/select';
|
|
12
12
|
import { Tooltip as Tooltip$1 } from '@base-ui-components/react/tooltip';
|
|
13
|
+
import { Dialog as Dialog$1 } from '@base-ui-components/react/dialog';
|
|
13
14
|
import { ClassValue } from 'clsx';
|
|
14
|
-
import { CSSVariableMap, NestedStringRecord, ColorThemeName, SurfaceThemeName } from '@nds-design-system/tokens';
|
|
15
|
+
import { CSSVariableMap, NestedStringRecord, ColorThemeName, SurfaceThemeName, ResolvedProjectTheme } from '@nds-design-system/tokens';
|
|
15
16
|
|
|
16
17
|
declare const accordionVariants: tailwind_variants.TVReturnType<{
|
|
17
18
|
colorScheme: {
|
|
@@ -244,6 +245,233 @@ declare const BackgroundCompound: React$1.ForwardRefExoticComponent<BackgroundPr
|
|
|
244
245
|
Gradient: React$1.ForwardRefExoticComponent<BackgroundGradientProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
245
246
|
};
|
|
246
247
|
|
|
248
|
+
type BlurIntensity = "low" | "medium" | "high" | "extreme";
|
|
249
|
+
type OverlayType = "none" | "vignette" | "top-bottom";
|
|
250
|
+
/**
|
|
251
|
+
* Blurred video backdrop wrapper variants.
|
|
252
|
+
*
|
|
253
|
+
* The wrapper extends beyond its bounds (inset: -120px) to cover
|
|
254
|
+
* blur artifacts at the edges.
|
|
255
|
+
*/
|
|
256
|
+
declare const blurredVideoBackdropVariants: tailwind_variants.TVReturnType<{
|
|
257
|
+
/**
|
|
258
|
+
* Blur intensity level.
|
|
259
|
+
* Higher values provide more diffused backgrounds.
|
|
260
|
+
*/
|
|
261
|
+
blur: {
|
|
262
|
+
low: string;
|
|
263
|
+
medium: string;
|
|
264
|
+
high: string;
|
|
265
|
+
extreme: string;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Gradient overlay for visual depth.
|
|
269
|
+
*/
|
|
270
|
+
overlay: {
|
|
271
|
+
none: string;
|
|
272
|
+
vignette: string;
|
|
273
|
+
"top-bottom": string;
|
|
274
|
+
};
|
|
275
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
276
|
+
/**
|
|
277
|
+
* Blur intensity level.
|
|
278
|
+
* Higher values provide more diffused backgrounds.
|
|
279
|
+
*/
|
|
280
|
+
blur: {
|
|
281
|
+
low: string;
|
|
282
|
+
medium: string;
|
|
283
|
+
high: string;
|
|
284
|
+
extreme: string;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Gradient overlay for visual depth.
|
|
288
|
+
*/
|
|
289
|
+
overlay: {
|
|
290
|
+
none: string;
|
|
291
|
+
vignette: string;
|
|
292
|
+
"top-bottom": string;
|
|
293
|
+
};
|
|
294
|
+
}, {
|
|
295
|
+
/**
|
|
296
|
+
* Blur intensity level.
|
|
297
|
+
* Higher values provide more diffused backgrounds.
|
|
298
|
+
*/
|
|
299
|
+
blur: {
|
|
300
|
+
low: string;
|
|
301
|
+
medium: string;
|
|
302
|
+
high: string;
|
|
303
|
+
extreme: string;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Gradient overlay for visual depth.
|
|
307
|
+
*/
|
|
308
|
+
overlay: {
|
|
309
|
+
none: string;
|
|
310
|
+
vignette: string;
|
|
311
|
+
"top-bottom": string;
|
|
312
|
+
};
|
|
313
|
+
}>, {
|
|
314
|
+
/**
|
|
315
|
+
* Blur intensity level.
|
|
316
|
+
* Higher values provide more diffused backgrounds.
|
|
317
|
+
*/
|
|
318
|
+
blur: {
|
|
319
|
+
low: string;
|
|
320
|
+
medium: string;
|
|
321
|
+
high: string;
|
|
322
|
+
extreme: string;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Gradient overlay for visual depth.
|
|
326
|
+
*/
|
|
327
|
+
overlay: {
|
|
328
|
+
none: string;
|
|
329
|
+
vignette: string;
|
|
330
|
+
"top-bottom": string;
|
|
331
|
+
};
|
|
332
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
333
|
+
/**
|
|
334
|
+
* Blur intensity level.
|
|
335
|
+
* Higher values provide more diffused backgrounds.
|
|
336
|
+
*/
|
|
337
|
+
blur: {
|
|
338
|
+
low: string;
|
|
339
|
+
medium: string;
|
|
340
|
+
high: string;
|
|
341
|
+
extreme: string;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Gradient overlay for visual depth.
|
|
345
|
+
*/
|
|
346
|
+
overlay: {
|
|
347
|
+
none: string;
|
|
348
|
+
vignette: string;
|
|
349
|
+
"top-bottom": string;
|
|
350
|
+
};
|
|
351
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
352
|
+
/**
|
|
353
|
+
* Blur intensity level.
|
|
354
|
+
* Higher values provide more diffused backgrounds.
|
|
355
|
+
*/
|
|
356
|
+
blur: {
|
|
357
|
+
low: string;
|
|
358
|
+
medium: string;
|
|
359
|
+
high: string;
|
|
360
|
+
extreme: string;
|
|
361
|
+
};
|
|
362
|
+
/**
|
|
363
|
+
* Gradient overlay for visual depth.
|
|
364
|
+
*/
|
|
365
|
+
overlay: {
|
|
366
|
+
none: string;
|
|
367
|
+
vignette: string;
|
|
368
|
+
"top-bottom": string;
|
|
369
|
+
};
|
|
370
|
+
}, {
|
|
371
|
+
/**
|
|
372
|
+
* Blur intensity level.
|
|
373
|
+
* Higher values provide more diffused backgrounds.
|
|
374
|
+
*/
|
|
375
|
+
blur: {
|
|
376
|
+
low: string;
|
|
377
|
+
medium: string;
|
|
378
|
+
high: string;
|
|
379
|
+
extreme: string;
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Gradient overlay for visual depth.
|
|
383
|
+
*/
|
|
384
|
+
overlay: {
|
|
385
|
+
none: string;
|
|
386
|
+
vignette: string;
|
|
387
|
+
"top-bottom": string;
|
|
388
|
+
};
|
|
389
|
+
}>, unknown, unknown, undefined>>;
|
|
390
|
+
/**
|
|
391
|
+
* Canvas element styles.
|
|
392
|
+
*/
|
|
393
|
+
declare const canvasVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
394
|
+
/**
|
|
395
|
+
* Gradient overlay base styles.
|
|
396
|
+
* Gradient backgrounds are applied via inline styles to avoid arbitrary values.
|
|
397
|
+
*/
|
|
398
|
+
declare const gradientOverlayVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
399
|
+
declare const BLUR_AMOUNTS: Record<BlurIntensity, number>;
|
|
400
|
+
interface UseCanvasBlurOptions {
|
|
401
|
+
/** Ref to the source video element */
|
|
402
|
+
videoRef: React$1.RefObject<HTMLVideoElement | null>;
|
|
403
|
+
/** Blur amount in pixels */
|
|
404
|
+
blurAmount: number;
|
|
405
|
+
/** Whether rendering is enabled */
|
|
406
|
+
enabled?: boolean;
|
|
407
|
+
/** Target FPS (lower = better performance, default: 30) */
|
|
408
|
+
targetFps?: number;
|
|
409
|
+
/** Canvas scale factor (lower = better performance, default: 0.5) */
|
|
410
|
+
scale?: number;
|
|
411
|
+
}
|
|
412
|
+
interface UseCanvasBlurReturn {
|
|
413
|
+
/** Ref to attach to the canvas element */
|
|
414
|
+
canvasRef: React$1.RefObject<HTMLCanvasElement | null>;
|
|
415
|
+
/** Whether the canvas is currently rendering */
|
|
416
|
+
isRendering: boolean;
|
|
417
|
+
/** Performance metrics */
|
|
418
|
+
metrics: {
|
|
419
|
+
fps: number;
|
|
420
|
+
frameTime: number;
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Hook for rendering a blurred video to canvas.
|
|
425
|
+
*
|
|
426
|
+
* Performance optimizations:
|
|
427
|
+
* - Renders at reduced resolution (scale factor)
|
|
428
|
+
* - Throttled to target FPS
|
|
429
|
+
* - Uses CSS scale to fill container
|
|
430
|
+
* - Single video decoder (no sync needed)
|
|
431
|
+
*/
|
|
432
|
+
declare function useCanvasBlur({ videoRef, blurAmount, enabled, targetFps, scale, }: UseCanvasBlurOptions): UseCanvasBlurReturn;
|
|
433
|
+
interface BlurredVideoBackdropProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children">, VariantProps<typeof blurredVideoBackdropVariants> {
|
|
434
|
+
/** Ref to the primary video element to create backdrop from (required) */
|
|
435
|
+
videoRef: React$1.RefObject<HTMLVideoElement | null>;
|
|
436
|
+
/** Opacity of the backdrop (0-1, default: 0.6) */
|
|
437
|
+
opacity?: number;
|
|
438
|
+
/** Extension amount in pixels to cover blur artifacts (default: 120) */
|
|
439
|
+
extension?: number;
|
|
440
|
+
/** Target FPS for canvas rendering (default: 30) */
|
|
441
|
+
targetFps?: number;
|
|
442
|
+
/** Canvas scale factor - lower = better performance (default: 0.5) */
|
|
443
|
+
scale?: number;
|
|
444
|
+
/** Whether to show debug metrics */
|
|
445
|
+
showMetrics?: boolean;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* BlurredVideoBackdrop - A high-performance blurred video backdrop using canvas.
|
|
449
|
+
*
|
|
450
|
+
* Renders a blurred copy of a video element to create an ambient backdrop effect.
|
|
451
|
+
* Uses canvas rendering for optimal performance - no video sync needed.
|
|
452
|
+
*
|
|
453
|
+
* Performance features:
|
|
454
|
+
* - Single video decoder (draws from existing video element)
|
|
455
|
+
* - Reduced resolution rendering (configurable scale)
|
|
456
|
+
* - Throttled frame rate (configurable FPS)
|
|
457
|
+
* - GPU-accelerated canvas scaling
|
|
458
|
+
*
|
|
459
|
+
* @example
|
|
460
|
+
* ```tsx
|
|
461
|
+
* const videoRef = useRef<HTMLVideoElement>(null);
|
|
462
|
+
*
|
|
463
|
+
* <div className="relative">
|
|
464
|
+
* <BlurredVideoBackdrop
|
|
465
|
+
* videoRef={videoRef}
|
|
466
|
+
* blur="high"
|
|
467
|
+
* overlay="vignette"
|
|
468
|
+
* />
|
|
469
|
+
* <VideoPlayer videoRef={videoRef} src="/video.mp4" />
|
|
470
|
+
* </div>
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
declare const BlurredVideoBackdrop: React$1.ForwardRefExoticComponent<BlurredVideoBackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
474
|
+
|
|
247
475
|
/**
|
|
248
476
|
* Component-level theming interface
|
|
249
477
|
*
|
|
@@ -771,7 +999,7 @@ declare const iconButtonVariants: tailwind_variants.TVReturnType<{
|
|
|
771
999
|
default: string;
|
|
772
1000
|
full: string;
|
|
773
1001
|
};
|
|
774
|
-
}, undefined, "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", tailwind_variants_dist_config_js.TVConfig<{
|
|
1002
|
+
}, undefined, "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", tailwind_variants_dist_config_js.TVConfig<{
|
|
775
1003
|
variant: {
|
|
776
1004
|
primary: string;
|
|
777
1005
|
"primary-outline": string;
|
|
@@ -843,7 +1071,7 @@ declare const iconButtonVariants: tailwind_variants.TVReturnType<{
|
|
|
843
1071
|
default: string;
|
|
844
1072
|
full: string;
|
|
845
1073
|
};
|
|
846
|
-
}, undefined, "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", tailwind_variants_dist_config_js.TVConfig<{
|
|
1074
|
+
}, undefined, "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", tailwind_variants_dist_config_js.TVConfig<{
|
|
847
1075
|
variant: {
|
|
848
1076
|
primary: string;
|
|
849
1077
|
"primary-outline": string;
|
|
@@ -1680,6 +1908,7 @@ declare const PopoverParts: (({ children, ...props }: PopoverRootProps) => react
|
|
|
1680
1908
|
* - Focus/Open: Accent border with focus ring
|
|
1681
1909
|
* - Selected: Has a value selected (darker text)
|
|
1682
1910
|
* - Disabled: Reduced opacity, not interactive
|
|
1911
|
+
* - Invalid: Error border and styling
|
|
1683
1912
|
*/
|
|
1684
1913
|
declare const selectTriggerVariants: tailwind_variants.TVReturnType<{
|
|
1685
1914
|
size: {
|
|
@@ -1754,6 +1983,11 @@ declare const selectTriggerVariants: tailwind_variants.TVReturnType<{
|
|
|
1754
1983
|
}>, unknown, unknown, undefined>>;
|
|
1755
1984
|
/**
|
|
1756
1985
|
* Select popup/menu variants
|
|
1986
|
+
*
|
|
1987
|
+
* Uses overlay tokens for consistent floating panel styling:
|
|
1988
|
+
* - color.overlay.background - Light background
|
|
1989
|
+
* - color.overlay.border - Subtle border
|
|
1990
|
+
* - surface.overlay.radius - Rounded corners
|
|
1757
1991
|
*/
|
|
1758
1992
|
declare const selectPopupVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
1759
1993
|
/**
|
|
@@ -1773,10 +2007,25 @@ declare const SelectRoot: <Value = string>({ children, ...props }: SelectProps<V
|
|
|
1773
2007
|
interface SelectTriggerProps extends Omit<React$1.ComponentProps<typeof Select$1.Trigger>, "className">, VariantProps<typeof selectTriggerVariants> {
|
|
1774
2008
|
className?: string;
|
|
1775
2009
|
placeholder?: string;
|
|
2010
|
+
/**
|
|
2011
|
+
* Accessible label for the select trigger.
|
|
2012
|
+
* Required for accessibility when no visible label is present.
|
|
2013
|
+
*/
|
|
2014
|
+
"aria-label"?: string;
|
|
1776
2015
|
}
|
|
1777
2016
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2017
|
+
interface SelectValueProps extends Omit<React$1.ComponentProps<typeof Select$1.Value>, "className"> {
|
|
2018
|
+
className?: string;
|
|
2019
|
+
placeholder?: string;
|
|
2020
|
+
}
|
|
1778
2021
|
interface SelectPopupProps extends Omit<React$1.ComponentProps<typeof Select$1.Popup>, "className"> {
|
|
1779
2022
|
className?: string;
|
|
2023
|
+
/**
|
|
2024
|
+
* Whether the selected item should align with the trigger.
|
|
2025
|
+
* When true (default), the popup positions so the selected item appears over the trigger.
|
|
2026
|
+
* When false, the popup aligns to the trigger edge.
|
|
2027
|
+
*/
|
|
2028
|
+
alignItemWithTrigger?: boolean;
|
|
1780
2029
|
}
|
|
1781
2030
|
declare const SelectPopup: React$1.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1782
2031
|
interface SelectOptionProps extends Omit<React$1.ComponentProps<typeof Select$1.Item>, "className"> {
|
|
@@ -1791,12 +2040,28 @@ interface SelectGroupLabelProps extends Omit<React$1.ComponentProps<typeof Selec
|
|
|
1791
2040
|
className?: string;
|
|
1792
2041
|
}
|
|
1793
2042
|
declare const SelectGroupLabel: React$1.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2043
|
+
interface SelectSeparatorProps extends Omit<React$1.ComponentProps<typeof Select$1.Separator>, "className"> {
|
|
2044
|
+
className?: string;
|
|
2045
|
+
}
|
|
2046
|
+
interface SelectScrollUpArrowProps extends Omit<React$1.ComponentProps<typeof Select$1.ScrollUpArrow>, "className"> {
|
|
2047
|
+
className?: string;
|
|
2048
|
+
}
|
|
2049
|
+
interface SelectScrollDownArrowProps extends Omit<React$1.ComponentProps<typeof Select$1.ScrollDownArrow>, "className"> {
|
|
2050
|
+
className?: string;
|
|
2051
|
+
}
|
|
1794
2052
|
declare const Select: (<Value = string>({ children, ...props }: SelectProps<Value>) => react_jsx_runtime.JSX.Element) & {
|
|
1795
2053
|
Trigger: React$1.ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2054
|
+
Value: React$1.ForwardRefExoticComponent<Omit<SelectValueProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1796
2055
|
Popup: React$1.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2056
|
+
Content: React$1.ForwardRefExoticComponent<Omit<SelectPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1797
2057
|
Option: React$1.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2058
|
+
Item: React$1.ForwardRefExoticComponent<Omit<SelectOptionProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1798
2059
|
Group: React$1.ForwardRefExoticComponent<Omit<SelectGroupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1799
2060
|
GroupLabel: React$1.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2061
|
+
Label: React$1.ForwardRefExoticComponent<Omit<SelectGroupLabelProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2062
|
+
Separator: React$1.ForwardRefExoticComponent<Omit<SelectSeparatorProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2063
|
+
ScrollUpArrow: React$1.ForwardRefExoticComponent<Omit<SelectScrollUpArrowProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2064
|
+
ScrollDownArrow: React$1.ForwardRefExoticComponent<Omit<SelectScrollDownArrowProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1800
2065
|
};
|
|
1801
2066
|
|
|
1802
2067
|
/**
|
|
@@ -1957,162 +2222,1331 @@ declare const TooltipParts: (({ children, ...props }: TooltipRootProps) => react
|
|
|
1957
2222
|
Arrow: React$1.ForwardRefExoticComponent<Omit<TooltipArrowProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1958
2223
|
};
|
|
1959
2224
|
|
|
1960
|
-
|
|
1961
|
-
|
|
2225
|
+
/**
|
|
2226
|
+
* Represents a single caption cue parsed from VTT.
|
|
2227
|
+
*/
|
|
2228
|
+
interface CaptionCue {
|
|
2229
|
+
/** Unique identifier for the cue */
|
|
2230
|
+
id: string;
|
|
2231
|
+
/** Start time in seconds */
|
|
2232
|
+
startTime: number;
|
|
2233
|
+
/** End time in seconds */
|
|
2234
|
+
endTime: number;
|
|
2235
|
+
/** Caption text content */
|
|
2236
|
+
text: string;
|
|
1962
2237
|
}
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2238
|
+
interface UseCaptionsOptions {
|
|
2239
|
+
/** VTT file URL to fetch */
|
|
2240
|
+
src?: string;
|
|
2241
|
+
/** Pre-loaded VTT content string */
|
|
2242
|
+
content?: string;
|
|
2243
|
+
/** Strip VTT formatting tags from caption text */
|
|
2244
|
+
stripTags?: boolean;
|
|
2245
|
+
/** Current playback time in seconds (alternative to setCurrentTime) */
|
|
2246
|
+
currentTime?: number;
|
|
1969
2247
|
}
|
|
1970
|
-
|
|
2248
|
+
interface UseCaptionsReturn {
|
|
2249
|
+
/** All parsed caption cues */
|
|
2250
|
+
cues: CaptionCue[];
|
|
2251
|
+
/** Currently active cue based on current time */
|
|
2252
|
+
activeCue: CaptionCue | null;
|
|
2253
|
+
/** Update the current playback time to get active cue */
|
|
2254
|
+
setCurrentTime: (time: number) => void;
|
|
2255
|
+
/** Loading state */
|
|
2256
|
+
isLoading: boolean;
|
|
2257
|
+
/** Error state */
|
|
2258
|
+
error: Error | null;
|
|
2259
|
+
}
|
|
2260
|
+
/**
|
|
2261
|
+
* Hook for parsing VTT captions and tracking the active cue.
|
|
2262
|
+
*
|
|
2263
|
+
* @param options - Caption source options
|
|
2264
|
+
* @returns Parsed cues, active cue, and state
|
|
2265
|
+
*
|
|
2266
|
+
* @example
|
|
2267
|
+
* ```tsx
|
|
2268
|
+
* function VideoPlayer() {
|
|
2269
|
+
* const videoRef = React.useRef<HTMLVideoElement>(null);
|
|
2270
|
+
* const { activeCue, setCurrentTime } = useCaptions({
|
|
2271
|
+
* src: '/captions.vtt',
|
|
2272
|
+
* });
|
|
2273
|
+
*
|
|
2274
|
+
* // Sync with video time
|
|
2275
|
+
* React.useEffect(() => {
|
|
2276
|
+
* const video = videoRef.current;
|
|
2277
|
+
* if (!video) return;
|
|
2278
|
+
*
|
|
2279
|
+
* const handleTimeUpdate = () => setCurrentTime(video.currentTime);
|
|
2280
|
+
* video.addEventListener('timeupdate', handleTimeUpdate);
|
|
2281
|
+
* return () => video.removeEventListener('timeupdate', handleTimeUpdate);
|
|
2282
|
+
* }, [setCurrentTime]);
|
|
2283
|
+
*
|
|
2284
|
+
* return (
|
|
2285
|
+
* <div>
|
|
2286
|
+
* <video ref={videoRef} src="/video.mp4" />
|
|
2287
|
+
* {activeCue && <div className="caption">{activeCue.text}</div>}
|
|
2288
|
+
* </div>
|
|
2289
|
+
* );
|
|
2290
|
+
* }
|
|
2291
|
+
* ```
|
|
2292
|
+
*/
|
|
2293
|
+
declare function useCaptions(options?: UseCaptionsOptions): UseCaptionsReturn;
|
|
1971
2294
|
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
*/
|
|
1980
|
-
overlay: string;
|
|
2295
|
+
/**
|
|
2296
|
+
* Caption overlay variants using semantic tokens.
|
|
2297
|
+
*/
|
|
2298
|
+
declare const captionOverlayVariants: tailwind_variants.TVReturnType<{
|
|
2299
|
+
position: {
|
|
2300
|
+
bottom: string;
|
|
2301
|
+
"bottom-sm": string;
|
|
1981
2302
|
};
|
|
1982
|
-
}, undefined,
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
/**
|
|
1987
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
1988
|
-
* Use with Background components for images/gradients.
|
|
1989
|
-
*/
|
|
1990
|
-
overlay: string;
|
|
2303
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2304
|
+
position: {
|
|
2305
|
+
bottom: string;
|
|
2306
|
+
"bottom-sm": string;
|
|
1991
2307
|
};
|
|
1992
2308
|
}, {
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
/**
|
|
1997
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
1998
|
-
* Use with Background components for images/gradients.
|
|
1999
|
-
*/
|
|
2000
|
-
overlay: string;
|
|
2309
|
+
position: {
|
|
2310
|
+
bottom: string;
|
|
2311
|
+
"bottom-sm": string;
|
|
2001
2312
|
};
|
|
2002
2313
|
}>, {
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
/**
|
|
2007
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
2008
|
-
* Use with Background components for images/gradients.
|
|
2009
|
-
*/
|
|
2010
|
-
overlay: string;
|
|
2314
|
+
position: {
|
|
2315
|
+
bottom: string;
|
|
2316
|
+
"bottom-sm": string;
|
|
2011
2317
|
};
|
|
2012
2318
|
}, undefined, tailwind_variants.TVReturnType<{
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
/**
|
|
2017
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
2018
|
-
* Use with Background components for images/gradients.
|
|
2019
|
-
*/
|
|
2020
|
-
overlay: string;
|
|
2319
|
+
position: {
|
|
2320
|
+
bottom: string;
|
|
2321
|
+
"bottom-sm": string;
|
|
2021
2322
|
};
|
|
2022
|
-
}, undefined,
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
/**
|
|
2027
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
2028
|
-
* Use with Background components for images/gradients.
|
|
2029
|
-
*/
|
|
2030
|
-
overlay: string;
|
|
2323
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2324
|
+
position: {
|
|
2325
|
+
bottom: string;
|
|
2326
|
+
"bottom-sm": string;
|
|
2031
2327
|
};
|
|
2032
2328
|
}, {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
/**
|
|
2037
|
-
* Overlay layout - content sits on top of full-bleed background.
|
|
2038
|
-
* Use with Background components for images/gradients.
|
|
2039
|
-
*/
|
|
2040
|
-
overlay: string;
|
|
2329
|
+
position: {
|
|
2330
|
+
bottom: string;
|
|
2331
|
+
"bottom-sm": string;
|
|
2041
2332
|
};
|
|
2042
2333
|
}>, unknown, unknown, undefined>>;
|
|
2043
|
-
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
2044
|
-
}
|
|
2045
|
-
/**
|
|
2046
|
-
* Card component for displaying content in a contained, scannable format.
|
|
2047
|
-
*
|
|
2048
|
-
* Layouts:
|
|
2049
|
-
* - vertical: Image on top, content below (default)
|
|
2050
|
-
* - horizontal: Image on left, content on right
|
|
2051
|
-
* - overlay: Full-bleed background with content on top
|
|
2052
|
-
*
|
|
2053
|
-
* Use with CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, and CardActions.
|
|
2054
|
-
* For overlay layout, use Background components for full-bleed backgrounds.
|
|
2055
|
-
*/
|
|
2056
|
-
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2057
|
-
interface CardImageProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2058
|
-
/**
|
|
2059
|
-
* The image source URL
|
|
2060
|
-
*/
|
|
2061
|
-
src?: string;
|
|
2062
|
-
/**
|
|
2063
|
-
* Alt text for the image
|
|
2064
|
-
*/
|
|
2065
|
-
alt?: string;
|
|
2066
|
-
}
|
|
2067
2334
|
/**
|
|
2068
|
-
*
|
|
2069
|
-
* For horizontal layout, takes up ~40% width and stretches to content height.
|
|
2335
|
+
* Caption text box variants.
|
|
2070
2336
|
*/
|
|
2071
|
-
declare const
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
*/
|
|
2077
|
-
justify: {
|
|
2078
|
-
start: string;
|
|
2079
|
-
center: string;
|
|
2080
|
-
end: string;
|
|
2337
|
+
declare const captionTextVariants: tailwind_variants.TVReturnType<{
|
|
2338
|
+
size: {
|
|
2339
|
+
sm: string;
|
|
2340
|
+
md: string;
|
|
2341
|
+
lg: string;
|
|
2081
2342
|
};
|
|
2082
|
-
}, undefined,
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
justify: {
|
|
2088
|
-
start: string;
|
|
2089
|
-
center: string;
|
|
2090
|
-
end: string;
|
|
2343
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2344
|
+
size: {
|
|
2345
|
+
sm: string;
|
|
2346
|
+
md: string;
|
|
2347
|
+
lg: string;
|
|
2091
2348
|
};
|
|
2092
2349
|
}, {
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
justify: {
|
|
2098
|
-
start: string;
|
|
2099
|
-
center: string;
|
|
2100
|
-
end: string;
|
|
2350
|
+
size: {
|
|
2351
|
+
sm: string;
|
|
2352
|
+
md: string;
|
|
2353
|
+
lg: string;
|
|
2101
2354
|
};
|
|
2102
2355
|
}>, {
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
justify: {
|
|
2108
|
-
start: string;
|
|
2109
|
-
center: string;
|
|
2110
|
-
end: string;
|
|
2356
|
+
size: {
|
|
2357
|
+
sm: string;
|
|
2358
|
+
md: string;
|
|
2359
|
+
lg: string;
|
|
2111
2360
|
};
|
|
2112
2361
|
}, undefined, tailwind_variants.TVReturnType<{
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2362
|
+
size: {
|
|
2363
|
+
sm: string;
|
|
2364
|
+
md: string;
|
|
2365
|
+
lg: string;
|
|
2366
|
+
};
|
|
2367
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2368
|
+
size: {
|
|
2369
|
+
sm: string;
|
|
2370
|
+
md: string;
|
|
2371
|
+
lg: string;
|
|
2372
|
+
};
|
|
2373
|
+
}, {
|
|
2374
|
+
size: {
|
|
2375
|
+
sm: string;
|
|
2376
|
+
md: string;
|
|
2377
|
+
lg: string;
|
|
2378
|
+
};
|
|
2379
|
+
}>, unknown, unknown, undefined>>;
|
|
2380
|
+
interface CaptionOverlayProps extends React$1.HTMLAttributes<HTMLOutputElement>, VariantProps<typeof captionOverlayVariants>, VariantProps<typeof captionTextVariants> {
|
|
2381
|
+
/** Caption cue to display */
|
|
2382
|
+
cue?: CaptionCue | null;
|
|
2383
|
+
/** Caption text to display (alternative to cue) */
|
|
2384
|
+
text?: string;
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
* CaptionOverlay component.
|
|
2388
|
+
*
|
|
2389
|
+
* Displays caption text overlaid on video content.
|
|
2390
|
+
* Styled to match the DGA video player implementation.
|
|
2391
|
+
*
|
|
2392
|
+
* @example
|
|
2393
|
+
* ```tsx
|
|
2394
|
+
* <CaptionOverlay cue={activeCue} />
|
|
2395
|
+
*
|
|
2396
|
+
* // Or with plain text
|
|
2397
|
+
* <CaptionOverlay text="Hello, world!" />
|
|
2398
|
+
* ```
|
|
2399
|
+
*/
|
|
2400
|
+
declare const CaptionOverlay: React$1.ForwardRefExoticComponent<CaptionOverlayProps & React$1.RefAttributes<HTMLOutputElement>>;
|
|
2401
|
+
|
|
2402
|
+
/** Cloudflare Stream configuration */
|
|
2403
|
+
interface CloudflareConfig$1 {
|
|
2404
|
+
/** Cloudflare Stream video ID */
|
|
2405
|
+
videoId: string;
|
|
2406
|
+
/** Cloudflare customer code/subdomain */
|
|
2407
|
+
customerCode: string;
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* Video player container variants.
|
|
2411
|
+
*/
|
|
2412
|
+
declare const videoPlayerVariants: tailwind_variants.TVReturnType<{
|
|
2413
|
+
aspectRatio: {
|
|
2414
|
+
"16/9": string;
|
|
2415
|
+
"4/3": string;
|
|
2416
|
+
"1/1": string;
|
|
2417
|
+
"9/16": string;
|
|
2418
|
+
auto: string;
|
|
2419
|
+
};
|
|
2420
|
+
rounded: {
|
|
2421
|
+
none: string;
|
|
2422
|
+
sm: string;
|
|
2423
|
+
md: string;
|
|
2424
|
+
lg: string;
|
|
2425
|
+
};
|
|
2426
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2427
|
+
aspectRatio: {
|
|
2428
|
+
"16/9": string;
|
|
2429
|
+
"4/3": string;
|
|
2430
|
+
"1/1": string;
|
|
2431
|
+
"9/16": string;
|
|
2432
|
+
auto: string;
|
|
2433
|
+
};
|
|
2434
|
+
rounded: {
|
|
2435
|
+
none: string;
|
|
2436
|
+
sm: string;
|
|
2437
|
+
md: string;
|
|
2438
|
+
lg: string;
|
|
2439
|
+
};
|
|
2440
|
+
}, {
|
|
2441
|
+
aspectRatio: {
|
|
2442
|
+
"16/9": string;
|
|
2443
|
+
"4/3": string;
|
|
2444
|
+
"1/1": string;
|
|
2445
|
+
"9/16": string;
|
|
2446
|
+
auto: string;
|
|
2447
|
+
};
|
|
2448
|
+
rounded: {
|
|
2449
|
+
none: string;
|
|
2450
|
+
sm: string;
|
|
2451
|
+
md: string;
|
|
2452
|
+
lg: string;
|
|
2453
|
+
};
|
|
2454
|
+
}>, {
|
|
2455
|
+
aspectRatio: {
|
|
2456
|
+
"16/9": string;
|
|
2457
|
+
"4/3": string;
|
|
2458
|
+
"1/1": string;
|
|
2459
|
+
"9/16": string;
|
|
2460
|
+
auto: string;
|
|
2461
|
+
};
|
|
2462
|
+
rounded: {
|
|
2463
|
+
none: string;
|
|
2464
|
+
sm: string;
|
|
2465
|
+
md: string;
|
|
2466
|
+
lg: string;
|
|
2467
|
+
};
|
|
2468
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
2469
|
+
aspectRatio: {
|
|
2470
|
+
"16/9": string;
|
|
2471
|
+
"4/3": string;
|
|
2472
|
+
"1/1": string;
|
|
2473
|
+
"9/16": string;
|
|
2474
|
+
auto: string;
|
|
2475
|
+
};
|
|
2476
|
+
rounded: {
|
|
2477
|
+
none: string;
|
|
2478
|
+
sm: string;
|
|
2479
|
+
md: string;
|
|
2480
|
+
lg: string;
|
|
2481
|
+
};
|
|
2482
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2483
|
+
aspectRatio: {
|
|
2484
|
+
"16/9": string;
|
|
2485
|
+
"4/3": string;
|
|
2486
|
+
"1/1": string;
|
|
2487
|
+
"9/16": string;
|
|
2488
|
+
auto: string;
|
|
2489
|
+
};
|
|
2490
|
+
rounded: {
|
|
2491
|
+
none: string;
|
|
2492
|
+
sm: string;
|
|
2493
|
+
md: string;
|
|
2494
|
+
lg: string;
|
|
2495
|
+
};
|
|
2496
|
+
}, {
|
|
2497
|
+
aspectRatio: {
|
|
2498
|
+
"16/9": string;
|
|
2499
|
+
"4/3": string;
|
|
2500
|
+
"1/1": string;
|
|
2501
|
+
"9/16": string;
|
|
2502
|
+
auto: string;
|
|
2503
|
+
};
|
|
2504
|
+
rounded: {
|
|
2505
|
+
none: string;
|
|
2506
|
+
sm: string;
|
|
2507
|
+
md: string;
|
|
2508
|
+
lg: string;
|
|
2509
|
+
};
|
|
2510
|
+
}>, unknown, unknown, undefined>>;
|
|
2511
|
+
/**
|
|
2512
|
+
* Media controller container styles.
|
|
2513
|
+
* Uses CSS custom properties to configure media-chrome components.
|
|
2514
|
+
* Styled to match DGA video player design with ghost-style buttons.
|
|
2515
|
+
*/
|
|
2516
|
+
declare const mediaControllerVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2517
|
+
/**
|
|
2518
|
+
* Control bar variants.
|
|
2519
|
+
* Note: Positioning is handled via inline styles to override web component defaults.
|
|
2520
|
+
* Tailwind classes handle background color and visibility transitions.
|
|
2521
|
+
*/
|
|
2522
|
+
declare const controlBarVariants: tailwind_variants.TVReturnType<{
|
|
2523
|
+
visible: {
|
|
2524
|
+
true: string;
|
|
2525
|
+
false: string;
|
|
2526
|
+
};
|
|
2527
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2528
|
+
visible: {
|
|
2529
|
+
true: string;
|
|
2530
|
+
false: string;
|
|
2531
|
+
};
|
|
2532
|
+
}, {
|
|
2533
|
+
visible: {
|
|
2534
|
+
true: string;
|
|
2535
|
+
false: string;
|
|
2536
|
+
};
|
|
2537
|
+
}>, {
|
|
2538
|
+
visible: {
|
|
2539
|
+
true: string;
|
|
2540
|
+
false: string;
|
|
2541
|
+
};
|
|
2542
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
2543
|
+
visible: {
|
|
2544
|
+
true: string;
|
|
2545
|
+
false: string;
|
|
2546
|
+
};
|
|
2547
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2548
|
+
visible: {
|
|
2549
|
+
true: string;
|
|
2550
|
+
false: string;
|
|
2551
|
+
};
|
|
2552
|
+
}, {
|
|
2553
|
+
visible: {
|
|
2554
|
+
true: string;
|
|
2555
|
+
false: string;
|
|
2556
|
+
};
|
|
2557
|
+
}>, unknown, unknown, undefined>>;
|
|
2558
|
+
/**
|
|
2559
|
+
* Control button styles for custom buttons.
|
|
2560
|
+
* Transparent by default, shows background on hover (ghost style).
|
|
2561
|
+
*/
|
|
2562
|
+
declare const controlButtonVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2563
|
+
/**
|
|
2564
|
+
* Loading overlay variants.
|
|
2565
|
+
*/
|
|
2566
|
+
declare const loadingOverlayVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2567
|
+
interface VideoPlayerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "children" | "onError" | "onPlay" | "onPause" | "onEnded" | "onTimeUpdate">, VariantProps<typeof videoPlayerVariants> {
|
|
2568
|
+
/** Video source URL (HLS .m3u8 or regular video file) */
|
|
2569
|
+
src?: string;
|
|
2570
|
+
/** Cloudflare Stream configuration (takes precedence over src) */
|
|
2571
|
+
cloudflare?: CloudflareConfig$1;
|
|
2572
|
+
/** Poster image URL */
|
|
2573
|
+
poster?: string;
|
|
2574
|
+
/** VTT captions URL */
|
|
2575
|
+
captionsSrc?: string;
|
|
2576
|
+
/** Whether to autoplay (default: false) */
|
|
2577
|
+
autoPlay?: boolean;
|
|
2578
|
+
/** Whether to loop the video (default: false) */
|
|
2579
|
+
loop?: boolean;
|
|
2580
|
+
/** Whether to mute initially (default: false) */
|
|
2581
|
+
muted?: boolean;
|
|
2582
|
+
/** Whether to show controls (default: true) */
|
|
2583
|
+
controls?: boolean;
|
|
2584
|
+
/** Whether to auto-hide controls when not interacting (default: true) */
|
|
2585
|
+
autoHideControls?: boolean;
|
|
2586
|
+
/** Control auto-hide delay in ms (default: 3000) */
|
|
2587
|
+
autoHideDelay?: number;
|
|
2588
|
+
/** Whether captions are enabled by default (default: false) */
|
|
2589
|
+
captionsEnabled?: boolean;
|
|
2590
|
+
/** Callback when video starts playing */
|
|
2591
|
+
onPlay?: () => void;
|
|
2592
|
+
/** Callback when video pauses */
|
|
2593
|
+
onPause?: () => void;
|
|
2594
|
+
/** Callback when video ends */
|
|
2595
|
+
onEnded?: () => void;
|
|
2596
|
+
/** Callback on time update */
|
|
2597
|
+
onTimeUpdate?: (time: number) => void;
|
|
2598
|
+
/** Callback on error */
|
|
2599
|
+
onError?: (error: Error) => void;
|
|
2600
|
+
/** Ref to the video element */
|
|
2601
|
+
videoRef?: React$1.RefObject<HTMLVideoElement | null>;
|
|
2602
|
+
}
|
|
2603
|
+
/**
|
|
2604
|
+
* VideoPlayer - Standalone video player component with media-chrome controls.
|
|
2605
|
+
*
|
|
2606
|
+
* Supports Cloudflare Stream (recommended) or direct video URLs with HLS support.
|
|
2607
|
+
* Works standalone or can be composed with Modal for fullscreen playback.
|
|
2608
|
+
*
|
|
2609
|
+
* @example
|
|
2610
|
+
* ```tsx
|
|
2611
|
+
* // With Cloudflare Stream (recommended)
|
|
2612
|
+
* <VideoPlayer
|
|
2613
|
+
* cloudflare={{ videoId: "abc123", customerCode: "xyz789" }}
|
|
2614
|
+
* poster="/thumbnail.jpg"
|
|
2615
|
+
* captionsSrc="/captions.vtt"
|
|
2616
|
+
* />
|
|
2617
|
+
*
|
|
2618
|
+
* // With direct URL
|
|
2619
|
+
* <VideoPlayer
|
|
2620
|
+
* src="https://example.com/video.mp4"
|
|
2621
|
+
* poster="/thumbnail.jpg"
|
|
2622
|
+
* />
|
|
2623
|
+
*
|
|
2624
|
+
* // With Modal for fullscreen
|
|
2625
|
+
* <Modal trigger={<Button>Watch Video</Button>}>
|
|
2626
|
+
* <VideoPlayer cloudflare={{ videoId: "...", customerCode: "..." }} />
|
|
2627
|
+
* </Modal>
|
|
2628
|
+
* ```
|
|
2629
|
+
*/
|
|
2630
|
+
declare const VideoPlayer: React$1.ForwardRefExoticComponent<VideoPlayerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2631
|
+
|
|
2632
|
+
interface DevToolbarProps {
|
|
2633
|
+
defaultExpanded?: boolean;
|
|
2634
|
+
}
|
|
2635
|
+
declare function DevToolbar({ defaultExpanded }: DevToolbarProps): react_jsx_runtime.JSX.Element;
|
|
2636
|
+
|
|
2637
|
+
interface GridOverlayProps {
|
|
2638
|
+
columnOpacity?: number;
|
|
2639
|
+
borderOpacity?: number;
|
|
2640
|
+
visible?: boolean;
|
|
2641
|
+
}
|
|
2642
|
+
declare function GridOverlay({ columnOpacity, borderOpacity, visible, }: GridOverlayProps): react_jsx_runtime.JSX.Element;
|
|
2643
|
+
|
|
2644
|
+
/**
|
|
2645
|
+
* Dialog backdrop variants
|
|
2646
|
+
*
|
|
2647
|
+
* Semi-transparent overlay behind the dialog content.
|
|
2648
|
+
*/
|
|
2649
|
+
declare const dialogBackdropVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2650
|
+
/**
|
|
2651
|
+
* Dialog popup variants
|
|
2652
|
+
*
|
|
2653
|
+
* Uses semantic overlay tokens for themeable styling:
|
|
2654
|
+
* - color.overlay.background - Light background
|
|
2655
|
+
* - color.overlay.border - Subtle border
|
|
2656
|
+
* - color.overlay.text - Primary text
|
|
2657
|
+
* - surface.overlay.radius - Rounded corners
|
|
2658
|
+
*/
|
|
2659
|
+
declare const dialogPopupVariants: tailwind_variants.TVReturnType<{
|
|
2660
|
+
size: {
|
|
2661
|
+
sm: string;
|
|
2662
|
+
md: string;
|
|
2663
|
+
lg: string;
|
|
2664
|
+
xl: string;
|
|
2665
|
+
full: string;
|
|
2666
|
+
};
|
|
2667
|
+
variant: {
|
|
2668
|
+
default: string[];
|
|
2669
|
+
minimal: string[];
|
|
2670
|
+
};
|
|
2671
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2672
|
+
size: {
|
|
2673
|
+
sm: string;
|
|
2674
|
+
md: string;
|
|
2675
|
+
lg: string;
|
|
2676
|
+
xl: string;
|
|
2677
|
+
full: string;
|
|
2678
|
+
};
|
|
2679
|
+
variant: {
|
|
2680
|
+
default: string[];
|
|
2681
|
+
minimal: string[];
|
|
2682
|
+
};
|
|
2683
|
+
}, {
|
|
2684
|
+
size: {
|
|
2685
|
+
sm: string;
|
|
2686
|
+
md: string;
|
|
2687
|
+
lg: string;
|
|
2688
|
+
xl: string;
|
|
2689
|
+
full: string;
|
|
2690
|
+
};
|
|
2691
|
+
variant: {
|
|
2692
|
+
default: string[];
|
|
2693
|
+
minimal: string[];
|
|
2694
|
+
};
|
|
2695
|
+
}>, {
|
|
2696
|
+
size: {
|
|
2697
|
+
sm: string;
|
|
2698
|
+
md: string;
|
|
2699
|
+
lg: string;
|
|
2700
|
+
xl: string;
|
|
2701
|
+
full: string;
|
|
2702
|
+
};
|
|
2703
|
+
variant: {
|
|
2704
|
+
default: string[];
|
|
2705
|
+
minimal: string[];
|
|
2706
|
+
};
|
|
2707
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
2708
|
+
size: {
|
|
2709
|
+
sm: string;
|
|
2710
|
+
md: string;
|
|
2711
|
+
lg: string;
|
|
2712
|
+
xl: string;
|
|
2713
|
+
full: string;
|
|
2714
|
+
};
|
|
2715
|
+
variant: {
|
|
2716
|
+
default: string[];
|
|
2717
|
+
minimal: string[];
|
|
2718
|
+
};
|
|
2719
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2720
|
+
size: {
|
|
2721
|
+
sm: string;
|
|
2722
|
+
md: string;
|
|
2723
|
+
lg: string;
|
|
2724
|
+
xl: string;
|
|
2725
|
+
full: string;
|
|
2726
|
+
};
|
|
2727
|
+
variant: {
|
|
2728
|
+
default: string[];
|
|
2729
|
+
minimal: string[];
|
|
2730
|
+
};
|
|
2731
|
+
}, {
|
|
2732
|
+
size: {
|
|
2733
|
+
sm: string;
|
|
2734
|
+
md: string;
|
|
2735
|
+
lg: string;
|
|
2736
|
+
xl: string;
|
|
2737
|
+
full: string;
|
|
2738
|
+
};
|
|
2739
|
+
variant: {
|
|
2740
|
+
default: string[];
|
|
2741
|
+
minimal: string[];
|
|
2742
|
+
};
|
|
2743
|
+
}>, unknown, unknown, undefined>>;
|
|
2744
|
+
interface DialogRootProps extends Dialog$1.Root.Props {
|
|
2745
|
+
children: React$1.ReactNode;
|
|
2746
|
+
}
|
|
2747
|
+
/**
|
|
2748
|
+
* Dialog Root
|
|
2749
|
+
*
|
|
2750
|
+
* Groups all dialog parts and manages open/close state.
|
|
2751
|
+
* Provides focus trap, scroll lock, and escape key handling automatically.
|
|
2752
|
+
*/
|
|
2753
|
+
declare const DialogRoot: ({ children, ...props }: DialogRootProps) => react_jsx_runtime.JSX.Element;
|
|
2754
|
+
interface DialogTriggerProps extends React$1.ComponentProps<typeof Dialog$1.Trigger> {
|
|
2755
|
+
className?: string;
|
|
2756
|
+
}
|
|
2757
|
+
/**
|
|
2758
|
+
* Dialog Trigger
|
|
2759
|
+
*
|
|
2760
|
+
* The element that triggers the dialog to open on click.
|
|
2761
|
+
* When children is a single React element, uses `render` prop to avoid wrapper element.
|
|
2762
|
+
*/
|
|
2763
|
+
declare const DialogTrigger: React$1.ForwardRefExoticComponent<Omit<DialogTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2764
|
+
interface DialogPortalProps extends Dialog$1.Portal.Props {
|
|
2765
|
+
children: React$1.ReactNode;
|
|
2766
|
+
}
|
|
2767
|
+
/**
|
|
2768
|
+
* Dialog Portal
|
|
2769
|
+
*
|
|
2770
|
+
* Renders the dialog in a portal outside the DOM hierarchy.
|
|
2771
|
+
* This ensures proper stacking context and avoids z-index issues.
|
|
2772
|
+
*/
|
|
2773
|
+
declare const DialogPortal: ({ children, ...props }: DialogPortalProps) => react_jsx_runtime.JSX.Element;
|
|
2774
|
+
interface DialogBackdropProps extends Omit<React$1.ComponentProps<typeof Dialog$1.Backdrop>, "className"> {
|
|
2775
|
+
className?: string;
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Dialog Backdrop
|
|
2779
|
+
*
|
|
2780
|
+
* Semi-transparent overlay that covers the page behind the dialog.
|
|
2781
|
+
* Clicking the backdrop closes the dialog by default.
|
|
2782
|
+
*/
|
|
2783
|
+
declare const DialogBackdrop: React$1.ForwardRefExoticComponent<Omit<DialogBackdropProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2784
|
+
interface DialogPopupProps extends Omit<React$1.ComponentProps<typeof Dialog$1.Popup>, "className">, VariantProps<typeof dialogPopupVariants> {
|
|
2785
|
+
className?: string;
|
|
2786
|
+
}
|
|
2787
|
+
/**
|
|
2788
|
+
* Dialog Popup
|
|
2789
|
+
*
|
|
2790
|
+
* The dialog content container. Centered on screen with configurable size.
|
|
2791
|
+
* Use `variant="minimal"` for borderless dialogs (video modals, etc.)
|
|
2792
|
+
*/
|
|
2793
|
+
declare const DialogPopup: React$1.ForwardRefExoticComponent<Omit<DialogPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2794
|
+
interface DialogTitleProps extends Omit<React$1.ComponentProps<typeof Dialog$1.Title>, "className"> {
|
|
2795
|
+
className?: string;
|
|
2796
|
+
}
|
|
2797
|
+
/**
|
|
2798
|
+
* Dialog Title
|
|
2799
|
+
*
|
|
2800
|
+
* Accessible title for the dialog. Should be used for screen reader support.
|
|
2801
|
+
*/
|
|
2802
|
+
declare const DialogTitle: React$1.ForwardRefExoticComponent<Omit<DialogTitleProps, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
2803
|
+
interface DialogDescriptionProps extends Omit<React$1.ComponentProps<typeof Dialog$1.Description>, "className"> {
|
|
2804
|
+
className?: string;
|
|
2805
|
+
}
|
|
2806
|
+
/**
|
|
2807
|
+
* Dialog Description
|
|
2808
|
+
*
|
|
2809
|
+
* Accessible description for the dialog content.
|
|
2810
|
+
*/
|
|
2811
|
+
declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<DialogDescriptionProps, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
2812
|
+
interface DialogCloseProps extends Omit<React$1.ComponentProps<typeof Dialog$1.Close>, "className"> {
|
|
2813
|
+
className?: string;
|
|
2814
|
+
}
|
|
2815
|
+
/**
|
|
2816
|
+
* Dialog Close
|
|
2817
|
+
*
|
|
2818
|
+
* Close button for the dialog. Can be placed anywhere within the dialog.
|
|
2819
|
+
*/
|
|
2820
|
+
declare const DialogClose: React$1.ForwardRefExoticComponent<Omit<DialogCloseProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2821
|
+
interface DialogBodyProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2822
|
+
className?: string;
|
|
2823
|
+
}
|
|
2824
|
+
/**
|
|
2825
|
+
* Dialog Body
|
|
2826
|
+
*
|
|
2827
|
+
* Container for the main dialog content. Handles overflow scrolling.
|
|
2828
|
+
*/
|
|
2829
|
+
declare const DialogBody: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2830
|
+
interface DialogFooterProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2831
|
+
className?: string;
|
|
2832
|
+
}
|
|
2833
|
+
/**
|
|
2834
|
+
* Dialog Footer
|
|
2835
|
+
*
|
|
2836
|
+
* Container for dialog actions (buttons, etc.). Typically placed at the bottom.
|
|
2837
|
+
*/
|
|
2838
|
+
declare const DialogFooter: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2839
|
+
interface DialogProps {
|
|
2840
|
+
/** The content to show in the dialog */
|
|
2841
|
+
children: React$1.ReactNode;
|
|
2842
|
+
/** The element that triggers the dialog (optional for controlled mode) */
|
|
2843
|
+
trigger?: React$1.ReactNode;
|
|
2844
|
+
/** Title for the dialog */
|
|
2845
|
+
title?: React$1.ReactNode;
|
|
2846
|
+
/** Description for the dialog */
|
|
2847
|
+
description?: React$1.ReactNode;
|
|
2848
|
+
/** Size of the dialog */
|
|
2849
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
2850
|
+
/** Visual variant: "default" for card style, "minimal" for borderless (video modals) */
|
|
2851
|
+
variant?: "default" | "minimal";
|
|
2852
|
+
/** Whether to show a close button */
|
|
2853
|
+
showClose?: boolean;
|
|
2854
|
+
/** Controlled open state */
|
|
2855
|
+
open?: boolean;
|
|
2856
|
+
/** Default open state */
|
|
2857
|
+
defaultOpen?: boolean;
|
|
2858
|
+
/** Callback when open state changes */
|
|
2859
|
+
onOpenChange?: (open: boolean) => void;
|
|
2860
|
+
/** Additional className for the popup */
|
|
2861
|
+
className?: string;
|
|
2862
|
+
}
|
|
2863
|
+
/**
|
|
2864
|
+
* Dialog
|
|
2865
|
+
*
|
|
2866
|
+
* A simple, pre-composed dialog component for common use cases.
|
|
2867
|
+
* For more complex needs, use the compound components directly.
|
|
2868
|
+
*
|
|
2869
|
+
* @example
|
|
2870
|
+
* ```tsx
|
|
2871
|
+
* // With trigger
|
|
2872
|
+
* <Dialog
|
|
2873
|
+
* trigger={<Button>Open Dialog</Button>}
|
|
2874
|
+
* title="Dialog Title"
|
|
2875
|
+
* description="This is the dialog description."
|
|
2876
|
+
* >
|
|
2877
|
+
* <p>Dialog content goes here.</p>
|
|
2878
|
+
* </Dialog>
|
|
2879
|
+
*
|
|
2880
|
+
* // Controlled mode
|
|
2881
|
+
* <Dialog
|
|
2882
|
+
* open={isOpen}
|
|
2883
|
+
* onOpenChange={setIsOpen}
|
|
2884
|
+
* title="Controlled Dialog"
|
|
2885
|
+
* >
|
|
2886
|
+
* <p>Content here</p>
|
|
2887
|
+
* </Dialog>
|
|
2888
|
+
* ```
|
|
2889
|
+
*/
|
|
2890
|
+
declare const Dialog: ({ children, trigger, title, description, size, variant, showClose, open, defaultOpen, onOpenChange, className, }: DialogProps) => react_jsx_runtime.JSX.Element;
|
|
2891
|
+
declare const DialogParts: (({ children, ...props }: DialogRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
2892
|
+
Root: ({ children, ...props }: DialogRootProps) => react_jsx_runtime.JSX.Element;
|
|
2893
|
+
Trigger: React$1.ForwardRefExoticComponent<Omit<DialogTriggerProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2894
|
+
Portal: ({ children, ...props }: DialogPortalProps) => react_jsx_runtime.JSX.Element;
|
|
2895
|
+
Backdrop: React$1.ForwardRefExoticComponent<Omit<DialogBackdropProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2896
|
+
Popup: React$1.ForwardRefExoticComponent<Omit<DialogPopupProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
2897
|
+
Title: React$1.ForwardRefExoticComponent<Omit<DialogTitleProps, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
2898
|
+
Description: React$1.ForwardRefExoticComponent<Omit<DialogDescriptionProps, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
2899
|
+
Close: React$1.ForwardRefExoticComponent<Omit<DialogCloseProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
2900
|
+
Body: React$1.ForwardRefExoticComponent<DialogBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2901
|
+
Footer: React$1.ForwardRefExoticComponent<DialogFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2902
|
+
};
|
|
2903
|
+
|
|
2904
|
+
/**
|
|
2905
|
+
* Video dialog container variants.
|
|
2906
|
+
* Uses fixed positioning to cover the viewport.
|
|
2907
|
+
*/
|
|
2908
|
+
declare const videoDialogVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2909
|
+
/**
|
|
2910
|
+
* Close button variants.
|
|
2911
|
+
*/
|
|
2912
|
+
declare const closeButtonVariants: tailwind_variants.TVReturnType<{
|
|
2913
|
+
position: {
|
|
2914
|
+
"top-right": string;
|
|
2915
|
+
"top-left": string;
|
|
2916
|
+
};
|
|
2917
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2918
|
+
position: {
|
|
2919
|
+
"top-right": string;
|
|
2920
|
+
"top-left": string;
|
|
2921
|
+
};
|
|
2922
|
+
}, {
|
|
2923
|
+
position: {
|
|
2924
|
+
"top-right": string;
|
|
2925
|
+
"top-left": string;
|
|
2926
|
+
};
|
|
2927
|
+
}>, {
|
|
2928
|
+
position: {
|
|
2929
|
+
"top-right": string;
|
|
2930
|
+
"top-left": string;
|
|
2931
|
+
};
|
|
2932
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
2933
|
+
position: {
|
|
2934
|
+
"top-right": string;
|
|
2935
|
+
"top-left": string;
|
|
2936
|
+
};
|
|
2937
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
2938
|
+
position: {
|
|
2939
|
+
"top-right": string;
|
|
2940
|
+
"top-left": string;
|
|
2941
|
+
};
|
|
2942
|
+
}, {
|
|
2943
|
+
position: {
|
|
2944
|
+
"top-right": string;
|
|
2945
|
+
"top-left": string;
|
|
2946
|
+
};
|
|
2947
|
+
}>, unknown, unknown, undefined>>;
|
|
2948
|
+
/**
|
|
2949
|
+
* Video container variants.
|
|
2950
|
+
* Expands to fill viewport, constrained by height (maintains aspect ratio).
|
|
2951
|
+
*/
|
|
2952
|
+
declare const videoContainerVariants: tailwind_variants.TVReturnType<{} | {} | {}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, {} | {}, undefined, tailwind_variants.TVReturnType<unknown, undefined, string[], tailwind_variants_dist_config_js.TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
|
|
2953
|
+
interface VideoDialogProps extends Omit<VideoPlayerProps, "videoRef" | "className"> {
|
|
2954
|
+
/** Trigger element that opens the dialog */
|
|
2955
|
+
trigger: React$1.ReactNode;
|
|
2956
|
+
/** Blur intensity for backdrop (default: high) */
|
|
2957
|
+
blur?: BlurredVideoBackdropProps["blur"];
|
|
2958
|
+
/** Gradient overlay for backdrop (default: vignette) */
|
|
2959
|
+
overlay?: BlurredVideoBackdropProps["overlay"];
|
|
2960
|
+
/** Backdrop opacity (default: 0.6) */
|
|
2961
|
+
backdropOpacity?: number;
|
|
2962
|
+
/** Whether to show close button (default: true) */
|
|
2963
|
+
showClose?: boolean;
|
|
2964
|
+
/** Close button position (default: top-right) */
|
|
2965
|
+
closePosition?: "top-right" | "top-left";
|
|
2966
|
+
/** Video player rounded corners (default: lg) */
|
|
2967
|
+
rounded?: VideoPlayerProps["rounded"];
|
|
2968
|
+
/** Controlled open state */
|
|
2969
|
+
open?: boolean;
|
|
2970
|
+
/** Default open state */
|
|
2971
|
+
defaultOpen?: boolean;
|
|
2972
|
+
/** Callback when open state changes */
|
|
2973
|
+
onOpenChange?: (open: boolean) => void;
|
|
2974
|
+
/** Additional className for the dialog container */
|
|
2975
|
+
className?: string;
|
|
2976
|
+
}
|
|
2977
|
+
/**
|
|
2978
|
+
* VideoDialog - Fullscreen video modal with blurred video backdrop.
|
|
2979
|
+
*
|
|
2980
|
+
* Creates an immersive video viewing experience where the blurred video
|
|
2981
|
+
* serves as the modal backdrop, with the main video centered on top.
|
|
2982
|
+
* Based on the DGA modal pattern.
|
|
2983
|
+
*
|
|
2984
|
+
* Features:
|
|
2985
|
+
* - Blurred video backdrop that syncs with main video
|
|
2986
|
+
* - Configurable blur intensity and gradient overlays
|
|
2987
|
+
* - Automatic play/pause when dialog opens/closes
|
|
2988
|
+
* - HLS streaming support via Cloudflare Stream
|
|
2989
|
+
* - Accessible dialog with focus trap and escape key handling
|
|
2990
|
+
*
|
|
2991
|
+
* @example
|
|
2992
|
+
* ```tsx
|
|
2993
|
+
* <VideoDialog
|
|
2994
|
+
* trigger={<Button>Watch Video</Button>}
|
|
2995
|
+
* cloudflare={{ videoId: "abc123", customerCode: "xyz789" }}
|
|
2996
|
+
* blur="high"
|
|
2997
|
+
* overlay="vignette"
|
|
2998
|
+
* />
|
|
2999
|
+
* ```
|
|
3000
|
+
*/
|
|
3001
|
+
declare const VideoDialog: React$1.ForwardRefExoticComponent<VideoDialogProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3002
|
+
|
|
3003
|
+
/** Cloudflare Stream configuration */
|
|
3004
|
+
interface CloudflareConfig {
|
|
3005
|
+
/** Cloudflare Stream video ID */
|
|
3006
|
+
videoId: string;
|
|
3007
|
+
/** Cloudflare customer code/subdomain */
|
|
3008
|
+
customerCode: string;
|
|
3009
|
+
}
|
|
3010
|
+
/**
|
|
3011
|
+
* Root container variants.
|
|
3012
|
+
*/
|
|
3013
|
+
declare const videoWithBackdropVariants: tailwind_variants.TVReturnType<{
|
|
3014
|
+
/**
|
|
3015
|
+
* Full-height mode for dialogs.
|
|
3016
|
+
*/
|
|
3017
|
+
fullHeight: {
|
|
3018
|
+
true: string;
|
|
3019
|
+
false: string;
|
|
3020
|
+
};
|
|
3021
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
3022
|
+
/**
|
|
3023
|
+
* Full-height mode for dialogs.
|
|
3024
|
+
*/
|
|
3025
|
+
fullHeight: {
|
|
3026
|
+
true: string;
|
|
3027
|
+
false: string;
|
|
3028
|
+
};
|
|
3029
|
+
}, {
|
|
3030
|
+
/**
|
|
3031
|
+
* Full-height mode for dialogs.
|
|
3032
|
+
*/
|
|
3033
|
+
fullHeight: {
|
|
3034
|
+
true: string;
|
|
3035
|
+
false: string;
|
|
3036
|
+
};
|
|
3037
|
+
}>, {
|
|
3038
|
+
/**
|
|
3039
|
+
* Full-height mode for dialogs.
|
|
3040
|
+
*/
|
|
3041
|
+
fullHeight: {
|
|
3042
|
+
true: string;
|
|
3043
|
+
false: string;
|
|
3044
|
+
};
|
|
3045
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
3046
|
+
/**
|
|
3047
|
+
* Full-height mode for dialogs.
|
|
3048
|
+
*/
|
|
3049
|
+
fullHeight: {
|
|
3050
|
+
true: string;
|
|
3051
|
+
false: string;
|
|
3052
|
+
};
|
|
3053
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
3054
|
+
/**
|
|
3055
|
+
* Full-height mode for dialogs.
|
|
3056
|
+
*/
|
|
3057
|
+
fullHeight: {
|
|
3058
|
+
true: string;
|
|
3059
|
+
false: string;
|
|
3060
|
+
};
|
|
3061
|
+
}, {
|
|
3062
|
+
/**
|
|
3063
|
+
* Full-height mode for dialogs.
|
|
3064
|
+
*/
|
|
3065
|
+
fullHeight: {
|
|
3066
|
+
true: string;
|
|
3067
|
+
false: string;
|
|
3068
|
+
};
|
|
3069
|
+
}>, unknown, unknown, undefined>>;
|
|
3070
|
+
/**
|
|
3071
|
+
* Content container variants.
|
|
3072
|
+
*/
|
|
3073
|
+
declare const contentVariants: tailwind_variants.TVReturnType<{
|
|
3074
|
+
fullHeight: {
|
|
3075
|
+
true: string;
|
|
3076
|
+
false: string;
|
|
3077
|
+
};
|
|
3078
|
+
padding: {
|
|
3079
|
+
none: string;
|
|
3080
|
+
sm: string;
|
|
3081
|
+
md: string;
|
|
3082
|
+
lg: string;
|
|
3083
|
+
};
|
|
3084
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
3085
|
+
fullHeight: {
|
|
3086
|
+
true: string;
|
|
3087
|
+
false: string;
|
|
3088
|
+
};
|
|
3089
|
+
padding: {
|
|
3090
|
+
none: string;
|
|
3091
|
+
sm: string;
|
|
3092
|
+
md: string;
|
|
3093
|
+
lg: string;
|
|
3094
|
+
};
|
|
3095
|
+
}, {
|
|
3096
|
+
fullHeight: {
|
|
3097
|
+
true: string;
|
|
3098
|
+
false: string;
|
|
3099
|
+
};
|
|
3100
|
+
padding: {
|
|
3101
|
+
none: string;
|
|
3102
|
+
sm: string;
|
|
3103
|
+
md: string;
|
|
3104
|
+
lg: string;
|
|
3105
|
+
};
|
|
3106
|
+
}>, {
|
|
3107
|
+
fullHeight: {
|
|
3108
|
+
true: string;
|
|
3109
|
+
false: string;
|
|
3110
|
+
};
|
|
3111
|
+
padding: {
|
|
3112
|
+
none: string;
|
|
3113
|
+
sm: string;
|
|
3114
|
+
md: string;
|
|
3115
|
+
lg: string;
|
|
3116
|
+
};
|
|
3117
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
3118
|
+
fullHeight: {
|
|
3119
|
+
true: string;
|
|
3120
|
+
false: string;
|
|
3121
|
+
};
|
|
3122
|
+
padding: {
|
|
3123
|
+
none: string;
|
|
3124
|
+
sm: string;
|
|
3125
|
+
md: string;
|
|
3126
|
+
lg: string;
|
|
3127
|
+
};
|
|
3128
|
+
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
3129
|
+
fullHeight: {
|
|
3130
|
+
true: string;
|
|
3131
|
+
false: string;
|
|
3132
|
+
};
|
|
3133
|
+
padding: {
|
|
3134
|
+
none: string;
|
|
3135
|
+
sm: string;
|
|
3136
|
+
md: string;
|
|
3137
|
+
lg: string;
|
|
3138
|
+
};
|
|
3139
|
+
}, {
|
|
3140
|
+
fullHeight: {
|
|
3141
|
+
true: string;
|
|
3142
|
+
false: string;
|
|
3143
|
+
};
|
|
3144
|
+
padding: {
|
|
3145
|
+
none: string;
|
|
3146
|
+
sm: string;
|
|
3147
|
+
md: string;
|
|
3148
|
+
lg: string;
|
|
3149
|
+
};
|
|
3150
|
+
}>, unknown, unknown, undefined>>;
|
|
3151
|
+
interface VideoWithBackdropRootProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof videoWithBackdropVariants> {
|
|
3152
|
+
/** Video source URL (HLS .m3u8 or regular video file) */
|
|
3153
|
+
src?: string;
|
|
3154
|
+
/** Cloudflare Stream configuration (takes precedence over src) */
|
|
3155
|
+
cloudflare?: CloudflareConfig;
|
|
3156
|
+
/** Children to render */
|
|
3157
|
+
children: React$1.ReactNode;
|
|
3158
|
+
}
|
|
3159
|
+
/**
|
|
3160
|
+
* VideoWithBackdrop Root
|
|
3161
|
+
*
|
|
3162
|
+
* Container that provides video context to child components.
|
|
3163
|
+
* Use with VideoWithBackdrop.Backdrop and VideoWithBackdrop.Content.
|
|
3164
|
+
*
|
|
3165
|
+
* @example
|
|
3166
|
+
* ```tsx
|
|
3167
|
+
* <VideoWithBackdrop.Root cloudflare={config}>
|
|
3168
|
+
* <VideoWithBackdrop.Backdrop blur="high" overlay="vignette" />
|
|
3169
|
+
* <VideoWithBackdrop.Content>
|
|
3170
|
+
* <VideoWithBackdrop.Video />
|
|
3171
|
+
* </VideoWithBackdrop.Content>
|
|
3172
|
+
* </VideoWithBackdrop.Root>
|
|
3173
|
+
* ```
|
|
3174
|
+
*/
|
|
3175
|
+
declare const VideoWithBackdropRoot: React$1.ForwardRefExoticComponent<VideoWithBackdropRootProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3176
|
+
interface VideoWithBackdropBackdropProps extends Omit<BlurredVideoBackdropProps, "videoRef"> {
|
|
3177
|
+
}
|
|
3178
|
+
/**
|
|
3179
|
+
* VideoWithBackdrop Backdrop
|
|
3180
|
+
*
|
|
3181
|
+
* Renders the blurred video backdrop layer using canvas.
|
|
3182
|
+
* Automatically draws from the video element in context.
|
|
3183
|
+
*/
|
|
3184
|
+
declare const VideoWithBackdropBackdrop: React$1.ForwardRefExoticComponent<VideoWithBackdropBackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3185
|
+
interface VideoWithBackdropContentProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof contentVariants> {
|
|
3186
|
+
}
|
|
3187
|
+
/**
|
|
3188
|
+
* VideoWithBackdrop Content
|
|
3189
|
+
*
|
|
3190
|
+
* Container for the main video player and any additional content.
|
|
3191
|
+
* Positioned above the backdrop with z-index.
|
|
3192
|
+
*/
|
|
3193
|
+
declare const VideoWithBackdropContent: React$1.ForwardRefExoticComponent<VideoWithBackdropContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3194
|
+
interface VideoWithBackdropVideoProps extends Omit<VideoPlayerProps, "videoRef"> {
|
|
3195
|
+
/** Max width of the video player container */
|
|
3196
|
+
maxWidth?: string;
|
|
3197
|
+
}
|
|
3198
|
+
/**
|
|
3199
|
+
* VideoWithBackdrop Video
|
|
3200
|
+
*
|
|
3201
|
+
* Convenience wrapper for VideoPlayer that automatically connects
|
|
3202
|
+
* to the backdrop via context.
|
|
3203
|
+
*/
|
|
3204
|
+
declare const VideoWithBackdropVideo: React$1.ForwardRefExoticComponent<VideoWithBackdropVideoProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3205
|
+
interface VideoWithBackdropProps extends Omit<VideoPlayerProps, "videoRef" | "className" | "aspectRatio"> {
|
|
3206
|
+
/** Blur intensity (default: high) */
|
|
3207
|
+
blur?: BlurredVideoBackdropProps["blur"];
|
|
3208
|
+
/** Gradient overlay (default: vignette) */
|
|
3209
|
+
overlay?: BlurredVideoBackdropProps["overlay"];
|
|
3210
|
+
/** Backdrop opacity (default: 0.6) */
|
|
3211
|
+
backdropOpacity?: number;
|
|
3212
|
+
/** Max width of video player (default: 960px) */
|
|
3213
|
+
maxWidth?: string;
|
|
3214
|
+
/** Content padding (default: md) */
|
|
3215
|
+
padding?: "none" | "sm" | "md" | "lg";
|
|
3216
|
+
/** Video player rounded corners */
|
|
3217
|
+
rounded?: VideoPlayerProps["rounded"];
|
|
3218
|
+
/** Additional className for root container */
|
|
3219
|
+
className?: string;
|
|
3220
|
+
/** Target FPS for backdrop canvas (default: 30) */
|
|
3221
|
+
targetFps?: number;
|
|
3222
|
+
/** Canvas scale factor for backdrop (default: 0.5) */
|
|
3223
|
+
scale?: number;
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* VideoWithBackdrop - Pre-composed video player with blurred backdrop.
|
|
3227
|
+
*
|
|
3228
|
+
* A simple, ready-to-use component that combines VideoPlayer with
|
|
3229
|
+
* BlurredVideoBackdrop for modal video experiences. Uses canvas rendering
|
|
3230
|
+
* for optimal performance.
|
|
3231
|
+
*
|
|
3232
|
+
* For custom layouts, use the compound components:
|
|
3233
|
+
* - VideoWithBackdrop.Root
|
|
3234
|
+
* - VideoWithBackdrop.Backdrop
|
|
3235
|
+
* - VideoWithBackdrop.Content
|
|
3236
|
+
* - VideoWithBackdrop.Video
|
|
3237
|
+
*
|
|
3238
|
+
* @example
|
|
3239
|
+
* ```tsx
|
|
3240
|
+
* // Simple usage (in a full-height container like Dialog)
|
|
3241
|
+
* <VideoWithBackdrop
|
|
3242
|
+
* cloudflare={{ videoId: "...", customerCode: "..." }}
|
|
3243
|
+
* autoPlay
|
|
3244
|
+
* blur="high"
|
|
3245
|
+
* overlay="vignette"
|
|
3246
|
+
* />
|
|
3247
|
+
*
|
|
3248
|
+
* // With Dialog
|
|
3249
|
+
* <Dialog size="full" variant="minimal">
|
|
3250
|
+
* <VideoWithBackdrop cloudflare={config} autoPlay />
|
|
3251
|
+
* </Dialog>
|
|
3252
|
+
* ```
|
|
3253
|
+
*/
|
|
3254
|
+
declare const VideoWithBackdrop: React$1.ForwardRefExoticComponent<VideoWithBackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3255
|
+
declare const VideoWithBackdropParts: React$1.ForwardRefExoticComponent<VideoWithBackdropRootProps & React$1.RefAttributes<HTMLDivElement>> & {
|
|
3256
|
+
Root: React$1.ForwardRefExoticComponent<VideoWithBackdropRootProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3257
|
+
Backdrop: React$1.ForwardRefExoticComponent<VideoWithBackdropBackdropProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3258
|
+
Content: React$1.ForwardRefExoticComponent<VideoWithBackdropContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3259
|
+
Video: React$1.ForwardRefExoticComponent<VideoWithBackdropVideoProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3260
|
+
};
|
|
3261
|
+
|
|
3262
|
+
declare const cardVariants: tailwind_variants.TVReturnType<{
|
|
3263
|
+
layout: {
|
|
3264
|
+
vertical: string;
|
|
3265
|
+
horizontal: string;
|
|
3266
|
+
/**
|
|
3267
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3268
|
+
* Use with Background components for images/gradients.
|
|
3269
|
+
*/
|
|
3270
|
+
overlay: string;
|
|
3271
|
+
/**
|
|
3272
|
+
* Profile layout - square image with stacked content below.
|
|
3273
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3274
|
+
*/
|
|
3275
|
+
profile: string;
|
|
3276
|
+
/**
|
|
3277
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3278
|
+
* Ideal for news items, article previews, resource lists.
|
|
3279
|
+
*/
|
|
3280
|
+
compact: string;
|
|
3281
|
+
};
|
|
3282
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", tailwind_variants_dist_config_js.TVConfig<{
|
|
3283
|
+
layout: {
|
|
3284
|
+
vertical: string;
|
|
3285
|
+
horizontal: string;
|
|
3286
|
+
/**
|
|
3287
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3288
|
+
* Use with Background components for images/gradients.
|
|
3289
|
+
*/
|
|
3290
|
+
overlay: string;
|
|
3291
|
+
/**
|
|
3292
|
+
* Profile layout - square image with stacked content below.
|
|
3293
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3294
|
+
*/
|
|
3295
|
+
profile: string;
|
|
3296
|
+
/**
|
|
3297
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3298
|
+
* Ideal for news items, article previews, resource lists.
|
|
3299
|
+
*/
|
|
3300
|
+
compact: string;
|
|
3301
|
+
};
|
|
3302
|
+
}, {
|
|
3303
|
+
layout: {
|
|
3304
|
+
vertical: string;
|
|
3305
|
+
horizontal: string;
|
|
3306
|
+
/**
|
|
3307
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3308
|
+
* Use with Background components for images/gradients.
|
|
3309
|
+
*/
|
|
3310
|
+
overlay: string;
|
|
3311
|
+
/**
|
|
3312
|
+
* Profile layout - square image with stacked content below.
|
|
3313
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3314
|
+
*/
|
|
3315
|
+
profile: string;
|
|
3316
|
+
/**
|
|
3317
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3318
|
+
* Ideal for news items, article previews, resource lists.
|
|
3319
|
+
*/
|
|
3320
|
+
compact: string;
|
|
3321
|
+
};
|
|
3322
|
+
}>, {
|
|
3323
|
+
layout: {
|
|
3324
|
+
vertical: string;
|
|
3325
|
+
horizontal: string;
|
|
3326
|
+
/**
|
|
3327
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3328
|
+
* Use with Background components for images/gradients.
|
|
3329
|
+
*/
|
|
3330
|
+
overlay: string;
|
|
3331
|
+
/**
|
|
3332
|
+
* Profile layout - square image with stacked content below.
|
|
3333
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3334
|
+
*/
|
|
3335
|
+
profile: string;
|
|
3336
|
+
/**
|
|
3337
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3338
|
+
* Ideal for news items, article previews, resource lists.
|
|
3339
|
+
*/
|
|
3340
|
+
compact: string;
|
|
3341
|
+
};
|
|
3342
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
3343
|
+
layout: {
|
|
3344
|
+
vertical: string;
|
|
3345
|
+
horizontal: string;
|
|
3346
|
+
/**
|
|
3347
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3348
|
+
* Use with Background components for images/gradients.
|
|
3349
|
+
*/
|
|
3350
|
+
overlay: string;
|
|
3351
|
+
/**
|
|
3352
|
+
* Profile layout - square image with stacked content below.
|
|
3353
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3354
|
+
*/
|
|
3355
|
+
profile: string;
|
|
3356
|
+
/**
|
|
3357
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3358
|
+
* Ideal for news items, article previews, resource lists.
|
|
3359
|
+
*/
|
|
3360
|
+
compact: string;
|
|
3361
|
+
};
|
|
3362
|
+
}, undefined, "relative flex overflow-hidden rounded-surface-card bg-card-background stroke-surface-card border-border-subtle border-solid", tailwind_variants_dist_config_js.TVConfig<{
|
|
3363
|
+
layout: {
|
|
3364
|
+
vertical: string;
|
|
3365
|
+
horizontal: string;
|
|
3366
|
+
/**
|
|
3367
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3368
|
+
* Use with Background components for images/gradients.
|
|
3369
|
+
*/
|
|
3370
|
+
overlay: string;
|
|
3371
|
+
/**
|
|
3372
|
+
* Profile layout - square image with stacked content below.
|
|
3373
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3374
|
+
*/
|
|
3375
|
+
profile: string;
|
|
3376
|
+
/**
|
|
3377
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3378
|
+
* Ideal for news items, article previews, resource lists.
|
|
3379
|
+
*/
|
|
3380
|
+
compact: string;
|
|
3381
|
+
};
|
|
3382
|
+
}, {
|
|
3383
|
+
layout: {
|
|
3384
|
+
vertical: string;
|
|
3385
|
+
horizontal: string;
|
|
3386
|
+
/**
|
|
3387
|
+
* Overlay layout - content sits on top of full-bleed background.
|
|
3388
|
+
* Use with Background components for images/gradients.
|
|
3389
|
+
*/
|
|
3390
|
+
overlay: string;
|
|
3391
|
+
/**
|
|
3392
|
+
* Profile layout - square image with stacked content below.
|
|
3393
|
+
* Ideal for team member cards, user profiles, testimonials.
|
|
3394
|
+
*/
|
|
3395
|
+
profile: string;
|
|
3396
|
+
/**
|
|
3397
|
+
* Compact layout - small thumbnail with condensed horizontal content.
|
|
3398
|
+
* Ideal for news items, article previews, resource lists.
|
|
3399
|
+
*/
|
|
3400
|
+
compact: string;
|
|
3401
|
+
};
|
|
3402
|
+
}>, unknown, unknown, undefined>>;
|
|
3403
|
+
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
3404
|
+
}
|
|
3405
|
+
/**
|
|
3406
|
+
* Card component for displaying content in a contained, scannable format.
|
|
3407
|
+
*
|
|
3408
|
+
* Layouts:
|
|
3409
|
+
* - vertical: Image on top, content below (default)
|
|
3410
|
+
* - horizontal: Image on left, content on right
|
|
3411
|
+
* - overlay: Full-bleed background with content on top
|
|
3412
|
+
*
|
|
3413
|
+
* Use with CardImage, CardContent, CardEyebrow, CardTitle, CardDescription, and CardActions.
|
|
3414
|
+
* For overlay layout, use Background components for full-bleed backgrounds.
|
|
3415
|
+
*/
|
|
3416
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3417
|
+
declare const cardImageVariants: tailwind_variants.TVReturnType<{
|
|
3418
|
+
layout: {
|
|
3419
|
+
vertical: string;
|
|
3420
|
+
horizontal: string;
|
|
3421
|
+
overlay: string;
|
|
3422
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3423
|
+
profile: string;
|
|
3424
|
+
/** Compact: fixed small size for thumbnails */
|
|
3425
|
+
compact: string;
|
|
3426
|
+
};
|
|
3427
|
+
}, undefined, "relative shrink-0 bg-bg-muted", tailwind_variants_dist_config_js.TVConfig<{
|
|
3428
|
+
layout: {
|
|
3429
|
+
vertical: string;
|
|
3430
|
+
horizontal: string;
|
|
3431
|
+
overlay: string;
|
|
3432
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3433
|
+
profile: string;
|
|
3434
|
+
/** Compact: fixed small size for thumbnails */
|
|
3435
|
+
compact: string;
|
|
3436
|
+
};
|
|
3437
|
+
}, {
|
|
3438
|
+
layout: {
|
|
3439
|
+
vertical: string;
|
|
3440
|
+
horizontal: string;
|
|
3441
|
+
overlay: string;
|
|
3442
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3443
|
+
profile: string;
|
|
3444
|
+
/** Compact: fixed small size for thumbnails */
|
|
3445
|
+
compact: string;
|
|
3446
|
+
};
|
|
3447
|
+
}>, {
|
|
3448
|
+
layout: {
|
|
3449
|
+
vertical: string;
|
|
3450
|
+
horizontal: string;
|
|
3451
|
+
overlay: string;
|
|
3452
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3453
|
+
profile: string;
|
|
3454
|
+
/** Compact: fixed small size for thumbnails */
|
|
3455
|
+
compact: string;
|
|
3456
|
+
};
|
|
3457
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
3458
|
+
layout: {
|
|
3459
|
+
vertical: string;
|
|
3460
|
+
horizontal: string;
|
|
3461
|
+
overlay: string;
|
|
3462
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3463
|
+
profile: string;
|
|
3464
|
+
/** Compact: fixed small size for thumbnails */
|
|
3465
|
+
compact: string;
|
|
3466
|
+
};
|
|
3467
|
+
}, undefined, "relative shrink-0 bg-bg-muted", tailwind_variants_dist_config_js.TVConfig<{
|
|
3468
|
+
layout: {
|
|
3469
|
+
vertical: string;
|
|
3470
|
+
horizontal: string;
|
|
3471
|
+
overlay: string;
|
|
3472
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3473
|
+
profile: string;
|
|
3474
|
+
/** Compact: fixed small size for thumbnails */
|
|
3475
|
+
compact: string;
|
|
3476
|
+
};
|
|
3477
|
+
}, {
|
|
3478
|
+
layout: {
|
|
3479
|
+
vertical: string;
|
|
3480
|
+
horizontal: string;
|
|
3481
|
+
overlay: string;
|
|
3482
|
+
/** Profile: square aspect ratio for headshots/avatars */
|
|
3483
|
+
profile: string;
|
|
3484
|
+
/** Compact: fixed small size for thumbnails */
|
|
3485
|
+
compact: string;
|
|
3486
|
+
};
|
|
3487
|
+
}>, unknown, unknown, undefined>>;
|
|
3488
|
+
interface CardImageProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardImageVariants> {
|
|
3489
|
+
/**
|
|
3490
|
+
* The image source URL
|
|
3491
|
+
*/
|
|
3492
|
+
src?: string;
|
|
3493
|
+
/**
|
|
3494
|
+
* Alt text for the image
|
|
3495
|
+
*/
|
|
3496
|
+
alt?: string;
|
|
3497
|
+
}
|
|
3498
|
+
/**
|
|
3499
|
+
* Card image area with layout-specific styling.
|
|
3500
|
+
* - vertical: 16:9 aspect ratio, full width
|
|
3501
|
+
* - horizontal: ~40% width, stretches to content height
|
|
3502
|
+
* - profile: square aspect ratio for headshots/avatars
|
|
3503
|
+
* - compact: fixed small size for thumbnails
|
|
3504
|
+
*/
|
|
3505
|
+
declare const CardImage: React$1.ForwardRefExoticComponent<CardImageProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3506
|
+
declare const cardContentVariants: tailwind_variants.TVReturnType<{
|
|
3507
|
+
/**
|
|
3508
|
+
* Vertical alignment of content within the card.
|
|
3509
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
3510
|
+
*/
|
|
3511
|
+
justify: {
|
|
3512
|
+
start: string;
|
|
3513
|
+
center: string;
|
|
3514
|
+
end: string;
|
|
3515
|
+
};
|
|
3516
|
+
}, undefined, "flex w-full flex-1 flex-col gap-spatial-card-large-gap p-spatial-card-large-padding", tailwind_variants_dist_config_js.TVConfig<{
|
|
3517
|
+
/**
|
|
3518
|
+
* Vertical alignment of content within the card.
|
|
3519
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
3520
|
+
*/
|
|
3521
|
+
justify: {
|
|
3522
|
+
start: string;
|
|
3523
|
+
center: string;
|
|
3524
|
+
end: string;
|
|
3525
|
+
};
|
|
3526
|
+
}, {
|
|
3527
|
+
/**
|
|
3528
|
+
* Vertical alignment of content within the card.
|
|
3529
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
3530
|
+
*/
|
|
3531
|
+
justify: {
|
|
3532
|
+
start: string;
|
|
3533
|
+
center: string;
|
|
3534
|
+
end: string;
|
|
3535
|
+
};
|
|
3536
|
+
}>, {
|
|
3537
|
+
/**
|
|
3538
|
+
* Vertical alignment of content within the card.
|
|
3539
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
3540
|
+
*/
|
|
3541
|
+
justify: {
|
|
3542
|
+
start: string;
|
|
3543
|
+
center: string;
|
|
3544
|
+
end: string;
|
|
3545
|
+
};
|
|
3546
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
3547
|
+
/**
|
|
3548
|
+
* Vertical alignment of content within the card.
|
|
3549
|
+
* Useful for overlay layouts to position content at top/center/bottom.
|
|
2116
3550
|
*/
|
|
2117
3551
|
justify: {
|
|
2118
3552
|
start: string;
|
|
@@ -2748,6 +4182,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2748
4182
|
content: string[];
|
|
2749
4183
|
};
|
|
2750
4184
|
};
|
|
4185
|
+
/**
|
|
4186
|
+
* Vertical alignment of content within the hero.
|
|
4187
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4188
|
+
*/
|
|
4189
|
+
contentAlign: {
|
|
4190
|
+
top: {
|
|
4191
|
+
content: string;
|
|
4192
|
+
};
|
|
4193
|
+
center: {
|
|
4194
|
+
content: string;
|
|
4195
|
+
};
|
|
4196
|
+
bottom: {
|
|
4197
|
+
content: string;
|
|
4198
|
+
};
|
|
4199
|
+
};
|
|
2751
4200
|
colorScheme: {
|
|
2752
4201
|
dark: {
|
|
2753
4202
|
root: string;
|
|
@@ -2768,6 +4217,7 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2768
4217
|
top: string;
|
|
2769
4218
|
content: string[];
|
|
2770
4219
|
title: string;
|
|
4220
|
+
indicator: string;
|
|
2771
4221
|
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
2772
4222
|
variant: {
|
|
2773
4223
|
A1: {
|
|
@@ -2783,6 +4233,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2783
4233
|
content: string[];
|
|
2784
4234
|
};
|
|
2785
4235
|
};
|
|
4236
|
+
/**
|
|
4237
|
+
* Vertical alignment of content within the hero.
|
|
4238
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4239
|
+
*/
|
|
4240
|
+
contentAlign: {
|
|
4241
|
+
top: {
|
|
4242
|
+
content: string;
|
|
4243
|
+
};
|
|
4244
|
+
center: {
|
|
4245
|
+
content: string;
|
|
4246
|
+
};
|
|
4247
|
+
bottom: {
|
|
4248
|
+
content: string;
|
|
4249
|
+
};
|
|
4250
|
+
};
|
|
2786
4251
|
colorScheme: {
|
|
2787
4252
|
dark: {
|
|
2788
4253
|
root: string;
|
|
@@ -2813,6 +4278,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2813
4278
|
content: string[];
|
|
2814
4279
|
};
|
|
2815
4280
|
};
|
|
4281
|
+
/**
|
|
4282
|
+
* Vertical alignment of content within the hero.
|
|
4283
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4284
|
+
*/
|
|
4285
|
+
contentAlign: {
|
|
4286
|
+
top: {
|
|
4287
|
+
content: string;
|
|
4288
|
+
};
|
|
4289
|
+
center: {
|
|
4290
|
+
content: string;
|
|
4291
|
+
};
|
|
4292
|
+
bottom: {
|
|
4293
|
+
content: string;
|
|
4294
|
+
};
|
|
4295
|
+
};
|
|
2816
4296
|
colorScheme: {
|
|
2817
4297
|
dark: {
|
|
2818
4298
|
root: string;
|
|
@@ -2843,6 +4323,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2843
4323
|
content: string[];
|
|
2844
4324
|
};
|
|
2845
4325
|
};
|
|
4326
|
+
/**
|
|
4327
|
+
* Vertical alignment of content within the hero.
|
|
4328
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4329
|
+
*/
|
|
4330
|
+
contentAlign: {
|
|
4331
|
+
top: {
|
|
4332
|
+
content: string;
|
|
4333
|
+
};
|
|
4334
|
+
center: {
|
|
4335
|
+
content: string;
|
|
4336
|
+
};
|
|
4337
|
+
bottom: {
|
|
4338
|
+
content: string;
|
|
4339
|
+
};
|
|
4340
|
+
};
|
|
2846
4341
|
colorScheme: {
|
|
2847
4342
|
dark: {
|
|
2848
4343
|
root: string;
|
|
@@ -2863,6 +4358,7 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2863
4358
|
top: string;
|
|
2864
4359
|
content: string[];
|
|
2865
4360
|
title: string;
|
|
4361
|
+
indicator: string;
|
|
2866
4362
|
}, tailwind_variants.TVReturnType<{
|
|
2867
4363
|
variant: {
|
|
2868
4364
|
A1: {
|
|
@@ -2878,6 +4374,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2878
4374
|
content: string[];
|
|
2879
4375
|
};
|
|
2880
4376
|
};
|
|
4377
|
+
/**
|
|
4378
|
+
* Vertical alignment of content within the hero.
|
|
4379
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4380
|
+
*/
|
|
4381
|
+
contentAlign: {
|
|
4382
|
+
top: {
|
|
4383
|
+
content: string;
|
|
4384
|
+
};
|
|
4385
|
+
center: {
|
|
4386
|
+
content: string;
|
|
4387
|
+
};
|
|
4388
|
+
bottom: {
|
|
4389
|
+
content: string;
|
|
4390
|
+
};
|
|
4391
|
+
};
|
|
2881
4392
|
colorScheme: {
|
|
2882
4393
|
dark: {
|
|
2883
4394
|
root: string;
|
|
@@ -2898,6 +4409,7 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2898
4409
|
top: string;
|
|
2899
4410
|
content: string[];
|
|
2900
4411
|
title: string;
|
|
4412
|
+
indicator: string;
|
|
2901
4413
|
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
2902
4414
|
variant: {
|
|
2903
4415
|
A1: {
|
|
@@ -2913,6 +4425,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2913
4425
|
content: string[];
|
|
2914
4426
|
};
|
|
2915
4427
|
};
|
|
4428
|
+
/**
|
|
4429
|
+
* Vertical alignment of content within the hero.
|
|
4430
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4431
|
+
*/
|
|
4432
|
+
contentAlign: {
|
|
4433
|
+
top: {
|
|
4434
|
+
content: string;
|
|
4435
|
+
};
|
|
4436
|
+
center: {
|
|
4437
|
+
content: string;
|
|
4438
|
+
};
|
|
4439
|
+
bottom: {
|
|
4440
|
+
content: string;
|
|
4441
|
+
};
|
|
4442
|
+
};
|
|
2916
4443
|
colorScheme: {
|
|
2917
4444
|
dark: {
|
|
2918
4445
|
root: string;
|
|
@@ -2943,6 +4470,21 @@ declare const heroVariants: tailwind_variants.TVReturnType<{
|
|
|
2943
4470
|
content: string[];
|
|
2944
4471
|
};
|
|
2945
4472
|
};
|
|
4473
|
+
/**
|
|
4474
|
+
* Vertical alignment of content within the hero.
|
|
4475
|
+
* Provides a simpler API than variant for basic alignment needs.
|
|
4476
|
+
*/
|
|
4477
|
+
contentAlign: {
|
|
4478
|
+
top: {
|
|
4479
|
+
content: string;
|
|
4480
|
+
};
|
|
4481
|
+
center: {
|
|
4482
|
+
content: string;
|
|
4483
|
+
};
|
|
4484
|
+
bottom: {
|
|
4485
|
+
content: string;
|
|
4486
|
+
};
|
|
4487
|
+
};
|
|
2946
4488
|
colorScheme: {
|
|
2947
4489
|
dark: {
|
|
2948
4490
|
root: string;
|
|
@@ -2998,6 +4540,17 @@ interface HeroProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "title">,
|
|
|
2998
4540
|
* Use for USGovBanner, Navigation, etc.
|
|
2999
4541
|
*/
|
|
3000
4542
|
top?: React$1.ReactNode;
|
|
4543
|
+
/**
|
|
4544
|
+
* Indicator slot for scroll hints, arrows, or other visual cues.
|
|
4545
|
+
* Rendered at the bottom of the hero, below the main content.
|
|
4546
|
+
* @example
|
|
4547
|
+
* ```tsx
|
|
4548
|
+
* <Hero indicator={<ChevronDown className="animate-bounce" />}>
|
|
4549
|
+
* <h1>Welcome</h1>
|
|
4550
|
+
* </Hero>
|
|
4551
|
+
* ```
|
|
4552
|
+
*/
|
|
4553
|
+
indicator?: React$1.ReactNode;
|
|
3001
4554
|
/**
|
|
3002
4555
|
* Background for the hero. Can be:
|
|
3003
4556
|
* - A color string (hex, rgb, etc.) for solid backgrounds
|
|
@@ -3495,6 +5048,152 @@ interface ToutProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<ty
|
|
|
3495
5048
|
*/
|
|
3496
5049
|
declare const Tout: React$1.ForwardRefExoticComponent<ToutProps & React$1.RefAttributes<HTMLElement>>;
|
|
3497
5050
|
|
|
5051
|
+
/**
|
|
5052
|
+
* Design system breakpoint values in pixels.
|
|
5053
|
+
* These match the primitive breakpoint tokens from packages/tokens.
|
|
5054
|
+
*/
|
|
5055
|
+
declare const BREAKPOINTS: {
|
|
5056
|
+
readonly sm: 320;
|
|
5057
|
+
readonly md: 768;
|
|
5058
|
+
readonly lg: 1440;
|
|
5059
|
+
};
|
|
5060
|
+
type Breakpoint = keyof typeof BREAKPOINTS;
|
|
5061
|
+
/**
|
|
5062
|
+
* Hook to get the current responsive breakpoint.
|
|
5063
|
+
* Returns the active breakpoint name based on viewport width.
|
|
5064
|
+
*
|
|
5065
|
+
* @returns The current breakpoint: 'sm' | 'md' | 'lg'
|
|
5066
|
+
*
|
|
5067
|
+
* @example
|
|
5068
|
+
* ```tsx
|
|
5069
|
+
* function Component() {
|
|
5070
|
+
* const breakpoint = useBreakpoint();
|
|
5071
|
+
*
|
|
5072
|
+
* return (
|
|
5073
|
+
* <div>
|
|
5074
|
+
* {breakpoint === 'sm' && <MobileLayout />}
|
|
5075
|
+
* {breakpoint === 'md' && <TabletLayout />}
|
|
5076
|
+
* {breakpoint === 'lg' && <DesktopLayout />}
|
|
5077
|
+
* </div>
|
|
5078
|
+
* );
|
|
5079
|
+
* }
|
|
5080
|
+
* ```
|
|
5081
|
+
*/
|
|
5082
|
+
declare function useBreakpoint(): Breakpoint;
|
|
5083
|
+
/**
|
|
5084
|
+
* Hook to check if viewport is at or above a specific breakpoint.
|
|
5085
|
+
*
|
|
5086
|
+
* @param breakpoint - The minimum breakpoint to check against
|
|
5087
|
+
* @returns boolean indicating if viewport is at or above the breakpoint
|
|
5088
|
+
*
|
|
5089
|
+
* @example
|
|
5090
|
+
* ```tsx
|
|
5091
|
+
* function Component() {
|
|
5092
|
+
* const isDesktop = useMinBreakpoint('lg');
|
|
5093
|
+
* const isTabletUp = useMinBreakpoint('md');
|
|
5094
|
+
*
|
|
5095
|
+
* return isDesktop ? <DesktopView /> : <MobileView />;
|
|
5096
|
+
* }
|
|
5097
|
+
* ```
|
|
5098
|
+
*/
|
|
5099
|
+
declare function useMinBreakpoint(breakpoint: Breakpoint): boolean;
|
|
5100
|
+
/**
|
|
5101
|
+
* Hook to check if viewport is below a specific breakpoint.
|
|
5102
|
+
*
|
|
5103
|
+
* @param breakpoint - The breakpoint to check against
|
|
5104
|
+
* @returns boolean indicating if viewport is below the breakpoint
|
|
5105
|
+
*
|
|
5106
|
+
* @example
|
|
5107
|
+
* ```tsx
|
|
5108
|
+
* function Component() {
|
|
5109
|
+
* const isMobile = useMaxBreakpoint('md'); // Below tablet
|
|
5110
|
+
*
|
|
5111
|
+
* return isMobile ? <MobileNav /> : <DesktopNav />;
|
|
5112
|
+
* }
|
|
5113
|
+
* ```
|
|
5114
|
+
*/
|
|
5115
|
+
declare function useMaxBreakpoint(breakpoint: Breakpoint): boolean;
|
|
5116
|
+
|
|
5117
|
+
type EventMap<T> = T extends Window ? WindowEventMap : T extends Document ? DocumentEventMap : T extends HTMLElement ? HTMLElementEventMap : never;
|
|
5118
|
+
/**
|
|
5119
|
+
* Custom hook that attaches an event listener to a specified element.
|
|
5120
|
+
* Automatically handles cleanup on unmount and when dependencies change.
|
|
5121
|
+
*
|
|
5122
|
+
* @param eventName - The name of the event to listen for
|
|
5123
|
+
* @param handler - The callback function to execute when the event fires
|
|
5124
|
+
* @param element - The element to attach the listener to (defaults to window)
|
|
5125
|
+
* @param options - Optional event listener options
|
|
5126
|
+
*
|
|
5127
|
+
* @example
|
|
5128
|
+
* ```tsx
|
|
5129
|
+
* // Listen to window resize
|
|
5130
|
+
* useEventListener('resize', handleResize);
|
|
5131
|
+
*
|
|
5132
|
+
* // Listen to element scroll
|
|
5133
|
+
* useEventListener('scroll', handleScroll, containerRef.current);
|
|
5134
|
+
*
|
|
5135
|
+
* // With options
|
|
5136
|
+
* useEventListener('scroll', handleScroll, window, { passive: true });
|
|
5137
|
+
* ```
|
|
5138
|
+
*/
|
|
5139
|
+
declare function useEventListener<T extends Window | Document | HTMLElement, K extends keyof EventMap<T>>(eventName: K, handler: (event: EventMap<T>[K]) => void, element?: T | null, options?: boolean | AddEventListenerOptions): void;
|
|
5140
|
+
|
|
5141
|
+
interface UseVideoKeyboardOptions {
|
|
5142
|
+
/** Ref to the video element */
|
|
5143
|
+
videoRef: React$1.RefObject<HTMLVideoElement | null>;
|
|
5144
|
+
/** Whether keyboard handling is enabled (default: true) */
|
|
5145
|
+
enabled?: boolean;
|
|
5146
|
+
/** Seek amount in seconds for arrow keys (default: 5) */
|
|
5147
|
+
seekAmount?: number;
|
|
5148
|
+
/** Volume change amount for arrow keys (default: 0.1) */
|
|
5149
|
+
volumeStep?: number;
|
|
5150
|
+
/** Callback when play/pause is toggled */
|
|
5151
|
+
onTogglePlay?: () => void;
|
|
5152
|
+
/** Callback when fullscreen is toggled */
|
|
5153
|
+
onToggleFullscreen?: () => void;
|
|
5154
|
+
/** Callback when captions are toggled */
|
|
5155
|
+
onToggleCaptions?: () => void;
|
|
5156
|
+
/** Callback when controls should be shown */
|
|
5157
|
+
onShowControls?: () => void;
|
|
5158
|
+
}
|
|
5159
|
+
interface UseVideoKeyboardReturn {
|
|
5160
|
+
/** Key down handler to attach to container element */
|
|
5161
|
+
handleKeyDown: (e: React$1.KeyboardEvent) => void;
|
|
5162
|
+
/** Props to spread on the container element */
|
|
5163
|
+
containerProps: {
|
|
5164
|
+
onKeyDown: (e: React$1.KeyboardEvent) => void;
|
|
5165
|
+
tabIndex: number;
|
|
5166
|
+
role: string;
|
|
5167
|
+
"aria-label": string;
|
|
5168
|
+
};
|
|
5169
|
+
}
|
|
5170
|
+
/**
|
|
5171
|
+
* Hook for handling keyboard shortcuts in a video player.
|
|
5172
|
+
*
|
|
5173
|
+
* Supported shortcuts:
|
|
5174
|
+
* - Space: Play/pause
|
|
5175
|
+
* - Left Arrow: Seek backward
|
|
5176
|
+
* - Right Arrow: Seek forward
|
|
5177
|
+
* - Up Arrow: Volume up
|
|
5178
|
+
* - Down Arrow: Volume down
|
|
5179
|
+
* - M: Toggle mute
|
|
5180
|
+
* - F: Toggle fullscreen
|
|
5181
|
+
* - C: Toggle captions
|
|
5182
|
+
*
|
|
5183
|
+
* @example
|
|
5184
|
+
* ```tsx
|
|
5185
|
+
* const { containerProps } = useVideoKeyboard({
|
|
5186
|
+
* videoRef,
|
|
5187
|
+
* onTogglePlay: () => video.paused ? video.play() : video.pause(),
|
|
5188
|
+
* onToggleFullscreen: () => toggleFullscreen(),
|
|
5189
|
+
* onShowControls: () => setControlsVisible(true),
|
|
5190
|
+
* });
|
|
5191
|
+
*
|
|
5192
|
+
* return <div {...containerProps}>...</div>;
|
|
5193
|
+
* ```
|
|
5194
|
+
*/
|
|
5195
|
+
declare function useVideoKeyboard({ videoRef, enabled, seekAmount, volumeStep, onTogglePlay, onToggleFullscreen, onToggleCaptions, onShowControls, }: UseVideoKeyboardOptions): UseVideoKeyboardReturn;
|
|
5196
|
+
|
|
3498
5197
|
declare function cn(...inputs: ClassValue[]): tailwind_variants.CnReturn;
|
|
3499
5198
|
|
|
3500
5199
|
/**
|
|
@@ -3518,6 +5217,11 @@ interface ThemeProviderProps {
|
|
|
3518
5217
|
color?: ColorThemeName;
|
|
3519
5218
|
/** Surface theme name (defaults to "base") */
|
|
3520
5219
|
surface?: SurfaceThemeName;
|
|
5220
|
+
/**
|
|
5221
|
+
* Custom project theme created with defineTheme()
|
|
5222
|
+
* When provided, overrides color/surface props with custom theme tokens
|
|
5223
|
+
*/
|
|
5224
|
+
customTheme?: ResolvedProjectTheme;
|
|
3521
5225
|
/** Children to render */
|
|
3522
5226
|
children: ReactNode;
|
|
3523
5227
|
/** Optional className for the wrapper div */
|
|
@@ -3542,13 +5246,28 @@ interface ThemeProviderProps {
|
|
|
3542
5246
|
* <App />
|
|
3543
5247
|
* </ThemeProvider>
|
|
3544
5248
|
*
|
|
3545
|
-
* //
|
|
3546
|
-
*
|
|
5249
|
+
* // Use a custom project theme
|
|
5250
|
+
* import { defineTheme, srgb } from "@nds-design-system/tokens";
|
|
5251
|
+
*
|
|
5252
|
+
* const myTheme = defineTheme({
|
|
5253
|
+
* name: "my-project",
|
|
5254
|
+
* extends: "base",
|
|
5255
|
+
* tokens: {
|
|
5256
|
+
* semantic: {
|
|
5257
|
+
* color: {
|
|
5258
|
+
* bg: { page: srgb("#FEFDF9") },
|
|
5259
|
+
* accent: { brand: srgb("#A68B5E") },
|
|
5260
|
+
* },
|
|
5261
|
+
* },
|
|
5262
|
+
* },
|
|
5263
|
+
* });
|
|
5264
|
+
*
|
|
5265
|
+
* <ThemeProvider customTheme={myTheme}>
|
|
3547
5266
|
* <App />
|
|
3548
5267
|
* </ThemeProvider>
|
|
3549
5268
|
* ```
|
|
3550
5269
|
*/
|
|
3551
|
-
declare function ThemeProvider({ color, surface, children, className, applyStyles, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
5270
|
+
declare function ThemeProvider({ color, surface, customTheme, children, className, applyStyles, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
3552
5271
|
|
|
3553
5272
|
/**
|
|
3554
5273
|
* Theme Hooks
|
|
@@ -3618,4 +5337,4 @@ declare function mergeCSSVars(...maps: CSSVariableMap[]): CSSVariableMap;
|
|
|
3618
5337
|
*/
|
|
3619
5338
|
declare function filterCSSVars(cssVars: CSSVariableMap, prefix: string): CSSVariableMap;
|
|
3620
5339
|
|
|
3621
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, BackgroundCompound as Background, BackgroundGradient, type BackgroundGradientProps, BackgroundImage, type BackgroundImageProps, BackgroundOverlay, type BackgroundOverlayProps, type BackgroundProps, BackgroundStream, type BackgroundStreamProps, BackgroundVideo, type BackgroundVideoProps, Banner, type BannerProps, Button, type ButtonProps, type ButtonTheme, Card, CardActions, type CardActionsProps, CardBody, type CardBodyProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardEyebrow, type CardEyebrowProps, CardGrid, type CardGridProps, CardImage, type CardImageProps, type CardProps, CardTitle, type CardTitleProps, type ColorToken, type ComponentTheme, type ComponentThemeColors, type ComponentThemeSpatial, type ComponentThemeSurface, DEFAULT_TITLE_TYPOGRAPHY, DevToolbar, type DevToolbarProps, FONT_SIZES, FaqSection, type FaqSectionProps, type FontSizeToken, GridOverlay, type GridOverlayProps, Hero, BackgroundCompound as HeroBackground, BackgroundImage as HeroBackgroundImage, type BackgroundImageProps as HeroBackgroundImageProps, BackgroundStream as HeroBackgroundStream, type BackgroundStreamProps as HeroBackgroundStreamProps, BackgroundVideo as HeroBackgroundVideo, type BackgroundVideoProps as HeroBackgroundVideoProps, HeroContent, type HeroContentProps, BackgroundGradient as HeroGradient, type BackgroundGradientProps as HeroGradientProps, HeroHeader, type HeroHeaderProps, BackgroundOverlay as HeroOverlay, type BackgroundOverlayProps as HeroOverlayProps, type HeroProps, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputGroupTextarea, type InputGroupTextareaProps, type InputProps, Navbar, NavbarActions, type NavbarActionsProps, NavbarBrand, type NavbarBrandProps, NavbarLink, type NavbarLinkProps, NavbarLinks, type NavbarLinksProps, NavbarMobileMenu, NavbarMobileMenuButton, type NavbarMobileMenuButtonProps, NavbarMobileMenuLink, type NavbarMobileMenuLinkProps, type NavbarMobileMenuProps, type NavbarProps, NdstudioFooter, type NdstudioFooterProps, PagerControl, type PagerControlProps, Popover, PopoverArrow, type PopoverArrowProps, PopoverBackdrop, type PopoverBackdropProps, PopoverClose, type PopoverCloseProps, PopoverDescription, type PopoverDescriptionProps, PopoverParts, PopoverPopup, type PopoverPopupProps, PopoverPortal, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerProps, type PopoverProps, PopoverRoot, type PopoverRootProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, Prose, type ProseProps, ProseSection, type ProseSectionProps, QuoteBlock, type QuoteBlockProps, type RadiusToken, River, type RiverProps, Select, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectOption, type SelectOptionProps, SelectPopup, type SelectPopupProps, type SelectProps, SelectRoot, SelectTrigger, type SelectTriggerProps, type SpacingToken, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipParts, TooltipPopup, type TooltipPopupProps, TooltipPortal, type TooltipPortalProps, TooltipPositioner, type TooltipPositionerProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps, Tout, type ToutProps, TwoColumnSection, type TwoColumnSectionProps, USGovBanner, type USGovBannerProps, applyTheme, backgroundGradientVariants, backgroundImageVariants, backgroundOverlayVariants, backgroundStreamVariants, backgroundVariants, backgroundVideoVariants, bannerVariants, buttonThemeToStyleVars, buttonVariants, cardGridVariants, cardVariants, cn, 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 };
|
|
5340
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, BLUR_AMOUNTS, BREAKPOINTS, BackgroundCompound as Background, BackgroundGradient, type BackgroundGradientProps, BackgroundImage, type BackgroundImageProps, BackgroundOverlay, type BackgroundOverlayProps, type BackgroundProps, BackgroundStream, type BackgroundStreamProps, BackgroundVideo, type BackgroundVideoProps, Banner, type BannerProps, type BlurIntensity, BlurredVideoBackdrop, type BlurredVideoBackdropProps, type Breakpoint, Button, type ButtonProps, type ButtonTheme, type CaptionCue, CaptionOverlay, type CaptionOverlayProps, Card, CardActions, type CardActionsProps, CardBody, type CardBodyProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardEyebrow, type CardEyebrowProps, CardGrid, type CardGridProps, CardImage, type CardImageProps, type CardProps, CardTitle, type CardTitleProps, type ColorToken, type ComponentTheme, type ComponentThemeColors, type ComponentThemeSpatial, type ComponentThemeSurface, DEFAULT_TITLE_TYPOGRAPHY, DevToolbar, type DevToolbarProps, Dialog, DialogBackdrop, type DialogBackdropProps, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogParts, DialogPopup, type DialogPopupProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogRoot, type DialogRootProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, FONT_SIZES, FaqSection, type FaqSectionProps, type FontSizeToken, GridOverlay, type GridOverlayProps, Hero, BackgroundCompound as HeroBackground, BackgroundImage as HeroBackgroundImage, type BackgroundImageProps as HeroBackgroundImageProps, BackgroundStream as HeroBackgroundStream, type BackgroundStreamProps as HeroBackgroundStreamProps, BackgroundVideo as HeroBackgroundVideo, type BackgroundVideoProps as HeroBackgroundVideoProps, HeroContent, type HeroContentProps, BackgroundGradient as HeroGradient, type BackgroundGradientProps as HeroGradientProps, HeroHeader, type HeroHeaderProps, BackgroundOverlay as HeroOverlay, type BackgroundOverlayProps as HeroOverlayProps, type HeroProps, IconButton, type IconButtonProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputGroupTextarea, type InputGroupTextareaProps, type InputProps, Navbar, NavbarActions, type NavbarActionsProps, NavbarBrand, type NavbarBrandProps, NavbarLink, type NavbarLinkProps, NavbarLinks, type NavbarLinksProps, NavbarMobileMenu, NavbarMobileMenuButton, type NavbarMobileMenuButtonProps, NavbarMobileMenuLink, type NavbarMobileMenuLinkProps, type NavbarMobileMenuProps, type NavbarProps, NdstudioFooter, type NdstudioFooterProps, type OverlayType, PagerControl, type PagerControlProps, Popover, PopoverArrow, type PopoverArrowProps, PopoverBackdrop, type PopoverBackdropProps, PopoverClose, type PopoverCloseProps, PopoverDescription, type PopoverDescriptionProps, PopoverParts, PopoverPopup, type PopoverPopupProps, PopoverPortal, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerProps, type PopoverProps, PopoverRoot, type PopoverRootProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, Prose, type ProseProps, ProseSection, type ProseSectionProps, QuoteBlock, type QuoteBlockProps, type RadiusToken, River, type RiverProps, Select, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectOption, type SelectOptionProps, SelectPopup, type SelectPopupProps, type SelectProps, SelectRoot, SelectTrigger, type SelectTriggerProps, type SpacingToken, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipParts, TooltipPopup, type TooltipPopupProps, TooltipPortal, type TooltipPortalProps, TooltipPositioner, type TooltipPositionerProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps, Tout, type ToutProps, TwoColumnSection, type TwoColumnSectionProps, USGovBanner, type USGovBannerProps, type UseCanvasBlurOptions, type UseCanvasBlurReturn, type UseVideoKeyboardOptions, type UseVideoKeyboardReturn, VideoDialog, type VideoDialogProps, VideoPlayer, type VideoPlayerProps, VideoWithBackdrop, VideoWithBackdropBackdrop, type VideoWithBackdropBackdropProps, VideoWithBackdropContent, type VideoWithBackdropContentProps, VideoWithBackdropParts, type VideoWithBackdropProps, VideoWithBackdropRoot, type VideoWithBackdropRootProps, VideoWithBackdropVideo, type VideoWithBackdropVideoProps, 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 };
|