highsoft-ui 1.0.145 → 1.0.147
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/CLAUDE.md +15 -1
- package/dist/{Button-DIGyNR41.js → Button-BGsqFCRW.js} +1 -1
- package/dist/{ButtonGroup-BSQzx-sZ.js → ButtonGroup-DKfaXOeS.js} +1 -1
- package/dist/{Checkbox-wlH6EGWW.js → Checkbox-CniRhVkQ.js} +1 -1
- package/dist/{CodeBlock-DtTAC5ru.js → CodeBlock-BeseY88j.js} +5 -5
- package/dist/{CookiePolicyModal-CGRXL0wR.js → CookiePolicyModal-k89sCBEJ.js} +2 -2
- package/dist/{CopyCode-_MHQorJS.js → CopyCode-_yeXCeeq.js} +3 -3
- package/dist/{Dropdown-CVyrHJiC.js → Dropdown-B_Ib6i1c.js} +1 -1
- package/dist/{Footer-DW2asf8g.js → Footer-_P2pj3K7.js} +8 -8
- package/dist/{FooterBottom-CP0f9kYj.js → FooterBottom-CqpN8Wky.js} +1 -1
- package/dist/{FooterHelp-BxDXmtHK.js → FooterHelp-Cb5sraAE.js} +3 -3
- package/dist/{FooterLinks-BZwAVSm4.js → FooterLinks-CogdK_5Z.js} +2 -2
- package/dist/{Header-DQ1xi25C.js → Header-CVKH_INR.js} +25 -25
- package/dist/{InputGrouped-BE3zLov9.js → InputGrouped-CHGCMmsK.js} +11 -11
- package/dist/{Label-C_KZM-FN.js → Label-CgiWi1v6.js} +1 -1
- package/dist/{NewsletterSignup-CJAI81M3.js → NewsletterSignup-DrcPfdrg.js} +2 -2
- package/dist/{Notification-C2kN_ceR.js → Notification-B3skQvZE.js} +3 -3
- package/dist/{PrefPanel-BZUX1nfw.js → PrefPanel-BGw72I_D.js} +10 -10
- package/dist/{RoadmapDetails-CfayA5CZ.js → RoadmapDetails-XS0OylnP.js} +5 -5
- package/dist/{Search-Cw_e1PyF.js → Search-UPVxQliM.js} +12 -12
- package/dist/{SearchDropdown-ECOTZ1Uf.js → SearchDropdown-L_rQz1vn.js} +1 -1
- package/dist/VideoCover-DqMDvzvA.js +195 -0
- package/dist/VideoPlayer-Cq_garSg.js +455 -0
- package/dist/{VideoPlayerModal-DbP3OjSF.js → VideoPlayerModal-D1v1O2kW.js} +2 -2
- package/dist/{YoutubeModal-D_ZHayEn.js → YoutubeModal-BBYdQil8.js} +4 -2
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/SearchDropdown/index.js +1 -1
- package/dist/components/Sidebar/Sidebar.js +1 -1
- package/dist/components/VideoCover/index.js +1 -1
- package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/components/VideoPlayer/useMediaEngine.js +58 -55
- package/dist/{create-element-WbENDceu.js → create-element-CDnUGrhg.js} +1 -1
- package/dist/{esm-B0YmMAXt.js → esm-BnxclXHW.js} +121 -51
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/VideoCover/index.d.ts +39 -5
- package/dist/lib/components/VideoPlayer/index.d.ts +33 -1
- package/dist/lib/main.d.ts +1 -1
- package/dist/main.js +18 -18
- package/dist/{prism-light-C4xXs3Qn.js → prism-light-COlcVrfu.js} +1 -1
- package/dist/scss/variables.scss +25 -20
- package/package.json +1 -1
- package/dist/VideoCover-BN8wnHpf.js +0 -92
- package/dist/VideoPlayer-CKjq7IRq.js +0 -324
|
@@ -19,7 +19,12 @@ export interface VideoCoverProps {
|
|
|
19
19
|
fit?: 'cover' | 'contain' | 'fill';
|
|
20
20
|
/** Autoplay on mount. Default `true`. */
|
|
21
21
|
autoPlay?: boolean;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Loop when the video ends. Default `false` — covers play through once and
|
|
24
|
+
* settle on their final frame (with the control offering replay), keeping
|
|
25
|
+
* automatic motion under WCAG 2.2.2's five-second threshold. Opt in to
|
|
26
|
+
* looping only for genuinely ambient video.
|
|
27
|
+
*/
|
|
23
28
|
loop?: boolean;
|
|
24
29
|
/** Start muted — required for autoplay. Default `true`. */
|
|
25
30
|
muted?: boolean;
|
|
@@ -53,6 +58,33 @@ export interface VideoCoverProps {
|
|
|
53
58
|
aspectRatio?: string;
|
|
54
59
|
/** Corner radius in px. Default `0`. */
|
|
55
60
|
radius?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Show a small always-visible playback toggle in the corner (WCAG 2.2.2
|
|
63
|
+
* "Pause, Stop, Hide"). Three states: pause while the video plays, replay
|
|
64
|
+
* once it has ended (`loop={false}`), and play when it isn't running —
|
|
65
|
+
* e.g. for reduced-motion users, who can still opt in to playback.
|
|
66
|
+
* Default `true`. Disable it only for videos that don't loop and finish
|
|
67
|
+
* within ~5 seconds (where WCAG doesn't require a control), or when the
|
|
68
|
+
* cover itself is wrapped in an interactive trigger — a nested button is
|
|
69
|
+
* invalid HTML (see the Footer's video tile).
|
|
70
|
+
*/
|
|
71
|
+
playControl?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Only play while the cover is actually in the viewport: autoplay waits
|
|
74
|
+
* until ~20% of it is visible, scrolling away pauses, scrolling back
|
|
75
|
+
* resumes. A pause from the toggle is sticky — re-entering the viewport
|
|
76
|
+
* never overrides it — and an ended `loop={false}` video stays on its end
|
|
77
|
+
* frame instead of replaying on re-entry. Default `true`. Set `false` to
|
|
78
|
+
* start playback as soon as the video loads, visible or not.
|
|
79
|
+
*/
|
|
80
|
+
playWhenVisible?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Short informational text rendered below the cover — a small annotation
|
|
83
|
+
* icon plus tertiary caption. The component wraps itself in a `<figure>` with
|
|
84
|
+
* the caption as its `<figcaption>`; `className`/`style`/`ref` stay on the
|
|
85
|
+
* cover box itself.
|
|
86
|
+
*/
|
|
87
|
+
caption?: ReactNode;
|
|
56
88
|
/**
|
|
57
89
|
* Overlay content rendered on top of the video (icons, captions, a play
|
|
58
90
|
* badge, …). Interactive by default; pointer events pass through the video.
|
|
@@ -67,9 +99,11 @@ export interface VideoCoverProps {
|
|
|
67
99
|
style?: CSSProperties;
|
|
68
100
|
}
|
|
69
101
|
/**
|
|
70
|
-
* A chrome-less background/cover video — autoplays muted
|
|
71
|
-
*
|
|
72
|
-
* playback engine
|
|
73
|
-
*
|
|
102
|
+
* A chrome-less background/cover video — autoplays muted once it scrolls into
|
|
103
|
+
* view, plays through a single time, and stretches to fill its box like
|
|
104
|
+
* `object-fit: cover` on an image. No playback engine and no provider SDKs;
|
|
105
|
+
* just a self-hosted `<video>` with built-in lazy loading, an always-visible
|
|
106
|
+
* pause/play/replay toggle (see `playControl`), and an optional overlay for
|
|
107
|
+
* arbitrary `children`.
|
|
74
108
|
*/
|
|
75
109
|
export declare const VideoCover: import('react').ForwardRefExoticComponent<VideoCoverProps & import('react').RefAttributes<HTMLVideoElement>>;
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
/** A single `<source>` entry for the underlying `<video>`. */
|
|
3
3
|
export interface VideoPlayerSource {
|
|
4
4
|
src: string;
|
|
5
5
|
/** MIME type, e.g. `video/mp4`. */
|
|
6
6
|
type?: string;
|
|
7
7
|
}
|
|
8
|
+
/** A WebVTT text track for the underlying `<video>` (self-hosted only). */
|
|
9
|
+
export interface VideoPlayerTrack {
|
|
10
|
+
/** URL of the `.vtt` file. */
|
|
11
|
+
src: string;
|
|
12
|
+
/** Language of the track, e.g. `en`. */
|
|
13
|
+
srclang: string;
|
|
14
|
+
/** Human-readable label shown for the track, e.g. `English`. */
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Track kind. `captions` (default) and `subtitles` are cycled by the CC
|
|
18
|
+
* button; `descriptions` tracks are exposed to assistive tech only.
|
|
19
|
+
*/
|
|
20
|
+
kind?: 'captions' | 'subtitles' | 'descriptions';
|
|
21
|
+
/** Show this track when the player mounts. */
|
|
22
|
+
default?: boolean;
|
|
23
|
+
}
|
|
8
24
|
export interface VideoPlayerProps {
|
|
9
25
|
/**
|
|
10
26
|
* Video URL. A YouTube or Vimeo link is auto-detected and driven through the
|
|
@@ -35,6 +51,22 @@ export interface VideoPlayerProps {
|
|
|
35
51
|
* color; accepts any CSS color or `<image>` value (e.g. a `linear-gradient`).
|
|
36
52
|
*/
|
|
37
53
|
accentGradient?: string;
|
|
54
|
+
/**
|
|
55
|
+
* WebVTT text tracks (captions/subtitles/descriptions) for self-hosted
|
|
56
|
+
* video. Adds a CC toggle to the control bar that cycles the available
|
|
57
|
+
* caption/subtitle tracks (also on the `c` key). Ignored for YouTube/Vimeo
|
|
58
|
+
* sources — provider embeds carry their own caption rendering.
|
|
59
|
+
*/
|
|
60
|
+
tracks?: VideoPlayerTrack[];
|
|
61
|
+
/**
|
|
62
|
+
* Written transcript, docked as a panel directly below the player and
|
|
63
|
+
* toggled from a control-bar button (also on the `t` key) — the
|
|
64
|
+
* WCAG-friendly companion to captions for users who prefer reading,
|
|
65
|
+
* search, or assistive tech. Any React content.
|
|
66
|
+
*/
|
|
67
|
+
transcript?: ReactNode;
|
|
68
|
+
/** Accessible name for the transcript panel. Default `Transcript`. */
|
|
69
|
+
transcriptTitle?: string;
|
|
38
70
|
/** Accessible label for the player region. */
|
|
39
71
|
'aria-label'?: string;
|
|
40
72
|
className?: string;
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export { SidebarLayout, SidebarMain, Sidebar, SidebarHeader, SidebarBody, Sideba
|
|
|
59
59
|
export type { SidebarLayoutProps, SidebarProps, SidebarSectionProps, NavItemProps, NavGroupProps, NavDisclosureProps, SidebarLayoutContextValue } from './components/Sidebar';
|
|
60
60
|
export { PrefPanel } from './components/PrefPanel';
|
|
61
61
|
export { VideoPlayer } from './components/VideoPlayer';
|
|
62
|
-
export type { VideoPlayerProps, VideoPlayerSource } from './components/VideoPlayer';
|
|
62
|
+
export type { VideoPlayerProps, VideoPlayerSource, VideoPlayerTrack } from './components/VideoPlayer';
|
|
63
63
|
export { VideoPlayerModal } from './components/VideoPlayer/VideoPlayerModal';
|
|
64
64
|
export type { VideoPlayerModalProps } from './components/VideoPlayer/VideoPlayerModal';
|
|
65
65
|
export { VideoCover } from './components/VideoCover';
|
package/dist/main.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { c as e, d as t, r as n, s as r, u as i } from "./utils-K9S_6_Eq.js";
|
|
2
2
|
import { t as a } from "./Box-BZgeSeCV.js";
|
|
3
|
-
import { t as o } from "./Button-
|
|
4
|
-
import { t as s } from "./CopyCode-
|
|
3
|
+
import { t as o } from "./Button-BGsqFCRW.js";
|
|
4
|
+
import { t as s } from "./CopyCode-_yeXCeeq.js";
|
|
5
5
|
import { t as c } from "./FrameworkIcon-Ds6WrxO0.js";
|
|
6
|
-
import { t as l } from "./CodeBlock-
|
|
6
|
+
import { t as l } from "./CodeBlock-BeseY88j.js";
|
|
7
7
|
import { t as u } from "./Icon-VeXJMj8Q.js";
|
|
8
8
|
import { t as d } from "./Link-CYR92_U0.js";
|
|
9
9
|
import { t as f } from "./ProductIcon-DFLAYWbu.js";
|
|
10
|
-
import { t as p } from "./ButtonGroup-
|
|
10
|
+
import { t as p } from "./ButtonGroup-DKfaXOeS.js";
|
|
11
11
|
import { t as m } from "./InputSolo-DUdKtZjX.js";
|
|
12
|
-
import { t as h } from "./SearchDropdown-
|
|
13
|
-
import { i as g, n as _, r as v, t as y } from "./InputGrouped-
|
|
12
|
+
import { t as h } from "./SearchDropdown-L_rQz1vn.js";
|
|
13
|
+
import { i as g, n as _, r as v, t as y } from "./InputGrouped-CHGCMmsK.js";
|
|
14
14
|
import { t as b } from "./Container-BDssaLig.js";
|
|
15
15
|
import { t as x } from "./DiscordInvite-CLYxexdH.js";
|
|
16
16
|
import { t as S } from "./Heading-DNDHqYWO.js";
|
|
17
17
|
import { t as C } from "./Typography-AvvBRu-u.js";
|
|
18
18
|
import { t as w } from "./Logo-Bz0G2G-k.js";
|
|
19
|
-
import { t as T } from "./NewsletterSignup-
|
|
20
|
-
import { n as E, r as D, t as O } from "./Dropdown-
|
|
21
|
-
import { t as k } from "./PrefPanel-
|
|
22
|
-
import { n as A, t as j } from "./Label-
|
|
23
|
-
import { t as M } from "./VideoCover-
|
|
24
|
-
import { t as N } from "./VideoPlayer-
|
|
25
|
-
import { t as P } from "./VideoPlayerModal-
|
|
26
|
-
import { t as F } from "./Footer-
|
|
19
|
+
import { t as T } from "./NewsletterSignup-DrcPfdrg.js";
|
|
20
|
+
import { n as E, r as D, t as O } from "./Dropdown-B_Ib6i1c.js";
|
|
21
|
+
import { t as k } from "./PrefPanel-BGw72I_D.js";
|
|
22
|
+
import { n as A, t as j } from "./Label-CgiWi1v6.js";
|
|
23
|
+
import { t as M } from "./VideoCover-DqMDvzvA.js";
|
|
24
|
+
import { t as N } from "./VideoPlayer-Cq_garSg.js";
|
|
25
|
+
import { t as P } from "./VideoPlayerModal-D1v1O2kW.js";
|
|
26
|
+
import { t as F } from "./Footer-_P2pj3K7.js";
|
|
27
27
|
import { n as I } from "./GPTInput-C0YG1990.js";
|
|
28
|
-
import { t as L } from "./Notification-
|
|
29
|
-
import { n as R, t as z } from "./Header-
|
|
28
|
+
import { t as L } from "./Notification-B3skQvZE.js";
|
|
29
|
+
import { n as R, t as z } from "./Header-CVKH_INR.js";
|
|
30
30
|
import { t as B } from "./Tabs-BuDaPqdN.js";
|
|
31
31
|
import { n as V, t as H } from "./RadioBox-o1Ssyj0s.js";
|
|
32
|
-
import { n as U, t as W } from "./Checkbox-
|
|
32
|
+
import { n as U, t as W } from "./Checkbox-CniRhVkQ.js";
|
|
33
33
|
import { Modal as G } from "./components/Modal/index.js";
|
|
34
|
-
import { t as K } from "./RoadmapDetails-
|
|
34
|
+
import { t as K } from "./RoadmapDetails-XS0OylnP.js";
|
|
35
35
|
import { ModalContactFooter as q } from "./components/Modal/ModalContactFooter.js";
|
|
36
36
|
import { useOptionalSidebarLayout as J, useSidebarLayout as Y } from "./components/Sidebar/context.js";
|
|
37
37
|
import { SidebarLayout as X, SidebarMain as Z } from "./components/Sidebar/SidebarLayout.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e } from "./chunk-jwUa06l-.js";
|
|
2
|
-
import { r as t, t as n } from "./create-element-
|
|
2
|
+
import { r as t, t as n } from "./create-element-CDnUGrhg.js";
|
|
3
3
|
import r from "react";
|
|
4
4
|
//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
5
5
|
function i(e, t) {
|
package/dist/scss/variables.scss
CHANGED
|
@@ -300,7 +300,7 @@ $body-1000: var(--typography-size-1000);
|
|
|
300
300
|
--button-colors-plain-stroke-inner-default: rgba(0, 0, 0, 0.12);
|
|
301
301
|
--button-colors-plain-stroke-outer-default: transparent;
|
|
302
302
|
--button-colors-plain-stroke-outer-hover: var(--primitives-neutral-200);
|
|
303
|
-
--button-colors-plain-stroke-outer-disabled:
|
|
303
|
+
--button-colors-plain-stroke-outer-disabled: transparent;
|
|
304
304
|
--button-colors-plain-stroke-outer-pressed: var(--primitives-neutral-200);
|
|
305
305
|
|
|
306
306
|
--button-colors-transparent-background-default: rgba(255, 255, 255, 0);
|
|
@@ -496,21 +496,22 @@ $body-1000: var(--typography-size-1000);
|
|
|
496
496
|
--button-transparent-border-hover: #00000060;
|
|
497
497
|
|
|
498
498
|
--button-colors-neutral-background-default: var(--primitives-neutral-50);
|
|
499
|
-
--button-colors-neutral-background-disabled: var(--primitives-neutral-
|
|
499
|
+
--button-colors-neutral-background-disabled: var(--primitives-neutral-750);
|
|
500
500
|
--button-colors-neutral-background-focus: var(--primitives-neutral-0);
|
|
501
501
|
--button-colors-neutral-background-hover: var(--primitives-neutral-0);
|
|
502
502
|
--button-colors-neutral-background-pressed: var(--primitives-neutral-0);
|
|
503
503
|
--button-colors-neutral-stroke-inner: #ffffff0a;
|
|
504
504
|
--button-colors-neutral-stroke-outer-default: var(--primitives-neutral-1000);
|
|
505
|
+
--button-colors-neutral-stroke-outer-disabled: var(--primitives-neutral-1000);
|
|
505
506
|
--button-colors-neutral-stroke-outer-hover: var(--primitives-neutral-1000);
|
|
506
507
|
--button-colors-neutral-text-default: var(--primitives-neutral-1000);
|
|
507
|
-
--button-colors-neutral-text-disabled: var(--primitives-neutral-
|
|
508
|
+
--button-colors-neutral-text-disabled: var(--primitives-neutral-400);
|
|
508
509
|
--button-colors-neutral-text-focus: var(--primitives-neutral-1000);
|
|
509
510
|
--button-colors-neutral-text-hover: var(--primitives-neutral-1000);
|
|
510
511
|
--button-colors-neutral-text-pressed: var(--primitives-neutral-1000);
|
|
511
512
|
|
|
512
513
|
--button-colors-soft-background-default: var(--primitives-neutral-800);
|
|
513
|
-
--button-colors-soft-background-disabled: var(--primitives-neutral-
|
|
514
|
+
--button-colors-soft-background-disabled: var(--primitives-neutral-750);
|
|
514
515
|
--button-colors-soft-background-focus: var(--primitives-neutral-700);
|
|
515
516
|
--button-colors-soft-background-hover: var(--primitives-neutral-700);
|
|
516
517
|
--button-colors-soft-background-pressed: var(--primitives-neutral-700);
|
|
@@ -518,7 +519,7 @@ $body-1000: var(--typography-size-1000);
|
|
|
518
519
|
--button-colors-soft-stroke-inner-inner-dark: 2px;
|
|
519
520
|
--button-colors-soft-stroke-inner-inner-white: 0px;
|
|
520
521
|
--button-colors-soft-stroke-outer-default: var(--primitives-neutral-950);
|
|
521
|
-
--button-colors-soft-stroke-outer-disabled: var(--primitives-neutral-
|
|
522
|
+
--button-colors-soft-stroke-outer-disabled: var(--primitives-neutral-1000);
|
|
522
523
|
--button-colors-soft-stroke-outer-hover: var(--primitives-neutral-950);
|
|
523
524
|
--button-colors-soft-stroke-outer-pressed: var(--primitives-neutral-950);
|
|
524
525
|
--button-colors-soft-text-default: var(--primitives-neutral-0);
|
|
@@ -536,11 +537,11 @@ $body-1000: var(--typography-size-1000);
|
|
|
536
537
|
--button-colors-plain-text-hover: var(--primitives-neutral-0);
|
|
537
538
|
--button-colors-plain-text-pressed: var(--primitives-neutral-0);
|
|
538
539
|
--button-colors-plain-text-focus: var(--primitives-neutral-0);
|
|
539
|
-
--button-colors-plain-text-disabled: var(--primitives-neutral-
|
|
540
|
+
--button-colors-plain-text-disabled: var(--primitives-neutral-400);
|
|
540
541
|
--button-colors-plain-stroke-inner-default: rgba(0, 0, 0, 0.87);
|
|
541
542
|
--button-colors-plain-stroke-outer-default: transparent;
|
|
542
543
|
--button-colors-plain-stroke-outer-hover: var(--primitives-neutral-700);
|
|
543
|
-
--button-colors-plain-stroke-outer-disabled:
|
|
544
|
+
--button-colors-plain-stroke-outer-disabled: transparent;
|
|
544
545
|
--button-colors-plain-stroke-outer-pressed: var(--primitives-neutral-800);
|
|
545
546
|
|
|
546
547
|
--button-colors-transparent-background-default: rgba(255, 255, 255, 0.02);
|
|
@@ -554,7 +555,7 @@ $body-1000: var(--typography-size-1000);
|
|
|
554
555
|
--button-colors-transparent-text-hover: var(--primitives-neutral-0);
|
|
555
556
|
--button-colors-transparent-text-pressed: var(--primitives-neutral-0);
|
|
556
557
|
--button-colors-transparent-text-focus: var(--primitives-neutral-0);
|
|
557
|
-
--button-colors-transparent-text-disabled: var(--primitives-neutral-
|
|
558
|
+
--button-colors-transparent-text-disabled: var(--primitives-neutral-400);
|
|
558
559
|
--button-colors-transparent-stroke-inner-default: rgba(255, 255, 255, 0.08);
|
|
559
560
|
--button-colors-transparent-stroke-inner-hover: rgba(255, 255, 255, 0.08);
|
|
560
561
|
--button-colors-transparent-stroke-outer-default: rgba(0, 0, 0, 0.5);
|
|
@@ -570,39 +571,39 @@ $body-1000: var(--typography-size-1000);
|
|
|
570
571
|
--button-colors-brand-background-hover: var(--primitives-brand-500);
|
|
571
572
|
--button-colors-brand-background-pressed: var(--primitives-brand-700);
|
|
572
573
|
--button-colors-brand-background-focus: var(--primitives-brand-600);
|
|
573
|
-
--button-colors-brand-background-disabled: var(--primitives-neutral-
|
|
574
|
+
--button-colors-brand-background-disabled: var(--primitives-neutral-750);
|
|
574
575
|
--button-colors-brand-text-default: var(--primitives-neutral-0);
|
|
575
576
|
--button-colors-brand-stroke-inner-default: rgba(255, 255, 255, 0.2);
|
|
576
577
|
--button-colors-brand-stroke-outer-default: var(--primitives-brand-900);
|
|
577
578
|
--button-colors-brand-stroke-outer-hover: var(--primitives-brand-1000);
|
|
578
|
-
--button-colors-brand-stroke-outer-disabled: var(--primitives-neutral-
|
|
579
|
+
--button-colors-brand-stroke-outer-disabled: var(--primitives-neutral-1000);
|
|
579
580
|
--button-colors-brand-stroke-outer-pressed: var(--primitives-neutral-0);
|
|
580
581
|
--button-colors-brand-text-hover: var(--primitives-neutral-0);
|
|
581
582
|
--button-colors-brand-text-pressed: var(--primitives-neutral-0);
|
|
582
583
|
--button-colors-brand-text-focus: var(--primitives-neutral-0);
|
|
583
|
-
--button-colors-brand-text-disabled: var(--primitives-neutral-
|
|
584
|
+
--button-colors-brand-text-disabled: var(--primitives-neutral-400);
|
|
584
585
|
|
|
585
586
|
--button-colors-success-background-default: var(--primitives-success-600);
|
|
586
587
|
--button-colors-success-background-hover: var(--primitives-success-500);
|
|
587
588
|
--button-colors-success-background-pressed: var(--primitives-success-700);
|
|
588
589
|
--button-colors-success-background-focus: var(--primitives-success-600);
|
|
589
|
-
--button-colors-success-background-disabled: var(--primitives-neutral-
|
|
590
|
+
--button-colors-success-background-disabled: var(--primitives-neutral-750);
|
|
590
591
|
--button-colors-success-text-default: var(--primitives-neutral-0);
|
|
591
592
|
--button-colors-success-stroke-inner-default: rgba(255, 255, 255, 0.12);
|
|
592
593
|
--button-colors-success-stroke-outer-default: var(--primitives-success-1000);
|
|
593
594
|
--button-colors-success-stroke-outer-hover: var(--primitives-success-700);
|
|
594
|
-
--button-colors-success-stroke-outer-disabled: var(--primitives-neutral-
|
|
595
|
+
--button-colors-success-stroke-outer-disabled: var(--primitives-neutral-1000);
|
|
595
596
|
--button-colors-success-stroke-outer-pressed: var(--primitives-neutral-200);
|
|
596
597
|
--button-colors-success-text-hover: var(--primitives-neutral-0);
|
|
597
598
|
--button-colors-success-text-pressed: var(--primitives-neutral-0);
|
|
598
599
|
--button-colors-success-text-focus: var(--primitives-neutral-0);
|
|
599
|
-
--button-colors-success-text-disabled: var(--primitives-neutral-
|
|
600
|
+
--button-colors-success-text-disabled: var(--primitives-neutral-400);
|
|
600
601
|
|
|
601
602
|
--button-colors-attention-background-default: var(--primitives-attention-600);
|
|
602
603
|
--button-colors-attention-background-hover: var(--primitives-attention-500);
|
|
603
604
|
--button-colors-attention-background-pressed: var(--primitives-attention-600);
|
|
604
605
|
--button-colors-attention-background-focus: var(--primitives-attention-600);
|
|
605
|
-
--button-colors-attention-background-disabled: var(--primitives-neutral-
|
|
606
|
+
--button-colors-attention-background-disabled: var(--primitives-neutral-750);
|
|
606
607
|
--button-colors-attention-text-default: var(--primitives-neutral-0);
|
|
607
608
|
--button-colors-attention-stroke-inner-default: rgba(255, 255, 255, 0.12);
|
|
608
609
|
--button-colors-attention-stroke-outer-default: var(
|
|
@@ -610,28 +611,28 @@ $body-1000: var(--typography-size-1000);
|
|
|
610
611
|
);
|
|
611
612
|
--button-colors-attention-stroke-outer-hover: var(--primitives-attention-600);
|
|
612
613
|
--button-colors-attention-stroke-outer-disabled: var(
|
|
613
|
-
--primitives-neutral-
|
|
614
|
+
--primitives-neutral-1000
|
|
614
615
|
);
|
|
615
616
|
--button-colors-attention-stroke-outer-pressed: var(--primitives-neutral-200);
|
|
616
617
|
--button-colors-attention-text-hover: var(--primitives-neutral-0);
|
|
617
618
|
--button-colors-attention-text-pressed: var(--primitives-neutral-0);
|
|
618
619
|
--button-colors-attention-text-focus: var(--primitives-neutral-0);
|
|
619
|
-
--button-colors-attention-text-disabled: var(--primitives-neutral-
|
|
620
|
+
--button-colors-attention-text-disabled: var(--primitives-neutral-400);
|
|
620
621
|
|
|
621
622
|
--button-colors-danger-background-default: var(--primitives-danger-600);
|
|
622
623
|
--button-colors-danger-background-hover: var(--primitives-danger-500);
|
|
623
624
|
--button-colors-danger-background-pressed: var(--primitives-danger-700);
|
|
624
625
|
--button-colors-danger-background-focus: var(--primitives-danger-600);
|
|
625
|
-
--button-colors-danger-background-disabled: var(--primitives-neutral-
|
|
626
|
+
--button-colors-danger-background-disabled: var(--primitives-neutral-750);
|
|
626
627
|
--button-colors-danger-text-default: var(--primitives-neutral-0);
|
|
627
628
|
--button-colors-danger-text-hover: var(--primitives-neutral-0);
|
|
628
629
|
--button-colors-danger-text-pressed: var(--primitives-neutral-0);
|
|
629
630
|
--button-colors-danger-text-focus: var(--primitives-neutral-0);
|
|
630
|
-
--button-colors-danger-text-disabled: var(--primitives-neutral-
|
|
631
|
+
--button-colors-danger-text-disabled: var(--primitives-neutral-400);
|
|
631
632
|
--button-colors-danger-stroke-inner-default: rgba(255, 255, 255, 0.12);
|
|
632
633
|
--button-colors-danger-stroke-outer-default: var(--primitives-danger-700);
|
|
633
634
|
--button-colors-danger-stroke-outer-hover: var(--primitives-danger-600);
|
|
634
|
-
--button-colors-danger-stroke-outer-disabled: var(--primitives-neutral-
|
|
635
|
+
--button-colors-danger-stroke-outer-disabled: var(--primitives-neutral-1000);
|
|
635
636
|
--button-colors-danger-stroke-outer-pressed: var(--primitives-neutral-200);
|
|
636
637
|
|
|
637
638
|
--tags-neutral-background: var(--primitives-neutral-600);
|
|
@@ -771,6 +772,8 @@ $body-1000: var(--typography-size-1000);
|
|
|
771
772
|
--HS-text-attention-default-alt: var(--primitives-attention-1000);
|
|
772
773
|
--HS-text-danger-default: var(--primitives-danger-500);
|
|
773
774
|
--HS-common-background: var(--primitives-neutral-50);
|
|
775
|
+
--HS-video-player-chrome: var(--primitives-neutral-0);
|
|
776
|
+
--HS-video-player-scrim: var(--primitives-neutral-1000);
|
|
774
777
|
--HS-surface-danger-background: var(--primitives-danger-50);
|
|
775
778
|
--HS-surface-danger-background-boxed: var(--primitives-danger-100);
|
|
776
779
|
--HS-surface-danger-border: var(--primitives-danger-200);
|
|
@@ -892,6 +895,8 @@ $body-1000: var(--typography-size-1000);
|
|
|
892
895
|
--HS-text-attention-default-alt: var(--primitives-neutral-0);
|
|
893
896
|
--HS-text-danger-default: var(--primitives-danger-500);
|
|
894
897
|
--HS-common-background: var(--primitives-neutral-950);
|
|
898
|
+
--HS-video-player-chrome: var(--primitives-neutral-0);
|
|
899
|
+
--HS-video-player-scrim: var(--primitives-neutral-1000);
|
|
895
900
|
--HS-surface-danger-background: var(--primitives-danger-1200);
|
|
896
901
|
--HS-surface-danger-background-boxed: var(--primitives-danger-1100);
|
|
897
902
|
--HS-surface-danger-border: var(--primitives-danger-700);
|
package/package.json
CHANGED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./clsx-BWCAbrjV.js";
|
|
2
|
-
import { forwardRef as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
var c = {
|
|
5
|
-
content: "a1m2bq_content",
|
|
6
|
-
cover: "a1m2bq_cover",
|
|
7
|
-
hoverZoom: "a1m2bq_hoverZoom",
|
|
8
|
-
poster: "a1m2bq_poster",
|
|
9
|
-
reduced: "a1m2bq_reduced",
|
|
10
|
-
video: "a1m2bq_video"
|
|
11
|
-
}, l = t(({ src: t, sources: l, poster: u, fit: d = "cover", autoPlay: f = !0, loop: p = !0, muted: m = !0, playsInline: h = !0, preload: g = "auto", lazy: _ = !0, hoverZoom: v = !1, reducedMotion: y, aspectRatio: b, radius: x = 0, children: S, "aria-label": C, className: w, style: T }, E) => {
|
|
12
|
-
let D = i(null), O = i(null), [k, A] = a(!_), [j, M] = a(!1), N = !C, P = n((e) => {
|
|
13
|
-
O.current = e, typeof E == "function" ? E(e) : E && (E.current = e);
|
|
14
|
-
}, [E]), [F, I] = a(() => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
15
|
-
r(() => {
|
|
16
|
-
if (typeof window > "u" || !window.matchMedia) return;
|
|
17
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => I(e.matches);
|
|
18
|
-
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
19
|
-
}, []);
|
|
20
|
-
let L = y === void 0 ? F ? "no-animation" : !1 : y === !0 ? "no-animation" : y, R = L !== !1, z = f && !R, B = n(() => {
|
|
21
|
-
let e = O.current;
|
|
22
|
-
e && (e.pause(), L === "skip-to-end" && Number.isFinite(e.duration) ? e.currentTime = Math.max(0, e.duration - .05) : L === "no-animation" && (e.currentTime = 0));
|
|
23
|
-
}, [L]);
|
|
24
|
-
return r(() => {
|
|
25
|
-
let e = O.current;
|
|
26
|
-
!e || !k || (R ? B() : f && e.play().catch(() => {}));
|
|
27
|
-
}, [
|
|
28
|
-
R,
|
|
29
|
-
k,
|
|
30
|
-
f,
|
|
31
|
-
B
|
|
32
|
-
]), r(() => {
|
|
33
|
-
if (k) return;
|
|
34
|
-
let e = D.current;
|
|
35
|
-
if (!e || typeof IntersectionObserver > "u") {
|
|
36
|
-
A(!0);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
let t = new IntersectionObserver(([e]) => {
|
|
40
|
-
e?.isIntersecting && (A(!0), t.disconnect());
|
|
41
|
-
}, { rootMargin: "200px" });
|
|
42
|
-
return t.observe(e), () => t.disconnect();
|
|
43
|
-
}, [k]), /* @__PURE__ */ s("div", {
|
|
44
|
-
ref: D,
|
|
45
|
-
className: e("hsui-video-cover", c.cover, {
|
|
46
|
-
[c.hoverZoom]: v,
|
|
47
|
-
[c.reduced]: R
|
|
48
|
-
}, w),
|
|
49
|
-
style: {
|
|
50
|
-
"--vc-radius": `${x}px`,
|
|
51
|
-
aspectRatio: b,
|
|
52
|
-
...T
|
|
53
|
-
},
|
|
54
|
-
role: N ? "presentation" : "img",
|
|
55
|
-
"aria-label": C,
|
|
56
|
-
children: [
|
|
57
|
-
u && /* @__PURE__ */ o("img", {
|
|
58
|
-
className: c.poster,
|
|
59
|
-
style: { objectFit: d },
|
|
60
|
-
src: u,
|
|
61
|
-
alt: "",
|
|
62
|
-
"aria-hidden": "true"
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ o("video", {
|
|
65
|
-
ref: P,
|
|
66
|
-
className: c.video,
|
|
67
|
-
style: { objectFit: d },
|
|
68
|
-
src: k && !l ? t : void 0,
|
|
69
|
-
autoPlay: z,
|
|
70
|
-
loop: p,
|
|
71
|
-
muted: m,
|
|
72
|
-
playsInline: h,
|
|
73
|
-
preload: k ? g : "none",
|
|
74
|
-
"data-ready": j || void 0,
|
|
75
|
-
onCanPlay: () => M(!0),
|
|
76
|
-
onLoadedMetadata: R ? B : void 0,
|
|
77
|
-
"aria-hidden": N || void 0,
|
|
78
|
-
children: k && l?.map((e) => /* @__PURE__ */ o("source", {
|
|
79
|
-
src: e.src,
|
|
80
|
-
type: e.type
|
|
81
|
-
}, e.src))
|
|
82
|
-
}),
|
|
83
|
-
S != null && /* @__PURE__ */ o("div", {
|
|
84
|
-
className: c.content,
|
|
85
|
-
children: S
|
|
86
|
-
})
|
|
87
|
-
]
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
l.displayName = "VideoCover";
|
|
91
|
-
//#endregion
|
|
92
|
-
export { l as t };
|