pxengine 0.1.55 → 0.1.57

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
@@ -408,19 +408,30 @@ var TextAtom = ({
408
408
  markdown = false
409
409
  }) => {
410
410
  const baseStyles = {
411
- h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl text-gray900",
412
- h2: "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0 text-gray900",
413
- h3: "scroll-m-20 text-2xl font-semibold tracking-tight text-gray900",
414
- h4: "scroll-m-20 text-xl font-semibold tracking-tight text-gray900",
415
- p: "leading-7 [&:not(:first-child)]:mt-6 text-gray700",
416
- small: "text-sm font-medium leading-none text-gray600",
417
- muted: "text-sm text-muted-foreground",
418
- label: "text-[10px] font-bold text-gray400 uppercase tracking-widest pl-1"
411
+ h1: "scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",
412
+ h2: "scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0",
413
+ h3: "scroll-m-20 text-2xl font-semibold tracking-tight",
414
+ h4: "scroll-m-20 text-xl font-semibold tracking-tight",
415
+ p: "leading-7 [&:not(:first-child)]:mt-6",
416
+ small: "text-sm font-medium leading-none",
417
+ muted: "text-sm",
418
+ label: "text-[10px] font-bold uppercase tracking-widest pl-1"
419
+ };
420
+ const defaultColors = {
421
+ h1: "var(--gray900)",
422
+ h2: "var(--gray900)",
423
+ h3: "var(--gray900)",
424
+ h4: "var(--gray900)",
425
+ p: "var(--gray700)",
426
+ small: "var(--gray600)",
427
+ muted: "hsl(var(--muted-foreground))",
428
+ label: "var(--gray400)"
419
429
  };
420
430
  const Component2 = variant === "small" || variant === "muted" || variant === "label" ? "p" : variant;
421
431
  const wrapperStyles = {
422
- ...style,
423
- ...backgroundColor && { backgroundColor }
432
+ color: `var(--px-text-color, ${defaultColors[variant] ?? "inherit"})`,
433
+ ...backgroundColor && { backgroundColor },
434
+ ...style
424
435
  };
425
436
  if (markdown) {
426
437
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -24873,6 +24884,7 @@ var IconAtom = ({
24873
24884
  size = 20,
24874
24885
  color,
24875
24886
  strokeWidth,
24887
+ textColor = "text-dark",
24876
24888
  className,
24877
24889
  style
24878
24890
  }) => {
@@ -24887,7 +24899,7 @@ var IconAtom = ({
24887
24899
  size,
24888
24900
  color,
24889
24901
  strokeWidth,
24890
- className: cn("shrink-0 text-black", className),
24902
+ className: cn("shrink-0", textColor, className),
24891
24903
  style
24892
24904
  }
24893
24905
  );
@@ -25404,17 +25416,43 @@ var InputAtom = ({
25404
25416
  disabled,
25405
25417
  options,
25406
25418
  config,
25419
+ labelColor,
25407
25420
  className,
25408
25421
  style
25409
25422
  }) => {
25410
25423
  const containerClass = cn("flex flex-col gap-2 w-full", className);
25424
+ const getAlignmentClass = (textAlign2) => {
25425
+ switch (textAlign2) {
25426
+ case "center":
25427
+ return "items-center";
25428
+ case "right":
25429
+ return "items-end";
25430
+ default:
25431
+ return "items-start";
25432
+ }
25433
+ };
25434
+ const alignmentClass = getAlignmentClass(style?.textAlign);
25435
+ const alignedContainerClass = cn(containerClass, alignmentClass);
25436
+ const { textAlign, ...remainingStyle } = style || {};
25437
+ const labelBaseStyle = {
25438
+ color: labelColor,
25439
+ backgroundColor: "transparent",
25440
+ background: "none"
25441
+ };
25411
25442
  const renderLabel = () => {
25412
25443
  if (!label) return null;
25413
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Label, { className: "text-sm font-semibold text-foreground/80 pl-0.5", children: [
25414
- label,
25415
- " ",
25416
- required && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-destructive", children: "*" })
25417
- ] });
25444
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
25445
+ Label,
25446
+ {
25447
+ style: labelBaseStyle,
25448
+ className: "text-sm font-semibold text-foreground/80 pl-0.5 border-none shadow-none",
25449
+ children: [
25450
+ label,
25451
+ " ",
25452
+ required && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-destructive", children: "*" })
25453
+ ]
25454
+ }
25455
+ );
25418
25456
  };
25419
25457
  const renderInput = () => {
25420
25458
  const commonProps = {
@@ -25424,10 +25462,10 @@ var InputAtom = ({
25424
25462
  required,
25425
25463
  readOnly: true,
25426
25464
  className: cn(
25427
- "rounded-xl border-border bg-background focus:ring-primary shadow-sm",
25465
+ "rounded-xl border-border bg-transparent focus:ring-primary shadow-none",
25428
25466
  className
25429
25467
  ),
25430
- style
25468
+ style: remainingStyle
25431
25469
  };
25432
25470
  switch (inputType) {
25433
25471
  case "textarea":
@@ -25437,18 +25475,15 @@ var InputAtom = ({
25437
25475
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25438
25476
  SelectTrigger,
25439
25477
  {
25440
- className: cn(
25441
- "rounded-xl border-border bg-background shadow-sm",
25442
- className
25443
- ),
25444
- style,
25478
+ className: cn("rounded-xl border-border bg-transparent shadow-none", className),
25479
+ style: remainingStyle,
25445
25480
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder: placeholder || "Select option" })
25446
25481
  }
25447
25482
  ),
25448
25483
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { className: "rounded-xl border-border shadow-xl", children: options?.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
25449
25484
  ] });
25450
25485
  case "slider":
25451
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pt-2 pb-1", style, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25486
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "pt-2 pb-1 w-full bg-transparent", style: remainingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25452
25487
  Slider,
25453
25488
  {
25454
25489
  value: [defaultValue || config?.min || 0],
@@ -25460,86 +25495,69 @@ var InputAtom = ({
25460
25495
  }
25461
25496
  ) });
25462
25497
  case "checkbox":
25463
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
25464
- "div",
25465
- {
25466
- className: cn(
25467
- "flex items-center space-x-3 py-1.5 px-0.5 group cursor-pointer",
25468
- className
25469
- ),
25470
- style,
25471
- children: [
25472
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25473
- Checkbox,
25474
- {
25475
- id: label,
25476
- checked: defaultValue,
25477
- disabled,
25478
- className: "rounded-[6px] border-border data-[state=checked]:bg-primary shadow-sm"
25479
- }
25480
- ),
25481
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25482
- "label",
25483
- {
25484
- htmlFor: label,
25485
- className: "text-sm font-medium leading-none cursor-pointer text-foreground/90 group-hover:text-foreground transition-colors",
25486
- children: label
25487
- }
25488
- )
25489
- ]
25490
- }
25491
- );
25498
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center space-x-3 py-1.5 px-0.5 group cursor-pointer bg-transparent", style: remainingStyle, children: [
25499
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25500
+ Checkbox,
25501
+ {
25502
+ id: label,
25503
+ checked: defaultValue,
25504
+ disabled,
25505
+ className: "rounded-[6px] border-border data-[state=checked]:bg-primary"
25506
+ }
25507
+ ),
25508
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25509
+ "label",
25510
+ {
25511
+ htmlFor: label,
25512
+ style: labelBaseStyle,
25513
+ className: "text-sm font-medium leading-none cursor-pointer text-foreground/90 group-hover:text-foreground transition-colors",
25514
+ children: label
25515
+ }
25516
+ )
25517
+ ] });
25492
25518
  case "switch":
