highsoft-ui 1.0.91 → 1.0.92
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/components/Header/index.d.ts +1 -0
- package/dist/components/Header/index.js +91 -102
- package/dist/components/Notification/index.js +25 -24
- package/dist/components/Search/index.js +7 -5481
- package/dist/highsoft-ui.css +1 -1
- package/dist/index-Dkl2PwZH.js +5484 -0
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as R, useState as E, useEffect as
|
|
3
|
-
import { a as
|
|
2
|
+
import { useRef as R, useState as E, useEffect as T } from "react";
|
|
3
|
+
import { a as M, b as Y, J, c as X, z as Z } from "../../utils-BKDJp1i0.js";
|
|
4
4
|
import { A as ee } from "../../Announcement03-obPaH4LK.js";
|
|
5
|
-
import { _ as
|
|
5
|
+
import { _ as f } from "../../extends-hS2Bh-Yp.js";
|
|
6
|
+
import { S as I, a as H } from "../../index-Dkl2PwZH.js";
|
|
6
7
|
import { X as te } from "../../XClose-CCu1vrNS.js";
|
|
7
|
-
import { c as
|
|
8
|
+
import { c as _ } from "../../clsx-OuTLNxxd.js";
|
|
8
9
|
import { Button as u } from "../Button/index.js";
|
|
9
|
-
import { Container as
|
|
10
|
-
import { Logo as
|
|
10
|
+
import { Container as D } from "../Container/index.js";
|
|
11
|
+
import { Logo as O } from "../Logo/index.js";
|
|
11
12
|
import { NewTag as ne } from "../NewTag/index.js";
|
|
12
13
|
import { Notification as oe } from "../Notification/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import { PrefPanel as O } from "../PrefPanel/index.js";
|
|
14
|
+
import { PrefPanel as P } from "../PrefPanel/index.js";
|
|
15
15
|
var re = function(n) {
|
|
16
|
-
return /* @__PURE__ */ e("svg",
|
|
16
|
+
return /* @__PURE__ */ e("svg", f({
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
18
|
width: 24,
|
|
19
19
|
height: 24,
|
|
@@ -29,7 +29,7 @@ var re = function(n) {
|
|
|
29
29
|
})
|
|
30
30
|
}));
|
|
31
31
|
}, se = function(n) {
|
|
32
|
-
return /* @__PURE__ */ e("svg",
|
|
32
|
+
return /* @__PURE__ */ e("svg", f({
|
|
33
33
|
xmlns: "http://www.w3.org/2000/svg",
|
|
34
34
|
width: 24,
|
|
35
35
|
height: 24,
|
|
@@ -45,7 +45,7 @@ var re = function(n) {
|
|
|
45
45
|
})
|
|
46
46
|
}));
|
|
47
47
|
}, ie = function(n) {
|
|
48
|
-
return /* @__PURE__ */ e("svg",
|
|
48
|
+
return /* @__PURE__ */ e("svg", f({
|
|
49
49
|
xmlns: "http://www.w3.org/2000/svg",
|
|
50
50
|
width: 24,
|
|
51
51
|
height: 24,
|
|
@@ -61,7 +61,7 @@ var re = function(n) {
|
|
|
61
61
|
})
|
|
62
62
|
}));
|
|
63
63
|
}, ce = function(n) {
|
|
64
|
-
return /* @__PURE__ */ e("svg",
|
|
64
|
+
return /* @__PURE__ */ e("svg", f({
|
|
65
65
|
xmlns: "http://www.w3.org/2000/svg",
|
|
66
66
|
width: 24,
|
|
67
67
|
height: 24,
|
|
@@ -77,7 +77,7 @@ var re = function(n) {
|
|
|
77
77
|
})
|
|
78
78
|
}));
|
|
79
79
|
}, ae = function(n) {
|
|
80
|
-
return /* @__PURE__ */ e("svg",
|
|
80
|
+
return /* @__PURE__ */ e("svg", f({
|
|
81
81
|
xmlns: "http://www.w3.org/2000/svg",
|
|
82
82
|
width: 24,
|
|
83
83
|
height: 24,
|
|
@@ -93,7 +93,7 @@ var re = function(n) {
|
|
|
93
93
|
})
|
|
94
94
|
}));
|
|
95
95
|
}, le = function(n) {
|
|
96
|
-
return /* @__PURE__ */ e("svg",
|
|
96
|
+
return /* @__PURE__ */ e("svg", f({
|
|
97
97
|
xmlns: "http://www.w3.org/2000/svg",
|
|
98
98
|
width: 24,
|
|
99
99
|
height: 24,
|
|
@@ -109,7 +109,7 @@ var re = function(n) {
|
|
|
109
109
|
})
|
|
110
110
|
}));
|
|
111
111
|
}, W = function(n) {
|
|
112
|
-
return /* @__PURE__ */ e("svg",
|
|
112
|
+
return /* @__PURE__ */ e("svg", f({
|
|
113
113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
114
114
|
width: 24,
|
|
115
115
|
height: 24,
|
|
@@ -125,7 +125,7 @@ var re = function(n) {
|
|
|
125
125
|
})
|
|
126
126
|
}));
|
|
127
127
|
}, $ = function(n) {
|
|
128
|
-
return /* @__PURE__ */ e("svg",
|
|
128
|
+
return /* @__PURE__ */ e("svg", f({
|
|
129
129
|
xmlns: "http://www.w3.org/2000/svg",
|
|
130
130
|
width: 24,
|
|
131
131
|
height: 24,
|
|
@@ -140,24 +140,8 @@ var re = function(n) {
|
|
|
140
140
|
d: "m7 15 3-3-3-3m6 6h4m-9.2 6h8.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.7202 21 17.8802 21 16.2V7.8c0-1.6802 0-2.5202-.327-3.162a3 3 0 0 0-1.311-1.311C18.7202 3 17.8802 3 16.2 3H7.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.2798 3 6.1198 3 7.8v8.4c0 1.6802 0 2.5202.327 3.162a3 3 0 0 0 1.311 1.311C5.2798 21 6.1198 21 7.8 21"
|
|
141
141
|
})
|
|
142
142
|
}));
|
|
143
|
-
}, j = function(n) {
|
|
144
|
-
return /* @__PURE__ */ e("svg", p({
|
|
145
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
146
|
-
width: 24,
|
|
147
|
-
height: 24,
|
|
148
|
-
fill: "none",
|
|
149
|
-
viewBox: "0 0 24 24"
|
|
150
|
-
}, n, {
|
|
151
|
-
children: /* @__PURE__ */ e("path", {
|
|
152
|
-
stroke: "currentColor",
|
|
153
|
-
strokeLinecap: "round",
|
|
154
|
-
strokeLinejoin: "round",
|
|
155
|
-
strokeWidth: 2,
|
|
156
|
-
d: "M3 20c2.3358-2.4774 5.507-4 9-4s6.6642 1.5226 9 4M16.5 7.5c0 2.4853-2.0147 4.5-4.5 4.5S7.5 9.9853 7.5 7.5 9.5147 3 12 3s4.5 2.0147 4.5 4.5"
|
|
157
|
-
})
|
|
158
|
-
}));
|
|
159
143
|
};
|
|
160
|
-
const he = "m_QBtq_buttons", de = "m_QBtq_container", me = "m_QBtq_gpt", ue = "m_QBtq_header", pe = "m_QBtq_icon", we = "m_QBtq_icons", fe = "m_QBtq_links", ge = "m_QBtq_logo", ve = "m_QBtq_main",
|
|
144
|
+
const he = "m_QBtq_buttons", de = "m_QBtq_container", me = "m_QBtq_gpt", ue = "m_QBtq_header", pe = "m_QBtq_icon", we = "m_QBtq_icons", fe = "m_QBtq_links", ge = "m_QBtq_logo", ve = "m_QBtq_main", Ce = "m_QBtq_menu", ke = "m_QBtq_mobile", _e = "m_QBtq_mobileOverlay", xe = "m_QBtq_open", be = "m_QBtq_outer", Be = "m_QBtq_selectableIcon", Ne = "m_QBtq_selected", ye = "m_QBtq_selectedIcon", Se = "m_QBtq_skip", qe = "m_QBtq_sub", Me = "m_QBtq_subContainer", Te = "m_QBtq_subTitle", o = {
|
|
161
145
|
buttons: he,
|
|
162
146
|
container: de,
|
|
163
147
|
gpt: me,
|
|
@@ -167,28 +151,28 @@ const he = "m_QBtq_buttons", de = "m_QBtq_container", me = "m_QBtq_gpt", ue = "m
|
|
|
167
151
|
links: fe,
|
|
168
152
|
logo: ge,
|
|
169
153
|
main: ve,
|
|
170
|
-
menu:
|
|
171
|
-
mobile:
|
|
154
|
+
menu: Ce,
|
|
155
|
+
mobile: ke,
|
|
172
156
|
mobileOverlay: _e,
|
|
173
157
|
open: xe,
|
|
174
158
|
outer: be,
|
|
175
159
|
selectableIcon: Be,
|
|
176
160
|
selected: Ne,
|
|
177
161
|
selectedIcon: ye,
|
|
178
|
-
skip:
|
|
179
|
-
sub:
|
|
162
|
+
skip: Se,
|
|
163
|
+
sub: qe,
|
|
180
164
|
subContainer: Me,
|
|
181
165
|
subTitle: Te
|
|
182
|
-
},
|
|
166
|
+
}, G = "notifications", V = "theme", Qe = 365 * 20, Le = (t) => /^\d{1,3}(?:\.\d{1,3}){3}$/.test(t), Ee = () => {
|
|
183
167
|
if (typeof window > "u") return;
|
|
184
168
|
const t = window.location.hostname;
|
|
185
169
|
if (!t || t === "localhost" || Le(t))
|
|
186
170
|
return;
|
|
187
171
|
const n = t.replace(/^www\./, ""), h = n.split(".");
|
|
188
172
|
return h.length <= 2 ? `.${n}` : `.${h.slice(-2).join(".")}`;
|
|
189
|
-
},
|
|
173
|
+
}, j = () => {
|
|
190
174
|
if (typeof document > "u") return null;
|
|
191
|
-
const t = document.cookie.split("; ").find((n) => n.startsWith(`${
|
|
175
|
+
const t = document.cookie.split("; ").find((n) => n.startsWith(`${G}=`));
|
|
192
176
|
if (!t) return null;
|
|
193
177
|
try {
|
|
194
178
|
return JSON.parse(decodeURIComponent(t.split("=")[1]));
|
|
@@ -197,14 +181,14 @@ const he = "m_QBtq_buttons", de = "m_QBtq_container", me = "m_QBtq_gpt", ue = "m
|
|
|
197
181
|
}
|
|
198
182
|
}, Ie = () => {
|
|
199
183
|
if (typeof document > "u") return null;
|
|
200
|
-
const t = document.cookie.split("; ").find((n) => n.startsWith(`${
|
|
184
|
+
const t = document.cookie.split("; ").find((n) => n.startsWith(`${V}=`));
|
|
201
185
|
if (!t) return null;
|
|
202
186
|
try {
|
|
203
187
|
return decodeURIComponent(t.split("=")[1]);
|
|
204
188
|
} catch {
|
|
205
189
|
return null;
|
|
206
190
|
}
|
|
207
|
-
},
|
|
191
|
+
}, z = (t, n) => {
|
|
208
192
|
if (typeof document > "u") return;
|
|
209
193
|
const h = new Date(
|
|
210
194
|
Date.now() + Qe * 24 * 60 * 60 * 1e3
|
|
@@ -257,29 +241,37 @@ function He({
|
|
|
257
241
|
pathname: s
|
|
258
242
|
}) {
|
|
259
243
|
const a = X();
|
|
260
|
-
return /* @__PURE__ */ e("div", { className:
|
|
261
|
-
({
|
|
262
|
-
|
|
244
|
+
return /* @__PURE__ */ e("div", { className: _(o.sub, o.outer), children: /* @__PURE__ */ e(D, { className: o.subContainer, as: "ul", children: t.map(
|
|
245
|
+
({
|
|
246
|
+
title: y,
|
|
247
|
+
url: v,
|
|
248
|
+
prefixMatch: x,
|
|
249
|
+
icon: S,
|
|
250
|
+
selectedIcon: b,
|
|
251
|
+
tag: g,
|
|
252
|
+
tagVariant: w = "success"
|
|
253
|
+
}, q) => {
|
|
254
|
+
const p = s || typeof window < "u" && window.location.pathname, C = typeof window < "u" && window.location.origin || "http://example.com", k = new URL(v, C), B = p && (!!s || a) && k.origin === C && (x ? p.startsWith(k.pathname) : k.pathname === p);
|
|
263
255
|
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ c(
|
|
264
256
|
n,
|
|
265
257
|
{
|
|
266
258
|
href: m(v, h),
|
|
267
|
-
className:
|
|
268
|
-
[o.selectableIcon]:
|
|
269
|
-
[o.selected]:
|
|
259
|
+
className: _({
|
|
260
|
+
[o.selectableIcon]: b,
|
|
261
|
+
[o.selected]: B
|
|
270
262
|
}),
|
|
271
263
|
children: [
|
|
272
264
|
/* @__PURE__ */ c("span", { className: o.icons, children: [
|
|
273
|
-
/* @__PURE__ */ e("span", { className: o.selectedIcon, children:
|
|
274
|
-
/* @__PURE__ */ e("span", { className: o.icon, children:
|
|
265
|
+
/* @__PURE__ */ e("span", { className: o.selectedIcon, children: b }),
|
|
266
|
+
/* @__PURE__ */ e("span", { className: o.icon, children: S })
|
|
275
267
|
] }),
|
|
276
268
|
/* @__PURE__ */ c("span", { className: o.subTitle, children: [
|
|
277
|
-
|
|
278
|
-
|
|
269
|
+
y,
|
|
270
|
+
g && /* @__PURE__ */ e(ne, { variant: w, icon: !1 })
|
|
279
271
|
] })
|
|
280
272
|
]
|
|
281
273
|
}
|
|
282
|
-
) },
|
|
274
|
+
) }, q);
|
|
283
275
|
}
|
|
284
276
|
) }) });
|
|
285
277
|
}
|
|
@@ -308,9 +300,9 @@ const Oe = [
|
|
|
308
300
|
]
|
|
309
301
|
}
|
|
310
302
|
];
|
|
311
|
-
function
|
|
303
|
+
function Pe() {
|
|
312
304
|
const { theme: t, setTheme: n } = Z(), h = R(!1);
|
|
313
|
-
return
|
|
305
|
+
return T(() => {
|
|
314
306
|
if (h.current) return;
|
|
315
307
|
const s = Ie();
|
|
316
308
|
if (s && s !== t) {
|
|
@@ -318,8 +310,8 @@ function We() {
|
|
|
318
310
|
return;
|
|
319
311
|
}
|
|
320
312
|
h.current = !0;
|
|
321
|
-
}, [n, t]),
|
|
322
|
-
t && V
|
|
313
|
+
}, [n, t]), T(() => {
|
|
314
|
+
t && z(V, t);
|
|
323
315
|
}, [t]), null;
|
|
324
316
|
}
|
|
325
317
|
function Xe({
|
|
@@ -329,69 +321,69 @@ function Xe({
|
|
|
329
321
|
// TODO: Fetch these from the internets
|
|
330
322
|
link: s = "a",
|
|
331
323
|
host: a = "https://www.highcharts.com",
|
|
332
|
-
pathname:
|
|
324
|
+
pathname: y,
|
|
333
325
|
cssVariable: v
|
|
334
326
|
}) {
|
|
335
|
-
const
|
|
336
|
-
|
|
327
|
+
const x = M("(max-width: 374px)"), S = M("(max-width: 849px)"), b = M("(min-width: 850px) and (max-width: 999px)"), g = R(null), [w, q] = E(!1), [p, C] = E([]);
|
|
328
|
+
T(() => {
|
|
337
329
|
let r = window.scrollY;
|
|
338
|
-
const i = 82 +
|
|
339
|
-
let l = d,
|
|
330
|
+
const i = 82 + p.length * 48 + (t?.length ? 72 : 0), d = -(82 + p.length * 48);
|
|
331
|
+
let l = d, N = l;
|
|
340
332
|
g.current && (g.current.style.top = `${l}px`), v && document.documentElement.style.setProperty(
|
|
341
333
|
"--header-bottom",
|
|
342
334
|
`${i + l}px`
|
|
343
335
|
);
|
|
344
336
|
const Q = () => {
|
|
345
|
-
const L = window.scrollY,
|
|
346
|
-
l -=
|
|
337
|
+
const L = window.scrollY, U = L - r;
|
|
338
|
+
l -= U, l < d ? l = d : l > 0 && (l = 0), g.current && l !== N && (g.current.style.top = `${l}px`, v && document.documentElement.style.setProperty(
|
|
347
339
|
"--header-bottom",
|
|
348
340
|
`${i + l}px`
|
|
349
|
-
)), r = L,
|
|
341
|
+
)), r = L, N = l;
|
|
350
342
|
};
|
|
351
343
|
return window.addEventListener("scroll", Q), () => window.removeEventListener("scroll", Q);
|
|
352
|
-
}, [v,
|
|
344
|
+
}, [v, p.length]), Y(() => {
|
|
353
345
|
if (!h.length) return;
|
|
354
|
-
const r =
|
|
355
|
-
|
|
346
|
+
const r = j();
|
|
347
|
+
C(
|
|
356
348
|
r ? h.filter(
|
|
357
349
|
(i) => !i.id || !r.closed.includes(i.id)
|
|
358
350
|
) : h
|
|
359
351
|
);
|
|
360
352
|
}, [a, h]);
|
|
361
|
-
const
|
|
353
|
+
const k = (r) => {
|
|
362
354
|
if (r.preventDefault(), !(r.nativeEvent instanceof KeyboardEvent) || r.nativeEvent.code === "Enter" || r.nativeEvent.code === "Space") {
|
|
363
355
|
const i = document.querySelector("main");
|
|
364
356
|
i && (i.scrollIntoView(), i.getAttribute("tabindex") !== "-1" && i.setAttribute("tabindex", "-1"), i.focus());
|
|
365
357
|
}
|
|
366
|
-
},
|
|
367
|
-
|
|
368
|
-
},
|
|
369
|
-
if (
|
|
370
|
-
const i =
|
|
358
|
+
}, B = () => {
|
|
359
|
+
q(!w);
|
|
360
|
+
}, K = (r) => {
|
|
361
|
+
if (C(p.filter((d) => !d.id || d.id !== r)), !r) return;
|
|
362
|
+
const i = j() ?? {
|
|
371
363
|
closed: []
|
|
372
364
|
};
|
|
373
|
-
i.closed.includes(r) ||
|
|
374
|
-
|
|
365
|
+
i.closed.includes(r) || z(
|
|
366
|
+
G,
|
|
375
367
|
JSON.stringify({
|
|
376
368
|
closed: [...i.closed, r]
|
|
377
369
|
})
|
|
378
370
|
);
|
|
379
371
|
};
|
|
380
372
|
return /* @__PURE__ */ c(J, { children: [
|
|
381
|
-
/* @__PURE__ */ e(
|
|
373
|
+
/* @__PURE__ */ e(Pe, {}),
|
|
382
374
|
/* @__PURE__ */ c("header", { className: o.header, ref: g, children: [
|
|
383
|
-
|
|
375
|
+
p?.map(({ id: r, content: i, variant: d, closable: l }, N) => /* @__PURE__ */ e(
|
|
384
376
|
oe,
|
|
385
377
|
{
|
|
386
378
|
id: r,
|
|
387
379
|
content: i,
|
|
388
380
|
variant: d,
|
|
389
381
|
closable: l,
|
|
390
|
-
onClose: () =>
|
|
382
|
+
onClose: () => K(r)
|
|
391
383
|
},
|
|
392
|
-
|
|
384
|
+
N
|
|
393
385
|
)),
|
|
394
|
-
/* @__PURE__ */ e("div", { className:
|
|
386
|
+
/* @__PURE__ */ e("div", { className: _(o.main, o.outer), children: /* @__PURE__ */ c(D, { as: "nav", className: o.container, children: [
|
|
395
387
|
/* @__PURE__ */ e(
|
|
396
388
|
u,
|
|
397
389
|
{
|
|
@@ -399,8 +391,8 @@ function Xe({
|
|
|
399
391
|
className: o.skip,
|
|
400
392
|
size: 500,
|
|
401
393
|
tabIndex: "0",
|
|
402
|
-
onClick:
|
|
403
|
-
onKeyPress:
|
|
394
|
+
onClick: k,
|
|
395
|
+
onKeyPress: k,
|
|
404
396
|
children: "Skip to content"
|
|
405
397
|
}
|
|
406
398
|
),
|
|
@@ -409,7 +401,7 @@ function Xe({
|
|
|
409
401
|
{
|
|
410
402
|
className: o.logo,
|
|
411
403
|
href: m("https://www.highcharts.com/", a),
|
|
412
|
-
children: /* @__PURE__ */ e(
|
|
404
|
+
children: /* @__PURE__ */ e(O, { showText: !b && !x })
|
|
413
405
|
}
|
|
414
406
|
),
|
|
415
407
|
/* @__PURE__ */ e("ul", { className: o.links, children: A.map(({ title: r, url: i }, d) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
@@ -438,16 +430,16 @@ function Xe({
|
|
|
438
430
|
]
|
|
439
431
|
}
|
|
440
432
|
),
|
|
441
|
-
/* @__PURE__ */ e(
|
|
442
|
-
/* @__PURE__ */ e(
|
|
433
|
+
/* @__PURE__ */ e(I, {}),
|
|
434
|
+
/* @__PURE__ */ e(P, {}),
|
|
443
435
|
/* @__PURE__ */ e(
|
|
444
436
|
u,
|
|
445
437
|
{
|
|
446
438
|
variant: "brand",
|
|
447
439
|
as: s,
|
|
448
|
-
href: m("https://shop.highcharts.com/
|
|
440
|
+
href: m("https://shop.highcharts.com/", a),
|
|
449
441
|
"aria-label": "Login",
|
|
450
|
-
children: /* @__PURE__ */ e(
|
|
442
|
+
children: /* @__PURE__ */ e(H, {})
|
|
451
443
|
}
|
|
452
444
|
),
|
|
453
445
|
/* @__PURE__ */ c(
|
|
@@ -470,7 +462,7 @@ function Xe({
|
|
|
470
462
|
{
|
|
471
463
|
variant: w ? "white" : "transparent",
|
|
472
464
|
className: o.menu,
|
|
473
|
-
onClick:
|
|
465
|
+
onClick: B,
|
|
474
466
|
children: [
|
|
475
467
|
w ? "Close" : "Menu",
|
|
476
468
|
w ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ e(ce, {})
|
|
@@ -485,22 +477,22 @@ function Xe({
|
|
|
485
477
|
items: t,
|
|
486
478
|
link: s,
|
|
487
479
|
host: a,
|
|
488
|
-
pathname:
|
|
480
|
+
pathname: y
|
|
489
481
|
}
|
|
490
482
|
),
|
|
491
483
|
n,
|
|
492
|
-
|
|
484
|
+
S && /* @__PURE__ */ c(F, { children: [
|
|
493
485
|
/* @__PURE__ */ e(
|
|
494
486
|
"div",
|
|
495
487
|
{
|
|
496
|
-
className:
|
|
497
|
-
onClick:
|
|
488
|
+
className: _(o.mobileOverlay, { [o.open]: w }),
|
|
489
|
+
onClick: B
|
|
498
490
|
}
|
|
499
491
|
),
|
|
500
492
|
/* @__PURE__ */ c(
|
|
501
493
|
"nav",
|
|
502
494
|
{
|
|
503
|
-
className:
|
|
495
|
+
className: _(o.mobile, {
|
|
504
496
|
[o.open]: w
|
|
505
497
|
}),
|
|
506
498
|
children: [
|
|
@@ -510,7 +502,7 @@ function Xe({
|
|
|
510
502
|
{
|
|
511
503
|
className: o.logo,
|
|
512
504
|
href: m("https://www.highcharts.com/", a),
|
|
513
|
-
children: /* @__PURE__ */ e(
|
|
505
|
+
children: /* @__PURE__ */ e(O, { showText: !x })
|
|
514
506
|
}
|
|
515
507
|
),
|
|
516
508
|
/* @__PURE__ */ c("div", { className: o.buttons, children: [
|
|
@@ -529,8 +521,8 @@ function Xe({
|
|
|
529
521
|
]
|
|
530
522
|
}
|
|
531
523
|
),
|
|
532
|
-
/* @__PURE__ */ e(
|
|
533
|
-
/* @__PURE__ */ e(
|
|
524
|
+
/* @__PURE__ */ e(I, {}),
|
|
525
|
+
/* @__PURE__ */ e(P, {})
|
|
534
526
|
] })
|
|
535
527
|
] }),
|
|
536
528
|
/* @__PURE__ */ c("div", { className: o.buttons, children: [
|
|
@@ -540,12 +532,9 @@ function Xe({
|
|
|
540
532
|
variant: "brand",
|
|
541
533
|
fullWidth: !0,
|
|
542
534
|
as: s,
|
|
543
|
-
href: m(
|
|
544
|
-
"https://shop.highcharts.com/account",
|
|
545
|
-
a
|
|
546
|
-
),
|
|
535
|
+
href: m("https://shop.highcharts.com/", a),
|
|
547
536
|
children: [
|
|
548
|
-
/* @__PURE__ */ e(
|
|
537
|
+
/* @__PURE__ */ e(H, {}),
|
|
549
538
|
"Login"
|
|
550
539
|
]
|
|
551
540
|
}
|
|
@@ -5,7 +5,7 @@ import { c as m } 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", n = {
|
|
9
9
|
active: E,
|
|
10
10
|
attention: j,
|
|
11
11
|
brand: H,
|
|
@@ -22,71 +22,72 @@ const E = "MhRkRW_active", j = "MhRkRW_attention", H = "MhRkRW_brand", L = "MhRk
|
|
|
22
22
|
titleText: J
|
|
23
23
|
};
|
|
24
24
|
function nt({
|
|
25
|
-
id:
|
|
25
|
+
id: g,
|
|
26
26
|
content: c,
|
|
27
27
|
variant: r = "brand",
|
|
28
|
-
closable:
|
|
29
|
-
onClose:
|
|
28
|
+
closable: v = !0,
|
|
29
|
+
onClose: M
|
|
30
30
|
}) {
|
|
31
|
-
const
|
|
32
|
-
() =>
|
|
33
|
-
), [W, u] = d(!1), [_, R] = d(!1), f = W || _, i =
|
|
31
|
+
const e = Array.isArray(c) ? c : [c], [h, k] = d(
|
|
32
|
+
() => e.length > 1 ? Math.floor(Math.random() * e.length) : 0
|
|
33
|
+
), [W, u] = d(!1), [_, R] = d(!1), f = W || _, i = e[h]?.url, N = i ? "a" : "div";
|
|
34
34
|
C(() => {
|
|
35
|
-
if (
|
|
35
|
+
if (e.length <= 1 || f) return;
|
|
36
36
|
const t = window.setInterval(() => {
|
|
37
|
-
k((o) => (o + 1) %
|
|
37
|
+
k((o) => (o + 1) % e.length);
|
|
38
38
|
}, 15e3);
|
|
39
39
|
return () => window.clearInterval(t);
|
|
40
|
-
}, [
|
|
40
|
+
}, [e.length, f]);
|
|
41
41
|
const b = () => u(!0), x = (t) => {
|
|
42
42
|
t.currentTarget.contains(t.relatedTarget) || u(!1);
|
|
43
43
|
}, I = () => R(!0), T = () => R(!1), p = (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: n.title, children: [
|
|
46
46
|
t.tag === "new" && /* @__PURE__ */ s(B, { variant: r, icon: !1 }),
|
|
47
|
-
/* @__PURE__ */ s("span", { className:
|
|
47
|
+
/* @__PURE__ */ s("span", { className: n.titleText, children: t.title })
|
|
48
48
|
] }),
|
|
49
|
-
t.description && /* @__PURE__ */ s("span", { className:
|
|
49
|
+
t.description && /* @__PURE__ */ s("span", { className: n.description, children: t.description })
|
|
50
50
|
] });
|
|
51
|
-
return /* @__PURE__ */ s("div", { className:
|
|
51
|
+
return /* @__PURE__ */ s("div", { className: n.content, "aria-hidden": !o, children: a });
|
|
52
52
|
};
|
|
53
|
-
return
|
|
53
|
+
return e.length ? /* @__PURE__ */ s(
|
|
54
54
|
N,
|
|
55
55
|
{
|
|
56
|
-
className: m(
|
|
56
|
+
className: m(n.notification, n[r]),
|
|
57
57
|
"data-theme": "light",
|
|
58
58
|
...i ? {
|
|
59
59
|
href: i,
|
|
60
60
|
"data-track": "header-banner",
|
|
61
61
|
"data-track-action": "click",
|
|
62
|
-
"data-track-label":
|
|
62
|
+
"data-track-label": g || i
|
|
63
63
|
} : {},
|
|
64
|
+
...e.length > 1 ? { "aria-live": "polite" } : {},
|
|
64
65
|
onFocus: b,
|
|
65
66
|
onBlur: x,
|
|
66
67
|
onMouseEnter: I,
|
|
67
68
|
onMouseLeave: T,
|
|
68
|
-
children: /* @__PURE__ */ l(A, { className:
|
|
69
|
-
|
|
69
|
+
children: /* @__PURE__ */ l(A, { className: n.container, children: [
|
|
70
|
+
e.length > 1 ? /* @__PURE__ */ s("div", { className: n.carousel, children: e.map((t, o) => {
|
|
70
71
|
const a = o === h;
|
|
71
72
|
return /* @__PURE__ */ s(
|
|
72
73
|
"div",
|
|
73
74
|
{
|
|
74
|
-
className: m(
|
|
75
|
+
className: m(n.slide, { [n.active]: a }),
|
|
75
76
|
"aria-hidden": !a,
|
|
76
77
|
children: p(t, a)
|
|
77
78
|
},
|
|
78
79
|
`${t.title ?? t.description ?? "item"}-${o}`
|
|
79
80
|
);
|
|
80
|
-
}) }) : p(
|
|
81
|
-
|
|
81
|
+
}) }) : p(e[0]),
|
|
82
|
+
v && /* @__PURE__ */ s(
|
|
82
83
|
y,
|
|
83
84
|
{
|
|
84
85
|
variant: r === "brand" ? "brand" : "transparent",
|
|
85
86
|
size: 100,
|
|
86
|
-
className:
|
|
87
|
+
className: n.close,
|
|
87
88
|
"aria-label": "Close notification",
|
|
88
89
|
onClick: (t) => {
|
|
89
|
-
t.preventDefault(), t.stopPropagation(),
|
|
90
|
+
t.preventDefault(), t.stopPropagation(), M?.();
|
|
90
91
|
},
|
|
91
92
|
children: /* @__PURE__ */ s(F, {})
|
|
92
93
|
}
|