pxengine 0.1.12 → 0.1.13

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 (182) hide show
  1. package/dist/registry.json +1 -1
  2. package/package.json +2 -4
  3. package/config/tailwind-preset.js +0 -106
  4. package/src/atoms/AccordionAtom.tsx +0 -44
  5. package/src/atoms/AlertAtom.tsx +0 -48
  6. package/src/atoms/AlertDialogAtom.tsx +0 -66
  7. package/src/atoms/AspectRatioAtom.tsx +0 -27
  8. package/src/atoms/AvatarAtom.tsx +0 -21
  9. package/src/atoms/BadgeAtom.tsx +0 -35
  10. package/src/atoms/BreadcrumbAtom.tsx +0 -36
  11. package/src/atoms/ButtonAtom.tsx +0 -65
  12. package/src/atoms/CalendarAtom.tsx +0 -24
  13. package/src/atoms/CardAtom.tsx +0 -66
  14. package/src/atoms/CarouselAtom.tsx +0 -40
  15. package/src/atoms/ChartAtom.tsx +0 -192
  16. package/src/atoms/CheckboxAtom.tsx +0 -33
  17. package/src/atoms/CollapsibleAtom.tsx +0 -44
  18. package/src/atoms/CommandAtom.tsx +0 -46
  19. package/src/atoms/ContextMenuAtom.tsx +0 -49
  20. package/src/atoms/DialogAtom.tsx +0 -68
  21. package/src/atoms/DrawerAtom.tsx +0 -49
  22. package/src/atoms/DropdownMenuAtom.tsx +0 -49
  23. package/src/atoms/FormInputAtom.tsx +0 -101
  24. package/src/atoms/FormSelectAtom.tsx +0 -110
  25. package/src/atoms/FormTextareaAtom.tsx +0 -93
  26. package/src/atoms/InputAtom.tsx +0 -216
  27. package/src/atoms/InputOTPAtom.tsx +0 -49
  28. package/src/atoms/KbdAtom.tsx +0 -25
  29. package/src/atoms/LabelAtom.tsx +0 -23
  30. package/src/atoms/LayoutAtom.tsx +0 -45
  31. package/src/atoms/PaginationAtom.tsx +0 -49
  32. package/src/atoms/PopoverAtom.tsx +0 -40
  33. package/src/atoms/ProgressAtom.tsx +0 -15
  34. package/src/atoms/RadioGroupAtom.tsx +0 -31
  35. package/src/atoms/RatingAtom.tsx +0 -37
  36. package/src/atoms/ResizableAtom.tsx +0 -51
  37. package/src/atoms/ScrollAreaAtom.tsx +0 -31
  38. package/src/atoms/SeparatorAtom.tsx +0 -16
  39. package/src/atoms/SheetAtom.tsx +0 -72
  40. package/src/atoms/SkeletonAtom.tsx +0 -22
  41. package/src/atoms/SliderAtom.tsx +0 -32
  42. package/src/atoms/SpinnerAtom.tsx +0 -26
  43. package/src/atoms/SwitchAtom.tsx +0 -32
  44. package/src/atoms/TableAtom.tsx +0 -60
  45. package/src/atoms/TabsAtom.tsx +0 -40
  46. package/src/atoms/TextAtom.tsx +0 -36
  47. package/src/atoms/TextareaAtom.tsx +0 -42
  48. package/src/atoms/TimelineAtom.tsx +0 -77
  49. package/src/atoms/ToggleAtom.tsx +0 -36
  50. package/src/atoms/TooltipAtom.tsx +0 -39
  51. package/src/atoms/VideoAtom.tsx +0 -34
  52. package/src/atoms/index.ts +0 -49
  53. package/src/components/index.ts +0 -178
  54. package/src/components/ui/accordion.tsx +0 -56
  55. package/src/components/ui/alert-dialog.tsx +0 -139
  56. package/src/components/ui/alert.tsx +0 -59
  57. package/src/components/ui/aspect-ratio.tsx +0 -5
  58. package/src/components/ui/avatar.tsx +0 -50
  59. package/src/components/ui/badge.tsx +0 -36
  60. package/src/components/ui/breadcrumb.tsx +0 -115
  61. package/src/components/ui/button-group.tsx +0 -83
  62. package/src/components/ui/button.tsx +0 -56
  63. package/src/components/ui/calendar.tsx +0 -213
  64. package/src/components/ui/card.tsx +0 -79
  65. package/src/components/ui/carousel.tsx +0 -260
  66. package/src/components/ui/chart.tsx +0 -367
  67. package/src/components/ui/checkbox.tsx +0 -28
  68. package/src/components/ui/collapsible.tsx +0 -11
  69. package/src/components/ui/command.tsx +0 -153
  70. package/src/components/ui/context-menu.tsx +0 -198
  71. package/src/components/ui/dialog.tsx +0 -122
  72. package/src/components/ui/drawer.tsx +0 -116
  73. package/src/components/ui/dropdown-menu.tsx +0 -200
  74. package/src/components/ui/empty.tsx +0 -104
  75. package/src/components/ui/field.tsx +0 -244
  76. package/src/components/ui/form.tsx +0 -176
  77. package/src/components/ui/hover-card.tsx +0 -27
  78. package/src/components/ui/index.ts +0 -54
  79. package/src/components/ui/input-group.tsx +0 -168
  80. package/src/components/ui/input-otp.tsx +0 -69
  81. package/src/components/ui/input.tsx +0 -22
  82. package/src/components/ui/item.tsx +0 -193
  83. package/src/components/ui/kbd.tsx +0 -28
  84. package/src/components/ui/label.tsx +0 -26
  85. package/src/components/ui/menubar.tsx +0 -254
  86. package/src/components/ui/navigation-menu.tsx +0 -128
  87. package/src/components/ui/pagination.tsx +0 -117
  88. package/src/components/ui/popover.tsx +0 -29
  89. package/src/components/ui/progress.tsx +0 -28
  90. package/src/components/ui/radio-group.tsx +0 -42
  91. package/src/components/ui/resizable.tsx +0 -44
  92. package/src/components/ui/scroll-area.tsx +0 -46
  93. package/src/components/ui/select.tsx +0 -160
  94. package/src/components/ui/separator.tsx +0 -29
  95. package/src/components/ui/sheet.tsx +0 -140
  96. package/src/components/ui/sidebar.tsx +0 -771
  97. package/src/components/ui/skeleton.tsx +0 -15
  98. package/src/components/ui/slider.tsx +0 -26
  99. package/src/components/ui/sonner.tsx +0 -45
  100. package/src/components/ui/spinner.tsx +0 -16
  101. package/src/components/ui/switch.tsx +0 -27
  102. package/src/components/ui/table.tsx +0 -117
  103. package/src/components/ui/tabs.tsx +0 -53
  104. package/src/components/ui/textarea.tsx +0 -22
  105. package/src/components/ui/toggle-group.tsx +0 -61
  106. package/src/components/ui/toggle.tsx +0 -43
  107. package/src/components/ui/tooltip.tsx +0 -30
  108. package/src/hooks/use-mobile.tsx +0 -19
  109. package/src/index.ts +0 -24
  110. package/src/lib/countries.ts +0 -203
  111. package/src/lib/index.ts +0 -2
  112. package/src/lib/utils.ts +0 -15
  113. package/src/lib/validators/index.ts +0 -1
  114. package/src/lib/validators/theme.ts +0 -148
  115. package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +0 -44
  116. package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +0 -1
  117. package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +0 -50
  118. package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +0 -1
  119. package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +0 -36
  120. package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +0 -1
  121. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx +0 -123
  122. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.types.ts +0 -13
  123. package/src/molecules/creator-discovery/CampaignSeedCard/index.ts +0 -2
  124. package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +0 -41
  125. package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +0 -1
  126. package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +0 -77
  127. package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +0 -1
  128. package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +0 -104
  129. package/src/molecules/creator-discovery/CreatorGridCard/index.ts +0 -1
  130. package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +0 -65
  131. package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +0 -1
  132. package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +0 -58
  133. package/src/molecules/creator-discovery/GrowthChartCard/index.ts +0 -1
  134. package/src/molecules/creator-discovery/MCQCard/MCQCard.tsx +0 -165
  135. package/src/molecules/creator-discovery/MCQCard/MCQCard.types.ts +0 -71
  136. package/src/molecules/creator-discovery/MCQCard/index.ts +0 -2
  137. package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +0 -72
  138. package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +0 -1
  139. package/src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx +0 -334
  140. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx +0 -111
  141. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.types.ts +0 -18
  142. package/src/molecules/creator-discovery/SearchSpecCard/index.ts +0 -3
  143. package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +0 -49
  144. package/src/molecules/creator-discovery/TopPostsGrid/index.ts +0 -1
  145. package/src/molecules/creator-discovery/index.ts +0 -13
  146. package/src/molecules/generic/ActionButton/ActionButton.tsx +0 -137
  147. package/src/molecules/generic/ActionButton/ActionButton.types.ts +0 -68
  148. package/src/molecules/generic/ActionButton/index.ts +0 -2
  149. package/src/molecules/generic/DataGrid/DataGrid.tsx +0 -102
  150. package/src/molecules/generic/DataGrid/index.ts +0 -1
  151. package/src/molecules/generic/EditableField/EditableField.tsx +0 -229
  152. package/src/molecules/generic/EditableField/EditableField.types.ts +0 -73
  153. package/src/molecules/generic/EditableField/index.ts +0 -2
  154. package/src/molecules/generic/EmptyState/EmptyState.tsx +0 -61
  155. package/src/molecules/generic/EmptyState/index.ts +0 -1
  156. package/src/molecules/generic/FileUpload/FileUpload.tsx +0 -62
  157. package/src/molecules/generic/FileUpload/index.ts +0 -1
  158. package/src/molecules/generic/FilterBar/FilterBar.tsx +0 -54
  159. package/src/molecules/generic/FilterBar/index.ts +0 -1
  160. package/src/molecules/generic/FormCard/FormCard.tsx +0 -136
  161. package/src/molecules/generic/FormCard/FormCard.types.ts +0 -93
  162. package/src/molecules/generic/FormCard/index.ts +0 -2
  163. package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +0 -39
  164. package/src/molecules/generic/LoadingOverlay/index.ts +0 -1
  165. package/src/molecules/generic/NotificationList/NotificationList.tsx +0 -80
  166. package/src/molecules/generic/NotificationList/index.ts +0 -1
  167. package/src/molecules/generic/StatsGrid/StatsGrid.tsx +0 -80
  168. package/src/molecules/generic/StatsGrid/index.ts +0 -1
  169. package/src/molecules/generic/StepWizard/StepWizard.tsx +0 -67
  170. package/src/molecules/generic/StepWizard/index.ts +0 -1
  171. package/src/molecules/generic/TagCloud/TagCloud.tsx +0 -32
  172. package/src/molecules/generic/TagCloud/index.ts +0 -1
  173. package/src/molecules/generic/index.ts +0 -12
  174. package/src/molecules/index.ts +0 -2
  175. package/src/render/PXEngineRenderer.tsx +0 -458
  176. package/src/render/index.ts +0 -1
  177. package/src/styles/globals.css +0 -146
  178. package/src/types/atoms.ts +0 -450
  179. package/src/types/common.ts +0 -116
  180. package/src/types/index.ts +0 -3
  181. package/src/types/molecules.ts +0 -279
  182. package/src/types/schema.ts +0 -12
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pxengine/ui",
3
3
  "version": "1.0.0",
