uibee 3.3.0 → 3.3.1
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/components/alert/alert.d.ts +15 -0
- package/dist/components/alert/alert.js +29 -0
- package/dist/components/badge/badge.d.ts +16 -0
- package/dist/components/badge/badge.js +26 -0
- package/dist/components/buttons/button.d.ts +25 -0
- package/dist/components/buttons/button.js +44 -0
- package/dist/components/code/code.d.ts +23 -0
- package/dist/components/code/code.js +39 -0
- package/dist/components/confirm/confirmPopup.d.ts +23 -0
- package/dist/components/confirm/confirmPopup.js +52 -0
- package/dist/components/container/accordion.d.ts +25 -0
- package/dist/components/container/accordion.js +41 -0
- package/dist/components/container/card.d.ts +13 -0
- package/dist/components/container/card.js +10 -0
- package/dist/components/container/expandableCard.d.ts +32 -0
- package/dist/components/container/expandableCard.js +70 -0
- package/dist/components/container/glassCard.d.ts +13 -0
- package/dist/components/container/glassCard.js +10 -0
- package/dist/components/container/highlight.d.ts +10 -0
- package/dist/components/container/highlight.js +10 -0
- package/dist/components/container/iconBubble.d.ts +25 -0
- package/dist/components/container/iconBubble.js +21 -0
- package/dist/components/container/leftBarPanel.d.ts +15 -0
- package/dist/components/container/leftBarPanel.js +10 -0
- package/dist/components/container/page.d.ts +15 -0
- package/dist/components/container/page.js +16 -0
- package/dist/components/container/pulseDot.d.ts +12 -0
- package/dist/components/container/pulseDot.js +23 -0
- package/dist/components/container/statCard.d.ts +18 -0
- package/dist/components/container/statCard.js +25 -0
- package/dist/components/container/tabs.d.ts +35 -0
- package/dist/components/container/tabs.js +36 -0
- package/dist/components/empty/emptyState.d.ts +19 -0
- package/dist/components/empty/emptyState.js +27 -0
- package/dist/components/footer/footer.d.ts +49 -0
- package/dist/components/footer/footer.js +109 -0
- package/dist/components/footer/loginContent.d.ts +18 -0
- package/dist/components/footer/loginContent.js +138 -0
- package/dist/components/inputs/checkbox.d.ts +20 -0
- package/dist/components/inputs/checkbox.js +76 -0
- package/dist/components/inputs/fileInput.d.ts +19 -0
- package/dist/components/inputs/fileInput.js +108 -0
- package/dist/components/inputs/input.d.ts +16 -0
- package/dist/components/inputs/input.js +157 -0
- package/dist/components/inputs/multiSelect.d.ts +37 -0
- package/dist/components/inputs/multiSelect.js +99 -0
- package/dist/components/inputs/radio.d.ts +20 -0
- package/dist/components/inputs/radio.js +70 -0
- package/dist/components/inputs/range.d.ts +14 -0
- package/dist/components/inputs/range.js +60 -0
- package/dist/components/inputs/searchInput.d.ts +11 -0
- package/dist/components/inputs/searchInput.js +56 -0
- package/dist/components/inputs/select.d.ts +42 -0
- package/dist/components/inputs/select.js +164 -0
- package/dist/components/inputs/shared/colorPickerPopup.js +293 -0
- package/dist/components/inputs/shared/dateTimePickerPopup.js +225 -0
- package/dist/components/inputs/shared/fieldWrapper.js +33 -0
- package/dist/components/inputs/shared/index.js +6 -0
- package/dist/components/inputs/shared/inputError.js +17 -0
- package/dist/components/inputs/shared/inputInfo.js +13 -0
- package/dist/components/inputs/shared/inputLabel.js +19 -0
- package/dist/components/inputs/switch.d.ts +14 -0
- package/dist/components/inputs/switch.js +37 -0
- package/dist/components/inputs/tagInput.d.ts +31 -0
- package/dist/components/inputs/tagInput.js +72 -0
- package/dist/components/inputs/textarea.d.ts +14 -0
- package/dist/components/inputs/textarea.js +76 -0
- package/dist/components/inputs/toggle.d.ts +21 -0
- package/dist/components/inputs/toggle.js +33 -0
- package/dist/components/login/loginPage.d.ts +15 -0
- package/dist/components/login/loginPage.js +80 -0
- package/dist/components/logo/logo.d.ts +9 -0
- package/dist/components/logo/logo.js +138 -0
- package/dist/components/logo/logoSmall.d.ts +4 -0
- package/dist/components/logo/logoSmall.js +56 -0
- package/dist/components/markdownrender/markdownRender.d.ts +16 -0
- package/dist/components/markdownrender/markdownRender.js +59 -0
- package/dist/components/modal/modal.d.ts +22 -0
- package/dist/components/modal/modal.js +59 -0
- package/dist/components/navbar/bubble.js +36 -0
- package/dist/components/navbar/navbar.d.ts +50 -0
- package/dist/components/navbar/navbar.js +99 -0
- package/dist/components/navbar/navbarDropdown.d.ts +15 -0
- package/dist/components/navbar/navbarDropdown.js +63 -0
- package/dist/components/navbar/navbarItem.d.ts +23 -0
- package/dist/components/navbar/navbarItem.js +38 -0
- package/dist/components/sidebar/sidebar.d.ts +34 -0
- package/dist/components/sidebar/sidebar.js +135 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +16 -0
- package/dist/components/table/body.js +253 -0
- package/dist/components/table/constants.js +58 -0
- package/dist/components/table/empty.js +24 -0
- package/dist/components/table/format.js +39 -0
- package/dist/components/table/header.js +109 -0
- package/dist/components/table/menu.d.ts +18 -0
- package/dist/components/table/menu.js +76 -0
- package/dist/components/table/pagination.d.ts +14 -0
- package/dist/components/table/pagination.js +130 -0
- package/dist/components/table/skeleton.js +39 -0
- package/dist/components/table/table.d.ts +7 -0
- package/dist/components/table/table.js +213 -0
- package/dist/components/table/types.d.ts +52 -0
- package/dist/components/table/utils.js +9 -0
- package/dist/components/toast/toastItem.js +61 -0
- package/dist/components/toast/toaster.d.ts +13 -0
- package/dist/components/toast/toaster.js +117 -0
- package/dist/components/toggle/language.d.ts +10 -0
- package/dist/components/toggle/language.js +34 -0
- package/dist/components/toggle/theme.d.ts +8 -0
- package/dist/components/toggle/theme.js +135 -0
- package/dist/components/version/version.d.ts +13 -0
- package/dist/components/version/version.js +19 -0
- package/dist/components/vulnerability/constants.d.ts +4 -0
- package/dist/components/vulnerability/constants.js +17 -0
- package/dist/components/vulnerability/severityPill.d.ts +15 -0
- package/dist/components/vulnerability/severityPill.js +20 -0
- package/dist/{style.css → globals.css} +152 -226
- package/dist/hooks/useClickOutside.d.ts +6 -0
- package/dist/{useClickOutside-Cmp-RsP3.js → hooks/useClickOutside.js} +1 -1
- package/dist/hooks/useDarkMode.d.ts +4 -0
- package/dist/hooks/useDarkMode.js +19 -0
- package/dist/hooks/useVisibility.d.ts +7 -0
- package/dist/hooks/useVisibility.js +25 -0
- package/dist/icons/icons.d.ts +420 -0
- package/dist/{icons-lZYQ6Vlr.js → icons/icons.js} +1 -1
- package/dist/src/components/index.d.ts +51 -905
- package/dist/src/components/index.js +49 -4179
- package/dist/src/hooks/index.d.ts +3 -14
- package/dist/src/hooks/index.js +3 -42
- package/dist/src/icons/index.d.ts +1 -419
- package/dist/src/icons/index.js +1 -1
- package/dist/src/styles/index.js +1 -1
- package/dist/src/utils/index.d.ts +5 -37
- package/dist/src/utils/index.js +5 -124
- package/dist/utils/auth/callback.d.ts +14 -0
- package/dist/utils/auth/callback.js +53 -0
- package/dist/utils/auth/getDomain.js +6 -0
- package/dist/utils/auth/login.d.ts +12 -0
- package/dist/utils/auth/login.js +17 -0
- package/dist/utils/auth/logout.d.ts +10 -0
- package/dist/utils/auth/logout.js +20 -0
- package/dist/utils/auth/token.d.ts +10 -0
- package/dist/utils/auth/token.js +30 -0
- package/dist/utils/logoConsoleOutput/logoConsoleOutput.d.ts +4 -0
- package/dist/utils/logoConsoleOutput/logoConsoleOutput.js +11 -0
- package/package.json +1 -1
- package/src/components/buttons/button.tsx +2 -0
- package/src/components/footer/footer.tsx +60 -42
- package/src/components/index.ts +0 -1
- package/src/components/inputs/checkbox.tsx +2 -0
- package/src/components/inputs/input.tsx +2 -0
- package/src/components/inputs/radio.tsx +2 -0
- package/src/components/inputs/range.tsx +2 -0
- package/src/components/inputs/shared/colorPickerPopup.tsx +2 -0
- package/src/components/inputs/shared/dateTimePickerPopup.tsx +2 -0
- package/src/components/inputs/textarea.tsx +2 -0
- package/src/components/inputs/toggle.tsx +2 -0
- package/src/components/toast/toastItem.tsx +2 -0
- package/src/globals.css +5 -0
- package/tsdown.config.ts +1 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import Logo from "../logo/logo.js";
|
|
2
|
+
import { LogIn } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import Link from "next/link.js";
|
|
5
|
+
//#region src/components/login/loginPage.tsx
|
|
6
|
+
function LoginPage({ title, description, redirectPath, version, btg, handleSubmit, guestRedirectPath, guestText }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("main", {
|
|
8
|
+
className: "w-full h-full flex items-center justify-center bg-login-800 p-8",
|
|
9
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
10
|
+
className: "flex flex-col justify-center items-center bg-login-600 px-4 py-12 rounded-xl w-full max-w-md gap-4 md:gap-6",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx("div", {
|
|
13
|
+
className: "relative aspect-3/1 w-full",
|
|
14
|
+
children: /* @__PURE__ */ jsx(Logo, { className: "object-contain px-6 sm:px-12" })
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ jsxs("h1", {
|
|
17
|
+
className: "text-3xl font-extrabold text-login text-center tracking-tight",
|
|
18
|
+
children: [
|
|
19
|
+
title,
|
|
20
|
+
" ",
|
|
21
|
+
btg ? " - Break the Glass" : ""
|
|
22
|
+
]
|
|
23
|
+
}),
|
|
24
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
25
|
+
className: "text-center font-medium text-lg mb-2 max-w-xs",
|
|
26
|
+
children: description
|
|
27
|
+
}),
|
|
28
|
+
btg ? /* @__PURE__ */ jsxs("form", {
|
|
29
|
+
className: "w-full flex flex-col gap-3 max-w-xs",
|
|
30
|
+
onSubmit: (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
handleSubmit?.(new FormData(e.currentTarget));
|
|
33
|
+
e.currentTarget.reset();
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("input", {
|
|
37
|
+
type: "text",
|
|
38
|
+
name: "name",
|
|
39
|
+
placeholder: "Name",
|
|
40
|
+
className: "py-2 px-3 rounded bg-login-900 font-medium focus:outline-none",
|
|
41
|
+
required: true
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx("input", {
|
|
44
|
+
type: "password",
|
|
45
|
+
name: "token",
|
|
46
|
+
placeholder: "Token",
|
|
47
|
+
className: "py-2 px-3 rounded bg-login-900 font-medium focus:outline-none",
|
|
48
|
+
required: true
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx("button", {
|
|
51
|
+
type: "submit",
|
|
52
|
+
className: "py-2 px-4 rounded-xl bg-login font-bold text-lg hover:bg-login/80 transition-all duration-200 mt-2",
|
|
53
|
+
children: "Login"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}) : /* @__PURE__ */ jsxs(Link, {
|
|
57
|
+
href: redirectPath,
|
|
58
|
+
className: `
|
|
59
|
+
flex items-center justify-center gap-2 w-full
|
|
60
|
+
max-w-xs py-3 px-6 rounded-xl bg-login font-bold
|
|
61
|
+
text-lg hover:bg-login/80 transition-all
|
|
62
|
+
duration-200 mb-2 mt-2 cursor-pointer
|
|
63
|
+
`,
|
|
64
|
+
children: ["Login", /* @__PURE__ */ jsx(LogIn, { className: "w-6 h-6" })]
|
|
65
|
+
}),
|
|
66
|
+
guestRedirectPath && /* @__PURE__ */ jsx(Link, {
|
|
67
|
+
href: guestRedirectPath,
|
|
68
|
+
className: "text-sm font-semibold cursor-pointer opacity-50",
|
|
69
|
+
children: guestText || "Continue as guest"
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "text-sm mt-2",
|
|
73
|
+
children: ["v", version]
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { LoginPage as default };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/logo/logo.tsx
|
|
3
|
+
function Logo({ className }) {
|
|
4
|
+
const corner = "fill-[var(--foreground)] transition-all duration-1000";
|
|
5
|
+
const letter = "fill-none stroke-[var(--color-login)] stroke-[3.5px]";
|
|
6
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
7
|
+
className: `block w-full max-w-2xl mx-auto ${className || ""}`,
|
|
8
|
+
viewBox: "0 0 147.02299 59.20511",
|
|
9
|
+
children: [
|
|
10
|
+
/* @__PURE__ */ jsx("path", {
|
|
11
|
+
className: corner,
|
|
12
|
+
d: "m 28.77713,58.37738 v 0.76465 H 25.531 v -5.61816 h 0.91309 v 4.85351 z"
|
|
13
|
+
}),
|
|
14
|
+
/* @__PURE__ */ jsx("path", {
|
|
15
|
+
className: corner,
|
|
16
|
+
d: "m 30.47831,59.142 h -0.917 v -5.61813 h 0.917 z"
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ jsx("path", {
|
|
19
|
+
className: corner,
|
|
20
|
+
d: "M 36.46268,53.52387 V 59.142 H 35.99881 A 0.36347,0.36347 0 0 1 35.6785,58.98185 L 32.59256,55.018 c 0.0078,0.07617 0.01368,0.15039 0.01758,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.06641,0.07812 l 3.08984,3.96779 c -0.0078,-0.08105 -0.01367,-0.16015 -0.01757,-0.23828 -0.0039,-0.07813 -0.0059,-0.15039 -0.0059,-0.21875 v -3.6631 z"
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("path", {
|
|
23
|
+
className: corner,
|
|
24
|
+
d: "m 39.84549,57.1684 a 2.91264,2.91264 0 0 1 -0.11523,0.84765 1.748,1.748 0 0 1 -0.34375,0.64063 1.52483,1.52483 0 0 1 -0.56543,0.40527 2.00691,2.00691 0 0 1 -0.78223,0.14258 3.23707,3.23707 0 0 1 -0.40234,-0.0254 3.44454,3.44454 0 0 1 -0.41309,-0.0801 l 0.04688,-0.5459 a 0.2079,0.2079 0 0 1 0.06055,-0.125 0.19754,0.19754 0 0 1 0.14257,-0.0469 0.74035,0.74035 0 0 1 0.18067,0.0293 1.36468,1.36468 0 0 0 0.71387,-0.041 0.74722,0.74722 0 0 0 0.3125,-0.2207 0.9864,0.9864 0 0 0 0.1914,-0.38574 2.19551,2.19551 0 0 0 0.06445,-0.57227 v -3.667 h 0.90918 z"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx("path", {
|
|
27
|
+
className: corner,
|
|
28
|
+
d: "m 44.6326,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z"
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsx("path", {
|
|
31
|
+
className: corner,
|
|
32
|
+
d: "M 46.53592,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.50391 v 0.7373 z"
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("path", {
|
|
35
|
+
className: corner,
|
|
36
|
+
d: "m 55.25956,56.33344 a 3.18179,3.18179 0 0 1 -0.20215,1.15039 2.6634,2.6634 0 0 1 -0.57227,0.90722 2.59685,2.59685 0 0 1 -0.88476,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.58781,2.58781 0 0 1 0.88476,0.59668 2.68144,2.68144 0 0 1 0.57227,0.90918 3.1871,3.1871 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.821,1.821 0 0 0 -0.375,-0.65527 1.63008,1.63008 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65415,1.65415 0 0 0 -0.59278,0.41407 1.84212,1.84212 0 0 0 -0.3789,0.65527 2.92611,2.92611 0 0 0 0,1.74316 1.83766,1.83766 0 0 0 0.3789,0.6543 1.64222,1.64222 0 0 0 0.59278,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61838,1.61838 0 0 0 0.59082,-0.40918 1.81652,1.81652 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z"
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ jsx("path", {
|
|
39
|
+
className: corner,
|
|
40
|
+
d: "m 60.534,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 57.17072 V 59.142 H 56.2576 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.03516,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.07715,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 h -0.74121 v 1.97852 z"
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx("path", {
|
|
43
|
+
className: corner,
|
|
44
|
+
d: "m 64.72049,58.40473 -0.0039,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z"
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("path", {
|
|
47
|
+
className: corner,
|
|
48
|
+
d: "M 70.35721,53.52387 V 59.142 H 69.89335 A 0.36347,0.36347 0 0 1 69.57303,58.98185 L 66.4871,55.018 c 0.0078,0.07617 0.01367,0.15039 0.01757,0.22461 0.0039,0.07422 0.0059,0.14258 0.0059,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.09864,0.0059 0.3128,0.3128 0 0 1 0.07617,0.02148 0.22936,0.22936 0 0 1 0.06641,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08985,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ jsx("path", {
|
|
51
|
+
className: corner,
|
|
52
|
+
d: "m 72.6121,59.142 h -0.917 v -5.61813 h 0.917 z"
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx("path", {
|
|
55
|
+
className: corner,
|
|
56
|
+
d: "M 78.59794,53.52387 V 59.142 H 78.13358 A 0.36344,0.36344 0 0 1 77.81327,58.98185 L 74.72733,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.713,0.713 0 0 1 0.0986,0.0059 0.31254,0.31254 0 0 1 0.0762,0.02148 0.22936,0.22936 0 0 1 0.0664,0.04688 0.63869,0.63869 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z"
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx("path", {
|
|
59
|
+
className: corner,
|
|
60
|
+
d: "M 84.53544,56.37641 V 58.6 a 3.24425,3.24425 0 0 1 -1.9502,0.60449 3.419,3.419 0 0 1 -1.23535,-0.21289 2.7275,2.7275 0 0 1 -0.94141,-0.59277 2.59231,2.59231 0 0 1 -0.60156,-0.90723 3.08634,3.08634 0 0 1 -0.21,-1.1582 3.23536,3.23536 0 0 1 0.20215,-1.165 2.5484,2.5484 0 0 1 1.49414,-1.498 3.29189,3.29189 0 0 1 1.20215,-0.209 3.52605,3.52605 0 0 1 0.62988,0.05273 3.11559,3.11559 0 0 1 0.54,0.14649 2.535,2.535 0 0 1 0.84668,0.52246 l -0.26074,0.418 a 0.26545,0.26545 0 0 1 -0.16016,0.12109 0.27377,0.27377 0 0 1 -0.21094,-0.04688 c -0.0752,-0.04492 -0.15527,-0.09082 -0.24023,-0.14062 a 2.01137,2.01137 0 0 0 -0.29,-0.13867 2.127,2.127 0 0 0 -0.37891,-0.10547 2.72656,2.72656 0 0 0 -0.50683,-0.041 2.09434,2.09434 0 0 0 -0.80176,0.14649 1.70173,1.70173 0 0 0 -0.61035,0.418 1.84692,1.84692 0 0 0 -0.39063,0.65722 2.5766,2.5766 0 0 0 -0.13672,0.86231 2.62333,2.62333 0 0 0 0.14453,0.89844 1.88731,1.88731 0 0 0 0.41016,0.67187 1.74772,1.74772 0 0 0 0.6416,0.419 2.55647,2.55647 0 0 0 1.459,0.0703 2.80344,2.80344 0 0 0 0.53222,-0.207 V 57.07074 H 82.928 a 0.19287,0.19287 0 0 1 -0.13964,-0.04883 0.16848,0.16848 0 0 1 -0.0508,-0.12695 v -0.51855 z"
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ jsx("path", {
|
|
63
|
+
className: corner,
|
|
64
|
+
d: "m 89.1243,58.40473 -0.004,0.7373 h -3.50391 v -5.61816 h 3.50391 v 0.7373 h -2.58692 v 1.69336 h 2.06739 v 0.71387 h -2.06739 v 1.73633 z"
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx("path", {
|
|
67
|
+
className: corner,
|
|
68
|
+
d: "M 94.761,53.52387 V 59.142 H 94.29713 A 0.36347,0.36347 0 0 1 93.97682,58.98185 L 90.8909,55.018 c 0.008,0.07617 0.0137,0.15039 0.0176,0.22461 0.004,0.07422 0.006,0.14258 0.006,0.20508 V 59.142 h -0.80371 v -5.61813 h 0.47656 a 0.71321,0.71321 0 0 1 0.0986,0.0059 0.3128,0.3128 0 0 1 0.0762,0.02148 0.22919,0.22919 0 0 1 0.0664,0.04688 0.63781,0.63781 0 0 1 0.0664,0.07812 l 3.08984,3.96777 c -0.008,-0.08105 -0.0137,-0.16015 -0.0176,-0.23828 -0.004,-0.07813 -0.006,-0.15039 -0.006,-0.21875 v -3.66308 z"
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx("path", {
|
|
71
|
+
className: corner,
|
|
72
|
+
d: "M 98.95829,54.26117 V 56.06 h 2.19629 v 0.7373 h -2.19629 v 2.3447 h -0.917 v -5.61813 h 3.5039 v 0.7373 z"
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsx("path", {
|
|
75
|
+
className: corner,
|
|
76
|
+
d: "m 107.68192,56.33344 a 3.18158,3.18158 0 0 1 -0.20215,1.15039 2.66353,2.66353 0 0 1 -0.57226,0.90722 2.597,2.597 0 0 1 -0.88477,0.59473 3.17156,3.17156 0 0 1 -2.29492,0 2.62415,2.62415 0 0 1 -0.88672,-0.59473 2.65327,2.65327 0 0 1 -0.57422,-0.90722 3.37717,3.37717 0 0 1 0,-2.30176 2.67118,2.67118 0 0 1 0.57422,-0.90918 2.61491,2.61491 0 0 1 0.88672,-0.59668 3.1717,3.1717 0 0 1 2.29492,0 2.588,2.588 0 0 1 0.88477,0.59668 2.68157,2.68157 0 0 1 0.57226,0.90918 3.18689,3.18689 0 0 1 0.20215,1.15137 z m -0.93164,0 a 2.706,2.706 0 0 0 -0.13086,-0.87012 1.82066,1.82066 0 0 0 -0.375,-0.65527 1.63,1.63 0 0 0 -0.59082,-0.41407 2.16795,2.16795 0 0 0 -1.55664,0 1.65411,1.65411 0 0 0 -0.59277,0.41407 1.84214,1.84214 0 0 0 -0.37891,0.65527 2.92632,2.92632 0 0 0 0,1.74316 1.83768,1.83768 0 0 0 0.37891,0.6543 1.64218,1.64218 0 0 0 0.59277,0.40918 2.19564,2.19564 0 0 0 1.55664,0 1.61829,1.61829 0 0 0 0.59082,-0.40918 1.81623,1.81623 0 0 0 0.375,-0.6543 2.71589,2.71589 0 0 0 0.13086,-0.87304 z"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx("path", {
|
|
79
|
+
className: corner,
|
|
80
|
+
d: "m 112.95731,59.142 h -0.81543 a 0.377,0.377 0 0 1 -0.35156,-0.1875 l -1.31055,-1.8916 a 0.4267,0.4267 0 0 0 -0.14453,-0.14063 0.50286,0.50286 0 0 0 -0.23437,-0.043 H 109.594 V 59.142 h -0.91309 v -5.61813 h 1.6543 a 3.54427,3.54427 0 0 1 0.9541,0.11328 1.80649,1.80649 0 0 1 0.65723,0.32226 1.25606,1.25606 0 0 1 0.37988,0.501 1.76427,1.76427 0 0 1 0.0352,1.19727 1.50418,1.50418 0 0 1 -0.25293,0.46093 1.61283,1.61283 0 0 1 -0.40821,0.3584 2.04861,2.04861 0 0 1 -0.5498,0.23828 0.92346,0.92346 0 0 1 0.28906,0.28516 z m -2.64551,-2.92578 a 1.763,1.763 0 0 0 0.5459,-0.07617 1.11007,1.11007 0 0 0 0.39063,-0.21289 0.87892,0.87892 0 0 0 0.23437,-0.3252 1.10093,1.10093 0 0 0 0.0772,-0.41992 0.84276,0.84276 0 0 0 -0.30371,-0.70215 1.46527,1.46527 0 0 0 -0.9209,-0.24219 H 109.594 v 1.97852 z"
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsx("path", {
|
|
83
|
+
className: corner,
|
|
84
|
+
d: "m 116.4954,59.142 h -0.917 v -5.61813 h 0.917 z"
|
|
85
|
+
}),
|
|
86
|
+
/* @__PURE__ */ jsx("path", {
|
|
87
|
+
className: corner,
|
|
88
|
+
d: "m 121.69559,54.28461 h -1.75195 V 59.142 h -0.9082 v -4.85739 h -1.75586 v -0.76074 h 4.416 z"
|
|
89
|
+
}),
|
|
90
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
91
|
+
className: letter,
|
|
92
|
+
style: { strokeMiterlimit: 10 },
|
|
93
|
+
points: "47.871 98.1 33.189 98.1 33.189 83.418",
|
|
94
|
+
transform: "translate(-31.392,-41.894)"
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
97
|
+
className: letter,
|
|
98
|
+
style: { strokeMiterlimit: 10 },
|
|
99
|
+
points: "33.142 58.326 33.142 43.644 47.824 43.644",
|
|
100
|
+
transform: "translate(-31.392,-41.894)"
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
103
|
+
className: letter,
|
|
104
|
+
style: { strokeMiterlimit: 10 },
|
|
105
|
+
points: "161.983 98.122 176.665 98.122 176.665 83.44",
|
|
106
|
+
transform: "translate(-31.392,-41.894)"
|
|
107
|
+
}),
|
|
108
|
+
/* @__PURE__ */ jsx("polyline", {
|
|
109
|
+
className: letter,
|
|
110
|
+
style: { strokeMiterlimit: 10 },
|
|
111
|
+
points: "176.665 58.372 176.665 43.69 161.983 43.69",
|
|
112
|
+
transform: "translate(-31.392,-41.894)"
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsx("path", {
|
|
115
|
+
className: corner,
|
|
116
|
+
d: "m 30.02449,40.19351 v 4.12842 H 12.4991 V 13.99038 h 4.92871 v 26.20313 z"
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsx("path", {
|
|
119
|
+
className: corner,
|
|
120
|
+
d: "m 61.53523,29.1564 a 17.15942,17.15942 0 0 1 -1.09473,6.21338 14.35971,14.35971 0 0 1 -3.08593,4.89746 14.091,14.091 0 0 1 -4.78125,3.21191 17.1289,17.1289 0 0 1 -12.38575,0 13.98317,13.98317 0 0 1 -7.88867,-8.10937 18.18161,18.18161 0 0 1 0,-12.42725 14.39119,14.39119 0 0 1 3.09668,-4.90771 14.13157,14.13157 0 0 1 4.792,-3.22315 17.13565,17.13565 0 0 1 12.38575,0 14.02046,14.02046 0 0 1 4.78125,3.22315 14.47032,14.47032 0 0 1 3.08593,4.90771 17.16209,17.16209 0 0 1 1.09472,6.21387 z m -5.03418,0 a 14.62587,14.62587 0 0 0 -0.70508,-4.69727 9.9446,9.9446 0 0 0 -2.02246,-3.53906 8.80545,8.80545 0 0 0 -3.1914,-2.23242 11.719,11.719 0 0 0 -8.4043,0 8.90077,8.90077 0 0 0 -3.20117,2.23242 9.96735,9.96735 0 0 0 -2.043,3.53906 15.81644,15.81644 0 0 0 0,9.415 9.847,9.847 0 0 0 2.043,3.52832 8.85094,8.85094 0 0 0 3.20117,2.21192 11.87213,11.87213 0 0 0 8.4043,0 8.75623,8.75623 0 0 0 3.1914,-2.21192 9.82454,9.82454 0 0 0 2.02249,-3.52828 14.69371,14.69371 0 0 0 0.70505,-4.71777 z"
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx("path", {
|
|
123
|
+
className: corner,
|
|
124
|
+
d: "m 91.76082,29.38784 v 12.00635 a 17.5354,17.5354 0 0 1 -10.53125,3.26465 18.41512,18.41512 0 0 1 -6.667,-1.148 14.80254,14.80254 0 0 1 -5.08691,-3.20166 14.0148,14.0148 0 0 1 -3.24316,-4.897 16.691,16.691 0 0 1 -1.1377,-6.25586 17.42935,17.42935 0 0 1 1.09473,-6.2876 13.74023,13.74023 0 0 1 8.06738,-8.08838 17.7222,17.7222 0 0 1 6.48828,-1.127 19.10354,19.10354 0 0 1 3.40137,0.28418 16.85244,16.85244 0 0 1 2.917,0.79 13.68442,13.68442 0 0 1 2.48633,1.22168 13.95372,13.95372 0 0 1 2.085,1.60058 l -1.41113,2.25391 a 1.40229,1.40229 0 0 1 -0.86426,0.65283 1.47784,1.47784 0 0 1 -1.13672,-0.25244 q -0.6123,-0.35816 -1.2959,-0.7583 a 11.33129,11.33129 0 0 0 -1.56933,-0.748 11.53387,11.53387 0 0 0 -2.043,-0.56836 14.78335,14.78335 0 0 0 -2.73828,-0.22119 11.32128,11.32128 0 0 0 -4.32813,0.78955 9.26752,9.26752 0 0 0 -3.29687,2.25391 9.99164,9.99164 0 0 0 -2.10645,3.54931 13.90267,13.90267 0 0 0 -0.7373,4.65528 14.11731,14.11731 0 0 0 0.77929,4.855 10.1425,10.1425 0 0 0 2.21192,3.62305 9.43419,9.43419 0 0 0 3.46484,2.26416 13.81975,13.81975 0 0 0 7.87793,0.3789 15.14816,15.14816 0 0 0 2.875,-1.11621 v -6.02383 h -4.2334 a 1.04883,1.04883 0 0 1 -0.75879,-0.26367 0.90553,0.90553 0 0 1 -0.27343,-0.68457 v -2.80127 z"
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ jsx("path", {
|
|
127
|
+
className: corner,
|
|
128
|
+
d: "M 102.546,44.32193 H 97.59581 V 13.99038 h 4.95019 z"
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ jsx("path", {
|
|
131
|
+
className: corner,
|
|
132
|
+
d: "m 134.8575,13.99038 v 30.33155 h -2.50684 a 2.14219,2.14219 0 0 1 -0.96875,-0.2002 2.26108,2.26108 0 0 1 -0.75879,-0.66357 L 113.962,22.05777 q 0.063,0.61083 0.0947,1.21093 0.0322,0.60058 0.0322,1.106 v 19.94723 h -4.3398 V 13.99038 h 2.57031 a 3.89092,3.89092 0 0 1 0.53711,0.03174 1.53328,1.53328 0 0 1 0.41016,0.11572 1.18964,1.18964 0 0 1 0.35839,0.25293 4.01792,4.01792 0 0 1 0.3584,0.4209 l 16.68164,21.42188 q -0.063,-0.65259 -0.0947,-1.28467 -0.0308,-0.63208 -0.0312,-1.17969 V 13.99038 Z"
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { Logo as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/logo/logoSmall.tsx
|
|
3
|
+
function LogoSmall() {
|
|
4
|
+
const corner = "fill-login";
|
|
5
|
+
const letter = "fill-[var(--foreground)] transition-all duration-1000";
|
|
6
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
7
|
+
className: "block h-full",
|
|
8
|
+
viewBox: "0 0 100 100",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ jsx("path", {
|
|
13
|
+
className: corner,
|
|
14
|
+
d: "M0 0H6.6667V28.3333H0V0Z"
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ jsx("path", {
|
|
17
|
+
className: corner,
|
|
18
|
+
d: "M28.3333 0V6.6667H0V0H28.3333Z"
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ jsx("path", {
|
|
21
|
+
className: corner,
|
|
22
|
+
d: "M100 0V6.6667H71.6667V0H100Z"
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ jsx("path", {
|
|
25
|
+
className: corner,
|
|
26
|
+
d: "M100 28.3333H93.3333V0H100V28.3333Z"
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsx("path", {
|
|
29
|
+
className: corner,
|
|
30
|
+
d: "M0 100V93.3333H28.3333V100H0Z"
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("path", {
|
|
33
|
+
className: corner,
|
|
34
|
+
d: "M0 71.6667H6.6667V100H0V71.6667Z"
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("path", {
|
|
37
|
+
className: corner,
|
|
38
|
+
d: "M100 100H93.3333V71.6667H100V100Z"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx("path", {
|
|
41
|
+
className: corner,
|
|
42
|
+
d: "M71.6667 100V93.3333H100V100H71.6667Z"
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsx("path", {
|
|
45
|
+
className: letter,
|
|
46
|
+
d: "M31.6667 18.3333H43.3334V81.6666H31.6667V18.3333Z"
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx("path", {
|
|
49
|
+
className: letter,
|
|
50
|
+
d: "M31.6667 70H68.3334V81.6667H31.6667V70Z"
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { LogoSmall as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Components } from "react-markdown";
|
|
2
|
+
|
|
3
|
+
//#region src/components/markdownrender/markdownRender.d.ts
|
|
4
|
+
declare function MarkdownRender({
|
|
5
|
+
MDstr,
|
|
6
|
+
components,
|
|
7
|
+
className,
|
|
8
|
+
size
|
|
9
|
+
}: {
|
|
10
|
+
MDstr: string;
|
|
11
|
+
components?: Components;
|
|
12
|
+
className?: string;
|
|
13
|
+
size?: 'sm' | 'base' | 'lg' | 'xl';
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { MarkdownRender as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ExternalLink } from "lucide-react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Markdown from "react-markdown";
|
|
4
|
+
import remarkGfm from "remark-gfm";
|
|
5
|
+
import rehypeHighlight from "rehype-highlight";
|
|
6
|
+
//#region src/components/markdownrender/markdownRender.tsx
|
|
7
|
+
function makeDefaultComponents() {
|
|
8
|
+
return {
|
|
9
|
+
h1: ({ ...props }) => /* @__PURE__ */ jsx("h2", { ...props }),
|
|
10
|
+
input({ type, checked }) {
|
|
11
|
+
if (type !== "checkbox") return /* @__PURE__ */ jsx("input", { type });
|
|
12
|
+
return /* @__PURE__ */ jsx("span", {
|
|
13
|
+
"data-task-checkbox": true,
|
|
14
|
+
className: `inline-flex items-center justify-center w-4 h-4 rounded-xs border-2 shrink-0 align-middle
|
|
15
|
+
${checked ? "bg-login border-login" : "border-login/50"}`,
|
|
16
|
+
children: checked && /* @__PURE__ */ jsx("svg", {
|
|
17
|
+
viewBox: "0 0 10 8",
|
|
18
|
+
className: "w-2.5 h-2.5 fill-none stroke-white stroke-2",
|
|
19
|
+
children: /* @__PURE__ */ jsx("polyline", {
|
|
20
|
+
points: "1,4 4,7 9,1",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round"
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
a({ href, children }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
29
|
+
href,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
rel: "noopener noreferrer",
|
|
32
|
+
className: "inline-flex items-center gap-1 text-login hover:text-login/80 underline underline-offset-2 transition-colors",
|
|
33
|
+
children: [children, /* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 shrink-0 opacity-70" })]
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
pre({ children }) {
|
|
37
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
38
|
+
className: "block rounded-lg overflow-auto whitespace-pre-wrap wrap-break-word w-full",
|
|
39
|
+
children
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function MarkdownRender({ MDstr, components, className, size }) {
|
|
45
|
+
return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: className ?? `prose ${size === "sm" ? "prose-sm" : size === "lg" ? "prose-lg" : size === "xl" ? "prose-xl" : ""} prose-custom max-w-none`,
|
|
47
|
+
children: /* @__PURE__ */ jsx(Markdown, {
|
|
48
|
+
components: {
|
|
49
|
+
...makeDefaultComponents(),
|
|
50
|
+
...components
|
|
51
|
+
},
|
|
52
|
+
remarkPlugins: [remarkGfm],
|
|
53
|
+
rehypePlugins: [rehypeHighlight],
|
|
54
|
+
children: MDstr.replace(/\\n/g, "\n")
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { MarkdownRender as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/modal/modal.d.ts
|
|
4
|
+
type ModalSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
type ModalProps = {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
title?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
size?: ModalSize;
|
|
12
|
+
};
|
|
13
|
+
declare function Modal({
|
|
14
|
+
isOpen,
|
|
15
|
+
onClose,
|
|
16
|
+
title,
|
|
17
|
+
children,
|
|
18
|
+
footer,
|
|
19
|
+
size
|
|
20
|
+
}: ModalProps): import("react").JSX.Element | null;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Modal as default };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { X } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/modal/modal.tsx
|
|
6
|
+
const sizes = {
|
|
7
|
+
sm: "max-w-sm",
|
|
8
|
+
md: "max-w-md",
|
|
9
|
+
lg: "max-w-lg"
|
|
10
|
+
};
|
|
11
|
+
function Modal({ isOpen, onClose, title, children, footer, size = "md" }) {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!isOpen) return;
|
|
14
|
+
const handler = (e) => {
|
|
15
|
+
if (e.key === "Escape") onClose();
|
|
16
|
+
};
|
|
17
|
+
document.addEventListener("keydown", handler);
|
|
18
|
+
return () => document.removeEventListener("keydown", handler);
|
|
19
|
+
}, [isOpen, onClose]);
|
|
20
|
+
if (!isOpen) return null;
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
role: "dialog",
|
|
23
|
+
"aria-modal": "true",
|
|
24
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
25
|
+
onClick: onClose,
|
|
26
|
+
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm" }), /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: `
|
|
28
|
+
relative z-10 mx-4 w-full ${sizes[size]}
|
|
29
|
+
flex flex-col rounded-xl border border-login-500/50
|
|
30
|
+
bg-login-800 shadow-2xl
|
|
31
|
+
`,
|
|
32
|
+
onClick: (e) => e.stopPropagation(),
|
|
33
|
+
children: [
|
|
34
|
+
title && /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
className: "flex items-center justify-between px-6 pt-5 pb-4 border-b border-login-500/25",
|
|
36
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
37
|
+
className: "text-login-50 text-base font-semibold leading-snug",
|
|
38
|
+
children: title
|
|
39
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
onClick: onClose,
|
|
42
|
+
className: "\n cursor-pointer rounded-md p-1.5\n text-login-400 hover:text-login-100 hover:bg-login-600\n transition-colors\n ",
|
|
43
|
+
children: /* @__PURE__ */ jsx(X, { className: "w-4 h-4" })
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("div", {
|
|
47
|
+
className: "p-6",
|
|
48
|
+
children
|
|
49
|
+
}),
|
|
50
|
+
footer && /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: "px-6 pb-5 pt-4 border-t border-login-500/25",
|
|
52
|
+
children: footer
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Modal as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { X } from "lucide-react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/navbar/bubble.tsx
|
|
4
|
+
function Bubble({ bubble }) {
|
|
5
|
+
if (bubble.hide) return null;
|
|
6
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
7
|
+
href: bubble.href,
|
|
8
|
+
className: `absolute top-13 min-w-40 ${bubble.className}`,
|
|
9
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
10
|
+
viewBox: "0 0 24 12",
|
|
11
|
+
className: "absolute -top-3 h-3 w-6",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
14
|
+
d: "M12 0 24 12H0Z",
|
|
15
|
+
fill: bubble.fill,
|
|
16
|
+
stroke: bubble.stroke,
|
|
17
|
+
strokeWidth: "1.5",
|
|
18
|
+
strokeLinejoin: "round"
|
|
19
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
20
|
+
d: "M12 0 24 12H0Z",
|
|
21
|
+
fill: bubble.fill
|
|
22
|
+
})]
|
|
23
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
className: "flex justify-between",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "min-w-40",
|
|
27
|
+
children: bubble.text
|
|
28
|
+
}), /* @__PURE__ */ jsx(X, {
|
|
29
|
+
onClick: bubble.handleHide,
|
|
30
|
+
className: bubble.x
|
|
31
|
+
})]
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Bubble as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Language } from "uibee/components";
|
|
3
|
+
|
|
4
|
+
//#region src/components/navbar/navbar.d.ts
|
|
5
|
+
type NavbarProps = {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
bubble?: {
|
|
8
|
+
lang?: BubbleContent;
|
|
9
|
+
theme?: BubbleContent;
|
|
10
|
+
login?: BubbleContent;
|
|
11
|
+
};
|
|
12
|
+
className?: string;
|
|
13
|
+
disableLanguageToggle?: boolean;
|
|
14
|
+
disableThemeToggle?: boolean;
|
|
15
|
+
innerClassName?: string;
|
|
16
|
+
lang?: Language;
|
|
17
|
+
loginPath: string;
|
|
18
|
+
logoutPath: string;
|
|
19
|
+
onlyLogo?: boolean;
|
|
20
|
+
profilePath?: string;
|
|
21
|
+
theme?: string;
|
|
22
|
+
token?: string | null;
|
|
23
|
+
};
|
|
24
|
+
type BubbleContent = {
|
|
25
|
+
condition: boolean;
|
|
26
|
+
href: string;
|
|
27
|
+
className: string;
|
|
28
|
+
text: string;
|
|
29
|
+
fill: string;
|
|
30
|
+
stroke: string;
|
|
31
|
+
x: string;
|
|
32
|
+
hide: boolean;
|
|
33
|
+
handleHide: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
|
|
34
|
+
};
|
|
35
|
+
declare function Navbar({
|
|
36
|
+
children,
|
|
37
|
+
bubble,
|
|
38
|
+
className,
|
|
39
|
+
disableLanguageToggle,
|
|
40
|
+
disableThemeToggle,
|
|
41
|
+
innerClassName,
|
|
42
|
+
lang,
|
|
43
|
+
loginPath,
|
|
44
|
+
logoutPath,
|
|
45
|
+
onlyLogo,
|
|
46
|
+
profilePath,
|
|
47
|
+
token
|
|
48
|
+
}: NavbarProps): React.JSX.Element;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { NavbarProps, Navbar as default };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import LogoSmall from "../logo/logoSmall.js";
|
|
3
|
+
import ThemeToggle from "../toggle/theme.js";
|
|
4
|
+
import LanguageToggle from "../toggle/language.js";
|
|
5
|
+
import Bubble from "./bubble.js";
|
|
6
|
+
import React, { useState } from "react";
|
|
7
|
+
import { LogOut, User } from "lucide-react";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import Link from "next/link.js";
|
|
10
|
+
//#region src/components/navbar/navbar.tsx
|
|
11
|
+
function Navbar({ children, bubble, className, disableLanguageToggle, disableThemeToggle, innerClassName, lang, loginPath, logoutPath, onlyLogo, profilePath, token }) {
|
|
12
|
+
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
13
|
+
return /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: `${isMobileMenuOpen ? "bg-[#181818f0]" : "bg-[#18181899]"} backdrop-blur-xl fixed top-0 z-900 w-full ${className}`,
|
|
15
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
className: `flex w-full max-w-6xl m-auto p-2 transition duration-500 800px:justify-between 800px:p-4 ${isMobileMenuOpen ? "h-screen bg-login-900/20 800px:h-20" : ""} ${innerClassName}
|
|
17
|
+
`,
|
|
18
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: "block h-12 p-1 800px:p-0",
|
|
20
|
+
children: /* @__PURE__ */ jsx(Link, {
|
|
21
|
+
href: "/",
|
|
22
|
+
onClick: () => setIsMobileMenuOpen(false),
|
|
23
|
+
children: /* @__PURE__ */ jsx(LogoSmall, {})
|
|
24
|
+
})
|
|
25
|
+
}), onlyLogo ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
|
+
/* @__PURE__ */ jsx("nav", {
|
|
27
|
+
className: "hidden 800px:flex 800px:justify-between 800px:items-center 800px:w-fill max-w-200",
|
|
28
|
+
children
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ jsxs("nav", {
|
|
31
|
+
className: "flex w-[calc(100vw-8rem)] justify-end h-12 800px:w-fit",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "relative grid gap-2",
|
|
35
|
+
children: [!disableThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}), bubble?.theme?.condition && /* @__PURE__ */ jsx(Bubble, { bubble: bubble.theme })]
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: "relative grid gap-2",
|
|
39
|
+
children: [!disableLanguageToggle && /* @__PURE__ */ jsx(LanguageToggle, { language: lang }), bubble?.lang?.condition && /* @__PURE__ */ jsx(Bubble, { bubble: bubble.lang })]
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", {
|
|
42
|
+
className: "relative grid gap-2",
|
|
43
|
+
children: [loginPath && logoutPath && /* @__PURE__ */ jsx(AuthButton, {
|
|
44
|
+
profilePath,
|
|
45
|
+
token,
|
|
46
|
+
loginPath,
|
|
47
|
+
logoutPath
|
|
48
|
+
}), bubble?.login?.condition && /* @__PURE__ */ jsx(Bubble, { bubble: bubble.login })]
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs("button", {
|
|
53
|
+
className: "w-12 h-12 relative cursor-pointer bg-none border-none 800px:hidden",
|
|
54
|
+
onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen),
|
|
55
|
+
children: [/* @__PURE__ */ jsx("div", { className: hamburgerStyle(isMobileMenuOpen) }), /* @__PURE__ */ jsx("div", { className: hamburgerStyle(isMobileMenuOpen, true) })]
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx("nav", {
|
|
58
|
+
className: `fixed top-16 w-[calc(100%-2rem)] max-w-140 mx-auto left-0 right-0 800px:hidden
|
|
59
|
+
transition-all duration-500 ease-in-out overflow-hidden
|
|
60
|
+
${isMobileMenuOpen ? "max-h-[calc(100vh-4rem)] opacity-100" : "max-h-0 opacity-0"}`,
|
|
61
|
+
onClick: () => setIsMobileMenuOpen(false),
|
|
62
|
+
children: React.Children.map(children, (child, index) => /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: `transition-all duration-500 ease-out ${isMobileMenuOpen ? "opacity-100 transform translate-y-0" : "opacity-0 transform -translate-y-4"}`,
|
|
64
|
+
style: { transitionDelay: isMobileMenuOpen ? `${index * 80}ms` : "0ms" },
|
|
65
|
+
children: child
|
|
66
|
+
}, index))
|
|
67
|
+
})
|
|
68
|
+
] })]
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function AuthButton({ profilePath, logoutPath, loginPath, token }) {
|
|
73
|
+
return /* @__PURE__ */ jsx("div", {
|
|
74
|
+
className: "rounded-[0.3rem] hover:bg-login-300/20 h-12 w-12",
|
|
75
|
+
children: token ? /* @__PURE__ */ jsxs(Fragment, { children: [logoutPath && /* @__PURE__ */ jsx(Link, {
|
|
76
|
+
href: logoutPath,
|
|
77
|
+
prefetch: false,
|
|
78
|
+
onClick: (e) => {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
window.location.href = logoutPath;
|
|
81
|
+
},
|
|
82
|
+
className: "grid items-center justify-center h-full w-full",
|
|
83
|
+
children: /* @__PURE__ */ jsx(LogOut, { size: 24 })
|
|
84
|
+
}), profilePath && /* @__PURE__ */ jsx(Link, {
|
|
85
|
+
href: profilePath,
|
|
86
|
+
className: "grid items-center justify-center h-full w-full",
|
|
87
|
+
children: /* @__PURE__ */ jsx(User, { size: 24 })
|
|
88
|
+
})] }) : /* @__PURE__ */ jsx(Link, {
|
|
89
|
+
href: loginPath,
|
|
90
|
+
className: "grid items-center justify-center h-full w-full",
|
|
91
|
+
children: /* @__PURE__ */ jsx(User, { size: 24 })
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function hamburgerStyle(isOpen, isSecond) {
|
|
96
|
+
return `bg-login-50 h-0.5 absolute w-8 transition-all duration-[400ms] left-2 ${isOpen ? `top-6 ${isSecond ? "rotate-45" : "-rotate-45"}` : isSecond ? "top-7" : "top-4"}`;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { Navbar as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/navbar/navbarDropdown.d.ts
|
|
4
|
+
type NavDropdownProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
title: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function NavDropdown({
|
|
10
|
+
children,
|
|
11
|
+
title,
|
|
12
|
+
className
|
|
13
|
+
}: NavDropdownProps): React.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { NavDropdownProps, NavDropdown as default };
|