pxengine 0.1.12 → 0.1.14
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.cjs +227 -291
- package/dist/index.d.cts +15 -11
- package/dist/index.d.ts +15 -11
- package/dist/index.js +225 -287
- package/dist/registry.json +20 -22
- package/package.json +2 -4
- package/config/tailwind-preset.js +0 -106
- package/src/atoms/AccordionAtom.tsx +0 -44
- package/src/atoms/AlertAtom.tsx +0 -48
- package/src/atoms/AlertDialogAtom.tsx +0 -66
- package/src/atoms/AspectRatioAtom.tsx +0 -27
- package/src/atoms/AvatarAtom.tsx +0 -21
- package/src/atoms/BadgeAtom.tsx +0 -35
- package/src/atoms/BreadcrumbAtom.tsx +0 -36
- package/src/atoms/ButtonAtom.tsx +0 -65
- package/src/atoms/CalendarAtom.tsx +0 -24
- package/src/atoms/CardAtom.tsx +0 -66
- package/src/atoms/CarouselAtom.tsx +0 -40
- package/src/atoms/ChartAtom.tsx +0 -192
- package/src/atoms/CheckboxAtom.tsx +0 -33
- package/src/atoms/CollapsibleAtom.tsx +0 -44
- package/src/atoms/CommandAtom.tsx +0 -46
- package/src/atoms/ContextMenuAtom.tsx +0 -49
- package/src/atoms/DialogAtom.tsx +0 -68
- package/src/atoms/DrawerAtom.tsx +0 -49
- package/src/atoms/DropdownMenuAtom.tsx +0 -49
- package/src/atoms/FormInputAtom.tsx +0 -101
- package/src/atoms/FormSelectAtom.tsx +0 -110
- package/src/atoms/FormTextareaAtom.tsx +0 -93
- package/src/atoms/InputAtom.tsx +0 -216
- package/src/atoms/InputOTPAtom.tsx +0 -49
- package/src/atoms/KbdAtom.tsx +0 -25
- package/src/atoms/LabelAtom.tsx +0 -23
- package/src/atoms/LayoutAtom.tsx +0 -45
- package/src/atoms/PaginationAtom.tsx +0 -49
- package/src/atoms/PopoverAtom.tsx +0 -40
- package/src/atoms/ProgressAtom.tsx +0 -15
- package/src/atoms/RadioGroupAtom.tsx +0 -31
- package/src/atoms/RatingAtom.tsx +0 -37
- package/src/atoms/ResizableAtom.tsx +0 -51
- package/src/atoms/ScrollAreaAtom.tsx +0 -31
- package/src/atoms/SeparatorAtom.tsx +0 -16
- package/src/atoms/SheetAtom.tsx +0 -72
- package/src/atoms/SkeletonAtom.tsx +0 -22
- package/src/atoms/SliderAtom.tsx +0 -32
- package/src/atoms/SpinnerAtom.tsx +0 -26
- package/src/atoms/SwitchAtom.tsx +0 -32
- package/src/atoms/TableAtom.tsx +0 -60
- package/src/atoms/TabsAtom.tsx +0 -40
- package/src/atoms/TextAtom.tsx +0 -36
- package/src/atoms/TextareaAtom.tsx +0 -42
- package/src/atoms/TimelineAtom.tsx +0 -77
- package/src/atoms/ToggleAtom.tsx +0 -36
- package/src/atoms/TooltipAtom.tsx +0 -39
- package/src/atoms/VideoAtom.tsx +0 -34
- package/src/atoms/index.ts +0 -49
- package/src/components/index.ts +0 -178
- package/src/components/ui/accordion.tsx +0 -56
- package/src/components/ui/alert-dialog.tsx +0 -139
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/aspect-ratio.tsx +0 -5
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/badge.tsx +0 -36
- package/src/components/ui/breadcrumb.tsx +0 -115
- package/src/components/ui/button-group.tsx +0 -83
- package/src/components/ui/button.tsx +0 -56
- package/src/components/ui/calendar.tsx +0 -213
- package/src/components/ui/card.tsx +0 -79
- package/src/components/ui/carousel.tsx +0 -260
- package/src/components/ui/chart.tsx +0 -367
- package/src/components/ui/checkbox.tsx +0 -28
- package/src/components/ui/collapsible.tsx +0 -11
- package/src/components/ui/command.tsx +0 -153
- package/src/components/ui/context-menu.tsx +0 -198
- package/src/components/ui/dialog.tsx +0 -122
- package/src/components/ui/drawer.tsx +0 -116
- package/src/components/ui/dropdown-menu.tsx +0 -200
- package/src/components/ui/empty.tsx +0 -104
- package/src/components/ui/field.tsx +0 -244
- package/src/components/ui/form.tsx +0 -176
- package/src/components/ui/hover-card.tsx +0 -27
- package/src/components/ui/index.ts +0 -54
- package/src/components/ui/input-group.tsx +0 -168
- package/src/components/ui/input-otp.tsx +0 -69
- package/src/components/ui/input.tsx +0 -22
- package/src/components/ui/item.tsx +0 -193
- package/src/components/ui/kbd.tsx +0 -28
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/menubar.tsx +0 -254
- package/src/components/ui/navigation-menu.tsx +0 -128
- package/src/components/ui/pagination.tsx +0 -117
- package/src/components/ui/popover.tsx +0 -29
- package/src/components/ui/progress.tsx +0 -28
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -44
- package/src/components/ui/scroll-area.tsx +0 -46
- package/src/components/ui/select.tsx +0 -160
- package/src/components/ui/separator.tsx +0 -29
- package/src/components/ui/sheet.tsx +0 -140
- package/src/components/ui/sidebar.tsx +0 -771
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/slider.tsx +0 -26
- package/src/components/ui/sonner.tsx +0 -45
- package/src/components/ui/spinner.tsx +0 -16
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -117
- package/src/components/ui/tabs.tsx +0 -53
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/toggle-group.tsx +0 -61
- package/src/components/ui/toggle.tsx +0 -43
- package/src/components/ui/tooltip.tsx +0 -30
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/index.ts +0 -24
- package/src/lib/countries.ts +0 -203
- package/src/lib/index.ts +0 -2
- package/src/lib/utils.ts +0 -15
- package/src/lib/validators/index.ts +0 -1
- package/src/lib/validators/theme.ts +0 -148
- package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +0 -44
- package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +0 -1
- package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +0 -50
- package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +0 -1
- package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +0 -36
- package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +0 -1
- package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx +0 -123
- package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.types.ts +0 -13
- package/src/molecules/creator-discovery/CampaignSeedCard/index.ts +0 -2
- package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +0 -41
- package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +0 -77
- package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +0 -104
- package/src/molecules/creator-discovery/CreatorGridCard/index.ts +0 -1
- package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +0 -65
- package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +0 -1
- package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +0 -58
- package/src/molecules/creator-discovery/GrowthChartCard/index.ts +0 -1
- package/src/molecules/creator-discovery/MCQCard/MCQCard.tsx +0 -165
- package/src/molecules/creator-discovery/MCQCard/MCQCard.types.ts +0 -71
- package/src/molecules/creator-discovery/MCQCard/index.ts +0 -2
- package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +0 -72
- package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +0 -1
- package/src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx +0 -334
- package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx +0 -111
- package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.types.ts +0 -18
- package/src/molecules/creator-discovery/SearchSpecCard/index.ts +0 -3
- package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +0 -49
- package/src/molecules/creator-discovery/TopPostsGrid/index.ts +0 -1
- package/src/molecules/creator-discovery/index.ts +0 -13
- package/src/molecules/generic/ActionButton/ActionButton.tsx +0 -137
- package/src/molecules/generic/ActionButton/ActionButton.types.ts +0 -68
- package/src/molecules/generic/ActionButton/index.ts +0 -2
- package/src/molecules/generic/DataGrid/DataGrid.tsx +0 -102
- package/src/molecules/generic/DataGrid/index.ts +0 -1
- package/src/molecules/generic/EditableField/EditableField.tsx +0 -229
- package/src/molecules/generic/EditableField/EditableField.types.ts +0 -73
- package/src/molecules/generic/EditableField/index.ts +0 -2
- package/src/molecules/generic/EmptyState/EmptyState.tsx +0 -61
- package/src/molecules/generic/EmptyState/index.ts +0 -1
- package/src/molecules/generic/FileUpload/FileUpload.tsx +0 -62
- package/src/molecules/generic/FileUpload/index.ts +0 -1
- package/src/molecules/generic/FilterBar/FilterBar.tsx +0 -54
- package/src/molecules/generic/FilterBar/index.ts +0 -1
- package/src/molecules/generic/FormCard/FormCard.tsx +0 -136
- package/src/molecules/generic/FormCard/FormCard.types.ts +0 -93
- package/src/molecules/generic/FormCard/index.ts +0 -2
- package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +0 -39
- package/src/molecules/generic/LoadingOverlay/index.ts +0 -1
- package/src/molecules/generic/NotificationList/NotificationList.tsx +0 -80
- package/src/molecules/generic/NotificationList/index.ts +0 -1
- package/src/molecules/generic/StatsGrid/StatsGrid.tsx +0 -80
- package/src/molecules/generic/StatsGrid/index.ts +0 -1
- package/src/molecules/generic/StepWizard/StepWizard.tsx +0 -67
- package/src/molecules/generic/StepWizard/index.ts +0 -1
- package/src/molecules/generic/TagCloud/TagCloud.tsx +0 -32
- package/src/molecules/generic/TagCloud/index.ts +0 -1
- package/src/molecules/generic/index.ts +0 -12
- package/src/molecules/index.ts +0 -2
- package/src/render/PXEngineRenderer.tsx +0 -458
- package/src/render/index.ts +0 -1
- package/src/styles/globals.css +0 -146
- package/src/types/atoms.ts +0 -450
- package/src/types/common.ts +0 -116
- package/src/types/index.ts +0 -3
- package/src/types/molecules.ts +0 -279
- package/src/types/schema.ts +0 -12
package/dist/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pxengine/ui",
|
|
3
3
|
"version": "1.0.0",
|
|
4
|
-
"lastUpdated": "2026-02-
|
|
4
|
+
"lastUpdated": "2026-02-13T07:25:36.479Z",
|
|
5
5
|
"components": {
|
|
6
6
|
"AccordionAtom": {
|
|
7
7
|
"name": "AccordionAtom",
|
|
@@ -3041,20 +3041,11 @@
|
|
|
3041
3041
|
"preview": null,
|
|
3042
3042
|
"layoutHints": null
|
|
3043
3043
|
},
|
|
3044
|
-
"CAMPAIGN_SEED_FIELDS": {
|
|
3045
|
-
"name": "CAMPAIGN_SEED_FIELDS",
|
|
3046
|
-
"type": "molecule",
|
|
3047
|
-
"isBuilderComponent": true,
|
|
3048
|
-
"description": "Default field configuration for Campaign Seed",
|
|
3049
|
-
"props": {},
|
|
3050
|
-
"preview": null,
|
|
3051
|
-
"layoutHints": null
|
|
3052
|
-
},
|
|
3053
3044
|
"CampaignSeedCard": {
|
|
3054
3045
|
"name": "CampaignSeedCard",
|
|
3055
3046
|
"type": "molecule",
|
|
3056
3047
|
"isBuilderComponent": true,
|
|
3057
|
-
"description": "CampaignSeedCard\n\nA domain-specific molecule for the Creator Discovery workflow.\nEncapsulates the specific brand info fields and selection status.",
|
|
3048
|
+
"description": "CampaignSeedCard\n\nA domain-specific molecule for the Creator Discovery workflow.\nEncapsulates the specific brand info fields and selection status.\nNow dynamic: if no fields are provided, it generates them from the data object.",
|
|
3058
3049
|
"props": {
|
|
3059
3050
|
"selectionStatus": {
|
|
3060
3051
|
"type": "enum",
|
|
@@ -3070,6 +3061,11 @@
|
|
|
3070
3061
|
"required": false,
|
|
3071
3062
|
"description": "Whether the message is the latest (to show countdown/actions)"
|
|
3072
3063
|
},
|
|
3064
|
+
"fields": {
|
|
3065
|
+
"type": "fieldconfig[]",
|
|
3066
|
+
"required": false,
|
|
3067
|
+
"description": "Optional field configuration to override dynamic generation"
|
|
3068
|
+
},
|
|
3073
3069
|
"id": {
|
|
3074
3070
|
"type": "string",
|
|
3075
3071
|
"required": false,
|
|
@@ -3620,20 +3616,11 @@
|
|
|
3620
3616
|
"preview": null,
|
|
3621
3617
|
"layoutHints": null
|
|
3622
3618
|
},
|
|
3623
|
-
"SEARCH_SPEC_FIELDS": {
|
|
3624
|
-
"name": "SEARCH_SPEC_FIELDS",
|
|
3625
|
-
"type": "molecule",
|
|
3626
|
-
"isBuilderComponent": true,
|
|
3627
|
-
"description": "Default field configuration for Search Specification",
|
|
3628
|
-
"props": {},
|
|
3629
|
-
"preview": null,
|
|
3630
|
-
"layoutHints": null
|
|
3631
|
-
},
|
|
3632
3619
|
"SearchSpecCard": {
|
|
3633
3620
|
"name": "SearchSpecCard",
|
|
3634
3621
|
"type": "molecule",
|
|
3635
3622
|
"isBuilderComponent": true,
|
|
3636
|
-
"description": "SearchSpecCard\n\nA domain-specific molecule for the Creator Discovery workflow.\nEncapsulates search settings like platforms, ranges, and custom keyword bundles.",
|
|
3623
|
+
"description": "SearchSpecCard\n\nA domain-specific molecule for the Creator Discovery workflow.\nEncapsulates search settings like platforms, ranges, and custom keyword bundles.\nNow dynamic: if no fields are provided, it generates them from the data object.",
|
|
3637
3624
|
"props": {
|
|
3638
3625
|
"version": {
|
|
3639
3626
|
"type": "number",
|
|
@@ -3654,6 +3641,11 @@
|
|
|
3654
3641
|
"required": false,
|
|
3655
3642
|
"description": "Whether the message is the latest"
|
|
3656
3643
|
},
|
|
3644
|
+
"fields": {
|
|
3645
|
+
"type": "fieldconfig[]",
|
|
3646
|
+
"required": false,
|
|
3647
|
+
"description": "Optional field configuration to override dynamic generation"
|
|
3648
|
+
},
|
|
3657
3649
|
"id": {
|
|
3658
3650
|
"type": "string",
|
|
3659
3651
|
"required": false,
|
|
@@ -4360,6 +4352,11 @@
|
|
|
4360
4352
|
"type": "cssproperties",
|
|
4361
4353
|
"required": false,
|
|
4362
4354
|
"description": ""
|
|
4355
|
+
},
|
|
4356
|
+
"stats": {
|
|
4357
|
+
"type": "any[]",
|
|
4358
|
+
"required": false,
|
|
4359
|
+
"description": ""
|
|
4363
4360
|
}
|
|
4364
4361
|
},
|
|
4365
4362
|
"preview": null,
|
|
@@ -4418,7 +4415,8 @@
|
|
|
4418
4415
|
},
|
|
4419
4416
|
"tags": {
|
|
4420
4417
|
"type": "{ label: string; value: string; count?: number; }[]",
|
|
4421
|
-
"required":
|
|
4418
|
+
"required": false,
|
|
4419
|
+
"defaultValue": "[]",
|
|
4422
4420
|
"description": ""
|
|
4423
4421
|
},
|
|
4424
4422
|
"id": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxengine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
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
|
-
};
|
package/src/atoms/AlertAtom.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/atoms/AvatarAtom.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/atoms/BadgeAtom.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/atoms/ButtonAtom.tsx
DELETED
|
@@ -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
|
-
};
|
package/src/atoms/CardAtom.tsx
DELETED
|
@@ -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
|
-
};
|