25493
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
25494
- "div",
25495
- {
25496
- className: cn(
25497
- "flex items-center justify-between py-1.5 px-0.5",
25498
- className
25499
- ),
25500
- style,
25501
- children: [
25502
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25503
- Label,
25504
- {
25505
- htmlFor: label,
25506
- className: "cursor-pointer text-foreground/90",
25507
- children: label
25508
- }
25509
- ),
25510
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25511
- Switch,
25512
- {
25513
- id: label,
25514
- checked: defaultValue,
25515
- disabled,
25516
- className: "data-[state=checked]:bg-primary shadow-sm"
25517
- }
25518
- )
25519
- ]
25520
- }
25521
- );
25519
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between py-1.5 px-0.5 bg-transparent", style: remainingStyle, children: [
25520
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25521
+ Label,
25522
+ {
25523
+ htmlFor: label,
25524
+ style: labelBaseStyle,
25525
+ className: "cursor-pointer text-foreground/90",
25526
+ children: label
25527
+ }
25528
+ ),
25529
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25530
+ Switch,
25531
+ {
25532
+ id: label,
25533
+ checked: defaultValue,
25534
+ disabled,
25535
+ className: "data-[state=checked]:bg-primary"
25536
+ }
25537
+ )
25538
+ ] });
25522
25539
  case "radio":
