@payglocal_ui/flux-ui 0.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.
Files changed (72) hide show
  1. package/package.json +72 -0
  2. package/src/accordion.tsx +68 -0
  3. package/src/alert.tsx +107 -0
  4. package/src/avatar-group.tsx +96 -0
  5. package/src/avatar-tag.tsx +136 -0
  6. package/src/avatar.tsx +39 -0
  7. package/src/badge.tsx +98 -0
  8. package/src/blanket.tsx +61 -0
  9. package/src/breadcrumb.tsx +119 -0
  10. package/src/button-group.tsx +218 -0
  11. package/src/button.tsx +83 -0
  12. package/src/calendar.tsx +227 -0
  13. package/src/callout.tsx +68 -0
  14. package/src/card.tsx +103 -0
  15. package/src/chart-templates.tsx +587 -0
  16. package/src/chart.tsx +379 -0
  17. package/src/checkbox-select.tsx +239 -0
  18. package/src/checkbox.tsx +54 -0
  19. package/src/code.tsx +154 -0
  20. package/src/command.tsx +77 -0
  21. package/src/country-select.tsx +242 -0
  22. package/src/currency-amount-input.tsx +72 -0
  23. package/src/data-table.tsx +378 -0
  24. package/src/date-picker.tsx +317 -0
  25. package/src/dialog.tsx +81 -0
  26. package/src/drawer.tsx +91 -0
  27. package/src/dropdown-menu.tsx +174 -0
  28. package/src/empty-state.tsx +32 -0
  29. package/src/field.tsx +243 -0
  30. package/src/flag.tsx +265 -0
  31. package/src/form.tsx +168 -0
  32. package/src/grid-flex.tsx +241 -0
  33. package/src/heading.tsx +202 -0
  34. package/src/icon-button.tsx +93 -0
  35. package/src/index.ts +332 -0
  36. package/src/inline-dialog.tsx +153 -0
  37. package/src/inline-edit.tsx +212 -0
  38. package/src/input-group.tsx +151 -0
  39. package/src/input.tsx +28 -0
  40. package/src/label.tsx +21 -0
  41. package/src/layout.tsx +119 -0
  42. package/src/link.tsx +80 -0
  43. package/src/lozenge.tsx +61 -0
  44. package/src/menu.tsx +146 -0
  45. package/src/otp-input.tsx +117 -0
  46. package/src/page-header.tsx +28 -0
  47. package/src/pagination.tsx +185 -0
  48. package/src/password-input.tsx +34 -0
  49. package/src/popover.tsx +31 -0
  50. package/src/progress-indicator.tsx +94 -0
  51. package/src/progress.tsx +95 -0
  52. package/src/radio-group.tsx +46 -0
  53. package/src/responsive.tsx +276 -0
  54. package/src/scroll-area.tsx +39 -0
  55. package/src/section-message.tsx +119 -0
  56. package/src/select.tsx +144 -0
  57. package/src/separator.tsx +26 -0
  58. package/src/side-nav.tsx +264 -0
  59. package/src/skeleton.tsx +74 -0
  60. package/src/slider.tsx +25 -0
  61. package/src/sonner.tsx +32 -0
  62. package/src/spinner.tsx +54 -0
  63. package/src/spotlight.tsx +141 -0
  64. package/src/status-badge.tsx +86 -0
  65. package/src/switch.tsx +70 -0
  66. package/src/tabs.tsx +57 -0
  67. package/src/tag.tsx +52 -0
  68. package/src/textarea.tsx +25 -0
  69. package/src/time-picker.tsx +443 -0
  70. package/src/tooltip.tsx +29 -0
  71. package/src/utils.ts +6 -0
  72. package/src/visually-hidden.tsx +25 -0
