highsoft-ui 1.0.24 → 1.0.25

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,14 +1,14 @@
1
- import { jsx as e, jsxs as s, Fragment as U } from "react/jsx-runtime";
2
- import { useState as N, useEffect as V } from "react";
1
+ import { jsx as e, jsxs as s, Fragment as P } from "react/jsx-runtime";
2
+ import { useState as z, useEffect as V } from "react";
3
3
  import { J as q } from "../../index-CMegByeX.js";
4
4
  import { _ as d } from "../../extends-hS2Bh-Yp.js";
5
5
  import { N as J, X as A } from "../../index-ChurKizy.js";
6
- import { c as f } from "../../clsx-OuTLNxxd.js";
6
+ import { c as v } from "../../clsx-OuTLNxxd.js";
7
7
  import { Button as h } from "../Button/index.js";
8
- import { Container as j } from "../Container/index.js";
9
- import { ThemedLogo as z } from "../Logo/index.js";
10
- import { PrefPanel as L } from "../PrefPanel/index.js";
11
- import { useMediaQuery as M, useLocation as G } from "../../utils.js";
8
+ import { Container as y } from "../Container/index.js";
9
+ import { ThemedLogo as L } from "../Logo/index.js";
10
+ import { PrefPanel as S } from "../PrefPanel/index.js";
11
+ import { useMediaQuery as N, useLocation as G } 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
- }, S = function(t) {
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
- }, T = function(t) {
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
- }, B = function(t) {
156
+ }, W = function(t) {
157
157
  return /* @__PURE__ */ e("svg", d({
158
158
  xmlns: "http://www.w3.org/2000/svg",
159
159
  width: 24,
@@ -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
- }, W = [
210
+ }, j = [
211
211
  {
212
212
  title: "Products",
213
213
  url: "https://highcharts.com/products/",
@@ -245,31 +245,31 @@ function l(n, t) {
245
245
  function w1({
246
246
  items: n,
247
247
  link: t = "a",
248
- host: g = "https://www.highcharts.com"
248
+ host: p = "https://www.highcharts.com"
249
249
  }) {
250
250
  const i = G();
251
- return /* @__PURE__ */ e("div", { className: f(r.sub, r.outer), children: /* @__PURE__ */ e(j, { className: r.subContainer, as: "ul", children: n.map(({ title: a, url: w, icon: k, tag: x, tagVariant: m = "success" }, C) => {
252
- w = l(w, g);
253
- let p = !1;
251
+ return /* @__PURE__ */ e("div", { className: v(r.sub, r.outer), children: /* @__PURE__ */ e(y, { className: r.subContainer, as: "ul", children: n.map(({ title: a, url: f, icon: C, tag: x, tagVariant: m = "success" }, b) => {
252
+ const w = l(f, p);
253
+ let g = !1;
254
254
  if (typeof window < "u" && i) {
255
- const v = window.location.origin, _ = new URL(w, v);
256
- p = _.origin === v && _.pathname === i.pathname;
255
+ const _ = window.location.origin, k = new URL(w, _);
256
+ g = (f.startsWith("/") || k.origin === _) && k.pathname === i.pathname;
257
257
  }
258
258
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
259
259
  t,
260
260
  {
261
261
  href: w,
262
- className: f({
263
- [r.selected]: p
262
+ className: v({
263
+ [r.selected]: g
264
264
  }),
265
265
  children: [
266
- k,
266
+ C,
267
267
  /* @__PURE__ */ s("span", { children: [
268
268
  a,
269
269
  x && /* @__PURE__ */ e(
270
270
  "span",
271
271
  {
272
- className: f(
272
+ className: v(
273
273
  r.subTag,
274
274
  r[`subTag-${m}`]
275
275
  ),
@@ -279,36 +279,36 @@ function w1({
279
279
  ] })
280
280
  ]
281
281
  }
282
- ) }, C);
282
+ ) }, b);
283
283
  }) }) });
284
284
  }
285
285
  function z1({
286
286
  subItems: n,
287
287
  children: t,
288
- notifications: g = [],
288
+ notifications: p = [],
289
289
  // TODO: Fetch these from the internets
290
290
  link: i = "a",
291
291
  host: a = "https://www.highcharts.com"
292
292
  }) {
293
- const w = M("(max-width: 374px)"), k = M("(max-width: 849px)"), x = M("(min-width: 850px) and (max-width: 999px)"), [m, C] = N(!1), [p, v] = N([]);
293
+ const f = N("(max-width: 374px)"), C = N("(max-width: 849px)"), x = N("(min-width: 850px) and (max-width: 999px)"), [m, b] = z(!1), [w, g] = z([]);
294
294
  V(() => {
295
- if (g.length) {
295
+ if (p.length) {
296
296
  const c = localStorage.getItem("notifications");
297
297
  if (c) {
298
298
  const u = JSON.parse(c);
299
- v(
300
- g.filter(
299
+ g(
300
+ p.filter(
301
301
  (o) => !o.id || !u.closed.includes(o.id)
302
302
  )
303
303
  );
304
304
  } else
305
- v(g);
305
+ g(p);
306
306
  }
307
- }, [g]);
307
+ }, [p]);
308
308
  const _ = () => {
309
- C(!m);
310
- }, y = (c) => {
311
- v(p.filter((o) => !o.id || o.id !== c));
309
+ b(!m);
310
+ }, k = (c) => {
311
+ g(w.filter((o) => !o.id || o.id !== c));
312
312
  const u = localStorage.getItem("notifications");
313
313
  if (u) {
314
314
  const o = JSON.parse(u);
@@ -322,29 +322,29 @@ function z1({
322
322
  );
323
323
  };
324
324
  return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ s("header", { className: r.header, children: [
325
- p == null ? void 0 : p.map(
326
- ({ id: c, title: u, description: o, variant: b, closable: O }, P) => /* @__PURE__ */ e(
325
+ w == null ? void 0 : w.map(
326
+ ({ id: c, title: u, description: o, variant: M, closable: O }, U) => /* @__PURE__ */ e(
327
327
  J,
328
328
  {
329
329
  description: o,
330
- variant: b,
330
+ variant: M,
331
331
  closable: O,
332
- onClose: () => y(c),
332
+ onClose: () => k(c),
333
333
  children: u
334
334
  },
335
- P
335
+ U
336
336
  )
337
337
  ),
338
- /* @__PURE__ */ e("div", { className: f(r.main, r.outer), children: /* @__PURE__ */ s(j, { as: "nav", className: r.container, children: [
338
+ /* @__PURE__ */ e("div", { className: v(r.main, r.outer), children: /* @__PURE__ */ s(y, { as: "nav", className: r.container, children: [
339
339
  /* @__PURE__ */ e(
340
340
  i,
341
341
  {
342
342
  className: r.logo,
343
343
  href: l("https://www.highcharts.com/", a),
344
- children: /* @__PURE__ */ e(z, { showText: !x && !w })
344
+ children: /* @__PURE__ */ e(L, { showText: !x && !f })
345
345
  }
346
346
  ),
347
- /* @__PURE__ */ e("ul", { className: r.links, children: W.map(({ title: c, url: u }, o) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
347
+ /* @__PURE__ */ e("ul", { className: r.links, children: j.map(({ title: c, url: u }, o) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
348
348
  h,
349
349
  {
350
350
  variant: "plain",
@@ -366,12 +366,12 @@ function z1({
366
366
  ),
367
367
  children: [
368
368
  /* @__PURE__ */ e("span", { className: r.gpt, children: "Highcharts GPT" }),
369
- /* @__PURE__ */ e(T, {})
369
+ /* @__PURE__ */ e(B, {})
370
370
  ]
371
371
  }
372
372
  ),
373
- /* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(S, {}) }),
374
- /* @__PURE__ */ e(L, {}),
373
+ /* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(T, {}) }),
374
+ /* @__PURE__ */ e(S, {}),
375
375
  /* @__PURE__ */ e(
376
376
  h,
377
377
  {
@@ -392,7 +392,7 @@ function z1({
392
392
  a
393
393
  ),
394
394
  children: [
395
- /* @__PURE__ */ e(B, {}),
395
+ /* @__PURE__ */ e(W, {}),
396
396
  "Get started"
397
397
  ]
398
398
  }
@@ -413,18 +413,18 @@ function z1({
413
413
  ] }) }),
414
414
  !!(n != null && n.length) && /* @__PURE__ */ e(w1, { items: n, link: i, host: a }),
415
415
  t,
416
- k && /* @__PURE__ */ s(U, { children: [
416
+ C && /* @__PURE__ */ s(P, { children: [
417
417
  /* @__PURE__ */ e(
418
418
  "div",
419
419
  {
420
- className: f(r.mobileOverlay, { [r.open]: m }),
420
+ className: v(r.mobileOverlay, { [r.open]: m }),
421
421
  onClick: _
422
422
  }
423
423
  ),
424
424
  /* @__PURE__ */ s(
425
425
  "nav",
426
426
  {
427
- className: f(r.mobile, {
427
+ className: v(r.mobile, {
428
428
  [r.open]: m
429
429
  }),
430
430
  children: [
@@ -434,7 +434,7 @@ function z1({
434
434
  {
435
435
  className: r.logo,
436
436
  href: l("https://www.highcharts.com/", a),
437
- children: /* @__PURE__ */ e(z, { showText: !w })
437
+ children: /* @__PURE__ */ e(L, { showText: !f })
438
438
  }
439
439
  ),
440
440
  /* @__PURE__ */ s("div", { className: r.buttons, children: [
@@ -449,12 +449,12 @@ function z1({
449
449
  ),
450
450
  children: [
451
451
  /* @__PURE__ */ e("span", { className: r.gpt, children: "Highcharts GPT" }),
452
- /* @__PURE__ */ e(T, {})
452
+ /* @__PURE__ */ e(B, {})
453
453
  ]
454
454
  }
455
455
  ),
456
- /* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(S, {}) }),
457
- /* @__PURE__ */ e(L, {})
456
+ /* @__PURE__ */ e(h, { variant: "transparent", "aria-label": "Search", children: /* @__PURE__ */ e(T, {}) }),
457
+ /* @__PURE__ */ e(S, {})
458
458
  ] })
459
459
  ] }),
460
460
  /* @__PURE__ */ s("div", { className: r.buttons, children: [
@@ -485,13 +485,13 @@ function z1({
485
485
  a
486
486
  ),
487
487
  children: [
488
- /* @__PURE__ */ e(B, {}),
488
+ /* @__PURE__ */ e(W, {}),
489
489
  "Get started"
490
490
  ]
491
491
  }
492
492
  )
493
493
  ] }),
494
- /* @__PURE__ */ e("ul", { className: r.links, children: W.map(({ title: c, url: u, icon: o }, b) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
494
+ /* @__PURE__ */ e("ul", { className: r.links, children: j.map(({ title: c, url: u, icon: o }, M) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
495
495
  h,
496
496
  {
497
497
  variant: "plain",
@@ -504,7 +504,7 @@ function z1({
504
504
  c
505
505
  ]
506
506
  }
507
- ) }, b)) })
507
+ ) }, M)) })
508
508
  ]
509
509
  }
510
510
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "highsoft-ui",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Highsoft UI",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",