highsoft-ui 1.0.77 → 1.0.79

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.
@@ -0,0 +1,23 @@
1
+ import { _ as t } from "./extends-hS2Bh-Yp.js";
2
+ import "react";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ var h = function(o) {
5
+ return /* @__PURE__ */ r("svg", t({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: 24,
8
+ height: 24,
9
+ fill: "none",
10
+ viewBox: "0 0 24 24"
11
+ }, o, {
12
+ children: /* @__PURE__ */ r("path", {
13
+ stroke: "currentColor",
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ strokeWidth: 2,
17
+ d: "M20 6 9 17l-5-5"
18
+ })
19
+ }));
20
+ };
21
+ export {
22
+ h as C
23
+ };
@@ -0,0 +1,310 @@
1
+ import { jsx as a, jsxs as f, Fragment as G } from "react/jsx-runtime";
2
+ import * as c from "react";
3
+ import { useState as q, useRef as H, useEffect as E } from "react";
4
+ import { X as V } from "./XClose-CCu1vrNS.js";
5
+ import { Button as X } from "./components/Button/index.js";
6
+ import { d as K, c as Y, e as y, a as x, P as _, f as g, g as D, h as Z, R as z, j as Q, i as ee, k as oe, F as te, D as ne, l as se } from "./index-DdHkr4BN.js";
7
+ var m = "Dialog", [O] = Y(m), [re, d] = O(m), U = (e) => {
8
+ const {
9
+ __scopeDialog: o,
10
+ children: s,
11
+ open: t,
12
+ defaultOpen: r,
13
+ onOpenChange: n,
14
+ modal: l = !0
15
+ } = e, i = c.useRef(null), p = c.useRef(null), [C, v] = K({
16
+ prop: t,
17
+ defaultProp: r ?? !1,
18
+ onChange: n,
19
+ caller: m
20
+ });
21
+ return /* @__PURE__ */ a(
22
+ re,
23
+ {
24
+ scope: o,
25
+ triggerRef: i,
26
+ contentRef: p,
27
+ contentId: y(),
28
+ titleId: y(),
29
+ descriptionId: y(),
30
+ open: C,
31
+ onOpenChange: v,
32
+ onOpenToggle: c.useCallback(() => v((J) => !J), [v]),
33
+ modal: l,
34
+ children: s
35
+ }
36
+ );
37
+ };
38
+ U.displayName = m;
39
+ var N = "DialogTrigger", I = c.forwardRef(
40
+ (e, o) => {
41
+ const { __scopeDialog: s, ...t } = e, r = d(N, s), n = x(o, r.triggerRef);
42
+ return /* @__PURE__ */ a(
43
+ _.button,
44
+ {
45
+ type: "button",
46
+ "aria-haspopup": "dialog",
47
+ "aria-expanded": r.open,
48
+ "aria-controls": r.contentId,
49
+ "data-state": R(r.open),
50
+ ...t,
51
+ ref: n,
52
+ onClick: g(e.onClick, r.onOpenToggle)
53
+ }
54
+ );
55
+ }
56
+ );
57
+ I.displayName = N;
58
+ var b = "DialogPortal", [ae, k] = O(b, {
59
+ forceMount: void 0
60
+ }), A = (e) => {
61
+ const { __scopeDialog: o, forceMount: s, children: t, container: r } = e, n = d(b, o);
62
+ return /* @__PURE__ */ a(ae, { scope: o, forceMount: s, children: c.Children.map(t, (l) => /* @__PURE__ */ a(D, { present: s || n.open, children: /* @__PURE__ */ a(Z, { asChild: !0, container: r, children: l }) })) });
63
+ };
64
+ A.displayName = b;
65
+ var h = "DialogOverlay", M = c.forwardRef(
66
+ (e, o) => {
67
+ const s = k(h, e.__scopeDialog), { forceMount: t = s.forceMount, ...r } = e, n = d(h, e.__scopeDialog);
68
+ return n.modal ? /* @__PURE__ */ a(D, { present: t || n.open, children: /* @__PURE__ */ a(ie, { ...r, ref: o }) }) : null;
69
+ }
70
+ );
71
+ M.displayName = h;
72
+ var ce = Q("DialogOverlay.RemoveScroll"), ie = c.forwardRef(
73
+ (e, o) => {
74
+ const { __scopeDialog: s, ...t } = e, r = d(h, s);
75
+ return (
76
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
77
+ // ie. when `Overlay` and `Content` are siblings
78
+ /* @__PURE__ */ a(z, { as: ce, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ a(
79
+ _.div,
80
+ {
81
+ "data-state": R(r.open),
82
+ ...t,
83
+ ref: o,
84
+ style: { pointerEvents: "auto", ...t.style }
85
+ }
86
+ ) })
87
+ );
88
+ }
89
+ ), u = "DialogContent", T = c.forwardRef(
90
+ (e, o) => {
91
+ const s = k(u, e.__scopeDialog), { forceMount: t = s.forceMount, ...r } = e, n = d(u, e.__scopeDialog);
92
+ return /* @__PURE__ */ a(D, { present: t || n.open, children: n.modal ? /* @__PURE__ */ a(le, { ...r, ref: o }) : /* @__PURE__ */ a(de, { ...r, ref: o }) });
93
+ }
94
+ );
95
+ T.displayName = u;
96
+ var le = c.forwardRef(
97
+ (e, o) => {
98
+ const s = d(u, e.__scopeDialog), t = c.useRef(null), r = x(o, s.contentRef, t);
99
+ return c.useEffect(() => {
100
+ const n = t.current;
101
+ if (n) return ee(n);
102
+ }, []), /* @__PURE__ */ a(
103
+ S,
104
+ {
105
+ ...e,
106
+ ref: r,
107
+ trapFocus: s.open,
108
+ disableOutsidePointerEvents: !0,
109
+ onCloseAutoFocus: g(e.onCloseAutoFocus, (n) => {
110
+ n.preventDefault(), s.triggerRef.current?.focus();
111
+ }),
112
+ onPointerDownOutside: g(e.onPointerDownOutside, (n) => {
113
+ const l = n.detail.originalEvent, i = l.button === 0 && l.ctrlKey === !0;
114
+ (l.button === 2 || i) && n.preventDefault();
115
+ }),
116
+ onFocusOutside: g(
117
+ e.onFocusOutside,
118
+ (n) => n.preventDefault()
119
+ )
120
+ }
121
+ );
122
+ }
123
+ ), de = c.forwardRef(
124
+ (e, o) => {
125
+ const s = d(u, e.__scopeDialog), t = c.useRef(!1), r = c.useRef(!1);
126
+ return /* @__PURE__ */ a(
127
+ S,
128
+ {
129
+ ...e,
130
+ ref: o,
131
+ trapFocus: !1,
132
+ disableOutsidePointerEvents: !1,
133
+ onCloseAutoFocus: (n) => {
134
+ e.onCloseAutoFocus?.(n), n.defaultPrevented || (t.current || s.triggerRef.current?.focus(), n.preventDefault()), t.current = !1, r.current = !1;
135
+ },
136
+ onInteractOutside: (n) => {
137
+ e.onInteractOutside?.(n), n.defaultPrevented || (t.current = !0, n.detail.originalEvent.type === "pointerdown" && (r.current = !0));
138
+ const l = n.target;
139
+ s.triggerRef.current?.contains(l) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && r.current && n.preventDefault();
140
+ }
141
+ }
142
+ );
143
+ }
144
+ ), S = c.forwardRef(
145
+ (e, o) => {
146
+ const { __scopeDialog: s, trapFocus: t, onOpenAutoFocus: r, onCloseAutoFocus: n, ...l } = e, i = d(u, s), p = c.useRef(null), C = x(o, p);
147
+ return oe(), /* @__PURE__ */ f(G, { children: [
148
+ /* @__PURE__ */ a(
149
+ te,
150
+ {
151
+ asChild: !0,
152
+ loop: !0,
153
+ trapped: t,
154
+ onMountAutoFocus: r,
155
+ onUnmountAutoFocus: n,
156
+ children: /* @__PURE__ */ a(
157
+ ne,
158
+ {
159
+ role: "dialog",
160
+ id: i.contentId,
161
+ "aria-describedby": i.descriptionId,
162
+ "aria-labelledby": i.titleId,
163
+ "data-state": R(i.open),
164
+ ...l,
165
+ ref: C,
166
+ onDismiss: () => i.onOpenChange(!1)
167
+ }
168
+ )
169
+ }
170
+ ),
171
+ /* @__PURE__ */ f(G, { children: [
172
+ /* @__PURE__ */ a(fe, { titleId: i.titleId }),
173
+ /* @__PURE__ */ a(ge, { contentRef: p, descriptionId: i.descriptionId })
174
+ ] })
175
+ ] });
176
+ }
177
+ ), P = "DialogTitle", F = c.forwardRef(
178
+ (e, o) => {
179
+ const { __scopeDialog: s, ...t } = e, r = d(P, s);
180
+ return /* @__PURE__ */ a(_.h2, { id: r.titleId, ...t, ref: o });
181
+ }
182
+ );
183
+ F.displayName = P;
184
+ var L = "DialogDescription", ue = c.forwardRef(
185
+ (e, o) => {
186
+ const { __scopeDialog: s, ...t } = e, r = d(L, s);
187
+ return /* @__PURE__ */ a(_.p, { id: r.descriptionId, ...t, ref: o });
188
+ }
189
+ );
190
+ ue.displayName = L;
191
+ var W = "DialogClose", B = c.forwardRef(
192
+ (e, o) => {
193
+ const { __scopeDialog: s, ...t } = e, r = d(W, s);
194
+ return /* @__PURE__ */ a(
195
+ _.button,
196
+ {
197
+ type: "button",
198
+ ...t,
199
+ ref: o,
200
+ onClick: g(e.onClick, () => r.onOpenChange(!1))
201
+ }
202
+ );
203
+ }
204
+ );
205
+ B.displayName = W;
206
+ function R(e) {
207
+ return e ? "open" : "closed";
208
+ }
209
+ var $ = "DialogTitleWarning", [lo, j] = se($, {
210
+ contentName: u,
211
+ titleName: P,
212
+ docsSlug: "dialog"
213
+ }), fe = ({ titleId: e }) => {
214
+ const o = j($), s = `\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
215
+
216
+ If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
217
+
218
+ For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;
219
+ return c.useEffect(() => {
220
+ e && (document.getElementById(e) || console.error(s));
221
+ }, [s, e]), null;
222
+ }, pe = "DialogDescriptionWarning", ge = ({ contentRef: e, descriptionId: o }) => {
223
+ const t = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(pe).contentName}}.`;
224
+ return c.useEffect(() => {
225
+ const r = e.current?.getAttribute("aria-describedby");
226
+ o && r && (document.getElementById(o) || console.warn(t));
227
+ }, [t, e, o]), null;
228
+ }, _e = U, he = I, me = A, Ce = M, ve = T, ye = F, we = B;
229
+ const xe = "wUsx_G_bottom", De = "wUsx_G_bottomLinks", be = "wUsx_G_cookiePolicy", Pe = "wUsx_G_cookiePolicyClose", Re = "wUsx_G_copyright", Ge = "wUsx_G_discord", Ee = "wUsx_G_discordAvatars", Oe = "wUsx_G_discordAvatarStatus", Ue = "wUsx_G_discordContent", Ne = "wUsx_G_discordJoin", Ie = "wUsx_G_discordMembers", ke = "wUsx_G_discordPlus", Ae = "wUsx_G_error", Me = "wUsx_G_footer", Te = "wUsx_G_help", Se = "wUsx_G_helpBall", Fe = "wUsx_G_helpContent", Le = "wUsx_G_helpItem", We = "wUsx_G_helpWays", Be = "wUsx_G_highcharts", $e = "wUsx_G_links", je = "wUsx_G_logo", Je = "wUsx_G_newsletter", qe = "wUsx_G_newsletterContent", He = "wUsx_G_newsletterError", Ve = "wUsx_G_norway", Xe = "wUsx_G_notCharts", Ke = "wUsx_G_online", Ye = "wUsx_G_socials", Ze = "wUsx_G_success", ze = "wUsx_G_tabletBottomLeft", Qe = "wUsx_G_tagged", eo = "wUsx_G_top", oo = "wUsx_G_youtube", to = "wUsx_G_youtubeContent", no = "wUsx_G_youtubeOverlay", w = {
230
+ bottom: xe,
231
+ bottomLinks: De,
232
+ cookiePolicy: be,
233
+ cookiePolicyClose: Pe,
234
+ copyright: Re,
235
+ discord: Ge,
236
+ discordAvatars: Ee,
237
+ discordAvatarStatus: Oe,
238
+ discordContent: Ue,
239
+ discordJoin: Ne,
240
+ discordMembers: Ie,
241
+ discordPlus: ke,
242
+ error: Ae,
243
+ footer: Me,
244
+ help: Te,
245
+ helpBall: Se,
246
+ helpContent: Fe,
247
+ helpItem: Le,
248
+ helpWays: We,
249
+ highcharts: Be,
250
+ links: $e,
251
+ logo: je,
252
+ newsletter: Je,
253
+ newsletterContent: qe,
254
+ newsletterError: He,
255
+ norway: Ve,
256
+ notCharts: Xe,
257
+ online: Ke,
258
+ socials: Ye,
259
+ success: Ze,
260
+ tabletBottomLeft: ze,
261
+ tagged: Qe,
262
+ top: eo,
263
+ youtube: oo,
264
+ youtubeContent: to,
265
+ youtubeOverlay: no
266
+ };
267
+ function uo() {
268
+ const [e, o] = q(!1), s = H(null);
269
+ return E(() => {
270
+ const t = () => o(!0);
271
+ return document.addEventListener("hcCookiePolicy", t), () => document.removeEventListener("hcCookiePolicy", t);
272
+ }, []), E(() => {
273
+ queueMicrotask(() => {
274
+ if (e && s.current) {
275
+ const t = document.createElement("script");
276
+ t.src = "https://consent.cookiebot.com/8be0770c-8b7f-4e2d-aeb5-2cfded81e177/cd.js", s.current.appendChild(t);
277
+ }
278
+ });
279
+ }, [e]), /* @__PURE__ */ f(_e, { open: e, onOpenChange: o, children: [
280
+ /* @__PURE__ */ a(he, { asChild: !0, children: /* @__PURE__ */ a("button", { id: "cookiePolicyModal", children: "Cookie Policy" }) }),
281
+ /* @__PURE__ */ f(me, { children: [
282
+ /* @__PURE__ */ a(Ce, { className: w.youtubeOverlay }),
283
+ /* @__PURE__ */ f(
284
+ ve,
285
+ {
286
+ className: w.cookiePolicy,
287
+ "aria-describedby": void 0,
288
+ children: [
289
+ /* @__PURE__ */ a(we, { asChild: !0, children: /* @__PURE__ */ f(X, { className: w.cookiePolicyClose, children: [
290
+ "Close",
291
+ /* @__PURE__ */ a(V, {})
292
+ ] }) }),
293
+ /* @__PURE__ */ a(ye, { id: "cookiePolicyModalLabel", children: "Cookie Policy" }),
294
+ /* @__PURE__ */ a("div", { ref: s })
295
+ ]
296
+ }
297
+ )
298
+ ] })
299
+ ] });
300
+ }
301
+ export {
302
+ uo as C,
303
+ Ce as O,
304
+ me as P,
305
+ _e as R,
306
+ he as T,
307
+ ve as a,
308
+ ye as b,
309
+ w as s
310
+ };
@@ -0,0 +1,23 @@
1
+ import { _ as t } from "./extends-hS2Bh-Yp.js";
2
+ import "react";
3
+ import { jsx as o } from "react/jsx-runtime";
4
+ var l = function(r) {
5
+ return /* @__PURE__ */ o("svg", t({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: 24,
8
+ height: 24,
9
+ fill: "none",
10
+ viewBox: "0 0 24 24"
11
+ }, r, {
12
+ children: /* @__PURE__ */ o("path", {
13
+ stroke: "currentColor",
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ strokeWidth: 2,
17
+ d: "M18 6 6 18M6 6l12 12"
18
+ })
19
+ }));
20
+ };
21
+ export {
22
+ l as X
23
+ };
@@ -0,0 +1 @@
1
+ export default function CookiePolicy(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../../XClose-CCu1vrNS.js";
4
+ import "../Button/index.js";
5
+ import { C as a } from "../../CookiePolicyModal-B0UcoKfp.js";
6
+ export {
7
+ a as default
8
+ };