4
- "lastUpdated": "2026-02-04T09:42:26.847Z",
4
+ "lastUpdated": "2026-02-04T09:59:53.589Z",
5
5
  "components": {
6
6
  "AccordionAtom": {
7
7
  "name": "AccordionAtom",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxengine",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "description": "Shadcn-based UI component library for agent-driven interfaces",
6
6
  "main": "./dist/index.cjs",
@@ -14,9 +14,7 @@
14
14
  }
15
15
  },
16
16
  "files": [
17
- "dist",
18
- "config",
19
- "src"
17
+ "dist"
20
18
  ],
21
19
  "scripts": {
22
20
  "build": "tsup && npm run generate-metadata",
@@ -1,106 +0,0 @@
1
- /**
2
- * @pxengine/ui Tailwind Preset
3
- *
4
- * This file allows consumers of the @pxengine/ui library to easily inherit
5
- * the custom theme, colors, and animations required for the components.
6
- *
7
- * Usage in tailwind.config.js:
8
- * presets: [require("@pxengine/ui/config/tailwind-preset")]
9
- */
10
-
11
- module.exports = {
12
- theme: {
13
- container: {
14
- center: true,
15
- padding: "2rem",
16
- screens: {
17
- "2xl": "1400px",
18
- },
19
- },
20
- extend: {
21
- fontFamily: {
22
- sans: ["Inter", "system-ui", "sans-serif"],
23
- noto: ["Noto Sans", "system-ui", "sans-serif"],
24
- grotesk: ["Space Grotesk", "system-ui", "sans-serif"],
25
- roboto: ["Roboto", "system-ui", "sans-serif"],
26
- },
27
- colors: {
28
- border: "hsl(var(--border))",
29
- input: "hsl(var(--input))",
30
- ring: "hsl(var(--ring))",
31
- background: "hsl(var(--background))",
32
- foreground: "hsl(var(--foreground))",
33
- primary: {
34
- DEFAULT: "hsl(var(--primary))",
35
- foreground: "hsl(var(--primary-foreground))",
36
- },
37
- secondary: {
38
- DEFAULT: "hsl(var(--secondary))",
39
- foreground: "hsl(var(--secondary-foreground))",
40
- },
41
- destructive: {
42
- DEFAULT: "hsl(var(--destructive))",
43
- foreground: "hsl(var(--destructive-foreground))",
44
- },
45
- muted: {
46
- DEFAULT: "hsl(var(--muted))",
47
- foreground: "hsl(var(--muted-foreground))",
48
- },
49
- accent: {
50
- DEFAULT: "hsl(var(--accent))",
51
- foreground: "hsl(var(--accent-foreground))",
52
- },
53
- popover: {
54
- DEFAULT: "hsl(var(--popover))",
55
- foreground: "hsl(var(--popover-foreground))",
56
- },
57
- card: {
58
- DEFAULT: "hsl(var(--card))",
59
- foreground: "hsl(var(--card-foreground))",
60
- },
61
- // Custom PXEngine colors
62
- gray25: "var(--gray25)",
63
- gray50: "var(--gray50)",
64
- gray100: "var(--gray100)",
65
- gray200: "var(--gray200)",
66
- gray300: "var(--gray300)",
67
- gray400: "var(--gray400)",
68
- gray500: "var(--gray500)",
69
- gray600: "var(--gray600)",
70
- gray700: "var(--gray700)",
71
- gray800: "var(--gray800)",
72
- gray900: "var(--gray900)",
73
- purple100: "var(--purple100)",
74
- purple200: "var(--purple200)",
75
- purple500: "var(--purple500)",
76
- purpleText: "var(--purple-text)",
77
- purple50: "var(--purple50)",
78
- purple20: "var(--purple20)",
79
- purpleBorder: "var(--purple-border)",
80
- purpleLight: "var(--purpleLight)",
81
- purpleText1: "var(--purple-text-1)",
82
- purpleText2: "var(--purple-text-2)",
83
- },
84
- borderRadius: {
85
- lg: "var(--radius)",
86
- md: "calc(var(--radius) - 2px)",
87
- sm: "calc(var(--radius) - 4px)",
88
- },
89
- keyframes: {
90
- "accordion-down": {
91
- from: { height: "0" },
92
- to: { height: "var(--radix-accordion-content-height)" },
93
- },
94
- "accordion-up": {
95
- from: { height: "var(--radix-accordion-content-height)" },
96
- to: { height: "0" },
97
- },
98
- },
99
- animation: {
100
- "accordion-down": "accordion-down 0.2s ease-out",
101
- "accordion-up": "accordion-up 0.2s ease-out",
102
- },
103
- },
104
- },
105
- plugins: [require("tailwindcss-animate")],
106
- };
@@ -1,44 +0,0 @@
1
- import React from "react";
2
- import {
3
- Accordion,
4
- AccordionItem,
5
- AccordionTrigger,
6
- AccordionContent,
7
- } from "@/components/ui/accordion";
8
- import { AccordionAtomType, UIComponent } from "../types/schema";
9
- import { cn } from "@/lib/utils";
10
-
11
- interface Props extends AccordionAtomType {
12
- renderComponent: (component: UIComponent) => React.ReactNode;
13
- }
14
-
15
- export const AccordionAtom: React.FC<Props> = ({
16
- items,
17
- className,
18
- renderComponent,
19
- }) => {
20
- return (
21
- <Accordion type="single" collapsible className={cn("w-full", className)}>
22
- {items.map((item) => (
23
- <AccordionItem
24
- key={item.value}
25
- value={item.value}
26
- className="border-gray-100"
27
- >
28
- <AccordionTrigger className="text-sm font-semibold hover:no-underline hover:text-purple600 py-4">
29
- {item.trigger}
30
- </AccordionTrigger>
31
- <AccordionContent>
32
- <div className="pt-2 pb-4">
33
- {item.content.map((child) => (
34
- <React.Fragment key={child.id}>
35
- {renderComponent(child)}
36
- </React.Fragment>
37
- ))}
38
- </div>
39
- </AccordionContent>
40
- </AccordionItem>
41
- ))}
42
- </Accordion>
43
- );
44
- };
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert";
3
- import { AlertAtomType } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
- import { AlertCircle, CheckCircle2, Info, AlertTriangle } from "lucide-react";
6
-
7
- export const AlertAtom: React.FC<AlertAtomType> = ({
8
- title,
9
- description,
10
- variant = "default",
11
- className,
12
- style,
13
- }) => {
14
- const IconMap: any = {
15
- default: Info,
16
- destructive: AlertCircle,
17
- warning: AlertTriangle,
18
- info: Info,
19
- success: CheckCircle2,
20
- };
21
-
22
- const Icon = IconMap[variant] || Info;
23
-
24
- const variantMap: any = {
25
- warning:
26
- "border-amber-200 bg-amber-50 text-amber-900 [&>svg]:text-amber-600",
27
- info: "border-blue-200 bg-blue-50 text-blue-900 [&>svg]:text-blue-600",
28
- success:
29
- "border-green-200 bg-green-50 text-green-900 [&>svg]:text-green-600",
30
- };
31
-
32
- const customClass = variantMap[variant] || "";
33
- const shadcnVariant = ["warning", "info", "success"].includes(variant)
34
- ? "default"
35
- : (variant as any);
36
-
37
- return (
38
- <Alert
39
- variant={shadcnVariant}
40
- className={cn("rounded-2xl", customClass, className)}
41
- style={style}
42
- >
43
- <Icon className="h-4 w-4" />
44
- <AlertTitle className="font-bold">{title}</AlertTitle>
45
- {description && <AlertDescription>{description}</AlertDescription>}
46
- </Alert>
47
- );
48
- };
@@ -1,66 +0,0 @@
1
- import React from "react";
2
- import {
3
- AlertDialog,
4
- AlertDialogAction,
5
- AlertDialogCancel,
6
- AlertDialogContent,
7
- AlertDialogDescription,
8
- AlertDialogFooter,
9
- AlertDialogHeader,
10
- AlertDialogTitle,
11
- AlertDialogTrigger,
12
- } from "@/components/ui/alert-dialog";
13
- import { AlertDialogAtomType, UIComponent } from "../types/schema";
14
- import { cn } from "@/lib/utils";
15
-
16
- interface Props extends AlertDialogAtomType {
17
- renderComponent: (component: UIComponent) => React.ReactNode;
18
- onAction?: (action: string) => void;
19
- }
20
-
21
- export const AlertDialogAtom: React.FC<Props> = ({
22
- title,
23
- description,
24
- trigger,
25
- confirmLabel = "Continue",
26
- cancelLabel = "Cancel",
27
- action,
28
- onAction,
29
- className,
30
- renderComponent,
31
- }) => {
32
- return (
33
- <AlertDialog>
34
- <AlertDialogTrigger asChild>
35
- <div className={cn("inline-block cursor-pointer", className)}>
36
- {trigger.map((child) => (
37
- <React.Fragment key={child.id}>
38
- {renderComponent(child)}
39
- </React.Fragment>
40
- ))}
41
- </div>
42
- </AlertDialogTrigger>
43
- <AlertDialogContent className="rounded-3xl p-6 bg-white shadow-3xl border-gray-100">
44
- <AlertDialogHeader>
45
- <AlertDialogTitle className="text-lg font-bold text-gray-900">
46
- {title}
47
- </AlertDialogTitle>
48
- <AlertDialogDescription className="text-gray-500 font-medium">
49
- {description}
50
- </AlertDialogDescription>
51
- </AlertDialogHeader>
52
- <AlertDialogFooter className="gap-2 sm:gap-0">
53
- <AlertDialogCancel className="rounded-full border-gray-200 hover:bg-gray-50 font-semibold">
54
- {cancelLabel}
55
- </AlertDialogCancel>
56
- <AlertDialogAction
57
- onClick={() => action && onAction?.(action)}
58
- className="rounded-full bg-purple500 hover:bg-purple600 text-white font-semibold transition-all shadow-md hover:shadow-lg"
59
- >
60
- {confirmLabel}
61
- </AlertDialogAction>
62
- </AlertDialogFooter>
63
- </AlertDialogContent>
64
- </AlertDialog>
65
- );
66
- };
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { AspectRatio } from "@/components/ui/aspect-ratio";
3
- import { AspectRatioAtomType, UIComponent } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
-
6
- interface Props extends AspectRatioAtomType {
7
- renderComponent: (component: UIComponent) => React.ReactNode;
8
- }
9
-
10
- export const AspectRatioAtom: React.FC<Props> = ({
11
- ratio = 16 / 9,
12
- children,
13
- className,
14
- renderComponent,
15
- }) => {
16
- return (
17
- <div className={cn("w-full", className)}>
18
- <AspectRatio ratio={ratio}>
19
- {children.map((child) => (
20
- <React.Fragment key={child.id}>
21
- {renderComponent(child)}
22
- </React.Fragment>
23
- ))}
24
- </AspectRatio>
25
- </div>
26
- );
27
- };
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
3
- import { AvatarAtomType } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
-
6
- export const AvatarAtom: React.FC<AvatarAtomType> = ({
7
- src,
8
- fallback,
9
- alt,
10
- className,
11
- style,
12
- }) => {
13
- return (
14
- <Avatar className={cn("h-10 w-10", className)} style={style}>
15
- {src && <AvatarImage src={src} alt={alt} />}
16
- <AvatarFallback className="bg-purple50 text-purple600 font-bold uppercase">
17
- {fallback}
18
- </AvatarFallback>
19
- </Avatar>
20
- );
21
- };
@@ -1,35 +0,0 @@
1
- import React from "react";
2
- import { Badge } from "@/components/ui/badge";
3
- import { BadgeAtomType } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
-
6
- export const BadgeAtom: React.FC<BadgeAtomType> = ({
7
- label,
8
- variant = "default",
9
- className,
10
- style,
11
- }) => {
12
- const customVariants: any = {
13
- purple: "bg-primary/10 text-primary border-primary/20 hover:bg-primary/20",
14
- green:
15
- "bg-emerald-500/10 text-emerald-500 border-emerald-500/20 hover:bg-emerald-500/20",
16
- };
17
-
18
- const isCustom = ["purple", "green"].includes(variant || "");
19
- const shadcnVariant = isCustom ? "outline" : (variant as any);
20
- const customClass = isCustom ? customVariants[variant!] : "";
21
-
22
- return (
23
- <Badge
24
- variant={shadcnVariant}
25
- className={cn(
26
- "rounded-full px-3 py-0.5 font-bold transition-all",
27
- customClass,
28
- className,
29
- )}
30
- style={style}
31
- >
32
- {label}
33
- </Badge>
34
- );
35
- };
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import {
3
- Breadcrumb,
4
- BreadcrumbItem,
5
- BreadcrumbLink,
6
- BreadcrumbList,
7
- BreadcrumbPage,
8
- BreadcrumbSeparator,
9
- } from "@/components/ui/breadcrumb";
10
- import { BreadcrumbAtomType } from "../types/schema";
11
-
12
- export const BreadcrumbAtom: React.FC<BreadcrumbAtomType> = ({
13
- items,
14
- className,
15
- }) => {
16
- return (
17
- <Breadcrumb className={className}>
18
- <BreadcrumbList>
19
- {items.map((item, index) => (
20
- <React.Fragment key={index}>
21
- <BreadcrumbItem>
22
- {item.isCurrent ? (
23
- <BreadcrumbPage>{item.label}</BreadcrumbPage>
24
- ) : (
25
- <BreadcrumbLink href={item.href || "#"}>
26
- {item.label}
27
- </BreadcrumbLink>
28
- )}
29
- </BreadcrumbItem>
30
- {index < items.length - 1 && <BreadcrumbSeparator />}
31
- </React.Fragment>
32
- ))}
33
- </BreadcrumbList>
34
- </Breadcrumb>
35
- );
36
- };
@@ -1,65 +0,0 @@
1
- import React from "react";
2
- import { Button } from "@/components/ui/button";
3
- import { ButtonAtomType } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
- import { Loader2 } from "lucide-react";
6
-
7
- interface Props extends ButtonAtomType {
8
- onAction?: (action: string) => void;
9
- }
10
-
11
- /**
12
- * ButtonAtom
13
- * Wraps shadcn Button with schema support and premium variants
14
- */
15
- export const ButtonAtom: React.FC<Props> = ({
16
- label,
17
- variant = "default",
18
- size = "default",
19
- action,
20
- disabled = false,
21
- isLoading = false,
22
- onAction,
23
- className,
24
- style,
25
- }) => {
26
- const handleClick = (e: React.MouseEvent) => {
27
- e.preventDefault();
28
- e.stopPropagation();
29
- if (action && onAction) {
30
- onAction(action);
31
- }
32
- };
33
-
34
- const variantMap: any = {
35
- purple:
36
- "bg-primary text-primary-foreground hover:bg-primary/90 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] transition-all active:scale-95 font-bold",
37
- gradient:
38
- "bg-gradient-to-r from-primary via-purple-500 to-indigo-600 text-primary-foreground hover:opacity-95 shadow-[0_4px_14px_0_hsl(var(--primary)/40%)] active:scale-95 font-bold",
39
- };
40
-
41
- const customClass = variantMap[variant] || "";
42
- const shadcnVariant = ["purple", "gradient"].includes(variant)
43
- ? "default"
44
- : (variant as any);
45
-
46
- return (
47
- <Button
48
- variant={shadcnVariant}
49
- size={size as any}
50
- disabled={disabled || isLoading}
51
- onClick={handleClick}
52
- className={cn("rounded-full font-semibold", customClass, className)}
53
- style={style}
54
- >
55
- {isLoading ? (
56
- <>
57
- <Loader2 className="mr-2 h-4 w-4 animate-spin" />
58
- {label}
59
- </>
60
- ) : (
61
- label
62
- )}
63
- </Button>
64
- );
65
- };
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import { Calendar } from "@/components/ui/calendar";
3
- import { CalendarAtomType } from "../types/schema";
4
- import { cn } from "@/lib/utils";
5
-
6
- export const CalendarAtom: React.FC<CalendarAtomType> = ({
7
- mode = "single",
8
- selectedDate,
9
- className,
10
- }) => {
11
- // Simple conversion for demonstration
12
- const date = selectedDate ? new Date(selectedDate as string) : undefined;
13
-
14
- return (
15
- <div
16
- className={cn(
17
- "p-4 bg-background/80 backdrop-blur-xl rounded-[28px] border border-border/50 shadow-[0_20px_50px_rgba(0,0,0,0.1)] inline-block transition-all hover:shadow-[0_20px_60px_rgba(0,0,0,0.15)] ring-1 ring-border/5",
18
- className,
19
- )}
20
- >
21
- <Calendar mode={mode as any} selected={date} className="rounded-xl" />
22
- </div>
23
- );
24
- };
@@ -1,66 +0,0 @@
1
- import React from "react";
2
- import {
3
- Card,
4
- CardHeader,
5
- CardTitle,
6
- CardDescription,
7
- CardContent,
8
- CardFooter,
9
- } from "@/components/ui/card";
10
- import { CardAtomType, UIComponent } from "../types/schema";
11
- import { cn } from "@/lib/utils";
12
-
13
- interface Props extends CardAtomType {
14
- renderComponent: (component: UIComponent, index?: number) => React.ReactNode;
15
- }
16
-
17
- /**
18
- * CardAtom
19
- * Standardized Card wrapper for the Universal Renderer
20
- */
21
- export const CardAtom: React.FC<Props> = ({
22
- title,
23
- description,
24
- children,
25
- footer,
26
- className,
27
- style,
28
- renderComponent,
29
- }) => {
30
- return (
31
- <Card
32
- className={cn(
33
- "rounded-[32px] border border-border/50 bg-card/80 text-card-foreground shadow-[0_8px_30px_rgb(0,0,0,0.04)] overflow-hidden backdrop-blur-xl ring-1 ring-border/5",
34
- className,
35
- )}
36
- style={style}
37
- >
38
- {(title || description) && (
39
- <CardHeader>
40
- {title && (
41
- <CardTitle className="text-xl font-bold text-gray900">
42
- {title}
43
- </CardTitle>
44
- )}
45
- {description && <CardDescription>{description}</CardDescription>}
46
- </CardHeader>
47
- )}
48
- <CardContent className="space-y-4">
49
- {children.map((child, index) => (
50
- <React.Fragment key={child.id || `card-content-${index}`}>
51
- {renderComponent(child, index)}
52
- </React.Fragment>
53
- ))}
54
- </CardContent>
55
- {footer && footer.length > 0 && (
56
- <CardFooter className="bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6">
57
- {footer.map((footerChild, index) => (
58
- <React.Fragment key={footerChild.id || `card-footer-${index}`}>
59
- {renderComponent(footerChild, index)}
60
- </React.Fragment>
61
- ))}
62
- </CardFooter>
63
- )}
64
- </Card>
65
- );
66
- };
@@ -1,40 +0,0 @@
1
- import React from "react";
2
- import {
3
- Carousel,
4
- CarouselContent,
5
- CarouselItem,
6
- CarouselNext,
7
- CarouselPrevious,
8
- } from "@/components/ui/carousel";
9
- import { CarouselAtomType, UIComponent } from "../types/schema";
10
- import { cn } from "@/lib/utils";
11
-
12
- interface Props extends CarouselAtomType {
13
- renderComponent: (component: UIComponent) => React.ReactNode;
14
- }
15
-
16
- export const CarouselAtom: React.FC<Props> = ({
17
- items,
18
- className,
19
- renderComponent,
20
- }) => {
21
- return (
22
- <Carousel className={cn("w-full max-w-xs mx-auto", className)}>
23
- <CarouselContent>
24
- {items.map((slide, index) => (
25
- <CarouselItem key={index}>
26
- <div className="p-1">
27
- {slide.map((child) => (
28
- <React.Fragment key={child.id}>
29
- {renderComponent(child)}
30
- </React.Fragment>
31
- ))}
32
- </div>
33
- </CarouselItem>
34
- ))}
35
- </CarouselContent>
36
- <CarouselPrevious />
37
- <CarouselNext />
38
- </Carousel>
39
- );
40
- };