@amazecontinuityprojects/amazeui 1.0.0 → 1.0.2

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.js CHANGED
@@ -74,10 +74,9 @@ __export(index_exports, {
74
74
  });
75
75
  module.exports = __toCommonJS(index_exports);
76
76
 
77
- // src/components/ui/button.tsx
77
+ // src/lib/primitives.tsx
78
78
  var React = __toESM(require("react"));
79
79
  var import_react_native = require("react-native");
80
- var import_class_variance_authority = require("class-variance-authority");
81
80
 
82
81
  // src/lib/utils.ts
83
82
  var import_clsx = require("clsx");
@@ -86,8 +85,48 @@ function cn(...inputs) {
86
85
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
87
86
  }
88
87
 
89
- // src/components/ui/button.tsx
88
+ // src/lib/primitives.tsx
90
89
  var import_jsx_runtime = require("react/jsx-runtime");
90
+ var View = React.forwardRef(({ className, style, ...props }, ref) => {
91
+ if (import_react_native.Platform.OS === "web") {
92
+ const C = "div";
93
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(C, { ref, className: cn("flex flex-col items-stretch justify-start min-w-0 min-h-0 relative", className), style, ...props });
94
+ }
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.View, { ref, className, style, ...props });
96
+ });
97
+ View.displayName = "View";
98
+ var Text = React.forwardRef(({ className, style, ...props }, ref) => {
99
+ if (import_react_native.Platform.OS === "web") {
100
+ const C = "span";
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(C, { ref, className: cn("inline m-0 p-0", className), style, ...props });
102
+ }
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { ref, className, style, ...props });
104
+ });
105
+ Text.displayName = "Text";
106
+ var Pressable = React.forwardRef(({ className, style, onPress, onClick, ...props }, ref) => {
107
+ if (import_react_native.Platform.OS === "web") {
108
+ const C = "button";
109
+ return /* @__PURE__ */ (0, import_jsx_runtime.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 });
110
+ }
111
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Pressable, { ref, onPress: onPress || onClick, className, style, ...props });
112
+ });
113
+ Pressable.displayName = "Pressable";
114
+ var TextInput = React.forwardRef(({ className, style, onChangeText, onChange, value, ...props }, ref) => {
115
+ if (import_react_native.Platform.OS === "web") {
116
+ const C = "input";
117
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(C, { ref, value, onChange: (e) => {
118
+ onChangeText == null ? void 0 : onChangeText(e.target.value);
119
+ onChange == null ? void 0 : onChange(e);
120
+ }, className, style: { ...style }, ...props });
121
+ }
122
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.TextInput, { ref, value, onChangeText, onChange, className, style, ...props });
123
+ });
124
+ TextInput.displayName = "TextInput";
125
+
126
+ // src/components/ui/button.tsx
127
+ var React2 = __toESM(require("react"));
128
+ var import_class_variance_authority = require("class-variance-authority");
129
+ var import_jsx_runtime2 = require("react/jsx-runtime");
91
130
  var buttonVariants = (0, import_class_variance_authority.cva)(
92
131
  "flex flex-row items-center justify-center gap-2 rounded-md font-medium transition-all",
93
132
  {
@@ -131,15 +170,19 @@ var buttonTextVariants = (0, import_class_variance_authority.cva)(
131
170
  }
132
171
  }
133
172
  );
