pxengine 0.1.57 → 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 +195 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +195 -40
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1548,7 +1548,9 @@ declare const BreadcrumbAtom: React__default.FC<BreadcrumbAtomType>;
|
|
|
1548
1548
|
|
|
1549
1549
|
declare const SpinnerAtom: React__default.FC<SpinnerAtomType>;
|
|
1550
1550
|
|
|
1551
|
-
declare const CalendarAtom: React__default.FC<CalendarAtomType
|
|
1551
|
+
declare const CalendarAtom: React__default.FC<CalendarAtomType & {
|
|
1552
|
+
style?: React__default.CSSProperties;
|
|
1553
|
+
}>;
|
|
1552
1554
|
|
|
1553
1555
|
declare const PaginationAtom: React__default.FC<PaginationAtomType>;
|
|
1554
1556
|
|
|
@@ -1957,6 +1959,7 @@ declare const FormCard: React__default.NamedExoticComponent<FormCardProps>;
|
|
|
1957
1959
|
*/
|
|
1958
1960
|
declare const StatsGrid: React__default.FC<StatsGridMolecule & {
|
|
1959
1961
|
stats?: any[];
|
|
1962
|
+
style?: React__default.CSSProperties;
|
|
1960
1963
|
}>;
|
|
1961
1964
|
|
|
1962
1965
|
/**
|
|
@@ -1988,6 +1991,7 @@ declare const FilterBar: React__default.FC<FilterBarMolecule & {
|
|
|
1988
1991
|
*/
|
|
1989
1992
|
declare const FileUpload: React__default.FC<FileUploadMolecule & {
|
|
1990
1993
|
onFilesSelected?: (files: File[]) => void;
|
|
1994
|
+
style?: React__default.CSSProperties;
|
|
1991
1995
|
}>;
|
|
1992
1996
|
|
|
1993
1997
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1548,7 +1548,9 @@ declare const BreadcrumbAtom: React__default.FC<BreadcrumbAtomType>;
|
|
|
1548
1548
|
|
|
1549
1549
|
declare const SpinnerAtom: React__default.FC<SpinnerAtomType>;
|
|
1550
1550
|
|
|
1551
|
-
declare const CalendarAtom: React__default.FC<CalendarAtomType
|
|
1551
|
+
declare const CalendarAtom: React__default.FC<CalendarAtomType & {
|
|
1552
|
+
style?: React__default.CSSProperties;
|
|
1553
|
+
}>;
|
|
1552
1554
|
|
|
1553
1555
|
declare const PaginationAtom: React__default.FC<PaginationAtomType>;
|
|
1554
1556
|
|
|
@@ -1957,6 +1959,7 @@ declare const FormCard: React__default.NamedExoticComponent<FormCardProps>;
|
|
|
1957
1959
|
*/
|
|
1958
1960
|
declare const StatsGrid: React__default.FC<StatsGridMolecule & {
|
|
1959
1961
|
stats?: any[];
|
|
1962
|
+
style?: React__default.CSSProperties;
|
|
1960
1963
|
}>;
|
|
1961
1964
|
|
|
1962
1965
|
/**
|
|
@@ -1988,6 +1991,7 @@ declare const FilterBar: React__default.FC<FilterBarMolecule & {
|
|
|
1988
1991
|
*/
|
|
1989
1992
|
declare const FileUpload: React__default.FC<FileUploadMolecule & {
|
|
1990
1993
|
onFilesSelected?: (files: File[]) => void;
|
|
1994
|
+
style?: React__default.CSSProperties;
|
|
1991
1995
|
}>;
|
|
1992
1996
|
|
|
1993
1997
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -105,9 +105,11 @@ var TextAtom = ({
|
|
|
105
105
|
label: "var(--gray400)"
|
|
106
106
|
};
|
|
107
107
|
const Component2 = variant === "small" || variant === "muted" || variant === "label" ? "p" : variant;
|
|
108
|
+
const hasPxBg = style && "--px-bg-color" in style;
|
|
108
109
|
const wrapperStyles = {
|
|
109
110
|
color: `var(--px-text-color, ${defaultColors[variant] ?? "inherit"})`,
|
|
110
111
|
...backgroundColor && { backgroundColor },
|
|
112
|
+
...hasPxBg && { backgroundColor: "var(--px-bg-color, transparent)" },
|
|
111
113
|
...style
|
|
112
114
|
};
|
|
113
115
|
if (markdown) {
|
|
@@ -24570,14 +24572,20 @@ var IconAtom = ({
|
|
|
24570
24572
|
console.warn(`[IconAtom] Icon "${icon}" not found in lucide-react.`);
|
|
24571
24573
|
return null;
|
|
24572
24574
|
}
|
|
24575
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
24576
|
+
const resolvedColor = hasPxVars ? void 0 : color;
|
|
24577
|
+
const resolvedStyle = {
|
|
24578
|
+
...hasPxVars && { color: "var(--px-text-color, currentColor)" },
|
|
24579
|
+
...style
|
|
24580
|
+
};
|
|
24573
24581
|
return /* @__PURE__ */ jsx3(
|
|
24574
24582
|
IconComponent,
|
|
24575
24583
|
{
|
|
24576
24584
|
size,
|
|
24577
|
-
color,
|
|
24585
|
+
color: resolvedColor,
|
|
24578
24586
|
strokeWidth,
|
|
24579
|
-
className: cn("shrink-0", textColor, className),
|
|
24580
|
-
style
|
|
24587
|
+
className: cn("shrink-0", !hasPxVars && textColor, className),
|
|
24588
|
+
style: resolvedStyle
|
|
24581
24589
|
}
|
|
24582
24590
|
);
|
|
24583
24591
|
};
|
|
@@ -24612,6 +24620,14 @@ var ButtonAtom = ({
|
|
|
24612
24620
|
};
|
|
24613
24621
|
const customClass = variantMap[variant] || "";
|
|
24614
24622
|
const shadcnVariant = ["purple", "gradient"].includes(variant) ? "default" : variant;
|
|
24623
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
24624
|
+
const mergedStyle = {
|
|
24625
|
+
...style,
|
|
24626
|
+
...hasPxVars ? {
|
|
24627
|
+
backgroundColor: "var(--px-accent-color)",
|
|
24628
|
+
color: "var(--px-accent-fg)"
|
|
24629
|
+
} : {}
|
|
24630
|
+
};
|
|
24615
24631
|
return /* @__PURE__ */ jsx4(
|
|
24616
24632
|
Button,
|
|
24617
24633
|
{
|
|
@@ -24620,7 +24636,8 @@ var ButtonAtom = ({
|
|
|
24620
24636
|
disabled: disabled || isLoading,
|
|
24621
24637
|
onClick: handleClick,
|
|
24622
24638
|
className: cn("rounded-full font-semibold", customClass, className),
|
|
24623
|
-
style,
|
|
24639
|
+
style: mergedStyle,
|
|
24640
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
24624
24641
|
children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
24625
24642
|
/* @__PURE__ */ jsx4(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
24626
24643
|
label
|
|
@@ -24749,6 +24766,15 @@ var CardAtom = ({
|
|
|
24749
24766
|
style,
|
|
24750
24767
|
renderComponent
|
|
24751
24768
|
}) => {
|
|
24769
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
24770
|
+
const mergedStyle = {
|
|
24771
|
+
...style,
|
|
24772
|
+
...hasPxVars ? {
|
|
24773
|
+
backgroundColor: "var(--px-bg-color)",
|
|
24774
|
+
borderColor: "var(--px-border-color)",
|
|
24775
|
+
color: "var(--px-text-color)"
|
|
24776
|
+
} : {}
|
|
24777
|
+
};
|
|
24752
24778
|
return /* @__PURE__ */ jsxs2(
|
|
24753
24779
|
Card,
|
|
24754
24780
|
{
|
|
@@ -24756,13 +24782,14 @@ var CardAtom = ({
|
|
|
24756
24782
|
"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",
|
|
24757
24783
|
className
|
|
24758
24784
|
),
|
|
24759
|
-
style,
|
|
24785
|
+
style: mergedStyle,
|
|
24786
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
24760
24787
|
children: [
|
|
24761
24788
|
(title || description) && /* @__PURE__ */ jsxs2(CardHeader, { children: [
|
|
24762
24789
|
title && /* @__PURE__ */ jsx7(CardTitle, { className: "text-xl font-bold text-gray900", children: title }),
|
|
24763
24790
|
description && /* @__PURE__ */ jsx7(CardDescription, { children: description })
|
|
24764
24791
|
] }),
|
|
24765
|
-
/* @__PURE__ */ jsx7(CardContent, { className: "space-y-4", children: children.map((child, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
|
|
24792
|
+
/* @__PURE__ */ jsx7(CardContent, { className: "space-y-4", children: (children || []).map((child, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(child, index) }, child.id || `card-content-${index}`)) }),
|
|
24766
24793
|
footer && footer.length > 0 && /* @__PURE__ */ jsx7(CardFooter, { className: "bg-gray50/50 border-t border-gray200 flex flex-wrap gap-2 pt-6", children: footer.map((footerChild, index) => /* @__PURE__ */ jsx7(React4.Fragment, { children: renderComponent(footerChild, index) }, footerChild.id || `card-footer-${index}`)) })
|
|
24767
24794
|
]
|
|
24768
24795
|
}
|
|
@@ -25111,8 +25138,9 @@ var InputAtom = ({
|
|
|
25111
25138
|
const alignmentClass = getAlignmentClass(style?.textAlign);
|
|
25112
25139
|
const alignedContainerClass = cn(containerClass, alignmentClass);
|
|
25113
25140
|
const { textAlign, ...remainingStyle } = style || {};
|
|
25141
|
+
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25114
25142
|
const labelBaseStyle = {
|
|
25115
|
-
color: labelColor,
|
|
25143
|
+
color: hasPxVars ? "var(--px-label-color, inherit)" : labelColor,
|
|
25116
25144
|
backgroundColor: "transparent",
|
|
25117
25145
|
background: "none"
|
|
25118
25146
|
};
|
|
@@ -25132,6 +25160,14 @@ var InputAtom = ({
|
|
|
25132
25160
|
);
|
|
25133
25161
|
};
|
|
25134
25162
|
const renderInput = () => {
|
|
25163
|
+
const inputStyle = {
|
|
25164
|
+
...hasPxVars && {
|
|
25165
|
+
color: "var(--px-text-color, inherit)",
|
|
25166
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
25167
|
+
borderColor: "var(--px-border-color, hsl(var(--border)))"
|
|
25168
|
+
},
|
|
25169
|
+
...remainingStyle
|
|
25170
|
+
};
|
|
25135
25171
|
const commonProps = {
|
|
25136
25172
|
placeholder,
|
|
25137
25173
|
value: defaultValue,
|
|
@@ -25142,7 +25178,7 @@ var InputAtom = ({
|
|
|
25142
25178
|
"rounded-xl border-border bg-transparent focus:ring-primary shadow-none",
|
|
25143
25179
|
className
|
|
25144
25180
|
),
|
|
25145
|
-
style:
|
|
25181
|
+
style: inputStyle
|
|
25146
25182
|
};
|
|
25147
25183
|
switch (inputType) {
|
|
25148
25184
|
case "textarea":
|
|
@@ -25262,7 +25298,6 @@ var InputAtom = ({
|
|
|
25262
25298
|
);
|
|
25263
25299
|
}
|
|
25264
25300
|
};
|
|
25265
|
-
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25266
25301
|
return /* @__PURE__ */ jsxs6("div", { className: alignedContainerClass, style: remainingStyle, "data-px-styled": hasPxVars ? "" : void 0, children: [
|
|
25267
25302
|
inputType !== "checkbox" && inputType !== "switch" && renderLabel(),
|
|
25268
25303
|
renderInput()
|
|
@@ -25378,9 +25413,22 @@ var AvatarAtom = ({
|
|
|
25378
25413
|
className,
|
|
25379
25414
|
style
|
|
25380
25415
|
}) => {
|
|
25381
|
-
|
|
25416
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
25417
|
+
const fallbackStyle = hasPxVars ? {
|
|
25418
|
+
backgroundColor: "var(--px-bg-color, var(--purple50))",
|
|
25419
|
+
color: "var(--px-text-color, var(--purple100))",
|
|
25420
|
+
borderColor: "var(--px-border-color, transparent)"
|
|
25421
|
+
} : void 0;
|
|
25422
|
+
return /* @__PURE__ */ jsxs7(Avatar, { className: cn("h-10 w-10", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: [
|
|
25382
25423
|
src && /* @__PURE__ */ jsx21(AvatarImage, { src, alt }),
|
|
25383
|
-
/* @__PURE__ */ jsx21(
|
|
25424
|
+
/* @__PURE__ */ jsx21(
|
|
25425
|
+
AvatarFallback,
|
|
25426
|
+
{
|
|
25427
|
+
className: cn("font-bold uppercase", !hasPxVars && "bg-purple50 text-purple600"),
|
|
25428
|
+
style: fallbackStyle,
|
|
25429
|
+
children: fallback
|
|
25430
|
+
}
|
|
25431
|
+
)
|
|
25384
25432
|
] });
|
|
25385
25433
|
};
|
|
25386
25434
|
|
|
@@ -25548,7 +25596,20 @@ var ProgressAtom = ({
|
|
|
25548
25596
|
style
|
|
25549
25597
|
}) => {
|
|
25550
25598
|
const hasPxVars = style && Object.keys(style).some((key) => key.startsWith("--px-"));
|
|
25551
|
-
|
|
25599
|
+
const progressStyle = hasPxVars ? {
|
|
25600
|
+
backgroundColor: "var(--px-track-color)"
|
|
25601
|
+
} : {};
|
|
25602
|
+
const wrapperStyle = {
|
|
25603
|
+
...style
|
|
25604
|
+
};
|
|
25605
|
+
return /* @__PURE__ */ jsx27("div", { className: cn("w-full py-2", className), style: wrapperStyle, "data-px-styled": hasPxVars ? "" : void 0, children: /* @__PURE__ */ jsx27(
|
|
25606
|
+
Progress,
|
|
25607
|
+
{
|
|
25608
|
+
value,
|
|
25609
|
+
className: "h-2 bg-gray-100",
|
|
25610
|
+
style: progressStyle
|
|
25611
|
+
}
|
|
25612
|
+
) });
|
|
25552
25613
|
};
|
|
25553
25614
|
|
|
25554
25615
|
// src/components/ui/skeleton.tsx
|
|
@@ -25658,12 +25719,22 @@ var AlertAtom = ({
|
|
|
25658
25719
|
};
|
|
25659
25720
|
const customClass = variantMap[variant] || "";
|
|
25660
25721
|
const shadcnVariant = ["warning", "info", "success"].includes(variant) ? "default" : variant;
|
|
25722
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
25723
|
+
const mergedStyle = {
|
|
25724
|
+
...style,
|
|
25725
|
+
...hasPxVars ? {
|
|
25726
|
+
color: "var(--px-text-color)",
|
|
25727
|
+
backgroundColor: "var(--px-bg-color)",
|
|
25728
|
+
borderColor: "var(--px-border-color)"
|
|
25729
|
+
} : {}
|
|
25730
|
+
};
|
|
25661
25731
|
return /* @__PURE__ */ jsxs11(
|
|
25662
25732
|
Alert,
|
|
25663
25733
|
{
|
|
25664
25734
|
variant: shadcnVariant,
|
|
25665
25735
|
className: cn("rounded-2xl", customClass, className),
|
|
25666
|
-
style,
|
|
25736
|
+
style: mergedStyle,
|
|
25737
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
25667
25738
|
children: [
|
|
25668
25739
|
/* @__PURE__ */ jsx31(Icon3, { className: "h-4 w-4" }),
|
|
25669
25740
|
/* @__PURE__ */ jsx31(AlertTitle, { className: "font-bold", children: title }),
|
|
@@ -25699,13 +25770,20 @@ Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
25699
25770
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
25700
25771
|
var SeparatorAtom = ({
|
|
25701
25772
|
orientation = "horizontal",
|
|
25702
|
-
className
|
|
25773
|
+
className,
|
|
25774
|
+
style
|
|
25703
25775
|
}) => {
|
|
25776
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
25777
|
+
const resolvedStyle = {
|
|
25778
|
+
...hasPxVars && { backgroundColor: "var(--px-bg-color)" },
|
|
25779
|
+
...style
|
|
25780
|
+
};
|
|
25704
25781
|
return /* @__PURE__ */ jsx33(
|
|
25705
25782
|
Separator2,
|
|
25706
25783
|
{
|
|
25707
25784
|
orientation,
|
|
25708
|
-
className: cn("bg-gray-100", className)
|
|
25785
|
+
className: cn("bg-gray-100", className),
|
|
25786
|
+
style: resolvedStyle
|
|
25709
25787
|
}
|
|
25710
25788
|
);
|
|
25711
25789
|
};
|
|
@@ -25826,11 +25904,11 @@ var TableAtom = ({
|
|
|
25826
25904
|
borderColor
|
|
25827
25905
|
},
|
|
25828
25906
|
children: /* @__PURE__ */ jsxs12(Table3, { children: [
|
|
25829
|
-
/* @__PURE__ */ jsx35(TableHeader, {
|
|
25907
|
+
/* @__PURE__ */ jsx35(TableHeader, { children: /* @__PURE__ */ jsx35(TableRow, { style: { backgroundColor: headerBgColor }, children: safeHeaders.map((header, i) => /* @__PURE__ */ jsx35(
|
|
25830
25908
|
TableHead,
|
|
25831
25909
|
{
|
|
25832
25910
|
className: "text-xs font-bold uppercase tracking-widest px-6 py-4",
|
|
25833
|
-
style: { color: headerTextColor },
|
|
25911
|
+
style: { color: headerTextColor, backgroundColor: headerBgColor },
|
|
25834
25912
|
children: header
|
|
25835
25913
|
},
|
|
25836
25914
|
i
|
|
@@ -31451,16 +31529,28 @@ import { jsx as jsx56 } from "react/jsx-runtime";
|
|
|
31451
31529
|
var CalendarAtom = ({
|
|
31452
31530
|
mode = "single",
|
|
31453
31531
|
selectedDate,
|
|
31454
|
-
className
|
|
31532
|
+
className,
|
|
31533
|
+
style
|
|
31455
31534
|
}) => {
|
|
31456
31535
|
const date = selectedDate ? new Date(selectedDate) : void 0;
|
|
31536
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
31537
|
+
const wrapperStyle = {
|
|
31538
|
+
...hasPxVars && {
|
|
31539
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
31540
|
+
borderColor: "var(--px-border-color, hsl(var(--border) / 0.5))",
|
|
31541
|
+
color: "var(--px-text-color, inherit)"
|
|
31542
|
+
},
|
|
31543
|
+
...style
|
|
31544
|
+
};
|
|
31457
31545
|
return /* @__PURE__ */ jsx56(
|
|
31458
31546
|
"div",
|
|
31459
31547
|
{
|
|
31460
31548
|
className: cn(
|
|
31461
|
-
"p-4
|
|
31549
|
+
"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",
|
|
31550
|
+
!hasPxVars && "bg-background/80 border-border/50",
|
|
31462
31551
|
className
|
|
31463
31552
|
),
|
|
31553
|
+
style: wrapperStyle,
|
|
31464
31554
|
children: /* @__PURE__ */ jsx56(Calendar2, { mode, selected: date, className: "rounded-xl" })
|
|
31465
31555
|
}
|
|
31466
31556
|
);
|
|
@@ -33094,6 +33184,7 @@ var ChartAtom = ({
|
|
|
33094
33184
|
// Chart color customization props
|
|
33095
33185
|
seriesColors
|
|
33096
33186
|
}) => {
|
|
33187
|
+
const safeData = Array.isArray(data) ? data : [];
|
|
33097
33188
|
const buildConfigWithColors = (baseConfig) => {
|
|
33098
33189
|
if (!seriesColors) return baseConfig;
|
|
33099
33190
|
const coloredConfig = {};
|
|
@@ -33110,7 +33201,7 @@ var ChartAtom = ({
|
|
|
33110
33201
|
const renderChart = () => {
|
|
33111
33202
|
switch (chartType) {
|
|
33112
33203
|
case "bar":
|
|
33113
|
-
return /* @__PURE__ */ jsxs50(BarChart, { data, children: [
|
|
33204
|
+
return /* @__PURE__ */ jsxs50(BarChart, { data: safeData, children: [
|
|
33114
33205
|
/* @__PURE__ */ jsx85(CartesianGrid, { vertical: false }),
|
|
33115
33206
|
/* @__PURE__ */ jsx85(
|
|
33116
33207
|
XAxis,
|
|
@@ -33136,7 +33227,7 @@ var ChartAtom = ({
|
|
|
33136
33227
|
))
|
|
33137
33228
|
] });
|
|
33138
33229
|
case "line":
|
|
33139
|
-
return /* @__PURE__ */ jsxs50(LineChart, { data, children: [
|
|
33230
|
+
return /* @__PURE__ */ jsxs50(LineChart, { data: safeData, children: [
|
|
33140
33231
|
/* @__PURE__ */ jsx85(CartesianGrid, { vertical: false }),
|
|
33141
33232
|
/* @__PURE__ */ jsx85(
|
|
33142
33233
|
XAxis,
|
|
@@ -33162,7 +33253,7 @@ var ChartAtom = ({
|
|
|
33162
33253
|
))
|
|
33163
33254
|
] });
|
|
33164
33255
|
case "area":
|
|
33165
|
-
return /* @__PURE__ */ jsxs50(AreaChart, { data, children: [
|
|
33256
|
+
return /* @__PURE__ */ jsxs50(AreaChart, { data: safeData, children: [
|
|
33166
33257
|
/* @__PURE__ */ jsx85(CartesianGrid, { vertical: false }),
|
|
33167
33258
|
/* @__PURE__ */ jsx85(
|
|
33168
33259
|
XAxis,
|
|
@@ -33194,12 +33285,12 @@ var ChartAtom = ({
|
|
|
33194
33285
|
/* @__PURE__ */ jsx85(
|
|
33195
33286
|
Pie,
|
|
33196
33287
|
{
|
|
33197
|
-
data,
|
|
33288
|
+
data: safeData,
|
|
33198
33289
|
dataKey: YAxisKey || "value",
|
|
33199
33290
|
nameKey: XAxisKey || "name",
|
|
33200
33291
|
innerRadius: 60,
|
|
33201
33292
|
strokeWidth: 5,
|
|
33202
|
-
children:
|
|
33293
|
+
children: safeData.map((_, index) => /* @__PURE__ */ jsx85(
|
|
33203
33294
|
Cell,
|
|
33204
33295
|
{
|
|
33205
33296
|
fill: seriesColors?.[index] || `var(--color-${Object.keys(safeConfig)[index] || "default"})`
|
|
@@ -33210,7 +33301,7 @@ var ChartAtom = ({
|
|
|
33210
33301
|
)
|
|
33211
33302
|
] });
|
|
33212
33303
|
case "radar":
|
|
33213
|
-
return /* @__PURE__ */ jsxs50(RadarChart, { data, children: [
|
|
33304
|
+
return /* @__PURE__ */ jsxs50(RadarChart, { data: safeData, children: [
|
|
33214
33305
|
showTooltip && /* @__PURE__ */ jsx85(ChartTooltip, { cursor: false, content: /* @__PURE__ */ jsx85(ChartTooltipContent, {}) }),
|
|
33215
33306
|
/* @__PURE__ */ jsx85(PolarGrid, {}),
|
|
33216
33307
|
/* @__PURE__ */ jsx85(PolarAngleAxis, { dataKey: XAxisKey }),
|
|
@@ -33228,7 +33319,7 @@ var ChartAtom = ({
|
|
|
33228
33319
|
return /* @__PURE__ */ jsxs50(
|
|
33229
33320
|
RadialBarChart,
|
|
33230
33321
|
{
|
|
33231
|
-
data,
|
|
33322
|
+
data: safeData,
|
|
33232
33323
|
innerRadius: 30,
|
|
33233
33324
|
outerRadius: 110,
|
|
33234
33325
|
barSize: 10,
|
|
@@ -33256,12 +33347,25 @@ var ChartAtom = ({
|
|
|
33256
33347
|
return null;
|
|
33257
33348
|
}
|
|
33258
33349
|
};
|
|
33350
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
33351
|
+
const wrapperStyle = {
|
|
33352
|
+
...hasPxVars && {
|
|
33353
|
+
color: "var(--px-text-color, inherit)",
|
|
33354
|
+
backgroundColor: "var(--px-bg-color, transparent)",
|
|
33355
|
+
borderColor: "var(--px-border-color, transparent)",
|
|
33356
|
+
borderWidth: hasPxVars ? "1px" : void 0,
|
|
33357
|
+
borderStyle: hasPxVars ? "solid" : void 0,
|
|
33358
|
+
borderRadius: "1rem",
|
|
33359
|
+
padding: "0.75rem"
|
|
33360
|
+
},
|
|
33361
|
+
...style
|
|
33362
|
+
};
|
|
33259
33363
|
return /* @__PURE__ */ jsx85(
|
|
33260
33364
|
ChartContainer,
|
|
33261
33365
|
{
|
|
33262
33366
|
config: safeConfig,
|
|
33263
33367
|
className: cn("min-h-[200px] w-full", className),
|
|
33264
|
-
style,
|
|
33368
|
+
style: wrapperStyle,
|
|
33265
33369
|
children: renderChart()
|
|
33266
33370
|
}
|
|
33267
33371
|
);
|
|
@@ -33304,7 +33408,8 @@ import React80 from "react";
|
|
|
33304
33408
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
33305
33409
|
var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, onChange }) => {
|
|
33306
33410
|
const [hoverValue, setHoverValue] = React80.useState(null);
|
|
33307
|
-
|
|
33411
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
33412
|
+
return /* @__PURE__ */ jsx87("div", { className: cn("flex items-center gap-1", className), style, "data-px-styled": hasPxVars ? "" : void 0, children: Array.from({ length: max2 }, (_, i) => {
|
|
33308
33413
|
const starValue = i + 1;
|
|
33309
33414
|
const isActive = (hoverValue ?? value) >= starValue;
|
|
33310
33415
|
return /* @__PURE__ */ jsx87(
|
|
@@ -33312,9 +33417,13 @@ var RatingAtom = ({ value, max: max2 = 5, readonly = false, className, style, on
|
|
|
33312
33417
|
{
|
|
33313
33418
|
className: cn(
|
|
33314
33419
|
"h-5 w-5 transition-colors",
|
|
33315
|
-
isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300",
|
|
33420
|
+
!hasPxVars && (isActive ? "fill-yellow-400 text-yellow-400" : "text-gray-300"),
|
|
33316
33421
|
!readonly && "cursor-pointer hover:scale-110"
|
|
33317
33422
|
),
|
|
33423
|
+
style: hasPxVars ? {
|
|
33424
|
+
color: isActive ? "var(--px-accent-color, #facc15)" : "var(--px-track-color, #d1d5db)",
|
|
33425
|
+
fill: isActive ? "var(--px-accent-color, #facc15)" : "transparent"
|
|
33426
|
+
} : void 0,
|
|
33318
33427
|
onClick: () => !readonly && onChange?.(starValue),
|
|
33319
33428
|
onMouseEnter: () => !readonly && setHoverValue(starValue),
|
|
33320
33429
|
onMouseLeave: () => !readonly && setHoverValue(null)
|
|
@@ -34305,9 +34414,16 @@ import { jsx as jsx97, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
|
34305
34414
|
var StatsGrid = ({
|
|
34306
34415
|
items,
|
|
34307
34416
|
stats,
|
|
34308
|
-
className
|
|
34417
|
+
className,
|
|
34418
|
+
style
|
|
34309
34419
|
}) => {
|
|
34310
34420
|
const displayItems = items || stats || [];
|
|
34421
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
34422
|
+
const cardStyle = hasPxVars ? {
|
|
34423
|
+
backgroundColor: "var(--px-bg-color, var(--card-background, white))",
|
|
34424
|
+
borderColor: "var(--px-border-color, var(--border-color, #e5e7eb))"
|
|
34425
|
+
} : void 0;
|
|
34426
|
+
const textColor = hasPxVars ? "var(--px-text-color, inherit)" : void 0;
|
|
34311
34427
|
return /* @__PURE__ */ jsx97(
|
|
34312
34428
|
"div",
|
|
34313
34429
|
{
|
|
@@ -34315,6 +34431,7 @@ var StatsGrid = ({
|
|
|
34315
34431
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
34316
34432
|
className
|
|
34317
34433
|
),
|
|
34434
|
+
style,
|
|
34318
34435
|
children: displayItems?.map((item, index) => {
|
|
34319
34436
|
const Icon3 = item.icon ? lucide_react_exports[item.icon] : null;
|
|
34320
34437
|
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";
|
|
@@ -34322,7 +34439,11 @@ var StatsGrid = ({
|
|
|
34322
34439
|
return /* @__PURE__ */ jsx97(
|
|
34323
34440
|
Card,
|
|
34324
34441
|
{
|
|
34325
|
-
className:
|
|
34442
|
+
className: cn(
|
|
34443
|
+
"backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-300 rounded-[24px] overflow-hidden",
|
|
34444
|
+
!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))]"
|
|
34445
|
+
),
|
|
34446
|
+
style: cardStyle,
|
|
34326
34447
|
children: /* @__PURE__ */ jsxs57(CardContent, { className: "p-5 flex flex-col gap-1.5", children: [
|
|
34327
34448
|
/* @__PURE__ */ jsxs57("div", { className: "flex items-center justify-between", children: [
|
|
34328
34449
|
/* @__PURE__ */ jsx97(
|
|
@@ -34332,10 +34453,17 @@ var StatsGrid = ({
|
|
|
34332
34453
|
type: "text",
|
|
34333
34454
|
content: item.label,
|
|
34334
34455
|
variant: "small",
|
|
34335
|
-
className: "text-muted-foreground font-medium tracking-wide uppercase text-[10px]"
|
|
34456
|
+
className: cn(!hasPxVars && "text-muted-foreground", "font-medium tracking-wide uppercase text-[10px]"),
|
|
34457
|
+
style: textColor ? { color: textColor } : void 0
|
|
34336
34458
|
}
|
|
34337
34459
|
),
|
|
34338
|
-
Icon3 && /* @__PURE__ */ jsx97(
|
|
34460
|
+
Icon3 && /* @__PURE__ */ jsx97(
|
|
34461
|
+
Icon3,
|
|
34462
|
+
{
|
|
34463
|
+
className: cn("w-4 h-4", !hasPxVars && "text-[var(--primary-color,theme(colors.purple.500))]"),
|
|
34464
|
+
style: textColor ? { color: textColor } : void 0
|
|
34465
|
+
}
|
|
34466
|
+
)
|
|
34339
34467
|
] }),
|
|
34340
34468
|
/* @__PURE__ */ jsxs57("div", { className: "flex items-baseline gap-3", children: [
|
|
34341
34469
|
/* @__PURE__ */ jsx97(
|
|
@@ -34346,9 +34474,11 @@ var StatsGrid = ({
|
|
|
34346
34474
|
content: String(item.value),
|
|
34347
34475
|
variant: "h3",
|
|
34348
34476
|
className: cn(
|
|
34349
|
-
"font-bold
|
|
34477
|
+
"font-bold tracking-tight leading-tight",
|
|
34478
|
+
!hasPxVars && "text-[var(--foreground)]",
|
|
34350
34479
|
String(item.value).length > 20 ? "text-base" : String(item.value).length > 12 ? "text-lg" : "text-xl"
|
|
34351
|
-
)
|
|
34480
|
+
),
|
|
34481
|
+
style: textColor ? { color: textColor } : void 0
|
|
34352
34482
|
}
|
|
34353
34483
|
),
|
|
34354
34484
|
item.trend && /* @__PURE__ */ jsxs57(
|
|
@@ -34513,16 +34643,26 @@ var FilterBar = ({ filters, showSearch = true, className, onFilterToggle, onSear
|
|
|
34513
34643
|
// src/molecules/generic/FileUpload/FileUpload.tsx
|
|
34514
34644
|
import React88 from "react";
|
|
34515
34645
|
import { jsx as jsx101, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
34516
|
-
var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
34646
|
+
var FileUpload = ({ title, accept, multiple, className, style, onFilesSelected }) => {
|
|
34517
34647
|
const [isDragging, setIsDragging] = React88.useState(false);
|
|
34648
|
+
const hasPxVars = style && Object.keys(style).some((k) => k.startsWith("--px-"));
|
|
34649
|
+
const wrapperStyle = {
|
|
34650
|
+
...hasPxVars && {
|
|
34651
|
+
borderColor: isDragging ? "var(--px-accent-color)" : "var(--px-border-color)",
|
|
34652
|
+
backgroundColor: isDragging ? void 0 : "var(--px-bg-color, transparent)"
|
|
34653
|
+
},
|
|
34654
|
+
...style
|
|
34655
|
+
};
|
|
34518
34656
|
return /* @__PURE__ */ jsxs61(
|
|
34519
34657
|
"div",
|
|
34520
34658
|
{
|
|
34521
34659
|
className: cn(
|
|
34522
34660
|
"relative flex flex-col items-center justify-center p-8 border-2 border-dashed rounded-3xl transition-all",
|
|
34523
|
-
isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white",
|
|
34661
|
+
!hasPxVars && (isDragging ? "border-purple-500 bg-purple-50" : "border-purple-100 bg-white"),
|
|
34524
34662
|
className
|
|
34525
34663
|
),
|
|
34664
|
+
style: wrapperStyle,
|
|
34665
|
+
"data-px-styled": hasPxVars ? "" : void 0,
|
|
34526
34666
|
onDragOver: (e) => {
|
|
34527
34667
|
e.preventDefault();
|
|
34528
34668
|
setIsDragging(true);
|
|
@@ -34536,8 +34676,22 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
|
34536
34676
|
}
|
|
34537
34677
|
},
|
|
34538
34678
|
children: [
|
|
34539
|
-
/* @__PURE__ */ jsx101(
|
|
34540
|
-
|
|
34679
|
+
/* @__PURE__ */ jsx101(
|
|
34680
|
+
"div",
|
|
34681
|
+
{
|
|
34682
|
+
className: cn("w-12 h-12 rounded-2xl flex items-center justify-center mb-4", !hasPxVars && "bg-purple-100 text-purple-600"),
|
|
34683
|
+
style: hasPxVars ? { backgroundColor: "var(--px-accent-color)", color: "var(--px-accent-fg, white)", opacity: 0.15 } : void 0,
|
|
34684
|
+
children: /* @__PURE__ */ jsx101(Upload, { className: "w-6 h-6", style: hasPxVars ? { color: "var(--px-accent-color)", opacity: 1 } : void 0 })
|
|
34685
|
+
}
|
|
34686
|
+
),
|
|
34687
|
+
/* @__PURE__ */ jsx101(
|
|
34688
|
+
"h4",
|
|
34689
|
+
{
|
|
34690
|
+
className: cn("font-bold mb-1", !hasPxVars && "text-gray-900"),
|
|
34691
|
+
style: hasPxVars ? { color: "var(--px-text-color, inherit)" } : void 0,
|
|
34692
|
+
children: title
|
|
34693
|
+
}
|
|
34694
|
+
),
|
|
34541
34695
|
/* @__PURE__ */ jsx101("p", { className: "text-sm text-muted-foreground mb-6", children: "Drag and drop or click to browse" }),
|
|
34542
34696
|
/* @__PURE__ */ jsx101(
|
|
34543
34697
|
"input",
|
|
@@ -34553,7 +34707,8 @@ var FileUpload = ({ title, accept, multiple, className, onFilesSelected }) => {
|
|
|
34553
34707
|
Button,
|
|
34554
34708
|
{
|
|
34555
34709
|
variant: "outline",
|
|
34556
|
-
className: "rounded-full border-purple-200 text-purple-700 hover:bg-purple-50",
|
|
34710
|
+
className: cn("rounded-full", !hasPxVars && "border-purple-200 text-purple-700 hover:bg-purple-50"),
|
|
34711
|
+
style: hasPxVars ? { borderColor: "var(--px-accent-color)", color: "var(--px-accent-color)" } : void 0,
|
|
34557
34712
|
children: "Select Files"
|
|
34558
34713
|
}
|
|
34559
34714
|
)
|