@jetzeroaero/design-system 1.2.0 → 1.4.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 +14 -4
- package/dist/components.css +205 -0
- package/dist/index.cjs +429 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +191 -2
- package/dist/index.d.ts +191 -2
- package/dist/index.js +408 -65
- package/dist/index.js.map +1 -1
- package/dist/logos/AWG4-black.svg +14 -0
- package/dist/logos/AWG4-white.svg +14 -0
- package/dist/logos/JZ-Factory1-logo-grey-night.svg +20 -0
- package/dist/logos/JZ-Factory1-logo-night.svg +20 -0
- package/dist/logos/JZ-Factory1-logo-white-night.svg +20 -0
- package/dist/logos/JZ-Factory1-logo-white.svg +20 -0
- package/dist/logos/JZ-Jet1-grey-night.svg +19 -0
- package/dist/logos/JZ-Jet1-night-white.svg +19 -0
- package/dist/logos/JZ-Jet1-night.svg +19 -0
- package/dist/logos/JZ-Jet1-white-night.svg +19 -0
- package/dist/logos/JZ-Jet1-white.svg +19 -0
- package/dist/logos/JZ-Z4-night.svg +15 -0
- package/dist/logos/JZ-Z4-white.svg +17 -0
- package/dist/logos/Z-square-fire-white.svg +15 -0
- package/dist/logos/Z-square-night-white.svg +15 -0
- package/dist/logos/Z-square-white-fire.svg +15 -0
- package/dist/logos/Z-square-white-night.svg +15 -0
- package/dist/tokens.css +30 -0
- package/package.json +6 -2
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var React6 = require('react');
|
|
4
|
+
var lucideReact = require('lucide-react');
|
|
3
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
6
|
|
|
6
7
|
function _interopNamespace(e) {
|
|
7
8
|
if (e && e.__esModule) return e;
|
|
@@ -21,7 +22,7 @@ function _interopNamespace(e) {
|
|
|
21
22
|
return Object.freeze(n);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
var
|
|
25
|
+
var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
|
|
25
26
|
|
|
26
27
|
// src/tokens.ts
|
|
27
28
|
var palette = {
|
|
@@ -175,66 +176,214 @@ var tokens = {
|
|
|
175
176
|
tracking
|
|
176
177
|
};
|
|
177
178
|
var tokens_default = tokens;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
|
|
180
|
+
// src/components/cx.ts
|
|
181
|
+
var cx = (...parts) => parts.filter(Boolean).join(" ");
|
|
182
|
+
var Spinner = ({ size = "md", label = "Loading" }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("jz-spinner", size === "lg" && "jz-spinner--lg"), role: "status", "aria-label": label });
|
|
183
|
+
var Badge = ({ tone = "neutral", className, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("jz-badge", `jz-badge--${tone}`, className), ...rest });
|
|
184
|
+
var EmptyState = ({ title, description, icon, action }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-empty", children: [
|
|
185
|
+
icon,
|
|
186
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "jz-empty__title", children: title }),
|
|
187
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "jz-empty__desc", children: description }),
|
|
188
|
+
action
|
|
189
|
+
] });
|
|
190
|
+
var ToastContext = React6__namespace.createContext(null);
|
|
191
|
+
var ToastProvider = ({ children }) => {
|
|
192
|
+
const [items, setItems] = React6__namespace.useState([]);
|
|
193
|
+
const nextId = React6__namespace.useRef(1);
|
|
194
|
+
const dismiss = React6__namespace.useCallback((id) => setItems((xs) => xs.filter((x) => x.id !== id)), []);
|
|
195
|
+
const toast = React6__namespace.useCallback((opts) => {
|
|
196
|
+
const id = nextId.current++;
|
|
197
|
+
setItems((xs) => [...xs, { ...opts, id }]);
|
|
198
|
+
const ms = opts.duration ?? 5e3;
|
|
199
|
+
if (ms > 0) setTimeout(() => dismiss(id), ms);
|
|
200
|
+
}, [dismiss]);
|
|
201
|
+
const api = React6__namespace.useMemo(() => ({ toast }), [toast]);
|
|
202
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: api, children: [
|
|
203
|
+
children,
|
|
204
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-toasts", "aria-live": "polite", "aria-atomic": "false", children: items.map((t) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("jz-toast", t.tone && t.tone !== "neutral" && `jz-toast--${t.tone}`), role: t.tone === "danger" ? "alert" : "status", children: [
|
|
205
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
206
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-toast__title", children: t.title }),
|
|
207
|
+
t.description && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-toast__desc", children: t.description })
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "jz-toast__x", "aria-label": "Dismiss", onClick: () => dismiss(t.id), children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 14 14", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.5 2.5l9 9M11.5 2.5l-9 9" }) }) })
|
|
210
|
+
] }, t.id)) })
|
|
211
|
+
] });
|
|
212
|
+
};
|
|
213
|
+
function useToast() {
|
|
214
|
+
const ctx = React6__namespace.useContext(ToastContext);
|
|
215
|
+
if (!ctx) throw new Error("useToast must be used inside <ToastProvider>.");
|
|
216
|
+
return ctx;
|
|
217
|
+
}
|
|
218
|
+
var Button = React6__namespace.forwardRef(function Button2({ variant = "secondary", size = "md", loading, block, iconOnly, leadingIcon, className, children, disabled, type = "button", ...rest }, ref) {
|
|
219
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
220
|
+
"button",
|
|
221
|
+
{
|
|
222
|
+
ref,
|
|
223
|
+
type,
|
|
224
|
+
className: cx("jz-btn", `jz-btn--${variant}`, size !== "md" && `jz-btn--${size}`, block && "jz-btn--block", iconOnly && "jz-btn--icon", className),
|
|
225
|
+
disabled: disabled || loading,
|
|
226
|
+
"aria-busy": loading || void 0,
|
|
227
|
+
...rest,
|
|
228
|
+
children: [
|
|
229
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) : leadingIcon,
|
|
230
|
+
children
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
});
|
|
235
|
+
var Wordmark = ({ height = 22, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
236
|
+
"svg",
|
|
237
|
+
{
|
|
238
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
239
|
+
viewBox: "0 0 344.34 76.72",
|
|
240
|
+
height,
|
|
241
|
+
width: height * 344.34 / 76.72,
|
|
242
|
+
role: "img",
|
|
243
|
+
"aria-label": "JetZero",
|
|
244
|
+
...rest,
|
|
245
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("g", { children: /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
247
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--jz-fire)", d: "M6.88,75.74c-3.78,0-6.85-.7-6.85-.7l-.03-12.78s2.43.82,5.11.82c3.94,0,7.19-2,9.67-4.47,2.65-2.63,3.96-6.38,3.96-10.87V0h13.64v47.73c0,8.2-2.57,15.23-7.45,20.39-4.64,4.91-11.06,7.62-18.07,7.62Z" }),
|
|
248
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--jz-fire)", d: "M131.23,20.46V6.83h-18.75V0h-13.64v47.73c0,8.2,2.57,15.23,7.45,20.39,4.64,4.91,11.06,7.62,18.07,7.62,3.78,0,6.85-.7,6.85-.7l.03-12.78s-2.43.82-5.11.82c-3.94,0-7.19-2-9.67-4.47-2.65-2.63-3.96-6.38-3.96-10.87v-27.29h18.75Z" }),
|
|
249
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
250
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--jz-fire)", d: "M95.3,46.03c.16-1.62.25-3.29.25-5.02,0-22.07-10.72-35.9-28.98-35.9s-30.68,13.64-30.68,35.9c0,24.12,12.68,35.71,31.49,35.71,14.19,0,26.31-6.12,26.31-6.12l-4.94-10.51s-11.71,4.69-22.12,4.69c-6.42,0-9.97-2.64-12.8-6.13-2.31-2.84-3.64-6.92-4.11-12.62h45.59ZM50.06,34.11c1.47-7.59,5.68-17.05,16.51-17.05s15.39,10.22,15.39,17.05h-31.9Z" }),
|
|
251
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--jz-fire)", d: "M95.3,46.03c.16-1.62.25-3.29.25-5.02,0-22.07-10.72-35.9-28.98-35.9s-30.68,13.64-30.68,35.9c0,24.12,12.68,35.71,31.49,35.71,14.19,0,26.31-6.12,26.31-6.12l-4.94-10.51s-11.71,4.69-22.12,4.69c-6.42,0-9.97-2.64-12.8-6.13-2.31-2.84-3.64-6.92-4.11-12.62h45.59ZM50.06,34.11c1.47-7.59,5.68-17.05,16.51-17.05s15.39,10.22,15.39,17.05h-31.9Z" })
|
|
252
|
+
] })
|
|
253
|
+
] }),
|
|
254
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--wordmark-ink)", d: "M255.8,74.92V6.83h13.46v5.05c4.2-3.89,11.9-6.72,18.94-6.72l-4.98,15.3c-6.58,0-11.47,1.56-13.9,4.97l-.07,49.48h-13.46Z" }),
|
|
256
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
257
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--wordmark-ink)", d: "M195.96,10.69c.03-.06.06-.12.08-.19.02-.05.05-.1.06-.15.02-.05.03-.1.04-.15.02-.07.04-.14.06-.2,0-.05.01-.09.02-.14.01-.07.02-.14.03-.22,0-.06,0-.12,0-.18s0-.12,0-.18c0-.09-.02-.18-.04-.27,0-.03,0-.06-.01-.09-.02-.12-.06-.23-.1-.35,0,0,0,0,0,0-.04-.12-.09-.23-.15-.35-.45-.86-1.31-1.4-2.27-1.44-.04,0-.07,0-.1,0h-49.19l-9.64,13.64h37.59l.16-.05-.13.1-21.7,30.69h16.7s28.4-40.16,28.4-40.16c.06-.08.1-.16.15-.25.01-.02.03-.05.04-.07Z" }),
|
|
258
|
+
/* @__PURE__ */ jsxRuntime.jsx("polygon", { fill: "var(--wordmark-ink)", points: "133.87 75.02 143.48 61.39 193.46 61.39 193.46 75.03 133.87 75.02" })
|
|
259
|
+
] }),
|
|
260
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--wordmark-ink)", d: "M282.97,41.01c0-22.25,12.43-35.9,30.68-35.9s30.69,13.83,30.69,35.9-13.64,35.7-30.69,35.7-30.68-13.45-30.68-35.7ZM313.66,17.06c-14.7,0-17.21,17.45-17.21,23.95,0,13.65,7.22,23.78,17.21,23.78s17.21-10.55,17.21-23.78c0-6.4-2.51-23.95-17.21-23.95Z" }),
|
|
261
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "var(--wordmark-ink)", d: "M252.1,46.03c.16-1.62.25-3.29.25-5.02,0-22.07-10.72-35.9-28.98-35.9s-30.68,13.64-30.68,35.9c0,24.12,12.68,35.71,31.49,35.71,14.19,0,26.31-6.12,26.31-6.12l-4.94-10.51s-11.71,4.69-22.12,4.69c-6.42,0-9.97-2.64-12.8-6.13-2.31-2.84-3.64-6.92-4.11-12.62h45.59ZM206.86,34.11c1.47-7.59,5.68-17.05,16.51-17.05s15.39,10.22,15.39,17.05h-31.9Z" })
|
|
262
|
+
] })
|
|
263
|
+
] }) })
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
var KEY = "jz-theme";
|
|
267
|
+
function resolveTheme() {
|
|
268
|
+
try {
|
|
269
|
+
const s = localStorage.getItem(KEY);
|
|
270
|
+
if (s === "light" || s === "dark") return s;
|
|
271
|
+
} catch {
|
|
272
|
+
}
|
|
273
|
+
if (typeof matchMedia === "function" && matchMedia("(prefers-color-scheme: light)").matches) return "light";
|
|
274
|
+
return "dark";
|
|
275
|
+
}
|
|
276
|
+
function apply(theme, persist) {
|
|
277
|
+
document.documentElement.dataset.theme = theme;
|
|
278
|
+
if (persist) {
|
|
279
|
+
try {
|
|
280
|
+
localStorage.setItem(KEY, theme);
|
|
281
|
+
} catch {
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function initTheme() {
|
|
286
|
+
const t = resolveTheme();
|
|
287
|
+
apply(t, false);
|
|
288
|
+
return t;
|
|
289
|
+
}
|
|
290
|
+
function useTheme() {
|
|
291
|
+
const [theme, set] = React6__namespace.useState(() => resolveTheme());
|
|
292
|
+
React6__namespace.useEffect(() => {
|
|
293
|
+
apply(theme, false);
|
|
294
|
+
}, [theme]);
|
|
295
|
+
const setTheme = React6__namespace.useCallback((t) => {
|
|
296
|
+
apply(t, true);
|
|
297
|
+
set(t);
|
|
298
|
+
}, []);
|
|
299
|
+
const toggle = React6__namespace.useCallback(() => setTheme(theme === "dark" ? "light" : "dark"), [theme, setTheme]);
|
|
300
|
+
return { theme, setTheme, toggle };
|
|
301
|
+
}
|
|
302
|
+
var ThemeToggle = ({ className, size = "md" }) => {
|
|
303
|
+
const { theme, toggle } = useTheme();
|
|
304
|
+
const dark = theme === "dark";
|
|
305
|
+
const label = dark ? "Switch to light interface" : "Switch to dark interface";
|
|
306
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size, iconOnly: true, className: ["jz-theme-toggle", className].filter(Boolean).join(" "), onClick: toggle, title: label, "aria-label": label, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 14 14", fill: "currentColor", "aria-hidden": "true", children: dark ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
307
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "7", cy: "7", r: "3" }),
|
|
308
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", fill: "none", d: "M7 1v1.5M7 11.5V13M1 7h1.5M11.5 7H13M2.9 2.9l1.1 1.1M10 10l1.1 1.1M2.9 11.1L4 10M10 4l1.1-1.1" })
|
|
309
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7.5 2a5.5 5.5 0 1 0 5 7.8A4 4 0 0 1 7.5 2z" }) }) });
|
|
310
|
+
};
|
|
311
|
+
var I = { size: 14, strokeWidth: 1.75 };
|
|
312
|
+
var LEGACY_NAV = [
|
|
313
|
+
{ label: "PROGRAM", items: [
|
|
314
|
+
{ id: "Overview", label: "Overview", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { ...I }) },
|
|
315
|
+
{ id: "Milestones", label: "Milestones", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Target, { ...I }) },
|
|
316
|
+
{ id: "Telemetry", label: "Telemetry", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { ...I }) },
|
|
317
|
+
{ id: "Documents", label: "Documents", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { ...I }) }
|
|
318
|
+
] },
|
|
319
|
+
{ label: "FINANCE", items: [
|
|
320
|
+
{ id: "Cap table", label: "Cap table", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Table2, { ...I }) },
|
|
321
|
+
{ id: "Reports", label: "Reports", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BarChart2, { ...I }) },
|
|
322
|
+
{ id: "Filings", label: "Filings", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { ...I }) }
|
|
323
|
+
] },
|
|
324
|
+
{ label: "ACCESS", items: [
|
|
325
|
+
{ id: "Team", label: "Team", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { ...I }) },
|
|
326
|
+
{ id: "Partners", label: "Partners", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Handshake, { ...I }) },
|
|
327
|
+
{ id: "Settings", label: "Settings", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { ...I }) }
|
|
328
|
+
] }
|
|
182
329
|
];
|
|
183
330
|
var AppShell = ({
|
|
184
|
-
active
|
|
331
|
+
active,
|
|
185
332
|
children,
|
|
186
333
|
logoSrc,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
334
|
+
hideThemeToggle,
|
|
335
|
+
appName,
|
|
336
|
+
nav,
|
|
337
|
+
title,
|
|
338
|
+
actions,
|
|
339
|
+
user,
|
|
340
|
+
renderLink
|
|
341
|
+
}) => {
|
|
342
|
+
const legacy = !nav;
|
|
343
|
+
const groups = nav ?? LEGACY_NAV;
|
|
344
|
+
const current = active ?? groups[0]?.items[0]?.id;
|
|
345
|
+
const app = appName ?? (legacy ? "Investor Portal" : void 0);
|
|
346
|
+
const heading = title ?? groups.flatMap((g) => g.items).find((i) => i.id === current)?.label ?? current;
|
|
347
|
+
const [open, setOpen] = React6__namespace.useState(false);
|
|
348
|
+
const initials = user?.initials ?? (legacy ? "JK" : void 0);
|
|
349
|
+
const renderItem = (item) => {
|
|
350
|
+
const props = {
|
|
351
|
+
className: "jz-nav__item",
|
|
352
|
+
"aria-current": item.id === current ? "page" : void 0,
|
|
353
|
+
onClick: () => setOpen(false),
|
|
354
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
355
|
+
item.icon,
|
|
356
|
+
item.label
|
|
357
|
+
] })
|
|
358
|
+
};
|
|
359
|
+
if (renderLink && item.href) return /* @__PURE__ */ jsxRuntime.jsx(React6__namespace.Fragment, { children: renderLink(item, props) }, item.id);
|
|
360
|
+
if (item.href) return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, ...props }, item.id);
|
|
361
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", ...props }, item.id);
|
|
362
|
+
};
|
|
363
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("jz-root", "jz-shell"), "data-nav-open": open, children: [
|
|
364
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "jz-shell__side", "aria-label": "Primary", children: [
|
|
365
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-shell__brand", children: [
|
|
366
|
+
logoSrc ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoSrc, style: { height: 22 }, alt: "JetZero" }) : /* @__PURE__ */ jsxRuntime.jsx(Wordmark, { height: 22 }),
|
|
367
|
+
app && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-shell__app", children: app })
|
|
194
368
|
] }),
|
|
195
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
369
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { children: groups.map((g, gi) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-nav__group", children: [
|
|
370
|
+
g.label && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-nav__label", children: g.label }),
|
|
371
|
+
g.items.map(renderItem)
|
|
372
|
+
] }, g.label ?? gi)) })
|
|
196
373
|
] }),
|
|
197
|
-
|
|
198
|
-
/* @__PURE__ */ jsxRuntime.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
padding: "8px 20px",
|
|
206
|
-
borderLeft: on ? "2px solid #FF5500" : "2px solid transparent",
|
|
207
|
-
fontSize: 13,
|
|
208
|
-
fontWeight: on ? 600 : 400,
|
|
209
|
-
color: on ? "#0D1921" : "#46535C",
|
|
210
|
-
background: on ? "#F4F8FC" : "transparent",
|
|
211
|
-
cursor: "pointer"
|
|
212
|
-
}, children: it }, it);
|
|
213
|
-
})
|
|
214
|
-
] }, group.group))
|
|
215
|
-
] }),
|
|
216
|
-
/* @__PURE__ */ jsxRuntime.jsxs("main", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
217
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
218
|
-
height: 56,
|
|
219
|
-
borderBottom: "1px solid #C9D0D4",
|
|
220
|
-
display: "flex",
|
|
221
|
-
alignItems: "center",
|
|
222
|
-
padding: "0 32px",
|
|
223
|
-
gap: 16,
|
|
224
|
-
background: "#FFFFFF"
|
|
225
|
-
}, children: [
|
|
226
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 10, color: "#778C99", letterSpacing: "0.18em", textTransform: "uppercase", fontFamily: "Martian Mono" }, children: "Program \u203A" }),
|
|
227
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: "#0D1921", fontWeight: 600 }, children: active }),
|
|
228
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 } }),
|
|
229
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 11, color: "#FF5500", fontFamily: "Martian Mono", letterSpacing: "0.1em", textTransform: "uppercase" }, children: [
|
|
230
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 6, height: 6, borderRadius: "50%", background: "#FF5500" } }),
|
|
231
|
-
"LIVE"
|
|
374
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-shell__main", children: [
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "jz-shell__bar", children: [
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", iconOnly: true, className: "jz-shell__menu", "aria-label": "Open navigation", "aria-expanded": open, onClick: () => setOpen((o) => !o), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { size: 16 }) }),
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "jz-shell__title", children: heading }),
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-shell__spacer" }),
|
|
379
|
+
actions,
|
|
380
|
+
!hideThemeToggle && /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, { size: "sm" }),
|
|
381
|
+
initials && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-avatar", title: user?.name, "aria-label": user?.name ?? "Account", children: initials })
|
|
232
382
|
] }),
|
|
233
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
234
|
-
] })
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
] });
|
|
383
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "jz-shell__content", children })
|
|
384
|
+
] })
|
|
385
|
+
] });
|
|
386
|
+
};
|
|
238
387
|
var AnnouncementCard = ({
|
|
239
388
|
eyebrow,
|
|
240
389
|
title,
|
|
@@ -254,7 +403,10 @@ var AnnouncementCard = ({
|
|
|
254
403
|
gap: 24
|
|
255
404
|
}, children: [
|
|
256
405
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
257
|
-
eyebrow && /* @__PURE__ */ jsxRuntime.
|
|
406
|
+
eyebrow && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, marginBottom: 8 }, children: [
|
|
407
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Megaphone, { size: 16, color: "#FF5500", strokeWidth: 1.75 }),
|
|
408
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 10, color: "#46535C", letterSpacing: "0.22em", textTransform: "uppercase", fontFamily: "Martian Mono" }, children: eyebrow })
|
|
409
|
+
] }),
|
|
258
410
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 20, fontWeight: 700, color: "#0D1921" }, children: title }),
|
|
259
411
|
description && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, color: "#46535C", marginTop: 6, fontWeight: 300 }, children: description })
|
|
260
412
|
] }),
|
|
@@ -281,6 +433,11 @@ var KPIGrid = ({ items, columns = 4 }) => /* @__PURE__ */ jsxRuntime.jsx("div",
|
|
|
281
433
|
}, children: [
|
|
282
434
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 10, color: "#778C99", letterSpacing: "0.14em", textTransform: "uppercase", fontFamily: "Martian Mono" }, children: k.label }),
|
|
283
435
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 40, fontWeight: 300, color: "#0D1921", marginTop: 10, fontFamily: "Martian Mono", letterSpacing: "-0.02em" }, children: k.value }),
|
|
436
|
+
k.trend && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 6 }, children: [
|
|
437
|
+
k.trend === "up" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingUp, { size: 14, color: "#B5E86A", strokeWidth: 1.75 }),
|
|
438
|
+
k.trend === "down" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TrendingDown, { size: 14, color: "#A74B65", strokeWidth: 1.75 }),
|
|
439
|
+
k.trend === "flat" && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { size: 14, color: "#778C99", strokeWidth: 1.75 })
|
|
440
|
+
] }),
|
|
284
441
|
k.foot && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 9, color: "#778C99", letterSpacing: "0.14em", textTransform: "uppercase", fontFamily: "Martian Mono", marginTop: 6 }, children: k.foot })
|
|
285
442
|
] }, k.label)) });
|
|
286
443
|
var TelemetryCard = ({
|
|
@@ -299,11 +456,14 @@ var TelemetryCard = ({
|
|
|
299
456
|
const step = w / (points.length - 1);
|
|
300
457
|
const path = points.map((v, i) => `${i === 0 ? "M" : "L"} ${i * step} ${h - v / ceiling * h}`).join(" ");
|
|
301
458
|
const fill = `${path} L ${w} ${h} L 0 ${h} Z`;
|
|
302
|
-
const gradId =
|
|
459
|
+
const gradId = React6__namespace.useId();
|
|
303
460
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { background: "#FFFFFF", border: "1px solid #C9D0D4", borderRadius: 4, padding: 24, marginBottom: 32 }, children: [
|
|
304
461
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: 20 }, children: [
|
|
305
462
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
306
|
-
/* @__PURE__ */ jsxRuntime.
|
|
463
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, fontSize: 10, color: "#778C99", letterSpacing: "0.22em", textTransform: "uppercase", fontFamily: "Martian Mono", marginBottom: 8 }, children: [
|
|
464
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { size: 14, color: "#778C99", strokeWidth: 1.75 }),
|
|
465
|
+
eyebrow
|
|
466
|
+
] }),
|
|
307
467
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 22, fontWeight: 700, color: "#0D1921" }, children: title })
|
|
308
468
|
] }),
|
|
309
469
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: 8 }, children: ranges.map((t) => {
|
|
@@ -353,8 +513,11 @@ var Timeline = ({ eyebrow = "Program milestones", milestones }) => {
|
|
|
353
513
|
border: m.done || m.current ? "none" : "1px solid #C9D0D4",
|
|
354
514
|
position: "relative",
|
|
355
515
|
zIndex: 1,
|
|
356
|
-
boxShadow: m.current ? "0 0 0 4px rgba(255,85,0,0.20)" : "none"
|
|
357
|
-
|
|
516
|
+
boxShadow: m.current ? "0 0 0 4px rgba(255,85,0,0.20)" : "none",
|
|
517
|
+
display: "flex",
|
|
518
|
+
alignItems: "center",
|
|
519
|
+
justifyContent: "center"
|
|
520
|
+
}, children: m.done && !m.current && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { size: 8, color: "#FFFFFF", strokeWidth: 3 }) }),
|
|
358
521
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontFamily: "Martian Mono", fontSize: 12, color: "#0D1921", fontWeight: 400, marginTop: 14 }, children: m.year }),
|
|
359
522
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: "#46535C", marginTop: 4, padding: "0 8px", lineHeight: 1.4 }, children: m.label })
|
|
360
523
|
] }, m.year))
|
|
@@ -368,15 +531,19 @@ var DocumentList = ({
|
|
|
368
531
|
}) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { background: "#FFFFFF", border: "1px solid #C9D0D4", borderRadius: 4, padding: "20px 24px" }, children: [
|
|
369
532
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 16 }, children: [
|
|
370
533
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 10, color: "#778C99", letterSpacing: "0.22em", textTransform: "uppercase", fontFamily: "Martian Mono" }, children: eyebrow }),
|
|
371
|
-
/* @__PURE__ */ jsxRuntime.
|
|
534
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: onViewAll, style: { fontFamily: "Titillium Web", fontWeight: 600, fontSize: 11, padding: "6px 14px", background: "transparent", color: "#0D1921", border: "1px solid #C9D0D4", borderRadius: 2, letterSpacing: "0.06em", textTransform: "uppercase", cursor: "pointer", display: "inline-flex", alignItems: "center", gap: 4 }, children: [
|
|
535
|
+
"View all",
|
|
536
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { size: 12, strokeWidth: 1.75 })
|
|
537
|
+
] })
|
|
372
538
|
] }),
|
|
373
539
|
/* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 13 }, children: [
|
|
374
540
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Document", "Type", "Owner", "Updated", "Size"].map((h) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "10px 12px", fontWeight: 600, fontSize: 9, letterSpacing: "0.14em", textTransform: "uppercase", color: "#778C99", borderBottom: "1px solid #C9D0D4", fontFamily: "Martian Mono" }, children: h }, h)) }) }),
|
|
375
541
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: documents.map((d) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderBottom: "1px solid #F4F8FC" }, children: [
|
|
376
|
-
/* @__PURE__ */ jsxRuntime.
|
|
377
|
-
d.accent && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", width: 6, height: 6, background: "#0D1921", borderRadius: "50%",
|
|
542
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "12px", color: "#0D1921", fontWeight: d.accent ? 600 : 400 }, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 8 }, children: [
|
|
543
|
+
d.accent && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", width: 6, height: 6, background: "#0D1921", borderRadius: "50%", flexShrink: 0 } }),
|
|
544
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { size: 14, color: "#778C99", strokeWidth: 1.75, style: { flexShrink: 0 } }),
|
|
378
545
|
d.title
|
|
379
|
-
] }),
|
|
546
|
+
] }) }),
|
|
380
547
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "12px", fontFamily: "Martian Mono", fontSize: 11, color: "#46535C", letterSpacing: "0.08em" }, children: d.type }),
|
|
381
548
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "12px", color: "#46535C" }, children: d.owner }),
|
|
382
549
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "12px", fontFamily: "Martian Mono", fontSize: 12, color: "#778C99" }, children: d.date }),
|
|
@@ -419,13 +586,207 @@ function assertValidLogoBackground(variant, tone) {
|
|
|
419
586
|
);
|
|
420
587
|
}
|
|
421
588
|
}
|
|
589
|
+
var Field = ({ label, hint, error, required, id, children, className }) => {
|
|
590
|
+
const auto = React6__namespace.useId();
|
|
591
|
+
const fid = id ?? auto;
|
|
592
|
+
const hintId = hint ? `${fid}-hint` : void 0;
|
|
593
|
+
const errId = error ? `${fid}-err` : void 0;
|
|
594
|
+
const control = React6__namespace.cloneElement(children, {
|
|
595
|
+
id: fid,
|
|
596
|
+
required,
|
|
597
|
+
"aria-invalid": error ? true : void 0,
|
|
598
|
+
"aria-describedby": [hintId, errId].filter(Boolean).join(" ") || void 0
|
|
599
|
+
});
|
|
600
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("jz-field", error && "jz-field--invalid", className), children: [
|
|
601
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "jz-field__label", htmlFor: fid, children: [
|
|
602
|
+
label,
|
|
603
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "jz-field__req", "aria-hidden": "true", children: "*" })
|
|
604
|
+
] }),
|
|
605
|
+
control,
|
|
606
|
+
hint && !error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-field__hint", id: hintId, children: hint }),
|
|
607
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-field__error", id: errId, role: "alert", children: error })
|
|
608
|
+
] });
|
|
609
|
+
};
|
|
610
|
+
var Input = React6__namespace.forwardRef(
|
|
611
|
+
function Input2({ className, ...rest }, ref) {
|
|
612
|
+
return /* @__PURE__ */ jsxRuntime.jsx("input", { ref, className: cx("jz-input", className), ...rest });
|
|
613
|
+
}
|
|
614
|
+
);
|
|
615
|
+
var Textarea = React6__namespace.forwardRef(
|
|
616
|
+
function Textarea2({ className, ...rest }, ref) {
|
|
617
|
+
return /* @__PURE__ */ jsxRuntime.jsx("textarea", { ref, className: cx("jz-textarea", className), ...rest });
|
|
618
|
+
}
|
|
619
|
+
);
|
|
620
|
+
var Select = React6__namespace.forwardRef(
|
|
621
|
+
function Select2({ className, ...rest }, ref) {
|
|
622
|
+
return /* @__PURE__ */ jsxRuntime.jsx("select", { ref, className: cx("jz-select", className), ...rest });
|
|
623
|
+
}
|
|
624
|
+
);
|
|
625
|
+
var Checkbox = React6__namespace.forwardRef(function Checkbox2({ label, className, ...rest }, ref) {
|
|
626
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx("jz-check", className), children: [
|
|
627
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ref, type: "checkbox", ...rest }),
|
|
628
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "jz-check__box", "aria-hidden": "true" }),
|
|
629
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
630
|
+
] });
|
|
631
|
+
});
|
|
632
|
+
var Radio = React6__namespace.forwardRef(function Radio2({ label, className, ...rest }, ref) {
|
|
633
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx("jz-check", className), children: [
|
|
634
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ref, type: "radio", ...rest }),
|
|
635
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "jz-check__box", "aria-hidden": "true" }),
|
|
636
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
637
|
+
] });
|
|
638
|
+
});
|
|
639
|
+
var Switch = React6__namespace.forwardRef(function Switch2({ label, className, ...rest }, ref) {
|
|
640
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx("jz-switch", className), children: [
|
|
641
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ref, type: "checkbox", role: "switch", ...rest }),
|
|
642
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "jz-switch__track", "aria-hidden": "true" }),
|
|
643
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
|
|
644
|
+
] });
|
|
645
|
+
});
|
|
646
|
+
function Table({
|
|
647
|
+
columns,
|
|
648
|
+
rows,
|
|
649
|
+
rowKey,
|
|
650
|
+
caption,
|
|
651
|
+
sort,
|
|
652
|
+
onSortChange,
|
|
653
|
+
onRowClick,
|
|
654
|
+
emptyTitle = "Nothing here yet",
|
|
655
|
+
emptyDescription
|
|
656
|
+
}) {
|
|
657
|
+
if (rows.length === 0) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-table-wrap", children: /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { title: emptyTitle, description: emptyDescription }) });
|
|
658
|
+
const toggle = (c) => {
|
|
659
|
+
if (!c.sortable || !onSortChange) return;
|
|
660
|
+
onSortChange({ key: c.key, direction: sort?.key === c.key && sort.direction === "asc" ? "desc" : "asc" });
|
|
661
|
+
};
|
|
662
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cx("jz-table", onRowClick && "jz-table--hover"), children: [
|
|
663
|
+
caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { children: caption }),
|
|
664
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns.map((c) => {
|
|
665
|
+
const active = sort?.key === c.key;
|
|
666
|
+
const sortable = c.sortable && onSortChange;
|
|
667
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
668
|
+
"th",
|
|
669
|
+
{
|
|
670
|
+
scope: "col",
|
|
671
|
+
className: cx("jz-th", c.align === "right" && "jz-th--right", sortable && "jz-th--sortable"),
|
|
672
|
+
"aria-sort": active ? sort.direction === "asc" ? "ascending" : "descending" : void 0,
|
|
673
|
+
tabIndex: sortable ? 0 : void 0,
|
|
674
|
+
onClick: sortable ? () => toggle(c) : void 0,
|
|
675
|
+
onKeyDown: sortable ? (e) => {
|
|
676
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
677
|
+
e.preventDefault();
|
|
678
|
+
toggle(c);
|
|
679
|
+
}
|
|
680
|
+
} : void 0,
|
|
681
|
+
children: [
|
|
682
|
+
c.header,
|
|
683
|
+
active ? sort.direction === "asc" ? " \u2191" : " \u2193" : ""
|
|
684
|
+
]
|
|
685
|
+
},
|
|
686
|
+
c.key
|
|
687
|
+
);
|
|
688
|
+
}) }) }),
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((r) => /* @__PURE__ */ jsxRuntime.jsx("tr", { "data-clickable": onRowClick ? "" : void 0, onClick: onRowClick ? () => onRowClick(r) : void 0, children: columns.map((c) => /* @__PURE__ */ jsxRuntime.jsx("td", { className: cx("jz-td", c.align === "right" && "jz-td--right", c.mono && "jz-td--mono"), children: c.render ? c.render(r) : r[c.key] }, c.key)) }, rowKey(r))) })
|
|
690
|
+
] }) });
|
|
691
|
+
}
|
|
692
|
+
var Tabs = ({ items, value, defaultValue, onValueChange, "aria-label": ariaLabel }) => {
|
|
693
|
+
const base = React6__namespace.useId();
|
|
694
|
+
const [inner, setInner] = React6__namespace.useState(defaultValue ?? items[0]?.id);
|
|
695
|
+
const current = value ?? inner;
|
|
696
|
+
const refs = React6__namespace.useRef({});
|
|
697
|
+
const select = (id) => {
|
|
698
|
+
setInner(id);
|
|
699
|
+
onValueChange?.(id);
|
|
700
|
+
refs.current[id]?.focus();
|
|
701
|
+
};
|
|
702
|
+
const onKeyDown = (e) => {
|
|
703
|
+
const i = items.findIndex((t) => t.id === current);
|
|
704
|
+
let n = -1;
|
|
705
|
+
if (e.key === "ArrowRight") n = (i + 1) % items.length;
|
|
706
|
+
else if (e.key === "ArrowLeft") n = (i - 1 + items.length) % items.length;
|
|
707
|
+
else if (e.key === "Home") n = 0;
|
|
708
|
+
else if (e.key === "End") n = items.length - 1;
|
|
709
|
+
if (n >= 0) {
|
|
710
|
+
e.preventDefault();
|
|
711
|
+
select(items[n].id);
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-tabs", children: [
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-tabs__list", role: "tablist", "aria-label": ariaLabel, onKeyDown, children: items.map((t) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
716
|
+
"button",
|
|
717
|
+
{
|
|
718
|
+
type: "button",
|
|
719
|
+
role: "tab",
|
|
720
|
+
className: "jz-tab",
|
|
721
|
+
id: `${base}-t-${t.id}`,
|
|
722
|
+
"aria-controls": `${base}-p-${t.id}`,
|
|
723
|
+
"aria-selected": t.id === current,
|
|
724
|
+
tabIndex: t.id === current ? 0 : -1,
|
|
725
|
+
ref: (el) => {
|
|
726
|
+
refs.current[t.id] = el;
|
|
727
|
+
},
|
|
728
|
+
onClick: () => select(t.id),
|
|
729
|
+
children: t.label
|
|
730
|
+
},
|
|
731
|
+
t.id
|
|
732
|
+
)) }),
|
|
733
|
+
items.map((t) => t.id === current && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-tabs__panel", role: "tabpanel", id: `${base}-p-${t.id}`, "aria-labelledby": `${base}-t-${t.id}`, tabIndex: 0, children: t.content }, t.id))
|
|
734
|
+
] });
|
|
735
|
+
};
|
|
736
|
+
var Modal = ({ open, onClose, title, size = "md", children, footer }) => {
|
|
737
|
+
const ref = React6__namespace.useRef(null);
|
|
738
|
+
const titleId = React6__namespace.useId();
|
|
739
|
+
React6__namespace.useEffect(() => {
|
|
740
|
+
const d = ref.current;
|
|
741
|
+
if (!d) return;
|
|
742
|
+
if (open && !d.open) d.showModal();
|
|
743
|
+
if (!open && d.open) d.close();
|
|
744
|
+
}, [open]);
|
|
745
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
746
|
+
"dialog",
|
|
747
|
+
{
|
|
748
|
+
ref,
|
|
749
|
+
className: cx("jz-modal", size === "lg" && "jz-modal--lg"),
|
|
750
|
+
"aria-labelledby": titleId,
|
|
751
|
+
onClose,
|
|
752
|
+
onClick: (e) => {
|
|
753
|
+
if (e.target === ref.current) onClose();
|
|
754
|
+
},
|
|
755
|
+
children: [
|
|
756
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "jz-modal__head", children: [
|
|
757
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "jz-modal__title", id: titleId, children: title }),
|
|
758
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "jz-modal__close", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 14 14", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.5 2.5l9 9M11.5 2.5l-9 9" }) }) })
|
|
759
|
+
] }),
|
|
760
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-modal__body", children }),
|
|
761
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "jz-modal__foot", children: footer })
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
};
|
|
422
766
|
|
|
423
767
|
exports.AnnouncementCard = AnnouncementCard;
|
|
424
768
|
exports.AppShell = AppShell;
|
|
769
|
+
exports.Badge = Badge;
|
|
770
|
+
exports.Button = Button;
|
|
771
|
+
exports.Checkbox = Checkbox;
|
|
425
772
|
exports.DocumentList = DocumentList;
|
|
773
|
+
exports.EmptyState = EmptyState;
|
|
774
|
+
exports.Field = Field;
|
|
775
|
+
exports.Input = Input;
|
|
426
776
|
exports.KPIGrid = KPIGrid;
|
|
777
|
+
exports.Modal = Modal;
|
|
778
|
+
exports.Radio = Radio;
|
|
779
|
+
exports.Select = Select;
|
|
780
|
+
exports.Spinner = Spinner;
|
|
781
|
+
exports.Switch = Switch;
|
|
782
|
+
exports.Table = Table;
|
|
783
|
+
exports.Tabs = Tabs;
|
|
427
784
|
exports.TelemetryCard = TelemetryCard;
|
|
785
|
+
exports.Textarea = Textarea;
|
|
786
|
+
exports.ThemeToggle = ThemeToggle;
|
|
428
787
|
exports.Timeline = Timeline;
|
|
788
|
+
exports.ToastProvider = ToastProvider;
|
|
789
|
+
exports.Wordmark = Wordmark;
|
|
429
790
|
exports.accents = accents;
|
|
430
791
|
exports.assertValidLogoBackground = assertValidLogoBackground;
|
|
431
792
|
exports.categoricalSeries = categoricalSeries;
|
|
@@ -433,6 +794,7 @@ exports.dataviz = dataviz;
|
|
|
433
794
|
exports.fontSizes = fontSizes;
|
|
434
795
|
exports.fontWeights = fontWeights;
|
|
435
796
|
exports.fonts = fonts;
|
|
797
|
+
exports.initTheme = initTheme;
|
|
436
798
|
exports.isValidLogoBackground = isValidLogoBackground;
|
|
437
799
|
exports.lineHeights = lineHeights;
|
|
438
800
|
exports.logoForBackground = logoForBackground;
|
|
@@ -443,10 +805,13 @@ exports.onCategoricalSeries = onCategoricalSeries;
|
|
|
443
805
|
exports.onPalette = onPalette;
|
|
444
806
|
exports.palette = palette;
|
|
445
807
|
exports.radii = radii;
|
|
808
|
+
exports.resolveTheme = resolveTheme;
|
|
446
809
|
exports.shadows = shadows;
|
|
447
810
|
exports.spacing = spacing;
|
|
448
811
|
exports.tokens = tokens_default;
|
|
449
812
|
exports.toneHex = toneHex;
|
|
450
813
|
exports.tracking = tracking;
|
|
814
|
+
exports.useTheme = useTheme;
|
|
815
|
+
exports.useToast = useToast;
|
|
451
816
|
//# sourceMappingURL=index.cjs.map
|
|
452
817
|
//# sourceMappingURL=index.cjs.map
|