uibee 3.2.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} +155 -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 -901
- package/dist/src/components/index.js +49 -4160
- 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 +65 -28
- 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/sidebar/sidebar.tsx +37 -10
- package/src/components/toast/toastItem.tsx +2 -0
- package/src/globals.css +6 -1
- package/tsdown.config.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/alert/alert.d.ts
|
|
4
|
+
type AlertProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
variant?: 'warning' | 'info';
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function Alert({
|
|
10
|
+
children,
|
|
11
|
+
variant,
|
|
12
|
+
className
|
|
13
|
+
}: AlertProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Alert as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import LeftBarPanel from "../container/leftBarPanel.js";
|
|
2
|
+
import { CircleAlert, Info } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/alert/alert.tsx
|
|
5
|
+
const styles = {
|
|
6
|
+
warning: {
|
|
7
|
+
color: "border-l-red-500",
|
|
8
|
+
iconClass: "w-4 h-4 shrink-0 stroke-red-400 mr-3 mt-0.5",
|
|
9
|
+
Icon: CircleAlert
|
|
10
|
+
},
|
|
11
|
+
info: {
|
|
12
|
+
color: "border-l-blue-500",
|
|
13
|
+
iconClass: "w-4 h-4 shrink-0 stroke-blue-400 mr-3 mt-0.5",
|
|
14
|
+
Icon: Info
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
function Alert({ children, variant = "warning", className = "" }) {
|
|
18
|
+
const { color, iconClass, Icon } = styles[variant] ?? styles.warning;
|
|
19
|
+
return /* @__PURE__ */ jsxs(LeftBarPanel, {
|
|
20
|
+
color,
|
|
21
|
+
className: `flex items-start px-4 py-3 text-sm text-login-100 ${className}`,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: iconClass }), /* @__PURE__ */ jsx("div", {
|
|
23
|
+
className: "leading-relaxed",
|
|
24
|
+
children
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Alert as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/badge/badge.d.ts
|
|
2
|
+
type BadgeVariant = 'default' | 'success' | 'warning' | 'danger' | 'info' | 'amber' | 'violet' | 'blue' | 'emerald' | 'orange';
|
|
3
|
+
type BadgeProps = {
|
|
4
|
+
text: string;
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
size?: 'sm' | 'md';
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function Badge({
|
|
10
|
+
text,
|
|
11
|
+
variant,
|
|
12
|
+
size,
|
|
13
|
+
className
|
|
14
|
+
}: BadgeProps): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Badge as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/badge/badge.tsx
|
|
3
|
+
const variants = {
|
|
4
|
+
default: "bg-login-600 text-login-100",
|
|
5
|
+
success: "bg-emerald-500/15 text-emerald-400",
|
|
6
|
+
warning: "bg-yellow-500/15 text-yellow-400",
|
|
7
|
+
danger: "bg-red-500/15 text-red-400",
|
|
8
|
+
info: "bg-sky-500/15 text-sky-400",
|
|
9
|
+
amber: "bg-amber-500/15 text-amber-400",
|
|
10
|
+
violet: "bg-violet-500/15 text-violet-400",
|
|
11
|
+
blue: "bg-blue-500/15 text-blue-400",
|
|
12
|
+
emerald: "bg-emerald-500/15 text-emerald-400",
|
|
13
|
+
orange: "bg-login/15 text-login"
|
|
14
|
+
};
|
|
15
|
+
const sizes = {
|
|
16
|
+
sm: "px-2 py-0.5 text-xs",
|
|
17
|
+
md: "px-2.5 py-1 text-sm"
|
|
18
|
+
};
|
|
19
|
+
function Badge({ text, variant = "default", size = "sm", className = "" }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("span", {
|
|
21
|
+
className: `inline-flex items-center rounded-full font-medium ${variants[variant]} ${sizes[size]} ${className}`,
|
|
22
|
+
children: text
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Badge as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSX } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/buttons/button.d.ts
|
|
4
|
+
type ButtonProps = {
|
|
5
|
+
text?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
icon?: string | JSX.Element;
|
|
8
|
+
path?: string;
|
|
9
|
+
type?: 'button' | 'submit' | 'reset';
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'warning' | 'danger' | 'success' | 'info';
|
|
11
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare function Button({
|
|
15
|
+
text,
|
|
16
|
+
className,
|
|
17
|
+
icon,
|
|
18
|
+
path,
|
|
19
|
+
variant,
|
|
20
|
+
type,
|
|
21
|
+
onClick,
|
|
22
|
+
disabled
|
|
23
|
+
}: ButtonProps): JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Button as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link.js";
|
|
4
|
+
//#region src/components/buttons/button.tsx
|
|
5
|
+
const variants = {
|
|
6
|
+
primary: "bg-login text-white hover:brightness-110",
|
|
7
|
+
secondary: "bg-login-500 text-login-50 hover:bg-login-400",
|
|
8
|
+
warning: "bg-yellow-500 text-black hover:brightness-110",
|
|
9
|
+
danger: "bg-red-600 text-white hover:brightness-110",
|
|
10
|
+
success: "bg-green-600 text-white hover:brightness-110",
|
|
11
|
+
info: "bg-blue-600 text-white hover:brightness-110"
|
|
12
|
+
};
|
|
13
|
+
const base = "cursor-pointer rounded-md h-9 flex items-center justify-center gap-2 select-none text-sm font-medium transition-all duration-150";
|
|
14
|
+
const withText = "px-4 w-fit";
|
|
15
|
+
const iconOnly = "w-9";
|
|
16
|
+
const disabledCls = "opacity-40 cursor-not-allowed pointer-events-none";
|
|
17
|
+
const iconWrap = (icon) => icon ? /* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "[&>svg]:w-4 [&>svg]:h-4 flex items-center",
|
|
19
|
+
children: icon
|
|
20
|
+
}) : null;
|
|
21
|
+
function Button({ text, className, icon, path, variant = "primary", type, onClick, disabled }) {
|
|
22
|
+
const color = variants[variant];
|
|
23
|
+
const sizing = icon && !text ? iconOnly : withText;
|
|
24
|
+
const cls = `${base} ${sizing} ${color} ${disabled ? disabledCls : ""} ${className || ""}`;
|
|
25
|
+
if (!path) return /* @__PURE__ */ jsxs("button", {
|
|
26
|
+
type: type || "button",
|
|
27
|
+
disabled,
|
|
28
|
+
onClick,
|
|
29
|
+
"aria-label": text,
|
|
30
|
+
className: cls,
|
|
31
|
+
children: [iconWrap(icon), text]
|
|
32
|
+
});
|
|
33
|
+
if (disabled) return /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: cls,
|
|
35
|
+
children: [iconWrap(icon), text]
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ jsxs(Link, {
|
|
38
|
+
href: path,
|
|
39
|
+
className: `${base} ${sizing} ${color} ${className || ""}`,
|
|
40
|
+
children: [iconWrap(icon), text]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Button as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/code/code.d.ts
|
|
4
|
+
type CodeProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function Code({
|
|
9
|
+
children,
|
|
10
|
+
className
|
|
11
|
+
}: CodeProps): import("react").JSX.Element;
|
|
12
|
+
type CodeBlockProps = {
|
|
13
|
+
code: string;
|
|
14
|
+
language?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function CodeBlock({
|
|
18
|
+
code,
|
|
19
|
+
language,
|
|
20
|
+
className
|
|
21
|
+
}: CodeBlockProps): import("react").JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Code, CodeBlock };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Check, Copy } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/code/code.tsx
|
|
6
|
+
function Code({ children, className = "" }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("code", {
|
|
8
|
+
className: `font-mono text-xs bg-login-700 text-login px-1.5 py-0.5 rounded ${className}`,
|
|
9
|
+
children
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function CodeBlock({ code, language, className = "" }) {
|
|
13
|
+
const [copied, setCopied] = useState(false);
|
|
14
|
+
function copy() {
|
|
15
|
+
navigator.clipboard.writeText(code);
|
|
16
|
+
setCopied(true);
|
|
17
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: `relative group rounded-xl border border-login-500/30 bg-login-900 overflow-hidden ${className}`,
|
|
21
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex items-center justify-between px-4 py-2 border-b border-login-500/20 bg-login-800",
|
|
23
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "text-xs font-mono text-login-400",
|
|
25
|
+
children: language ?? ""
|
|
26
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: copy,
|
|
29
|
+
className: "flex cursor-pointer items-center gap-1.5 text-xs text-login-400 hover:text-login-100 transition-colors",
|
|
30
|
+
children: [copied ? /* @__PURE__ */ jsx(Check, { className: "w-3.5 h-3.5 stroke-emerald-400" }) : /* @__PURE__ */ jsx(Copy, { className: "w-3.5 h-3.5" }), copied ? "Copied" : "Copy"]
|
|
31
|
+
})]
|
|
32
|
+
}), /* @__PURE__ */ jsx("pre", {
|
|
33
|
+
className: "overflow-x-auto p-4 text-xs font-mono leading-relaxed text-login-100",
|
|
34
|
+
children: /* @__PURE__ */ jsx("code", { children: code })
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Code, CodeBlock };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/components/confirm/confirmPopup.d.ts
|
|
2
|
+
type ConfirmPopupProps = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
header: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
variant?: 'danger' | 'warning' | 'default';
|
|
11
|
+
};
|
|
12
|
+
declare function ConfirmPopup({
|
|
13
|
+
isOpen,
|
|
14
|
+
header,
|
|
15
|
+
description,
|
|
16
|
+
confirmText,
|
|
17
|
+
cancelText,
|
|
18
|
+
onConfirm,
|
|
19
|
+
onCancel,
|
|
20
|
+
variant
|
|
21
|
+
}: ConfirmPopupProps): import("react").JSX.Element | null;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ConfirmPopup as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TriangleAlert } from "lucide-react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/confirm/confirmPopup.tsx
|
|
5
|
+
function ConfirmPopup({ isOpen, header, description, confirmText = "Confirm", cancelText = "Cancel", onConfirm, onCancel, variant = "default" }) {
|
|
6
|
+
if (!isOpen) return null;
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
8
|
+
role: "dialog",
|
|
9
|
+
"aria-modal": "true",
|
|
10
|
+
"aria-labelledby": "confirm-popup-header",
|
|
11
|
+
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
12
|
+
onClick: onCancel,
|
|
13
|
+
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm" }), /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: "\n relative z-10 w-full max-w-md mx-4\n bg-login-800 border border-login-500/50 rounded-xl\n shadow-2xl p-6 flex flex-col gap-4\n ",
|
|
15
|
+
onClick: (e) => e.stopPropagation(),
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex items-start gap-3",
|
|
19
|
+
children: [variant !== "default" && /* @__PURE__ */ jsx(TriangleAlert, { className: `w-5 h-5 shrink-0 mt-0.5 ${variant === "danger" ? "stroke-red-400" : "stroke-yellow-400"}` }), /* @__PURE__ */ jsx("h2", {
|
|
20
|
+
id: "confirm-popup-header",
|
|
21
|
+
className: "text-login-50 text-base font-semibold leading-snug",
|
|
22
|
+
children: header
|
|
23
|
+
})]
|
|
24
|
+
}),
|
|
25
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
26
|
+
className: "text-login-200 text-sm leading-relaxed",
|
|
27
|
+
children: description
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "flex justify-end gap-2 mt-1",
|
|
31
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: onCancel,
|
|
34
|
+
className: "\n cursor-pointer px-4 py-1.5 rounded-md text-sm font-medium\n bg-login-600 hover:bg-login-500 text-login-100\n transition-colors duration-150 select-none\n ",
|
|
35
|
+
children: cancelText
|
|
36
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
onClick: onConfirm,
|
|
39
|
+
className: `
|
|
40
|
+
cursor-pointer px-4 py-1.5 rounded-md text-sm font-medium
|
|
41
|
+
transition-all duration-150 select-none
|
|
42
|
+
${variant === "danger" ? "bg-red-600 hover:brightness-110 text-white" : variant === "warning" ? "bg-yellow-500 hover:brightness-110 text-black" : "bg-login hover:brightness-110 text-white"}
|
|
43
|
+
`,
|
|
44
|
+
children: confirmText
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { ConfirmPopup as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/accordion.d.ts
|
|
4
|
+
type AccordionProps = {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
type AccordionGroupProps = {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
declare function AccordionGroup({
|
|
15
|
+
children,
|
|
16
|
+
className
|
|
17
|
+
}: AccordionGroupProps): import("react").JSX.Element;
|
|
18
|
+
declare function Accordion({
|
|
19
|
+
title,
|
|
20
|
+
children,
|
|
21
|
+
defaultOpen,
|
|
22
|
+
className
|
|
23
|
+
}: AccordionProps): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { AccordionGroup, Accordion as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useContext, useState } from "react";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/container/accordion.tsx
|
|
6
|
+
const GroupContext = createContext(false);
|
|
7
|
+
function AccordionGroup({ children, className = "" }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(GroupContext.Provider, {
|
|
9
|
+
value: true,
|
|
10
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
11
|
+
className: `rounded-lg border border-login-500/40 overflow-hidden divide-y divide-login-500/25 ${className}`,
|
|
12
|
+
children
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function Accordion({ title, children, defaultOpen = false, className = "" }) {
|
|
17
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: useContext(GroupContext) ? className : `rounded-lg border border-login-500/40 overflow-hidden ${className}`,
|
|
20
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
onClick: () => setOpen((o) => !o),
|
|
23
|
+
className: "\n flex w-full cursor-pointer items-center justify-between\n bg-login-800 px-4 py-3 text-left select-none\n transition-colors duration-150 hover:bg-login-700\n ",
|
|
24
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "text-sm font-medium text-login-50",
|
|
26
|
+
children: title
|
|
27
|
+
}), /* @__PURE__ */ jsx(ChevronDown, {
|
|
28
|
+
size: 16,
|
|
29
|
+
className: `shrink-0 text-login-300 transition-transform duration-200 ${open ? "rotate-180" : ""}`
|
|
30
|
+
})]
|
|
31
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: `overflow-hidden bg-login-900 transition-all duration-200 ${open ? "max-h-[9999px]" : "max-h-0"}`,
|
|
33
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: "px-4 py-3 text-sm text-login-100",
|
|
35
|
+
children
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AccordionGroup, Accordion as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/card.d.ts
|
|
4
|
+
type CardProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function Card({
|
|
9
|
+
children,
|
|
10
|
+
className
|
|
11
|
+
}: CardProps): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Card as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/card.tsx
|
|
3
|
+
function Card({ children, className = "" }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("section", {
|
|
5
|
+
className: `rounded-xl border border-login-500/30 bg-login-500/50 ${className}`,
|
|
6
|
+
children
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Card as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IconBubbleTone } from "./iconBubble.js";
|
|
2
|
+
import { ElementType, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/container/expandableCard.d.ts
|
|
5
|
+
type PulseVariant = 'online' | 'offline' | 'warning' | 'unknown';
|
|
6
|
+
type ExpandableCardProps = {
|
|
7
|
+
icon: ElementType;
|
|
8
|
+
iconTone?: IconBubbleTone;
|
|
9
|
+
title: string;
|
|
10
|
+
subtitle?: ReactNode;
|
|
11
|
+
pulse?: {
|
|
12
|
+
variant: PulseVariant;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
trailing?: ReactNode;
|
|
16
|
+
isExpanded: boolean;
|
|
17
|
+
onToggle: () => void;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
};
|
|
20
|
+
declare function ExpandableCard({
|
|
21
|
+
icon,
|
|
22
|
+
iconTone,
|
|
23
|
+
title,
|
|
24
|
+
subtitle,
|
|
25
|
+
pulse,
|
|
26
|
+
trailing,
|
|
27
|
+
isExpanded,
|
|
28
|
+
onToggle,
|
|
29
|
+
children
|
|
30
|
+
}: ExpandableCardProps): import("react").JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ExpandableCard as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import Card from "./card.js";
|
|
3
|
+
import IconBubble from "./iconBubble.js";
|
|
4
|
+
import PulseDot from "./pulseDot.js";
|
|
5
|
+
import Button from "../buttons/button.js";
|
|
6
|
+
import { ChevronDown } from "lucide-react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/container/expandableCard.tsx
|
|
9
|
+
function ExpandableCard({ icon, iconTone = "orange", title, subtitle, pulse, trailing, isExpanded, onToggle, children }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Card, { children: [/* @__PURE__ */ jsxs("div", {
|
|
11
|
+
role: "button",
|
|
12
|
+
tabIndex: 0,
|
|
13
|
+
onClick: onToggle,
|
|
14
|
+
onKeyDown: (e) => {
|
|
15
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
onToggle();
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"aria-expanded": isExpanded,
|
|
21
|
+
className: "group flex cursor-pointer select-none items-center gap-4 px-5 py-4",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(IconBubble, {
|
|
24
|
+
icon,
|
|
25
|
+
tone: iconTone,
|
|
26
|
+
size: "sm"
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "min-w-0 flex-1",
|
|
30
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
31
|
+
className: "flex flex-wrap items-center gap-3",
|
|
32
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: "font-semibold text-login-50 transition group-hover:text-login",
|
|
34
|
+
children: title
|
|
35
|
+
}), pulse && /* @__PURE__ */ jsxs("span", {
|
|
36
|
+
className: "flex items-center gap-2 text-xs text-login-300",
|
|
37
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "flex h-3 w-3 shrink-0 items-center justify-center",
|
|
39
|
+
children: /* @__PURE__ */ jsx(PulseDot, {
|
|
40
|
+
variant: pulse.variant,
|
|
41
|
+
size: "sm"
|
|
42
|
+
})
|
|
43
|
+
}), pulse.label]
|
|
44
|
+
})]
|
|
45
|
+
}), subtitle && /* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "mt-0.5 text-xs text-login-300",
|
|
47
|
+
children: subtitle
|
|
48
|
+
})]
|
|
49
|
+
}),
|
|
50
|
+
trailing && /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: "flex shrink-0 items-center gap-3",
|
|
52
|
+
onClick: (e) => e.stopPropagation(),
|
|
53
|
+
children: trailing
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx(Button, {
|
|
56
|
+
variant: "secondary",
|
|
57
|
+
icon: /* @__PURE__ */ jsx(ChevronDown, { className: `h-4 w-4 transition-transform duration-200 ${isExpanded ? "rotate-180" : ""}` }),
|
|
58
|
+
onClick: (e) => {
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
onToggle();
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
}), isExpanded && children && /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "border-t border-white/5 px-5 pb-5 pt-4",
|
|
66
|
+
children
|
|
67
|
+
})] });
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
export { ExpandableCard as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/glassCard.d.ts
|
|
4
|
+
type GlassCardProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function GlassCard({
|
|
9
|
+
children,
|
|
10
|
+
className
|
|
11
|
+
}: GlassCardProps): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { GlassCard as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/glassCard.tsx
|
|
3
|
+
function GlassCard({ children, className = "" }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: `rounded-xl border border-login-500/20 bg-login-800/60 backdrop-blur-sm ${className}`,
|
|
6
|
+
children
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { GlassCard as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/highlight.tsx
|
|
3
|
+
function Highlight({ children, className }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: `highlighted-section ${className ?? ""}`,
|
|
6
|
+
children
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Highlight as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ElementType } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/iconBubble.d.ts
|
|
4
|
+
declare const tones: {
|
|
5
|
+
readonly amber: "bg-amber-500/10 text-amber-400";
|
|
6
|
+
readonly blue: "bg-sky-500/10 text-sky-400";
|
|
7
|
+
readonly emerald: "bg-emerald-500/10 text-emerald-400";
|
|
8
|
+
readonly rose: "bg-rose-500/10 text-rose-400";
|
|
9
|
+
readonly slate: "bg-login-600 text-login-100";
|
|
10
|
+
readonly violet: "bg-violet-500/10 text-violet-400";
|
|
11
|
+
readonly orange: "bg-login/10 text-login";
|
|
12
|
+
};
|
|
13
|
+
type IconBubbleProps = {
|
|
14
|
+
icon: ElementType;
|
|
15
|
+
tone?: keyof typeof tones;
|
|
16
|
+
size?: 'sm' | 'md' | 'lg';
|
|
17
|
+
};
|
|
18
|
+
type IconBubbleTone = keyof typeof tones;
|
|
19
|
+
declare function IconBubble({
|
|
20
|
+
icon: Icon,
|
|
21
|
+
tone,
|
|
22
|
+
size
|
|
23
|
+
}: IconBubbleProps): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { IconBubbleTone, IconBubble as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/iconBubble.tsx
|
|
3
|
+
const tones = {
|
|
4
|
+
amber: "bg-amber-500/10 text-amber-400",
|
|
5
|
+
blue: "bg-sky-500/10 text-sky-400",
|
|
6
|
+
emerald: "bg-emerald-500/10 text-emerald-400",
|
|
7
|
+
rose: "bg-rose-500/10 text-rose-400",
|
|
8
|
+
slate: "bg-login-600 text-login-100",
|
|
9
|
+
violet: "bg-violet-500/10 text-violet-400",
|
|
10
|
+
orange: "bg-login/10 text-login"
|
|
11
|
+
};
|
|
12
|
+
function IconBubble({ icon: Icon, tone = "slate", size = "md" }) {
|
|
13
|
+
const sizeClass = size === "sm" ? "h-7 w-7" : size === "lg" ? "h-11 w-11" : "h-9 w-9";
|
|
14
|
+
const iconSize = size === "sm" ? "h-3.5 w-3.5" : size === "lg" ? "h-5 w-5" : "h-4 w-4";
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: `flex shrink-0 items-center justify-center rounded-lg ${sizeClass} ${tones[tone]}`,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Icon, { className: iconSize })
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { IconBubble as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/container/leftBarPanel.d.ts
|
|
4
|
+
type LeftBarPanelProps = {
|
|
5
|
+
color: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function LeftBarPanel({
|
|
10
|
+
color,
|
|
11
|
+
children,
|
|
12
|
+
className
|
|
13
|
+
}: LeftBarPanelProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { LeftBarPanel as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/leftBarPanel.tsx
|
|
3
|
+
function LeftBarPanel({ color, children, className = "" }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: `bg-login-500/50 border border-login-500/30 border-l-2 rounded-sm ${color} ${className}`,
|
|
6
|
+
children
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { LeftBarPanel as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/components/container/page.d.ts
|
|
2
|
+
type PageContainerProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
innerClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function PageContainer({
|
|
9
|
+
title,
|
|
10
|
+
children,
|
|
11
|
+
className,
|
|
12
|
+
innerClassName
|
|
13
|
+
}: PageContainerProps): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { PageContainer as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/container/page.tsx
|
|
3
|
+
function PageContainer({ title, children, className, innerClassName }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5
|
+
className: `w-full page-container ${className}`,
|
|
6
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7
|
+
className: `flex flex-col col-start-3 ${innerClassName}`,
|
|
8
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
9
|
+
className: "heading",
|
|
10
|
+
children: title
|
|
11
|
+
}), children]
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { PageContainer as default };
|