@alquimia-ai/ui 1.0.3
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 +42 -0
- package/dist/chunk-6EP6KTGV.mjs +1529 -0
- package/dist/chunk-6EP6KTGV.mjs.map +1 -0
- package/dist/chunk-HGMICDIH.mjs +21 -0
- package/dist/chunk-HGMICDIH.mjs.map +1 -0
- package/dist/index.d.mts +653 -0
- package/dist/index.d.ts +653 -0
- package/dist/index.js +4344 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1663 -0
- package/dist/index.mjs.map +1 -0
- package/dist/pdf-viewer-J3ENKRHZ.mjs +177 -0
- package/dist/pdf-viewer-J3ENKRHZ.mjs.map +1 -0
- package/dist/plain-text-viewer-Q3O4LAOE.mjs +244 -0
- package/dist/plain-text-viewer-Q3O4LAOE.mjs.map +1 -0
- package/package.json +93 -0
|
@@ -0,0 +1,1529 @@
|
|
|
1
|
+
// src/lib/utils.ts
|
|
2
|
+
function _array_like_to_array(arr, len) {
|
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5
|
+
return arr2;
|
|
6
|
+
}
|
|
7
|
+
function _array_with_holes(arr) {
|
|
8
|
+
if (Array.isArray(arr)) return arr;
|
|
9
|
+
}
|
|
10
|
+
function _array_without_holes(arr) {
|
|
11
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
|
+
}
|
|
13
|
+
function _define_property(obj, key, value) {
|
|
14
|
+
if (key in obj) {
|
|
15
|
+
Object.defineProperty(obj, key, {
|
|
16
|
+
value: value,
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
obj[key] = value;
|
|
23
|
+
}
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
function _extends() {
|
|
27
|
+
_extends = Object.assign || function(target) {
|
|
28
|
+
for(var i = 1; i < arguments.length; i++){
|
|
29
|
+
var source = arguments[i];
|
|
30
|
+
for(var key in source){
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
+
target[key] = source[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
return _extends.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
function _iterable_to_array(iter) {
|
|
41
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
42
|
+
}
|
|
43
|
+
function _iterable_to_array_limit(arr, i) {
|
|
44
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
45
|
+
if (_i == null) return;
|
|
46
|
+
var _arr = [];
|
|
47
|
+
var _n = true;
|
|
48
|
+
var _d = false;
|
|
49
|
+
var _s, _e;
|
|
50
|
+
try {
|
|
51
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
52
|
+
_arr.push(_s.value);
|
|
53
|
+
if (i && _arr.length === i) break;
|
|
54
|
+
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
_d = true;
|
|
57
|
+
_e = err;
|
|
58
|
+
} finally{
|
|
59
|
+
try {
|
|
60
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
61
|
+
} finally{
|
|
62
|
+
if (_d) throw _e;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return _arr;
|
|
66
|
+
}
|
|
67
|
+
function _non_iterable_rest() {
|
|
68
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
69
|
+
}
|
|
70
|
+
function _non_iterable_spread() {
|
|
71
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
72
|
+
}
|
|
73
|
+
function _object_destructuring_empty(o) {
|
|
74
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
75
|
+
return o;
|
|
76
|
+
}
|
|
77
|
+
function _object_spread(target) {
|
|
78
|
+
for(var i = 1; i < arguments.length; i++){
|
|
79
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
80
|
+
var ownKeys = Object.keys(source);
|
|
81
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
82
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
83
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
ownKeys.forEach(function(key) {
|
|
87
|
+
_define_property(target, key, source[key]);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return target;
|
|
91
|
+
}
|
|
92
|
+
function ownKeys(object, enumerableOnly) {
|
|
93
|
+
var keys = Object.keys(object);
|
|
94
|
+
if (Object.getOwnPropertySymbols) {
|
|
95
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
96
|
+
if (enumerableOnly) {
|
|
97
|
+
symbols = symbols.filter(function(sym) {
|
|
98
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
keys.push.apply(keys, symbols);
|
|
102
|
+
}
|
|
103
|
+
return keys;
|
|
104
|
+
}
|
|
105
|
+
function _object_spread_props(target, source) {
|
|
106
|
+
source = source != null ? source : {};
|
|
107
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
108
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
109
|
+
} else {
|
|
110
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
111
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return target;
|
|
115
|
+
}
|
|
116
|
+
function _object_without_properties(source, excluded) {
|
|
117
|
+
if (source == null) return {};
|
|
118
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
119
|
+
var key, i;
|
|
120
|
+
if (Object.getOwnPropertySymbols) {
|
|
121
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
122
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
123
|
+
key = sourceSymbolKeys[i];
|
|
124
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
125
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
126
|
+
target[key] = source[key];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return target;
|
|
130
|
+
}
|
|
131
|
+
function _object_without_properties_loose(source, excluded) {
|
|
132
|
+
if (source == null) return {};
|
|
133
|
+
var target = {};
|
|
134
|
+
var sourceKeys = Object.keys(source);
|
|
135
|
+
var key, i;
|
|
136
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
137
|
+
key = sourceKeys[i];
|
|
138
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
139
|
+
target[key] = source[key];
|
|
140
|
+
}
|
|
141
|
+
return target;
|
|
142
|
+
}
|
|
143
|
+
function _sliced_to_array(arr, i) {
|
|
144
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
145
|
+
}
|
|
146
|
+
function _to_consumable_array(arr) {
|
|
147
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
148
|
+
}
|
|
149
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
150
|
+
if (!o) return;
|
|
151
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
152
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
153
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
154
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
155
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
156
|
+
}
|
|
157
|
+
import { clsx } from "clsx";
|
|
158
|
+
import { twMerge } from "tailwind-merge";
|
|
159
|
+
function cn() {
|
|
160
|
+
for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
|
|
161
|
+
inputs[_key] = arguments[_key];
|
|
162
|
+
}
|
|
163
|
+
return twMerge(clsx(inputs));
|
|
164
|
+
}
|
|
165
|
+
function parseTextToSpeech(content) {
|
|
166
|
+
return content.replace(RegExp("[^\\p{L}\\p{N}\\s.,:]", "gu"), "");
|
|
167
|
+
}
|
|
168
|
+
function blobToBase64(blob) {
|
|
169
|
+
return new Promise(function(resolve, reject) {
|
|
170
|
+
var reader = new FileReader();
|
|
171
|
+
reader.onloadend = function() {
|
|
172
|
+
return resolve(reader.result);
|
|
173
|
+
};
|
|
174
|
+
reader.onerror = reject;
|
|
175
|
+
reader.readAsDataURL(blob);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
var truncateString = function(str, maxLength) {
|
|
179
|
+
if (str.length <= maxLength) {
|
|
180
|
+
return str;
|
|
181
|
+
}
|
|
182
|
+
return str.slice(0, maxLength) + "...";
|
|
183
|
+
};
|
|
184
|
+
function getCookies(name) {
|
|
185
|
+
var _parts_pop;
|
|
186
|
+
if (typeof document === "undefined") return void 0;
|
|
187
|
+
var value = "; ".concat(document.cookie);
|
|
188
|
+
var parts = value.split("; ".concat(name, "="));
|
|
189
|
+
if (parts.length === 2) return (_parts_pop = parts.pop()) === null || _parts_pop === void 0 ? void 0 : _parts_pop.split(";").shift();
|
|
190
|
+
}
|
|
191
|
+
// src/components/atoms/ui/button.tsx
|
|
192
|
+
import * as React2 from "react";
|
|
193
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
194
|
+
import { cva } from "class-variance-authority";
|
|
195
|
+
var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
196
|
+
variants: {
|
|
197
|
+
variant: {
|
|
198
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
199
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
200
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
201
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
202
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
203
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
204
|
+
},
|
|
205
|
+
size: {
|
|
206
|
+
default: "h-10 px-4 py-2",
|
|
207
|
+
sm: "h-9 rounded-md px-3",
|
|
208
|
+
lg: "h-11 rounded-md px-8",
|
|
209
|
+
icon: "h-10 w-10"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
defaultVariants: {
|
|
213
|
+
variant: "default",
|
|
214
|
+
size: "default"
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
var Button = React2.forwardRef(function(_param, ref) {
|
|
218
|
+
var className = _param.className, variant = _param.variant, size = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties(_param, [
|
|
219
|
+
"className",
|
|
220
|
+
"variant",
|
|
221
|
+
"size",
|
|
222
|
+
"asChild"
|
|
223
|
+
]);
|
|
224
|
+
var Comp = asChild ? Slot : "button";
|
|
225
|
+
return /* @__PURE__ */ React2.createElement(Comp, _object_spread({
|
|
226
|
+
className: cn(buttonVariants({
|
|
227
|
+
variant: variant,
|
|
228
|
+
size: size,
|
|
229
|
+
className: className
|
|
230
|
+
})),
|
|
231
|
+
ref: ref
|
|
232
|
+
}, props));
|
|
233
|
+
});
|
|
234
|
+
Button.displayName = "Button";
|
|
235
|
+
// src/components/atoms/ui/textarea.tsx
|
|
236
|
+
import * as React3 from "react";
|
|
237
|
+
var Textarea = React3.forwardRef(function(_param, ref) {
|
|
238
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
239
|
+
"className"
|
|
240
|
+
]);
|
|
241
|
+
return /* @__PURE__ */ React3.createElement("textarea", _object_spread({
|
|
242
|
+
className: cn("flex min-h-[80px] w-full rounded-md 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", className, "alq--textarea"),
|
|
243
|
+
ref: ref
|
|
244
|
+
}, props));
|
|
245
|
+
});
|
|
246
|
+
Textarea.displayName = "Textarea";
|
|
247
|
+
// src/components/atoms/ui/input.tsx
|
|
248
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
249
|
+
var Input = forwardRef3(function(_param, ref) {
|
|
250
|
+
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
251
|
+
"className",
|
|
252
|
+
"type"
|
|
253
|
+
]);
|
|
254
|
+
return /* @__PURE__ */ React.createElement("input", _object_spread({
|
|
255
|
+
type: type,
|
|
256
|
+
className: cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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", className, "alq--input"),
|
|
257
|
+
ref: ref
|
|
258
|
+
}, props));
|
|
259
|
+
});
|
|
260
|
+
Input.displayName = "Input";
|
|
261
|
+
// src/components/atoms/ui/select.tsx
|
|
262
|
+
import * as React4 from "react";
|
|
263
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
264
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
265
|
+
var Select = SelectPrimitive.Root;
|
|
266
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
267
|
+
var SelectValue = SelectPrimitive.Value;
|
|
268
|
+
var SelectTrigger = React4.forwardRef(function(_param, ref) {
|
|
269
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
270
|
+
"className",
|
|
271
|
+
"children"
|
|
272
|
+
]);
|
|
273
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.Trigger, _object_spread({
|
|
274
|
+
ref: ref,
|
|
275
|
+
className: cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className, "alq--select")
|
|
276
|
+
}, props), children, /* @__PURE__ */ React4.createElement(SelectPrimitive.Icon, {
|
|
277
|
+
asChild: true
|
|
278
|
+
}, /* @__PURE__ */ React4.createElement(ChevronDown, {
|
|
279
|
+
className: "h-4 w-4 opacity-50"
|
|
280
|
+
})));
|
|
281
|
+
});
|
|
282
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
283
|
+
var SelectScrollUpButton = React4.forwardRef(function(_param, ref) {
|
|
284
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
285
|
+
"className"
|
|
286
|
+
]);
|
|
287
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.ScrollUpButton, _object_spread({
|
|
288
|
+
ref: ref,
|
|
289
|
+
className: cn("flex cursor-default items-center justify-center py-1", className)
|
|
290
|
+
}, props), /* @__PURE__ */ React4.createElement(ChevronUp, {
|
|
291
|
+
className: "h-4 w-4"
|
|
292
|
+
}));
|
|
293
|
+
});
|
|
294
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
295
|
+
var SelectScrollDownButton = React4.forwardRef(function(_param, ref) {
|
|
296
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
297
|
+
"className"
|
|
298
|
+
]);
|
|
299
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.ScrollDownButton, _object_spread({
|
|
300
|
+
ref: ref,
|
|
301
|
+
className: cn("flex cursor-default items-center justify-center py-1", className)
|
|
302
|
+
}, props), /* @__PURE__ */ React4.createElement(ChevronDown, {
|
|
303
|
+
className: "h-4 w-4"
|
|
304
|
+
}));
|
|
305
|
+
});
|
|
306
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
307
|
+
var SelectContent = React4.forwardRef(function(_param, ref) {
|
|
308
|
+
var className = _param.className, children = _param.children, _param_position = _param.position, position = _param_position === void 0 ? "popper" : _param_position, props = _object_without_properties(_param, [
|
|
309
|
+
"className",
|
|
310
|
+
"children",
|
|
311
|
+
"position"
|
|
312
|
+
]);
|
|
313
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React4.createElement(SelectPrimitive.Content, _object_spread({
|
|
314
|
+
ref: ref,
|
|
315
|
+
className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-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", 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", className),
|
|
316
|
+
position: position
|
|
317
|
+
}, props), /* @__PURE__ */ React4.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React4.createElement(SelectPrimitive.Viewport, {
|
|
318
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")
|
|
319
|
+
}, children), /* @__PURE__ */ React4.createElement(SelectScrollDownButton, null)));
|
|
320
|
+
});
|
|
321
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
322
|
+
var SelectLabel = React4.forwardRef(function(_param, ref) {
|
|
323
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
324
|
+
"className"
|
|
325
|
+
]);
|
|
326
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.Label, _object_spread({
|
|
327
|
+
ref: ref,
|
|
328
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)
|
|
329
|
+
}, props));
|
|
330
|
+
});
|
|
331
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
332
|
+
var SelectItem = React4.forwardRef(function(_param, ref) {
|
|
333
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
334
|
+
"className",
|
|
335
|
+
"children"
|
|
336
|
+
]);
|
|
337
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.Item, _object_spread({
|
|
338
|
+
ref: ref,
|
|
339
|
+
className: cn("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-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className)
|
|
340
|
+
}, props), /* @__PURE__ */ React4.createElement("span", {
|
|
341
|
+
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center"
|
|
342
|
+
}, /* @__PURE__ */ React4.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React4.createElement(Check, {
|
|
343
|
+
className: "h-4 w-4"
|
|
344
|
+
}))), /* @__PURE__ */ React4.createElement(SelectPrimitive.ItemText, null, children));
|
|
345
|
+
});
|
|
346
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
347
|
+
var SelectSeparator = React4.forwardRef(function(_param, ref) {
|
|
348
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
349
|
+
"className"
|
|
350
|
+
]);
|
|
351
|
+
return /* @__PURE__ */ React4.createElement(SelectPrimitive.Separator, _object_spread({
|
|
352
|
+
ref: ref,
|
|
353
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
354
|
+
}, props));
|
|
355
|
+
});
|
|
356
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
357
|
+
// src/components/atoms/ui/avatar.tsx
|
|
358
|
+
import * as React5 from "react";
|
|
359
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
360
|
+
var Avatar = React5.forwardRef(function(_param, ref) {
|
|
361
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
362
|
+
"className"
|
|
363
|
+
]);
|
|
364
|
+
return /* @__PURE__ */ React5.createElement(AvatarPrimitive.Root, _object_spread({
|
|
365
|
+
ref: ref,
|
|
366
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)
|
|
367
|
+
}, props));
|
|
368
|
+
});
|
|
369
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
370
|
+
var AvatarImage = React5.forwardRef(function(_param, ref) {
|
|
371
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
372
|
+
"className"
|
|
373
|
+
]);
|
|
374
|
+
return /* @__PURE__ */ React5.createElement(AvatarPrimitive.Image, _object_spread({
|
|
375
|
+
ref: ref,
|
|
376
|
+
className: cn("aspect-square h-full w-full", className)
|
|
377
|
+
}, props));
|
|
378
|
+
});
|
|
379
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
380
|
+
var AvatarFallback = React5.forwardRef(function(_param, ref) {
|
|
381
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
382
|
+
"className"
|
|
383
|
+
]);
|
|
384
|
+
return /* @__PURE__ */ React5.createElement(AvatarPrimitive.Fallback, _object_spread({
|
|
385
|
+
ref: ref,
|
|
386
|
+
className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className)
|
|
387
|
+
}, props));
|
|
388
|
+
});
|
|
389
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
390
|
+
// src/components/atoms/ui/scroll-area.tsx
|
|
391
|
+
import * as React6 from "react";
|
|
392
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
393
|
+
var ScrollArea = React6.forwardRef(function(_param, ref) {
|
|
394
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
395
|
+
"className",
|
|
396
|
+
"children"
|
|
397
|
+
]);
|
|
398
|
+
return /* @__PURE__ */ React6.createElement(ScrollAreaPrimitive.Root, _object_spread({
|
|
399
|
+
ref: ref,
|
|
400
|
+
className: cn("relative overflow-hidden", className)
|
|
401
|
+
}, props), /* @__PURE__ */ React6.createElement(ScrollAreaPrimitive.Viewport, {
|
|
402
|
+
className: "h-full w-full rounded-[inherit]"
|
|
403
|
+
}, children), /* @__PURE__ */ React6.createElement(ScrollBar, null), /* @__PURE__ */ React6.createElement(ScrollAreaPrimitive.Corner, null));
|
|
404
|
+
});
|
|
405
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
406
|
+
var ScrollBar = React6.forwardRef(function(_param, ref) {
|
|
407
|
+
var className = _param.className, _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "vertical" : _param_orientation, props = _object_without_properties(_param, [
|
|
408
|
+
"className",
|
|
409
|
+
"orientation"
|
|
410
|
+
]);
|
|
411
|
+
return /* @__PURE__ */ React6.createElement(ScrollAreaPrimitive.ScrollAreaScrollbar, _object_spread({
|
|
412
|
+
ref: ref,
|
|
413
|
+
orientation: orientation,
|
|
414
|
+
className: cn("flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", className)
|
|
415
|
+
}, props), /* @__PURE__ */ React6.createElement(ScrollAreaPrimitive.ScrollAreaThumb, {
|
|
416
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
417
|
+
}));
|
|
418
|
+
});
|
|
419
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
420
|
+
// src/components/atoms/ui/rich-text.tsx
|
|
421
|
+
import * as React7 from "react";
|
|
422
|
+
import ReactMarkdown from "react-markdown";
|
|
423
|
+
import remarkGfm from "remark-gfm";
|
|
424
|
+
function RichText(param) {
|
|
425
|
+
var content = param.content, className = param.className;
|
|
426
|
+
return /* @__PURE__ */ React7.createElement(ReactMarkdown, {
|
|
427
|
+
className: cn(className),
|
|
428
|
+
remarkPlugins: [
|
|
429
|
+
remarkGfm
|
|
430
|
+
]
|
|
431
|
+
}, content);
|
|
432
|
+
}
|
|
433
|
+
// src/components/atoms/ui/skeleton.tsx
|
|
434
|
+
function Skeleton(_param) {
|
|
435
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
436
|
+
"className"
|
|
437
|
+
]);
|
|
438
|
+
return /* @__PURE__ */ React.createElement("div", _object_spread({
|
|
439
|
+
className: cn("animate-pulse rounded-md bg-muted", className)
|
|
440
|
+
}, props));
|
|
441
|
+
}
|
|
442
|
+
// src/components/atoms/ui/card.tsx
|
|
443
|
+
import * as React8 from "react";
|
|
444
|
+
var Card = React8.forwardRef(function(_param, ref) {
|
|
445
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
446
|
+
"className"
|
|
447
|
+
]);
|
|
448
|
+
return /* @__PURE__ */ React8.createElement("div", _object_spread({
|
|
449
|
+
ref: ref,
|
|
450
|
+
className: cn("rounded-lg", " border", "bg-card", "text-card-foreground", "shadow-raised", className)
|
|
451
|
+
}, props));
|
|
452
|
+
});
|
|
453
|
+
Card.displayName = "Card";
|
|
454
|
+
var CardHeader = React8.forwardRef(function(_param, ref) {
|
|
455
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
456
|
+
"className"
|
|
457
|
+
]);
|
|
458
|
+
return /* @__PURE__ */ React8.createElement("div", _object_spread({
|
|
459
|
+
ref: ref,
|
|
460
|
+
className: cn("flex flex-col space-y-1.5 p-6", className)
|
|
461
|
+
}, props));
|
|
462
|
+
});
|
|
463
|
+
CardHeader.displayName = "CardHeader";
|
|
464
|
+
var CardTitle = React8.forwardRef(function(_param, ref) {
|
|
465
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
466
|
+
"className"
|
|
467
|
+
]);
|
|
468
|
+
return /* @__PURE__ */ React8.createElement("h3", _object_spread({
|
|
469
|
+
ref: ref,
|
|
470
|
+
className: cn("alq--typography-heading4", className)
|
|
471
|
+
}, props));
|
|
472
|
+
});
|
|
473
|
+
CardTitle.displayName = "CardTitle";
|
|
474
|
+
var CardDescription = React8.forwardRef(function(_param, ref) {
|
|
475
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
476
|
+
"className"
|
|
477
|
+
]);
|
|
478
|
+
return /* @__PURE__ */ React8.createElement("p", _object_spread({
|
|
479
|
+
ref: ref,
|
|
480
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
481
|
+
}, props));
|
|
482
|
+
});
|
|
483
|
+
CardDescription.displayName = "CardDescription";
|
|
484
|
+
var CardContent = React8.forwardRef(function(_param, ref) {
|
|
485
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
486
|
+
"className"
|
|
487
|
+
]);
|
|
488
|
+
return /* @__PURE__ */ React8.createElement("div", _object_spread({
|
|
489
|
+
ref: ref,
|
|
490
|
+
className: cn("p-6 pt-0", className)
|
|
491
|
+
}, props));
|
|
492
|
+
});
|
|
493
|
+
CardContent.displayName = "CardContent";
|
|
494
|
+
var CardFooter = React8.forwardRef(function(_param, ref) {
|
|
495
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
496
|
+
"className"
|
|
497
|
+
]);
|
|
498
|
+
return /* @__PURE__ */ React8.createElement("div", _object_spread({
|
|
499
|
+
ref: ref,
|
|
500
|
+
className: cn("flex items-center p-6 pt-0", className)
|
|
501
|
+
}, props));
|
|
502
|
+
});
|
|
503
|
+
CardFooter.displayName = "CardFooter";
|
|
504
|
+
// src/components/atoms/ui/drawer.tsx
|
|
505
|
+
import * as React9 from "react";
|
|
506
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
507
|
+
var Drawer = function(_param) {
|
|
508
|
+
var _param_shouldScaleBackground = _param.shouldScaleBackground, shouldScaleBackground = _param_shouldScaleBackground === void 0 ? true : _param_shouldScaleBackground, props = _object_without_properties(_param, [
|
|
509
|
+
"shouldScaleBackground"
|
|
510
|
+
]);
|
|
511
|
+
return /* @__PURE__ */ React9.createElement(DrawerPrimitive.Root, _object_spread({
|
|
512
|
+
shouldScaleBackground: shouldScaleBackground
|
|
513
|
+
}, props));
|
|
514
|
+
};
|
|
515
|
+
Drawer.displayName = "Drawer";
|
|
516
|
+
var DrawerTrigger = DrawerPrimitive.Trigger;
|
|
517
|
+
var DrawerPortal = DrawerPrimitive.Portal;
|
|
518
|
+
var DrawerClose = DrawerPrimitive.Close;
|
|
519
|
+
var DrawerOverlay = React9.forwardRef(function(_param, ref) {
|
|
520
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
521
|
+
"className"
|
|
522
|
+
]);
|
|
523
|
+
return /* @__PURE__ */ React9.createElement(DrawerPrimitive.Overlay, _object_spread({
|
|
524
|
+
ref: ref,
|
|
525
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className)
|
|
526
|
+
}, props));
|
|
527
|
+
});
|
|
528
|
+
DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
|
|
529
|
+
var DrawerContent = React9.forwardRef(function(_param, ref) {
|
|
530
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
531
|
+
"className",
|
|
532
|
+
"children"
|
|
533
|
+
]);
|
|
534
|
+
return /* @__PURE__ */ React9.createElement(DrawerPortal, null, /* @__PURE__ */ React9.createElement(DrawerOverlay, null), /* @__PURE__ */ React9.createElement(DrawerPrimitive.Content, _object_spread({
|
|
535
|
+
ref: ref,
|
|
536
|
+
className: cn("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background", className)
|
|
537
|
+
}, props), /* @__PURE__ */ React9.createElement("div", {
|
|
538
|
+
className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"
|
|
539
|
+
}), children));
|
|
540
|
+
});
|
|
541
|
+
DrawerContent.displayName = "DrawerContent";
|
|
542
|
+
var DrawerHeader = function(_param) {
|
|
543
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
544
|
+
"className"
|
|
545
|
+
]);
|
|
546
|
+
return /* @__PURE__ */ React9.createElement("div", _object_spread({
|
|
547
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className)
|
|
548
|
+
}, props));
|
|
549
|
+
};
|
|
550
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
551
|
+
var DrawerFooter = function(_param) {
|
|
552
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
553
|
+
"className"
|
|
554
|
+
]);
|
|
555
|
+
return /* @__PURE__ */ React9.createElement("div", _object_spread({
|
|
556
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
557
|
+
}, props));
|
|
558
|
+
};
|
|
559
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
560
|
+
var DrawerTitle = React9.forwardRef(function(_param, ref) {
|
|
561
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
562
|
+
"className"
|
|
563
|
+
]);
|
|
564
|
+
return /* @__PURE__ */ React9.createElement(DrawerPrimitive.Title, _object_spread({
|
|
565
|
+
ref: ref,
|
|
566
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
567
|
+
}, props));
|
|
568
|
+
});
|
|
569
|
+
DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
|
|
570
|
+
var DrawerDescription = React9.forwardRef(function(_param, ref) {
|
|
571
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
572
|
+
"className"
|
|
573
|
+
]);
|
|
574
|
+
return /* @__PURE__ */ React9.createElement(DrawerPrimitive.Description, _object_spread({
|
|
575
|
+
ref: ref,
|
|
576
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
577
|
+
}, props));
|
|
578
|
+
});
|
|
579
|
+
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
580
|
+
// src/components/atoms/ui/typography/index.tsx
|
|
581
|
+
import { forwardRef as forwardRef9 } from "react";
|
|
582
|
+
var Typography = forwardRef9(function(_param, ref) {
|
|
583
|
+
var tmp = _param.as, Component = tmp === void 0 ? "p" : tmp, typeStyle = _param.typeStyle, props = _object_without_properties(_param, [
|
|
584
|
+
"as",
|
|
585
|
+
"typeStyle"
|
|
586
|
+
]);
|
|
587
|
+
return /* @__PURE__ */ React.createElement(Component, _object_spread_props(_object_spread({}, props), {
|
|
588
|
+
className: cn(props.className, "alq--typography-".concat(typeStyle)),
|
|
589
|
+
ref: ref
|
|
590
|
+
}));
|
|
591
|
+
});
|
|
592
|
+
Typography.displayName = "Typography";
|
|
593
|
+
// src/components/atoms/ui/badge.tsx
|
|
594
|
+
import * as React10 from "react";
|
|
595
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
596
|
+
var badgeVariants = cva2("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
597
|
+
variants: {
|
|
598
|
+
variant: {
|
|
599
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
600
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
601
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
602
|
+
outline: "text-foreground"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
defaultVariants: {
|
|
606
|
+
variant: "default"
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
function Badge(_param) {
|
|
610
|
+
var className = _param.className, variant = _param.variant, props = _object_without_properties(_param, [
|
|
611
|
+
"className",
|
|
612
|
+
"variant"
|
|
613
|
+
]);
|
|
614
|
+
return /* @__PURE__ */ React10.createElement("div", _object_spread({
|
|
615
|
+
className: cn(badgeVariants({
|
|
616
|
+
variant: variant
|
|
617
|
+
}), className, "alq--badge")
|
|
618
|
+
}, props));
|
|
619
|
+
}
|
|
620
|
+
// src/components/atoms/ui/alert.tsx
|
|
621
|
+
import * as React11 from "react";
|
|
622
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
623
|
+
var alertVariants = cva3("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", {
|
|
624
|
+
variants: {
|
|
625
|
+
variant: {
|
|
626
|
+
default: "bg-background text-foreground",
|
|
627
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
defaultVariants: {
|
|
631
|
+
variant: "default"
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
var Alert = React11.forwardRef(function(_param, ref) {
|
|
635
|
+
var className = _param.className, variant = _param.variant, props = _object_without_properties(_param, [
|
|
636
|
+
"className",
|
|
637
|
+
"variant"
|
|
638
|
+
]);
|
|
639
|
+
return /* @__PURE__ */ React11.createElement("div", _object_spread({
|
|
640
|
+
ref: ref,
|
|
641
|
+
role: "alert",
|
|
642
|
+
className: cn(alertVariants({
|
|
643
|
+
variant: variant
|
|
644
|
+
}), className)
|
|
645
|
+
}, props));
|
|
646
|
+
});
|
|
647
|
+
Alert.displayName = "Alert";
|
|
648
|
+
var AlertTitle = React11.forwardRef(function(_param, ref) {
|
|
649
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
650
|
+
"className"
|
|
651
|
+
]);
|
|
652
|
+
return /* @__PURE__ */ React11.createElement("h5", _object_spread({
|
|
653
|
+
ref: ref,
|
|
654
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className)
|
|
655
|
+
}, props));
|
|
656
|
+
});
|
|
657
|
+
AlertTitle.displayName = "AlertTitle";
|
|
658
|
+
var AlertDescription = React11.forwardRef(function(_param, ref) {
|
|
659
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
660
|
+
"className"
|
|
661
|
+
]);
|
|
662
|
+
return /* @__PURE__ */ React11.createElement("div", _object_spread({
|
|
663
|
+
ref: ref,
|
|
664
|
+
className: cn("text-sm [&_p]:leading-relaxed", className)
|
|
665
|
+
}, props));
|
|
666
|
+
});
|
|
667
|
+
AlertDescription.displayName = "AlertDescription";
|
|
668
|
+
// src/components/atoms/ui/label.tsx
|
|
669
|
+
import * as React12 from "react";
|
|
670
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
671
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
672
|
+
var labelVariants = cva4("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
673
|
+
var Label2 = React12.forwardRef(function(_param, ref) {
|
|
674
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
675
|
+
"className"
|
|
676
|
+
]);
|
|
677
|
+
return /* @__PURE__ */ React12.createElement(LabelPrimitive.Root, _object_spread({
|
|
678
|
+
ref: ref,
|
|
679
|
+
className: cn(labelVariants(), className, "alq--label")
|
|
680
|
+
}, props));
|
|
681
|
+
});
|
|
682
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
683
|
+
// src/components/atoms/ui/checkbox.tsx
|
|
684
|
+
import * as React13 from "react";
|
|
685
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
686
|
+
import { Check as Check2 } from "lucide-react";
|
|
687
|
+
var Checkbox = React13.forwardRef(function(_param, ref) {
|
|
688
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
689
|
+
"className"
|
|
690
|
+
]);
|
|
691
|
+
return /* @__PURE__ */ React13.createElement(CheckboxPrimitive.Root, _object_spread({
|
|
692
|
+
ref: ref,
|
|
693
|
+
className: cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className, "alq--checkbox")
|
|
694
|
+
}, props), /* @__PURE__ */ React13.createElement(CheckboxPrimitive.Indicator, {
|
|
695
|
+
className: cn("flex items-center justify-center text-current")
|
|
696
|
+
}, /* @__PURE__ */ React13.createElement(Check2, {
|
|
697
|
+
className: "h-4 w-4"
|
|
698
|
+
})));
|
|
699
|
+
});
|
|
700
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
701
|
+
// src/components/atoms/ui/toggle.tsx
|
|
702
|
+
import * as React14 from "react";
|
|
703
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
704
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
705
|
+
var toggleVariants = cva5("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground", {
|
|
706
|
+
variants: {
|
|
707
|
+
variant: {
|
|
708
|
+
default: "bg-transparent",
|
|
709
|
+
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
|
|
710
|
+
},
|
|
711
|
+
size: {
|
|
712
|
+
default: "h-10 px-3",
|
|
713
|
+
sm: "h-9 px-2.5",
|
|
714
|
+
lg: "h-11 px-5"
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
defaultVariants: {
|
|
718
|
+
variant: "default",
|
|
719
|
+
size: "default"
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
var Toggle = React14.forwardRef(function(_param, ref) {
|
|
723
|
+
var className = _param.className, variant = _param.variant, size = _param.size, props = _object_without_properties(_param, [
|
|
724
|
+
"className",
|
|
725
|
+
"variant",
|
|
726
|
+
"size"
|
|
727
|
+
]);
|
|
728
|
+
return /* @__PURE__ */ React14.createElement(TogglePrimitive.Root, _object_spread({
|
|
729
|
+
ref: ref,
|
|
730
|
+
className: cn(toggleVariants({
|
|
731
|
+
variant: variant,
|
|
732
|
+
size: size,
|
|
733
|
+
className: className
|
|
734
|
+
}), "alq--toggle")
|
|
735
|
+
}, props));
|
|
736
|
+
});
|
|
737
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
738
|
+
// src/components/atoms/ui/slider.tsx
|
|
739
|
+
import * as React15 from "react";
|
|
740
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
741
|
+
var Slider = React15.forwardRef(function(_param, ref) {
|
|
742
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
743
|
+
"className"
|
|
744
|
+
]);
|
|
745
|
+
return /* @__PURE__ */ React15.createElement(SliderPrimitive.Root, _object_spread({
|
|
746
|
+
ref: ref,
|
|
747
|
+
className: cn("relative flex w-44 touch-none select-none items-center", className, "alq--slider")
|
|
748
|
+
}, props), /* @__PURE__ */ React15.createElement(SliderPrimitive.Track, {
|
|
749
|
+
className: "relative h-2 w-44 grow overflow-hidden rounded-full bg-primary"
|
|
750
|
+
}, /* @__PURE__ */ React15.createElement(SliderPrimitive.Range, {
|
|
751
|
+
className: "absolute h-full bg-secondary"
|
|
752
|
+
})), /* @__PURE__ */ React15.createElement(SliderPrimitive.Thumb, {
|
|
753
|
+
className: "block h-5 w-5 rounded-full border-2 border-gray bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
754
|
+
}));
|
|
755
|
+
});
|
|
756
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
757
|
+
// src/components/atoms/ui/switch.tsx
|
|
758
|
+
import * as React16 from "react";
|
|
759
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
760
|
+
var Switch = React16.forwardRef(function(_param, ref) {
|
|
761
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
762
|
+
"className"
|
|
763
|
+
]);
|
|
764
|
+
return /* @__PURE__ */ React16.createElement(SwitchPrimitives.Root, _object_spread_props(_object_spread({
|
|
765
|
+
className: cn("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-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", className, "alq--switch")
|
|
766
|
+
}, props), {
|
|
767
|
+
ref: ref
|
|
768
|
+
}), /* @__PURE__ */ React16.createElement(SwitchPrimitives.Thumb, {
|
|
769
|
+
className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")
|
|
770
|
+
}));
|
|
771
|
+
});
|
|
772
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
773
|
+
// src/components/atoms/ui/tabs.tsx
|
|
774
|
+
import * as React17 from "react";
|
|
775
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
776
|
+
var Tabs = TabsPrimitive.Root;
|
|
777
|
+
var TabsList = React17.forwardRef(function(_param, ref) {
|
|
778
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
779
|
+
"className"
|
|
780
|
+
]);
|
|
781
|
+
return /* @__PURE__ */ React17.createElement(TabsPrimitive.List, _object_spread({
|
|
782
|
+
ref: ref,
|
|
783
|
+
className: cn("inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground", className, "alq--tabs")
|
|
784
|
+
}, props));
|
|
785
|
+
});
|
|
786
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
787
|
+
var TabsTrigger = React17.forwardRef(function(_param, ref) {
|
|
788
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
789
|
+
"className"
|
|
790
|
+
]);
|
|
791
|
+
return /* @__PURE__ */ React17.createElement(TabsPrimitive.Trigger, _object_spread({
|
|
792
|
+
ref: ref,
|
|
793
|
+
className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:border-b-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-b-2 data-[state=active]:text-foreground data-[state=active]:shadow-sm", className)
|
|
794
|
+
}, props));
|
|
795
|
+
});
|
|
796
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
797
|
+
var TabsContent = React17.forwardRef(function(_param, ref) {
|
|
798
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
799
|
+
"className"
|
|
800
|
+
]);
|
|
801
|
+
return /* @__PURE__ */ React17.createElement(TabsPrimitive.Content, _object_spread({
|
|
802
|
+
ref: ref,
|
|
803
|
+
className: cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className)
|
|
804
|
+
}, props));
|
|
805
|
+
});
|
|
806
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
807
|
+
// src/components/atoms/ui/aspect-ratio.tsx
|
|
808
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
809
|
+
var AspectRatio = AspectRatioPrimitive.Root;
|
|
810
|
+
// src/components/atoms/ui/table.tsx
|
|
811
|
+
import * as React18 from "react";
|
|
812
|
+
var Table = React18.forwardRef(function(_param, ref) {
|
|
813
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
814
|
+
"className"
|
|
815
|
+
]);
|
|
816
|
+
return /* @__PURE__ */ React18.createElement("div", {
|
|
817
|
+
className: "relative w-full overflow-auto"
|
|
818
|
+
}, /* @__PURE__ */ React18.createElement("table", _object_spread({
|
|
819
|
+
ref: ref,
|
|
820
|
+
className: cn("w-full caption-bottom text-sm", className, "alq--table")
|
|
821
|
+
}, props)));
|
|
822
|
+
});
|
|
823
|
+
Table.displayName = "Table";
|
|
824
|
+
var TableHeader = React18.forwardRef(function(_param, ref) {
|
|
825
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
826
|
+
"className"
|
|
827
|
+
]);
|
|
828
|
+
return /* @__PURE__ */ React18.createElement("thead", _object_spread({
|
|
829
|
+
ref: ref,
|
|
830
|
+
className: cn("[&_tr]:border-b", className)
|
|
831
|
+
}, props));
|
|
832
|
+
});
|
|
833
|
+
TableHeader.displayName = "TableHeader";
|
|
834
|
+
var TableBody = React18.forwardRef(function(_param, ref) {
|
|
835
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
836
|
+
"className"
|
|
837
|
+
]);
|
|
838
|
+
return /* @__PURE__ */ React18.createElement("tbody", _object_spread({
|
|
839
|
+
ref: ref,
|
|
840
|
+
className: cn("[&_tr:last-child]:border-0", className)
|
|
841
|
+
}, props));
|
|
842
|
+
});
|
|
843
|
+
TableBody.displayName = "TableBody";
|
|
844
|
+
var TableFooter = React18.forwardRef(function(_param, ref) {
|
|
845
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
846
|
+
"className"
|
|
847
|
+
]);
|
|
848
|
+
return /* @__PURE__ */ React18.createElement("tfoot", _object_spread({
|
|
849
|
+
ref: ref,
|
|
850
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className)
|
|
851
|
+
}, props));
|
|
852
|
+
});
|
|
853
|
+
TableFooter.displayName = "TableFooter";
|
|
854
|
+
var TableRow = React18.forwardRef(function(_param, ref) {
|
|
855
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
856
|
+
"className"
|
|
857
|
+
]);
|
|
858
|
+
return /* @__PURE__ */ React18.createElement("tr", _object_spread({
|
|
859
|
+
ref: ref,
|
|
860
|
+
className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className)
|
|
861
|
+
}, props));
|
|
862
|
+
});
|
|
863
|
+
TableRow.displayName = "TableRow";
|
|
864
|
+
var TableHead = React18.forwardRef(function(_param, ref) {
|
|
865
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
866
|
+
"className"
|
|
867
|
+
]);
|
|
868
|
+
return /* @__PURE__ */ React18.createElement("th", _object_spread({
|
|
869
|
+
ref: ref,
|
|
870
|
+
className: cn("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className)
|
|
871
|
+
}, props));
|
|
872
|
+
});
|
|
873
|
+
TableHead.displayName = "TableHead";
|
|
874
|
+
var TableCell = React18.forwardRef(function(_param, ref) {
|
|
875
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
876
|
+
"className"
|
|
877
|
+
]);
|
|
878
|
+
return /* @__PURE__ */ React18.createElement("td", _object_spread({
|
|
879
|
+
ref: ref,
|
|
880
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)
|
|
881
|
+
}, props));
|
|
882
|
+
});
|
|
883
|
+
TableCell.displayName = "TableCell";
|
|
884
|
+
var TableCaption = React18.forwardRef(function(_param, ref) {
|
|
885
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
886
|
+
"className"
|
|
887
|
+
]);
|
|
888
|
+
return /* @__PURE__ */ React18.createElement("caption", _object_spread({
|
|
889
|
+
ref: ref,
|
|
890
|
+
className: cn("mt-4 text-sm text-muted-foreground", className)
|
|
891
|
+
}, props));
|
|
892
|
+
});
|
|
893
|
+
TableCaption.displayName = "TableCaption";
|
|
894
|
+
// src/components/atoms/ui/breadcrumb.tsx
|
|
895
|
+
import * as React19 from "react";
|
|
896
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
897
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
898
|
+
var Breadcrumb = React19.forwardRef(function(_param, ref) {
|
|
899
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
900
|
+
return /* @__PURE__ */ React19.createElement("nav", _object_spread({
|
|
901
|
+
ref: ref,
|
|
902
|
+
"aria-label": "breadcrumb"
|
|
903
|
+
}, props));
|
|
904
|
+
});
|
|
905
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
906
|
+
var BreadcrumbList = React19.forwardRef(function(_param, ref) {
|
|
907
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
908
|
+
"className"
|
|
909
|
+
]);
|
|
910
|
+
return /* @__PURE__ */ React19.createElement("ol", _object_spread({
|
|
911
|
+
ref: ref,
|
|
912
|
+
className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className)
|
|
913
|
+
}, props));
|
|
914
|
+
});
|
|
915
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
916
|
+
var BreadcrumbItem = React19.forwardRef(function(_param, ref) {
|
|
917
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
918
|
+
"className"
|
|
919
|
+
]);
|
|
920
|
+
return /* @__PURE__ */ React19.createElement("li", _object_spread({
|
|
921
|
+
ref: ref,
|
|
922
|
+
className: cn("inline-flex items-center gap-1.5", className)
|
|
923
|
+
}, props));
|
|
924
|
+
});
|
|
925
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
926
|
+
var BreadcrumbLink = React19.forwardRef(function(_param, ref) {
|
|
927
|
+
var asChild = _param.asChild, className = _param.className, props = _object_without_properties(_param, [
|
|
928
|
+
"asChild",
|
|
929
|
+
"className"
|
|
930
|
+
]);
|
|
931
|
+
var Comp = asChild ? Slot2 : "a";
|
|
932
|
+
return /* @__PURE__ */ React19.createElement(Comp, _object_spread({
|
|
933
|
+
ref: ref,
|
|
934
|
+
className: cn("transition-colors hover:text-foreground", className)
|
|
935
|
+
}, props));
|
|
936
|
+
});
|
|
937
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
938
|
+
var BreadcrumbPage = React19.forwardRef(function(_param, ref) {
|
|
939
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
940
|
+
"className"
|
|
941
|
+
]);
|
|
942
|
+
return /* @__PURE__ */ React19.createElement("span", _object_spread({
|
|
943
|
+
ref: ref,
|
|
944
|
+
role: "link",
|
|
945
|
+
"aria-disabled": "true",
|
|
946
|
+
"aria-current": "page",
|
|
947
|
+
className: cn("font-normal text-foreground", className)
|
|
948
|
+
}, props));
|
|
949
|
+
});
|
|
950
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
951
|
+
var BreadcrumbSeparator = function(_param) {
|
|
952
|
+
var children = _param.children, className = _param.className, props = _object_without_properties(_param, [
|
|
953
|
+
"children",
|
|
954
|
+
"className"
|
|
955
|
+
]);
|
|
956
|
+
return /* @__PURE__ */ React19.createElement("li", _object_spread({
|
|
957
|
+
role: "presentation",
|
|
958
|
+
"aria-hidden": "true",
|
|
959
|
+
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)
|
|
960
|
+
}, props), children !== null && children !== void 0 ? children : /* @__PURE__ */ React19.createElement(ChevronRight, null));
|
|
961
|
+
};
|
|
962
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
963
|
+
var BreadcrumbEllipsis = function(_param) {
|
|
964
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
965
|
+
"className"
|
|
966
|
+
]);
|
|
967
|
+
return /* @__PURE__ */ React19.createElement("span", _object_spread({
|
|
968
|
+
role: "presentation",
|
|
969
|
+
"aria-hidden": "true",
|
|
970
|
+
className: cn("flex h-9 w-9 items-center justify-center", className)
|
|
971
|
+
}, props), /* @__PURE__ */ React19.createElement(MoreHorizontal, {
|
|
972
|
+
className: "h-4 w-4"
|
|
973
|
+
}), /* @__PURE__ */ React19.createElement("span", {
|
|
974
|
+
className: "sr-only"
|
|
975
|
+
}, "More"));
|
|
976
|
+
};
|
|
977
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
978
|
+
// src/components/molecules/alert-dialog.tsx
|
|
979
|
+
import * as React20 from "react";
|
|
980
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
981
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
982
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
983
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
984
|
+
var AlertDialogOverlay = React20.forwardRef(function(_param, ref) {
|
|
985
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
986
|
+
"className"
|
|
987
|
+
]);
|
|
988
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Overlay, _object_spread_props(_object_spread({
|
|
989
|
+
className: cn("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", className)
|
|
990
|
+
}, props), {
|
|
991
|
+
ref: ref
|
|
992
|
+
}));
|
|
993
|
+
});
|
|
994
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
995
|
+
var AlertDialogContent = React20.forwardRef(function(_param, ref) {
|
|
996
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
997
|
+
"className"
|
|
998
|
+
]);
|
|
999
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPortal, null, /* @__PURE__ */ React20.createElement(AlertDialogOverlay, null), /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Content, _object_spread({
|
|
1000
|
+
ref: ref,
|
|
1001
|
+
className: cn("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", className)
|
|
1002
|
+
}, props)));
|
|
1003
|
+
});
|
|
1004
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
1005
|
+
var AlertDialogHeader = function(_param) {
|
|
1006
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1007
|
+
"className"
|
|
1008
|
+
]);
|
|
1009
|
+
return /* @__PURE__ */ React20.createElement("div", _object_spread({
|
|
1010
|
+
className: cn("flex flex-col space-y-2 text-center sm:text-left", className)
|
|
1011
|
+
}, props));
|
|
1012
|
+
};
|
|
1013
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
1014
|
+
var AlertDialogFooter = function(_param) {
|
|
1015
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1016
|
+
"className"
|
|
1017
|
+
]);
|
|
1018
|
+
return /* @__PURE__ */ React20.createElement("div", _object_spread({
|
|
1019
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
1020
|
+
}, props));
|
|
1021
|
+
};
|
|
1022
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
1023
|
+
var AlertDialogTitle = React20.forwardRef(function(_param, ref) {
|
|
1024
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1025
|
+
"className"
|
|
1026
|
+
]);
|
|
1027
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Title, _object_spread({
|
|
1028
|
+
ref: ref,
|
|
1029
|
+
className: cn("text-lg font-semibold", className)
|
|
1030
|
+
}, props));
|
|
1031
|
+
});
|
|
1032
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
1033
|
+
var AlertDialogDescription = React20.forwardRef(function(_param, ref) {
|
|
1034
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1035
|
+
"className"
|
|
1036
|
+
]);
|
|
1037
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Description, _object_spread({
|
|
1038
|
+
ref: ref,
|
|
1039
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
1040
|
+
}, props));
|
|
1041
|
+
});
|
|
1042
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
1043
|
+
var AlertDialogAction = React20.forwardRef(function(_param, ref) {
|
|
1044
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1045
|
+
"className"
|
|
1046
|
+
]);
|
|
1047
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Action, _object_spread({
|
|
1048
|
+
ref: ref,
|
|
1049
|
+
className: cn(buttonVariants(), className)
|
|
1050
|
+
}, props));
|
|
1051
|
+
});
|
|
1052
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
1053
|
+
var AlertDialogCancel = React20.forwardRef(function(_param, ref) {
|
|
1054
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1055
|
+
"className"
|
|
1056
|
+
]);
|
|
1057
|
+
return /* @__PURE__ */ React20.createElement(AlertDialogPrimitive.Cancel, _object_spread({
|
|
1058
|
+
ref: ref,
|
|
1059
|
+
className: cn(buttonVariants({
|
|
1060
|
+
variant: "outline"
|
|
1061
|
+
}), "mt-2 sm:mt-0", className)
|
|
1062
|
+
}, props));
|
|
1063
|
+
});
|
|
1064
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
1065
|
+
// src/components/atoms/ui/popover.tsx
|
|
1066
|
+
import * as React21 from "react";
|
|
1067
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1068
|
+
var Popover = PopoverPrimitive.Root;
|
|
1069
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1070
|
+
var PopoverContent = React21.forwardRef(function(_param, ref) {
|
|
1071
|
+
var className = _param.className, _param_align = _param.align, align = _param_align === void 0 ? "center" : _param_align, _param_sideOffset = _param.sideOffset, sideOffset = _param_sideOffset === void 0 ? 4 : _param_sideOffset, props = _object_without_properties(_param, [
|
|
1072
|
+
"className",
|
|
1073
|
+
"align",
|
|
1074
|
+
"sideOffset"
|
|
1075
|
+
]);
|
|
1076
|
+
return /* @__PURE__ */ React21.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React21.createElement(PopoverPrimitive.Content, _object_spread({
|
|
1077
|
+
ref: ref,
|
|
1078
|
+
align: align,
|
|
1079
|
+
sideOffset: sideOffset,
|
|
1080
|
+
className: cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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", className)
|
|
1081
|
+
}, props)));
|
|
1082
|
+
});
|
|
1083
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1084
|
+
// src/components/atoms/ui/dialog.tsx
|
|
1085
|
+
import * as React22 from "react";
|
|
1086
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1087
|
+
import { X } from "lucide-react";
|
|
1088
|
+
var Dialog = DialogPrimitive.Root;
|
|
1089
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1090
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
1091
|
+
var DialogClose = DialogPrimitive.Close;
|
|
1092
|
+
var DialogOverlay = React22.forwardRef(function(_param, ref) {
|
|
1093
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1094
|
+
"className"
|
|
1095
|
+
]);
|
|
1096
|
+
return /* @__PURE__ */ React22.createElement(DialogPrimitive.Overlay, _object_spread({
|
|
1097
|
+
ref: ref,
|
|
1098
|
+
className: cn("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", className)
|
|
1099
|
+
}, props));
|
|
1100
|
+
});
|
|
1101
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1102
|
+
var DialogContent = React22.forwardRef(function(_param, ref) {
|
|
1103
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1104
|
+
"className",
|
|
1105
|
+
"children"
|
|
1106
|
+
]);
|
|
1107
|
+
return /* @__PURE__ */ React22.createElement(DialogPortal, null, /* @__PURE__ */ React22.createElement(DialogOverlay, null), /* @__PURE__ */ React22.createElement(DialogPrimitive.Content, _object_spread({
|
|
1108
|
+
ref: ref,
|
|
1109
|
+
className: cn("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", className)
|
|
1110
|
+
}, props), children, /* @__PURE__ */ React22.createElement(DialogPrimitive.Close, {
|
|
1111
|
+
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"
|
|
1112
|
+
}, /* @__PURE__ */ React22.createElement(X, {
|
|
1113
|
+
className: "h-4 w-4"
|
|
1114
|
+
}), /* @__PURE__ */ React22.createElement("span", {
|
|
1115
|
+
className: "sr-only"
|
|
1116
|
+
}, "Close"))));
|
|
1117
|
+
});
|
|
1118
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1119
|
+
var DialogHeader = function(_param) {
|
|
1120
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1121
|
+
"className"
|
|
1122
|
+
]);
|
|
1123
|
+
return /* @__PURE__ */ React22.createElement("div", _object_spread({
|
|
1124
|
+
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
1125
|
+
}, props));
|
|
1126
|
+
};
|
|
1127
|
+
DialogHeader.displayName = "DialogHeader";
|
|
1128
|
+
var DialogFooter = function(_param) {
|
|
1129
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1130
|
+
"className"
|
|
1131
|
+
]);
|
|
1132
|
+
return /* @__PURE__ */ React22.createElement("div", _object_spread({
|
|
1133
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
1134
|
+
}, props));
|
|
1135
|
+
};
|
|
1136
|
+
DialogFooter.displayName = "DialogFooter";
|
|
1137
|
+
var DialogTitle = React22.forwardRef(function(_param, ref) {
|
|
1138
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1139
|
+
"className"
|
|
1140
|
+
]);
|
|
1141
|
+
return /* @__PURE__ */ React22.createElement(DialogPrimitive.Title, _object_spread({
|
|
1142
|
+
ref: ref,
|
|
1143
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
1144
|
+
}, props));
|
|
1145
|
+
});
|
|
1146
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1147
|
+
var DialogDescription = React22.forwardRef(function(_param, ref) {
|
|
1148
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1149
|
+
"className"
|
|
1150
|
+
]);
|
|
1151
|
+
return /* @__PURE__ */ React22.createElement(DialogPrimitive.Description, _object_spread({
|
|
1152
|
+
ref: ref,
|
|
1153
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
1154
|
+
}, props));
|
|
1155
|
+
});
|
|
1156
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1157
|
+
// src/components/atoms/ui/command.tsx
|
|
1158
|
+
import * as React23 from "react";
|
|
1159
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1160
|
+
import { Search } from "lucide-react";
|
|
1161
|
+
var Command = React23.forwardRef(function(_param, ref) {
|
|
1162
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1163
|
+
"className"
|
|
1164
|
+
]);
|
|
1165
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive, _object_spread({
|
|
1166
|
+
ref: ref,
|
|
1167
|
+
className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className)
|
|
1168
|
+
}, props));
|
|
1169
|
+
});
|
|
1170
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
1171
|
+
var CommandDialog = function(_param) {
|
|
1172
|
+
var children = _param.children, props = _object_without_properties(_param, [
|
|
1173
|
+
"children"
|
|
1174
|
+
]);
|
|
1175
|
+
return /* @__PURE__ */ React23.createElement(Dialog, _object_spread({}, props), /* @__PURE__ */ React23.createElement(DialogContent, {
|
|
1176
|
+
className: "overflow-hidden p-0 shadow-lg"
|
|
1177
|
+
}, /* @__PURE__ */ React23.createElement(Command, {
|
|
1178
|
+
className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"
|
|
1179
|
+
}, children)));
|
|
1180
|
+
};
|
|
1181
|
+
var CommandInput = React23.forwardRef(function(_param, ref) {
|
|
1182
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1183
|
+
"className"
|
|
1184
|
+
]);
|
|
1185
|
+
return /* @__PURE__ */ React23.createElement("div", {
|
|
1186
|
+
className: "flex items-center border-b px-3",
|
|
1187
|
+
"cmdk-input-wrapper": ""
|
|
1188
|
+
}, /* @__PURE__ */ React23.createElement(Search, {
|
|
1189
|
+
className: "mr-2 h-4 w-4 shrink-0 opacity-50"
|
|
1190
|
+
}), /* @__PURE__ */ React23.createElement(CommandPrimitive.Input, _object_spread({
|
|
1191
|
+
ref: ref,
|
|
1192
|
+
className: cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
1193
|
+
}, props)));
|
|
1194
|
+
});
|
|
1195
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1196
|
+
var CommandList = React23.forwardRef(function(_param, ref) {
|
|
1197
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1198
|
+
"className"
|
|
1199
|
+
]);
|
|
1200
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive.List, _object_spread({
|
|
1201
|
+
ref: ref,
|
|
1202
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)
|
|
1203
|
+
}, props));
|
|
1204
|
+
});
|
|
1205
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1206
|
+
var CommandEmpty = React23.forwardRef(function(props, ref) {
|
|
1207
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive.Empty, _object_spread({
|
|
1208
|
+
ref: ref,
|
|
1209
|
+
className: "py-6 text-center text-sm"
|
|
1210
|
+
}, props));
|
|
1211
|
+
});
|
|
1212
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1213
|
+
var CommandGroup = React23.forwardRef(function(_param, ref) {
|
|
1214
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1215
|
+
"className"
|
|
1216
|
+
]);
|
|
1217
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive.Group, _object_spread({
|
|
1218
|
+
ref: ref,
|
|
1219
|
+
className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)
|
|
1220
|
+
}, props));
|
|
1221
|
+
});
|
|
1222
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1223
|
+
var CommandSeparator = React23.forwardRef(function(_param, ref) {
|
|
1224
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1225
|
+
"className"
|
|
1226
|
+
]);
|
|
1227
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive.Separator, _object_spread({
|
|
1228
|
+
ref: ref,
|
|
1229
|
+
className: cn("-mx-1 h-px bg-border", className)
|
|
1230
|
+
}, props));
|
|
1231
|
+
});
|
|
1232
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1233
|
+
var CommandItem = React23.forwardRef(function(_param, ref) {
|
|
1234
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1235
|
+
"className"
|
|
1236
|
+
]);
|
|
1237
|
+
return /* @__PURE__ */ React23.createElement(CommandPrimitive.Item, _object_spread({
|
|
1238
|
+
ref: ref,
|
|
1239
|
+
className: cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className)
|
|
1240
|
+
}, props));
|
|
1241
|
+
});
|
|
1242
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
1243
|
+
var CommandShortcut = function(_param) {
|
|
1244
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1245
|
+
"className"
|
|
1246
|
+
]);
|
|
1247
|
+
return /* @__PURE__ */ React23.createElement("span", _object_spread({
|
|
1248
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className)
|
|
1249
|
+
}, props));
|
|
1250
|
+
};
|
|
1251
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1252
|
+
// src/components/atoms/ui/toast.tsx
|
|
1253
|
+
import * as React24 from "react";
|
|
1254
|
+
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
1255
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
1256
|
+
import { X as X2 } from "lucide-react";
|
|
1257
|
+
var ToastProvider = ToastPrimitives.Provider;
|
|
1258
|
+
var ToastViewport = React24.forwardRef(function(_param, ref) {
|
|
1259
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1260
|
+
"className"
|
|
1261
|
+
]);
|
|
1262
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Viewport, _object_spread({
|
|
1263
|
+
ref: ref,
|
|
1264
|
+
className: cn("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]", className)
|
|
1265
|
+
}, props));
|
|
1266
|
+
});
|
|
1267
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
1268
|
+
var toastVariants = cva6("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 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", {
|
|
1269
|
+
variants: {
|
|
1270
|
+
variant: {
|
|
1271
|
+
default: "border bg-background text-foreground",
|
|
1272
|
+
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground"
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
defaultVariants: {
|
|
1276
|
+
variant: "default"
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
var Toast = React24.forwardRef(function(_param, ref) {
|
|
1280
|
+
var className = _param.className, variant = _param.variant, props = _object_without_properties(_param, [
|
|
1281
|
+
"className",
|
|
1282
|
+
"variant"
|
|
1283
|
+
]);
|
|
1284
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Root, _object_spread({
|
|
1285
|
+
ref: ref,
|
|
1286
|
+
className: cn(toastVariants({
|
|
1287
|
+
variant: variant
|
|
1288
|
+
}), className)
|
|
1289
|
+
}, props));
|
|
1290
|
+
});
|
|
1291
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
1292
|
+
var ToastAction = React24.forwardRef(function(_param, ref) {
|
|
1293
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1294
|
+
"className"
|
|
1295
|
+
]);
|
|
1296
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Action, _object_spread({
|
|
1297
|
+
ref: ref,
|
|
1298
|
+
className: cn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive", className)
|
|
1299
|
+
}, props));
|
|
1300
|
+
});
|
|
1301
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
1302
|
+
var ToastClose = React24.forwardRef(function(_param, ref) {
|
|
1303
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1304
|
+
"className"
|
|
1305
|
+
]);
|
|
1306
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Close, _object_spread({
|
|
1307
|
+
ref: ref,
|
|
1308
|
+
className: cn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600", className),
|
|
1309
|
+
"toast-close": ""
|
|
1310
|
+
}, props), /* @__PURE__ */ React24.createElement(X2, {
|
|
1311
|
+
className: "h-4 w-4"
|
|
1312
|
+
}));
|
|
1313
|
+
});
|
|
1314
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
1315
|
+
var ToastTitle = React24.forwardRef(function(_param, ref) {
|
|
1316
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1317
|
+
"className"
|
|
1318
|
+
]);
|
|
1319
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Title, _object_spread({
|
|
1320
|
+
ref: ref,
|
|
1321
|
+
className: cn("text-sm font-semibold", className)
|
|
1322
|
+
}, props));
|
|
1323
|
+
});
|
|
1324
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
1325
|
+
var ToastDescription = React24.forwardRef(function(_param, ref) {
|
|
1326
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1327
|
+
"className"
|
|
1328
|
+
]);
|
|
1329
|
+
return /* @__PURE__ */ React24.createElement(ToastPrimitives.Description, _object_spread({
|
|
1330
|
+
ref: ref,
|
|
1331
|
+
className: cn("text-sm opacity-90", className)
|
|
1332
|
+
}, props));
|
|
1333
|
+
});
|
|
1334
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
1335
|
+
// src/components/atoms/ui/loader.tsx
|
|
1336
|
+
import * as React25 from "react";
|
|
1337
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
1338
|
+
import { Loader2 } from "lucide-react";
|
|
1339
|
+
var loaderVariants = cva7("flex justify-center items-center w-full", {
|
|
1340
|
+
variants: {
|
|
1341
|
+
size: {
|
|
1342
|
+
small: "h-6 w-6",
|
|
1343
|
+
medium: "h-8 w-8",
|
|
1344
|
+
large: "h-12 w-12",
|
|
1345
|
+
xl: "h-24 w-24"
|
|
1346
|
+
},
|
|
1347
|
+
colorVariant: {
|
|
1348
|
+
default: "text-primary",
|
|
1349
|
+
primary: "text-primary",
|
|
1350
|
+
secondary: "text-secondary",
|
|
1351
|
+
destructive: "text-destructive"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
defaultVariants: {
|
|
1355
|
+
size: "medium",
|
|
1356
|
+
colorVariant: "default"
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1359
|
+
var Loader = React25.forwardRef(function(_param, ref) {
|
|
1360
|
+
var className = _param.className, size = _param.size, colorVariant = _param.colorVariant, props = _object_without_properties(_param, [
|
|
1361
|
+
"className",
|
|
1362
|
+
"size",
|
|
1363
|
+
"colorVariant"
|
|
1364
|
+
]);
|
|
1365
|
+
return /* @__PURE__ */ React25.createElement("div", _object_spread({
|
|
1366
|
+
ref: ref,
|
|
1367
|
+
className: cn(loaderVariants({
|
|
1368
|
+
size: size,
|
|
1369
|
+
colorVariant: colorVariant
|
|
1370
|
+
}), "flex justify-center items-center h-full w-full", className)
|
|
1371
|
+
}, props), /* @__PURE__ */ React25.createElement(Loader2, {
|
|
1372
|
+
className: "animate-spin"
|
|
1373
|
+
}));
|
|
1374
|
+
});
|
|
1375
|
+
Loader.displayName = "Loader";
|
|
1376
|
+
// src/components/hooks/use-toast.ts
|
|
1377
|
+
import * as React26 from "react";
|
|
1378
|
+
var TOAST_LIMIT = 1;
|
|
1379
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
1380
|
+
var count = 0;
|
|
1381
|
+
function genId() {
|
|
1382
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
1383
|
+
return count.toString();
|
|
1384
|
+
}
|
|
1385
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
1386
|
+
var addToRemoveQueue = function(toastId) {
|
|
1387
|
+
if (toastTimeouts.has(toastId)) {
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
var timeout = setTimeout(function() {
|
|
1391
|
+
toastTimeouts.delete(toastId);
|
|
1392
|
+
dispatch({
|
|
1393
|
+
type: "REMOVE_TOAST",
|
|
1394
|
+
toastId: toastId
|
|
1395
|
+
});
|
|
1396
|
+
}, TOAST_REMOVE_DELAY);
|
|
1397
|
+
toastTimeouts.set(toastId, timeout);
|
|
1398
|
+
};
|
|
1399
|
+
var reducer = function(state, action) {
|
|
1400
|
+
switch(action.type){
|
|
1401
|
+
case "ADD_TOAST":
|
|
1402
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1403
|
+
toasts: [
|
|
1404
|
+
action.toast
|
|
1405
|
+
].concat(_to_consumable_array(state.toasts)).slice(0, TOAST_LIMIT)
|
|
1406
|
+
});
|
|
1407
|
+
case "UPDATE_TOAST":
|
|
1408
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1409
|
+
toasts: state.toasts.map(function(t) {
|
|
1410
|
+
return t.id === action.toast.id ? _object_spread({}, t, action.toast) : t;
|
|
1411
|
+
})
|
|
1412
|
+
});
|
|
1413
|
+
case "DISMISS_TOAST":
|
|
1414
|
+
{
|
|
1415
|
+
var toastId = action.toastId;
|
|
1416
|
+
if (toastId) {
|
|
1417
|
+
addToRemoveQueue(toastId);
|
|
1418
|
+
} else {
|
|
1419
|
+
state.toasts.forEach(function(toast2) {
|
|
1420
|
+
addToRemoveQueue(toast2.id);
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1424
|
+
toasts: state.toasts.map(function(t) {
|
|
1425
|
+
return t.id === toastId || toastId === void 0 ? _object_spread_props(_object_spread({}, t), {
|
|
1426
|
+
open: false
|
|
1427
|
+
}) : t;
|
|
1428
|
+
})
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
case "REMOVE_TOAST":
|
|
1432
|
+
if (action.toastId === void 0) {
|
|
1433
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1434
|
+
toasts: []
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1438
|
+
toasts: state.toasts.filter(function(t) {
|
|
1439
|
+
return t.id !== action.toastId;
|
|
1440
|
+
})
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
var listeners = [];
|
|
1445
|
+
var memoryState = {
|
|
1446
|
+
toasts: []
|
|
1447
|
+
};
|
|
1448
|
+
function dispatch(action) {
|
|
1449
|
+
memoryState = reducer(memoryState, action);
|
|
1450
|
+
listeners.forEach(function(listener) {
|
|
1451
|
+
listener(memoryState);
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
function toast(_param) {
|
|
1455
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
1456
|
+
var id = genId();
|
|
1457
|
+
var update = function(props2) {
|
|
1458
|
+
return dispatch({
|
|
1459
|
+
type: "UPDATE_TOAST",
|
|
1460
|
+
toast: _object_spread_props(_object_spread({}, props2), {
|
|
1461
|
+
id: id
|
|
1462
|
+
})
|
|
1463
|
+
});
|
|
1464
|
+
};
|
|
1465
|
+
var dismiss = function() {
|
|
1466
|
+
return dispatch({
|
|
1467
|
+
type: "DISMISS_TOAST",
|
|
1468
|
+
toastId: id
|
|
1469
|
+
});
|
|
1470
|
+
};
|
|
1471
|
+
dispatch({
|
|
1472
|
+
type: "ADD_TOAST",
|
|
1473
|
+
toast: _object_spread_props(_object_spread({}, props), {
|
|
1474
|
+
id: id,
|
|
1475
|
+
open: true,
|
|
1476
|
+
onOpenChange: function(open) {
|
|
1477
|
+
if (!open) dismiss();
|
|
1478
|
+
}
|
|
1479
|
+
})
|
|
1480
|
+
});
|
|
1481
|
+
return {
|
|
1482
|
+
id: id,
|
|
1483
|
+
dismiss: dismiss,
|
|
1484
|
+
update: update
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
function useToast() {
|
|
1488
|
+
var _React26_useState = _sliced_to_array(React26.useState(memoryState), 2), state = _React26_useState[0], setState = _React26_useState[1];
|
|
1489
|
+
React26.useEffect(function() {
|
|
1490
|
+
listeners.push(setState);
|
|
1491
|
+
return function() {
|
|
1492
|
+
var index = listeners.indexOf(setState);
|
|
1493
|
+
if (index > -1) {
|
|
1494
|
+
listeners.splice(index, 1);
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
}, [
|
|
1498
|
+
state
|
|
1499
|
+
]);
|
|
1500
|
+
return _object_spread_props(_object_spread({}, state), {
|
|
1501
|
+
toast: toast,
|
|
1502
|
+
dismiss: function(toastId) {
|
|
1503
|
+
return dispatch({
|
|
1504
|
+
type: "DISMISS_TOAST",
|
|
1505
|
+
toastId: toastId
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
// src/components/atoms/ui/toaster.tsx
|
|
1511
|
+
import * as React27 from "react";
|
|
1512
|
+
function Toaster() {
|
|
1513
|
+
var toasts = useToast().toasts;
|
|
1514
|
+
return /* @__PURE__ */ React27.createElement(ToastProvider, null, toasts.map(function(_param) {
|
|
1515
|
+
var id = _param.id, title = _param.title, description = _param.description, action = _param.action, props = _object_without_properties(_param, [
|
|
1516
|
+
"id",
|
|
1517
|
+
"title",
|
|
1518
|
+
"description",
|
|
1519
|
+
"action"
|
|
1520
|
+
]);
|
|
1521
|
+
return /* @__PURE__ */ React27.createElement(Toast, _object_spread({
|
|
1522
|
+
key: id
|
|
1523
|
+
}, props), /* @__PURE__ */ React27.createElement("div", {
|
|
1524
|
+
className: "grid gap-1"
|
|
1525
|
+
}, title && /* @__PURE__ */ React27.createElement(ToastTitle, null, title), description && /* @__PURE__ */ React27.createElement(ToastDescription, null, description)), action, /* @__PURE__ */ React27.createElement(ToastClose, null));
|
|
1526
|
+
}), /* @__PURE__ */ React27.createElement(ToastViewport, null));
|
|
1527
|
+
}
|
|
1528
|
+
export { cn, parseTextToSpeech, blobToBase64, truncateString, getCookies, buttonVariants, Button, Textarea, Input, Select, SelectGroup, SelectValue, SelectTrigger, SelectScrollUpButton, SelectScrollDownButton, SelectContent, SelectLabel, SelectItem, SelectSeparator, Avatar, AvatarImage, AvatarFallback, ScrollArea, ScrollBar, RichText, Skeleton, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Drawer, DrawerTrigger, DrawerPortal, DrawerClose, DrawerOverlay, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, Typography, badgeVariants, Badge, Alert, AlertTitle, AlertDescription, Label2 as Label, Checkbox, toggleVariants, Toggle, Slider, Switch, Tabs, TabsList, TabsTrigger, TabsContent, AspectRatio, Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, Popover, PopoverTrigger, PopoverContent, Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandSeparator, CommandItem, CommandShortcut, ToastProvider, ToastViewport, Toast, ToastAction, ToastClose, ToastTitle, ToastDescription, Loader, reducer, toast, useToast, Toaster };
|
|
1529
|
+
//# sourceMappingURL=chunk-6EP6KTGV.mjs.map
|