highsoft-ui 1.0.102 → 1.0.104
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/{CookiePolicyModal-DcWMFDQU.js → CookiePolicyModal-C5FOuvB-.js} +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +2 -2
- package/dist/components/Footer/index.js +2 -2
- package/dist/components/Header/index.js +132 -132
- package/dist/components/Notification/index.js +30 -31
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/Search/index.js +2 -2
- package/dist/highsoft-ui.css +1 -1
- package/dist/{index-9MgBElwS.js → index-Bxju7wvI.js} +1 -1
- package/dist/{index-F_QKz-YL.js → index-DThcOQDt.js} +6 -6
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, jsxs as l, Fragment as w } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d, useEffect as C } from "react";
|
|
3
3
|
import { X as F } from "../../XClose-CCu1vrNS.js";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import { Button as y } from "../Button/index.js";
|
|
6
6
|
import { Container as A } from "../Container/index.js";
|
|
7
7
|
import { NewTag as B } from "../NewTag/index.js";
|
|
8
|
-
const E = "MhRkRW_active", j = "MhRkRW_attention", H = "MhRkRW_brand", L = "MhRkRW_carousel", P = "MhRkRW_close", X = "MhRkRW_container", $ = "MhRkRW_content", z = "MhRkRW_danger", D = "MhRkRW_description", S = "MhRkRW_notification", U = "MhRkRW_slide", q = "MhRkRW_success", G = "MhRkRW_title", J = "MhRkRW_titleText",
|
|
8
|
+
const E = "MhRkRW_active", j = "MhRkRW_attention", H = "MhRkRW_brand", L = "MhRkRW_carousel", P = "MhRkRW_close", X = "MhRkRW_container", $ = "MhRkRW_content", z = "MhRkRW_danger", D = "MhRkRW_description", S = "MhRkRW_notification", U = "MhRkRW_slide", q = "MhRkRW_success", G = "MhRkRW_title", J = "MhRkRW_titleText", e = {
|
|
9
9
|
active: E,
|
|
10
10
|
attention: j,
|
|
11
11
|
brand: H,
|
|
@@ -22,72 +22,71 @@ const E = "MhRkRW_active", j = "MhRkRW_attention", H = "MhRkRW_brand", L = "MhRk
|
|
|
22
22
|
titleText: J
|
|
23
23
|
};
|
|
24
24
|
function nt({
|
|
25
|
-
id:
|
|
26
|
-
content:
|
|
25
|
+
id: M,
|
|
26
|
+
content: i,
|
|
27
27
|
variant: r = "brand",
|
|
28
|
-
closable:
|
|
29
|
-
onClose:
|
|
28
|
+
closable: g = !0,
|
|
29
|
+
onClose: k
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
32
|
-
() =>
|
|
33
|
-
), [W, u] = d(!1), [_, R] = d(!1), f = W || _,
|
|
31
|
+
const n = Array.isArray(i) ? i : [i], [h, v] = d(
|
|
32
|
+
() => n.length > 1 ? Math.floor(Math.random() * n.length) : 0
|
|
33
|
+
), [W, u] = d(!1), [_, R] = d(!1), f = W || _, c = n[h]?.url, N = c ? "a" : "div";
|
|
34
34
|
C(() => {
|
|
35
|
-
if (
|
|
35
|
+
if (n.length <= 1 || f) return;
|
|
36
36
|
const t = window.setInterval(() => {
|
|
37
|
-
|
|
37
|
+
v((o) => (o + 1) % n.length);
|
|
38
38
|
}, 15e3);
|
|
39
39
|
return () => window.clearInterval(t);
|
|
40
|
-
}, [
|
|
40
|
+
}, [n.length, f]);
|
|
41
41
|
const b = () => u(!0), x = (t) => {
|
|
42
42
|
t.currentTarget.contains(t.relatedTarget) || u(!1);
|
|
43
|
-
}, I = () => R(!0), T = () => R(!1),
|
|
43
|
+
}, I = () => R(!0), T = () => R(!1), m = (t, o = !0) => {
|
|
44
44
|
const a = /* @__PURE__ */ l(w, { children: [
|
|
45
|
-
t.title && /* @__PURE__ */ l("span", { className:
|
|
45
|
+
t.title && /* @__PURE__ */ l("span", { className: e.title, children: [
|
|
46
46
|
t.tag === "new" && /* @__PURE__ */ s(B, { variant: r, icon: !1 }),
|
|
47
|
-
/* @__PURE__ */ s("span", { className:
|
|
47
|
+
/* @__PURE__ */ s("span", { className: e.titleText, children: t.title })
|
|
48
48
|
] }),
|
|
49
|
-
t.description && /* @__PURE__ */ s("span", { className:
|
|
49
|
+
t.description && /* @__PURE__ */ s("span", { className: e.description, children: t.description })
|
|
50
50
|
] });
|
|
51
|
-
return /* @__PURE__ */ s("div", { className:
|
|
51
|
+
return /* @__PURE__ */ s("div", { className: e.content, "aria-hidden": !o, children: a });
|
|
52
52
|
};
|
|
53
|
-
return
|
|
53
|
+
return n.length ? /* @__PURE__ */ s(
|
|
54
54
|
N,
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
56
|
+
className: p(e.notification, e[r]),
|
|
57
57
|
"data-theme": "light",
|
|
58
|
-
...
|
|
59
|
-
href:
|
|
58
|
+
...c ? {
|
|
59
|
+
href: c,
|
|
60
60
|
"data-track": "header-banner",
|
|
61
61
|
"data-track-action": "click",
|
|
62
|
-
"data-track-label":
|
|
62
|
+
"data-track-label": M || c
|
|
63
63
|
} : {},
|
|
64
|
-
...e.length > 1 ? { "aria-live": "polite" } : {},
|
|
65
64
|
onFocus: b,
|
|
66
65
|
onBlur: x,
|
|
67
66
|
onMouseEnter: I,
|
|
68
67
|
onMouseLeave: T,
|
|
69
|
-
children: /* @__PURE__ */ l(A, { className:
|
|
70
|
-
|
|
68
|
+
children: /* @__PURE__ */ l(A, { className: e.container, children: [
|
|
69
|
+
n.length > 1 ? /* @__PURE__ */ s("div", { className: e.carousel, children: n.map((t, o) => {
|
|
71
70
|
const a = o === h;
|
|
72
71
|
return /* @__PURE__ */ s(
|
|
73
72
|
"div",
|
|
74
73
|
{
|
|
75
|
-
className:
|
|
74
|
+
className: p(e.slide, { [e.active]: a }),
|
|
76
75
|
"aria-hidden": !a,
|
|
77
|
-
children:
|
|
76
|
+
children: m(t, a)
|
|
78
77
|
},
|
|
79
78
|
`${t.title ?? t.description ?? "item"}-${o}`
|
|
80
79
|
);
|
|
81
|
-
}) }) :
|
|
82
|
-
|
|
80
|
+
}) }) : m(n[0]),
|
|
81
|
+
g && /* @__PURE__ */ s(
|
|
83
82
|
y,
|
|
84
83
|
{
|
|
85
84
|
variant: r === "brand" ? "brand" : "transparent",
|
|
86
85
|
size: 100,
|
|
87
|
-
className:
|
|
86
|
+
className: e.close,
|
|
88
87
|
"aria-label": "Close notification",
|
|
89
88
|
onClick: (t) => {
|
|
90
|
-
t.preventDefault(), t.stopPropagation(),
|
|
89
|
+
t.preventDefault(), t.stopPropagation(), k?.();
|
|
91
90
|
},
|
|
92
91
|
children: /* @__PURE__ */ s(F, {})
|
|
93
92
|
}
|
|
@@ -6,7 +6,7 @@ import { C as Ue } from "../../Check-Cm4roSEj.js";
|
|
|
6
6
|
import { _ as yt } from "../../extends-hS2Bh-Yp.js";
|
|
7
7
|
import { c as Ze } from "../../clsx-OuTLNxxd.js";
|
|
8
8
|
import { Button as Je } from "../Button/index.js";
|
|
9
|
-
import { h as Mt, P as ft,
|
|
9
|
+
import { h as Mt, P as ft, u as bt, c as oe, f as tn, e as en, b as nn, d as st, g as re, i as on, j as rn, R as sn, a as cn, k as an, F as ln, D as fn } from "../../index-CYz8LhDn.js";
|
|
10
10
|
import * as un from "react-dom";
|
|
11
11
|
var dn = function(e) {
|
|
12
12
|
return /* @__PURE__ */ w("svg", yt({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { S as e } from "../../index-
|
|
3
|
+
import { S as e } from "../../index-Bxju7wvI.js";
|
|
4
4
|
import "../Button/index.js";
|
|
5
|
-
import "../../index-
|
|
5
|
+
import "../../index-DThcOQDt.js";
|
|
6
6
|
import "../../index-hYJmp-0x.js";
|
|
7
7
|
export {
|
|
8
8
|
e as Search
|