@realiizlabs/admin 0.7.2 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-ui/index.cjs +56 -0
- package/dist/auth-ui/index.cjs.map +1 -1
- package/dist/auth-ui/index.js +1 -1
- package/dist/chunk-CE2DRQBD.js +98 -0
- package/dist/chunk-CE2DRQBD.js.map +1 -0
- package/dist/{chunk-IS52OXZ2.js → chunk-J6FI73PF.js} +39 -5
- package/dist/chunk-J6FI73PF.js.map +1 -0
- package/dist/forms/index.cjs +37 -2
- package/dist/forms/index.cjs.map +1 -1
- package/dist/forms/index.d.cts +21 -3
- package/dist/forms/index.d.ts +21 -3
- package/dist/forms/index.js +1 -1
- package/dist/forms-ui/index.cjs +770 -39
- package/dist/forms-ui/index.cjs.map +1 -1
- package/dist/forms-ui/index.d.cts +123 -12
- package/dist/forms-ui/index.d.ts +123 -12
- package/dist/forms-ui/index.js +691 -41
- package/dist/forms-ui/index.js.map +1 -1
- package/dist/git/index.cjs +16 -4
- package/dist/git/index.cjs.map +1 -1
- package/dist/git/index.d.cts +25 -2
- package/dist/git/index.d.ts +25 -2
- package/dist/git/index.js +15 -5
- package/dist/git/index.js.map +1 -1
- package/dist/shell/index.cjs +607 -0
- package/dist/shell/index.cjs.map +1 -0
- package/dist/shell/index.d.cts +171 -0
- package/dist/shell/index.d.ts +171 -0
- package/dist/shell/index.js +583 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/{types-DsSMscTh.d.cts → types-DyryuIX1.d.cts} +24 -1
- package/dist/{types-DsSMscTh.d.ts → types-DyryuIX1.d.ts} +24 -1
- package/package.json +6 -1
- package/dist/chunk-4OCBMOEP.js +0 -42
- package/dist/chunk-4OCBMOEP.js.map +0 -1
- package/dist/chunk-IS52OXZ2.js.map +0 -1
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
// src/shell/Sidebar.tsx
|
|
8
|
+
var base = {
|
|
9
|
+
width: 18,
|
|
10
|
+
height: 18,
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
fill: "none",
|
|
13
|
+
stroke: "currentColor",
|
|
14
|
+
strokeWidth: 1.7,
|
|
15
|
+
strokeLinecap: "round",
|
|
16
|
+
strokeLinejoin: "round",
|
|
17
|
+
"aria-hidden": true,
|
|
18
|
+
style: { flexShrink: 0 }
|
|
19
|
+
};
|
|
20
|
+
function Icon({ name }) {
|
|
21
|
+
switch (name) {
|
|
22
|
+
case "home":
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "7", height: "9", rx: "1" }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "3", width: "7", height: "5", rx: "1" }),
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "12", width: "7", height: "9", rx: "1" }),
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "16", width: "7", height: "5", rx: "1" })
|
|
28
|
+
] });
|
|
29
|
+
case "posts":
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3h9l4 4v14H6z" }),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 3v4h4" }),
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 12h7M9 16h7M9 8h3" })
|
|
34
|
+
] });
|
|
35
|
+
case "events":
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "5", width: "18", height: "16", rx: "2" }),
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 3v4M16 3v4M3 10h18" })
|
|
39
|
+
] });
|
|
40
|
+
case "venues":
|
|
41
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 21s7-6.2 7-11.5A7 7 0 0 0 5 9.5C5 14.8 12 21 12 21z" }),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "9.5", r: "2.5" })
|
|
44
|
+
] });
|
|
45
|
+
case "users":
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "8", r: "3.5" }),
|
|
48
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2.5 20a6.5 6.5 0 0 1 13 0" }),
|
|
49
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "17", cy: "9", r: "2.5" }),
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.5 14.5a5 5 0 0 1 6 5" })
|
|
51
|
+
] });
|
|
52
|
+
case "settings":
|
|
53
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "3" }),
|
|
55
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z" })
|
|
56
|
+
] });
|
|
57
|
+
default:
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...base, children: [
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3h9l4 4v14H6z" }),
|
|
60
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 3v4h4" })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function iconFor(id) {
|
|
65
|
+
const known = ["home", "posts", "events", "venues", "users", "settings"];
|
|
66
|
+
return known.includes(id) ? id : "doc";
|
|
67
|
+
}
|
|
68
|
+
var SIDEBAR_KEY = "rz-admin-sidebar";
|
|
69
|
+
function isActive(item, activeHref, basePath) {
|
|
70
|
+
if (item.href === basePath) return activeHref === basePath || activeHref === `${basePath}/`;
|
|
71
|
+
return activeHref === item.href || activeHref.startsWith(`${item.href}/`);
|
|
72
|
+
}
|
|
73
|
+
function Sidebar({ items, activeHref, basePath }) {
|
|
74
|
+
const [collapsed, setCollapsed] = react.useState(false);
|
|
75
|
+
react.useEffect(() => {
|
|
76
|
+
try {
|
|
77
|
+
if (window.localStorage.getItem(SIDEBAR_KEY) === "collapsed") setCollapsed(true);
|
|
78
|
+
} catch {
|
|
79
|
+
}
|
|
80
|
+
}, []);
|
|
81
|
+
const toggle = () => {
|
|
82
|
+
const next = !collapsed;
|
|
83
|
+
setCollapsed(next);
|
|
84
|
+
try {
|
|
85
|
+
window.localStorage.setItem(SIDEBAR_KEY, next ? "collapsed" : "open");
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: ["rz-sidebar", collapsed && "rz-sidebar--collapsed"].filter(Boolean).join(" "), "aria-label": "Admin navigation", children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "rz-sidebar__nav", children: items.map((item) => {
|
|
91
|
+
const active = !item.disabled && isActive(item, activeHref, basePath);
|
|
92
|
+
if (item.disabled) {
|
|
93
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-sidebar__item rz-sidebar__item--disabled", "aria-disabled": "true", title: collapsed ? `${item.label} \u2014 coming soon` : "Coming soon", children: [
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: iconFor(item.icon ?? item.id) }),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-sidebar__label", children: item.label })
|
|
96
|
+
] }, item.id);
|
|
97
|
+
}
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
99
|
+
"a",
|
|
100
|
+
{
|
|
101
|
+
href: item.href,
|
|
102
|
+
className: ["rz-sidebar__item", active && "rz-sidebar__item--active"].filter(Boolean).join(" "),
|
|
103
|
+
"aria-current": active ? "page" : void 0,
|
|
104
|
+
title: collapsed ? item.label : void 0,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: iconFor(item.icon ?? item.id) }),
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-sidebar__label", children: item.label })
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
item.id
|
|
111
|
+
);
|
|
112
|
+
}) }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
type: "button",
|
|
117
|
+
className: "rz-sidebar__collapse",
|
|
118
|
+
onClick: toggle,
|
|
119
|
+
"aria-label": collapsed ? "Expand navigation" : "Collapse navigation",
|
|
120
|
+
title: collapsed ? "Expand" : "Collapse",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", style: { transform: collapsed ? "rotate(180deg)" : void 0 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 6l-6 6 6 6" }) }),
|
|
123
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-sidebar__label", children: "Collapse" })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] });
|
|
128
|
+
}
|
|
129
|
+
var THEME_KEY = "rz-admin-theme";
|
|
130
|
+
function useTheme(defaultTheme = "light") {
|
|
131
|
+
const [theme, setTheme] = react.useState(defaultTheme);
|
|
132
|
+
react.useEffect(() => {
|
|
133
|
+
try {
|
|
134
|
+
const stored = window.localStorage.getItem(THEME_KEY);
|
|
135
|
+
if (stored === "light" || stored === "dark") setTheme(stored);
|
|
136
|
+
} catch {
|
|
137
|
+
}
|
|
138
|
+
}, []);
|
|
139
|
+
const set = (t) => {
|
|
140
|
+
setTheme(t);
|
|
141
|
+
try {
|
|
142
|
+
window.localStorage.setItem(THEME_KEY, t);
|
|
143
|
+
} catch {
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
return [theme, set];
|
|
147
|
+
}
|
|
148
|
+
function ThemeToggle({ theme, onChange }) {
|
|
149
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-seg", role: "group", "aria-label": "Theme", children: [
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-pressed": theme === "light", onClick: () => onChange("light"), children: "Light" }),
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-pressed": theme === "dark", onClick: () => onChange("dark"), children: "Dark" })
|
|
152
|
+
] });
|
|
153
|
+
}
|
|
154
|
+
function firstNameOf(user) {
|
|
155
|
+
const fromName = user.name?.trim().split(/\s+/)[0];
|
|
156
|
+
if (fromName) return fromName;
|
|
157
|
+
const local = user.email.split("@")[0] ?? "";
|
|
158
|
+
return local ? local.charAt(0).toUpperCase() + local.slice(1) : "there";
|
|
159
|
+
}
|
|
160
|
+
function initialsOf(user) {
|
|
161
|
+
const parts = user.name?.trim().split(/\s+/).filter(Boolean) ?? [];
|
|
162
|
+
if (parts.length >= 2) return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
163
|
+
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
164
|
+
return (user.email[0] ?? "?").toUpperCase();
|
|
165
|
+
}
|
|
166
|
+
var ico = { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true };
|
|
167
|
+
var ShieldIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { ...ico, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3l7 3v5c0 5-3.5 8.5-7 10-3.5-1.5-7-5-7-10V6z" }) });
|
|
168
|
+
var SunIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...ico, children: [
|
|
169
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "4" }),
|
|
170
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4" })
|
|
171
|
+
] });
|
|
172
|
+
var OutIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { ...ico, children: [
|
|
173
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
|
|
174
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 17l5-5-5-5" }),
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12H9" })
|
|
176
|
+
] });
|
|
177
|
+
function AccountMenu({ user, role, theme, onTheme, signOutPath }) {
|
|
178
|
+
const [open, setOpen] = react.useState(false);
|
|
179
|
+
const wrap = react.useRef(null);
|
|
180
|
+
react.useEffect(() => {
|
|
181
|
+
if (!open) return;
|
|
182
|
+
const onClick = (e) => {
|
|
183
|
+
if (!wrap.current?.contains(e.target)) setOpen(false);
|
|
184
|
+
};
|
|
185
|
+
const onKey = (e) => {
|
|
186
|
+
if (e.key === "Escape") setOpen(false);
|
|
187
|
+
};
|
|
188
|
+
document.addEventListener("mousedown", onClick);
|
|
189
|
+
document.addEventListener("keydown", onKey);
|
|
190
|
+
return () => {
|
|
191
|
+
document.removeEventListener("mousedown", onClick);
|
|
192
|
+
document.removeEventListener("keydown", onKey);
|
|
193
|
+
};
|
|
194
|
+
}, [open]);
|
|
195
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: wrap, style: { position: "relative" }, children: [
|
|
196
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "rz-avatar", "aria-haspopup": "menu", "aria-expanded": open, "aria-label": "Account menu", onClick: () => setOpen((v) => !v), children: initialsOf(user) }),
|
|
197
|
+
open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-menu", role: "menu", children: [
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-menu__who", children: [
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-menu__name", children: user.name?.trim() || user.email }),
|
|
200
|
+
user.name?.trim() && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-menu__email", children: user.email })
|
|
201
|
+
] }),
|
|
202
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-menu__item rz-menu__item--static", role: "menuitem", "aria-disabled": "true", children: [
|
|
203
|
+
/* @__PURE__ */ jsxRuntime.jsx(ShieldIcon, {}),
|
|
204
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Role" }),
|
|
205
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-menu__end rz-pill rz-pill--plain", children: role })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-menu__item rz-menu__item--static", role: "menuitem", "aria-disabled": "true", children: [
|
|
208
|
+
/* @__PURE__ */ jsxRuntime.jsx(SunIcon, {}),
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Theme" }),
|
|
210
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-menu__end", children: /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, { theme, onChange: onTheme }) })
|
|
211
|
+
] }),
|
|
212
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-menu__sep" }),
|
|
213
|
+
/* @__PURE__ */ jsxRuntime.jsx("form", { method: "post", action: signOutPath, className: "rz-menu__signout", children: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "submit", role: "menuitem", className: "rz-menu__item", children: [
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx(OutIcon, {}),
|
|
215
|
+
"Sign out"
|
|
216
|
+
] }) })
|
|
217
|
+
] })
|
|
218
|
+
] });
|
|
219
|
+
}
|
|
220
|
+
function TopBar({ siteName, productName, logoUrl, homeHref, user, role, theme, onTheme, signOutPath }) {
|
|
221
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "rz-topbar", children: [
|
|
222
|
+
/* @__PURE__ */ jsxRuntime.jsxs("a", { href: homeHref, className: "rz-topbar__brand", children: [
|
|
223
|
+
logoUrl && /* @__PURE__ */ jsxRuntime.jsx("img", { src: logoUrl, alt: "", className: "rz-topbar__logo" }),
|
|
224
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: siteName }),
|
|
225
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-topbar__product", children: productName })
|
|
226
|
+
] }),
|
|
227
|
+
user && role && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-topbar__right", children: [
|
|
228
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-topbar__greeting", "data-testid": "rz-greeting", children: [
|
|
229
|
+
"Welcome back, ",
|
|
230
|
+
firstNameOf(user)
|
|
231
|
+
] }),
|
|
232
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccountMenu, { user, role, theme, onTheme, signOutPath })
|
|
233
|
+
] })
|
|
234
|
+
] });
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// src/shell/tokens.ts
|
|
238
|
+
var SHELL_CSS = `
|
|
239
|
+
.rz-admin, .rz-admin[data-theme="light"] {
|
|
240
|
+
/* realiiz.com palette (src/app/globals.css): ink, bone, paper, signal blue, slate, line, amber */
|
|
241
|
+
--ink: #0e1726; --bone: #f7f5f0; --signal: #1f6feb;
|
|
242
|
+
--surface-0: #f7f5f0; --surface-1: #ffffff; --surface-2: #f1eee7; --surface-3: #e8e4da;
|
|
243
|
+
--text-primary: #0e1726; --text-secondary: #5b6678; --text-muted: #8a93a5;
|
|
244
|
+
--signal-dim: #1a63d8; --signal-glow: #5b9bff; --signal-warn: #e0a03b; --series-blue: #1f6feb;
|
|
245
|
+
--border: #d9d4c8; --separator: #e9e5dc;
|
|
246
|
+
--status-up: #15803d; --status-down: #dc2626; --status-neutral: var(--text-muted); --status-blocked: var(--border);
|
|
247
|
+
--signal-fg: #ffffff;
|
|
248
|
+
}
|
|
249
|
+
.rz-admin[data-theme="dark"] { color-scheme: dark; }
|
|
250
|
+
.rz-admin[data-theme="dark"] {
|
|
251
|
+
--ink: #eef0f5; --bone: #1b2334; --signal: #3b82f6;
|
|
252
|
+
--surface-0: #1b2334; --surface-1: #222c42; --surface-2: #29344a; --surface-3: #36415c;
|
|
253
|
+
--text-primary: #eef0f5; --text-secondary: #a2abbf; --text-muted: #77819a;
|
|
254
|
+
--signal-dim: #8db4ff; --signal-glow: #aec9ff; --signal-warn: #eab058; --series-blue: #3b82f6;
|
|
255
|
+
--border: #36415c; --separator: #2c3750;
|
|
256
|
+
--status-up: #4ade80; --status-down: #f87171; --status-neutral: var(--text-muted); --status-blocked: var(--border);
|
|
257
|
+
--signal-fg: #ffffff;
|
|
258
|
+
}
|
|
259
|
+
.rz-admin {
|
|
260
|
+
--rz-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
261
|
+
--rz-font-display: var(--rz-font);
|
|
262
|
+
--rz-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
263
|
+
--rz-radius: 6px;
|
|
264
|
+
--rz-sidebar: 220px; --rz-sidebar-collapsed: 58px; --rz-topbar: 52px;
|
|
265
|
+
|
|
266
|
+
/* forms-ui speaks these; map them once so both packages agree */
|
|
267
|
+
--realiiz-form-fg: var(--text-primary); --realiiz-form-muted: var(--text-muted);
|
|
268
|
+
--realiiz-form-border: var(--border); --realiiz-form-accent: var(--signal);
|
|
269
|
+
--realiiz-form-accent-fg: var(--signal-fg); --realiiz-form-danger: var(--status-down);
|
|
270
|
+
--realiiz-form-radius: var(--rz-radius); --realiiz-form-font: var(--rz-font);
|
|
271
|
+
--realiiz-form-focus-ring: 0 0 0 3px color-mix(in srgb, var(--signal) 25%, transparent);
|
|
272
|
+
|
|
273
|
+
box-sizing: border-box; min-height: 100vh; display: flex; flex-direction: column;
|
|
274
|
+
background: var(--surface-0); color: var(--text-primary);
|
|
275
|
+
font-family: var(--rz-font); font-size: 14px; line-height: 1.45;
|
|
276
|
+
}
|
|
277
|
+
.rz-admin *, .rz-admin *::before, .rz-admin *::after { box-sizing: inherit; }
|
|
278
|
+
.rz-admin a { color: inherit; }
|
|
279
|
+
.rz-admin h1, .rz-admin h2, .rz-admin h3 { font-family: var(--rz-font-display); color: var(--text-primary); margin: 0; }
|
|
280
|
+
.rz-admin .realiiz-form__control { background: var(--surface-0); }
|
|
281
|
+
.rz-admin[data-theme="dark"] .realiiz-form__control::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.7); }
|
|
282
|
+
.rz-admin .realiiz-form__button { background: var(--surface-1); color: var(--text-primary); }
|
|
283
|
+
.rz-admin .realiiz-form__button--primary { background: var(--signal); color: var(--signal-fg); }
|
|
284
|
+
|
|
285
|
+
/* ---- frame ---------------------------------------------------------- */
|
|
286
|
+
.rz-topbar { height: var(--rz-topbar); display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem; border-bottom: 1px solid var(--border); background: var(--surface-1); flex-shrink: 0; }
|
|
287
|
+
.rz-topbar__brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .9375rem; text-decoration: none; }
|
|
288
|
+
.rz-topbar__logo { height: 22px; width: auto; display: block; }
|
|
289
|
+
.rz-topbar__product { font-weight: 400; color: var(--text-secondary); }
|
|
290
|
+
.rz-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
|
|
291
|
+
.rz-topbar__greeting { color: var(--text-secondary); font-size: .8rem; }
|
|
292
|
+
.rz-body { display: flex; flex: 1; min-height: 0; }
|
|
293
|
+
/* Top bar and sidebar stay put while the content scrolls, so Collapse is always at the bottom-left. */
|
|
294
|
+
.rz-topbar { position: sticky; top: 0; z-index: 20; }
|
|
295
|
+
.rz-sidebar { position: sticky; top: var(--rz-topbar); height: calc(100vh - var(--rz-topbar)); width: var(--rz-sidebar); flex-shrink: 0; border-right: 1px solid var(--border); background: var(--surface-1); display: flex; flex-direction: column; transition: width .15s ease; overflow: hidden; }
|
|
296
|
+
.rz-sidebar--collapsed { width: var(--rz-sidebar-collapsed); }
|
|
297
|
+
.rz-sidebar__nav { padding: .75rem 0; flex: 1; overflow-y: auto; }
|
|
298
|
+
.rz-sidebar__item { display: flex; align-items: center; gap: .65rem; padding: .55rem 1rem; color: var(--text-secondary); text-decoration: none; font-size: .875rem; font-weight: 400; white-space: nowrap; overflow: hidden; }
|
|
299
|
+
.rz-sidebar__item:hover { background: var(--surface-2); color: var(--text-primary); }
|
|
300
|
+
.rz-sidebar__item--active { background: var(--surface-2); color: var(--signal); font-weight: 500; }
|
|
301
|
+
.rz-sidebar__item--disabled, .rz-sidebar__item--disabled:hover { color: var(--text-muted); opacity: .55; background: transparent; cursor: default; }
|
|
302
|
+
.rz-sidebar--collapsed .rz-sidebar__item { justify-content: center; padding: .55rem 0; }
|
|
303
|
+
.rz-sidebar--collapsed .rz-sidebar__label { display: none; }
|
|
304
|
+
.rz-sidebar__collapse { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; border: 0; border-top: 1px solid var(--separator); background: transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-size: .8rem; text-align: left; }
|
|
305
|
+
.rz-sidebar__collapse:hover { color: var(--text-primary); }
|
|
306
|
+
.rz-sidebar__collapse svg { flex-shrink: 0; }
|
|
307
|
+
.rz-sidebar--collapsed .rz-sidebar__collapse { justify-content: center; padding: .6rem 0; }
|
|
308
|
+
.rz-main { flex: 1; min-width: 0; }
|
|
309
|
+
.rz-content { max-width: 1400px; margin: 0; padding: 28px 32px 80px; }
|
|
310
|
+
.rz-content .realiiz-form { max-width: none; }
|
|
311
|
+
.rz-content .realiiz-form fieldset, .rz-content .realiiz-form__alert, .rz-content .realiiz-form__actions { max-width: 920px; }
|
|
312
|
+
/* The form's save bar pins to the bottom of the content column: bleed out over .rz-content's padding, then pad back in. */
|
|
313
|
+
.rz-content .realiiz-form__bar { position: sticky; bottom: 0; z-index: 10; margin: 24px -32px -80px; padding: 12px 32px; background: var(--surface-1); border-top: 1px solid var(--border); box-shadow: 0 -6px 16px rgba(14,23,38,.05); }
|
|
314
|
+
.rz-content .realiiz-form__status { color: var(--text-muted); }
|
|
315
|
+
.rz-content .realiiz-form__bar[data-dirty] .realiiz-form__status { color: var(--text-primary); font-weight: 500; }
|
|
316
|
+
|
|
317
|
+
/* ---- primitives ----------------------------------------------------- */
|
|
318
|
+
/* Same metrics as the form's Save button (.realiiz-form__button) so every button in the admin matches. */
|
|
319
|
+
.rz-btn { font-family: inherit; font-weight: 600; border-radius: var(--rz-radius); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; white-space: nowrap; line-height: 1.2; }
|
|
320
|
+
.rz-btn--md { padding: 10px 16px; font-size: 15px; min-height: 40px; }
|
|
321
|
+
.rz-btn--sm { padding: 6px 12px; font-size: 13px; min-height: 32px; }
|
|
322
|
+
.rz-admin .rz-btn--primary, .rz-admin a.rz-btn--primary { background: var(--signal); color: var(--signal-fg); border: 1px solid var(--signal); }
|
|
323
|
+
.rz-admin .rz-btn--secondary, .rz-admin a.rz-btn--secondary { background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border); }
|
|
324
|
+
.rz-admin .rz-btn--danger, .rz-admin a.rz-btn--danger { background: transparent; color: var(--status-down); border: 1px solid var(--status-down); }
|
|
325
|
+
.rz-admin .rz-btn--ghost, .rz-admin a.rz-btn--ghost { background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border); }
|
|
326
|
+
.rz-admin .rz-btn:disabled { opacity: .55; cursor: default; }
|
|
327
|
+
.rz-arrow { width: 1.1em; height: 1.1em; flex-shrink: 0; transition: transform .15s ease-out; }
|
|
328
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
329
|
+
.rz-btn:hover .rz-arrow, a:hover .rz-arrow { transform: translate(2px, -2px); }
|
|
330
|
+
.rz-btn:hover .rz-arrow--fwd, a:hover .rz-arrow--fwd { transform: translateX(4px); }
|
|
331
|
+
}
|
|
332
|
+
.rz-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
|
|
333
|
+
.rz-card--narrow { max-width: 760px; }
|
|
334
|
+
.rz-card__title { font-size: .9375rem; font-weight: 600; margin-bottom: .35rem; }
|
|
335
|
+
.rz-card__meta { color: var(--text-muted); font-size: .8rem; }
|
|
336
|
+
.rz-card__actions { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
|
|
337
|
+
.rz-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
|
|
338
|
+
.rz-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
|
|
339
|
+
.rz-pagehead__eyebrow { font-family: var(--rz-font-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .3rem; }
|
|
340
|
+
.rz-pagehead h1 { font-size: 1.375rem; font-weight: 600; }
|
|
341
|
+
.rz-pagehead__sub { color: var(--text-secondary); font-size: .85rem; margin-top: .25rem; }
|
|
342
|
+
.rz-pill { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; font-family: var(--rz-font-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; padding: .15rem .5rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text-secondary); }
|
|
343
|
+
.rz-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--status-neutral); }
|
|
344
|
+
.rz-pill--up::before { background: var(--status-up); } .rz-pill--warn::before { background: var(--signal-warn); } .rz-pill--down::before { background: var(--status-down); }
|
|
345
|
+
.rz-pill--plain::before { display: none; }
|
|
346
|
+
/* ---- steps tracker ------------------------------------------------- */
|
|
347
|
+
/* Dots on one rail, connectors dot-to-dot, label under each dot; left-aligned like the rest of the page. */
|
|
348
|
+
.rz-steps { list-style: none; margin: 4px 0 22px; padding: 0 0 22px; display: flex; border-bottom: 1px solid var(--separator); }
|
|
349
|
+
.rz-step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 8px; min-width: 0; }
|
|
350
|
+
.rz-step:last-child { flex: 0 0 auto; }
|
|
351
|
+
.rz-step:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: 26px; right: 0; height: 2px; background: var(--border); }
|
|
352
|
+
.rz-step--done:not(:last-child)::after { background: var(--status-up); }
|
|
353
|
+
.rz-step__dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; flex-shrink: 0; border: 2px solid var(--border); color: var(--text-muted); background: var(--surface-1); }
|
|
354
|
+
.rz-step--done .rz-step__dot { background: var(--status-up); border-color: var(--status-up); color: #fff; }
|
|
355
|
+
.rz-step--active .rz-step__dot { position: relative; border-color: color-mix(in srgb, var(--signal) 30%, transparent); color: var(--signal); }
|
|
356
|
+
/* A spinning arc over the ring: the step is working, not waiting on you. */
|
|
357
|
+
.rz-step--active .rz-step__dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--signal); animation: rz-spin .9s linear infinite; }
|
|
358
|
+
@media (prefers-reduced-motion: reduce) { .rz-step--active .rz-step__dot::after { animation: none; border-color: var(--signal); } }
|
|
359
|
+
@keyframes rz-spin { to { transform: rotate(360deg); } }
|
|
360
|
+
.rz-step--failed .rz-step__dot { background: var(--status-down); border-color: var(--status-down); color: #fff; }
|
|
361
|
+
.rz-step__text { display: flex; flex-direction: column; gap: 1px; padding-right: 16px; }
|
|
362
|
+
.rz-step__label { font-size: .875rem; font-weight: 500; color: var(--text-secondary); }
|
|
363
|
+
.rz-step--active .rz-step__label, .rz-step--done .rz-step__label { color: var(--text-primary); }
|
|
364
|
+
.rz-step--failed .rz-step__label { color: var(--status-down); }
|
|
365
|
+
.rz-step__note { font-size: .75rem; color: var(--text-muted); }
|
|
366
|
+
@keyframes rz-pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 18%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--signal) 8%, transparent); } }
|
|
367
|
+
.rz-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
|
|
368
|
+
.rz-actions__hint { font-size: .8rem; color: var(--text-muted); }
|
|
369
|
+
.rz-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); margin-bottom: 18px; font-size: .9rem; }
|
|
370
|
+
.rz-notice__text { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
|
371
|
+
.rz-status-link { text-decoration: none; }
|
|
372
|
+
.rz-discard { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--separator); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--text-secondary); }
|
|
373
|
+
.rz-discard__link { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
|
|
374
|
+
.rz-discard__link:hover { color: var(--status-down); }
|
|
375
|
+
.rz-nowrap { white-space: nowrap; }
|
|
376
|
+
.rz-table td.rz-fit, .rz-table th.rz-fit { width: 1%; white-space: nowrap; }
|
|
377
|
+
.rz-empty { border: 1px dashed var(--border); border-radius: 8px; padding: 32px; text-align: center; color: var(--text-secondary); }
|
|
378
|
+
.rz-empty h3 { font-size: 1rem; margin-bottom: .4rem; }
|
|
379
|
+
.rz-table-wrap { width: 100%; }
|
|
380
|
+
.rz-table { width: 100%; border-collapse: collapse; background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
|
|
381
|
+
.rz-table th, .rz-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--separator); font-size: .875rem; vertical-align: top; }
|
|
382
|
+
.rz-table th { font-family: var(--rz-font-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: var(--surface-2); }
|
|
383
|
+
.rz-table tr:last-child td { border-bottom: 0; }
|
|
384
|
+
.rz-muted { color: var(--text-muted); }
|
|
385
|
+
.rz-alert { border: 1px solid var(--status-down); color: var(--status-down); border-radius: var(--rz-radius); padding: 12px 14px; margin: 0 0 16px; }
|
|
386
|
+
.rz-ok { border: 1px solid var(--status-up); color: var(--signal-dim); border-radius: var(--rz-radius); padding: 12px 14px; margin: 0 0 16px; }
|
|
387
|
+
|
|
388
|
+
/* ---- account menu --------------------------------------------------- */
|
|
389
|
+
.rz-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border); color: var(--text-primary); font-size: .6875rem; font-weight: 600; letter-spacing: .04em; display: flex; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; padding: 0; }
|
|
390
|
+
.rz-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 15rem; background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(14,23,38,.14); overflow: hidden; z-index: 50; }
|
|
391
|
+
.rz-menu__who { padding: .75rem .9rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
|
|
392
|
+
.rz-menu__name { font-weight: 600; font-size: .875rem; }
|
|
393
|
+
.rz-menu__email { color: var(--text-muted); font-size: .75rem; word-break: break-all; }
|
|
394
|
+
.rz-menu__sep { height: 1px; background: var(--border); margin: .3rem 0; }
|
|
395
|
+
.rz-menu__item { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .9rem; font: inherit; font-size: .8125rem; color: var(--text-secondary); background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none; }
|
|
396
|
+
.rz-menu__item:hover { background: var(--surface-2); color: var(--text-primary); }
|
|
397
|
+
.rz-menu__item svg { flex-shrink: 0; }
|
|
398
|
+
.rz-menu__item--static { cursor: default; }
|
|
399
|
+
.rz-menu__item--static:hover { background: none; color: var(--text-secondary); }
|
|
400
|
+
.rz-menu__item .rz-menu__end { margin-left: auto; }
|
|
401
|
+
.rz-menu__signout { margin: 0 0 .3rem; }
|
|
402
|
+
.rz-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--rz-radius); overflow: hidden; }
|
|
403
|
+
.rz-seg button { font: inherit; font-size: .75rem; padding: .15rem .55rem; line-height: 1.3; background: transparent; color: var(--text-secondary); border: 0; cursor: pointer; }
|
|
404
|
+
.rz-seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text-primary); }
|
|
405
|
+
|
|
406
|
+
/* ---- mobile: sidebar becomes a strip under the top bar --------------- */
|
|
407
|
+
@media (max-width: 720px) {
|
|
408
|
+
.rz-body { flex-direction: column; }
|
|
409
|
+
.rz-sidebar, .rz-sidebar--collapsed { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; }
|
|
410
|
+
.rz-sidebar__nav { display: flex; padding: .35rem .25rem; overflow-x: auto; }
|
|
411
|
+
.rz-sidebar__item { flex-direction: column; gap: .2rem; font-size: .6875rem; padding: .4rem .6rem; border-radius: 6px; }
|
|
412
|
+
.rz-sidebar--collapsed .rz-sidebar__label { display: block; }
|
|
413
|
+
.rz-sidebar__collapse { display: none; }
|
|
414
|
+
.rz-topbar__greeting { display: none; }
|
|
415
|
+
.rz-content { padding: 18px 14px 60px; }
|
|
416
|
+
/* The sidebar is a top strip now, so it must not be sticky-height; the topbar stays pinned. */
|
|
417
|
+
.rz-sidebar, .rz-sidebar--collapsed { position: static; height: auto; }
|
|
418
|
+
.rz-sidebar__item--disabled { display: none; }
|
|
419
|
+
/* Save bar: bleed matches the narrower content padding; stack status above the buttons. */
|
|
420
|
+
.rz-content .realiiz-form__bar { margin: 18px -14px -60px; padding: 10px 14px; flex-wrap: wrap; }
|
|
421
|
+
.rz-content .realiiz-form__status { flex-basis: 100%; margin-right: 0; font-size: .8rem; }
|
|
422
|
+
/* Editor toolbar wraps; the Insert group drops its label and left rule to save width. */
|
|
423
|
+
.rz-admin .realiiz-md__head { padding: 5px; }
|
|
424
|
+
.rz-admin .realiiz-md__insert { border-left: 0; padding-left: 0; margin-left: 0; }
|
|
425
|
+
.rz-admin .realiiz-md__lab { display: none; }
|
|
426
|
+
.rz-admin .realiiz-md--fs { padding: 8px; }
|
|
427
|
+
/* Tracker: notes hide, labels shrink, so three steps fit a phone. */
|
|
428
|
+
.rz-step__note { display: none; }
|
|
429
|
+
.rz-step__label { font-size: .8rem; }
|
|
430
|
+
.rz-step:not(:last-child)::after { right: 6px; }
|
|
431
|
+
/* Tables scroll sideways inside their own box instead of stretching the page. */
|
|
432
|
+
.rz-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
|
|
433
|
+
.rz-pagehead { align-items: flex-start; flex-direction: column; }
|
|
434
|
+
.rz-notice { flex-direction: column; align-items: flex-start; }
|
|
435
|
+
.rz-card--narrow { max-width: none; }
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/* ---- forms extras: markdown editor, chips, gauges, preview prose --------- */
|
|
439
|
+
.rz-admin .realiiz-md { --_md-head: var(--surface-2); --_md-hover: var(--surface-2); --_md-hover-line: var(--signal-glow); --_md-on: color-mix(in srgb, var(--signal) 12%, var(--surface-1)); --_md-tip: var(--ink); }
|
|
440
|
+
.rz-admin .realiiz-md__mode { background: var(--surface-2); }
|
|
441
|
+
.rz-admin .realiiz-md__mode button { color: var(--text-secondary); }
|
|
442
|
+
.rz-admin .realiiz-md__mode button[aria-selected="true"] { background: var(--surface-1); color: var(--text-primary); box-shadow: 0 1px 2px rgba(14,23,38,.12); }
|
|
443
|
+
.rz-admin .realiiz-md__panel, .rz-admin .realiiz-md__tgrid, .rz-admin .realiiz-md--fs, .rz-admin .realiiz-md .realiiz-md__ta, .rz-admin .realiiz-md__preview, .rz-admin .realiiz-md__head button { background: var(--surface-1); }
|
|
444
|
+
.rz-admin .realiiz-md__head { background: var(--surface-2); }
|
|
445
|
+
.rz-admin .realiiz-md__head button { color: var(--text-primary); }
|
|
446
|
+
.rz-admin .realiiz-md__insert button { background: var(--surface-2); color: var(--text-secondary); }
|
|
447
|
+
.rz-admin .realiiz-md__tgcells i { background: var(--surface-1); }
|
|
448
|
+
.rz-admin .realiiz-md__tgcells i.hot { background: color-mix(in srgb, var(--signal) 18%, var(--surface-1)); }
|
|
449
|
+
.rz-admin .realiiz-md__loading { color: var(--text-muted); font-size: .8rem; }
|
|
450
|
+
.rz-admin .realiiz-prose { max-width: 68ch; font-size: 1rem; line-height: 1.65; color: var(--text-primary); }
|
|
451
|
+
.rz-admin .realiiz-prose h1, .rz-admin .realiiz-prose h2, .rz-admin .realiiz-prose h3 { font-family: var(--rz-font-display); line-height: 1.25; margin: 1.4em 0 .5em; }
|
|
452
|
+
.rz-admin .realiiz-prose h2 { font-size: 1.35rem; } .rz-admin .realiiz-prose h3 { font-size: 1.1rem; }
|
|
453
|
+
.rz-admin .realiiz-prose p, .rz-admin .realiiz-prose ul, .rz-admin .realiiz-prose ol, .rz-admin .realiiz-prose blockquote { margin: 0 0 1em; }
|
|
454
|
+
.rz-admin .realiiz-prose a { color: var(--signal); }
|
|
455
|
+
/* The site's prose class picks a slate body colour for a light page; on the dark surface that reads as disabled. */
|
|
456
|
+
.rz-admin[data-theme="dark"] .realiiz-prose, .rz-admin[data-theme="dark"] .realiiz-prose :is(p, li, td, th, dd, dt, figcaption, strong, b, em, i, h1, h2, h3, h4, h5, h6) { color: var(--text-primary); }
|
|
457
|
+
.rz-admin[data-theme="dark"] .realiiz-prose :is(code, kbd) { color: var(--text-primary); background: var(--surface-3); }
|
|
458
|
+
.rz-admin[data-theme="dark"] .realiiz-prose a { color: var(--signal-dim); }
|
|
459
|
+
.rz-admin[data-theme="dark"] .realiiz-prose hr { border-color: var(--border); }
|
|
460
|
+
.rz-admin[data-theme="dark"] .realiiz-prose blockquote { color: var(--text-secondary); }
|
|
461
|
+
.rz-admin .realiiz-prose blockquote { border-left: 3px solid var(--border); padding-left: 1em; color: var(--text-secondary); }
|
|
462
|
+
.rz-admin .realiiz-prose code { background: var(--surface-2); padding: 0 4px; border-radius: 4px; font-family: var(--rz-font-mono); font-size: .9em; }
|
|
463
|
+
.rz-admin .realiiz-prose pre { background: var(--surface-2); padding: 12px 14px; border-radius: 6px; overflow-x: auto; }
|
|
464
|
+
.rz-admin .realiiz-prose img { max-width: 100%; height: auto; border-radius: 6px; }
|
|
465
|
+
.rz-admin .realiiz-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; padding: 5px 8px; background: var(--surface-0); border: 1px solid var(--border); border-radius: var(--rz-radius); }
|
|
466
|
+
.rz-admin .realiiz-chips:focus-within { border-color: var(--signal); box-shadow: var(--realiiz-form-focus-ring); }
|
|
467
|
+
.rz-admin .realiiz-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; color: var(--text-primary); }
|
|
468
|
+
.rz-admin .realiiz-chip button { font: inherit; line-height: 1; width: 18px; height: 18px; border-radius: 50%; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
|
|
469
|
+
.rz-admin .realiiz-chip button:hover { background: var(--status-down); color: #fff; }
|
|
470
|
+
.rz-admin .realiiz-chips__input { flex: 1; min-width: 120px; border: 0; background: transparent; font: inherit; color: inherit; outline: none; padding: 4px; }
|
|
471
|
+
.rz-admin .realiiz-chips__count { margin-left: auto; color: var(--text-muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
|
|
472
|
+
.rz-admin .realiiz-gauge { color: var(--text-muted); }
|
|
473
|
+
.rz-admin .realiiz-gauge__bar { background: var(--surface-3); }
|
|
474
|
+
.rz-admin .realiiz-gauge__zone { background: color-mix(in srgb, var(--status-up) 28%, transparent); }
|
|
475
|
+
.rz-admin .realiiz-gauge__fill { background: var(--text-muted); }
|
|
476
|
+
.rz-admin .realiiz-gauge--ok .realiiz-gauge__fill { background: var(--status-up); } .rz-admin .realiiz-gauge--ok { color: var(--status-up); }
|
|
477
|
+
.rz-admin .realiiz-gauge--over .realiiz-gauge__fill { background: var(--status-down); } .rz-admin .realiiz-gauge--over { color: var(--status-down); }
|
|
478
|
+
`;
|
|
479
|
+
function AdminShell({
|
|
480
|
+
siteName,
|
|
481
|
+
productName = "Studio",
|
|
482
|
+
logoUrl,
|
|
483
|
+
user,
|
|
484
|
+
role,
|
|
485
|
+
nav,
|
|
486
|
+
activeHref,
|
|
487
|
+
basePath = "/admin",
|
|
488
|
+
signOutPath,
|
|
489
|
+
defaultTheme = "light",
|
|
490
|
+
children
|
|
491
|
+
}) {
|
|
492
|
+
const [theme, setTheme] = useTheme(defaultTheme);
|
|
493
|
+
const showNav = Boolean(user && role);
|
|
494
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-admin", "data-theme": theme, children: [
|
|
495
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: SHELL_CSS }),
|
|
496
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
497
|
+
TopBar,
|
|
498
|
+
{
|
|
499
|
+
siteName,
|
|
500
|
+
productName,
|
|
501
|
+
logoUrl,
|
|
502
|
+
homeHref: basePath,
|
|
503
|
+
user,
|
|
504
|
+
role,
|
|
505
|
+
theme,
|
|
506
|
+
onTheme: setTheme,
|
|
507
|
+
signOutPath: signOutPath ?? `${basePath}/auth/signout`
|
|
508
|
+
}
|
|
509
|
+
),
|
|
510
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-body", children: [
|
|
511
|
+
showNav && /* @__PURE__ */ jsxRuntime.jsx(Sidebar, { items: nav, activeHref, basePath }),
|
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "rz-main", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-content", children }) })
|
|
513
|
+
] })
|
|
514
|
+
] });
|
|
515
|
+
}
|
|
516
|
+
function buttonClass(variant = "secondary", size = "md", extra) {
|
|
517
|
+
return ["rz-btn", `rz-btn--${variant}`, `rz-btn--${size}`, extra].filter(Boolean).join(" ");
|
|
518
|
+
}
|
|
519
|
+
function buttonStyle(variant = "secondary", size = "md") {
|
|
520
|
+
return { className: buttonClass(variant, size) };
|
|
521
|
+
}
|
|
522
|
+
function Button({ variant = "secondary", size = "md", className, type = "button", ...rest }) {
|
|
523
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { type, className: buttonClass(variant, size, className), ...rest });
|
|
524
|
+
}
|
|
525
|
+
function LinkButton({ variant = "secondary", size = "md", className, external, forward, children, ...rest }) {
|
|
526
|
+
const extra = external ? { target: "_blank", rel: "noreferrer", ...rest } : rest;
|
|
527
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: buttonClass(variant, size, className), ...extra, children: [
|
|
528
|
+
children,
|
|
529
|
+
external && /* @__PURE__ */ jsxRuntime.jsx(OutboundArrow, {}),
|
|
530
|
+
forward && !external && /* @__PURE__ */ jsxRuntime.jsx(ForwardArrow, {})
|
|
531
|
+
] });
|
|
532
|
+
}
|
|
533
|
+
function ForwardArrow() {
|
|
534
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "rz-arrow rz-arrow--fwd", children: [
|
|
535
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12h14" }),
|
|
536
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m13 6 6 6-6 6" })
|
|
537
|
+
] });
|
|
538
|
+
}
|
|
539
|
+
function OutboundArrow() {
|
|
540
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "rz-arrow", children: [
|
|
541
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 17 17 7" }),
|
|
542
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 7h10v10" })
|
|
543
|
+
] });
|
|
544
|
+
}
|
|
545
|
+
function Card({ title, meta, children, actions, className }) {
|
|
546
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ["rz-card", className].filter(Boolean).join(" "), children: [
|
|
547
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-card__title", children: title }),
|
|
548
|
+
meta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-card__meta", children: meta }),
|
|
549
|
+
children,
|
|
550
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-card__actions", children: actions })
|
|
551
|
+
] });
|
|
552
|
+
}
|
|
553
|
+
function PageHeader({ eyebrow, title, subtitle, actions }) {
|
|
554
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-pagehead", children: [
|
|
555
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
556
|
+
eyebrow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-pagehead__eyebrow", children: eyebrow }),
|
|
557
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { children: title }),
|
|
558
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-pagehead__sub", children: subtitle })
|
|
559
|
+
] }),
|
|
560
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rz-card__actions", style: { marginTop: 0 }, children: actions })
|
|
561
|
+
] });
|
|
562
|
+
}
|
|
563
|
+
function StatusPill({ tone = "neutral", children, title }) {
|
|
564
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rz-pill rz-pill--${tone}`, title, children });
|
|
565
|
+
}
|
|
566
|
+
function EmptyState({ title, children, action }) {
|
|
567
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rz-empty", children: [
|
|
568
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: title }),
|
|
569
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { children }),
|
|
570
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 14 }, children: action })
|
|
571
|
+
] });
|
|
572
|
+
}
|
|
573
|
+
function Steps({ steps }) {
|
|
574
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "rz-steps", "aria-label": "Progress", children: steps.map((st, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `rz-step rz-step--${st.state}`, "aria-current": st.state === "active" ? "step" : void 0, children: [
|
|
575
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-step__dot", "aria-hidden": "true", children: st.state === "done" ? "\u2713" : st.state === "failed" ? "!" : i + 1 }),
|
|
576
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rz-step__text", children: [
|
|
577
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-step__label", children: st.label }),
|
|
578
|
+
st.note && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rz-step__note", children: st.note })
|
|
579
|
+
] })
|
|
580
|
+
] }, i)) });
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
exports.AccountMenu = AccountMenu;
|
|
584
|
+
exports.AdminShell = AdminShell;
|
|
585
|
+
exports.Button = Button;
|
|
586
|
+
exports.Card = Card;
|
|
587
|
+
exports.EmptyState = EmptyState;
|
|
588
|
+
exports.ForwardArrow = ForwardArrow;
|
|
589
|
+
exports.Icon = Icon;
|
|
590
|
+
exports.LinkButton = LinkButton;
|
|
591
|
+
exports.OutboundArrow = OutboundArrow;
|
|
592
|
+
exports.PageHeader = PageHeader;
|
|
593
|
+
exports.SHELL_CSS = SHELL_CSS;
|
|
594
|
+
exports.Sidebar = Sidebar;
|
|
595
|
+
exports.StatusPill = StatusPill;
|
|
596
|
+
exports.Steps = Steps;
|
|
597
|
+
exports.ThemeToggle = ThemeToggle;
|
|
598
|
+
exports.TopBar = TopBar;
|
|
599
|
+
exports.buttonClass = buttonClass;
|
|
600
|
+
exports.buttonStyle = buttonStyle;
|
|
601
|
+
exports.firstNameOf = firstNameOf;
|
|
602
|
+
exports.iconFor = iconFor;
|
|
603
|
+
exports.initialsOf = initialsOf;
|
|
604
|
+
exports.isActive = isActive;
|
|
605
|
+
exports.useTheme = useTheme;
|
|
606
|
+
//# sourceMappingURL=index.cjs.map
|
|
607
|
+
//# sourceMappingURL=index.cjs.map
|