@krpkg/ui 0.0.0-stage → 0.2.0
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 +128 -2
- package/assets/android-background-alley.svg +3 -0
- package/assets/android-background-clean.svg +3 -0
- package/assets/android-background-default.svg +3 -0
- package/assets/android-background-mono.svg +3 -0
- package/assets/android-background-teal.svg +3 -0
- package/assets/android-foreground-alley.svg +3 -0
- package/assets/android-foreground-clean.svg +3 -0
- package/assets/android-foreground-default.svg +3 -0
- package/assets/android-foreground-mono.svg +3 -0
- package/assets/android-foreground-teal.svg +3 -0
- package/assets/android-icon-background.png +0 -0
- package/assets/android-icon-foreground.png +0 -0
- package/assets/android-icon-monochrome.png +0 -0
- package/assets/apple-touch-icon-120x120.png +0 -0
- package/assets/apple-touch-icon-152x152.png +0 -0
- package/assets/apple-touch-icon-167x167.png +0 -0
- package/assets/apple-touch-icon-180x180.png +0 -0
- package/assets/apple-touch-icon.png +0 -0
- package/assets/favicon-128x128.png +0 -0
- package/assets/favicon-16x16.png +0 -0
- package/assets/favicon-32x32.png +0 -0
- package/assets/favicon-48x48.png +0 -0
- package/assets/favicon-64x64.png +0 -0
- package/assets/favicon-96x96.png +0 -0
- package/assets/favicon.ico +0 -0
- package/assets/favicon.png +0 -0
- package/assets/favicon.svg +11 -0
- package/assets/icon-alley.png +0 -0
- package/assets/icon-teal.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/logo-alley.svg +11 -0
- package/assets/logo-badge.svg +11 -0
- package/assets/logo-clean.svg +11 -0
- package/assets/logo-default.svg +11 -0
- package/assets/logo-icon.svg +3 -0
- package/assets/logo-mono.svg +11 -0
- package/assets/logo-teal.svg +11 -0
- package/assets/logo.svg +3 -0
- package/assets/pwa-192x192.png +0 -0
- package/assets/pwa-256x256.png +0 -0
- package/assets/pwa-384x384.png +0 -0
- package/assets/pwa-512x512.png +0 -0
- package/assets/pwa-maskable-192x192.png +0 -0
- package/assets/pwa-maskable-512x512.png +0 -0
- package/assets/splash-icon.png +0 -0
- package/dist/chunk-HAD2NPEW.mjs +155 -0
- package/dist/chunk-HAD2NPEW.mjs.map +1 -0
- package/dist/chunk-ZJSL4I3W.mjs +38 -0
- package/dist/chunk-ZJSL4I3W.mjs.map +1 -0
- package/dist/index.css +2053 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +245 -0
- package/dist/index.d.ts +245 -0
- package/dist/index.js +1331 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1110 -0
- package/dist/index.mjs.map +1 -0
- package/dist/tokens.d.mts +183 -0
- package/dist/tokens.d.ts +183 -0
- package/dist/tokens.js +185 -0
- package/dist/tokens.js.map +1 -0
- package/dist/tokens.mjs +19 -0
- package/dist/tokens.mjs.map +1 -0
- package/dist/utils.d.mts +13 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +65 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +9 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +55 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,1331 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
Badge: () => Badge,
|
|
24
|
+
BottomBar: () => BottomBar,
|
|
25
|
+
BracketCard: () => BracketCard,
|
|
26
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
27
|
+
Button: () => Button,
|
|
28
|
+
CornerFrame: () => CornerFrame,
|
|
29
|
+
CyberSwitch: () => CyberSwitch,
|
|
30
|
+
Dot: () => Dot,
|
|
31
|
+
HudModal: () => HudModal,
|
|
32
|
+
HudToast: () => HudToast,
|
|
33
|
+
Input: () => Input,
|
|
34
|
+
KeyValGrid: () => KeyValGrid,
|
|
35
|
+
Logo: () => Logo,
|
|
36
|
+
SegmentedControl: () => SegmentedControl,
|
|
37
|
+
SpoilerGate: () => SpoilerGate,
|
|
38
|
+
StickyNote: () => StickyNote,
|
|
39
|
+
TacticalDrawer: () => TacticalDrawer,
|
|
40
|
+
TechLabel: () => TechLabel,
|
|
41
|
+
TelemetryBar: () => TelemetryBar,
|
|
42
|
+
TerminalWindow: () => TerminalWindow,
|
|
43
|
+
Tooltip: () => Tooltip,
|
|
44
|
+
Vinyl: () => Vinyl,
|
|
45
|
+
borderRadius: () => borderRadius,
|
|
46
|
+
colors: () => colors,
|
|
47
|
+
cssTokens: () => cssTokens,
|
|
48
|
+
formatDuration: () => formatDuration,
|
|
49
|
+
formatRelativeTime: () => formatRelativeTime,
|
|
50
|
+
spacing: () => spacing,
|
|
51
|
+
themePalettes: () => themePalettes,
|
|
52
|
+
tokens: () => tokens,
|
|
53
|
+
typography: () => typography
|
|
54
|
+
});
|
|
55
|
+
module.exports = __toCommonJS(src_exports);
|
|
56
|
+
|
|
57
|
+
// src/tokens.ts
|
|
58
|
+
var colors = {
|
|
59
|
+
// Baseline / Obsidian Dark
|
|
60
|
+
bg: "#0a0a0c",
|
|
61
|
+
bg0: "#0a0a0c",
|
|
62
|
+
bg1: "#111114",
|
|
63
|
+
bg2: "#18181c",
|
|
64
|
+
bg3: "#1f1f24",
|
|
65
|
+
bgCard: "#121215",
|
|
66
|
+
bgCardHover: "#18181d",
|
|
67
|
+
bgCardActive: "#222228",
|
|
68
|
+
border: "#2a2a30",
|
|
69
|
+
borderSubtle: "#1e1e24",
|
|
70
|
+
borderLight: "#3f3f46",
|
|
71
|
+
text: "#f4f4f5",
|
|
72
|
+
text0: "#e2ded6",
|
|
73
|
+
text1: "#b0aca4",
|
|
74
|
+
text2: "#706c66",
|
|
75
|
+
text3: "#4a4844",
|
|
76
|
+
textMuted: "#a1a1aa",
|
|
77
|
+
textDim: "#71717a",
|
|
78
|
+
// Accents & Signals
|
|
79
|
+
accent: "#c49368",
|
|
80
|
+
accentHover: "#d4a478",
|
|
81
|
+
accentDim: "rgba(196, 147, 104, 0.12)",
|
|
82
|
+
accentMuted: "rgba(224, 169, 109, 0.15)",
|
|
83
|
+
teal: "#6a9e9e",
|
|
84
|
+
tealDim: "rgba(106, 158, 158, 0.12)",
|
|
85
|
+
warm: "#a08060",
|
|
86
|
+
redSoft: "#b05050",
|
|
87
|
+
greenSoft: "#6a9a6a",
|
|
88
|
+
danger: "#ef4444",
|
|
89
|
+
success: "#22c55e",
|
|
90
|
+
blue: "#3b82f6",
|
|
91
|
+
purple: "#a855f7",
|
|
92
|
+
// Sticky Note Themes
|
|
93
|
+
sticky1: "#e8e0b8",
|
|
94
|
+
sticky2: "#e0c8c0",
|
|
95
|
+
sticky3: "#c0d0d8",
|
|
96
|
+
sticky4: "#c8d8c0"
|
|
97
|
+
};
|
|
98
|
+
var themePalettes = {
|
|
99
|
+
default: {
|
|
100
|
+
name: "Amber Baseline",
|
|
101
|
+
accent: "#c49368",
|
|
102
|
+
bg0: "#0a0a0c",
|
|
103
|
+
bg1: "#111114",
|
|
104
|
+
bg2: "#18181c",
|
|
105
|
+
border: "#2a2a30"
|
|
106
|
+
},
|
|
107
|
+
citlali: {
|
|
108
|
+
name: "Citlali Star-Gaze",
|
|
109
|
+
accent: "#f2a9c8",
|
|
110
|
+
bg0: "#090d1d",
|
|
111
|
+
bg1: "#10172d",
|
|
112
|
+
bg2: "#172343",
|
|
113
|
+
border: "#334879"
|
|
114
|
+
},
|
|
115
|
+
furina: {
|
|
116
|
+
name: "Furina Hydro-Overture",
|
|
117
|
+
accent: "#5ab2ff",
|
|
118
|
+
bg0: "#060d16",
|
|
119
|
+
bg1: "#0b1624",
|
|
120
|
+
bg2: "#122238",
|
|
121
|
+
border: "#1f3c5e"
|
|
122
|
+
},
|
|
123
|
+
alley: {
|
|
124
|
+
name: "Alley Neon-Noir",
|
|
125
|
+
accent: "#b066ff",
|
|
126
|
+
bg0: "#050409",
|
|
127
|
+
bg1: "#0b0914",
|
|
128
|
+
bg2: "#141021",
|
|
129
|
+
border: "#382c54"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
var typography = {
|
|
133
|
+
fontMono: "IBMPlexMono_400Regular",
|
|
134
|
+
fontMonoLight: "IBMPlexMono_300Light",
|
|
135
|
+
fontMonoMedium: "IBMPlexMono_500Medium",
|
|
136
|
+
fontMonoBold: "IBMPlexMono_600SemiBold",
|
|
137
|
+
fontSans: "IBMPlexSans_400Regular",
|
|
138
|
+
fontSansLight: "IBMPlexSans_300Light",
|
|
139
|
+
fontSansMedium: "IBMPlexSans_500Medium",
|
|
140
|
+
fontSansBold: "IBMPlexSans_600SemiBold",
|
|
141
|
+
fontJp: "NotoSansJP_400Regular",
|
|
142
|
+
fontJpMedium: "NotoSansJP_500Medium",
|
|
143
|
+
fontJpBold: "NotoSansJP_700Bold",
|
|
144
|
+
webMono: "'IBM Plex Mono', monospace",
|
|
145
|
+
webSans: "'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
146
|
+
webJp: "'Noto Sans JP', sans-serif"
|
|
147
|
+
};
|
|
148
|
+
var spacing = {
|
|
149
|
+
none: 0,
|
|
150
|
+
xs: 4,
|
|
151
|
+
sm: 8,
|
|
152
|
+
md: 12,
|
|
153
|
+
lg: 16,
|
|
154
|
+
xl: 24,
|
|
155
|
+
xxl: 32,
|
|
156
|
+
xxxl: 48
|
|
157
|
+
};
|
|
158
|
+
var borderRadius = {
|
|
159
|
+
none: 0,
|
|
160
|
+
sm: 4,
|
|
161
|
+
md: 6,
|
|
162
|
+
lg: 10,
|
|
163
|
+
full: 9999
|
|
164
|
+
};
|
|
165
|
+
var cssTokens = {
|
|
166
|
+
colors: {
|
|
167
|
+
bg0: "var(--kz-bg-0)",
|
|
168
|
+
bg1: "var(--kz-bg-1)",
|
|
169
|
+
bg2: "var(--kz-bg-2)",
|
|
170
|
+
bg3: "var(--kz-bg-3)",
|
|
171
|
+
border: "var(--kz-border)",
|
|
172
|
+
borderSubtle: "var(--kz-border-subtle)",
|
|
173
|
+
borderLight: "var(--kz-border-light)",
|
|
174
|
+
text0: "var(--kz-text-0)",
|
|
175
|
+
text1: "var(--kz-text-1)",
|
|
176
|
+
text2: "var(--kz-text-2)",
|
|
177
|
+
text3: "var(--kz-text-3)",
|
|
178
|
+
accent: "var(--kz-accent)",
|
|
179
|
+
accentHover: "var(--kz-accent-hover)",
|
|
180
|
+
accentDim: "var(--kz-accent-dim)",
|
|
181
|
+
teal: "var(--kz-teal)",
|
|
182
|
+
tealDim: "var(--kz-teal-dim)",
|
|
183
|
+
warm: "var(--kz-warm)",
|
|
184
|
+
redSoft: "var(--kz-red-soft)",
|
|
185
|
+
greenSoft: "var(--kz-green-soft)",
|
|
186
|
+
blue: "var(--kz-blue)",
|
|
187
|
+
purple: "var(--kz-purple)"
|
|
188
|
+
},
|
|
189
|
+
typography: {
|
|
190
|
+
mono: "var(--kz-mono)",
|
|
191
|
+
sans: "var(--kz-sans)",
|
|
192
|
+
jp: "var(--kz-jp)"
|
|
193
|
+
},
|
|
194
|
+
radius: {
|
|
195
|
+
sm: "var(--kz-radius-sm)",
|
|
196
|
+
md: "var(--kz-radius-md)",
|
|
197
|
+
lg: "var(--kz-radius-lg)"
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
var tokens = cssTokens;
|
|
201
|
+
|
|
202
|
+
// src/utils/format.ts
|
|
203
|
+
function formatRelativeTime(dateInput) {
|
|
204
|
+
const date = new Date(dateInput);
|
|
205
|
+
const now = /* @__PURE__ */ new Date();
|
|
206
|
+
const diffSec = Math.floor((now.getTime() - date.getTime()) / 1e3);
|
|
207
|
+
if (isNaN(diffSec)) return "";
|
|
208
|
+
if (diffSec < 60) return `${Math.max(1, diffSec)}s`;
|
|
209
|
+
const diffMin = Math.floor(diffSec / 60);
|
|
210
|
+
if (diffMin < 60) return `${diffMin}m`;
|
|
211
|
+
const diffHours = Math.floor(diffMin / 60);
|
|
212
|
+
if (diffHours < 24) return `${diffHours}h`;
|
|
213
|
+
const diffDays = Math.floor(diffHours / 24);
|
|
214
|
+
if (diffDays < 7) return `${diffDays}d`;
|
|
215
|
+
return date.toLocaleDateString("en-US", {
|
|
216
|
+
month: "short",
|
|
217
|
+
day: "numeric",
|
|
218
|
+
year: date.getFullYear() !== now.getFullYear() ? "numeric" : void 0
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
function formatDuration(seconds) {
|
|
222
|
+
if (!seconds || seconds <= 0) return "0:00";
|
|
223
|
+
const mins = Math.floor(seconds / 60);
|
|
224
|
+
const secs = Math.floor(seconds % 60);
|
|
225
|
+
const padSecs = secs < 10 ? `0${secs}` : `${secs}`;
|
|
226
|
+
if (mins >= 60) {
|
|
227
|
+
const hours = Math.floor(mins / 60);
|
|
228
|
+
const remMins = mins % 60;
|
|
229
|
+
const padMins = remMins < 10 ? `0${remMins}` : `${remMins}`;
|
|
230
|
+
return `${hours}:${padMins}:${padSecs}`;
|
|
231
|
+
}
|
|
232
|
+
return `${mins}:${padSecs}`;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/components/Button.tsx
|
|
236
|
+
var import_react = require("react");
|
|
237
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
238
|
+
var Button = (0, import_react.forwardRef)(
|
|
239
|
+
({ className = "", variant = "outline", size = "md", children, ...props }, ref) => {
|
|
240
|
+
const classList = [
|
|
241
|
+
"kz-btn",
|
|
242
|
+
`kz-btn-${variant}`,
|
|
243
|
+
size !== "md" ? `kz-btn-${size}` : "",
|
|
244
|
+
className
|
|
245
|
+
].filter(Boolean).join(" ");
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref, className: classList, ...props, children });
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
Button.displayName = "Button";
|
|
250
|
+
|
|
251
|
+
// src/components/BracketCard.tsx
|
|
252
|
+
var import_react2 = require("react");
|
|
253
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
254
|
+
var BracketCard = (0, import_react2.forwardRef)(
|
|
255
|
+
({ className = "", children, ...props }, ref) => {
|
|
256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
257
|
+
"div",
|
|
258
|
+
{
|
|
259
|
+
ref,
|
|
260
|
+
className: `kz-bracket-card ${className}`.trim(),
|
|
261
|
+
...props,
|
|
262
|
+
children
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
BracketCard.displayName = "BracketCard";
|
|
268
|
+
|
|
269
|
+
// src/components/CornerFrame.tsx
|
|
270
|
+
var import_react3 = require("react");
|
|
271
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
272
|
+
var CornerFrame = (0, import_react3.forwardRef)(
|
|
273
|
+
({ showCorners = true, className = "", children, ...props }, ref) => {
|
|
274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: `kz-corner-frame ${className}`.trim(), ...props, children: [
|
|
275
|
+
showCorners && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "kz-corner tl", "aria-hidden": "true" }),
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "kz-corner tr", "aria-hidden": "true" }),
|
|
278
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "kz-corner bl", "aria-hidden": "true" }),
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "kz-corner br", "aria-hidden": "true" })
|
|
280
|
+
] }),
|
|
281
|
+
children
|
|
282
|
+
] });
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
CornerFrame.displayName = "CornerFrame";
|
|
286
|
+
|
|
287
|
+
// src/components/Badge.tsx
|
|
288
|
+
var import_react4 = require("react");
|
|
289
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
290
|
+
var Badge = (0, import_react4.forwardRef)(
|
|
291
|
+
({ variant = "default", className = "", children, ...props }, ref) => {
|
|
292
|
+
const classList = [
|
|
293
|
+
"kz-badge",
|
|
294
|
+
variant !== "default" ? variant : "",
|
|
295
|
+
className
|
|
296
|
+
].filter(Boolean).join(" ");
|
|
297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { ref, className: classList, ...props, children });
|
|
298
|
+
}
|
|
299
|
+
);
|
|
300
|
+
Badge.displayName = "Badge";
|
|
301
|
+
|
|
302
|
+
// src/components/Dot.tsx
|
|
303
|
+
var import_react5 = require("react");
|
|
304
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
305
|
+
var Dot = (0, import_react5.forwardRef)(
|
|
306
|
+
({ color = "accent", pulse = false, className = "", ...props }, ref) => {
|
|
307
|
+
const classList = [
|
|
308
|
+
"kz-dot",
|
|
309
|
+
color !== "accent" ? color : "",
|
|
310
|
+
pulse ? "pulse" : "",
|
|
311
|
+
className
|
|
312
|
+
].filter(Boolean).join(" ");
|
|
313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { ref, className: classList, "aria-hidden": "true", ...props });
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
Dot.displayName = "Dot";
|
|
317
|
+
|
|
318
|
+
// src/components/TechLabel.tsx
|
|
319
|
+
var import_react6 = require("react");
|
|
320
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
321
|
+
var TechLabel = (0, import_react6.forwardRef)(
|
|
322
|
+
({ label, jp, coord, className = "", children, ...props }, ref) => {
|
|
323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref, className: `kz-tech-label ${className}`.trim(), ...props, children: [
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: label }),
|
|
325
|
+
jp && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "jp", children: jp }),
|
|
326
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "kz-coord", children: [
|
|
327
|
+
"[",
|
|
328
|
+
coord,
|
|
329
|
+
"]"
|
|
330
|
+
] }),
|
|
331
|
+
children
|
|
332
|
+
] });
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
TechLabel.displayName = "TechLabel";
|
|
336
|
+
|
|
337
|
+
// src/components/Vinyl.tsx
|
|
338
|
+
var import_react7 = require("react");
|
|
339
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
340
|
+
var Vinyl = (0, import_react7.forwardRef)(
|
|
341
|
+
({
|
|
342
|
+
size = "md",
|
|
343
|
+
variant = "default",
|
|
344
|
+
layout = "disc",
|
|
345
|
+
playing = false,
|
|
346
|
+
coverUrl,
|
|
347
|
+
label = "KRZ",
|
|
348
|
+
showRing = true,
|
|
349
|
+
title,
|
|
350
|
+
artist,
|
|
351
|
+
album,
|
|
352
|
+
rpm = "33",
|
|
353
|
+
controls,
|
|
354
|
+
className = "",
|
|
355
|
+
onClick,
|
|
356
|
+
...props
|
|
357
|
+
}, ref) => {
|
|
358
|
+
const discElement = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
className: `kz-vinyl-area kz-vinyl-${size} kz-vinyl-${variant}`,
|
|
362
|
+
onClick,
|
|
363
|
+
children: [
|
|
364
|
+
showRing && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-ring", "aria-hidden": "true" }),
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `kz-vinyl ${playing ? "playing" : ""}`, children: [
|
|
366
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-grooves", "aria-hidden": "true" }),
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-label", children: [
|
|
368
|
+
coverUrl ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
369
|
+
"img",
|
|
370
|
+
{
|
|
371
|
+
src: coverUrl,
|
|
372
|
+
alt: "Vinyl center artwork",
|
|
373
|
+
className: "kz-vinyl-cover"
|
|
374
|
+
}
|
|
375
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { children: label }),
|
|
376
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-spindle", "aria-hidden": "true" })
|
|
377
|
+
] })
|
|
378
|
+
] })
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
);
|
|
382
|
+
if (layout === "disc") {
|
|
383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
ref,
|
|
387
|
+
className: `kz-vinyl-wrapper kz-layout-disc ${className}`.trim(),
|
|
388
|
+
...props,
|
|
389
|
+
children: discElement
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
if (layout === "mini") {
|
|
394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
395
|
+
"div",
|
|
396
|
+
{
|
|
397
|
+
ref,
|
|
398
|
+
className: `kz-vinyl-layout-mini kz-vinyl-${variant} ${playing ? "kz-playing" : ""} ${className}`.trim(),
|
|
399
|
+
...props,
|
|
400
|
+
children: [
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-mini-disc", children: discElement }),
|
|
402
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-mini-info", children: [
|
|
403
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-mini-status", children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `kz-vinyl-pulse ${playing ? "kz-pulse-active" : ""}` }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "kz-vinyl-status-text", children: playing ? "NOW PLAYING" : "STANDBY" }),
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "kz-vinyl-rpm-tag", children: [
|
|
407
|
+
rpm,
|
|
408
|
+
" RPM"
|
|
409
|
+
] })
|
|
410
|
+
] }),
|
|
411
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-mini-title", children: title }),
|
|
412
|
+
(artist || album) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-mini-artist", children: [
|
|
413
|
+
artist,
|
|
414
|
+
album && ` \u2014 [${album}]`
|
|
415
|
+
] })
|
|
416
|
+
] }),
|
|
417
|
+
controls && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-mini-controls", children: controls })
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
if (layout === "card" || layout === "turntable") {
|
|
423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
424
|
+
"div",
|
|
425
|
+
{
|
|
426
|
+
ref,
|
|
427
|
+
className: `kz-vinyl-layout-card kz-vinyl-${variant} ${playing ? "kz-playing" : ""} ${className}`.trim(),
|
|
428
|
+
...props,
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-deck-header", children: [
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "kz-vinyl-deck-tag", children: [
|
|
432
|
+
"HI-FI DECK // ",
|
|
433
|
+
rpm,
|
|
434
|
+
" RPM"
|
|
435
|
+
] }),
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "kz-vinyl-deck-status", children: [
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `kz-vinyl-pulse ${playing ? "kz-pulse-active" : ""}` }),
|
|
438
|
+
playing ? "ACTIVE_PLAYBACK" : "IDLE"
|
|
439
|
+
] })
|
|
440
|
+
] }),
|
|
441
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-deck-center", children: [
|
|
442
|
+
discElement,
|
|
443
|
+
layout === "turntable" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `kz-turntable-tonearm ${playing ? "engaged" : ""}`, children: [
|
|
444
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-tonearm-pivot" }),
|
|
445
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-tonearm-rod" }),
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-tonearm-head" })
|
|
447
|
+
] })
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-deck-footer", children: [
|
|
450
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-deck-meta", children: [
|
|
451
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-deck-title", children: title }),
|
|
452
|
+
(artist || album) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "kz-vinyl-deck-artist", children: [
|
|
453
|
+
artist,
|
|
454
|
+
album && ` \u2014 [${album}]`
|
|
455
|
+
] })
|
|
456
|
+
] }),
|
|
457
|
+
controls && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "kz-vinyl-deck-controls", children: controls })
|
|
458
|
+
] })
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
return discElement;
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
Vinyl.displayName = "Vinyl";
|
|
467
|
+
|
|
468
|
+
// src/components/StickyNote.tsx
|
|
469
|
+
var import_react8 = require("react");
|
|
470
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
471
|
+
var StickyNote = (0, import_react8.forwardRef)(
|
|
472
|
+
({ colorVariant = 1, title, tape = true, className = "", children, ...props }, ref) => {
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
474
|
+
"div",
|
|
475
|
+
{
|
|
476
|
+
ref,
|
|
477
|
+
className: `kz-sticky kz-sticky-${colorVariant} ${tape ? "has-tape" : ""} ${className}`.trim(),
|
|
478
|
+
...props,
|
|
479
|
+
children: [
|
|
480
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "kz-sticky-title", children: title }),
|
|
481
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "kz-sticky-body", children })
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
StickyNote.displayName = "StickyNote";
|
|
488
|
+
|
|
489
|
+
// src/components/SpoilerGate.tsx
|
|
490
|
+
var import_react9 = require("react");
|
|
491
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
492
|
+
function SpoilerGate({
|
|
493
|
+
title = "CLASSIFIED CONTENT // SPOILER GATE",
|
|
494
|
+
description = "This section contains narrative disclosures or classified intel. Proceed with caution.",
|
|
495
|
+
clearanceText = "// clearance: user acknowledgement required",
|
|
496
|
+
buttonText = "Reveal Content",
|
|
497
|
+
children,
|
|
498
|
+
defaultRevealed = false
|
|
499
|
+
}) {
|
|
500
|
+
const [revealed, setRevealed] = (0, import_react9.useState)(defaultRevealed);
|
|
501
|
+
if (revealed) {
|
|
502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children });
|
|
503
|
+
}
|
|
504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(BracketCard, { className: "kz-spoiler-gate", children: [
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kz-spoiler-icon", "aria-hidden": "true", children: "\u26A0" }),
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kz-spoiler-title", children: title }),
|
|
507
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "kz-spoiler-desc", children: description }),
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "kz-spoiler-clearance", children: clearanceText }),
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
510
|
+
Button,
|
|
511
|
+
{
|
|
512
|
+
variant: "primary",
|
|
513
|
+
size: "sm",
|
|
514
|
+
onClick: () => setRevealed(true),
|
|
515
|
+
children: buttonText
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
] });
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// src/components/Logo.tsx
|
|
522
|
+
var import_react10 = require("react");
|
|
523
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
524
|
+
var KURZAGIN_EMBLEM_PATH = "M 427.836 313.750 C 407.437 340.731, 394.892 355.256, 374.072 376.002 C 354.040 395.961, 340.283 407.774, 313 428.443 C 304.475 434.901, 297.379 440.507, 297.231 440.899 C 297.083 441.292, 301.161 442.068, 306.293 442.625 C 315.608 443.635, 315.631 443.644, 319.771 448.136 C 322.053 450.611, 326.525 453.914, 329.710 455.475 C 332.894 457.037, 342.025 459.858, 350 461.744 C 372.991 467.182, 394.656 473.443, 409.642 478.980 C 417.264 481.796, 435.650 490.118, 450.500 497.473 C 465.350 504.829, 479.843 511.371, 482.706 512.013 C 485.569 512.654, 489.315 512.870, 491.030 512.493 C 495.063 511.608, 500.400 506.893, 502.055 502.755 C 502.771 500.965, 504.654 497.826, 506.239 495.780 L 509.121 492.059 500.195 477.780 C 482.447 449.389, 470.897 425.848, 461.635 399.191 C 453.474 375.701, 448.375 352.493, 444.016 319 C 442.835 309.925, 441.560 301.262, 441.184 299.750 C 440.541 297.166, 439.733 298.014, 427.836 313.750 M 653.035 367.631 C 630.326 397.968, 609.007 422.929, 590.366 441.009 C 571.099 459.696, 557.105 471.452, 529.623 492.040 C 516.293 502.026, 515.859 502.464, 518.623 503.127 C 520.205 503.507, 524.434 504.108, 528.020 504.464 C 534.161 505.072, 534.824 505.396, 539.427 510.027 C 545.512 516.149, 554.045 519.837, 570.500 523.457 C 597.419 529.379, 620.207 536.452, 641.500 545.492 C 647.550 548.061, 660.747 554.437, 670.826 559.661 C 680.905 564.885, 691.663 570.024, 694.732 571.080 C 705.045 574.628, 713.038 573.043, 717.643 566.536 C 718.664 565.093, 721.423 561.512, 723.773 558.577 L 728.046 553.241 721.158 542.371 C 706.003 518.456, 694.474 496.400, 686.725 476.500 C 681.571 463.266, 675.390 443.922, 672.594 432.275 C 669.515 419.452, 665.566 396.537, 662.660 374.631 L 660.422 357.763 653.035 367.631 M 495 525.305 C 490.875 530.880, 482.805 541.304, 477.066 548.471 C 443.624 590.231, 416.848 615.914, 370.750 650.443 C 364.288 655.284, 359 659.554, 359 659.931 C 359 660.308, 363.190 661.072, 368.312 661.627 C 377.605 662.634, 377.632 662.645, 381.771 667.136 C 384.053 669.611, 388.419 672.860, 391.474 674.356 C 394.529 675.852, 403.885 678.674, 412.264 680.626 C 453.717 690.286, 479.620 699.543, 512.500 716.446 C 523.500 722.101, 534.907 727.515, 537.848 728.477 C 541.471 729.662, 545.147 730.085, 549.239 729.789 C 554.840 729.384, 555.545 729.051, 558.891 725.234 C 565.508 717.684, 570 711.874, 570 710.865 C 570 710.315, 565.859 703.258, 560.797 695.183 C 550.969 679.501, 539.291 657.628, 532.980 643.076 C 527.165 629.669, 518.662 604.130, 515.143 589.500 C 511.412 573.988, 507.612 551.727, 505.413 532.500 C 504.533 524.800, 503.517 517.750, 503.156 516.834 C 502.661 515.577, 500.658 517.657, 495 525.305";
|
|
525
|
+
var Logo = (0, import_react10.forwardRef)(
|
|
526
|
+
({
|
|
527
|
+
size = 28,
|
|
528
|
+
color,
|
|
529
|
+
variant = "default",
|
|
530
|
+
withRing,
|
|
531
|
+
className = "",
|
|
532
|
+
style,
|
|
533
|
+
...props
|
|
534
|
+
}, ref) => {
|
|
535
|
+
let glyphFill = color;
|
|
536
|
+
let ringStroke = color || "currentColor";
|
|
537
|
+
let ringBg = "transparent";
|
|
538
|
+
if (!color) {
|
|
539
|
+
switch (variant) {
|
|
540
|
+
case "accent":
|
|
541
|
+
glyphFill = "var(--kz-accent, #c49368)";
|
|
542
|
+
ringStroke = "var(--kz-accent, #c49368)";
|
|
543
|
+
break;
|
|
544
|
+
case "teal":
|
|
545
|
+
glyphFill = "var(--kz-teal, #50b0b0)";
|
|
546
|
+
ringStroke = "var(--kz-teal, #50b0b0)";
|
|
547
|
+
break;
|
|
548
|
+
case "purple":
|
|
549
|
+
glyphFill = "var(--kz-purple, #b066ff)";
|
|
550
|
+
ringStroke = "var(--kz-purple, #b066ff)";
|
|
551
|
+
break;
|
|
552
|
+
case "minimal":
|
|
553
|
+
glyphFill = "var(--kz-text-1, #b0aca4)";
|
|
554
|
+
ringStroke = "var(--kz-border, #2a2a30)";
|
|
555
|
+
break;
|
|
556
|
+
case "monochrome":
|
|
557
|
+
glyphFill = "var(--kz-text-0, #e2ded6)";
|
|
558
|
+
ringStroke = "var(--kz-border-light, #3a3a42)";
|
|
559
|
+
break;
|
|
560
|
+
case "badge":
|
|
561
|
+
glyphFill = "var(--kz-accent, #c49368)";
|
|
562
|
+
ringStroke = "var(--kz-accent, #c49368)";
|
|
563
|
+
ringBg = "rgba(10, 10, 12, 0.9)";
|
|
564
|
+
break;
|
|
565
|
+
case "default":
|
|
566
|
+
default:
|
|
567
|
+
glyphFill = "var(--kz-accent, #c49368)";
|
|
568
|
+
ringStroke = "var(--kz-border, #2a2a30)";
|
|
569
|
+
break;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
const showRing = withRing !== void 0 ? withRing : variant === "badge";
|
|
573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
574
|
+
"svg",
|
|
575
|
+
{
|
|
576
|
+
ref,
|
|
577
|
+
width: size,
|
|
578
|
+
height: size,
|
|
579
|
+
viewBox: "0 0 1024 1024",
|
|
580
|
+
fill: "none",
|
|
581
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
582
|
+
className: `kz-logo kz-logo-${variant} ${className}`.trim(),
|
|
583
|
+
style: {
|
|
584
|
+
display: "inline-block",
|
|
585
|
+
verticalAlign: "middle",
|
|
586
|
+
flexShrink: 0,
|
|
587
|
+
...style
|
|
588
|
+
},
|
|
589
|
+
...props,
|
|
590
|
+
children: [
|
|
591
|
+
showRing && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
592
|
+
ringBg !== "transparent" && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "512", cy: "512", r: "488", fill: ringBg }),
|
|
593
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
594
|
+
"circle",
|
|
595
|
+
{
|
|
596
|
+
cx: "512",
|
|
597
|
+
cy: "512",
|
|
598
|
+
r: "488",
|
|
599
|
+
stroke: ringStroke,
|
|
600
|
+
strokeWidth: "24",
|
|
601
|
+
strokeOpacity: variant === "default" ? 0.4 : 0.8
|
|
602
|
+
}
|
|
603
|
+
),
|
|
604
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "512", cy: "18", r: "8", fill: glyphFill }),
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "512", cy: "1006", r: "8", fill: glyphFill }),
|
|
606
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "18", cy: "512", r: "8", fill: glyphFill }),
|
|
607
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("circle", { cx: "1006", cy: "512", r: "8", fill: glyphFill })
|
|
608
|
+
] }),
|
|
609
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
610
|
+
"path",
|
|
611
|
+
{
|
|
612
|
+
d: KURZAGIN_EMBLEM_PATH,
|
|
613
|
+
fill: glyphFill || "currentColor",
|
|
614
|
+
fillRule: "evenodd"
|
|
615
|
+
}
|
|
616
|
+
)
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
Logo.displayName = "Logo";
|
|
623
|
+
|
|
624
|
+
// src/components/Input.tsx
|
|
625
|
+
var import_react11 = require("react");
|
|
626
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
627
|
+
var Input = (0, import_react11.forwardRef)(
|
|
628
|
+
({
|
|
629
|
+
className = "",
|
|
630
|
+
label,
|
|
631
|
+
sublabel,
|
|
632
|
+
prefixSymbol = ">_",
|
|
633
|
+
suffixSymbol,
|
|
634
|
+
error,
|
|
635
|
+
hint,
|
|
636
|
+
inputSize = "md",
|
|
637
|
+
fullWidth = true,
|
|
638
|
+
disabled,
|
|
639
|
+
...props
|
|
640
|
+
}, ref) => {
|
|
641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
642
|
+
"div",
|
|
643
|
+
{
|
|
644
|
+
className: [
|
|
645
|
+
"kz-input-wrapper",
|
|
646
|
+
fullWidth ? "kz-input-full" : "",
|
|
647
|
+
disabled ? "kz-input-disabled" : "",
|
|
648
|
+
error ? "kz-input-has-error" : "",
|
|
649
|
+
className
|
|
650
|
+
].filter(Boolean).join(" "),
|
|
651
|
+
children: [
|
|
652
|
+
(label || sublabel) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "kz-input-header", children: [
|
|
653
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("label", { className: "kz-input-label", children: label }),
|
|
654
|
+
sublabel && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "kz-input-sublabel", children: sublabel })
|
|
655
|
+
] }),
|
|
656
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `kz-input-field-container kz-input-${inputSize}`, children: [
|
|
657
|
+
prefixSymbol && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "kz-input-prefix", children: prefixSymbol }),
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
659
|
+
"input",
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
disabled,
|
|
663
|
+
className: "kz-input-field",
|
|
664
|
+
...props
|
|
665
|
+
}
|
|
666
|
+
),
|
|
667
|
+
suffixSymbol && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "kz-input-suffix", children: suffixSymbol }),
|
|
668
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "kz-input-corner-tl" }),
|
|
669
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "kz-input-corner-br" })
|
|
670
|
+
] }),
|
|
671
|
+
(error || hint) && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "kz-input-footer", children: error ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "kz-input-error-msg", children: error }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "kz-input-hint-msg", children: hint }) })
|
|
672
|
+
]
|
|
673
|
+
}
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
);
|
|
677
|
+
Input.displayName = "Input";
|
|
678
|
+
|
|
679
|
+
// src/components/TelemetryBar.tsx
|
|
680
|
+
var import_react12 = require("react");
|
|
681
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
682
|
+
var TelemetryBar = (0, import_react12.forwardRef)(
|
|
683
|
+
({
|
|
684
|
+
className = "",
|
|
685
|
+
value,
|
|
686
|
+
max = 100,
|
|
687
|
+
label,
|
|
688
|
+
coord,
|
|
689
|
+
variant = "accent",
|
|
690
|
+
segmented = false,
|
|
691
|
+
segmentsCount = 20,
|
|
692
|
+
showReadout = true,
|
|
693
|
+
size = "md",
|
|
694
|
+
...props
|
|
695
|
+
}, ref) => {
|
|
696
|
+
const clampedValue = Math.min(Math.max(value, 0), max);
|
|
697
|
+
const percentage = Math.round(clampedValue / max * 100);
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
699
|
+
"div",
|
|
700
|
+
{
|
|
701
|
+
ref,
|
|
702
|
+
className: [
|
|
703
|
+
"kz-telemetry-container",
|
|
704
|
+
`kz-telemetry-${size}`,
|
|
705
|
+
`kz-telemetry-${variant}`,
|
|
706
|
+
className
|
|
707
|
+
].filter(Boolean).join(" "),
|
|
708
|
+
...props,
|
|
709
|
+
children: [
|
|
710
|
+
(label || coord || showReadout) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "kz-telemetry-header", children: [
|
|
711
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "kz-telemetry-label-group", children: [
|
|
712
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "kz-telemetry-label", children: label }),
|
|
713
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "kz-telemetry-coord", children: [
|
|
714
|
+
"[",
|
|
715
|
+
coord,
|
|
716
|
+
"]"
|
|
717
|
+
] })
|
|
718
|
+
] }),
|
|
719
|
+
showReadout && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "kz-telemetry-readout", children: [
|
|
720
|
+
percentage,
|
|
721
|
+
"%"
|
|
722
|
+
] })
|
|
723
|
+
] }),
|
|
724
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "kz-telemetry-track", children: segmented ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "kz-telemetry-segments", children: Array.from({ length: segmentsCount }).map((_, idx) => {
|
|
725
|
+
const step = 100 / segmentsCount;
|
|
726
|
+
const active = (idx + 1) * step <= percentage || idx * step < percentage && (idx + 1) * step > percentage;
|
|
727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
728
|
+
"span",
|
|
729
|
+
{
|
|
730
|
+
className: `kz-telemetry-seg ${active ? "active" : ""}`
|
|
731
|
+
},
|
|
732
|
+
idx
|
|
733
|
+
);
|
|
734
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
735
|
+
"div",
|
|
736
|
+
{
|
|
737
|
+
className: "kz-telemetry-fill",
|
|
738
|
+
style: { width: `${percentage}%` },
|
|
739
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "kz-telemetry-glow" })
|
|
740
|
+
}
|
|
741
|
+
) })
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
);
|
|
747
|
+
TelemetryBar.displayName = "TelemetryBar";
|
|
748
|
+
|
|
749
|
+
// src/components/HudModal.tsx
|
|
750
|
+
var import_react13 = require("react");
|
|
751
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
752
|
+
var HudModal = ({
|
|
753
|
+
isOpen,
|
|
754
|
+
onClose,
|
|
755
|
+
title = "SYS_ALERT",
|
|
756
|
+
jp,
|
|
757
|
+
coord = "NODE-01",
|
|
758
|
+
children,
|
|
759
|
+
footer,
|
|
760
|
+
size = "md",
|
|
761
|
+
className = "",
|
|
762
|
+
closeOnBackdrop = true
|
|
763
|
+
}) => {
|
|
764
|
+
(0, import_react13.useEffect)(() => {
|
|
765
|
+
if (!isOpen) return;
|
|
766
|
+
const handleKeyDown = (e) => {
|
|
767
|
+
if (e.key === "Escape") {
|
|
768
|
+
onClose();
|
|
769
|
+
}
|
|
770
|
+
};
|
|
771
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
772
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
773
|
+
}, [isOpen, onClose]);
|
|
774
|
+
if (!isOpen) return null;
|
|
775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "kz-modal-portal", children: [
|
|
776
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
777
|
+
"div",
|
|
778
|
+
{
|
|
779
|
+
className: "kz-modal-backdrop",
|
|
780
|
+
onClick: closeOnBackdrop ? onClose : void 0
|
|
781
|
+
}
|
|
782
|
+
),
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `kz-modal-dialog kz-modal-${size} ${className}`, children: [
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "kz-modal-header", children: [
|
|
785
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "kz-modal-title-group", children: [
|
|
786
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "kz-modal-title", children: title }),
|
|
787
|
+
jp && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "kz-modal-jp", children: jp }),
|
|
788
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "kz-modal-coord", children: [
|
|
789
|
+
"// [",
|
|
790
|
+
coord,
|
|
791
|
+
"]"
|
|
792
|
+
] })
|
|
793
|
+
] }),
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
795
|
+
"button",
|
|
796
|
+
{
|
|
797
|
+
type: "button",
|
|
798
|
+
className: "kz-modal-close-btn",
|
|
799
|
+
onClick: onClose,
|
|
800
|
+
"aria-label": "Close dialog",
|
|
801
|
+
children: "[ESC \u2715]"
|
|
802
|
+
}
|
|
803
|
+
)
|
|
804
|
+
] }),
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-body", children }),
|
|
806
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-footer", children: footer }),
|
|
807
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-corner-tl" }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-corner-tr" }),
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-corner-bl" }),
|
|
810
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "kz-modal-corner-br" })
|
|
811
|
+
] })
|
|
812
|
+
] });
|
|
813
|
+
};
|
|
814
|
+
HudModal.displayName = "HudModal";
|
|
815
|
+
|
|
816
|
+
// src/components/TerminalWindow.tsx
|
|
817
|
+
var import_react14 = require("react");
|
|
818
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
819
|
+
var TerminalWindow = (0, import_react14.forwardRef)(
|
|
820
|
+
({
|
|
821
|
+
className = "",
|
|
822
|
+
title = "terminal.sh",
|
|
823
|
+
badge = "ACTIVE",
|
|
824
|
+
code,
|
|
825
|
+
showLineNumbers = true,
|
|
826
|
+
copyable = true,
|
|
827
|
+
...props
|
|
828
|
+
}, ref) => {
|
|
829
|
+
const [copied, setCopied] = (0, import_react14.useState)(false);
|
|
830
|
+
const handleCopy = () => {
|
|
831
|
+
navigator.clipboard.writeText(code);
|
|
832
|
+
setCopied(true);
|
|
833
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
834
|
+
};
|
|
835
|
+
const lines = code.trim().split("\n");
|
|
836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
837
|
+
"div",
|
|
838
|
+
{
|
|
839
|
+
ref,
|
|
840
|
+
className: ["kz-terminal-window", className].filter(Boolean).join(" "),
|
|
841
|
+
...props,
|
|
842
|
+
children: [
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "kz-terminal-header", children: [
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "kz-terminal-dots", children: [
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-term-dot kz-term-dot-red" }),
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-term-dot kz-term-dot-yellow" }),
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-term-dot kz-term-dot-green" })
|
|
848
|
+
] }),
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "kz-terminal-title-box", children: [
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-terminal-title", children: title }),
|
|
851
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-terminal-badge", children: badge })
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "kz-terminal-actions", children: copyable && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
854
|
+
"button",
|
|
855
|
+
{
|
|
856
|
+
type: "button",
|
|
857
|
+
className: "kz-terminal-copy-btn",
|
|
858
|
+
onClick: handleCopy,
|
|
859
|
+
"aria-label": "Copy code",
|
|
860
|
+
children: copied ? "[COPIED]" : "[COPY]"
|
|
861
|
+
}
|
|
862
|
+
) })
|
|
863
|
+
] }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "kz-terminal-body", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("pre", { className: "kz-terminal-pre", children: showLineNumbers ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: lines.map((line, idx) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "kz-terminal-line", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-terminal-lineno", children: idx + 1 }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "kz-terminal-linecontent", children: line || " " })
|
|
867
|
+
] }, idx)) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("code", { children: code }) }) })
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
TerminalWindow.displayName = "TerminalWindow";
|
|
874
|
+
|
|
875
|
+
// src/components/Tooltip.tsx
|
|
876
|
+
var import_react15 = require("react");
|
|
877
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
878
|
+
var Tooltip = ({
|
|
879
|
+
content,
|
|
880
|
+
children,
|
|
881
|
+
position = "top",
|
|
882
|
+
coord,
|
|
883
|
+
className = ""
|
|
884
|
+
}) => {
|
|
885
|
+
const [isVisible, setIsVisible] = (0, import_react15.useState)(false);
|
|
886
|
+
const timeoutRef = (0, import_react15.useRef)(null);
|
|
887
|
+
const show = () => {
|
|
888
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
889
|
+
setIsVisible(true);
|
|
890
|
+
};
|
|
891
|
+
const hide = () => {
|
|
892
|
+
timeoutRef.current = setTimeout(() => {
|
|
893
|
+
setIsVisible(false);
|
|
894
|
+
}, 100);
|
|
895
|
+
};
|
|
896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
897
|
+
"div",
|
|
898
|
+
{
|
|
899
|
+
className: "kz-tooltip-wrapper",
|
|
900
|
+
onMouseEnter: show,
|
|
901
|
+
onMouseLeave: hide,
|
|
902
|
+
onFocus: show,
|
|
903
|
+
onBlur: hide,
|
|
904
|
+
children: [
|
|
905
|
+
children,
|
|
906
|
+
isVisible && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
role: "tooltip",
|
|
910
|
+
className: `kz-tooltip-box kz-tooltip-${position} ${className}`,
|
|
911
|
+
children: [
|
|
912
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "kz-tooltip-coord", children: [
|
|
913
|
+
"[",
|
|
914
|
+
coord,
|
|
915
|
+
"]"
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "kz-tooltip-content", children: content }),
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "kz-tooltip-arrow" })
|
|
919
|
+
]
|
|
920
|
+
}
|
|
921
|
+
)
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
};
|
|
926
|
+
Tooltip.displayName = "Tooltip";
|
|
927
|
+
|
|
928
|
+
// src/components/SegmentedControl.tsx
|
|
929
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
930
|
+
function SegmentedControl({
|
|
931
|
+
options,
|
|
932
|
+
value,
|
|
933
|
+
onChange,
|
|
934
|
+
size = "md",
|
|
935
|
+
fullWidth = false,
|
|
936
|
+
className = "",
|
|
937
|
+
variant = "default"
|
|
938
|
+
}) {
|
|
939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
940
|
+
"div",
|
|
941
|
+
{
|
|
942
|
+
className: `kz-segmented-control kz-segmented-${size} kz-segmented-${variant} ${fullWidth ? "kz-segmented-full" : ""} ${className}`.trim(),
|
|
943
|
+
role: "tablist",
|
|
944
|
+
children: options.map((option) => {
|
|
945
|
+
const isActive = option.value === value;
|
|
946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
947
|
+
"button",
|
|
948
|
+
{
|
|
949
|
+
type: "button",
|
|
950
|
+
role: "tab",
|
|
951
|
+
"aria-selected": isActive,
|
|
952
|
+
disabled: option.disabled,
|
|
953
|
+
className: `kz-segmented-item ${isActive ? "kz-active" : ""} ${option.disabled ? "kz-disabled" : ""}`.trim(),
|
|
954
|
+
onClick: () => !option.disabled && onChange(option.value),
|
|
955
|
+
children: [
|
|
956
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "kz-segmented-bracket-l" }),
|
|
957
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "kz-segmented-content", children: [
|
|
958
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "kz-segmented-label", children: option.label }),
|
|
959
|
+
option.sublabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "kz-segmented-sublabel", children: option.sublabel })
|
|
960
|
+
] }),
|
|
961
|
+
option.badge !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "kz-segmented-badge", children: option.badge }),
|
|
962
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "kz-segmented-bracket-r" })
|
|
963
|
+
]
|
|
964
|
+
},
|
|
965
|
+
option.value
|
|
966
|
+
);
|
|
967
|
+
})
|
|
968
|
+
}
|
|
969
|
+
);
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
// src/components/CyberSwitch.tsx
|
|
973
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
974
|
+
function CyberSwitch({
|
|
975
|
+
checked,
|
|
976
|
+
onChange,
|
|
977
|
+
label,
|
|
978
|
+
sublabel,
|
|
979
|
+
disabled = false,
|
|
980
|
+
size = "md",
|
|
981
|
+
variant = "default",
|
|
982
|
+
className = ""
|
|
983
|
+
}) {
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
985
|
+
"label",
|
|
986
|
+
{
|
|
987
|
+
className: `kz-switch-container kz-switch-${size} kz-switch-${variant} ${checked ? "kz-checked" : ""} ${disabled ? "kz-disabled" : ""} ${className}`.trim(),
|
|
988
|
+
onClick: (e) => {
|
|
989
|
+
if (disabled) return;
|
|
990
|
+
e.preventDefault();
|
|
991
|
+
onChange(!checked);
|
|
992
|
+
},
|
|
993
|
+
children: [
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
995
|
+
"div",
|
|
996
|
+
{
|
|
997
|
+
className: "kz-switch-track",
|
|
998
|
+
role: "switch",
|
|
999
|
+
"aria-checked": checked,
|
|
1000
|
+
tabIndex: disabled ? -1 : 0,
|
|
1001
|
+
onKeyDown: (e) => {
|
|
1002
|
+
if (disabled) return;
|
|
1003
|
+
if (e.key === " " || e.key === "Enter") {
|
|
1004
|
+
e.preventDefault();
|
|
1005
|
+
onChange(!checked);
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "kz-switch-state-text left", children: checked ? "1" : "" }),
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "kz-switch-thumb", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "kz-switch-thumb-grip" }) }),
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "kz-switch-state-text right", children: !checked ? "0" : "" })
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
),
|
|
1015
|
+
(label || sublabel) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "kz-switch-text-group", children: [
|
|
1016
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "kz-switch-label", children: label }),
|
|
1017
|
+
sublabel && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "kz-switch-sublabel", children: sublabel })
|
|
1018
|
+
] })
|
|
1019
|
+
]
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
// src/components/KeyValGrid.tsx
|
|
1025
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1026
|
+
function KeyValGrid({
|
|
1027
|
+
items,
|
|
1028
|
+
title,
|
|
1029
|
+
coord,
|
|
1030
|
+
columns = 1,
|
|
1031
|
+
leaderDots = true,
|
|
1032
|
+
className = ""
|
|
1033
|
+
}) {
|
|
1034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1035
|
+
"div",
|
|
1036
|
+
{
|
|
1037
|
+
className: `kz-keyval-grid kz-keyval-cols-${columns} ${className}`.trim(),
|
|
1038
|
+
children: [
|
|
1039
|
+
(title || coord) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "kz-keyval-header", children: [
|
|
1040
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "kz-keyval-title", children: title }),
|
|
1041
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "kz-keyval-coord", children: coord })
|
|
1042
|
+
] }),
|
|
1043
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "kz-keyval-list", children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "kz-keyval-row", children: [
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "kz-keyval-key", children: [
|
|
1045
|
+
item.status && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: `kz-keyval-dot kz-dot-${item.status}` }),
|
|
1046
|
+
item.key
|
|
1047
|
+
] }),
|
|
1048
|
+
leaderDots && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "kz-keyval-leader" }),
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "kz-keyval-val", children: [
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "kz-keyval-val-main", children: item.value }),
|
|
1051
|
+
item.sub && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "kz-keyval-val-sub", children: item.sub })
|
|
1052
|
+
] })
|
|
1053
|
+
] }, idx)) })
|
|
1054
|
+
]
|
|
1055
|
+
}
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
// src/components/Breadcrumbs.tsx
|
|
1060
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1061
|
+
function Breadcrumbs({
|
|
1062
|
+
items,
|
|
1063
|
+
prefix = "SYS //",
|
|
1064
|
+
separator = "/",
|
|
1065
|
+
className = ""
|
|
1066
|
+
}) {
|
|
1067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1068
|
+
"nav",
|
|
1069
|
+
{
|
|
1070
|
+
"aria-label": "Breadcrumb",
|
|
1071
|
+
className: `kz-breadcrumbs ${className}`.trim(),
|
|
1072
|
+
children: [
|
|
1073
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "kz-breadcrumb-prefix", children: prefix }),
|
|
1074
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ol", { className: "kz-breadcrumb-list", children: items.map((item, idx) => {
|
|
1075
|
+
const isLast = idx === items.length - 1;
|
|
1076
|
+
const isActive = item.active || isLast;
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1078
|
+
"li",
|
|
1079
|
+
{
|
|
1080
|
+
className: `kz-breadcrumb-item ${isActive ? "kz-active" : ""}`,
|
|
1081
|
+
children: [
|
|
1082
|
+
idx > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "kz-breadcrumb-separator", "aria-hidden": "true", children: separator }),
|
|
1083
|
+
item.href && !isActive ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1084
|
+
"a",
|
|
1085
|
+
{
|
|
1086
|
+
href: item.href,
|
|
1087
|
+
className: "kz-breadcrumb-link",
|
|
1088
|
+
onClick: item.onClick,
|
|
1089
|
+
children: item.label
|
|
1090
|
+
}
|
|
1091
|
+
) : item.onClick && !isActive ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1092
|
+
"button",
|
|
1093
|
+
{
|
|
1094
|
+
type: "button",
|
|
1095
|
+
className: "kz-breadcrumb-button",
|
|
1096
|
+
onClick: item.onClick,
|
|
1097
|
+
children: item.label
|
|
1098
|
+
}
|
|
1099
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1100
|
+
"span",
|
|
1101
|
+
{
|
|
1102
|
+
className: "kz-breadcrumb-current",
|
|
1103
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1104
|
+
children: item.label
|
|
1105
|
+
}
|
|
1106
|
+
)
|
|
1107
|
+
]
|
|
1108
|
+
},
|
|
1109
|
+
idx
|
|
1110
|
+
);
|
|
1111
|
+
}) })
|
|
1112
|
+
]
|
|
1113
|
+
}
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
// src/components/TacticalDrawer.tsx
|
|
1118
|
+
var import_react16 = require("react");
|
|
1119
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1120
|
+
function TacticalDrawer({
|
|
1121
|
+
isOpen,
|
|
1122
|
+
onClose,
|
|
1123
|
+
title,
|
|
1124
|
+
coord = "DRAWER // 0xAF",
|
|
1125
|
+
sublabel,
|
|
1126
|
+
children,
|
|
1127
|
+
position = "bottom",
|
|
1128
|
+
className = ""
|
|
1129
|
+
}) {
|
|
1130
|
+
(0, import_react16.useEffect)(() => {
|
|
1131
|
+
if (!isOpen) return;
|
|
1132
|
+
const handleKeyDown = (e) => {
|
|
1133
|
+
if (e.key === "Escape") onClose();
|
|
1134
|
+
};
|
|
1135
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
1136
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1137
|
+
}, [isOpen, onClose]);
|
|
1138
|
+
if (!isOpen) return null;
|
|
1139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1140
|
+
"div",
|
|
1141
|
+
{
|
|
1142
|
+
className: `kz-drawer-backdrop kz-drawer-${position}`,
|
|
1143
|
+
onClick: (e) => {
|
|
1144
|
+
if (e.target === e.currentTarget) onClose();
|
|
1145
|
+
},
|
|
1146
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1147
|
+
"div",
|
|
1148
|
+
{
|
|
1149
|
+
className: `kz-drawer-panel kz-drawer-panel-${position} ${className}`.trim(),
|
|
1150
|
+
role: "dialog",
|
|
1151
|
+
"aria-modal": "true",
|
|
1152
|
+
children: [
|
|
1153
|
+
position === "bottom" && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "kz-drawer-handle-bar", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "kz-drawer-handle-pill" }) }),
|
|
1154
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "kz-drawer-header", children: [
|
|
1155
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "kz-drawer-title-group", children: [
|
|
1156
|
+
coord && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "kz-drawer-coord", children: coord }),
|
|
1157
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h3", { className: "kz-drawer-title", children: title }),
|
|
1158
|
+
sublabel && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "kz-drawer-sublabel", children: sublabel })
|
|
1159
|
+
] }),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1161
|
+
"button",
|
|
1162
|
+
{
|
|
1163
|
+
type: "button",
|
|
1164
|
+
className: "kz-drawer-close-btn",
|
|
1165
|
+
onClick: onClose,
|
|
1166
|
+
"aria-label": "Close drawer",
|
|
1167
|
+
children: "\u2715"
|
|
1168
|
+
}
|
|
1169
|
+
)
|
|
1170
|
+
] }),
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "kz-drawer-body", children })
|
|
1172
|
+
]
|
|
1173
|
+
}
|
|
1174
|
+
)
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
// src/components/HudToast.tsx
|
|
1180
|
+
var import_react17 = require("react");
|
|
1181
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1182
|
+
function HudToast({
|
|
1183
|
+
isOpen,
|
|
1184
|
+
onClose,
|
|
1185
|
+
title,
|
|
1186
|
+
description,
|
|
1187
|
+
variant = "default",
|
|
1188
|
+
duration = 4e3,
|
|
1189
|
+
coord = "HUD // NOTIFY",
|
|
1190
|
+
className = ""
|
|
1191
|
+
}) {
|
|
1192
|
+
const [progress, setProgress] = (0, import_react17.useState)(100);
|
|
1193
|
+
(0, import_react17.useEffect)(() => {
|
|
1194
|
+
if (!isOpen || duration <= 0) return;
|
|
1195
|
+
setProgress(100);
|
|
1196
|
+
const startTime = Date.now();
|
|
1197
|
+
const interval = setInterval(() => {
|
|
1198
|
+
const elapsed = Date.now() - startTime;
|
|
1199
|
+
const remaining = Math.max(0, 100 - elapsed / duration * 100);
|
|
1200
|
+
setProgress(remaining);
|
|
1201
|
+
if (elapsed >= duration) {
|
|
1202
|
+
clearInterval(interval);
|
|
1203
|
+
onClose();
|
|
1204
|
+
}
|
|
1205
|
+
}, 50);
|
|
1206
|
+
return () => clearInterval(interval);
|
|
1207
|
+
}, [isOpen, duration, onClose]);
|
|
1208
|
+
if (!isOpen) return null;
|
|
1209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1210
|
+
"div",
|
|
1211
|
+
{
|
|
1212
|
+
className: `kz-hud-toast kz-toast-${variant} ${className}`.trim(),
|
|
1213
|
+
role: "alert",
|
|
1214
|
+
children: [
|
|
1215
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "kz-toast-inner", children: [
|
|
1216
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kz-toast-bracket-l" }),
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "kz-toast-content", children: [
|
|
1218
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "kz-toast-header", children: [
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kz-toast-dot" }),
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kz-toast-coord", children: coord })
|
|
1221
|
+
] }),
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kz-toast-title", children: title }),
|
|
1223
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kz-toast-desc", children: description })
|
|
1224
|
+
] }),
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1226
|
+
"button",
|
|
1227
|
+
{
|
|
1228
|
+
type: "button",
|
|
1229
|
+
className: "kz-toast-dismiss",
|
|
1230
|
+
onClick: onClose,
|
|
1231
|
+
"aria-label": "Dismiss notification",
|
|
1232
|
+
children: "\u2715"
|
|
1233
|
+
}
|
|
1234
|
+
),
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "kz-toast-bracket-r" })
|
|
1236
|
+
] }),
|
|
1237
|
+
duration > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "kz-toast-progress-track", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1238
|
+
"div",
|
|
1239
|
+
{
|
|
1240
|
+
className: "kz-toast-progress-bar",
|
|
1241
|
+
style: { width: `${progress}%` }
|
|
1242
|
+
}
|
|
1243
|
+
) })
|
|
1244
|
+
]
|
|
1245
|
+
}
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
// src/components/BottomBar.tsx
|
|
1250
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1251
|
+
function BottomBar({
|
|
1252
|
+
items,
|
|
1253
|
+
activeId,
|
|
1254
|
+
onSelect,
|
|
1255
|
+
bordered = true,
|
|
1256
|
+
blur = true,
|
|
1257
|
+
fixed = true,
|
|
1258
|
+
className = "",
|
|
1259
|
+
variant = "default"
|
|
1260
|
+
}) {
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1262
|
+
"nav",
|
|
1263
|
+
{
|
|
1264
|
+
className: `kz-bottom-bar kz-bottom-bar-${variant} ${fixed ? "kz-bottom-bar-fixed" : ""} ${blur ? "kz-bottom-bar-blur" : ""} ${bordered ? "kz-bottom-bar-bordered" : ""} ${className}`.trim(),
|
|
1265
|
+
role: "navigation",
|
|
1266
|
+
"aria-label": "Bottom navigation",
|
|
1267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "kz-bottom-bar-track", children: items.map((item) => {
|
|
1268
|
+
const isActive = activeId !== void 0 ? item.id === activeId : item.active;
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1270
|
+
"button",
|
|
1271
|
+
{
|
|
1272
|
+
type: "button",
|
|
1273
|
+
role: "tab",
|
|
1274
|
+
"aria-selected": isActive,
|
|
1275
|
+
disabled: item.disabled,
|
|
1276
|
+
className: `kz-bottom-bar-item ${isActive ? "kz-active" : ""} ${item.disabled ? "kz-disabled" : ""}`.trim(),
|
|
1277
|
+
onClick: () => {
|
|
1278
|
+
if (item.disabled) return;
|
|
1279
|
+
item.onClick?.();
|
|
1280
|
+
onSelect?.(item.id);
|
|
1281
|
+
},
|
|
1282
|
+
children: [
|
|
1283
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kz-bottom-bar-active-pip" }),
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "kz-bottom-bar-icon-wrap", children: [
|
|
1285
|
+
item.icon,
|
|
1286
|
+
item.badge !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kz-bottom-bar-badge", children: item.badge })
|
|
1287
|
+
] }),
|
|
1288
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "kz-bottom-bar-label", children: item.label })
|
|
1289
|
+
]
|
|
1290
|
+
},
|
|
1291
|
+
item.id
|
|
1292
|
+
);
|
|
1293
|
+
}) })
|
|
1294
|
+
}
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1298
|
+
0 && (module.exports = {
|
|
1299
|
+
Badge,
|
|
1300
|
+
BottomBar,
|
|
1301
|
+
BracketCard,
|
|
1302
|
+
Breadcrumbs,
|
|
1303
|
+
Button,
|
|
1304
|
+
CornerFrame,
|
|
1305
|
+
CyberSwitch,
|
|
1306
|
+
Dot,
|
|
1307
|
+
HudModal,
|
|
1308
|
+
HudToast,
|
|
1309
|
+
Input,
|
|
1310
|
+
KeyValGrid,
|
|
1311
|
+
Logo,
|
|
1312
|
+
SegmentedControl,
|
|
1313
|
+
SpoilerGate,
|
|
1314
|
+
StickyNote,
|
|
1315
|
+
TacticalDrawer,
|
|
1316
|
+
TechLabel,
|
|
1317
|
+
TelemetryBar,
|
|
1318
|
+
TerminalWindow,
|
|
1319
|
+
Tooltip,
|
|
1320
|
+
Vinyl,
|
|
1321
|
+
borderRadius,
|
|
1322
|
+
colors,
|
|
1323
|
+
cssTokens,
|
|
1324
|
+
formatDuration,
|
|
1325
|
+
formatRelativeTime,
|
|
1326
|
+
spacing,
|
|
1327
|
+
themePalettes,
|
|
1328
|
+
tokens,
|
|
1329
|
+
typography
|
|
1330
|
+
});
|
|
1331
|
+
//# sourceMappingURL=index.js.map
|