@yourdash/uikit 1.0.34 → 1.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/box.css +4 -0
- package/dist/assets/button.css +4 -0
- package/dist/assets/buttonCombo.css +4 -0
- package/dist/assets/buttonLink.css +4 -0
- package/dist/assets/buttonWithIcon.css +4 -0
- package/dist/assets/card.css +4 -0
- package/dist/assets/carousel.css +4 -0
- package/dist/assets/container.css +4 -0
- package/dist/assets/contextMenuRoot.css +4 -0
- package/dist/assets/dialog.css +4 -0
- package/dist/assets/flex.css +4 -0
- package/dist/assets/header.css +7 -0
- package/dist/assets/heading.css +4 -0
- package/dist/assets/icon.css +4 -0
- package/dist/assets/iconButton.css +4 -0
- package/dist/assets/image.css +4 -0
- package/dist/assets/infiniteScroll.css +7 -0
- package/dist/assets/level.css +4 -0
- package/dist/assets/link.css +4 -0
- package/dist/assets/navBar.css +4 -0
- package/dist/assets/navImage.css +4 -0
- package/dist/assets/onBoarding.css +4 -0
- package/dist/assets/separator.css +4 -0
- package/dist/assets/sidebar.css +4 -0
- package/dist/assets/sidebarContainer.css +4 -0
- package/dist/assets/spinner.css +4 -0
- package/dist/assets/subtext.css +4 -0
- package/dist/assets/tag.css +4 -0
- package/dist/assets/textButton.css +4 -0
- package/dist/assets/textInput.css +4 -0
- package/dist/assets/toasts.css +4 -0
- package/dist/clippy-B98VypDQ.js +20 -0
- package/dist/components/box/box.js +13 -0
- package/dist/components/button/button.js +18 -0
- package/dist/components/buttonCombo/buttonCombo.js +8 -0
- package/dist/components/buttonLink/buttonLink.js +21 -0
- package/dist/components/buttonWithIcon/buttonWithIcon.js +29 -0
- package/dist/components/card/card.js +42 -0
- package/dist/components/container/container.js +13 -0
- package/dist/components/contextMenu/contextMenu.js +27 -0
- package/dist/components/contextMenu/contextMenuRoot.js +60 -0
- package/dist/components/contextMenu/contextMenuRootContext.js +11 -0
- package/dist/components/flex/flex.js +26 -0
- package/dist/components/heading/heading.js +29 -0
- package/dist/components/icon/icon.js +28 -0
- package/dist/components/icon/iconDictionary.js +287 -0
- package/dist/components/iconButton/iconButton.js +24 -0
- package/dist/components/image/image.js +56 -0
- package/dist/components/index.js +48 -0
- package/dist/components/link/link.js +26 -0
- package/dist/components/progressBar/progressBar.js +20 -0
- package/dist/components/redirect/redirect.js +11 -0
- package/dist/components/separator/separator.js +11 -0
- package/dist/components/spinner/spinner.js +30 -0
- package/dist/components/subtext/subtext.js +9 -0
- package/dist/components/tag/tag.js +15 -0
- package/dist/components/text/text.js +8 -0
- package/dist/components/textButton/textButton.js +16 -0
- package/dist/components/textInput/textInput.js +43 -0
- package/dist/core/decrementLevel.js +6 -0
- package/dist/core/incrementLevel.js +6 -0
- package/dist/core/index.js +10 -0
- package/dist/core/level.js +7 -0
- package/dist/core/remToPx.js +6 -0
- package/dist/core/root.js +19 -0
- package/dist/core/toasts/toast.js +1 -0
- package/dist/core/toasts/toastAction.js +1 -0
- package/dist/core/toasts/toastContext.js +9 -0
- package/dist/core/toasts/toasts.js +93 -0
- package/dist/core/toasts/useToast.js +13 -0
- package/dist/index-BJy4nmTN.js +52 -0
- package/dist/index-BoiKlAEs.js +30 -0
- package/dist/index-C9QO6nHU.js +10 -0
- package/dist/index-D4kASGu5.js +240 -0
- package/dist/index-Dj6g5px3.js +14 -0
- package/dist/level-o2-EzyQS.js +28 -0
- package/dist/server-error-lFyIkIwC.js +4 -0
- package/dist/uikit.js +8 -3764
- package/dist/utilityComponent/hasBeenShown/hasBeenShown.js +23 -0
- package/dist/utilityComponent/index.js +6 -0
- package/dist/utilityComponent/onInView/onInView.js +54 -0
- package/dist/views/carousel/carousel.js +102 -0
- package/dist/views/dialog/dialog.js +18 -0
- package/dist/views/header/header.js +21 -0
- package/dist/views/index.js +26 -0
- package/dist/views/infiniteScroll/infiniteScroll.js +62 -0
- package/dist/views/navBar/components/navImage/navImage.js +15 -0
- package/dist/views/navBar/components/navTitle/navTitle.js +12 -0
- package/dist/views/navBar/navBar.js +36 -0
- package/dist/views/onBoarding/onBoarding.js +125 -0
- package/dist/views/panAndZoom/panAndZoom.js +74 -0
- package/dist/views/sidebar/sidebar.js +24 -0
- package/dist/views/sidebar/sidebarContainer.js +34 -0
- package/dist/views/sidebar/sidebarContext.js +13 -0
- package/dist/views/sidebar/sidebarToggleButton.js +21 -0
- package/package.json +39 -29
- package/dist/style.css +0 -10
@@ -0,0 +1,19 @@
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { c as t } from "../clippy-B98VypDQ.js";
|
3
|
+
import a from "../components/contextMenu/contextMenuRoot.js";
|
4
|
+
import n from "./toasts/toasts.js";
|
5
|
+
import { s as o, L as s } from "../level-o2-EzyQS.js";
|
6
|
+
function l() {
|
7
|
+
const e = window.navigator;
|
8
|
+
if (new URLSearchParams(window.location.search).has("ukmobile")) return !0;
|
9
|
+
if (e != null && e.userAgentData)
|
10
|
+
return e.userAgentData.mobile || !1;
|
11
|
+
{
|
12
|
+
const i = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
|
13
|
+
return navigator.userAgent.match(i) !== null;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
const p = (e) => /* @__PURE__ */ r("div", { className: t(o.theme, o.level0, l() && o.mobile), children: /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(s.Provider, { value: 0, children: e.children }) }) }) });
|
17
|
+
export {
|
18
|
+
p as default
|
19
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
2
|
+
import u from "../../components/heading/heading.js";
|
3
|
+
import p from "../../components/separator/separator.js";
|
4
|
+
import { c as x } from "../../clippy-B98VypDQ.js";
|
5
|
+
import { useState as d } from "react";
|
6
|
+
import l from "../../components/card/card.js";
|
7
|
+
import { UKIcon as f } from "../../components/icon/iconDictionary.js";
|
8
|
+
import g from "../../components/iconButton/iconButton.js";
|
9
|
+
import h from "../../components/text/text.js";
|
10
|
+
import v from "./toastContext.js";
|
11
|
+
import '../../assets/toasts.css';function T() {
|
12
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
13
|
+
const a = Math.random() * 16 | 0;
|
14
|
+
return (c == "x" ? a : a & 3 | 8).toString(16);
|
15
|
+
});
|
16
|
+
}
|
17
|
+
const C = "_container_17n1r_6", y = "_component_17n1r_20", I = "_cardContent_17n1r_34", w = "_success_17n1r_42", E = "_error_17n1r_46", N = "_warning_17n1r_50", O = "_info_17n1r_54", S = "_heading_17n1r_58", b = "_pointerEvents_17n1r_64", e = {
|
18
|
+
container: C,
|
19
|
+
component: y,
|
20
|
+
cardContent: I,
|
21
|
+
success: w,
|
22
|
+
error: E,
|
23
|
+
warning: N,
|
24
|
+
info: O,
|
25
|
+
heading: S,
|
26
|
+
pointerEvents: b
|
27
|
+
}, _ = 5e3, K = ({ children: c }) => {
|
28
|
+
const [a, o] = d([]);
|
29
|
+
return /* @__PURE__ */ m(
|
30
|
+
v.Provider,
|
31
|
+
{
|
32
|
+
value: {
|
33
|
+
showToast: (n) => {
|
34
|
+
const r = T();
|
35
|
+
o((t) => [...t, { ...n, uuid: r, animatingOut: !1 }]), n.persist || (setTimeout(() => {
|
36
|
+
o(
|
37
|
+
(t) => t.map((i) => r === i.uuid ? {
|
38
|
+
...i,
|
39
|
+
animatingOut: !0
|
40
|
+
} : i)
|
41
|
+
);
|
42
|
+
}, _ - 500), setTimeout(() => {
|
43
|
+
o((t) => t.filter((i) => i.uuid !== r));
|
44
|
+
}, _));
|
45
|
+
}
|
46
|
+
},
|
47
|
+
children: [
|
48
|
+
/* @__PURE__ */ s("div", { className: e.container, children: a.map((n) => /* @__PURE__ */ m(
|
49
|
+
l,
|
50
|
+
{
|
51
|
+
actions: n.persist ? /* @__PURE__ */ s(
|
52
|
+
g,
|
53
|
+
{
|
54
|
+
accessibleLabel: "Close toasts",
|
55
|
+
icon: f.X,
|
56
|
+
onClick: () => o((r) => r.filter((t) => t.uuid !== n.uuid))
|
57
|
+
}
|
58
|
+
) : null,
|
59
|
+
className: x(e.cardContent, n.type && e[n.type]),
|
60
|
+
containerClassName: x(
|
61
|
+
e.component,
|
62
|
+
n.persist && e.pointerEvents,
|
63
|
+
n.animatingOut ? "animate__animated animate__fadeOutRightBig" : "animate__animated animate__fadeInDown"
|
64
|
+
),
|
65
|
+
children: [
|
66
|
+
/* @__PURE__ */ s(
|
67
|
+
u,
|
68
|
+
{
|
69
|
+
className: e.heading,
|
70
|
+
level: 3,
|
71
|
+
text: n.content.title
|
72
|
+
}
|
73
|
+
),
|
74
|
+
/* @__PURE__ */ s(p, { direction: "column" }),
|
75
|
+
/* @__PURE__ */ s(
|
76
|
+
h,
|
77
|
+
{
|
78
|
+
className: e.body,
|
79
|
+
text: n.content.body
|
80
|
+
}
|
81
|
+
)
|
82
|
+
]
|
83
|
+
},
|
84
|
+
n.uuid
|
85
|
+
)) }),
|
86
|
+
c
|
87
|
+
]
|
88
|
+
}
|
89
|
+
);
|
90
|
+
};
|
91
|
+
export {
|
92
|
+
K as default
|
93
|
+
};
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import o from "./components/box/box.js";
|
2
|
+
import r from "./components/button/button.js";
|
3
|
+
import t from "./components/buttonCombo/buttonCombo.js";
|
4
|
+
import m from "./components/buttonLink/buttonLink.js";
|
5
|
+
import i from "./components/buttonWithIcon/buttonWithIcon.js";
|
6
|
+
import p from "./components/card/card.js";
|
7
|
+
import e from "./components/container/container.js";
|
8
|
+
import f from "./components/contextMenu/contextMenu.js";
|
9
|
+
import n from "./components/flex/flex.js";
|
10
|
+
import u from "./components/heading/heading.js";
|
11
|
+
import a from "./components/icon/icon.js";
|
12
|
+
import x from "./components/iconButton/iconButton.js";
|
13
|
+
import B from "./components/image/image.js";
|
14
|
+
import c from "./components/link/link.js";
|
15
|
+
import d from "./components/progressBar/progressBar.js";
|
16
|
+
import g from "./components/redirect/redirect.js";
|
17
|
+
import l from "./components/separator/separator.js";
|
18
|
+
import b from "./components/spinner/spinner.js";
|
19
|
+
import I from "./components/subtext/subtext.js";
|
20
|
+
import S from "./components/tag/tag.js";
|
21
|
+
import T from "./components/text/text.js";
|
22
|
+
import s from "./components/textButton/textButton.js";
|
23
|
+
import C from "./components/textInput/textInput.js";
|
24
|
+
const N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
25
|
+
__proto__: null,
|
26
|
+
Box: o,
|
27
|
+
Button: r,
|
28
|
+
ButtonCombo: t,
|
29
|
+
ButtonLink: m,
|
30
|
+
ButtonWithIcon: i,
|
31
|
+
Card: p,
|
32
|
+
Container: e,
|
33
|
+
ContextMenu: f,
|
34
|
+
Flex: n,
|
35
|
+
Heading: u,
|
36
|
+
Icon: a,
|
37
|
+
IconButton: x,
|
38
|
+
Image: B,
|
39
|
+
Link: c,
|
40
|
+
ProgressBar: d,
|
41
|
+
Redirect: g,
|
42
|
+
Separator: l,
|
43
|
+
Spinner: b,
|
44
|
+
Subtext: I,
|
45
|
+
Tag: S,
|
46
|
+
Text: T,
|
47
|
+
TextButton: s,
|
48
|
+
TextInput: C
|
49
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
50
|
+
export {
|
51
|
+
N as i
|
52
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import o from "./views/carousel/carousel.js";
|
2
|
+
import r from "./views/dialog/dialog.js";
|
3
|
+
import m from "./views/header/header.js";
|
4
|
+
import i from "./views/infiniteScroll/infiniteScroll.js";
|
5
|
+
import t from "./views/navBar/navBar.js";
|
6
|
+
import e from "./views/navBar/components/navImage/navImage.js";
|
7
|
+
import a from "./views/navBar/components/navTitle/navTitle.js";
|
8
|
+
import f from "./views/onBoarding/onBoarding.js";
|
9
|
+
import p from "./views/panAndZoom/panAndZoom.js";
|
10
|
+
import n from "./views/sidebar/sidebar.js";
|
11
|
+
import l from "./views/sidebar/sidebarContainer.js";
|
12
|
+
import d from "./views/sidebar/sidebarToggleButton.js";
|
13
|
+
const j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
14
|
+
__proto__: null,
|
15
|
+
Carousel: o,
|
16
|
+
Dialog: r,
|
17
|
+
Header: m,
|
18
|
+
InfiniteScroll: i,
|
19
|
+
NavBar: t,
|
20
|
+
NavImage: e,
|
21
|
+
NavTitle: a,
|
22
|
+
OnBoarding: f,
|
23
|
+
PanAndZoom: p,
|
24
|
+
Sidebar: n,
|
25
|
+
SidebarContainer: l,
|
26
|
+
SidebarToggleButton: d
|
27
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
28
|
+
export {
|
29
|
+
j as i
|
30
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import e from "./utilityComponent/hasBeenShown/hasBeenShown.js";
|
2
|
+
import o from "./utilityComponent/onInView/onInView.js";
|
3
|
+
const n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
4
|
+
__proto__: null,
|
5
|
+
HasBeenShown: e,
|
6
|
+
OnInView: o
|
7
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
8
|
+
export {
|
9
|
+
n as i
|
10
|
+
};
|
@@ -0,0 +1,240 @@
|
|
1
|
+
import * as o from "react";
|
2
|
+
/**
|
3
|
+
* @remix-run/router v1.21.0
|
4
|
+
*
|
5
|
+
* Copyright (c) Remix Software Inc.
|
6
|
+
*
|
7
|
+
* This source code is licensed under the MIT license found in the
|
8
|
+
* LICENSE.md file in the root directory of this source tree.
|
9
|
+
*
|
10
|
+
* @license MIT
|
11
|
+
*/
|
12
|
+
function g() {
|
13
|
+
return g = Object.assign ? Object.assign.bind() : function(e) {
|
14
|
+
for (var t = 1; t < arguments.length; t++) {
|
15
|
+
var n = arguments[t];
|
16
|
+
for (var a in n)
|
17
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
18
|
+
}
|
19
|
+
return e;
|
20
|
+
}, g.apply(this, arguments);
|
21
|
+
}
|
22
|
+
var O;
|
23
|
+
(function(e) {
|
24
|
+
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
25
|
+
})(O || (O = {}));
|
26
|
+
function s(e, t) {
|
27
|
+
if (e === !1 || e === null || typeof e > "u")
|
28
|
+
throw new Error(t);
|
29
|
+
}
|
30
|
+
function b(e, t) {
|
31
|
+
if (!e) {
|
32
|
+
typeof console < "u" && console.warn(t);
|
33
|
+
try {
|
34
|
+
throw new Error(t);
|
35
|
+
} catch {
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
function R(e) {
|
40
|
+
let t = {};
|
41
|
+
if (e) {
|
42
|
+
let n = e.indexOf("#");
|
43
|
+
n >= 0 && (t.hash = e.substr(n), e = e.substr(0, n));
|
44
|
+
let a = e.indexOf("?");
|
45
|
+
a >= 0 && (t.search = e.substr(a), e = e.substr(0, a)), e && (t.pathname = e);
|
46
|
+
}
|
47
|
+
return t;
|
48
|
+
}
|
49
|
+
var y;
|
50
|
+
(function(e) {
|
51
|
+
e.data = "data", e.deferred = "deferred", e.redirect = "redirect", e.error = "error";
|
52
|
+
})(y || (y = {}));
|
53
|
+
function L(e, t) {
|
54
|
+
t === void 0 && (t = "/");
|
55
|
+
let {
|
56
|
+
pathname: n,
|
57
|
+
search: a = "",
|
58
|
+
hash: r = ""
|
59
|
+
} = typeof e == "string" ? R(e) : e;
|
60
|
+
return {
|
61
|
+
pathname: n ? n.startsWith("/") ? n : j(n, t) : t,
|
62
|
+
search: A(a),
|
63
|
+
hash: J(r)
|
64
|
+
};
|
65
|
+
}
|
66
|
+
function j(e, t) {
|
67
|
+
let n = t.replace(/\/+$/, "").split("/");
|
68
|
+
return e.split("/").forEach((r) => {
|
69
|
+
r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
|
70
|
+
}), n.length > 1 ? n.join("/") : "/";
|
71
|
+
}
|
72
|
+
function m(e, t, n, a) {
|
73
|
+
return "Cannot include a '" + e + "' character in a manually specified " + ("`to." + t + "` field [" + JSON.stringify(a) + "]. Please separate it out to the ") + ("`to." + n + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
|
74
|
+
}
|
75
|
+
function I(e) {
|
76
|
+
return e.filter((t, n) => n === 0 || t.route.path && t.route.path.length > 0);
|
77
|
+
}
|
78
|
+
function M(e, t) {
|
79
|
+
let n = I(e);
|
80
|
+
return t ? n.map((a, r) => r === n.length - 1 ? a.pathname : a.pathnameBase) : n.map((a) => a.pathnameBase);
|
81
|
+
}
|
82
|
+
function W(e, t, n, a) {
|
83
|
+
a === void 0 && (a = !1);
|
84
|
+
let r;
|
85
|
+
typeof e == "string" ? r = R(e) : (r = g({}, e), s(!r.pathname || !r.pathname.includes("?"), m("?", "pathname", "search", r)), s(!r.pathname || !r.pathname.includes("#"), m("#", "pathname", "hash", r)), s(!r.search || !r.search.includes("#"), m("#", "search", "hash", r)));
|
86
|
+
let i = e === "" || r.pathname === "", u = i ? "/" : r.pathname, f;
|
87
|
+
if (u == null)
|
88
|
+
f = n;
|
89
|
+
else {
|
90
|
+
let c = t.length - 1;
|
91
|
+
if (!a && u.startsWith("..")) {
|
92
|
+
let v = u.split("/");
|
93
|
+
for (; v[0] === ".."; )
|
94
|
+
v.shift(), c -= 1;
|
95
|
+
r.pathname = v.join("/");
|
96
|
+
}
|
97
|
+
f = c >= 0 ? t[c] : "/";
|
98
|
+
}
|
99
|
+
let h = L(r, f), d = u && u !== "/" && u.endsWith("/"), l = (i || u === ".") && n.endsWith("/");
|
100
|
+
return !h.pathname.endsWith("/") && (d || l) && (h.pathname += "/"), h;
|
101
|
+
}
|
102
|
+
const B = (e) => e.join("/").replace(/\/\/+/g, "/"), A = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, J = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, P = ["post", "put", "patch", "delete"];
|
103
|
+
new Set(P);
|
104
|
+
const q = ["get", ...P];
|
105
|
+
new Set(q);
|
106
|
+
/**
|
107
|
+
* React Router v6.28.0
|
108
|
+
*
|
109
|
+
* Copyright (c) Remix Software Inc.
|
110
|
+
*
|
111
|
+
* This source code is licensed under the MIT license found in the
|
112
|
+
* LICENSE.md file in the root directory of this source tree.
|
113
|
+
*
|
114
|
+
* @license MIT
|
115
|
+
*/
|
116
|
+
function N() {
|
117
|
+
return N = Object.assign ? Object.assign.bind() : function(e) {
|
118
|
+
for (var t = 1; t < arguments.length; t++) {
|
119
|
+
var n = arguments[t];
|
120
|
+
for (var a in n)
|
121
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
122
|
+
}
|
123
|
+
return e;
|
124
|
+
}, N.apply(this, arguments);
|
125
|
+
}
|
126
|
+
const E = /* @__PURE__ */ o.createContext(null);
|
127
|
+
process.env.NODE_ENV !== "production" && (E.displayName = "DataRouter");
|
128
|
+
const z = /* @__PURE__ */ o.createContext(null);
|
129
|
+
process.env.NODE_ENV !== "production" && (z.displayName = "DataRouterState");
|
130
|
+
const T = /* @__PURE__ */ o.createContext(null);
|
131
|
+
process.env.NODE_ENV !== "production" && (T.displayName = "Await");
|
132
|
+
const x = /* @__PURE__ */ o.createContext(null);
|
133
|
+
process.env.NODE_ENV !== "production" && (x.displayName = "Navigation");
|
134
|
+
const C = /* @__PURE__ */ o.createContext(null);
|
135
|
+
process.env.NODE_ENV !== "production" && (C.displayName = "Location");
|
136
|
+
const p = /* @__PURE__ */ o.createContext({
|
137
|
+
outlet: null,
|
138
|
+
matches: [],
|
139
|
+
isDataRoute: !1
|
140
|
+
});
|
141
|
+
process.env.NODE_ENV !== "production" && (p.displayName = "Route");
|
142
|
+
const $ = /* @__PURE__ */ o.createContext(null);
|
143
|
+
process.env.NODE_ENV !== "production" && ($.displayName = "RouteError");
|
144
|
+
function w() {
|
145
|
+
return o.useContext(C) != null;
|
146
|
+
}
|
147
|
+
function Y() {
|
148
|
+
return w() || (process.env.NODE_ENV !== "production" ? s(
|
149
|
+
!1,
|
150
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
151
|
+
// router loaded. We can help them understand how to avoid that.
|
152
|
+
"useLocation() may be used only in the context of a <Router> component."
|
153
|
+
) : s(!1)), o.useContext(C).location;
|
154
|
+
}
|
155
|
+
const D = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
156
|
+
function U(e) {
|
157
|
+
o.useContext(x).static || o.useLayoutEffect(e);
|
158
|
+
}
|
159
|
+
function H() {
|
160
|
+
let {
|
161
|
+
isDataRoute: e
|
162
|
+
} = o.useContext(p);
|
163
|
+
return e ? k() : F();
|
164
|
+
}
|
165
|
+
function F() {
|
166
|
+
w() || (process.env.NODE_ENV !== "production" ? s(
|
167
|
+
!1,
|
168
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
169
|
+
// router loaded. We can help them understand how to avoid that.
|
170
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
171
|
+
) : s(!1));
|
172
|
+
let e = o.useContext(E), {
|
173
|
+
basename: t,
|
174
|
+
future: n,
|
175
|
+
navigator: a
|
176
|
+
} = o.useContext(x), {
|
177
|
+
matches: r
|
178
|
+
} = o.useContext(p), {
|
179
|
+
pathname: i
|
180
|
+
} = Y(), u = JSON.stringify(M(r, n.v7_relativeSplatPath)), f = o.useRef(!1);
|
181
|
+
return U(() => {
|
182
|
+
f.current = !0;
|
183
|
+
}), o.useCallback(function(d, l) {
|
184
|
+
if (l === void 0 && (l = {}), process.env.NODE_ENV !== "production" && b(f.current, D), !f.current) return;
|
185
|
+
if (typeof d == "number") {
|
186
|
+
a.go(d);
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
let c = W(d, JSON.parse(u), i, l.relative === "path");
|
190
|
+
e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : B([t, c.pathname])), (l.replace ? a.replace : a.push)(c, l.state, l);
|
191
|
+
}, [t, a, u, i, e]);
|
192
|
+
}
|
193
|
+
const G = /* @__PURE__ */ o.createContext(null);
|
194
|
+
function K(e) {
|
195
|
+
let t = o.useContext(p).outlet;
|
196
|
+
return t && /* @__PURE__ */ o.createElement(G.Provider, {
|
197
|
+
value: e
|
198
|
+
}, t);
|
199
|
+
}
|
200
|
+
var _ = /* @__PURE__ */ function(e) {
|
201
|
+
return e.UseBlocker = "useBlocker", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e;
|
202
|
+
}(_ || {}), S = /* @__PURE__ */ function(e) {
|
203
|
+
return e.UseBlocker = "useBlocker", e.UseLoaderData = "useLoaderData", e.UseActionData = "useActionData", e.UseRouteError = "useRouteError", e.UseNavigation = "useNavigation", e.UseRouteLoaderData = "useRouteLoaderData", e.UseMatches = "useMatches", e.UseRevalidator = "useRevalidator", e.UseNavigateStable = "useNavigate", e.UseRouteId = "useRouteId", e;
|
204
|
+
}(S || {});
|
205
|
+
function V(e) {
|
206
|
+
return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
207
|
+
}
|
208
|
+
function Q(e) {
|
209
|
+
let t = o.useContext(E);
|
210
|
+
return t || (process.env.NODE_ENV !== "production" ? s(!1, V(e)) : s(!1)), t;
|
211
|
+
}
|
212
|
+
function X(e) {
|
213
|
+
let t = o.useContext(p);
|
214
|
+
return t || (process.env.NODE_ENV !== "production" ? s(!1, V(e)) : s(!1)), t;
|
215
|
+
}
|
216
|
+
function Z(e) {
|
217
|
+
let t = X(e), n = t.matches[t.matches.length - 1];
|
218
|
+
return n.route.id || (process.env.NODE_ENV !== "production" ? s(!1, e + ' can only be used on routes that contain a unique "id"') : s(!1)), n.route.id;
|
219
|
+
}
|
220
|
+
function k() {
|
221
|
+
let {
|
222
|
+
router: e
|
223
|
+
} = Q(_.UseNavigateStable), t = Z(S.UseNavigateStable), n = o.useRef(!1);
|
224
|
+
return U(() => {
|
225
|
+
n.current = !0;
|
226
|
+
}), o.useCallback(function(r, i) {
|
227
|
+
i === void 0 && (i = {}), process.env.NODE_ENV !== "production" && b(n.current, D), n.current && (typeof r == "number" ? e.navigate(r) : e.navigate(r, N({
|
228
|
+
fromRouteId: t
|
229
|
+
}, i)));
|
230
|
+
}, [e, t]);
|
231
|
+
}
|
232
|
+
function ee(e) {
|
233
|
+
return K(e.context);
|
234
|
+
}
|
235
|
+
new Promise(() => {
|
236
|
+
});
|
237
|
+
export {
|
238
|
+
ee as O,
|
239
|
+
H as u
|
240
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import e from "./core/root.js";
|
2
|
+
import o from "./core/incrementLevel.js";
|
3
|
+
import t from "./core/decrementLevel.js";
|
4
|
+
import r from "./core/toasts/useToast.js";
|
5
|
+
const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
6
|
+
__proto__: null,
|
7
|
+
DecrementLevel: t,
|
8
|
+
IncrementLevel: o,
|
9
|
+
UIKitRoot: e,
|
10
|
+
useToast: r
|
11
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
12
|
+
export {
|
13
|
+
p as i
|
14
|
+
};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { createContext as t, useContext as s } from "react";
|
2
|
+
import './assets/level.css';const r = "_theme_1rrjw_10", v = "_level0_1rrjw_27", o = "_level1_1rrjw_95", n = "_level2_1rrjw_157", _ = "_level3_1rrjw_221", c = "_mobile_1rrjw_284", e = {
|
3
|
+
theme: r,
|
4
|
+
level0: v,
|
5
|
+
level1: o,
|
6
|
+
level2: n,
|
7
|
+
level3: _,
|
8
|
+
mobile: c
|
9
|
+
}, a = t(0), m = () => s(a), w = (l) => {
|
10
|
+
switch (l) {
|
11
|
+
case 0:
|
12
|
+
return e.level0;
|
13
|
+
case 1:
|
14
|
+
return e.level1;
|
15
|
+
case 2:
|
16
|
+
return e.level2;
|
17
|
+
case 3:
|
18
|
+
return e.level3;
|
19
|
+
default:
|
20
|
+
return e.level0;
|
21
|
+
}
|
22
|
+
};
|
23
|
+
export {
|
24
|
+
a as L,
|
25
|
+
w as a,
|
26
|
+
e as s,
|
27
|
+
m as u
|
28
|
+
};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
const e = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.5%2012C3.11929%2012%202%2010.8807%202%209.5C2%208.27003%202.88822%207.24752%204.05823%207.03891C4.0201%206.86534%204%206.68502%204%206.5C4%205.11929%205.11929%204%206.5%204C7.74358%204%208.77509%204.908%208.96772%206.09719C9.13314%206.03438%209.31255%206%209.5%206C10.1768%206%2010.7489%206.4482%2010.9356%207.06396C11.117%207.02212%2011.3059%207%2011.5%207C12.8807%207%2014%208.11929%2014%209.5C14%2010.8807%2012.8807%2012%2011.5%2012H4.5ZM7.56111%207.81633L7.68889%209.63946H8.31111L8.43889%207.81633V7H7.56111V7.81633ZM7.61111%2010.8966C7.68889%2010.9655%207.79074%2011%207.91667%2011H8.07778C8.20741%2011%208.30926%2010.9655%208.38333%2010.8966C8.46111%2010.8277%208.5%2010.7351%208.5%2010.619C8.5%2010.5029%208.46111%2010.4104%208.38333%2010.3415C8.30926%2010.2726%208.20926%2010.2381%208.08333%2010.2381H7.91667C7.79074%2010.2381%207.68889%2010.2726%207.61111%2010.3415C7.53704%2010.4104%207.5%2010.5029%207.5%2010.619C7.5%2010.7315%207.53704%2010.824%207.61111%2010.8966Z'%20fill='white'/%3e%3c/svg%3e";
|
2
|
+
export {
|
3
|
+
e as default
|
4
|
+
};
|