highsoft-ui 1.0.72 → 1.0.73
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.js +47 -47
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as A, useState as
|
|
3
|
-
import { a as
|
|
2
|
+
import { useRef as A, useState as L, useEffect as y } from "react";
|
|
3
|
+
import { a as q, J } from "../../utils-C7rfowvr.js";
|
|
4
4
|
import { A as U } from "../../Announcement03-obPaH4LK.js";
|
|
5
5
|
import { _ as m } from "../../extends-hS2Bh-Yp.js";
|
|
6
6
|
import { N as G, X as R } from "../../index-pnL-sAld.js";
|
|
7
7
|
import { c as k } from "../../clsx-OuTLNxxd.js";
|
|
8
8
|
import { Button as h } from "../Button/index.js";
|
|
9
|
-
import { Container as
|
|
10
|
-
import { ThemedLogo as
|
|
11
|
-
import { NewTag as
|
|
12
|
-
import { PrefPanel as
|
|
13
|
-
var
|
|
9
|
+
import { Container as V } from "../Container/index.js";
|
|
10
|
+
import { ThemedLogo as T } from "../Logo/index.js";
|
|
11
|
+
import { NewTag as F } from "../NewTag/index.js";
|
|
12
|
+
import { PrefPanel as H } from "../PrefPanel/index.js";
|
|
13
|
+
var Y = function(n) {
|
|
14
14
|
return /* @__PURE__ */ e("svg", m({
|
|
15
15
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16
16
|
width: 24,
|
|
@@ -106,7 +106,7 @@ var F = function(n) {
|
|
|
106
106
|
d: "M12 16v5m6 0-3.9514-3.2928c-.7288-.6074-1.0932-.911-1.4999-1.0271a2 2 0 0 0-1.0974 0c-.4067.1161-.7711.4197-1.4999 1.0271L6 21m2-10v1m4-3v3m4-5v5m6-9H2m1 0h18v8.2c0 1.6802 0 2.5202-.327 3.162a3 3 0 0 1-1.311 1.311C18.7202 16 17.8802 16 16.2 16H7.8c-1.6802 0-2.5202 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 13.7202 3 12.8802 3 11.2z"
|
|
107
107
|
})
|
|
108
108
|
}));
|
|
109
|
-
},
|
|
109
|
+
}, I = function(n) {
|
|
110
110
|
return /* @__PURE__ */ e("svg", m({
|
|
111
111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
112
112
|
width: 24,
|
|
@@ -122,7 +122,7 @@ var F = function(n) {
|
|
|
122
122
|
d: "m21 21-4.35-4.35M19 11c0 4.4183-3.5817 8-8 8s-8-3.5817-8-8 3.5817-8 8-8 8 3.5817 8 8"
|
|
123
123
|
})
|
|
124
124
|
}));
|
|
125
|
-
},
|
|
125
|
+
}, W = function(n) {
|
|
126
126
|
return /* @__PURE__ */ e("svg", m({
|
|
127
127
|
xmlns: "http://www.w3.org/2000/svg",
|
|
128
128
|
width: 24,
|
|
@@ -138,7 +138,7 @@ var F = function(n) {
|
|
|
138
138
|
d: "M4.5 22v-5m0-10V2M2 4.5h5m-5 15h5M13 3l-1.7342 4.5089c-.282.7332-.423 1.0998-.6423 1.4082a3 3 0 0 1-.7064.7064c-.3084.2193-.675.3603-1.4082.6423L4 12l4.5089 1.7342c.7332.282 1.0998.423 1.4082.6423.2733.1943.5121.4331.7064.7064.2193.3084.3603.675.6423 1.4082L13 21l1.7342-4.5089c.282-.7332.423-1.0998.6423-1.4082a3 3 0 0 1 .7064-.7064c.3084-.2193.675-.3603 1.4082-.6423L22 12l-4.5089-1.7342c-.7332-.282-1.0998-.423-1.4082-.6423a3 3 0 0 1-.7064-.7064c-.2193-.3084-.3603-.675-.6423-1.4082z"
|
|
139
139
|
})
|
|
140
140
|
}));
|
|
141
|
-
},
|
|
141
|
+
}, j = function(n) {
|
|
142
142
|
return /* @__PURE__ */ e("svg", m({
|
|
143
143
|
xmlns: "http://www.w3.org/2000/svg",
|
|
144
144
|
width: 24,
|
|
@@ -154,7 +154,7 @@ var F = function(n) {
|
|
|
154
154
|
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"
|
|
155
155
|
})
|
|
156
156
|
}));
|
|
157
|
-
},
|
|
157
|
+
}, O = function(n) {
|
|
158
158
|
return /* @__PURE__ */ e("svg", m({
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
160
160
|
width: 24,
|
|
@@ -193,7 +193,7 @@ const ee = "m_QBtq_buttons", te = "m_QBtq_container", ne = "m_QBtq_gpt", re = "m
|
|
|
193
193
|
sub: fe,
|
|
194
194
|
subContainer: ke,
|
|
195
195
|
subTitle: Ce
|
|
196
|
-
},
|
|
196
|
+
}, P = [
|
|
197
197
|
{
|
|
198
198
|
title: "Products",
|
|
199
199
|
url: "https://www.highcharts.com/products/",
|
|
@@ -217,7 +217,7 @@ const ee = "m_QBtq_buttons", te = "m_QBtq_container", ne = "m_QBtq_gpt", re = "m
|
|
|
217
217
|
{
|
|
218
218
|
title: "Pricing",
|
|
219
219
|
url: "https://shop.highcharts.com/",
|
|
220
|
-
icon: /* @__PURE__ */ e(
|
|
220
|
+
icon: /* @__PURE__ */ e(Y, {})
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
title: "Blog",
|
|
@@ -234,8 +234,8 @@ function be({
|
|
|
234
234
|
host: p = "https://www.highcharts.com",
|
|
235
235
|
pathname: a = typeof window < "u" ? window.location.pathname : ""
|
|
236
236
|
}) {
|
|
237
|
-
return /* @__PURE__ */ e("div", { className: k(t.sub, t.outer), children: /* @__PURE__ */ e(
|
|
238
|
-
({ title: l, url: C, icon: b, selectedIcon: _, tag:
|
|
237
|
+
return /* @__PURE__ */ e("div", { className: k(t.sub, t.outer), children: /* @__PURE__ */ e(V, { className: t.subContainer, as: "ul", children: c.map(
|
|
238
|
+
({ title: l, url: C, icon: b, selectedIcon: _, tag: N, tagVariant: g = "success" }, u) => {
|
|
239
239
|
const x = typeof window < "u" && window.location.origin || "http://example.com", v = new URL(C, x), f = v.origin === x && v.pathname === a;
|
|
240
240
|
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
241
241
|
n,
|
|
@@ -252,7 +252,7 @@ function be({
|
|
|
252
252
|
] }),
|
|
253
253
|
/* @__PURE__ */ i("span", { className: t.subTitle, children: [
|
|
254
254
|
l,
|
|
255
|
-
|
|
255
|
+
N && /* @__PURE__ */ e(F, { variant: g, icon: !1 })
|
|
256
256
|
] })
|
|
257
257
|
]
|
|
258
258
|
}
|
|
@@ -269,15 +269,15 @@ function Ie({
|
|
|
269
269
|
host: l = "https://www.highcharts.com",
|
|
270
270
|
pathname: C = typeof window < "u" ? window.location.pathname : ""
|
|
271
271
|
}) {
|
|
272
|
-
const b =
|
|
273
|
-
|
|
272
|
+
const b = q("(max-width: 374px)"), _ = q("(max-width: 849px)"), N = q("(min-width: 850px) and (max-width: 999px)"), g = A(null), [u, x] = L(!1), [v, f] = L([]);
|
|
273
|
+
y(() => {
|
|
274
274
|
let o = window.scrollY, r = -82, s = r;
|
|
275
275
|
const w = () => {
|
|
276
|
-
const
|
|
277
|
-
r -=
|
|
276
|
+
const B = window.scrollY, S = B - o;
|
|
277
|
+
r -= S, r < -82 ? r = -82 : r > 0 && (r = 0), g.current && r !== s && (g.current.style.top = `${r}px`), o = B, s = r;
|
|
278
278
|
};
|
|
279
279
|
return window.addEventListener("scroll", w), () => window.removeEventListener("scroll", w);
|
|
280
|
-
}, []),
|
|
280
|
+
}, []), y(() => {
|
|
281
281
|
if (p.length) {
|
|
282
282
|
const o = localStorage.getItem("notifications");
|
|
283
283
|
if (o) {
|
|
@@ -291,14 +291,14 @@ function Ie({
|
|
|
291
291
|
f(p);
|
|
292
292
|
}
|
|
293
293
|
}, [p]);
|
|
294
|
-
const
|
|
294
|
+
const M = (o) => {
|
|
295
295
|
if (o.preventDefault(), !(o.nativeEvent instanceof KeyboardEvent) || o.nativeEvent.code === "Enter" || o.nativeEvent.code === "Space") {
|
|
296
296
|
const r = document.querySelector("main");
|
|
297
297
|
r && (r.scrollIntoView(), r.getAttribute("tabindex") !== "-1" && r.setAttribute("tabindex", "-1"), r.focus());
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, Q = () => {
|
|
300
300
|
x(!u);
|
|
301
|
-
},
|
|
301
|
+
}, E = (o) => {
|
|
302
302
|
f(v.filter((s) => !s.id || s.id !== o));
|
|
303
303
|
const r = localStorage.getItem("notifications");
|
|
304
304
|
if (r) {
|
|
@@ -314,19 +314,19 @@ function Ie({
|
|
|
314
314
|
};
|
|
315
315
|
return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ i("header", { className: t.header, ref: g, children: [
|
|
316
316
|
v?.map(
|
|
317
|
-
({ id: o, title: r, description: s, variant: w, closable:
|
|
317
|
+
({ id: o, title: r, description: s, variant: w, closable: B }, S) => /* @__PURE__ */ e(
|
|
318
318
|
G,
|
|
319
319
|
{
|
|
320
320
|
description: s,
|
|
321
321
|
variant: w,
|
|
322
|
-
closable:
|
|
323
|
-
onClose: () =>
|
|
322
|
+
closable: B,
|
|
323
|
+
onClose: () => E(o),
|
|
324
324
|
children: r
|
|
325
325
|
},
|
|
326
|
-
|
|
326
|
+
S
|
|
327
327
|
)
|
|
328
328
|
),
|
|
329
|
-
/* @__PURE__ */ e("div", { className: k(t.main, t.outer), children: /* @__PURE__ */ i(
|
|
329
|
+
/* @__PURE__ */ e("div", { className: k(t.main, t.outer), children: /* @__PURE__ */ i(V, { as: "nav", className: t.container, children: [
|
|
330
330
|
/* @__PURE__ */ e(
|
|
331
331
|
h,
|
|
332
332
|
{
|
|
@@ -334,8 +334,8 @@ function Ie({
|
|
|
334
334
|
className: t.skip,
|
|
335
335
|
size: 500,
|
|
336
336
|
tabIndex: "0",
|
|
337
|
-
onClick:
|
|
338
|
-
onKeyPress:
|
|
337
|
+
onClick: M,
|
|
338
|
+
onKeyPress: M,
|
|
339
339
|
children: "Skip to content"
|
|
340
340
|
}
|
|
341
341
|
),
|
|
@@ -344,10 +344,10 @@ function Ie({
|
|
|
344
344
|
{
|
|
345
345
|
className: t.logo,
|
|
346
346
|
href: d("https://www.highcharts.com/", l),
|
|
347
|
-
children: /* @__PURE__ */ e(
|
|
347
|
+
children: /* @__PURE__ */ e(T, { showText: !N && !b })
|
|
348
348
|
}
|
|
349
349
|
),
|
|
350
|
-
/* @__PURE__ */ e("ul", { className: t.links, children:
|
|
350
|
+
/* @__PURE__ */ e("ul", { className: t.links, children: P.map(({ title: o, url: r }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
351
351
|
h,
|
|
352
352
|
{
|
|
353
353
|
variant: "plain",
|
|
@@ -369,12 +369,12 @@ function Ie({
|
|
|
369
369
|
),
|
|
370
370
|
children: [
|
|
371
371
|
/* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
|
|
372
|
-
/* @__PURE__ */ e(
|
|
372
|
+
/* @__PURE__ */ e(W, {})
|
|
373
373
|
]
|
|
374
374
|
}
|
|
375
375
|
),
|
|
376
|
-
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(
|
|
377
|
-
/* @__PURE__ */ e(
|
|
376
|
+
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(I, {}) }),
|
|
377
|
+
/* @__PURE__ */ e(H, {}),
|
|
378
378
|
/* @__PURE__ */ e(
|
|
379
379
|
h,
|
|
380
380
|
{
|
|
@@ -382,7 +382,7 @@ function Ie({
|
|
|
382
382
|
as: a,
|
|
383
383
|
href: d("https://shop.highcharts.com/account", l),
|
|
384
384
|
"aria-label": "Login",
|
|
385
|
-
children: /* @__PURE__ */ e(
|
|
385
|
+
children: /* @__PURE__ */ e(O, {})
|
|
386
386
|
}
|
|
387
387
|
),
|
|
388
388
|
/* @__PURE__ */ i(
|
|
@@ -395,7 +395,7 @@ function Ie({
|
|
|
395
395
|
l
|
|
396
396
|
),
|
|
397
397
|
children: [
|
|
398
|
-
/* @__PURE__ */ e(
|
|
398
|
+
/* @__PURE__ */ e(j, {}),
|
|
399
399
|
"Get started"
|
|
400
400
|
]
|
|
401
401
|
}
|
|
@@ -405,7 +405,7 @@ function Ie({
|
|
|
405
405
|
{
|
|
406
406
|
variant: u ? "white" : "transparent",
|
|
407
407
|
className: t.menu,
|
|
408
|
-
onClick:
|
|
408
|
+
onClick: Q,
|
|
409
409
|
children: [
|
|
410
410
|
u ? "Close" : "Menu",
|
|
411
411
|
u ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(X, {})
|
|
@@ -429,7 +429,7 @@ function Ie({
|
|
|
429
429
|
"div",
|
|
430
430
|
{
|
|
431
431
|
className: k(t.mobileOverlay, { [t.open]: u }),
|
|
432
|
-
onClick:
|
|
432
|
+
onClick: Q
|
|
433
433
|
}
|
|
434
434
|
),
|
|
435
435
|
/* @__PURE__ */ i(
|
|
@@ -445,7 +445,7 @@ function Ie({
|
|
|
445
445
|
{
|
|
446
446
|
className: t.logo,
|
|
447
447
|
href: d("https://www.highcharts.com/", l),
|
|
448
|
-
children: /* @__PURE__ */ e(
|
|
448
|
+
children: /* @__PURE__ */ e(T, { showText: !b })
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
/* @__PURE__ */ i("div", { className: t.buttons, children: [
|
|
@@ -460,12 +460,12 @@ function Ie({
|
|
|
460
460
|
),
|
|
461
461
|
children: [
|
|
462
462
|
/* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
|
|
463
|
-
/* @__PURE__ */ e(
|
|
463
|
+
/* @__PURE__ */ e(W, {})
|
|
464
464
|
]
|
|
465
465
|
}
|
|
466
466
|
),
|
|
467
|
-
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(
|
|
468
|
-
/* @__PURE__ */ e(
|
|
467
|
+
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(I, {}) }),
|
|
468
|
+
/* @__PURE__ */ e(H, {})
|
|
469
469
|
] })
|
|
470
470
|
] }),
|
|
471
471
|
/* @__PURE__ */ i("div", { className: t.buttons, children: [
|
|
@@ -480,7 +480,7 @@ function Ie({
|
|
|
480
480
|
l
|
|
481
481
|
),
|
|
482
482
|
children: [
|
|
483
|
-
/* @__PURE__ */ e(
|
|
483
|
+
/* @__PURE__ */ e(O, {}),
|
|
484
484
|
"Login"
|
|
485
485
|
]
|
|
486
486
|
}
|
|
@@ -496,13 +496,13 @@ function Ie({
|
|
|
496
496
|
l
|
|
497
497
|
),
|
|
498
498
|
children: [
|
|
499
|
-
/* @__PURE__ */ e(
|
|
499
|
+
/* @__PURE__ */ e(j, {}),
|
|
500
500
|
"Get started"
|
|
501
501
|
]
|
|
502
502
|
}
|
|
503
503
|
)
|
|
504
504
|
] }),
|
|
505
|
-
/* @__PURE__ */ e("ul", { className: t.links, children:
|
|
505
|
+
/* @__PURE__ */ e("ul", { className: t.links, children: P.map(({ title: o, url: r, icon: s }, w) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
506
506
|
h,
|
|
507
507
|
{
|
|
508
508
|
variant: "plain",
|