25523
25540
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25524
25541
  RadioGroup,
25525
25542
  {
25526
25543
  value: defaultValue,
25527
25544
  disabled,
25528
- className: cn("gap-2.5", className),
25529
- style,
25530
- children: options?.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center space-x-3", children: [
25545
+ className: cn("gap-2.5 bg-transparent", className),
25546
+ style: remainingStyle,
25547
+ children: options?.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center space-x-3 bg-transparent", children: [
25531
25548
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25532
25549
  RadioGroupItem,
25533
25550
  {
25534
25551
  value: opt.value,
25535
25552
  id: `${label}-${opt.value}`,
25536
- className: "border-border text-primary shadow-sm"
25553
+ className: "border-border text-primary"
25537
25554
  }
25538
25555
  ),
25539
25556
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25540
25557
  Label,
25541
25558
  {
25542
25559
  htmlFor: `${label}-${opt.value}`,
25560
+ style: labelBaseStyle,
25543
25561
  className: "cursor-pointer text-foreground/80 font-medium",
25544
25562
  children: opt.label
25545
25563
  }
@@ -25548,44 +25566,27 @@ var InputAtom = ({
25548
25566
  }
25549
25567
  );
25550
25568
  case "otp":
25551
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25552
- "div",
25569
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex justify-center py-2 bg-transparent", style: remainingStyle, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InputOTP, { maxLength: config?.maxLength || 6, disabled, value: defaultValue, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InputOTPGroup, { className: "gap-2 bg-transparent", children: Array.from({ length: config?.maxLength || 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25570
+ InputOTPSlot,
25553
25571
  {
25554
- className: cn("flex justify-center py-2", className),
25555
- style,
25556
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25557
- InputOTP,
25558
- {
25559
- maxLength: config?.maxLength || 6,
25560
- disabled,
25561
- value: defaultValue,
25562
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InputOTPGroup, { className: "gap-2", children: Array.from({ length: config?.maxLength || 6 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25563
- InputOTPSlot,
25564
- {
25565
- index: i,
25566
- className: "rounded-xl border border-border bg-background shadow-sm"
25567
- },
25568
- i
25569
- )) })
25570
- }
25571
- )
25572
- }
25573
- );
25572
+ index: i,
25573
+ className: "rounded-xl border border-border bg-transparent"
25574
+ },
25575
+ i
25576
+ )) }) }) });
25574
25577
  default:
25575
25578
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
25576
25579
  Input,
25577
25580
  {
25578
25581
  ...commonProps,
25579
25582
  type: inputType,
25580
- className: cn(
25581
- "rounded-xl border-border bg-background focus:ring-primary shadow-sm h-11",
25582
- className
25583
- )
25583
+ className: cn("rounded-xl border-border bg-transparent focus:ring-primary h-11 shadow-none", className)
25584
25584
  }
25585
25585
  );
25586
25586
  }
25587
25587
  };
25588
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: containerClass, style, children: [
25588
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
25589
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: alignedContainerClass, style: remainingStyle, "data-px-styled": hasPxVars ? "" : void 0, children: [
25589
25590
  inputType !== "checkbox" && inputType !== "switch" && renderLabel(),
25590
25591
  renderInput()
25591
25592
  ] });
