highsoft-ui 1.0.189 → 1.0.190
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/{Accordion-NPNV0Rdr.js → Accordion-BAuBLmE3.js} +2 -2
- package/dist/{Breadcrumb-Diyjpqys.js → Breadcrumb-DyHxzIHZ.js} +3 -3
- package/dist/{BrowserFrame-Bs2fIKzy.js → BrowserFrame-BPBOv1Tk.js} +5 -5
- package/dist/{Button-DtCIaVhq.js → Button-C45Uhxsb.js} +1 -1
- package/dist/{ButtonGroup-6tLQmpEH.js → ButtonGroup-CiqrtZuw.js} +1 -1
- package/dist/{Checkbox-CqFkzrVk.js → Checkbox-CVftEg1_.js} +1 -1
- package/dist/{CodeBlock-BM_Vefdj.js → CodeBlock-B3wBSBYj.js} +4 -4
- package/dist/{CookiePolicyModal-BXIr4v-D.js → CookiePolicyModal-DjSphVoO.js} +2 -2
- package/dist/{CopyCode-4IXo0bTs.js → CopyCode-CUpfwNcv.js} +2 -2
- package/dist/{Dropdown-DoQBagdU.js → Dropdown-CrVLfZiy.js} +1 -1
- package/dist/{Footer-J3MxvPPO.js → Footer-DzsWk7mZ.js} +7 -7
- package/dist/{FooterBottom-CT_vF7Wo.js → FooterBottom-Dr8pA9M3.js} +1 -1
- package/dist/{FooterHelp-BMGx8Hk_.js → FooterHelp-CTJGT2jE.js} +1 -1
- package/dist/{FooterLinks-Bl9DTxcj.js → FooterLinks-WUB3E0CX.js} +2 -2
- package/dist/{Header-Dbi8eOiH.js → Header-LQoKnhWx.js} +16 -16
- package/dist/{InputGrouped-B3WGuESX.js → InputGrouped-Ddlan78b.js} +3 -3
- package/dist/{Label-DwiX1ZiD.js → Label-BE2jiXll.js} +1 -1
- package/dist/{List-_Ahztqfe.js → List-DsP9RBn1.js} +1 -1
- package/dist/{LogoCarousel-e-1WK43R.js → LogoCarousel-DZCklh0c.js} +3 -3
- package/dist/{NewsletterSignup-BY5-NuDn.js → NewsletterSignup-DZNPeWVb.js} +4 -4
- package/dist/{Notification-D93nzw6M.js → Notification-BSUYpeGy.js} +3 -3
- package/dist/{PrefPanel-DTbo6QDa.js → PrefPanel-Dqu4mVyV.js} +7 -7
- package/dist/{PrevNextNav-ChqvTQGz.js → PrevNextNav-ChtdXmcy.js} +1 -1
- package/dist/{ProductNotice-BfI0v5Ag.js → ProductNotice-DnQEPFsx.js} +2 -2
- package/dist/{RoadmapDetails-DIByXo2r.js → RoadmapDetails-BgX6JZ4M.js} +5 -5
- package/dist/{SearchDropdown-X_PX34tw.js → SearchDropdown-DeqQ84uc.js} +1 -1
- package/dist/VideoPlayer-DmgXtaQU.js +456 -0
- package/dist/{VideoPlayerModal-DhH0G9cJ.js → VideoPlayerModal-bQthGzgn.js} +2 -2
- package/dist/{YoutubeModal-DcnPW63b.js → YoutubeModal-CAsJ5oKk.js} +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Breadcrumb/index.js +1 -1
- package/dist/components/BrowserFrame/index.js +1 -1
- 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/Figure/ZoomImage.js +2 -2
- 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/List/index.js +1 -1
- package/dist/components/LogoCarousel/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/PrevNextNav/index.js +1 -1
- package/dist/components/ProductNotice/index.js +1 -1
- package/dist/components/PromoBanner/index.js +19 -19
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/SearchDialog.js +8 -8
- package/dist/components/Search/index.js +2 -2
- package/dist/components/SearchDropdown/index.js +1 -1
- package/dist/components/Sidebar/NavDisclosure.js +1 -1
- package/dist/components/Sidebar/NavGroup.js +1 -1
- package/dist/components/Sidebar/Sidebar.js +10 -10
- package/dist/components/Sidebar/SidebarLayout.js +1 -1
- package/dist/components/Sidebar/SidebarSwitcher.js +1 -1
- package/dist/components/VideoCover/index.js +115 -102
- package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/{create-element-ChcNUMOL.js → create-element-BP8g1yS0.js} +1 -1
- package/dist/{esm-CqcQTziN.js → esm-BMNJ2hLn.js} +79 -51
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/VideoCover/index.d.ts +5 -2
- package/dist/main.js +24 -24
- package/dist/{prism-light-B3J0jr_a.js → prism-light-9X-EbG8v.js} +1 -1
- package/dist/{styles.module-BnKyCO6_.js → styles.module-G9LPGB5g.js} +2 -0
- package/package.json +1 -1
- package/dist/VideoPlayer-DRtH0Ah7.js +0 -456
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as n } from "../../Button-
|
|
3
|
+
import { dt as t } from "../../esm-BMNJ2hLn.js";
|
|
4
|
+
import { t as n } from "../../Button-C45Uhxsb.js";
|
|
5
5
|
import { t as r } from "../../Heading-DNDHqYWO.js";
|
|
6
|
-
import { t as i } from "../../styles.module-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { t as i } from "../../styles.module-G9LPGB5g.js";
|
|
7
|
+
import { n as a, t as o } from "../../Video-VbXl2HoE.js";
|
|
8
|
+
import { PauseGlyph as s, PlayGlyph as c } from "../VideoCover/PlaybackGlyphs.js";
|
|
9
9
|
import { t as l } from "../../product-media-gidWl_N7.js";
|
|
10
10
|
import { productFraming as u } from "./product-framing.js";
|
|
11
11
|
import { promoBannerProducts as d } from "./products.js";
|
|
@@ -16,7 +16,7 @@ var _ = f(({ product: f, title: _, description: v, price: y, action: b, video: x
|
|
|
16
16
|
let A = d.find((e) => e.slug === f), j = f ? l[f] : void 0, M = _ === void 0 ? "Start building today." : _, N = v === void 0 ? A?.description : v, P = y === void 0 ? A?.price : y, F = b === void 0 ? A?.action : b, I = f ? u[f] : void 0, L = p(), [R, z] = m(!1), B = P != null || F != null;
|
|
17
17
|
return /* @__PURE__ */ h("section", {
|
|
18
18
|
ref: k,
|
|
19
|
-
className: e("hsui-promo-banner",
|
|
19
|
+
className: e("hsui-promo-banner", a.banner, f === "morningstar" && a.morningstar, E),
|
|
20
20
|
style: {
|
|
21
21
|
...D,
|
|
22
22
|
"--promo-banner-compact-fit": I?.fit,
|
|
@@ -28,13 +28,13 @@ var _ = f(({ product: f, title: _, description: v, price: y, action: b, video: x
|
|
|
28
28
|
"aria-labelledby": L,
|
|
29
29
|
...O,
|
|
30
30
|
children: /* @__PURE__ */ g("div", {
|
|
31
|
-
className:
|
|
31
|
+
className: a.surface,
|
|
32
32
|
children: [
|
|
33
33
|
j && /* @__PURE__ */ h("div", {
|
|
34
|
-
className: e(
|
|
34
|
+
className: e(a.media, a.motionMedia),
|
|
35
35
|
children: ["light", "dark"].map((t) => {
|
|
36
|
-
let n = e(
|
|
37
|
-
return x ? /* @__PURE__ */ h(
|
|
36
|
+
let n = e(a.motionLayer, t === "light" ? a.lightOnly : a.darkOnly);
|
|
37
|
+
return x ? /* @__PURE__ */ h(o, {
|
|
38
38
|
src: j.video[t],
|
|
39
39
|
hevc: j.videoHevc[t],
|
|
40
40
|
poster: j.image[t],
|
|
@@ -42,7 +42,7 @@ var _ = f(({ product: f, title: _, description: v, price: y, action: b, video: x
|
|
|
42
42
|
}, t) : /* @__PURE__ */ h("div", {
|
|
43
43
|
className: n,
|
|
44
44
|
children: /* @__PURE__ */ h("img", {
|
|
45
|
-
className:
|
|
45
|
+
className: a.motionPoster,
|
|
46
46
|
src: j.image[t],
|
|
47
47
|
alt: ""
|
|
48
48
|
})
|
|
@@ -50,22 +50,22 @@ var _ = f(({ product: f, title: _, description: v, price: y, action: b, video: x
|
|
|
50
50
|
})
|
|
51
51
|
}),
|
|
52
52
|
/* @__PURE__ */ g("div", {
|
|
53
|
-
className: e(
|
|
53
|
+
className: e(a.content, !j && a.noMedia),
|
|
54
54
|
children: [/* @__PURE__ */ g("div", {
|
|
55
|
-
className:
|
|
55
|
+
className: a.text,
|
|
56
56
|
children: [/* @__PURE__ */ h(r, {
|
|
57
57
|
level: w,
|
|
58
58
|
id: L,
|
|
59
|
-
className:
|
|
59
|
+
className: a.title,
|
|
60
60
|
children: M
|
|
61
61
|
}), N != null && /* @__PURE__ */ h("p", {
|
|
62
|
-
className:
|
|
62
|
+
className: a.description,
|
|
63
63
|
children: N
|
|
64
64
|
})]
|
|
65
65
|
}), B && /* @__PURE__ */ g("div", {
|
|
66
|
-
className:
|
|
66
|
+
className: a.aside,
|
|
67
67
|
children: [P != null && /* @__PURE__ */ h("p", {
|
|
68
|
-
className:
|
|
68
|
+
className: a.price,
|
|
69
69
|
children: P
|
|
70
70
|
}), F != null && /* @__PURE__ */ h(n, {
|
|
71
71
|
variant: F.variant ?? A?.action.variant ?? "success",
|
|
@@ -80,13 +80,13 @@ var _ = f(({ product: f, title: _, description: v, price: y, action: b, video: x
|
|
|
80
80
|
}),
|
|
81
81
|
x && j && /* @__PURE__ */ h("button", {
|
|
82
82
|
type: "button",
|
|
83
|
-
className: e(i.playControl,
|
|
83
|
+
className: e(i.playControl, a.motionControl),
|
|
84
84
|
"aria-label": R ? C : S,
|
|
85
85
|
onClick: (e) => {
|
|
86
86
|
let t = !R, n = e.currentTarget.closest("section");
|
|
87
87
|
n && (n.dataset.motionPaused = String(t), n.dispatchEvent(new Event("promobanner:pausechange"))), z(t);
|
|
88
88
|
},
|
|
89
|
-
children: h(R ?
|
|
89
|
+
children: h(R ? c : s, {})
|
|
90
90
|
})
|
|
91
91
|
]
|
|
92
92
|
})
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../RoadmapDetails-
|
|
1
|
+
import { t as e } from "../../RoadmapDetails-BgX6JZ4M.js";
|
|
2
2
|
export { e as RoadmapDetails };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e, i as t, n, o as r, r as i, t as a } from "../../chunk-jwUa06l-.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as _ } from "../../Button-
|
|
3
|
+
import { E as o, K as s, U as c, X as l, b as u, ct as d, ft as f, h as p, m, mt as h, ut as g } from "../../esm-BMNJ2hLn.js";
|
|
4
|
+
import { t as _ } from "../../Button-C45Uhxsb.js";
|
|
5
5
|
import { d as v, h as y, l as b, m as x, p as S, u as C } from "../../es2015-DGI5uxql.js";
|
|
6
6
|
import { t as w } from "../../dist-an9z21ra.js";
|
|
7
7
|
import { i as T, n as E, r as D, t as O } from "../../dist-BAH-0dTg.js";
|
|
@@ -4496,12 +4496,12 @@ function Vt({ open: e }) {
|
|
|
4496
4496
|
r(e.target.value);
|
|
4497
4497
|
}, se = {
|
|
4498
4498
|
products: /* @__PURE__ */ M(p, {}),
|
|
4499
|
-
demo: /* @__PURE__ */ M(
|
|
4500
|
-
docs: /* @__PURE__ */ M(
|
|
4501
|
-
blog: /* @__PURE__ */ M(
|
|
4502
|
-
misc: /* @__PURE__ */ M(
|
|
4499
|
+
demo: /* @__PURE__ */ M(o, {}),
|
|
4500
|
+
docs: /* @__PURE__ */ M(d, {}),
|
|
4501
|
+
blog: /* @__PURE__ */ M(h, {}),
|
|
4502
|
+
misc: /* @__PURE__ */ M(c, {}),
|
|
4503
4503
|
shop: /* @__PURE__ */ M(m, {}),
|
|
4504
|
-
file: /* @__PURE__ */ M(
|
|
4504
|
+
file: /* @__PURE__ */ M(s, {})
|
|
4505
4505
|
};
|
|
4506
4506
|
return /* @__PURE__ */ N(ee, { children: [/* @__PURE__ */ M(k, { className: Z.overlay }), /* @__PURE__ */ N(te, {
|
|
4507
4507
|
className: Z.search,
|
|
@@ -4585,7 +4585,7 @@ function Vt({ open: e }) {
|
|
|
4585
4585
|
className: Z.bottomGroup,
|
|
4586
4586
|
children: [/* @__PURE__ */ N("div", {
|
|
4587
4587
|
className: Z.bottomIcons,
|
|
4588
|
-
children: [/* @__PURE__ */ M("span", { children: /* @__PURE__ */ M(
|
|
4588
|
+
children: [/* @__PURE__ */ M("span", { children: /* @__PURE__ */ M(f, {}) }), /* @__PURE__ */ M("span", { children: /* @__PURE__ */ M(g, {}) })]
|
|
4589
4589
|
}), "Navigate"]
|
|
4590
4590
|
}),
|
|
4591
4591
|
/* @__PURE__ */ N("div", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { y as e } from "../../esm-
|
|
3
|
-
import { t } from "../../Button-
|
|
2
|
+
import { y as e } from "../../esm-BMNJ2hLn.js";
|
|
3
|
+
import { t } from "../../Button-C45Uhxsb.js";
|
|
4
4
|
import { s as n, t as r } from "../../dist-DWZ0DflU.js";
|
|
5
5
|
import { Suspense as i, lazy as a, useEffect as o, useState as s } from "react";
|
|
6
6
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../SearchDropdown-
|
|
1
|
+
import { t as e } from "../../SearchDropdown-DeqQ84uc.js";
|
|
2
2
|
export { e as SearchDropdown };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
3
|
+
import { nt as t } from "../../esm-BMNJ2hLn.js";
|
|
4
4
|
import { t as n } from "../../Icon-BUgFags4.js";
|
|
5
5
|
import { t as r } from "../../styles.module-B9V15An9.js";
|
|
6
6
|
import { useId as i, useState as a } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
3
|
+
import { nt as t } from "../../esm-BMNJ2hLn.js";
|
|
4
4
|
import { t as n } from "../../Icon-BUgFags4.js";
|
|
5
5
|
import { useOptionalSidebarSection as r } from "./context.js";
|
|
6
6
|
import { t as i } from "../../styles.module-B9V15An9.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as i } from "../../Button-
|
|
3
|
+
import { it as t, j as n, n as r } from "../../esm-BMNJ2hLn.js";
|
|
4
|
+
import { t as i } from "../../Button-C45Uhxsb.js";
|
|
5
5
|
import { n as a } from "../../Typography-DI1AkqiO.js";
|
|
6
6
|
import { t as o } from "../../Icon-BUgFags4.js";
|
|
7
7
|
import { SidebarSectionContext as s, useSidebarLayout as c } from "./context.js";
|
|
@@ -12,7 +12,7 @@ import { useCallback as f, useEffect as p, useId as m, useRef as h, useState as
|
|
|
12
12
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
13
|
//#region lib/components/Sidebar/Sidebar.tsx
|
|
14
14
|
var y = 72, b = 56, x = .84, S = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
15
|
-
function C({ children: t, "aria-label":
|
|
15
|
+
function C({ children: t, "aria-label": n = "Sidebar navigation", closeLabel: a = "Close navigation", className: s }) {
|
|
16
16
|
let { resizable: d, isMobile: m, mobileOpen: g, closeMobile: C, openFocus: w } = c(), T = h(null), E = m && g;
|
|
17
17
|
p(() => {
|
|
18
18
|
let e = T.current;
|
|
@@ -56,7 +56,7 @@ function C({ children: t, "aria-label": r = "Sidebar navigation", closeLabel: a
|
|
|
56
56
|
ref: T,
|
|
57
57
|
id: "hs-sidebar-drawer",
|
|
58
58
|
className: e(l.sidebar, g && l.sidebarOpen, s),
|
|
59
|
-
"aria-label":
|
|
59
|
+
"aria-label": n,
|
|
60
60
|
role: E ? "dialog" : void 0,
|
|
61
61
|
"aria-modal": E ? !0 : void 0,
|
|
62
62
|
tabIndex: -1,
|
|
@@ -79,7 +79,7 @@ function C({ children: t, "aria-label": r = "Sidebar navigation", closeLabel: a
|
|
|
79
79
|
"aria-label": a,
|
|
80
80
|
onClick: C,
|
|
81
81
|
children: /* @__PURE__ */ _(o, {
|
|
82
|
-
name:
|
|
82
|
+
name: r,
|
|
83
83
|
size: 16
|
|
84
84
|
})
|
|
85
85
|
})
|
|
@@ -101,7 +101,7 @@ function T({ children: t, className: n }) {
|
|
|
101
101
|
children: t
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
function E({ children:
|
|
104
|
+
function E({ children: r, label: c, collapsible: u = !1, minimizeLabel: p = "Minimize", action: y, expandable: b = !1, defaultOpen: x = !0, open: S, onOpenChange: C, className: w }) {
|
|
105
105
|
let [T, E] = g(x), D = S !== void 0, O = !b || (D ? S : T), k = m(), { expanding: A, ref: j } = d(O), M = () => {
|
|
106
106
|
let e = !O;
|
|
107
107
|
D || E(e), C?.(e);
|
|
@@ -124,7 +124,7 @@ function E({ children: n, label: c, collapsible: u = !1, minimizeLabel: p = "Min
|
|
|
124
124
|
className: l.sectionToggleText,
|
|
125
125
|
children: c
|
|
126
126
|
}), /* @__PURE__ */ _(o, {
|
|
127
|
-
name:
|
|
127
|
+
name: t,
|
|
128
128
|
size: 12,
|
|
129
129
|
className: l.sectionChevron,
|
|
130
130
|
"aria-hidden": "true"
|
|
@@ -145,7 +145,7 @@ function E({ children: n, label: c, collapsible: u = !1, minimizeLabel: p = "Min
|
|
|
145
145
|
size: 100,
|
|
146
146
|
className: l.minimizeBtn,
|
|
147
147
|
iconLeft: /* @__PURE__ */ _(o, {
|
|
148
|
-
name:
|
|
148
|
+
name: n,
|
|
149
149
|
size: 12
|
|
150
150
|
}),
|
|
151
151
|
onClick: () => P((e) => e + 1),
|
|
@@ -158,9 +158,9 @@ function E({ children: n, label: c, collapsible: u = !1, minimizeLabel: p = "Min
|
|
|
158
158
|
inert: O ? void 0 : !0,
|
|
159
159
|
children: /* @__PURE__ */ _("div", {
|
|
160
160
|
className: l.sectionBodyInner,
|
|
161
|
-
children:
|
|
161
|
+
children: r
|
|
162
162
|
})
|
|
163
|
-
}) :
|
|
163
|
+
}) : r]
|
|
164
164
|
})
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e } from "../../utils-bAjntFD8.js";
|
|
3
3
|
import { t } from "../../clsx-BWCAbrjV.js";
|
|
4
|
-
import {
|
|
4
|
+
import { et as n } from "../../esm-BMNJ2hLn.js";
|
|
5
5
|
import { n as r } from "../../Typography-DI1AkqiO.js";
|
|
6
6
|
import { SidebarLayoutContext as i } from "./context.js";
|
|
7
7
|
import { t as a } from "../../styles.module-B9V15An9.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
3
|
+
import { tt as t } from "../../esm-BMNJ2hLn.js";
|
|
4
4
|
import { t as n } from "../../Icon-BUgFags4.js";
|
|
5
5
|
import { t as r } from "../../styles.module-B9V15An9.js";
|
|
6
6
|
import { forwardRef as i } from "react";
|
|
@@ -1,161 +1,174 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n } from "../../Typography-DI1AkqiO.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { PauseGlyph as a, PlayGlyph as o } from "./PlaybackGlyphs.js";
|
|
3
|
+
import { $ as t, T as n, ht as ee, x as r } from "../../esm-BMNJ2hLn.js";
|
|
4
|
+
import { n as i } from "../../Typography-DI1AkqiO.js";
|
|
5
|
+
import { t as a } from "../../Icon-BUgFags4.js";
|
|
6
|
+
import { t as o } from "../../styles.module-G9LPGB5g.js";
|
|
8
7
|
import { forwardRef as s, useCallback as c, useEffect as l, useRef as u, useState as d } from "react";
|
|
9
8
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
9
|
//#region lib/components/VideoCover/index.tsx
|
|
11
|
-
var m =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
}, [
|
|
10
|
+
var m = {
|
|
11
|
+
playing: {
|
|
12
|
+
icon: t,
|
|
13
|
+
label: "Pause video"
|
|
14
|
+
},
|
|
15
|
+
paused: {
|
|
16
|
+
icon: n,
|
|
17
|
+
label: "Play video"
|
|
18
|
+
},
|
|
19
|
+
ended: {
|
|
20
|
+
icon: r,
|
|
21
|
+
label: "Replay video"
|
|
22
|
+
}
|
|
23
|
+
}, h = s(({ src: t, sources: n, poster: r, fit: s = "cover", autoPlay: h = !0, loop: te = !1, muted: g = !0, playsInline: _ = !0, preload: v = "auto", lazy: y = !0, hoverZoom: b = !1, reducedMotion: x, aspectRatio: S, radius: C = "var(--border_radius-size-0, 0px)", playControl: w = !0, playWhenVisible: T = !0, caption: E, children: D, "aria-label": O, className: k, style: A }, j) => {
|
|
24
|
+
let M = u(null), N = u(null), [P, F] = d(!y), [ne, I] = d(!1), [L, R] = d("paused"), [z, B] = d(!1), V = u("none"), H = !O, U = c((e) => {
|
|
25
|
+
N.current = e, typeof j == "function" ? j(e) : j && (j.current = e);
|
|
26
|
+
}, [j]), [W, G] = d(() => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
28
27
|
l(() => {
|
|
29
28
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
30
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () =>
|
|
29
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => G(e.matches);
|
|
31
30
|
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
32
31
|
}, []);
|
|
33
|
-
let
|
|
34
|
-
let e =
|
|
35
|
-
e && (e.pause(),
|
|
36
|
-
}, [
|
|
32
|
+
let K = x === void 0 ? W ? "no-animation" : !1 : x === !0 ? "no-animation" : x, q = K !== !1, J = h && !q, Y = c(() => {
|
|
33
|
+
let e = N.current;
|
|
34
|
+
e && (e.pause(), K === "skip-to-end" && Number.isFinite(e.duration) ? e.currentTime = Math.max(0, e.duration - .05) : K === "no-animation" && (e.currentTime = 0));
|
|
35
|
+
}, [K]);
|
|
37
36
|
l(() => {
|
|
38
|
-
let e =
|
|
39
|
-
!e || !
|
|
37
|
+
let e = N.current;
|
|
38
|
+
!e || !P || (q ? Y() : h && !T && e.play().catch(() => {}));
|
|
40
39
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
q,
|
|
41
|
+
P,
|
|
42
|
+
h,
|
|
43
|
+
T,
|
|
44
|
+
Y
|
|
46
45
|
]);
|
|
47
|
-
let
|
|
48
|
-
let e =
|
|
49
|
-
e &&
|
|
46
|
+
let X = c(() => {
|
|
47
|
+
let e = N.current;
|
|
48
|
+
e && R(e.ended ? "ended" : e.paused ? "paused" : "playing");
|
|
50
49
|
}, []), re = c(() => {
|
|
51
|
-
let e =
|
|
50
|
+
let e = N.current;
|
|
52
51
|
if (e) {
|
|
53
52
|
if (!e.paused) {
|
|
54
|
-
|
|
53
|
+
V.current = "pause", e.pause();
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
57
|
-
|
|
56
|
+
V.current = "play", e.ended && (e.currentTime = 0), e.play().catch(() => {});
|
|
58
57
|
}
|
|
59
58
|
}, []);
|
|
60
59
|
l(() => {
|
|
61
|
-
if (!
|
|
62
|
-
let e =
|
|
60
|
+
if (!T) return;
|
|
61
|
+
let e = M.current;
|
|
63
62
|
if (!e || typeof IntersectionObserver > "u") {
|
|
64
|
-
|
|
63
|
+
B(!0);
|
|
65
64
|
return;
|
|
66
65
|
}
|
|
67
|
-
let t = new IntersectionObserver(([e]) =>
|
|
66
|
+
let t = new IntersectionObserver(([e]) => B(!!e?.isIntersecting), { threshold: .2 });
|
|
68
67
|
return t.observe(e), () => t.disconnect();
|
|
69
|
-
}, [
|
|
70
|
-
let e =
|
|
71
|
-
!e || !
|
|
68
|
+
}, [T]), l(() => {
|
|
69
|
+
let e = N.current;
|
|
70
|
+
!e || !P || !T || (z ? (V.current === "play" || J && V.current !== "pause") && e.paused && !e.ended && e.play().catch(() => {}) : e.paused || e.pause());
|
|
72
71
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
z,
|
|
73
|
+
P,
|
|
74
|
+
T,
|
|
75
|
+
J
|
|
77
76
|
]), l(() => {
|
|
78
|
-
if (
|
|
79
|
-
let e =
|
|
77
|
+
if (P) return;
|
|
78
|
+
let e = M.current;
|
|
80
79
|
if (!e || typeof IntersectionObserver > "u") {
|
|
81
|
-
|
|
80
|
+
F(!0);
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
83
|
let t = new IntersectionObserver(([e]) => {
|
|
85
|
-
e?.isIntersecting && (
|
|
84
|
+
e?.isIntersecting && (F(!0), t.disconnect());
|
|
86
85
|
}, { rootMargin: "200px" });
|
|
87
86
|
return t.observe(e), () => t.disconnect();
|
|
88
|
-
}, [
|
|
89
|
-
let $ = /* @__PURE__ */ p("div", {
|
|
90
|
-
ref:
|
|
91
|
-
className: e("hsui-video-cover",
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
},
|
|
87
|
+
}, [P]);
|
|
88
|
+
let Z = m[L], Q = L !== "ended", $ = /* @__PURE__ */ p("div", {
|
|
89
|
+
ref: M,
|
|
90
|
+
className: e("hsui-video-cover", o.cover, {
|
|
91
|
+
[o.hoverZoom]: b,
|
|
92
|
+
[o.reduced]: q
|
|
93
|
+
}, k),
|
|
95
94
|
style: {
|
|
96
|
-
"--vc-radius": `${
|
|
97
|
-
aspectRatio:
|
|
98
|
-
...
|
|
95
|
+
"--vc-radius": typeof C == "number" ? `${C}px` : C,
|
|
96
|
+
aspectRatio: S,
|
|
97
|
+
...A
|
|
99
98
|
},
|
|
100
|
-
role:
|
|
101
|
-
"aria-label":
|
|
99
|
+
role: H ? "presentation" : "img",
|
|
100
|
+
"aria-label": O,
|
|
102
101
|
children: [
|
|
103
|
-
|
|
104
|
-
className:
|
|
105
|
-
style: { objectFit:
|
|
106
|
-
src:
|
|
102
|
+
r && /* @__PURE__ */ f("img", {
|
|
103
|
+
className: o.poster,
|
|
104
|
+
style: { objectFit: s },
|
|
105
|
+
src: r,
|
|
107
106
|
alt: "",
|
|
108
107
|
"aria-hidden": "true"
|
|
109
108
|
}),
|
|
110
109
|
/* @__PURE__ */ f("video", {
|
|
111
|
-
ref:
|
|
112
|
-
className:
|
|
113
|
-
style: { objectFit:
|
|
114
|
-
src:
|
|
115
|
-
autoPlay:
|
|
116
|
-
loop:
|
|
117
|
-
muted:
|
|
118
|
-
playsInline:
|
|
119
|
-
preload:
|
|
120
|
-
"data-ready":
|
|
110
|
+
ref: U,
|
|
111
|
+
className: o.video,
|
|
112
|
+
style: { objectFit: s },
|
|
113
|
+
src: P && !n ? t : void 0,
|
|
114
|
+
autoPlay: J && !T,
|
|
115
|
+
loop: te,
|
|
116
|
+
muted: g,
|
|
117
|
+
playsInline: _,
|
|
118
|
+
preload: P ? v : "none",
|
|
119
|
+
"data-ready": ne || void 0,
|
|
121
120
|
onCanPlay: () => {
|
|
122
|
-
|
|
121
|
+
I(!0), X();
|
|
123
122
|
},
|
|
124
|
-
onLoadedMetadata:
|
|
125
|
-
onPlay:
|
|
126
|
-
onPause:
|
|
127
|
-
onEnded:
|
|
128
|
-
"aria-hidden":
|
|
129
|
-
children:
|
|
123
|
+
onLoadedMetadata: q ? Y : void 0,
|
|
124
|
+
onPlay: X,
|
|
125
|
+
onPause: X,
|
|
126
|
+
onEnded: X,
|
|
127
|
+
"aria-hidden": H || void 0,
|
|
128
|
+
children: P && n?.map((e) => /* @__PURE__ */ f("source", {
|
|
130
129
|
src: e.src,
|
|
131
130
|
type: e.type
|
|
132
131
|
}, e.src))
|
|
133
132
|
}),
|
|
134
|
-
|
|
135
|
-
className:
|
|
136
|
-
children:
|
|
133
|
+
D != null && /* @__PURE__ */ f("div", {
|
|
134
|
+
className: o.content,
|
|
135
|
+
children: D
|
|
137
136
|
}),
|
|
138
|
-
|
|
137
|
+
w && /* @__PURE__ */ f("button", {
|
|
139
138
|
type: "button",
|
|
140
|
-
className:
|
|
139
|
+
className: o.playbackButton,
|
|
141
140
|
onClick: re,
|
|
142
|
-
"aria-label":
|
|
143
|
-
children:
|
|
141
|
+
"aria-label": Z.label,
|
|
142
|
+
children: /* @__PURE__ */ f("span", {
|
|
143
|
+
className: o.playbackArtwork,
|
|
144
|
+
"aria-hidden": "true",
|
|
145
|
+
children: /* @__PURE__ */ f(a, {
|
|
146
|
+
name: Z.icon,
|
|
147
|
+
size: 16,
|
|
148
|
+
style: {
|
|
149
|
+
width: 14,
|
|
150
|
+
height: 14
|
|
151
|
+
},
|
|
152
|
+
fill: Q ? "currentColor" : "none",
|
|
153
|
+
strokeOpacity: +!Q,
|
|
154
|
+
focusable: "false"
|
|
155
|
+
})
|
|
156
|
+
})
|
|
144
157
|
})
|
|
145
158
|
]
|
|
146
159
|
});
|
|
147
|
-
return
|
|
148
|
-
className: e("hsui-video-cover-figure",
|
|
160
|
+
return E == null ? $ : /* @__PURE__ */ p("figure", {
|
|
161
|
+
className: e("hsui-video-cover-figure", o.figure),
|
|
149
162
|
children: [$, /* @__PURE__ */ p("figcaption", {
|
|
150
|
-
className:
|
|
151
|
-
children: [/* @__PURE__ */ f(
|
|
152
|
-
name:
|
|
163
|
+
className: o.caption,
|
|
164
|
+
children: [/* @__PURE__ */ f(a, {
|
|
165
|
+
name: ee,
|
|
153
166
|
size: 12
|
|
154
|
-
}), /* @__PURE__ */ f(
|
|
167
|
+
}), /* @__PURE__ */ f(i, {
|
|
155
168
|
as: "span",
|
|
156
169
|
size: 75,
|
|
157
170
|
color: "tertiary",
|
|
158
|
-
children:
|
|
171
|
+
children: E
|
|
159
172
|
})]
|
|
160
173
|
})]
|
|
161
174
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../VideoPlayerModal-
|
|
1
|
+
import { t as e } from "../../VideoPlayerModal-bQthGzgn.js";
|
|
2
2
|
export { e as VideoPlayerModal };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../VideoPlayer-
|
|
1
|
+
import { t as e } from "../../VideoPlayer-DmgXtaQU.js";
|
|
2
2
|
export { e as VideoPlayer };
|