highsoft-ui 1.0.111 → 1.0.113
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.
- package/dist/Button-Bbc4vmW_.js +45 -0
- package/dist/Container-LAkF4ShX.js +11 -0
- package/dist/CookiePolicyModal-BH2uHybE.js +90 -0
- package/dist/Footer-DY0QJnxb.js +783 -0
- package/dist/GPTInput-DRFGKJ2u.js +66 -0
- package/dist/Header-DbSqXuvO.js +383 -0
- package/dist/Logo-CZ5LYqub.js +194 -0
- package/dist/NewTag-C-3mRyvV.js +26 -0
- package/dist/Notification-_vWBqFiA.js +96 -0
- package/dist/PrefPanel-DmiRZs1n.js +1548 -0
- package/dist/Search-D_fsZ-hm.js +4673 -0
- package/dist/clsx-ROFf4vs9.js +16 -0
- package/dist/components/Button/index.js +2 -81
- package/dist/components/Container/index.js +2 -11
- package/dist/components/Footer/CookiePolicyModal.js +2 -9
- package/dist/components/Footer/index.js +2 -833
- package/dist/components/GPTInput/index.js +2 -86
- package/dist/components/Header/index.js +2 -611
- package/dist/components/Logo/index.js +2 -255
- package/dist/components/NewTag/index.js +2 -54
- package/dist/components/Notification/index.js +2 -100
- package/dist/components/PrefPanel/index.js +2 -1945
- package/dist/components/Search/index.js +2 -9
- package/dist/components/ThemeLoader/index.js +6 -34
- package/dist/components/icons/Bubble.js +37 -52
- package/dist/components/icons/MadeInNorway.js +110 -145
- package/dist/components/icons/Plane.js +17 -23
- package/dist/dist-0f0-S8_q.js +211 -0
- package/dist/dist-CjrKJb_1.js +27 -0
- package/dist/es2015-CzBBLWyD.js +1140 -0
- package/dist/esm-C1TDRARf.js +479 -0
- package/dist/highsoft-ui.css +2 -1
- package/dist/main.js +12 -28
- package/dist/php-client.js +9 -9
- package/dist/php.js +10 -16
- package/dist/utils-C4QGLbxr.js +162 -0
- package/dist/utils.js +2 -11
- package/package.json +14 -8
- package/dist/Announcement03-obPaH4LK.js +0 -23
- package/dist/Check-Cm4roSEj.js +0 -23
- package/dist/CookiePolicyModal-C5FOuvB-.js +0 -82
- package/dist/XClose-CCu1vrNS.js +0 -23
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/extends-hS2Bh-Yp.js +0 -12
- package/dist/index-CUCGgBGk.js +0 -5654
- package/dist/index-CYz8LhDn.js +0 -1110
- package/dist/index-DThcOQDt.js +0 -234
- package/dist/index-hYJmp-0x.js +0 -30
- package/dist/utils-BKDJp1i0.js +0 -140
- /package/dist/{components → lib/components}/Button/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Container/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Footer/CookiePolicyModal.d.ts +0 -0
- /package/dist/{components → lib/components}/Footer/index.d.ts +0 -0
- /package/dist/{components → lib/components}/GPTInput/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Header/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Logo/index.d.ts +0 -0
- /package/dist/{components → lib/components}/NewTag/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Notification/index.d.ts +0 -0
- /package/dist/{components → lib/components}/PrefPanel/index.d.ts +0 -0
- /package/dist/{components → lib/components}/Search/index.d.ts +0 -0
- /package/dist/{components → lib/components}/ThemeLoader/index.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/Bubble.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/MadeInNorway.d.ts +0 -0
- /package/dist/{components → lib/components}/icons/Plane.d.ts +0 -0
- /package/dist/{main.d.ts → lib/main.d.ts} +0 -0
- /package/dist/{php-client.d.ts → lib/php-client.d.ts} +0 -0
- /package/dist/{php.d.ts → lib/php.d.ts} +0 -0
- /package/dist/{utils.d.ts → lib/utils.d.ts} +0 -0
package/dist/index-DThcOQDt.js
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { e as H, b as R, u as _, P as p, d as g, g as h, i as V, R as q, j as K, c as U, a as Y, k as Z, F as z, D as J, l as Q } from "./index-CYz8LhDn.js";
|
|
3
|
-
import { jsx as s, jsxs as N, Fragment as O } from "react/jsx-runtime";
|
|
4
|
-
var v = "Dialog", [I] = U(v), [X, u] = I(v), x = (e) => {
|
|
5
|
-
const {
|
|
6
|
-
__scopeDialog: o,
|
|
7
|
-
children: r,
|
|
8
|
-
open: a,
|
|
9
|
-
defaultOpen: n,
|
|
10
|
-
onOpenChange: t,
|
|
11
|
-
modal: l = !0
|
|
12
|
-
} = e, c = i.useRef(null), f = i.useRef(null), [m, C] = H({
|
|
13
|
-
prop: a,
|
|
14
|
-
defaultProp: n ?? !1,
|
|
15
|
-
onChange: t,
|
|
16
|
-
caller: v
|
|
17
|
-
});
|
|
18
|
-
return /* @__PURE__ */ s(
|
|
19
|
-
X,
|
|
20
|
-
{
|
|
21
|
-
scope: o,
|
|
22
|
-
triggerRef: c,
|
|
23
|
-
contentRef: f,
|
|
24
|
-
contentId: R(),
|
|
25
|
-
titleId: R(),
|
|
26
|
-
descriptionId: R(),
|
|
27
|
-
open: m,
|
|
28
|
-
onOpenChange: C,
|
|
29
|
-
onOpenToggle: i.useCallback(() => C((B) => !B), [C]),
|
|
30
|
-
modal: l,
|
|
31
|
-
children: r
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
x.displayName = v;
|
|
36
|
-
var A = "DialogTrigger", T = i.forwardRef(
|
|
37
|
-
(e, o) => {
|
|
38
|
-
const { __scopeDialog: r, ...a } = e, n = u(A, r), t = _(o, n.triggerRef);
|
|
39
|
-
return /* @__PURE__ */ s(
|
|
40
|
-
p.button,
|
|
41
|
-
{
|
|
42
|
-
type: "button",
|
|
43
|
-
"aria-haspopup": "dialog",
|
|
44
|
-
"aria-expanded": n.open,
|
|
45
|
-
"aria-controls": n.contentId,
|
|
46
|
-
"data-state": y(n.open),
|
|
47
|
-
...a,
|
|
48
|
-
ref: t,
|
|
49
|
-
onClick: g(e.onClick, n.onOpenToggle)
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
T.displayName = A;
|
|
55
|
-
var E = "DialogPortal", [ee, b] = I(E, {
|
|
56
|
-
forceMount: void 0
|
|
57
|
-
}), M = (e) => {
|
|
58
|
-
const { __scopeDialog: o, forceMount: r, children: a, container: n } = e, t = u(E, o);
|
|
59
|
-
return /* @__PURE__ */ s(ee, { scope: o, forceMount: r, children: i.Children.map(a, (l) => /* @__PURE__ */ s(h, { present: r || t.open, children: /* @__PURE__ */ s(V, { asChild: !0, container: n, children: l }) })) });
|
|
60
|
-
};
|
|
61
|
-
M.displayName = E;
|
|
62
|
-
var D = "DialogOverlay", w = i.forwardRef(
|
|
63
|
-
(e, o) => {
|
|
64
|
-
const r = b(D, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(D, e.__scopeDialog);
|
|
65
|
-
return t.modal ? /* @__PURE__ */ s(h, { present: a || t.open, children: /* @__PURE__ */ s(oe, { ...n, ref: o }) }) : null;
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
w.displayName = D;
|
|
69
|
-
var te = Y("DialogOverlay.RemoveScroll"), oe = i.forwardRef(
|
|
70
|
-
(e, o) => {
|
|
71
|
-
const { __scopeDialog: r, ...a } = e, n = u(D, r);
|
|
72
|
-
return (
|
|
73
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
74
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
75
|
-
/* @__PURE__ */ s(q, { as: te, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ s(
|
|
76
|
-
p.div,
|
|
77
|
-
{
|
|
78
|
-
"data-state": y(n.open),
|
|
79
|
-
...a,
|
|
80
|
-
ref: o,
|
|
81
|
-
style: { pointerEvents: "auto", ...a.style }
|
|
82
|
-
}
|
|
83
|
-
) })
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
), d = "DialogContent", F = i.forwardRef(
|
|
87
|
-
(e, o) => {
|
|
88
|
-
const r = b(d, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(d, e.__scopeDialog);
|
|
89
|
-
return /* @__PURE__ */ s(h, { present: a || t.open, children: t.modal ? /* @__PURE__ */ s(ne, { ...n, ref: o }) : /* @__PURE__ */ s(re, { ...n, ref: o }) });
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
F.displayName = d;
|
|
93
|
-
var ne = i.forwardRef(
|
|
94
|
-
(e, o) => {
|
|
95
|
-
const r = u(d, e.__scopeDialog), a = i.useRef(null), n = _(o, r.contentRef, a);
|
|
96
|
-
return i.useEffect(() => {
|
|
97
|
-
const t = a.current;
|
|
98
|
-
if (t) return K(t);
|
|
99
|
-
}, []), /* @__PURE__ */ s(
|
|
100
|
-
S,
|
|
101
|
-
{
|
|
102
|
-
...e,
|
|
103
|
-
ref: n,
|
|
104
|
-
trapFocus: r.open,
|
|
105
|
-
disableOutsidePointerEvents: !0,
|
|
106
|
-
onCloseAutoFocus: g(e.onCloseAutoFocus, (t) => {
|
|
107
|
-
t.preventDefault(), r.triggerRef.current?.focus();
|
|
108
|
-
}),
|
|
109
|
-
onPointerDownOutside: g(e.onPointerDownOutside, (t) => {
|
|
110
|
-
const l = t.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
111
|
-
(l.button === 2 || c) && t.preventDefault();
|
|
112
|
-
}),
|
|
113
|
-
onFocusOutside: g(
|
|
114
|
-
e.onFocusOutside,
|
|
115
|
-
(t) => t.preventDefault()
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
), re = i.forwardRef(
|
|
121
|
-
(e, o) => {
|
|
122
|
-
const r = u(d, e.__scopeDialog), a = i.useRef(!1), n = i.useRef(!1);
|
|
123
|
-
return /* @__PURE__ */ s(
|
|
124
|
-
S,
|
|
125
|
-
{
|
|
126
|
-
...e,
|
|
127
|
-
ref: o,
|
|
128
|
-
trapFocus: !1,
|
|
129
|
-
disableOutsidePointerEvents: !1,
|
|
130
|
-
onCloseAutoFocus: (t) => {
|
|
131
|
-
e.onCloseAutoFocus?.(t), t.defaultPrevented || (a.current || r.triggerRef.current?.focus(), t.preventDefault()), a.current = !1, n.current = !1;
|
|
132
|
-
},
|
|
133
|
-
onInteractOutside: (t) => {
|
|
134
|
-
e.onInteractOutside?.(t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (n.current = !0));
|
|
135
|
-
const l = t.target;
|
|
136
|
-
r.triggerRef.current?.contains(l) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && n.current && t.preventDefault();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
), S = i.forwardRef(
|
|
142
|
-
(e, o) => {
|
|
143
|
-
const { __scopeDialog: r, trapFocus: a, onOpenAutoFocus: n, onCloseAutoFocus: t, ...l } = e, c = u(d, r), f = i.useRef(null), m = _(o, f);
|
|
144
|
-
return Z(), /* @__PURE__ */ N(O, { children: [
|
|
145
|
-
/* @__PURE__ */ s(
|
|
146
|
-
z,
|
|
147
|
-
{
|
|
148
|
-
asChild: !0,
|
|
149
|
-
loop: !0,
|
|
150
|
-
trapped: a,
|
|
151
|
-
onMountAutoFocus: n,
|
|
152
|
-
onUnmountAutoFocus: t,
|
|
153
|
-
children: /* @__PURE__ */ s(
|
|
154
|
-
J,
|
|
155
|
-
{
|
|
156
|
-
role: "dialog",
|
|
157
|
-
id: c.contentId,
|
|
158
|
-
"aria-describedby": c.descriptionId,
|
|
159
|
-
"aria-labelledby": c.titleId,
|
|
160
|
-
"data-state": y(c.open),
|
|
161
|
-
...l,
|
|
162
|
-
ref: m,
|
|
163
|
-
onDismiss: () => c.onOpenChange(!1)
|
|
164
|
-
}
|
|
165
|
-
)
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
/* @__PURE__ */ N(O, { children: [
|
|
169
|
-
/* @__PURE__ */ s(se, { titleId: c.titleId }),
|
|
170
|
-
/* @__PURE__ */ s(ce, { contentRef: f, descriptionId: c.descriptionId })
|
|
171
|
-
] })
|
|
172
|
-
] });
|
|
173
|
-
}
|
|
174
|
-
), P = "DialogTitle", W = i.forwardRef(
|
|
175
|
-
(e, o) => {
|
|
176
|
-
const { __scopeDialog: r, ...a } = e, n = u(P, r);
|
|
177
|
-
return /* @__PURE__ */ s(p.h2, { id: n.titleId, ...a, ref: o });
|
|
178
|
-
}
|
|
179
|
-
);
|
|
180
|
-
W.displayName = P;
|
|
181
|
-
var k = "DialogDescription", ae = i.forwardRef(
|
|
182
|
-
(e, o) => {
|
|
183
|
-
const { __scopeDialog: r, ...a } = e, n = u(k, r);
|
|
184
|
-
return /* @__PURE__ */ s(p.p, { id: n.descriptionId, ...a, ref: o });
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
ae.displayName = k;
|
|
188
|
-
var G = "DialogClose", L = i.forwardRef(
|
|
189
|
-
(e, o) => {
|
|
190
|
-
const { __scopeDialog: r, ...a } = e, n = u(G, r);
|
|
191
|
-
return /* @__PURE__ */ s(
|
|
192
|
-
p.button,
|
|
193
|
-
{
|
|
194
|
-
type: "button",
|
|
195
|
-
...a,
|
|
196
|
-
ref: o,
|
|
197
|
-
onClick: g(e.onClick, () => n.onOpenChange(!1))
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
);
|
|
202
|
-
L.displayName = G;
|
|
203
|
-
function y(e) {
|
|
204
|
-
return e ? "open" : "closed";
|
|
205
|
-
}
|
|
206
|
-
var $ = "DialogTitleWarning", [de, j] = Q($, {
|
|
207
|
-
contentName: d,
|
|
208
|
-
titleName: P,
|
|
209
|
-
docsSlug: "dialog"
|
|
210
|
-
}), se = ({ titleId: e }) => {
|
|
211
|
-
const o = j($), r = `\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
212
|
-
|
|
213
|
-
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
214
|
-
|
|
215
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;
|
|
216
|
-
return i.useEffect(() => {
|
|
217
|
-
e && (document.getElementById(e) || console.error(r));
|
|
218
|
-
}, [r, e]), null;
|
|
219
|
-
}, ie = "DialogDescriptionWarning", ce = ({ contentRef: e, descriptionId: o }) => {
|
|
220
|
-
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(ie).contentName}}.`;
|
|
221
|
-
return i.useEffect(() => {
|
|
222
|
-
const n = e.current?.getAttribute("aria-describedby");
|
|
223
|
-
o && n && (document.getElementById(o) || console.warn(a));
|
|
224
|
-
}, [a, e, o]), null;
|
|
225
|
-
}, fe = x, ge = T, pe = M, De = w, ve = F, me = W, Ce = L;
|
|
226
|
-
export {
|
|
227
|
-
ve as C,
|
|
228
|
-
De as O,
|
|
229
|
-
pe as P,
|
|
230
|
-
fe as R,
|
|
231
|
-
ge as T,
|
|
232
|
-
me as a,
|
|
233
|
-
Ce as b
|
|
234
|
-
};
|
package/dist/index-hYJmp-0x.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { P as o } from "./index-CYz8LhDn.js";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
var d = Object.freeze({
|
|
5
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
6
|
-
position: "absolute",
|
|
7
|
-
border: 0,
|
|
8
|
-
width: 1,
|
|
9
|
-
height: 1,
|
|
10
|
-
padding: 0,
|
|
11
|
-
margin: -1,
|
|
12
|
-
overflow: "hidden",
|
|
13
|
-
clip: "rect(0, 0, 0, 0)",
|
|
14
|
-
whiteSpace: "nowrap",
|
|
15
|
-
wordWrap: "normal"
|
|
16
|
-
}), l = "VisuallyHidden", e = i.forwardRef(
|
|
17
|
-
(r, a) => /* @__PURE__ */ t(
|
|
18
|
-
o.span,
|
|
19
|
-
{
|
|
20
|
-
...r,
|
|
21
|
-
ref: a,
|
|
22
|
-
style: { ...d, ...r.style }
|
|
23
|
-
}
|
|
24
|
-
)
|
|
25
|
-
);
|
|
26
|
-
e.displayName = l;
|
|
27
|
-
var n = e;
|
|
28
|
-
export {
|
|
29
|
-
n as R
|
|
30
|
-
};
|
package/dist/utils-BKDJp1i0.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
import { useLayoutEffect as N, useEffect as A, useState as C } from "react";
|
|
3
|
-
var R = (e, t, n, s, o, a, d, h) => {
|
|
4
|
-
let u = document.documentElement, v = ["light", "dark"];
|
|
5
|
-
function f(c) {
|
|
6
|
-
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
7
|
-
let E = y === "class", L = E && a ? o.map((b) => a[b] || b) : o;
|
|
8
|
-
E ? (u.classList.remove(...L), u.classList.add(a && a[c] ? a[c] : c)) : u.setAttribute(y, c);
|
|
9
|
-
}), k(c);
|
|
10
|
-
}
|
|
11
|
-
function k(c) {
|
|
12
|
-
h && v.includes(c) && (u.style.colorScheme = c);
|
|
13
|
-
}
|
|
14
|
-
function m() {
|
|
15
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
16
|
-
}
|
|
17
|
-
if (s) f(s);
|
|
18
|
-
else try {
|
|
19
|
-
let c = localStorage.getItem(t) || n, y = d && c === "system" ? m() : c;
|
|
20
|
-
f(y);
|
|
21
|
-
} catch {
|
|
22
|
-
}
|
|
23
|
-
}, P = ["light", "dark"], z = "(prefers-color-scheme: dark)", V = typeof window > "u", x = r.createContext(void 0), W = { setTheme: (e) => {
|
|
24
|
-
}, themes: [] }, _ = () => {
|
|
25
|
-
var e;
|
|
26
|
-
return (e = r.useContext(x)) != null ? e : W;
|
|
27
|
-
}, G = (e) => r.useContext(x) ? r.createElement(r.Fragment, null, e.children) : r.createElement(F, { ...e }), $ = ["light", "dark"], F = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: n = !0, enableColorScheme: s = !0, storageKey: o = "theme", themes: a = $, defaultTheme: d = n ? "system" : "light", attribute: h = "data-theme", value: u, children: v, nonce: f, scriptProps: k }) => {
|
|
28
|
-
let [m, c] = r.useState(() => Q(o, d)), [y, E] = r.useState(() => m === "system" ? M() : m), L = u ? Object.values(u) : a, b = r.useCallback((i) => {
|
|
29
|
-
let l = i;
|
|
30
|
-
if (!l) return;
|
|
31
|
-
i === "system" && n && (l = M());
|
|
32
|
-
let g = u ? u[l] : l, I = t ? Z(f) : null, w = document.documentElement, O = (p) => {
|
|
33
|
-
p === "class" ? (w.classList.remove(...L), g && w.classList.add(g)) : p.startsWith("data-") && (g ? w.setAttribute(p, g) : w.removeAttribute(p));
|
|
34
|
-
};
|
|
35
|
-
if (Array.isArray(h) ? h.forEach(O) : O(h), s) {
|
|
36
|
-
let p = P.includes(d) ? d : null, K = P.includes(l) ? l : p;
|
|
37
|
-
w.style.colorScheme = K;
|
|
38
|
-
}
|
|
39
|
-
I?.();
|
|
40
|
-
}, [f]), T = r.useCallback((i) => {
|
|
41
|
-
let l = typeof i == "function" ? i(m) : i;
|
|
42
|
-
c(l);
|
|
43
|
-
try {
|
|
44
|
-
localStorage.setItem(o, l);
|
|
45
|
-
} catch {
|
|
46
|
-
}
|
|
47
|
-
}, [m]), S = r.useCallback((i) => {
|
|
48
|
-
let l = M(i);
|
|
49
|
-
E(l), m === "system" && n && !e && b("system");
|
|
50
|
-
}, [m, e]);
|
|
51
|
-
r.useEffect(() => {
|
|
52
|
-
let i = window.matchMedia(z);
|
|
53
|
-
return i.addListener(S), S(i), () => i.removeListener(S);
|
|
54
|
-
}, [S]), r.useEffect(() => {
|
|
55
|
-
let i = (l) => {
|
|
56
|
-
l.key === o && (l.newValue ? c(l.newValue) : T(d));
|
|
57
|
-
};
|
|
58
|
-
return window.addEventListener("storage", i), () => window.removeEventListener("storage", i);
|
|
59
|
-
}, [T]), r.useEffect(() => {
|
|
60
|
-
b(e ?? m);
|
|
61
|
-
}, [e, m]);
|
|
62
|
-
let H = r.useMemo(() => ({ theme: m, setTheme: T, forcedTheme: e, resolvedTheme: m === "system" ? y : m, themes: n ? [...a, "system"] : a, systemTheme: n ? y : void 0 }), [m, T, e, y, n, a]);
|
|
63
|
-
return r.createElement(x.Provider, { value: H }, r.createElement(J, { forcedTheme: e, storageKey: o, attribute: h, enableSystem: n, enableColorScheme: s, defaultTheme: d, value: u, themes: a, nonce: f, scriptProps: k }), v);
|
|
64
|
-
}, J = r.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: s, enableColorScheme: o, defaultTheme: a, value: d, themes: h, nonce: u, scriptProps: v }) => {
|
|
65
|
-
let f = JSON.stringify([n, t, a, e, h, d, s, o]).slice(1, -1);
|
|
66
|
-
return r.createElement("script", { ...v, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${R.toString()})(${f})` } });
|
|
67
|
-
}), Q = (e, t) => {
|
|
68
|
-
if (V) return;
|
|
69
|
-
let n;
|
|
70
|
-
try {
|
|
71
|
-
n = localStorage.getItem(e) || void 0;
|
|
72
|
-
} catch {
|
|
73
|
-
}
|
|
74
|
-
return n || t;
|
|
75
|
-
}, Z = (e) => {
|
|
76
|
-
let t = document.createElement("style");
|
|
77
|
-
return e && t.setAttribute("nonce", e), t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(t), () => {
|
|
78
|
-
window.getComputedStyle(document.body), setTimeout(() => {
|
|
79
|
-
document.head.removeChild(t);
|
|
80
|
-
}, 1);
|
|
81
|
-
};
|
|
82
|
-
}, M = (e) => (e || (e = window.matchMedia(z)), e.matches ? "dark" : "light");
|
|
83
|
-
const j = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
84
|
-
function X(e) {
|
|
85
|
-
return !!e.match(j);
|
|
86
|
-
}
|
|
87
|
-
function Y(e) {
|
|
88
|
-
const [t, n] = C(!1);
|
|
89
|
-
return A(() => {
|
|
90
|
-
const s = window.matchMedia(e);
|
|
91
|
-
n(s.matches);
|
|
92
|
-
const o = (a) => {
|
|
93
|
-
n(a.matches);
|
|
94
|
-
};
|
|
95
|
-
return s.addEventListener("change", o), () => s.removeEventListener("change", o);
|
|
96
|
-
}, [e]), t;
|
|
97
|
-
}
|
|
98
|
-
const D = typeof window < "u" ? N : A;
|
|
99
|
-
function U() {
|
|
100
|
-
const [e, t] = C(!1);
|
|
101
|
-
return D(() => {
|
|
102
|
-
t(!0);
|
|
103
|
-
}, []), e;
|
|
104
|
-
}
|
|
105
|
-
function q() {
|
|
106
|
-
const [e, t] = C(!1);
|
|
107
|
-
return [async (s) => {
|
|
108
|
-
if (s)
|
|
109
|
-
try {
|
|
110
|
-
await navigator.clipboard.writeText(s), t(!0);
|
|
111
|
-
} finally {
|
|
112
|
-
setTimeout(() => t(!1), 2e3);
|
|
113
|
-
}
|
|
114
|
-
}, e];
|
|
115
|
-
}
|
|
116
|
-
function ee() {
|
|
117
|
-
const e = U(), { resolvedTheme: t } = _(), [n, s] = C("light");
|
|
118
|
-
return A(() => {
|
|
119
|
-
if (!t) {
|
|
120
|
-
s(document.documentElement.dataset.theme || "light");
|
|
121
|
-
const o = new MutationObserver(() => {
|
|
122
|
-
s(document.documentElement.dataset.theme || "light");
|
|
123
|
-
});
|
|
124
|
-
return o.observe(document.documentElement, {
|
|
125
|
-
attributeFilter: ["data-theme"]
|
|
126
|
-
}), () => o.disconnect();
|
|
127
|
-
}
|
|
128
|
-
}, [t]), e && t || n;
|
|
129
|
-
}
|
|
130
|
-
export {
|
|
131
|
-
G as J,
|
|
132
|
-
Y as a,
|
|
133
|
-
D as b,
|
|
134
|
-
U as c,
|
|
135
|
-
q as d,
|
|
136
|
-
j as e,
|
|
137
|
-
ee as u,
|
|
138
|
-
X as v,
|
|
139
|
-
_ as z
|
|
140
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|