@@ -25623,13 +25624,20 @@ var BadgeAtom = ({
25623
25624
  className,
25624
25625
  style
25625
25626
  }) => {
25627
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
25626
25628
  const customVariants = {
25627
- purple: "bg-primary/10 text-primary border-primary/20 hover:bg-primary/20",
25628
- green: "bg-emerald-500/10 text-emerald-500 border-emerald-500/20 hover:bg-emerald-500/20"
25629
+ purple: "border-primary/20 hover:bg-primary/20",
25630
+ green: "border-emerald-500/20 hover:bg-emerald-500/20"
25629
25631
  };
25630
25632
  const isCustom = ["purple", "green"].includes(variant || "");
25631
25633
  const shadcnVariant = isCustom ? "outline" : variant;
25632
25634
  const customClass = isCustom ? customVariants[variant] : "";
25635
+ const resolvedStyle = {
25636
+ backgroundColor: "var(--px-bg-color, transparent)",
25637
+ color: "var(--px-text-color, inherit)",
25638
+ borderColor: "var(--px-border-color, currentColor)",
25639
+ ...style
25640
+ };
25633
25641
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
25634
25642
  Badge2,
25635
25643
  {
@@ -25639,7 +25647,8 @@ var BadgeAtom = ({
25639
25647
  customClass,
25640
25648
  className
25641
25649
  ),
25642
- style,
25650
+ style: resolvedStyle,
25651
+ "data-px-styled": hasPxVars ? "" : void 0,
25643
25652
  children: label
25644
25653
  }
25645
25654
  );
@@ -25858,9 +25867,11 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
25858
25867
  var import_jsx_runtime27 = require("react/jsx-runtime");
25859
25868
  var ProgressAtom = ({
25860
25869
  value,
25861
- className
25870
+ className,
25871
+ style
25862
25872
  }) => {
25863
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn("w-full py-2", className), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Progress, { value, className: "h-2 bg-gray-100" }) });
25873
+ 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" }) });
25864
25875
  };
25865
25876
 
25866
25877
  // src/components/ui/skeleton.tsx
@@ -26106,33 +26117,62 @@ var TableAtom = ({
26106
26117
  headers,
26107
26118
  rows,
26108
26119
  className,
26109
- style
26120
+ style,
26121
+ headerTextColor = "#9ca3af",
26122
+ headerBgColor = "#f9fafb",
26123
+ rowTextColor = "#374151",
26124
+ rowBgColor = "#ffffff",
26125
+ hoverBgColor = "#faf5ff",
26126
+ borderColor = "#f3f4f6"
26110
26127
  }) => {
26128
+ const safeHeaders = Array.isArray(headers) ? headers : [];
26129
+ const safeRows = Array.isArray(rows) ? rows : [];
26130
+ if (safeHeaders.length === 0 && safeRows.length === 0) {
26131
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26132
+ "div",
26133
+ {
26134
+ className: cn("rounded-2xl border overflow-hidden p-4 text-center text-sm text-muted-foreground", className),
26135
+ style: { ...style, borderColor },
26136
+ children: "No table data"
26137
+ }
26138
+ );
26139
+ }
26111
26140
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26112
26141
  "div",
