@steez-ui/ui 0.1.5 → 0.1.7
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/README.md +3 -3
- package/dist/components/LoadingOverlayCrystalline.d.ts +10 -0
- package/dist/components/LoadingOverlayCrystalline.d.ts.map +1 -0
- package/dist/components/LoadingOverlayCrystalline.js +7 -0
- package/dist/components/LoadingOverlayCrystalline.js.map +1 -0
- package/dist/components/LoadingOverlayCrystalline.module.css +39 -0
- package/dist/components/LoadingScreen.d.ts +17 -0
- package/dist/components/LoadingScreen.d.ts.map +1 -0
- package/dist/components/LoadingScreen.js +246 -0
- package/dist/components/LoadingScreen.js.map +1 -0
- package/dist/components/LoadingScreen.module.css +108 -0
- package/dist/components/OverlayButton.d.ts +7 -0
- package/dist/components/OverlayButton.d.ts.map +1 -0
- package/dist/components/OverlayButton.js +8 -0
- package/dist/components/OverlayButton.js.map +1 -0
- package/dist/components/OverlayButton.module.css +32 -0
- package/dist/components/PixelTooltip.d.ts +10 -0
- package/dist/components/PixelTooltip.d.ts.map +1 -0
- package/dist/components/PixelTooltip.js +41 -0
- package/dist/components/PixelTooltip.js.map +1 -0
- package/dist/components/PixelTooltip.module.css +81 -0
- package/dist/components/QuickInfoCard.d.ts +20 -0
- package/dist/components/QuickInfoCard.d.ts.map +1 -0
- package/dist/components/QuickInfoCard.js +38 -0
- package/dist/components/QuickInfoCard.js.map +1 -0
- package/dist/components/QuickInfoCard.module.css +138 -0
- package/dist/components/Section.d.ts +9 -0
- package/dist/components/Section.d.ts.map +1 -0
- package/dist/components/Section.js +7 -0
- package/dist/components/Section.js.map +1 -0
- package/dist/components/Section.module.css +20 -0
- package/dist/components/SectionHeader.d.ts +10 -0
- package/dist/components/SectionHeader.d.ts.map +1 -0
- package/dist/components/SectionHeader.js +7 -0
- package/dist/components/SectionHeader.js.map +1 -0
- package/dist/components/SectionHeader.module.css +54 -0
- package/dist/components/StatCard.d.ts +11 -0
- package/dist/components/StatCard.d.ts.map +1 -0
- package/dist/components/StatCard.js +14 -0
- package/dist/components/StatCard.js.map +1 -0
- package/dist/components/StatCard.module.css +41 -0
- package/dist/components/WidgetCard.d.ts +12 -0
- package/dist/components/WidgetCard.d.ts.map +1 -0
- package/dist/components/WidgetCard.js +17 -0
- package/dist/components/WidgetCard.js.map +1 -0
- package/dist/components/WidgetCard.module.css +75 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.trigger {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: help;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.tooltip {
|
|
8
|
+
position: fixed;
|
|
9
|
+
z-index: var(--z-tooltip);
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
opacity: 0;
|
|
12
|
+
transition:
|
|
13
|
+
opacity 250ms ease-in-out,
|
|
14
|
+
transform 250ms ease-in-out;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tooltip.show {
|
|
18
|
+
opacity: 1;
|
|
19
|
+
animation: tooltipFadeIn 250ms ease-out forwards;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pixelContainer {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
max-width: 150px;
|
|
26
|
+
padding: 6px 10px;
|
|
27
|
+
background: var(--accent-primary);
|
|
28
|
+
border: 1px solid var(--accent-primary);
|
|
29
|
+
white-space: normal;
|
|
30
|
+
image-rendering: pixelated;
|
|
31
|
+
image-rendering: -moz-crisp-edges;
|
|
32
|
+
image-rendering: crisp-edges;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.content {
|
|
36
|
+
position: relative;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
color: #fff;
|
|
39
|
+
font-family: var(--font-mono);
|
|
40
|
+
font-size: 11px;
|
|
41
|
+
line-height: 1.3;
|
|
42
|
+
text-align: left;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tooltip.top {
|
|
46
|
+
margin-top: -8px;
|
|
47
|
+
transform: translateY(-100%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.tooltip.bottom {
|
|
51
|
+
margin-top: 0;
|
|
52
|
+
transform: translateY(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tooltip.left {
|
|
56
|
+
margin-left: -8px;
|
|
57
|
+
transform: translateX(-100%) translateY(-50%);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tooltip.right {
|
|
61
|
+
margin-left: 8px;
|
|
62
|
+
transform: translateY(-50%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes tooltipFadeIn {
|
|
66
|
+
0% {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
transform: translateY(-4px) scale(0.95);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
100% {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
transform: translateY(0) scale(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (max-width: 768px) {
|
|
78
|
+
.tooltip {
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface QuickInfoItem {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
valueColor?: "default" | "success" | "warning" | "danger";
|
|
7
|
+
mono?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface StorageProgress {
|
|
10
|
+
used: number;
|
|
11
|
+
limit: number;
|
|
12
|
+
}
|
|
13
|
+
export interface QuickInfoCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
items: QuickInfoItem[];
|
|
15
|
+
storageProgress?: StorageProgress;
|
|
16
|
+
showCornerBrackets?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function QuickInfoCard({ items, storageProgress, className, showCornerBrackets, ...props }: QuickInfoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default QuickInfoCard;
|
|
20
|
+
//# sourceMappingURL=QuickInfoCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickInfoCard.d.ts","sourceRoot":"","sources":["../../src/components/QuickInfoCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAeD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,eAAe,EACf,SAAc,EACd,kBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAiEpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./QuickInfoCard.module.css";
|
|
3
|
+
function formatFileSize(bytes) {
|
|
4
|
+
if (bytes === 0) {
|
|
5
|
+
return "0 Bytes";
|
|
6
|
+
}
|
|
7
|
+
const base = 1024;
|
|
8
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
9
|
+
const unitIndex = Math.floor(Math.log(bytes) / Math.log(base));
|
|
10
|
+
return `${parseFloat((bytes / Math.pow(base, unitIndex)).toFixed(2))} ${sizes[unitIndex]}`;
|
|
11
|
+
}
|
|
12
|
+
export function QuickInfoCard({ items, storageProgress, className = "", showCornerBrackets = true, ...props }) {
|
|
13
|
+
const storageRatio = storageProgress
|
|
14
|
+
? storageProgress.used / Math.max(storageProgress.limit, 1)
|
|
15
|
+
: 0;
|
|
16
|
+
const storageToneClass = storageRatio > 0.9
|
|
17
|
+
? styles.storageDanger
|
|
18
|
+
: storageRatio > 0.7
|
|
19
|
+
? styles.storageWarning
|
|
20
|
+
: "";
|
|
21
|
+
const getValueToneClass = (color) => {
|
|
22
|
+
switch (color) {
|
|
23
|
+
case "success":
|
|
24
|
+
return styles.valueSuccess;
|
|
25
|
+
case "warning":
|
|
26
|
+
return styles.valueWarning;
|
|
27
|
+
case "danger":
|
|
28
|
+
return styles.valueDanger;
|
|
29
|
+
default:
|
|
30
|
+
return "";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return (_jsxs("div", { className: `${styles.card} ${showCornerBrackets ? styles.cardWithBrackets : ""} ${className}`.trim(), ...props, children: [items.map((item, index) => (_jsxs("div", { className: styles.item, children: [item.icon ? _jsx("div", { className: styles.icon, children: item.icon }) : null, _jsxs("div", { className: styles.info, children: [_jsx("span", { className: styles.label, children: item.label }), _jsx("span", { className: `${styles.value} ${item.mono ? styles.valueMono : ""} ${getValueToneClass(item.valueColor)}`.trim(), children: item.value })] })] }, `${item.label}-${index}`))), storageProgress ? (_jsxs("div", { className: styles.storageProgress, children: [_jsxs("div", { className: styles.storageProgressLabel, children: [_jsx("span", { children: "Storage" }), _jsxs("span", { className: styles.storageProgressValue, children: [formatFileSize(storageProgress.used), " /", " ", formatFileSize(storageProgress.limit)] })] }), _jsx("div", { className: styles.storageProgressBar, children: _jsx("div", { className: `${styles.storageProgressFill} ${storageToneClass}`.trim(), style: {
|
|
34
|
+
"--storage-progress-width": `${Math.min(storageRatio * 100, 100)}%`,
|
|
35
|
+
} }) })] })) : null] }));
|
|
36
|
+
}
|
|
37
|
+
export default QuickInfoCard;
|
|
38
|
+
//# sourceMappingURL=QuickInfoCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickInfoCard.js","sourceRoot":"","sources":["../../src/components/QuickInfoCard.tsx"],"names":[],"mappings":"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","sourcesContent":["import React from \"react\";\n\nimport styles from \"./QuickInfoCard.module.css\";\n\nexport interface QuickInfoItem {\n icon?: React.ReactNode;\n label: string;\n value: string | number;\n valueColor?: \"default\" | \"success\" | \"warning\" | \"danger\";\n mono?: boolean;\n}\n\nexport interface StorageProgress {\n used: number;\n limit: number;\n}\n\nexport interface QuickInfoCardProps extends React.HTMLAttributes<HTMLDivElement> {\n items: QuickInfoItem[];\n storageProgress?: StorageProgress;\n showCornerBrackets?: boolean;\n}\n\nfunction formatFileSize(bytes: number) {\n if (bytes === 0) {\n return \"0 Bytes\";\n }\n\n const base = 1024;\n const sizes = [\"Bytes\", \"KB\", \"MB\", \"GB\"];\n const unitIndex = Math.floor(Math.log(bytes) / Math.log(base));\n return `${parseFloat((bytes / Math.pow(base, unitIndex)).toFixed(2))} ${\n sizes[unitIndex]\n }`;\n}\n\nexport function QuickInfoCard({\n items,\n storageProgress,\n className = \"\",\n showCornerBrackets = true,\n ...props\n}: QuickInfoCardProps) {\n const storageRatio = storageProgress\n ? storageProgress.used / Math.max(storageProgress.limit, 1)\n : 0;\n const storageToneClass =\n storageRatio > 0.9\n ? styles.storageDanger\n : storageRatio > 0.7\n ? styles.storageWarning\n : \"\";\n\n const getValueToneClass = (color?: QuickInfoItem[\"valueColor\"]) => {\n switch (color) {\n case \"success\":\n return styles.valueSuccess;\n case \"warning\":\n return styles.valueWarning;\n case \"danger\":\n return styles.valueDanger;\n default:\n return \"\";\n }\n };\n\n return (\n <div\n className={`${styles.card} ${showCornerBrackets ? styles.cardWithBrackets : \"\"} ${className}`.trim()}\n {...props}\n >\n {items.map((item, index) => (\n <div key={`${item.label}-${index}`} className={styles.item}>\n {item.icon ? <div className={styles.icon}>{item.icon}</div> : null}\n <div className={styles.info}>\n <span className={styles.label}>{item.label}</span>\n <span\n className={`${styles.value} ${item.mono ? styles.valueMono : \"\"} ${getValueToneClass(item.valueColor)}`.trim()}\n >\n {item.value}\n </span>\n </div>\n </div>\n ))}\n {storageProgress ? (\n <div className={styles.storageProgress}>\n <div className={styles.storageProgressLabel}>\n <span>Storage</span>\n <span className={styles.storageProgressValue}>\n {formatFileSize(storageProgress.used)} /{\" \"}\n {formatFileSize(storageProgress.limit)}\n </span>\n </div>\n <div className={styles.storageProgressBar}>\n <div\n className={`${styles.storageProgressFill} ${storageToneClass}`.trim()}\n style={\n {\n \"--storage-progress-width\": `${Math.min(storageRatio * 100, 100)}%`,\n } as React.CSSProperties\n }\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nexport default QuickInfoCard;\n"]}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
.card {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 1.5rem;
|
|
4
|
+
padding: 1rem 1.5rem;
|
|
5
|
+
margin: 0.75rem;
|
|
6
|
+
background: var(--bg-secondary);
|
|
7
|
+
border: 1px solid var(--border-color);
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
position: relative;
|
|
10
|
+
overflow: visible;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cardWithBrackets::before {
|
|
14
|
+
content: "";
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: -0.5rem;
|
|
17
|
+
left: -0.5rem;
|
|
18
|
+
width: 0.5rem;
|
|
19
|
+
height: 0.5rem;
|
|
20
|
+
border-top: 1px solid var(--border-color);
|
|
21
|
+
border-left: 1px solid var(--border-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cardWithBrackets::after {
|
|
25
|
+
content: "";
|
|
26
|
+
position: absolute;
|
|
27
|
+
bottom: -0.5rem;
|
|
28
|
+
right: -0.5rem;
|
|
29
|
+
width: 0.5rem;
|
|
30
|
+
height: 0.5rem;
|
|
31
|
+
border-bottom: 1px solid var(--border-color);
|
|
32
|
+
border-right: 1px solid var(--border-color);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.item {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: 0.75rem;
|
|
39
|
+
flex: 1;
|
|
40
|
+
min-width: 150px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.icon {
|
|
44
|
+
display: grid;
|
|
45
|
+
place-items: center;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
color: var(--accent-primary);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.icon :global(svg) {
|
|
51
|
+
width: 1.25rem;
|
|
52
|
+
height: 1.25rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.info {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 0.125rem;
|
|
59
|
+
flex: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.label {
|
|
63
|
+
color: var(--text-secondary);
|
|
64
|
+
font-size: 0.6875rem;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
text-transform: uppercase;
|
|
67
|
+
letter-spacing: 0.05em;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.value {
|
|
71
|
+
color: var(--text-primary);
|
|
72
|
+
font-size: 1rem;
|
|
73
|
+
font-weight: 600;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.valueMono {
|
|
77
|
+
font-family: var(--font-mono);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.valueSuccess {
|
|
81
|
+
color: var(--color-success, #10b981);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.valueWarning {
|
|
85
|
+
color: var(--color-warning, #f59e0b);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.valueDanger {
|
|
89
|
+
color: var(--color-error, #ef4444);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.storageProgress {
|
|
93
|
+
flex: 1;
|
|
94
|
+
min-width: 200px;
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
gap: 0.375rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.storageProgressLabel {
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
color: var(--text-secondary);
|
|
104
|
+
font-size: 0.6875rem;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
text-transform: uppercase;
|
|
107
|
+
letter-spacing: 0.05em;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.storageProgressValue {
|
|
111
|
+
color: var(--text-primary);
|
|
112
|
+
font-family: var(--font-mono);
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.storageProgressBar {
|
|
117
|
+
height: 8px;
|
|
118
|
+
background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
|
|
119
|
+
border-radius: 4px;
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
border: 1px solid var(--border-color);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.storageProgressFill {
|
|
125
|
+
height: 100%;
|
|
126
|
+
width: var(--storage-progress-width, 0%);
|
|
127
|
+
background: var(--accent-primary);
|
|
128
|
+
border-radius: 3px;
|
|
129
|
+
transition: width 220ms ease;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.storageWarning {
|
|
133
|
+
background: var(--color-warning, #f59e0b);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.storageDanger {
|
|
137
|
+
background: var(--color-error, #ef4444);
|
|
138
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SectionProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
titleClassName?: string;
|
|
5
|
+
contentClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Section({ title, children, className, titleClassName, contentClassName, ...props }: SectionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Section;
|
|
9
|
+
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../src/components/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACxD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,SAAc,EACd,cAAmB,EACnB,gBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,YAAY,2CAWd;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./Section.module.css";
|
|
3
|
+
export function Section({ title, children, className = "", titleClassName = "", contentClassName = "", ...props }) {
|
|
4
|
+
return (_jsxs("section", { className: `${styles.section} ${className}`.trim(), ...props, children: [title ? (_jsx("h3", { className: `${styles.title} ${titleClassName}`.trim(), children: title })) : null, _jsx("div", { className: `${styles.content} ${contentClassName}`.trim(), children: children })] }));
|
|
5
|
+
}
|
|
6
|
+
export default Section;
|
|
7
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Section.js","sourceRoot":"","sources":["../../src/components/Section.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAS1C,MAAM,UAAU,OAAO,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,cAAc,GAAG,EAAE,EACnB,gBAAgB,GAAG,EAAE,EACrB,GAAG,KAAK,EACK;IACb,OAAO,CACL,mBAAS,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,KAAM,KAAK,aACnE,KAAK,CAAC,CAAC,CAAC,CACP,aAAI,SAAS,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,cAAc,EAAE,CAAC,IAAI,EAAE,YAAG,KAAK,GAAM,CACxE,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,IAAI,EAAE,YAC3D,QAAQ,GACL,IACE,CACX,CAAC;AACJ,CAAC;AAED,eAAe,OAAO,CAAC","sourcesContent":["import React from \"react\";\n\nimport styles from \"./Section.module.css\";\n\nexport interface SectionProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n title?: React.ReactNode;\n titleClassName?: string;\n contentClassName?: string;\n}\n\nexport function Section({\n title,\n children,\n className = \"\",\n titleClassName = \"\",\n contentClassName = \"\",\n ...props\n}: SectionProps) {\n return (\n <section className={`${styles.section} ${className}`.trim()} {...props}>\n {title ? (\n <h3 className={`${styles.title} ${titleClassName}`.trim()}>{title}</h3>\n ) : null}\n <div className={`${styles.content} ${contentClassName}`.trim()}>\n {children}\n </div>\n </section>\n );\n}\n\nexport default Section;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.section {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 0.85rem;
|
|
5
|
+
margin-bottom: 1.5rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.title {
|
|
9
|
+
margin: 0;
|
|
10
|
+
color: var(--text-primary);
|
|
11
|
+
font-family: var(--font-mono);
|
|
12
|
+
font-size: 0.9rem;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
letter-spacing: 0.08em;
|
|
15
|
+
text-transform: uppercase;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.content {
|
|
19
|
+
min-width: 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SectionHeaderProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function SectionHeader({ title, description, actions, className, }: SectionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default SectionHeader;
|
|
10
|
+
//# sourceMappingURL=SectionHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../src/components/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAc,GACf,EAAE,kBAAkB,2CAcpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./SectionHeader.module.css";
|
|
3
|
+
export function SectionHeader({ title, description, actions, className = "", }) {
|
|
4
|
+
return (_jsx("div", { className: `${styles.sectionHeader} ${className}`.trim(), children: _jsxs("div", { className: styles.headerContent, children: [_jsxs("div", { className: styles.textContent, children: [_jsx("h2", { className: styles.title, children: title }), description ? (_jsx("p", { className: styles.description, children: description })) : null] }), actions ? _jsx("div", { className: styles.actions, children: actions }) : null] }) }));
|
|
5
|
+
}
|
|
6
|
+
export default SectionHeader;
|
|
7
|
+
//# sourceMappingURL=SectionHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["../../src/components/SectionHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAShD,MAAM,UAAU,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GAAG,EAAE,GACK;IACnB,OAAO,CACL,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,YAC3D,eAAK,SAAS,EAAE,MAAM,CAAC,aAAa,aAClC,eAAK,SAAS,EAAE,MAAM,CAAC,WAAW,aAChC,aAAI,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,GAAM,EACxC,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAE,MAAM,CAAC,WAAW,YAAG,WAAW,GAAK,CACpD,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YAAG,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IAC7D,GACF,CACP,CAAC;AACJ,CAAC;AAED,eAAe,aAAa,CAAC","sourcesContent":["import React from \"react\";\n\nimport styles from \"./SectionHeader.module.css\";\n\nexport interface SectionHeaderProps {\n title: string;\n description?: string;\n actions?: React.ReactNode;\n className?: string;\n}\n\nexport function SectionHeader({\n title,\n description,\n actions,\n className = \"\",\n}: SectionHeaderProps) {\n return (\n <div className={`${styles.sectionHeader} ${className}`.trim()}>\n <div className={styles.headerContent}>\n <div className={styles.textContent}>\n <h2 className={styles.title}>{title}</h2>\n {description ? (\n <p className={styles.description}>{description}</p>\n ) : null}\n </div>\n {actions ? <div className={styles.actions}>{actions}</div> : null}\n </div>\n </div>\n );\n}\n\nexport default SectionHeader;\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.sectionHeader {
|
|
2
|
+
background: var(--bg-secondary);
|
|
3
|
+
border: 1px solid var(--border-color);
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
padding: 1rem 1.25rem;
|
|
6
|
+
margin-bottom: 1.25rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.headerContent {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 1rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.textContent {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.title {
|
|
22
|
+
margin: 0 0 0.25rem;
|
|
23
|
+
color: var(--text-primary);
|
|
24
|
+
font-family: var(--font-mono);
|
|
25
|
+
font-size: 1rem;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
letter-spacing: 0.06em;
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.description {
|
|
32
|
+
margin: 0;
|
|
33
|
+
color: var(--text-secondary);
|
|
34
|
+
font-size: 0.8125rem;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.actions {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (max-width: 640px) {
|
|
46
|
+
.headerContent {
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: stretch;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.actions {
|
|
52
|
+
justify-content: flex-end;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
subvalue?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
color?: "default" | "success" | "danger" | "warning";
|
|
8
|
+
}
|
|
9
|
+
export declare function StatCard({ label, value, subvalue, onClick, color, className, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default StatCard;
|
|
11
|
+
//# sourceMappingURL=StatCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatCard.d.ts","sourceRoot":"","sources":["../../src/components/StatCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACtD;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAiB,EACjB,SAAc,EACd,GAAG,KAAK,EACT,EAAE,aAAa,2CAqBf;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./StatCard.module.css";
|
|
3
|
+
export function StatCard({ label, value, subvalue, onClick, color = "default", className = "", ...props }) {
|
|
4
|
+
const valueToneClass = color === "success"
|
|
5
|
+
? styles.valueSuccess
|
|
6
|
+
: color === "danger"
|
|
7
|
+
? styles.valueDanger
|
|
8
|
+
: color === "warning"
|
|
9
|
+
? styles.valueWarning
|
|
10
|
+
: "";
|
|
11
|
+
return (_jsxs("div", { className: `${styles.root} ${onClick ? styles.interactive : ""} ${className}`.trim(), onClick: onClick, ...props, children: [_jsx("div", { className: styles.label, children: label }), _jsx("div", { className: `${styles.value} ${valueToneClass}`.trim(), children: value }), subvalue ? _jsx("div", { className: styles.subvalue, children: subvalue }) : null] }));
|
|
12
|
+
}
|
|
13
|
+
export default StatCard;
|
|
14
|
+
//# sourceMappingURL=StatCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatCard.js","sourceRoot":"","sources":["../../src/components/StatCard.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAU3C,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAK,GAAG,SAAS,EACjB,SAAS,GAAG,EAAE,EACd,GAAG,KAAK,EACM;IACd,MAAM,cAAc,GAClB,KAAK,KAAK,SAAS;QACjB,CAAC,CAAC,MAAM,CAAC,YAAY;QACrB,CAAC,CAAC,KAAK,KAAK,QAAQ;YAClB,CAAC,CAAC,MAAM,CAAC,WAAW;YACpB,CAAC,CAAC,KAAK,KAAK,SAAS;gBACnB,CAAC,CAAC,MAAM,CAAC,YAAY;gBACrB,CAAC,CAAC,EAAE,CAAC;IAEb,OAAO,CACL,eACE,SAAS,EAAE,GAAG,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,EACpF,OAAO,EAAE,OAAO,KACZ,KAAK,aAET,cAAK,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,GAAO,EAC3C,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,cAAc,EAAE,CAAC,IAAI,EAAE,YAAG,KAAK,GAAO,EACxE,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,YAAG,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IAChE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC","sourcesContent":["import React from \"react\";\n\nimport styles from \"./StatCard.module.css\";\n\nexport interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {\n label: string;\n value: string | number;\n subvalue?: string;\n onClick?: () => void;\n color?: \"default\" | \"success\" | \"danger\" | \"warning\";\n}\n\nexport function StatCard({\n label,\n value,\n subvalue,\n onClick,\n color = \"default\",\n className = \"\",\n ...props\n}: StatCardProps) {\n const valueToneClass =\n color === \"success\"\n ? styles.valueSuccess\n : color === \"danger\"\n ? styles.valueDanger\n : color === \"warning\"\n ? styles.valueWarning\n : \"\";\n\n return (\n <div\n className={`${styles.root} ${onClick ? styles.interactive : \"\"} ${className}`.trim()}\n onClick={onClick}\n {...props}\n >\n <div className={styles.label}>{label}</div>\n <div className={`${styles.value} ${valueToneClass}`.trim()}>{value}</div>\n {subvalue ? <div className={styles.subvalue}>{subvalue}</div> : null}\n </div>\n );\n}\n\nexport default StatCard;\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
cursor: default;
|
|
3
|
+
transition: color 220ms ease;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.interactive {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.label {
|
|
11
|
+
margin-bottom: 0.25rem;
|
|
12
|
+
color: var(--text-secondary);
|
|
13
|
+
font-size: 0.6875rem;
|
|
14
|
+
font-weight: 500;
|
|
15
|
+
letter-spacing: 0.06em;
|
|
16
|
+
text-transform: uppercase;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.value {
|
|
20
|
+
color: var(--text-primary);
|
|
21
|
+
font-size: 1.5rem;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.valueSuccess {
|
|
26
|
+
color: var(--color-success, #10b981);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.valueDanger {
|
|
30
|
+
color: var(--color-error, #ef4444);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.valueWarning {
|
|
34
|
+
color: var(--color-warning, #f59e0b);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.subvalue {
|
|
38
|
+
margin-top: 0.125rem;
|
|
39
|
+
color: var(--text-secondary);
|
|
40
|
+
font-size: 0.75rem;
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type WidgetSize = "xs-a" | "xs-b" | "sm-a" | "sm-b";
|
|
3
|
+
export interface WidgetCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
title?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
size?: WidgetSize | "sm" | "md" | "lg";
|
|
8
|
+
overlay?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function WidgetCard({ title, icon, children, size, className, overlay, style, ...props }: WidgetCardProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default WidgetCard;
|
|
12
|
+
//# sourceMappingURL=WidgetCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetCard.d.ts","sourceRoot":"","sources":["../../src/components/WidgetCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAa,EACb,SAAc,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,2CA+BjB;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styles from "./WidgetCard.module.css";
|
|
3
|
+
export function WidgetCard({ title, icon, children, size = "sm-b", className = "", overlay, style, ...props }) {
|
|
4
|
+
const sizeClassMap = {
|
|
5
|
+
"xs-a": styles.widgetXsA,
|
|
6
|
+
"xs-b": styles.widgetXsB,
|
|
7
|
+
"sm-a": styles.widgetSmA,
|
|
8
|
+
"sm-b": styles.widgetSmB,
|
|
9
|
+
sm: styles.widgetSmA,
|
|
10
|
+
md: styles.widgetSmB,
|
|
11
|
+
lg: styles.widgetSmB,
|
|
12
|
+
};
|
|
13
|
+
const sizeClass = sizeClassMap[size] || styles.widgetSmB;
|
|
14
|
+
return (_jsxs("div", { className: `${sizeClass} ${className}`.trim(), style: { position: "relative", ...style }, ...props, children: [title ? (_jsx("div", { className: styles.header, children: _jsxs("div", { className: styles.titleRow, children: [icon ? _jsx("div", { className: styles.icon, children: icon }) : null, _jsx("h3", { className: styles.title, children: title })] }) })) : null, _jsx("div", { className: styles.body, children: children }), overlay] }));
|
|
15
|
+
}
|
|
16
|
+
export default WidgetCard;
|
|
17
|
+
//# sourceMappingURL=WidgetCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetCard.js","sourceRoot":"","sources":["../../src/components/WidgetCard.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAY7C,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,GAAG,MAAM,EACb,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,GAAG,KAAK,EACQ;IAChB,MAAM,YAAY,GAChB;QACE,MAAM,EAAE,MAAM,CAAC,SAAS;QACxB,MAAM,EAAE,MAAM,CAAC,SAAS;QACxB,MAAM,EAAE,MAAM,CAAC,SAAS;QACxB,MAAM,EAAE,MAAM,CAAC,SAAS;QACxB,EAAE,EAAE,MAAM,CAAC,SAAS;QACpB,EAAE,EAAE,MAAM,CAAC,SAAS;QACpB,EAAE,EAAE,MAAM,CAAC,SAAS;KACrB,CAAC;IACJ,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC;IAEzD,OAAO,CACL,eACE,SAAS,EAAE,GAAG,SAAS,IAAI,SAAS,EAAE,CAAC,IAAI,EAAE,EAC7C,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,KACrC,KAAK,aAER,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAE,MAAM,CAAC,MAAM,YAC3B,eAAK,SAAS,EAAE,MAAM,CAAC,QAAQ,aAC5B,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,YAAG,IAAI,GAAO,CAAC,CAAC,CAAC,IAAI,EACxD,aAAI,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,GAAM,IACrC,GACF,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAE,MAAM,CAAC,IAAI,YAAG,QAAQ,GAAO,EAC5C,OAAO,IACJ,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC","sourcesContent":["import React from \"react\";\n\nimport styles from \"./WidgetCard.module.css\";\n\nexport type WidgetSize = \"xs-a\" | \"xs-b\" | \"sm-a\" | \"sm-b\";\n\nexport interface WidgetCardProps extends React.HTMLAttributes<HTMLDivElement> {\n title?: string;\n icon?: React.ReactNode;\n children: React.ReactNode;\n size?: WidgetSize | \"sm\" | \"md\" | \"lg\";\n overlay?: React.ReactNode;\n}\n\nexport function WidgetCard({\n title,\n icon,\n children,\n size = \"sm-b\",\n className = \"\",\n overlay,\n style,\n ...props\n}: WidgetCardProps) {\n const sizeClassMap: Record<Exclude<WidgetCardProps[\"size\"], undefined>, string> =\n {\n \"xs-a\": styles.widgetXsA,\n \"xs-b\": styles.widgetXsB,\n \"sm-a\": styles.widgetSmA,\n \"sm-b\": styles.widgetSmB,\n sm: styles.widgetSmA,\n md: styles.widgetSmB,\n lg: styles.widgetSmB,\n };\n const sizeClass = sizeClassMap[size] || styles.widgetSmB;\n\n return (\n <div\n className={`${sizeClass} ${className}`.trim()}\n style={{ position: \"relative\", ...style }}\n {...props}\n >\n {title ? (\n <div className={styles.header}>\n <div className={styles.titleRow}>\n {icon ? <div className={styles.icon}>{icon}</div> : null}\n <h3 className={styles.title}>{title}</h3>\n </div>\n </div>\n ) : null}\n <div className={styles.body}>{children}</div>\n {overlay}\n </div>\n );\n}\n\nexport default WidgetCard;\n"]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.widgetXsA,
|
|
2
|
+
.widgetXsB,
|
|
3
|
+
.widgetSmA,
|
|
4
|
+
.widgetSmB {
|
|
5
|
+
background: var(--border-color);
|
|
6
|
+
border: none;
|
|
7
|
+
border-radius: 2px;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
transition: background 200ms ease;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.widgetXsA:hover,
|
|
13
|
+
.widgetXsB:hover,
|
|
14
|
+
.widgetSmA:hover,
|
|
15
|
+
.widgetSmB:hover {
|
|
16
|
+
background: var(--text-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.widgetXsA {
|
|
20
|
+
grid-column: span 1;
|
|
21
|
+
grid-row: span 1;
|
|
22
|
+
min-height: 180px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.widgetXsB {
|
|
26
|
+
grid-column: span 1;
|
|
27
|
+
grid-row: span 2;
|
|
28
|
+
min-height: 360px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.widgetSmA {
|
|
32
|
+
grid-column: span 2;
|
|
33
|
+
grid-row: span 1;
|
|
34
|
+
min-height: 180px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.widgetSmB {
|
|
38
|
+
grid-column: span 2;
|
|
39
|
+
grid-row: span 2;
|
|
40
|
+
min-height: 360px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.header {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
padding: 12px 16px;
|
|
48
|
+
border-bottom: 1px solid var(--border-color);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.titleRow {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 8px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.icon {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.title {
|
|
64
|
+
margin: 0;
|
|
65
|
+
color: var(--text-primary);
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
letter-spacing: 0.05em;
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.body {
|
|
74
|
+
padding: 12px 16px;
|
|
75
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,15 +13,24 @@ export { CornerBracketCard, type CornerBracketCardProps } from "./components/Cor
|
|
|
13
13
|
export { ErrorMessage, type ErrorMessageProps } from "./components/ErrorMessage.js";
|
|
14
14
|
export { HeartbeatIndicator, HeartbeatPulse, type HeartbeatIndicatorProps, type HeartbeatPulseProps, } from "./components/HeartbeatPulse.js";
|
|
15
15
|
export { HexagonGrid, type HexagonGridProps } from "./components/HexagonGrid.js";
|
|
16
|
+
export { LoadingOverlayCrystalline, type LoadingOverlayCrystallineProps, } from "./components/LoadingOverlayCrystalline.js";
|
|
16
17
|
export { LOADING_PROGRESS_SEGMENT_COUNT, LoadingProgressBar, type LoadingProgressBarProps, } from "./components/LoadingProgressBar.js";
|
|
18
|
+
export { LoadingScreen, type LoadingScreenProps, type LoadingStage, useLoadingProgress, } from "./components/LoadingScreen.js";
|
|
17
19
|
export { MarqueeStrip, type MarqueeStripProps } from "./components/MarqueeStrip.js";
|
|
20
|
+
export { OverlayButton, type OverlayButtonProps, } from "./components/OverlayButton.js";
|
|
18
21
|
export { PageHeader, type PageHeaderProps } from "./components/PageHeader.js";
|
|
19
22
|
export { PageTemplate, type PageTemplateProps } from "./components/PageTemplate.js";
|
|
23
|
+
export { PixelTooltip, type PixelTooltipProps, } from "./components/PixelTooltip.js";
|
|
24
|
+
export { QuickInfoCard, type QuickInfoCardProps, type QuickInfoItem, type StorageProgress, } from "./components/QuickInfoCard.js";
|
|
20
25
|
export { RuntimeOrbitDiagram, type RuntimeOrbitDiagramProps, type RuntimeOrbitNode, } from "./components/RuntimeOrbitDiagram.js";
|
|
26
|
+
export { Section, type SectionProps } from "./components/Section.js";
|
|
27
|
+
export { SectionHeader, type SectionHeaderProps, } from "./components/SectionHeader.js";
|
|
21
28
|
export { SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, } from "./components/SegmentedControl.js";
|
|
29
|
+
export { StatCard, type StatCardProps } from "./components/StatCard.js";
|
|
22
30
|
export { StatusMessage, type StatusMessageProps } from "./components/StatusMessage.js";
|
|
23
31
|
export { StrokedText, type StrokedTextProps } from "./components/StrokedText.js";
|
|
24
32
|
export { TabbedPanel, type TabbedPanelProps, type TabbedPanelTab } from "./components/TabbedPanel.js";
|
|
25
33
|
export { ThemedCard, type ThemedCardProps } from "./components/ThemedCard.js";
|
|
26
34
|
export { ThemeToggle, type ThemeToggleProps } from "./components/ThemeToggle.js";
|
|
35
|
+
export { WidgetCard, type WidgetCardProps, type WidgetSize } from "./components/WidgetCard.js";
|
|
27
36
|
//# sourceMappingURL=index.d.ts.map
|