134
- var Button = React.forwardRef(
135
- ({ className, variant, size, children, textClassName, ...props }, ref) => {
136
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
- import_react_native.Pressable,
173
+ var Button = React2.forwardRef(
174
+ ({ className, variant, size, children, textClassName, onClick, onPress, ...props }, ref) => {
175
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
176
+ Pressable,
138
177
  {
178
+ onPress: onPress || onClick,
139
179
  ref,
140
180
  ...{ className: cn(buttonVariants({ variant, size }), className) },
141
181
  ...props,
142
- children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Text, { ...{ className: cn(buttonTextVariants({ variant }), textClassName) }, children }) : children
182
+ children: React2.Children.map(
183
+ children,
184
+ (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { ...{ className: cn(buttonTextVariants({ variant }), textClassName) }, children: child }) : child
185
+ )
143
186
  }
144
187
  );
145
188
  }
@@ -147,23 +190,22 @@ var Button = React.forwardRef(
147
190
  Button.displayName = "Button";
148
191
 
149
192
  // src/components/ui/card.tsx
150
- var React2 = __toESM(require("react"));
151
- var import_react_native2 = require("react-native");
152
- var import_jsx_runtime2 = require("react/jsx-runtime");
153
- var Card = React2.forwardRef(
154
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
155
- import_react_native2.View,
193
+ var React3 = __toESM(require("react"));
194
+ var import_jsx_runtime3 = require("react/jsx-runtime");
195
+ var Card = React3.forwardRef(
196
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
197
+ View,
156
198
  {
157
199
  ref,
158
- ...{ className: cn("rounded-xl border border-border bg-card shadow-sm", className) },
200
+ ...{ className: cn("rounded-xl border border-border bg-card/60 backdrop-blur-xl shadow-sm dark:bg-card/40", className) },
159
201
  ...props
160
202
  }
161
203
  )
162
204
  );
163
205
  Card.displayName = "Card";
164
- var CardHeader = React2.forwardRef(
165
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
166
- import_react_native2.View,
206
+ var CardHeader = React3.forwardRef(
207
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
208
+ View,
167
209
  {
168
210
  ref,
169
211
  ...{ className: cn("flex flex-col space-y-1.5 p-6", className) },
@@ -172,9 +214,9 @@ var CardHeader = React2.forwardRef(
172
214
  )
173
215
  );
174
216
  CardHeader.displayName = "CardHeader";
175
- var CardTitle = React2.forwardRef(
176
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
177
- import_react_native2.Text,
217
+ var CardTitle = React3.forwardRef(
218
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
219
+ Text,
178
220
  {
179
221
  ref,
180
222
  ...{ className: cn("font-semibold text-lg leading-none tracking-tight text-foreground", className) },
@@ -183,9 +225,9 @@ var CardTitle = React2.forwardRef(
183
225
  )
184
226
  );
185
227
  CardTitle.displayName = "CardTitle";
186
- var CardDescription = React2.forwardRef(
187
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
188
- import_react_native2.Text,
228
+ var CardDescription = React3.forwardRef(
229
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
230
+ Text,
189
231
  {
190
232
  ref,
191
233
  ...{ className: cn("text-sm text-muted-foreground", className) },
@@ -194,13 +236,13 @@ var CardDescription = React2.forwardRef(
194
236
  )
195
237
  );
196
238
  CardDescription.displayName = "CardDescription";
197
- var CardContent = React2.forwardRef(
198
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { ref, ...{ className: cn("p-6 pt-0", className) }, ...props })
239
+ var CardContent = React3.forwardRef(
240
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(View, { ref, ...{ className: cn("p-6 pt-0", className) }, ...props })
199
241
  );
200
242
  CardContent.displayName = "CardContent";
201
- var CardFooter = React2.forwardRef(
202
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
203
- import_react_native2.View,
243
+ var CardFooter = React3.forwardRef(
244
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
245
+ View,
204
246
  {
205
247
  ref,
206
248
  ...{ className: cn("flex flex-row items-center p-6 pt-0", className) },
@@ -211,13 +253,12 @@ var CardFooter = React2.forwardRef(
211
253
  CardFooter.displayName = "CardFooter";
212
254
 
213
255
  // src/components/ui/input.tsx
214
- var React3 = __toESM(require("react"));
215
- var import_react_native3 = require("react-native");
216
- var import_jsx_runtime3 = require("react/jsx-runtime");
217
- var Input = React3.forwardRef(
256
+ var React4 = __toESM(require("react"));
257
+ var import_jsx_runtime4 = require("react/jsx-runtime");
258
+ var Input = React4.forwardRef(
218
259
  ({ className, ...props }, ref) => {
219
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
220
- import_react_native3.TextInput,
260
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
261
+ TextInput,
221
262
  {
222
263
  ref,
223
264
  placeholderTextColor: "#a3a3a3",
@@ -230,10 +271,9 @@ var Input = React3.forwardRef(
230
271
  Input.displayName = "Input";
231
272
 
232
273
  // src/components/ui/label.tsx
233
- var React4 = __toESM(require("react"));
234
- var import_react_native4 = require("react-native");
274
+ var React5 = __toESM(require("react"));
235
275
  var import_class_variance_authority2 = require("class-variance-authority");
236
- var import_jsx_runtime4 = require("react/jsx-runtime");
276
+ var import_jsx_runtime5 = require("react/jsx-runtime");
237
277
  var labelVariants = (0, import_class_variance_authority2.cva)(
238
278
  "text-sm font-medium leading-none text-foreground peer-disabled:opacity-70",
239
279
  {
@@ -241,9 +281,9 @@ var labelVariants = (0, import_class_variance_authority2.cva)(
241
281
  defaultVariants: {}
242
282
  }
243
283
  );
244
- var Label = React4.forwardRef(
245
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
246
- import_react_native4.Text,
284
+ var Label = React5.forwardRef(
285
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
286
+ Text,
247
287
  {
248
288
  ref,
249
289
  ...{ className: cn(labelVariants(), className) },
@@ -254,11 +294,10 @@ var Label = React4.forwardRef(
254
294
  Label.displayName = "Label";
255
295
 
256
296
  // src/components/ui/skeleton.tsx
257
- var import_react_native5 = require("react-native");
258
- var import_jsx_runtime5 = require("react/jsx-runtime");
297
+ var import_jsx_runtime6 = require("react/jsx-runtime");
259
298
  function Skeleton({ className, ...props }) {
260
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
261
- import_react_native5.View,
299
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
300
+ View,
262
301
  {
263
302
  ...{ className: cn("animate-pulse rounded-md bg-primary/10", className) },
264
303
  ...props
@@ -267,14 +306,20 @@ function Skeleton({ className, ...props }) {
267
306
  }
268
307
 
269
308
  // src/components/ui/switch.tsx
270
- var React5 = __toESM(require("react"));
271
- var import_react_native6 = require("react-native");
272
- var import_jsx_runtime6 = require("react/jsx-runtime");
273
- var Switch = React5.forwardRef(
274
- ({ className, ...props }, ref) => {
275
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
276
- import_react_native6.Switch,
309
+ var React6 = __toESM(require("react"));
310
+ var import_react_native2 = require("react-native");
311
+ var import_jsx_runtime7 = require("react/jsx-runtime");
312
+ var Switch = React6.forwardRef(
313
+ ({ className, onCheckedChange, onChange, onValueChange, checked, value, ...props }, ref) => {
314
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
315
+ import_react_native2.Switch,
277
316
  {
317
+ value: checked !== void 0 ? checked : value,
318
+ onValueChange: (val) => {
319
+ onValueChange == null ? void 0 : onValueChange(val);
320
+ onCheckedChange == null ? void 0 : onCheckedChange(val);
321
+ onChange == null ? void 0 : onChange(val);
322
+ },
278
323
  ref,
279
324
  ...props
280
325
  }
@@ -284,20 +329,19 @@ var Switch = React5.forwardRef(
284
329
  Switch.displayName = "Switch";
285
330
 
286
331
  // src/components/ui/progress.tsx
287
- var React6 = __toESM(require("react"));
288
- var import_react_native7 = require("react-native");
289
- var import_jsx_runtime7 = require("react/jsx-runtime");
290
- var Progress = React6.forwardRef(
332
+ var React7 = __toESM(require("react"));
333
+ var import_jsx_runtime8 = require("react/jsx-runtime");
334
+ var Progress = React7.forwardRef(
291
335
  ({ className, value = 0, ...props }, ref) => {
292
336
  const boundedValue = Math.min(100, Math.max(0, value || 0));
293
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
294
- import_react_native7.View,
337
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
338
+ View,
295
339
  {
296
340
  ref,
297
341
  ...{ className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className) },
298
342
  ...props,
299
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
300
- import_react_native7.View,
343
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
344
+ View,
301
345
  {
302
346
  ...{ className: "h-full bg-primary flex-1 transition-all" },
303
347
  style: { width: `${boundedValue}%` }
@@ -310,32 +354,31 @@ var Progress = React6.forwardRef(
310
354
  Progress.displayName = "Progress";
311
355
 
312
356
  // src/components/ui/tabs.tsx
313
- var React7 = __toESM(require("react"));
314
- var import_react_native8 = require("react-native");
315
- var import_jsx_runtime8 = require("react/jsx-runtime");
316
- var TabsContext = React7.createContext(null);
357
+ var React8 = __toESM(require("react"));
358
+ var import_jsx_runtime9 = require("react/jsx-runtime");
359
+ var TabsContext = React8.createContext(null);
317
360
  function Tabs({ value: controlledValue, defaultValue, onValueChange, className, children, ...props }) {
318
- const [uncontrolledValue, setUncontrolledValue] = React7.useState(defaultValue || "");
361
+ const [uncontrolledValue, setUncontrolledValue] = React8.useState(defaultValue || "");
319
362
  const value = controlledValue !== void 0 ? controlledValue : uncontrolledValue;
320
- const handleValueChange = React7.useCallback(
363
+ const handleValueChange = React8.useCallback(
321
364
  (newValue) => {
322
365
  setUncontrolledValue(newValue);
323
366
  onValueChange == null ? void 0 : onValueChange(newValue);
324
367
  },
325
368
  [onValueChange]
326
369
  );
327
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TabsContext.Provider, { value: { value, onValueChange: handleValueChange }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.View, { ...{ className }, ...props, children }) });
370
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TabsContext.Provider, { value: { value, onValueChange: handleValueChange }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(View, { ...{ className }, ...props, children }) });
328
371
  }
329
372
  function useTabsContext() {
330
- const context = React7.useContext(TabsContext);
373
+ const context = React8.useContext(TabsContext);
331
374
  if (!context) {
332
375
  throw new Error("Tabs compound components must be rendered within the Tabs component");
333
376
  }
334
377
  return context;
335
378
  }
336
- var TabsList = React7.forwardRef(
337
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
338
- import_react_native8.View,
379
+ var TabsList = React8.forwardRef(
380
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
381
+ View,
339
382
  {
340
383
  ref,
341
384
  ...{ className: cn("flex-row items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className) },
@@ -344,12 +387,12 @@ var TabsList = React7.forwardRef(
344
387
  )
345
388
  );
346
389
  TabsList.displayName = "TabsList";
347
- var TabsTrigger = React7.forwardRef(
390
+ var TabsTrigger = React8.forwardRef(
348
391
  ({ className, textClassName, value, children, ...props }, ref) => {
349
392
  const context = useTabsContext();
350
393
  const isSelected = context.value === value;
351
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
352
- import_react_native8.Pressable,
394
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
395
+ Pressable,
353
396
  {
354
397
  ref,
355
398
  onPress: () => context.onValueChange(value),
@@ -359,20 +402,20 @@ var TabsTrigger = React7.forwardRef(
359
402
  className
360
403
  ) },
361
404
  ...props,
362
- children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native8.Text, { ...{ className: cn("text-sm font-medium transition-all", isSelected ? "text-foreground" : "text-muted-foreground", textClassName) }, children }) : children
405
+ children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Text, { ...{ className: cn("text-sm font-medium transition-all", isSelected ? "text-foreground" : "text-muted-foreground", textClassName) }, children }) : children
363
406
  }
364
407
  );
365
408
  }
366
409
  );
367
410
  TabsTrigger.displayName = "TabsTrigger";
368
- var TabsContent = React7.forwardRef(
411
+ var TabsContent = React8.forwardRef(
369
412
  ({ className, value, children, ...props }, ref) => {
370
413
  const context = useTabsContext();
371
414
  if (context.value !== value) {
372
415
  return null;
373
416
  }
374
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
375
- import_react_native8.View,
417
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
418
+ View,
376
419
  {
377
420
  ref,
378
421
  ...{ 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) },
@@ -385,12 +428,11 @@ var TabsContent = React7.forwardRef(
385
428
  TabsContent.displayName = "TabsContent";
386
429
 
387
430
  // src/components/ui/table.tsx
388
- var React8 = __toESM(require("react"));
389
- var import_react_native9 = require("react-native");
390
- var import_jsx_runtime9 = require("react/jsx-runtime");
391
- var Table = React8.forwardRef(
392
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.View, { ...{ className: "w-full overflow-hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
393
- import_react_native9.View,
431
+ var React9 = __toESM(require("react"));
432
+ var import_jsx_runtime10 = require("react/jsx-runtime");
433
+ var Table = React9.forwardRef(
434
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(View, { ...{ className: "w-full overflow-hidden" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
435
+ View,
394
436
  {
395
437
  ref,
396
438
  ...{ className: cn("w-full text-sm", className) },
@@ -399,13 +441,13 @@ var Table = React8.forwardRef(
399
441
  ) })
400
442
  );
401
443
  Table.displayName = "Table";
402
- var TableHeader = React8.forwardRef(
403
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.View, { ref, ...{ className: cn("flex flex-row items-center border-b border-border bg-muted/50", className) }, ...props })
444
+ var TableHeader = React9.forwardRef(
445
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(View, { ref, ...{ className: cn("flex flex-row items-center border-b border-border bg-muted/50", className) }, ...props })
404
446
  );
405
447
  TableHeader.displayName = "TableHeader";
406
- var TableBody = React8.forwardRef(
407
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
408
- import_react_native9.View,
448
+ var TableBody = React9.forwardRef(
449
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
450
+ View,
409
451
  {
410
452
  ref,
411
453
  ...{ className: cn("flex flex-col [&_>_view:last-child]:border-0", className) },
@@ -414,9 +456,9 @@ var TableBody = React8.forwardRef(
414
456
  )
415
457
  );
416
458
  TableBody.displayName = "TableBody";
417
- var TableRow = React8.forwardRef(
418
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
419
- import_react_native9.View,
459
+ var TableRow = React9.forwardRef(
460
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
461
+ View,
420
462
  {
421
463
  ref,
422
464
  ...{ className: cn(
@@ -428,9 +470,9 @@ var TableRow = React8.forwardRef(
428
470
  )
429
471
  );
430
472
  TableRow.displayName = "TableRow";
431
- var TableHead = React8.forwardRef(
432
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
433
- import_react_native9.View,
473
+ var TableHead = React9.forwardRef(
474
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
475
+ View,
434
476
  {
435
477
  ref,
436
478
  ...{ className: cn(
@@ -438,66 +480,68 @@ var TableHead = React8.forwardRef(
438
480
  className
439
481
  ) },
440
482
  ...props,
441
- children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.Text, { ...{ className: "font-semibold text-muted-foreground text-sm" }, children }) : children
483
+ children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { ...{ className: "font-semibold text-muted-foreground text-sm" }, children }) : children
442
484
  }
443
485
  )
444
486
  );
445
487
  TableHead.displayName = "TableHead";
446
- var TableCell = React8.forwardRef(
447
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
448
- import_react_native9.View,
488
+ var TableCell = React9.forwardRef(
489
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
490
+ View,
449
491
  {
450
492
  ref,
451
493
  ...{ className: cn("p-4 align-middle", className) },
452
494
  ...props,
453
- children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native9.Text, { ...{ className: "text-foreground text-sm" }, children }) : children
495
+ children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text, { ...{ className: "text-foreground text-sm" }, children }) : children
454
496
  }
455
497
  )
456
498
  );
457
499
  TableCell.displayName = "TableCell";
458
500
 
459
501
  // src/components/ui/dialog.tsx
460
- var React9 = __toESM(require("react"));
461
- var import_react_native10 = require("react-native");
462
- var import_jsx_runtime10 = require("react/jsx-runtime");
463
- var DialogContext = React9.createContext(null);
502
+ var React10 = __toESM(require("react"));
503
+ var import_react_native3 = require("react-native");
504
+ var import_jsx_runtime11 = require("react/jsx-runtime");
505
+ var DialogContext = React10.createContext(null);
464
506
  function useDialog() {
465
- const context = React9.useContext(DialogContext);
507
+ const context = React10.useContext(DialogContext);
466
508
  if (!context) throw new Error("Dialog components must be used within a Dialog");
467
509
  return context;
468
510
  }
469
511
  function Dialog({ open = false, onOpenChange, children, ...props }) {
470
- const [isOpen, setIsOpen] = React9.useState(open);
512
+ const [isOpen, setIsOpen] = React10.useState(open);
471
513
  const isControlled = onOpenChange !== void 0;
472
514
  const currentOpen = isControlled ? open : isOpen;
473
- const setCurrentOpen = React9.useCallback((val) => {
515
+ const setCurrentOpen = React10.useCallback((val) => {
474
516
  if (!isControlled) setIsOpen(val);
475
517
  onOpenChange == null ? void 0 : onOpenChange(val);
476
518
  }, [isControlled, onOpenChange]);
477
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DialogContext.Provider, { value: { open: currentOpen, onOpenChange: setCurrentOpen }, children });
519
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogContext.Provider, { value: { open: currentOpen, onOpenChange: setCurrentOpen }, children });
478
520
  }
479
- var DialogTrigger = React9.forwardRef(
521
+ var DialogTrigger = React10.forwardRef(
480
522
  ({ onPress, children, ...props }, ref) => {
481
523
  const { onOpenChange } = useDialog();
482
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.Pressable, { ref, onPress: (e) => {
524
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Pressable, { ref, onPress: (e) => {
525
+ var _a;
483
526
  onOpenChange(true);
484
527
  onPress == null ? void 0 : onPress(e);
528
+ (_a = props.onClick) == null ? void 0 : _a.call(props, e);
485
529
  }, ...props, children });
486
530
  }
487
531
  );
488
532
  DialogTrigger.displayName = "DialogTrigger";
489
- var DialogContent = React9.forwardRef(
533
+ var DialogContent = React10.forwardRef(
490
534
  ({ className, children, ...props }, ref) => {
491
535
  const { open, onOpenChange } = useDialog();
492
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
493
- import_react_native10.Modal,
536
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
537
+ import_react_native3.Modal,
494
538
  {
495
539
  visible: open,
496
540
  transparent: true,
497
541
  animationType: "fade",
498
542
  onRequestClose: () => onOpenChange(false),
499
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { ...{ className: "flex-1 items-center justify-center bg-black/80" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
500
- import_react_native10.View,
543
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(View, { ...{ className: "flex-1 items-center justify-center bg-black/80" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
544
+ View,
501
545
  {
502
546
  ref,
503
547
  ...{ className: cn("w-full max-w-lg rounded-xl border border-border bg-background p-6 shadow-lg sm:rounded-[1rem]", className) },
@@ -510,49 +554,51 @@ var DialogContent = React9.forwardRef(
510
554
  }
511
555
  );
512
556
  DialogContent.displayName = "DialogContent";
513
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { ...{ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, ...props });
557
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(View, { ...{ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, ...props });
514
558
  DialogHeader.displayName = "DialogHeader";
515
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.View, { ...{ className: cn("flex flex-row flex-wrap items-center justify-end space-x-2 mt-4", className) }, ...props });
559
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(View, { ...{ className: cn("flex flex-row flex-wrap items-center justify-end space-x-2 mt-4", className) }, ...props });
516
560
  DialogFooter.displayName = "DialogFooter";
517
- var DialogTitle = React9.forwardRef(
518
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.Text, { ref, ...{ className: cn("text-lg font-semibold leading-none tracking-tight text-foreground", className) }, ...props })
561
+ var DialogTitle = React10.forwardRef(
562
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { ref, ...{ className: cn("text-lg font-semibold leading-none tracking-tight text-foreground", className) }, ...props })
519
563
  );
520
564
  DialogTitle.displayName = "DialogTitle";
521
- var DialogDescription = React9.forwardRef(
522
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native10.Text, { ref, ...{ className: cn("text-sm text-muted-foreground", className) }, ...props })
565
+ var DialogDescription = React10.forwardRef(
566
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { ref, ...{ className: cn("text-sm text-muted-foreground", className) }, ...props })
523
567
  );
524
568
  DialogDescription.displayName = "DialogDescription";
525
569
 
526
570
  // src/components/ui/dropdown-menu.tsx
527
- var React10 = __toESM(require("react"));
528
- var import_react_native11 = require("react-native");
529
- var import_jsx_runtime11 = require("react/jsx-runtime");
530
- var DropdownContext = React10.createContext(null);
571
+ var React11 = __toESM(require("react"));
572
+ var import_react_native4 = require("react-native");
573
+ var import_jsx_runtime12 = require("react/jsx-runtime");
574
+ var DropdownContext = React11.createContext(null);
531
575
  function DropdownMenu({ children }) {
532
- const [open, setOpen] = React10.useState(false);
533
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { ...{ className: "relative" }, children }) });
576
+ const [open, setOpen] = React11.useState(false);
577
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(View, { ...{ className: "relative" }, children }) });
534
578
  }
535
- var DropdownMenuTrigger = React10.forwardRef(
579
+ var DropdownMenuTrigger = React11.forwardRef(
536
580
  ({ onPress, children, ...props }, ref) => {
537
- const context = React10.useContext(DropdownContext);
538
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Pressable, { ref, onPress: (e) => {
581
+ const context = React11.useContext(DropdownContext);
582
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Pressable, { ref, onPress: (e) => {
583
+ var _a;
539
584
  context == null ? void 0 : context.setOpen(!context.open);
540
585
  onPress == null ? void 0 : onPress(e);
586
+ (_a = props.onClick) == null ? void 0 : _a.call(props, e);
541
587
  }, ...props, children });
542
588
  }
543
589
  );
544
590
  DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
545
- var DropdownMenuContent = React10.forwardRef(
591
+ var DropdownMenuContent = React11.forwardRef(
546
592
  ({ className, children, ...props }, ref) => {
547
- const context = React10.useContext(DropdownContext);
593
+ const context = React11.useContext(DropdownContext);
548
594
  if (!(context == null ? void 0 : context.open)) return null;
549
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Modal, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
550
- import_react_native11.Pressable,
595
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native4.Modal, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
596
+ Pressable,
551
597
  {
552
598
  onPress: () => context.setOpen(false),
553
599
  ...{ className: "flex-1 bg-black/10 justify-end sm:justify-center items-center" },
554
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
555
- import_react_native11.View,
600
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
601
+ View,
556
602
  {
557
603
  ref,
558
604
  ...{ 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) },
@@ -565,64 +611,68 @@ var DropdownMenuContent = React10.forwardRef(
565
611
  }
566
612
  );
567
613
  DropdownMenuContent.displayName = "DropdownMenuContent";
568
- var DropdownMenuItem = React10.forwardRef(
614
+ var DropdownMenuItem = React11.forwardRef(
569
615
  ({ className, textClassName, onPress, children, ...props }, ref) => {
570
- const context = React10.useContext(DropdownContext);
571
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
572
- import_react_native11.Pressable,
616
+ const context = React11.useContext(DropdownContext);
617
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
618
+ Pressable,
573
619
  {
574
620
  ref,
575
621
  onPress: (e) => {
622
+ var _a;
576
623
  context == null ? void 0 : context.setOpen(false);
577
624
  onPress == null ? void 0 : onPress(e);
625
+ (_a = props.onClick) == null ? void 0 : _a.call(props, e);
578
626
  },
579
627
  ...{ 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) },
580
628
  ...props,
581
- children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { ...{ className: cn("text-foreground", textClassName) }, children }) : children
629
+ children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { ...{ className: cn("text-foreground", textClassName) }, children }) : children
582
630
  }
583
631
  );
584
632
  }
585
633
  );
586
634
  DropdownMenuItem.displayName = "DropdownMenuItem";
587
- var DropdownMenuLabel = React10.forwardRef(
588
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.Text, { ref, ...{ className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", className) }, ...props })
635
+ var DropdownMenuLabel = React11.forwardRef(
636
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text, { ref, ...{ className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", className) }, ...props })
589
637
  );
590
638
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
591
- var DropdownMenuSeparator = React10.forwardRef(
592
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native11.View, { ref, ...{ className: cn("-mx-1 my-1 h-px bg-muted", className) }, ...props })
639
+ var DropdownMenuSeparator = React11.forwardRef(
640
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(View, { ref, ...{ className: cn("-mx-1 my-1 h-px bg-muted", className) }, ...props })
593
641
  );
594
642
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
595
643
 
596
644
  // src/components/ui/popover.tsx
597
- var React11 = __toESM(require("react"));
598
- var import_react_native12 = require("react-native");
599
- var import_jsx_runtime12 = require("react/jsx-runtime");
600
- var PopoverContext = React11.createContext(null);
645
+ var React12 = __toESM(require("react"));
646
+ var import_react_native5 = require("react-native");
647
+ var import_jsx_runtime13 = require("react/jsx-runtime");
648
+ var PopoverContext = React12.createContext(null);
601
649
  function Popover({ children }) {
602
- const [open, setOpen] = React11.useState(false);
603
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PopoverContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.View, { ...{ className: "relative" }, children }) });
650
+ const [open, setOpen] = React12.useState(false);
651
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PopoverContext.Provider, { value: { open, setOpen }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(View, { ...{ className: "relative" }, children }) });
604
652
  }
605
- var PopoverTrigger = React11.forwardRef(
653
+ var PopoverTrigger = React12.forwardRef(
606
654
  ({ onPress, children, ...props }, ref) => {
607
- const context = React11.useContext(PopoverContext);
608
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Pressable, { ref, onPress: (e) => {
655
+ const context = React12.useContext(PopoverContext);
656
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Pressable, { ref, onPress: (e) => {
657
+ var _a;
609
658
  context == null ? void 0 : context.setOpen(!context.open);
610
659
  onPress == null ? void 0 : onPress(e);
660
+ (_a = props.onClick) == null ? void 0 : _a.call(props, e);
611
661
  }, ...props, children });
612
662
  }
613
663
  );
614
664
  PopoverTrigger.displayName = "PopoverTrigger";
615
- var PopoverContent = React11.forwardRef(
665
+ var PopoverContent = React12.forwardRef(
616
666
  ({ className, children, ...props }, ref) => {
617
- const context = React11.useContext(PopoverContext);
667
+ const context = React12.useContext(PopoverContext);
618
668
  if (!(context == null ? void 0 : context.open)) return null;
619
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Modal, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
620
- import_react_native12.Pressable,
669
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native5.Modal, { visible: context.open, transparent: true, animationType: "fade", onRequestClose: () => context.setOpen(false), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
670
+ Pressable,
621
671
  {
622
672
  onPress: () => context.setOpen(false),
623
673
  ...{ className: "flex-1 bg-transparent justify-center items-center" },
624
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native12.Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
625
- import_react_native12.View,
674
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Pressable, { onPress: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
675
+ View,
626
676
  {
627
677
  ref,
628
678
  ...{ className: cn("z-50 w-72 rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none", className) },