pxengine 0.1.11 → 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 (186) hide show
  1. package/dist/index.cjs +205 -120
  2. package/dist/index.d.cts +1 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +205 -120
  5. package/dist/registry.json +1200 -288
  6. package/package.json +9 -4
  7. package/config/tailwind-preset.js +0 -106
  8. package/src/atoms/AccordionAtom.tsx +0 -44
  9. package/src/atoms/AlertAtom.tsx +0 -46
  10. package/src/atoms/AlertDialogAtom.tsx +0 -66
  11. package/src/atoms/AspectRatioAtom.tsx +0 -27
  12. package/src/atoms/AvatarAtom.tsx +0 -20
  13. package/src/atoms/BadgeAtom.tsx +0 -33
  14. package/src/atoms/BreadcrumbAtom.tsx +0 -36
  15. package/src/atoms/ButtonAtom.tsx +0 -63
  16. package/src/atoms/CalendarAtom.tsx +0 -24
  17. package/src/atoms/CardAtom.tsx +0 -64
  18. package/src/atoms/CarouselAtom.tsx +0 -40
  19. package/src/atoms/ChartAtom.tsx +0 -190
  20. package/src/atoms/CheckboxAtom.tsx +0 -33
  21. package/src/atoms/CollapsibleAtom.tsx +0 -44
  22. package/src/atoms/CommandAtom.tsx +0 -46
  23. package/src/atoms/ContextMenuAtom.tsx +0 -49
  24. package/src/atoms/DialogAtom.tsx +0 -68
  25. package/src/atoms/DrawerAtom.tsx +0 -49
  26. package/src/atoms/DropdownMenuAtom.tsx +0 -49
  27. package/src/atoms/FormInputAtom.tsx +0 -101
  28. package/src/atoms/FormSelectAtom.tsx +0 -110
  29. package/src/atoms/FormTextareaAtom.tsx +0 -93
  30. package/src/atoms/InputAtom.tsx +0 -188
  31. package/src/atoms/InputOTPAtom.tsx +0 -49
  32. package/src/atoms/KbdAtom.tsx +0 -25
  33. package/src/atoms/LabelAtom.tsx +0 -23
  34. package/src/atoms/LayoutAtom.tsx +0 -45
  35. package/src/atoms/PaginationAtom.tsx +0 -49
  36. package/src/atoms/PopoverAtom.tsx +0 -40
  37. package/src/atoms/ProgressAtom.tsx +0 -15
  38. package/src/atoms/RadioGroupAtom.tsx +0 -31
  39. package/src/atoms/RatingAtom.tsx +0 -37
  40. package/src/atoms/ResizableAtom.tsx +0 -51
  41. package/src/atoms/ScrollAreaAtom.tsx +0 -31
  42. package/src/atoms/SeparatorAtom.tsx +0 -16
  43. package/src/atoms/SheetAtom.tsx +0 -72
  44. package/src/atoms/SkeletonAtom.tsx +0 -22
  45. package/src/atoms/SliderAtom.tsx +0 -32
  46. package/src/atoms/SpinnerAtom.tsx +0 -26
  47. package/src/atoms/SwitchAtom.tsx +0 -32
  48. package/src/atoms/TableAtom.tsx +0 -58
  49. package/src/atoms/TabsAtom.tsx +0 -40
  50. package/src/atoms/TextAtom.tsx +0 -35
  51. package/src/atoms/TextareaAtom.tsx +0 -42
  52. package/src/atoms/TimelineAtom.tsx +0 -77
  53. package/src/atoms/ToggleAtom.tsx +0 -36
  54. package/src/atoms/TooltipAtom.tsx +0 -39
  55. package/src/atoms/VideoAtom.tsx +0 -34
  56. package/src/atoms/index.ts +0 -49
  57. package/src/components/index.ts +0 -178
  58. package/src/components/ui/accordion.tsx +0 -56
  59. package/src/components/ui/alert-dialog.tsx +0 -139
  60. package/src/components/ui/alert.tsx +0 -59
  61. package/src/components/ui/aspect-ratio.tsx +0 -5
  62. package/src/components/ui/avatar.tsx +0 -50
  63. package/src/components/ui/badge.tsx +0 -36
  64. package/src/components/ui/breadcrumb.tsx +0 -115
  65. package/src/components/ui/button-group.tsx +0 -83
  66. package/src/components/ui/button.tsx +0 -56
  67. package/src/components/ui/calendar.tsx +0 -213
  68. package/src/components/ui/card.tsx +0 -79
  69. package/src/components/ui/carousel.tsx +0 -260
  70. package/src/components/ui/chart.tsx +0 -367
  71. package/src/components/ui/checkbox.tsx +0 -28
  72. package/src/components/ui/collapsible.tsx +0 -11
  73. package/src/components/ui/command.tsx +0 -153
  74. package/src/components/ui/context-menu.tsx +0 -198
  75. package/src/components/ui/dialog.tsx +0 -122
  76. package/src/components/ui/drawer.tsx +0 -116
  77. package/src/components/ui/dropdown-menu.tsx +0 -200
  78. package/src/components/ui/empty.tsx +0 -104
  79. package/src/components/ui/field.tsx +0 -244
  80. package/src/components/ui/form.tsx +0 -176
  81. package/src/components/ui/hover-card.tsx +0 -27
  82. package/src/components/ui/index.ts +0 -54
  83. package/src/components/ui/input-group.tsx +0 -168
  84. package/src/components/ui/input-otp.tsx +0 -69
  85. package/src/components/ui/input.tsx +0 -22
  86. package/src/components/ui/item.tsx +0 -193
  87. package/src/components/ui/kbd.tsx +0 -28
  88. package/src/components/ui/label.tsx +0 -26
  89. package/src/components/ui/menubar.tsx +0 -254
  90. package/src/components/ui/navigation-menu.tsx +0 -128
  91. package/src/components/ui/pagination.tsx +0 -117
  92. package/src/components/ui/popover.tsx +0 -29
  93. package/src/components/ui/progress.tsx +0 -28
  94. package/src/components/ui/radio-group.tsx +0 -42
  95. package/src/components/ui/resizable.tsx +0 -44
  96. package/src/components/ui/scroll-area.tsx +0 -46
  97. package/src/components/ui/select.tsx +0 -160
  98. package/src/components/ui/separator.tsx +0 -29
  99. package/src/components/ui/sheet.tsx +0 -140
  100. package/src/components/ui/sidebar.tsx +0 -771
  101. package/src/components/ui/skeleton.tsx +0 -15
  102. package/src/components/ui/slider.tsx +0 -26
  103. package/src/components/ui/sonner.tsx +0 -45
  104. package/src/components/ui/spinner.tsx +0 -16
  105. package/src/components/ui/switch.tsx +0 -27
  106. package/src/components/ui/table.tsx +0 -117
  107. package/src/components/ui/tabs.tsx +0 -53
  108. package/src/components/ui/textarea.tsx +0 -22
  109. package/src/components/ui/toggle-group.tsx +0 -61
  110. package/src/components/ui/toggle.tsx +0 -43
  111. package/src/components/ui/tooltip.tsx +0 -30
  112. package/src/hooks/use-mobile.tsx +0 -19
  113. package/src/index.ts +0 -24
  114. package/src/lib/countries.ts +0 -203
  115. package/src/lib/index.ts +0 -2
  116. package/src/lib/utils.ts +0 -15
  117. package/src/lib/validators/index.ts +0 -1
  118. package/src/lib/validators/theme.ts +0 -148
  119. package/src/molecules/creator-discovery/AudienceDemographicsCard/AudienceDemographicsCard.tsx +0 -44
  120. package/src/molecules/creator-discovery/AudienceDemographicsCard/index.ts +0 -1
  121. package/src/molecules/creator-discovery/AudienceMetricCard/AudienceMetricCard.tsx +0 -50
  122. package/src/molecules/creator-discovery/AudienceMetricCard/index.ts +0 -1
  123. package/src/molecules/creator-discovery/BrandAffinityGroup/BrandAffinityGroup.tsx +0 -36
  124. package/src/molecules/creator-discovery/BrandAffinityGroup/index.ts +0 -1
  125. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.tsx +0 -123
  126. package/src/molecules/creator-discovery/CampaignSeedCard/CampaignSeedCard.types.ts +0 -13
  127. package/src/molecules/creator-discovery/CampaignSeedCard/index.ts +0 -2
  128. package/src/molecules/creator-discovery/ContentPreviewGallery/ContentPreviewGallery.tsx +0 -41
  129. package/src/molecules/creator-discovery/ContentPreviewGallery/index.ts +0 -1
  130. package/src/molecules/creator-discovery/CreatorActionHeader/CreatorActionHeader.tsx +0 -77
  131. package/src/molecules/creator-discovery/CreatorActionHeader/index.ts +0 -1
  132. package/src/molecules/creator-discovery/CreatorGridCard/CreatorGridCard.tsx +0 -104
  133. package/src/molecules/creator-discovery/CreatorGridCard/index.ts +0 -1
  134. package/src/molecules/creator-discovery/CreatorProfileSummary/CreatorProfileSummary.tsx +0 -65
  135. package/src/molecules/creator-discovery/CreatorProfileSummary/index.ts +0 -1
  136. package/src/molecules/creator-discovery/GrowthChartCard/GrowthChartCard.tsx +0 -58
  137. package/src/molecules/creator-discovery/GrowthChartCard/index.ts +0 -1
  138. package/src/molecules/creator-discovery/MCQCard/MCQCard.tsx +0 -165
  139. package/src/molecules/creator-discovery/MCQCard/MCQCard.types.ts +0 -71
  140. package/src/molecules/creator-discovery/MCQCard/index.ts +0 -2
  141. package/src/molecules/creator-discovery/PlatformIconGroup/PlatformIconGroup.tsx +0 -72
  142. package/src/molecules/creator-discovery/PlatformIconGroup/index.ts +0 -1
  143. package/src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx +0 -334
  144. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.tsx +0 -111
  145. package/src/molecules/creator-discovery/SearchSpecCard/SearchSpecCard.types.ts +0 -18
  146. package/src/molecules/creator-discovery/SearchSpecCard/index.ts +0 -3
  147. package/src/molecules/creator-discovery/TopPostsGrid/TopPostsGrid.tsx +0 -49
  148. package/src/molecules/creator-discovery/TopPostsGrid/index.ts +0 -1
  149. package/src/molecules/creator-discovery/index.ts +0 -13
  150. package/src/molecules/generic/ActionButton/ActionButton.tsx +0 -137
  151. package/src/molecules/generic/ActionButton/ActionButton.types.ts +0 -68
  152. package/src/molecules/generic/ActionButton/index.ts +0 -2
  153. package/src/molecules/generic/DataGrid/DataGrid.tsx +0 -102
  154. package/src/molecules/generic/DataGrid/index.ts +0 -1
  155. package/src/molecules/generic/EditableField/EditableField.tsx +0 -229
  156. package/src/molecules/generic/EditableField/EditableField.types.ts +0 -73
  157. package/src/molecules/generic/EditableField/index.ts +0 -2
  158. package/src/molecules/generic/EmptyState/EmptyState.tsx +0 -61
  159. package/src/molecules/generic/EmptyState/index.ts +0 -1
  160. package/src/molecules/generic/FileUpload/FileUpload.tsx +0 -62
  161. package/src/molecules/generic/FileUpload/index.ts +0 -1
  162. package/src/molecules/generic/FilterBar/FilterBar.tsx +0 -54
  163. package/src/molecules/generic/FilterBar/index.ts +0 -1
  164. package/src/molecules/generic/FormCard/FormCard.tsx +0 -136
  165. package/src/molecules/generic/FormCard/FormCard.types.ts +0 -93
  166. package/src/molecules/generic/FormCard/index.ts +0 -2
  167. package/src/molecules/generic/LoadingOverlay/LoadingOverlay.tsx +0 -39
  168. package/src/molecules/generic/LoadingOverlay/index.ts +0 -1
  169. package/src/molecules/generic/NotificationList/NotificationList.tsx +0 -80
  170. package/src/molecules/generic/NotificationList/index.ts +0 -1
  171. package/src/molecules/generic/StatsGrid/StatsGrid.tsx +0 -80
  172. package/src/molecules/generic/StatsGrid/index.ts +0 -1
  173. package/src/molecules/generic/StepWizard/StepWizard.tsx +0 -67
  174. package/src/molecules/generic/StepWizard/index.ts +0 -1
  175. package/src/molecules/generic/TagCloud/TagCloud.tsx +0 -32
  176. package/src/molecules/generic/TagCloud/index.ts +0 -1
  177. package/src/molecules/generic/index.ts +0 -12
  178. package/src/molecules/index.ts +0 -2
  179. package/src/render/PXEngineRenderer.tsx +0 -416
  180. package/src/render/index.ts +0 -1
  181. package/src/styles/globals.css +0 -146
  182. package/src/types/atoms.ts +0 -449
  183. package/src/types/common.ts +0 -116
  184. package/src/types/index.ts +0 -3
  185. package/src/types/molecules.ts +0 -279
  186. package/src/types/schema.ts +0 -12
