highsoft-ui 1.0.174 → 1.0.176
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 +97 -1
- package/dist/Breadcrumb-CyaMrJfW.js +80 -0
- package/dist/{Footer-C2tXo3oR.js → Footer-8oEBlwJ5.js} +1 -1
- package/dist/{ProductIcon-C5yvnjHr.js → ProductIcon-Cr6E2K9a.js} +1 -0
- package/dist/Video-VbXl2HoE.js +64 -0
- package/dist/{YoutubeModal-CXSHjsEd.js → YoutubeModal-B6yOEOaP.js} +1 -1
- package/dist/assets/promo-banner/core-dark.mov +0 -0
- package/dist/assets/promo-banner/core-dark.webm +0 -0
- package/dist/assets/promo-banner/core-dark.webp +0 -0
- package/dist/assets/promo-banner/core-light.mov +0 -0
- package/dist/assets/promo-banner/core-light.webm +0 -0
- package/dist/assets/promo-banner/core-light.webp +0 -0
- package/dist/assets/promo-banner/dashboards-dark.mov +0 -0
- package/dist/assets/promo-banner/dashboards-dark.webm +0 -0
- package/dist/assets/promo-banner/dashboards-dark.webp +0 -0
- package/dist/assets/promo-banner/dashboards-light.mov +0 -0
- package/dist/assets/promo-banner/dashboards-light.webm +0 -0
- package/dist/assets/promo-banner/dashboards-light.webp +0 -0
- package/dist/assets/promo-banner/gantt-dark.mov +0 -0
- package/dist/assets/promo-banner/gantt-dark.webm +0 -0
- package/dist/assets/promo-banner/gantt-dark.webp +0 -0
- package/dist/assets/promo-banner/gantt-light.mov +0 -0
- package/dist/assets/promo-banner/gantt-light.webm +0 -0
- package/dist/assets/promo-banner/gantt-light.webp +0 -0
- package/dist/assets/promo-banner/grid-dark.mov +0 -0
- package/dist/assets/promo-banner/grid-dark.webm +0 -0
- package/dist/assets/promo-banner/grid-dark.webp +0 -0
- package/dist/assets/promo-banner/grid-light.mov +0 -0
- package/dist/assets/promo-banner/grid-light.webm +0 -0
- package/dist/assets/promo-banner/grid-light.webp +0 -0
- package/dist/assets/promo-banner/maps-dark.mov +0 -0
- package/dist/assets/promo-banner/maps-dark.webm +0 -0
- package/dist/assets/promo-banner/maps-dark.webp +0 -0
- package/dist/assets/promo-banner/maps-light.mov +0 -0
- package/dist/assets/promo-banner/maps-light.webm +0 -0
- package/dist/assets/promo-banner/maps-light.webp +0 -0
- package/dist/assets/promo-banner/morningstar-dark.mov +0 -0
- package/dist/assets/promo-banner/morningstar-dark.webm +0 -0
- package/dist/assets/promo-banner/morningstar-dark.webp +0 -0
- package/dist/assets/promo-banner/morningstar-light.mov +0 -0
- package/dist/assets/promo-banner/morningstar-light.webm +0 -0
- package/dist/assets/promo-banner/morningstar-light.webp +0 -0
- package/dist/assets/promo-banner/orbit-dark.mov +0 -0
- package/dist/assets/promo-banner/orbit-dark.webm +0 -0
- package/dist/assets/promo-banner/orbit-dark.webp +0 -0
- package/dist/assets/promo-banner/orbit-light.mov +0 -0
- package/dist/assets/promo-banner/orbit-light.webm +0 -0
- package/dist/assets/promo-banner/orbit-light.webp +0 -0
- package/dist/assets/promo-banner/stock-dark.mov +0 -0
- package/dist/assets/promo-banner/stock-dark.webm +0 -0
- package/dist/assets/promo-banner/stock-dark.webp +0 -0
- package/dist/assets/promo-banner/stock-light.mov +0 -0
- package/dist/assets/promo-banner/stock-light.webm +0 -0
- package/dist/assets/promo-banner/stock-light.webp +0 -0
- package/dist/components/Breadcrumb/index.js +2 -0
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/ProductIcon/icons/grayscale/Accessibility.js +8 -8
- package/dist/components/ProductIcon/icons/grayscale/Advantageplus.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/Api.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/CaseStudies.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/Changelog.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/ChartChooser.js +8 -8
- package/dist/components/ProductIcon/icons/grayscale/Core.js +11 -5
- package/dist/components/ProductIcon/icons/grayscale/CustomProjects.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/Dashboards.js +1 -1
- package/dist/components/ProductIcon/icons/grayscale/Demos.js +5 -5
- package/dist/components/ProductIcon/icons/grayscale/Docs.js +6 -6
- package/dist/components/ProductIcon/icons/grayscale/Editor.js +1 -1
- package/dist/components/ProductIcon/icons/grayscale/EduLicense.js +6 -6
- package/dist/components/ProductIcon/icons/grayscale/ExportServer.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/Gantt.js +5 -5
- package/dist/components/ProductIcon/icons/grayscale/Gpt.js +9 -19
- package/dist/components/ProductIcon/icons/grayscale/Grid.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/Hca.js +4 -11
- package/dist/components/ProductIcon/icons/grayscale/Lab.js +8 -22
- package/dist/components/ProductIcon/icons/grayscale/License.js +4 -4
- package/dist/components/ProductIcon/icons/grayscale/Maps.js +8 -6
- package/dist/components/ProductIcon/icons/grayscale/Morningstar.js +11 -0
- package/dist/components/ProductIcon/icons/grayscale/Orbit.js +8 -8
- package/dist/components/ProductIcon/icons/grayscale/Python.js +5 -5
- package/dist/components/ProductIcon/icons/grayscale/Roadmap.js +4 -4
- package/dist/components/ProductIcon/icons/grayscale/Stock.js +8 -19
- package/dist/components/ProductIcon/icons/grayscale/Support.js +3 -3
- package/dist/components/ProductIcon/icons/grayscale/index.js +4 -2
- package/dist/components/ProductIcon/icons/line/Accessibility.js +1 -1
- package/dist/components/ProductIcon/icons/line/Advantageplus.js +3 -3
- package/dist/components/ProductIcon/icons/line/Api.js +1 -1
- package/dist/components/ProductIcon/icons/line/CaseStudies.js +1 -1
- package/dist/components/ProductIcon/icons/line/Changelog.js +3 -3
- package/dist/components/ProductIcon/icons/line/ChartChooser.js +8 -8
- package/dist/components/ProductIcon/icons/line/Core.js +1 -1
- package/dist/components/ProductIcon/icons/line/CustomProjects.js +3 -3
- package/dist/components/ProductIcon/icons/line/Dashboards.js +1 -1
- package/dist/components/ProductIcon/icons/line/Demos.js +1 -1
- package/dist/components/ProductIcon/icons/line/Docs.js +2 -2
- package/dist/components/ProductIcon/icons/line/Editor.js +1 -1
- package/dist/components/ProductIcon/icons/line/EduLicense.js +2 -2
- package/dist/components/ProductIcon/icons/line/ExportServer.js +2 -2
- package/dist/components/ProductIcon/icons/line/Gantt.js +1 -1
- package/dist/components/ProductIcon/icons/line/Gpt.js +2 -2
- package/dist/components/ProductIcon/icons/line/Grid.js +2 -2
- package/dist/components/ProductIcon/icons/line/Hca.js +2 -2
- package/dist/components/ProductIcon/icons/line/Lab.js +2 -2
- package/dist/components/ProductIcon/icons/line/License.js +1 -1
- package/dist/components/ProductIcon/icons/line/Maps.js +1 -1
- package/dist/components/ProductIcon/icons/line/Morningstar.js +11 -0
- package/dist/components/ProductIcon/icons/line/Orbit.js +8 -8
- package/dist/components/ProductIcon/icons/line/Python.js +1 -1
- package/dist/components/ProductIcon/icons/line/Roadmap.js +6 -3
- package/dist/components/ProductIcon/icons/line/Stock.js +2 -2
- package/dist/components/ProductIcon/icons/line/Support.js +1 -1
- package/dist/components/ProductIcon/icons/line/index.js +4 -2
- package/dist/components/ProductIcon/icons/monochrome/Accessibility.js +8 -8
- package/dist/components/ProductIcon/icons/monochrome/Advantageplus.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/Api.js +4 -4
- package/dist/components/ProductIcon/icons/monochrome/CaseStudies.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/Changelog.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/ChartChooser.js +8 -8
- package/dist/components/ProductIcon/icons/monochrome/Core.js +11 -5
- package/dist/components/ProductIcon/icons/monochrome/CustomProjects.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/Dashboards.js +1 -1
- package/dist/components/ProductIcon/icons/monochrome/Demos.js +6 -6
- package/dist/components/ProductIcon/icons/monochrome/Docs.js +6 -6
- package/dist/components/ProductIcon/icons/monochrome/Editor.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/EduLicense.js +5 -5
- package/dist/components/ProductIcon/icons/monochrome/ExportServer.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/Gantt.js +7 -14
- package/dist/components/ProductIcon/icons/monochrome/Gpt.js +6 -22
- package/dist/components/ProductIcon/icons/monochrome/Grid.js +3 -3
- package/dist/components/ProductIcon/icons/monochrome/Hca.js +5 -5
- package/dist/components/ProductIcon/icons/monochrome/Lab.js +8 -22
- package/dist/components/ProductIcon/icons/monochrome/License.js +4 -4
- package/dist/components/ProductIcon/icons/monochrome/Maps.js +5 -3
- package/dist/components/ProductIcon/icons/monochrome/Morningstar.js +11 -0
- package/dist/components/ProductIcon/icons/monochrome/Orbit.js +8 -8
- package/dist/components/ProductIcon/icons/monochrome/Python.js +1 -1
- package/dist/components/ProductIcon/icons/monochrome/Roadmap.js +4 -8
- package/dist/components/ProductIcon/icons/monochrome/Stock.js +8 -19
- package/dist/components/ProductIcon/icons/monochrome/Support.js +1 -1
- package/dist/components/ProductIcon/icons/monochrome/index.js +4 -2
- package/dist/components/ProductIcon/icons/multi/Accessibility.js +8 -8
- package/dist/components/ProductIcon/icons/multi/Advantageplus.js +3 -3
- package/dist/components/ProductIcon/icons/multi/Api.js +3 -3
- package/dist/components/ProductIcon/icons/multi/CaseStudies.js +3 -3
- package/dist/components/ProductIcon/icons/multi/Changelog.js +3 -3
- package/dist/components/ProductIcon/icons/multi/ChartChooser.js +8 -8
- package/dist/components/ProductIcon/icons/multi/Core.js +4 -8
- package/dist/components/ProductIcon/icons/multi/CustomProjects.js +3 -3
- package/dist/components/ProductIcon/icons/multi/Dashboards.js +1 -1
- package/dist/components/ProductIcon/icons/multi/Demos.js +5 -5
- package/dist/components/ProductIcon/icons/multi/Docs.js +6 -6
- package/dist/components/ProductIcon/icons/multi/Editor.js +1 -1
- package/dist/components/ProductIcon/icons/multi/EduLicense.js +5 -5
- package/dist/components/ProductIcon/icons/multi/ExportServer.js +3 -3
- package/dist/components/ProductIcon/icons/multi/Gantt.js +5 -5
- package/dist/components/ProductIcon/icons/multi/Gpt.js +7 -23
- package/dist/components/ProductIcon/icons/multi/Grid.js +3 -3
- package/dist/components/ProductIcon/icons/multi/Hca.js +4 -11
- package/dist/components/ProductIcon/icons/multi/Lab.js +12 -26
- package/dist/components/ProductIcon/icons/multi/License.js +4 -4
- package/dist/components/ProductIcon/icons/multi/Maps.js +8 -6
- package/dist/components/ProductIcon/icons/multi/Morningstar.js +11 -0
- package/dist/components/ProductIcon/icons/multi/Orbit.js +8 -8
- package/dist/components/ProductIcon/icons/multi/Python.js +5 -5
- package/dist/components/ProductIcon/icons/multi/Roadmap.js +4 -8
- package/dist/components/ProductIcon/icons/multi/Stock.js +10 -19
- package/dist/components/ProductIcon/icons/multi/Support.js +1 -1
- package/dist/components/ProductIcon/icons/multi/index.js +4 -2
- package/dist/components/ProductIcon/index.js +1 -1
- package/dist/components/ProductIcon/morningstar-mark.js +91 -0
- package/dist/components/PromoBanner/Video.js +2 -0
- package/dist/components/PromoBanner/index.js +97 -0
- package/dist/components/PromoBanner/playback.js +43 -0
- package/dist/components/PromoBanner/product-framing.js +45 -0
- package/dist/components/PromoBanner/product-media.js +2 -0
- package/dist/components/PromoBanner/products.js +60 -0
- package/dist/components/VideoCover/PlaybackGlyphs.js +29 -0
- package/dist/components/VideoCover/index.js +165 -2
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/Breadcrumb/index.d.ts +36 -0
- package/dist/lib/components/ProductIcon/icons/grayscale/Morningstar.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/grayscale/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/line/Morningstar.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/line/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/monochrome/Morningstar.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/monochrome/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/icons/multi/Morningstar.d.ts +2 -0
- package/dist/lib/components/ProductIcon/icons/multi/index.d.ts +1 -0
- package/dist/lib/components/ProductIcon/index.d.ts +2 -2
- package/dist/lib/components/ProductIcon/morningstar-mark.d.ts +5 -0
- package/dist/lib/components/PromoBanner/Video.d.ts +7 -0
- package/dist/lib/components/PromoBanner/index.d.ts +50 -0
- package/dist/lib/components/PromoBanner/playback.d.ts +2 -0
- package/dist/lib/components/PromoBanner/product-framing.d.ts +6 -0
- package/dist/lib/components/PromoBanner/product-media.d.ts +114 -0
- package/dist/lib/components/PromoBanner/products.d.ts +10 -0
- package/dist/lib/components/VideoCover/PlaybackGlyphs.d.ts +2 -0
- package/dist/lib/main.d.ts +4 -0
- package/dist/main.js +8 -6
- package/dist/product-media-gidWl_N7.js +117 -0
- package/dist/scss/variables.scss +2 -0
- package/dist/styles.module-BnKyCO6_.js +13 -0
- package/package.json +10 -7
- package/dist/VideoCover-DdN1nXfu.js +0 -196
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region lib/components/PromoBanner/products.ts
|
|
2
|
+
var e = {
|
|
3
|
+
label: "Get licensed",
|
|
4
|
+
href: "https://shop.highcharts.com/"
|
|
5
|
+
}, t = [
|
|
6
|
+
{
|
|
7
|
+
slug: "core",
|
|
8
|
+
description: "Get your Highcharts Core license and create interactive charts.",
|
|
9
|
+
price: "From 366 USD",
|
|
10
|
+
action: e
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
slug: "stock",
|
|
14
|
+
description: "Get your Highcharts Stock license and visualize data over time.",
|
|
15
|
+
price: "From 732 USD",
|
|
16
|
+
action: e
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
slug: "maps",
|
|
20
|
+
description: "Get your Highcharts Maps license and turn location data into maps.",
|
|
21
|
+
price: "From 494 USD",
|
|
22
|
+
action: e
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
slug: "gantt",
|
|
26
|
+
description: "Get your Highcharts Gantt license and plan projects visually.",
|
|
27
|
+
price: "From 439 USD",
|
|
28
|
+
action: e
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
slug: "dashboards",
|
|
32
|
+
description: "Get your Highcharts Dashboards license and combine charts, grids and KPIs.",
|
|
33
|
+
price: "From 264 USD",
|
|
34
|
+
action: e
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
slug: "grid",
|
|
38
|
+
description: "Get your Highcharts Grid license and build fast data tables.",
|
|
39
|
+
price: "From 316 USD",
|
|
40
|
+
action: e
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
slug: "orbit",
|
|
44
|
+
description: "Get your Highcharts Orbit license and add analytics to any chart.",
|
|
45
|
+
action: {
|
|
46
|
+
label: "Contact us",
|
|
47
|
+
href: "https://shop.highcharts.com/contact"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
slug: "morningstar",
|
|
52
|
+
description: "Explore Morningstar integration.",
|
|
53
|
+
action: {
|
|
54
|
+
label: "Contact sales",
|
|
55
|
+
href: "https://shop.highcharts.com/contact"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
//#endregion
|
|
60
|
+
export { t as promoBannerProducts };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region lib/components/VideoCover/PlaybackGlyphs.tsx
|
|
3
|
+
var n = () => /* @__PURE__ */ e("svg", {
|
|
4
|
+
viewBox: "0 0 24 24",
|
|
5
|
+
"aria-hidden": "true",
|
|
6
|
+
focusable: "false",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
children: /* @__PURE__ */ e("path", { d: "M8.5 5.65v12.7c0 .8.87 1.29 1.55.88l10.2-6.35a1.04 1.04 0 0 0 0-1.76L10.05 4.77a1.04 1.04 0 0 0-1.55.88Z" })
|
|
9
|
+
}), r = () => /* @__PURE__ */ t("svg", {
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
focusable: "false",
|
|
13
|
+
fill: "currentColor",
|
|
14
|
+
children: [/* @__PURE__ */ e("rect", {
|
|
15
|
+
x: "6.5",
|
|
16
|
+
y: "5",
|
|
17
|
+
width: "4",
|
|
18
|
+
height: "14",
|
|
19
|
+
rx: "1.6"
|
|
20
|
+
}), /* @__PURE__ */ e("rect", {
|
|
21
|
+
x: "13.5",
|
|
22
|
+
y: "5",
|
|
23
|
+
width: "4",
|
|
24
|
+
height: "14",
|
|
25
|
+
rx: "1.6"
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as PauseGlyph, n as PlayGlyph };
|
|
@@ -1,2 +1,165 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../../clsx-BWCAbrjV.js";
|
|
3
|
+
import { dt as t } from "../../esm-DQBytmnt.js";
|
|
4
|
+
import { n } from "../../Typography-DI1AkqiO.js";
|
|
5
|
+
import { t as r } from "../../Icon-DJTgdvsG.js";
|
|
6
|
+
import { t as i } from "../../styles.module-BnKyCO6_.js";
|
|
7
|
+
import { PauseGlyph as a, PlayGlyph as o } from "./PlaybackGlyphs.js";
|
|
8
|
+
import { forwardRef as s, useCallback as c, useEffect as l, useRef as u, useState as d } from "react";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
//#region lib/components/VideoCover/index.tsx
|
|
11
|
+
var m = () => /* @__PURE__ */ p("svg", {
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
focusable: "false",
|
|
15
|
+
fill: "none",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
strokeWidth: "2.4",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
children: [/* @__PURE__ */ f("path", { d: "M20 8.5A8.06 8.06 0 1 0 20.94 12" }), /* @__PURE__ */ f("path", {
|
|
21
|
+
d: "M21 4v4.5h-4.5",
|
|
22
|
+
fill: "none"
|
|
23
|
+
})]
|
|
24
|
+
}), h = s(({ src: s, sources: h, poster: g, fit: _ = "cover", autoPlay: v = !0, loop: ee = !1, muted: y = !0, playsInline: b = !0, preload: x = "auto", lazy: S = !0, hoverZoom: C = !1, reducedMotion: w, aspectRatio: T, radius: E = 0, playControl: D = !0, playWhenVisible: O = !0, caption: k, children: A, "aria-label": j, className: te, style: ne }, M) => {
|
|
25
|
+
let N = u(null), P = u(null), [F, I] = d(!S), [L, R] = d(!1), [z, B] = d("paused"), [V, H] = d(!1), U = u("none"), W = !j, G = c((e) => {
|
|
26
|
+
P.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
27
|
+
}, [M]), [K, q] = d(() => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
28
|
+
l(() => {
|
|
29
|
+
if (typeof window > "u" || !window.matchMedia) return;
|
|
30
|
+
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => q(e.matches);
|
|
31
|
+
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
32
|
+
}, []);
|
|
33
|
+
let J = w === void 0 ? K ? "no-animation" : !1 : w === !0 ? "no-animation" : w, Y = J !== !1, X = v && !Y, Z = c(() => {
|
|
34
|
+
let e = P.current;
|
|
35
|
+
e && (e.pause(), J === "skip-to-end" && Number.isFinite(e.duration) ? e.currentTime = Math.max(0, e.duration - .05) : J === "no-animation" && (e.currentTime = 0));
|
|
36
|
+
}, [J]);
|
|
37
|
+
l(() => {
|
|
38
|
+
let e = P.current;
|
|
39
|
+
!e || !F || (Y ? Z() : v && !O && e.play().catch(() => {}));
|
|
40
|
+
}, [
|
|
41
|
+
Y,
|
|
42
|
+
F,
|
|
43
|
+
v,
|
|
44
|
+
O,
|
|
45
|
+
Z
|
|
46
|
+
]);
|
|
47
|
+
let Q = c(() => {
|
|
48
|
+
let e = P.current;
|
|
49
|
+
e && B(e.ended ? "ended" : e.paused ? "paused" : "playing");
|
|
50
|
+
}, []), re = c(() => {
|
|
51
|
+
let e = P.current;
|
|
52
|
+
if (e) {
|
|
53
|
+
if (!e.paused) {
|
|
54
|
+
U.current = "pause", e.pause();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
U.current = "play", e.ended && (e.currentTime = 0), e.play().catch(() => {});
|
|
58
|
+
}
|
|
59
|
+
}, []);
|
|
60
|
+
l(() => {
|
|
61
|
+
if (!O) return;
|
|
62
|
+
let e = N.current;
|
|
63
|
+
if (!e || typeof IntersectionObserver > "u") {
|
|
64
|
+
H(!0);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let t = new IntersectionObserver(([e]) => H(!!e?.isIntersecting), { threshold: .2 });
|
|
68
|
+
return t.observe(e), () => t.disconnect();
|
|
69
|
+
}, [O]), l(() => {
|
|
70
|
+
let e = P.current;
|
|
71
|
+
!e || !F || !O || (V ? (U.current === "play" || X && U.current !== "pause") && e.paused && !e.ended && e.play().catch(() => {}) : e.paused || e.pause());
|
|
72
|
+
}, [
|
|
73
|
+
V,
|
|
74
|
+
F,
|
|
75
|
+
O,
|
|
76
|
+
X
|
|
77
|
+
]), l(() => {
|
|
78
|
+
if (F) return;
|
|
79
|
+
let e = N.current;
|
|
80
|
+
if (!e || typeof IntersectionObserver > "u") {
|
|
81
|
+
I(!0);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let t = new IntersectionObserver(([e]) => {
|
|
85
|
+
e?.isIntersecting && (I(!0), t.disconnect());
|
|
86
|
+
}, { rootMargin: "200px" });
|
|
87
|
+
return t.observe(e), () => t.disconnect();
|
|
88
|
+
}, [F]);
|
|
89
|
+
let $ = /* @__PURE__ */ p("div", {
|
|
90
|
+
ref: N,
|
|
91
|
+
className: e("hsui-video-cover", i.cover, {
|
|
92
|
+
[i.hoverZoom]: C,
|
|
93
|
+
[i.reduced]: Y
|
|
94
|
+
}, te),
|
|
95
|
+
style: {
|
|
96
|
+
"--vc-radius": `${E}px`,
|
|
97
|
+
aspectRatio: T,
|
|
98
|
+
...ne
|
|
99
|
+
},
|
|
100
|
+
role: W ? "presentation" : "img",
|
|
101
|
+
"aria-label": j,
|
|
102
|
+
children: [
|
|
103
|
+
g && /* @__PURE__ */ f("img", {
|
|
104
|
+
className: i.poster,
|
|
105
|
+
style: { objectFit: _ },
|
|
106
|
+
src: g,
|
|
107
|
+
alt: "",
|
|
108
|
+
"aria-hidden": "true"
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ f("video", {
|
|
111
|
+
ref: G,
|
|
112
|
+
className: i.video,
|
|
113
|
+
style: { objectFit: _ },
|
|
114
|
+
src: F && !h ? s : void 0,
|
|
115
|
+
autoPlay: X && !O,
|
|
116
|
+
loop: ee,
|
|
117
|
+
muted: y,
|
|
118
|
+
playsInline: b,
|
|
119
|
+
preload: F ? x : "none",
|
|
120
|
+
"data-ready": L || void 0,
|
|
121
|
+
onCanPlay: () => {
|
|
122
|
+
R(!0), Q();
|
|
123
|
+
},
|
|
124
|
+
onLoadedMetadata: Y ? Z : void 0,
|
|
125
|
+
onPlay: Q,
|
|
126
|
+
onPause: Q,
|
|
127
|
+
onEnded: Q,
|
|
128
|
+
"aria-hidden": W || void 0,
|
|
129
|
+
children: F && h?.map((e) => /* @__PURE__ */ f("source", {
|
|
130
|
+
src: e.src,
|
|
131
|
+
type: e.type
|
|
132
|
+
}, e.src))
|
|
133
|
+
}),
|
|
134
|
+
A != null && /* @__PURE__ */ f("div", {
|
|
135
|
+
className: i.content,
|
|
136
|
+
children: A
|
|
137
|
+
}),
|
|
138
|
+
D && /* @__PURE__ */ f("button", {
|
|
139
|
+
type: "button",
|
|
140
|
+
className: i.playControl,
|
|
141
|
+
onClick: re,
|
|
142
|
+
"aria-label": z === "playing" ? "Pause video" : z === "ended" ? "Replay video" : "Play video",
|
|
143
|
+
children: f(z === "playing" ? a : z === "ended" ? m : o, {})
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
});
|
|
147
|
+
return k == null ? $ : /* @__PURE__ */ p("figure", {
|
|
148
|
+
className: e("hsui-video-cover-figure", i.figure),
|
|
149
|
+
children: [$, /* @__PURE__ */ p("figcaption", {
|
|
150
|
+
className: i.caption,
|
|
151
|
+
children: [/* @__PURE__ */ f(r, {
|
|
152
|
+
name: t,
|
|
153
|
+
size: 12
|
|
154
|
+
}), /* @__PURE__ */ f(n, {
|
|
155
|
+
as: "span",
|
|
156
|
+
size: 75,
|
|
157
|
+
color: "tertiary",
|
|
158
|
+
children: k
|
|
159
|
+
})]
|
|
160
|
+
})]
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
h.displayName = "VideoCover";
|
|
164
|
+
//#endregion
|
|
165
|
+
export { h as VideoCover };
|