26113
26142
  {
26114
26143
  className: cn(
26115
- "rounded-2xl border border-gray-100 overflow-hidden bg-white",
26144
+ "rounded-2xl border overflow-hidden",
26116
26145
  className
26117
26146
  ),
26118
- style,
26147
+ style: {
26148
+ ...style,
26149
+ borderColor
26150
+ },
26119
26151
  children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Table3, { children: [
26120
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableHeader, { className: "bg-gray-50/50", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableRow, { children: headers.map((header, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
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)(
26121
26153
  TableHead,
26122
26154
  {
26123
- className: "text-xs font-bold text-gray-400 uppercase tracking-widest px-6 py-4",
26155
+ className: "text-xs font-bold uppercase tracking-widest px-6 py-4",
26156
+ style: { color: headerTextColor },
26124
26157
  children: header
26125
26158
  },
26126
26159
  i
26127
26160
  )) }) }),
26128
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableBody, { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26161
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TableBody, { children: safeRows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26129
26162
  TableRow,
26130
26163
  {
26131
- className: "hover:bg-purple-50/30 transition-colors border-gray-50",
26132
- children: row.map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26164
+ className: "transition-colors",
26165
+ style: {
26166
+ backgroundColor: rowBgColor,
26167
+ borderColor
26168
+ },
26169
+ onMouseEnter: (e) => e.currentTarget.style.backgroundColor = hoverBgColor,
26170
+ onMouseLeave: (e) => e.currentTarget.style.backgroundColor = rowBgColor,
26171
+ children: (Array.isArray(row) ? row : []).map((cell, j) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
26133
26172
  TableCell,
26134
26173
  {
26135
- className: "text-sm text-gray-700 px-6 py-4 font-medium",
26174
+ className: "text-sm px-6 py-4 font-medium",
26175
+ style: { color: rowTextColor },
26136
26176
  children: cell
26137
26177
  },
26138
26178
  j
@@ -27033,7 +27073,8 @@ var BreadcrumbAtom = ({
27033
27073
  var import_jsx_runtime54 = require("react/jsx-runtime");
27034
27074
  var SpinnerAtom = ({
27035
27075
  size = "md",
27036
- className
27076
+ className,
27077
+ style
27037
27078
  }) => {
27038
27079
  const sizeMap = {
27039
27080
  sm: "h-4 w-4",
@@ -27041,14 +27082,21 @@ var SpinnerAtom = ({
27041
27082
  lg: "h-8 w-8",
27042
27083
  xl: "h-12 w-12"
27043
27084
  };
27085
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
27086
+ const resolvedStyle = {
27087
+ color: "var(--px-text-color, #a855f7)",
27088
+ ...style
27089
+ };
27044
27090
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
27045
27091
  LoaderCircle,
27046
27092
  {
27047
27093
  className: cn(
27048
- "animate-spin text-purple500",
27094
+ "animate-spin",
27049
27095
  sizeMap[size] || sizeMap.md,
27050
27096
  className
27051
- )
27097
+ ),
27098
+ style: resolvedStyle,
27099
+ "data-px-styled": hasPxVars ? "" : void 0
27052
27100
  }
27053
27101
  );
27054
27102
  };
@@ -32219,51 +32267,71 @@ var FormTextareaAtom = ({
32219
32267
 
32220
32268
  // src/atoms/CheckboxAtom.tsx
32221
32269
  var import_jsx_runtime65 = require("react/jsx-runtime");
32222
- var CheckboxAtom = ({ id, label, checked, disabled, className, onCheckedChange }) => {
32223
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: cn("flex items-center space-x-2", className), children: [
32224
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32225
- Checkbox,
32226
- {
32227
- id,
32228
- checked,
32229
- disabled,
32230
- onCheckedChange,
32231
- className: "rounded border-purple-300 text-purple-600 focus:ring-purple-500"
32232
- }
32233
- ),
32234
- label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32235
- Label,
32236
- {
32237
- htmlFor: id,
32238
- className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
32239
- children: label
32240
- }
32241
- )
32242
- ] });
32270
+ var CheckboxAtom = ({ id, label, checked, disabled, className, style, onCheckedChange }) => {
32271
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32272
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
32273
+ "div",
32274
+ {
32275
+ className: cn("flex items-center space-x-2", className),
32276
+ style,
32277
+ "data-px-styled": hasPxVars ? "" : void 0,
32278
+ children: [
32279
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32280
+ Checkbox,
32281
+ {
32282
+ id,
32283
+ checked,
32284
+ disabled,
32285
+ onCheckedChange,
32286
+ className: "rounded"
32287
+ }
32288
+ ),
32289
+ label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
32290
+ Label,
32291
+ {
32292
+ htmlFor: id,
32293
+ className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
32294
+ style: { color: "var(--px-label-color, inherit)" },
32295
+ children: label
32296
+ }
32297
+ )
32298
+ ]
32299
+ }
32300
+ );
32243
32301
  };
32244
32302
 
32245
32303
  // src/atoms/SwitchAtom.tsx
32246
32304
  var import_jsx_runtime66 = require("react/jsx-runtime");
32247
- var SwitchAtom = ({ id, label, checked, disabled, className, onCheckedChange }) => {
32248
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("flex items-center space-x-2", className), children: [
32249
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32250
- Switch,
32251
- {
32252
- id,
32253
- checked,
32254
- disabled,
32255
- onCheckedChange
32256
- }
32257
- ),
32258
- label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32259
- Label,
32260
- {
32261
- htmlFor: id,
32262
- className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
32263
- children: label
32264
- }
32265
- )
32266
- ] });
32305
+ var SwitchAtom = ({ id, label, checked, disabled, className, style, onCheckedChange }) => {
32306
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32307
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
32308
+ "div",
32309
+ {
32310
+ className: cn("flex items-center space-x-2", className),
32311
+ style,
32312
+ "data-px-styled": hasPxVars ? "" : void 0,
32313
+ children: [
32314
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32315
+ Switch,
32316
+ {
32317
+ id,
32318
+ checked,
32319
+ disabled,
32320
+ onCheckedChange
32321
+ }
32322
+ ),
32323
+ label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
32324
+ Label,
32325
+ {
32326
+ htmlFor: id,
32327
+ className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
32328
+ style: { color: "var(--px-label-color, inherit)" },
32329
+ children: label
32330
+ }
32331
+ )
32332
+ ]
32333
+ }
32334
+ );
32267
32335
  };
