highsoft-ui 1.0.46 → 1.0.48

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,15 +1,15 @@
1
- import { jsx as e, jsxs as o, Fragment as I } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as o, Fragment as V } from "react/jsx-runtime";
2
2
  import { useState as S, useEffect as q } from "react";
3
- import { J as z } from "../../index-CMegByeX.js";
4
- import { _ as d, B as l } from "../../index-DKE1ODpv.js";
5
- import { N as J, X as A } from "../../index-BFhQ-SSv.js";
6
- import { c as g } from "../../clsx-OuTLNxxd.js";
7
- import { Container as O } from "../Container/index.js";
3
+ import { u as M, J as z } from "../../utils-xhWUdTOZ.js";
4
+ import { _ as m } from "../../extends-hS2Bh-Yp.js";
5
+ import { N as J, X as A } from "../../index-CUjEIxqY.js";
6
+ import { c as v } from "../../clsx-OuTLNxxd.js";
7
+ import { Button as l } from "../Button/index.js";
8
+ import { Container as I } from "../Container/index.js";
8
9
  import { ThemedLogo as L } from "../Logo/index.js";
9
10
  import { PrefPanel as T } from "../PrefPanel/index.js";
10
- import { useMediaQuery as M } from "../../utils.js";
11
11
  var G = function(n) {
12
- return /* @__PURE__ */ e("svg", d({
12
+ return /* @__PURE__ */ e("svg", m({
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  width: 24,
15
15
  height: 24,
@@ -25,7 +25,7 @@ var G = function(n) {
25
25
  })
26
26
  }));
27
27
  }, F = function(n) {
28
- return /* @__PURE__ */ e("svg", d({
28
+ return /* @__PURE__ */ e("svg", m({
29
29
  xmlns: "http://www.w3.org/2000/svg",
30
30
  width: 24,
31
31
  height: 24,
@@ -41,7 +41,7 @@ var G = function(n) {
41
41
  })
42
42
  }));
43
43
  }, Q = function(n) {
44
- return /* @__PURE__ */ e("svg", d({
44
+ return /* @__PURE__ */ e("svg", m({
45
45
  xmlns: "http://www.w3.org/2000/svg",
46
46
  width: 24,
47
47
  height: 24,
@@ -57,7 +57,7 @@ var G = function(n) {
57
57
  })
58
58
  }));
59
59
  }, R = function(n) {
60
- return /* @__PURE__ */ e("svg", d({
60
+ return /* @__PURE__ */ e("svg", m({
61
61
  xmlns: "http://www.w3.org/2000/svg",
62
62
  width: 24,
63
63
  height: 24,
@@ -73,7 +73,7 @@ var G = function(n) {
73
73
  })
74
74
  }));
75
75
  }, X = function(n) {
76
- return /* @__PURE__ */ e("svg", d({
76
+ return /* @__PURE__ */ e("svg", m({
77
77
  xmlns: "http://www.w3.org/2000/svg",
78
78
  width: 24,
79
79
  height: 24,
@@ -89,7 +89,7 @@ var G = function(n) {
89
89
  })
90
90
  }));
91
91
  }, $ = function(n) {
92
- return /* @__PURE__ */ e("svg", d({
92
+ return /* @__PURE__ */ e("svg", m({
93
93
  xmlns: "http://www.w3.org/2000/svg",
94
94
  width: 24,
95
95
  height: 24,
@@ -105,7 +105,7 @@ var G = function(n) {
105
105
  })
106
106
  }));
107
107
  }, D = function(n) {
108
- return /* @__PURE__ */ e("svg", d({
108
+ return /* @__PURE__ */ e("svg", m({
109
109
  xmlns: "http://www.w3.org/2000/svg",
110
110
  width: 24,
111
111
  height: 24,
@@ -121,7 +121,7 @@ var G = function(n) {
121
121
  })
122
122
  }));
123
123
  }, B = function(n) {
124
- return /* @__PURE__ */ e("svg", d({
124
+ return /* @__PURE__ */ e("svg", m({
125
125
  xmlns: "http://www.w3.org/2000/svg",
126
126
  width: 24,
127
127
  height: 24,
@@ -137,7 +137,7 @@ var G = function(n) {
137
137
  })
138
138
  }));
139
139
  }, H = function(n) {
140
- return /* @__PURE__ */ e("svg", d({
140
+ return /* @__PURE__ */ e("svg", m({
141
141
  xmlns: "http://www.w3.org/2000/svg",
142
142
  width: 24,
143
143
  height: 24,
@@ -153,7 +153,7 @@ var G = function(n) {
153
153
  })
154
154
  }));
155
155
  }, W = function(n) {
156
- return /* @__PURE__ */ e("svg", d({
156
+ return /* @__PURE__ */ e("svg", m({
157
157
  xmlns: "http://www.w3.org/2000/svg",
158
158
  width: 24,
159
159
  height: 24,
@@ -169,7 +169,7 @@ var G = function(n) {
169
169
  })
170
170
  }));
171
171
  }, j = function(n) {
172
- return /* @__PURE__ */ e("svg", d({
172
+ return /* @__PURE__ */ e("svg", m({
173
173
  xmlns: "http://www.w3.org/2000/svg",
174
174
  width: 24,
175
175
  height: 24,
@@ -185,7 +185,7 @@ var G = function(n) {
185
185
  })
186
186
  }));
187
187
  };
188
- const E = "_header_1mm0v_270", K = "_outer_1mm0v_281", Y = "_main_1mm0v_290", Z = "_container_1mm0v_294", e1 = "_links_1mm0v_300", t1 = "_buttons_1mm0v_301", n1 = "_menu_1mm0v_309", r1 = "_logo_1mm0v_314", o1 = "_subContainer_1mm0v_326", s1 = "_selected_1mm0v_354", i1 = "_icons_1mm0v_357", c1 = "_subTag_1mm0v_377", a1 = "_selectedIcon_1mm0v_390", l1 = "_selectableIcon_1mm0v_394", h1 = "_icon_1mm0v_357", d1 = "_mobileOverlay_1mm0v_408", m1 = "_show_1mm0v_1", u1 = "_open_1mm0v_420", w1 = "_mobile_1mm0v_408", p1 = "_slideUp_1mm0v_1", v1 = "_sub_1mm0v_326", g1 = "_gpt_1mm0v_484", t = {
188
+ const E = "_header_1mm0v_270", K = "_outer_1mm0v_281", Y = "_main_1mm0v_290", Z = "_container_1mm0v_294", e1 = "_links_1mm0v_300", t1 = "_buttons_1mm0v_301", n1 = "_menu_1mm0v_309", r1 = "_logo_1mm0v_314", o1 = "_subContainer_1mm0v_326", s1 = "_selected_1mm0v_354", i1 = "_icons_1mm0v_357", c1 = "_subTag_1mm0v_377", a1 = "_selectedIcon_1mm0v_390", l1 = "_selectableIcon_1mm0v_394", h1 = "_icon_1mm0v_357", m1 = "_mobileOverlay_1mm0v_408", d1 = "_show_1mm0v_1", u1 = "_open_1mm0v_420", w1 = "_mobile_1mm0v_408", p1 = "_slideUp_1mm0v_1", v1 = "_sub_1mm0v_326", g1 = "_gpt_1mm0v_484", t = {
189
189
  header: E,
190
190
  outer: K,
191
191
  main: Y,
@@ -203,8 +203,8 @@ const E = "_header_1mm0v_270", K = "_outer_1mm0v_281", Y = "_main_1mm0v_290", Z
203
203
  selectedIcon: a1,
204
204
  selectableIcon: l1,
205
205
  icon: h1,
206
- mobileOverlay: d1,
207
- show: m1,
206
+ mobileOverlay: m1,
207
+ show: d1,
208
208
  open: u1,
209
209
  mobile: w1,
210
210
  slideUp: p1,
@@ -245,34 +245,34 @@ const E = "_header_1mm0v_270", K = "_outer_1mm0v_281", Y = "_main_1mm0v_290", Z
245
245
  function h(r, n) {
246
246
  return n ? r.replace(n, "") : r;
247
247
  }
248
- function _1({
248
+ function f1({
249
249
  items: r,
250
250
  link: n = "a",
251
- host: p = "https://www.highcharts.com",
251
+ host: w = "https://www.highcharts.com",
252
252
  pathname: i = typeof window < "u" ? window.location.pathname : ""
253
253
  }) {
254
- return /* @__PURE__ */ e("div", { className: g(t.sub, t.outer), children: /* @__PURE__ */ e(O, { className: t.subContainer, as: "ul", children: r.map(
255
- ({ title: c, url: _, icon: f, selectedIcon: k, tag: C, tagVariant: u = "success" }, x) => {
256
- const w = typeof window < "u" && window.location.origin || "http://example.com", v = new URL(_, w), b = v.origin === w && v.pathname === i;
254
+ return /* @__PURE__ */ e("div", { className: v(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: u = "success" }, x) => {
256
+ const g = typeof window < "u" && window.location.origin || "http://example.com", p = new URL(f, g), b = p.origin === g && p.pathname === i;
257
257
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
258
258
  n,
259
259
  {
260
- href: h(_, p),
261
- className: g({
260
+ href: h(f, w),
261
+ className: v({
262
262
  [t.selectableIcon]: k,
263
263
  [t.selected]: b
264
264
  }),
265
265
  children: [
266
266
  /* @__PURE__ */ o("span", { className: t.icons, children: [
267
267
  /* @__PURE__ */ e("span", { className: t.selectedIcon, children: k }),
268
- /* @__PURE__ */ e("span", { className: t.icon, children: f })
268
+ /* @__PURE__ */ e("span", { className: t.icon, children: _ })
269
269
  ] }),
270
270
  /* @__PURE__ */ o("span", { children: [
271
271
  c,
272
272
  C && /* @__PURE__ */ e(
273
273
  "span",
274
274
  {
275
- className: g(
275
+ className: v(
276
276
  t.subTag,
277
277
  t[`subTag-${u}`]
278
278
  ),
@@ -289,34 +289,34 @@ function _1({
289
289
  function B1({
290
290
  subItems: r,
291
291
  children: n,
292
- notifications: p = [],
292
+ notifications: w = [],
293
293
  // TODO: Fetch these from the internets
294
294
  link: i = "a",
295
295
  host: c = "https://www.highcharts.com",
296
- pathname: _ = typeof window < "u" ? window.location.pathname : ""
296
+ pathname: f = typeof window < "u" ? window.location.pathname : ""
297
297
  }) {
298
- const f = M("(max-width: 374px)"), k = M("(max-width: 849px)"), C = M("(min-width: 850px) and (max-width: 999px)"), [u, x] = S(!1), [w, v] = S([]);
298
+ const _ = M("(max-width: 374px)"), k = M("(max-width: 849px)"), C = M("(min-width: 850px) and (max-width: 999px)"), [u, x] = S(!1), [g, p] = S([]);
299
299
  q(() => {
300
- if (p.length) {
300
+ if (w.length) {
301
301
  const a = localStorage.getItem("notifications");
302
302
  if (a) {
303
- const m = JSON.parse(a);
304
- v(
305
- p.filter(
306
- (s) => !s.id || !m.closed.includes(s.id)
303
+ const d = JSON.parse(a);
304
+ p(
305
+ w.filter(
306
+ (s) => !s.id || !d.closed.includes(s.id)
307
307
  )
308
308
  );
309
309
  } else
310
- v(p);
310
+ p(w);
311
311
  }
312
- }, [p]);
312
+ }, [w]);
313
313
  const b = () => {
314
314
  x(!u);
315
- }, P = (a) => {
316
- v(w.filter((s) => !s.id || s.id !== a));
317
- const m = localStorage.getItem("notifications");
318
- if (m) {
319
- const s = JSON.parse(m);
315
+ }, O = (a) => {
316
+ p(g.filter((s) => !s.id || s.id !== a));
317
+ const d = localStorage.getItem("notifications");
318
+ if (d) {
319
+ const s = JSON.parse(d);
320
320
  s.closed.includes(a) || (s.closed.push(a), localStorage.setItem("notifications", JSON.stringify(s)));
321
321
  } else
322
322
  localStorage.setItem(
@@ -327,35 +327,35 @@ function B1({
327
327
  );
328
328
  };
329
329
  return /* @__PURE__ */ e(z, { children: /* @__PURE__ */ o("header", { className: t.header, children: [
330
- w == null ? void 0 : w.map(
331
- ({ id: a, title: m, description: s, variant: N, closable: U }, V) => /* @__PURE__ */ e(
330
+ g?.map(
331
+ ({ id: a, title: d, description: s, variant: N, closable: P }, U) => /* @__PURE__ */ e(
332
332
  J,
333
333
  {
334
334
  description: s,
335
335
  variant: N,
336
- closable: U,
337
- onClose: () => P(a),
338
- children: m
336
+ closable: P,
337
+ onClose: () => O(a),
338
+ children: d
339
339
  },
340
- V
340
+ U
341
341
  )
342
342
  ),
343
- /* @__PURE__ */ e("div", { className: g(t.main, t.outer), children: /* @__PURE__ */ o(O, { as: "nav", className: t.container, children: [
343
+ /* @__PURE__ */ e("div", { className: v(t.main, t.outer), children: /* @__PURE__ */ o(I, { as: "nav", className: t.container, children: [
344
344
  /* @__PURE__ */ e(
345
345
  i,
346
346
  {
347
347
  className: t.logo,
348
348
  href: h("https://www.highcharts.com/", c),
349
- children: /* @__PURE__ */ e(L, { showText: !C && !f })
349
+ children: /* @__PURE__ */ e(L, { showText: !C && !_ })
350
350
  }
351
351
  ),
352
- /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: m }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
352
+ /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: d }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
353
353
  l,
354
354
  {
355
355
  variant: "plain",
356
356
  size: 300,
357
357
  as: i,
358
- href: h(m, c),
358
+ href: h(d, c),
359
359
  children: a
360
360
  }
361
361
  ) }, s)) }),
@@ -416,28 +416,28 @@ function B1({
416
416
  )
417
417
  ] })
418
418
  ] }) }),
419
- !!(r != null && r.length) && /* @__PURE__ */ e(
420
- _1,
419
+ !!r?.length && /* @__PURE__ */ e(
420
+ f1,
421
421
  {
422
422
  items: r,
423
423
  link: i,
424
424
  host: c,
425
- pathname: _
425
+ pathname: f
426
426
  }
427
427
  ),
428
428
  n,
429
- k && /* @__PURE__ */ o(I, { children: [
429
+ k && /* @__PURE__ */ o(V, { children: [
430
430
  /* @__PURE__ */ e(
431
431
  "div",
432
432
  {
433
- className: g(t.mobileOverlay, { [t.open]: u }),
433
+ className: v(t.mobileOverlay, { [t.open]: u }),
434
434
  onClick: b
435
435
  }
436
436
  ),
437
437
  /* @__PURE__ */ o(
438
438
  "nav",
439
439
  {
440
- className: g(t.mobile, {
440
+ className: v(t.mobile, {
441
441
  [t.open]: u
442
442
  }),
443
443
  children: [
@@ -447,7 +447,7 @@ function B1({
447
447
  {
448
448
  className: t.logo,
449
449
  href: h("https://www.highcharts.com/", c),
450
- children: /* @__PURE__ */ e(L, { showText: !f })
450
+ children: /* @__PURE__ */ e(L, { showText: !_ })
451
451
  }
452
452
  ),
453
453
  /* @__PURE__ */ o("div", { className: t.buttons, children: [
@@ -504,14 +504,14 @@ function B1({
504
504
  }
505
505
  )
506
506
  ] }),
507
- /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: m, icon: s }, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
507
+ /* @__PURE__ */ e("ul", { className: t.links, children: y.map(({ title: a, url: d, icon: s }, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(
508
508
  l,
509
509
  {
510
510
  variant: "plain",
511
511
  size: 500,
512
512
  fullWidth: !0,
513
513
  as: i,
514
- href: h(m, c),
514
+ href: h(d, c),
515
515
  children: [
516
516
  s,
517
517
  a
@@ -526,5 +526,5 @@ function B1({
526
526
  }
527
527
  export {
528
528
  B1 as Header,
529
- _1 as SubHeader
529
+ f1 as SubHeader
530
530
  };
@@ -6,4 +6,4 @@ export interface LogoProps extends SVGProps<SVGSVGElement> {
6
6
  withLink?: boolean;
7
7
  }
8
8
  export declare function Logo({ title, light, showText, withLink, ...props }: LogoProps): import("react/jsx-runtime").JSX.Element;
9
- export declare function ThemedLogo(props: LogoProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare const ThemedLogo: (props: LogoProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,13 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { z as h } from "../../index-CMegByeX.js";
3
- import { useMounted as d } from "../../utils.js";
4
- function n({
5
- title: s = "Highcharts",
6
- light: l,
7
- showText: o = !0,
8
- withLink: e = !1,
9
- ...f
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { b as h } from "../../utils-xhWUdTOZ.js";
3
+ function d({
4
+ title: o = "Highcharts",
5
+ light: r,
6
+ showText: s = !0,
7
+ withLink: f = !1,
8
+ ...e
10
9
  }) {
11
- const i = l ? "#18171c" : "#f7f7f8", r = /* @__PURE__ */ c(
10
+ const i = r ? "#18171c" : "#f7f7f8", l = /* @__PURE__ */ c(
12
11
  "svg",
13
12
  {
14
13
  version: "1.1",
@@ -19,11 +18,11 @@ function n({
19
18
  xmlnsXlink: "http://www.w3.org/1999/xlink",
20
19
  x: "0px",
21
20
  y: "0px",
22
- viewBox: o ? "10 10 384 65" : "10 10 69 65",
21
+ viewBox: s ? "10 10 384 65" : "10 10 69 65",
23
22
  xmlSpace: "preserve",
24
- ...f,
23
+ ...e,
25
24
  children: [
26
- /* @__PURE__ */ t("title", { id: "logo-highcharts-title", children: s }),
25
+ /* @__PURE__ */ t("title", { id: "logo-highcharts-title", children: o }),
27
26
  /* @__PURE__ */ c("g", { id: "symbol", transform: "translate(10, 10) scale(1)", children: [
28
27
  /* @__PURE__ */ t(
29
28
  "polygon",
@@ -110,7 +109,7 @@ function n({
110
109
  }
111
110
  )
112
111
  ] }),
113
- o && /* @__PURE__ */ c(
112
+ s && /* @__PURE__ */ c(
114
113
  "g",
115
114
  {
116
115
  id: "text-highcharts",
@@ -244,13 +243,10 @@ function n({
244
243
  ]
245
244
  }
246
245
  );
247
- return e ? /* @__PURE__ */ t("a", { href: "https://www.highcharts.com", children: r }) : r;
248
- }
249
- function a(s) {
250
- const { resolvedTheme: l } = h(), o = d();
251
- return /* @__PURE__ */ t(n, { light: !o || l === "light", ...s });
246
+ return f ? /* @__PURE__ */ t("a", { href: "https://www.highcharts.com", children: l }) : l;
252
247
  }
248
+ const k = (o) => /* @__PURE__ */ t(d, { light: h() === "light", ...o });
253
249
  export {
254
- n as Logo,
255
- a as ThemedLogo
250
+ d as Logo,
251
+ k as ThemedLogo
256
252
  };
@@ -0,0 +1,8 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export type NewTagVariant = 'neutral' | 'success' | 'attention' | 'brand' | 'danger';
3
+ export interface NewTagProps extends HTMLAttributes<HTMLSpanElement> {
4
+ variant?: NewTagVariant;
5
+ icon?: boolean;
6
+ border?: boolean;
7
+ }
8
+ export declare function NewTag({ variant, icon, border, className }: NewTagProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,54 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import "react";
3
+ import { _ as a } from "../../extends-hS2Bh-Yp.js";
4
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
5
+ var i = function(n) {
6
+ return /* @__PURE__ */ r("svg", a({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ fill: "none",
11
+ viewBox: "0 0 24 24"
12
+ }, n, {
13
+ children: /* @__PURE__ */ r("path", {
14
+ stroke: "currentColor",
15
+ strokeLinecap: "round",
16
+ strokeLinejoin: "round",
17
+ strokeWidth: 2,
18
+ 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"
19
+ })
20
+ }));
21
+ };
22
+ const d = "_tag_pnk41_270", p = "_icon_pnk41_287", l = "_border_pnk41_293", u = "_neutral_pnk41_303", g = "_success_pnk41_309", k = "_attention_pnk41_315", m = "_brand_pnk41_321", h = "_danger_pnk41_327", t = {
23
+ tag: d,
24
+ icon: p,
25
+ border: l,
26
+ neutral: u,
27
+ success: g,
28
+ attention: k,
29
+ brand: m,
30
+ danger: h
31
+ };
32
+ function v({
33
+ variant: s = "success",
34
+ icon: n = !0,
35
+ border: o,
36
+ className: e
37
+ }) {
38
+ return /* @__PURE__ */ c(
39
+ "span",
40
+ {
41
+ className: _(e, t.tag, t[s], {
42
+ [t.icon]: n,
43
+ [t.border]: o
44
+ }),
45
+ children: [
46
+ n && /* @__PURE__ */ r(i, {}),
47
+ "New"
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ v as NewTag
54
+ };
@@ -1,8 +1,8 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { N as f } from "../../index-BFhQ-SSv.js";
3
+ import { N as f } from "../../index-CUjEIxqY.js";
4
4
  import "../../clsx-OuTLNxxd.js";
5
- import "../../index-DKE1ODpv.js";
5
+ import "../Button/index.js";
6
6
  import "../Container/index.js";
7
7
  export {
8
8
  f as Notification