@dmitriikapustin/ui 0.1.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 +60 -0
- package/dist/index.cjs +2973 -0
- package/dist/index.d.cts +941 -0
- package/dist/index.d.ts +941 -0
- package/dist/index.js +2858 -0
- package/dist/styles.css +175 -0
- package/package.json +65 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2973 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('react');
|
|
4
|
+
var Lottie = require('lottie-react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var recharts = require('recharts');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var Lottie__default = /*#__PURE__*/_interopDefault(Lottie);
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __defProps = Object.defineProperties;
|
|
14
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
15
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
+
var __spreadValues = (a, b) => {
|
|
20
|
+
for (var prop in b || (b = {}))
|
|
21
|
+
if (__hasOwnProp.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
if (__getOwnPropSymbols)
|
|
24
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
}
|
|
28
|
+
return a;
|
|
29
|
+
};
|
|
30
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
31
|
+
var __objRest = (source, exclude) => {
|
|
32
|
+
var target = {};
|
|
33
|
+
for (var prop in source)
|
|
34
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
if (source != null && __getOwnPropSymbols)
|
|
37
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
+
target[prop] = source[prop];
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
43
|
+
var sizeMap = {
|
|
44
|
+
sm: 32,
|
|
45
|
+
md: 48,
|
|
46
|
+
lg: 64
|
|
47
|
+
};
|
|
48
|
+
var cachedData = null;
|
|
49
|
+
function Spinner({ size = "md", className = "" }) {
|
|
50
|
+
const s = sizeMap[size];
|
|
51
|
+
const [data, setData] = react.useState(() => cachedData);
|
|
52
|
+
react.useEffect(() => {
|
|
53
|
+
if (data) return;
|
|
54
|
+
let cancelled = false;
|
|
55
|
+
fetch("/lottie/spinner.json").then((r) => r.ok ? r.json() : null).then((json) => {
|
|
56
|
+
if (json && !cancelled) {
|
|
57
|
+
cachedData = json;
|
|
58
|
+
setData(json);
|
|
59
|
+
}
|
|
60
|
+
}).catch(() => {
|
|
61
|
+
});
|
|
62
|
+
return () => {
|
|
63
|
+
cancelled = true;
|
|
64
|
+
};
|
|
65
|
+
}, [data]);
|
|
66
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `inline-flex items-center justify-center ${className}`,
|
|
70
|
+
style: { width: s, height: s },
|
|
71
|
+
"aria-label": "Loading",
|
|
72
|
+
children: data ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
Lottie__default.default,
|
|
74
|
+
{
|
|
75
|
+
animationData: data,
|
|
76
|
+
loop: true,
|
|
77
|
+
autoplay: true,
|
|
78
|
+
style: { width: s, height: s }
|
|
79
|
+
}
|
|
80
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: "rounded-full border-2 border-[var(--border-color)] border-t-[var(--fg)] animate-spin",
|
|
84
|
+
style: { width: s * 0.7, height: s * 0.7 }
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
var variantStyles = {
|
|
91
|
+
primary: "bg-[var(--fg)] text-[var(--bg)] border border-[var(--bg)] hover:opacity-90 active:opacity-80 shadow-[var(--shadow-sm)]",
|
|
92
|
+
secondary: "bg-[var(--bg-tertiary)] text-[var(--fg)] hover:bg-[var(--border-color)] active:bg-[var(--border-color-strong)]",
|
|
93
|
+
outline: "border border-[var(--fg-secondary)] text-[var(--fg-secondary)] hover:bg-[var(--bg-tertiary)] active:bg-[var(--border-color)]",
|
|
94
|
+
ghost: "text-[var(--fg-secondary)] hover:text-[var(--fg)] hover:bg-[var(--bg-tertiary)] active:bg-[var(--border-color)]"
|
|
95
|
+
};
|
|
96
|
+
var sizeStyles = {
|
|
97
|
+
sm: "text-[13px] px-4 py-2 gap-1.5 rounded-full tracking-[-0.25px]",
|
|
98
|
+
md: "text-[13px] px-4 py-2 gap-2 rounded-full tracking-[-0.25px]"
|
|
99
|
+
};
|
|
100
|
+
function Button(_a) {
|
|
101
|
+
var _b = _a, {
|
|
102
|
+
variant = "primary",
|
|
103
|
+
size = "md",
|
|
104
|
+
loading = false,
|
|
105
|
+
icon,
|
|
106
|
+
iconRight,
|
|
107
|
+
children,
|
|
108
|
+
disabled,
|
|
109
|
+
className = ""
|
|
110
|
+
} = _b, props = __objRest(_b, [
|
|
111
|
+
"variant",
|
|
112
|
+
"size",
|
|
113
|
+
"loading",
|
|
114
|
+
"icon",
|
|
115
|
+
"iconRight",
|
|
116
|
+
"children",
|
|
117
|
+
"disabled",
|
|
118
|
+
"className"
|
|
119
|
+
]);
|
|
120
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
121
|
+
"button",
|
|
122
|
+
__spreadProps(__spreadValues({
|
|
123
|
+
className: `inline-flex items-center justify-center font-medium transition-all duration-[var(--transition-fast)] cursor-pointer select-none whitespace-nowrap ${variantStyles[variant]} ${sizeStyles[size]} ${disabled || loading ? "opacity-50 cursor-not-allowed pointer-events-none" : ""} ${className}`,
|
|
124
|
+
disabled: disabled || loading
|
|
125
|
+
}, props), {
|
|
126
|
+
children: [
|
|
127
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }) : icon,
|
|
128
|
+
children,
|
|
129
|
+
iconRight
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
function Input(_a) {
|
|
135
|
+
var _b = _a, {
|
|
136
|
+
label,
|
|
137
|
+
error,
|
|
138
|
+
icon,
|
|
139
|
+
iconRight,
|
|
140
|
+
className = "",
|
|
141
|
+
id
|
|
142
|
+
} = _b, props = __objRest(_b, [
|
|
143
|
+
"label",
|
|
144
|
+
"error",
|
|
145
|
+
"icon",
|
|
146
|
+
"iconRight",
|
|
147
|
+
"className",
|
|
148
|
+
"id"
|
|
149
|
+
]);
|
|
150
|
+
const inputId = id || (label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-"));
|
|
151
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
152
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
"label",
|
|
154
|
+
{
|
|
155
|
+
htmlFor: inputId,
|
|
156
|
+
className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]",
|
|
157
|
+
children: label
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
161
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3.5 top-1/2 -translate-y-1/2 text-[var(--fg-muted)]", children: icon }),
|
|
162
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
163
|
+
"input",
|
|
164
|
+
__spreadValues({
|
|
165
|
+
id: inputId,
|
|
166
|
+
className: `w-full border border-[var(--fg-muted)] bg-[var(--bg)] px-[15px] py-3 text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)] placeholder:text-[var(--fg-muted)] transition-all duration-[var(--transition-fast)] focus:outline-none focus:border-[var(--fg)] rounded-full ${icon ? "pl-10" : ""} ${iconRight ? "pr-10" : ""} ${error ? "border-[var(--color-error)] focus:border-[var(--color-error)]" : ""} ${className}`
|
|
167
|
+
}, props)
|
|
168
|
+
),
|
|
169
|
+
iconRight && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3.5 top-1/2 -translate-y-1/2 text-[var(--fg-muted)]", children: iconRight })
|
|
170
|
+
] }),
|
|
171
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--color-error)]", children: error })
|
|
172
|
+
] });
|
|
173
|
+
}
|
|
174
|
+
var colorStyles = {
|
|
175
|
+
default: "bg-[var(--bg-tertiary)] text-[var(--fg)]",
|
|
176
|
+
success: "bg-[var(--bg-tertiary)] text-[var(--color-success)]",
|
|
177
|
+
warning: "bg-[var(--bg-tertiary)] text-[var(--color-warning)]",
|
|
178
|
+
error: "bg-[var(--bg-tertiary)] text-[var(--color-error)]",
|
|
179
|
+
info: "bg-[var(--bg-tertiary)] text-[var(--color-info)]"
|
|
180
|
+
};
|
|
181
|
+
function Badge({ color = "default", children, className = "" }) {
|
|
182
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
183
|
+
"span",
|
|
184
|
+
{
|
|
185
|
+
className: `inline-flex items-center px-2.5 py-0.5 rounded-full text-[13px] font-semibold tracking-[-0.25px] ${colorStyles[color]} ${className}`,
|
|
186
|
+
children
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
var IconlyActivity = ({ size = 24, color = "currentColor" }) => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
191
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6.91711 14.8539L9.91011 10.9649L13.3241 13.6449L16.2531 9.86487", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
192
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M19.6671 2.34998C20.7291 2.34998 21.5891 3.20998 21.5891 4.27198C21.5891 5.33298 20.7291 6.19398 19.6671 6.19398C18.6051 6.19398 17.7451 5.33298 17.7451 4.27198C17.7451 3.20998 18.6051 2.34998 19.6671 2.34998Z", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.7555 9.26898C20.8885 10.164 20.9495 11.172 20.9495 12.303C20.9495 19.241 18.6375 21.553 11.6995 21.553C4.76246 21.553 2.44946 19.241 2.44946 12.303C2.44946 5.36598 4.76246 3.05298 11.6995 3.05298C12.8095 3.05298 13.8005 3.11198 14.6825 3.23998", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
194
|
+
] });
|
|
195
|
+
var IconlySmile = IconlyActivity;
|
|
196
|
+
var IconlyAttach = IconlyActivity;
|
|
197
|
+
var IconlyInfo = IconlyActivity;
|
|
198
|
+
var IconlySend = IconlyActivity;
|
|
199
|
+
var IconlySearch = IconlyActivity;
|
|
200
|
+
var IconlyMail = IconlyActivity;
|
|
201
|
+
var IconlyLock = IconlyActivity;
|
|
202
|
+
var IconlyStar = IconlyActivity;
|
|
203
|
+
var IconlySun = IconlyActivity;
|
|
204
|
+
var IconlyMoon = IconlyActivity;
|
|
205
|
+
var IconlyRoadmap = IconlyActivity;
|
|
206
|
+
var IconlyBook = IconlyActivity;
|
|
207
|
+
var IconlySandbox = IconlyActivity;
|
|
208
|
+
var IconlyHeart = IconlyActivity;
|
|
209
|
+
var IconlyClose = IconlyActivity;
|
|
210
|
+
var IconlyMenu = IconlyActivity;
|
|
211
|
+
var IconlyCheck = IconlyActivity;
|
|
212
|
+
var IconlyQuote = IconlyActivity;
|
|
213
|
+
var IconlyInfoCircle = IconlyActivity;
|
|
214
|
+
var IconlySuccess = IconlyActivity;
|
|
215
|
+
var IconlyWarning = IconlyActivity;
|
|
216
|
+
var IconlyError = IconlyActivity;
|
|
217
|
+
var IconlyChevronDown = IconlyActivity;
|
|
218
|
+
var IconlyLink = IconlyActivity;
|
|
219
|
+
var IconlyEye = IconlyActivity;
|
|
220
|
+
var IconlyEyeOff = IconlyActivity;
|
|
221
|
+
var IconlyChevronRight = IconlyActivity;
|
|
222
|
+
var IconlyChevronLeft = IconlyActivity;
|
|
223
|
+
var colorStyles2 = {
|
|
224
|
+
default: "bg-[var(--bg-tertiary)] text-[var(--fg-secondary)] border-[var(--border-color)]",
|
|
225
|
+
primary: "bg-[var(--bg-tertiary)] text-[var(--fg)] border-[var(--border-color-strong)]",
|
|
226
|
+
success: "bg-[var(--bg-tertiary)] text-[var(--color-success)] border-[var(--border-color)]",
|
|
227
|
+
warning: "bg-[var(--bg-tertiary)] text-[var(--color-warning)] border-[var(--border-color)]",
|
|
228
|
+
error: "bg-[var(--bg-tertiary)] text-[var(--color-error)] border-[var(--border-color)]"
|
|
229
|
+
};
|
|
230
|
+
function Tag({ color = "default", closable = false, onClose, children, className = "" }) {
|
|
231
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
232
|
+
"span",
|
|
233
|
+
{
|
|
234
|
+
className: `inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[13px] font-medium tracking-[-0.25px] border ${colorStyles2[color]} ${className}`,
|
|
235
|
+
children: [
|
|
236
|
+
children,
|
|
237
|
+
closable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
+
"button",
|
|
239
|
+
{
|
|
240
|
+
onClick: onClose,
|
|
241
|
+
className: "hover:opacity-70 transition-opacity cursor-pointer",
|
|
242
|
+
"aria-label": "Remove tag",
|
|
243
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 12 })
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
function Toggle({ checked = false, onChange, label, disabled = false, className = "" }) {
|
|
251
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: `inline-flex items-center gap-2.5 ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${className}`, children: [
|
|
252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
253
|
+
"button",
|
|
254
|
+
{
|
|
255
|
+
role: "switch",
|
|
256
|
+
type: "button",
|
|
257
|
+
"aria-checked": checked,
|
|
258
|
+
disabled,
|
|
259
|
+
onClick: () => onChange == null ? void 0 : onChange(!checked),
|
|
260
|
+
className: `relative inline-flex h-6 w-11 shrink-0 items-center rounded-full px-0.5 transition-colors duration-200 ease-in-out focus:outline-none cursor-pointer ${checked ? "bg-[var(--color-accent)] justify-end" : "bg-[var(--border-color)]"} ${disabled ? "cursor-not-allowed" : ""}`,
|
|
261
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
262
|
+
"span",
|
|
263
|
+
{
|
|
264
|
+
className: "pointer-events-none inline-block h-5 w-5 rounded-full bg-white transition-transform duration-200 ease-in-out"
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]", children: label })
|
|
270
|
+
] });
|
|
271
|
+
}
|
|
272
|
+
var sizeMap2 = {
|
|
273
|
+
sm: { container: "w-8 h-8", text: "text-xs" },
|
|
274
|
+
md: { container: "w-10 h-10", text: "text-sm" },
|
|
275
|
+
lg: { container: "w-12 h-12", text: "text-base" },
|
|
276
|
+
xl: { container: "w-16 h-16", text: "text-lg" }
|
|
277
|
+
};
|
|
278
|
+
function Avatar(_a) {
|
|
279
|
+
var _b = _a, { src, alt = "", initials, size = "md", className = "" } = _b, props = __objRest(_b, ["src", "alt", "initials", "size", "className"]);
|
|
280
|
+
const s = sizeMap2[size];
|
|
281
|
+
if (!src && initials) {
|
|
282
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
283
|
+
"div",
|
|
284
|
+
{
|
|
285
|
+
className: `${s.container} rounded-full bg-[var(--bg-tertiary)] border border-[var(--border-color)] flex items-center justify-center ${className}`,
|
|
286
|
+
"aria-label": alt || initials,
|
|
287
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${s.text} font-medium text-[var(--fg-secondary)] select-none`, children: initials })
|
|
288
|
+
}
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const imgSrc = src || "/assets/avatars/placeholder.webp";
|
|
292
|
+
return (
|
|
293
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
294
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
295
|
+
"img",
|
|
296
|
+
__spreadValues({
|
|
297
|
+
src: imgSrc,
|
|
298
|
+
alt,
|
|
299
|
+
className: `${s.container} rounded-full object-cover ${className}`
|
|
300
|
+
}, props)
|
|
301
|
+
)
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
function Divider({ className = "", label }) {
|
|
305
|
+
if (label) {
|
|
306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-4 ${className}`, children: [
|
|
307
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-px bg-[var(--border-color)]" }),
|
|
308
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-[var(--fg-muted)] uppercase tracking-wider", children: label }),
|
|
309
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-px bg-[var(--border-color)]" })
|
|
310
|
+
] });
|
|
311
|
+
}
|
|
312
|
+
return /* @__PURE__ */ jsxRuntime.jsx("hr", { className: `border-none h-px bg-[var(--border-color)] ${className}` });
|
|
313
|
+
}
|
|
314
|
+
function MenuItem({ text, active = false, onClick, className = "" }) {
|
|
315
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
316
|
+
"button",
|
|
317
|
+
{
|
|
318
|
+
onClick,
|
|
319
|
+
className: `inline-flex items-center px-[4px] py-[2px] text-[13px] font-medium tracking-[-0.25px] cursor-pointer border-none text-left whitespace-nowrap transition-colors duration-150 ${active ? "bg-[var(--bg-secondary)] text-[var(--fg)]" : "bg-transparent text-[var(--fg-muted)] hover:text-[var(--fg-secondary)]"} ${className}`,
|
|
320
|
+
children: text
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
var variantStyles2 = {
|
|
325
|
+
primary: "bg-[var(--fg)] text-[var(--bg)] border border-[var(--bg)] shadow-[var(--shadow-sm)]",
|
|
326
|
+
secondary: "bg-[var(--bg-tertiary)] text-[var(--fg-secondary)]",
|
|
327
|
+
clear: "bg-transparent text-[var(--fg-secondary)] shadow-[var(--shadow-sm)]",
|
|
328
|
+
disabled: "bg-[var(--bg-tertiary)] text-[var(--fg-muted)] opacity-50 cursor-not-allowed",
|
|
329
|
+
contrast: "bg-[var(--border-color)] text-[var(--fg-secondary)]"
|
|
330
|
+
};
|
|
331
|
+
function IconButton(_a) {
|
|
332
|
+
var _b = _a, { icon, variant = "primary", className = "", disabled } = _b, props = __objRest(_b, ["icon", "variant", "className", "disabled"]);
|
|
333
|
+
const isDisabled = variant === "disabled" || disabled;
|
|
334
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
335
|
+
"button",
|
|
336
|
+
__spreadProps(__spreadValues({
|
|
337
|
+
className: `inline-flex items-center justify-center w-9 h-9 rounded-full transition-all duration-[var(--transition-fast)] cursor-pointer shrink-0 ${variantStyles2[variant]} ${isDisabled ? "cursor-not-allowed" : ""} ${className}`,
|
|
338
|
+
disabled: isDisabled
|
|
339
|
+
}, props), {
|
|
340
|
+
children: icon
|
|
341
|
+
})
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
function Logo({ version = "short", className = "" }) {
|
|
345
|
+
if (version === "short") {
|
|
346
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-[19px] h-5 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("img", { className: "logo-img", src: "/assets/logos/logo-short.svg", alt: "aiacade.me", width: 19, height: 20 }) });
|
|
347
|
+
}
|
|
348
|
+
if (version === "third") {
|
|
349
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-1.5 ${className}`, children: [
|
|
350
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { className: "logo-img", src: "/assets/logos/logo-icon.svg", alt: "", width: 20, height: 20 }),
|
|
351
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]", children: "aiacade.me" })
|
|
352
|
+
] });
|
|
353
|
+
}
|
|
354
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-5 w-[130px] ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("img", { className: "logo-img", src: "/assets/logos/logo-full.svg", alt: "aiacade.me", width: 130, height: 20 }) });
|
|
355
|
+
}
|
|
356
|
+
function StatBadge({ value, suffix, showBrackets = false, className = "" }) {
|
|
357
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `inline-flex items-center text-[13px] font-medium text-[var(--fg-secondary)] tracking-[-0.25px] whitespace-nowrap ${className}`, children: [
|
|
358
|
+
showBrackets && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-muted)]", children: "[ " }),
|
|
359
|
+
value,
|
|
360
|
+
" ",
|
|
361
|
+
suffix,
|
|
362
|
+
showBrackets && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-muted)]", children: " ]" })
|
|
363
|
+
] });
|
|
364
|
+
}
|
|
365
|
+
function Textarea(_a) {
|
|
366
|
+
var _b = _a, {
|
|
367
|
+
label,
|
|
368
|
+
error,
|
|
369
|
+
className = "",
|
|
370
|
+
id,
|
|
371
|
+
rows = 3
|
|
372
|
+
} = _b, props = __objRest(_b, [
|
|
373
|
+
"label",
|
|
374
|
+
"error",
|
|
375
|
+
"className",
|
|
376
|
+
"id",
|
|
377
|
+
"rows"
|
|
378
|
+
]);
|
|
379
|
+
const textareaId = id || (label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-"));
|
|
380
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
381
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
+
"label",
|
|
383
|
+
{
|
|
384
|
+
htmlFor: textareaId,
|
|
385
|
+
className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]",
|
|
386
|
+
children: label
|
|
387
|
+
}
|
|
388
|
+
),
|
|
389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
+
"textarea",
|
|
391
|
+
__spreadValues({
|
|
392
|
+
id: textareaId,
|
|
393
|
+
rows,
|
|
394
|
+
className: `w-full border border-[var(--fg-muted)] bg-[var(--bg)] px-[15px] py-3 text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)] placeholder:text-[var(--fg-muted)] transition-all duration-[var(--transition-fast)] focus:outline-none focus:border-[var(--fg)] rounded-[var(--radius-lg)] resize-vertical ${error ? "border-[var(--color-error)] focus:border-[var(--color-error)]" : ""} ${className}`
|
|
395
|
+
}, props)
|
|
396
|
+
),
|
|
397
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--color-error)]", children: error })
|
|
398
|
+
] });
|
|
399
|
+
}
|
|
400
|
+
function Select(_a) {
|
|
401
|
+
var _b = _a, {
|
|
402
|
+
label,
|
|
403
|
+
error,
|
|
404
|
+
options,
|
|
405
|
+
placeholder,
|
|
406
|
+
className = "",
|
|
407
|
+
id
|
|
408
|
+
} = _b, props = __objRest(_b, [
|
|
409
|
+
"label",
|
|
410
|
+
"error",
|
|
411
|
+
"options",
|
|
412
|
+
"placeholder",
|
|
413
|
+
"className",
|
|
414
|
+
"id"
|
|
415
|
+
]);
|
|
416
|
+
const selectId = id || (label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-"));
|
|
417
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
418
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
419
|
+
"label",
|
|
420
|
+
{
|
|
421
|
+
htmlFor: selectId,
|
|
422
|
+
className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]",
|
|
423
|
+
children: label
|
|
424
|
+
}
|
|
425
|
+
),
|
|
426
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
427
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
428
|
+
"select",
|
|
429
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
430
|
+
id: selectId,
|
|
431
|
+
className: `w-full appearance-none border border-[var(--fg-muted)] bg-[var(--bg)] px-[15px] py-3 pr-10 text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)] transition-all duration-[var(--transition-fast)] focus:outline-none focus:border-[var(--fg)] rounded-full ${error ? "border-[var(--color-error)] focus:border-[var(--color-error)]" : ""} ${className}`
|
|
432
|
+
}, !("value" in props) && { defaultValue: "" }), props), {
|
|
433
|
+
children: [
|
|
434
|
+
placeholder && /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: placeholder }),
|
|
435
|
+
options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
|
|
436
|
+
]
|
|
437
|
+
})
|
|
438
|
+
),
|
|
439
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-3.5 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--fg-muted)]", children: /* @__PURE__ */ jsxRuntime.jsx(IconlyChevronDown, { size: 16 }) })
|
|
440
|
+
] }),
|
|
441
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--color-error)]", children: error })
|
|
442
|
+
] });
|
|
443
|
+
}
|
|
444
|
+
function Checkbox({
|
|
445
|
+
checked = false,
|
|
446
|
+
onChange,
|
|
447
|
+
label,
|
|
448
|
+
disabled = false,
|
|
449
|
+
className = ""
|
|
450
|
+
}) {
|
|
451
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
452
|
+
"label",
|
|
453
|
+
{
|
|
454
|
+
className: `inline-flex items-center gap-2.5 ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${className}`,
|
|
455
|
+
children: [
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
457
|
+
"input",
|
|
458
|
+
{
|
|
459
|
+
type: "checkbox",
|
|
460
|
+
checked,
|
|
461
|
+
disabled,
|
|
462
|
+
onChange: () => onChange == null ? void 0 : onChange(!checked),
|
|
463
|
+
className: "absolute opacity-0 w-0 h-0"
|
|
464
|
+
}
|
|
465
|
+
),
|
|
466
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
467
|
+
"span",
|
|
468
|
+
{
|
|
469
|
+
className: `flex items-center justify-center w-[18px] h-[18px] rounded-[5px] border transition-colors duration-200 shrink-0 ${checked ? "bg-[var(--color-accent)] border-[var(--color-accent)]" : "border-[var(--fg-muted)] bg-transparent"}`,
|
|
470
|
+
children: checked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
471
|
+
"svg",
|
|
472
|
+
{
|
|
473
|
+
width: "12",
|
|
474
|
+
height: "9",
|
|
475
|
+
viewBox: "0 0 12 9",
|
|
476
|
+
fill: "none",
|
|
477
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
478
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
+
"path",
|
|
480
|
+
{
|
|
481
|
+
d: "M1 4L4.5 7.5L11 1",
|
|
482
|
+
stroke: "white",
|
|
483
|
+
strokeWidth: "2",
|
|
484
|
+
strokeLinecap: "round",
|
|
485
|
+
strokeLinejoin: "round"
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]", children: label })
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
function Radio({
|
|
498
|
+
checked = false,
|
|
499
|
+
onChange,
|
|
500
|
+
label,
|
|
501
|
+
disabled = false,
|
|
502
|
+
name,
|
|
503
|
+
value,
|
|
504
|
+
className = ""
|
|
505
|
+
}) {
|
|
506
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
507
|
+
"label",
|
|
508
|
+
{
|
|
509
|
+
className: `inline-flex items-center gap-2.5 ${disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"} ${className}`,
|
|
510
|
+
children: [
|
|
511
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
512
|
+
"input",
|
|
513
|
+
{
|
|
514
|
+
type: "radio",
|
|
515
|
+
checked,
|
|
516
|
+
disabled,
|
|
517
|
+
name,
|
|
518
|
+
value,
|
|
519
|
+
onChange: () => onChange == null ? void 0 : onChange(!checked),
|
|
520
|
+
className: "absolute opacity-0 w-0 h-0"
|
|
521
|
+
}
|
|
522
|
+
),
|
|
523
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
524
|
+
"span",
|
|
525
|
+
{
|
|
526
|
+
className: `flex items-center justify-center w-[18px] h-[18px] rounded-full border transition-colors duration-200 shrink-0 ${checked ? "border-[var(--color-accent)]" : "border-[var(--fg-muted)]"}`,
|
|
527
|
+
children: checked && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-[8px] h-[8px] rounded-full bg-[var(--color-accent)]" })
|
|
528
|
+
}
|
|
529
|
+
),
|
|
530
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]", children: label })
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
var variantStyles3 = {
|
|
536
|
+
default: "text-[var(--color-accent)] hover:underline",
|
|
537
|
+
muted: "text-[var(--fg-muted)] hover:text-[var(--fg)]",
|
|
538
|
+
underline: "text-[var(--fg)] underline underline-offset-2 hover:text-[var(--color-accent)]"
|
|
539
|
+
};
|
|
540
|
+
function Link(_a) {
|
|
541
|
+
var _b = _a, { variant = "default", className = "", children } = _b, rest = __objRest(_b, ["variant", "className", "children"]);
|
|
542
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
543
|
+
"a",
|
|
544
|
+
__spreadProps(__spreadValues({
|
|
545
|
+
className: `text-[13px] tracking-[-0.25px] transition-colors duration-[var(--transition-fast)] inline-flex items-center gap-1 ${variantStyles3[variant]} ${className}`
|
|
546
|
+
}, rest), {
|
|
547
|
+
children
|
|
548
|
+
})
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
var positionStyles = {
|
|
552
|
+
top: "bottom-full left-1/2 -translate-x-1/2 mb-1.5",
|
|
553
|
+
bottom: "top-full left-1/2 -translate-x-1/2 mt-1.5",
|
|
554
|
+
left: "right-full top-1/2 -translate-y-1/2 mr-1.5",
|
|
555
|
+
right: "left-full top-1/2 -translate-y-1/2 ml-1.5"
|
|
556
|
+
};
|
|
557
|
+
function Tooltip({ content, position = "top", children, className = "" }) {
|
|
558
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `relative inline-flex group ${className}`, children: [
|
|
559
|
+
children,
|
|
560
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
+
"span",
|
|
562
|
+
{
|
|
563
|
+
role: "tooltip",
|
|
564
|
+
className: `absolute invisible group-hover:visible opacity-0 group-hover:opacity-100 transition-opacity bg-[var(--fg)] text-[var(--bg)] text-[11px] px-2 py-1 rounded-md whitespace-nowrap z-50 pointer-events-none ${positionStyles[position]}`,
|
|
565
|
+
children: content
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
] });
|
|
569
|
+
}
|
|
570
|
+
var variantStyles4 = {
|
|
571
|
+
line: "h-4 w-full rounded-full",
|
|
572
|
+
circle: "rounded-full",
|
|
573
|
+
rect: "rounded-[var(--radius-lg)]"
|
|
574
|
+
};
|
|
575
|
+
function Skeleton({ variant = "line", width, height, className = "" }) {
|
|
576
|
+
const style = {};
|
|
577
|
+
if (width != null) style.width = typeof width === "number" ? `${width}px` : width;
|
|
578
|
+
if (height != null) style.height = typeof height === "number" ? `${height}px` : height;
|
|
579
|
+
if (variant === "circle") {
|
|
580
|
+
if (width != null && height == null) style.height = style.width;
|
|
581
|
+
if (height != null && width == null) style.width = style.height;
|
|
582
|
+
}
|
|
583
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
584
|
+
"div",
|
|
585
|
+
{
|
|
586
|
+
className: `animate-pulse bg-[var(--bg-tertiary)] ${variantStyles4[variant]} ${className}`,
|
|
587
|
+
style: Object.keys(style).length > 0 ? style : void 0,
|
|
588
|
+
"aria-hidden": "true"
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
var DefaultIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) });
|
|
593
|
+
function TicketButton(_a) {
|
|
594
|
+
var _b = _a, {
|
|
595
|
+
children,
|
|
596
|
+
icon,
|
|
597
|
+
variant = "primary",
|
|
598
|
+
className = ""
|
|
599
|
+
} = _b, props = __objRest(_b, [
|
|
600
|
+
"children",
|
|
601
|
+
"icon",
|
|
602
|
+
"variant",
|
|
603
|
+
"className"
|
|
604
|
+
]);
|
|
605
|
+
const maskId = react.useId().replace(/:/g, "");
|
|
606
|
+
const isPrimary = variant === "primary";
|
|
607
|
+
const bg = isPrimary ? "var(--fg)" : "var(--bg)";
|
|
608
|
+
const fg = isPrimary ? "var(--bg)" : "var(--fg)";
|
|
609
|
+
const perfColor = isPrimary ? "var(--bg)" : "var(--border-color)";
|
|
610
|
+
const strokeAttr = isPrimary ? {} : { stroke: "var(--border-color-strong)", strokeWidth: 1.5 };
|
|
611
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
612
|
+
"button",
|
|
613
|
+
__spreadProps(__spreadValues({
|
|
614
|
+
className: `group relative inline-flex items-stretch cursor-pointer border-none bg-transparent p-0 select-none ${className}`
|
|
615
|
+
}, props), {
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative flex items-center", children: [
|
|
618
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
619
|
+
"svg",
|
|
620
|
+
{
|
|
621
|
+
className: "absolute inset-0 w-full h-full",
|
|
622
|
+
viewBox: "0 0 140 56",
|
|
623
|
+
fill: "none",
|
|
624
|
+
preserveAspectRatio: "none",
|
|
625
|
+
children: [
|
|
626
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("mask", { id: `${maskId}-l`, children: [
|
|
627
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "140", height: "56", fill: "white" }),
|
|
628
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "140", height: "56", rx: "14", fill: "white" }),
|
|
629
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "140", cy: "0", r: "7", fill: "black" }),
|
|
630
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "140", cy: "56", r: "7", fill: "black" })
|
|
631
|
+
] }) }),
|
|
632
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
633
|
+
"rect",
|
|
634
|
+
__spreadValues({
|
|
635
|
+
width: "140",
|
|
636
|
+
height: "56",
|
|
637
|
+
rx: "14",
|
|
638
|
+
fill: bg,
|
|
639
|
+
mask: `url(#${maskId}-l)`
|
|
640
|
+
}, strokeAttr)
|
|
641
|
+
),
|
|
642
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "139", y1: "10", x2: "139", y2: "46", stroke: perfColor, strokeWidth: "1.5", strokeDasharray: "3 3", opacity: "0.4" })
|
|
643
|
+
]
|
|
644
|
+
}
|
|
645
|
+
),
|
|
646
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 px-6 py-4 text-[13px] font-semibold tracking-[-0.25px] whitespace-nowrap", style: { color: fg }, children })
|
|
647
|
+
] }),
|
|
648
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative flex items-center transition-transform duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] group-hover:translate-x-1.5", children: [
|
|
649
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
650
|
+
"svg",
|
|
651
|
+
{
|
|
652
|
+
className: "absolute inset-0 w-full h-full",
|
|
653
|
+
viewBox: "0 0 56 56",
|
|
654
|
+
fill: "none",
|
|
655
|
+
preserveAspectRatio: "none",
|
|
656
|
+
children: [
|
|
657
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("mask", { id: `${maskId}-r`, children: [
|
|
658
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { width: "56", height: "56", fill: "white" }),
|
|
659
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "56", height: "56", rx: "14", fill: "white" }),
|
|
660
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "0", r: "7", fill: "black" }),
|
|
661
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "56", r: "7", fill: "black" })
|
|
662
|
+
] }) }),
|
|
663
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
664
|
+
"rect",
|
|
665
|
+
__spreadValues({
|
|
666
|
+
width: "56",
|
|
667
|
+
height: "56",
|
|
668
|
+
rx: "14",
|
|
669
|
+
fill: bg,
|
|
670
|
+
mask: `url(#${maskId}-r)`
|
|
671
|
+
}, strokeAttr)
|
|
672
|
+
)
|
|
673
|
+
]
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10 w-[56px] h-[56px] flex items-center justify-center", style: { color: fg }, children: icon || /* @__PURE__ */ jsxRuntime.jsx(DefaultIcon, {}) })
|
|
677
|
+
] })
|
|
678
|
+
]
|
|
679
|
+
})
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
function Card({ image, title, description, footer, children, className = "" }) {
|
|
683
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
684
|
+
"div",
|
|
685
|
+
{
|
|
686
|
+
className: `rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] overflow-hidden shadow-[var(--shadow-xs)] transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5 ${className}`,
|
|
687
|
+
children: [
|
|
688
|
+
image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-video overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: title || "", className: "w-full h-full object-cover" }) }),
|
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5", children: [
|
|
690
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-[var(--fg)] mb-1", children: title }),
|
|
691
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed", children: description }),
|
|
692
|
+
children
|
|
693
|
+
] }),
|
|
694
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 py-3 border-t border-[var(--border-color)] bg-[var(--bg-secondary)]", children: footer })
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
function FormField(_a) {
|
|
700
|
+
var _b = _a, { label, error, hint, icon } = _b, inputProps = __objRest(_b, ["label", "error", "hint", "icon"]);
|
|
701
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
702
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, __spreadValues({ label, error, icon }, inputProps)),
|
|
703
|
+
hint && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[0.8125rem] text-[var(--fg-muted)]", children: hint })
|
|
704
|
+
] });
|
|
705
|
+
}
|
|
706
|
+
function SearchBar({ placeholder = "Search...", value: controlledValue, onChange, className = "" }) {
|
|
707
|
+
const [internalValue, setInternalValue] = react.useState("");
|
|
708
|
+
const value = controlledValue != null ? controlledValue : internalValue;
|
|
709
|
+
const handleChange = (val) => {
|
|
710
|
+
setInternalValue(val);
|
|
711
|
+
onChange == null ? void 0 : onChange(val);
|
|
712
|
+
};
|
|
713
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative flex items-center ${className}`, children: [
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3 text-[var(--fg-muted)]", children: /* @__PURE__ */ jsxRuntime.jsx(IconlySearch, { size: 18 }) }),
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
716
|
+
"input",
|
|
717
|
+
{
|
|
718
|
+
type: "text",
|
|
719
|
+
value,
|
|
720
|
+
onChange: (e) => handleChange(e.target.value),
|
|
721
|
+
placeholder,
|
|
722
|
+
"aria-label": "Search",
|
|
723
|
+
className: "w-full rounded-[var(--radius-lg)] border border-[var(--border-color)] bg-[var(--bg)] pl-10 pr-10 py-2.5 text-sm text-[var(--fg)] placeholder:text-[var(--fg-muted)] transition-all duration-[var(--transition-fast)] focus:outline-none focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-transparent"
|
|
724
|
+
}
|
|
725
|
+
),
|
|
726
|
+
value && /* @__PURE__ */ jsxRuntime.jsx(
|
|
727
|
+
"button",
|
|
728
|
+
{
|
|
729
|
+
onClick: () => handleChange(""),
|
|
730
|
+
className: "absolute right-3 text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors cursor-pointer",
|
|
731
|
+
"aria-label": "Clear search",
|
|
732
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 16 })
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
] });
|
|
736
|
+
}
|
|
737
|
+
function Stat({ value, label, trend, className = "" }) {
|
|
738
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 ${className}`, children: [
|
|
739
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
740
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl font-bold text-[var(--fg)]", children: value }),
|
|
741
|
+
trend && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
742
|
+
"span",
|
|
743
|
+
{
|
|
744
|
+
className: `text-sm font-medium ${trend.positive ? "text-[var(--color-success)]" : "text-[var(--color-error)]"}`,
|
|
745
|
+
children: [
|
|
746
|
+
trend.positive ? "\u2191" : "\u2193",
|
|
747
|
+
" ",
|
|
748
|
+
trend.value
|
|
749
|
+
]
|
|
750
|
+
}
|
|
751
|
+
)
|
|
752
|
+
] }),
|
|
753
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-[var(--fg-muted)]", children: label })
|
|
754
|
+
] });
|
|
755
|
+
}
|
|
756
|
+
var variantConfig = {
|
|
757
|
+
info: { accentColor: "text-[var(--color-info)]", Icon: IconlyInfoCircle },
|
|
758
|
+
success: { accentColor: "text-[var(--color-success)]", Icon: IconlySuccess },
|
|
759
|
+
warning: { accentColor: "text-[var(--color-warning)]", Icon: IconlyWarning },
|
|
760
|
+
error: { accentColor: "text-[var(--color-error)]", Icon: IconlyError }
|
|
761
|
+
};
|
|
762
|
+
function Alert({ variant = "info", title, children, closable = false, className = "" }) {
|
|
763
|
+
const [visible, setVisible] = react.useState(true);
|
|
764
|
+
if (!visible) return null;
|
|
765
|
+
const config = variantConfig[variant];
|
|
766
|
+
const { Icon } = config;
|
|
767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
768
|
+
"div",
|
|
769
|
+
{
|
|
770
|
+
className: `flex gap-3 p-4 rounded-[var(--radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] ${className}`,
|
|
771
|
+
children: [
|
|
772
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `shrink-0 mt-0.5 ${config.accentColor}`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 20 }) }),
|
|
773
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
774
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-[13px] font-medium tracking-[-0.25px] mb-0.5 ${config.accentColor}`, children: title }),
|
|
775
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)]", children })
|
|
776
|
+
] }),
|
|
777
|
+
closable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
778
|
+
"button",
|
|
779
|
+
{
|
|
780
|
+
onClick: () => setVisible(false),
|
|
781
|
+
className: "shrink-0 text-[var(--fg-muted)] hover:text-[var(--fg)] transition-all duration-[var(--transition-fast)] cursor-pointer",
|
|
782
|
+
"aria-label": "Dismiss",
|
|
783
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 16 })
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
]
|
|
787
|
+
}
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
function Tabs({ tabs, defaultTab, onChange, className = "" }) {
|
|
791
|
+
var _a, _b;
|
|
792
|
+
const [activeTab, setActiveTab] = react.useState(defaultTab || ((_a = tabs[0]) == null ? void 0 : _a.id));
|
|
793
|
+
const tabRefs = react.useRef([]);
|
|
794
|
+
const activateTab = (tabId) => {
|
|
795
|
+
setActiveTab(tabId);
|
|
796
|
+
onChange == null ? void 0 : onChange(tabId);
|
|
797
|
+
};
|
|
798
|
+
const handleKeyDown = (e) => {
|
|
799
|
+
var _a2;
|
|
800
|
+
const currentIndex = tabs.findIndex((t) => t.id === activeTab);
|
|
801
|
+
let nextIndex = null;
|
|
802
|
+
if (e.key === "ArrowRight") {
|
|
803
|
+
nextIndex = (currentIndex + 1) % tabs.length;
|
|
804
|
+
} else if (e.key === "ArrowLeft") {
|
|
805
|
+
nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
|
806
|
+
}
|
|
807
|
+
if (nextIndex !== null) {
|
|
808
|
+
e.preventDefault();
|
|
809
|
+
const nextTab = tabs[nextIndex];
|
|
810
|
+
activateTab(nextTab.id);
|
|
811
|
+
(_a2 = tabRefs.current[nextIndex]) == null ? void 0 : _a2.focus();
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
const activeContent = (_b = tabs.find((t) => t.id === activeTab)) == null ? void 0 : _b.content;
|
|
815
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
|
|
816
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
817
|
+
"div",
|
|
818
|
+
{
|
|
819
|
+
role: "tablist",
|
|
820
|
+
className: "flex border-b border-[var(--border-color)]",
|
|
821
|
+
onKeyDown: handleKeyDown,
|
|
822
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
823
|
+
"button",
|
|
824
|
+
{
|
|
825
|
+
ref: (el) => {
|
|
826
|
+
tabRefs.current[index] = el;
|
|
827
|
+
},
|
|
828
|
+
id: `tab-${tab.id}`,
|
|
829
|
+
role: "tab",
|
|
830
|
+
"aria-selected": activeTab === tab.id,
|
|
831
|
+
"aria-controls": `panel-${tab.id}`,
|
|
832
|
+
tabIndex: activeTab === tab.id ? 0 : -1,
|
|
833
|
+
onClick: () => activateTab(tab.id),
|
|
834
|
+
className: `px-4 py-2.5 text-sm font-medium transition-colors cursor-pointer relative ${activeTab === tab.id ? "text-[var(--brand-primary)]" : "text-[var(--fg-muted)] hover:text-[var(--fg)]"}`,
|
|
835
|
+
children: [
|
|
836
|
+
tab.label,
|
|
837
|
+
activeTab === tab.id && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-[var(--brand-primary)] rounded-full" })
|
|
838
|
+
]
|
|
839
|
+
},
|
|
840
|
+
tab.id
|
|
841
|
+
))
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
activeContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
role: "tabpanel",
|
|
848
|
+
id: `panel-${activeTab}`,
|
|
849
|
+
"aria-labelledby": `tab-${activeTab}`,
|
|
850
|
+
className: "pt-4",
|
|
851
|
+
children: activeContent
|
|
852
|
+
}
|
|
853
|
+
)
|
|
854
|
+
] });
|
|
855
|
+
}
|
|
856
|
+
function ChatInput({
|
|
857
|
+
placeholder = "\u0412\u0432\u0435\u0434\u0438 \u0441\u0432\u043E\u0439 email...",
|
|
858
|
+
buttonText = "\u041D\u0430\u0447\u0430\u0442\u044C \u0431\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u043E",
|
|
859
|
+
type = "easy",
|
|
860
|
+
contrast = true,
|
|
861
|
+
onSubmit,
|
|
862
|
+
className = ""
|
|
863
|
+
}) {
|
|
864
|
+
const [value, setValue] = react.useState("");
|
|
865
|
+
const inputRef = react.useRef(null);
|
|
866
|
+
const handleSubmit = (e) => {
|
|
867
|
+
e.preventDefault();
|
|
868
|
+
if (value.trim() && onSubmit) {
|
|
869
|
+
onSubmit(value.trim());
|
|
870
|
+
setValue("");
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
const containerStyles = contrast ? "bg-[var(--bg)] border border-[var(--bg-tertiary)] shadow-[var(--shadow-md)] px-[15px] py-[13px]" : "bg-[var(--bg-tertiary)] pl-3.5 pr-3 py-3";
|
|
874
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
875
|
+
"form",
|
|
876
|
+
{
|
|
877
|
+
onSubmit: handleSubmit,
|
|
878
|
+
onClick: () => {
|
|
879
|
+
var _a;
|
|
880
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
881
|
+
},
|
|
882
|
+
className: `rounded-[16px] overflow-hidden flex flex-col gap-4 w-full max-w-[440px] cursor-text ${containerStyles} ${className}`,
|
|
883
|
+
children: [
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
885
|
+
"input",
|
|
886
|
+
{
|
|
887
|
+
ref: inputRef,
|
|
888
|
+
type: "text",
|
|
889
|
+
value,
|
|
890
|
+
onChange: (e) => setValue(e.target.value),
|
|
891
|
+
placeholder,
|
|
892
|
+
className: "w-full bg-transparent border-none outline-none text-[13px] tracking-[-0.25px] text-[var(--fg)] placeholder:text-[var(--fg-muted)] font-normal"
|
|
893
|
+
}
|
|
894
|
+
),
|
|
895
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center ${type === "full" ? "justify-between" : "justify-end"}`, children: [
|
|
896
|
+
type === "full" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
897
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconButton, { variant: "secondary", icon: /* @__PURE__ */ jsxRuntime.jsx(IconlySmile, { size: 20 }), type: "button", "aria-label": "Emoji" }),
|
|
898
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconButton, { variant: "clear", icon: /* @__PURE__ */ jsxRuntime.jsx(IconlyAttach, { size: 20 }), type: "button", "aria-label": "Attach" }),
|
|
899
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconButton, { variant: "clear", icon: /* @__PURE__ */ jsxRuntime.jsx(IconlyInfo, { size: 20 }), type: "button", "aria-label": "Info" })
|
|
900
|
+
] }),
|
|
901
|
+
type === "easy" ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "sm", type: "submit", children: buttonText }) : /* @__PURE__ */ jsxRuntime.jsx(IconButton, { variant: "primary", icon: /* @__PURE__ */ jsxRuntime.jsx(IconlySend, { size: 20 }), type: "submit", "aria-label": "Send" })
|
|
902
|
+
] })
|
|
903
|
+
]
|
|
904
|
+
}
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
function ChatMessage({ children, role = "user", size = "sm", className = "" }) {
|
|
908
|
+
const isUser = role === "user";
|
|
909
|
+
const isLarge = size === "lg";
|
|
910
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex ${isUser ? "justify-end" : "justify-start"} ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
911
|
+
"div",
|
|
912
|
+
{
|
|
913
|
+
className: `text-[13px] tracking-[-0.25px] font-normal px-4 rounded-tl-[16px] rounded-tr-[16px] ${isLarge ? "w-[225px] py-3" : "py-2"} ${isUser ? "bg-[var(--bg-secondary)] text-[var(--fg)] rounded-bl-[16px]" : "bg-[var(--color-accent)] text-[var(--bg)] rounded-br-[16px]"} ${isLarge ? "leading-normal" : "leading-normal"}`,
|
|
914
|
+
children
|
|
915
|
+
}
|
|
916
|
+
) });
|
|
917
|
+
}
|
|
918
|
+
function TopPromo({ text, buttonText = "\u0421\u043C\u043E\u0442\u0440\u0435\u0442\u044C", onButtonClick, className = "" }) {
|
|
919
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-2.5 ${className}`, children: [
|
|
920
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)]", children: text }),
|
|
921
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "sm", onClick: onButtonClick, children: buttonText })
|
|
922
|
+
] });
|
|
923
|
+
}
|
|
924
|
+
function ProfileNav({ stats, avatarSrc, avatarInitials = "DK", className = "" }) {
|
|
925
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-5 ${className}`, children: [
|
|
926
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: stats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center text-[13px] font-medium tracking-[-0.25px] whitespace-nowrap", children: [
|
|
927
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[var(--fg-secondary)]", children: [
|
|
928
|
+
stat.value,
|
|
929
|
+
" ",
|
|
930
|
+
stat.suffix
|
|
931
|
+
] }),
|
|
932
|
+
i < stats.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-muted)]", children: " //" })
|
|
933
|
+
] }, i)) }),
|
|
934
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { size: "sm", src: avatarSrc, initials: avatarInitials })
|
|
935
|
+
] });
|
|
936
|
+
}
|
|
937
|
+
function IconWithText({ icon, text, side = "left", className = "" }) {
|
|
938
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `inline-flex items-center gap-1.5 py-1 rounded-full ${className}`, children: [
|
|
939
|
+
side === "left" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center", children: icon }),
|
|
940
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px] whitespace-nowrap", children: text }),
|
|
941
|
+
side === "right" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 w-5 h-5 flex items-center justify-center", children: icon })
|
|
942
|
+
] });
|
|
943
|
+
}
|
|
944
|
+
function StampCard({
|
|
945
|
+
children,
|
|
946
|
+
className = "",
|
|
947
|
+
stamp = true,
|
|
948
|
+
holeRadius = 4,
|
|
949
|
+
holeSpacing = 16
|
|
950
|
+
}) {
|
|
951
|
+
const outerRef = react.useRef(null);
|
|
952
|
+
const [maskUrl, setMaskUrl] = react.useState(null);
|
|
953
|
+
const build = react.useCallback(() => {
|
|
954
|
+
if (!stamp) return;
|
|
955
|
+
const el = outerRef.current;
|
|
956
|
+
if (!el) return;
|
|
957
|
+
const w = el.offsetWidth;
|
|
958
|
+
const h = el.offsetHeight;
|
|
959
|
+
if (w === 0 || h === 0) return;
|
|
960
|
+
const r = holeRadius;
|
|
961
|
+
const sp = holeSpacing;
|
|
962
|
+
let circles = "";
|
|
963
|
+
for (let x = sp / 2; x < w; x += sp) {
|
|
964
|
+
circles += `<circle cx="${x}" cy="0" r="${r}"/>`;
|
|
965
|
+
}
|
|
966
|
+
for (let x = sp / 2; x < w; x += sp) {
|
|
967
|
+
circles += `<circle cx="${x}" cy="${h}" r="${r}"/>`;
|
|
968
|
+
}
|
|
969
|
+
for (let y = sp / 2; y < h; y += sp) {
|
|
970
|
+
circles += `<circle cx="0" cy="${y}" r="${r}"/>`;
|
|
971
|
+
}
|
|
972
|
+
for (let y = sp / 2; y < h; y += sp) {
|
|
973
|
+
circles += `<circle cx="${w}" cy="${y}" r="${r}"/>`;
|
|
974
|
+
}
|
|
975
|
+
const maskSvg = `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}">
|
|
976
|
+
<defs><mask id="m">
|
|
977
|
+
<rect width="${w}" height="${h}" fill="white"/>
|
|
978
|
+
${circles}
|
|
979
|
+
</mask></defs>
|
|
980
|
+
<rect width="${w}" height="${h}" fill="white" mask="url(#m)"/>
|
|
981
|
+
</svg>`;
|
|
982
|
+
setMaskUrl(`data:image/svg+xml;base64,${btoa(maskSvg)}`);
|
|
983
|
+
}, [stamp, holeRadius, holeSpacing]);
|
|
984
|
+
react.useEffect(() => {
|
|
985
|
+
if (!stamp) return;
|
|
986
|
+
const frame = requestAnimationFrame(() => build());
|
|
987
|
+
const ro = new ResizeObserver(() => build());
|
|
988
|
+
if (outerRef.current) ro.observe(outerRef.current);
|
|
989
|
+
return () => {
|
|
990
|
+
cancelAnimationFrame(frame);
|
|
991
|
+
ro.disconnect();
|
|
992
|
+
};
|
|
993
|
+
}, [build, stamp]);
|
|
994
|
+
if (!stamp) {
|
|
995
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] overflow-hidden shadow-[var(--shadow-xs)] ${className}`, children });
|
|
996
|
+
}
|
|
997
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: outerRef, className: `relative ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { filter: "drop-shadow(0 1px 3px rgba(0,0,0,0.25)) drop-shadow(0 4px 12px rgba(0,0,0,0.20))" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
998
|
+
"div",
|
|
999
|
+
{
|
|
1000
|
+
style: {
|
|
1001
|
+
WebkitMaskImage: maskUrl ? `url("${maskUrl}")` : void 0,
|
|
1002
|
+
maskImage: maskUrl ? `url("${maskUrl}")` : void 0,
|
|
1003
|
+
WebkitMaskSize: "100% 100%",
|
|
1004
|
+
maskSize: "100% 100%"
|
|
1005
|
+
},
|
|
1006
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--bg)]", children })
|
|
1007
|
+
}
|
|
1008
|
+
) }) });
|
|
1009
|
+
}
|
|
1010
|
+
function PasswordInput(_a) {
|
|
1011
|
+
var props = __objRest(_a, []);
|
|
1012
|
+
const [showPassword, setShowPassword] = react.useState(false);
|
|
1013
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1014
|
+
Input,
|
|
1015
|
+
__spreadProps(__spreadValues({}, props), {
|
|
1016
|
+
type: showPassword ? "text" : "password",
|
|
1017
|
+
iconRight: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1018
|
+
"button",
|
|
1019
|
+
{
|
|
1020
|
+
type: "button",
|
|
1021
|
+
onClick: () => setShowPassword((prev) => !prev),
|
|
1022
|
+
className: "flex items-center justify-center cursor-pointer",
|
|
1023
|
+
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
1024
|
+
tabIndex: -1,
|
|
1025
|
+
children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(IconlyEyeOff, { size: 18 }) : /* @__PURE__ */ jsxRuntime.jsx(IconlyEye, { size: 18 })
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
})
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
function Breadcrumbs({
|
|
1032
|
+
items,
|
|
1033
|
+
separator = /* @__PURE__ */ jsxRuntime.jsx(IconlyChevronRight, { size: 14 })
|
|
1034
|
+
}) {
|
|
1035
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex items-center gap-1.5 text-[13px] tracking-[-0.25px]", children: items.map((item, index) => {
|
|
1036
|
+
var _a;
|
|
1037
|
+
const isLast = index === items.length - 1;
|
|
1038
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
1039
|
+
index > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-muted)]", "aria-hidden": "true", children: separator }),
|
|
1040
|
+
isLast ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg)] font-medium", "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
+
"a",
|
|
1042
|
+
{
|
|
1043
|
+
href: (_a = item.href) != null ? _a : "#",
|
|
1044
|
+
className: "text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors duration-[var(--transition-fast)]",
|
|
1045
|
+
children: item.label
|
|
1046
|
+
}
|
|
1047
|
+
)
|
|
1048
|
+
] }, index);
|
|
1049
|
+
}) }) });
|
|
1050
|
+
}
|
|
1051
|
+
var variantConfig2 = {
|
|
1052
|
+
info: { accentColor: "text-[var(--color-info)]", Icon: IconlyInfoCircle },
|
|
1053
|
+
success: { accentColor: "text-[var(--color-success)]", Icon: IconlySuccess },
|
|
1054
|
+
warning: { accentColor: "text-[var(--color-warning)]", Icon: IconlyWarning },
|
|
1055
|
+
error: { accentColor: "text-[var(--color-error)]", Icon: IconlyError }
|
|
1056
|
+
};
|
|
1057
|
+
function Toast({
|
|
1058
|
+
variant = "info",
|
|
1059
|
+
title,
|
|
1060
|
+
message,
|
|
1061
|
+
duration = 4e3,
|
|
1062
|
+
visible,
|
|
1063
|
+
onClose,
|
|
1064
|
+
className = ""
|
|
1065
|
+
}) {
|
|
1066
|
+
react.useEffect(() => {
|
|
1067
|
+
if (!visible) return;
|
|
1068
|
+
const timer = setTimeout(onClose, duration);
|
|
1069
|
+
return () => clearTimeout(timer);
|
|
1070
|
+
}, [visible, duration, onClose]);
|
|
1071
|
+
if (!visible) return null;
|
|
1072
|
+
const config = variantConfig2[variant];
|
|
1073
|
+
const { Icon } = config;
|
|
1074
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1075
|
+
"div",
|
|
1076
|
+
{
|
|
1077
|
+
role: "alert",
|
|
1078
|
+
"aria-live": "assertive",
|
|
1079
|
+
className: `fixed bottom-6 right-6 z-50 flex gap-3 p-4 rounded-[var(--radius-lg)] border border-[var(--border-color)] bg-[var(--bg-secondary)] shadow-lg max-w-sm ${className}`,
|
|
1080
|
+
children: [
|
|
1081
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `shrink-0 mt-0.5 ${config.accentColor}`, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 20 }) }),
|
|
1082
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1083
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-[13px] font-medium tracking-[-0.25px] mb-0.5 ${config.accentColor}`, children: title }),
|
|
1084
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)]", children: message })
|
|
1085
|
+
] }),
|
|
1086
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1087
|
+
"button",
|
|
1088
|
+
{
|
|
1089
|
+
onClick: onClose,
|
|
1090
|
+
className: "shrink-0 text-[var(--fg-muted)] hover:text-[var(--fg)] transition-all duration-[var(--transition-fast)] cursor-pointer",
|
|
1091
|
+
"aria-label": "Dismiss",
|
|
1092
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 16 })
|
|
1093
|
+
}
|
|
1094
|
+
)
|
|
1095
|
+
]
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
function getPageRange(current, total, siblings) {
|
|
1100
|
+
const range = /* @__PURE__ */ new Set();
|
|
1101
|
+
range.add(1);
|
|
1102
|
+
range.add(total);
|
|
1103
|
+
for (let i = Math.max(2, current - siblings); i <= Math.min(total - 1, current + siblings); i++) {
|
|
1104
|
+
range.add(i);
|
|
1105
|
+
}
|
|
1106
|
+
const sorted = Array.from(range).sort((a, b) => a - b);
|
|
1107
|
+
const result = [];
|
|
1108
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
1109
|
+
if (i > 0 && sorted[i] - sorted[i - 1] > 1) {
|
|
1110
|
+
result.push("\u2026");
|
|
1111
|
+
}
|
|
1112
|
+
result.push(sorted[i]);
|
|
1113
|
+
}
|
|
1114
|
+
return result;
|
|
1115
|
+
}
|
|
1116
|
+
function Pagination({
|
|
1117
|
+
currentPage,
|
|
1118
|
+
totalPages,
|
|
1119
|
+
onPageChange,
|
|
1120
|
+
siblingCount = 1,
|
|
1121
|
+
className = ""
|
|
1122
|
+
}) {
|
|
1123
|
+
if (totalPages <= 1) return null;
|
|
1124
|
+
const pages = getPageRange(currentPage, totalPages, siblingCount);
|
|
1125
|
+
const isFirst = currentPage === 1;
|
|
1126
|
+
const isLast = currentPage === totalPages;
|
|
1127
|
+
const buttonBase = "min-w-[36px] h-[36px] flex items-center justify-center text-[13px] tracking-[-0.25px] transition-all duration-[var(--transition-fast)] cursor-pointer";
|
|
1128
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("nav", { "aria-label": "Pagination", className: `flex items-center gap-1 ${className}`, children: [
|
|
1129
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1130
|
+
"button",
|
|
1131
|
+
{
|
|
1132
|
+
onClick: () => onPageChange(currentPage - 1),
|
|
1133
|
+
disabled: isFirst,
|
|
1134
|
+
"aria-label": "Previous page",
|
|
1135
|
+
className: `${buttonBase} text-[var(--fg-secondary)] hover:text-[var(--fg)] ${isFirst ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1136
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyChevronLeft, { size: 18 })
|
|
1137
|
+
}
|
|
1138
|
+
),
|
|
1139
|
+
pages.map(
|
|
1140
|
+
(page, i) => page === "\u2026" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1141
|
+
"span",
|
|
1142
|
+
{
|
|
1143
|
+
className: "min-w-[36px] h-[36px] flex items-center justify-center text-[13px] text-[var(--fg-muted)]",
|
|
1144
|
+
children: "\u2026"
|
|
1145
|
+
},
|
|
1146
|
+
`ellipsis-${i}`
|
|
1147
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
|
+
"button",
|
|
1149
|
+
{
|
|
1150
|
+
onClick: () => onPageChange(page),
|
|
1151
|
+
"aria-current": page === currentPage ? "page" : void 0,
|
|
1152
|
+
className: `${buttonBase} rounded-full ${page === currentPage ? "bg-[var(--fg)] text-[var(--bg)] font-medium" : "text-[var(--fg-secondary)] hover:text-[var(--fg)] hover:bg-[var(--bg-secondary)]"}`,
|
|
1153
|
+
children: page
|
|
1154
|
+
},
|
|
1155
|
+
page
|
|
1156
|
+
)
|
|
1157
|
+
),
|
|
1158
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1159
|
+
"button",
|
|
1160
|
+
{
|
|
1161
|
+
onClick: () => onPageChange(currentPage + 1),
|
|
1162
|
+
disabled: isLast,
|
|
1163
|
+
"aria-label": "Next page",
|
|
1164
|
+
className: `${buttonBase} text-[var(--fg-secondary)] hover:text-[var(--fg)] ${isLast ? "opacity-50 cursor-not-allowed" : ""}`,
|
|
1165
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyChevronRight, { size: 18 })
|
|
1166
|
+
}
|
|
1167
|
+
)
|
|
1168
|
+
] });
|
|
1169
|
+
}
|
|
1170
|
+
function CodeInput({
|
|
1171
|
+
length,
|
|
1172
|
+
value,
|
|
1173
|
+
onChange,
|
|
1174
|
+
error,
|
|
1175
|
+
label,
|
|
1176
|
+
className = ""
|
|
1177
|
+
}) {
|
|
1178
|
+
const inputsRef = react.useRef([]);
|
|
1179
|
+
const focusInput = react.useCallback((index) => {
|
|
1180
|
+
var _a;
|
|
1181
|
+
(_a = inputsRef.current[index]) == null ? void 0 : _a.focus();
|
|
1182
|
+
}, []);
|
|
1183
|
+
const updateValue = react.useCallback(
|
|
1184
|
+
(index, char) => {
|
|
1185
|
+
const chars = value.padEnd(length, " ").split("");
|
|
1186
|
+
chars[index] = char;
|
|
1187
|
+
onChange(chars.join("").trimEnd());
|
|
1188
|
+
},
|
|
1189
|
+
[value, length, onChange]
|
|
1190
|
+
);
|
|
1191
|
+
const handleChange = react.useCallback(
|
|
1192
|
+
(index) => (e) => {
|
|
1193
|
+
const char = e.target.value.slice(-1);
|
|
1194
|
+
if (!/^\d$/.test(char) && char !== "") return;
|
|
1195
|
+
updateValue(index, char);
|
|
1196
|
+
if (char && index < length - 1) {
|
|
1197
|
+
focusInput(index + 1);
|
|
1198
|
+
}
|
|
1199
|
+
},
|
|
1200
|
+
[updateValue, length, focusInput]
|
|
1201
|
+
);
|
|
1202
|
+
const handleKeyDown = react.useCallback(
|
|
1203
|
+
(index) => (e) => {
|
|
1204
|
+
if (e.key === "Backspace" && !e.currentTarget.value && index > 0) {
|
|
1205
|
+
focusInput(index - 1);
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
[focusInput]
|
|
1209
|
+
);
|
|
1210
|
+
const handlePaste = react.useCallback(
|
|
1211
|
+
(e) => {
|
|
1212
|
+
e.preventDefault();
|
|
1213
|
+
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
1214
|
+
if (!pasted) return;
|
|
1215
|
+
onChange(pasted);
|
|
1216
|
+
const focusIndex = Math.min(pasted.length, length - 1);
|
|
1217
|
+
setTimeout(() => focusInput(focusIndex), 0);
|
|
1218
|
+
},
|
|
1219
|
+
[length, onChange, focusInput]
|
|
1220
|
+
);
|
|
1221
|
+
const inputId = label == null ? void 0 : label.toLowerCase().replace(/\s+/g, "-");
|
|
1222
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1.5 ${className}`, children: [
|
|
1223
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1224
|
+
"label",
|
|
1225
|
+
{
|
|
1226
|
+
htmlFor: inputId,
|
|
1227
|
+
className: "text-[13px] font-medium text-[var(--fg)] tracking-[-0.25px]",
|
|
1228
|
+
children: label
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3", role: "group", "aria-label": label || "Code input", children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1232
|
+
"input",
|
|
1233
|
+
{
|
|
1234
|
+
id: i === 0 ? inputId : void 0,
|
|
1235
|
+
ref: (el) => {
|
|
1236
|
+
inputsRef.current[i] = el;
|
|
1237
|
+
},
|
|
1238
|
+
type: "text",
|
|
1239
|
+
inputMode: "numeric",
|
|
1240
|
+
maxLength: 1,
|
|
1241
|
+
value: value[i] || "",
|
|
1242
|
+
onChange: handleChange(i),
|
|
1243
|
+
onKeyDown: handleKeyDown(i),
|
|
1244
|
+
onPaste: handlePaste,
|
|
1245
|
+
autoComplete: "one-time-code",
|
|
1246
|
+
className: `w-12 h-12 text-center text-lg border bg-[var(--bg)] text-[var(--fg)] rounded-[var(--radius-lg)] transition-all duration-[var(--transition-fast)] focus:outline-none focus:border-[var(--fg)] ${error ? "border-[var(--color-error)] focus:border-[var(--color-error)]" : "border-[var(--fg-muted)]"}`,
|
|
1247
|
+
"aria-label": `Digit ${i + 1}`
|
|
1248
|
+
},
|
|
1249
|
+
i
|
|
1250
|
+
)) }),
|
|
1251
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] tracking-[-0.25px] text-[var(--color-error)]", children: error })
|
|
1252
|
+
] });
|
|
1253
|
+
}
|
|
1254
|
+
function Modal({
|
|
1255
|
+
open,
|
|
1256
|
+
onClose,
|
|
1257
|
+
title,
|
|
1258
|
+
children,
|
|
1259
|
+
footer,
|
|
1260
|
+
className = ""
|
|
1261
|
+
}) {
|
|
1262
|
+
const dialogRef = react.useRef(null);
|
|
1263
|
+
react.useEffect(() => {
|
|
1264
|
+
const dialog = dialogRef.current;
|
|
1265
|
+
if (!dialog) return;
|
|
1266
|
+
if (open && !dialog.open) {
|
|
1267
|
+
dialog.showModal();
|
|
1268
|
+
} else if (!open && dialog.open) {
|
|
1269
|
+
dialog.close();
|
|
1270
|
+
}
|
|
1271
|
+
}, [open]);
|
|
1272
|
+
const handleBackdropClick = (e) => {
|
|
1273
|
+
if (e.target === dialogRef.current) {
|
|
1274
|
+
onClose();
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1278
|
+
"dialog",
|
|
1279
|
+
{
|
|
1280
|
+
ref: dialogRef,
|
|
1281
|
+
onClose,
|
|
1282
|
+
onClick: handleBackdropClick,
|
|
1283
|
+
className: `max-w-lg w-full p-0 rounded-[var(--radius-lg)] shadow-xl bg-[var(--bg)] border border-[var(--border-color)] backdrop:bg-black/50 ${className}`,
|
|
1284
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6", children: [
|
|
1285
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between mb-4", children: [
|
|
1286
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold text-[var(--fg)] tracking-[-0.25px]", children: title }),
|
|
1287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
|
+
"button",
|
|
1289
|
+
{
|
|
1290
|
+
type: "button",
|
|
1291
|
+
onClick: onClose,
|
|
1292
|
+
className: "shrink-0 ml-auto text-[var(--fg-muted)] hover:text-[var(--fg)] transition-all duration-[var(--transition-fast)] cursor-pointer",
|
|
1293
|
+
"aria-label": "Close",
|
|
1294
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 20 })
|
|
1295
|
+
}
|
|
1296
|
+
)
|
|
1297
|
+
] }),
|
|
1298
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[14px] text-[var(--fg-secondary)] leading-relaxed", children }),
|
|
1299
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 justify-end mt-6", children: footer })
|
|
1300
|
+
] })
|
|
1301
|
+
}
|
|
1302
|
+
);
|
|
1303
|
+
}
|
|
1304
|
+
function DropdownMenu({
|
|
1305
|
+
trigger,
|
|
1306
|
+
items,
|
|
1307
|
+
align = "left",
|
|
1308
|
+
className = ""
|
|
1309
|
+
}) {
|
|
1310
|
+
const [isOpen, setIsOpen] = react.useState(false);
|
|
1311
|
+
const [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
1312
|
+
const containerRef = react.useRef(null);
|
|
1313
|
+
const triggerRef = react.useRef(null);
|
|
1314
|
+
const itemRefs = react.useRef([]);
|
|
1315
|
+
const openMenu = () => {
|
|
1316
|
+
setIsOpen(true);
|
|
1317
|
+
setFocusedIndex(0);
|
|
1318
|
+
};
|
|
1319
|
+
const closeMenu = () => {
|
|
1320
|
+
setIsOpen(false);
|
|
1321
|
+
setFocusedIndex(-1);
|
|
1322
|
+
};
|
|
1323
|
+
react.useEffect(() => {
|
|
1324
|
+
if (!isOpen) return;
|
|
1325
|
+
const handleMouseDown = (e) => {
|
|
1326
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
1327
|
+
closeMenu();
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
document.addEventListener("mousedown", handleMouseDown);
|
|
1331
|
+
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
1332
|
+
}, [isOpen]);
|
|
1333
|
+
react.useEffect(() => {
|
|
1334
|
+
if (isOpen && focusedIndex >= 0) {
|
|
1335
|
+
requestAnimationFrame(() => {
|
|
1336
|
+
var _a;
|
|
1337
|
+
(_a = itemRefs.current[focusedIndex]) == null ? void 0 : _a.focus();
|
|
1338
|
+
});
|
|
1339
|
+
}
|
|
1340
|
+
}, [isOpen, focusedIndex]);
|
|
1341
|
+
const handleMenuKeyDown = (e) => {
|
|
1342
|
+
var _a, _b, _c;
|
|
1343
|
+
switch (e.key) {
|
|
1344
|
+
case "Escape":
|
|
1345
|
+
e.preventDefault();
|
|
1346
|
+
closeMenu();
|
|
1347
|
+
(_a = triggerRef.current) == null ? void 0 : _a.focus();
|
|
1348
|
+
break;
|
|
1349
|
+
case "ArrowDown": {
|
|
1350
|
+
e.preventDefault();
|
|
1351
|
+
const next = (focusedIndex + 1) % items.length;
|
|
1352
|
+
setFocusedIndex(next);
|
|
1353
|
+
(_b = itemRefs.current[next]) == null ? void 0 : _b.focus();
|
|
1354
|
+
break;
|
|
1355
|
+
}
|
|
1356
|
+
case "ArrowUp": {
|
|
1357
|
+
e.preventDefault();
|
|
1358
|
+
const prev = (focusedIndex - 1 + items.length) % items.length;
|
|
1359
|
+
setFocusedIndex(prev);
|
|
1360
|
+
(_c = itemRefs.current[prev]) == null ? void 0 : _c.focus();
|
|
1361
|
+
break;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
const handleTriggerKeyDown = (e) => {
|
|
1366
|
+
if (e.key === "ArrowDown" && !isOpen) {
|
|
1367
|
+
e.preventDefault();
|
|
1368
|
+
openMenu();
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `relative inline-block ${className}`, children: [
|
|
1372
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1373
|
+
"div",
|
|
1374
|
+
{
|
|
1375
|
+
ref: triggerRef,
|
|
1376
|
+
role: "button",
|
|
1377
|
+
tabIndex: 0,
|
|
1378
|
+
onClick: () => isOpen ? closeMenu() : openMenu(),
|
|
1379
|
+
onKeyDown: handleTriggerKeyDown,
|
|
1380
|
+
className: "cursor-pointer inline-flex",
|
|
1381
|
+
"aria-haspopup": "true",
|
|
1382
|
+
"aria-expanded": isOpen,
|
|
1383
|
+
children: trigger
|
|
1384
|
+
}
|
|
1385
|
+
),
|
|
1386
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1387
|
+
"div",
|
|
1388
|
+
{
|
|
1389
|
+
role: "menu",
|
|
1390
|
+
onKeyDown: handleMenuKeyDown,
|
|
1391
|
+
className: `absolute top-full mt-1 z-50 rounded-[var(--radius-lg)] shadow-lg border border-[var(--border-color)] bg-[var(--bg)] min-w-[180px] py-1 ${align === "right" ? "right-0" : "left-0"}`,
|
|
1392
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1393
|
+
item.divider && /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "my-1 border-[var(--border-color)]" }),
|
|
1394
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1395
|
+
"button",
|
|
1396
|
+
{
|
|
1397
|
+
ref: (el) => {
|
|
1398
|
+
itemRefs.current[i] = el;
|
|
1399
|
+
},
|
|
1400
|
+
type: "button",
|
|
1401
|
+
role: "menuitem",
|
|
1402
|
+
tabIndex: focusedIndex === i ? 0 : -1,
|
|
1403
|
+
onClick: () => {
|
|
1404
|
+
item.onClick();
|
|
1405
|
+
closeMenu();
|
|
1406
|
+
},
|
|
1407
|
+
className: "flex items-center gap-2 w-full px-3 py-2 text-[13px] tracking-[-0.25px] text-[var(--fg-secondary)] hover:bg-[var(--bg-secondary)] hover:text-[var(--fg)] transition-all duration-[var(--transition-fast)] cursor-pointer text-left",
|
|
1408
|
+
children: [
|
|
1409
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[var(--fg-muted)]", children: item.icon }),
|
|
1410
|
+
item.label
|
|
1411
|
+
]
|
|
1412
|
+
}
|
|
1413
|
+
)
|
|
1414
|
+
] }, i))
|
|
1415
|
+
}
|
|
1416
|
+
)
|
|
1417
|
+
] });
|
|
1418
|
+
}
|
|
1419
|
+
function Header({ logo, navItems = [], className = "" }) {
|
|
1420
|
+
const [mobileOpen, setMobileOpen] = react.useState(false);
|
|
1421
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: `border-b border-[var(--border-color)] bg-[var(--bg)]/80 backdrop-blur-md sticky top-0 z-50 ${className}`, children: [
|
|
1422
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between h-16", children: [
|
|
1423
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-8", children: [
|
|
1424
|
+
logo || /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-lg font-bold text-[var(--fg)]", children: [
|
|
1425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--brand-primary)]", children: "K" }),
|
|
1426
|
+
"apustin"
|
|
1427
|
+
] }),
|
|
1428
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "hidden md:flex items-center gap-1", children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1429
|
+
"a",
|
|
1430
|
+
{
|
|
1431
|
+
href: item.href,
|
|
1432
|
+
className: "px-3 py-2 text-sm text-[var(--fg-secondary)] hover:text-[var(--fg)] rounded-[var(--radius-md)] hover:bg-[var(--bg-tertiary)] transition-colors",
|
|
1433
|
+
children: item.label
|
|
1434
|
+
},
|
|
1435
|
+
item.label
|
|
1436
|
+
)) })
|
|
1437
|
+
] }),
|
|
1438
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:flex items-center gap-3", children: [
|
|
1439
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", children: "Sign in" }),
|
|
1440
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "Get started" })
|
|
1441
|
+
] }),
|
|
1442
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
|
+
"button",
|
|
1444
|
+
{
|
|
1445
|
+
className: "md:hidden p-2 text-[var(--fg-secondary)] hover:text-[var(--fg)] cursor-pointer",
|
|
1446
|
+
onClick: () => setMobileOpen(!mobileOpen),
|
|
1447
|
+
"aria-label": "Toggle menu",
|
|
1448
|
+
children: mobileOpen ? /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 24 }) : /* @__PURE__ */ jsxRuntime.jsx(IconlyMenu, { size: 24 })
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1451
|
+
] }) }),
|
|
1452
|
+
mobileOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:hidden border-t border-[var(--border-color)] bg-[var(--bg)] px-4 py-4", children: [
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1", children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1454
|
+
"a",
|
|
1455
|
+
{
|
|
1456
|
+
href: item.href,
|
|
1457
|
+
className: "px-3 py-2 text-sm text-[var(--fg-secondary)] hover:text-[var(--fg)] rounded-[var(--radius-md)] hover:bg-[var(--bg-tertiary)] transition-colors",
|
|
1458
|
+
children: item.label
|
|
1459
|
+
},
|
|
1460
|
+
item.label
|
|
1461
|
+
)) }),
|
|
1462
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-4 pt-4 border-t border-[var(--border-color)]", children: [
|
|
1463
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", children: "Sign in" }),
|
|
1464
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", children: "Get started" })
|
|
1465
|
+
] })
|
|
1466
|
+
] })
|
|
1467
|
+
] });
|
|
1468
|
+
}
|
|
1469
|
+
var defaultColumns = [
|
|
1470
|
+
{
|
|
1471
|
+
title: "Product",
|
|
1472
|
+
links: [
|
|
1473
|
+
{ label: "Components", href: "#" },
|
|
1474
|
+
{ label: "Templates", href: "#" },
|
|
1475
|
+
{ label: "Pricing", href: "#" },
|
|
1476
|
+
{ label: "Changelog", href: "#" }
|
|
1477
|
+
]
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
title: "Resources",
|
|
1481
|
+
links: [
|
|
1482
|
+
{ label: "Documentation", href: "#" },
|
|
1483
|
+
{ label: "Guides", href: "#" },
|
|
1484
|
+
{ label: "API Reference", href: "#" },
|
|
1485
|
+
{ label: "Blog", href: "#" }
|
|
1486
|
+
]
|
|
1487
|
+
},
|
|
1488
|
+
{
|
|
1489
|
+
title: "Company",
|
|
1490
|
+
links: [
|
|
1491
|
+
{ label: "About", href: "#" },
|
|
1492
|
+
{ label: "Careers", href: "#" },
|
|
1493
|
+
{ label: "Contact", href: "#" },
|
|
1494
|
+
{ label: "Legal", href: "#" }
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
];
|
|
1498
|
+
function Footer({ columns = defaultColumns, className = "" }) {
|
|
1499
|
+
return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: `border-t border-[var(--border-color)] bg-[var(--bg)] ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12", children: [
|
|
1500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8", children: [
|
|
1501
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1502
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-lg font-bold text-[var(--fg)]", children: [
|
|
1503
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--brand-primary)]", children: "K" }),
|
|
1504
|
+
"apustin"
|
|
1505
|
+
] }),
|
|
1506
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-[13px] text-[var(--fg-muted)] leading-relaxed tracking-[-0.25px]", children: "A modern design system for building beautiful interfaces." })
|
|
1507
|
+
] }),
|
|
1508
|
+
columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1509
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-[13px] font-semibold text-[var(--fg-secondary)] mb-3 tracking-[-0.25px]", children: col.title }),
|
|
1510
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: col.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1511
|
+
"a",
|
|
1512
|
+
{
|
|
1513
|
+
href: link.href,
|
|
1514
|
+
className: "text-[13px] text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors duration-[var(--transition-fast)] tracking-[-0.25px]",
|
|
1515
|
+
children: link.label
|
|
1516
|
+
}
|
|
1517
|
+
) }, link.label)) })
|
|
1518
|
+
] }, col.title))
|
|
1519
|
+
] }),
|
|
1520
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-12 pt-8 border-t border-[var(--border-color)] flex flex-col sm:flex-row justify-between items-center gap-4", children: [
|
|
1521
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[13px] text-[var(--fg-muted)] tracking-[-0.25px]", children: [
|
|
1522
|
+
"\xA9 ",
|
|
1523
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
1524
|
+
" Kapustin Team. All rights reserved."
|
|
1525
|
+
] }),
|
|
1526
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-4", children: ["Twitter", "GitHub", "Discord"].map((social) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1527
|
+
"a",
|
|
1528
|
+
{
|
|
1529
|
+
href: "#",
|
|
1530
|
+
className: "text-[13px] text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors duration-[var(--transition-fast)] tracking-[-0.25px]",
|
|
1531
|
+
children: social
|
|
1532
|
+
},
|
|
1533
|
+
social
|
|
1534
|
+
)) })
|
|
1535
|
+
] })
|
|
1536
|
+
] }) });
|
|
1537
|
+
}
|
|
1538
|
+
function PricingCard({
|
|
1539
|
+
plan,
|
|
1540
|
+
price,
|
|
1541
|
+
period = "/mo",
|
|
1542
|
+
description,
|
|
1543
|
+
features,
|
|
1544
|
+
highlighted = false,
|
|
1545
|
+
badge,
|
|
1546
|
+
className = ""
|
|
1547
|
+
}) {
|
|
1548
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1549
|
+
"div",
|
|
1550
|
+
{
|
|
1551
|
+
className: `relative rounded-[var(--radius-xl)] border p-6 flex flex-col ${highlighted ? "border-[var(--brand-primary)] shadow-[0_0_0_1px_var(--brand-primary),var(--shadow-lg)] bg-[var(--bg)]" : "border-[var(--border-color)] bg-[var(--bg)] shadow-[var(--shadow-xs)]"} ${className}`,
|
|
1552
|
+
children: [
|
|
1553
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -top-3 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { color: "info", children: badge }) }),
|
|
1554
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
|
|
1555
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-[var(--fg)]", children: plan }),
|
|
1556
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-muted)] mt-1", children: description })
|
|
1557
|
+
] }),
|
|
1558
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6", children: [
|
|
1559
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl font-bold text-[var(--fg)]", children: price }),
|
|
1560
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-muted)]", children: period })
|
|
1561
|
+
] }),
|
|
1562
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3 mb-8 flex-1", children: features.map((feature, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2.5 text-sm text-[var(--fg-secondary)]", children: [
|
|
1563
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 mt-0.5 text-[var(--color-success)]", children: /* @__PURE__ */ jsxRuntime.jsx(IconlyCheck, { size: 16 }) }),
|
|
1564
|
+
feature
|
|
1565
|
+
] }, i)) }),
|
|
1566
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: highlighted ? "primary" : "outline", className: "w-full", children: "Get started" })
|
|
1567
|
+
]
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
function TestimonialCard({ quote, name, role, avatarSrc, className = "" }) {
|
|
1572
|
+
const initials = name.split(" ").map((n) => n[0]).join("").toUpperCase();
|
|
1573
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] p-6 shadow-[var(--shadow-xs)] ${className}`, children: [
|
|
1574
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[var(--brand-primary)] opacity-30 mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(IconlyQuote, { size: 32 }) }),
|
|
1575
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed mb-6", children: [
|
|
1576
|
+
"\u201C",
|
|
1577
|
+
quote,
|
|
1578
|
+
"\u201D"
|
|
1579
|
+
] }),
|
|
1580
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1581
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: avatarSrc, initials, size: "sm" }),
|
|
1582
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1583
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[var(--fg)]", children: name }),
|
|
1584
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[var(--fg-muted)]", children: role })
|
|
1585
|
+
] })
|
|
1586
|
+
] })
|
|
1587
|
+
] });
|
|
1588
|
+
}
|
|
1589
|
+
function FeatureGrid({ features, columns = 3, className = "" }) {
|
|
1590
|
+
const gridCols = {
|
|
1591
|
+
2: "md:grid-cols-2",
|
|
1592
|
+
3: "md:grid-cols-3",
|
|
1593
|
+
4: "md:grid-cols-2 lg:grid-cols-4"
|
|
1594
|
+
};
|
|
1595
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `grid grid-cols-1 ${gridCols[columns]} gap-6 ${className}`, children: features.map((feature, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1596
|
+
"div",
|
|
1597
|
+
{
|
|
1598
|
+
className: "rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] p-6 transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5",
|
|
1599
|
+
children: [
|
|
1600
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-[var(--radius-lg)] bg-[var(--brand-primary)]/10 flex items-center justify-center text-[var(--brand-primary)] mb-4", children: feature.icon }),
|
|
1601
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-[var(--fg)] mb-1.5", children: feature.title }),
|
|
1602
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-muted)] leading-relaxed", children: feature.description })
|
|
1603
|
+
]
|
|
1604
|
+
},
|
|
1605
|
+
i
|
|
1606
|
+
)) });
|
|
1607
|
+
}
|
|
1608
|
+
var defaultMenuItems = [
|
|
1609
|
+
"\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
|
|
1610
|
+
"\u041C\u043E\u0438 \u043A\u0443\u0440\u0441\u044B",
|
|
1611
|
+
"\u0414\u043E\u0440\u043E\u0436\u043D\u0430\u044F \u043A\u0430\u0440\u0442\u0430",
|
|
1612
|
+
"\u0414\u043E\u0441\u0442\u0438\u0436\u0435\u043D\u0438\u044F",
|
|
1613
|
+
"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u043B\u0438\u0434\u0435\u0440\u043E\u0432",
|
|
1614
|
+
"\u041F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430",
|
|
1615
|
+
"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438"
|
|
1616
|
+
];
|
|
1617
|
+
var courseMenuItems = [
|
|
1618
|
+
"\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
|
|
1619
|
+
"\u041E\u0431\u0437\u043E\u0440",
|
|
1620
|
+
"\u041E\u0442\u0437\u044B\u0432\u044B",
|
|
1621
|
+
"\u0424\u0443\u043D\u043A\u0446\u0438\u043E\u043D\u0430\u043B",
|
|
1622
|
+
"\u0421\u0442\u043E\u0438\u043C\u043E\u0441\u0442\u044C",
|
|
1623
|
+
"\u0421\u043E\u0446. \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430",
|
|
1624
|
+
"\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B"
|
|
1625
|
+
];
|
|
1626
|
+
function Sidebar({ type = "menu", menuItems, footer, className = "" }) {
|
|
1627
|
+
const items = menuItems || (type === "courseSubmenu" ? courseMenuItems : defaultMenuItems);
|
|
1628
|
+
const [active, setActive] = react.useState(0);
|
|
1629
|
+
const width = type === "courseSubmenu" ? "w-[340px]" : "w-[240px]";
|
|
1630
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1631
|
+
"aside",
|
|
1632
|
+
{
|
|
1633
|
+
className: `bg-[var(--bg)] border-r border-[var(--border-color)] flex flex-col justify-between p-8 shrink-0 h-full ${width} ${className}`,
|
|
1634
|
+
children: [
|
|
1635
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex flex-col gap-1 items-start", children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1636
|
+
MenuItem,
|
|
1637
|
+
{
|
|
1638
|
+
text: item,
|
|
1639
|
+
active: i === active,
|
|
1640
|
+
onClick: () => setActive(i)
|
|
1641
|
+
},
|
|
1642
|
+
`${item}-${i}`
|
|
1643
|
+
)) }),
|
|
1644
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 w-full", children: [
|
|
1645
|
+
type === "menu" && footer,
|
|
1646
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[10px] text-[var(--fg-muted)] tracking-[-0.2px]", children: [
|
|
1647
|
+
"kapustin.cc, 2026 ",
|
|
1648
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
1649
|
+
"\u0418\u041F \u041A\u0430\u043F\u0443\u0441\u0442\u0438\u043D \u0414.\u0412., \u0418\u041D\u041D 7721250201"
|
|
1650
|
+
] })
|
|
1651
|
+
] })
|
|
1652
|
+
]
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1655
|
+
}
|
|
1656
|
+
var HOLE_R = 4;
|
|
1657
|
+
var HOLE_SP = 16;
|
|
1658
|
+
function buildStampMask(w, h) {
|
|
1659
|
+
const r = HOLE_R;
|
|
1660
|
+
const sp = HOLE_SP;
|
|
1661
|
+
let circles = "";
|
|
1662
|
+
for (let x = sp / 2; x < w; x += sp) circles += `<circle cx="${x}" cy="0" r="${r}"/>`;
|
|
1663
|
+
for (let x = sp / 2; x < w; x += sp) circles += `<circle cx="${x}" cy="${h}" r="${r}"/>`;
|
|
1664
|
+
for (let y = sp / 2; y < h; y += sp) circles += `<circle cx="0" cy="${y}" r="${r}"/>`;
|
|
1665
|
+
for (let y = sp / 2; y < h; y += sp) circles += `<circle cx="${w}" cy="${y}" r="${r}"/>`;
|
|
1666
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}">
|
|
1667
|
+
<defs><mask id="m"><rect width="${w}" height="${h}" fill="white"/>${circles}</mask></defs>
|
|
1668
|
+
<rect width="${w}" height="${h}" fill="white" mask="url(#m)"/>
|
|
1669
|
+
</svg>`;
|
|
1670
|
+
}
|
|
1671
|
+
function CardContent({
|
|
1672
|
+
title,
|
|
1673
|
+
description,
|
|
1674
|
+
buttonText,
|
|
1675
|
+
buttonVariant = "primary",
|
|
1676
|
+
image,
|
|
1677
|
+
icons,
|
|
1678
|
+
onButtonClick,
|
|
1679
|
+
isStamp
|
|
1680
|
+
}) {
|
|
1681
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1682
|
+
image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `relative w-full aspect-[16/9] overflow-hidden ${isStamp ? "" : "rounded-t-[16px]"}`, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: title, className: "absolute inset-0 w-full h-full object-cover" }) }),
|
|
1683
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1684
|
+
"div",
|
|
1685
|
+
{
|
|
1686
|
+
className: `bg-[var(--bg)] overflow-hidden flex flex-col justify-between px-[25px] pt-[25px] pb-[21px] flex-1 min-h-[220px] relative ${isStamp ? "" : `border border-[var(--bg-tertiary)] shadow-[var(--shadow-md)] ${image ? "rounded-b-[16px]" : "rounded-[16px]"}`}`,
|
|
1687
|
+
children: [
|
|
1688
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [
|
|
1689
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-[var(--fg-secondary)] tracking-[-0.25px]", children: title }),
|
|
1690
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-[var(--fg-muted)] tracking-[-0.25px] leading-normal", children: description })
|
|
1691
|
+
] }),
|
|
1692
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mt-5", children: [
|
|
1693
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: icons }),
|
|
1694
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: buttonVariant === "outline" ? "outline" : "primary", size: "sm", onClick: onButtonClick, children: buttonText })
|
|
1695
|
+
] })
|
|
1696
|
+
]
|
|
1697
|
+
}
|
|
1698
|
+
)
|
|
1699
|
+
] });
|
|
1700
|
+
}
|
|
1701
|
+
function AppCard(_a) {
|
|
1702
|
+
var _b = _a, {
|
|
1703
|
+
variant = "default",
|
|
1704
|
+
className = ""
|
|
1705
|
+
} = _b, contentProps = __objRest(_b, [
|
|
1706
|
+
"variant",
|
|
1707
|
+
"className"
|
|
1708
|
+
]);
|
|
1709
|
+
if (variant === "default") {
|
|
1710
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex flex-col w-[320px] ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, __spreadProps(__spreadValues({}, contentProps), { isStamp: false })) });
|
|
1711
|
+
}
|
|
1712
|
+
const padded = variant === "stamp-padded";
|
|
1713
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StampWrapper, { className, padded, children: /* @__PURE__ */ jsxRuntime.jsx(CardContent, __spreadProps(__spreadValues({}, contentProps), { isStamp: true })) });
|
|
1714
|
+
}
|
|
1715
|
+
var STAMP_PADDING = 12;
|
|
1716
|
+
function StampWrapper({ children, className, padded }) {
|
|
1717
|
+
const ref = react.useRef(null);
|
|
1718
|
+
const [maskUrl, setMaskUrl] = react.useState(null);
|
|
1719
|
+
const build = react.useCallback(() => {
|
|
1720
|
+
const el = ref.current;
|
|
1721
|
+
if (!el) return;
|
|
1722
|
+
const w = el.offsetWidth;
|
|
1723
|
+
const h = el.offsetHeight;
|
|
1724
|
+
if (w === 0 || h === 0) return;
|
|
1725
|
+
setMaskUrl(`data:image/svg+xml;base64,${btoa(buildStampMask(w, h))}`);
|
|
1726
|
+
}, []);
|
|
1727
|
+
react.useEffect(() => {
|
|
1728
|
+
const frame = requestAnimationFrame(() => build());
|
|
1729
|
+
const ro = new ResizeObserver(() => build());
|
|
1730
|
+
if (ref.current) ro.observe(ref.current);
|
|
1731
|
+
return () => {
|
|
1732
|
+
cancelAnimationFrame(frame);
|
|
1733
|
+
ro.disconnect();
|
|
1734
|
+
};
|
|
1735
|
+
}, [build]);
|
|
1736
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: `flex flex-col w-[320px] relative ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { filter: "drop-shadow(0 1px 3px rgba(0,0,0,0.15)) drop-shadow(0 4px 12px rgba(0,0,0,0.12))" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1737
|
+
"div",
|
|
1738
|
+
{
|
|
1739
|
+
style: {
|
|
1740
|
+
WebkitMaskImage: maskUrl ? `url("${maskUrl}")` : void 0,
|
|
1741
|
+
maskImage: maskUrl ? `url("${maskUrl}")` : void 0,
|
|
1742
|
+
WebkitMaskSize: "100% 100%",
|
|
1743
|
+
maskSize: "100% 100%"
|
|
1744
|
+
},
|
|
1745
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-[var(--bg)]", style: padded ? { padding: STAMP_PADDING } : void 0, children })
|
|
1746
|
+
}
|
|
1747
|
+
) }) });
|
|
1748
|
+
}
|
|
1749
|
+
function AppTopLine({
|
|
1750
|
+
promoText = "\u0412\u0430\u043C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0441\u043A\u0438\u0434\u043A\u0430 10% \u043D\u0430 \u0432\u0441\u0435 \u043F\u043B\u0430\u0442\u043D\u044B\u0435 \u043A\u0443\u0440\u0441\u044B",
|
|
1751
|
+
promoButtonText = "\u0421\u043C\u043E\u0442\u0440\u0435\u0442\u044C",
|
|
1752
|
+
stats = [
|
|
1753
|
+
{ value: "232", suffix: "XP" },
|
|
1754
|
+
{ value: "1081", suffix: "\u20BD" },
|
|
1755
|
+
{ value: "72", suffix: "D" },
|
|
1756
|
+
{ value: "10 081", suffix: "Cr" }
|
|
1757
|
+
],
|
|
1758
|
+
avatarSrc,
|
|
1759
|
+
className = ""
|
|
1760
|
+
}) {
|
|
1761
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `bg-[var(--bg)] flex items-center justify-between w-full ${className}`, children: [
|
|
1762
|
+
/* @__PURE__ */ jsxRuntime.jsx(TopPromo, { text: promoText, buttonText: promoButtonText }),
|
|
1763
|
+
/* @__PURE__ */ jsxRuntime.jsx(ProfileNav, { stats, avatarSrc })
|
|
1764
|
+
] });
|
|
1765
|
+
}
|
|
1766
|
+
function EmptyState({ icon, title, description, action, className = "" }) {
|
|
1767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] p-8 shadow-[var(--shadow-xs)] flex flex-col items-center text-center ${className}`, children: [
|
|
1768
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[var(--fg-muted)] mb-4", children: icon }),
|
|
1769
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-[var(--fg)]", children: title }),
|
|
1770
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-[var(--fg-muted)] tracking-[-0.25px] mt-1 max-w-sm", children: description }),
|
|
1771
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5", children: action })
|
|
1772
|
+
] });
|
|
1773
|
+
}
|
|
1774
|
+
function HeroSection({
|
|
1775
|
+
eyebrow,
|
|
1776
|
+
title,
|
|
1777
|
+
subtitle,
|
|
1778
|
+
actions,
|
|
1779
|
+
media,
|
|
1780
|
+
align = "center",
|
|
1781
|
+
size = "default",
|
|
1782
|
+
className = ""
|
|
1783
|
+
}) {
|
|
1784
|
+
const isCenter = align === "center";
|
|
1785
|
+
const isCompact = size === "compact";
|
|
1786
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `relative overflow-hidden ${className}`, children: [
|
|
1787
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 left-1/2 -translate-x-1/2 w-[800px] h-[600px] bg-[radial-gradient(ellipse_at_center,var(--brand-primary)_0%,transparent_70%)] opacity-[0.04]" }) }),
|
|
1788
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `relative ${isCompact ? "py-16 md:py-20" : "py-20 md:py-32"}`, children: [
|
|
1789
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `max-w-4xl ${isCenter ? "mx-auto text-center" : ""}`, children: [
|
|
1790
|
+
eyebrow && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mb-4 md:mb-5 ${isCenter ? "flex justify-center" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-[11px] font-semibold uppercase tracking-[0.08em] bg-[var(--brand-primary)]/10 text-[var(--brand-primary)] border border-[var(--brand-primary)]/15", children: [
|
|
1791
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--brand-primary)] animate-pulse" }),
|
|
1792
|
+
eyebrow
|
|
1793
|
+
] }) }),
|
|
1794
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: `text-[clamp(2rem,5vw,3.75rem)] font-bold leading-[1.08] tracking-[-0.035em] text-[var(--fg)] text-balance`, children: title }),
|
|
1795
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `mt-5 md:mt-6 text-base md:text-lg text-[var(--fg-secondary)] leading-relaxed max-w-2xl ${isCenter ? "mx-auto" : ""}`, children: subtitle }),
|
|
1796
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mt-8 md:mt-10 flex flex-wrap gap-3 ${isCenter ? "justify-center" : ""}`, children: actions })
|
|
1797
|
+
] }),
|
|
1798
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `mt-12 md:mt-16 ${isCenter ? "max-w-5xl mx-auto" : "max-w-4xl"}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius-xl)] border border-[var(--border-color)] shadow-[var(--shadow-xl)] overflow-hidden bg-[var(--bg-secondary)]", children: media }) })
|
|
1799
|
+
] })
|
|
1800
|
+
] });
|
|
1801
|
+
}
|
|
1802
|
+
function LogoCloud({
|
|
1803
|
+
label = "Trusted by teams at",
|
|
1804
|
+
logos,
|
|
1805
|
+
className = ""
|
|
1806
|
+
}) {
|
|
1807
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-10 md:py-14 ${className}`, children: [
|
|
1808
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-[11px] font-semibold uppercase tracking-[0.1em] text-[var(--fg-muted)] mb-8", children: label }),
|
|
1809
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center justify-center gap-x-10 gap-y-6 md:gap-x-14", children: logos.map((logo) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 opacity-40 hover:opacity-70 transition-opacity duration-[var(--transition-base)]", children: logo.src ? (
|
|
1810
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
1811
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1812
|
+
"img",
|
|
1813
|
+
{
|
|
1814
|
+
src: logo.src,
|
|
1815
|
+
alt: logo.name,
|
|
1816
|
+
width: logo.width || 100,
|
|
1817
|
+
className: "h-6 md:h-7 w-auto object-contain logo-img"
|
|
1818
|
+
}
|
|
1819
|
+
)
|
|
1820
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm md:text-base font-bold tracking-[-0.02em] text-[var(--fg)] select-none", children: logo.name }) }, logo.name)) })
|
|
1821
|
+
] });
|
|
1822
|
+
}
|
|
1823
|
+
function StatsBar({ stats, variant = "inline", className = "" }) {
|
|
1824
|
+
if (variant === "cards") {
|
|
1825
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-10 md:py-14 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: stats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1826
|
+
"div",
|
|
1827
|
+
{
|
|
1828
|
+
className: "rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] p-5 md:p-6 text-center transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5",
|
|
1829
|
+
children: [
|
|
1830
|
+
stat.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center mb-3 text-[var(--brand-primary)]", children: stat.icon }),
|
|
1831
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-2xl md:text-3xl font-bold text-[var(--fg)] tracking-[-0.03em] tabular-nums", children: stat.value }),
|
|
1832
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-[13px] text-[var(--fg-muted)] tracking-[-0.25px]", children: stat.label })
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
i
|
|
1836
|
+
)) }) });
|
|
1837
|
+
}
|
|
1838
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-10 md:py-14 border-y border-[var(--border-color)] ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center justify-center gap-8 md:gap-16", children: stats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
|
|
1839
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-2xl md:text-3xl font-bold text-[var(--fg)] tracking-[-0.03em] tabular-nums", children: stat.value }),
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-[13px] text-[var(--fg-muted)] tracking-[-0.25px]", children: stat.label })
|
|
1841
|
+
] }, i)) }) });
|
|
1842
|
+
}
|
|
1843
|
+
function CTASection({
|
|
1844
|
+
title,
|
|
1845
|
+
description,
|
|
1846
|
+
actions,
|
|
1847
|
+
variant = "default",
|
|
1848
|
+
className = ""
|
|
1849
|
+
}) {
|
|
1850
|
+
const variantStyles5 = {
|
|
1851
|
+
default: "py-16 md:py-24",
|
|
1852
|
+
filled: "py-12 md:py-16 px-6 md:px-12 rounded-[var(--radius-xl)] bg-[var(--fg)] text-[var(--bg)]",
|
|
1853
|
+
bordered: "py-12 md:py-16 px-6 md:px-12 rounded-[var(--radius-xl)] border-2 border-dashed border-[var(--border-color-strong)]"
|
|
1854
|
+
};
|
|
1855
|
+
const isFilled = variant === "filled";
|
|
1856
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `${variantStyles5[variant]} ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-2xl mx-auto text-center", children: [
|
|
1857
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1858
|
+
"h2",
|
|
1859
|
+
{
|
|
1860
|
+
className: `text-2xl md:text-4xl font-bold tracking-[-0.03em] leading-[1.1] ${isFilled ? "text-[var(--bg)]" : "text-[var(--fg)]"}`,
|
|
1861
|
+
children: title
|
|
1862
|
+
}
|
|
1863
|
+
),
|
|
1864
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
|
+
"p",
|
|
1866
|
+
{
|
|
1867
|
+
className: `mt-4 text-base leading-relaxed ${isFilled ? "text-[var(--bg)]/70" : "text-[var(--fg-secondary)]"}`,
|
|
1868
|
+
children: description
|
|
1869
|
+
}
|
|
1870
|
+
),
|
|
1871
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 flex flex-wrap gap-3 justify-center", children: actions })
|
|
1872
|
+
] }) });
|
|
1873
|
+
}
|
|
1874
|
+
function BentoGrid({ items, className = "" }) {
|
|
1875
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-10 md:py-14 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: items.map((item, i) => {
|
|
1876
|
+
const colSpanClass = item.span === 2 ? "md:col-span-2" : "";
|
|
1877
|
+
const rowSpanClass = item.rowSpan === 2 ? "md:row-span-2" : "";
|
|
1878
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1879
|
+
"div",
|
|
1880
|
+
{
|
|
1881
|
+
className: `group relative rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] overflow-hidden transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:border-[var(--border-color-strong)] ${colSpanClass} ${rowSpanClass} ${item.className || ""}`,
|
|
1882
|
+
children: [
|
|
1883
|
+
item.media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full overflow-hidden", children: item.media }),
|
|
1884
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `p-5 md:p-6 ${item.rowSpan === 2 ? "flex flex-col h-full" : ""}`, children: [
|
|
1885
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-9 h-9 rounded-[var(--radius-md)] bg-[var(--brand-primary)]/10 flex items-center justify-center text-[var(--brand-primary)] mb-3.5", children: item.icon }),
|
|
1886
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[15px] font-semibold text-[var(--fg)] tracking-[-0.01em]", children: item.title }),
|
|
1887
|
+
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-[13px] text-[var(--fg-muted)] leading-relaxed tracking-[-0.25px]", children: item.description })
|
|
1888
|
+
] })
|
|
1889
|
+
]
|
|
1890
|
+
},
|
|
1891
|
+
i
|
|
1892
|
+
);
|
|
1893
|
+
}) }) });
|
|
1894
|
+
}
|
|
1895
|
+
function FAQSection({
|
|
1896
|
+
title = "Frequently asked questions",
|
|
1897
|
+
subtitle,
|
|
1898
|
+
items,
|
|
1899
|
+
className = ""
|
|
1900
|
+
}) {
|
|
1901
|
+
const [openIndex, setOpenIndex] = react.useState(null);
|
|
1902
|
+
const toggle = (i) => setOpenIndex(openIndex === i ? null : i);
|
|
1903
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-14 md:py-20 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-2xl mx-auto", children: [
|
|
1904
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl md:text-3xl font-bold text-[var(--fg)] tracking-[-0.03em] text-center", children: title }),
|
|
1905
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-[var(--fg-secondary)] text-center", children: subtitle }),
|
|
1906
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `${title || subtitle ? "mt-10" : ""} divide-y divide-[var(--border-color)]`, children: items.map((item, i) => {
|
|
1907
|
+
const isOpen = openIndex === i;
|
|
1908
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-5", children: [
|
|
1909
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1910
|
+
"button",
|
|
1911
|
+
{
|
|
1912
|
+
onClick: () => toggle(i),
|
|
1913
|
+
className: "w-full flex items-center justify-between gap-4 text-left cursor-pointer group",
|
|
1914
|
+
"aria-expanded": isOpen,
|
|
1915
|
+
children: [
|
|
1916
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[15px] font-medium text-[var(--fg)] group-hover:text-[var(--brand-primary)] transition-colors", children: item.question }),
|
|
1917
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1918
|
+
"span",
|
|
1919
|
+
{
|
|
1920
|
+
className: `shrink-0 w-5 h-5 flex items-center justify-center text-[var(--fg-muted)] transition-transform duration-200 ${isOpen ? "rotate-45" : ""}`,
|
|
1921
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 1v12M1 7h12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
|
|
1922
|
+
}
|
|
1923
|
+
)
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
),
|
|
1927
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1928
|
+
"div",
|
|
1929
|
+
{
|
|
1930
|
+
className: `overflow-hidden transition-all duration-200 ease-out ${isOpen ? "max-h-96 opacity-100 mt-3" : "max-h-0 opacity-0"}`,
|
|
1931
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[14px] text-[var(--fg-secondary)] leading-relaxed pr-8", children: item.answer })
|
|
1932
|
+
}
|
|
1933
|
+
)
|
|
1934
|
+
] }, i);
|
|
1935
|
+
}) })
|
|
1936
|
+
] }) });
|
|
1937
|
+
}
|
|
1938
|
+
function ComparisonTable({ columns, rows, className = "" }) {
|
|
1939
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-10 md:py-14 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto -mx-4 px-4", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse min-w-[500px]", children: [
|
|
1940
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
1941
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left py-4 px-4 text-[13px] font-medium text-[var(--fg-muted)] tracking-[-0.25px] w-[40%]" }),
|
|
1942
|
+
columns.map((col, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1943
|
+
"th",
|
|
1944
|
+
{
|
|
1945
|
+
className: `py-4 px-4 text-center text-sm font-semibold ${col.highlighted ? "text-[var(--brand-primary)] bg-[var(--brand-primary)]/5 rounded-t-[var(--radius-lg)]" : "text-[var(--fg)]"}`,
|
|
1946
|
+
children: col.label
|
|
1947
|
+
},
|
|
1948
|
+
i
|
|
1949
|
+
))
|
|
1950
|
+
] }) }),
|
|
1951
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, ri) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-t border-[var(--border-color)]", children: [
|
|
1952
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3.5 px-4 text-[14px] text-[var(--fg-secondary)]", children: row.feature }),
|
|
1953
|
+
row.values.map((val, vi) => {
|
|
1954
|
+
var _a;
|
|
1955
|
+
const isHighlighted = (_a = columns[vi]) == null ? void 0 : _a.highlighted;
|
|
1956
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1957
|
+
"td",
|
|
1958
|
+
{
|
|
1959
|
+
className: `py-3.5 px-4 text-center ${isHighlighted ? "bg-[var(--brand-primary)]/5" : ""} ${ri === rows.length - 1 && isHighlighted ? "rounded-b-[var(--radius-lg)]" : ""}`,
|
|
1960
|
+
children: typeof val === "boolean" ? val ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex text-[var(--color-success)]", children: /* @__PURE__ */ jsxRuntime.jsx(IconlyCheck, { size: 18 }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex text-[var(--fg-muted)]/40", children: /* @__PURE__ */ jsxRuntime.jsx(IconlyClose, { size: 18 }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-[var(--fg)]", children: val })
|
|
1961
|
+
},
|
|
1962
|
+
vi
|
|
1963
|
+
);
|
|
1964
|
+
})
|
|
1965
|
+
] }, ri)) })
|
|
1966
|
+
] }) }) });
|
|
1967
|
+
}
|
|
1968
|
+
function PromoBentoCard({ pill, title, description, cta, media, className = "" }) {
|
|
1969
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1970
|
+
"div",
|
|
1971
|
+
{
|
|
1972
|
+
className: `relative flex flex-col rounded-[clamp(24px,3vw,48px)] bg-[var(--bg-secondary)] overflow-hidden group transition-shadow duration-[var(--transition-slow)] hover:shadow-[var(--shadow-lg)] ${className}`,
|
|
1973
|
+
children: [
|
|
1974
|
+
media && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 min-h-[240px] md:min-h-[320px] overflow-hidden", children: [
|
|
1975
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center p-6", children: media }),
|
|
1976
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1977
|
+
"div",
|
|
1978
|
+
{
|
|
1979
|
+
className: "absolute bottom-0 left-0 right-0 h-[140px] pointer-events-none",
|
|
1980
|
+
style: {
|
|
1981
|
+
background: "linear-gradient(to top, var(--bg-secondary) 0%, transparent 100%)"
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
)
|
|
1985
|
+
] }),
|
|
1986
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col gap-4 p-6 md:p-8 pt-0", children: [
|
|
1987
|
+
pill && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[var(--bg)] border border-[var(--border-color)] text-sm font-semibold text-[var(--fg)]", children: [
|
|
1988
|
+
pill.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-5 h-5 flex items-center justify-center", children: pill.icon }),
|
|
1989
|
+
pill.label
|
|
1990
|
+
] }) }),
|
|
1991
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl md:text-[28px] leading-[1.2] tracking-[-0.02em] text-[var(--fg)]", children: title }),
|
|
1992
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm md:text-base leading-relaxed text-[var(--fg-secondary)] max-w-[85%]", children: description }),
|
|
1993
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1994
|
+
Button,
|
|
1995
|
+
{
|
|
1996
|
+
variant: "outline",
|
|
1997
|
+
onClick: cta.onClick,
|
|
1998
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 3l5 5-5 5" }) }),
|
|
1999
|
+
children: cta.label
|
|
2000
|
+
}
|
|
2001
|
+
) })
|
|
2002
|
+
] })
|
|
2003
|
+
]
|
|
2004
|
+
}
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
function PromoBento({ heading, subtitle, items, className = "" }) {
|
|
2008
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-16 md:py-24 ${className}`, children: [
|
|
2009
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-10 md:mb-14 max-w-xl", children: [
|
|
2010
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }),
|
|
2011
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-[var(--fg-secondary)] leading-relaxed", children: subtitle })
|
|
2012
|
+
] }),
|
|
2013
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-9", children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx(PromoBentoCard, __spreadValues({}, item), i)) })
|
|
2014
|
+
] });
|
|
2015
|
+
}
|
|
2016
|
+
function PromoShowcase({ heading, steps, className = "" }) {
|
|
2017
|
+
const [activeIndex, setActiveIndex] = react.useState(0);
|
|
2018
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-16 md:py-24 ${className}`, children: [
|
|
2019
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-10 md:mb-14 max-w-xl", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }) }),
|
|
2020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 md:gap-8", children: [
|
|
2021
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1 p-1 rounded-full bg-[var(--bg-secondary)] border border-[var(--border-color)] w-fit", children: steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2022
|
+
"button",
|
|
2023
|
+
{
|
|
2024
|
+
onClick: () => setActiveIndex(i),
|
|
2025
|
+
className: `px-5 py-2.5 rounded-full text-sm font-medium transition-all duration-[var(--transition-base)] cursor-pointer ${i === activeIndex ? "bg-[var(--fg)] text-[var(--bg)] shadow-[var(--shadow-sm)]" : "text-[var(--fg-secondary)] hover:text-[var(--fg)] hover:bg-[var(--bg-tertiary)]"}`,
|
|
2026
|
+
children: step.label
|
|
2027
|
+
},
|
|
2028
|
+
i
|
|
2029
|
+
)) }),
|
|
2030
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative rounded-[clamp(16px,2vw,32px)] border border-[var(--border-color)] bg-[var(--bg-secondary)] overflow-hidden min-h-[300px] md:min-h-[480px]", children: steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2031
|
+
"div",
|
|
2032
|
+
{
|
|
2033
|
+
className: `absolute inset-0 transition-opacity duration-300 ease-out ${i === activeIndex ? "opacity-100 z-10" : "opacity-0 z-0 pointer-events-none"}`,
|
|
2034
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center p-6 md:p-10", children: step.content })
|
|
2035
|
+
},
|
|
2036
|
+
i
|
|
2037
|
+
)) })
|
|
2038
|
+
] })
|
|
2039
|
+
] });
|
|
2040
|
+
}
|
|
2041
|
+
function PromoSplit({
|
|
2042
|
+
heading,
|
|
2043
|
+
description,
|
|
2044
|
+
features,
|
|
2045
|
+
media,
|
|
2046
|
+
mediaPosition = "right",
|
|
2047
|
+
className = ""
|
|
2048
|
+
}) {
|
|
2049
|
+
const isLeft = mediaPosition === "left";
|
|
2050
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-24 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center ${isLeft ? "lg:[direction:rtl]" : ""}`, children: [
|
|
2051
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-6 ${isLeft ? "lg:[direction:ltr]" : ""}`, children: [
|
|
2052
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }),
|
|
2053
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base md:text-lg leading-relaxed text-[var(--fg-secondary)]", children: description }),
|
|
2054
|
+
features && features.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-5 mt-2", children: features.map((feature, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
2055
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-[var(--fg)]", children: feature.title }),
|
|
2056
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed", children: feature.description })
|
|
2057
|
+
] }, i)) })
|
|
2058
|
+
] }),
|
|
2059
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `relative ${isLeft ? "lg:[direction:ltr]" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative rounded-[clamp(16px,2vw,32px)] bg-[var(--bg-secondary)] border border-[var(--border-color)] overflow-hidden min-h-[280px] md:min-h-[380px]", children: media ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center p-6", children: media }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: "var(--fg-muted)", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2060
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2061
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
|
|
2062
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m21 15-5-5L5 21" })
|
|
2063
|
+
] }) }) }) }) })
|
|
2064
|
+
] }) });
|
|
2065
|
+
}
|
|
2066
|
+
function PromoTrustGrid({ heading, features, media, className = "" }) {
|
|
2067
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-16 md:py-24 ${className}`, children: [
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-10 md:mb-14", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }) }),
|
|
2069
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 mb-10 md:mb-14", children: features.map((feature, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2070
|
+
"div",
|
|
2071
|
+
{
|
|
2072
|
+
className: "group relative flex flex-col gap-3 p-6 md:p-8 rounded-[var(--radius-xl)] bg-[var(--bg)] border border-[var(--border-color)] transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5",
|
|
2073
|
+
children: [
|
|
2074
|
+
feature.icon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-[var(--radius-lg)] bg-[var(--fg)]/5 flex items-center justify-center text-[var(--fg)] mb-1", children: feature.icon }),
|
|
2075
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-[var(--fg)] leading-snug", children: feature.title }),
|
|
2076
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed", children: feature.description })
|
|
2077
|
+
]
|
|
2078
|
+
},
|
|
2079
|
+
i
|
|
2080
|
+
)) }),
|
|
2081
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative rounded-[clamp(16px,2vw,32px)] bg-[var(--bg-secondary)] border border-[var(--border-color)] overflow-hidden min-h-[280px] md:min-h-[420px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center p-6", children: media }) })
|
|
2082
|
+
] });
|
|
2083
|
+
}
|
|
2084
|
+
function PromoDevicesCTA({
|
|
2085
|
+
heading,
|
|
2086
|
+
description,
|
|
2087
|
+
cta,
|
|
2088
|
+
className = ""
|
|
2089
|
+
}) {
|
|
2090
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-16 md:py-24 ${className}`, children: [
|
|
2091
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-2xl mx-auto text-center mb-8 md:mb-10", children: [
|
|
2092
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }),
|
|
2093
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-4 text-base md:text-lg leading-relaxed text-[var(--fg-secondary)]", children: description }),
|
|
2094
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", onClick: cta.onClick, children: cta.label }) })
|
|
2095
|
+
] }),
|
|
2096
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-end justify-center gap-6 md:gap-10 px-4 md:px-0 max-w-4xl mx-auto", children: [
|
|
2097
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:block relative w-[38%] max-w-[380px]", children: [
|
|
2098
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/10] rounded-t-[var(--radius-lg)] border border-b-0 border-[var(--border-color)] bg-[var(--bg-secondary)] overflow-hidden shadow-[var(--shadow-md)]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-3 rounded-[var(--radius-md)] bg-[var(--bg-tertiary)]" }) }),
|
|
2099
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-2.5 bg-[var(--bg-tertiary)] border border-[var(--border-color)] rounded-b-sm" }),
|
|
2100
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1 bg-[var(--bg-tertiary)] border-x border-b border-[var(--border-color)] rounded-b-[var(--radius-sm)] mx-[-4%]" })
|
|
2101
|
+
] }),
|
|
2102
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-[40%] md:w-[28%] max-w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[3/4] rounded-[var(--radius-xl)] border-2 border-[var(--border-color)] bg-[var(--bg-secondary)] overflow-hidden shadow-[var(--shadow-lg)]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-2.5 rounded-[var(--radius-lg)] bg-[var(--bg-tertiary)]" }) }) }),
|
|
2103
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-[24%] md:w-[14%] max-w-[140px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aspect-[9/19] rounded-[clamp(12px,2vw,24px)] border-2 border-[var(--border-color)] bg-[var(--bg-secondary)] overflow-hidden shadow-[var(--shadow-lg)]", children: [
|
|
2104
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1.5 left-1/2 -translate-x-1/2 w-[40%] h-[3%] rounded-full bg-[var(--border-color)]" }),
|
|
2105
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-1.5 top-[6%] rounded-[clamp(8px,1.5vw,16px)] bg-[var(--bg-tertiary)]" })
|
|
2106
|
+
] }) })
|
|
2107
|
+
] })
|
|
2108
|
+
] });
|
|
2109
|
+
}
|
|
2110
|
+
function PromoTestimonials({
|
|
2111
|
+
heading,
|
|
2112
|
+
subtitle,
|
|
2113
|
+
testimonials,
|
|
2114
|
+
media,
|
|
2115
|
+
className = ""
|
|
2116
|
+
}) {
|
|
2117
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `py-16 md:py-24 ${className}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative rounded-[clamp(20px,3vw,40px)] border border-[var(--border-color)] bg-[var(--bg)] overflow-hidden", children: [
|
|
2118
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-10 md:pt-14 pb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex -space-x-3", children: [
|
|
2119
|
+
testimonials.slice(0, 5).map((t, i) => {
|
|
2120
|
+
const initials = t.name.split(" ").map((n) => n[0]).join("").toUpperCase();
|
|
2121
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2122
|
+
"div",
|
|
2123
|
+
{
|
|
2124
|
+
className: "relative ring-3 ring-[var(--bg)] rounded-full",
|
|
2125
|
+
style: { zIndex: 10 - i },
|
|
2126
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2127
|
+
Avatar,
|
|
2128
|
+
{
|
|
2129
|
+
size: "md",
|
|
2130
|
+
src: t.avatarSrc,
|
|
2131
|
+
initials
|
|
2132
|
+
}
|
|
2133
|
+
)
|
|
2134
|
+
},
|
|
2135
|
+
i
|
|
2136
|
+
);
|
|
2137
|
+
}),
|
|
2138
|
+
testimonials.length > 5 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative ring-3 ring-[var(--bg)] rounded-full z-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-10 h-10 rounded-full bg-[var(--bg-tertiary)] flex items-center justify-center text-xs font-semibold text-[var(--fg-secondary)]", children: [
|
|
2139
|
+
"+",
|
|
2140
|
+
testimonials.length - 5
|
|
2141
|
+
] }) })
|
|
2142
|
+
] }) }),
|
|
2143
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center px-6 pb-8 md:pb-10", children: [
|
|
2144
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.75rem,4vw,2.75rem)] font-bold leading-[1.1] tracking-[-0.03em] text-[var(--fg)] text-balance", children: heading }),
|
|
2145
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-base text-[var(--fg-secondary)] leading-relaxed max-w-lg mx-auto", children: subtitle })
|
|
2146
|
+
] }),
|
|
2147
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 md:px-10 pb-8 md:pb-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-5", children: testimonials.map((t, i) => {
|
|
2148
|
+
const initials = t.name.split(" ").map((n) => n[0]).join("").toUpperCase();
|
|
2149
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2150
|
+
"div",
|
|
2151
|
+
{
|
|
2152
|
+
className: "flex flex-col gap-4 p-5 md:p-6 rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] transition-shadow duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)]",
|
|
2153
|
+
children: [
|
|
2154
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed flex-1", children: [
|
|
2155
|
+
"\u201C",
|
|
2156
|
+
t.quote,
|
|
2157
|
+
"\u201D"
|
|
2158
|
+
] }),
|
|
2159
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 pt-1", children: [
|
|
2160
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { size: "sm", src: t.avatarSrc, initials }),
|
|
2161
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2162
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[var(--fg)]", children: t.name }),
|
|
2163
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-[var(--fg-muted)]", children: t.role })
|
|
2164
|
+
] })
|
|
2165
|
+
] })
|
|
2166
|
+
]
|
|
2167
|
+
},
|
|
2168
|
+
i
|
|
2169
|
+
);
|
|
2170
|
+
}) }) }),
|
|
2171
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 md:px-10 pb-8 md:pb-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--radius-xl)] bg-[var(--bg-secondary)] overflow-hidden", children: media }) })
|
|
2172
|
+
] }) });
|
|
2173
|
+
}
|
|
2174
|
+
function PromoHero({
|
|
2175
|
+
title,
|
|
2176
|
+
subtitle,
|
|
2177
|
+
cta,
|
|
2178
|
+
secondaryCta,
|
|
2179
|
+
media,
|
|
2180
|
+
variant = "dark",
|
|
2181
|
+
className = ""
|
|
2182
|
+
}) {
|
|
2183
|
+
const variantStyles5 = {
|
|
2184
|
+
dark: "bg-[var(--neutral-900)] text-white",
|
|
2185
|
+
light: "bg-[var(--bg)] text-[var(--fg)]",
|
|
2186
|
+
gradient: "bg-gradient-to-br from-[var(--neutral-900)] via-[var(--neutral-800)] to-[var(--neutral-700)] text-white"
|
|
2187
|
+
};
|
|
2188
|
+
const subtitleColor = {
|
|
2189
|
+
dark: "text-white/70",
|
|
2190
|
+
light: "text-[var(--fg-secondary)]",
|
|
2191
|
+
gradient: "text-white/70"
|
|
2192
|
+
};
|
|
2193
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2194
|
+
"section",
|
|
2195
|
+
{
|
|
2196
|
+
className: `relative overflow-hidden rounded-[clamp(20px,3vw,40px)] min-h-[480px] md:min-h-[600px] flex items-center ${variantStyles5[variant]} ${className}`,
|
|
2197
|
+
children: [
|
|
2198
|
+
variant !== "light" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", "aria-hidden": "true", children: [
|
|
2199
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[-20%] right-[-10%] w-[600px] h-[600px] rounded-full bg-white/[0.03] blur-[100px]" }),
|
|
2200
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-30%] left-[-5%] w-[400px] h-[400px] rounded-full bg-white/[0.02] blur-[80px]" })
|
|
2201
|
+
] }),
|
|
2202
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 w-full p-8 md:p-12 lg:p-16 items-center", children: [
|
|
2203
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 md:gap-6", children: [
|
|
2204
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[clamp(2.25rem,5.5vw,5rem)] font-bold leading-[0.95] tracking-[-0.04em] text-balance", children: title }),
|
|
2205
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-base md:text-lg leading-relaxed max-w-lg ${subtitleColor[variant]}`, children: subtitle }),
|
|
2206
|
+
(cta || secondaryCta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-3 mt-2", children: [
|
|
2207
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2208
|
+
Button,
|
|
2209
|
+
{
|
|
2210
|
+
variant: variant === "light" ? "primary" : "outline",
|
|
2211
|
+
onClick: cta.onClick,
|
|
2212
|
+
className: variant !== "light" ? "border-white/20 text-white hover:bg-white/10" : "",
|
|
2213
|
+
children: cta.label
|
|
2214
|
+
}
|
|
2215
|
+
),
|
|
2216
|
+
secondaryCta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2217
|
+
Button,
|
|
2218
|
+
{
|
|
2219
|
+
variant: "ghost",
|
|
2220
|
+
onClick: secondaryCta.onClick,
|
|
2221
|
+
className: variant !== "light" ? "text-white/70 hover:text-white hover:bg-white/5" : "",
|
|
2222
|
+
children: secondaryCta.label
|
|
2223
|
+
}
|
|
2224
|
+
)
|
|
2225
|
+
] })
|
|
2226
|
+
] }),
|
|
2227
|
+
media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex items-center justify-center", children: media })
|
|
2228
|
+
] })
|
|
2229
|
+
]
|
|
2230
|
+
}
|
|
2231
|
+
);
|
|
2232
|
+
}
|
|
2233
|
+
function PromoPricing({
|
|
2234
|
+
heading,
|
|
2235
|
+
subtitle,
|
|
2236
|
+
tiers,
|
|
2237
|
+
variant = "light",
|
|
2238
|
+
className = ""
|
|
2239
|
+
}) {
|
|
2240
|
+
const isDark = variant === "dark";
|
|
2241
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2242
|
+
"section",
|
|
2243
|
+
{
|
|
2244
|
+
className: `py-16 md:py-24 px-6 md:px-12 rounded-[clamp(20px,3vw,40px)] ${isDark ? "bg-[var(--neutral-900)] text-white" : "bg-[var(--bg)]"} ${className}`,
|
|
2245
|
+
children: [
|
|
2246
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-10 md:mb-14 max-w-2xl mx-auto", children: [
|
|
2247
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2248
|
+
"h2",
|
|
2249
|
+
{
|
|
2250
|
+
className: `text-[clamp(2rem,5vw,4.75rem)] font-bold leading-[0.95] tracking-[-0.04em] text-balance ${isDark ? "text-white" : "text-[var(--fg)]"}`,
|
|
2251
|
+
children: heading
|
|
2252
|
+
}
|
|
2253
|
+
),
|
|
2254
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `mt-4 text-base md:text-lg leading-relaxed ${isDark ? "text-white/60" : "text-[var(--fg-secondary)]"}`, children: subtitle })
|
|
2255
|
+
] }),
|
|
2256
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 md:gap-6 max-w-5xl mx-auto", children: tiers.map((tier, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2257
|
+
"div",
|
|
2258
|
+
{
|
|
2259
|
+
className: `relative flex flex-col rounded-[var(--radius-xl)] p-6 md:p-8 transition-all duration-[var(--transition-base)] ${tier.highlighted ? isDark ? "bg-white text-[var(--neutral-900)] shadow-[0_0_60px_rgba(255,255,255,0.1)]" : "bg-[var(--fg)] text-[var(--bg)] shadow-[var(--shadow-xl)]" : isDark ? "bg-white/[0.06] border border-white/10 text-white hover:bg-white/[0.1]" : "bg-[var(--bg)] border border-[var(--border-color)] hover:shadow-[var(--shadow-md)] hover:-translate-y-0.5"}`,
|
|
2260
|
+
children: [
|
|
2261
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2262
|
+
"h3",
|
|
2263
|
+
{
|
|
2264
|
+
className: `text-sm font-semibold uppercase tracking-[0.06em] ${tier.highlighted ? isDark ? "text-[var(--neutral-500)]" : "text-[var(--bg)]/60" : isDark ? "text-white/50" : "text-[var(--fg-muted)]"}`,
|
|
2265
|
+
children: tier.name
|
|
2266
|
+
}
|
|
2267
|
+
) }),
|
|
2268
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
2269
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-4xl md:text-5xl font-bold tracking-[-0.03em]", children: tier.price }),
|
|
2270
|
+
tier.period && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-sm ml-1 ${tier.highlighted ? isDark ? "text-[var(--neutral-500)]" : "text-[var(--bg)]/50" : isDark ? "text-white/40" : "text-[var(--fg-muted)]"}`, children: tier.period })
|
|
2271
|
+
] }),
|
|
2272
|
+
tier.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `text-sm mb-6 ${tier.highlighted ? isDark ? "text-[var(--neutral-600)]" : "text-[var(--bg)]/60" : isDark ? "text-white/50" : "text-[var(--fg-secondary)]"}`, children: tier.description }),
|
|
2273
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2.5 mb-8 flex-1", children: tier.features.map((feature, fi) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2.5 text-sm", children: [
|
|
2274
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2275
|
+
"svg",
|
|
2276
|
+
{
|
|
2277
|
+
width: "16",
|
|
2278
|
+
height: "16",
|
|
2279
|
+
viewBox: "0 0 16 16",
|
|
2280
|
+
fill: "none",
|
|
2281
|
+
className: `shrink-0 mt-0.5 ${tier.highlighted ? isDark ? "text-[var(--color-success)]" : "text-[var(--color-success-light)]" : isDark ? "text-white/40" : "text-[var(--color-success)]"}`,
|
|
2282
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3.5 8.5L6.5 11.5L12.5 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2283
|
+
}
|
|
2284
|
+
),
|
|
2285
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `${tier.highlighted ? isDark ? "text-[var(--neutral-700)]" : "text-[var(--bg)]/80" : isDark ? "text-white/70" : "text-[var(--fg-secondary)]"}`, children: feature })
|
|
2286
|
+
] }, fi)) }),
|
|
2287
|
+
tier.cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto", children: tier.cta })
|
|
2288
|
+
]
|
|
2289
|
+
},
|
|
2290
|
+
i
|
|
2291
|
+
)) })
|
|
2292
|
+
]
|
|
2293
|
+
}
|
|
2294
|
+
);
|
|
2295
|
+
}
|
|
2296
|
+
function PromoActionCards({
|
|
2297
|
+
heading,
|
|
2298
|
+
subtitle,
|
|
2299
|
+
cards,
|
|
2300
|
+
columns = 3,
|
|
2301
|
+
className = ""
|
|
2302
|
+
}) {
|
|
2303
|
+
const gridCols = columns === 2 ? "md:grid-cols-2" : "md:grid-cols-2 lg:grid-cols-3";
|
|
2304
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `py-16 md:py-24 ${className}`, children: [
|
|
2305
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-10 md:mb-14 max-w-xl", children: [
|
|
2306
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[clamp(1.25rem,3vw,1.5rem)] font-medium leading-[1.3] tracking-[-0.01em] text-[var(--fg-secondary)] text-balance", children: heading }),
|
|
2307
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-[var(--fg-muted)]", children: subtitle })
|
|
2308
|
+
] }),
|
|
2309
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `grid grid-cols-1 ${gridCols} gap-4 md:gap-5`, children: cards.map((card, i) => {
|
|
2310
|
+
var _a;
|
|
2311
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2312
|
+
"div",
|
|
2313
|
+
{
|
|
2314
|
+
className: "group flex flex-col gap-4 p-5 md:p-6 rounded-[var(--radius-xl)] border border-[var(--border-color)] bg-[var(--bg)] transition-all duration-[var(--transition-base)] hover:shadow-[var(--shadow-md)] hover:border-[var(--border-color-strong)]",
|
|
2315
|
+
children: [
|
|
2316
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
2317
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[15px] font-semibold text-[var(--fg)] leading-snug", children: card.title }),
|
|
2318
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-[var(--fg-secondary)] leading-relaxed", children: card.description })
|
|
2319
|
+
] }),
|
|
2320
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1", children: [
|
|
2321
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: (_a = card.icons) == null ? void 0 : _a.map((icon, ii) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2322
|
+
"span",
|
|
2323
|
+
{
|
|
2324
|
+
className: "w-7 h-7 rounded-full bg-[var(--bg-secondary)] flex items-center justify-center text-[var(--fg-secondary)]",
|
|
2325
|
+
children: icon
|
|
2326
|
+
},
|
|
2327
|
+
ii
|
|
2328
|
+
)) }),
|
|
2329
|
+
card.cta && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2330
|
+
"button",
|
|
2331
|
+
{
|
|
2332
|
+
onClick: card.cta.onClick,
|
|
2333
|
+
className: "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium bg-[var(--fg)] text-[var(--bg)] hover:opacity-90 transition-opacity cursor-pointer",
|
|
2334
|
+
children: [
|
|
2335
|
+
card.cta.label,
|
|
2336
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "11", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.5 2.5l4 3.5-4 3.5" }) })
|
|
2337
|
+
]
|
|
2338
|
+
}
|
|
2339
|
+
)
|
|
2340
|
+
] })
|
|
2341
|
+
]
|
|
2342
|
+
},
|
|
2343
|
+
i
|
|
2344
|
+
);
|
|
2345
|
+
}) })
|
|
2346
|
+
] });
|
|
2347
|
+
}
|
|
2348
|
+
var DEFAULT_BG = "https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1600&h=900&fit=crop&q=80";
|
|
2349
|
+
function ArticleHero({
|
|
2350
|
+
category,
|
|
2351
|
+
title,
|
|
2352
|
+
subtitle,
|
|
2353
|
+
backgroundImage,
|
|
2354
|
+
logo,
|
|
2355
|
+
nav,
|
|
2356
|
+
className = ""
|
|
2357
|
+
}) {
|
|
2358
|
+
const bgSrc = backgroundImage != null ? backgroundImage : DEFAULT_BG;
|
|
2359
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2360
|
+
"section",
|
|
2361
|
+
{
|
|
2362
|
+
className: `relative w-full rounded-[var(--radius-xl)] overflow-hidden min-h-[320px] md:min-h-[480px] flex flex-col justify-between p-5 md:p-10 ${className}`,
|
|
2363
|
+
children: [
|
|
2364
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", children: [
|
|
2365
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2366
|
+
"img",
|
|
2367
|
+
{
|
|
2368
|
+
src: bgSrc,
|
|
2369
|
+
alt: "",
|
|
2370
|
+
className: "absolute inset-0 w-full h-full object-cover"
|
|
2371
|
+
}
|
|
2372
|
+
),
|
|
2373
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-black/40" })
|
|
2374
|
+
] }),
|
|
2375
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 flex items-center w-full", children: [
|
|
2376
|
+
logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 pr-4 md:pr-10", children: logo }),
|
|
2377
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-px bg-white/30" }),
|
|
2378
|
+
nav && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 pl-4 md:pl-10", children: nav })
|
|
2379
|
+
] }),
|
|
2380
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 max-w-[500px]", children: [
|
|
2381
|
+
category && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-white leading-7 mb-2", children: category }),
|
|
2382
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[32px] leading-[34px] md:text-[60px] md:leading-[60px] font-normal text-white tracking-[-2px] md:tracking-[-3px] mb-4", children: title }),
|
|
2383
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-white/90 leading-[22.5px]", children: subtitle })
|
|
2384
|
+
] })
|
|
2385
|
+
]
|
|
2386
|
+
}
|
|
2387
|
+
);
|
|
2388
|
+
}
|
|
2389
|
+
function ArticleBody({ children, className = "" }) {
|
|
2390
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2391
|
+
"div",
|
|
2392
|
+
{
|
|
2393
|
+
className: `text-[16px] leading-7 text-[var(--fg-secondary)] font-normal ${className}`,
|
|
2394
|
+
children
|
|
2395
|
+
}
|
|
2396
|
+
);
|
|
2397
|
+
}
|
|
2398
|
+
var levelStyles = {
|
|
2399
|
+
2: "text-[24px] leading-8 font-bold pt-12",
|
|
2400
|
+
3: "text-[20px] leading-8 font-semibold pt-8"
|
|
2401
|
+
};
|
|
2402
|
+
function ArticleHeading({
|
|
2403
|
+
level = 2,
|
|
2404
|
+
children,
|
|
2405
|
+
subtitle,
|
|
2406
|
+
action,
|
|
2407
|
+
className = ""
|
|
2408
|
+
}) {
|
|
2409
|
+
const Tag2 = `h${level}`;
|
|
2410
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 ${className}`, children: [
|
|
2411
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2412
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tag2, { className: `text-[var(--fg)] tracking-tight ${levelStyles[level]}`, children }),
|
|
2413
|
+
action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: action })
|
|
2414
|
+
] }),
|
|
2415
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[14px] leading-5 text-[var(--fg-muted)]", children: subtitle })
|
|
2416
|
+
] });
|
|
2417
|
+
}
|
|
2418
|
+
function ArticleFigure({
|
|
2419
|
+
src,
|
|
2420
|
+
alt = "",
|
|
2421
|
+
caption,
|
|
2422
|
+
legend,
|
|
2423
|
+
height = 384,
|
|
2424
|
+
children,
|
|
2425
|
+
className = ""
|
|
2426
|
+
}) {
|
|
2427
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: `w-full ${className}`, children: [
|
|
2428
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2429
|
+
"div",
|
|
2430
|
+
{
|
|
2431
|
+
className: "w-full rounded-[var(--radius-lg)] overflow-hidden bg-[var(--bg-secondary)] flex items-center justify-center",
|
|
2432
|
+
style: { minHeight: height },
|
|
2433
|
+
children: src ? (
|
|
2434
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
2435
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src, alt, className: "w-full h-full object-contain" })
|
|
2436
|
+
) : children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full p-4", children }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2 text-[var(--fg-muted)]", children: [
|
|
2437
|
+
/* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
2438
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
2439
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 16l5-5 4 4 4-6 5 7" })
|
|
2440
|
+
] }),
|
|
2441
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: "Figure placeholder" })
|
|
2442
|
+
] })
|
|
2443
|
+
}
|
|
2444
|
+
),
|
|
2445
|
+
legend && legend.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4 mt-3 flex-wrap", children: legend.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2446
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2447
|
+
"span",
|
|
2448
|
+
{
|
|
2449
|
+
className: "w-3 h-3 rounded-sm shrink-0",
|
|
2450
|
+
style: { backgroundColor: item.color }
|
|
2451
|
+
}
|
|
2452
|
+
),
|
|
2453
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] leading-4 text-[var(--fg-secondary)]", children: item.label })
|
|
2454
|
+
] }, item.label)) }),
|
|
2455
|
+
caption && /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: "mt-2 text-[14px] leading-5 text-[var(--fg-muted)]", children: caption })
|
|
2456
|
+
] });
|
|
2457
|
+
}
|
|
2458
|
+
function ArticleTable({
|
|
2459
|
+
columns,
|
|
2460
|
+
rows,
|
|
2461
|
+
initialVisible,
|
|
2462
|
+
showRank = false,
|
|
2463
|
+
className = ""
|
|
2464
|
+
}) {
|
|
2465
|
+
const [expanded, setExpanded] = react.useState(false);
|
|
2466
|
+
const limit = initialVisible != null ? initialVisible : rows.length;
|
|
2467
|
+
const visibleRows = expanded ? rows : rows.slice(0, limit);
|
|
2468
|
+
const hiddenCount = rows.length - limit;
|
|
2469
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full ${className}`, children: [
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center border-b border-[var(--border-color)] pb-px", children: [
|
|
2471
|
+
showRank && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[120px] shrink-0" }),
|
|
2472
|
+
columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 px-4 py-3.5", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] leading-5 font-medium text-[var(--fg-muted)]", children: col.label }) }, col.key))
|
|
2473
|
+
] }),
|
|
2474
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: visibleRows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2475
|
+
"div",
|
|
2476
|
+
{
|
|
2477
|
+
className: "flex items-center gap-4 border-b border-[var(--border-color)] last:border-b-0",
|
|
2478
|
+
children: [
|
|
2479
|
+
showRank && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[120px] shrink-0 px-4 py-4", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] leading-5 text-[var(--fg-muted)]", children: i + 1 }) }),
|
|
2480
|
+
columns.map((col) => {
|
|
2481
|
+
const value = row[col.key];
|
|
2482
|
+
const hasBadge = row._badge && row._badgeColumn === col.key;
|
|
2483
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 px-4 py-4 flex items-center gap-3", children: [
|
|
2484
|
+
col.render ? col.render(value, row) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] leading-5 text-[var(--fg-secondary)]", children: String(value != null ? value : "") }),
|
|
2485
|
+
hasBadge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-[12px] leading-4 font-semibold bg-[var(--bg-tertiary)] text-[var(--fg)]", children: row._badge })
|
|
2486
|
+
] }, col.key);
|
|
2487
|
+
})
|
|
2488
|
+
]
|
|
2489
|
+
},
|
|
2490
|
+
i
|
|
2491
|
+
)) }),
|
|
2492
|
+
hiddenCount > 0 && !expanded && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2493
|
+
"button",
|
|
2494
|
+
{
|
|
2495
|
+
onClick: () => setExpanded(true),
|
|
2496
|
+
className: "mt-4 text-[14px] leading-5 font-medium text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors cursor-pointer",
|
|
2497
|
+
children: [
|
|
2498
|
+
"Show ",
|
|
2499
|
+
hiddenCount,
|
|
2500
|
+
" more"
|
|
2501
|
+
]
|
|
2502
|
+
}
|
|
2503
|
+
)
|
|
2504
|
+
] });
|
|
2505
|
+
}
|
|
2506
|
+
function ArticleList({
|
|
2507
|
+
variant = "unordered",
|
|
2508
|
+
items,
|
|
2509
|
+
className = ""
|
|
2510
|
+
}) {
|
|
2511
|
+
const Tag2 = variant === "ordered" ? "ol" : "ul";
|
|
2512
|
+
const markerClass = variant === "ordered" ? "list-decimal" : "list-disc";
|
|
2513
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2514
|
+
Tag2,
|
|
2515
|
+
{
|
|
2516
|
+
className: `pl-[26px] flex flex-col gap-2 text-[16px] leading-7 text-[var(--fg-secondary)] ${markerClass} ${className}`,
|
|
2517
|
+
children: items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "pl-1", children: item }, i))
|
|
2518
|
+
}
|
|
2519
|
+
);
|
|
2520
|
+
}
|
|
2521
|
+
function ArticleNote({ children, className = "" }) {
|
|
2522
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2523
|
+
"p",
|
|
2524
|
+
{
|
|
2525
|
+
className: `text-[16px] leading-7 text-[var(--fg-secondary)] italic ${className}`,
|
|
2526
|
+
children
|
|
2527
|
+
}
|
|
2528
|
+
);
|
|
2529
|
+
}
|
|
2530
|
+
var roleStyles = {
|
|
2531
|
+
assistant: { bg: "bg-[var(--bg-secondary)]", label: "text-[var(--fg-secondary)]", gradient: "var(--bg-secondary)" },
|
|
2532
|
+
system: { bg: "bg-[var(--bg-tertiary)]", label: "text-[var(--fg-secondary)]", gradient: "var(--bg-tertiary)" },
|
|
2533
|
+
user: { bg: "bg-[var(--bg-secondary)]", label: "text-[var(--fg-secondary)]", gradient: "var(--bg-secondary)" }
|
|
2534
|
+
};
|
|
2535
|
+
function ArticleChatBlock({
|
|
2536
|
+
role,
|
|
2537
|
+
model,
|
|
2538
|
+
toolCall,
|
|
2539
|
+
children,
|
|
2540
|
+
collapsible = false,
|
|
2541
|
+
collapsedHeight = 160,
|
|
2542
|
+
className = ""
|
|
2543
|
+
}) {
|
|
2544
|
+
var _a;
|
|
2545
|
+
const [expanded, setExpanded] = react.useState(false);
|
|
2546
|
+
const styles = (_a = roleStyles[role]) != null ? _a : roleStyles.assistant;
|
|
2547
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full rounded-[var(--radius-lg)] overflow-hidden ${styles.bg} ${className}`, children: [
|
|
2548
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 px-5 pt-4 pb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `text-[12px] leading-4 ${styles.label}`, children: [
|
|
2549
|
+
role,
|
|
2550
|
+
model && ` \u2022 ${model}`
|
|
2551
|
+
] }) }),
|
|
2552
|
+
toolCall && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5 pb-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-1.5 px-3 py-1 rounded-full border border-[var(--border-color)] bg-[var(--bg)]", children: [
|
|
2553
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-[var(--color-accent)]" }),
|
|
2554
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium tracking-[-0.25px] text-[var(--fg-secondary)]", children: toolCall })
|
|
2555
|
+
] }) }),
|
|
2556
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-5 h-px bg-[var(--border-color)]" }),
|
|
2557
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
2558
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2559
|
+
"div",
|
|
2560
|
+
{
|
|
2561
|
+
className: "px-5 py-4 text-[14px] leading-6 text-[var(--fg-secondary)] overflow-hidden transition-all",
|
|
2562
|
+
style: collapsible && !expanded ? { maxHeight: collapsedHeight, overflow: "hidden" } : void 0,
|
|
2563
|
+
children
|
|
2564
|
+
}
|
|
2565
|
+
),
|
|
2566
|
+
collapsible && !expanded && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-0 left-0 right-0", children: [
|
|
2567
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2568
|
+
"div",
|
|
2569
|
+
{
|
|
2570
|
+
className: "h-16 pointer-events-none",
|
|
2571
|
+
style: {
|
|
2572
|
+
background: `linear-gradient(to top, ${styles.gradient}, transparent)`
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
),
|
|
2576
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `px-5 pb-4 ${styles.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2577
|
+
"button",
|
|
2578
|
+
{
|
|
2579
|
+
onClick: () => setExpanded(true),
|
|
2580
|
+
className: "text-[14px] leading-5 font-medium text-[var(--fg-muted)] hover:text-[var(--fg)] transition-colors cursor-pointer",
|
|
2581
|
+
children: "Show more"
|
|
2582
|
+
}
|
|
2583
|
+
) })
|
|
2584
|
+
] })
|
|
2585
|
+
] })
|
|
2586
|
+
] });
|
|
2587
|
+
}
|
|
2588
|
+
function ArticleLinkButton({
|
|
2589
|
+
children,
|
|
2590
|
+
href,
|
|
2591
|
+
onClick,
|
|
2592
|
+
className = ""
|
|
2593
|
+
}) {
|
|
2594
|
+
const baseClass = `inline-flex items-center justify-center px-4 py-2 rounded-full bg-[var(--fg)] text-[13px] font-medium tracking-[-0.25px] text-[var(--bg)] border border-[var(--bg)] shadow-[var(--shadow-sm)] hover:opacity-90 active:opacity-80 transition-all duration-[var(--transition-fast)] cursor-pointer ${className}`;
|
|
2595
|
+
if (href) {
|
|
2596
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: baseClass, children });
|
|
2597
|
+
}
|
|
2598
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { onClick, className: baseClass, children });
|
|
2599
|
+
}
|
|
2600
|
+
function ArticleFooter({
|
|
2601
|
+
logo,
|
|
2602
|
+
copyright = `\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} All rights reserved.`,
|
|
2603
|
+
className = ""
|
|
2604
|
+
}) {
|
|
2605
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: `w-full px-20 py-10 flex flex-col gap-10 ${className}`, children: [
|
|
2606
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
2607
|
+
logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 pr-10", children: logo }),
|
|
2608
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-px bg-[var(--fg)]" })
|
|
2609
|
+
] }),
|
|
2610
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[14px] leading-5 text-[var(--fg-muted)]", children: copyright })
|
|
2611
|
+
] });
|
|
2612
|
+
}
|
|
2613
|
+
function ArticleLayout({ children, className = "" }) {
|
|
2614
|
+
return /* @__PURE__ */ jsxRuntime.jsx("article", { className: `w-full max-w-[1100px] mx-auto flex flex-col gap-5 ${className}`, children });
|
|
2615
|
+
}
|
|
2616
|
+
function ArticleWide({ children, className = "" }) {
|
|
2617
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full ${className}`, children });
|
|
2618
|
+
}
|
|
2619
|
+
function ArticleNarrow({ children, className = "" }) {
|
|
2620
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full max-w-[720px] ${className}`, children });
|
|
2621
|
+
}
|
|
2622
|
+
function ChartTooltip({
|
|
2623
|
+
active,
|
|
2624
|
+
payload,
|
|
2625
|
+
label,
|
|
2626
|
+
xLabel,
|
|
2627
|
+
yLabel,
|
|
2628
|
+
valueFormatter
|
|
2629
|
+
}) {
|
|
2630
|
+
if (!active || !(payload == null ? void 0 : payload.length)) return null;
|
|
2631
|
+
const fmt = valueFormatter != null ? valueFormatter : ((v) => String(v));
|
|
2632
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[var(--bg)] border border-[var(--border-color)] rounded-[var(--radius-md)] shadow-[var(--shadow-md)] px-3 py-2 text-[12px] leading-4", children: [
|
|
2633
|
+
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[var(--fg-muted)] mb-1", children: [
|
|
2634
|
+
xLabel ? `${xLabel}: ` : "",
|
|
2635
|
+
label
|
|
2636
|
+
] }),
|
|
2637
|
+
payload.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2638
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-2 h-2 rounded-full shrink-0", style: { backgroundColor: entry.color } }),
|
|
2639
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[var(--fg-secondary)]", children: entry.name }),
|
|
2640
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-[var(--fg)] ml-auto pl-3", children: yLabel ? `${fmt(entry.value)} ` : fmt(entry.value) })
|
|
2641
|
+
] }, i))
|
|
2642
|
+
] });
|
|
2643
|
+
}
|
|
2644
|
+
function ArticleLineChart({
|
|
2645
|
+
data,
|
|
2646
|
+
series,
|
|
2647
|
+
xKey,
|
|
2648
|
+
xLabel,
|
|
2649
|
+
yLabel,
|
|
2650
|
+
height = 384,
|
|
2651
|
+
valueFormatter,
|
|
2652
|
+
className = ""
|
|
2653
|
+
}) {
|
|
2654
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: `w-full ${className}`, children: [
|
|
2655
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.LineChart, { data, margin: { top: 8, right: 16, bottom: 4, left: 8 }, children: [
|
|
2656
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "var(--border-color)" }),
|
|
2657
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2658
|
+
recharts.XAxis,
|
|
2659
|
+
{
|
|
2660
|
+
dataKey: xKey,
|
|
2661
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2662
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2663
|
+
tickLine: false,
|
|
2664
|
+
label: xLabel ? { value: xLabel, position: "insideBottom", offset: -2, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2665
|
+
}
|
|
2666
|
+
),
|
|
2667
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2668
|
+
recharts.YAxis,
|
|
2669
|
+
{
|
|
2670
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2671
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2672
|
+
tickLine: false,
|
|
2673
|
+
label: yLabel ? { value: yLabel, angle: -90, position: "insideLeft", offset: 4, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2674
|
+
}
|
|
2675
|
+
),
|
|
2676
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2677
|
+
recharts.Tooltip,
|
|
2678
|
+
{
|
|
2679
|
+
content: ({ active, payload, label }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2680
|
+
ChartTooltip,
|
|
2681
|
+
{
|
|
2682
|
+
active,
|
|
2683
|
+
payload,
|
|
2684
|
+
label,
|
|
2685
|
+
xLabel,
|
|
2686
|
+
valueFormatter
|
|
2687
|
+
}
|
|
2688
|
+
)
|
|
2689
|
+
}
|
|
2690
|
+
),
|
|
2691
|
+
series.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2692
|
+
recharts.Line,
|
|
2693
|
+
{
|
|
2694
|
+
type: "monotone",
|
|
2695
|
+
dataKey: s.dataKey,
|
|
2696
|
+
name: s.name,
|
|
2697
|
+
stroke: s.color,
|
|
2698
|
+
strokeWidth: 2,
|
|
2699
|
+
dot: false,
|
|
2700
|
+
activeDot: { r: 4, strokeWidth: 0, fill: s.color }
|
|
2701
|
+
},
|
|
2702
|
+
s.dataKey
|
|
2703
|
+
))
|
|
2704
|
+
] }) }) }),
|
|
2705
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4 mt-3 flex-wrap", children: series.map((s) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2706
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-sm shrink-0", style: { backgroundColor: s.color } }),
|
|
2707
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] leading-4 text-[var(--fg-secondary)]", children: s.name })
|
|
2708
|
+
] }, s.dataKey)) })
|
|
2709
|
+
] });
|
|
2710
|
+
}
|
|
2711
|
+
function ArticleBarChart({
|
|
2712
|
+
data,
|
|
2713
|
+
series,
|
|
2714
|
+
xKey,
|
|
2715
|
+
xLabel,
|
|
2716
|
+
yLabel,
|
|
2717
|
+
height = 384,
|
|
2718
|
+
stacked = false,
|
|
2719
|
+
valueFormatter,
|
|
2720
|
+
className = ""
|
|
2721
|
+
}) {
|
|
2722
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: `w-full ${className}`, children: [
|
|
2723
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.BarChart, { data, margin: { top: 8, right: 16, bottom: 4, left: 8 }, children: [
|
|
2724
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "var(--border-color)", vertical: false }),
|
|
2725
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2726
|
+
recharts.XAxis,
|
|
2727
|
+
{
|
|
2728
|
+
dataKey: xKey,
|
|
2729
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2730
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2731
|
+
tickLine: false,
|
|
2732
|
+
label: xLabel ? { value: xLabel, position: "insideBottom", offset: -2, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2733
|
+
}
|
|
2734
|
+
),
|
|
2735
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2736
|
+
recharts.YAxis,
|
|
2737
|
+
{
|
|
2738
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2739
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2740
|
+
tickLine: false,
|
|
2741
|
+
label: yLabel ? { value: yLabel, angle: -90, position: "insideLeft", offset: 4, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2742
|
+
}
|
|
2743
|
+
),
|
|
2744
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2745
|
+
recharts.Tooltip,
|
|
2746
|
+
{
|
|
2747
|
+
content: ({ active, payload, label }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2748
|
+
ChartTooltip,
|
|
2749
|
+
{
|
|
2750
|
+
active,
|
|
2751
|
+
payload,
|
|
2752
|
+
label,
|
|
2753
|
+
xLabel,
|
|
2754
|
+
valueFormatter
|
|
2755
|
+
}
|
|
2756
|
+
)
|
|
2757
|
+
}
|
|
2758
|
+
),
|
|
2759
|
+
series.map((s) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2760
|
+
recharts.Bar,
|
|
2761
|
+
{
|
|
2762
|
+
dataKey: s.dataKey,
|
|
2763
|
+
name: s.name,
|
|
2764
|
+
fill: s.color,
|
|
2765
|
+
radius: [4, 4, 0, 0],
|
|
2766
|
+
stackId: stacked ? "stack" : void 0
|
|
2767
|
+
},
|
|
2768
|
+
s.dataKey
|
|
2769
|
+
))
|
|
2770
|
+
] }) }) }),
|
|
2771
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4 mt-3 flex-wrap", children: series.map((s) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2772
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-3 h-3 rounded-sm shrink-0", style: { backgroundColor: s.color } }),
|
|
2773
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] leading-4 text-[var(--fg-secondary)]", children: s.name })
|
|
2774
|
+
] }, s.dataKey)) })
|
|
2775
|
+
] });
|
|
2776
|
+
}
|
|
2777
|
+
function ArticleScatterChart({
|
|
2778
|
+
data,
|
|
2779
|
+
color = "#818cf8",
|
|
2780
|
+
xLabel,
|
|
2781
|
+
yLabel,
|
|
2782
|
+
height = 384,
|
|
2783
|
+
xScale = "auto",
|
|
2784
|
+
valueFormatter,
|
|
2785
|
+
className = ""
|
|
2786
|
+
}) {
|
|
2787
|
+
const colors = data.map((d) => {
|
|
2788
|
+
var _a;
|
|
2789
|
+
return (_a = d.color) != null ? _a : color;
|
|
2790
|
+
});
|
|
2791
|
+
return /* @__PURE__ */ jsxRuntime.jsx("figure", { className: `w-full ${className}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.ScatterChart, { margin: { top: 8, right: 16, bottom: 4, left: 8 }, children: [
|
|
2792
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { strokeDasharray: "3 3", stroke: "var(--border-color)" }),
|
|
2793
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2794
|
+
recharts.XAxis,
|
|
2795
|
+
{
|
|
2796
|
+
dataKey: "x",
|
|
2797
|
+
type: "number",
|
|
2798
|
+
scale: xScale,
|
|
2799
|
+
domain: ["auto", "auto"],
|
|
2800
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2801
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2802
|
+
tickLine: false,
|
|
2803
|
+
name: xLabel,
|
|
2804
|
+
label: xLabel ? { value: xLabel, position: "insideBottom", offset: -2, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2805
|
+
}
|
|
2806
|
+
),
|
|
2807
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2808
|
+
recharts.YAxis,
|
|
2809
|
+
{
|
|
2810
|
+
dataKey: "y",
|
|
2811
|
+
type: "number",
|
|
2812
|
+
tick: { fontSize: 12, fill: "var(--fg-muted)" },
|
|
2813
|
+
axisLine: { stroke: "var(--border-color)" },
|
|
2814
|
+
tickLine: false,
|
|
2815
|
+
name: yLabel,
|
|
2816
|
+
label: yLabel ? { value: yLabel, angle: -90, position: "insideLeft", offset: 4, fontSize: 12, fill: "var(--fg-muted)" } : void 0
|
|
2817
|
+
}
|
|
2818
|
+
),
|
|
2819
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2820
|
+
recharts.Tooltip,
|
|
2821
|
+
{
|
|
2822
|
+
content: ({ active, payload }) => {
|
|
2823
|
+
var _a;
|
|
2824
|
+
if (!active || !(payload == null ? void 0 : payload.length)) return null;
|
|
2825
|
+
const point = (_a = payload[0]) == null ? void 0 : _a.payload;
|
|
2826
|
+
const fmt = valueFormatter != null ? valueFormatter : ((v) => String(v));
|
|
2827
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[var(--bg)] border border-[var(--border-color)] rounded-[var(--radius-md)] shadow-[var(--shadow-md)] px-3 py-2 text-[12px] leading-4", children: [
|
|
2828
|
+
point.label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-[var(--fg)] mb-1", children: point.label }),
|
|
2829
|
+
xLabel && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[var(--fg-secondary)]", children: [
|
|
2830
|
+
xLabel,
|
|
2831
|
+
": ",
|
|
2832
|
+
fmt(point.x)
|
|
2833
|
+
] }),
|
|
2834
|
+
yLabel && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[var(--fg-secondary)]", children: [
|
|
2835
|
+
yLabel,
|
|
2836
|
+
": ",
|
|
2837
|
+
fmt(point.y)
|
|
2838
|
+
] })
|
|
2839
|
+
] });
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
),
|
|
2843
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.Scatter, { data, children: data.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: colors[i], r: 6 }, i)) })
|
|
2844
|
+
] }) }) }) });
|
|
2845
|
+
}
|
|
2846
|
+
function LandingLayout({
|
|
2847
|
+
mode = "header",
|
|
2848
|
+
nav,
|
|
2849
|
+
children,
|
|
2850
|
+
className = ""
|
|
2851
|
+
}) {
|
|
2852
|
+
if (mode === "sidebar") {
|
|
2853
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex min-h-screen bg-[var(--bg)] ${className}`, children: [
|
|
2854
|
+
nav && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex shrink-0", children: nav }),
|
|
2855
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 md:px-10 lg:px-16 max-w-5xl", children }) })
|
|
2856
|
+
] });
|
|
2857
|
+
}
|
|
2858
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `min-h-screen bg-[var(--bg)] ${className}`, children: [
|
|
2859
|
+
nav,
|
|
2860
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children })
|
|
2861
|
+
] });
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
exports.Alert = Alert;
|
|
2865
|
+
exports.AppCard = AppCard;
|
|
2866
|
+
exports.AppTopLine = AppTopLine;
|
|
2867
|
+
exports.ArticleBarChart = ArticleBarChart;
|
|
2868
|
+
exports.ArticleBody = ArticleBody;
|
|
2869
|
+
exports.ArticleChatBlock = ArticleChatBlock;
|
|
2870
|
+
exports.ArticleFigure = ArticleFigure;
|
|
2871
|
+
exports.ArticleFooter = ArticleFooter;
|
|
2872
|
+
exports.ArticleHeading = ArticleHeading;
|
|
2873
|
+
exports.ArticleHero = ArticleHero;
|
|
2874
|
+
exports.ArticleLayout = ArticleLayout;
|
|
2875
|
+
exports.ArticleLineChart = ArticleLineChart;
|
|
2876
|
+
exports.ArticleLinkButton = ArticleLinkButton;
|
|
2877
|
+
exports.ArticleList = ArticleList;
|
|
2878
|
+
exports.ArticleNarrow = ArticleNarrow;
|
|
2879
|
+
exports.ArticleNote = ArticleNote;
|
|
2880
|
+
exports.ArticleScatterChart = ArticleScatterChart;
|
|
2881
|
+
exports.ArticleTable = ArticleTable;
|
|
2882
|
+
exports.ArticleWide = ArticleWide;
|
|
2883
|
+
exports.Avatar = Avatar;
|
|
2884
|
+
exports.Badge = Badge;
|
|
2885
|
+
exports.BentoGrid = BentoGrid;
|
|
2886
|
+
exports.Breadcrumbs = Breadcrumbs;
|
|
2887
|
+
exports.Button = Button;
|
|
2888
|
+
exports.CTASection = CTASection;
|
|
2889
|
+
exports.Card = Card;
|
|
2890
|
+
exports.ChatInput = ChatInput;
|
|
2891
|
+
exports.ChatMessage = ChatMessage;
|
|
2892
|
+
exports.Checkbox = Checkbox;
|
|
2893
|
+
exports.CodeInput = CodeInput;
|
|
2894
|
+
exports.ComparisonTable = ComparisonTable;
|
|
2895
|
+
exports.Divider = Divider;
|
|
2896
|
+
exports.DropdownMenu = DropdownMenu;
|
|
2897
|
+
exports.EmptyState = EmptyState;
|
|
2898
|
+
exports.FAQSection = FAQSection;
|
|
2899
|
+
exports.FeatureGrid = FeatureGrid;
|
|
2900
|
+
exports.Footer = Footer;
|
|
2901
|
+
exports.FormField = FormField;
|
|
2902
|
+
exports.Header = Header;
|
|
2903
|
+
exports.HeroSection = HeroSection;
|
|
2904
|
+
exports.IconButton = IconButton;
|
|
2905
|
+
exports.IconWithText = IconWithText;
|
|
2906
|
+
exports.IconlyActivity = IconlyActivity;
|
|
2907
|
+
exports.IconlyAttach = IconlyAttach;
|
|
2908
|
+
exports.IconlyBook = IconlyBook;
|
|
2909
|
+
exports.IconlyCheck = IconlyCheck;
|
|
2910
|
+
exports.IconlyChevronDown = IconlyChevronDown;
|
|
2911
|
+
exports.IconlyChevronLeft = IconlyChevronLeft;
|
|
2912
|
+
exports.IconlyChevronRight = IconlyChevronRight;
|
|
2913
|
+
exports.IconlyClose = IconlyClose;
|
|
2914
|
+
exports.IconlyError = IconlyError;
|
|
2915
|
+
exports.IconlyEye = IconlyEye;
|
|
2916
|
+
exports.IconlyEyeOff = IconlyEyeOff;
|
|
2917
|
+
exports.IconlyHeart = IconlyHeart;
|
|
2918
|
+
exports.IconlyInfo = IconlyInfo;
|
|
2919
|
+
exports.IconlyInfoCircle = IconlyInfoCircle;
|
|
2920
|
+
exports.IconlyLink = IconlyLink;
|
|
2921
|
+
exports.IconlyLock = IconlyLock;
|
|
2922
|
+
exports.IconlyMail = IconlyMail;
|
|
2923
|
+
exports.IconlyMenu = IconlyMenu;
|
|
2924
|
+
exports.IconlyMoon = IconlyMoon;
|
|
2925
|
+
exports.IconlyQuote = IconlyQuote;
|
|
2926
|
+
exports.IconlyRoadmap = IconlyRoadmap;
|
|
2927
|
+
exports.IconlySandbox = IconlySandbox;
|
|
2928
|
+
exports.IconlySearch = IconlySearch;
|
|
2929
|
+
exports.IconlySend = IconlySend;
|
|
2930
|
+
exports.IconlySmile = IconlySmile;
|
|
2931
|
+
exports.IconlyStar = IconlyStar;
|
|
2932
|
+
exports.IconlySuccess = IconlySuccess;
|
|
2933
|
+
exports.IconlySun = IconlySun;
|
|
2934
|
+
exports.IconlyWarning = IconlyWarning;
|
|
2935
|
+
exports.Input = Input;
|
|
2936
|
+
exports.LandingLayout = LandingLayout;
|
|
2937
|
+
exports.Logo = Logo;
|
|
2938
|
+
exports.LogoCloud = LogoCloud;
|
|
2939
|
+
exports.MenuItem = MenuItem;
|
|
2940
|
+
exports.Modal = Modal;
|
|
2941
|
+
exports.Pagination = Pagination;
|
|
2942
|
+
exports.PasswordInput = PasswordInput;
|
|
2943
|
+
exports.PricingCard = PricingCard;
|
|
2944
|
+
exports.ProfileNav = ProfileNav;
|
|
2945
|
+
exports.PromoActionCards = PromoActionCards;
|
|
2946
|
+
exports.PromoBento = PromoBento;
|
|
2947
|
+
exports.PromoDevicesCTA = PromoDevicesCTA;
|
|
2948
|
+
exports.PromoHero = PromoHero;
|
|
2949
|
+
exports.PromoPricing = PromoPricing;
|
|
2950
|
+
exports.PromoShowcase = PromoShowcase;
|
|
2951
|
+
exports.PromoSplit = PromoSplit;
|
|
2952
|
+
exports.PromoTestimonials = PromoTestimonials;
|
|
2953
|
+
exports.PromoTrustGrid = PromoTrustGrid;
|
|
2954
|
+
exports.Radio = Radio;
|
|
2955
|
+
exports.SearchBar = SearchBar;
|
|
2956
|
+
exports.Select = Select;
|
|
2957
|
+
exports.Sidebar = Sidebar;
|
|
2958
|
+
exports.Skeleton = Skeleton;
|
|
2959
|
+
exports.Spinner = Spinner;
|
|
2960
|
+
exports.StampCard = StampCard;
|
|
2961
|
+
exports.Stat = Stat;
|
|
2962
|
+
exports.StatBadge = StatBadge;
|
|
2963
|
+
exports.StatsBar = StatsBar;
|
|
2964
|
+
exports.StyledLink = Link;
|
|
2965
|
+
exports.Tabs = Tabs;
|
|
2966
|
+
exports.Tag = Tag;
|
|
2967
|
+
exports.TestimonialCard = TestimonialCard;
|
|
2968
|
+
exports.Textarea = Textarea;
|
|
2969
|
+
exports.TicketButton = TicketButton;
|
|
2970
|
+
exports.Toast = Toast;
|
|
2971
|
+
exports.Toggle = Toggle;
|
|
2972
|
+
exports.Tooltip = Tooltip;
|
|
2973
|
+
exports.TopPromo = TopPromo;
|