32268
32336
 
32269
32337
  // src/atoms/LabelAtom.tsx
@@ -32274,12 +32342,16 @@ var LabelAtom = ({
32274
32342
  className,
32275
32343
  style
32276
32344
  }) => {
32345
+ const resolvedStyle = {
32346
+ color: "var(--px-text-color, inherit)",
32347
+ ...style
32348
+ };
32277
32349
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
32278
32350
  Label,
32279
32351
  {
32280
32352
  htmlFor,
32281
32353
  className: cn("text-sm font-semibold", className),
32282
- style,
32354
+ style: resolvedStyle,
32283
32355
  children: content
32284
32356
  }
32285
32357
  );
@@ -32364,6 +32436,7 @@ var ToggleAtom = ({
32364
32436
  style,
32365
32437
  onPressedChange
32366
32438
  }) => {
32439
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32367
32440
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
32368
32441
  Toggle,
32369
32442
  {
@@ -32374,6 +32447,7 @@ var ToggleAtom = ({
32374
32447
  onPressedChange,
32375
32448
  className: cn(className),
32376
32449
  style,
32450
+ "data-px-styled": hasPxVars ? "" : void 0,
32377
32451
  children: label
32378
32452
  }
32379
32453
  );
@@ -32388,18 +32462,28 @@ var SliderAtom = ({
32388
32462
  step = 1,
32389
32463
  disabled,
32390
32464
  className,
32465
+ style,
32391
32466
  onValueChange
32392
32467
  }) => {
32468
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32393
32469
  return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
32394
- Slider,
32470
+ "div",
32395
32471
  {
32396
- defaultValue,
32397
- max: max2,
32398
- min: min2,
32399
- step,
32400
- disabled,
32401
- onValueChange,
32402
- className: cn("w-full py-4", className)
32472
+ style,
32473
+ "data-px-styled": hasPxVars ? "" : void 0,
32474
+ className: "w-full py-4",
32475
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
32476
+ Slider,
32477
+ {
32478
+ defaultValue,
32479
+ max: max2,
32480
+ min: min2,
32481
+ step,
32482
+ disabled,
32483
+ onValueChange,
32484
+ className: cn("w-full", className)
32485
+ }
32486
+ )
32403
32487
  }
32404
32488
  );
32405
32489
  };