package/dist/index.js CHANGED
@@ -31526,7 +31526,8 @@ import { jsx as jsx41 } from "react/jsx-runtime";
31526
31526
  var TextAtom = ({
31527
31527
  content,
31528
31528
  variant = "p",
31529
- className
31529
+ className,
31530
+ style
31530
31531
  }) => {
31531
31532
  const baseStyles = {
31532
31533
  h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl text-gray900",
@@ -31539,7 +31540,7 @@ var TextAtom = ({
31539
31540
  label: "text-[10px] font-bold text-gray400 uppercase tracking-widest pl-1"
31540
31541
  };
31541
31542
  const Component2 = variant === "small" || variant === "muted" || variant === "label" ? "p" : variant;
31542
- return /* @__PURE__ */ jsx41(Component2, { className: cn(baseStyles[variant], className), children: content });
31543
+ return /* @__PURE__ */ jsx41(Component2, { className: cn(baseStyles[variant], className), style, children: content });
31543
31544
  };
31544
31545
 
31545
31546
  // src/atoms/ButtonAtom.tsx
@@ -31552,7 +31553,8 @@ var ButtonAtom = ({
31552
31553
  disabled = false,
31553
31554
  isLoading = false,
31554
31555
  onAction,
31555
- className
31556
+ className,
31557
+ style
31556
31558
  }) => {
31557
31559
  const handleClick = (e) => {
31558
31560
  e.preventDefault();
@@ -31575,6 +31577,7 @@ var ButtonAtom = ({
31575
31577
  disabled: disabled || isLoading,
31576
31578
  onClick: handleClick,
31577
31579
  className: cn("rounded-full font-semibold", customClass, className),
31580
+ style,
31578
31581
  children: isLoading ? /* @__PURE__ */ jsxs18(Fragment, { children: [
31579
31582
  /* @__PURE__ */ jsx42(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
31580
31583
  label
@@ -31619,6 +31622,7 @@ var CardAtom = ({
31619
31622
  children,
31620
31623
  footer,
31621
31624
  className,
31625
+ style,
31622
31626
  renderComponent
31623
31627
  }) => {
31624
31628
  return /* @__PURE__ */ jsxs19(
@@ -31628,6 +31632,7 @@ var CardAtom = ({
31628
31632
  "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",
31629
31633
  className
31630
31634
  ),
31635
+ style,
31631
31636
  children: [
31632
31637
  (title || description) && /* @__PURE__ */ jsxs19(CardHeader, { children: [
31633
31638
  title && /* @__PURE__ */ jsx44(CardTitle, { className: "text-xl font-bold text-gray900", children: title }),
@@ -31651,7 +31656,8 @@ var InputAtom = ({
31651
31656
  disabled,
31652
31657
  options,
31653
31658
  config,
31654
- className
31659
+ className,
31660
+ style
31655
31661
  }) => {
31656
31662
  const containerClass = cn("flex flex-col gap-2 w-full", className);
31657
31663
  const renderLabel = () => {
@@ -31663,82 +31669,116 @@ var InputAtom = ({
31663
31669
  ] });
31664
31670
  };
31665
31671
  const renderInput = () => {
31672
+ const commonProps = {
31673
+ placeholder,
31674
+ value: defaultValue,
31675
+ disabled,
31676
+ required,
31677
+ readOnly: true,
31678
+ className: cn(
31679
+ "rounded-xl border-border bg-background focus:ring-primary shadow-sm",
31680
+ className
31681
+ ),
31682
+ style
31683
+ };
31666
31684
  switch (inputType) {
31667
31685
  case "textarea":
31668
- return /* @__PURE__ */ jsx45(
31669
- Textarea,
31670
- {
31671
- className: "rounded-xl border-border bg-background focus:ring-primary shadow-sm",
31672
- placeholder,
31673
- defaultValue,
31674
- disabled,
31675
- rows: config?.rows || 3
31676
- }
31677
- );
31686
+ return /* @__PURE__ */ jsx45(Textarea, { ...commonProps, rows: config?.rows || 3 });
31678
31687
  case "select":
31679
- return /* @__PURE__ */ jsxs20(Select, { defaultValue, disabled, children: [
31680
- /* @__PURE__ */ jsx45(SelectTrigger, { className: "rounded-xl border-border bg-background shadow-sm", children: /* @__PURE__ */ jsx45(SelectValue, { placeholder: placeholder || "Select option" }) }),
31688
+ return /* @__PURE__ */ jsxs20(Select, { value: defaultValue, disabled, children: [
31689
+ /* @__PURE__ */ jsx45(
31690
+ SelectTrigger,
31691
+ {
31692
+ className: cn(
31693
+ "rounded-xl border-border bg-background shadow-sm",
31694
+ className
31695
+ ),
31696
+ style,
31697
+ children: /* @__PURE__ */ jsx45(SelectValue, { placeholder: placeholder || "Select option" })
31698
+ }
31699
+ ),
31681
31700
  /* @__PURE__ */ jsx45(SelectContent, { className: "rounded-xl border-border shadow-xl", children: options?.map((opt) => /* @__PURE__ */ jsx45(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
31682
31701
  ] });
31683
31702
  case "slider":
31684
- return /* @__PURE__ */ jsx45("div", { className: "pt-2 pb-1", children: /* @__PURE__ */ jsx45(
31703
+ return /* @__PURE__ */ jsx45("div", { className: "pt-2 pb-1", style, children: /* @__PURE__ */ jsx45(
31685
31704
  Slider,
31686
31705
  {
31687
- defaultValue: [defaultValue || config?.min || 0],
31706
+ value: [defaultValue || config?.min || 0],
31688
31707
  max: config?.max || 100,
31689
31708
  min: config?.min || 0,
31690
31709
  step: config?.step || 1,
31691
31710
  disabled,
31692
- className: "py-4"
31711
+ className: cn("py-4", className)
31693
31712
  }
31694
31713
  ) });
31695
31714
  case "checkbox":
31696
- return /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-3 py-1.5 px-0.5 group cursor-pointer", children: [
31697
- /* @__PURE__ */ jsx45(
31698
- Checkbox,
31699
- {
31700
- id: label,
31701
- defaultChecked: defaultValue,
31702
- disabled,
31703
- className: "rounded-[6px] border-border data-[state=checked]:bg-primary shadow-sm"
31704
- }
31705
- ),
31706
- /* @__PURE__ */ jsx45(
31707
- "label",
31708
- {
31709
- htmlFor: label,
31710
- className: "text-sm font-medium leading-none cursor-pointer text-foreground/90 group-hover:text-foreground transition-colors",
31711
- children: label
31712
- }
31713
- )
31714
- ] });
31715
+ return /* @__PURE__ */ jsxs20(
31716
+ "div",
31717
+ {
31718
+ className: cn(
31719
+ "flex items-center space-x-3 py-1.5 px-0.5 group cursor-pointer",
31720
+ className
31721
+ ),
31722
+ style,
31723
+ children: [
31724
+ /* @__PURE__ */ jsx45(
31725
+ Checkbox,
31726
+ {
31727
+ id: label,
31728
+ checked: defaultValue,
31729
+ disabled,
31730
+ className: "rounded-[6px] border-border data-[state=checked]:bg-primary shadow-sm"
31731
+ }
31732
+ ),
31733
+ /* @__PURE__ */ jsx45(
31734
+ "label",
31735
+ {
31736
+ htmlFor: label,
31737
+ className: "text-sm font-medium leading-none cursor-pointer text-foreground/90 group-hover:text-foreground transition-colors",
31738
+ children: label
31739
+ }
31740
+ )
31741
+ ]
31742
+ }
31743
+ );
31715
31744
  case "switch":
31716
- return /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between py-1.5 px-0.5", children: [
31717
- /* @__PURE__ */ jsx45(
31718
- Label,
31719
- {
31720
- htmlFor: label,
31721
- className: "cursor-pointer text-foreground/90",
31722
- children: label
31723
- }
31724
- ),
31725
- /* @__PURE__ */ jsx45(
31726
- Switch,
31727
- {
31728
- id: label,
31729
- defaultChecked: defaultValue,
31730
- disabled,
31731
- className: "data-[state=checked]:bg-primary shadow-sm"
31732
- }
31733
- )
31734
- ] });
31745
+ return /* @__PURE__ */ jsxs20(
31746
+ "div",
31747
+ {
31748
+ className: cn(
31749
+ "flex items-center justify-between py-1.5 px-0.5",
31750
+ className
31751
+ ),
31752
+ style,
31753
+ children: [
31754
+ /* @__PURE__ */ jsx45(
31755
+ Label,
31756
+ {
31757
+ htmlFor: label,
31758
+ className: "cursor-pointer text-foreground/90",
31759
+ children: label
31760
+ }
31761
+ ),
31762
+ /* @__PURE__ */ jsx45(
31763
+ Switch,
31764
+ {
31765
+ id: label,
31766
+ checked: defaultValue,
31767
+ disabled,
31768
+ className: "data-[state=checked]:bg-primary shadow-sm"
31769
+ }
31770
+ )
31771
+ ]
31772
+ }
31773
+ );
31735
31774
  case "radio":
31736
31775
  return /* @__PURE__ */ jsx45(
31737
31776
  RadioGroup,
31738
31777
  {
31739
- defaultValue,
31778
+ value: defaultValue,
31740
31779
  disabled,
31741
- className: "gap-2.5",
31780
+ className: cn("gap-2.5", className),
31781
+ style,
31742
31782
  children: options?.map((opt) => /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-3", children: [
31743
31783
  /* @__PURE__ */ jsx45(
31744
31784
  RadioGroupItem,
@@ -31760,37 +31800,44 @@ var InputAtom = ({
31760
31800
  }
31761
31801
  );
31762
31802
  case "otp":
31763
- return /* @__PURE__ */ jsx45("div", { className: "flex justify-center py-2", children: /* @__PURE__ */ jsx45(
31764
- InputOTP,
31803
+ return /* @__PURE__ */ jsx45(
31804
+ "div",
31765
31805
  {
31766
- maxLength: config?.maxLength || 6,
31767
- disabled,
31768
- defaultValue,
31769
- children: /* @__PURE__ */ jsx45(InputOTPGroup, { className: "gap-2", children: Array.from({ length: config?.maxLength || 6 }).map((_, i) => /* @__PURE__ */ jsx45(
31770
- InputOTPSlot,
31806
+ className: cn("flex justify-center py-2", className),
31807
+ style,
31808
+ children: /* @__PURE__ */ jsx45(
31809
+ InputOTP,
31771
31810
  {
31772
- index: i,
31773
- className: "rounded-xl border border-border bg-background shadow-sm"
31774
- },
31775
- i
31776
- )) })
31811
+ maxLength: config?.maxLength || 6,
31812
+ disabled,
31813
+ value: defaultValue,
31814
+ children: /* @__PURE__ */ jsx45(InputOTPGroup, { className: "gap-2", children: Array.from({ length: config?.maxLength || 6 }).map((_, i) => /* @__PURE__ */ jsx45(
31815
+ InputOTPSlot,
31816
+ {
31817
+ index: i,
31818
+ className: "rounded-xl border border-border bg-background shadow-sm"
31819
+ },
31820
+ i
31821
+ )) })
31822
+ }
31823
+ )
31777
31824
  }
31778
- ) });
31825
+ );
31779
31826
  default:
31780
31827
  return /* @__PURE__ */ jsx45(
31781
31828
  Input,
31782
31829
  {
31830
+ ...commonProps,
31783
31831
  type: inputType,
31784
- placeholder,
31785
- defaultValue,
31786
- disabled,
31787
- required,
31788
- className: "rounded-xl border-border bg-background focus:ring-primary shadow-sm h-11"
31832
+ className: cn(
31833
+ "rounded-xl border-border bg-background focus:ring-primary shadow-sm h-11",
31834
+ className
31835
+ )
31789
31836
  }
31790
31837
  );
31791
31838
  }
31792
31839
  };
31793
- return /* @__PURE__ */ jsxs20("div", { className: containerClass, children: [
31840
+ return /* @__PURE__ */ jsxs20("div", { className: containerClass, style, children: [
31794
31841
  inputType !== "checkbox" && inputType !== "switch" && renderLabel(),
31795
31842
  renderInput()
31796
31843
  ] });
@@ -31801,7 +31848,8 @@ import { jsx as jsx46 } from "react/jsx-runtime";
31801
31848
  var BadgeAtom = ({
31802
31849
  label,
31803
31850
  variant = "default",
31804
- className
31851
+ className,
31852
+ style
31805
31853
  }) => {
31806
31854
  const customVariants = {
31807
31855
  purple: "bg-primary/10 text-primary border-primary/20 hover:bg-primary/20",
@@ -31819,6 +31867,7 @@ var BadgeAtom = ({
31819
31867
  customClass,
31820
31868
  className
31821
31869
  ),
31870
+ style,
31822
31871
  children: label
31823
31872
  }
31824
31873
  );
@@ -31830,9 +31879,10 @@ var AvatarAtom = ({
31830
31879
  src,
31831
31880
  fallback,
31832
31881
  alt,
31833
- className
31882
+ className,
31883
+ style
31834
31884
  }) => {
31835
- return /* @__PURE__ */ jsxs21(Avatar, { className: cn("h-10 w-10", className), children: [
31885
+ return /* @__PURE__ */ jsxs21(Avatar, { className: cn("h-10 w-10", className), style, children: [
31836
31886
  src && /* @__PURE__ */ jsx47(AvatarImage, { src, alt }),
31837
31887
  /* @__PURE__ */ jsx47(AvatarFallback, { className: "bg-purple50 text-purple600 font-bold uppercase", children: fallback })
31838
31888
  ] });
@@ -31919,7 +31969,8 @@ var AlertAtom = ({
31919
31969
  title,
31920
31970
  description,
31921
31971
  variant = "default",
31922
- className
31972
+ className,
31973
+ style
31923
31974
  }) => {
31924
31975
  const IconMap = {
31925
31976
  default: Info,
@@ -31941,6 +31992,7 @@ var AlertAtom = ({
31941
31992
  {
31942
31993
  variant: shadcnVariant,
31943
31994
  className: cn("rounded-2xl", customClass, className),
31995
+ style,
31944
31996
  children: [
31945
31997
  /* @__PURE__ */ jsx52(Icon3, { className: "h-4 w-4" }),
31946
31998
  /* @__PURE__ */ jsx52(AlertTitle, { className: "font-bold", children: title }),
@@ -31970,7 +32022,8 @@ import { jsx as jsx54, jsxs as jsxs25 } from "react/jsx-runtime";
31970
32022
  var TableAtom = ({
31971
32023
  headers,
31972
32024
  rows,
31973
- className
32025
+ className,
32026
+ style
31974
32027
  }) => {
31975
32028
  return /* @__PURE__ */ jsx54(
31976
32029
  "div",
@@ -31979,6 +32032,7 @@ var TableAtom = ({
31979
32032
  "rounded-2xl border border-gray-100 overflow-hidden bg-white",
31980
32033
  className
31981
32034
  ),
32035
+ style,
31982
32036
  children: /* @__PURE__ */ jsxs25(Table3, { children: [
31983
32037
  /* @__PURE__ */ jsx54(TableHeader, { className: "bg-gray-50/50", children: /* @__PURE__ */ jsx54(TableRow, { children: headers.map((header, i) => /* @__PURE__ */ jsx54(
31984
32038
  TableHead,
@@ -33092,7 +33146,8 @@ var ChartAtom = ({
33092
33146
  showTooltip = true,
33093
33147
  showLegend = true,
33094
33148
  stacked = false,
33095
- className
33149
+ className,
33150
+ style
33096
33151
  }) => {
33097
33152
  const renderChart = () => {
33098
33153
  switch (chartType) {
@@ -33233,6 +33288,7 @@ var ChartAtom = ({
33233
33288
  {
33234
33289
  config,
33235
33290
  className: cn("min-h-[200px] w-full", className),
33291
+ style,
33236
33292
  children: renderChart()
33237
33293
  }
33238
33294
  );
@@ -37249,7 +37305,50 @@ var renderNotFoundError = (componentName, key) => {
37249
37305
  };
37250
37306
  var normalizeProps = (props) => {
37251
37307
  const normalized = {};
37308
+ const dynamicStyle = {};
37252
37309
  Object.entries(props).forEach(([key, value]) => {
37310
+ if (key === "className" && typeof value === "string") {
37311
+ const classes = value.match(/(?:[^\s\[]|\[[^\]]*\])+/g) || [];
37312
+ classes.forEach((cls) => {
37313
+ const hexMatch = cls.match(
37314
+ /^(bg|text|border)-\[#([0-9a-fA-F]{3,6})(?:\/(\d+))?\]$/
37315
+ );
37316
+ if (hexMatch) {
37317
+ const [, type, hex, opacity] = hexMatch;
37318
+ const color = `#${hex}${opacity ? Math.round(parseInt(opacity) / 100 * 255).toString(16).padStart(2, "0") : ""}`;
37319
+ if (type === "bg") dynamicStyle.backgroundColor = color;
37320
+ if (type === "text") dynamicStyle.color = color;
37321
+ if (type === "border") dynamicStyle.borderColor = color;
37322
+ }
37323
+ const roundedMatch = cls.match(/^rounded-\[(.+)\]$/);
37324
+ if (roundedMatch) {
37325
+ dynamicStyle.borderRadius = roundedMatch[1].replace(/_/g, " ");
37326
+ }
37327
+ const paddingMatch = cls.match(/^(p|px|py)-\[(.+)\]$/);
37328
+ if (paddingMatch) {
37329
+ const [, type, val] = paddingMatch;
37330
+ const cssVal = val.replace(/_/g, " ");
37331
+ if (type === "p") dynamicStyle.padding = cssVal;
37332
+ if (type === "px") {
37333
+ dynamicStyle.paddingLeft = cssVal;
37334
+ dynamicStyle.paddingRight = cssVal;
37335
+ }
37336
+ if (type === "py") {
37337
+ dynamicStyle.paddingTop = cssVal;
37338
+ dynamicStyle.paddingBottom = cssVal;
37339
+ }
37340
+ }
37341
+ const shadowMatch = cls.match(/^shadow-\[(.+)\]$/);
37342
+ if (shadowMatch) {
37343
+ dynamicStyle.boxShadow = shadowMatch[1].replace(/_/g, " ");
37344
+ }
37345
+ });
37346
+ normalized[key] = value;
37347
+ return;
37348
+ }
37349
+ if (["type", "component", "name"].includes(key)) {
37350
+ return;
37351
+ }
37253
37352
  if (value === "true") {
37254
37353
  normalized[key] = true;
37255
37354
  return;
@@ -37258,15 +37357,13 @@ var normalizeProps = (props) => {
37258
37357
  normalized[key] = false;
37259
37358
  return;
37260
37359
  }
37261
- if (typeof value === "string" && value.trim() !== "" && !isNaN(Number(value)) && // Don't convert strings that are purely numeric but might be IDs or phone numbers
37262
- // A simple heuristic: if it's a small integer or a float, it's likely a prop number
37263
- (value.includes(".") || value.length < 10 && !value.startsWith("0") || value === "0")) {
37360
+ if (typeof value === "string" && value.trim() !== "" && !isNaN(Number(value)) && (value.includes(".") || value.length < 10 && !value.startsWith("0") || value === "0")) {
37264
37361
  normalized[key] = Number(value);
37265
37362
  return;
37266
37363
  }
37267
37364
  normalized[key] = value;
37268
37365
  });
37269
- return normalized;
37366
+ return { normalized, dynamicStyle };
37270
37367
  };
37271
37368
  var PXEngineRenderer = ({
37272
37369
  schema,
@@ -37294,29 +37391,11 @@ var PXEngineRenderer = ({
37294
37391
  const componentName = name || type || componentType;
37295
37392
  if (!componentName || typeof componentName !== "string") return null;
37296
37393
  const rawProps = { ...remainingProps, ...props };
37297
- const finalProps = normalizeProps(rawProps);
37298
- if (process.env.NODE_ENV === "development") {
37299
- const propTypes = Object.fromEntries(
37300
- Object.entries(finalProps).map(([k, v]) => [k, typeof v])
37301
- );
37302
- console.log(
37303
- `[PXEngineRenderer] Final props for ${componentName}:`,
37304
- finalProps,
37305
- "Types:",
37306
- propTypes
37307
- );
37308
- }
37394
+ const { normalized: finalProps, dynamicStyle } = normalizeProps(rawProps);
37309
37395
  if (id && !finalProps.id) {
37310
37396
  finalProps.id = id;
37311
37397
  }
37312
37398
  const uniqueKey = id || `${componentName}-${index || Math.random().toString(36).substr(2, 9)}`;
37313
- if (process.env.NODE_ENV === "development") {
37314
- console.log(`[PXEngineRenderer] Rendering ${componentName}`, {
37315
- id,
37316
- props: finalProps,
37317
- childrenCount: Array.isArray(children) ? children.length : children ? 1 : 0
37318
- });
37319
- }
37320
37399
  const normalizedName = componentName.charAt(0).toUpperCase() + componentName.slice(1);
37321
37400
  const resolveComponent = (identifier) => {
37322
37401
  const normalized = identifier.charAt(0).toUpperCase() + identifier.slice(1);
@@ -37340,11 +37419,6 @@ var PXEngineRenderer = ({
37340
37419
  }
37341
37420
  if (!TargetComponent) {
37342
37421
  if (CONTEXT_DEPENDENT_COMPONENTS.has(normalizedName)) {
37343
- if (process.env.NODE_ENV === "development") {
37344
- console.error(
37345
- `[PXEngineRenderer] Cannot render context-dependent component: ${componentName}. Use ${COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom`} instead.`
37346
- );
37347
- }
37348
37422
  return renderContextDependentError(
37349
37423
  componentName,
37350
37424
  normalizedName,
@@ -37357,20 +37431,31 @@ var PXEngineRenderer = ({
37357
37431
  return renderNotFoundError(componentName, uniqueKey);
37358
37432
  }
37359
37433
  }
37360
- if (process.env.NODE_ENV === "development") {
37361
- console.log(
37362
- `[PXEngineRenderer] Resolved ${componentName} to component`,
37363
- TargetComponent.displayName || TargetComponent.name || "Anonymous"
37364
- );
37365
- }
37366
37434
  const resolvedNormalized = resolvedIdentifier.charAt(0).toUpperCase() + resolvedIdentifier.slice(1);
37367
37435
  const atomName = resolvedNormalized.endsWith("Atom") ? resolvedNormalized : `${resolvedNormalized}Atom`;
37368
- const isAtomWithRenderProp = atomName in atoms_exports;
37436
+ const ATOMS_WITH_RENDER = /* @__PURE__ */ new Set([
37437
+ "LayoutAtom",
37438
+ "CardAtom",
37439
+ "TabsAtom",
37440
+ "AccordionAtom",
37441
+ "ScrollAreaAtom",
37442
+ "CarouselAtom",
37443
+ "AspectRatioAtom",
37444
+ "CollapsibleAtom",
37445
+ "TooltipAtom",
37446
+ "PopoverAtom",
37447
+ "DialogAtom",
37448
+ "SheetAtom",
37449
+ "ResizableAtom"
37450
+ ]);
37451
+ const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
37452
+ const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
37369
37453
  if (isAtomWithRenderProp) {
37370
37454
  return /* @__PURE__ */ jsx126(
37371
37455
  TargetComponent,
37372
37456
  {
37373
37457
  ...finalProps,
37458
+ style: finalStyle,
37374
37459
  onAction,
37375
37460
  renderComponent: renderRecursive,
37376
37461
  children
@@ -37378,7 +37463,7 @@ var PXEngineRenderer = ({
37378
37463
  uniqueKey
37379
37464
  );
37380
37465
  } else {
37381
- return /* @__PURE__ */ jsx126(TargetComponent, { ...finalProps, children: Array.isArray(children) ? children.map((child, idx) => renderRecursive(child, idx)) : children }, uniqueKey);
37466
+ return /* @__PURE__ */ jsx126(TargetComponent, { ...finalProps, style: finalStyle, children: Array.isArray(children) ? children.map((child, idx) => renderRecursive(child, idx)) : children }, uniqueKey);
37382
37467
  }
37383
37468
  };
37384
37469
  return /* @__PURE__ */ jsx126("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });