@amazecontinuityprojects/amazeui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +81 -36
- package/dist/index.d.ts +81 -36
- package/dist/index.js +402 -162
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +385 -154
- package/dist/index.mjs.map +1 -1
- package/dist/tailwind.css +239 -0
- package/package.json +5 -2
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lib/primitives.tsx
|
|
2
4
|
import * as React from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { cva } from "class-variance-authority";
|
|
5
|
+
import { Platform, View as RNView, Text as RNText, Pressable as RNPressable, TextInput as RNTextInput } from "react-native";
|
|
5
6
|
|
|
6
7
|
// src/lib/utils.ts
|
|
7
8
|
import { clsx } from "clsx";
|
|
@@ -10,8 +11,48 @@ function cn(...inputs) {
|
|
|
10
11
|
return twMerge(clsx(inputs));
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
// src/
|
|
14
|
+
// src/lib/primitives.tsx
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
var View = React.forwardRef(({ className, style, ...props }, ref) => {
|
|
17
|
+
if (Platform.OS === "web") {
|
|
18
|
+
const C = "div";
|
|
19
|
+
return /* @__PURE__ */ jsx(C, { ref, className: cn("flex flex-col items-stretch justify-start min-w-0 min-h-0 relative", className), style, ...props });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ jsx(RNView, { ref, className, style, ...props });
|
|
22
|
+
});
|
|
23
|
+
View.displayName = "View";
|
|
24
|
+
var Text = React.forwardRef(({ className, style, ...props }, ref) => {
|
|
25
|
+
if (Platform.OS === "web") {
|
|
26
|
+
const C = "span";
|
|
27
|
+
return /* @__PURE__ */ jsx(C, { ref, className: cn("inline m-0 p-0", className), style, ...props });
|
|
28
|
+
}
|
|
29
|
+
return /* @__PURE__ */ jsx(RNText, { ref, className, style, ...props });
|
|
30
|
+
});
|
|
31
|
+
Text.displayName = "Text";
|
|
32
|
+
var Pressable = React.forwardRef(({ className, style, onPress, onClick, ...props }, ref) => {
|
|
33
|
+
if (Platform.OS === "web") {
|
|
34
|
+
const C = "button";
|
|
35
|
+
return /* @__PURE__ */ jsx(C, { ref, type: "button", onClick: onPress || onClick, className: cn("flex flex-col items-stretch justify-start bg-transparent border-none p-0 m-0 cursor-pointer outline-none relative", className), style, ...props });
|
|
36
|
+
}
|
|
37
|
+
return /* @__PURE__ */ jsx(RNPressable, { ref, onPress: onPress || onClick, className, style, ...props });
|
|
38
|
+
});
|
|
39
|
+
Pressable.displayName = "Pressable";
|
|
40
|
+
var TextInput = React.forwardRef(({ className, style, onChangeText, onChange, value, ...props }, ref) => {
|
|
41
|
+
if (Platform.OS === "web") {
|
|
42
|
+
const C = "input";
|
|
43
|
+
return /* @__PURE__ */ jsx(C, { ref, value, onChange: (e) => {
|
|
44
|
+
onChangeText == null ? void 0 : onChangeText(e.target.value);
|
|
45
|
+
onChange == null ? void 0 : onChange(e);
|
|
46
|
+
}, className, style: { ...style }, ...props });
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsx(RNTextInput, { ref, value, onChangeText, onChange, className, style, ...props });
|
|
49
|
+
});
|
|
50
|
+
TextInput.displayName = "TextInput";
|
|
51
|
+
|
|
52
|
+
// src/components/ui/button.tsx
|
|
53
|
+
import * as React2 from "react";
|
|
54
|
+
import { cva } from "class-variance-authority";
|
|
55
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
15
56
|
var buttonVariants = cva(
|
|
16
57
|
"flex flex-row items-center justify-center gap-2 rounded-md font-medium transition-all",
|
|
17
58
|
{
|
|
@@ -55,15 +96,19 @@ var buttonTextVariants = cva(
|
|
|
55
96
|
}
|
|
56
97
|
}
|
|
57
98
|
);
|
|
58
|
-
var Button =
|
|
59
|
-
({ className, variant, size, children, textClassName, ...props }, ref) => {
|
|
60
|
-
return /* @__PURE__ */
|
|
99
|
+
var Button = React2.forwardRef(
|
|
100
|
+
({ className, variant, size, children, textClassName, onClick, onPress, ...props }, ref) => {
|
|
101
|
+
return /* @__PURE__ */ jsx2(
|
|
61
102
|
Pressable,
|
|
62
103
|
{
|
|
104
|
+
onPress: onPress || onClick,
|
|
63
105
|
ref,
|
|
64
106
|
...{ className: cn(buttonVariants({ variant, size }), className) },
|
|
65
107
|
...props,
|
|
66
|
-
children:
|
|
108
|
+
children: React2.Children.map(
|
|
109
|
+
children,
|
|
110
|
+
(child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx2(Text, { ...{ className: cn(buttonTextVariants({ variant }), textClassName) }, children: child }) : child
|
|
111
|
+
)
|
|
67
112
|
}
|
|
68
113
|
);
|
|
69
114
|
}
|
|
@@ -71,22 +116,21 @@ var Button = React.forwardRef(
|
|
|
71
116
|
Button.displayName = "Button";
|
|
72
117
|
|
|
73
118
|
// src/components/ui/card.tsx
|
|
74
|
-
import * as
|
|
75
|
-
import {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
119
|
+
import * as React3 from "react";
|
|
120
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
121
|
+
var Card = React3.forwardRef(
|
|
122
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
79
123
|
View,
|
|
80
124
|
{
|
|
81
125
|
ref,
|
|
82
|
-
...{ className: cn("rounded-xl border border-border bg-card shadow-sm", className) },
|
|
126
|
+
...{ className: cn("rounded-xl border border-border bg-card/60 backdrop-blur-xl shadow-sm dark:bg-card/40", className) },
|
|
83
127
|
...props
|
|
84
128
|
}
|
|
85
129
|
)
|
|
86
130
|
);
|
|
87
131
|
Card.displayName = "Card";
|
|
88
|
-
var CardHeader =
|
|
89
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
132
|
+
var CardHeader = React3.forwardRef(
|
|
133
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
90
134
|
View,
|
|
91
135
|
{
|
|
92
136
|
ref,
|
|
@@ -96,9 +140,9 @@ var CardHeader = React2.forwardRef(
|
|
|
96
140
|
)
|
|
97
141
|
);
|
|
98
142
|
CardHeader.displayName = "CardHeader";
|
|
99
|
-
var CardTitle =
|
|
100
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
101
|
-
|
|
143
|
+
var CardTitle = React3.forwardRef(
|
|
144
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
145
|
+
Text,
|
|
102
146
|
{
|
|
103
147
|
ref,
|
|
104
148
|
...{ className: cn("font-semibold text-lg leading-none tracking-tight text-foreground", className) },
|
|
@@ -107,9 +151,9 @@ var CardTitle = React2.forwardRef(
|
|
|
107
151
|
)
|
|
108
152
|
);
|
|
109
153
|
CardTitle.displayName = "CardTitle";
|
|
110
|
-
var CardDescription =
|
|
111
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
112
|
-
|
|
154
|
+
var CardDescription = React3.forwardRef(
|
|
155
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
156
|
+
Text,
|
|
113
157
|
{
|
|
114
158
|
ref,
|
|
115
159
|
...{ className: cn("text-sm text-muted-foreground", className) },
|
|
@@ -118,12 +162,12 @@ var CardDescription = React2.forwardRef(
|
|
|
118
162
|
)
|
|
119
163
|
);
|
|
120
164
|
CardDescription.displayName = "CardDescription";
|
|
121
|
-
var CardContent =
|
|
122
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
165
|
+
var CardContent = React3.forwardRef(
|
|
166
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(View, { ref, ...{ className: cn("p-6 pt-0", className) }, ...props })
|
|
123
167
|
);
|
|
124
168
|
CardContent.displayName = "CardContent";
|
|
125
|
-
var CardFooter =
|
|
126
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
169
|
+
var CardFooter = React3.forwardRef(
|
|
170
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
127
171
|
View,
|
|
128
172
|
{
|
|
129
173
|
ref,
|
|
@@ -135,12 +179,11 @@ var CardFooter = React2.forwardRef(
|
|
|
135
179
|
CardFooter.displayName = "CardFooter";
|
|
136
180
|
|
|
137
181
|
// src/components/ui/input.tsx
|
|
138
|
-
import * as
|
|
139
|
-
import {
|
|
140
|
-
|
|
141
|
-
var Input = React3.forwardRef(
|
|
182
|
+
import * as React4 from "react";
|
|
183
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
184
|
+
var Input = React4.forwardRef(
|
|
142
185
|
({ className, ...props }, ref) => {
|
|
143
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ jsx4(
|
|
144
187
|
TextInput,
|
|
145
188
|
{
|
|
146
189
|
ref,
|
|
@@ -154,10 +197,9 @@ var Input = React3.forwardRef(
|
|
|
154
197
|
Input.displayName = "Input";
|
|
155
198
|
|
|
156
199
|
// src/components/ui/label.tsx
|
|
157
|
-
import * as
|
|
158
|
-
import { Text as Text3 } from "react-native";
|
|
200
|
+
import * as React5 from "react";
|
|
159
201
|
import { cva as cva2 } from "class-variance-authority";
|
|
160
|
-
import { jsx as
|
|
202
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
161
203
|
var labelVariants = cva2(
|
|
162
204
|
"text-sm font-medium leading-none text-foreground peer-disabled:opacity-70",
|
|
163
205
|
{
|
|
@@ -165,9 +207,9 @@ var labelVariants = cva2(
|
|
|
165
207
|
defaultVariants: {}
|
|
166
208
|
}
|
|
167
209
|
);
|
|
168
|
-
var Label =
|
|
169
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
170
|
-
|
|
210
|
+
var Label = React5.forwardRef(
|
|
211
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
212
|
+
Text,
|
|
171
213
|
{
|
|
172
214
|
ref,
|
|
173
215
|
...{ className: cn(labelVariants(), className) },
|
|
@@ -178,11 +220,10 @@ var Label = React4.forwardRef(
|
|
|
178
220
|
Label.displayName = "Label";
|
|
179
221
|
|
|
180
222
|
// src/components/ui/skeleton.tsx
|
|
181
|
-
import {
|
|
182
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
223
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
183
224
|
function Skeleton({ className, ...props }) {
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
|
|
225
|
+
return /* @__PURE__ */ jsx6(
|
|
226
|
+
View,
|
|
186
227
|
{
|
|
187
228
|
...{ className: cn("animate-pulse rounded-md bg-primary/10", className) },
|
|
188
229
|
...props
|
|
@@ -191,14 +232,20 @@ function Skeleton({ className, ...props }) {
|
|
|
191
232
|
}
|
|
192
233
|
|
|
193
234
|
// src/components/ui/switch.tsx
|
|
194
|
-
import * as
|
|
235
|
+
import * as React6 from "react";
|
|
195
236
|
import { Switch as NativeSwitch } from "react-native";
|
|
196
|
-
import { jsx as
|
|
197
|
-
var Switch =
|
|
198
|
-
({ className, ...props }, ref) => {
|
|
199
|
-
return /* @__PURE__ */
|
|
237
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
238
|
+
var Switch = React6.forwardRef(
|
|
239
|
+
({ className, onCheckedChange, onChange, onValueChange, checked, value, ...props }, ref) => {
|
|
240
|
+
return /* @__PURE__ */ jsx7(
|
|
200
241
|
NativeSwitch,
|
|
201
242
|
{
|
|
243
|
+
value: checked !== void 0 ? checked : value,
|
|
244
|
+
onValueChange: (val) => {
|
|
245
|
+
onValueChange == null ? void 0 : onValueChange(val);
|
|
246
|
+
onCheckedChange == null ? void 0 : onCheckedChange(val);
|
|
247
|
+
onChange == null ? void 0 : onChange(val);
|
|
248
|
+
},
|
|
202
249
|
ref,
|
|
203
250
|
...props
|
|
204
251
|
}
|
|
@@ -208,20 +255,19 @@ var Switch = React5.forwardRef(
|
|
|
208
255
|
Switch.displayName = "Switch";
|
|
209
256
|
|
|
210
257
|
// src/components/ui/progress.tsx
|
|
211
|
-
import * as
|
|
212
|
-
import {
|
|
213
|
-
|
|
214
|
-
var Progress = React6.forwardRef(
|
|
258
|
+
import * as React7 from "react";
|
|
259
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
260
|
+
var Progress = React7.forwardRef(
|
|
215
261
|
({ className, value = 0, ...props }, ref) => {
|
|
216
262
|
const boundedValue = Math.min(100, Math.max(0, value || 0));
|
|
217
|
-
return /* @__PURE__ */
|
|
218
|
-
|
|
263
|
+
return /* @__PURE__ */ jsx8(
|
|
264
|
+
View,
|
|
219
265
|
{
|
|
220
266
|
ref,
|
|
221
267
|
...{ className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className) },
|
|
222
268
|
...props,
|
|
223
|
-
children: /* @__PURE__ */
|
|
224
|
-
|
|
269
|
+
children: /* @__PURE__ */ jsx8(
|
|
270
|
+
View,
|
|
225
271
|
{
|
|
226
272
|
...{ className: "h-full bg-primary flex-1 transition-all" },
|
|
227
273
|
style: { width: `${boundedValue}%` }
|
|
@@ -234,32 +280,31 @@ var Progress = React6.forwardRef(
|
|
|
234
280
|
Progress.displayName = "Progress";
|
|
235
281
|
|
|
236
282
|
// src/components/ui/tabs.tsx
|
|
237
|
-
import * as
|
|
238
|
-
import {
|
|
239
|
-
|
|
240
|
-
var TabsContext = React7.createContext(null);
|
|
283
|
+
import * as React8 from "react";
|
|
284
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
285
|
+
var TabsContext = React8.createContext(null);
|
|
241
286
|
function Tabs({ value: controlledValue, defaultValue, onValueChange, className, children, ...props }) {
|
|
242
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
287
|
+
const [uncontrolledValue, setUncontrolledValue] = React8.useState(defaultValue || "");
|
|
243
288
|
const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
244
|
-
const handleValueChange =
|
|
289
|
+
const handleValueChange = React8.useCallback(
|
|
245
290
|
(newValue) => {
|
|
246
291
|
setUncontrolledValue(newValue);
|
|
247
292
|
onValueChange == null ? void 0 : onValueChange(newValue);
|
|
248
293
|
},
|
|
249
294
|
[onValueChange]
|
|
250
295
|
);
|
|
251
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ jsx9(TabsContext.Provider, { value: { value, onValueChange: handleValueChange }, children: /* @__PURE__ */ jsx9(View, { ...{ className }, ...props, children }) });
|
|
252
297
|
}
|
|
253
298
|
function useTabsContext() {
|
|
254
|
-
const context =
|
|
299
|
+
const context = React8.useContext(TabsContext);
|
|
255
300
|
if (!context) {
|
|
256
301
|
throw new Error("Tabs compound components must be rendered within the Tabs component");
|
|
257
302
|
}
|
|
258
303
|
return context;
|
|
259
304
|
}
|
|
260
|
-
var TabsList =
|
|
261
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
262
|
-
|
|
305
|
+
var TabsList = React8.forwardRef(
|
|
306
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
307
|
+
View,
|
|
263
308
|
{
|
|
264
309
|
ref,
|
|
265
310
|
...{ className: cn("flex-row items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className) },
|
|
@@ -268,12 +313,12 @@ var TabsList = React7.forwardRef(
|
|
|
268
313
|
)
|
|
269
314
|
);
|
|
270
315
|
TabsList.displayName = "TabsList";
|
|
271
|
-
var TabsTrigger =
|
|
316
|
+
var TabsTrigger = React8.forwardRef(
|
|
272
317
|
({ className, textClassName, value, children, ...props }, ref) => {
|
|
273
318
|
const context = useTabsContext();
|
|
274
319
|
const isSelected = context.value === value;
|
|
275
|
-
return /* @__PURE__ */
|
|
276
|
-
|
|
320
|
+
return /* @__PURE__ */ jsx9(
|
|
321
|
+
Pressable,
|
|
277
322
|
{
|
|
278
323
|
ref,
|
|
279
324
|
onPress: () => context.onValueChange(value),
|
|
@@ -283,20 +328,20 @@ var TabsTrigger = React7.forwardRef(
|
|
|
283
328
|
className
|
|
284
329
|
) },
|
|
285
330
|
...props,
|
|
286
|
-
children: typeof children === "string" ? /* @__PURE__ */
|
|
331
|
+
children: typeof children === "string" ? /* @__PURE__ */ jsx9(Text, { ...{ className: cn("text-sm font-medium transition-all", isSelected ? "text-foreground" : "text-muted-foreground", textClassName) }, children }) : children
|
|
287
332
|
}
|
|
288
333
|
);
|
|
289
334
|
}
|
|
290
335
|
);
|
|
291
336
|
TabsTrigger.displayName = "TabsTrigger";
|
|
292
|
-
var TabsContent =
|
|
337
|
+
var TabsContent = React8.forwardRef(
|
|
293
338
|
({ className, value, children, ...props }, ref) => {
|
|
294
339
|
const context = useTabsContext();
|
|
295
340
|
if (context.value !== value) {
|
|
296
341
|
return null;
|
|
297
342
|
}
|
|
298
|
-
return /* @__PURE__ */
|
|
299
|
-
|
|
343
|
+
return /* @__PURE__ */ jsx9(
|
|
344
|
+
View,
|
|
300
345
|
{
|
|
301
346
|
ref,
|
|
302
347
|
...{ 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) },
|
|
@@ -309,12 +354,11 @@ var TabsContent = React7.forwardRef(
|
|
|
309
354
|
TabsContent.displayName = "TabsContent";
|
|
310
355
|
|
|
311
356
|
// src/components/ui/table.tsx
|
|
312
|
-
import * as
|
|
313
|
-
import {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
View5,
|
|
357
|
+
import * as React9 from "react";
|
|
358
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
359
|
+
var Table = React9.forwardRef(
|
|
360
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(View, { ...{ className: "w-full overflow-hidden" }, children: /* @__PURE__ */ jsx10(
|
|
361
|
+
View,
|
|
318
362
|
{
|
|
319
363
|
ref,
|
|
320
364
|
...{ className: cn("w-full text-sm", className) },
|
|
@@ -323,13 +367,13 @@ var Table = React8.forwardRef(
|
|
|
323
367
|
) })
|
|
324
368
|
);
|
|
325
369
|
Table.displayName = "Table";
|
|
326
|
-
var TableHeader =
|
|
327
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
370
|
+
var TableHeader = React9.forwardRef(
|
|
371
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(View, { ref, ...{ className: cn("flex flex-row items-center border-b border-border bg-muted/50", className) }, ...props })
|
|
328
372
|
);
|
|
329
373
|
TableHeader.displayName = "TableHeader";
|
|
330
|
-
var TableBody =
|
|
331
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
332
|
-
|
|
374
|
+
var TableBody = React9.forwardRef(
|
|
375
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
376
|
+
View,
|
|
333
377
|
{
|
|
334
378
|
ref,
|
|
335
379
|
...{ className: cn("flex flex-col [&_>_view:last-child]:border-0", className) },
|
|
@@ -338,9 +382,9 @@ var TableBody = React8.forwardRef(
|
|
|
338
382
|
)
|
|
339
383
|
);
|
|
340
384
|
TableBody.displayName = "TableBody";
|
|
341
|
-
var TableRow =
|
|
342
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
343
|
-
|
|
385
|
+
var TableRow = React9.forwardRef(
|
|
386
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
387
|
+
View,
|
|
344
388
|
{
|
|
345
389
|
ref,
|
|
346
390
|
...{ className: cn(
|
|
@@ -352,9 +396,9 @@ var TableRow = React8.forwardRef(
|
|
|
352
396
|
)
|
|
353
397
|
);
|
|
354
398
|
TableRow.displayName = "TableRow";
|
|
355
|
-
var TableHead =
|
|
356
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
357
|
-
|
|
399
|
+
var TableHead = React9.forwardRef(
|
|
400
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
401
|
+
View,
|
|
358
402
|
{
|
|
359
403
|
ref,
|
|
360
404
|
...{ className: cn(
|
|
@@ -362,66 +406,68 @@ var TableHead = React8.forwardRef(
|
|
|
362
406
|
className
|
|
363
407
|
) },
|
|
364
408
|
...props,
|
|
365
|
-
children: typeof children === "string" ? /* @__PURE__ */
|
|
409
|
+
children: typeof children === "string" ? /* @__PURE__ */ jsx10(Text, { ...{ className: "font-semibold text-muted-foreground text-sm" }, children }) : children
|
|
366
410
|
}
|
|
367
411
|
)
|
|
368
412
|
);
|
|
369
413
|
TableHead.displayName = "TableHead";
|
|
370
|
-
var TableCell =
|
|
371
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
372
|
-
|
|
414
|
+
var TableCell = React9.forwardRef(
|
|
415
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
416
|
+
View,
|
|
373
417
|
{
|
|
374
418
|
ref,
|
|
375
419
|
...{ className: cn("p-4 align-middle", className) },
|
|
376
420
|
...props,
|
|
377
|
-
children: typeof children === "string" ? /* @__PURE__ */
|
|
421
|
+
children: typeof children === "string" ? /* @__PURE__ */ jsx10(Text, { ...{ className: "text-foreground text-sm" }, children }) : children
|
|
378
422
|
}
|
|
379
423
|
)
|
|
380
424
|
);
|
|
381
425
|
TableCell.displayName = "TableCell";
|
|
382
426
|
|
|
383
427
|
// src/components/ui/dialog.tsx
|
|
384
|
-
import * as
|
|
385
|
-
import { Modal
|
|
386
|
-
import { jsx as
|
|
387
|
-
var DialogContext =
|
|
428
|
+
import * as React10 from "react";
|
|
429
|
+
import { Modal } from "react-native";
|
|
430
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
431
|
+
var DialogContext = React10.createContext(null);
|
|
388
432
|
function useDialog() {
|
|
389
|
-
const context =
|
|
433
|
+
const context = React10.useContext(DialogContext);
|
|
390
434
|
if (!context) throw new Error("Dialog components must be used within a Dialog");
|
|
391
435
|
return context;
|
|
392
436
|
}
|
|
393
437
|
function Dialog({ open = false, onOpenChange, children, ...props }) {
|
|
394
|
-
const [isOpen, setIsOpen] =
|
|
438
|
+
const [isOpen, setIsOpen] = React10.useState(open);
|
|
395
439
|
const isControlled = onOpenChange !== void 0;
|
|
396
440
|
const currentOpen = isControlled ? open : isOpen;
|
|
397
|
-
const setCurrentOpen =
|
|
441
|
+
const setCurrentOpen = React10.useCallback((val) => {
|
|
398
442
|
if (!isControlled) setIsOpen(val);
|
|
399
443
|
onOpenChange == null ? void 0 : onOpenChange(val);
|
|
400
444
|
}, [isControlled, onOpenChange]);
|
|
401
|
-
return /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ jsx11(DialogContext.Provider, { value: { open: currentOpen, onOpenChange: setCurrentOpen }, children });
|
|
402
446
|
}
|
|
403
|
-
var DialogTrigger =
|
|
447
|
+
var DialogTrigger = React10.forwardRef(
|
|
404
448
|
({ onPress, children, ...props }, ref) => {
|
|
405
449
|
const { onOpenChange } = useDialog();
|
|
406
|
-
return /* @__PURE__ */
|
|
450
|
+
return /* @__PURE__ */ jsx11(Pressable, { ref, onPress: (e) => {
|
|
451
|
+
var _a;
|
|
407
452
|
onOpenChange(true);
|
|
408
453
|
onPress == null ? void 0 : onPress(e);
|
|
454
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
409
455
|
}, ...props, children });
|
|
410
456
|
}
|
|
411
457
|
);
|
|
412
458
|
DialogTrigger.displayName = "DialogTrigger";
|
|
413
|
-
var DialogContent =
|
|
459
|
+
var DialogContent = React10.forwardRef(
|
|
414
460
|
({ className, children, ...props }, ref) => {
|
|
415
461
|
const { open, onOpenChange } = useDialog();
|
|
416
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ jsx11(
|
|
417
463
|
Modal,
|
|
418
464
|
{
|
|
419
465
|
visible: open,
|
|
420
466
|
transparent: true,
|
|
421
467
|
animationType: "fade",
|
|
422
468
|
onRequestClose: () => onOpenChange(false),
|
|
423
|
-
children: /* @__PURE__ */
|
|
424
|
-
|
|
469
|
+
children: /* @__PURE__ */ jsx11(View, { ...{ className: "flex-1 items-center justify-center bg-black/80" }, children: /* @__PURE__ */ jsx11(
|
|
470
|
+
View,
|
|
425
471
|
{
|
|
426
472
|
ref,
|
|
427
473
|
...{ className: cn("w-full max-w-lg rounded-xl border border-border bg-background p-6 shadow-lg sm:rounded-[1rem]", className) },
|
|
@@ -434,49 +480,51 @@ var DialogContent = React9.forwardRef(
|
|
|
434
480
|
}
|
|
435
481
|
);
|
|
436
482
|
DialogContent.displayName = "DialogContent";
|
|
437
|
-
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */
|
|
483
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx11(View, { ...{ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, ...props });
|
|
438
484
|
DialogHeader.displayName = "DialogHeader";
|
|
439
|
-
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
485
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx11(View, { ...{ className: cn("flex flex-row flex-wrap items-center justify-end space-x-2 mt-4", className) }, ...props });
|
|
440
486
|
DialogFooter.displayName = "DialogFooter";
|
|
441
|
-
var DialogTitle =
|
|
442
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
487
|
+
var DialogTitle = React10.forwardRef(
|
|
488
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx11(Text, { ref, ...{ className: cn("text-lg font-semibold leading-none tracking-tight text-foreground", className) }, ...props })
|
|
443
489
|
);
|
|
444
490
|
DialogTitle.displayName = "DialogTitle";
|
|
445
|
-
var DialogDescription =
|
|
446
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
491
|
+
var DialogDescription = React10.forwardRef(
|
|
492
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx11(Text, { ref, ...{ className: cn("text-sm text-muted-foreground", className) }, ...props })
|
|
447
493
|
);
|
|
448
494
|
DialogDescription.displayName = "DialogDescription";
|
|
449
495
|
|
|
450
496
|
// src/components/ui/dropdown-menu.tsx
|
|
451
|
-
import * as
|
|
452
|
-
import { Modal as Modal2
|
|
453
|
-
import { jsx as
|
|
454
|
-
var DropdownContext =
|
|
497
|
+
import * as React11 from "react";
|
|
498
|
+
import { Modal as Modal2 } from "react-native";
|
|
499
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
500
|
+
var DropdownContext = React11.createContext(null);
|
|
455
501
|
function DropdownMenu({ children }) {
|
|
456
|
-
const [open, setOpen] =
|
|
457
|
-
return /* @__PURE__ */
|
|
502
|
+
const [open, setOpen] = React11.useState(false);
|
|
503
|
+
return /* @__PURE__ */ jsx12(DropdownContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ jsx12(View, { ...{ className: "relative" }, children }) });
|
|
458
504
|
}
|
|
459
|
-
var DropdownMenuTrigger =
|
|
505
|
+
var DropdownMenuTrigger = React11.forwardRef(
|
|
460
506
|
({ onPress, children, ...props }, ref) => {
|
|
461
|
-
const context =
|
|
462
|
-
return /* @__PURE__ */
|
|
507
|
+
const context = React11.useContext(DropdownContext);
|
|
508
|
+
return /* @__PURE__ */ jsx12(Pressable, { ref, onPress: (e) => {
|
|
509
|
+
var _a;
|
|
463
510
|
context == null ? void 0 : context.setOpen(!context.open);
|
|
464
511
|
onPress == null ? void 0 : onPress(e);
|
|
512
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
465
513
|
}, ...props, children });
|
|
466
514
|
}
|
|
467
515
|
);
|
|
468
516
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
469
|
-
var DropdownMenuContent =
|
|
517
|
+
var DropdownMenuContent = React11.forwardRef(
|
|
470
518
|
({ className, children, ...props }, ref) => {
|
|
471
|
-
const context =
|
|
519
|
+
const context = React11.useContext(DropdownContext);
|
|
472
520
|
if (!(context == null ? void 0 : context.open)) return null;
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
|
|
521
|
+
return /* @__PURE__ */ jsx12(Modal2, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ jsx12(
|
|
522
|
+
Pressable,
|
|
475
523
|
{
|
|
476
524
|
onPress: () => context.setOpen(false),
|
|
477
525
|
...{ className: "flex-1 bg-black/10 justify-end sm:justify-center items-center" },
|
|
478
|
-
children: /* @__PURE__ */
|
|
479
|
-
|
|
526
|
+
children: /* @__PURE__ */ jsx12(Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx12(
|
|
527
|
+
View,
|
|
480
528
|
{
|
|
481
529
|
ref,
|
|
482
530
|
...{ className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 zoom-in-95", className) },
|
|
@@ -489,64 +537,68 @@ var DropdownMenuContent = React10.forwardRef(
|
|
|
489
537
|
}
|
|
490
538
|
);
|
|
491
539
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
492
|
-
var DropdownMenuItem =
|
|
540
|
+
var DropdownMenuItem = React11.forwardRef(
|
|
493
541
|
({ className, textClassName, onPress, children, ...props }, ref) => {
|
|
494
|
-
const context =
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
|
|
542
|
+
const context = React11.useContext(DropdownContext);
|
|
543
|
+
return /* @__PURE__ */ jsx12(
|
|
544
|
+
Pressable,
|
|
497
545
|
{
|
|
498
546
|
ref,
|
|
499
547
|
onPress: (e) => {
|
|
548
|
+
var _a;
|
|
500
549
|
context == null ? void 0 : context.setOpen(false);
|
|
501
550
|
onPress == null ? void 0 : onPress(e);
|
|
551
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
502
552
|
},
|
|
503
553
|
...{ className: cn("relative flex-row items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent", className) },
|
|
504
554
|
...props,
|
|
505
|
-
children: typeof children === "string" ? /* @__PURE__ */
|
|
555
|
+
children: typeof children === "string" ? /* @__PURE__ */ jsx12(Text, { ...{ className: cn("text-foreground", textClassName) }, children }) : children
|
|
506
556
|
}
|
|
507
557
|
);
|
|
508
558
|
}
|
|
509
559
|
);
|
|
510
560
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
511
|
-
var DropdownMenuLabel =
|
|
512
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
561
|
+
var DropdownMenuLabel = React11.forwardRef(
|
|
562
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12(Text, { ref, ...{ className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", className) }, ...props })
|
|
513
563
|
);
|
|
514
564
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
515
|
-
var DropdownMenuSeparator =
|
|
516
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
565
|
+
var DropdownMenuSeparator = React11.forwardRef(
|
|
566
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12(View, { ref, ...{ className: cn("-mx-1 my-1 h-px bg-muted", className) }, ...props })
|
|
517
567
|
);
|
|
518
568
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
519
569
|
|
|
520
570
|
// src/components/ui/popover.tsx
|
|
521
|
-
import * as
|
|
522
|
-
import { Modal as Modal3
|
|
523
|
-
import { jsx as
|
|
524
|
-
var PopoverContext =
|
|
571
|
+
import * as React12 from "react";
|
|
572
|
+
import { Modal as Modal3 } from "react-native";
|
|
573
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
574
|
+
var PopoverContext = React12.createContext(null);
|
|
525
575
|
function Popover({ children }) {
|
|
526
|
-
const [open, setOpen] =
|
|
527
|
-
return /* @__PURE__ */
|
|
576
|
+
const [open, setOpen] = React12.useState(false);
|
|
577
|
+
return /* @__PURE__ */ jsx13(PopoverContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ jsx13(View, { ...{ className: "relative" }, children }) });
|
|
528
578
|
}
|
|
529
|
-
var PopoverTrigger =
|
|
579
|
+
var PopoverTrigger = React12.forwardRef(
|
|
530
580
|
({ onPress, children, ...props }, ref) => {
|
|
531
|
-
const context =
|
|
532
|
-
return /* @__PURE__ */
|
|
581
|
+
const context = React12.useContext(PopoverContext);
|
|
582
|
+
return /* @__PURE__ */ jsx13(Pressable, { ref, onPress: (e) => {
|
|
583
|
+
var _a;
|
|
533
584
|
context == null ? void 0 : context.setOpen(!context.open);
|
|
534
585
|
onPress == null ? void 0 : onPress(e);
|
|
586
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
535
587
|
}, ...props, children });
|
|
536
588
|
}
|
|
537
589
|
);
|
|
538
590
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
539
|
-
var PopoverContent =
|
|
591
|
+
var PopoverContent = React12.forwardRef(
|
|
540
592
|
({ className, children, ...props }, ref) => {
|
|
541
|
-
const context =
|
|
593
|
+
const context = React12.useContext(PopoverContext);
|
|
542
594
|
if (!(context == null ? void 0 : context.open)) return null;
|
|
543
|
-
return /* @__PURE__ */
|
|
544
|
-
|
|
595
|
+
return /* @__PURE__ */ jsx13(Modal3, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ jsx13(
|
|
596
|
+
Pressable,
|
|
545
597
|
{
|
|
546
598
|
onPress: () => context.setOpen(false),
|
|
547
599
|
...{ className: "flex-1 bg-transparent justify-center items-center" },
|
|
548
|
-
children: /* @__PURE__ */
|
|
549
|
-
|
|
600
|
+
children: /* @__PURE__ */ jsx13(Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx13(
|
|
601
|
+
View,
|
|
550
602
|
{
|
|
551
603
|
ref,
|
|
552
604
|
...{ className: cn("z-50 w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none", className) },
|
|
@@ -559,6 +611,175 @@ var PopoverContent = React11.forwardRef(
|
|
|
559
611
|
}
|
|
560
612
|
);
|
|
561
613
|
PopoverContent.displayName = "PopoverContent";
|
|
614
|
+
|
|
615
|
+
// src/components/ui/sidebar.tsx
|
|
616
|
+
import * as React13 from "react";
|
|
617
|
+
import { jsx as jsx14, jsxs } from "react/jsx-runtime";
|
|
618
|
+
var SidebarContext = React13.createContext(null);
|
|
619
|
+
function useSidebar() {
|
|
620
|
+
const context = React13.useContext(SidebarContext);
|
|
621
|
+
if (!context) {
|
|
622
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
623
|
+
}
|
|
624
|
+
return context;
|
|
625
|
+
}
|
|
626
|
+
var Sidebar = React13.forwardRef(
|
|
627
|
+
({ className, isOpen = true, onOpenChange, side = "left", children, ...props }, ref) => {
|
|
628
|
+
const [internalOpen, setInternalOpen] = React13.useState(isOpen);
|
|
629
|
+
const isControlled = onOpenChange !== void 0;
|
|
630
|
+
const openState = isControlled ? isOpen : internalOpen;
|
|
631
|
+
const handleToggle = React13.useCallback((open) => {
|
|
632
|
+
if (isControlled) {
|
|
633
|
+
onOpenChange(open);
|
|
634
|
+
} else {
|
|
635
|
+
setInternalOpen(open);
|
|
636
|
+
}
|
|
637
|
+
}, [isControlled, onOpenChange]);
|
|
638
|
+
return /* @__PURE__ */ jsx14(SidebarContext.Provider, { value: { isOpen: openState, setIsOpen: handleToggle }, children: /* @__PURE__ */ jsx14(
|
|
639
|
+
"aside",
|
|
640
|
+
{
|
|
641
|
+
ref,
|
|
642
|
+
"data-state": openState ? "expanded" : "collapsed",
|
|
643
|
+
className: cn(
|
|
644
|
+
"fixed top-4 z-50 hidden h-[calc(100vh-2rem)] flex-col rounded-[24px] border border-sidebar-border bg-sidebar text-sidebar-foreground shadow-lg dark:shadow-[0_8px_32px_rgba(0,0,0,0.3)] transition-all duration-300 ease-[cubic-bezier(0.2,0.8,0.2,1)] md:flex",
|
|
645
|
+
openState ? "overflow-hidden w-[280px]" : "overflow-visible w-[72px]",
|
|
646
|
+
side === "left" ? "left-4" : "right-4",
|
|
647
|
+
className
|
|
648
|
+
),
|
|
649
|
+
...props,
|
|
650
|
+
children
|
|
651
|
+
}
|
|
652
|
+
) });
|
|
653
|
+
}
|
|
654
|
+
);
|
|
655
|
+
Sidebar.displayName = "Sidebar";
|
|
656
|
+
var SidebarHeader = React13.forwardRef(
|
|
657
|
+
({ className, ...props }, ref) => {
|
|
658
|
+
const { isOpen } = useSidebar();
|
|
659
|
+
return /* @__PURE__ */ jsx14(
|
|
660
|
+
"div",
|
|
661
|
+
{
|
|
662
|
+
ref,
|
|
663
|
+
className: cn(
|
|
664
|
+
"flex flex-col border-b border-sidebar-border shrink-0",
|
|
665
|
+
isOpen ? "px-4 pb-4 pt-5" : "px-3.5 py-4",
|
|
666
|
+
className
|
|
667
|
+
),
|
|
668
|
+
...props
|
|
669
|
+
}
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
674
|
+
var SidebarContent = React13.forwardRef(
|
|
675
|
+
({ className, ...props }, ref) => {
|
|
676
|
+
const { isOpen } = useSidebar();
|
|
677
|
+
return /* @__PURE__ */ jsx14(
|
|
678
|
+
"div",
|
|
679
|
+
{
|
|
680
|
+
ref,
|
|
681
|
+
style: { overflowY: "auto", overflowX: "hidden" },
|
|
682
|
+
className: cn(
|
|
683
|
+
"min-h-0 flex-1",
|
|
684
|
+
isOpen ? "px-3 py-4" : "px-2 py-4 items-center",
|
|
685
|
+
className
|
|
686
|
+
),
|
|
687
|
+
...props
|
|
688
|
+
}
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
);
|
|
692
|
+
SidebarContent.displayName = "SidebarContent";
|
|
693
|
+
var SidebarGroup = React13.forwardRef(
|
|
694
|
+
({ className, ...props }, ref) => {
|
|
695
|
+
return /* @__PURE__ */ jsx14(
|
|
696
|
+
"div",
|
|
697
|
+
{
|
|
698
|
+
ref,
|
|
699
|
+
className: cn("flex flex-col gap-1 w-full", className),
|
|
700
|
+
...props
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
}
|
|
704
|
+
);
|
|
705
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
706
|
+
var SidebarGroupLabel = React13.forwardRef(
|
|
707
|
+
({ className, ...props }, ref) => {
|
|
708
|
+
const { isOpen } = useSidebar();
|
|
709
|
+
if (!isOpen) return null;
|
|
710
|
+
return /* @__PURE__ */ jsx14(
|
|
711
|
+
"div",
|
|
712
|
+
{
|
|
713
|
+
ref,
|
|
714
|
+
className: cn("px-3 mb-1 mt-4 text-[10px] font-bold uppercase tracking-[0.1em] text-sidebar-foreground/50", className),
|
|
715
|
+
...props
|
|
716
|
+
}
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
);
|
|
720
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
721
|
+
var SidebarItem = React13.forwardRef(
|
|
722
|
+
({ className, icon, isActive, label, rightElement, ...props }, ref) => {
|
|
723
|
+
const { isOpen } = useSidebar();
|
|
724
|
+
return /* @__PURE__ */ jsxs(
|
|
725
|
+
"button",
|
|
726
|
+
{
|
|
727
|
+
ref,
|
|
728
|
+
"data-active": isActive,
|
|
729
|
+
className: cn(
|
|
730
|
+
"group relative flex items-center rounded-xl transition-all duration-150 w-full hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
731
|
+
isOpen ? "gap-3 px-3 py-2 justify-start text-sm" : "justify-center p-3 h-11 w-11 mt-1",
|
|
732
|
+
isActive ? "bg-sidebar-accent border border-sidebar-border text-info font-semibold shadow-sm" : "text-sidebar-foreground/70 border border-transparent",
|
|
733
|
+
className
|
|
734
|
+
),
|
|
735
|
+
...props,
|
|
736
|
+
children: [
|
|
737
|
+
/* @__PURE__ */ jsx14("div", { className: cn("shrink-0", isActive ? "text-info" : "text-sidebar-foreground/60 group-hover:text-sidebar-foreground"), children: icon }),
|
|
738
|
+
isOpen && label && /* @__PURE__ */ jsx14("span", { className: cn("truncate flex-1 text-left", isActive ? "font-semibold" : "font-medium"), children: label }),
|
|
739
|
+
isOpen && rightElement && /* @__PURE__ */ jsx14("div", { className: "shrink-0", children: rightElement }),
|
|
740
|
+
!isOpen && label && /* @__PURE__ */ jsxs("div", { className: "absolute left-full ml-4 hidden group-hover:block z-50 px-3 py-1.5 rounded-lg bg-gray-900 text-white dark:bg-gray-100 dark:text-gray-900 text-xs font-medium whitespace-nowrap shadow-xl", children: [
|
|
741
|
+
label,
|
|
742
|
+
/* @__PURE__ */ jsx14("div", { className: "absolute left-0 top-1/2 -translate-x-1 -translate-y-1/2 w-2 h-2 bg-gray-900 dark:bg-gray-100 rotate-45" })
|
|
743
|
+
] })
|
|
744
|
+
]
|
|
745
|
+
}
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
);
|
|
749
|
+
SidebarItem.displayName = "SidebarItem";
|
|
750
|
+
var SidebarFooter = React13.forwardRef(
|
|
751
|
+
({ className, ...props }, ref) => {
|
|
752
|
+
const { isOpen } = useSidebar();
|
|
753
|
+
return /* @__PURE__ */ jsx14(
|
|
754
|
+
"div",
|
|
755
|
+
{
|
|
756
|
+
ref,
|
|
757
|
+
className: cn(
|
|
758
|
+
"shrink-0 border-t border-sidebar-border bg-sidebar-accent/30 backdrop-blur-md",
|
|
759
|
+
isOpen ? "p-4" : "p-3 flex justify-center",
|
|
760
|
+
className
|
|
761
|
+
),
|
|
762
|
+
...props
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
);
|
|
767
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
768
|
+
|
|
769
|
+
// src/components/ui/theme-provider.tsx
|
|
770
|
+
import * as React14 from "react";
|
|
771
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
772
|
+
import { useTheme } from "next-themes";
|
|
773
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
774
|
+
function ThemeProvider({ children, ...props }) {
|
|
775
|
+
React14.useEffect(() => {
|
|
776
|
+
const legacyDarkTheme = ["mid", "night"].join("");
|
|
777
|
+
if (window.localStorage.getItem("theme") === legacyDarkTheme) {
|
|
778
|
+
window.localStorage.setItem("theme", "dark");
|
|
779
|
+
}
|
|
780
|
+
}, []);
|
|
781
|
+
return /* @__PURE__ */ jsx15(NextThemesProvider, { ...props, children });
|
|
782
|
+
}
|
|
562
783
|
export {
|
|
563
784
|
Button,
|
|
564
785
|
Card,
|
|
@@ -586,6 +807,13 @@ export {
|
|
|
586
807
|
PopoverContent,
|
|
587
808
|
PopoverTrigger,
|
|
588
809
|
Progress,
|
|
810
|
+
Sidebar,
|
|
811
|
+
SidebarContent,
|
|
812
|
+
SidebarFooter,
|
|
813
|
+
SidebarGroup,
|
|
814
|
+
SidebarGroupLabel,
|
|
815
|
+
SidebarHeader,
|
|
816
|
+
SidebarItem,
|
|
589
817
|
Skeleton,
|
|
590
818
|
Switch,
|
|
591
819
|
Table,
|
|
@@ -598,8 +826,11 @@ export {
|
|
|
598
826
|
TabsContent,
|
|
599
827
|
TabsList,
|
|
600
828
|
TabsTrigger,
|
|
829
|
+
ThemeProvider,
|
|
601
830
|
buttonTextVariants,
|
|
602
831
|
buttonVariants,
|
|
603
|
-
cn
|
|
832
|
+
cn,
|
|
833
|
+
useSidebar,
|
|
834
|
+
useTheme
|
|
604
835
|
};
|
|
605
836
|
//# sourceMappingURL=index.mjs.map
|