highsoft-ui 1.0.28 → 1.0.30
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 +4 -2
- package/dist/components/Header/index.js +118 -113
- package/dist/utils.d.ts +0 -1
- package/dist/utils.js +16 -224
- package/package.json +1 -2
|
@@ -7,10 +7,11 @@ export interface SubHeaderItem {
|
|
|
7
7
|
tag?: ReactNode;
|
|
8
8
|
tagVariant?: 'success' | 'brand';
|
|
9
9
|
}
|
|
10
|
-
export declare function SubHeader({ items, link: Link, host }: {
|
|
10
|
+
export declare function SubHeader({ items, link: Link, host, pathname }: {
|
|
11
11
|
items: Array<SubHeaderItem>;
|
|
12
12
|
link?: ElementType;
|
|
13
13
|
host?: string;
|
|
14
|
+
pathname?: string;
|
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export interface Notification {
|
|
16
17
|
id?: string;
|
|
@@ -20,10 +21,11 @@ export interface Notification {
|
|
|
20
21
|
closable?: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare function Header({ subItems, children, notifications: initialNotifications, // TODO: Fetch these from the internets
|
|
23
|
-
link: Link, host }: {
|
|
24
|
+
link: Link, host, pathname }: {
|
|
24
25
|
subItems?: Array<SubHeaderItem>;
|
|
25
26
|
children?: ReactNode;
|
|
26
27
|
notifications?: Array<Notification>;
|
|
27
28
|
link?: ElementType;
|
|
28
29
|
host?: string;
|
|
30
|
+
pathname?: string;
|
|
29
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { J
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as V } from "react/jsx-runtime";
|
|
2
|
+
import { useState as z, useEffect as q } from "react";
|
|
3
|
+
import { J } from "../../index-CMegByeX.js";
|
|
4
4
|
import { _ as d } from "../../extends-hS2Bh-Yp.js";
|
|
5
|
-
import { N as
|
|
6
|
-
import { c as
|
|
5
|
+
import { N as A, X as G } from "../../index-ChurKizy.js";
|
|
6
|
+
import { c as g } from "../../clsx-OuTLNxxd.js";
|
|
7
7
|
import { Button as h } from "../Button/index.js";
|
|
8
|
-
import { Container as
|
|
9
|
-
import { ThemedLogo as
|
|
10
|
-
import { PrefPanel as
|
|
11
|
-
import { useMediaQuery as M
|
|
8
|
+
import { Container as y } from "../Container/index.js";
|
|
9
|
+
import { ThemedLogo as S } from "../Logo/index.js";
|
|
10
|
+
import { PrefPanel as L } from "../PrefPanel/index.js";
|
|
11
|
+
import { useMediaQuery as M } from "../../utils.js";
|
|
12
12
|
var F = function(t) {
|
|
13
13
|
return /* @__PURE__ */ e("svg", d({
|
|
14
14
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -121,7 +121,7 @@ var F = function(t) {
|
|
|
121
121
|
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"
|
|
122
122
|
})
|
|
123
123
|
}));
|
|
124
|
-
},
|
|
124
|
+
}, T = function(t) {
|
|
125
125
|
return /* @__PURE__ */ e("svg", d({
|
|
126
126
|
xmlns: "http://www.w3.org/2000/svg",
|
|
127
127
|
width: 24,
|
|
@@ -137,7 +137,7 @@ var F = function(t) {
|
|
|
137
137
|
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"
|
|
138
138
|
})
|
|
139
139
|
}));
|
|
140
|
-
},
|
|
140
|
+
}, B = function(t) {
|
|
141
141
|
return /* @__PURE__ */ e("svg", d({
|
|
142
142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
143
143
|
width: 24,
|
|
@@ -153,7 +153,7 @@ var F = function(t) {
|
|
|
153
153
|
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"
|
|
154
154
|
})
|
|
155
155
|
}));
|
|
156
|
-
},
|
|
156
|
+
}, H = function(t) {
|
|
157
157
|
return /* @__PURE__ */ e("svg", d({
|
|
158
158
|
xmlns: "http://www.w3.org/2000/svg",
|
|
159
159
|
width: 24,
|
|
@@ -186,17 +186,17 @@ var F = function(t) {
|
|
|
186
186
|
})
|
|
187
187
|
}));
|
|
188
188
|
};
|
|
189
|
-
const I = "_header_1vxsz_270", K = "_outer_1vxsz_281", Y = "_main_1vxsz_290", Z = "_container_1vxsz_294", e1 = "_links_1vxsz_300", t1 = "_buttons_1vxsz_301",
|
|
189
|
+
const I = "_header_1vxsz_270", K = "_outer_1vxsz_281", Y = "_main_1vxsz_290", Z = "_container_1vxsz_294", e1 = "_links_1vxsz_300", t1 = "_buttons_1vxsz_301", n1 = "_menu_1vxsz_309", r1 = "_logo_1vxsz_314", o1 = "_subContainer_1vxsz_326", s1 = "_selected_1vxsz_354", i1 = "_subTag_1vxsz_366", a1 = "_mobileOverlay_1vxsz_384", c1 = "_show_1vxsz_1", h1 = "_open_1vxsz_396", l1 = "_mobile_1vxsz_384", d1 = "_slideUp_1vxsz_1", u1 = "_sub_1vxsz_326", m1 = "_gpt_1vxsz_462", n = {
|
|
190
190
|
header: I,
|
|
191
191
|
outer: K,
|
|
192
192
|
main: Y,
|
|
193
193
|
container: Z,
|
|
194
194
|
links: e1,
|
|
195
195
|
buttons: t1,
|
|
196
|
-
menu:
|
|
197
|
-
logo:
|
|
198
|
-
subContainer:
|
|
199
|
-
selected:
|
|
196
|
+
menu: n1,
|
|
197
|
+
logo: r1,
|
|
198
|
+
subContainer: o1,
|
|
199
|
+
selected: s1,
|
|
200
200
|
subTag: i1,
|
|
201
201
|
"subTag-success": "_subTag-success_1vxsz_371",
|
|
202
202
|
"subTag-brand": "_subTag-brand_1vxsz_375",
|
|
@@ -207,7 +207,7 @@ const I = "_header_1vxsz_270", K = "_outer_1vxsz_281", Y = "_main_1vxsz_290", Z
|
|
|
207
207
|
slideUp: d1,
|
|
208
208
|
sub: u1,
|
|
209
209
|
gpt: m1
|
|
210
|
-
},
|
|
210
|
+
}, j = [
|
|
211
211
|
{
|
|
212
212
|
title: "Products",
|
|
213
213
|
url: "https://highcharts.com/products/",
|
|
@@ -239,38 +239,34 @@ const I = "_header_1vxsz_270", K = "_outer_1vxsz_281", Y = "_main_1vxsz_290", Z
|
|
|
239
239
|
icon: /* @__PURE__ */ e(F, {})
|
|
240
240
|
}
|
|
241
241
|
];
|
|
242
|
-
function l(
|
|
243
|
-
return t ?
|
|
242
|
+
function l(r, t) {
|
|
243
|
+
return t ? r.replace(t, "") : r;
|
|
244
244
|
}
|
|
245
245
|
function w1({
|
|
246
|
-
items:
|
|
246
|
+
items: r,
|
|
247
247
|
link: t = "a",
|
|
248
|
-
host:
|
|
248
|
+
host: p = "https://www.highcharts.com",
|
|
249
|
+
pathname: i = typeof window < "u" ? window.location.pathname : ""
|
|
249
250
|
}) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
if (typeof window < "u") {
|
|
254
|
-
const p = window.location.origin, f = new URL(v, p);
|
|
255
|
-
console.log(f, o, p), w = (v.startsWith("/") || f.origin === p) && f.pathname === o;
|
|
256
|
-
}
|
|
257
|
-
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
|
|
251
|
+
return /* @__PURE__ */ e("div", { className: g(n.sub, n.outer), children: /* @__PURE__ */ e(y, { className: n.subContainer, as: "ul", children: r.map(({ title: a, url: f, icon: _, tag: x, tagVariant: C = "success" }, m) => {
|
|
252
|
+
const k = typeof window < "u" && window.location.origin || "http://example.com", w = new URL(f, k), v = w.origin === k && w.pathname === i;
|
|
253
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
258
254
|
t,
|
|
259
255
|
{
|
|
260
|
-
href: l(
|
|
261
|
-
className:
|
|
262
|
-
[
|
|
256
|
+
href: l(f, p),
|
|
257
|
+
className: g({
|
|
258
|
+
[n.selected]: v
|
|
263
259
|
}),
|
|
264
260
|
children: [
|
|
265
|
-
|
|
266
|
-
/* @__PURE__ */
|
|
261
|
+
_,
|
|
262
|
+
/* @__PURE__ */ o("span", { children: [
|
|
267
263
|
a,
|
|
268
264
|
x && /* @__PURE__ */ e(
|
|
269
265
|
"span",
|
|
270
266
|
{
|
|
271
|
-
className:
|
|
272
|
-
|
|
273
|
-
|
|
267
|
+
className: g(
|
|
268
|
+
n.subTag,
|
|
269
|
+
n[`subTag-${C}`]
|
|
274
270
|
),
|
|
275
271
|
children: x
|
|
276
272
|
}
|
|
@@ -278,40 +274,41 @@ function w1({
|
|
|
278
274
|
] })
|
|
279
275
|
]
|
|
280
276
|
}
|
|
281
|
-
) },
|
|
277
|
+
) }, m);
|
|
282
278
|
}) }) });
|
|
283
279
|
}
|
|
284
280
|
function z1({
|
|
285
|
-
subItems:
|
|
281
|
+
subItems: r,
|
|
286
282
|
children: t,
|
|
287
|
-
notifications:
|
|
283
|
+
notifications: p = [],
|
|
288
284
|
// TODO: Fetch these from the internets
|
|
289
|
-
link:
|
|
290
|
-
host: a = "https://www.highcharts.com"
|
|
285
|
+
link: i = "a",
|
|
286
|
+
host: a = "https://www.highcharts.com",
|
|
287
|
+
pathname: f = typeof window < "u" ? window.location.pathname : ""
|
|
291
288
|
}) {
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
if (
|
|
289
|
+
const _ = M("(max-width: 374px)"), x = M("(max-width: 849px)"), C = M("(min-width: 850px) and (max-width: 999px)"), [m, k] = z(!1), [w, v] = z([]);
|
|
290
|
+
q(() => {
|
|
291
|
+
if (p.length) {
|
|
295
292
|
const c = localStorage.getItem("notifications");
|
|
296
293
|
if (c) {
|
|
297
294
|
const u = JSON.parse(c);
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
(
|
|
295
|
+
v(
|
|
296
|
+
p.filter(
|
|
297
|
+
(s) => !s.id || !u.closed.includes(s.id)
|
|
301
298
|
)
|
|
302
299
|
);
|
|
303
300
|
} else
|
|
304
|
-
p
|
|
301
|
+
v(p);
|
|
305
302
|
}
|
|
306
|
-
}, [
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
|
|
303
|
+
}, [p]);
|
|
304
|
+
const N = () => {
|
|
305
|
+
k(!m);
|
|
306
|
+
}, O = (c) => {
|
|
307
|
+
v(w.filter((s) => !s.id || s.id !== c));
|
|
311
308
|
const u = localStorage.getItem("notifications");
|
|
312
309
|
if (u) {
|
|
313
|
-
const
|
|
314
|
-
|
|
310
|
+
const s = JSON.parse(u);
|
|
311
|
+
s.closed.includes(c) || (s.closed.push(c), localStorage.setItem("notifications", JSON.stringify(s)));
|
|
315
312
|
} else
|
|
316
313
|
localStorage.setItem(
|
|
317
314
|
"notifications",
|
|
@@ -320,149 +317,157 @@ function z1({
|
|
|
320
317
|
})
|
|
321
318
|
);
|
|
322
319
|
};
|
|
323
|
-
return /* @__PURE__ */ e(
|
|
320
|
+
return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ o("header", { className: n.header, children: [
|
|
324
321
|
w == null ? void 0 : w.map(
|
|
325
|
-
({ id: c, title: u, description:
|
|
326
|
-
|
|
322
|
+
({ id: c, title: u, description: s, variant: b, closable: P }, U) => /* @__PURE__ */ e(
|
|
323
|
+
A,
|
|
327
324
|
{
|
|
328
|
-
description:
|
|
325
|
+
description: s,
|
|
329
326
|
variant: b,
|
|
330
|
-
closable:
|
|
331
|
-
onClose: () =>
|
|
327
|
+
closable: P,
|
|
328
|
+
onClose: () => O(c),
|
|
332
329
|
children: u
|
|
333
330
|
},
|
|
334
|
-
|
|
331
|
+
U
|
|
335
332
|
)
|
|
336
333
|
),
|
|
337
|
-
/* @__PURE__ */ e("div", { className:
|
|
334
|
+
/* @__PURE__ */ e("div", { className: g(n.main, n.outer), children: /* @__PURE__ */ o(y, { as: "nav", className: n.container, children: [
|
|
338
335
|
/* @__PURE__ */ e(
|
|
339
|
-
|
|
336
|
+
i,
|
|
340
337
|
{
|
|
341
|
-
className:
|
|
338
|
+
className: n.logo,
|
|
342
339
|
href: l("https://www.highcharts.com/", a),
|
|
343
|
-
children: /* @__PURE__ */ e(
|
|
340
|
+
children: /* @__PURE__ */ e(S, { showText: !C && !_ })
|
|
344
341
|
}
|
|
345
342
|
),
|
|
346
|
-
/* @__PURE__ */ e("ul", { className:
|
|
343
|
+
/* @__PURE__ */ e("ul", { className: n.links, children: j.map(({ title: c, url: u }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
|
|
347
344
|
h,
|
|
348
345
|
{
|
|
349
346
|
variant: "plain",
|
|
350
347
|
size: 300,
|
|
351
|
-
as:
|
|
348
|
+
as: i,
|
|
352
349
|
href: l(u, a),
|
|
353
350
|
children: c
|
|
354
351
|
}
|
|
355
|
-
) },
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
352
|
+
) }, s)) }),
|
|
353
|
+
/* @__PURE__ */ o("div", { className: n.buttons, children: [
|
|
354
|
+
/* @__PURE__ */ o(
|
|
358
355
|
h,
|
|
359
356
|
{
|
|
360
357
|
variant: "transparent",
|
|
361
|
-
as:
|
|
358
|
+
as: i,
|
|
362
359
|
href: l(
|
|
363
360
|
"https://www.highcharts.com/chat/gpt/",
|
|
364
361
|
a
|
|
365
362
|
),
|
|
366
363
|
children: [
|
|
367
|
-
/* @__PURE__ */ e("span", { className:
|
|
368
|
-
/* @__PURE__ */ e(
|
|
364
|
+
/* @__PURE__ */ e("span", { className: n.gpt, children: "Highcharts GPT" }),
|
|
365
|
+
/* @__PURE__ */ e(B, {})
|
|
369
366
|
]
|
|
370
367
|
}
|
|
371
368
|
),
|
|
372
|
-
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(
|
|
373
|
-
/* @__PURE__ */ e(
|
|
369
|
+
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(T, {}) }),
|
|
370
|
+
/* @__PURE__ */ e(L, {}),
|
|
374
371
|
/* @__PURE__ */ e(
|
|
375
372
|
h,
|
|
376
373
|
{
|
|
377
374
|
variant: "brand",
|
|
378
|
-
as:
|
|
375
|
+
as: i,
|
|
379
376
|
href: l("https://shop.highcharts.com/account", a),
|
|
380
377
|
"aria-label": "Login",
|
|
381
378
|
children: /* @__PURE__ */ e(W, {})
|
|
382
379
|
}
|
|
383
380
|
),
|
|
384
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ o(
|
|
385
382
|
h,
|
|
386
383
|
{
|
|
387
384
|
variant: "success",
|
|
388
|
-
as:
|
|
385
|
+
as: i,
|
|
389
386
|
href: l(
|
|
390
387
|
"https://www.highcharts.com/download/",
|
|
391
388
|
a
|
|
392
389
|
),
|
|
393
390
|
children: [
|
|
394
|
-
/* @__PURE__ */ e(
|
|
391
|
+
/* @__PURE__ */ e(H, {}),
|
|
395
392
|
"Get started"
|
|
396
393
|
]
|
|
397
394
|
}
|
|
398
395
|
),
|
|
399
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ o(
|
|
400
397
|
h,
|
|
401
398
|
{
|
|
402
399
|
variant: m ? "white" : "transparent",
|
|
403
|
-
className:
|
|
404
|
-
onClick:
|
|
400
|
+
className: n.menu,
|
|
401
|
+
onClick: N,
|
|
405
402
|
children: [
|
|
406
403
|
m ? "Close" : "Menu",
|
|
407
|
-
m ? /* @__PURE__ */ e(
|
|
404
|
+
m ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ e($, {})
|
|
408
405
|
]
|
|
409
406
|
}
|
|
410
407
|
)
|
|
411
408
|
] })
|
|
412
409
|
] }) }),
|
|
413
|
-
!!(
|
|
410
|
+
!!(r != null && r.length) && /* @__PURE__ */ e(
|
|
411
|
+
w1,
|
|
412
|
+
{
|
|
413
|
+
items: r,
|
|
414
|
+
link: i,
|
|
415
|
+
host: a,
|
|
416
|
+
pathname: f
|
|
417
|
+
}
|
|
418
|
+
),
|
|
414
419
|
t,
|
|
415
|
-
|
|
420
|
+
x && /* @__PURE__ */ o(V, { children: [
|
|
416
421
|
/* @__PURE__ */ e(
|
|
417
422
|
"div",
|
|
418
423
|
{
|
|
419
|
-
className:
|
|
420
|
-
onClick:
|
|
424
|
+
className: g(n.mobileOverlay, { [n.open]: m }),
|
|
425
|
+
onClick: N
|
|
421
426
|
}
|
|
422
427
|
),
|
|
423
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ o(
|
|
424
429
|
"nav",
|
|
425
430
|
{
|
|
426
|
-
className:
|
|
427
|
-
[
|
|
431
|
+
className: g(n.mobile, {
|
|
432
|
+
[n.open]: m
|
|
428
433
|
}),
|
|
429
434
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ o("div", { className: n.container, children: [
|
|
431
436
|
/* @__PURE__ */ e(
|
|
432
|
-
|
|
437
|
+
i,
|
|
433
438
|
{
|
|
434
|
-
className:
|
|
439
|
+
className: n.logo,
|
|
435
440
|
href: l("https://www.highcharts.com/", a),
|
|
436
|
-
children: /* @__PURE__ */ e(
|
|
441
|
+
children: /* @__PURE__ */ e(S, { showText: !_ })
|
|
437
442
|
}
|
|
438
443
|
),
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ o("div", { className: n.buttons, children: [
|
|
445
|
+
/* @__PURE__ */ o(
|
|
441
446
|
h,
|
|
442
447
|
{
|
|
443
448
|
variant: "transparent",
|
|
444
|
-
as:
|
|
449
|
+
as: i,
|
|
445
450
|
href: l(
|
|
446
451
|
"https://www.highcharts.com/chat/gpt/",
|
|
447
452
|
a
|
|
448
453
|
),
|
|
449
454
|
children: [
|
|
450
|
-
/* @__PURE__ */ e("span", { className:
|
|
451
|
-
/* @__PURE__ */ e(
|
|
455
|
+
/* @__PURE__ */ e("span", { className: n.gpt, children: "Highcharts GPT" }),
|
|
456
|
+
/* @__PURE__ */ e(B, {})
|
|
452
457
|
]
|
|
453
458
|
}
|
|
454
459
|
),
|
|
455
|
-
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(
|
|
456
|
-
/* @__PURE__ */ e(
|
|
460
|
+
/* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(T, {}) }),
|
|
461
|
+
/* @__PURE__ */ e(L, {})
|
|
457
462
|
] })
|
|
458
463
|
] }),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ o("div", { className: n.buttons, children: [
|
|
465
|
+
/* @__PURE__ */ o(
|
|
461
466
|
h,
|
|
462
467
|
{
|
|
463
468
|
variant: "brand",
|
|
464
469
|
fullWidth: !0,
|
|
465
|
-
as:
|
|
470
|
+
as: i,
|
|
466
471
|
href: l(
|
|
467
472
|
"https://shop.highcharts.com/account",
|
|
468
473
|
a
|
|
@@ -473,33 +478,33 @@ function z1({
|
|
|
473
478
|
]
|
|
474
479
|
}
|
|
475
480
|
),
|
|
476
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ o(
|
|
477
482
|
h,
|
|
478
483
|
{
|
|
479
484
|
variant: "success",
|
|
480
485
|
fullWidth: !0,
|
|
481
|
-
as:
|
|
486
|
+
as: i,
|
|
482
487
|
href: l(
|
|
483
488
|
"https://www.highcharts.com/download/",
|
|
484
489
|
a
|
|
485
490
|
),
|
|
486
491
|
children: [
|
|
487
|
-
/* @__PURE__ */ e(
|
|
492
|
+
/* @__PURE__ */ e(H, {}),
|
|
488
493
|
"Get started"
|
|
489
494
|
]
|
|
490
495
|
}
|
|
491
496
|
)
|
|
492
497
|
] }),
|
|
493
|
-
/* @__PURE__ */ e("ul", { className:
|
|
498
|
+
/* @__PURE__ */ e("ul", { className: n.links, children: j.map(({ title: c, url: u, icon: s }, b) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
|
|
494
499
|
h,
|
|
495
500
|
{
|
|
496
501
|
variant: "plain",
|
|
497
502
|
size: 500,
|
|
498
503
|
fullWidth: !0,
|
|
499
|
-
as:
|
|
504
|
+
as: i,
|
|
500
505
|
href: l(u, a),
|
|
501
506
|
children: [
|
|
502
|
-
|
|
507
|
+
s,
|
|
503
508
|
c
|
|
504
509
|
]
|
|
505
510
|
}
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -1,230 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} : function(e) {
|
|
10
|
-
return e;
|
|
11
|
-
};
|
|
12
|
-
function U(e, o) {
|
|
13
|
-
{
|
|
14
|
-
typeof console < "u" && console.warn(o);
|
|
15
|
-
try {
|
|
16
|
-
throw new Error(o);
|
|
17
|
-
} catch {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
var H = "beforeunload", j = "popstate";
|
|
22
|
-
function z(e) {
|
|
23
|
-
e === void 0 && (e = {});
|
|
24
|
-
var o = e, a = o.window, t = a === void 0 ? document.defaultView : a, i = t.history;
|
|
25
|
-
function f() {
|
|
26
|
-
var n = t.location, r = n.pathname, c = n.search, l = n.hash, u = i.state || {};
|
|
27
|
-
return [u.idx, A({
|
|
28
|
-
pathname: r,
|
|
29
|
-
search: c,
|
|
30
|
-
hash: l,
|
|
31
|
-
state: u.usr || null,
|
|
32
|
-
key: u.key || "default"
|
|
33
|
-
})];
|
|
34
|
-
}
|
|
35
|
-
var s = null;
|
|
36
|
-
function D() {
|
|
37
|
-
if (s)
|
|
38
|
-
d.call(s), s = null;
|
|
39
|
-
else {
|
|
40
|
-
var n = p.Pop, r = f(), c = r[0], l = r[1];
|
|
41
|
-
if (d.length)
|
|
42
|
-
if (c != null) {
|
|
43
|
-
var u = h - c;
|
|
44
|
-
u && (s = {
|
|
45
|
-
action: n,
|
|
46
|
-
location: l,
|
|
47
|
-
retry: function() {
|
|
48
|
-
y(u * -1);
|
|
49
|
-
}
|
|
50
|
-
}, y(u));
|
|
51
|
-
} else
|
|
52
|
-
process.env.NODE_ENV !== "production" && U(
|
|
53
|
-
!1,
|
|
54
|
-
// TODO: Write up a doc that explains our blocking strategy in
|
|
55
|
-
// detail and link to it here so people can understand better what
|
|
56
|
-
// is going on and how to avoid it.
|
|
57
|
-
"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
|
|
58
|
-
);
|
|
59
|
-
else
|
|
60
|
-
b(n);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
t.addEventListener(j, D);
|
|
64
|
-
var w = p.Pop, x = f(), h = x[0], m = x[1], L = B(), d = B();
|
|
65
|
-
h == null && (h = 0, i.replaceState($({}, i.state, {
|
|
66
|
-
idx: h
|
|
67
|
-
}), ""));
|
|
68
|
-
function O(n) {
|
|
69
|
-
return typeof n == "string" ? n : K(n);
|
|
70
|
-
}
|
|
71
|
-
function S(n, r) {
|
|
72
|
-
return r === void 0 && (r = null), A($({
|
|
73
|
-
pathname: m.pathname,
|
|
74
|
-
hash: "",
|
|
75
|
-
search: ""
|
|
76
|
-
}, typeof n == "string" ? Q(n) : n, {
|
|
77
|
-
state: r,
|
|
78
|
-
key: C()
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
function _(n, r) {
|
|
82
|
-
return [{
|
|
83
|
-
usr: n.state,
|
|
84
|
-
key: n.key,
|
|
85
|
-
idx: r
|
|
86
|
-
}, O(n)];
|
|
87
|
-
}
|
|
88
|
-
function M(n, r, c) {
|
|
89
|
-
return !d.length || (d.call({
|
|
90
|
-
action: n,
|
|
91
|
-
location: r,
|
|
92
|
-
retry: c
|
|
93
|
-
}), !1);
|
|
94
|
-
}
|
|
95
|
-
function b(n) {
|
|
96
|
-
w = n;
|
|
97
|
-
var r = f();
|
|
98
|
-
h = r[0], m = r[1], L.call({
|
|
99
|
-
action: w,
|
|
100
|
-
location: m
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function T(n, r) {
|
|
104
|
-
var c = p.Push, l = S(n, r);
|
|
105
|
-
function u() {
|
|
106
|
-
T(n, r);
|
|
107
|
-
}
|
|
108
|
-
if (M(c, l, u)) {
|
|
109
|
-
var v = _(l, h + 1), P = v[0], g = v[1];
|
|
110
|
-
try {
|
|
111
|
-
i.pushState(P, "", g);
|
|
112
|
-
} catch {
|
|
113
|
-
t.location.assign(g);
|
|
114
|
-
}
|
|
115
|
-
b(c);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function N(n, r) {
|
|
119
|
-
var c = p.Replace, l = S(n, r);
|
|
120
|
-
function u() {
|
|
121
|
-
N(n, r);
|
|
122
|
-
}
|
|
123
|
-
if (M(c, l, u)) {
|
|
124
|
-
var v = _(l, h), P = v[0], g = v[1];
|
|
125
|
-
i.replaceState(P, "", g), b(c);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
function y(n) {
|
|
129
|
-
i.go(n);
|
|
130
|
-
}
|
|
131
|
-
var R = {
|
|
132
|
-
get action() {
|
|
133
|
-
return w;
|
|
134
|
-
},
|
|
135
|
-
get location() {
|
|
136
|
-
return m;
|
|
137
|
-
},
|
|
138
|
-
createHref: O,
|
|
139
|
-
push: T,
|
|
140
|
-
replace: N,
|
|
141
|
-
go: y,
|
|
142
|
-
back: function() {
|
|
143
|
-
y(-1);
|
|
144
|
-
},
|
|
145
|
-
forward: function() {
|
|
146
|
-
y(1);
|
|
147
|
-
},
|
|
148
|
-
listen: function(r) {
|
|
149
|
-
return L.push(r);
|
|
150
|
-
},
|
|
151
|
-
block: function(r) {
|
|
152
|
-
var c = d.push(r);
|
|
153
|
-
return d.length === 1 && t.addEventListener(H, V), function() {
|
|
154
|
-
c(), d.length || t.removeEventListener(H, V);
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
return R;
|
|
159
|
-
}
|
|
160
|
-
function V(e) {
|
|
161
|
-
e.preventDefault(), e.returnValue = "";
|
|
162
|
-
}
|
|
163
|
-
function B() {
|
|
164
|
-
var e = [];
|
|
165
|
-
return {
|
|
166
|
-
get length() {
|
|
167
|
-
return e.length;
|
|
168
|
-
},
|
|
169
|
-
push: function(a) {
|
|
170
|
-
return e.push(a), function() {
|
|
171
|
-
e = e.filter(function(t) {
|
|
172
|
-
return t !== a;
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
},
|
|
176
|
-
call: function(a) {
|
|
177
|
-
e.forEach(function(t) {
|
|
178
|
-
return t && t(a);
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function C() {
|
|
184
|
-
return Math.random().toString(36).substr(2, 8);
|
|
185
|
-
}
|
|
186
|
-
function K(e) {
|
|
187
|
-
var o = e.pathname, a = o === void 0 ? "/" : o, t = e.search, i = t === void 0 ? "" : t, f = e.hash, s = f === void 0 ? "" : f;
|
|
188
|
-
return i && i !== "?" && (a += i.charAt(0) === "?" ? i : "?" + i), s && s !== "#" && (a += s.charAt(0) === "#" ? s : "#" + s), a;
|
|
189
|
-
}
|
|
190
|
-
function Q(e) {
|
|
191
|
-
var o = {};
|
|
192
|
-
if (e) {
|
|
193
|
-
var a = e.indexOf("#");
|
|
194
|
-
a >= 0 && (o.hash = e.substr(a), e = e.substr(0, a));
|
|
195
|
-
var t = e.indexOf("?");
|
|
196
|
-
t >= 0 && (o.search = e.substr(t), e = e.substr(0, t)), e && (o.pathname = e);
|
|
197
|
-
}
|
|
198
|
-
return o;
|
|
199
|
-
}
|
|
200
|
-
function J(e) {
|
|
201
|
-
const [o, a] = E(!1);
|
|
202
|
-
return k(() => {
|
|
203
|
-
const t = window.matchMedia(e);
|
|
204
|
-
a(t.matches);
|
|
205
|
-
const i = (f) => {
|
|
206
|
-
a(f.matches);
|
|
1
|
+
import { useState as c, useEffect as o } from "react";
|
|
2
|
+
function d(e) {
|
|
3
|
+
const [t, s] = c(!1);
|
|
4
|
+
return o(() => {
|
|
5
|
+
const n = window.matchMedia(e);
|
|
6
|
+
s(n.matches);
|
|
7
|
+
const a = (r) => {
|
|
8
|
+
s(r.matches);
|
|
207
9
|
};
|
|
208
|
-
return
|
|
209
|
-
}, [e]),
|
|
210
|
-
}
|
|
211
|
-
function W() {
|
|
212
|
-
const [e, o] = E(!1);
|
|
213
|
-
return k(() => {
|
|
214
|
-
o(!0);
|
|
215
|
-
}, []), e;
|
|
10
|
+
return n.addEventListener("change", a), () => n.removeEventListener("change", a);
|
|
11
|
+
}, [e]), t;
|
|
216
12
|
}
|
|
217
|
-
function
|
|
218
|
-
const [e,
|
|
219
|
-
return
|
|
220
|
-
|
|
221
|
-
return o(a.location.pathname), a.listen(({ location: t }) => {
|
|
222
|
-
console.log("listener", t.pathname), o(t.pathname);
|
|
223
|
-
});
|
|
13
|
+
function i() {
|
|
14
|
+
const [e, t] = c(!1);
|
|
15
|
+
return o(() => {
|
|
16
|
+
t(!0);
|
|
224
17
|
}, []), e;
|
|
225
18
|
}
|
|
226
19
|
export {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
X as usePathname
|
|
20
|
+
d as useMediaQuery,
|
|
21
|
+
i as useMounted
|
|
230
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "highsoft-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"description": "Highsoft UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"@untitled-ui/icons-react": "^0.1.4",
|
|
51
51
|
"clsx": "^2.1.0",
|
|
52
52
|
"highsoft-design-tokens": "^2.2.1",
|
|
53
|
-
"history": "^5.3.0",
|
|
54
53
|
"modern-normalize": "^3.0.1",
|
|
55
54
|
"next-themes": "^0.4.6",
|
|
56
55
|
"radix-ui": "^1.4.1"
|