@hai3/uikit 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -0
- package/dist/index.d.mts +514 -0
- package/dist/index.d.ts +514 -0
- package/dist/index.js +1664 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1524 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +85 -0
- package/src/styles/applyTheme.ts +104 -0
- package/src/styles/globals.css +53 -0
- package/src/styles/themeTypes.ts +114 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1664 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React16 = require('react');
|
|
4
|
+
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
9
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
10
|
+
var uikitContracts = require('@hai3/uikit-contracts');
|
|
11
|
+
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
12
|
+
var lucideReact = require('lucide-react');
|
|
13
|
+
var lodash = require('lodash');
|
|
14
|
+
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
15
|
+
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
16
|
+
var TooltipPrimitive = require('@radix-ui/react-tooltip');
|
|
17
|
+
var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
|
|
18
|
+
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
19
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
20
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
21
|
+
|
|
22
|
+
function _interopNamespace(e) {
|
|
23
|
+
if (e && e.__esModule) return e;
|
|
24
|
+
var n = Object.create(null);
|
|
25
|
+
if (e) {
|
|
26
|
+
Object.keys(e).forEach(function (k) {
|
|
27
|
+
if (k !== 'default') {
|
|
28
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
29
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return e[k]; }
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
n.default = e;
|
|
37
|
+
return Object.freeze(n);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
var React16__namespace = /*#__PURE__*/_interopNamespace(React16);
|
|
41
|
+
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
42
|
+
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
43
|
+
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
44
|
+
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
45
|
+
var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
|
|
46
|
+
var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
|
|
47
|
+
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
48
|
+
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
49
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
50
|
+
|
|
51
|
+
// src/base/avatar.tsx
|
|
52
|
+
function cn(...inputs) {
|
|
53
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
54
|
+
}
|
|
55
|
+
var Avatar = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
+
AvatarPrimitive__namespace.Root,
|
|
57
|
+
{
|
|
58
|
+
ref,
|
|
59
|
+
className: cn(
|
|
60
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
61
|
+
className
|
|
62
|
+
),
|
|
63
|
+
...props
|
|
64
|
+
}
|
|
65
|
+
));
|
|
66
|
+
Avatar.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
67
|
+
var AvatarImage = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
AvatarPrimitive__namespace.Image,
|
|
69
|
+
{
|
|
70
|
+
ref,
|
|
71
|
+
className: cn("aspect-square h-full w-full", className),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
));
|
|
75
|
+
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
76
|
+
var AvatarFallback = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
+
AvatarPrimitive__namespace.Fallback,
|
|
78
|
+
{
|
|
79
|
+
ref,
|
|
80
|
+
className: cn(
|
|
81
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
82
|
+
className
|
|
83
|
+
),
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
88
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
89
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
90
|
+
{
|
|
91
|
+
variants: {
|
|
92
|
+
variant: {
|
|
93
|
+
[uikitContracts.ButtonVariant.Default]: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
94
|
+
[uikitContracts.ButtonVariant.Destructive]: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
95
|
+
[uikitContracts.ButtonVariant.Outline]: "border border-input bg-background shadow-sm hover:bg-accent data-[state=open]:bg-accent",
|
|
96
|
+
[uikitContracts.ButtonVariant.Secondary]: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
97
|
+
[uikitContracts.ButtonVariant.Ghost]: "hover:bg-accent data-[state=open]:bg-accent",
|
|
98
|
+
[uikitContracts.ButtonVariant.Link]: "text-primary underline-offset-4 hover:underline"
|
|
99
|
+
},
|
|
100
|
+
size: {
|
|
101
|
+
[uikitContracts.ButtonSize.Default]: "h-9 px-4 py-2",
|
|
102
|
+
[uikitContracts.ButtonSize.Sm]: "h-8 rounded-md px-3 text-xs",
|
|
103
|
+
[uikitContracts.ButtonSize.Lg]: "h-10 rounded-md px-8",
|
|
104
|
+
[uikitContracts.ButtonSize.Icon]: "h-9 w-9"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
defaultVariants: {
|
|
108
|
+
variant: uikitContracts.ButtonVariant.Default,
|
|
109
|
+
size: uikitContracts.ButtonSize.Default
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
var Button = React16__namespace.forwardRef(
|
|
114
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
115
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
116
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
117
|
+
Comp,
|
|
118
|
+
{
|
|
119
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
120
|
+
ref,
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
Button.displayName = "Button";
|
|
127
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
128
|
+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
129
|
+
{
|
|
130
|
+
variants: {
|
|
131
|
+
variant: {
|
|
132
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
133
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
134
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
135
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: {
|
|
139
|
+
variant: "default"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function Badge({
|
|
144
|
+
className,
|
|
145
|
+
variant,
|
|
146
|
+
asChild = false,
|
|
147
|
+
...props
|
|
148
|
+
}) {
|
|
149
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
150
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
+
Comp,
|
|
152
|
+
{
|
|
153
|
+
className: cn(badgeVariants({ variant }), className),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
var Input = React16__namespace.forwardRef(
|
|
159
|
+
({ className, type, ...props }, ref) => {
|
|
160
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
161
|
+
"input",
|
|
162
|
+
{
|
|
163
|
+
type,
|
|
164
|
+
className: cn(
|
|
165
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
166
|
+
className
|
|
167
|
+
),
|
|
168
|
+
ref,
|
|
169
|
+
...props
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
Input.displayName = "Input";
|
|
175
|
+
var Textarea = React16__namespace.forwardRef(
|
|
176
|
+
({ className, autoResize = false, minHeight = 50, maxHeight = 350, size = "default", onChange, ...props }, ref) => {
|
|
177
|
+
const internalRef = React16__namespace.useRef(null);
|
|
178
|
+
React16__namespace.useImperativeHandle(ref, () => internalRef.current);
|
|
179
|
+
const sizeClasses = {
|
|
180
|
+
sm: "min-h-11 h-11",
|
|
181
|
+
// 44px / 2.75rem - exact height
|
|
182
|
+
default: "min-h-[60px]",
|
|
183
|
+
// 60px / 3.75rem
|
|
184
|
+
lg: "min-h-20"
|
|
185
|
+
// 80px / 5rem
|
|
186
|
+
};
|
|
187
|
+
const paddingClasses = {
|
|
188
|
+
sm: "py-3",
|
|
189
|
+
// 12px top + 12px bottom + 20px line-height = 44px
|
|
190
|
+
default: "py-2",
|
|
191
|
+
// 8px top + 8px bottom (default)
|
|
192
|
+
lg: "py-2"
|
|
193
|
+
// 8px top + 8px bottom (default)
|
|
194
|
+
};
|
|
195
|
+
const handleResize = React16__namespace.useCallback(() => {
|
|
196
|
+
if (autoResize && size !== "sm" && internalRef.current) {
|
|
197
|
+
const textarea = internalRef.current;
|
|
198
|
+
textarea.style.height = "auto";
|
|
199
|
+
const scrollHeight = textarea.scrollHeight;
|
|
200
|
+
textarea.style.height = `${Math.min(Math.max(scrollHeight, minHeight), maxHeight)}px`;
|
|
201
|
+
}
|
|
202
|
+
}, [autoResize, size, minHeight, maxHeight]);
|
|
203
|
+
React16__namespace.useEffect(() => {
|
|
204
|
+
handleResize();
|
|
205
|
+
}, [handleResize, props.value]);
|
|
206
|
+
const handleChange = React16__namespace.useCallback(
|
|
207
|
+
(e) => {
|
|
208
|
+
handleResize();
|
|
209
|
+
onChange?.(e);
|
|
210
|
+
},
|
|
211
|
+
[onChange, handleResize]
|
|
212
|
+
);
|
|
213
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
"textarea",
|
|
215
|
+
{
|
|
216
|
+
className: cn(
|
|
217
|
+
"flex w-full rounded-md border border-input bg-transparent px-3 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
218
|
+
sizeClasses[size],
|
|
219
|
+
paddingClasses[size],
|
|
220
|
+
className
|
|
221
|
+
),
|
|
222
|
+
ref: internalRef,
|
|
223
|
+
onChange: handleChange,
|
|
224
|
+
...props
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
);
|
|
229
|
+
Textarea.displayName = "Textarea";
|
|
230
|
+
var Switch = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
231
|
+
SwitchPrimitives__namespace.Root,
|
|
232
|
+
{
|
|
233
|
+
className: cn(
|
|
234
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
235
|
+
className
|
|
236
|
+
),
|
|
237
|
+
...props,
|
|
238
|
+
ref,
|
|
239
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
240
|
+
SwitchPrimitives__namespace.Thumb,
|
|
241
|
+
{
|
|
242
|
+
className: cn(
|
|
243
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
244
|
+
"data-[state=checked]:ltr:translate-x-4 data-[state=checked]:rtl:-translate-x-4",
|
|
245
|
+
"data-[state=unchecked]:translate-x-0"
|
|
246
|
+
)
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
}
|
|
250
|
+
));
|
|
251
|
+
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
252
|
+
function Skeleton({
|
|
253
|
+
className,
|
|
254
|
+
inheritColor = false,
|
|
255
|
+
...props
|
|
256
|
+
}) {
|
|
257
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
+
"div",
|
|
259
|
+
{
|
|
260
|
+
className: cn(
|
|
261
|
+
"animate-pulse rounded-md",
|
|
262
|
+
inheritColor ? "bg-current opacity-20" : "bg-muted",
|
|
263
|
+
className
|
|
264
|
+
),
|
|
265
|
+
...props
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
var Spinner = React16__namespace.forwardRef(
|
|
270
|
+
({ className, icon: Icon2 = lucideReact.Loader2, size = "size-4", ...props }, ref) => {
|
|
271
|
+
const textColorClasses = className?.match(/\btext-\S+/g)?.join(" ") || "";
|
|
272
|
+
const wrapperClasses = lodash.trim(className?.replace(/\btext-\S+/g, "") || "");
|
|
273
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
274
|
+
"div",
|
|
275
|
+
{
|
|
276
|
+
ref,
|
|
277
|
+
className: cn("inline-flex items-center justify-center", wrapperClasses),
|
|
278
|
+
...props,
|
|
279
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: cn("animate-spin", size, textColorClasses) })
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
Spinner.displayName = "Spinner";
|
|
285
|
+
var Slider = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
286
|
+
SliderPrimitive__namespace.Root,
|
|
287
|
+
{
|
|
288
|
+
ref,
|
|
289
|
+
className: cn(
|
|
290
|
+
"relative flex w-full touch-none select-none items-center",
|
|
291
|
+
className
|
|
292
|
+
),
|
|
293
|
+
...props
|
|
294
|
+
}
|
|
295
|
+
));
|
|
296
|
+
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
297
|
+
var SliderTrack = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
298
|
+
SliderPrimitive__namespace.Track,
|
|
299
|
+
{
|
|
300
|
+
ref,
|
|
301
|
+
className: cn(
|
|
302
|
+
"relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20",
|
|
303
|
+
className
|
|
304
|
+
),
|
|
305
|
+
...props
|
|
306
|
+
}
|
|
307
|
+
));
|
|
308
|
+
SliderTrack.displayName = SliderPrimitive__namespace.Track.displayName;
|
|
309
|
+
var SliderRange = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
310
|
+
SliderPrimitive__namespace.Range,
|
|
311
|
+
{
|
|
312
|
+
ref,
|
|
313
|
+
className: cn("absolute h-full bg-primary", className),
|
|
314
|
+
...props
|
|
315
|
+
}
|
|
316
|
+
));
|
|
317
|
+
SliderRange.displayName = SliderPrimitive__namespace.Range.displayName;
|
|
318
|
+
var SliderThumb = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
319
|
+
SliderPrimitive__namespace.Thumb,
|
|
320
|
+
{
|
|
321
|
+
ref,
|
|
322
|
+
className: cn(
|
|
323
|
+
"block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
324
|
+
className
|
|
325
|
+
),
|
|
326
|
+
...props
|
|
327
|
+
}
|
|
328
|
+
));
|
|
329
|
+
SliderThumb.displayName = SliderPrimitive__namespace.Thumb.displayName;
|
|
330
|
+
var Progress = React16__namespace.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
+
ProgressPrimitive__namespace.Root,
|
|
332
|
+
{
|
|
333
|
+
ref,
|
|
334
|
+
className: cn(
|
|
335
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
336
|
+
className
|
|
337
|
+
),
|
|
338
|
+
...props,
|
|
339
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
340
|
+
ProgressPrimitive__namespace.Indicator,
|
|
341
|
+
{
|
|
342
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
343
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
}
|
|
347
|
+
));
|
|
348
|
+
Progress.displayName = ProgressPrimitive__namespace.Root.displayName;
|
|
349
|
+
var TooltipProvider = ({
|
|
350
|
+
delayDuration = 0,
|
|
351
|
+
...props
|
|
352
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
353
|
+
TooltipPrimitive__namespace.Provider,
|
|
354
|
+
{
|
|
355
|
+
delayDuration,
|
|
356
|
+
...props
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
TooltipProvider.displayName = TooltipPrimitive__namespace.Provider.displayName;
|
|
360
|
+
var Tooltip = ({
|
|
361
|
+
...props
|
|
362
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { ...props }) });
|
|
363
|
+
Tooltip.displayName = TooltipPrimitive__namespace.Root.displayName;
|
|
364
|
+
var TooltipTrigger = React16__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { ref, ...props }));
|
|
365
|
+
TooltipTrigger.displayName = TooltipPrimitive__namespace.Trigger.displayName;
|
|
366
|
+
var TooltipContent = React16__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
367
|
+
TooltipPrimitive__namespace.Content,
|
|
368
|
+
{
|
|
369
|
+
ref,
|
|
370
|
+
sideOffset,
|
|
371
|
+
className: cn(
|
|
372
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground 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",
|
|
373
|
+
className
|
|
374
|
+
),
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
) }));
|
|
378
|
+
TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
|
|
379
|
+
var Card = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
380
|
+
"div",
|
|
381
|
+
{
|
|
382
|
+
ref,
|
|
383
|
+
className: cn(
|
|
384
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
385
|
+
className
|
|
386
|
+
),
|
|
387
|
+
...props
|
|
388
|
+
}
|
|
389
|
+
));
|
|
390
|
+
Card.displayName = "Card";
|
|
391
|
+
var CardHeader = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
392
|
+
"div",
|
|
393
|
+
{
|
|
394
|
+
ref,
|
|
395
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
396
|
+
...props
|
|
397
|
+
}
|
|
398
|
+
));
|
|
399
|
+
CardHeader.displayName = "CardHeader";
|
|
400
|
+
var CardTitle = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
401
|
+
"div",
|
|
402
|
+
{
|
|
403
|
+
ref,
|
|
404
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
405
|
+
...props
|
|
406
|
+
}
|
|
407
|
+
));
|
|
408
|
+
CardTitle.displayName = "CardTitle";
|
|
409
|
+
var CardDescription = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
410
|
+
"div",
|
|
411
|
+
{
|
|
412
|
+
ref,
|
|
413
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
414
|
+
...props
|
|
415
|
+
}
|
|
416
|
+
));
|
|
417
|
+
CardDescription.displayName = "CardDescription";
|
|
418
|
+
var CardContent = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
419
|
+
CardContent.displayName = "CardContent";
|
|
420
|
+
var CardFooter = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
421
|
+
"div",
|
|
422
|
+
{
|
|
423
|
+
ref,
|
|
424
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
425
|
+
...props
|
|
426
|
+
}
|
|
427
|
+
));
|
|
428
|
+
CardFooter.displayName = "CardFooter";
|
|
429
|
+
var Header = React16__namespace.default.forwardRef(
|
|
430
|
+
({ children, className }, ref) => {
|
|
431
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
432
|
+
"header",
|
|
433
|
+
{
|
|
434
|
+
ref,
|
|
435
|
+
className: cn(
|
|
436
|
+
"flex items-center justify-end px-6 py-4 bg-background border-b border-border h-16 w-full",
|
|
437
|
+
className
|
|
438
|
+
),
|
|
439
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4", children })
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
);
|
|
444
|
+
Header.displayName = "Header";
|
|
445
|
+
var NavigationMenu = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
446
|
+
NavigationMenuPrimitive__namespace.Root,
|
|
447
|
+
{
|
|
448
|
+
ref,
|
|
449
|
+
className: cn(
|
|
450
|
+
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
451
|
+
className
|
|
452
|
+
),
|
|
453
|
+
...props,
|
|
454
|
+
children: [
|
|
455
|
+
children,
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx(NavigationMenuViewport, {})
|
|
457
|
+
]
|
|
458
|
+
}
|
|
459
|
+
));
|
|
460
|
+
NavigationMenu.displayName = NavigationMenuPrimitive__namespace.Root.displayName;
|
|
461
|
+
var NavigationMenuList = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
462
|
+
NavigationMenuPrimitive__namespace.List,
|
|
463
|
+
{
|
|
464
|
+
ref,
|
|
465
|
+
className: cn(
|
|
466
|
+
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
467
|
+
className
|
|
468
|
+
),
|
|
469
|
+
...props
|
|
470
|
+
}
|
|
471
|
+
));
|
|
472
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive__namespace.List.displayName;
|
|
473
|
+
var NavigationMenuItem = NavigationMenuPrimitive__namespace.Item;
|
|
474
|
+
var navigationMenuTriggerStyle = classVarianceAuthority.cva(
|
|
475
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
476
|
+
);
|
|
477
|
+
var NavigationMenuTrigger = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
478
|
+
NavigationMenuPrimitive__namespace.Trigger,
|
|
479
|
+
{
|
|
480
|
+
ref,
|
|
481
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
482
|
+
...props,
|
|
483
|
+
children: [
|
|
484
|
+
children,
|
|
485
|
+
" ",
|
|
486
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
487
|
+
lucideReact.ChevronDown,
|
|
488
|
+
{
|
|
489
|
+
className: "relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
490
|
+
"aria-hidden": "true"
|
|
491
|
+
}
|
|
492
|
+
)
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
));
|
|
496
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive__namespace.Trigger.displayName;
|
|
497
|
+
var NavigationMenuContent = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
498
|
+
NavigationMenuPrimitive__namespace.Content,
|
|
499
|
+
{
|
|
500
|
+
ref,
|
|
501
|
+
className: cn(
|
|
502
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
503
|
+
className
|
|
504
|
+
),
|
|
505
|
+
...props
|
|
506
|
+
}
|
|
507
|
+
));
|
|
508
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive__namespace.Content.displayName;
|
|
509
|
+
var NavigationMenuLink = NavigationMenuPrimitive__namespace.Link;
|
|
510
|
+
var NavigationMenuViewport = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
511
|
+
NavigationMenuPrimitive__namespace.Viewport,
|
|
512
|
+
{
|
|
513
|
+
className: cn(
|
|
514
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
515
|
+
className
|
|
516
|
+
),
|
|
517
|
+
ref,
|
|
518
|
+
...props
|
|
519
|
+
}
|
|
520
|
+
) }));
|
|
521
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive__namespace.Viewport.displayName;
|
|
522
|
+
var NavigationMenuIndicator = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
+
NavigationMenuPrimitive__namespace.Indicator,
|
|
524
|
+
{
|
|
525
|
+
ref,
|
|
526
|
+
className: cn(
|
|
527
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
528
|
+
className
|
|
529
|
+
),
|
|
530
|
+
...props,
|
|
531
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
532
|
+
}
|
|
533
|
+
));
|
|
534
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive__namespace.Indicator.displayName;
|
|
535
|
+
var Sheet = SheetPrimitive__namespace.Root;
|
|
536
|
+
var SheetTrigger = SheetPrimitive__namespace.Trigger;
|
|
537
|
+
var SheetClose = SheetPrimitive__namespace.Close;
|
|
538
|
+
var SheetPortal = SheetPrimitive__namespace.Portal;
|
|
539
|
+
var SheetOverlay = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
540
|
+
SheetPrimitive__namespace.Overlay,
|
|
541
|
+
{
|
|
542
|
+
className: cn(
|
|
543
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
544
|
+
className
|
|
545
|
+
),
|
|
546
|
+
...props,
|
|
547
|
+
ref
|
|
548
|
+
}
|
|
549
|
+
));
|
|
550
|
+
SheetOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
|
|
551
|
+
var sheetVariants = classVarianceAuthority.cva(
|
|
552
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
553
|
+
{
|
|
554
|
+
variants: {
|
|
555
|
+
side: {
|
|
556
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
557
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
558
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
559
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
defaultVariants: {
|
|
563
|
+
side: "right"
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
);
|
|
567
|
+
var SheetContent = React16__namespace.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
568
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
569
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
570
|
+
SheetPrimitive__namespace.Content,
|
|
571
|
+
{
|
|
572
|
+
ref,
|
|
573
|
+
className: cn(sheetVariants({ side }), className),
|
|
574
|
+
...props,
|
|
575
|
+
children: [
|
|
576
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__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-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
577
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
579
|
+
] }),
|
|
580
|
+
children
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
)
|
|
584
|
+
] }));
|
|
585
|
+
SheetContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
586
|
+
var SheetHeader = ({
|
|
587
|
+
className,
|
|
588
|
+
...props
|
|
589
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
590
|
+
"div",
|
|
591
|
+
{
|
|
592
|
+
className: cn(
|
|
593
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
594
|
+
className
|
|
595
|
+
),
|
|
596
|
+
...props
|
|
597
|
+
}
|
|
598
|
+
);
|
|
599
|
+
SheetHeader.displayName = "SheetHeader";
|
|
600
|
+
var SheetFooter = ({
|
|
601
|
+
className,
|
|
602
|
+
...props
|
|
603
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
604
|
+
"div",
|
|
605
|
+
{
|
|
606
|
+
className: cn(
|
|
607
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
608
|
+
className
|
|
609
|
+
),
|
|
610
|
+
...props
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
SheetFooter.displayName = "SheetFooter";
|
|
614
|
+
var SheetTitle = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
615
|
+
SheetPrimitive__namespace.Title,
|
|
616
|
+
{
|
|
617
|
+
ref,
|
|
618
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
619
|
+
...props
|
|
620
|
+
}
|
|
621
|
+
));
|
|
622
|
+
SheetTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
623
|
+
var SheetDescription = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
624
|
+
SheetPrimitive__namespace.Description,
|
|
625
|
+
{
|
|
626
|
+
ref,
|
|
627
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
628
|
+
...props
|
|
629
|
+
}
|
|
630
|
+
));
|
|
631
|
+
SheetDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
|
632
|
+
var Dialog = SheetPrimitive__namespace.Root;
|
|
633
|
+
var DialogTrigger = SheetPrimitive__namespace.Trigger;
|
|
634
|
+
var DialogPortal = SheetPrimitive__namespace.Portal;
|
|
635
|
+
var DialogClose = SheetPrimitive__namespace.Close;
|
|
636
|
+
var DialogOverlay = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
+
SheetPrimitive__namespace.Overlay,
|
|
638
|
+
{
|
|
639
|
+
ref,
|
|
640
|
+
className: cn(
|
|
641
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
642
|
+
className
|
|
643
|
+
),
|
|
644
|
+
...props
|
|
645
|
+
}
|
|
646
|
+
));
|
|
647
|
+
DialogOverlay.displayName = SheetPrimitive__namespace.Overlay.displayName;
|
|
648
|
+
var DialogContent = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
649
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
650
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
651
|
+
SheetPrimitive__namespace.Content,
|
|
652
|
+
{
|
|
653
|
+
ref,
|
|
654
|
+
className: cn(
|
|
655
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg 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%] sm:rounded-lg",
|
|
656
|
+
className
|
|
657
|
+
),
|
|
658
|
+
...props,
|
|
659
|
+
children: [
|
|
660
|
+
children,
|
|
661
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__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-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
662
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
663
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
664
|
+
] })
|
|
665
|
+
]
|
|
666
|
+
}
|
|
667
|
+
)
|
|
668
|
+
] }));
|
|
669
|
+
DialogContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
670
|
+
var DialogHeader = ({
|
|
671
|
+
className,
|
|
672
|
+
...props
|
|
673
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
674
|
+
"div",
|
|
675
|
+
{
|
|
676
|
+
className: cn(
|
|
677
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
678
|
+
className
|
|
679
|
+
),
|
|
680
|
+
...props
|
|
681
|
+
}
|
|
682
|
+
);
|
|
683
|
+
DialogHeader.displayName = "DialogHeader";
|
|
684
|
+
var DialogFooter = ({
|
|
685
|
+
className,
|
|
686
|
+
...props
|
|
687
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
688
|
+
"div",
|
|
689
|
+
{
|
|
690
|
+
className: cn(
|
|
691
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
692
|
+
className
|
|
693
|
+
),
|
|
694
|
+
...props
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
DialogFooter.displayName = "DialogFooter";
|
|
698
|
+
var DialogTitle = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
699
|
+
SheetPrimitive__namespace.Title,
|
|
700
|
+
{
|
|
701
|
+
ref,
|
|
702
|
+
className: cn(
|
|
703
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
704
|
+
className
|
|
705
|
+
),
|
|
706
|
+
...props
|
|
707
|
+
}
|
|
708
|
+
));
|
|
709
|
+
DialogTitle.displayName = SheetPrimitive__namespace.Title.displayName;
|
|
710
|
+
var DialogDescription = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
711
|
+
SheetPrimitive__namespace.Description,
|
|
712
|
+
{
|
|
713
|
+
ref,
|
|
714
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
715
|
+
...props
|
|
716
|
+
}
|
|
717
|
+
));
|
|
718
|
+
DialogDescription.displayName = SheetPrimitive__namespace.Description.displayName;
|
|
719
|
+
var Select = SelectPrimitive__namespace.Root;
|
|
720
|
+
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
721
|
+
var SelectValue = SelectPrimitive__namespace.Value;
|
|
722
|
+
var SelectTrigger = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
723
|
+
SelectPrimitive__namespace.Trigger,
|
|
724
|
+
{
|
|
725
|
+
ref,
|
|
726
|
+
className: cn(
|
|
727
|
+
// HAI3 customization: bg-background and hover states for consistency with Button Outline
|
|
728
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm ring-offset-background hover:bg-accent hover:text-bg-accent-foreground data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
729
|
+
className
|
|
730
|
+
),
|
|
731
|
+
...props,
|
|
732
|
+
children: [
|
|
733
|
+
children,
|
|
734
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
735
|
+
]
|
|
736
|
+
}
|
|
737
|
+
));
|
|
738
|
+
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
739
|
+
var SelectScrollUpButton = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
740
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
741
|
+
{
|
|
742
|
+
ref,
|
|
743
|
+
className: cn(
|
|
744
|
+
"flex cursor-default items-center justify-center py-1",
|
|
745
|
+
className
|
|
746
|
+
),
|
|
747
|
+
...props,
|
|
748
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
749
|
+
}
|
|
750
|
+
));
|
|
751
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
752
|
+
var SelectScrollDownButton = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
753
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
754
|
+
{
|
|
755
|
+
ref,
|
|
756
|
+
className: cn(
|
|
757
|
+
"flex cursor-default items-center justify-center py-1",
|
|
758
|
+
className
|
|
759
|
+
),
|
|
760
|
+
...props,
|
|
761
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
762
|
+
}
|
|
763
|
+
));
|
|
764
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
765
|
+
var SelectContent = React16__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
766
|
+
SelectPrimitive__namespace.Content,
|
|
767
|
+
{
|
|
768
|
+
ref,
|
|
769
|
+
className: cn(
|
|
770
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground 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 origin-[--radix-select-content-transform-origin]",
|
|
771
|
+
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",
|
|
772
|
+
className
|
|
773
|
+
),
|
|
774
|
+
position,
|
|
775
|
+
...props,
|
|
776
|
+
children: [
|
|
777
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
778
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
779
|
+
SelectPrimitive__namespace.Viewport,
|
|
780
|
+
{
|
|
781
|
+
className: cn(
|
|
782
|
+
"p-1",
|
|
783
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
784
|
+
),
|
|
785
|
+
children
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
) }));
|
|
792
|
+
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
793
|
+
var SelectLabel = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
794
|
+
SelectPrimitive__namespace.Label,
|
|
795
|
+
{
|
|
796
|
+
ref,
|
|
797
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
798
|
+
...props
|
|
799
|
+
}
|
|
800
|
+
));
|
|
801
|
+
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
802
|
+
var SelectItem = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
803
|
+
SelectPrimitive__namespace.Item,
|
|
804
|
+
{
|
|
805
|
+
ref,
|
|
806
|
+
className: cn(
|
|
807
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-bg-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
808
|
+
className
|
|
809
|
+
),
|
|
810
|
+
...props,
|
|
811
|
+
children: [
|
|
812
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-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" }) }) }),
|
|
813
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
814
|
+
]
|
|
815
|
+
}
|
|
816
|
+
));
|
|
817
|
+
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
818
|
+
var SelectSeparator = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
819
|
+
SelectPrimitive__namespace.Separator,
|
|
820
|
+
{
|
|
821
|
+
ref,
|
|
822
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
823
|
+
...props
|
|
824
|
+
}
|
|
825
|
+
));
|
|
826
|
+
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
827
|
+
var DropdownMenu = ({ dir, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
828
|
+
DropdownMenuPrimitive__namespace.Root,
|
|
829
|
+
{
|
|
830
|
+
...props,
|
|
831
|
+
dir
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
DropdownMenu.displayName = "DropdownMenu";
|
|
835
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
836
|
+
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
837
|
+
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
838
|
+
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
839
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
840
|
+
var DropdownMenuSubTrigger = React16__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
841
|
+
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
842
|
+
{
|
|
843
|
+
ref,
|
|
844
|
+
className: cn(
|
|
845
|
+
"flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
846
|
+
inset && "pl-8",
|
|
847
|
+
className
|
|
848
|
+
),
|
|
849
|
+
...props,
|
|
850
|
+
children: [
|
|
851
|
+
children,
|
|
852
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ms-auto rtl:rotate-180" })
|
|
853
|
+
]
|
|
854
|
+
}
|
|
855
|
+
));
|
|
856
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
857
|
+
var DropdownMenuSubContent = React16__namespace.forwardRef(({ className, container, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
858
|
+
DropdownMenuPrimitive__namespace.SubContent,
|
|
859
|
+
{
|
|
860
|
+
ref,
|
|
861
|
+
className: cn(
|
|
862
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
863
|
+
className
|
|
864
|
+
),
|
|
865
|
+
...props
|
|
866
|
+
}
|
|
867
|
+
) }));
|
|
868
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
869
|
+
var DropdownMenuContent = React16__namespace.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { container: container ?? void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
870
|
+
DropdownMenuPrimitive__namespace.Content,
|
|
871
|
+
{
|
|
872
|
+
ref,
|
|
873
|
+
sideOffset,
|
|
874
|
+
className: cn(
|
|
875
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
876
|
+
"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 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
877
|
+
className
|
|
878
|
+
),
|
|
879
|
+
...props
|
|
880
|
+
}
|
|
881
|
+
) }));
|
|
882
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
883
|
+
var DropdownMenuItem = React16__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
884
|
+
DropdownMenuPrimitive__namespace.Item,
|
|
885
|
+
{
|
|
886
|
+
ref,
|
|
887
|
+
className: cn(
|
|
888
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
889
|
+
inset && "pl-8",
|
|
890
|
+
className
|
|
891
|
+
),
|
|
892
|
+
...props
|
|
893
|
+
}
|
|
894
|
+
));
|
|
895
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
896
|
+
var DropdownMenuCheckboxItem = React16__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
897
|
+
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
898
|
+
{
|
|
899
|
+
ref,
|
|
900
|
+
className: cn(
|
|
901
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
902
|
+
className
|
|
903
|
+
),
|
|
904
|
+
checked,
|
|
905
|
+
...props,
|
|
906
|
+
children: [
|
|
907
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) }),
|
|
908
|
+
children
|
|
909
|
+
]
|
|
910
|
+
}
|
|
911
|
+
));
|
|
912
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
913
|
+
var DropdownMenuRadioItem = React16__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
914
|
+
DropdownMenuPrimitive__namespace.RadioItem,
|
|
915
|
+
{
|
|
916
|
+
ref,
|
|
917
|
+
className: cn(
|
|
918
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
919
|
+
className
|
|
920
|
+
),
|
|
921
|
+
...props,
|
|
922
|
+
children: [
|
|
923
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
924
|
+
children
|
|
925
|
+
]
|
|
926
|
+
}
|
|
927
|
+
));
|
|
928
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
929
|
+
var DropdownMenuLabel = React16__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
930
|
+
DropdownMenuPrimitive__namespace.Label,
|
|
931
|
+
{
|
|
932
|
+
ref,
|
|
933
|
+
className: cn(
|
|
934
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
935
|
+
inset && "pl-8",
|
|
936
|
+
className
|
|
937
|
+
),
|
|
938
|
+
...props
|
|
939
|
+
}
|
|
940
|
+
));
|
|
941
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
942
|
+
var DropdownMenuSeparator = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
943
|
+
DropdownMenuPrimitive__namespace.Separator,
|
|
944
|
+
{
|
|
945
|
+
ref,
|
|
946
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
947
|
+
...props
|
|
948
|
+
}
|
|
949
|
+
));
|
|
950
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
951
|
+
var DropdownMenuShortcut = ({
|
|
952
|
+
className,
|
|
953
|
+
...props
|
|
954
|
+
}) => {
|
|
955
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
956
|
+
"span",
|
|
957
|
+
{
|
|
958
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
959
|
+
...props
|
|
960
|
+
}
|
|
961
|
+
);
|
|
962
|
+
};
|
|
963
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
964
|
+
var IconButton = React16__namespace.default.forwardRef(
|
|
965
|
+
({ variant = uikitContracts.ButtonVariant.Ghost, size = uikitContracts.IconButtonSize.Default, className, ...props }, ref) => {
|
|
966
|
+
const sizeStyles = {
|
|
967
|
+
[uikitContracts.IconButtonSize.Small]: "h-8 w-8",
|
|
968
|
+
[uikitContracts.IconButtonSize.Default]: "h-9 w-9",
|
|
969
|
+
[uikitContracts.IconButtonSize.Large]: "h-11 w-11"
|
|
970
|
+
};
|
|
971
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
972
|
+
Button,
|
|
973
|
+
{
|
|
974
|
+
ref,
|
|
975
|
+
variant,
|
|
976
|
+
size: uikitContracts.ButtonSize.Icon,
|
|
977
|
+
className: cn(sizeStyles[size], className),
|
|
978
|
+
...props
|
|
979
|
+
}
|
|
980
|
+
);
|
|
981
|
+
}
|
|
982
|
+
);
|
|
983
|
+
IconButton.displayName = "IconButton";
|
|
984
|
+
var DropdownButton = React16__namespace.default.forwardRef(({ children, variant = uikitContracts.ButtonVariant.Outline, className, ...props }, ref) => {
|
|
985
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
986
|
+
Button,
|
|
987
|
+
{
|
|
988
|
+
ref,
|
|
989
|
+
variant,
|
|
990
|
+
className: cn("min-w-40 justify-between rtl:flex-row-reverse", className),
|
|
991
|
+
...props,
|
|
992
|
+
children: [
|
|
993
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children }),
|
|
994
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
);
|
|
998
|
+
});
|
|
999
|
+
DropdownButton.displayName = "DropdownButton";
|
|
1000
|
+
var Sidebar = React16__namespace.forwardRef(({ collapsed = false, className, children, ...props }, ref) => {
|
|
1001
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1002
|
+
"aside",
|
|
1003
|
+
{
|
|
1004
|
+
ref,
|
|
1005
|
+
"data-state": collapsed ? "collapsed" : "expanded",
|
|
1006
|
+
"data-collapsible": collapsed ? "icon" : "",
|
|
1007
|
+
className: cn(
|
|
1008
|
+
"group flex flex-col border-r border-mainMenu-border transition-[width] duration-200 ease-linear",
|
|
1009
|
+
"bg-mainMenu text-mainMenu-foreground",
|
|
1010
|
+
collapsed ? "w-14" : "w-64",
|
|
1011
|
+
className
|
|
1012
|
+
),
|
|
1013
|
+
...props,
|
|
1014
|
+
children
|
|
1015
|
+
}
|
|
1016
|
+
);
|
|
1017
|
+
});
|
|
1018
|
+
Sidebar.displayName = "Sidebar";
|
|
1019
|
+
var SidebarContent = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1020
|
+
"div",
|
|
1021
|
+
{
|
|
1022
|
+
ref,
|
|
1023
|
+
"data-sidebar": "content",
|
|
1024
|
+
className: cn(
|
|
1025
|
+
// HAI3 customization: gap and padding use rem-based spacing for theme scaling
|
|
1026
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",
|
|
1027
|
+
className
|
|
1028
|
+
),
|
|
1029
|
+
...props
|
|
1030
|
+
}
|
|
1031
|
+
));
|
|
1032
|
+
SidebarContent.displayName = "SidebarContent";
|
|
1033
|
+
var SidebarMenu = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
|
+
"ul",
|
|
1035
|
+
{
|
|
1036
|
+
ref,
|
|
1037
|
+
"data-sidebar": "menu",
|
|
1038
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
1039
|
+
...props
|
|
1040
|
+
}
|
|
1041
|
+
));
|
|
1042
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
1043
|
+
var SidebarMenuItem = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1044
|
+
"li",
|
|
1045
|
+
{
|
|
1046
|
+
ref,
|
|
1047
|
+
"data-sidebar": "menu-item",
|
|
1048
|
+
className: cn("group/menu-item relative", className),
|
|
1049
|
+
...props
|
|
1050
|
+
}
|
|
1051
|
+
));
|
|
1052
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
1053
|
+
var sidebarMenuButtonVariants = classVarianceAuthority.cva(
|
|
1054
|
+
// HAI3 customization: All sizing uses rem-based Tailwind classes for theme responsiveness
|
|
1055
|
+
"peer/menu-button flex w-full items-center gap-2 rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>span:last-child]:overflow-hidden [&>svg]:size-5 [&>svg]:shrink-0 text-mainMenu-foreground hover:bg-mainMenu-hover data-[active=true]:bg-mainMenu-selected data-[active=true]:text-white data-[active=true]:font-medium",
|
|
1056
|
+
{
|
|
1057
|
+
variants: {
|
|
1058
|
+
variant: {
|
|
1059
|
+
default: "",
|
|
1060
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--border))] hover:bg-mainMenu-hover"
|
|
1061
|
+
},
|
|
1062
|
+
size: {
|
|
1063
|
+
// HAI3 customization: All heights use rem-based Tailwind classes (h-10=2.5rem, h-7=1.75rem, h-12=3rem)
|
|
1064
|
+
default: "h-10 text-sm",
|
|
1065
|
+
sm: "h-7 text-xs",
|
|
1066
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
1067
|
+
}
|
|
1068
|
+
},
|
|
1069
|
+
defaultVariants: {
|
|
1070
|
+
variant: "default",
|
|
1071
|
+
size: "default"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
);
|
|
1075
|
+
var SidebarMenuButton = React16__namespace.forwardRef(
|
|
1076
|
+
({
|
|
1077
|
+
asChild = false,
|
|
1078
|
+
isActive = false,
|
|
1079
|
+
variant = "default",
|
|
1080
|
+
size = "default",
|
|
1081
|
+
tooltip,
|
|
1082
|
+
className,
|
|
1083
|
+
...props
|
|
1084
|
+
}, ref) => {
|
|
1085
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
1086
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1087
|
+
Comp,
|
|
1088
|
+
{
|
|
1089
|
+
ref,
|
|
1090
|
+
"data-sidebar": "menu-button",
|
|
1091
|
+
"data-size": size,
|
|
1092
|
+
"data-active": isActive,
|
|
1093
|
+
title: tooltip,
|
|
1094
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
1095
|
+
...props
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
1101
|
+
var SidebarMenuIcon = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1102
|
+
"span",
|
|
1103
|
+
{
|
|
1104
|
+
ref,
|
|
1105
|
+
className: cn("size-5 min-w-[1.5rem] flex-shrink-0 [&>svg]:w-full [&>svg]:h-full", className),
|
|
1106
|
+
...props
|
|
1107
|
+
}
|
|
1108
|
+
));
|
|
1109
|
+
SidebarMenuIcon.displayName = "SidebarMenuIcon";
|
|
1110
|
+
var SidebarMenuLabel = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1111
|
+
"span",
|
|
1112
|
+
{
|
|
1113
|
+
ref,
|
|
1114
|
+
className: cn(className),
|
|
1115
|
+
...props
|
|
1116
|
+
}
|
|
1117
|
+
));
|
|
1118
|
+
SidebarMenuLabel.displayName = "SidebarMenuLabel";
|
|
1119
|
+
var SidebarHeader = React16__namespace.forwardRef(
|
|
1120
|
+
({ logo, logoText, collapsed = false, onClick, className, ...props }, ref) => {
|
|
1121
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1122
|
+
"div",
|
|
1123
|
+
{
|
|
1124
|
+
ref,
|
|
1125
|
+
className: cn(
|
|
1126
|
+
"flex flex-col h-16",
|
|
1127
|
+
className
|
|
1128
|
+
),
|
|
1129
|
+
...props,
|
|
1130
|
+
children: [
|
|
1131
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center flex-1 px-2", children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarMenuButton, { onClick, tooltip: collapsed ? "Expand menu" : "Collapse menu", children: [
|
|
1132
|
+
logo && /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuIcon, { children: logo }),
|
|
1133
|
+
logoText && /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuLabel, { className: "[&>svg]:h-5 [&>svg]:w-auto", children: logoText })
|
|
1134
|
+
] }) }),
|
|
1135
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-mainMenu-border mx-4" })
|
|
1136
|
+
]
|
|
1137
|
+
}
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
);
|
|
1141
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
1142
|
+
var UserInfo = React16__namespace.default.forwardRef(
|
|
1143
|
+
({ displayName, email, avatarUrl, className, loading }, ref) => {
|
|
1144
|
+
const getInitials = () => {
|
|
1145
|
+
if (!displayName) return lodash.toUpper(email?.[0] || "") || "?";
|
|
1146
|
+
const parts = lodash.trim(displayName).split(/\s+/);
|
|
1147
|
+
if (parts.length >= 2) {
|
|
1148
|
+
return lodash.toUpper(`${parts[0][0]}${parts[parts.length - 1][0]}`);
|
|
1149
|
+
}
|
|
1150
|
+
return lodash.toUpper(displayName.slice(0, 2));
|
|
1151
|
+
};
|
|
1152
|
+
const initials = getInitials();
|
|
1153
|
+
const displayText = displayName || email || "User";
|
|
1154
|
+
if (loading) {
|
|
1155
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex items-center gap-2 text-sm", className), children: [
|
|
1156
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-8 rounded-full" }),
|
|
1157
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-24" })
|
|
1158
|
+
] });
|
|
1159
|
+
}
|
|
1160
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1161
|
+
"div",
|
|
1162
|
+
{
|
|
1163
|
+
ref,
|
|
1164
|
+
className: cn(
|
|
1165
|
+
"flex items-center gap-2 text-sm text-muted-foreground",
|
|
1166
|
+
className
|
|
1167
|
+
),
|
|
1168
|
+
children: [
|
|
1169
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "h-8 w-8", children: [
|
|
1170
|
+
avatarUrl && /* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: avatarUrl, alt: displayText }),
|
|
1171
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: initials })
|
|
1172
|
+
] }),
|
|
1173
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: displayText })
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
);
|
|
1179
|
+
UserInfo.displayName = "UserInfo";
|
|
1180
|
+
var MessageType = /* @__PURE__ */ ((MessageType2) => {
|
|
1181
|
+
MessageType2["User"] = "user";
|
|
1182
|
+
MessageType2["Assistant"] = "assistant";
|
|
1183
|
+
return MessageType2;
|
|
1184
|
+
})(MessageType || {});
|
|
1185
|
+
var MessageBubble = ({
|
|
1186
|
+
type,
|
|
1187
|
+
content,
|
|
1188
|
+
className = "",
|
|
1189
|
+
onCopy,
|
|
1190
|
+
onEdit,
|
|
1191
|
+
onDelete
|
|
1192
|
+
}) => {
|
|
1193
|
+
const isUser = type === "user" /* User */;
|
|
1194
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-4 group ${className}`, children: [
|
|
1195
|
+
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { className: "h-8 w-8 flex-shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
|
+
AvatarFallback,
|
|
1197
|
+
{
|
|
1198
|
+
className: isUser ? "bg-blue-500 text-white" : "bg-green-500 text-white",
|
|
1199
|
+
children: isUser ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bot, { size: 16 })
|
|
1200
|
+
}
|
|
1201
|
+
) }),
|
|
1202
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1203
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-sm max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "leading-relaxed whitespace-pre-wrap", children: content }) }),
|
|
1204
|
+
(onCopy || onEdit || onDelete) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 mt-2 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
1205
|
+
onCopy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1206
|
+
"button",
|
|
1207
|
+
{
|
|
1208
|
+
onClick: onCopy,
|
|
1209
|
+
className: "p-1.5 hover:bg-muted rounded-lg transition-colors text-muted-foreground hover:text-foreground",
|
|
1210
|
+
title: "Copy message",
|
|
1211
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1212
|
+
"svg",
|
|
1213
|
+
{
|
|
1214
|
+
width: "14",
|
|
1215
|
+
height: "14",
|
|
1216
|
+
viewBox: "0 0 24 24",
|
|
1217
|
+
fill: "none",
|
|
1218
|
+
stroke: "currentColor",
|
|
1219
|
+
strokeWidth: "2",
|
|
1220
|
+
strokeLinecap: "round",
|
|
1221
|
+
strokeLinejoin: "round",
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1224
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1225
|
+
]
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
}
|
|
1229
|
+
),
|
|
1230
|
+
onEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
+
"button",
|
|
1232
|
+
{
|
|
1233
|
+
onClick: onEdit,
|
|
1234
|
+
className: "p-1.5 hover:bg-muted rounded-lg transition-colors text-muted-foreground hover:text-foreground",
|
|
1235
|
+
title: "Edit message",
|
|
1236
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1237
|
+
"svg",
|
|
1238
|
+
{
|
|
1239
|
+
width: "14",
|
|
1240
|
+
height: "14",
|
|
1241
|
+
viewBox: "0 0 24 24",
|
|
1242
|
+
fill: "none",
|
|
1243
|
+
stroke: "currentColor",
|
|
1244
|
+
strokeWidth: "2",
|
|
1245
|
+
strokeLinecap: "round",
|
|
1246
|
+
strokeLinejoin: "round",
|
|
1247
|
+
children: [
|
|
1248
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
1249
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
|
|
1250
|
+
]
|
|
1251
|
+
}
|
|
1252
|
+
)
|
|
1253
|
+
}
|
|
1254
|
+
),
|
|
1255
|
+
onDelete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1256
|
+
"button",
|
|
1257
|
+
{
|
|
1258
|
+
onClick: onDelete,
|
|
1259
|
+
className: "p-1.5 hover:bg-destructive/10 rounded-lg transition-colors text-muted-foreground hover:text-destructive",
|
|
1260
|
+
title: "Delete message",
|
|
1261
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1262
|
+
"svg",
|
|
1263
|
+
{
|
|
1264
|
+
width: "14",
|
|
1265
|
+
height: "14",
|
|
1266
|
+
viewBox: "0 0 24 24",
|
|
1267
|
+
fill: "none",
|
|
1268
|
+
stroke: "currentColor",
|
|
1269
|
+
strokeWidth: "2",
|
|
1270
|
+
strokeLinecap: "round",
|
|
1271
|
+
strokeLinejoin: "round",
|
|
1272
|
+
children: [
|
|
1273
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "3 6 5 6 21 6" }),
|
|
1274
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
1275
|
+
]
|
|
1276
|
+
}
|
|
1277
|
+
)
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
] })
|
|
1281
|
+
] })
|
|
1282
|
+
] });
|
|
1283
|
+
};
|
|
1284
|
+
var ChatInput = ({
|
|
1285
|
+
value,
|
|
1286
|
+
onChange,
|
|
1287
|
+
onSend,
|
|
1288
|
+
onAttachFile,
|
|
1289
|
+
placeholder = "Type a message...",
|
|
1290
|
+
disabled = false,
|
|
1291
|
+
maxRows = 14,
|
|
1292
|
+
className = ""
|
|
1293
|
+
}) => {
|
|
1294
|
+
const handleKeyDown = (e) => {
|
|
1295
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
1296
|
+
e.preventDefault();
|
|
1297
|
+
if (!disabled && lodash.trim(value)) {
|
|
1298
|
+
onSend();
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
const rows = Math.min(
|
|
1303
|
+
Math.max(value.split("\n").length, 1),
|
|
1304
|
+
maxRows
|
|
1305
|
+
);
|
|
1306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-end gap-2 ${className}`, children: [
|
|
1307
|
+
onAttachFile && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1308
|
+
Button,
|
|
1309
|
+
{
|
|
1310
|
+
variant: uikitContracts.ButtonVariant.Ghost,
|
|
1311
|
+
size: uikitContracts.ButtonSize.Icon,
|
|
1312
|
+
onClick: onAttachFile,
|
|
1313
|
+
disabled,
|
|
1314
|
+
className: "flex-shrink-0",
|
|
1315
|
+
"aria-label": "Attach file",
|
|
1316
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { size: 20 })
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1320
|
+
"textarea",
|
|
1321
|
+
{
|
|
1322
|
+
value,
|
|
1323
|
+
onChange: (e) => onChange(e.target.value),
|
|
1324
|
+
onKeyDown: handleKeyDown,
|
|
1325
|
+
placeholder,
|
|
1326
|
+
disabled,
|
|
1327
|
+
rows,
|
|
1328
|
+
className: "flex-1 resize-none rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
1329
|
+
}
|
|
1330
|
+
),
|
|
1331
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1332
|
+
Button,
|
|
1333
|
+
{
|
|
1334
|
+
onClick: onSend,
|
|
1335
|
+
disabled: disabled || !lodash.trim(value),
|
|
1336
|
+
className: "flex-shrink-0",
|
|
1337
|
+
"aria-label": "Send message",
|
|
1338
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Send, { size: 20 })
|
|
1339
|
+
}
|
|
1340
|
+
)
|
|
1341
|
+
] });
|
|
1342
|
+
};
|
|
1343
|
+
var ThreadList = ({
|
|
1344
|
+
threads,
|
|
1345
|
+
selectedThreadId,
|
|
1346
|
+
onThreadSelect,
|
|
1347
|
+
onNewThread,
|
|
1348
|
+
onDeleteThread,
|
|
1349
|
+
searchQuery = "",
|
|
1350
|
+
onSearchChange,
|
|
1351
|
+
loading = false,
|
|
1352
|
+
className = ""
|
|
1353
|
+
}) => {
|
|
1354
|
+
if (loading) {
|
|
1355
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col h-full ${className}`, children: [
|
|
1356
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b", children: [
|
|
1357
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-8 w-full mb-3" }),
|
|
1358
|
+
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-10 w-full" })
|
|
1359
|
+
] }),
|
|
1360
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto p-2", children: [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-16 w-full mb-2" }, i)) })
|
|
1361
|
+
] });
|
|
1362
|
+
}
|
|
1363
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col h-full ${className}`, children: [
|
|
1364
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 border-b", children: [
|
|
1365
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1366
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-semibold", children: "Recent Chats" }),
|
|
1367
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1368
|
+
Button,
|
|
1369
|
+
{
|
|
1370
|
+
variant: uikitContracts.ButtonVariant.Ghost,
|
|
1371
|
+
size: uikitContracts.ButtonSize.Icon,
|
|
1372
|
+
onClick: onNewThread,
|
|
1373
|
+
"aria-label": "New chat",
|
|
1374
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { size: 16 })
|
|
1375
|
+
}
|
|
1376
|
+
)
|
|
1377
|
+
] }),
|
|
1378
|
+
onSearchChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1379
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1380
|
+
lucideReact.Search,
|
|
1381
|
+
{
|
|
1382
|
+
size: 16,
|
|
1383
|
+
className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground"
|
|
1384
|
+
}
|
|
1385
|
+
),
|
|
1386
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1387
|
+
"input",
|
|
1388
|
+
{
|
|
1389
|
+
type: "text",
|
|
1390
|
+
placeholder: "Search chats...",
|
|
1391
|
+
value: searchQuery,
|
|
1392
|
+
onChange: (e) => onSearchChange(e.target.value),
|
|
1393
|
+
className: "w-full pl-9 pr-3 py-2 border border-input rounded-lg text-sm bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
1394
|
+
}
|
|
1395
|
+
)
|
|
1396
|
+
] })
|
|
1397
|
+
] }),
|
|
1398
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto", children: threads.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-muted-foreground text-sm", children: "No chats yet. Start a new conversation!" }) : threads.map((thread) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1399
|
+
"div",
|
|
1400
|
+
{
|
|
1401
|
+
onClick: () => onThreadSelect(thread.id),
|
|
1402
|
+
className: `p-3 border-b cursor-pointer transition-colors hover:bg-muted/50 ${selectedThreadId === thread.id ? "bg-muted" : ""}`,
|
|
1403
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
1404
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
1405
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "font-medium text-sm truncate mb-1", children: [
|
|
1406
|
+
thread.title,
|
|
1407
|
+
thread.isTemporary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: "(Temporary)" })
|
|
1408
|
+
] }),
|
|
1409
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground truncate", children: thread.preview })
|
|
1410
|
+
] }),
|
|
1411
|
+
onDeleteThread && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1412
|
+
"button",
|
|
1413
|
+
{
|
|
1414
|
+
onClick: (e) => {
|
|
1415
|
+
e.stopPropagation();
|
|
1416
|
+
onDeleteThread(thread.id);
|
|
1417
|
+
},
|
|
1418
|
+
className: "p-1 opacity-0 group-hover:opacity-100 hover:bg-destructive/10 rounded transition-opacity text-muted-foreground hover:text-destructive",
|
|
1419
|
+
"aria-label": "Delete thread",
|
|
1420
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1421
|
+
"svg",
|
|
1422
|
+
{
|
|
1423
|
+
width: "14",
|
|
1424
|
+
height: "14",
|
|
1425
|
+
viewBox: "0 0 24 24",
|
|
1426
|
+
fill: "none",
|
|
1427
|
+
stroke: "currentColor",
|
|
1428
|
+
strokeWidth: "2",
|
|
1429
|
+
strokeLinecap: "round",
|
|
1430
|
+
strokeLinejoin: "round",
|
|
1431
|
+
children: [
|
|
1432
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "3 6 5 6 21 6" }),
|
|
1433
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
1434
|
+
]
|
|
1435
|
+
}
|
|
1436
|
+
)
|
|
1437
|
+
}
|
|
1438
|
+
)
|
|
1439
|
+
] })
|
|
1440
|
+
},
|
|
1441
|
+
thread.id
|
|
1442
|
+
)) })
|
|
1443
|
+
] });
|
|
1444
|
+
};
|
|
1445
|
+
var MENU_ICON_ID = "menu";
|
|
1446
|
+
var MenuIcon = ({ className = "" }) => {
|
|
1447
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1448
|
+
"svg",
|
|
1449
|
+
{
|
|
1450
|
+
className,
|
|
1451
|
+
width: "20",
|
|
1452
|
+
height: "20",
|
|
1453
|
+
viewBox: "0 0 24 24",
|
|
1454
|
+
fill: "none",
|
|
1455
|
+
stroke: "currentColor",
|
|
1456
|
+
strokeWidth: "2",
|
|
1457
|
+
strokeLinecap: "round",
|
|
1458
|
+
strokeLinejoin: "round",
|
|
1459
|
+
children: [
|
|
1460
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
|
|
1461
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
|
|
1462
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
|
|
1463
|
+
]
|
|
1464
|
+
}
|
|
1465
|
+
);
|
|
1466
|
+
};
|
|
1467
|
+
var CLOSE_ICON_ID = "close";
|
|
1468
|
+
var CloseIcon = ({ className = "" }) => {
|
|
1469
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1470
|
+
"svg",
|
|
1471
|
+
{
|
|
1472
|
+
className,
|
|
1473
|
+
width: "20",
|
|
1474
|
+
height: "20",
|
|
1475
|
+
viewBox: "0 0 24 24",
|
|
1476
|
+
fill: "none",
|
|
1477
|
+
stroke: "currentColor",
|
|
1478
|
+
strokeWidth: "2",
|
|
1479
|
+
strokeLinecap: "round",
|
|
1480
|
+
strokeLinejoin: "round",
|
|
1481
|
+
children: [
|
|
1482
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
1483
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
1484
|
+
]
|
|
1485
|
+
}
|
|
1486
|
+
);
|
|
1487
|
+
};
|
|
1488
|
+
|
|
1489
|
+
// src/styles/applyTheme.ts
|
|
1490
|
+
var hslToVar = (color) => {
|
|
1491
|
+
if (color === "transparent") {
|
|
1492
|
+
return "transparent";
|
|
1493
|
+
}
|
|
1494
|
+
if (color.startsWith("hsl(")) {
|
|
1495
|
+
return color.replace("hsl(", "").replace(")", "");
|
|
1496
|
+
}
|
|
1497
|
+
return color;
|
|
1498
|
+
};
|
|
1499
|
+
var applyTheme = (theme, themeName) => {
|
|
1500
|
+
const root = document.documentElement;
|
|
1501
|
+
if (themeName) {
|
|
1502
|
+
root.setAttribute("data-theme", themeName);
|
|
1503
|
+
}
|
|
1504
|
+
root.style.setProperty("--background", hslToVar(theme.colors.background));
|
|
1505
|
+
root.style.setProperty("--foreground", hslToVar(theme.colors.foreground));
|
|
1506
|
+
root.style.setProperty("--card", hslToVar(theme.colors.background));
|
|
1507
|
+
root.style.setProperty("--card-foreground", hslToVar(theme.colors.foreground));
|
|
1508
|
+
root.style.setProperty("--popover", hslToVar(theme.colors.background));
|
|
1509
|
+
root.style.setProperty("--popover-foreground", hslToVar(theme.colors.foreground));
|
|
1510
|
+
root.style.setProperty("--primary", hslToVar(theme.colors.primary));
|
|
1511
|
+
root.style.setProperty("--primary-foreground", hslToVar(theme.colors.background));
|
|
1512
|
+
root.style.setProperty("--secondary", hslToVar(theme.colors.secondary));
|
|
1513
|
+
root.style.setProperty("--secondary-foreground", hslToVar(theme.colors.foreground));
|
|
1514
|
+
root.style.setProperty("--muted", hslToVar(theme.colors.muted));
|
|
1515
|
+
root.style.setProperty("--muted-foreground", hslToVar(theme.colors.foreground));
|
|
1516
|
+
root.style.setProperty("--accent", hslToVar(theme.colors.accent));
|
|
1517
|
+
root.style.setProperty("--accent-foreground", hslToVar(theme.colors.background));
|
|
1518
|
+
root.style.setProperty("--destructive", hslToVar(theme.colors.error));
|
|
1519
|
+
root.style.setProperty("--destructive-foreground", hslToVar(theme.colors.foreground));
|
|
1520
|
+
root.style.setProperty("--border", hslToVar(theme.colors.border));
|
|
1521
|
+
root.style.setProperty("--input", hslToVar(theme.colors.border));
|
|
1522
|
+
root.style.setProperty("--ring", hslToVar(theme.colors.primary));
|
|
1523
|
+
root.style.setProperty("--error", hslToVar(theme.colors.error));
|
|
1524
|
+
root.style.setProperty("--warning", hslToVar(theme.colors.warning));
|
|
1525
|
+
root.style.setProperty("--success", hslToVar(theme.colors.success));
|
|
1526
|
+
root.style.setProperty("--info", hslToVar(theme.colors.info));
|
|
1527
|
+
root.style.setProperty("--left-menu", hslToVar(theme.colors.mainMenu.DEFAULT));
|
|
1528
|
+
root.style.setProperty("--left-menu-foreground", hslToVar(theme.colors.mainMenu.foreground));
|
|
1529
|
+
root.style.setProperty("--left-menu-hover", hslToVar(theme.colors.mainMenu.hover));
|
|
1530
|
+
root.style.setProperty("--left-menu-selected", hslToVar(theme.colors.mainMenu.selected));
|
|
1531
|
+
root.style.setProperty("--left-menu-border", hslToVar(theme.colors.mainMenu.border));
|
|
1532
|
+
Object.entries(theme.spacing).forEach(([key, value]) => {
|
|
1533
|
+
root.style.setProperty(`--spacing-${key}`, value);
|
|
1534
|
+
});
|
|
1535
|
+
Object.entries(theme.borderRadius).forEach(([key, value]) => {
|
|
1536
|
+
root.style.setProperty(`--radius-${key}`, value);
|
|
1537
|
+
});
|
|
1538
|
+
Object.entries(theme.shadows).forEach(([key, value]) => {
|
|
1539
|
+
root.style.setProperty(`--shadow-${key}`, value);
|
|
1540
|
+
});
|
|
1541
|
+
Object.entries(theme.transitions).forEach(([key, value]) => {
|
|
1542
|
+
root.style.setProperty(`--transition-${key}`, value);
|
|
1543
|
+
});
|
|
1544
|
+
if (themeName?.endsWith("-large")) {
|
|
1545
|
+
root.style.fontSize = "125%";
|
|
1546
|
+
} else {
|
|
1547
|
+
root.style.fontSize = "";
|
|
1548
|
+
}
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
Object.defineProperty(exports, "ButtonSize", {
|
|
1552
|
+
enumerable: true,
|
|
1553
|
+
get: function () { return uikitContracts.ButtonSize; }
|
|
1554
|
+
});
|
|
1555
|
+
Object.defineProperty(exports, "ButtonVariant", {
|
|
1556
|
+
enumerable: true,
|
|
1557
|
+
get: function () { return uikitContracts.ButtonVariant; }
|
|
1558
|
+
});
|
|
1559
|
+
Object.defineProperty(exports, "IconButtonSize", {
|
|
1560
|
+
enumerable: true,
|
|
1561
|
+
get: function () { return uikitContracts.IconButtonSize; }
|
|
1562
|
+
});
|
|
1563
|
+
exports.Avatar = Avatar;
|
|
1564
|
+
exports.AvatarFallback = AvatarFallback;
|
|
1565
|
+
exports.AvatarImage = AvatarImage;
|
|
1566
|
+
exports.Badge = Badge;
|
|
1567
|
+
exports.Button = Button;
|
|
1568
|
+
exports.CLOSE_ICON_ID = CLOSE_ICON_ID;
|
|
1569
|
+
exports.Card = Card;
|
|
1570
|
+
exports.CardContent = CardContent;
|
|
1571
|
+
exports.CardDescription = CardDescription;
|
|
1572
|
+
exports.CardFooter = CardFooter;
|
|
1573
|
+
exports.CardHeader = CardHeader;
|
|
1574
|
+
exports.CardTitle = CardTitle;
|
|
1575
|
+
exports.ChatInput = ChatInput;
|
|
1576
|
+
exports.CloseIcon = CloseIcon;
|
|
1577
|
+
exports.Dialog = Dialog;
|
|
1578
|
+
exports.DialogClose = DialogClose;
|
|
1579
|
+
exports.DialogContent = DialogContent;
|
|
1580
|
+
exports.DialogDescription = DialogDescription;
|
|
1581
|
+
exports.DialogFooter = DialogFooter;
|
|
1582
|
+
exports.DialogHeader = DialogHeader;
|
|
1583
|
+
exports.DialogOverlay = DialogOverlay;
|
|
1584
|
+
exports.DialogPortal = DialogPortal;
|
|
1585
|
+
exports.DialogTitle = DialogTitle;
|
|
1586
|
+
exports.DialogTrigger = DialogTrigger;
|
|
1587
|
+
exports.DropdownButton = DropdownButton;
|
|
1588
|
+
exports.DropdownMenu = DropdownMenu;
|
|
1589
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
1590
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
1591
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
1592
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
1593
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
1594
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
1595
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
1596
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
1597
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
1598
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
1599
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
1600
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
1601
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
1602
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
1603
|
+
exports.Header = Header;
|
|
1604
|
+
exports.IconButton = IconButton;
|
|
1605
|
+
exports.Input = Input;
|
|
1606
|
+
exports.MENU_ICON_ID = MENU_ICON_ID;
|
|
1607
|
+
exports.MenuIcon = MenuIcon;
|
|
1608
|
+
exports.MessageBubble = MessageBubble;
|
|
1609
|
+
exports.MessageType = MessageType;
|
|
1610
|
+
exports.NavigationMenu = NavigationMenu;
|
|
1611
|
+
exports.NavigationMenuContent = NavigationMenuContent;
|
|
1612
|
+
exports.NavigationMenuIndicator = NavigationMenuIndicator;
|
|
1613
|
+
exports.NavigationMenuItem = NavigationMenuItem;
|
|
1614
|
+
exports.NavigationMenuLink = NavigationMenuLink;
|
|
1615
|
+
exports.NavigationMenuList = NavigationMenuList;
|
|
1616
|
+
exports.NavigationMenuTrigger = NavigationMenuTrigger;
|
|
1617
|
+
exports.NavigationMenuViewport = NavigationMenuViewport;
|
|
1618
|
+
exports.Progress = Progress;
|
|
1619
|
+
exports.Select = Select;
|
|
1620
|
+
exports.SelectContent = SelectContent;
|
|
1621
|
+
exports.SelectGroup = SelectGroup;
|
|
1622
|
+
exports.SelectItem = SelectItem;
|
|
1623
|
+
exports.SelectLabel = SelectLabel;
|
|
1624
|
+
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
1625
|
+
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
1626
|
+
exports.SelectSeparator = SelectSeparator;
|
|
1627
|
+
exports.SelectTrigger = SelectTrigger;
|
|
1628
|
+
exports.SelectValue = SelectValue;
|
|
1629
|
+
exports.Sheet = Sheet;
|
|
1630
|
+
exports.SheetClose = SheetClose;
|
|
1631
|
+
exports.SheetContent = SheetContent;
|
|
1632
|
+
exports.SheetDescription = SheetDescription;
|
|
1633
|
+
exports.SheetFooter = SheetFooter;
|
|
1634
|
+
exports.SheetHeader = SheetHeader;
|
|
1635
|
+
exports.SheetOverlay = SheetOverlay;
|
|
1636
|
+
exports.SheetPortal = SheetPortal;
|
|
1637
|
+
exports.SheetTitle = SheetTitle;
|
|
1638
|
+
exports.SheetTrigger = SheetTrigger;
|
|
1639
|
+
exports.Sidebar = Sidebar;
|
|
1640
|
+
exports.SidebarContent = SidebarContent;
|
|
1641
|
+
exports.SidebarHeader = SidebarHeader;
|
|
1642
|
+
exports.SidebarMenu = SidebarMenu;
|
|
1643
|
+
exports.SidebarMenuButton = SidebarMenuButton;
|
|
1644
|
+
exports.SidebarMenuIcon = SidebarMenuIcon;
|
|
1645
|
+
exports.SidebarMenuItem = SidebarMenuItem;
|
|
1646
|
+
exports.SidebarMenuLabel = SidebarMenuLabel;
|
|
1647
|
+
exports.Skeleton = Skeleton;
|
|
1648
|
+
exports.Slider = Slider;
|
|
1649
|
+
exports.SliderRange = SliderRange;
|
|
1650
|
+
exports.SliderThumb = SliderThumb;
|
|
1651
|
+
exports.SliderTrack = SliderTrack;
|
|
1652
|
+
exports.Spinner = Spinner;
|
|
1653
|
+
exports.Switch = Switch;
|
|
1654
|
+
exports.Textarea = Textarea;
|
|
1655
|
+
exports.ThreadList = ThreadList;
|
|
1656
|
+
exports.Tooltip = Tooltip;
|
|
1657
|
+
exports.TooltipContent = TooltipContent;
|
|
1658
|
+
exports.TooltipProvider = TooltipProvider;
|
|
1659
|
+
exports.TooltipTrigger = TooltipTrigger;
|
|
1660
|
+
exports.UserInfo = UserInfo;
|
|
1661
|
+
exports.applyTheme = applyTheme;
|
|
1662
|
+
exports.badgeVariants = badgeVariants;
|
|
1663
|
+
//# sourceMappingURL=index.js.map
|
|
1664
|
+
//# sourceMappingURL=index.js.map
|