highsoft-ui 1.0.57 → 1.0.59

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.
@@ -1,31 +1,16 @@
1
- import { jsx as e, jsxs as o, Fragment as V } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as r, Fragment as V } from "react/jsx-runtime";
2
2
  import { useState as S, useEffect as q } from "react";
3
3
  import { a as M, J as z } from "../../utils-CzQFvGG2.js";
4
- import { _ as d } from "../../extends-hS2Bh-Yp.js";
5
- import { N as J, X as A } from "../../index-DvBbx2s8.js";
4
+ import { A as J } from "../../Announcement03-obPaH4LK.js";
5
+ import { _ as u } from "../../extends-hS2Bh-Yp.js";
6
+ import { N as A, X as G } from "../../index-DvBbx2s8.js";
6
7
  import { c as p } from "../../clsx-OuTLNxxd.js";
7
8
  import { Button as l } from "../Button/index.js";
8
9
  import { Container as I } from "../Container/index.js";
9
10
  import { ThemedLogo as L } from "../Logo/index.js";
10
11
  import { PrefPanel as T } from "../PrefPanel/index.js";
11
- var G = function(n) {
12
- return /* @__PURE__ */ e("svg", d({
13
- xmlns: "http://www.w3.org/2000/svg",
14
- width: 24,
15
- height: 24,
16
- fill: "none",
17
- viewBox: "0 0 24 24"
18
- }, n, {
19
- children: /* @__PURE__ */ e("path", {
20
- stroke: "currentColor",
21
- strokeLinecap: "round",
22
- strokeLinejoin: "round",
23
- strokeWidth: 2,
24
- d: "M18.5 16c1.933 0 3.5-2.9101 3.5-6.5C22 5.9102 20.433 3 18.5 3m0 13c-1.933 0-3.5-2.9101-3.5-6.5C15 5.9102 16.567 3 18.5 3m0 13L5.4435 13.6261c-.9275-.1686-1.3912-.253-1.7662-.4371a3 3 0 0 1-1.5632-1.8731C2 10.914 2 10.4427 2 9.5s0-1.414.1141-1.816a3 3 0 0 1 1.5632-1.873c.375-.1841.8388-.2685 1.7662-.4371L18.5 3M5 14l.3939 5.514c.0374.5236.056.7855.17.9839a1 1 0 0 0 .4324.4026c.206.0995.4685.0995.9935.0995h1.7824c.6001 0 .9002 0 1.1223-.1197a1 1 0 0 0 .4397-.4748c.1023-.2306.0793-.5298.0333-1.1282L10 14.5"
25
- })
26
- }));
27
- }, F = function(n) {
28
- return /* @__PURE__ */ e("svg", d({
12
+ var F = function(n) {
13
+ return /* @__PURE__ */ e("svg", u({
29
14
  xmlns: "http://www.w3.org/2000/svg",
30
15
  width: 24,
31
16
  height: 24,
@@ -41,7 +26,7 @@ var G = function(n) {
41
26
  })
42
27
  }));
43
28
  }, Q = function(n) {
44
- return /* @__PURE__ */ e("svg", d({
29
+ return /* @__PURE__ */ e("svg", u({
45
30
  xmlns: "http://www.w3.org/2000/svg",
46
31
  width: 24,
47
32
  height: 24,
@@ -57,7 +42,7 @@ var G = function(n) {
57
42
  })
58
43
  }));
59
44
  }, R = function(n) {
60
- return /* @__PURE__ */ e("svg", d({
45
+ return /* @__PURE__ */ e("svg", u({
61
46
  xmlns: "http://www.w3.org/2000/svg",
62
47
  width: 24,
63
48
  height: 24,
@@ -73,7 +58,7 @@ var G = function(n) {
73
58
  })
74
59
  }));
75
60
  }, X = function(n) {
76
- return /* @__PURE__ */ e("svg", d({
61
+ return /* @__PURE__ */ e("svg", u({
77
62
  xmlns: "http://www.w3.org/2000/svg",
78
63
  width: 24,
79
64
  height: 24,
@@ -89,7 +74,7 @@ var G = function(n) {
89
74
  })
90
75
  }));
91
76
  }, $ = function(n) {
92
- return /* @__PURE__ */ e("svg", d({
77
+ return /* @__PURE__ */ e("svg", u({
93
78
  xmlns: "http://www.w3.org/2000/svg",
94
79
  width: 24,
95
80
  height: 24,
@@ -105,7 +90,7 @@ var G = function(n) {
105
90
  })
106
91
  }));
107
92
  }, D = function(n) {
108
- return /* @__PURE__ */ e("svg", d({
93
+ return /* @__PURE__ */ e("svg", u({
109
94
  xmlns: "http://www.w3.org/2000/svg",
110
95
  width: 24,
111
96
  height: 24,
@@ -121,7 +106,7 @@ var G = function(n) {
121
106
  })
122
107
  }));
123
108
  }, B = function(n) {
124
- return /* @__PURE__ */ e("svg", d({
109
+ return /* @__PURE__ */ e("svg", u({
125
110
  xmlns: "http://www.w3.org/2000/svg",
126
111
  width: 24,
127
112
  height: 24,
@@ -137,7 +122,7 @@ var G = function(n) {
137
122
  })
138
123
  }));
139
124
  }, H = function(n) {
140
- return /* @__PURE__ */ e("svg", d({
125
+ return /* @__PURE__ */ e("svg", u({
141
126
  xmlns: "http://www.w3.org/2000/svg",
142
127
  width: 24,
143
128
  height: 24,
@@ -153,7 +138,7 @@ var G = function(n) {
153
138
  })
154
139
  }));
155
140
  }, W = function(n) {
156
- return /* @__PURE__ */ e("svg", d({
141
+ return /* @__PURE__ */ e("svg", u({
157
142
  xmlns: "http://www.w3.org/2000/svg",
158
143
  width: 24,
159
144
  height: 24,
@@ -169,7 +154,7 @@ var G = function(n) {
169
154
  })
170
155
  }));
171
156
  }, j = function(n) {
172
- return /* @__PURE__ */ e("svg", d({
157
+ return /* @__PURE__ */ e("svg", u({
173
158
  xmlns: "http://www.w3.org/2000/svg",
174
159
  width: 24,
175
160
  height: 24,
@@ -185,31 +170,31 @@ var G = function(n) {
185
170
  })
186
171
  }));
187
172
  };
188
- const E = "_header_1vg4i_300", K = "_outer_1vg4i_311", Y = "_main_1vg4i_320", Z = "_container_1vg4i_324", e1 = "_links_1vg4i_330", t1 = "_buttons_1vg4i_331", n1 = "_menu_1vg4i_339", r1 = "_logo_1vg4i_344", o1 = "_subContainer_1vg4i_356", s1 = "_selected_1vg4i_384", i1 = "_icons_1vg4i_387", c1 = "_subTag_1vg4i_407", a1 = "_selectedIcon_1vg4i_420", l1 = "_selectableIcon_1vg4i_424", h1 = "_icon_1vg4i_387", d1 = "_mobileOverlay_1vg4i_438", u1 = "_show_1vg4i_1", m1 = "_open_1vg4i_450", g1 = "_mobile_1vg4i_438", w1 = "_slideUp_1vg4i_1", p1 = "_sub_1vg4i_356", v1 = "_gpt_1vg4i_514", t = {
173
+ const E = "_header_1vg4i_300", K = "_outer_1vg4i_311", Y = "_main_1vg4i_320", Z = "_container_1vg4i_324", ee = "_links_1vg4i_330", te = "_buttons_1vg4i_331", ne = "_menu_1vg4i_339", re = "_logo_1vg4i_344", oe = "_subContainer_1vg4i_356", se = "_selected_1vg4i_384", ie = "_icons_1vg4i_387", ae = "_subTag_1vg4i_407", ce = "_selectedIcon_1vg4i_420", le = "_selectableIcon_1vg4i_424", he = "_icon_1vg4i_387", de = "_mobileOverlay_1vg4i_438", ue = "_show_1vg4i_1", me = "_open_1vg4i_450", ge = "_mobile_1vg4i_438", we = "_slideUp_1vg4i_1", pe = "_sub_1vg4i_356", ve = "_gpt_1vg4i_514", t = {
189
174
  header: E,
190
175
  outer: K,
191
176
  main: Y,
192
177
  container: Z,
193
- links: e1,
194
- buttons: t1,
195
- menu: n1,
196
- logo: r1,
197
- subContainer: o1,
198
- selected: s1,
199
- icons: i1,
200
- subTag: c1,
178
+ links: ee,
179
+ buttons: te,
180
+ menu: ne,
181
+ logo: re,
182
+ subContainer: oe,
183
+ selected: se,
184
+ icons: ie,
185
+ subTag: ae,
201
186
  "subTag-success": "_subTag-success_1vg4i_412",
202
187
  "subTag-brand": "_subTag-brand_1vg4i_416",
203
- selectedIcon: a1,
204
- selectableIcon: l1,
205
- icon: h1,
206
- mobileOverlay: d1,
207
- show: u1,
208
- open: m1,
209
- mobile: g1,
210
- slideUp: w1,
211
- sub: p1,
212
- gpt: v1
188
+ selectedIcon: ce,
189
+ selectableIcon: le,
190
+ icon: he,
191
+ mobileOverlay: de,
192
+ show: ue,
193
+ open: me,
194
+ mobile: ge,
195
+ slideUp: we,
196
+ sub: pe,
197
+ gpt: ve
213
198
  }, y = [
214
199
  {
215
200
  title: "Products",
@@ -239,44 +224,44 @@ const E = "_header_1vg4i_300", K = "_outer_1vg4i_311", Y = "_main_1vg4i_320", Z
239
224
  {
240
225
  title: "Blog",
241
226
  url: "https://www.highcharts.com/blog/",
242
- icon: /* @__PURE__ */ e(G, {})
227
+ icon: /* @__PURE__ */ e(J, {})
243
228
  }
244
229
  ];
245
- function h(r, n) {
246
- return n ? r.replace(n, "") : r;
230
+ function h(o, n) {
231
+ return n ? o.replace(n, "") : o;
247
232
  }
248
- function f1({
249
- items: r,
233
+ function _e({
234
+ items: o,
250
235
  link: n = "a",
251
236
  host: g = "https://www.highcharts.com",
252
237
  pathname: i = typeof window < "u" ? window.location.pathname : ""
253
238
  }) {
254
- return /* @__PURE__ */ e("div", { className: p(t.sub, t.outer), children: /* @__PURE__ */ e(I, { className: t.subContainer, as: "ul", children: r.map(
255
- ({ title: c, url: f, icon: _, selectedIcon: k, tag: C, tagVariant: m = "success" }, x) => {
256
- const v = typeof window < "u" && window.location.origin || "http://example.com", w = new URL(f, v), b = w.origin === v && w.pathname === i;
257
- return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
239
+ return /* @__PURE__ */ e("div", { className: p(t.sub, t.outer), children: /* @__PURE__ */ e(I, { className: t.subContainer, as: "ul", children: o.map(
240
+ ({ title: a, url: _, icon: f, selectedIcon: b, tag: k, tagVariant: m = "success" }, x) => {
241
+ const v = typeof window < "u" && window.location.origin || "http://example.com", w = new URL(_, v), C = w.origin === v && w.pathname === i;
242
+ return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
258
243
  n,
259
244
  {
260
- href: h(f, g),
245
+ href: h(_, g),
261
246
  className: p({
262
- [t.selectableIcon]: k,
263
- [t.selected]: b
247
+ [t.selectableIcon]: b,
248
+ [t.selected]: C
264
249
  }),
265
250
  children: [
266
- /* @__PURE__ */ o("span", { className: t.icons, children: [
267
- /* @__PURE__ */ e("span", { className: t.selectedIcon, children: k }),
268
- /* @__PURE__ */ e("span", { className: t.icon, children: _ })
251
+ /* @__PURE__ */ r("span", { className: t.icons, children: [
252
+ /* @__PURE__ */ e("span", { className: t.selectedIcon, children: b }),
253
+ /* @__PURE__ */ e("span", { className: t.icon, children: f })
269
254
  ] }),
270
- /* @__PURE__ */ o("span", { children: [
271
- c,
272
- C && /* @__PURE__ */ e(
255
+ /* @__PURE__ */ r("span", { children: [
256
+ a,
257
+ k && /* @__PURE__ */ e(
273
258
  "span",
274
259
  {
275
260
  className: p(
276
261
  t.subTag,
277
262
  t[`subTag-${m}`]
278
263
  ),
279
- children: C
264
+ children: k
280
265
  }
281
266
  )
282
267
  ] })
@@ -286,88 +271,88 @@ function f1({
286
271
  }
287
272
  ) }) });
288
273
  }
289
- function B1({
290
- subItems: r,
274
+ function He({
275
+ subItems: o,
291
276
  children: n,
292
277
  notifications: g = [],
293
278
  // TODO: Fetch these from the internets
294
279
  link: i = "a",
295
- host: c = "https://www.highcharts.com",
296
- pathname: f = typeof window < "u" ? window.location.pathname : ""
280
+ host: a = "https://www.highcharts.com",
281
+ pathname: _ = typeof window < "u" ? window.location.pathname : ""
297
282
  }) {
298
- const _ = M("(max-width: 374px)"), k = M("(max-width: 849px)"), C = M("(min-width: 850px) and (max-width: 999px)"), [m, x] = S(!1), [v, w] = S([]);
283
+ const f = M("(max-width: 374px)"), b = M("(max-width: 849px)"), k = M("(min-width: 850px) and (max-width: 999px)"), [m, x] = S(!1), [v, w] = S([]);
299
284
  q(() => {
300
285
  if (g.length) {
301
- const a = localStorage.getItem("notifications");
302
- if (a) {
303
- const u = JSON.parse(a);
286
+ const c = localStorage.getItem("notifications");
287
+ if (c) {
288
+ const d = JSON.parse(c);
304
289
  w(
305
290
  g.filter(
306
- (s) => !s.id || !u.closed.includes(s.id)
291
+ (s) => !s.id || !d.closed.includes(s.id)
307
292
  )
308
293
  );
309
294
  } else
310
295
  w(g);
311
296
  }
312
297
  }, [g]);
313
- const b = () => {
298
+ const C = () => {
314
299
  x(!m);
315
- }, O = (a) => {
316
- w(v.filter((s) => !s.id || s.id !== a));
317
- const u = localStorage.getItem("notifications");
318
- if (u) {
319
- const s = JSON.parse(u);
320
- s.closed.includes(a) || (s.closed.push(a), localStorage.setItem("notifications", JSON.stringify(s)));
300
+ }, O = (c) => {
301
+ w(v.filter((s) => !s.id || s.id !== c));
302
+ const d = localStorage.getItem("notifications");
303
+ if (d) {
304
+ const s = JSON.parse(d);
305
+ s.closed.includes(c) || (s.closed.push(c), localStorage.setItem("notifications", JSON.stringify(s)));
321
306
  } else
322
307
  localStorage.setItem(
323
308
  "notifications",
324
309
  JSON.stringify({
325
- closed: [a]
310
+ closed: [c]
326
311
  })
327
312
  );
328
313
  };
329
- return /* @__PURE__ */ e(z, { children: /* @__PURE__ */ o("header", { className: t.header, children: [
314
+ return /* @__PURE__ */ e(z, { children: /* @__PURE__ */ r("header", { className: t.header, children: [
330
315
  v?.map(
331
- ({ id: a, title: u, description: s, variant: N, closable: P }, U) => /* @__PURE__ */ e(
332
- J,
316
+ ({ id: c, title: d, description: s, variant: N, closable: P }, U) => /* @__PURE__ */ e(
317
+ A,
333
318
  {
334
319
  description: s,
335
320
  variant: N,
336
321
  closable: P,
337
- onClose: () => O(a),
338
- children: u
322
+ onClose: () => O(c),
323
+ children: d
339
324
  },
340
325
  U
341
326
  )
342
327
  ),
343
- /* @__PURE__ */ e("div", { className: p(t.main, t.outer), children: /* @__PURE__ */ o(I, { as: "nav", className: t.container, children: [
328
+ /* @__PURE__ */ e("div", { className: p(t.main, t.outer), children: /* @__PURE__ */ r(I, { as: "nav", className: t.container, children: [
344
329
  /* @__PURE__ */ e(
345
330
  i,
346
331
  {
347
332
  className: t.logo,
348
- href: h("https://www.highcharts.com/", c),
349
- children: /* @__PURE__ */ e(L, { showText: !C && !_ })
333
+ href: h("https://www.highcharts.com/", a),
334
+ children: /* @__PURE__ */ e(L, { showText: !k && !f })
350
335
  }
351
336
  ),
352
- /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: u }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
337
+ /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: c, url: d }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
353
338
  l,
354
339
  {
355
340
  variant: "plain",
356
341
  size: 300,
357
342
  as: i,
358
- href: h(u, c),
359
- children: a
343
+ href: h(d, a),
344
+ children: c
360
345
  }
361
346
  ) }, s)) }),
362
- /* @__PURE__ */ o("div", { className: t.buttons, children: [
363
- /* @__PURE__ */ o(
347
+ /* @__PURE__ */ r("div", { className: t.buttons, children: [
348
+ /* @__PURE__ */ r(
364
349
  l,
365
350
  {
366
351
  variant: "transparent",
367
352
  as: i,
368
353
  href: h(
369
354
  "https://www.highcharts.com/chat/gpt/",
370
- c
355
+ a
371
356
  ),
372
357
  children: [
373
358
  /* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
@@ -382,19 +367,19 @@ function B1({
382
367
  {
383
368
  variant: "brand",
384
369
  as: i,
385
- href: h("https://shop.highcharts.com/account", c),
370
+ href: h("https://shop.highcharts.com/account", a),
386
371
  "aria-label": "Login",
387
372
  children: /* @__PURE__ */ e(j, {})
388
373
  }
389
374
  ),
390
- /* @__PURE__ */ o(
375
+ /* @__PURE__ */ r(
391
376
  l,
392
377
  {
393
378
  variant: "success",
394
379
  as: i,
395
380
  href: h(
396
381
  "https://www.highcharts.com/download/",
397
- c
382
+ a
398
383
  ),
399
384
  children: [
400
385
  /* @__PURE__ */ e(W, {}),
@@ -402,63 +387,63 @@ function B1({
402
387
  ]
403
388
  }
404
389
  ),
405
- /* @__PURE__ */ o(
390
+ /* @__PURE__ */ r(
406
391
  l,
407
392
  {
408
393
  variant: m ? "white" : "transparent",
409
394
  className: t.menu,
410
- onClick: b,
395
+ onClick: C,
411
396
  children: [
412
397
  m ? "Close" : "Menu",
413
- m ? /* @__PURE__ */ e(A, {}) : /* @__PURE__ */ e(X, {})
398
+ m ? /* @__PURE__ */ e(G, {}) : /* @__PURE__ */ e(X, {})
414
399
  ]
415
400
  }
416
401
  )
417
402
  ] })
418
403
  ] }) }),
419
- !!r?.length && /* @__PURE__ */ e(
420
- f1,
404
+ !!o?.length && /* @__PURE__ */ e(
405
+ _e,
421
406
  {
422
- items: r,
407
+ items: o,
423
408
  link: i,
424
- host: c,
425
- pathname: f
409
+ host: a,
410
+ pathname: _
426
411
  }
427
412
  ),
428
413
  n,
429
- k && /* @__PURE__ */ o(V, { children: [
414
+ b && /* @__PURE__ */ r(V, { children: [
430
415
  /* @__PURE__ */ e(
431
416
  "div",
432
417
  {
433
418
  className: p(t.mobileOverlay, { [t.open]: m }),
434
- onClick: b
419
+ onClick: C
435
420
  }
436
421
  ),
437
- /* @__PURE__ */ o(
422
+ /* @__PURE__ */ r(
438
423
  "nav",
439
424
  {
440
425
  className: p(t.mobile, {
441
426
  [t.open]: m
442
427
  }),
443
428
  children: [
444
- /* @__PURE__ */ o("div", { className: t.container, children: [
429
+ /* @__PURE__ */ r("div", { className: t.container, children: [
445
430
  /* @__PURE__ */ e(
446
431
  i,
447
432
  {
448
433
  className: t.logo,
449
- href: h("https://www.highcharts.com/", c),
450
- children: /* @__PURE__ */ e(L, { showText: !_ })
434
+ href: h("https://www.highcharts.com/", a),
435
+ children: /* @__PURE__ */ e(L, { showText: !f })
451
436
  }
452
437
  ),
453
- /* @__PURE__ */ o("div", { className: t.buttons, children: [
454
- /* @__PURE__ */ o(
438
+ /* @__PURE__ */ r("div", { className: t.buttons, children: [
439
+ /* @__PURE__ */ r(
455
440
  l,
456
441
  {
457
442
  variant: "transparent",
458
443
  as: i,
459
444
  href: h(
460
445
  "https://www.highcharts.com/chat/gpt/",
461
- c
446
+ a
462
447
  ),
463
448
  children: [
464
449
  /* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
@@ -470,8 +455,8 @@ function B1({
470
455
  /* @__PURE__ */ e(T, {})
471
456
  ] })
472
457
  ] }),
473
- /* @__PURE__ */ o("div", { className: t.buttons, children: [
474
- /* @__PURE__ */ o(
458
+ /* @__PURE__ */ r("div", { className: t.buttons, children: [
459
+ /* @__PURE__ */ r(
475
460
  l,
476
461
  {
477
462
  variant: "brand",
@@ -479,7 +464,7 @@ function B1({
479
464
  as: i,
480
465
  href: h(
481
466
  "https://shop.highcharts.com/account",
482
- c
467
+ a
483
468
  ),
484
469
  children: [
485
470
  /* @__PURE__ */ e(j, {}),
@@ -487,7 +472,7 @@ function B1({
487
472
  ]
488
473
  }
489
474
  ),
490
- /* @__PURE__ */ o(
475
+ /* @__PURE__ */ r(
491
476
  l,
492
477
  {
493
478
  variant: "success",
@@ -495,7 +480,7 @@ function B1({
495
480
  as: i,
496
481
  href: h(
497
482
  "https://www.highcharts.com/download/",
498
- c
483
+ a
499
484
  ),
500
485
  children: [
501
486
  /* @__PURE__ */ e(W, {}),
@@ -504,17 +489,17 @@ function B1({
504
489
  }
505
490
  )
506
491
  ] }),
507
- /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: u, icon: s }, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
492
+ /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: c, url: d, icon: s }, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
508
493
  l,
509
494
  {
510
495
  variant: "plain",
511
496
  size: 500,
512
497
  fullWidth: !0,
513
498
  as: i,
514
- href: h(u, c),
499
+ href: h(d, a),
515
500
  children: [
516
501
  s,
517
- a
502
+ c
518
503
  ]
519
504
  }
520
505
  ) }, N)) })
@@ -525,6 +510,6 @@ function B1({
525
510
  ] }) });
526
511
  }
527
512
  export {
528
- B1 as Header,
529
- f1 as SubHeader
513
+ He as Header,
514
+ _e as SubHeader
530
515
  };