@@ -32407,6 +32491,7 @@ var SliderAtom = ({
32407
32491
  // src/atoms/RadioGroupAtom.tsx
32408
32492
  var import_jsx_runtime72 = require("react/jsx-runtime");
32409
32493
  var RadioGroupAtom = ({ options, defaultValue, disabled, className, style, onValueChange }) => {
32494
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32410
32495
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
32411
32496
  RadioGroup,
32412
32497
  {
@@ -32415,6 +32500,7 @@ var RadioGroupAtom = ({ options, defaultValue, disabled, className, style, onVal
32415
32500
  onValueChange,
32416
32501
  className: cn("grid gap-2", className),
32417
32502
  style,
32503
+ "data-px-styled": hasPxVars ? "" : void 0,
32418
32504
  children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center space-x-2", children: [
32419
32505
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
32420
32506
  RadioGroupItem,
@@ -32441,6 +32527,7 @@ var RadioGroupAtom = ({ options, defaultValue, disabled, className, style, onVal
32441
32527
  // src/atoms/RadioAtom.tsx
32442
32528
  var import_jsx_runtime73 = require("react/jsx-runtime");
32443
32529
  var RadioAtom = ({ id, label, value, checked, disabled, className, style, onValueChange }) => {
32530
+ const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
32444
32531
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
32445
32532
  RadioGroup,
32446
32533
  {
@@ -32453,6 +32540,7 @@ var RadioAtom = ({ id, label, value, checked, disabled, className, style, onValu
32453
32540
  className
32454
32541
  ),
32455
32542
  style,
32543
+ "data-px-styled": hasPxVars ? "" : void 0,
32456
32544
  children: [
32457
32545
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
32458
32546
  RadioGroupItem,
@@ -32470,7 +32558,7 @@ var RadioAtom = ({ id, label, value, checked, disabled, className, style, onValu
32470
32558
  "cursor-pointer text-sm transition-colors",
32471
32559
  checked ? "text-primary font-semibold" : "text-muted-foreground"
32472
32560
  ),
32473
- style: { color: "inherit" },
32561
+ style: { color: "var(--px-label-color, inherit)" },
32474
32562
  children: label
32475
32563
  }
32476
32564
  )
@@ -33303,9 +33391,23 @@ var ChartAtom = ({
33303
33391
  showLegend = true,
33304
33392
  stacked = false,
33305
33393
  className,
33306
- style
33394
+ style,
33395
+ // Chart color customization props
33396
+ seriesColors
33307
33397
  }) => {
33308
- const safeConfig = config ?? {};
33398
+ const buildConfigWithColors = (baseConfig) => {
33399
+ if (!seriesColors) return baseConfig;
33400
+ const coloredConfig = {};
33401
+ const seriesKeys = Object.keys(baseConfig);
33402
+ seriesKeys.forEach((key, index) => {
33403
+ coloredConfig[key] = {
33404
+ ...baseConfig[key],
33405
+ color: seriesColors[index] || baseConfig[key]?.color
33406
+ };
33407
+ });
33408
+ return coloredConfig;
33409
+ };
33410
+ const safeConfig = config ? buildConfigWithColors(config) : {};
33309
33411
  const renderChart = () => {
33310
33412
  switch (chartType) {
33311
33413
  case "bar":
@@ -33397,7 +33499,14 @@ var ChartAtom = ({
33397
33499
  dataKey: YAxisKey || "value",
33398
33500
  nameKey: XAxisKey || "name",
33399
33501
  innerRadius: 60,
33400
- strokeWidth: 5
33502
+ strokeWidth: 5,
33503
+ children: data.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
33504
+ import_recharts.Cell,
33505
+ {
33506
+ fill: seriesColors?.[index] || `var(--color-${Object.keys(safeConfig)[index] || "default"})`
33507
+ },
33508
+ `cell-${index}`
33509
+ ))
33401
33510
  }
33402
33511
  )
33403
33512
  ] });
@@ -33432,7 +33541,15 @@ var ChartAtom = ({
33432
33541
  content: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ChartTooltipContent, { hideLabel: true, nameKey: XAxisKey })
33433
33542
  }
33434
33543
  ),
33435
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_recharts.RadialBar, { dataKey: YAxisKey || "value", background: true })
33544
+ Object.keys(safeConfig).map((key, idx) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
33545
+ import_recharts.RadialBar,
33546
+ {
33547
+ dataKey: key,
33548
+ fill: seriesColors?.[idx] || `var(--color-${key})`,
33549
+ background: true
33550
+ },
33551
+ key
33552
+ ))
33436
33553
  ]
33437
33554
  }
33438
33555
  );