pxengine 0.1.58 → 0.1.59

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 CHANGED
@@ -428,9 +428,11 @@ var TextAtom = ({
428
428
  label: "var(--gray400)"
429
429
  };
430
430
  const Component2 = variant === "small" || variant === "muted" || variant === "label" ? "p" : variant;
431
+ const hasPxBg = style && "--px-bg-color" in style;
431
432
  const wrapperStyles = {
432
433
  color: `var(--px-text-color, ${defaultColors[variant] ?? "inherit"})`,
433
434
  ...backgroundColor && { backgroundColor },
435
+ ...hasPxBg && { backgroundColor: "var(--px-bg-color, transparent)" },
434
436
  ...style
435
437
  };
436
438
  if (markdown) {
@@ -24893,14 +24895,20 @@ var IconAtom = ({
24893
24895
  console.warn(`[IconAtom] Icon "${icon}" not found in lucide-react.`);
24894
24896
  return null;
24895
24897
  }
24898
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
24899
+ const resolvedColor = hasPxVars ? void 0 : color;
24900
+ const resolvedStyle = {
24901
+ ...hasPxVars && { color: "var(--px-text-color, currentColor)" },
24902
+ ...style
24903
+ };
24896
24904
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
24897
24905
  IconComponent,
24898
24906
  {
24899
24907
  size,
24900
- color,
24908
+ color: resolvedColor,
24901
24909
  strokeWidth,
24902
- className: cn("shrink-0", textColor, className),
24903
- style
24910
+ className: cn("shrink-0", !hasPxVars && textColor, className),
24911
+ style: resolvedStyle
24904
24912
  }
24905
24913
  );
24906
24914
  };
@@ -24935,6 +24943,14 @@ var ButtonAtom = ({
24935
24943
  };
24936
24944
  const customClass = variantMap[variant] || "";
24937
24945
  const shadcnVariant = ["purple", "gradient"].includes(variant) ? "default" : variant;
24946
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
24947
+ const mergedStyle = {
24948
+ ...style,
24949
+ ...hasPxVars ? {
24950
+ backgroundColor: "var(--px-accent-color)",
24951
+ color: "var(--px-accent-fg)"
24952
+ } : {}
24953
+ };
24938
24954
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
24939
24955
  Button,
24940
24956
  {
@@ -24943,7 +24959,8 @@ var ButtonAtom = ({
24943
24959
  disabled: disabled || isLoading,
24944
24960
  onClick: handleClick,
24945
24961
  className: cn("rounded-full font-semibold", customClass, className),
24946
- style,
24962
+ style: mergedStyle,
24963
+ "data-px-styled": hasPxVars ? "" : void 0,
24947
24964
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
24948
24965
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
24949
24966
  label
@@ -25072,6 +25089,15 @@ var CardAtom = ({
25072
25089
  style,
25073
25090
  renderComponent
25074
25091
  }) => {
25092
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
25093
+ const mergedStyle = {
25094
+ ...style,
25095
+ ...hasPxVars ? {
25096
+ backgroundColor: "var(--px-bg-color)",
25097
+ borderColor: "var(--px-border-color)",
25098
+ color: "var(--px-text-color)"
25099
+ } : {}
25100
+ };
25075
25101
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
25076
25102
  Card,
25077
25103
  {
@@ -25079,13 +25105,14 @@ var CardAtom = ({
25079
25105
  "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",
25080
25106
  className
25081
25107
  ),
25082
- style,
25108
+ style: mergedStyle,
25109
+ "data-px-styled": hasPxVars ? "" : void 0,
25083
25110
  children: [
25084
25111
  (title || description) && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CardHeader, { children: [
25085
25112
  title && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardTitle, { className: "text-xl font-bold text-gray900", children: title }),
25086
25113
  description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardDescription, { children: description })
25087
25114
  ] }),
25088
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "space-y-4", children: children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
25115
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardContent, { className: "space-y-4", children: (children || []).map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
25089
25116
  footer && footer.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CardFooter, { className: "bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6", children: footer.map((footerChild, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.default.Fragment, { children: renderComponent(footerChild, index) }, footerChild.id || `card-footer-${index}`)) })
25090
25117
  ]
25091
25118
  }
@@ -25434,8 +25461,9 @@ var InputAtom = ({
25434
25461
  const alignmentClass = getAlignmentClass(style?.textAlign);
25435
25462
  const alignedContainerClass = cn(containerClass, alignmentClass);
25436
25463
  const { textAlign, ...remainingStyle } = style || {};
25464
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
25437
25465
  const labelBaseStyle = {
25438
- color: labelColor,
25466
+ color: hasPxVars ? "var(--px-label-color, inherit)" : labelColor,
25439
25467
  backgroundColor: "transparent",
25440
25468
  background: "none"
25441
25469
  };
@@ -25455,6 +25483,14 @@ var InputAtom = ({
25455
25483
  );
25456
25484
  };
25457
25485
  const renderInput = () => {
25486
+ const inputStyle = {
25487
+ ...hasPxVars && {
25488
+ color: "var(--px-text-color, inherit)",
25489
+ backgroundColor: "var(--px-bg-color, transparent)",
25490
+ borderColor: "var(--px-border-color, hsl(var(--border)))"
25491
+ },
25492
+ ...remainingStyle
25493
+ };
25458
25494
  const commonProps = {
25459
25495
  placeholder,
25460
25496
  value: defaultValue,
@@ -25465,7 +25501,7 @@ var InputAtom = ({
25465
25501
  "rounded-xl border-border bg-transparent focus:ring-primary shadow-none",
25466
25502
  className
25467
25503
  ),
25468
- style: remainingStyle
25504
+ style: inputStyle
25469
25505
  };
25470
25506
  switch (inputType) {
25471
25507
  case "textarea":
@@ -25585,7 +25621,6 @@ var InputAtom = ({
25585
25621
  );
25586
25622
  }
25587
25623
  };
25588
- const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
25589
25624
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: alignedContainerClass, style: remainingStyle, "data-px-styled": hasPxVars ? "" : void 0, children: [
25590
25625
  inputType !== "checkbox" && inputType !== "switch" && renderLabel(),
25591
25626
  renderInput()
@@ -25701,9 +25736,22 @@ var AvatarAtom = ({
25701
25736
  className,
25702
25737
  style
25703
25738
  }) => {
25704
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Avatar, { className: cn("h-10 w-10", className), style, children: [
25739
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
25740
+ const fallbackStyle = hasPxVars ? {
25741
+ backgroundColor: "var(--px-bg-color, var(--purple50))",
25742
+ color: "var(--px-text-color, var(--purple100))",
25743
+ borderColor: "var(--px-border-color, transparent)"
25744
+ } : void 0;
25745
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Avatar, { className: cn("h-10 w-10", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: [
25705
25746
  src && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AvatarImage, { src, alt }),
25706
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AvatarFallback, { className: "bg-purple50 text-purple600 font-bold uppercase", children: fallback })
25747
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
25748
+ AvatarFallback,
25749
+ {
25750
+ className: cn("font-bold uppercase", !hasPxVars && "bg-purple50 text-purple600"),
25751
+ style: fallbackStyle,
25752
+ children: fallback
25753
+ }
25754
+ )
25707
25755
  ] });
25708
25756
  };
25709
25757
 
@@ -25871,7 +25919,20 @@ var ProgressAtom = ({
25871
25919
  style
25872
25920
  }) => {
25873
25921
  const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
25874
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("w-full py-2", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Progress, { value, className: "h-2 bg-gray-100" }) });
25922
+ const progressStyle = hasPxVars ? {
25923
+ backgroundColor: "var(--px-track-color)"
25924
+ } : {};
25925
+ const wrapperStyle = {
25926
+ ...style
25927
+ };
25928
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("w-full py-2", className), style: wrapperStyle, "data-px-styled": hasPxVars ? "" : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
25929
+ Progress,
25930
+ {
25931
+ value,
25932
+ className: "h-2 bg-gray-100",
25933
+ style: progressStyle
25934
+ }
25935
+ ) });
25875
25936
  };
25876
25937
 
25877
25938
  // src/components/ui/skeleton.tsx
@@ -25981,12 +26042,22 @@ var AlertAtom = ({
25981
26042
  };
25982
26043
  const customClass = variantMap[variant] || "";
25983
26044
  const shadcnVariant = ["warning", "info", "success"].includes(variant) ? "default" : variant;
26045
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
26046
+ const mergedStyle = {
26047
+ ...style,
26048
+ ...hasPxVars ? {
26049
+ color: "var(--px-text-color)",
26050
+ backgroundColor: "var(--px-bg-color)",
26051
+ borderColor: "var(--px-border-color)"
26052
+ } : {}
26053
+ };
25984
26054
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
25985
26055
  Alert,
25986
26056
  {
25987
26057
  variant: shadcnVariant,
25988
26058
  className: cn("rounded-2xl", customClass, className),
25989
- style,
26059
+ style: mergedStyle,
26060
+ "data-px-styled": hasPxVars ? "" : void 0,
25990
26061
  children: [
25991
26062
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon3, { className: "h-4 w-4" }),
25992
26063
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AlertTitle, { className: "font-bold", children: title }),
@@ -26022,13 +26093,20 @@ Separator2.displayName = SeparatorPrimitive.Root.displayName;
26022
26093
  var import_jsx_runtime33 = require("react/jsx-runtime");
26023
26094
  var SeparatorAtom = ({
26024
26095
  orientation = "horizontal",
26025
- className
26096
+ className,
26097
+ style
26026
26098
  }) => {
26099
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
26100
+ const resolvedStyle = {
26101
+ ...hasPxVars && { backgroundColor: "var(--px-bg-color)" },
26102
+ ...style
26103
+ };
26027
26104
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
26028
26105
  Separator2,
26029
26106
  {
26030
26107
  orientation,
26031
- className: cn("bg-gray-100", className)
26108
+ className: cn("bg-gray-100", className),
26109
+ style: resolvedStyle
26032
26110
  }
26033
26111
  );
26034
26112
  };
@@ -26149,11 +26227,11 @@ var TableAtom = ({
26149
26227
  borderColor
26150
26228
  },
26151
26229
  children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Table3, { children: [
26152
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { style: { backgroundColor: headerBgColor }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: safeHeaders.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26230
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { style: { backgroundColor: headerBgColor }, children: safeHeaders.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26153
26231
  TableHead,
26154
26232
  {
26155
26233
  className: "text-xs font-bold uppercase tracking-widest px-6 py-4",
26156
- style: { color: headerTextColor },
26234
+ style: { color: headerTextColor, backgroundColor: headerBgColor },
26157
26235
  children: header
26158
26236
  },
26159
26237
  i
@@ -31774,16 +31852,28 @@ var import_jsx_runtime56 = require("react/jsx-runtime");
31774
31852
  var CalendarAtom = ({
31775
31853
  mode = "single",
31776
31854
  selectedDate,
31777
- className
31855
+ className,
31856
+ style
31778
31857
  }) => {
31779
31858
  const date = selectedDate ? new Date(selectedDate) : void 0;
31859
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
31860
+ const wrapperStyle = {
31861
+ ...hasPxVars && {
31862
+ backgroundColor: "var(--px-bg-color, transparent)",
31863
+ borderColor: "var(--px-border-color, hsl(var(--border) / 0.5))",
31864
+ color: "var(--px-text-color, inherit)"
31865
+ },
31866
+ ...style
31867
+ };
31780
31868
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
31781
31869
  "div",
31782
31870
  {
31783
31871
  className: cn(
31784
- "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",
31872
+ "p-4 backdrop-blur-xl rounded-[28px] border 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",
31873
+ !hasPxVars && "bg-background/80 border-border/50",
31785
31874
  className
31786
31875
  ),
31876
+ style: wrapperStyle,
31787
31877
  children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Calendar2, { mode, selected: date, className: "rounded-xl" })
31788
31878
  }
31789
31879
  );
@@ -33558,12 +33648,25 @@ var ChartAtom = ({
33558
33648
  return null;
33559
33649
  }
33560
33650
  };
33651
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
33652
+ const wrapperStyle = {
33653
+ ...hasPxVars && {
33654
+ color: "var(--px-text-color, inherit)",
33655
+ backgroundColor: "var(--px-bg-color, transparent)",
33656
+ borderColor: "var(--px-border-color, transparent)",
33657
+ borderWidth: hasPxVars ? "1px" : void 0,
33658
+ borderStyle: hasPxVars ? "solid" : void 0,
33659
+ borderRadius: "1rem",
33660
+ padding: "0.75rem"
33661
+ },
33662
+ ...style
33663
+ };
33561
33664
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
33562
33665
  ChartContainer,
33563
33666
  {
33564
33667
  config: safeConfig,
33565
33668
  className: cn("min-h-[200px] w-full", className),
33566
- style,
33669
+ style: wrapperStyle,
33567
33670
  children: renderChart()
33568
33671
  }
33569
33672
  );
@@ -33606,7 +33709,8 @@ var import_react52 = __toESM(require("react"), 1);
33606
33709
  var import_jsx_runtime87 = require("react/jsx-runtime");
33607
33710
  var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, onChange }) => {
33608
33711
  const [hoverValue, setHoverValue] = import_react52.default.useState(null);
33609
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: cn("flex items-center gap-1", className), style, children: Array.from({ length: max2 }, (_, i) => {
33712
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
33713
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: cn("flex items-center gap-1", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: Array.from({ length: max2 }, (_, i) => {
33610
33714
  const starValue = i + 1;
33611
33715
  const isActive = (hoverValue ?? value) >= starValue;
33612
33716
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
@@ -33614,9 +33718,13 @@ var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, on
33614
33718
  {
33615
33719
  className: cn(
33616
33720
  "h-5 w-5 transition-colors",
33617
- isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300",
33721
+ !hasPxVars && (isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300"),
33618
33722
  !readonly && "cursor-pointer hover:scale-110"
33619
33723
  ),
33724
+ style: hasPxVars ? {
33725
+ color: isActive ? "var(--px-accent-color, #facc15)" : "var(--px-track-color, #d1d5db)",
33726
+ fill: isActive ? "var(--px-accent-color, #facc15)" : "transparent"
33727
+ } : void 0,
33620
33728
  onClick: () => !readonly && onChange?.(starValue),
33621
33729
  onMouseEnter: () => !readonly && setHoverValue(starValue),
33622
33730
  onMouseLeave: () => !readonly && setHoverValue(null)
@@ -34607,9 +34715,16 @@ var import_jsx_runtime97 = require("react/jsx-runtime");
34607
34715
  var StatsGrid = ({
34608
34716
  items,
34609
34717
  stats,
34610
- className
34718
+ className,
34719
+ style
34611
34720
  }) => {
34612
34721
  const displayItems = items || stats || [];
34722
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
34723
+ const cardStyle = hasPxVars ? {
34724
+ backgroundColor: "var(--px-bg-color, var(--card-background, white))",
34725
+ borderColor: "var(--px-border-color, var(--border-color, #e5e7eb))"
34726
+ } : void 0;
34727
+ const textColor = hasPxVars ? "var(--px-text-color, inherit)" : void 0;
34613
34728
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
34614
34729
  "div",
34615
34730
  {
@@ -34617,6 +34732,7 @@ var StatsGrid = ({
34617
34732
  "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
34618
34733
  className
34619
34734
  ),
34735
+ style,
34620
34736
  children: displayItems?.map((item, index) => {
34621
34737
  const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
34622
34738
  const trendColor = item.trendDirection === "up" ? "text-emerald-600 dark:text-emerald-400" : item.trendDirection === "down" ? "text-rose-600 dark:text-rose-400" : "text-muted-foreground";
@@ -34624,7 +34740,11 @@ var StatsGrid = ({
34624
34740
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
34625
34741
  Card,
34626
34742
  {
34627
- className: "bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border-[var(--border-color,theme(colors.gray.200))] backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-300 rounded-[24px] overflow-hidden",
34743
+ className: cn(
34744
+ "backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-300 rounded-[24px] overflow-hidden",
34745
+ !hasPxVars && "bg-[var(--card-background,theme(colors.white))] dark:bg-[var(--card-background,theme(colors.zinc.900))] border-[var(--border-color,theme(colors.gray.200))]"
34746
+ ),
34747
+ style: cardStyle,
34628
34748
  children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(CardContent, { className: "p-5 flex flex-col gap-1.5", children: [
34629
34749
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between", children: [
34630
34750
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
@@ -34634,10 +34754,17 @@ var StatsGrid = ({
34634
34754
  type: "text",
34635
34755
  content: item.label,
34636
34756
  variant: "small",
34637
- className: "text-muted-foreground font-medium tracking-wide uppercase text-[10px]"
34757
+ className: cn(!hasPxVars && "text-muted-foreground", "font-medium tracking-wide uppercase text-[10px]"),
34758
+ style: textColor ? { color: textColor } : void 0
34638
34759
  }
34639
34760
  ),
34640
- Icon3 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Icon3, { className: "w-4 h-4 text-[var(--primary-color,theme(colors.purple.500))]" })
34761
+ Icon3 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
34762
+ Icon3,
34763
+ {
34764
+ className: cn("w-4 h-4", !hasPxVars && "text-[var(--primary-color,theme(colors.purple.500))]"),
34765
+ style: textColor ? { color: textColor } : void 0
34766
+ }
34767
+ )
34641
34768
  ] }),
34642
34769
  /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-baseline gap-3", children: [
34643
34770
  /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
@@ -34648,9 +34775,11 @@ var StatsGrid = ({
34648
34775
  content: String(item.value),
34649
34776
  variant: "h3",
34650
34777
  className: cn(
34651
- "font-bold text-[var(--foreground)] tracking-tight leading-tight",
34778
+ "font-bold tracking-tight leading-tight",
34779
+ !hasPxVars && "text-[var(--foreground)]",
34652
34780
  String(item.value).length > 20 ? "text-base" : String(item.value).length > 12 ? "text-lg" : "text-xl"
34653
- )
34781
+ ),
34782
+ style: textColor ? { color: textColor } : void 0
34654
34783
  }
34655
34784
  ),
34656
34785
  item.trend && /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
@@ -34815,16 +34944,26 @@ var FilterBar = ({ filters, showSearch = true, className, onFilterToggle, onSear
34815
34944
  // src/molecules/generic/FileUpload/FileUpload.tsx
34816
34945
  var import_react57 = __toESM(require("react"), 1);
34817
34946
  var import_jsx_runtime101 = require("react/jsx-runtime");
34818
- var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
34947
+ var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }) => {
34819
34948
  const [isDragging, setIsDragging] = import_react57.default.useState(false);
34949
+ const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
34950
+ const wrapperStyle = {
34951
+ ...hasPxVars && {
34952
+ borderColor: isDragging ? "var(--px-accent-color)" : "var(--px-border-color)",
34953
+ backgroundColor: isDragging ? void 0 : "var(--px-bg-color, transparent)"
34954
+ },
34955
+ ...style
34956
+ };
34820
34957
  return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
34821
34958
  "div",
34822
34959
  {
34823
34960
  className: cn(
34824
34961
  "relative flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-3xl transition-all",
34825
- isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white",
34962
+ !hasPxVars && (isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white"),
34826
34963
  className
34827
34964
  ),
34965
+ style: wrapperStyle,
34966
+ "data-px-styled": hasPxVars ? "" : void 0,
34828
34967
  onDragOver: (e) => {
34829
34968
  e.preventDefault();
34830
34969
  setIsDragging(true);
@@ -34838,8 +34977,22 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
34838
34977
  }
34839
34978
  },
34840
34979
  children: [
34841
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "w-12 h-12 bg-purple-100 rounded-2xl flex items-center justify-center mb-4 text-purple-600", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Upload, { className: "w-6 h-6" }) }),
34842
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("h4", { className: "font-bold text-gray-900 mb-1", children: title }),
34980
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34981
+ "div",
34982
+ {
34983
+ className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-purple-100 text-purple-600"),
34984
+ style: hasPxVars ? { backgroundColor: "var(--px-accent-color)", color: "var(--px-accent-fg, white)", opacity: 0.15 } : void 0,
34985
+ children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Upload, { className: "w-6 h-6", style: hasPxVars ? { color: "var(--px-accent-color)", opacity: 1 } : void 0 })
34986
+ }
34987
+ ),
34988
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34989
+ "h4",
34990
+ {
34991
+ className: cn("font-bold mb-1", !hasPxVars && "text-gray-900"),
34992
+ style: hasPxVars ? { color: "var(--px-text-color, inherit)" } : void 0,
34993
+ children: title
34994
+ }
34995
+ ),
34843
34996
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("p", { className: "text-sm text-muted-foreground mb-6", children: "Drag and drop or click to browse" }),
34844
34997
  /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
34845
34998
  "input",
@@ -34855,7 +35008,8 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
34855
35008
  Button,
34856
35009
  {
34857
35010
  variant: "outline",
34858
- className: "rounded-full border-purple-200 text-purple-700 hover:bg-purple-50",
35011
+ className: cn("rounded-full", !hasPxVars && "border-purple-200 text-purple-700 hover:bg-purple-50"),
35012
+ style: hasPxVars ? { borderColor: "var(--px-accent-color)", color: "var(--px-accent-color)" } : void 0,
34859
35013
  children: "Select Files"
34860
35014
  }
34861
35015
  )