@enterprise-ui-react/react 1.0.6
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/LICENSE +21 -0
- package/README.md +299 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/chunk-65BLOLLD.cjs +684 -0
- package/dist/chunk-EMI46XY6.js +669 -0
- package/dist/index.cjs +2331 -0
- package/dist/index.d.cts +586 -0
- package/dist/index.d.ts +586 -0
- package/dist/index.js +2112 -0
- package/dist/styles.css +1 -0
- package/dist/tokens/index.cjs +62 -0
- package/dist/tokens/index.d.cts +725 -0
- package/dist/tokens/index.d.ts +725 -0
- package/dist/tokens/index.js +1 -0
- package/figma-gradients.json +76 -0
- package/figma-tokens.json +89 -0
- package/figma-typography.json +39 -0
- package/package.json +133 -0
- package/src/styles/variables.css +272 -0
- package/src/styles/variables.scss +271 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2331 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk65BLOLLD_cjs = require('./chunk-65BLOLLD.cjs');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var tailwindMerge = require('tailwind-merge');
|
|
6
|
+
var React6 = require('react');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
9
|
+
var framerMotion = require('framer-motion');
|
|
10
|
+
var lucideReact = require('lucide-react');
|
|
11
|
+
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
12
|
+
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
13
|
+
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
14
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
15
|
+
var ToastPrimitives = require('@radix-ui/react-toast');
|
|
16
|
+
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
17
|
+
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
18
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
19
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
20
|
+
|
|
21
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
|
|
23
|
+
function _interopNamespace(e) {
|
|
24
|
+
if (e && e.__esModule) return e;
|
|
25
|
+
var n = Object.create(null);
|
|
26
|
+
if (e) {
|
|
27
|
+
Object.keys(e).forEach(function (k) {
|
|
28
|
+
if (k !== 'default') {
|
|
29
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
30
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return e[k]; }
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
n.default = e;
|
|
38
|
+
return Object.freeze(n);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
42
|
+
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
43
|
+
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
44
|
+
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
45
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
46
|
+
var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives);
|
|
47
|
+
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
48
|
+
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
49
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
50
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
51
|
+
|
|
52
|
+
function cn(...inputs) {
|
|
53
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/utils/theme.ts
|
|
57
|
+
var THEME_STORAGE_KEY = "enterprise-ui-theme";
|
|
58
|
+
function getSystemTheme() {
|
|
59
|
+
if (typeof window === "undefined") return "light";
|
|
60
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
61
|
+
}
|
|
62
|
+
function getStoredTheme() {
|
|
63
|
+
if (typeof window === "undefined") return null;
|
|
64
|
+
return localStorage.getItem(THEME_STORAGE_KEY) || null;
|
|
65
|
+
}
|
|
66
|
+
function setStoredTheme(theme) {
|
|
67
|
+
if (typeof window === "undefined") return;
|
|
68
|
+
localStorage.setItem(THEME_STORAGE_KEY, theme);
|
|
69
|
+
}
|
|
70
|
+
function getResolvedTheme(theme) {
|
|
71
|
+
if (theme === "system") {
|
|
72
|
+
return getSystemTheme();
|
|
73
|
+
}
|
|
74
|
+
return theme;
|
|
75
|
+
}
|
|
76
|
+
function applyTheme(theme) {
|
|
77
|
+
if (typeof window === "undefined") return;
|
|
78
|
+
const root = window.document.documentElement;
|
|
79
|
+
root.classList.remove("light", "dark");
|
|
80
|
+
root.classList.add(theme);
|
|
81
|
+
}
|
|
82
|
+
function initializeTheme() {
|
|
83
|
+
const stored = getStoredTheme() || "system";
|
|
84
|
+
const resolved = getResolvedTheme(stored);
|
|
85
|
+
applyTheme(resolved);
|
|
86
|
+
return resolved;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/utils/accessibility.ts
|
|
90
|
+
function generateId(prefix = "enterprise-ui") {
|
|
91
|
+
return `${prefix}-${Math.random().toString(36).substr(2, 9)}`;
|
|
92
|
+
}
|
|
93
|
+
function isFocusable(element) {
|
|
94
|
+
if (element.tabIndex < 0) return false;
|
|
95
|
+
if (element.hasAttribute("disabled")) return false;
|
|
96
|
+
const tagName = element.tagName.toLowerCase();
|
|
97
|
+
const focusableTags = ["a", "button", "input", "select", "textarea"];
|
|
98
|
+
if (focusableTags.includes(tagName)) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
return element.tabIndex >= 0;
|
|
102
|
+
}
|
|
103
|
+
function getFocusableElements(container) {
|
|
104
|
+
const selector = [
|
|
105
|
+
"a[href]",
|
|
106
|
+
"button:not([disabled])",
|
|
107
|
+
"input:not([disabled])",
|
|
108
|
+
"select:not([disabled])",
|
|
109
|
+
"textarea:not([disabled])",
|
|
110
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
111
|
+
].join(", ");
|
|
112
|
+
return Array.from(container.querySelectorAll(selector));
|
|
113
|
+
}
|
|
114
|
+
function trapFocus(container, event) {
|
|
115
|
+
if (event.key !== "Tab") return;
|
|
116
|
+
const focusableElements = getFocusableElements(container);
|
|
117
|
+
if (focusableElements.length === 0) return;
|
|
118
|
+
const firstElement = focusableElements[0];
|
|
119
|
+
const lastElement = focusableElements[focusableElements.length - 1];
|
|
120
|
+
if (event.shiftKey) {
|
|
121
|
+
if (document.activeElement === firstElement) {
|
|
122
|
+
event.preventDefault();
|
|
123
|
+
lastElement.focus();
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
if (document.activeElement === lastElement) {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
firstElement.focus();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function announceToScreenReader(message, priority = "polite") {
|
|
133
|
+
if (typeof document === "undefined") return;
|
|
134
|
+
const announcement = document.createElement("div");
|
|
135
|
+
announcement.setAttribute("role", "status");
|
|
136
|
+
announcement.setAttribute("aria-live", priority);
|
|
137
|
+
announcement.setAttribute("aria-atomic", "true");
|
|
138
|
+
announcement.className = "sr-only";
|
|
139
|
+
announcement.textContent = message;
|
|
140
|
+
document.body.appendChild(announcement);
|
|
141
|
+
setTimeout(() => {
|
|
142
|
+
document.body.removeChild(announcement);
|
|
143
|
+
}, 1e3);
|
|
144
|
+
}
|
|
145
|
+
function getContrastRatio(color1, color2) {
|
|
146
|
+
const getLuminance = (color) => {
|
|
147
|
+
const hex = color.replace("#", "");
|
|
148
|
+
const r = parseInt(hex.substr(0, 2), 16) / 255;
|
|
149
|
+
const g = parseInt(hex.substr(2, 2), 16) / 255;
|
|
150
|
+
const b = parseInt(hex.substr(4, 2), 16) / 255;
|
|
151
|
+
const [rs, gs, bs] = [r, g, b].map(
|
|
152
|
+
(c) => c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4)
|
|
153
|
+
);
|
|
154
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
155
|
+
};
|
|
156
|
+
const l1 = getLuminance(color1);
|
|
157
|
+
const l2 = getLuminance(color2);
|
|
158
|
+
const lighter = Math.max(l1, l2);
|
|
159
|
+
const darker = Math.min(l1, l2);
|
|
160
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
161
|
+
}
|
|
162
|
+
function meetsWCAGAA(foreground, background, largeText = false) {
|
|
163
|
+
const ratio = getContrastRatio(foreground, background);
|
|
164
|
+
return largeText ? ratio >= 3 : ratio >= 4.5;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// src/utils/responsive.ts
|
|
168
|
+
function matchesBreakpoint(breakpoint) {
|
|
169
|
+
if (typeof window === "undefined") return false;
|
|
170
|
+
return window.innerWidth >= chunk65BLOLLD_cjs.breakpointValues[breakpoint];
|
|
171
|
+
}
|
|
172
|
+
function getCurrentBreakpoint() {
|
|
173
|
+
if (typeof window === "undefined") return "sm";
|
|
174
|
+
const width = window.innerWidth;
|
|
175
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues["3xl"]) return "3xl";
|
|
176
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues["2xl"]) return "2xl";
|
|
177
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues.xl) return "xl";
|
|
178
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues.lg) return "lg";
|
|
179
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues.md) return "md";
|
|
180
|
+
if (width >= chunk65BLOLLD_cjs.breakpointValues.sm) return "sm";
|
|
181
|
+
return "xs";
|
|
182
|
+
}
|
|
183
|
+
function isMobile() {
|
|
184
|
+
if (typeof window === "undefined") return false;
|
|
185
|
+
return window.innerWidth < chunk65BLOLLD_cjs.breakpointValues.md;
|
|
186
|
+
}
|
|
187
|
+
function isTablet() {
|
|
188
|
+
if (typeof window === "undefined") return false;
|
|
189
|
+
return window.innerWidth >= chunk65BLOLLD_cjs.breakpointValues.md && window.innerWidth < chunk65BLOLLD_cjs.breakpointValues.lg;
|
|
190
|
+
}
|
|
191
|
+
function isDesktop() {
|
|
192
|
+
if (typeof window === "undefined") return false;
|
|
193
|
+
return window.innerWidth >= chunk65BLOLLD_cjs.breakpointValues.lg;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// src/utils/format.ts
|
|
197
|
+
function formatNumber(num, options) {
|
|
198
|
+
return new Intl.NumberFormat("en-US", options).format(num);
|
|
199
|
+
}
|
|
200
|
+
function formatCurrency(amount, currency = "USD", locale = "en-US") {
|
|
201
|
+
return new Intl.NumberFormat(locale, {
|
|
202
|
+
style: "currency",
|
|
203
|
+
currency
|
|
204
|
+
}).format(amount);
|
|
205
|
+
}
|
|
206
|
+
function formatPercent(value, decimals = 0, locale = "en-US") {
|
|
207
|
+
return new Intl.NumberFormat(locale, {
|
|
208
|
+
style: "percent",
|
|
209
|
+
minimumFractionDigits: decimals,
|
|
210
|
+
maximumFractionDigits: decimals
|
|
211
|
+
}).format(value);
|
|
212
|
+
}
|
|
213
|
+
function formatDate(date, format = "medium", locale = "en-US") {
|
|
214
|
+
const d = new Date(date);
|
|
215
|
+
return new Intl.DateTimeFormat(locale, { dateStyle: format }).format(d);
|
|
216
|
+
}
|
|
217
|
+
function formatRelativeTime(date, locale = "en-US") {
|
|
218
|
+
const d = new Date(date);
|
|
219
|
+
const now = /* @__PURE__ */ new Date();
|
|
220
|
+
const diffInSeconds = Math.floor((now.getTime() - d.getTime()) / 1e3);
|
|
221
|
+
const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
|
|
222
|
+
if (diffInSeconds < 60) return rtf.format(-diffInSeconds, "second");
|
|
223
|
+
if (diffInSeconds < 3600) return rtf.format(-Math.floor(diffInSeconds / 60), "minute");
|
|
224
|
+
if (diffInSeconds < 86400) return rtf.format(-Math.floor(diffInSeconds / 3600), "hour");
|
|
225
|
+
if (diffInSeconds < 604800) return rtf.format(-Math.floor(diffInSeconds / 86400), "day");
|
|
226
|
+
if (diffInSeconds < 2592e3) return rtf.format(-Math.floor(diffInSeconds / 604800), "week");
|
|
227
|
+
if (diffInSeconds < 31536e3) return rtf.format(-Math.floor(diffInSeconds / 2592e3), "month");
|
|
228
|
+
return rtf.format(-Math.floor(diffInSeconds / 31536e3), "year");
|
|
229
|
+
}
|
|
230
|
+
function formatFileSize(bytes, decimals = 2) {
|
|
231
|
+
if (bytes === 0) return "0 Bytes";
|
|
232
|
+
const k = 1024;
|
|
233
|
+
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
234
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
235
|
+
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(decimals))} ${sizes[i]}`;
|
|
236
|
+
}
|
|
237
|
+
function truncate(text, maxLength) {
|
|
238
|
+
if (text.length <= maxLength) return text;
|
|
239
|
+
return `${text.slice(0, maxLength - 3)}...`;
|
|
240
|
+
}
|
|
241
|
+
function toTitleCase(str) {
|
|
242
|
+
return str.replace(
|
|
243
|
+
/\w\S*/g,
|
|
244
|
+
(txt) => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
function toKebabCase(str) {
|
|
248
|
+
return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
249
|
+
}
|
|
250
|
+
function toCamelCase(str) {
|
|
251
|
+
return str.replace(
|
|
252
|
+
/(?:^\w|[A-Z]|\b\w)/g,
|
|
253
|
+
(word, index) => index === 0 ? word.toLowerCase() : word.toUpperCase()
|
|
254
|
+
).replace(/[\s-_]+/g, "");
|
|
255
|
+
}
|
|
256
|
+
var ThemeContext = React6.createContext(void 0);
|
|
257
|
+
function ThemeProvider({
|
|
258
|
+
children,
|
|
259
|
+
defaultTheme = "system"
|
|
260
|
+
}) {
|
|
261
|
+
const [theme, setThemeState] = React6.useState(
|
|
262
|
+
() => getStoredTheme() || defaultTheme
|
|
263
|
+
);
|
|
264
|
+
const [resolvedTheme, setResolvedTheme] = React6.useState(
|
|
265
|
+
() => getResolvedTheme(theme)
|
|
266
|
+
);
|
|
267
|
+
React6.useEffect(() => {
|
|
268
|
+
const resolved = getResolvedTheme(theme);
|
|
269
|
+
setResolvedTheme(resolved);
|
|
270
|
+
applyTheme(resolved);
|
|
271
|
+
}, [theme]);
|
|
272
|
+
React6.useEffect(() => {
|
|
273
|
+
if (theme !== "system") return;
|
|
274
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
275
|
+
const handleChange = () => {
|
|
276
|
+
const resolved = getSystemTheme();
|
|
277
|
+
setResolvedTheme(resolved);
|
|
278
|
+
applyTheme(resolved);
|
|
279
|
+
};
|
|
280
|
+
mediaQuery.addEventListener("change", handleChange);
|
|
281
|
+
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
282
|
+
}, [theme]);
|
|
283
|
+
const setTheme = (newTheme) => {
|
|
284
|
+
setThemeState(newTheme);
|
|
285
|
+
setStoredTheme(newTheme);
|
|
286
|
+
};
|
|
287
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children });
|
|
288
|
+
}
|
|
289
|
+
function useTheme() {
|
|
290
|
+
const context = React6.useContext(ThemeContext);
|
|
291
|
+
if (context === void 0) {
|
|
292
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
293
|
+
}
|
|
294
|
+
return context;
|
|
295
|
+
}
|
|
296
|
+
var typographyVariants = classVarianceAuthority.cva("", {
|
|
297
|
+
variants: {
|
|
298
|
+
variant: {
|
|
299
|
+
h1: "text-5xl font-bold tracking-tight leading-tight",
|
|
300
|
+
h2: "text-4xl font-bold tracking-tight",
|
|
301
|
+
h3: "text-3xl font-semibold tracking-tight",
|
|
302
|
+
h4: "text-2xl font-semibold",
|
|
303
|
+
h5: "text-xl font-semibold",
|
|
304
|
+
h6: "text-lg font-semibold",
|
|
305
|
+
body: "text-base font-normal",
|
|
306
|
+
bodyLarge: "text-lg font-normal",
|
|
307
|
+
bodySmall: "text-sm font-normal",
|
|
308
|
+
label: "text-sm font-medium",
|
|
309
|
+
caption: "text-xs font-normal",
|
|
310
|
+
overline: "text-xs font-semibold uppercase tracking-wide",
|
|
311
|
+
code: "font-mono text-sm"
|
|
312
|
+
},
|
|
313
|
+
color: {
|
|
314
|
+
primary: "text-text-primary dark:text-dark-text-primary",
|
|
315
|
+
secondary: "text-text-secondary dark:text-dark-text-secondary",
|
|
316
|
+
tertiary: "text-text-tertiary dark:text-dark-text-tertiary",
|
|
317
|
+
disabled: "text-text-disabled dark:text-dark-text-disabled",
|
|
318
|
+
inverse: "text-text-inverse",
|
|
319
|
+
link: "text-text-link dark:text-dark-text-link hover:text-text-linkHover dark:hover:text-dark-text-linkHover",
|
|
320
|
+
success: "text-success-dark dark:text-success-light",
|
|
321
|
+
warning: "text-warning-dark dark:text-warning-light",
|
|
322
|
+
error: "text-error-dark dark:text-error-light",
|
|
323
|
+
info: "text-info-dark dark:text-info-light"
|
|
324
|
+
},
|
|
325
|
+
align: {
|
|
326
|
+
left: "text-left",
|
|
327
|
+
center: "text-center",
|
|
328
|
+
right: "text-right",
|
|
329
|
+
justify: "text-justify"
|
|
330
|
+
},
|
|
331
|
+
weight: {
|
|
332
|
+
normal: "font-normal",
|
|
333
|
+
medium: "font-medium",
|
|
334
|
+
semibold: "font-semibold",
|
|
335
|
+
bold: "font-bold"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
defaultVariants: {
|
|
339
|
+
variant: "body",
|
|
340
|
+
color: "primary",
|
|
341
|
+
align: "left"
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
var Typography = React6__default.default.forwardRef(
|
|
345
|
+
({
|
|
346
|
+
as,
|
|
347
|
+
variant = "body",
|
|
348
|
+
color,
|
|
349
|
+
align,
|
|
350
|
+
weight,
|
|
351
|
+
truncate: truncate2,
|
|
352
|
+
className,
|
|
353
|
+
children,
|
|
354
|
+
...props
|
|
355
|
+
}, ref) => {
|
|
356
|
+
const Component = as || getDefaultElement(variant);
|
|
357
|
+
return React6__default.default.createElement(
|
|
358
|
+
Component,
|
|
359
|
+
{
|
|
360
|
+
ref,
|
|
361
|
+
className: cn(
|
|
362
|
+
typographyVariants({ variant, color, align, weight }),
|
|
363
|
+
truncate2 && "truncate",
|
|
364
|
+
className
|
|
365
|
+
),
|
|
366
|
+
...props
|
|
367
|
+
},
|
|
368
|
+
children
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
Typography.displayName = "Typography";
|
|
373
|
+
function getDefaultElement(variant) {
|
|
374
|
+
switch (variant) {
|
|
375
|
+
case "h1":
|
|
376
|
+
return "h1";
|
|
377
|
+
case "h2":
|
|
378
|
+
return "h2";
|
|
379
|
+
case "h3":
|
|
380
|
+
return "h3";
|
|
381
|
+
case "h4":
|
|
382
|
+
return "h4";
|
|
383
|
+
case "h5":
|
|
384
|
+
return "h5";
|
|
385
|
+
case "h6":
|
|
386
|
+
return "h6";
|
|
387
|
+
case "code":
|
|
388
|
+
return "code";
|
|
389
|
+
case "overline":
|
|
390
|
+
case "caption":
|
|
391
|
+
case "label":
|
|
392
|
+
return "span";
|
|
393
|
+
default:
|
|
394
|
+
return "p";
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
var H1 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h1", ...props });
|
|
398
|
+
var H2 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h2", ...props });
|
|
399
|
+
var H3 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h3", ...props });
|
|
400
|
+
var H4 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h4", ...props });
|
|
401
|
+
var H5 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h5", ...props });
|
|
402
|
+
var H6 = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h6", ...props });
|
|
403
|
+
var Text = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", ...props });
|
|
404
|
+
var Label = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "label", ...props });
|
|
405
|
+
var Caption = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "caption", ...props });
|
|
406
|
+
var Code = (props) => /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "code", ...props });
|
|
407
|
+
var iconVariants = classVarianceAuthority.cva("", {
|
|
408
|
+
variants: {
|
|
409
|
+
size: {
|
|
410
|
+
xs: "w-3 h-3",
|
|
411
|
+
sm: "w-4 h-4",
|
|
412
|
+
md: "w-5 h-5",
|
|
413
|
+
lg: "w-6 h-6",
|
|
414
|
+
xl: "w-8 h-8",
|
|
415
|
+
"2xl": "w-10 h-10"
|
|
416
|
+
},
|
|
417
|
+
color: {
|
|
418
|
+
primary: "text-text-primary dark:text-dark-text-primary",
|
|
419
|
+
secondary: "text-text-secondary dark:text-dark-text-secondary",
|
|
420
|
+
tertiary: "text-text-tertiary dark:text-dark-text-tertiary",
|
|
421
|
+
disabled: "text-text-disabled dark:text-dark-text-disabled",
|
|
422
|
+
inverse: "text-text-inverse",
|
|
423
|
+
accent: "text-primary dark:text-primary",
|
|
424
|
+
success: "text-success dark:text-success",
|
|
425
|
+
warning: "text-warning dark:text-warning",
|
|
426
|
+
error: "text-error dark:text-error",
|
|
427
|
+
info: "text-info dark:text-info"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
defaultVariants: {
|
|
431
|
+
size: "md",
|
|
432
|
+
color: "primary"
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
var Icon = React6__default.default.forwardRef(
|
|
436
|
+
({ icon: IconComponent, size, color, className, ...props }, ref) => {
|
|
437
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
438
|
+
IconComponent,
|
|
439
|
+
{
|
|
440
|
+
ref,
|
|
441
|
+
className: cn(iconVariants({ size, color }), className),
|
|
442
|
+
...props
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
Icon.displayName = "Icon";
|
|
448
|
+
var FadeIn = ({
|
|
449
|
+
delay = 0,
|
|
450
|
+
duration = 0.2,
|
|
451
|
+
children,
|
|
452
|
+
...props
|
|
453
|
+
}) => {
|
|
454
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
455
|
+
framerMotion.motion.div,
|
|
456
|
+
{
|
|
457
|
+
initial: { opacity: 0 },
|
|
458
|
+
animate: { opacity: 1 },
|
|
459
|
+
exit: { opacity: 0 },
|
|
460
|
+
transition: { duration, delay },
|
|
461
|
+
...props,
|
|
462
|
+
children
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
};
|
|
466
|
+
FadeIn.displayName = "FadeIn";
|
|
467
|
+
var SlideIn = ({
|
|
468
|
+
direction = "up",
|
|
469
|
+
delay = 0,
|
|
470
|
+
duration = 0.3,
|
|
471
|
+
distance = 100,
|
|
472
|
+
children,
|
|
473
|
+
...props
|
|
474
|
+
}) => {
|
|
475
|
+
const getInitialPosition = () => {
|
|
476
|
+
switch (direction) {
|
|
477
|
+
case "up":
|
|
478
|
+
return { y: distance, x: 0 };
|
|
479
|
+
case "down":
|
|
480
|
+
return { y: -distance, x: 0 };
|
|
481
|
+
case "left":
|
|
482
|
+
return { x: distance, y: 0 };
|
|
483
|
+
case "right":
|
|
484
|
+
return { x: -distance, y: 0 };
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
488
|
+
framerMotion.motion.div,
|
|
489
|
+
{
|
|
490
|
+
initial: { ...getInitialPosition(), opacity: 0 },
|
|
491
|
+
animate: { x: 0, y: 0, opacity: 1 },
|
|
492
|
+
exit: { ...getInitialPosition(), opacity: 0 },
|
|
493
|
+
transition: { duration, delay, ease: [0, 0, 0.2, 1] },
|
|
494
|
+
...props,
|
|
495
|
+
children
|
|
496
|
+
}
|
|
497
|
+
);
|
|
498
|
+
};
|
|
499
|
+
SlideIn.displayName = "SlideIn";
|
|
500
|
+
var ScaleIn = ({
|
|
501
|
+
delay = 0,
|
|
502
|
+
duration = 0.2,
|
|
503
|
+
initialScale = 0.95,
|
|
504
|
+
children,
|
|
505
|
+
...props
|
|
506
|
+
}) => {
|
|
507
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
508
|
+
framerMotion.motion.div,
|
|
509
|
+
{
|
|
510
|
+
initial: { scale: initialScale, opacity: 0 },
|
|
511
|
+
animate: { scale: 1, opacity: 1 },
|
|
512
|
+
exit: { scale: initialScale, opacity: 0 },
|
|
513
|
+
transition: { duration, delay, ease: [0, 0, 0.2, 1] },
|
|
514
|
+
...props,
|
|
515
|
+
children
|
|
516
|
+
}
|
|
517
|
+
);
|
|
518
|
+
};
|
|
519
|
+
ScaleIn.displayName = "ScaleIn";
|
|
520
|
+
var Stagger = ({
|
|
521
|
+
staggerDelay = 0.1,
|
|
522
|
+
children,
|
|
523
|
+
...props
|
|
524
|
+
}) => {
|
|
525
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
526
|
+
framerMotion.motion.div,
|
|
527
|
+
{
|
|
528
|
+
initial: "hidden",
|
|
529
|
+
animate: "visible",
|
|
530
|
+
variants: {
|
|
531
|
+
visible: {
|
|
532
|
+
transition: {
|
|
533
|
+
staggerChildren: staggerDelay
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
...props,
|
|
538
|
+
children
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
};
|
|
542
|
+
Stagger.displayName = "Stagger";
|
|
543
|
+
var StaggerItem = ({
|
|
544
|
+
children,
|
|
545
|
+
...props
|
|
546
|
+
}) => {
|
|
547
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
+
framerMotion.motion.div,
|
|
549
|
+
{
|
|
550
|
+
variants: {
|
|
551
|
+
hidden: { opacity: 0, y: 20 },
|
|
552
|
+
visible: { opacity: 1, y: 0 }
|
|
553
|
+
},
|
|
554
|
+
...props,
|
|
555
|
+
children
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
};
|
|
559
|
+
StaggerItem.displayName = "StaggerItem";
|
|
560
|
+
var containerVariants = classVarianceAuthority.cva("mx-auto w-full px-4 sm:px-6 lg:px-8", {
|
|
561
|
+
variants: {
|
|
562
|
+
maxWidth: {
|
|
563
|
+
xs: "max-w-screen-xs",
|
|
564
|
+
sm: "max-w-screen-sm",
|
|
565
|
+
md: "max-w-screen-md",
|
|
566
|
+
lg: "max-w-screen-lg",
|
|
567
|
+
xl: "max-w-screen-xl",
|
|
568
|
+
"2xl": "max-w-screen-2xl",
|
|
569
|
+
"3xl": "max-w-screen-3xl",
|
|
570
|
+
full: "max-w-full"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
defaultVariants: {
|
|
574
|
+
maxWidth: "xl"
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
var Container = React6__default.default.forwardRef(
|
|
578
|
+
({ as: Component = "div", maxWidth, className, ...props }, ref) => {
|
|
579
|
+
return React6__default.default.createElement(Component, {
|
|
580
|
+
ref,
|
|
581
|
+
className: cn(containerVariants({ maxWidth }), className),
|
|
582
|
+
...props
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
);
|
|
586
|
+
Container.displayName = "Container";
|
|
587
|
+
var gridVariants = classVarianceAuthority.cva("grid", {
|
|
588
|
+
variants: {
|
|
589
|
+
cols: {
|
|
590
|
+
1: "grid-cols-1",
|
|
591
|
+
2: "grid-cols-2",
|
|
592
|
+
3: "grid-cols-3",
|
|
593
|
+
4: "grid-cols-4",
|
|
594
|
+
5: "grid-cols-5",
|
|
595
|
+
6: "grid-cols-6",
|
|
596
|
+
12: "grid-cols-12"
|
|
597
|
+
},
|
|
598
|
+
gap: {
|
|
599
|
+
0: "gap-0",
|
|
600
|
+
1: "gap-1",
|
|
601
|
+
2: "gap-2",
|
|
602
|
+
3: "gap-3",
|
|
603
|
+
4: "gap-4",
|
|
604
|
+
5: "gap-5",
|
|
605
|
+
6: "gap-6",
|
|
606
|
+
8: "gap-8",
|
|
607
|
+
10: "gap-10",
|
|
608
|
+
12: "gap-12"
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
defaultVariants: {
|
|
612
|
+
cols: 1,
|
|
613
|
+
gap: 4
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
var Grid = React6__default.default.forwardRef(
|
|
617
|
+
({ as: Component = "div", cols, gap, responsive, className, ...props }, ref) => {
|
|
618
|
+
const responsiveClasses = responsive ? Object.entries(responsive).map(([breakpoint, columns]) => {
|
|
619
|
+
if (breakpoint === "sm") return `sm:grid-cols-${columns}`;
|
|
620
|
+
if (breakpoint === "md") return `md:grid-cols-${columns}`;
|
|
621
|
+
if (breakpoint === "lg") return `lg:grid-cols-${columns}`;
|
|
622
|
+
if (breakpoint === "xl") return `xl:grid-cols-${columns}`;
|
|
623
|
+
if (breakpoint === "2xl") return `2xl:grid-cols-${columns}`;
|
|
624
|
+
return "";
|
|
625
|
+
}).join(" ") : "";
|
|
626
|
+
return React6__default.default.createElement(Component, {
|
|
627
|
+
ref,
|
|
628
|
+
className: cn(gridVariants({ cols, gap }), responsiveClasses, className),
|
|
629
|
+
...props
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
);
|
|
633
|
+
Grid.displayName = "Grid";
|
|
634
|
+
var GridItem = React6__default.default.forwardRef(
|
|
635
|
+
({ colSpan, rowSpan, colStart, colEnd, rowStart, rowEnd, className, ...props }, ref) => {
|
|
636
|
+
const spanClasses = [
|
|
637
|
+
colSpan && `col-span-${colSpan}`,
|
|
638
|
+
rowSpan && `row-span-${rowSpan}`,
|
|
639
|
+
colStart && `col-start-${colStart}`,
|
|
640
|
+
colEnd && `col-end-${colEnd}`,
|
|
641
|
+
rowStart && `row-start-${rowStart}`,
|
|
642
|
+
rowEnd && `row-end-${rowEnd}`
|
|
643
|
+
].filter(Boolean).join(" ");
|
|
644
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(spanClasses, className), ...props });
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
GridItem.displayName = "GridItem";
|
|
648
|
+
var stackVariants = classVarianceAuthority.cva("flex", {
|
|
649
|
+
variants: {
|
|
650
|
+
direction: {
|
|
651
|
+
row: "flex-row",
|
|
652
|
+
column: "flex-col",
|
|
653
|
+
rowReverse: "flex-row-reverse",
|
|
654
|
+
columnReverse: "flex-col-reverse"
|
|
655
|
+
},
|
|
656
|
+
gap: {
|
|
657
|
+
0: "gap-0",
|
|
658
|
+
1: "gap-1",
|
|
659
|
+
2: "gap-2",
|
|
660
|
+
3: "gap-3",
|
|
661
|
+
4: "gap-4",
|
|
662
|
+
5: "gap-5",
|
|
663
|
+
6: "gap-6",
|
|
664
|
+
8: "gap-8",
|
|
665
|
+
10: "gap-10",
|
|
666
|
+
12: "gap-12"
|
|
667
|
+
},
|
|
668
|
+
align: {
|
|
669
|
+
start: "items-start",
|
|
670
|
+
center: "items-center",
|
|
671
|
+
end: "items-end",
|
|
672
|
+
stretch: "items-stretch",
|
|
673
|
+
baseline: "items-baseline"
|
|
674
|
+
},
|
|
675
|
+
justify: {
|
|
676
|
+
start: "justify-start",
|
|
677
|
+
center: "justify-center",
|
|
678
|
+
end: "justify-end",
|
|
679
|
+
between: "justify-between",
|
|
680
|
+
around: "justify-around",
|
|
681
|
+
evenly: "justify-evenly"
|
|
682
|
+
},
|
|
683
|
+
wrap: {
|
|
684
|
+
true: "flex-wrap",
|
|
685
|
+
false: "flex-nowrap",
|
|
686
|
+
reverse: "flex-wrap-reverse"
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
defaultVariants: {
|
|
690
|
+
direction: "column",
|
|
691
|
+
gap: 4,
|
|
692
|
+
align: "stretch",
|
|
693
|
+
justify: "start",
|
|
694
|
+
wrap: false
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
var Stack = React6__default.default.forwardRef(
|
|
698
|
+
({
|
|
699
|
+
as: Component = "div",
|
|
700
|
+
direction,
|
|
701
|
+
gap,
|
|
702
|
+
align,
|
|
703
|
+
justify,
|
|
704
|
+
wrap,
|
|
705
|
+
className,
|
|
706
|
+
...props
|
|
707
|
+
}, ref) => {
|
|
708
|
+
return React6__default.default.createElement(Component, {
|
|
709
|
+
ref,
|
|
710
|
+
className: cn(
|
|
711
|
+
stackVariants({ direction, gap, align, justify, wrap }),
|
|
712
|
+
className
|
|
713
|
+
),
|
|
714
|
+
...props
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
);
|
|
718
|
+
Stack.displayName = "Stack";
|
|
719
|
+
var HStack = React6__default.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "row", ...props }));
|
|
720
|
+
HStack.displayName = "HStack";
|
|
721
|
+
var VStack = React6__default.default.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(Stack, { ref, direction: "column", ...props }));
|
|
722
|
+
VStack.displayName = "VStack";
|
|
723
|
+
var sidebarVariants = classVarianceAuthority.cva(
|
|
724
|
+
"fixed inset-y-0 left-0 z-50 flex flex-col border-r border-border bg-background-surface transition-all duration-300",
|
|
725
|
+
{
|
|
726
|
+
variants: {
|
|
727
|
+
collapsed: {
|
|
728
|
+
true: "w-16",
|
|
729
|
+
false: "w-64"
|
|
730
|
+
},
|
|
731
|
+
mobile: {
|
|
732
|
+
true: "w-64",
|
|
733
|
+
false: ""
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
defaultVariants: {
|
|
737
|
+
collapsed: false,
|
|
738
|
+
mobile: false
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
var Sidebar = React6__default.default.forwardRef(
|
|
743
|
+
({
|
|
744
|
+
collapsible = true,
|
|
745
|
+
defaultCollapsed = false,
|
|
746
|
+
collapsed: controlledCollapsed,
|
|
747
|
+
onCollapsedChange,
|
|
748
|
+
className,
|
|
749
|
+
children,
|
|
750
|
+
...props
|
|
751
|
+
}, ref) => {
|
|
752
|
+
const [internalCollapsed, setInternalCollapsed] = React6__default.default.useState(defaultCollapsed);
|
|
753
|
+
const [mobileOpen, setMobileOpen] = React6__default.default.useState(false);
|
|
754
|
+
const collapsed = controlledCollapsed !== void 0 ? controlledCollapsed : internalCollapsed;
|
|
755
|
+
const handleToggle = () => {
|
|
756
|
+
const newCollapsed = !collapsed;
|
|
757
|
+
setInternalCollapsed(newCollapsed);
|
|
758
|
+
onCollapsedChange?.(newCollapsed);
|
|
759
|
+
};
|
|
760
|
+
const handleMobileToggle = () => {
|
|
761
|
+
setMobileOpen(!mobileOpen);
|
|
762
|
+
};
|
|
763
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
765
|
+
"button",
|
|
766
|
+
{
|
|
767
|
+
onClick: handleMobileToggle,
|
|
768
|
+
className: "fixed left-4 top-4 z-50 rounded-md p-2 lg:hidden bg-background-surface border border-border shadow-md",
|
|
769
|
+
"aria-label": "Toggle sidebar",
|
|
770
|
+
children: mobileOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5" })
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
mobileOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
774
|
+
"div",
|
|
775
|
+
{
|
|
776
|
+
className: "fixed inset-0 z-40 bg-background-overlay lg:hidden",
|
|
777
|
+
onClick: handleMobileToggle
|
|
778
|
+
}
|
|
779
|
+
),
|
|
780
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
781
|
+
"div",
|
|
782
|
+
{
|
|
783
|
+
ref,
|
|
784
|
+
className: cn(
|
|
785
|
+
sidebarVariants({ collapsed }),
|
|
786
|
+
"max-lg:translate-x-[-100%]",
|
|
787
|
+
mobileOpen && "max-lg:translate-x-0",
|
|
788
|
+
className
|
|
789
|
+
),
|
|
790
|
+
...props,
|
|
791
|
+
children: [
|
|
792
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children }),
|
|
793
|
+
collapsible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
794
|
+
"button",
|
|
795
|
+
{
|
|
796
|
+
onClick: handleToggle,
|
|
797
|
+
className: "hidden lg:flex items-center justify-center h-12 border-t border-border hover:bg-background-hover transition-colors",
|
|
798
|
+
"aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
|
|
799
|
+
children: collapsed ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-5 w-5" })
|
|
800
|
+
}
|
|
801
|
+
)
|
|
802
|
+
]
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
] });
|
|
806
|
+
}
|
|
807
|
+
);
|
|
808
|
+
Sidebar.displayName = "Sidebar";
|
|
809
|
+
var SidebarHeader = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
810
|
+
"div",
|
|
811
|
+
{
|
|
812
|
+
ref,
|
|
813
|
+
className: cn("flex h-16 items-center border-b border-border px-4", className),
|
|
814
|
+
...props
|
|
815
|
+
}
|
|
816
|
+
));
|
|
817
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
818
|
+
var SidebarContent = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("flex-1 py-4", className), ...props }));
|
|
819
|
+
SidebarContent.displayName = "SidebarContent";
|
|
820
|
+
var SidebarFooter = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
|
+
"div",
|
|
822
|
+
{
|
|
823
|
+
ref,
|
|
824
|
+
className: cn("border-t border-border p-4", className),
|
|
825
|
+
...props
|
|
826
|
+
}
|
|
827
|
+
));
|
|
828
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
829
|
+
var SidebarNav = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("nav", { ref, className: cn("space-y-1 px-2", className), ...props }));
|
|
830
|
+
SidebarNav.displayName = "SidebarNav";
|
|
831
|
+
var SidebarNavItem = React6__default.default.forwardRef(({ active, icon, collapsed, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
832
|
+
"a",
|
|
833
|
+
{
|
|
834
|
+
ref,
|
|
835
|
+
className: cn(
|
|
836
|
+
"flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",
|
|
837
|
+
active ? "bg-primary text-primary-text" : "text-text-secondary hover:bg-background-hover hover:text-text-primary",
|
|
838
|
+
collapsed && "justify-center",
|
|
839
|
+
className
|
|
840
|
+
),
|
|
841
|
+
...props,
|
|
842
|
+
children: [
|
|
843
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
844
|
+
!collapsed && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children })
|
|
845
|
+
]
|
|
846
|
+
}
|
|
847
|
+
));
|
|
848
|
+
SidebarNavItem.displayName = "SidebarNavItem";
|
|
849
|
+
var SidebarGroup = React6__default.default.forwardRef(
|
|
850
|
+
({ title, collapsed, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("px-2 py-2", className), ...props, children: [
|
|
851
|
+
title && !collapsed && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-2 text-xs font-semibold text-text-tertiary uppercase tracking-wide", children: title }),
|
|
852
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children })
|
|
853
|
+
] })
|
|
854
|
+
);
|
|
855
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
856
|
+
var PageShell = React6__default.default.forwardRef(
|
|
857
|
+
({ sidebar, header, footer, sidebarCollapsed, className, children, ...props }, ref) => {
|
|
858
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("min-h-screen", className), ...props, children: [
|
|
859
|
+
sidebar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sidebar-wrapper", children: sidebar }),
|
|
860
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
861
|
+
"div",
|
|
862
|
+
{
|
|
863
|
+
className: cn(
|
|
864
|
+
"flex min-h-screen flex-col transition-all duration-300",
|
|
865
|
+
sidebar && !sidebarCollapsed && "lg:pl-64",
|
|
866
|
+
sidebar && sidebarCollapsed && "lg:pl-16"
|
|
867
|
+
),
|
|
868
|
+
children: [
|
|
869
|
+
header && /* @__PURE__ */ jsxRuntime.jsx("header", { className: "sticky top-0 z-40 border-b border-border bg-background-surface", children: header }),
|
|
870
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { className: "flex-1", children }),
|
|
871
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "border-t border-border bg-background-surface", children: footer })
|
|
872
|
+
]
|
|
873
|
+
}
|
|
874
|
+
)
|
|
875
|
+
] });
|
|
876
|
+
}
|
|
877
|
+
);
|
|
878
|
+
PageShell.displayName = "PageShell";
|
|
879
|
+
var PageHeader = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
880
|
+
"div",
|
|
881
|
+
{
|
|
882
|
+
ref,
|
|
883
|
+
className: cn("flex h-16 items-center gap-4 px-6", className),
|
|
884
|
+
...props
|
|
885
|
+
}
|
|
886
|
+
));
|
|
887
|
+
PageHeader.displayName = "PageHeader";
|
|
888
|
+
var PageContent = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6", className), ...props }));
|
|
889
|
+
PageContent.displayName = "PageContent";
|
|
890
|
+
var PageTitle = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
|
+
"h1",
|
|
892
|
+
{
|
|
893
|
+
ref,
|
|
894
|
+
className: cn("text-2xl font-semibold tracking-tight", className),
|
|
895
|
+
...props
|
|
896
|
+
}
|
|
897
|
+
));
|
|
898
|
+
PageTitle.displayName = "PageTitle";
|
|
899
|
+
var PageDescription = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
900
|
+
"p",
|
|
901
|
+
{
|
|
902
|
+
ref,
|
|
903
|
+
className: cn("text-sm text-text-secondary", className),
|
|
904
|
+
...props
|
|
905
|
+
}
|
|
906
|
+
));
|
|
907
|
+
PageDescription.displayName = "PageDescription";
|
|
908
|
+
var inputVariants = classVarianceAuthority.cva(
|
|
909
|
+
"flex w-full rounded-md border bg-background-surface px-3 py-2 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-text-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
910
|
+
{
|
|
911
|
+
variants: {
|
|
912
|
+
variant: {
|
|
913
|
+
default: "border-border hover:border-border-strong",
|
|
914
|
+
error: "border-error focus-visible:ring-error",
|
|
915
|
+
success: "border-success focus-visible:ring-success"
|
|
916
|
+
},
|
|
917
|
+
size: {
|
|
918
|
+
sm: "h-8 text-xs",
|
|
919
|
+
md: "h-10 text-sm",
|
|
920
|
+
lg: "h-11 text-base"
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
defaultVariants: {
|
|
924
|
+
variant: "default",
|
|
925
|
+
size: "md"
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
);
|
|
929
|
+
var Input = React6__default.default.forwardRef(
|
|
930
|
+
({
|
|
931
|
+
className,
|
|
932
|
+
variant,
|
|
933
|
+
size,
|
|
934
|
+
type = "text",
|
|
935
|
+
leftIcon,
|
|
936
|
+
rightIcon,
|
|
937
|
+
error,
|
|
938
|
+
helperText,
|
|
939
|
+
label,
|
|
940
|
+
required,
|
|
941
|
+
id,
|
|
942
|
+
...props
|
|
943
|
+
}, ref) => {
|
|
944
|
+
const generatedId = React6__default.default.useId();
|
|
945
|
+
const inputId = id ?? generatedId;
|
|
946
|
+
const errorId = `${inputId}-error`;
|
|
947
|
+
const helperId = `${inputId}-helper`;
|
|
948
|
+
const hasError = !!error;
|
|
949
|
+
const finalVariant = hasError ? "error" : variant;
|
|
950
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
951
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
952
|
+
"label",
|
|
953
|
+
{
|
|
954
|
+
htmlFor: inputId,
|
|
955
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
956
|
+
children: [
|
|
957
|
+
label,
|
|
958
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
959
|
+
]
|
|
960
|
+
}
|
|
961
|
+
),
|
|
962
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
963
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary", children: leftIcon }),
|
|
964
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
965
|
+
"input",
|
|
966
|
+
{
|
|
967
|
+
type,
|
|
968
|
+
id: inputId,
|
|
969
|
+
className: cn(
|
|
970
|
+
inputVariants({ variant: finalVariant, size }),
|
|
971
|
+
leftIcon && "pl-10",
|
|
972
|
+
rightIcon && "pr-10",
|
|
973
|
+
className
|
|
974
|
+
),
|
|
975
|
+
ref,
|
|
976
|
+
"aria-invalid": hasError,
|
|
977
|
+
"aria-describedby": error ? errorId : helperText ? helperId : void 0,
|
|
978
|
+
...props
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary", children: rightIcon })
|
|
982
|
+
] }),
|
|
983
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, className: "mt-1.5 text-xs text-error", role: "alert", children: error }),
|
|
984
|
+
helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: helperId, className: "mt-1.5 text-xs text-text-secondary", children: helperText })
|
|
985
|
+
] });
|
|
986
|
+
}
|
|
987
|
+
);
|
|
988
|
+
Input.displayName = "Input";
|
|
989
|
+
var textareaVariants = classVarianceAuthority.cva(
|
|
990
|
+
"flex min-h-[80px] w-full rounded-md border bg-background-surface px-3 py-2 text-sm transition-colors placeholder:text-text-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
991
|
+
{
|
|
992
|
+
variants: {
|
|
993
|
+
variant: {
|
|
994
|
+
default: "border-border hover:border-border-strong",
|
|
995
|
+
error: "border-error focus-visible:ring-error",
|
|
996
|
+
success: "border-success focus-visible:ring-success"
|
|
997
|
+
},
|
|
998
|
+
resize: {
|
|
999
|
+
none: "resize-none",
|
|
1000
|
+
vertical: "resize-y",
|
|
1001
|
+
horizontal: "resize-x",
|
|
1002
|
+
both: "resize"
|
|
1003
|
+
}
|
|
1004
|
+
},
|
|
1005
|
+
defaultVariants: {
|
|
1006
|
+
variant: "default",
|
|
1007
|
+
resize: "vertical"
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
var Textarea = React6__default.default.forwardRef(
|
|
1012
|
+
({
|
|
1013
|
+
className,
|
|
1014
|
+
variant,
|
|
1015
|
+
resize,
|
|
1016
|
+
error,
|
|
1017
|
+
helperText,
|
|
1018
|
+
label,
|
|
1019
|
+
required,
|
|
1020
|
+
id,
|
|
1021
|
+
...props
|
|
1022
|
+
}, ref) => {
|
|
1023
|
+
const generatedId = React6__default.default.useId();
|
|
1024
|
+
const textareaId = id ?? generatedId;
|
|
1025
|
+
const errorId = `${textareaId}-error`;
|
|
1026
|
+
const helperId = `${textareaId}-helper`;
|
|
1027
|
+
const hasError = !!error;
|
|
1028
|
+
const finalVariant = hasError ? "error" : variant;
|
|
1029
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
1030
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1031
|
+
"label",
|
|
1032
|
+
{
|
|
1033
|
+
htmlFor: textareaId,
|
|
1034
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
1035
|
+
children: [
|
|
1036
|
+
label,
|
|
1037
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-error", children: "*" })
|
|
1038
|
+
]
|
|
1039
|
+
}
|
|
1040
|
+
),
|
|
1041
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1042
|
+
"textarea",
|
|
1043
|
+
{
|
|
1044
|
+
id: textareaId,
|
|
1045
|
+
className: cn(
|
|
1046
|
+
textareaVariants({ variant: finalVariant, resize }),
|
|
1047
|
+
className
|
|
1048
|
+
),
|
|
1049
|
+
ref,
|
|
1050
|
+
"aria-invalid": hasError,
|
|
1051
|
+
"aria-describedby": error ? errorId : helperText ? helperId : void 0,
|
|
1052
|
+
...props
|
|
1053
|
+
}
|
|
1054
|
+
),
|
|
1055
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, className: "mt-1.5 text-xs text-error", role: "alert", children: error }),
|
|
1056
|
+
helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: helperId, className: "mt-1.5 text-xs text-text-secondary", children: helperText })
|
|
1057
|
+
] });
|
|
1058
|
+
}
|
|
1059
|
+
);
|
|
1060
|
+
Textarea.displayName = "Textarea";
|
|
1061
|
+
var Checkbox = React6__default.default.forwardRef(
|
|
1062
|
+
({ className, label, helperText, error, indeterminate, id, ...props }, ref) => {
|
|
1063
|
+
const generatedId = React6__default.default.useId();
|
|
1064
|
+
const checkboxId = id ?? generatedId;
|
|
1065
|
+
const errorId = `${checkboxId}-error`;
|
|
1066
|
+
const helperId = `${checkboxId}-helper`;
|
|
1067
|
+
const hasError = !!error;
|
|
1068
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1070
|
+
CheckboxPrimitive__namespace.Root,
|
|
1071
|
+
{
|
|
1072
|
+
ref,
|
|
1073
|
+
id: checkboxId,
|
|
1074
|
+
className: cn(
|
|
1075
|
+
"peer h-5 w-5 shrink-0 rounded border border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-text",
|
|
1076
|
+
hasError && "border-error focus-visible:ring-error",
|
|
1077
|
+
className
|
|
1078
|
+
),
|
|
1079
|
+
"aria-invalid": hasError,
|
|
1080
|
+
"aria-describedby": error ? errorId : helperText ? helperId : void 0,
|
|
1081
|
+
...props,
|
|
1082
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1083
|
+
CheckboxPrimitive__namespace.Indicator,
|
|
1084
|
+
{
|
|
1085
|
+
className: cn("flex items-center justify-center text-current"),
|
|
1086
|
+
children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "h-4 w-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
|
|
1087
|
+
}
|
|
1088
|
+
)
|
|
1089
|
+
}
|
|
1090
|
+
),
|
|
1091
|
+
(label || helperText || error) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
1092
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1093
|
+
"label",
|
|
1094
|
+
{
|
|
1095
|
+
htmlFor: checkboxId,
|
|
1096
|
+
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1097
|
+
children: label
|
|
1098
|
+
}
|
|
1099
|
+
),
|
|
1100
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1101
|
+
"p",
|
|
1102
|
+
{
|
|
1103
|
+
id: errorId,
|
|
1104
|
+
className: "mt-1 text-xs text-error",
|
|
1105
|
+
role: "alert",
|
|
1106
|
+
children: error
|
|
1107
|
+
}
|
|
1108
|
+
),
|
|
1109
|
+
helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: helperId, className: "mt-1 text-xs text-text-secondary", children: helperText })
|
|
1110
|
+
] })
|
|
1111
|
+
] });
|
|
1112
|
+
}
|
|
1113
|
+
);
|
|
1114
|
+
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
1115
|
+
var RadioGroup = React6__default.default.forwardRef(({ className, ...props }, ref) => {
|
|
1116
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1117
|
+
RadioGroupPrimitive__namespace.Root,
|
|
1118
|
+
{
|
|
1119
|
+
className: cn("grid gap-2", className),
|
|
1120
|
+
...props,
|
|
1121
|
+
ref
|
|
1122
|
+
}
|
|
1123
|
+
);
|
|
1124
|
+
});
|
|
1125
|
+
RadioGroup.displayName = RadioGroupPrimitive__namespace.Root.displayName;
|
|
1126
|
+
var RadioItem = React6__default.default.forwardRef(({ className, label, helperText, id, ...props }, ref) => {
|
|
1127
|
+
const generatedId = React6__default.default.useId();
|
|
1128
|
+
const radioId = id ?? generatedId;
|
|
1129
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1131
|
+
RadioGroupPrimitive__namespace.Item,
|
|
1132
|
+
{
|
|
1133
|
+
ref,
|
|
1134
|
+
id: radioId,
|
|
1135
|
+
className: cn(
|
|
1136
|
+
"aspect-square h-5 w-5 rounded-full border border-border text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1137
|
+
className
|
|
1138
|
+
),
|
|
1139
|
+
...props,
|
|
1140
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
1141
|
+
}
|
|
1142
|
+
),
|
|
1143
|
+
(label || helperText) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
1144
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1145
|
+
"label",
|
|
1146
|
+
{
|
|
1147
|
+
htmlFor: radioId,
|
|
1148
|
+
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1149
|
+
children: label
|
|
1150
|
+
}
|
|
1151
|
+
),
|
|
1152
|
+
helperText && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-text-secondary", children: helperText })
|
|
1153
|
+
] })
|
|
1154
|
+
] });
|
|
1155
|
+
});
|
|
1156
|
+
RadioItem.displayName = RadioGroupPrimitive__namespace.Item.displayName;
|
|
1157
|
+
var Switch = React6__default.default.forwardRef(({ className, label, helperText, error, id, ...props }, ref) => {
|
|
1158
|
+
const generatedId = React6__default.default.useId();
|
|
1159
|
+
const switchId = id ?? generatedId;
|
|
1160
|
+
const errorId = `${switchId}-error`;
|
|
1161
|
+
const helperId = `${switchId}-helper`;
|
|
1162
|
+
const hasError = !!error;
|
|
1163
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
1164
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
SwitchPrimitives__namespace.Root,
|
|
1166
|
+
{
|
|
1167
|
+
id: switchId,
|
|
1168
|
+
className: cn(
|
|
1169
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-border-strong",
|
|
1170
|
+
hasError && "focus-visible:ring-error",
|
|
1171
|
+
className
|
|
1172
|
+
),
|
|
1173
|
+
"aria-invalid": hasError,
|
|
1174
|
+
"aria-describedby": error ? errorId : helperText ? helperId : void 0,
|
|
1175
|
+
...props,
|
|
1176
|
+
ref,
|
|
1177
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1178
|
+
SwitchPrimitives__namespace.Thumb,
|
|
1179
|
+
{
|
|
1180
|
+
className: cn(
|
|
1181
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background-surface shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
1182
|
+
)
|
|
1183
|
+
}
|
|
1184
|
+
)
|
|
1185
|
+
}
|
|
1186
|
+
),
|
|
1187
|
+
(label || helperText || error) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
1188
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1189
|
+
"label",
|
|
1190
|
+
{
|
|
1191
|
+
htmlFor: switchId,
|
|
1192
|
+
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
1193
|
+
children: label
|
|
1194
|
+
}
|
|
1195
|
+
),
|
|
1196
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, className: "mt-1 text-xs text-error", role: "alert", children: error }),
|
|
1197
|
+
helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: helperId, className: "mt-1 text-xs text-text-secondary", children: helperText })
|
|
1198
|
+
] })
|
|
1199
|
+
] });
|
|
1200
|
+
});
|
|
1201
|
+
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
1202
|
+
var Select = SelectPrimitive__namespace.Root;
|
|
1203
|
+
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
1204
|
+
var SelectValue = SelectPrimitive__namespace.Value;
|
|
1205
|
+
var SelectTrigger = React6__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1206
|
+
SelectPrimitive__namespace.Trigger,
|
|
1207
|
+
{
|
|
1208
|
+
ref,
|
|
1209
|
+
className: cn(
|
|
1210
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-border bg-background-surface px-3 py-2 text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1211
|
+
className
|
|
1212
|
+
),
|
|
1213
|
+
...props,
|
|
1214
|
+
children: [
|
|
1215
|
+
children,
|
|
1216
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1217
|
+
]
|
|
1218
|
+
}
|
|
1219
|
+
));
|
|
1220
|
+
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
1221
|
+
var SelectScrollUpButton = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1222
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
1223
|
+
{
|
|
1224
|
+
ref,
|
|
1225
|
+
className: cn(
|
|
1226
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1227
|
+
className
|
|
1228
|
+
),
|
|
1229
|
+
...props,
|
|
1230
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
1231
|
+
}
|
|
1232
|
+
));
|
|
1233
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
1234
|
+
var SelectScrollDownButton = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1235
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
1236
|
+
{
|
|
1237
|
+
ref,
|
|
1238
|
+
className: cn(
|
|
1239
|
+
"flex cursor-default items-center justify-center py-1",
|
|
1240
|
+
className
|
|
1241
|
+
),
|
|
1242
|
+
...props,
|
|
1243
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
1244
|
+
}
|
|
1245
|
+
));
|
|
1246
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
1247
|
+
var SelectContent = React6__default.default.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1248
|
+
SelectPrimitive__namespace.Content,
|
|
1249
|
+
{
|
|
1250
|
+
ref,
|
|
1251
|
+
className: cn(
|
|
1252
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-background-surface text-text-primary shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1253
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1254
|
+
className
|
|
1255
|
+
),
|
|
1256
|
+
position,
|
|
1257
|
+
...props,
|
|
1258
|
+
children: [
|
|
1259
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
1260
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1261
|
+
SelectPrimitive__namespace.Viewport,
|
|
1262
|
+
{
|
|
1263
|
+
className: cn(
|
|
1264
|
+
"p-1",
|
|
1265
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1266
|
+
),
|
|
1267
|
+
children
|
|
1268
|
+
}
|
|
1269
|
+
),
|
|
1270
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
1271
|
+
]
|
|
1272
|
+
}
|
|
1273
|
+
) }));
|
|
1274
|
+
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
1275
|
+
var SelectLabel = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1276
|
+
SelectPrimitive__namespace.Label,
|
|
1277
|
+
{
|
|
1278
|
+
ref,
|
|
1279
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
1280
|
+
...props
|
|
1281
|
+
}
|
|
1282
|
+
));
|
|
1283
|
+
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
1284
|
+
var SelectItem = React6__default.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1285
|
+
SelectPrimitive__namespace.Item,
|
|
1286
|
+
{
|
|
1287
|
+
ref,
|
|
1288
|
+
className: cn(
|
|
1289
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-background-hover focus:text-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1290
|
+
className
|
|
1291
|
+
),
|
|
1292
|
+
...props,
|
|
1293
|
+
children: [
|
|
1294
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
1295
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
1296
|
+
]
|
|
1297
|
+
}
|
|
1298
|
+
));
|
|
1299
|
+
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
1300
|
+
var SelectSeparator = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1301
|
+
SelectPrimitive__namespace.Separator,
|
|
1302
|
+
{
|
|
1303
|
+
ref,
|
|
1304
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1305
|
+
...props
|
|
1306
|
+
}
|
|
1307
|
+
));
|
|
1308
|
+
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
1309
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
1310
|
+
"inline-flex items-center justify-center gap-2 rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
1311
|
+
{
|
|
1312
|
+
variants: {
|
|
1313
|
+
variant: {
|
|
1314
|
+
primary: "bg-primary text-primary-text hover:bg-primary-hover active:bg-primary-active",
|
|
1315
|
+
secondary: "bg-background-surface text-text-primary border border-border hover:bg-background-hover active:bg-background-active",
|
|
1316
|
+
outline: "border border-border bg-transparent hover:bg-background-hover active:bg-background-active",
|
|
1317
|
+
ghost: "bg-transparent hover:bg-background-hover active:bg-background-active",
|
|
1318
|
+
danger: "bg-error text-error-text hover:bg-error-hover active:bg-error-active",
|
|
1319
|
+
success: "bg-success text-success-text hover:bg-success-hover active:bg-success-active",
|
|
1320
|
+
link: "text-text-link hover:text-text-linkHover underline-offset-4 hover:underline"
|
|
1321
|
+
},
|
|
1322
|
+
size: {
|
|
1323
|
+
xs: "h-7 px-2 text-xs",
|
|
1324
|
+
sm: "h-8 px-3 text-sm",
|
|
1325
|
+
md: "h-10 px-4 text-base",
|
|
1326
|
+
lg: "h-11 px-6 text-lg",
|
|
1327
|
+
xl: "h-12 px-8 text-lg"
|
|
1328
|
+
},
|
|
1329
|
+
fullWidth: {
|
|
1330
|
+
true: "w-full"
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
defaultVariants: {
|
|
1334
|
+
variant: "primary",
|
|
1335
|
+
size: "md"
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
);
|
|
1339
|
+
var Button = React6__default.default.forwardRef(
|
|
1340
|
+
({
|
|
1341
|
+
className,
|
|
1342
|
+
variant,
|
|
1343
|
+
size,
|
|
1344
|
+
fullWidth,
|
|
1345
|
+
loading,
|
|
1346
|
+
disabled,
|
|
1347
|
+
leftIcon,
|
|
1348
|
+
rightIcon,
|
|
1349
|
+
children,
|
|
1350
|
+
...props
|
|
1351
|
+
}, ref) => {
|
|
1352
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1353
|
+
"button",
|
|
1354
|
+
{
|
|
1355
|
+
className: cn(buttonVariants({ variant, size, fullWidth, className })),
|
|
1356
|
+
ref,
|
|
1357
|
+
disabled: disabled || loading,
|
|
1358
|
+
...props,
|
|
1359
|
+
children: [
|
|
1360
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }) : leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", children: leftIcon }),
|
|
1361
|
+
children,
|
|
1362
|
+
!loading && rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", children: rightIcon })
|
|
1363
|
+
]
|
|
1364
|
+
}
|
|
1365
|
+
);
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
Button.displayName = "Button";
|
|
1369
|
+
var toastVariants = classVarianceAuthority.cva(
|
|
1370
|
+
"group pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
1371
|
+
{
|
|
1372
|
+
variants: {
|
|
1373
|
+
variant: {
|
|
1374
|
+
default: "border-border bg-background-surface text-text-primary",
|
|
1375
|
+
success: "border-success bg-success-light text-success-dark dark:bg-success-dark dark:text-success-light",
|
|
1376
|
+
error: "border-error bg-error-light text-error-dark dark:bg-error-dark dark:text-error-light",
|
|
1377
|
+
warning: "border-warning bg-warning-light text-warning-dark dark:bg-warning-dark dark:text-warning-light",
|
|
1378
|
+
info: "border-info bg-info-light text-info-dark dark:bg-info-dark dark:text-info-light"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
defaultVariants: {
|
|
1382
|
+
variant: "default"
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
);
|
|
1386
|
+
var ToastProvider = ToastPrimitives__namespace.Provider;
|
|
1387
|
+
var ToastViewport = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1388
|
+
ToastPrimitives__namespace.Viewport,
|
|
1389
|
+
{
|
|
1390
|
+
ref,
|
|
1391
|
+
className: cn(
|
|
1392
|
+
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
|
|
1393
|
+
className
|
|
1394
|
+
),
|
|
1395
|
+
...props
|
|
1396
|
+
}
|
|
1397
|
+
));
|
|
1398
|
+
ToastViewport.displayName = ToastPrimitives__namespace.Viewport.displayName;
|
|
1399
|
+
var Toast = React6__default.default.forwardRef(({ className, variant, ...props }, ref) => {
|
|
1400
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1401
|
+
ToastPrimitives__namespace.Root,
|
|
1402
|
+
{
|
|
1403
|
+
ref,
|
|
1404
|
+
className: cn(toastVariants({ variant }), className),
|
|
1405
|
+
...props
|
|
1406
|
+
}
|
|
1407
|
+
);
|
|
1408
|
+
});
|
|
1409
|
+
Toast.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
1410
|
+
var ToastAction = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
+
ToastPrimitives__namespace.Action,
|
|
1412
|
+
{
|
|
1413
|
+
ref,
|
|
1414
|
+
className: cn(
|
|
1415
|
+
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-background-hover focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
1416
|
+
className
|
|
1417
|
+
),
|
|
1418
|
+
...props
|
|
1419
|
+
}
|
|
1420
|
+
));
|
|
1421
|
+
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
1422
|
+
var ToastClose = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1423
|
+
ToastPrimitives__namespace.Close,
|
|
1424
|
+
{
|
|
1425
|
+
ref,
|
|
1426
|
+
className: cn(
|
|
1427
|
+
"absolute right-2 top-2 rounded-md p-1 text-text-secondary opacity-70 transition-opacity hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100",
|
|
1428
|
+
className
|
|
1429
|
+
),
|
|
1430
|
+
"toast-close": "",
|
|
1431
|
+
...props,
|
|
1432
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
1433
|
+
}
|
|
1434
|
+
));
|
|
1435
|
+
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
1436
|
+
var ToastTitle = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1437
|
+
ToastPrimitives__namespace.Title,
|
|
1438
|
+
{
|
|
1439
|
+
ref,
|
|
1440
|
+
className: cn("text-sm font-semibold", className),
|
|
1441
|
+
...props
|
|
1442
|
+
}
|
|
1443
|
+
));
|
|
1444
|
+
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
1445
|
+
var ToastDescription = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1446
|
+
ToastPrimitives__namespace.Description,
|
|
1447
|
+
{
|
|
1448
|
+
ref,
|
|
1449
|
+
className: cn("text-sm opacity-90", className),
|
|
1450
|
+
...props
|
|
1451
|
+
}
|
|
1452
|
+
));
|
|
1453
|
+
ToastDescription.displayName = ToastPrimitives__namespace.Description.displayName;
|
|
1454
|
+
var toastIcons = {
|
|
1455
|
+
success: lucideReact.CheckCircle2,
|
|
1456
|
+
error: lucideReact.AlertCircle,
|
|
1457
|
+
warning: lucideReact.AlertTriangle,
|
|
1458
|
+
info: lucideReact.Info
|
|
1459
|
+
};
|
|
1460
|
+
var TOAST_LIMIT = 5;
|
|
1461
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
1462
|
+
var count = 0;
|
|
1463
|
+
function genId() {
|
|
1464
|
+
count = (count + 1) % Number.MAX_VALUE;
|
|
1465
|
+
return count.toString();
|
|
1466
|
+
}
|
|
1467
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
1468
|
+
var addToRemoveQueue = (toastId) => {
|
|
1469
|
+
if (toastTimeouts.has(toastId)) {
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1472
|
+
const timeout = setTimeout(() => {
|
|
1473
|
+
toastTimeouts.delete(toastId);
|
|
1474
|
+
dispatch({
|
|
1475
|
+
type: "REMOVE_TOAST",
|
|
1476
|
+
toastId
|
|
1477
|
+
});
|
|
1478
|
+
}, TOAST_REMOVE_DELAY);
|
|
1479
|
+
toastTimeouts.set(toastId, timeout);
|
|
1480
|
+
};
|
|
1481
|
+
var reducer = (state, action) => {
|
|
1482
|
+
switch (action.type) {
|
|
1483
|
+
case "ADD_TOAST":
|
|
1484
|
+
return {
|
|
1485
|
+
...state,
|
|
1486
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
1487
|
+
};
|
|
1488
|
+
case "UPDATE_TOAST":
|
|
1489
|
+
return {
|
|
1490
|
+
...state,
|
|
1491
|
+
toasts: state.toasts.map(
|
|
1492
|
+
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
1493
|
+
)
|
|
1494
|
+
};
|
|
1495
|
+
case "DISMISS_TOAST": {
|
|
1496
|
+
const { toastId } = action;
|
|
1497
|
+
if (toastId) {
|
|
1498
|
+
addToRemoveQueue(toastId);
|
|
1499
|
+
} else {
|
|
1500
|
+
state.toasts.forEach((toast2) => {
|
|
1501
|
+
addToRemoveQueue(toast2.id);
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
return {
|
|
1505
|
+
...state,
|
|
1506
|
+
toasts: state.toasts.map(
|
|
1507
|
+
(t) => t.id === toastId || toastId === void 0 ? {
|
|
1508
|
+
...t,
|
|
1509
|
+
open: false
|
|
1510
|
+
} : t
|
|
1511
|
+
)
|
|
1512
|
+
};
|
|
1513
|
+
}
|
|
1514
|
+
case "REMOVE_TOAST":
|
|
1515
|
+
if (action.toastId === void 0) {
|
|
1516
|
+
return {
|
|
1517
|
+
...state,
|
|
1518
|
+
toasts: []
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
return {
|
|
1522
|
+
...state,
|
|
1523
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1527
|
+
var listeners = [];
|
|
1528
|
+
var memoryState = { toasts: [] };
|
|
1529
|
+
function dispatch(action) {
|
|
1530
|
+
memoryState = reducer(memoryState, action);
|
|
1531
|
+
listeners.forEach((listener) => {
|
|
1532
|
+
listener(memoryState);
|
|
1533
|
+
});
|
|
1534
|
+
}
|
|
1535
|
+
function toast({ ...props }) {
|
|
1536
|
+
const id = genId();
|
|
1537
|
+
const update = (props2) => dispatch({
|
|
1538
|
+
type: "UPDATE_TOAST",
|
|
1539
|
+
toast: { ...props2, id }
|
|
1540
|
+
});
|
|
1541
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
1542
|
+
dispatch({
|
|
1543
|
+
type: "ADD_TOAST",
|
|
1544
|
+
toast: {
|
|
1545
|
+
...props,
|
|
1546
|
+
id,
|
|
1547
|
+
open: true,
|
|
1548
|
+
onOpenChange: (open) => {
|
|
1549
|
+
if (!open) dismiss();
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
});
|
|
1553
|
+
return {
|
|
1554
|
+
id,
|
|
1555
|
+
dismiss,
|
|
1556
|
+
update
|
|
1557
|
+
};
|
|
1558
|
+
}
|
|
1559
|
+
function useToast() {
|
|
1560
|
+
const [state, setState] = React6__default.default.useState(memoryState);
|
|
1561
|
+
React6__default.default.useEffect(() => {
|
|
1562
|
+
listeners.push(setState);
|
|
1563
|
+
return () => {
|
|
1564
|
+
const index = listeners.indexOf(setState);
|
|
1565
|
+
if (index > -1) {
|
|
1566
|
+
listeners.splice(index, 1);
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1569
|
+
}, [state]);
|
|
1570
|
+
return {
|
|
1571
|
+
...state,
|
|
1572
|
+
toast,
|
|
1573
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
function Toaster() {
|
|
1577
|
+
const { toasts } = useToast();
|
|
1578
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastProvider, { children: [
|
|
1579
|
+
toasts.map(function({ id, title, description, action, variant, ...props }) {
|
|
1580
|
+
const Icon3 = variant && variant !== "default" ? toastIcons[variant] : null;
|
|
1581
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Toast, { variant, ...props, children: [
|
|
1582
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
|
|
1583
|
+
Icon3 && /* @__PURE__ */ jsxRuntime.jsx(Icon3, { className: "h-5 w-5 shrink-0" }),
|
|
1584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1", children: [
|
|
1585
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title }),
|
|
1586
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description })
|
|
1587
|
+
] })
|
|
1588
|
+
] }),
|
|
1589
|
+
action,
|
|
1590
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToastClose, {})
|
|
1591
|
+
] }, id);
|
|
1592
|
+
}),
|
|
1593
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToastViewport, {})
|
|
1594
|
+
] });
|
|
1595
|
+
}
|
|
1596
|
+
var alertVariants = classVarianceAuthority.cva(
|
|
1597
|
+
"relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg+div]:pl-8",
|
|
1598
|
+
{
|
|
1599
|
+
variants: {
|
|
1600
|
+
variant: {
|
|
1601
|
+
default: "bg-background-surface border-border text-text-primary",
|
|
1602
|
+
success: "bg-success-light border-success text-success-dark dark:bg-success-dark dark:border-success dark:text-success-light",
|
|
1603
|
+
error: "bg-error-light border-error text-error-dark dark:bg-error-dark dark:border-error dark:text-error-light",
|
|
1604
|
+
warning: "bg-warning-light border-warning text-warning-dark dark:bg-warning-dark dark:border-warning dark:text-warning-light",
|
|
1605
|
+
info: "bg-info-light border-info text-info-dark dark:bg-info-dark dark:border-info dark:text-info-light"
|
|
1606
|
+
}
|
|
1607
|
+
},
|
|
1608
|
+
defaultVariants: {
|
|
1609
|
+
variant: "default"
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
);
|
|
1613
|
+
var Alert = React6__default.default.forwardRef(
|
|
1614
|
+
({ className, variant, icon, closable, onClose, children, ...props }, ref) => {
|
|
1615
|
+
const [visible, setVisible] = React6__default.default.useState(true);
|
|
1616
|
+
const handleClose = () => {
|
|
1617
|
+
setVisible(false);
|
|
1618
|
+
onClose?.();
|
|
1619
|
+
};
|
|
1620
|
+
if (!visible) return null;
|
|
1621
|
+
const defaultIcon = getDefaultIcon(variant);
|
|
1622
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1623
|
+
"div",
|
|
1624
|
+
{
|
|
1625
|
+
ref,
|
|
1626
|
+
role: "alert",
|
|
1627
|
+
className: cn(alertVariants({ variant }), className),
|
|
1628
|
+
...props,
|
|
1629
|
+
children: [
|
|
1630
|
+
(icon || defaultIcon) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-4 top-4", children: icon || defaultIcon }),
|
|
1631
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(icon || defaultIcon ? "pl-8" : ""), children }),
|
|
1632
|
+
closable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1633
|
+
"button",
|
|
1634
|
+
{
|
|
1635
|
+
onClick: handleClose,
|
|
1636
|
+
className: "absolute right-4 top-4 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus:opacity-100 focus:outline-none focus:ring-2",
|
|
1637
|
+
"aria-label": "Close alert",
|
|
1638
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
1639
|
+
}
|
|
1640
|
+
)
|
|
1641
|
+
]
|
|
1642
|
+
}
|
|
1643
|
+
);
|
|
1644
|
+
}
|
|
1645
|
+
);
|
|
1646
|
+
Alert.displayName = "Alert";
|
|
1647
|
+
var AlertTitle = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1648
|
+
"h5",
|
|
1649
|
+
{
|
|
1650
|
+
ref,
|
|
1651
|
+
className: cn("mb-1 font-semibold leading-none tracking-tight", className),
|
|
1652
|
+
...props
|
|
1653
|
+
}
|
|
1654
|
+
));
|
|
1655
|
+
AlertTitle.displayName = "AlertTitle";
|
|
1656
|
+
var AlertDescription = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
|
+
"div",
|
|
1658
|
+
{
|
|
1659
|
+
ref,
|
|
1660
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
1661
|
+
...props
|
|
1662
|
+
}
|
|
1663
|
+
));
|
|
1664
|
+
AlertDescription.displayName = "AlertDescription";
|
|
1665
|
+
function getDefaultIcon(variant) {
|
|
1666
|
+
const iconClass = "h-5 w-5";
|
|
1667
|
+
switch (variant) {
|
|
1668
|
+
case "success":
|
|
1669
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: iconClass });
|
|
1670
|
+
case "error":
|
|
1671
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: iconClass });
|
|
1672
|
+
case "warning":
|
|
1673
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: iconClass });
|
|
1674
|
+
case "info":
|
|
1675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: iconClass });
|
|
1676
|
+
default:
|
|
1677
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: iconClass });
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
var Modal = DialogPrimitive__namespace.Root;
|
|
1681
|
+
var ModalTrigger = DialogPrimitive__namespace.Trigger;
|
|
1682
|
+
var ModalPortal = DialogPrimitive__namespace.Portal;
|
|
1683
|
+
var ModalClose = DialogPrimitive__namespace.Close;
|
|
1684
|
+
var ModalOverlay = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1685
|
+
DialogPrimitive__namespace.Overlay,
|
|
1686
|
+
{
|
|
1687
|
+
ref,
|
|
1688
|
+
className: cn(
|
|
1689
|
+
"fixed inset-0 z-50 bg-background-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1690
|
+
className
|
|
1691
|
+
),
|
|
1692
|
+
...props
|
|
1693
|
+
}
|
|
1694
|
+
));
|
|
1695
|
+
ModalOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
1696
|
+
var ModalContent = React6__default.default.forwardRef(({ className, children, showCloseButton = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(ModalPortal, { children: [
|
|
1697
|
+
/* @__PURE__ */ jsxRuntime.jsx(ModalOverlay, {}),
|
|
1698
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1699
|
+
DialogPrimitive__namespace.Content,
|
|
1700
|
+
{
|
|
1701
|
+
ref,
|
|
1702
|
+
className: cn(
|
|
1703
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background-surface p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-xl",
|
|
1704
|
+
className
|
|
1705
|
+
),
|
|
1706
|
+
...props,
|
|
1707
|
+
children: [
|
|
1708
|
+
children,
|
|
1709
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-background-active", children: [
|
|
1710
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
1711
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1712
|
+
] })
|
|
1713
|
+
]
|
|
1714
|
+
}
|
|
1715
|
+
)
|
|
1716
|
+
] }));
|
|
1717
|
+
ModalContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
1718
|
+
var ModalHeader = ({
|
|
1719
|
+
className,
|
|
1720
|
+
...props
|
|
1721
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1722
|
+
"div",
|
|
1723
|
+
{
|
|
1724
|
+
className: cn(
|
|
1725
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1726
|
+
className
|
|
1727
|
+
),
|
|
1728
|
+
...props
|
|
1729
|
+
}
|
|
1730
|
+
);
|
|
1731
|
+
ModalHeader.displayName = "ModalHeader";
|
|
1732
|
+
var ModalFooter = ({
|
|
1733
|
+
className,
|
|
1734
|
+
...props
|
|
1735
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1736
|
+
"div",
|
|
1737
|
+
{
|
|
1738
|
+
className: cn(
|
|
1739
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1740
|
+
className
|
|
1741
|
+
),
|
|
1742
|
+
...props
|
|
1743
|
+
}
|
|
1744
|
+
);
|
|
1745
|
+
ModalFooter.displayName = "ModalFooter";
|
|
1746
|
+
var ModalTitle = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1747
|
+
DialogPrimitive__namespace.Title,
|
|
1748
|
+
{
|
|
1749
|
+
ref,
|
|
1750
|
+
className: cn(
|
|
1751
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
1752
|
+
className
|
|
1753
|
+
),
|
|
1754
|
+
...props
|
|
1755
|
+
}
|
|
1756
|
+
));
|
|
1757
|
+
ModalTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
1758
|
+
var ModalDescription = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1759
|
+
DialogPrimitive__namespace.Description,
|
|
1760
|
+
{
|
|
1761
|
+
ref,
|
|
1762
|
+
className: cn("text-sm text-text-secondary", className),
|
|
1763
|
+
...props
|
|
1764
|
+
}
|
|
1765
|
+
));
|
|
1766
|
+
ModalDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
1767
|
+
var cardVariants = classVarianceAuthority.cva(
|
|
1768
|
+
"rounded-lg border border-border bg-background-surface text-text-primary",
|
|
1769
|
+
{
|
|
1770
|
+
variants: {
|
|
1771
|
+
variant: {
|
|
1772
|
+
default: "",
|
|
1773
|
+
elevated: "shadow-md",
|
|
1774
|
+
outlined: "border-2"
|
|
1775
|
+
},
|
|
1776
|
+
padding: {
|
|
1777
|
+
none: "",
|
|
1778
|
+
sm: "p-4",
|
|
1779
|
+
md: "p-6",
|
|
1780
|
+
lg: "p-8"
|
|
1781
|
+
},
|
|
1782
|
+
hoverable: {
|
|
1783
|
+
true: "transition-all hover:shadow-lg hover:-translate-y-1 cursor-pointer"
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
defaultVariants: {
|
|
1787
|
+
variant: "default",
|
|
1788
|
+
padding: "md"
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
);
|
|
1792
|
+
var Card = React6__default.default.forwardRef(
|
|
1793
|
+
({ as: Component = "div", variant, padding, hoverable, className, ...props }, ref) => {
|
|
1794
|
+
return React6__default.default.createElement(Component, {
|
|
1795
|
+
ref,
|
|
1796
|
+
className: cn(cardVariants({ variant, padding, hoverable }), className),
|
|
1797
|
+
...props
|
|
1798
|
+
});
|
|
1799
|
+
}
|
|
1800
|
+
);
|
|
1801
|
+
Card.displayName = "Card";
|
|
1802
|
+
var CardHeader = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1803
|
+
"div",
|
|
1804
|
+
{
|
|
1805
|
+
ref,
|
|
1806
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
1807
|
+
...props
|
|
1808
|
+
}
|
|
1809
|
+
));
|
|
1810
|
+
CardHeader.displayName = "CardHeader";
|
|
1811
|
+
var CardTitle = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1812
|
+
"h3",
|
|
1813
|
+
{
|
|
1814
|
+
ref,
|
|
1815
|
+
className: cn(
|
|
1816
|
+
"text-xl font-semibold leading-none tracking-tight",
|
|
1817
|
+
className
|
|
1818
|
+
),
|
|
1819
|
+
...props
|
|
1820
|
+
}
|
|
1821
|
+
));
|
|
1822
|
+
CardTitle.displayName = "CardTitle";
|
|
1823
|
+
var CardDescription = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1824
|
+
"p",
|
|
1825
|
+
{
|
|
1826
|
+
ref,
|
|
1827
|
+
className: cn("text-sm text-text-secondary", className),
|
|
1828
|
+
...props
|
|
1829
|
+
}
|
|
1830
|
+
));
|
|
1831
|
+
CardDescription.displayName = "CardDescription";
|
|
1832
|
+
var CardContent = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
1833
|
+
CardContent.displayName = "CardContent";
|
|
1834
|
+
var CardFooter = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1835
|
+
"div",
|
|
1836
|
+
{
|
|
1837
|
+
ref,
|
|
1838
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1839
|
+
...props
|
|
1840
|
+
}
|
|
1841
|
+
));
|
|
1842
|
+
CardFooter.displayName = "CardFooter";
|
|
1843
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
1844
|
+
"inline-flex items-center rounded-full border font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
1845
|
+
{
|
|
1846
|
+
variants: {
|
|
1847
|
+
variant: {
|
|
1848
|
+
default: "border-transparent bg-primary text-primary-text hover:bg-primary-hover",
|
|
1849
|
+
secondary: "border-transparent bg-background-active text-text-secondary hover:bg-border",
|
|
1850
|
+
outline: "border-border text-text-primary",
|
|
1851
|
+
success: "border-transparent bg-success-light text-success-dark dark:bg-success-dark dark:text-success-light",
|
|
1852
|
+
error: "border-transparent bg-error-light text-error-dark dark:bg-error-dark dark:text-error-light",
|
|
1853
|
+
warning: "border-transparent bg-warning-light text-warning-dark dark:bg-warning-dark dark:text-warning-light",
|
|
1854
|
+
info: "border-transparent bg-info-light text-info-dark dark:bg-info-dark dark:text-info-light"
|
|
1855
|
+
},
|
|
1856
|
+
size: {
|
|
1857
|
+
sm: "px-2 py-0.5 text-xs",
|
|
1858
|
+
md: "px-2.5 py-0.5 text-sm",
|
|
1859
|
+
lg: "px-3 py-1 text-base"
|
|
1860
|
+
}
|
|
1861
|
+
},
|
|
1862
|
+
defaultVariants: {
|
|
1863
|
+
variant: "default",
|
|
1864
|
+
size: "md"
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
var Badge = React6__default.default.forwardRef(
|
|
1869
|
+
({
|
|
1870
|
+
className,
|
|
1871
|
+
variant,
|
|
1872
|
+
size,
|
|
1873
|
+
leftIcon,
|
|
1874
|
+
rightIcon,
|
|
1875
|
+
onRemove,
|
|
1876
|
+
children,
|
|
1877
|
+
...props
|
|
1878
|
+
}, ref) => {
|
|
1879
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1880
|
+
"div",
|
|
1881
|
+
{
|
|
1882
|
+
ref,
|
|
1883
|
+
className: cn(badgeVariants({ variant, size }), className),
|
|
1884
|
+
...props,
|
|
1885
|
+
children: [
|
|
1886
|
+
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-1 inline-flex", children: leftIcon }),
|
|
1887
|
+
children,
|
|
1888
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex", children: rightIcon }),
|
|
1889
|
+
onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1890
|
+
"button",
|
|
1891
|
+
{
|
|
1892
|
+
onClick: onRemove,
|
|
1893
|
+
className: "ml-1 inline-flex rounded-full hover:bg-black/10 dark:hover:bg-white/10",
|
|
1894
|
+
"aria-label": "Remove",
|
|
1895
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1896
|
+
"svg",
|
|
1897
|
+
{
|
|
1898
|
+
className: "h-3 w-3",
|
|
1899
|
+
fill: "none",
|
|
1900
|
+
stroke: "currentColor",
|
|
1901
|
+
viewBox: "0 0 24 24",
|
|
1902
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1903
|
+
"path",
|
|
1904
|
+
{
|
|
1905
|
+
strokeLinecap: "round",
|
|
1906
|
+
strokeLinejoin: "round",
|
|
1907
|
+
strokeWidth: 2,
|
|
1908
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
1909
|
+
}
|
|
1910
|
+
)
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
}
|
|
1914
|
+
)
|
|
1915
|
+
]
|
|
1916
|
+
}
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1920
|
+
Badge.displayName = "Badge";
|
|
1921
|
+
var avatarVariants = classVarianceAuthority.cva(
|
|
1922
|
+
"relative flex shrink-0 overflow-hidden rounded-full",
|
|
1923
|
+
{
|
|
1924
|
+
variants: {
|
|
1925
|
+
size: {
|
|
1926
|
+
xs: "h-6 w-6 text-xs",
|
|
1927
|
+
sm: "h-8 w-8 text-sm",
|
|
1928
|
+
md: "h-10 w-10 text-base",
|
|
1929
|
+
lg: "h-12 w-12 text-lg",
|
|
1930
|
+
xl: "h-16 w-16 text-xl",
|
|
1931
|
+
"2xl": "h-20 w-20 text-2xl"
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
defaultVariants: {
|
|
1935
|
+
size: "md"
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
);
|
|
1939
|
+
var Avatar = React6__default.default.forwardRef(({ className, size, src, alt, fallback, ...props }, ref) => {
|
|
1940
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1941
|
+
AvatarPrimitive__namespace.Root,
|
|
1942
|
+
{
|
|
1943
|
+
ref,
|
|
1944
|
+
className: cn(avatarVariants({ size }), className),
|
|
1945
|
+
...props,
|
|
1946
|
+
children: [
|
|
1947
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src, alt }),
|
|
1948
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: fallback || getInitials(alt || "") })
|
|
1949
|
+
]
|
|
1950
|
+
}
|
|
1951
|
+
);
|
|
1952
|
+
});
|
|
1953
|
+
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
1954
|
+
var AvatarImage = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1955
|
+
AvatarPrimitive__namespace.Image,
|
|
1956
|
+
{
|
|
1957
|
+
ref,
|
|
1958
|
+
className: cn("aspect-square h-full w-full", className),
|
|
1959
|
+
...props
|
|
1960
|
+
}
|
|
1961
|
+
));
|
|
1962
|
+
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
1963
|
+
var AvatarFallback = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1964
|
+
AvatarPrimitive__namespace.Fallback,
|
|
1965
|
+
{
|
|
1966
|
+
ref,
|
|
1967
|
+
className: cn(
|
|
1968
|
+
"flex h-full w-full items-center justify-center rounded-full bg-border-strong text-text-secondary font-medium",
|
|
1969
|
+
className
|
|
1970
|
+
),
|
|
1971
|
+
...props
|
|
1972
|
+
}
|
|
1973
|
+
));
|
|
1974
|
+
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
1975
|
+
function getInitials(name) {
|
|
1976
|
+
const parts = name.split(" ").filter(Boolean);
|
|
1977
|
+
if (parts.length === 0) return "?";
|
|
1978
|
+
if (parts.length === 1) return parts[0].charAt(0).toUpperCase();
|
|
1979
|
+
return (parts[0].charAt(0) + parts[parts.length - 1].charAt(0)).toUpperCase();
|
|
1980
|
+
}
|
|
1981
|
+
var Table = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1982
|
+
"table",
|
|
1983
|
+
{
|
|
1984
|
+
ref,
|
|
1985
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1986
|
+
...props
|
|
1987
|
+
}
|
|
1988
|
+
) }));
|
|
1989
|
+
Table.displayName = "Table";
|
|
1990
|
+
var TableHeader = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1991
|
+
"thead",
|
|
1992
|
+
{
|
|
1993
|
+
ref,
|
|
1994
|
+
className: cn(
|
|
1995
|
+
"border-b border-border bg-background-hover [&_tr]:border-b",
|
|
1996
|
+
className
|
|
1997
|
+
),
|
|
1998
|
+
...props
|
|
1999
|
+
}
|
|
2000
|
+
));
|
|
2001
|
+
TableHeader.displayName = "TableHeader";
|
|
2002
|
+
var TableBody = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2003
|
+
"tbody",
|
|
2004
|
+
{
|
|
2005
|
+
ref,
|
|
2006
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2007
|
+
...props
|
|
2008
|
+
}
|
|
2009
|
+
));
|
|
2010
|
+
TableBody.displayName = "TableBody";
|
|
2011
|
+
var TableFooter = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2012
|
+
"tfoot",
|
|
2013
|
+
{
|
|
2014
|
+
ref,
|
|
2015
|
+
className: cn(
|
|
2016
|
+
"border-t border-border bg-background-hover font-medium [&>tr]:last:border-b-0",
|
|
2017
|
+
className
|
|
2018
|
+
),
|
|
2019
|
+
...props
|
|
2020
|
+
}
|
|
2021
|
+
));
|
|
2022
|
+
TableFooter.displayName = "TableFooter";
|
|
2023
|
+
var TableRow = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2024
|
+
"tr",
|
|
2025
|
+
{
|
|
2026
|
+
ref,
|
|
2027
|
+
className: cn(
|
|
2028
|
+
"border-b border-border transition-colors hover:bg-background-hover data-[state=selected]:bg-background-active",
|
|
2029
|
+
className
|
|
2030
|
+
),
|
|
2031
|
+
...props
|
|
2032
|
+
}
|
|
2033
|
+
));
|
|
2034
|
+
TableRow.displayName = "TableRow";
|
|
2035
|
+
var TableHead = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2036
|
+
"th",
|
|
2037
|
+
{
|
|
2038
|
+
ref,
|
|
2039
|
+
className: cn(
|
|
2040
|
+
"h-12 px-4 text-left align-middle font-semibold text-text-secondary [&:has([role=checkbox])]:pr-0",
|
|
2041
|
+
className
|
|
2042
|
+
),
|
|
2043
|
+
...props
|
|
2044
|
+
}
|
|
2045
|
+
));
|
|
2046
|
+
TableHead.displayName = "TableHead";
|
|
2047
|
+
var TableCell = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2048
|
+
"td",
|
|
2049
|
+
{
|
|
2050
|
+
ref,
|
|
2051
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
2052
|
+
...props
|
|
2053
|
+
}
|
|
2054
|
+
));
|
|
2055
|
+
TableCell.displayName = "TableCell";
|
|
2056
|
+
var TableCaption = React6__default.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2057
|
+
"caption",
|
|
2058
|
+
{
|
|
2059
|
+
ref,
|
|
2060
|
+
className: cn("mt-4 text-sm text-text-secondary", className),
|
|
2061
|
+
...props
|
|
2062
|
+
}
|
|
2063
|
+
));
|
|
2064
|
+
TableCaption.displayName = "TableCaption";
|
|
2065
|
+
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
2066
|
+
var Tooltip = TooltipPrimitive__namespace.Root;
|
|
2067
|
+
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
2068
|
+
var TooltipContent = React6__default.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2069
|
+
TooltipPrimitive__namespace.Content,
|
|
2070
|
+
{
|
|
2071
|
+
ref,
|
|
2072
|
+
sideOffset,
|
|
2073
|
+
className: cn(
|
|
2074
|
+
"z-50 overflow-hidden rounded-md border border-border bg-background-surface px-3 py-1.5 text-sm text-text-primary shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2075
|
+
className
|
|
2076
|
+
),
|
|
2077
|
+
...props
|
|
2078
|
+
}
|
|
2079
|
+
));
|
|
2080
|
+
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
2081
|
+
var progressVariants = classVarianceAuthority.cva(
|
|
2082
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-background-active",
|
|
2083
|
+
{
|
|
2084
|
+
variants: {
|
|
2085
|
+
size: {
|
|
2086
|
+
sm: "h-1",
|
|
2087
|
+
md: "h-2",
|
|
2088
|
+
lg: "h-3"
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
defaultVariants: {
|
|
2092
|
+
size: "md"
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
);
|
|
2096
|
+
var Progress = React6__default.default.forwardRef(({ className, value, size, indicatorClassName, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2097
|
+
ProgressPrimitive__namespace.Root,
|
|
2098
|
+
{
|
|
2099
|
+
ref,
|
|
2100
|
+
className: cn(progressVariants({ size }), className),
|
|
2101
|
+
...props,
|
|
2102
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2103
|
+
ProgressPrimitive__namespace.Indicator,
|
|
2104
|
+
{
|
|
2105
|
+
className: cn(
|
|
2106
|
+
"h-full w-full flex-1 bg-primary transition-all",
|
|
2107
|
+
indicatorClassName
|
|
2108
|
+
),
|
|
2109
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2110
|
+
}
|
|
2111
|
+
)
|
|
2112
|
+
}
|
|
2113
|
+
));
|
|
2114
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
2115
|
+
var skeletonVariants = classVarianceAuthority.cva(
|
|
2116
|
+
"animate-pulse rounded-md bg-background-active",
|
|
2117
|
+
{
|
|
2118
|
+
variants: {
|
|
2119
|
+
variant: {
|
|
2120
|
+
default: "",
|
|
2121
|
+
circle: "rounded-full",
|
|
2122
|
+
text: "h-4"
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2125
|
+
defaultVariants: {
|
|
2126
|
+
variant: "default"
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
);
|
|
2130
|
+
var Skeleton = React6__default.default.forwardRef(
|
|
2131
|
+
({ className, variant, ...props }, ref) => {
|
|
2132
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2133
|
+
"div",
|
|
2134
|
+
{
|
|
2135
|
+
ref,
|
|
2136
|
+
className: cn(skeletonVariants({ variant }), className),
|
|
2137
|
+
...props
|
|
2138
|
+
}
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
);
|
|
2142
|
+
Skeleton.displayName = "Skeleton";
|
|
2143
|
+
|
|
2144
|
+
Object.defineProperty(exports, "borders", {
|
|
2145
|
+
enumerable: true,
|
|
2146
|
+
get: function () { return chunk65BLOLLD_cjs.borders; }
|
|
2147
|
+
});
|
|
2148
|
+
Object.defineProperty(exports, "breakpointValues", {
|
|
2149
|
+
enumerable: true,
|
|
2150
|
+
get: function () { return chunk65BLOLLD_cjs.breakpointValues; }
|
|
2151
|
+
});
|
|
2152
|
+
Object.defineProperty(exports, "breakpoints", {
|
|
2153
|
+
enumerable: true,
|
|
2154
|
+
get: function () { return chunk65BLOLLD_cjs.breakpoints; }
|
|
2155
|
+
});
|
|
2156
|
+
Object.defineProperty(exports, "colors", {
|
|
2157
|
+
enumerable: true,
|
|
2158
|
+
get: function () { return chunk65BLOLLD_cjs.colors; }
|
|
2159
|
+
});
|
|
2160
|
+
Object.defineProperty(exports, "darkShadows", {
|
|
2161
|
+
enumerable: true,
|
|
2162
|
+
get: function () { return chunk65BLOLLD_cjs.darkShadows; }
|
|
2163
|
+
});
|
|
2164
|
+
Object.defineProperty(exports, "elevation", {
|
|
2165
|
+
enumerable: true,
|
|
2166
|
+
get: function () { return chunk65BLOLLD_cjs.elevation; }
|
|
2167
|
+
});
|
|
2168
|
+
Object.defineProperty(exports, "mediaQueries", {
|
|
2169
|
+
enumerable: true,
|
|
2170
|
+
get: function () { return chunk65BLOLLD_cjs.mediaQueries; }
|
|
2171
|
+
});
|
|
2172
|
+
Object.defineProperty(exports, "motion", {
|
|
2173
|
+
enumerable: true,
|
|
2174
|
+
get: function () { return chunk65BLOLLD_cjs.motion; }
|
|
2175
|
+
});
|
|
2176
|
+
Object.defineProperty(exports, "semanticBorders", {
|
|
2177
|
+
enumerable: true,
|
|
2178
|
+
get: function () { return chunk65BLOLLD_cjs.semanticBorders; }
|
|
2179
|
+
});
|
|
2180
|
+
Object.defineProperty(exports, "semanticSpacing", {
|
|
2181
|
+
enumerable: true,
|
|
2182
|
+
get: function () { return chunk65BLOLLD_cjs.semanticSpacing; }
|
|
2183
|
+
});
|
|
2184
|
+
Object.defineProperty(exports, "shadows", {
|
|
2185
|
+
enumerable: true,
|
|
2186
|
+
get: function () { return chunk65BLOLLD_cjs.shadows; }
|
|
2187
|
+
});
|
|
2188
|
+
Object.defineProperty(exports, "spacing", {
|
|
2189
|
+
enumerable: true,
|
|
2190
|
+
get: function () { return chunk65BLOLLD_cjs.spacing; }
|
|
2191
|
+
});
|
|
2192
|
+
Object.defineProperty(exports, "typography", {
|
|
2193
|
+
enumerable: true,
|
|
2194
|
+
get: function () { return chunk65BLOLLD_cjs.typography; }
|
|
2195
|
+
});
|
|
2196
|
+
Object.defineProperty(exports, "zIndex", {
|
|
2197
|
+
enumerable: true,
|
|
2198
|
+
get: function () { return chunk65BLOLLD_cjs.zIndex; }
|
|
2199
|
+
});
|
|
2200
|
+
exports.Alert = Alert;
|
|
2201
|
+
exports.AlertDescription = AlertDescription;
|
|
2202
|
+
exports.AlertTitle = AlertTitle;
|
|
2203
|
+
exports.Avatar = Avatar;
|
|
2204
|
+
exports.AvatarFallback = AvatarFallback;
|
|
2205
|
+
exports.AvatarImage = AvatarImage;
|
|
2206
|
+
exports.Badge = Badge;
|
|
2207
|
+
exports.Button = Button;
|
|
2208
|
+
exports.Caption = Caption;
|
|
2209
|
+
exports.Card = Card;
|
|
2210
|
+
exports.CardContent = CardContent;
|
|
2211
|
+
exports.CardDescription = CardDescription;
|
|
2212
|
+
exports.CardFooter = CardFooter;
|
|
2213
|
+
exports.CardHeader = CardHeader;
|
|
2214
|
+
exports.CardTitle = CardTitle;
|
|
2215
|
+
exports.Checkbox = Checkbox;
|
|
2216
|
+
exports.Code = Code;
|
|
2217
|
+
exports.Container = Container;
|
|
2218
|
+
exports.FadeIn = FadeIn;
|
|
2219
|
+
exports.Grid = Grid;
|
|
2220
|
+
exports.GridItem = GridItem;
|
|
2221
|
+
exports.H1 = H1;
|
|
2222
|
+
exports.H2 = H2;
|
|
2223
|
+
exports.H3 = H3;
|
|
2224
|
+
exports.H4 = H4;
|
|
2225
|
+
exports.H5 = H5;
|
|
2226
|
+
exports.H6 = H6;
|
|
2227
|
+
exports.HStack = HStack;
|
|
2228
|
+
exports.Icon = Icon;
|
|
2229
|
+
exports.Input = Input;
|
|
2230
|
+
exports.Label = Label;
|
|
2231
|
+
exports.Modal = Modal;
|
|
2232
|
+
exports.ModalClose = ModalClose;
|
|
2233
|
+
exports.ModalContent = ModalContent;
|
|
2234
|
+
exports.ModalDescription = ModalDescription;
|
|
2235
|
+
exports.ModalFooter = ModalFooter;
|
|
2236
|
+
exports.ModalHeader = ModalHeader;
|
|
2237
|
+
exports.ModalOverlay = ModalOverlay;
|
|
2238
|
+
exports.ModalPortal = ModalPortal;
|
|
2239
|
+
exports.ModalTitle = ModalTitle;
|
|
2240
|
+
exports.ModalTrigger = ModalTrigger;
|
|
2241
|
+
exports.PageContent = PageContent;
|
|
2242
|
+
exports.PageDescription = PageDescription;
|
|
2243
|
+
exports.PageHeader = PageHeader;
|
|
2244
|
+
exports.PageShell = PageShell;
|
|
2245
|
+
exports.PageTitle = PageTitle;
|
|
2246
|
+
exports.Progress = Progress;
|
|
2247
|
+
exports.RadioGroup = RadioGroup;
|
|
2248
|
+
exports.RadioItem = RadioItem;
|
|
2249
|
+
exports.ScaleIn = ScaleIn;
|
|
2250
|
+
exports.Select = Select;
|
|
2251
|
+
exports.SelectContent = SelectContent;
|
|
2252
|
+
exports.SelectGroup = SelectGroup;
|
|
2253
|
+
exports.SelectItem = SelectItem;
|
|
2254
|
+
exports.SelectLabel = SelectLabel;
|
|
2255
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
2256
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
2257
|
+
exports.SelectSeparator = SelectSeparator;
|
|
2258
|
+
exports.SelectTrigger = SelectTrigger;
|
|
2259
|
+
exports.SelectValue = SelectValue;
|
|
2260
|
+
exports.Sidebar = Sidebar;
|
|
2261
|
+
exports.SidebarContent = SidebarContent;
|
|
2262
|
+
exports.SidebarFooter = SidebarFooter;
|
|
2263
|
+
exports.SidebarGroup = SidebarGroup;
|
|
2264
|
+
exports.SidebarHeader = SidebarHeader;
|
|
2265
|
+
exports.SidebarNav = SidebarNav;
|
|
2266
|
+
exports.SidebarNavItem = SidebarNavItem;
|
|
2267
|
+
exports.Skeleton = Skeleton;
|
|
2268
|
+
exports.SlideIn = SlideIn;
|
|
2269
|
+
exports.Stack = Stack;
|
|
2270
|
+
exports.Stagger = Stagger;
|
|
2271
|
+
exports.StaggerItem = StaggerItem;
|
|
2272
|
+
exports.Switch = Switch;
|
|
2273
|
+
exports.THEME_STORAGE_KEY = THEME_STORAGE_KEY;
|
|
2274
|
+
exports.Table = Table;
|
|
2275
|
+
exports.TableBody = TableBody;
|
|
2276
|
+
exports.TableCaption = TableCaption;
|
|
2277
|
+
exports.TableCell = TableCell;
|
|
2278
|
+
exports.TableFooter = TableFooter;
|
|
2279
|
+
exports.TableHead = TableHead;
|
|
2280
|
+
exports.TableHeader = TableHeader;
|
|
2281
|
+
exports.TableRow = TableRow;
|
|
2282
|
+
exports.Text = Text;
|
|
2283
|
+
exports.Textarea = Textarea;
|
|
2284
|
+
exports.ThemeProvider = ThemeProvider;
|
|
2285
|
+
exports.Toast = Toast;
|
|
2286
|
+
exports.ToastAction = ToastAction;
|
|
2287
|
+
exports.ToastClose = ToastClose;
|
|
2288
|
+
exports.ToastDescription = ToastDescription;
|
|
2289
|
+
exports.ToastProvider = ToastProvider;
|
|
2290
|
+
exports.ToastTitle = ToastTitle;
|
|
2291
|
+
exports.ToastViewport = ToastViewport;
|
|
2292
|
+
exports.Toaster = Toaster;
|
|
2293
|
+
exports.Tooltip = Tooltip;
|
|
2294
|
+
exports.TooltipContent = TooltipContent;
|
|
2295
|
+
exports.TooltipProvider = TooltipProvider;
|
|
2296
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
2297
|
+
exports.Typography = Typography;
|
|
2298
|
+
exports.VStack = VStack;
|
|
2299
|
+
exports.announceToScreenReader = announceToScreenReader;
|
|
2300
|
+
exports.applyTheme = applyTheme;
|
|
2301
|
+
exports.cn = cn;
|
|
2302
|
+
exports.formatCurrency = formatCurrency;
|
|
2303
|
+
exports.formatDate = formatDate;
|
|
2304
|
+
exports.formatFileSize = formatFileSize;
|
|
2305
|
+
exports.formatNumber = formatNumber;
|
|
2306
|
+
exports.formatPercent = formatPercent;
|
|
2307
|
+
exports.formatRelativeTime = formatRelativeTime;
|
|
2308
|
+
exports.generateId = generateId;
|
|
2309
|
+
exports.getContrastRatio = getContrastRatio;
|
|
2310
|
+
exports.getCurrentBreakpoint = getCurrentBreakpoint;
|
|
2311
|
+
exports.getFocusableElements = getFocusableElements;
|
|
2312
|
+
exports.getResolvedTheme = getResolvedTheme;
|
|
2313
|
+
exports.getStoredTheme = getStoredTheme;
|
|
2314
|
+
exports.getSystemTheme = getSystemTheme;
|
|
2315
|
+
exports.initializeTheme = initializeTheme;
|
|
2316
|
+
exports.isDesktop = isDesktop;
|
|
2317
|
+
exports.isFocusable = isFocusable;
|
|
2318
|
+
exports.isMobile = isMobile;
|
|
2319
|
+
exports.isTablet = isTablet;
|
|
2320
|
+
exports.matchesBreakpoint = matchesBreakpoint;
|
|
2321
|
+
exports.meetsWCAGAA = meetsWCAGAA;
|
|
2322
|
+
exports.setStoredTheme = setStoredTheme;
|
|
2323
|
+
exports.toCamelCase = toCamelCase;
|
|
2324
|
+
exports.toKebabCase = toKebabCase;
|
|
2325
|
+
exports.toTitleCase = toTitleCase;
|
|
2326
|
+
exports.toast = toast;
|
|
2327
|
+
exports.toastIcons = toastIcons;
|
|
2328
|
+
exports.trapFocus = trapFocus;
|
|
2329
|
+
exports.truncate = truncate;
|
|
2330
|
+
exports.useTheme = useTheme;
|
|
2331
|
+
exports.useToast = useToast;
|