highsoft-ui 1.0.82 → 1.0.83

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.
@@ -22,12 +22,12 @@ export interface Notification {
22
22
  closable?: boolean;
23
23
  }
24
24
  export declare function Header({ subItems, children, notifications: initialNotifications, // TODO: Fetch these from the internets
25
- link: Link, host, pathname, topCssVariable }: {
25
+ link: Link, host, pathname, cssVariable }: {
26
26
  subItems?: Array<SubHeaderItem>;
27
27
  children?: ReactNode;
28
28
  notifications?: Array<Notification>;
29
29
  link?: ElementType;
30
30
  host?: string;
31
31
  pathname?: string;
32
- topCssVariable?: boolean;
32
+ cssVariable?: boolean;
33
33
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,25 +1,25 @@
1
- import { jsx as e, jsxs as i, Fragment as A } from "react/jsx-runtime";
2
- import { useRef as J, useState as L, useEffect as T } from "react";
3
- import { a as M, J as U, b as G } from "../../utils-CT0G9Gzw.js";
4
- import { A as R } from "../../Announcement03-obPaH4LK.js";
5
- import { _ as m } from "../../extends-hS2Bh-Yp.js";
6
- import { X as $ } from "../../XClose-CCu1vrNS.js";
7
- import { c as _ } from "../../clsx-OuTLNxxd.js";
8
- import { Button as d } from "../Button/index.js";
9
- import { Container as V } from "../Container/index.js";
10
- import { Logo as H } from "../Logo/index.js";
11
- import { NewTag as F } from "../NewTag/index.js";
12
- import { Notification as Y } from "../Notification/index.js";
13
- import { Search as I } from "../Search/index.js";
14
- import { PrefPanel as W } from "../PrefPanel/index.js";
15
- var D = function(o) {
16
- return /* @__PURE__ */ e("svg", m({
1
+ import { jsx as e, jsxs as i, Fragment as U } from "react/jsx-runtime";
2
+ import { useRef as $, useState as T, useEffect as H } from "react";
3
+ import { a as M, J as G, b as R } from "../../utils-CT0G9Gzw.js";
4
+ import { A as F } from "../../Announcement03-obPaH4LK.js";
5
+ import { _ as u } from "../../extends-hS2Bh-Yp.js";
6
+ import { X as Y } from "../../XClose-CCu1vrNS.js";
7
+ import { c as C } from "../../clsx-OuTLNxxd.js";
8
+ import { Button as m } from "../Button/index.js";
9
+ import { Container as z } from "../Container/index.js";
10
+ import { Logo as I } from "../Logo/index.js";
11
+ import { NewTag as D } from "../NewTag/index.js";
12
+ import { Notification as K } from "../Notification/index.js";
13
+ import { Search as W } from "../Search/index.js";
14
+ import { PrefPanel as j } from "../PrefPanel/index.js";
15
+ var X = function(n) {
16
+ return /* @__PURE__ */ e("svg", u({
17
17
  xmlns: "http://www.w3.org/2000/svg",
18
18
  width: 24,
19
19
  height: 24,
20
20
  fill: "none",
21
21
  viewBox: "0 0 24 24"
22
- }, o, {
22
+ }, n, {
23
23
  children: /* @__PURE__ */ e("path", {
24
24
  stroke: "currentColor",
25
25
  strokeLinecap: "round",
@@ -28,14 +28,14 @@ var D = function(o) {
28
28
  d: "M6 11v4m12-6v4m-1-9c2.4487 0 3.7731.3748 4.4321.6654.0878.0388.1317.0581.2583.179.0759.0724.2145.285.2501.3837.0595.1646.0595.2546.0595.4346v10.7484c0 .9088 0 1.3632-.1363 1.5968-.1386.2375-.2723.348-.5318.4393-.255.0897-.7699-.0092-1.7997-.2071A13.45 13.45 0 0 0 17 18c-3 0-6 2-10 2-2.4487 0-3.7731-.3748-4.4321-.6654-.0878-.0388-.1317-.0581-.2583-.179-.076-.0724-.2145-.285-.2501-.3837C2 18.6073 2 18.5173 2 18.3373V7.5889c0-.9088 0-1.3632.1363-1.5968.1386-.2375.2723-.348.5318-.4393.255-.0898.77.0092 1.7997.207A13.44 13.44 0 0 0 7 6c3 0 6-2 10-2m-2.5 8c0 1.3807-1.1193 2.5-2.5 2.5S9.5 13.3807 9.5 12s1.1193-2.5 2.5-2.5 2.5 1.1193 2.5 2.5"
29
29
  })
30
30
  }));
31
- }, K = function(o) {
32
- return /* @__PURE__ */ e("svg", m({
31
+ }, Z = function(n) {
32
+ return /* @__PURE__ */ e("svg", u({
33
33
  xmlns: "http://www.w3.org/2000/svg",
34
34
  width: 24,
35
35
  height: 24,
36
36
  fill: "none",
37
37
  viewBox: "0 0 24 24"
38
- }, o, {
38
+ }, n, {
39
39
  children: /* @__PURE__ */ e("path", {
40
40
  stroke: "currentColor",
41
41
  strokeLinecap: "round",
@@ -44,14 +44,14 @@ var D = function(o) {
44
44
  d: "M11 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 21h8.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.7202 21 17.8802 21 16.2V13m-9-5h4v4m-.5-8.5V2m3.9393 2.5607L20.5 3.5m.0103 5h1.5M3 13.3471c.652.1007 1.3199.1529 2 .1529 4.3864 0 8.2653-2.1724 10.6197-5.5"
45
45
  })
46
46
  }));
47
- }, X = function(o) {
48
- return /* @__PURE__ */ e("svg", m({
47
+ }, ee = function(n) {
48
+ return /* @__PURE__ */ e("svg", u({
49
49
  xmlns: "http://www.w3.org/2000/svg",
50
50
  width: 24,
51
51
  height: 24,
52
52
  fill: "none",
53
53
  viewBox: "0 0 24 24"
54
- }, o, {
54
+ }, n, {
55
55
  children: /* @__PURE__ */ e("path", {
56
56
  stroke: "currentColor",
57
57
  strokeLinecap: "round",
@@ -60,14 +60,14 @@ var D = function(o) {
60
60
  d: "M14 2.2695v4.1306c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.7599 8 15.0399 8 15.6 8h4.1305M16 13H8m8 4H8m2-8H8m6-7H8.8c-1.6802 0-2.5202 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.2798 4 5.1198 4 6.8v10.4c0 1.6802 0 2.5202.327 3.162a3 3 0 0 0 1.311 1.311C6.2798 22 7.1198 22 8.8 22h6.4c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 19.7202 20 18.8802 20 17.2V8z"
61
61
  })
62
62
  }));
63
- }, Z = function(o) {
64
- return /* @__PURE__ */ e("svg", m({
63
+ }, te = function(n) {
64
+ return /* @__PURE__ */ e("svg", u({
65
65
  xmlns: "http://www.w3.org/2000/svg",
66
66
  width: 24,
67
67
  height: 24,
68
68
  fill: "none",
69
69
  viewBox: "0 0 24 24"
70
- }, o, {
70
+ }, n, {
71
71
  children: /* @__PURE__ */ e("path", {
72
72
  stroke: "currentColor",
73
73
  strokeLinecap: "round",
@@ -76,14 +76,14 @@ var D = function(o) {
76
76
  d: "M3 12h12M3 6h18M3 18h18"
77
77
  })
78
78
  }));
79
- }, ee = function(o) {
80
- return /* @__PURE__ */ e("svg", m({
79
+ }, ne = function(n) {
80
+ return /* @__PURE__ */ e("svg", u({
81
81
  xmlns: "http://www.w3.org/2000/svg",
82
82
  width: 24,
83
83
  height: 24,
84
84
  fill: "none",
85
85
  viewBox: "0 0 24 24"
86
- }, o, {
86
+ }, n, {
87
87
  children: /* @__PURE__ */ e("path", {
88
88
  stroke: "currentColor",
89
89
  strokeLinecap: "round",
@@ -92,14 +92,14 @@ var D = function(o) {
92
92
  d: "M10 8.0022a2.2485 2.2485 0 0 1 2.501-1.4698 2.248 2.248 0 0 1 1.8682 2.2193c0 1.4989-2.2483 2.2483-2.2483 2.2483m.029 3h.01M7 18v2.3355c0 .5329 0 .7993.1092.9361a.5.5 0 0 0 .3913.1881c.1751-.0002.3832-.1666.7993-.4995l2.3854-1.9084c.4873-.3898.731-.5847 1.0023-.7233a3 3 0 0 1 .7617-.2672C12.7477 18 13.0597 18 13.6837 18H16.2c1.6802 0 2.5202 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 15.7202 21 14.8802 21 13.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.8V14c0 .93 0 1.395.1022 1.7765a3 3 0 0 0 2.1213 2.1213C5.605 18 6.07 18 7 18"
93
93
  })
94
94
  }));
95
- }, te = function(o) {
96
- return /* @__PURE__ */ e("svg", m({
95
+ }, oe = function(n) {
96
+ return /* @__PURE__ */ e("svg", u({
97
97
  xmlns: "http://www.w3.org/2000/svg",
98
98
  width: 24,
99
99
  height: 24,
100
100
  fill: "none",
101
101
  viewBox: "0 0 24 24"
102
- }, o, {
102
+ }, n, {
103
103
  children: /* @__PURE__ */ e("path", {
104
104
  stroke: "currentColor",
105
105
  strokeLinecap: "round",
@@ -108,14 +108,14 @@ var D = function(o) {
108
108
  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"
109
109
  })
110
110
  }));
111
- }, j = function(o) {
112
- return /* @__PURE__ */ e("svg", m({
111
+ }, P = function(n) {
112
+ return /* @__PURE__ */ e("svg", u({
113
113
  xmlns: "http://www.w3.org/2000/svg",
114
114
  width: 24,
115
115
  height: 24,
116
116
  fill: "none",
117
117
  viewBox: "0 0 24 24"
118
- }, o, {
118
+ }, n, {
119
119
  children: /* @__PURE__ */ e("path", {
120
120
  stroke: "currentColor",
121
121
  strokeLinecap: "round",
@@ -124,14 +124,14 @@ var D = function(o) {
124
124
  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"
125
125
  })
126
126
  }));
127
- }, P = function(o) {
128
- return /* @__PURE__ */ e("svg", m({
127
+ }, E = function(n) {
128
+ return /* @__PURE__ */ e("svg", u({
129
129
  xmlns: "http://www.w3.org/2000/svg",
130
130
  width: 24,
131
131
  height: 24,
132
132
  fill: "none",
133
133
  viewBox: "0 0 24 24"
134
- }, o, {
134
+ }, n, {
135
135
  children: /* @__PURE__ */ e("path", {
136
136
  stroke: "currentColor",
137
137
  strokeLinecap: "round",
@@ -140,14 +140,14 @@ var D = function(o) {
140
140
  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"
141
141
  })
142
142
  }));
143
- }, E = function(o) {
144
- return /* @__PURE__ */ e("svg", m({
143
+ }, O = function(n) {
144
+ return /* @__PURE__ */ e("svg", u({
145
145
  xmlns: "http://www.w3.org/2000/svg",
146
146
  width: 24,
147
147
  height: 24,
148
148
  fill: "none",
149
149
  viewBox: "0 0 24 24"
150
- }, o, {
150
+ }, n, {
151
151
  children: /* @__PURE__ */ e("path", {
152
152
  stroke: "currentColor",
153
153
  strokeLinecap: "round",
@@ -157,170 +157,175 @@ var D = function(o) {
157
157
  })
158
158
  }));
159
159
  };
160
- const ne = "m_QBtq_buttons", oe = "m_QBtq_container", re = "m_QBtq_gpt", se = "m_QBtq_header", ie = "m_QBtq_icon", ce = "m_QBtq_icons", ae = "m_QBtq_links", le = "m_QBtq_logo", he = "m_QBtq_main", de = "m_QBtq_menu", me = "m_QBtq_mobile", ue = "m_QBtq_mobileOverlay", pe = "m_QBtq_open", we = "m_QBtq_outer", ge = "m_QBtq_selectableIcon", fe = "m_QBtq_selected", ve = "m_QBtq_selectedIcon", ke = "m_QBtq_skip", _e = "m_QBtq_sub", Ce = "m_QBtq_subContainer", be = "m_QBtq_subTitle", t = {
161
- buttons: ne,
162
- container: oe,
163
- gpt: re,
164
- header: se,
165
- icon: ie,
166
- icons: ce,
167
- links: ae,
168
- logo: le,
169
- main: he,
170
- menu: de,
171
- mobile: me,
172
- mobileOverlay: ue,
173
- open: pe,
174
- outer: we,
175
- selectableIcon: ge,
176
- selected: fe,
177
- selectedIcon: ve,
178
- skip: ke,
179
- sub: _e,
180
- subContainer: Ce,
181
- subTitle: be
182
- }, O = [
160
+ const re = "m_QBtq_buttons", se = "m_QBtq_container", ie = "m_QBtq_gpt", ce = "m_QBtq_header", ae = "m_QBtq_icon", le = "m_QBtq_icons", he = "m_QBtq_links", de = "m_QBtq_logo", me = "m_QBtq_main", ue = "m_QBtq_menu", pe = "m_QBtq_mobile", we = "m_QBtq_mobileOverlay", ge = "m_QBtq_open", fe = "m_QBtq_outer", ve = "m_QBtq_selectableIcon", ke = "m_QBtq_selected", Ce = "m_QBtq_selectedIcon", _e = "m_QBtq_skip", be = "m_QBtq_sub", xe = "m_QBtq_subContainer", Be = "m_QBtq_subTitle", t = {
161
+ buttons: re,
162
+ container: se,
163
+ gpt: ie,
164
+ header: ce,
165
+ icon: ae,
166
+ icons: le,
167
+ links: he,
168
+ logo: de,
169
+ main: me,
170
+ menu: ue,
171
+ mobile: pe,
172
+ mobileOverlay: we,
173
+ open: ge,
174
+ outer: fe,
175
+ selectableIcon: ve,
176
+ selected: ke,
177
+ selectedIcon: Ce,
178
+ skip: _e,
179
+ sub: be,
180
+ subContainer: xe,
181
+ subTitle: Be
182
+ }, V = [
183
183
  {
184
184
  title: "Products",
185
185
  url: "https://www.highcharts.com/products/",
186
- icon: /* @__PURE__ */ e(K, {})
186
+ icon: /* @__PURE__ */ e(Z, {})
187
187
  },
188
188
  {
189
189
  title: "Demos",
190
190
  url: "https://www.highcharts.com/demo",
191
- icon: /* @__PURE__ */ e(te, {})
191
+ icon: /* @__PURE__ */ e(oe, {})
192
192
  },
193
193
  {
194
194
  title: "Support",
195
195
  url: "https://www.highcharts.com/support/",
196
- icon: /* @__PURE__ */ e(ee, {})
196
+ icon: /* @__PURE__ */ e(ne, {})
197
197
  },
198
198
  {
199
199
  title: "Resources",
200
200
  url: "https://www.highcharts.com/resources/",
201
- icon: /* @__PURE__ */ e(X, {})
201
+ icon: /* @__PURE__ */ e(ee, {})
202
202
  },
203
203
  {
204
204
  title: "Pricing",
205
205
  url: "https://shop.highcharts.com/",
206
- icon: /* @__PURE__ */ e(D, {})
206
+ icon: /* @__PURE__ */ e(X, {})
207
207
  },
208
208
  {
209
209
  title: "Blog",
210
210
  url: "https://www.highcharts.com/blog/home/",
211
- icon: /* @__PURE__ */ e(R, {})
211
+ icon: /* @__PURE__ */ e(F, {})
212
212
  }
213
213
  ];
214
- function h(c, o) {
215
- return o ? c.replace(o, "") : c;
214
+ function d(c, n) {
215
+ return n ? c.replace(n, "") : c;
216
216
  }
217
- function xe({
217
+ function Ne({
218
218
  items: c,
219
- link: o = "a",
220
- host: p = "https://www.highcharts.com",
221
- pathname: a
219
+ link: n = "a",
220
+ host: f = "https://www.highcharts.com",
221
+ pathname: l
222
222
  }) {
223
- const l = G();
224
- return /* @__PURE__ */ e("div", { className: _(t.sub, t.outer), children: /* @__PURE__ */ e(V, { className: t.subContainer, as: "ul", children: c.map(
225
- ({ title: N, url: w, icon: C, selectedIcon: b, tag: q, tagVariant: f = "success" }, u) => {
226
- const x = typeof window < "u" && window.location.origin || "http://example.com", v = new URL(w, x), k = (!!a || l) && v.origin === x && v.pathname === (a || typeof window < "u" && window.location.pathname);
223
+ const h = R();
224
+ return /* @__PURE__ */ e("div", { className: C(t.sub, t.outer), children: /* @__PURE__ */ e(z, { className: t.subContainer, as: "ul", children: c.map(
225
+ ({ title: q, url: v, icon: _, selectedIcon: b, tag: S, tagVariant: g = "success" }, p) => {
226
+ const x = typeof window < "u" && window.location.origin || "http://example.com", w = new URL(v, x), k = (!!l || h) && w.origin === x && w.pathname === (l || typeof window < "u" && window.location.pathname);
227
227
  return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
228
- o,
228
+ n,
229
229
  {
230
- href: h(w, p),
231
- className: _({
230
+ href: d(v, f),
231
+ className: C({
232
232
  [t.selectableIcon]: b,
233
233
  [t.selected]: k
234
234
  }),
235
235
  children: [
236
236
  /* @__PURE__ */ i("span", { className: t.icons, children: [
237
237
  /* @__PURE__ */ e("span", { className: t.selectedIcon, children: b }),
238
- /* @__PURE__ */ e("span", { className: t.icon, children: C })
238
+ /* @__PURE__ */ e("span", { className: t.icon, children: _ })
239
239
  ] }),
240
240
  /* @__PURE__ */ i("span", { className: t.subTitle, children: [
241
- N,
242
- q && /* @__PURE__ */ e(F, { variant: f, icon: !1 })
241
+ q,
242
+ S && /* @__PURE__ */ e(D, { variant: g, icon: !1 })
243
243
  ] })
244
244
  ]
245
245
  }
246
- ) }, u);
246
+ ) }, p);
247
247
  }
248
248
  ) }) });
249
249
  }
250
- function Ee({
250
+ function Ve({
251
251
  subItems: c,
252
- children: o,
253
- notifications: p = [],
252
+ children: n,
253
+ notifications: f = [],
254
254
  // TODO: Fetch these from the internets
255
- link: a = "a",
256
- host: l = "https://www.highcharts.com",
257
- pathname: N,
258
- topCssVariable: w
255
+ link: l = "a",
256
+ host: h = "https://www.highcharts.com",
257
+ pathname: q,
258
+ cssVariable: v
259
259
  }) {
260
- const C = M("(max-width: 374px)"), b = M("(max-width: 849px)"), q = M("(min-width: 850px) and (max-width: 999px)"), f = J(null), [u, x] = L(!1), [v, k] = L([]);
261
- T(() => {
262
- let r = window.scrollY, n = -82, s = n;
263
- w && document.documentElement.style.setProperty("--header-top", `${n}px`);
264
- const g = () => {
265
- const B = window.scrollY, S = B - r;
266
- n -= S, n < -82 ? n = -82 : n > 0 && (n = 0), f.current && n !== s && (f.current.style.top = `${n}px`, w && document.documentElement.style.setProperty(
267
- "--header-top",
268
- `${n}px`
269
- )), r = B, s = n;
260
+ const _ = M("(max-width: 374px)"), b = M("(max-width: 849px)"), S = M("(min-width: 850px) and (max-width: 999px)"), g = $(null), [p, x] = T(!1), [w, k] = T([]);
261
+ H(() => {
262
+ let o = window.scrollY;
263
+ const r = 82 + w.length * 48 + (c?.length ? 72 : 0), s = -(82 + w.length * 48);
264
+ let a = s, B = a;
265
+ g.current && (g.current.style.top = `${a}px`), v && document.documentElement.style.setProperty(
266
+ "--header-bottom",
267
+ `${r + a}px`
268
+ );
269
+ const N = () => {
270
+ const L = window.scrollY, J = L - o;
271
+ a -= J, a < s ? a = s : a > 0 && (a = 0), g.current && a !== B && (g.current.style.top = `${a}px`, v && document.documentElement.style.setProperty(
272
+ "--header-bottom",
273
+ `${r + a}px`
274
+ )), o = L, B = a;
270
275
  };
271
- return window.addEventListener("scroll", g), () => window.removeEventListener("scroll", g);
272
- }, [w]), T(() => {
273
- if (p.length) {
274
- const r = localStorage.getItem("notifications");
275
- if (r) {
276
- const n = JSON.parse(r);
276
+ return window.addEventListener("scroll", N), () => window.removeEventListener("scroll", N);
277
+ }, [v, w.length]), H(() => {
278
+ if (f.length) {
279
+ const o = localStorage.getItem("notifications");
280
+ if (o) {
281
+ const r = JSON.parse(o);
277
282
  k(
278
- p.filter(
279
- (s) => !s.id || !n.closed.includes(s.id)
283
+ f.filter(
284
+ (s) => !s.id || !r.closed.includes(s.id)
280
285
  )
281
286
  );
282
287
  } else
283
- k(p);
288
+ k(f);
284
289
  }
285
- }, [p]);
286
- const Q = (r) => {
287
- if (r.preventDefault(), !(r.nativeEvent instanceof KeyboardEvent) || r.nativeEvent.code === "Enter" || r.nativeEvent.code === "Space") {
288
- const n = document.querySelector("main");
289
- n && (n.scrollIntoView(), n.getAttribute("tabindex") !== "-1" && n.setAttribute("tabindex", "-1"), n.focus());
290
+ }, [f]);
291
+ const Q = (o) => {
292
+ if (o.preventDefault(), !(o.nativeEvent instanceof KeyboardEvent) || o.nativeEvent.code === "Enter" || o.nativeEvent.code === "Space") {
293
+ const r = document.querySelector("main");
294
+ r && (r.scrollIntoView(), r.getAttribute("tabindex") !== "-1" && r.setAttribute("tabindex", "-1"), r.focus());
290
295
  }
291
296
  }, y = () => {
292
- x(!u);
293
- }, z = (r) => {
294
- k(v.filter((s) => !s.id || s.id !== r));
295
- const n = localStorage.getItem("notifications");
296
- if (n) {
297
- const s = JSON.parse(n);
298
- s.closed.includes(r) || (s.closed.push(r), localStorage.setItem("notifications", JSON.stringify(s)));
297
+ x(!p);
298
+ }, A = (o) => {
299
+ k(w.filter((s) => !s.id || s.id !== o));
300
+ const r = localStorage.getItem("notifications");
301
+ if (r) {
302
+ const s = JSON.parse(r);
303
+ s.closed.includes(o) || (s.closed.push(o), localStorage.setItem("notifications", JSON.stringify(s)));
299
304
  } else
300
305
  localStorage.setItem(
301
306
  "notifications",
302
307
  JSON.stringify({
303
- closed: [r]
308
+ closed: [o]
304
309
  })
305
310
  );
306
311
  };
307
- return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ i("header", { className: t.header, ref: f, children: [
308
- v?.map(
309
- ({ id: r, title: n, description: s, variant: g, closable: B }, S) => /* @__PURE__ */ e(
310
- Y,
312
+ return /* @__PURE__ */ e(G, { children: /* @__PURE__ */ i("header", { className: t.header, ref: g, children: [
313
+ w?.map(
314
+ ({ id: o, title: r, description: s, variant: a, closable: B }, N) => /* @__PURE__ */ e(
315
+ K,
311
316
  {
312
317
  description: s,
313
- variant: g,
318
+ variant: a,
314
319
  closable: B,
315
- onClose: () => z(r),
316
- children: n
320
+ onClose: () => A(o),
321
+ children: r
317
322
  },
318
- S
323
+ N
319
324
  )
320
325
  ),
321
- /* @__PURE__ */ e("div", { className: _(t.main, t.outer), children: /* @__PURE__ */ i(V, { as: "nav", className: t.container, children: [
326
+ /* @__PURE__ */ e("div", { className: C(t.main, t.outer), children: /* @__PURE__ */ i(z, { as: "nav", className: t.container, children: [
322
327
  /* @__PURE__ */ e(
323
- d,
328
+ m,
324
329
  {
325
330
  as: "a",
326
331
  className: t.skip,
@@ -332,182 +337,182 @@ function Ee({
332
337
  }
333
338
  ),
334
339
  /* @__PURE__ */ e(
335
- a,
340
+ l,
336
341
  {
337
342
  className: t.logo,
338
- href: h("https://www.highcharts.com/", l),
339
- children: /* @__PURE__ */ e(H, { showText: !q && !C })
343
+ href: d("https://www.highcharts.com/", h),
344
+ children: /* @__PURE__ */ e(I, { showText: !S && !_ })
340
345
  }
341
346
  ),
342
- /* @__PURE__ */ e("ul", { className: t.links, children: O.map(({ title: r, url: n }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
343
- d,
347
+ /* @__PURE__ */ e("ul", { className: t.links, children: V.map(({ title: o, url: r }, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
348
+ m,
344
349
  {
345
350
  variant: "plain",
346
351
  size: 300,
347
- as: a,
348
- href: h(n, l),
349
- children: r
352
+ as: l,
353
+ href: d(r, h),
354
+ children: o
350
355
  }
351
356
  ) }, s)) }),
352
357
  /* @__PURE__ */ i("div", { className: t.buttons, children: [
353
358
  /* @__PURE__ */ i(
354
- d,
359
+ m,
355
360
  {
356
361
  variant: "transparent",
357
- as: a,
358
- href: h(
362
+ as: l,
363
+ href: d(
359
364
  "https://www.highcharts.com/chat/gpt/",
360
- l
365
+ h
361
366
  ),
362
367
  children: [
363
368
  /* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
364
- /* @__PURE__ */ e(j, {})
369
+ /* @__PURE__ */ e(P, {})
365
370
  ]
366
371
  }
367
372
  ),
368
- /* @__PURE__ */ e(I, {}),
369
373
  /* @__PURE__ */ e(W, {}),
374
+ /* @__PURE__ */ e(j, {}),
370
375
  /* @__PURE__ */ e(
371
- d,
376
+ m,
372
377
  {
373
378
  variant: "brand",
374
- as: a,
375
- href: h("https://shop.highcharts.com/account", l),
379
+ as: l,
380
+ href: d("https://shop.highcharts.com/account", h),
376
381
  "aria-label": "Login",
377
- children: /* @__PURE__ */ e(E, {})
382
+ children: /* @__PURE__ */ e(O, {})
378
383
  }
379
384
  ),
380
385
  /* @__PURE__ */ i(
381
- d,
386
+ m,
382
387
  {
383
388
  variant: "success",
384
- as: a,
385
- href: h(
389
+ as: l,
390
+ href: d(
386
391
  "https://www.highcharts.com/download/",
387
- l
392
+ h
388
393
  ),
389
394
  children: [
390
- /* @__PURE__ */ e(P, {}),
395
+ /* @__PURE__ */ e(E, {}),
391
396
  "Get started"
392
397
  ]
393
398
  }
394
399
  ),
395
400
  /* @__PURE__ */ i(
396
- d,
401
+ m,
397
402
  {
398
- variant: u ? "white" : "transparent",
403
+ variant: p ? "white" : "transparent",
399
404
  className: t.menu,
400
405
  onClick: y,
401
406
  children: [
402
- u ? "Close" : "Menu",
403
- u ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(Z, {})
407
+ p ? "Close" : "Menu",
408
+ p ? /* @__PURE__ */ e(Y, {}) : /* @__PURE__ */ e(te, {})
404
409
  ]
405
410
  }
406
411
  )
407
412
  ] })
408
413
  ] }) }),
409
414
  !!c?.length && /* @__PURE__ */ e(
410
- xe,
415
+ Ne,
411
416
  {
412
417
  items: c,
413
- link: a,
414
- host: l,
415
- pathname: N
418
+ link: l,
419
+ host: h,
420
+ pathname: q
416
421
  }
417
422
  ),
418
- o,
419
- b && /* @__PURE__ */ i(A, { children: [
423
+ n,
424
+ b && /* @__PURE__ */ i(U, { children: [
420
425
  /* @__PURE__ */ e(
421
426
  "div",
422
427
  {
423
- className: _(t.mobileOverlay, { [t.open]: u }),
428
+ className: C(t.mobileOverlay, { [t.open]: p }),
424
429
  onClick: y
425
430
  }
426
431
  ),
427
432
  /* @__PURE__ */ i(
428
433
  "nav",
429
434
  {
430
- className: _(t.mobile, {
431
- [t.open]: u
435
+ className: C(t.mobile, {
436
+ [t.open]: p
432
437
  }),
433
438
  children: [
434
439
  /* @__PURE__ */ i("div", { className: t.container, children: [
435
440
  /* @__PURE__ */ e(
436
- a,
441
+ l,
437
442
  {
438
443
  className: t.logo,
439
- href: h("https://www.highcharts.com/", l),
440
- children: /* @__PURE__ */ e(H, { showText: !C })
444
+ href: d("https://www.highcharts.com/", h),
445
+ children: /* @__PURE__ */ e(I, { showText: !_ })
441
446
  }
442
447
  ),
443
448
  /* @__PURE__ */ i("div", { className: t.buttons, children: [
444
449
  /* @__PURE__ */ i(
445
- d,
450
+ m,
446
451
  {
447
452
  variant: "transparent",
448
- as: a,
449
- href: h(
453
+ as: l,
454
+ href: d(
450
455
  "https://www.highcharts.com/chat/gpt/",
451
- l
456
+ h
452
457
  ),
453
458
  children: [
454
459
  /* @__PURE__ */ e("span", { className: t.gpt, children: "Highcharts GPT" }),
455
- /* @__PURE__ */ e(j, {})
460
+ /* @__PURE__ */ e(P, {})
456
461
  ]
457
462
  }
458
463
  ),
459
- /* @__PURE__ */ e(I, {}),
460
- /* @__PURE__ */ e(W, {})
464
+ /* @__PURE__ */ e(W, {}),
465
+ /* @__PURE__ */ e(j, {})
461
466
  ] })
462
467
  ] }),
463
468
  /* @__PURE__ */ i("div", { className: t.buttons, children: [
464
469
  /* @__PURE__ */ i(
465
- d,
470
+ m,
466
471
  {
467
472
  variant: "brand",
468
473
  fullWidth: !0,
469
- as: a,
470
- href: h(
474
+ as: l,
475
+ href: d(
471
476
  "https://shop.highcharts.com/account",
472
- l
477
+ h
473
478
  ),
474
479
  children: [
475
- /* @__PURE__ */ e(E, {}),
480
+ /* @__PURE__ */ e(O, {}),
476
481
  "Login"
477
482
  ]
478
483
  }
479
484
  ),
480
485
  /* @__PURE__ */ i(
481
- d,
486
+ m,
482
487
  {
483
488
  variant: "success",
484
489
  fullWidth: !0,
485
- as: a,
486
- href: h(
490
+ as: l,
491
+ href: d(
487
492
  "https://www.highcharts.com/download/",
488
- l
493
+ h
489
494
  ),
490
495
  children: [
491
- /* @__PURE__ */ e(P, {}),
496
+ /* @__PURE__ */ e(E, {}),
492
497
  "Get started"
493
498
  ]
494
499
  }
495
500
  )
496
501
  ] }),
497
- /* @__PURE__ */ e("ul", { className: t.links, children: O.map(({ title: r, url: n, icon: s }, g) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
498
- d,
502
+ /* @__PURE__ */ e("ul", { className: t.links, children: V.map(({ title: o, url: r, icon: s }, a) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
503
+ m,
499
504
  {
500
505
  variant: "plain",
501
506
  size: 500,
502
507
  fullWidth: !0,
503
- as: a,
504
- href: h(n, l),
508
+ as: l,
509
+ href: d(r, h),
505
510
  children: [
506
511
  s,
507
- r
512
+ o
508
513
  ]
509
514
  }
510
- ) }, g)) })
515
+ ) }, a)) })
511
516
  ]
512
517
  }
513
518
  )
@@ -515,6 +520,6 @@ function Ee({
515
520
  ] }) });
516
521
  }
517
522
  export {
518
- Ee as Header,
519
- xe as SubHeader
523
+ Ve as Header,
524
+ Ne as SubHeader
520
525
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "highsoft-ui",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "description": "Highsoft UI",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",