@@ -0,0 +1,68 @@
1
+ import * as React from "react";
2
+ import { Info, CheckCircle2, AlertTriangle, XCircle, Sparkles } from "lucide-react";
3
+ import { cn } from "./utils";
4
+
5
+ export type CalloutVariant = "info" | "success" | "warning" | "error" | "neutral" | "discovery";
6
+
7
+ export interface CalloutProps extends React.HTMLAttributes<HTMLDivElement> {
8
+ variant?: CalloutVariant;
9
+ }
10
+
11
+ const variantStyles: Record<CalloutVariant, string> = {
12
+ info: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-950/30 dark:border-blue-800 dark:text-blue-200",
13
+ success: "bg-green-50 border-green-200 text-green-900 dark:bg-green-950/30 dark:border-green-800 dark:text-green-200",
14
+ warning: "bg-amber-50 border-amber-200 text-amber-900 dark:bg-amber-950/30 dark:border-amber-800 dark:text-amber-200",
15
+ error: "bg-red-50 border-red-200 text-red-900 dark:bg-red-950/30 dark:border-red-800 dark:text-red-200",
16
+ neutral: "bg-muted border-border text-foreground",
17
+ discovery: "bg-purple-50 border-purple-200 text-purple-900 dark:bg-purple-950/30 dark:border-purple-800 dark:text-purple-200",
18
+ };
19
+
20
+ const variantIcons: Record<CalloutVariant, React.ElementType> = {
21
+ info: Info,
22
+ success: CheckCircle2,
23
+ warning: AlertTriangle,
24
+ error: XCircle,
25
+ neutral: Info,
26
+ discovery: Sparkles,
27
+ };
28
+
29
+ const Callout = React.forwardRef<HTMLDivElement, CalloutProps>(
30
+ ({ className, variant = "info", children, ...props }, ref) => (
31
+ <div ref={ref} className={cn("flex gap-3 rounded-xl border p-4", variantStyles[variant], className)} {...props}>
32
+ {children}
33
+ </div>
34
+ )
35
+ );
36
+ Callout.displayName = "Callout";
37
+
38
+ interface CalloutIconProps extends React.HTMLAttributes<HTMLDivElement> {
39
+ variant?: CalloutVariant;
40
+ }
41
+
42
+ const CalloutIcon = React.forwardRef<HTMLDivElement, CalloutIconProps>(
43
+ ({ className, variant = "info", ...props }, ref) => {
44
+ const Icon = variantIcons[variant];
45
+ return (
46
+ <div ref={ref} className={cn("mt-0.5 shrink-0", className)} {...props}>
47
+ <Icon className="size-4" aria-hidden />
48
+ </div>
49
+ );
50
+ }
51
+ );
52
+ CalloutIcon.displayName = "CalloutIcon";
53
+
54
+ const CalloutTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
55
+ ({ className, ...props }, ref) => (
56
+ <p ref={ref} className={cn("text-sm font-semibold", className)} {...props} />
57
+ )
58
+ );
59
+ CalloutTitle.displayName = "CalloutTitle";
60
+
61
+ const CalloutText = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
62
+ ({ className, ...props }, ref) => (
63
+ <p ref={ref} className={cn("mt-1 text-sm opacity-90 leading-relaxed", className)} {...props} />
64
+ )
65
+ );
66
+ CalloutText.displayName = "CalloutText";
67
+
68
+ export { Callout, CalloutIcon, CalloutTitle, CalloutText };
package/src/card.tsx ADDED
@@ -0,0 +1,103 @@
1
+ import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+
4
+ import { cn } from "./utils";
5
+
6
+ const cardVariants = cva("flex flex-col rounded-xl border border-border bg-card text-card-foreground shadow-sm", {
7
+ variants: {
8
+ size: {
9
+ default: "gap-10 px-10 py-10",
10
+ sm: "gap-6 px-7 py-7",
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ size: "default",
15
+ },
16
+ });
17
+
18
+ function Card({
19
+ className,
20
+ size,
21
+ ...props
22
+ }: React.ComponentProps<"div"> & VariantProps<typeof cardVariants>) {
23
+ return (
24
+ <div
25
+ data-slot="card"
26
+ className={cn(cardVariants({ size }), className)}
27
+ {...props}
28
+ />
29
+ );
30
+ }
31
+
32
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
33
+ return (
34
+ <div
35
+ data-slot="card-header"
36
+ className={cn(
37
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-4 px-0 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
38
+ className
39
+ )}
40
+ {...props}
41
+ />
42
+ );
43
+ }
44
+
45
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
46
+ return (
47
+ <div
48
+ data-slot="card-title"
49
+ className={cn("text-lg font-semibold leading-snug tracking-tight", className)}
50
+ {...props}
51
+ />
52
+ );
53
+ }
54
+
55
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
56
+ return (
57
+ <div
58
+ data-slot="card-description"
59
+ className={cn("text-sm leading-relaxed text-muted-foreground", className)}
60
+ {...props}
61
+ />
62
+ );
63
+ }
64
+
65
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
66
+ return (
67
+ <div
68
+ data-slot="card-action"
69
+ className={cn(
70
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
71
+ className
72
+ )}
73
+ {...props}
74
+ />
75
+ );
76
+ }
77
+
78
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
79
+ return <div data-slot="card-content" className={cn("px-0", className)} {...props} />;
80
+ }
81
+
82
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
83
+ return (
84
+ <div
85
+ data-slot="card-footer"
86
+ className={cn(
87
+ "flex flex-wrap items-center gap-3 border-t border-border px-0 pt-8 pb-0 sm:gap-4",
88
+ className
89
+ )}
90
+ {...props}
91
+ />
92
+ );
93
+ }
94
+
95
+ export {
96
+ Card,
97
+ CardHeader,
98
+ CardFooter,
99
+ CardTitle,
100
+ CardAction,
101
+ CardDescription,
102
+ CardContent,
103
+ };