pxengine 0.1.19 → 0.1.21
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 +648 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -46
- package/dist/index.d.ts +110 -46
- package/dist/index.mjs +651 -390
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +258 -70
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/render/PXEngineRenderer.tsx
|
|
8
|
-
import
|
|
8
|
+
import React98 from "react";
|
|
9
9
|
|
|
10
10
|
// src/atoms/index.ts
|
|
11
11
|
var atoms_exports = {};
|
|
@@ -118,7 +118,8 @@ var buttonVariants = cva(
|
|
|
118
118
|
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
119
119
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
120
120
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
121
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
121
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
122
|
+
purple: "bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border border-purpleText1 dark:border-purpleText shadow-none font-medium"
|
|
122
123
|
},
|
|
123
124
|
size: {
|
|
124
125
|
default: "h-10 px-4 py-2",
|
|
@@ -25262,7 +25263,8 @@ var badgeVariants = cva3(
|
|
|
25262
25263
|
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
25263
25264
|
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
25264
25265
|
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
25265
|
-
outline: "text-foreground"
|
|
25266
|
+
outline: "text-foreground",
|
|
25267
|
+
purple: "bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border border-purpleText1 dark:border-purpleText"
|
|
25266
25268
|
}
|
|
25267
25269
|
},
|
|
25268
25270
|
defaultVariants: {
|
|
@@ -33283,6 +33285,7 @@ __export(molecules_exports, {
|
|
|
33283
33285
|
AudienceDemographicsCard: () => AudienceDemographicsCard,
|
|
33284
33286
|
AudienceMetricCard: () => AudienceMetricCard,
|
|
33285
33287
|
BrandAffinityGroup: () => BrandAffinityGroup,
|
|
33288
|
+
CampaignConceptCard: () => CampaignConceptCard,
|
|
33286
33289
|
CampaignSeedCard: () => CampaignSeedCard,
|
|
33287
33290
|
ContentPreviewGallery: () => ContentPreviewGallery,
|
|
33288
33291
|
CountrySelectDisplay: () => CountrySelectDisplay,
|
|
@@ -33290,6 +33293,7 @@ __export(molecules_exports, {
|
|
|
33290
33293
|
CreatorActionHeader: () => CreatorActionHeader,
|
|
33291
33294
|
CreatorGridCard: () => CreatorGridCard,
|
|
33292
33295
|
CreatorProfileSummary: () => CreatorProfileSummary,
|
|
33296
|
+
CreatorSearch: () => CreatorSearch,
|
|
33293
33297
|
DataGrid: () => DataGrid,
|
|
33294
33298
|
EditableField: () => EditableField,
|
|
33295
33299
|
EmptyState: () => EmptyState,
|
|
@@ -33640,12 +33644,13 @@ var EditableField = React85.memo(
|
|
|
33640
33644
|
onSave,
|
|
33641
33645
|
onCancel,
|
|
33642
33646
|
isSaving = false,
|
|
33643
|
-
isChanged = false,
|
|
33644
33647
|
config = {},
|
|
33645
33648
|
className,
|
|
33646
33649
|
renderDisplay,
|
|
33647
|
-
renderEdit
|
|
33650
|
+
renderEdit,
|
|
33651
|
+
...rest
|
|
33648
33652
|
}) => {
|
|
33653
|
+
void rest;
|
|
33649
33654
|
const [localValue, setLocalValue] = useState5(value);
|
|
33650
33655
|
const inputRef = useRef4(null);
|
|
33651
33656
|
useEffect4(() => {
|
|
@@ -33682,7 +33687,7 @@ var EditableField = React85.memo(
|
|
|
33682
33687
|
onKeyDown: handleKeyDown,
|
|
33683
33688
|
placeholder: config.placeholder,
|
|
33684
33689
|
rows: config.rows || 3,
|
|
33685
|
-
className: "min-h-[80px] resize-none"
|
|
33690
|
+
className: "min-h-[80px] resize-none bg-background dark:bg-gray100 border-gray300"
|
|
33686
33691
|
}
|
|
33687
33692
|
);
|
|
33688
33693
|
case "select":
|
|
@@ -33711,9 +33716,12 @@ var EditableField = React85.memo(
|
|
|
33711
33716
|
/* @__PURE__ */ jsx94(
|
|
33712
33717
|
Slider,
|
|
33713
33718
|
{
|
|
33714
|
-
defaultValue: [
|
|
33715
|
-
|
|
33719
|
+
defaultValue: [
|
|
33720
|
+
localValue?.min || 0,
|
|
33721
|
+
localValue?.max || 100
|
|
33722
|
+
],
|
|
33716
33723
|
min: config.sliderConfig?.min || 0,
|
|
33724
|
+
max: config.sliderConfig?.max || 100,
|
|
33717
33725
|
step: config.sliderConfig?.step || 1,
|
|
33718
33726
|
onValueChange: ([min2, max2]) => setLocalValue({ min: min2, max: max2 })
|
|
33719
33727
|
}
|
|
@@ -33731,7 +33739,8 @@ var EditableField = React85.memo(
|
|
|
33731
33739
|
onKeyDown: handleKeyDown,
|
|
33732
33740
|
min: config.numberConfig?.min,
|
|
33733
33741
|
max: config.numberConfig?.max,
|
|
33734
|
-
step: config.numberConfig?.step
|
|
33742
|
+
step: config.numberConfig?.step,
|
|
33743
|
+
className: "bg-background dark:bg-gray100 border-gray300"
|
|
33735
33744
|
}
|
|
33736
33745
|
);
|
|
33737
33746
|
default:
|
|
@@ -33743,7 +33752,8 @@ var EditableField = React85.memo(
|
|
|
33743
33752
|
value: localValue || "",
|
|
33744
33753
|
onChange: (e) => setLocalValue(e.target.value),
|
|
33745
33754
|
onKeyDown: handleKeyDown,
|
|
33746
|
-
placeholder: config.placeholder
|
|
33755
|
+
placeholder: config.placeholder,
|
|
33756
|
+
className: "bg-background dark:bg-gray100 border-gray300"
|
|
33747
33757
|
}
|
|
33748
33758
|
);
|
|
33749
33759
|
}
|
|
@@ -33753,60 +33763,77 @@ var EditableField = React85.memo(
|
|
|
33753
33763
|
if (type === "slider") {
|
|
33754
33764
|
return config.sliderConfig?.formatValue ? config.sliderConfig.formatValue(value) : `${value?.min} - ${value?.max}`;
|
|
33755
33765
|
}
|
|
33756
|
-
if (!value)
|
|
33766
|
+
if (!value) {
|
|
33767
|
+
return /* @__PURE__ */ jsx94("span", { className: "opacity-0", children: "-" });
|
|
33768
|
+
}
|
|
33757
33769
|
return value.toString();
|
|
33758
33770
|
};
|
|
33759
|
-
return /* @__PURE__ */ jsxs54(
|
|
33760
|
-
|
|
33761
|
-
|
|
33762
|
-
|
|
33763
|
-
"
|
|
33764
|
-
|
|
33765
|
-
|
|
33766
|
-
|
|
33767
|
-
|
|
33768
|
-
|
|
33769
|
-
|
|
33770
|
-
|
|
33771
|
-
|
|
33772
|
-
|
|
33773
|
-
|
|
33774
|
-
|
|
33775
|
-
|
|
33776
|
-
|
|
33777
|
-
|
|
33778
|
-
|
|
33779
|
-
|
|
33780
|
-
|
|
33781
|
-
|
|
33782
|
-
|
|
33783
|
-
|
|
33784
|
-
|
|
33785
|
-
|
|
33771
|
+
return /* @__PURE__ */ jsxs54(
|
|
33772
|
+
"div",
|
|
33773
|
+
{
|
|
33774
|
+
className: cn(
|
|
33775
|
+
"relative z-10 group flex flex-col gap-2 p-3 bg-[#0A0A0A] rounded-md mb-8",
|
|
33776
|
+
className
|
|
33777
|
+
),
|
|
33778
|
+
children: [
|
|
33779
|
+
/* @__PURE__ */ jsx94("div", { className: "flex justify-between items-start mb-2", children: /* @__PURE__ */ jsxs54("div", { className: "w-full flex justify-between items-center flex-wrap gap-2", children: [
|
|
33780
|
+
/* @__PURE__ */ jsx94(
|
|
33781
|
+
"h4",
|
|
33782
|
+
{
|
|
33783
|
+
className: "px-2 py-1 tracking-widest bg-purple200/50 dark:bg-purple-500/20 text-purpleText dark:text-purple-400 text-[10px] font-bold rounded uppercase",
|
|
33784
|
+
style: { fontFamily: "Noto Sans, sans-serif" },
|
|
33785
|
+
children: label
|
|
33786
|
+
}
|
|
33787
|
+
),
|
|
33788
|
+
!isEditingProp && /* @__PURE__ */ jsxs54("span", { className: "inline-flex items-center gap-1 text-[10px] font-medium text-green-600 dark:text-green-500", children: [
|
|
33789
|
+
"Suggested by an Agent",
|
|
33790
|
+
/* @__PURE__ */ jsx94(
|
|
33791
|
+
Pencil,
|
|
33792
|
+
{
|
|
33793
|
+
className: "h-3 w-3 hover:text-green-700 cursor-pointer",
|
|
33794
|
+
onClick: onEdit
|
|
33795
|
+
}
|
|
33796
|
+
)
|
|
33797
|
+
] })
|
|
33798
|
+
] }) }),
|
|
33799
|
+
isEditingProp ? /* @__PURE__ */ jsxs54("div", { className: "flex flex-col gap-3", children: [
|
|
33800
|
+
renderInput(),
|
|
33801
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-end gap-2", children: [
|
|
33802
|
+
/* @__PURE__ */ jsx94(
|
|
33803
|
+
Button,
|
|
33804
|
+
{
|
|
33805
|
+
size: "icon",
|
|
33806
|
+
variant: "outline",
|
|
33807
|
+
className: "h-8 w-8 text-destructive border-destructive/20 hover:bg-destructive/10 rounded-lg",
|
|
33808
|
+
onClick: onCancel,
|
|
33809
|
+
disabled: isSaving,
|
|
33810
|
+
children: /* @__PURE__ */ jsx94(X, { className: "h-4 w-4" })
|
|
33811
|
+
}
|
|
33812
|
+
),
|
|
33813
|
+
/* @__PURE__ */ jsx94(
|
|
33814
|
+
Button,
|
|
33815
|
+
{
|
|
33816
|
+
size: "icon",
|
|
33817
|
+
className: "h-8 w-8 bg-purpleLight text-purpleText2 hover:bg-purpleText1 rounded-lg border border-purpleText1 shadow-none",
|
|
33818
|
+
onClick: handleSave,
|
|
33819
|
+
disabled: isSaving,
|
|
33820
|
+
children: isSaving ? /* @__PURE__ */ jsx94(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx94(Check, { className: "h-4 w-4" })
|
|
33821
|
+
}
|
|
33822
|
+
)
|
|
33823
|
+
] })
|
|
33824
|
+
] }) : /* @__PURE__ */ jsx94(
|
|
33825
|
+
"div",
|
|
33786
33826
|
{
|
|
33787
|
-
|
|
33788
|
-
|
|
33789
|
-
|
|
33790
|
-
|
|
33791
|
-
children:
|
|
33827
|
+
className: cn(
|
|
33828
|
+
"relative flex items-center justify-between rounded-lg px-3 py-2",
|
|
33829
|
+
"text-[14px] text-foreground font-normal leading-relaxed"
|
|
33830
|
+
),
|
|
33831
|
+
children: /* @__PURE__ */ jsx94("div", { className: "flex-1", children: formattedValue() })
|
|
33792
33832
|
}
|
|
33793
33833
|
)
|
|
33794
|
-
]
|
|
33795
|
-
|
|
33796
|
-
|
|
33797
|
-
{
|
|
33798
|
-
className: cn(
|
|
33799
|
-
"relative flex items-center justify-between rounded-xl px-2 py-1.5 transition-all duration-200",
|
|
33800
|
-
"hover:bg-muted cursor-pointer border border-transparent hover:border-border group-hover:shadow-sm"
|
|
33801
|
-
),
|
|
33802
|
-
onClick: onEdit,
|
|
33803
|
-
children: [
|
|
33804
|
-
/* @__PURE__ */ jsx94("div", { className: "text-[14px] text-foreground font-semibold truncate flex-1 leading-relaxed", children: formattedValue() }),
|
|
33805
|
-
/* @__PURE__ */ jsx94(Pencil, { className: "h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
|
|
33806
|
-
]
|
|
33807
|
-
}
|
|
33808
|
-
)
|
|
33809
|
-
] });
|
|
33834
|
+
]
|
|
33835
|
+
}
|
|
33836
|
+
);
|
|
33810
33837
|
}
|
|
33811
33838
|
);
|
|
33812
33839
|
EditableField.displayName = "EditableField";
|
|
@@ -33864,6 +33891,7 @@ var ActionButton = React86.memo(
|
|
|
33864
33891
|
"relative min-w-[140px] overflow-hidden group transition-all duration-300",
|
|
33865
33892
|
"bg-[var(--primary-color)] hover:opacity-90 text-white font-bold rounded-full px-5 py-2.5 shadow-[0_4px_14px_0_hsl(var(--primary)/30%)] hover:shadow-[0_6px_20px_0_hsl(var(--primary)/40%)]",
|
|
33866
33893
|
variant === "outline" && "bg-transparent border-[var(--primary-color)] text-[var(--primary-color)] hover:bg-[var(--primary-color)]/5",
|
|
33894
|
+
variant === "purple" && "bg-gray100 hover:bg-gray200 text-foreground border border-purple100 shadow-none font-semibold px-8 py-3 h-auto",
|
|
33867
33895
|
isLoading && "opacity-80"
|
|
33868
33896
|
),
|
|
33869
33897
|
children: [
|
|
@@ -33903,7 +33931,7 @@ var ActionButton = React86.memo(
|
|
|
33903
33931
|
ActionButton.displayName = "ActionButton";
|
|
33904
33932
|
|
|
33905
33933
|
// src/molecules/generic/FormCard/FormCard.tsx
|
|
33906
|
-
import React87 from "react";
|
|
33934
|
+
import React87, { useState as useState7 } from "react";
|
|
33907
33935
|
import { jsx as jsx96, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
33908
33936
|
var FormCard = React87.memo(
|
|
33909
33937
|
({
|
|
@@ -33916,94 +33944,103 @@ var FormCard = React87.memo(
|
|
|
33916
33944
|
onFieldEdit,
|
|
33917
33945
|
onFieldSave,
|
|
33918
33946
|
onFieldCancel,
|
|
33919
|
-
showTimeline =
|
|
33920
|
-
// Default to false to remove "bullets"
|
|
33947
|
+
showTimeline = true,
|
|
33921
33948
|
proceedLabel,
|
|
33922
|
-
countdown,
|
|
33923
|
-
isPaused = false,
|
|
33924
|
-
onPause,
|
|
33925
33949
|
onProceed,
|
|
33950
|
+
isLatestMessage = true,
|
|
33926
33951
|
className,
|
|
33927
33952
|
footer
|
|
33928
33953
|
}) => {
|
|
33954
|
+
const [showCopyButton, setShowCopyButton] = useState7(false);
|
|
33929
33955
|
const handleCopyAll = () => {
|
|
33930
|
-
const text = fields.map(
|
|
33931
|
-
|
|
33932
|
-
|
|
33956
|
+
const text = fields.map((field) => {
|
|
33957
|
+
const value = data[field.key];
|
|
33958
|
+
return `${field.label}: ${typeof value === "object" ? JSON.stringify(value) : value}`;
|
|
33959
|
+
}).join("\n");
|
|
33933
33960
|
navigator.clipboard.writeText(text);
|
|
33934
33961
|
};
|
|
33935
33962
|
return /* @__PURE__ */ jsxs56(
|
|
33936
|
-
|
|
33963
|
+
"div",
|
|
33937
33964
|
{
|
|
33938
33965
|
className: cn(
|
|
33939
|
-
"w-full rounded-[
|
|
33966
|
+
"relative w-full rounded-[20px] bg-background dark:bg-gray50 border border-gray400 shadow-lg overflow-hidden mb-6",
|
|
33940
33967
|
className
|
|
33941
33968
|
),
|
|
33969
|
+
onMouseEnter: () => setShowCopyButton(true),
|
|
33970
|
+
onMouseLeave: () => setShowCopyButton(false),
|
|
33942
33971
|
children: [
|
|
33943
|
-
/* @__PURE__ */
|
|
33944
|
-
|
|
33972
|
+
showCopyButton && /* @__PURE__ */ jsx96(
|
|
33973
|
+
"button",
|
|
33974
|
+
{
|
|
33975
|
+
onClick: handleCopyAll,
|
|
33976
|
+
title: "Copy all details",
|
|
33977
|
+
className: "absolute top-4 right-4 p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray200 text-gray-400 hover:text-gray-600 dark:hover:text-gray300 transition-all active:scale-95 z-10",
|
|
33978
|
+
children: /* @__PURE__ */ jsx96(Copy, { className: "h-4 w-4" })
|
|
33979
|
+
}
|
|
33980
|
+
),
|
|
33981
|
+
/* @__PURE__ */ jsxs56("div", { className: "p-6 relative", children: [
|
|
33945
33982
|
/* @__PURE__ */ jsx96(
|
|
33946
|
-
"
|
|
33983
|
+
"h3",
|
|
33947
33984
|
{
|
|
33948
|
-
|
|
33949
|
-
|
|
33950
|
-
|
|
33951
|
-
children: /* @__PURE__ */ jsx96(Copy, { className: "h-4 w-4" })
|
|
33985
|
+
className: "text-gray900 mb-12",
|
|
33986
|
+
style: { fontFamily: "Noto Sans, sans-serif" },
|
|
33987
|
+
children: title
|
|
33952
33988
|
}
|
|
33953
|
-
)
|
|
33954
|
-
|
|
33955
|
-
/* @__PURE__ */ jsx96(CardContent, { className: "px-6 pt-1 pb-4", children: /* @__PURE__ */ jsxs56("div", { className: "relative", children: [
|
|
33956
|
-
showTimeline && /* @__PURE__ */ jsx96("div", { className: "absolute left-[7px] top-2 bottom-6 w-0.5 border-l-2 border-dotted border-border pointer-events-none" }),
|
|
33957
|
-
/* @__PURE__ */ jsx96("div", { className: "space-y-2.5", children: fields.map((field) => /* @__PURE__ */ jsxs56(
|
|
33989
|
+
),
|
|
33990
|
+
showTimeline && /* @__PURE__ */ jsx96(
|
|
33958
33991
|
"div",
|
|
33959
33992
|
{
|
|
33960
|
-
className:
|
|
33961
|
-
|
|
33962
|
-
|
|
33963
|
-
|
|
33964
|
-
|
|
33965
|
-
|
|
33966
|
-
|
|
33967
|
-
|
|
33968
|
-
|
|
33969
|
-
|
|
33970
|
-
|
|
33971
|
-
|
|
33972
|
-
|
|
33973
|
-
|
|
33974
|
-
|
|
33975
|
-
|
|
33976
|
-
|
|
33977
|
-
|
|
33978
|
-
|
|
33979
|
-
|
|
33980
|
-
|
|
33981
|
-
|
|
33982
|
-
|
|
33983
|
-
|
|
33984
|
-
|
|
33985
|
-
|
|
33986
|
-
|
|
33987
|
-
|
|
33988
|
-
)
|
|
33989
|
-
]
|
|
33993
|
+
className: "absolute z-0 left-[60px] top-[100px] bottom-[60px] w-[3px]",
|
|
33994
|
+
style: {
|
|
33995
|
+
background: `
|
|
33996
|
+
radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y,
|
|
33997
|
+
linear-gradient(#3C3D3E 50%, transparent 0) 50%/2px 10px repeat-y
|
|
33998
|
+
`
|
|
33999
|
+
}
|
|
34000
|
+
}
|
|
34001
|
+
),
|
|
34002
|
+
fields.map((field, index) => /* @__PURE__ */ jsx96(
|
|
34003
|
+
EditableField,
|
|
34004
|
+
{
|
|
34005
|
+
label: field.label,
|
|
34006
|
+
value: data[field.key],
|
|
34007
|
+
type: field.type,
|
|
34008
|
+
config: field,
|
|
34009
|
+
isEditing: editingFields[field.key],
|
|
34010
|
+
isChanged: changedFields[field.key],
|
|
34011
|
+
isSaving: savingFields[field.key],
|
|
34012
|
+
isLatestMessage,
|
|
34013
|
+
onEdit: () => onFieldEdit?.(field.key),
|
|
34014
|
+
onSave: (val) => onFieldSave?.(field.key, val),
|
|
34015
|
+
onCancel: () => onFieldCancel?.(field.key),
|
|
34016
|
+
renderDisplay: field.renderDisplay,
|
|
34017
|
+
renderEdit: field.renderEdit,
|
|
34018
|
+
showIndex: showTimeline,
|
|
34019
|
+
index,
|
|
34020
|
+
totalFields: fields.length
|
|
33990
34021
|
},
|
|
33991
34022
|
field.key
|
|
33992
|
-
))
|
|
33993
|
-
] })
|
|
33994
|
-
|
|
33995
|
-
|
|
33996
|
-
|
|
33997
|
-
{
|
|
33998
|
-
|
|
33999
|
-
|
|
34000
|
-
|
|
34001
|
-
|
|
34002
|
-
|
|
34003
|
-
|
|
34004
|
-
|
|
34005
|
-
|
|
34006
|
-
|
|
34023
|
+
))
|
|
34024
|
+
] }),
|
|
34025
|
+
isLatestMessage && onProceed && proceedLabel ? /* @__PURE__ */ jsx96("div", { className: "my-6 flex justify-center", children: /* @__PURE__ */ jsxs56(
|
|
34026
|
+
"button",
|
|
34027
|
+
{
|
|
34028
|
+
onClick: () => {
|
|
34029
|
+
if (isLatestMessage) {
|
|
34030
|
+
onProceed();
|
|
34031
|
+
}
|
|
34032
|
+
},
|
|
34033
|
+
className: cn(
|
|
34034
|
+
"px-6 py-2.5 border rounded-full transition-colors text-sm font-medium flex items-center gap-2",
|
|
34035
|
+
"bg-purpleLight dark:bg-purple200 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purple100",
|
|
34036
|
+
"hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-white"
|
|
34037
|
+
),
|
|
34038
|
+
children: [
|
|
34039
|
+
proceedLabel,
|
|
34040
|
+
/* @__PURE__ */ jsx96(ChevronRight, { className: "w-4 h-4" })
|
|
34041
|
+
]
|
|
34042
|
+
}
|
|
34043
|
+
) }) : !isLatestMessage && footer ? /* @__PURE__ */ jsx96("div", { className: "flex justify-end items-center pb-4 pr-4 gap-1 text-green-600 text-sm font-medium", children: footer }) : null
|
|
34007
34044
|
]
|
|
34008
34045
|
}
|
|
34009
34046
|
);
|
|
@@ -34525,20 +34562,32 @@ var CampaignSeedCard = React90.memo(
|
|
|
34525
34562
|
const fields = useMemo4(() => {
|
|
34526
34563
|
return providedFields || generateFieldsFromData(data);
|
|
34527
34564
|
}, [providedFields, data]);
|
|
34528
|
-
return /* @__PURE__ */
|
|
34529
|
-
|
|
34530
|
-
|
|
34531
|
-
|
|
34532
|
-
|
|
34533
|
-
|
|
34534
|
-
|
|
34535
|
-
|
|
34536
|
-
|
|
34537
|
-
/* @__PURE__ */
|
|
34538
|
-
|
|
34539
|
-
|
|
34540
|
-
|
|
34541
|
-
|
|
34565
|
+
return /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-2 mb-10", children: [
|
|
34566
|
+
/* @__PURE__ */ jsx106(
|
|
34567
|
+
FormCard,
|
|
34568
|
+
{
|
|
34569
|
+
...formCardProps,
|
|
34570
|
+
data,
|
|
34571
|
+
title: formCardProps.title || "Campaign Brief",
|
|
34572
|
+
fields,
|
|
34573
|
+
className,
|
|
34574
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs66("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-xs font-semibold py-1 mb-6", children: [
|
|
34575
|
+
/* @__PURE__ */ jsx106(CircleCheck, { className: "h-4 w-4" }),
|
|
34576
|
+
/* @__PURE__ */ jsx106("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
34577
|
+
] }) : formCardProps.footer
|
|
34578
|
+
}
|
|
34579
|
+
),
|
|
34580
|
+
!isLatestMessage && selectionStatus && /* @__PURE__ */ jsx106("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ jsx106(
|
|
34581
|
+
"button",
|
|
34582
|
+
{
|
|
34583
|
+
className: cn(
|
|
34584
|
+
"flex items-center gap-2 px-6 py-2.5 border rounded-full text-sm transition-all active:scale-95",
|
|
34585
|
+
"bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purpleText dark:hover:text-white"
|
|
34586
|
+
),
|
|
34587
|
+
children: "Continue"
|
|
34588
|
+
}
|
|
34589
|
+
) })
|
|
34590
|
+
] });
|
|
34542
34591
|
}
|
|
34543
34592
|
);
|
|
34544
34593
|
CampaignSeedCard.displayName = "CampaignSeedCard";
|
|
@@ -34577,7 +34626,7 @@ var SearchSpecCard = React91.memo(
|
|
|
34577
34626
|
SearchSpecCard.displayName = "SearchSpecCard";
|
|
34578
34627
|
|
|
34579
34628
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
34580
|
-
import { useState as
|
|
34629
|
+
import { useState as useState8, useRef as useRef5, useEffect as useEffect6 } from "react";
|
|
34581
34630
|
|
|
34582
34631
|
// src/lib/countries.ts
|
|
34583
34632
|
var countries = [
|
|
@@ -34789,8 +34838,8 @@ var CountrySelectEdit = ({
|
|
|
34789
34838
|
value,
|
|
34790
34839
|
onChange
|
|
34791
34840
|
}) => {
|
|
34792
|
-
const [isDropdownOpen, setIsDropdownOpen] =
|
|
34793
|
-
const [searchTerm, setSearchTerm] =
|
|
34841
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState8(false);
|
|
34842
|
+
const [searchTerm, setSearchTerm] = useState8("");
|
|
34794
34843
|
const dropdownRef = useRef5(null);
|
|
34795
34844
|
useEffect6(() => {
|
|
34796
34845
|
const handleClickOutside = (event) => {
|
|
@@ -35009,7 +35058,7 @@ var KeywordBundlesEdit = ({
|
|
|
35009
35058
|
var KeywordBundlesDisplay = ({ value }) => {
|
|
35010
35059
|
const bundles = Array.isArray(value) ? value : [];
|
|
35011
35060
|
if (bundles.length === 0)
|
|
35012
|
-
return /* @__PURE__ */ jsx108("span", { className: "text-
|
|
35061
|
+
return /* @__PURE__ */ jsx108("span", { className: "text-gray-500 italic text-sm", children: "Not specified" });
|
|
35013
35062
|
const groups = {};
|
|
35014
35063
|
bundles.forEach((b) => {
|
|
35015
35064
|
const p = Number(b?.priority) || 1;
|
|
@@ -35018,28 +35067,20 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35018
35067
|
groups[p].push(...keywords);
|
|
35019
35068
|
});
|
|
35020
35069
|
const sortedPriorities = Object.keys(groups).map((n) => parseInt(n)).sort((a, b) => a - b);
|
|
35021
|
-
return /* @__PURE__ */ jsx108("div", { className: "space-y-4 pt-
|
|
35070
|
+
return /* @__PURE__ */ jsx108("div", { className: "space-y-4 pt-2", children: sortedPriorities.map((priority) => {
|
|
35022
35071
|
const deduped = Array.from(new Set(groups[priority]));
|
|
35023
35072
|
return /* @__PURE__ */ jsxs68("div", { className: "space-y-2", children: [
|
|
35024
35073
|
/* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-2", children: [
|
|
35025
|
-
/* @__PURE__ */ jsxs68(
|
|
35026
|
-
|
|
35027
|
-
|
|
35028
|
-
|
|
35029
|
-
|
|
35030
|
-
children: [
|
|
35031
|
-
"Priority ",
|
|
35032
|
-
priority
|
|
35033
|
-
]
|
|
35034
|
-
}
|
|
35035
|
-
),
|
|
35036
|
-
/* @__PURE__ */ jsx108("div", { className: "h-px flex-1 bg-gray-100/50" })
|
|
35074
|
+
/* @__PURE__ */ jsxs68("span", { className: "text-[10px] uppercase tracking-widest text-purple-400 font-bold", children: [
|
|
35075
|
+
"Priority ",
|
|
35076
|
+
priority
|
|
35077
|
+
] }),
|
|
35078
|
+
/* @__PURE__ */ jsx108("div", { className: "h-[1px] flex-1 bg-white/10" })
|
|
35037
35079
|
] }),
|
|
35038
|
-
/* @__PURE__ */ jsx108("div", { className: "flex flex-wrap gap-
|
|
35039
|
-
|
|
35080
|
+
/* @__PURE__ */ jsx108("div", { className: "flex flex-wrap gap-2", children: deduped.map((keyword) => /* @__PURE__ */ jsx108(
|
|
35081
|
+
"div",
|
|
35040
35082
|
{
|
|
35041
|
-
|
|
35042
|
-
className: "bg-white border-gray-200 text-gray-700 font-medium",
|
|
35083
|
+
className: "px-2 py-1 rounded bg-[#1A1A1A] border border-white/10 text-gray-300 text-xs font-medium",
|
|
35043
35084
|
children: keyword
|
|
35044
35085
|
},
|
|
35045
35086
|
keyword
|
|
@@ -35049,123 +35090,127 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
35049
35090
|
};
|
|
35050
35091
|
|
|
35051
35092
|
// src/molecules/creator-discovery/MCQCard/MCQCard.tsx
|
|
35052
|
-
import React92
|
|
35093
|
+
import React92 from "react";
|
|
35053
35094
|
import { jsx as jsx109, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
35054
35095
|
var MCQCard = React92.memo(
|
|
35055
35096
|
({
|
|
35056
35097
|
question,
|
|
35057
35098
|
options,
|
|
35058
35099
|
recommended,
|
|
35059
|
-
selectedOption,
|
|
35100
|
+
selectedOption: propsSelectedOption,
|
|
35060
35101
|
onSelect,
|
|
35061
|
-
|
|
35102
|
+
onProceed,
|
|
35062
35103
|
isLatestMessage = true,
|
|
35063
|
-
countdown,
|
|
35064
|
-
isPaused = false,
|
|
35065
|
-
onPause,
|
|
35066
35104
|
isLoading = false,
|
|
35067
35105
|
className,
|
|
35068
|
-
selectionStatus
|
|
35106
|
+
selectionStatus,
|
|
35107
|
+
onAction,
|
|
35108
|
+
disabled = false
|
|
35069
35109
|
}) => {
|
|
35070
|
-
const [
|
|
35071
|
-
|
|
35072
|
-
|
|
35073
|
-
|
|
35074
|
-
|
|
35110
|
+
const [selectedOption, setSelectedOption] = React92.useState(propsSelectedOption);
|
|
35111
|
+
React92.useEffect(() => {
|
|
35112
|
+
if (propsSelectedOption) {
|
|
35113
|
+
setSelectedOption(propsSelectedOption);
|
|
35114
|
+
}
|
|
35115
|
+
}, [propsSelectedOption]);
|
|
35116
|
+
const handleOptionClick = (key, e) => {
|
|
35117
|
+
e.preventDefault();
|
|
35118
|
+
e.stopPropagation();
|
|
35119
|
+
if (isLatestMessage && !isLoading && !disabled) {
|
|
35120
|
+
setSelectedOption(key);
|
|
35075
35121
|
onSelect?.(key);
|
|
35076
35122
|
}
|
|
35077
35123
|
};
|
|
35078
|
-
const handleProceed = () => {
|
|
35079
|
-
|
|
35080
|
-
|
|
35081
|
-
|
|
35082
|
-
|
|
35083
|
-
|
|
35124
|
+
const handleProceed = (e) => {
|
|
35125
|
+
e.preventDefault();
|
|
35126
|
+
e.stopPropagation();
|
|
35127
|
+
if ((selectedOption || recommended) && !disabled) {
|
|
35128
|
+
const result = selectedOption || recommended || "";
|
|
35129
|
+
onProceed?.(result);
|
|
35130
|
+
onAction?.({
|
|
35131
|
+
type: "mcq_selection",
|
|
35132
|
+
value: result,
|
|
35133
|
+
label: options[result] || result
|
|
35134
|
+
});
|
|
35084
35135
|
}
|
|
35085
35136
|
};
|
|
35137
|
+
const isInteractionDisabled = disabled || !isLatestMessage;
|
|
35086
35138
|
return /* @__PURE__ */ jsxs69(
|
|
35087
|
-
|
|
35139
|
+
"div",
|
|
35088
35140
|
{
|
|
35089
35141
|
className: cn(
|
|
35090
|
-
"
|
|
35142
|
+
"p-6 rounded-[20px] border border-gray400 bg-background dark:bg-gray200 font-noto w-full",
|
|
35091
35143
|
className
|
|
35092
35144
|
),
|
|
35093
35145
|
children: [
|
|
35094
|
-
/* @__PURE__ */ jsx109(
|
|
35095
|
-
/* @__PURE__ */ jsx109(
|
|
35096
|
-
const isSelected =
|
|
35146
|
+
/* @__PURE__ */ jsx109("div", { className: "mb-4", children: /* @__PURE__ */ jsx109("h4", { className: "font-medium text-foreground px-3 py-1 rounded-md inline-block mb-2", children: question }) }),
|
|
35147
|
+
/* @__PURE__ */ jsx109("div", { className: "mb-6", children: /* @__PURE__ */ jsx109("div", { className: "space-y-4", children: Object.entries(options).map(([key, label]) => {
|
|
35148
|
+
const isSelected = selectedOption === key;
|
|
35097
35149
|
const isRecommended = key === recommended;
|
|
35098
35150
|
return /* @__PURE__ */ jsxs69(
|
|
35099
35151
|
"div",
|
|
35100
35152
|
{
|
|
35101
|
-
onClick: () => handleOptionClick(key),
|
|
35153
|
+
onClick: (e) => handleOptionClick(key, e),
|
|
35102
35154
|
className: cn(
|
|
35103
|
-
"
|
|
35104
|
-
|
|
35105
|
-
|
|
35155
|
+
"cursor-pointer rounded-xl p-3 transition-colors relative",
|
|
35156
|
+
"border border-transparent bg-paperBackground",
|
|
35157
|
+
!selectedOption && !isInteractionDisabled && "hover:border-gray500",
|
|
35158
|
+
(isLoading || isInteractionDisabled) && "opacity-50 cursor-not-allowed"
|
|
35106
35159
|
),
|
|
35107
35160
|
children: [
|
|
35108
|
-
/* @__PURE__ */ jsx109(
|
|
35161
|
+
/* @__PURE__ */ jsx109("div", { className: "absolute top-1/2 left-4 transform -translate-y-1/2", children: /* @__PURE__ */ jsx109(
|
|
35109
35162
|
"div",
|
|
35110
35163
|
{
|
|
35111
35164
|
className: cn(
|
|
35112
|
-
"
|
|
35113
|
-
isSelected ? "border-
|
|
35165
|
+
"w-5 h-5 rounded-full border flex items-center justify-center transition-colors",
|
|
35166
|
+
isSelected ? "border-purple100 bg-gray300" : cn(
|
|
35167
|
+
"border-gray300 bg-background",
|
|
35168
|
+
!selectedOption && !isInteractionDisabled && "hover:border-purple100"
|
|
35169
|
+
)
|
|
35114
35170
|
),
|
|
35115
|
-
children: isSelected && /* @__PURE__ */ jsx109("div", { className: "w-
|
|
35171
|
+
children: isSelected && /* @__PURE__ */ jsx109("div", { className: "w-2.5 h-2.5 rounded-full bg-purple100" })
|
|
35116
35172
|
}
|
|
35117
|
-
),
|
|
35118
|
-
/* @__PURE__ */
|
|
35119
|
-
/* @__PURE__ */
|
|
35120
|
-
"
|
|
35121
|
-
{
|
|
35122
|
-
|
|
35123
|
-
|
|
35124
|
-
|
|
35125
|
-
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
|
|
35129
|
-
|
|
35130
|
-
|
|
35131
|
-
|
|
35132
|
-
|
|
35133
|
-
|
|
35134
|
-
children: [
|
|
35135
|
-
/* @__PURE__ */ jsx109(Sparkles, { className: "h-3 w-3" }),
|
|
35136
|
-
"Recommended"
|
|
35137
|
-
]
|
|
35138
|
-
}
|
|
35139
|
-
),
|
|
35140
|
-
isSelected && /* @__PURE__ */ jsx109(
|
|
35141
|
-
Badge2,
|
|
35142
|
-
{
|
|
35143
|
-
variant: "outline",
|
|
35144
|
-
className: "bg-[var(--primary-color)]/10 text-[var(--primary-color)] border-[var(--primary-color)]/20 text-[10px] py-0 h-5",
|
|
35145
|
-
children: "Selected"
|
|
35146
|
-
}
|
|
35147
|
-
)
|
|
35148
|
-
] }) })
|
|
35173
|
+
) }),
|
|
35174
|
+
/* @__PURE__ */ jsxs69("div", { className: "pl-12", children: [
|
|
35175
|
+
(isRecommended || isSelected) && /* @__PURE__ */ jsxs69("div", { className: "flex gap-2 mb-2 flex-wrap", children: [
|
|
35176
|
+
isRecommended && /* @__PURE__ */ jsx109("div", { className: "flex text-xs font-semibold", children: /* @__PURE__ */ jsx109("p", { className: "bg-greenBackground text-greenText px-2 py-1 rounded-[20px]", children: "Recommended" }) }),
|
|
35177
|
+
isSelected && /* @__PURE__ */ jsx109("div", { className: "flex text-xs font-semibold", children: /* @__PURE__ */ jsx109(
|
|
35178
|
+
"p",
|
|
35179
|
+
{
|
|
35180
|
+
className: cn(
|
|
35181
|
+
"px-2 py-1 rounded-[20px]",
|
|
35182
|
+
selectedOption === recommended ? "bg-purpleLight text-purpleText2 dark:bg-primary/20 dark:text-primary" : "bg-paperBackground text-primaryDark2 dark:bg-primary/20 dark:text-primary"
|
|
35183
|
+
),
|
|
35184
|
+
children: "Selected by you"
|
|
35185
|
+
}
|
|
35186
|
+
) })
|
|
35187
|
+
] }),
|
|
35188
|
+
/* @__PURE__ */ jsx109("div", { className: "text-base font-medium text-txtColor", children: label })
|
|
35189
|
+
] })
|
|
35149
35190
|
]
|
|
35150
35191
|
},
|
|
35151
35192
|
key
|
|
35152
35193
|
);
|
|
35153
|
-
}) }),
|
|
35154
|
-
/* @__PURE__ */
|
|
35155
|
-
|
|
35156
|
-
|
|
35157
|
-
|
|
35158
|
-
|
|
35159
|
-
|
|
35160
|
-
|
|
35161
|
-
|
|
35162
|
-
|
|
35163
|
-
|
|
35164
|
-
|
|
35165
|
-
|
|
35166
|
-
|
|
35167
|
-
|
|
35168
|
-
|
|
35194
|
+
}) }) }),
|
|
35195
|
+
/* @__PURE__ */ jsxs69("div", { className: "flex justify-between items-center", children: [
|
|
35196
|
+
/* @__PURE__ */ jsx109("div", { className: "flex-1" }),
|
|
35197
|
+
/* @__PURE__ */ jsx109(
|
|
35198
|
+
"button",
|
|
35199
|
+
{
|
|
35200
|
+
onClick: (e) => handleProceed(e),
|
|
35201
|
+
disabled: isInteractionDisabled || isLoading || !selectedOption && !recommended,
|
|
35202
|
+
className: cn(
|
|
35203
|
+
"flex-3 px-4 py-2 border rounded-full text-sm disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
|
|
35204
|
+
"bg-purpleLight dark:bg-purple200 hover:bg-purpleText1 dark:hover:bg-purple100 text-purpleText2 dark:text-purpleText border-purpleText1 dark:border-purple-border dark:hover:text-white"
|
|
35205
|
+
),
|
|
35206
|
+
children: isLoading ? "Sending..." : "Continue"
|
|
35207
|
+
}
|
|
35208
|
+
),
|
|
35209
|
+
isLatestMessage ? /* @__PURE__ */ jsx109("div", { className: "flex-1" }) : /* @__PURE__ */ jsx109("div", { className: "flex-1 text-right text-xs bg-green100 text-green-600 dark:text-green500", children: selectionStatus === "agent" ? /* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-1 sm:flex-row sm:justify-end", children: [
|
|
35210
|
+
/* @__PURE__ */ jsx109("span", { className: "whitespace-nowrap", children: "Suggested by an Agent," }),
|
|
35211
|
+
/* @__PURE__ */ jsx109("span", { className: "whitespace-nowrap", children: "Approved by You" })
|
|
35212
|
+
] }) : /* @__PURE__ */ jsx109("span", { children: "Selected by you" }) })
|
|
35213
|
+
] })
|
|
35169
35214
|
]
|
|
35170
35215
|
}
|
|
35171
35216
|
);
|
|
@@ -35645,6 +35690,216 @@ var CreatorActionHeader = ({
|
|
|
35645
35690
|
);
|
|
35646
35691
|
};
|
|
35647
35692
|
|
|
35693
|
+
// src/molecules/creator-discovery/CreatorSearchBox/CreatorSearch.tsx
|
|
35694
|
+
import React93, { useMemo as useMemo6 } from "react";
|
|
35695
|
+
import { jsx as jsx120, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
35696
|
+
var CreatorSearch = React93.memo(
|
|
35697
|
+
({
|
|
35698
|
+
selectionStatus,
|
|
35699
|
+
isLatestMessage = true,
|
|
35700
|
+
className,
|
|
35701
|
+
fields: providedFields,
|
|
35702
|
+
data,
|
|
35703
|
+
...formCardProps
|
|
35704
|
+
}) => {
|
|
35705
|
+
const fields = useMemo6(() => {
|
|
35706
|
+
const baseFields = providedFields || generateFieldsFromData(data);
|
|
35707
|
+
return baseFields.map((field) => {
|
|
35708
|
+
if (field.key === "platforms") {
|
|
35709
|
+
return {
|
|
35710
|
+
...field,
|
|
35711
|
+
renderDisplay: (val) => {
|
|
35712
|
+
const platforms = Array.isArray(val) ? val : [val];
|
|
35713
|
+
return /* @__PURE__ */ jsx120("div", { className: "flex flex-wrap gap-2", children: platforms.map((p) => /* @__PURE__ */ jsx120(
|
|
35714
|
+
BadgeAtom,
|
|
35715
|
+
{
|
|
35716
|
+
id: `platform-${p}`,
|
|
35717
|
+
type: "badge",
|
|
35718
|
+
label: p,
|
|
35719
|
+
variant: "outline",
|
|
35720
|
+
className: "bg-[#1A1A1A] border-gray400 text-white font-medium"
|
|
35721
|
+
},
|
|
35722
|
+
p
|
|
35723
|
+
)) });
|
|
35724
|
+
}
|
|
35725
|
+
};
|
|
35726
|
+
}
|
|
35727
|
+
if (field.key === "geography") {
|
|
35728
|
+
return {
|
|
35729
|
+
...field,
|
|
35730
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx120(CountrySelectDisplay, { value: val })
|
|
35731
|
+
};
|
|
35732
|
+
}
|
|
35733
|
+
if (field.key === "keywordBundles") {
|
|
35734
|
+
return {
|
|
35735
|
+
...field,
|
|
35736
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx120(KeywordBundlesDisplay, { value: val })
|
|
35737
|
+
};
|
|
35738
|
+
}
|
|
35739
|
+
if (field.key === "followerRange") {
|
|
35740
|
+
return {
|
|
35741
|
+
...field,
|
|
35742
|
+
renderDisplay: (val) => {
|
|
35743
|
+
if (typeof val === "object" && val !== null) {
|
|
35744
|
+
return /* @__PURE__ */ jsx120("span", { className: "text-white font-medium", children: `${val.min?.toLocaleString()} - ${val.max?.toLocaleString()} followers` });
|
|
35745
|
+
}
|
|
35746
|
+
return /* @__PURE__ */ jsxs79("span", { className: "text-white font-medium", children: [
|
|
35747
|
+
val,
|
|
35748
|
+
" followers"
|
|
35749
|
+
] });
|
|
35750
|
+
}
|
|
35751
|
+
};
|
|
35752
|
+
}
|
|
35753
|
+
if (field.key === "initialCreators") {
|
|
35754
|
+
return {
|
|
35755
|
+
...field,
|
|
35756
|
+
renderDisplay: (val) => /* @__PURE__ */ jsxs79("span", { className: "text-white font-medium", children: [
|
|
35757
|
+
val,
|
|
35758
|
+
" creators"
|
|
35759
|
+
] })
|
|
35760
|
+
};
|
|
35761
|
+
}
|
|
35762
|
+
return field;
|
|
35763
|
+
});
|
|
35764
|
+
}, [providedFields, data]);
|
|
35765
|
+
return /* @__PURE__ */ jsx120("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx120(
|
|
35766
|
+
FormCard,
|
|
35767
|
+
{
|
|
35768
|
+
...formCardProps,
|
|
35769
|
+
data,
|
|
35770
|
+
title: formCardProps.title || "Creator Search Settings",
|
|
35771
|
+
fields,
|
|
35772
|
+
showTimeline: true,
|
|
35773
|
+
className: cn("font-noto", className),
|
|
35774
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs79("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
|
|
35775
|
+
/* @__PURE__ */ jsx120(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
35776
|
+
/* @__PURE__ */ jsx120("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
35777
|
+
] }) : formCardProps.footer
|
|
35778
|
+
}
|
|
35779
|
+
) });
|
|
35780
|
+
}
|
|
35781
|
+
);
|
|
35782
|
+
CreatorSearch.displayName = "CreatorSearch";
|
|
35783
|
+
|
|
35784
|
+
// src/molecules/creator-discovery/CampaignConceptCard/CampaignConceptCard.tsx
|
|
35785
|
+
import React94, { useMemo as useMemo7, useState as useState9 } from "react";
|
|
35786
|
+
import { motion, AnimatePresence } from "framer-motion";
|
|
35787
|
+
import { jsx as jsx121, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
35788
|
+
var CampaignConceptCard = React94.memo(
|
|
35789
|
+
({
|
|
35790
|
+
isRecommended,
|
|
35791
|
+
isOpen: controlledIsOpen,
|
|
35792
|
+
onToggle,
|
|
35793
|
+
data,
|
|
35794
|
+
fields: providedFields,
|
|
35795
|
+
title,
|
|
35796
|
+
selectionStatus,
|
|
35797
|
+
isLatestMessage = true,
|
|
35798
|
+
className,
|
|
35799
|
+
...formCardProps
|
|
35800
|
+
}) => {
|
|
35801
|
+
const [internalIsOpen, setInternalIsOpen] = useState9(false);
|
|
35802
|
+
const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
|
|
35803
|
+
const handleToggle = () => {
|
|
35804
|
+
if (onToggle) {
|
|
35805
|
+
onToggle();
|
|
35806
|
+
} else {
|
|
35807
|
+
setInternalIsOpen(!internalIsOpen);
|
|
35808
|
+
}
|
|
35809
|
+
};
|
|
35810
|
+
const fields = useMemo7(() => {
|
|
35811
|
+
const baseFields = providedFields || generateFieldsFromData(data);
|
|
35812
|
+
return baseFields.map((field) => {
|
|
35813
|
+
if (field.key === "budgetAllocation") {
|
|
35814
|
+
return {
|
|
35815
|
+
...field,
|
|
35816
|
+
renderDisplay: (val) => {
|
|
35817
|
+
if (!Array.isArray(val)) return /* @__PURE__ */ jsx121("span", { children: val });
|
|
35818
|
+
return /* @__PURE__ */ jsx121("div", { className: "space-y-2", children: val.map((item, idx) => /* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2 text-xs font-medium", children: [
|
|
35819
|
+
/* @__PURE__ */ jsxs80("span", { children: [
|
|
35820
|
+
idx + 1,
|
|
35821
|
+
"."
|
|
35822
|
+
] }),
|
|
35823
|
+
/* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.label }),
|
|
35824
|
+
/* @__PURE__ */ jsx121("span", { className: "text-gray-400", children: "=" }),
|
|
35825
|
+
/* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-gray-300", children: item.value })
|
|
35826
|
+
] }, idx)) });
|
|
35827
|
+
}
|
|
35828
|
+
};
|
|
35829
|
+
}
|
|
35830
|
+
if (field.key === "estimatedCreators") {
|
|
35831
|
+
return {
|
|
35832
|
+
...field,
|
|
35833
|
+
renderDisplay: (val) => {
|
|
35834
|
+
if (!Array.isArray(val)) return /* @__PURE__ */ jsx121("span", { className: "text-white font-medium", children: val });
|
|
35835
|
+
return /* @__PURE__ */ jsx121("div", { className: "flex gap-2", children: val.map((v, idx) => /* @__PURE__ */ jsx121("div", { className: "bg-[#1A1A1A] border border-white/10 px-2 py-0.5 rounded text-white text-xs font-medium", children: v }, idx)) });
|
|
35836
|
+
}
|
|
35837
|
+
};
|
|
35838
|
+
}
|
|
35839
|
+
return {
|
|
35840
|
+
...field,
|
|
35841
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx121("span", { className: "text-gray-300 text-sm", children: val })
|
|
35842
|
+
};
|
|
35843
|
+
});
|
|
35844
|
+
}, [providedFields, data]);
|
|
35845
|
+
return /* @__PURE__ */ jsxs80(
|
|
35846
|
+
"div",
|
|
35847
|
+
{
|
|
35848
|
+
className: cn(
|
|
35849
|
+
"w-full rounded-[20px] transition-all duration-300 bg-background dark:bg-gray50",
|
|
35850
|
+
isOpen ? "border border-green-500/50 shadow-[0_0_15px_rgba(34,197,94,0.1)]" : "border border-gray400",
|
|
35851
|
+
className
|
|
35852
|
+
),
|
|
35853
|
+
children: [
|
|
35854
|
+
/* @__PURE__ */ jsxs80(
|
|
35855
|
+
"div",
|
|
35856
|
+
{
|
|
35857
|
+
className: "flex items-center justify-between p-6 cursor-pointer select-none",
|
|
35858
|
+
onClick: handleToggle,
|
|
35859
|
+
children: [
|
|
35860
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex flex-col gap-2", children: [
|
|
35861
|
+
/* @__PURE__ */ jsx121("h3", { className: "text-lg font-semibold text-white tracking-wide", children: title || data.title }),
|
|
35862
|
+
isRecommended && /* @__PURE__ */ jsx121("div", { className: "inline-flex text-[10px] font-bold uppercase tracking-widest text-[#22C55E]", children: /* @__PURE__ */ jsx121("span", { className: "bg-[#22C55E]/10 px-2 py-0.5 rounded border border-[#22C55E]/20", children: "Recommended" }) })
|
|
35863
|
+
] }),
|
|
35864
|
+
/* @__PURE__ */ jsx121("div", { className: cn(
|
|
35865
|
+
"p-2 rounded-lg bg-white/5 border border-white/10 text-gray-400 transition-transform duration-300",
|
|
35866
|
+
isOpen && "rotate-180"
|
|
35867
|
+
), children: /* @__PURE__ */ jsx121(ChevronDown, { className: "h-4 w-4" }) })
|
|
35868
|
+
]
|
|
35869
|
+
}
|
|
35870
|
+
),
|
|
35871
|
+
/* @__PURE__ */ jsx121(AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ jsx121(
|
|
35872
|
+
motion.div,
|
|
35873
|
+
{
|
|
35874
|
+
initial: { height: 0, opacity: 0 },
|
|
35875
|
+
animate: { height: "auto", opacity: 1 },
|
|
35876
|
+
exit: { height: 0, opacity: 0 },
|
|
35877
|
+
transition: { duration: 0.3, ease: "easeInOut" },
|
|
35878
|
+
className: "overflow-hidden",
|
|
35879
|
+
children: /* @__PURE__ */ jsx121("div", { className: "px-6 pb-6 pt-0 border-t border-white/5", children: /* @__PURE__ */ jsx121(
|
|
35880
|
+
FormCard,
|
|
35881
|
+
{
|
|
35882
|
+
...formCardProps,
|
|
35883
|
+
title: title || data.title || "Campaign Concept",
|
|
35884
|
+
data,
|
|
35885
|
+
fields,
|
|
35886
|
+
showTimeline: true,
|
|
35887
|
+
className: "bg-transparent border-none shadow-none mb-0 p-0",
|
|
35888
|
+
footer: !isLatestMessage && selectionStatus ? /* @__PURE__ */ jsxs80("div", { className: "flex justify-end items-center gap-1.5 text-green-600 text-[10px] font-semibold py-4 pr-6", children: [
|
|
35889
|
+
/* @__PURE__ */ jsx121(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
35890
|
+
/* @__PURE__ */ jsx121("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
35891
|
+
] }) : formCardProps.footer
|
|
35892
|
+
}
|
|
35893
|
+
) })
|
|
35894
|
+
}
|
|
35895
|
+
) })
|
|
35896
|
+
]
|
|
35897
|
+
}
|
|
35898
|
+
);
|
|
35899
|
+
}
|
|
35900
|
+
);
|
|
35901
|
+
CampaignConceptCard.displayName = "CampaignConceptCard";
|
|
35902
|
+
|
|
35648
35903
|
// src/components/ui/index.ts
|
|
35649
35904
|
var ui_exports = {};
|
|
35650
35905
|
__export(ui_exports, {
|
|
@@ -35937,7 +36192,7 @@ __export(ui_exports, {
|
|
|
35937
36192
|
// src/components/ui/button-group.tsx
|
|
35938
36193
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
35939
36194
|
import { cva as cva8 } from "class-variance-authority";
|
|
35940
|
-
import { jsx as
|
|
36195
|
+
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
35941
36196
|
var buttonGroupVariants = cva8(
|
|
35942
36197
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
35943
36198
|
{
|
|
@@ -35957,7 +36212,7 @@ function ButtonGroup({
|
|
|
35957
36212
|
orientation,
|
|
35958
36213
|
...props
|
|
35959
36214
|
}) {
|
|
35960
|
-
return /* @__PURE__ */
|
|
36215
|
+
return /* @__PURE__ */ jsx122(
|
|
35961
36216
|
"div",
|
|
35962
36217
|
{
|
|
35963
36218
|
role: "group",
|
|
@@ -35974,7 +36229,7 @@ function ButtonGroupText({
|
|
|
35974
36229
|
...props
|
|
35975
36230
|
}) {
|
|
35976
36231
|
const Comp = asChild ? Slot4 : "div";
|
|
35977
|
-
return /* @__PURE__ */
|
|
36232
|
+
return /* @__PURE__ */ jsx122(
|
|
35978
36233
|
Comp,
|
|
35979
36234
|
{
|
|
35980
36235
|
className: cn(
|
|
@@ -35990,7 +36245,7 @@ function ButtonGroupSeparator({
|
|
|
35990
36245
|
orientation = "vertical",
|
|
35991
36246
|
...props
|
|
35992
36247
|
}) {
|
|
35993
|
-
return /* @__PURE__ */
|
|
36248
|
+
return /* @__PURE__ */ jsx122(
|
|
35994
36249
|
Separator2,
|
|
35995
36250
|
{
|
|
35996
36251
|
"data-slot": "button-group-separator",
|
|
@@ -36006,9 +36261,9 @@ function ButtonGroupSeparator({
|
|
|
36006
36261
|
|
|
36007
36262
|
// src/components/ui/empty.tsx
|
|
36008
36263
|
import { cva as cva9 } from "class-variance-authority";
|
|
36009
|
-
import { jsx as
|
|
36264
|
+
import { jsx as jsx123 } from "react/jsx-runtime";
|
|
36010
36265
|
function Empty({ className, ...props }) {
|
|
36011
|
-
return /* @__PURE__ */
|
|
36266
|
+
return /* @__PURE__ */ jsx123(
|
|
36012
36267
|
"div",
|
|
36013
36268
|
{
|
|
36014
36269
|
"data-slot": "empty",
|
|
@@ -36021,7 +36276,7 @@ function Empty({ className, ...props }) {
|
|
|
36021
36276
|
);
|
|
36022
36277
|
}
|
|
36023
36278
|
function EmptyHeader({ className, ...props }) {
|
|
36024
|
-
return /* @__PURE__ */
|
|
36279
|
+
return /* @__PURE__ */ jsx123(
|
|
36025
36280
|
"div",
|
|
36026
36281
|
{
|
|
36027
36282
|
"data-slot": "empty-header",
|
|
@@ -36052,7 +36307,7 @@ function EmptyMedia({
|
|
|
36052
36307
|
variant = "default",
|
|
36053
36308
|
...props
|
|
36054
36309
|
}) {
|
|
36055
|
-
return /* @__PURE__ */
|
|
36310
|
+
return /* @__PURE__ */ jsx123(
|
|
36056
36311
|
"div",
|
|
36057
36312
|
{
|
|
36058
36313
|
"data-slot": "empty-icon",
|
|
@@ -36063,7 +36318,7 @@ function EmptyMedia({
|
|
|
36063
36318
|
);
|
|
36064
36319
|
}
|
|
36065
36320
|
function EmptyTitle({ className, ...props }) {
|
|
36066
|
-
return /* @__PURE__ */
|
|
36321
|
+
return /* @__PURE__ */ jsx123(
|
|
36067
36322
|
"div",
|
|
36068
36323
|
{
|
|
36069
36324
|
"data-slot": "empty-title",
|
|
@@ -36073,7 +36328,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
36073
36328
|
);
|
|
36074
36329
|
}
|
|
36075
36330
|
function EmptyDescription({ className, ...props }) {
|
|
36076
|
-
return /* @__PURE__ */
|
|
36331
|
+
return /* @__PURE__ */ jsx123(
|
|
36077
36332
|
"div",
|
|
36078
36333
|
{
|
|
36079
36334
|
"data-slot": "empty-description",
|
|
@@ -36086,7 +36341,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
36086
36341
|
);
|
|
36087
36342
|
}
|
|
36088
36343
|
function EmptyContent({ className, ...props }) {
|
|
36089
|
-
return /* @__PURE__ */
|
|
36344
|
+
return /* @__PURE__ */ jsx123(
|
|
36090
36345
|
"div",
|
|
36091
36346
|
{
|
|
36092
36347
|
"data-slot": "empty-content",
|
|
@@ -36100,11 +36355,11 @@ function EmptyContent({ className, ...props }) {
|
|
|
36100
36355
|
}
|
|
36101
36356
|
|
|
36102
36357
|
// src/components/ui/field.tsx
|
|
36103
|
-
import { useMemo as
|
|
36358
|
+
import { useMemo as useMemo8 } from "react";
|
|
36104
36359
|
import { cva as cva10 } from "class-variance-authority";
|
|
36105
|
-
import { jsx as
|
|
36360
|
+
import { jsx as jsx124, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
36106
36361
|
function FieldSet({ className, ...props }) {
|
|
36107
|
-
return /* @__PURE__ */
|
|
36362
|
+
return /* @__PURE__ */ jsx124(
|
|
36108
36363
|
"fieldset",
|
|
36109
36364
|
{
|
|
36110
36365
|
"data-slot": "field-set",
|
|
@@ -36122,7 +36377,7 @@ function FieldLegend({
|
|
|
36122
36377
|
variant = "legend",
|
|
36123
36378
|
...props
|
|
36124
36379
|
}) {
|
|
36125
|
-
return /* @__PURE__ */
|
|
36380
|
+
return /* @__PURE__ */ jsx124(
|
|
36126
36381
|
"legend",
|
|
36127
36382
|
{
|
|
36128
36383
|
"data-slot": "field-legend",
|
|
@@ -36138,7 +36393,7 @@ function FieldLegend({
|
|
|
36138
36393
|
);
|
|
36139
36394
|
}
|
|
36140
36395
|
function FieldGroup({ className, ...props }) {
|
|
36141
|
-
return /* @__PURE__ */
|
|
36396
|
+
return /* @__PURE__ */ jsx124(
|
|
36142
36397
|
"div",
|
|
36143
36398
|
{
|
|
36144
36399
|
"data-slot": "field-group",
|
|
@@ -36178,7 +36433,7 @@ function Field({
|
|
|
36178
36433
|
orientation = "vertical",
|
|
36179
36434
|
...props
|
|
36180
36435
|
}) {
|
|
36181
|
-
return /* @__PURE__ */
|
|
36436
|
+
return /* @__PURE__ */ jsx124(
|
|
36182
36437
|
"div",
|
|
36183
36438
|
{
|
|
36184
36439
|
role: "group",
|
|
@@ -36190,7 +36445,7 @@ function Field({
|
|
|
36190
36445
|
);
|
|
36191
36446
|
}
|
|
36192
36447
|
function FieldContent({ className, ...props }) {
|
|
36193
|
-
return /* @__PURE__ */
|
|
36448
|
+
return /* @__PURE__ */ jsx124(
|
|
36194
36449
|
"div",
|
|
36195
36450
|
{
|
|
36196
36451
|
"data-slot": "field-content",
|
|
@@ -36206,7 +36461,7 @@ function FieldLabel({
|
|
|
36206
36461
|
className,
|
|
36207
36462
|
...props
|
|
36208
36463
|
}) {
|
|
36209
|
-
return /* @__PURE__ */
|
|
36464
|
+
return /* @__PURE__ */ jsx124(
|
|
36210
36465
|
Label,
|
|
36211
36466
|
{
|
|
36212
36467
|
"data-slot": "field-label",
|
|
@@ -36221,7 +36476,7 @@ function FieldLabel({
|
|
|
36221
36476
|
);
|
|
36222
36477
|
}
|
|
36223
36478
|
function FieldTitle({ className, ...props }) {
|
|
36224
|
-
return /* @__PURE__ */
|
|
36479
|
+
return /* @__PURE__ */ jsx124(
|
|
36225
36480
|
"div",
|
|
36226
36481
|
{
|
|
36227
36482
|
"data-slot": "field-label",
|
|
@@ -36234,7 +36489,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
36234
36489
|
);
|
|
36235
36490
|
}
|
|
36236
36491
|
function FieldDescription({ className, ...props }) {
|
|
36237
|
-
return /* @__PURE__ */
|
|
36492
|
+
return /* @__PURE__ */ jsx124(
|
|
36238
36493
|
"p",
|
|
36239
36494
|
{
|
|
36240
36495
|
"data-slot": "field-description",
|
|
@@ -36253,7 +36508,7 @@ function FieldSeparator({
|
|
|
36253
36508
|
className,
|
|
36254
36509
|
...props
|
|
36255
36510
|
}) {
|
|
36256
|
-
return /* @__PURE__ */
|
|
36511
|
+
return /* @__PURE__ */ jsxs81(
|
|
36257
36512
|
"div",
|
|
36258
36513
|
{
|
|
36259
36514
|
"data-slot": "field-separator",
|
|
@@ -36264,8 +36519,8 @@ function FieldSeparator({
|
|
|
36264
36519
|
),
|
|
36265
36520
|
...props,
|
|
36266
36521
|
children: [
|
|
36267
|
-
/* @__PURE__ */
|
|
36268
|
-
children && /* @__PURE__ */
|
|
36522
|
+
/* @__PURE__ */ jsx124(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
36523
|
+
children && /* @__PURE__ */ jsx124(
|
|
36269
36524
|
"span",
|
|
36270
36525
|
{
|
|
36271
36526
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -36283,7 +36538,7 @@ function FieldError({
|
|
|
36283
36538
|
errors,
|
|
36284
36539
|
...props
|
|
36285
36540
|
}) {
|
|
36286
|
-
const content =
|
|
36541
|
+
const content = useMemo8(() => {
|
|
36287
36542
|
if (children) {
|
|
36288
36543
|
return children;
|
|
36289
36544
|
}
|
|
@@ -36293,14 +36548,14 @@ function FieldError({
|
|
|
36293
36548
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
36294
36549
|
return errors[0].message;
|
|
36295
36550
|
}
|
|
36296
|
-
return /* @__PURE__ */
|
|
36297
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
36551
|
+
return /* @__PURE__ */ jsx124("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
36552
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx124("li", { children: error.message }, index)
|
|
36298
36553
|
) });
|
|
36299
36554
|
}, [children, errors]);
|
|
36300
36555
|
if (!content) {
|
|
36301
36556
|
return null;
|
|
36302
36557
|
}
|
|
36303
|
-
return /* @__PURE__ */
|
|
36558
|
+
return /* @__PURE__ */ jsx124(
|
|
36304
36559
|
"div",
|
|
36305
36560
|
{
|
|
36306
36561
|
role: "alert",
|
|
@@ -36314,9 +36569,9 @@ function FieldError({
|
|
|
36314
36569
|
|
|
36315
36570
|
// src/components/ui/input-group.tsx
|
|
36316
36571
|
import { cva as cva11 } from "class-variance-authority";
|
|
36317
|
-
import { jsx as
|
|
36572
|
+
import { jsx as jsx125 } from "react/jsx-runtime";
|
|
36318
36573
|
function InputGroup({ className, ...props }) {
|
|
36319
|
-
return /* @__PURE__ */
|
|
36574
|
+
return /* @__PURE__ */ jsx125(
|
|
36320
36575
|
"div",
|
|
36321
36576
|
{
|
|
36322
36577
|
"data-slot": "input-group",
|
|
@@ -36360,7 +36615,7 @@ function InputGroupAddon({
|
|
|
36360
36615
|
align = "inline-start",
|
|
36361
36616
|
...props
|
|
36362
36617
|
}) {
|
|
36363
|
-
return /* @__PURE__ */
|
|
36618
|
+
return /* @__PURE__ */ jsx125(
|
|
36364
36619
|
"div",
|
|
36365
36620
|
{
|
|
36366
36621
|
role: "group",
|
|
@@ -36400,7 +36655,7 @@ function InputGroupButton({
|
|
|
36400
36655
|
size = "xs",
|
|
36401
36656
|
...props
|
|
36402
36657
|
}) {
|
|
36403
|
-
return /* @__PURE__ */
|
|
36658
|
+
return /* @__PURE__ */ jsx125(
|
|
36404
36659
|
Button,
|
|
36405
36660
|
{
|
|
36406
36661
|
type,
|
|
@@ -36412,7 +36667,7 @@ function InputGroupButton({
|
|
|
36412
36667
|
);
|
|
36413
36668
|
}
|
|
36414
36669
|
function InputGroupText({ className, ...props }) {
|
|
36415
|
-
return /* @__PURE__ */
|
|
36670
|
+
return /* @__PURE__ */ jsx125(
|
|
36416
36671
|
"span",
|
|
36417
36672
|
{
|
|
36418
36673
|
className: cn(
|
|
@@ -36427,7 +36682,7 @@ function InputGroupInput({
|
|
|
36427
36682
|
className,
|
|
36428
36683
|
...props
|
|
36429
36684
|
}) {
|
|
36430
|
-
return /* @__PURE__ */
|
|
36685
|
+
return /* @__PURE__ */ jsx125(
|
|
36431
36686
|
Input,
|
|
36432
36687
|
{
|
|
36433
36688
|
"data-slot": "input-group-control",
|
|
@@ -36443,7 +36698,7 @@ function InputGroupTextarea({
|
|
|
36443
36698
|
className,
|
|
36444
36699
|
...props
|
|
36445
36700
|
}) {
|
|
36446
|
-
return /* @__PURE__ */
|
|
36701
|
+
return /* @__PURE__ */ jsx125(
|
|
36447
36702
|
Textarea,
|
|
36448
36703
|
{
|
|
36449
36704
|
"data-slot": "input-group-control",
|
|
@@ -36459,9 +36714,9 @@ function InputGroupTextarea({
|
|
|
36459
36714
|
// src/components/ui/item.tsx
|
|
36460
36715
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
36461
36716
|
import { cva as cva12 } from "class-variance-authority";
|
|
36462
|
-
import { jsx as
|
|
36717
|
+
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
36463
36718
|
function ItemGroup({ className, ...props }) {
|
|
36464
|
-
return /* @__PURE__ */
|
|
36719
|
+
return /* @__PURE__ */ jsx126(
|
|
36465
36720
|
"div",
|
|
36466
36721
|
{
|
|
36467
36722
|
role: "list",
|
|
@@ -36475,7 +36730,7 @@ function ItemSeparator({
|
|
|
36475
36730
|
className,
|
|
36476
36731
|
...props
|
|
36477
36732
|
}) {
|
|
36478
|
-
return /* @__PURE__ */
|
|
36733
|
+
return /* @__PURE__ */ jsx126(
|
|
36479
36734
|
Separator2,
|
|
36480
36735
|
{
|
|
36481
36736
|
"data-slot": "item-separator",
|
|
@@ -36513,7 +36768,7 @@ function Item8({
|
|
|
36513
36768
|
...props
|
|
36514
36769
|
}) {
|
|
36515
36770
|
const Comp = asChild ? Slot5 : "div";
|
|
36516
|
-
return /* @__PURE__ */
|
|
36771
|
+
return /* @__PURE__ */ jsx126(
|
|
36517
36772
|
Comp,
|
|
36518
36773
|
{
|
|
36519
36774
|
"data-slot": "item",
|
|
@@ -36544,7 +36799,7 @@ function ItemMedia({
|
|
|
36544
36799
|
variant = "default",
|
|
36545
36800
|
...props
|
|
36546
36801
|
}) {
|
|
36547
|
-
return /* @__PURE__ */
|
|
36802
|
+
return /* @__PURE__ */ jsx126(
|
|
36548
36803
|
"div",
|
|
36549
36804
|
{
|
|
36550
36805
|
"data-slot": "item-media",
|
|
@@ -36555,7 +36810,7 @@ function ItemMedia({
|
|
|
36555
36810
|
);
|
|
36556
36811
|
}
|
|
36557
36812
|
function ItemContent({ className, ...props }) {
|
|
36558
|
-
return /* @__PURE__ */
|
|
36813
|
+
return /* @__PURE__ */ jsx126(
|
|
36559
36814
|
"div",
|
|
36560
36815
|
{
|
|
36561
36816
|
"data-slot": "item-content",
|
|
@@ -36568,7 +36823,7 @@ function ItemContent({ className, ...props }) {
|
|
|
36568
36823
|
);
|
|
36569
36824
|
}
|
|
36570
36825
|
function ItemTitle({ className, ...props }) {
|
|
36571
|
-
return /* @__PURE__ */
|
|
36826
|
+
return /* @__PURE__ */ jsx126(
|
|
36572
36827
|
"div",
|
|
36573
36828
|
{
|
|
36574
36829
|
"data-slot": "item-title",
|
|
@@ -36581,7 +36836,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
36581
36836
|
);
|
|
36582
36837
|
}
|
|
36583
36838
|
function ItemDescription({ className, ...props }) {
|
|
36584
|
-
return /* @__PURE__ */
|
|
36839
|
+
return /* @__PURE__ */ jsx126(
|
|
36585
36840
|
"p",
|
|
36586
36841
|
{
|
|
36587
36842
|
"data-slot": "item-description",
|
|
@@ -36595,7 +36850,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
36595
36850
|
);
|
|
36596
36851
|
}
|
|
36597
36852
|
function ItemActions({ className, ...props }) {
|
|
36598
|
-
return /* @__PURE__ */
|
|
36853
|
+
return /* @__PURE__ */ jsx126(
|
|
36599
36854
|
"div",
|
|
36600
36855
|
{
|
|
36601
36856
|
"data-slot": "item-actions",
|
|
@@ -36605,7 +36860,7 @@ function ItemActions({ className, ...props }) {
|
|
|
36605
36860
|
);
|
|
36606
36861
|
}
|
|
36607
36862
|
function ItemHeader({ className, ...props }) {
|
|
36608
|
-
return /* @__PURE__ */
|
|
36863
|
+
return /* @__PURE__ */ jsx126(
|
|
36609
36864
|
"div",
|
|
36610
36865
|
{
|
|
36611
36866
|
"data-slot": "item-header",
|
|
@@ -36618,7 +36873,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
36618
36873
|
);
|
|
36619
36874
|
}
|
|
36620
36875
|
function ItemFooter({ className, ...props }) {
|
|
36621
|
-
return /* @__PURE__ */
|
|
36876
|
+
return /* @__PURE__ */ jsx126(
|
|
36622
36877
|
"div",
|
|
36623
36878
|
{
|
|
36624
36879
|
"data-slot": "item-footer",
|
|
@@ -36632,9 +36887,9 @@ function ItemFooter({ className, ...props }) {
|
|
|
36632
36887
|
}
|
|
36633
36888
|
|
|
36634
36889
|
// src/components/ui/kbd.tsx
|
|
36635
|
-
import { jsx as
|
|
36890
|
+
import { jsx as jsx127 } from "react/jsx-runtime";
|
|
36636
36891
|
function Kbd({ className, ...props }) {
|
|
36637
|
-
return /* @__PURE__ */
|
|
36892
|
+
return /* @__PURE__ */ jsx127(
|
|
36638
36893
|
"kbd",
|
|
36639
36894
|
{
|
|
36640
36895
|
"data-slot": "kbd",
|
|
@@ -36649,7 +36904,7 @@ function Kbd({ className, ...props }) {
|
|
|
36649
36904
|
);
|
|
36650
36905
|
}
|
|
36651
36906
|
function KbdGroup({ className, ...props }) {
|
|
36652
|
-
return /* @__PURE__ */
|
|
36907
|
+
return /* @__PURE__ */ jsx127(
|
|
36653
36908
|
"kbd",
|
|
36654
36909
|
{
|
|
36655
36910
|
"data-slot": "kbd-group",
|
|
@@ -36660,16 +36915,16 @@ function KbdGroup({ className, ...props }) {
|
|
|
36660
36915
|
}
|
|
36661
36916
|
|
|
36662
36917
|
// src/components/ui/sidebar.tsx
|
|
36663
|
-
import * as
|
|
36918
|
+
import * as React96 from "react";
|
|
36664
36919
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
36665
36920
|
import { cva as cva13 } from "class-variance-authority";
|
|
36666
36921
|
|
|
36667
36922
|
// src/hooks/use-mobile.tsx
|
|
36668
|
-
import * as
|
|
36923
|
+
import * as React95 from "react";
|
|
36669
36924
|
var MOBILE_BREAKPOINT = 768;
|
|
36670
36925
|
function useIsMobile() {
|
|
36671
|
-
const [isMobile, setIsMobile] =
|
|
36672
|
-
|
|
36926
|
+
const [isMobile, setIsMobile] = React95.useState(void 0);
|
|
36927
|
+
React95.useEffect(() => {
|
|
36673
36928
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
36674
36929
|
const onChange = () => {
|
|
36675
36930
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -36682,22 +36937,22 @@ function useIsMobile() {
|
|
|
36682
36937
|
}
|
|
36683
36938
|
|
|
36684
36939
|
// src/components/ui/sidebar.tsx
|
|
36685
|
-
import { jsx as
|
|
36940
|
+
import { jsx as jsx128, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
36686
36941
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
36687
36942
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
36688
36943
|
var SIDEBAR_WIDTH = "16rem";
|
|
36689
36944
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
36690
36945
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
36691
36946
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
36692
|
-
var SidebarContext =
|
|
36947
|
+
var SidebarContext = React96.createContext(null);
|
|
36693
36948
|
function useSidebar() {
|
|
36694
|
-
const context =
|
|
36949
|
+
const context = React96.useContext(SidebarContext);
|
|
36695
36950
|
if (!context) {
|
|
36696
36951
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
36697
36952
|
}
|
|
36698
36953
|
return context;
|
|
36699
36954
|
}
|
|
36700
|
-
var SidebarProvider =
|
|
36955
|
+
var SidebarProvider = React96.forwardRef(
|
|
36701
36956
|
({
|
|
36702
36957
|
defaultOpen = true,
|
|
36703
36958
|
open: openProp,
|
|
@@ -36708,10 +36963,10 @@ var SidebarProvider = React94.forwardRef(
|
|
|
36708
36963
|
...props
|
|
36709
36964
|
}, ref) => {
|
|
36710
36965
|
const isMobile = useIsMobile();
|
|
36711
|
-
const [openMobile, setOpenMobile] =
|
|
36712
|
-
const [_open, _setOpen] =
|
|
36966
|
+
const [openMobile, setOpenMobile] = React96.useState(false);
|
|
36967
|
+
const [_open, _setOpen] = React96.useState(defaultOpen);
|
|
36713
36968
|
const open = openProp ?? _open;
|
|
36714
|
-
const setOpen =
|
|
36969
|
+
const setOpen = React96.useCallback(
|
|
36715
36970
|
(value) => {
|
|
36716
36971
|
const openState = typeof value === "function" ? value(open) : value;
|
|
36717
36972
|
if (setOpenProp) {
|
|
@@ -36723,10 +36978,10 @@ var SidebarProvider = React94.forwardRef(
|
|
|
36723
36978
|
},
|
|
36724
36979
|
[setOpenProp, open]
|
|
36725
36980
|
);
|
|
36726
|
-
const toggleSidebar =
|
|
36981
|
+
const toggleSidebar = React96.useCallback(() => {
|
|
36727
36982
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
36728
36983
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
36729
|
-
|
|
36984
|
+
React96.useEffect(() => {
|
|
36730
36985
|
const handleKeyDown = (event) => {
|
|
36731
36986
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
36732
36987
|
event.preventDefault();
|
|
@@ -36737,7 +36992,7 @@ var SidebarProvider = React94.forwardRef(
|
|
|
36737
36992
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
36738
36993
|
}, [toggleSidebar]);
|
|
36739
36994
|
const state = open ? "expanded" : "collapsed";
|
|
36740
|
-
const contextValue =
|
|
36995
|
+
const contextValue = React96.useMemo(
|
|
36741
36996
|
() => ({
|
|
36742
36997
|
state,
|
|
36743
36998
|
open,
|
|
@@ -36749,7 +37004,7 @@ var SidebarProvider = React94.forwardRef(
|
|
|
36749
37004
|
}),
|
|
36750
37005
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
36751
37006
|
);
|
|
36752
|
-
return /* @__PURE__ */
|
|
37007
|
+
return /* @__PURE__ */ jsx128(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx128(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx128(
|
|
36753
37008
|
"div",
|
|
36754
37009
|
{
|
|
36755
37010
|
style: {
|
|
@@ -36769,7 +37024,7 @@ var SidebarProvider = React94.forwardRef(
|
|
|
36769
37024
|
}
|
|
36770
37025
|
);
|
|
36771
37026
|
SidebarProvider.displayName = "SidebarProvider";
|
|
36772
|
-
var Sidebar =
|
|
37027
|
+
var Sidebar = React96.forwardRef(
|
|
36773
37028
|
({
|
|
36774
37029
|
side = "left",
|
|
36775
37030
|
variant = "sidebar",
|
|
@@ -36780,7 +37035,7 @@ var Sidebar = React94.forwardRef(
|
|
|
36780
37035
|
}, ref) => {
|
|
36781
37036
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
36782
37037
|
if (collapsible === "none") {
|
|
36783
|
-
return /* @__PURE__ */
|
|
37038
|
+
return /* @__PURE__ */ jsx128(
|
|
36784
37039
|
"div",
|
|
36785
37040
|
{
|
|
36786
37041
|
className: cn(
|
|
@@ -36794,7 +37049,7 @@ var Sidebar = React94.forwardRef(
|
|
|
36794
37049
|
);
|
|
36795
37050
|
}
|
|
36796
37051
|
if (isMobile) {
|
|
36797
|
-
return /* @__PURE__ */
|
|
37052
|
+
return /* @__PURE__ */ jsx128(Sheet2, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs82(
|
|
36798
37053
|
SheetContent,
|
|
36799
37054
|
{
|
|
36800
37055
|
"data-sidebar": "sidebar",
|
|
@@ -36805,16 +37060,16 @@ var Sidebar = React94.forwardRef(
|
|
|
36805
37060
|
},
|
|
36806
37061
|
side,
|
|
36807
37062
|
children: [
|
|
36808
|
-
/* @__PURE__ */
|
|
36809
|
-
/* @__PURE__ */
|
|
36810
|
-
/* @__PURE__ */
|
|
37063
|
+
/* @__PURE__ */ jsxs82(SheetHeader, { className: "sr-only", children: [
|
|
37064
|
+
/* @__PURE__ */ jsx128(SheetTitle, { children: "Sidebar" }),
|
|
37065
|
+
/* @__PURE__ */ jsx128(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
36811
37066
|
] }),
|
|
36812
|
-
/* @__PURE__ */
|
|
37067
|
+
/* @__PURE__ */ jsx128("div", { className: "flex h-full w-full flex-col", children })
|
|
36813
37068
|
]
|
|
36814
37069
|
}
|
|
36815
37070
|
) });
|
|
36816
37071
|
}
|
|
36817
|
-
return /* @__PURE__ */
|
|
37072
|
+
return /* @__PURE__ */ jsxs82(
|
|
36818
37073
|
"div",
|
|
36819
37074
|
{
|
|
36820
37075
|
ref,
|
|
@@ -36824,7 +37079,7 @@ var Sidebar = React94.forwardRef(
|
|
|
36824
37079
|
"data-variant": variant,
|
|
36825
37080
|
"data-side": side,
|
|
36826
37081
|
children: [
|
|
36827
|
-
/* @__PURE__ */
|
|
37082
|
+
/* @__PURE__ */ jsx128(
|
|
36828
37083
|
"div",
|
|
36829
37084
|
{
|
|
36830
37085
|
className: cn(
|
|
@@ -36835,7 +37090,7 @@ var Sidebar = React94.forwardRef(
|
|
|
36835
37090
|
)
|
|
36836
37091
|
}
|
|
36837
37092
|
),
|
|
36838
|
-
/* @__PURE__ */
|
|
37093
|
+
/* @__PURE__ */ jsx128(
|
|
36839
37094
|
"div",
|
|
36840
37095
|
{
|
|
36841
37096
|
className: cn(
|
|
@@ -36846,7 +37101,7 @@ var Sidebar = React94.forwardRef(
|
|
|
36846
37101
|
className
|
|
36847
37102
|
),
|
|
36848
37103
|
...props,
|
|
36849
|
-
children: /* @__PURE__ */
|
|
37104
|
+
children: /* @__PURE__ */ jsx128(
|
|
36850
37105
|
"div",
|
|
36851
37106
|
{
|
|
36852
37107
|
"data-sidebar": "sidebar",
|
|
@@ -36862,9 +37117,9 @@ var Sidebar = React94.forwardRef(
|
|
|
36862
37117
|
}
|
|
36863
37118
|
);
|
|
36864
37119
|
Sidebar.displayName = "Sidebar";
|
|
36865
|
-
var SidebarTrigger =
|
|
37120
|
+
var SidebarTrigger = React96.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
36866
37121
|
const { toggleSidebar } = useSidebar();
|
|
36867
|
-
return /* @__PURE__ */
|
|
37122
|
+
return /* @__PURE__ */ jsxs82(
|
|
36868
37123
|
Button,
|
|
36869
37124
|
{
|
|
36870
37125
|
ref,
|
|
@@ -36878,16 +37133,16 @@ var SidebarTrigger = React94.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
36878
37133
|
},
|
|
36879
37134
|
...props,
|
|
36880
37135
|
children: [
|
|
36881
|
-
/* @__PURE__ */
|
|
36882
|
-
/* @__PURE__ */
|
|
37136
|
+
/* @__PURE__ */ jsx128(PanelLeft, {}),
|
|
37137
|
+
/* @__PURE__ */ jsx128("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
36883
37138
|
]
|
|
36884
37139
|
}
|
|
36885
37140
|
);
|
|
36886
37141
|
});
|
|
36887
37142
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
36888
|
-
var SidebarRail =
|
|
37143
|
+
var SidebarRail = React96.forwardRef(({ className, ...props }, ref) => {
|
|
36889
37144
|
const { toggleSidebar } = useSidebar();
|
|
36890
|
-
return /* @__PURE__ */
|
|
37145
|
+
return /* @__PURE__ */ jsx128(
|
|
36891
37146
|
"button",
|
|
36892
37147
|
{
|
|
36893
37148
|
ref,
|
|
@@ -36910,8 +37165,8 @@ var SidebarRail = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36910
37165
|
);
|
|
36911
37166
|
});
|
|
36912
37167
|
SidebarRail.displayName = "SidebarRail";
|
|
36913
|
-
var SidebarInset =
|
|
36914
|
-
return /* @__PURE__ */
|
|
37168
|
+
var SidebarInset = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37169
|
+
return /* @__PURE__ */ jsx128(
|
|
36915
37170
|
"main",
|
|
36916
37171
|
{
|
|
36917
37172
|
ref,
|
|
@@ -36925,8 +37180,8 @@ var SidebarInset = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36925
37180
|
);
|
|
36926
37181
|
});
|
|
36927
37182
|
SidebarInset.displayName = "SidebarInset";
|
|
36928
|
-
var SidebarInput =
|
|
36929
|
-
return /* @__PURE__ */
|
|
37183
|
+
var SidebarInput = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37184
|
+
return /* @__PURE__ */ jsx128(
|
|
36930
37185
|
Input,
|
|
36931
37186
|
{
|
|
36932
37187
|
ref,
|
|
@@ -36940,8 +37195,8 @@ var SidebarInput = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36940
37195
|
);
|
|
36941
37196
|
});
|
|
36942
37197
|
SidebarInput.displayName = "SidebarInput";
|
|
36943
|
-
var SidebarHeader =
|
|
36944
|
-
return /* @__PURE__ */
|
|
37198
|
+
var SidebarHeader = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37199
|
+
return /* @__PURE__ */ jsx128(
|
|
36945
37200
|
"div",
|
|
36946
37201
|
{
|
|
36947
37202
|
ref,
|
|
@@ -36952,8 +37207,8 @@ var SidebarHeader = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36952
37207
|
);
|
|
36953
37208
|
});
|
|
36954
37209
|
SidebarHeader.displayName = "SidebarHeader";
|
|
36955
|
-
var SidebarFooter =
|
|
36956
|
-
return /* @__PURE__ */
|
|
37210
|
+
var SidebarFooter = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37211
|
+
return /* @__PURE__ */ jsx128(
|
|
36957
37212
|
"div",
|
|
36958
37213
|
{
|
|
36959
37214
|
ref,
|
|
@@ -36964,8 +37219,8 @@ var SidebarFooter = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36964
37219
|
);
|
|
36965
37220
|
});
|
|
36966
37221
|
SidebarFooter.displayName = "SidebarFooter";
|
|
36967
|
-
var SidebarSeparator =
|
|
36968
|
-
return /* @__PURE__ */
|
|
37222
|
+
var SidebarSeparator = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37223
|
+
return /* @__PURE__ */ jsx128(
|
|
36969
37224
|
Separator2,
|
|
36970
37225
|
{
|
|
36971
37226
|
ref,
|
|
@@ -36976,8 +37231,8 @@ var SidebarSeparator = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36976
37231
|
);
|
|
36977
37232
|
});
|
|
36978
37233
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
36979
|
-
var SidebarContent =
|
|
36980
|
-
return /* @__PURE__ */
|
|
37234
|
+
var SidebarContent = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37235
|
+
return /* @__PURE__ */ jsx128(
|
|
36981
37236
|
"div",
|
|
36982
37237
|
{
|
|
36983
37238
|
ref,
|
|
@@ -36991,8 +37246,8 @@ var SidebarContent = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
36991
37246
|
);
|
|
36992
37247
|
});
|
|
36993
37248
|
SidebarContent.displayName = "SidebarContent";
|
|
36994
|
-
var SidebarGroup =
|
|
36995
|
-
return /* @__PURE__ */
|
|
37249
|
+
var SidebarGroup = React96.forwardRef(({ className, ...props }, ref) => {
|
|
37250
|
+
return /* @__PURE__ */ jsx128(
|
|
36996
37251
|
"div",
|
|
36997
37252
|
{
|
|
36998
37253
|
ref,
|
|
@@ -37003,9 +37258,9 @@ var SidebarGroup = React94.forwardRef(({ className, ...props }, ref) => {
|
|
|
37003
37258
|
);
|
|
37004
37259
|
});
|
|
37005
37260
|
SidebarGroup.displayName = "SidebarGroup";
|
|
37006
|
-
var SidebarGroupLabel =
|
|
37261
|
+
var SidebarGroupLabel = React96.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
37007
37262
|
const Comp = asChild ? Slot6 : "div";
|
|
37008
|
-
return /* @__PURE__ */
|
|
37263
|
+
return /* @__PURE__ */ jsx128(
|
|
37009
37264
|
Comp,
|
|
37010
37265
|
{
|
|
37011
37266
|
ref,
|
|
@@ -37020,9 +37275,9 @@ var SidebarGroupLabel = React94.forwardRef(({ className, asChild = false, ...pro
|
|
|
37020
37275
|
);
|
|
37021
37276
|
});
|
|
37022
37277
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
37023
|
-
var SidebarGroupAction =
|
|
37278
|
+
var SidebarGroupAction = React96.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
37024
37279
|
const Comp = asChild ? Slot6 : "button";
|
|
37025
|
-
return /* @__PURE__ */
|
|
37280
|
+
return /* @__PURE__ */ jsx128(
|
|
37026
37281
|
Comp,
|
|
37027
37282
|
{
|
|
37028
37283
|
ref,
|
|
@@ -37039,7 +37294,7 @@ var SidebarGroupAction = React94.forwardRef(({ className, asChild = false, ...pr
|
|
|
37039
37294
|
);
|
|
37040
37295
|
});
|
|
37041
37296
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
37042
|
-
var SidebarGroupContent =
|
|
37297
|
+
var SidebarGroupContent = React96.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx128(
|
|
37043
37298
|
"div",
|
|
37044
37299
|
{
|
|
37045
37300
|
ref,
|
|
@@ -37049,7 +37304,7 @@ var SidebarGroupContent = React94.forwardRef(({ className, ...props }, ref) => /
|
|
|
37049
37304
|
}
|
|
37050
37305
|
));
|
|
37051
37306
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
37052
|
-
var SidebarMenu =
|
|
37307
|
+
var SidebarMenu = React96.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx128(
|
|
37053
37308
|
"ul",
|
|
37054
37309
|
{
|
|
37055
37310
|
ref,
|
|
@@ -37059,7 +37314,7 @@ var SidebarMenu = React94.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
37059
37314
|
}
|
|
37060
37315
|
));
|
|
37061
37316
|
SidebarMenu.displayName = "SidebarMenu";
|
|
37062
|
-
var SidebarMenuItem =
|
|
37317
|
+
var SidebarMenuItem = React96.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx128(
|
|
37063
37318
|
"li",
|
|
37064
37319
|
{
|
|
37065
37320
|
ref,
|
|
@@ -37089,7 +37344,7 @@ var sidebarMenuButtonVariants = cva13(
|
|
|
37089
37344
|
}
|
|
37090
37345
|
}
|
|
37091
37346
|
);
|
|
37092
|
-
var SidebarMenuButton =
|
|
37347
|
+
var SidebarMenuButton = React96.forwardRef(
|
|
37093
37348
|
({
|
|
37094
37349
|
asChild = false,
|
|
37095
37350
|
isActive = false,
|
|
@@ -37101,7 +37356,7 @@ var SidebarMenuButton = React94.forwardRef(
|
|
|
37101
37356
|
}, ref) => {
|
|
37102
37357
|
const Comp = asChild ? Slot6 : "button";
|
|
37103
37358
|
const { isMobile, state } = useSidebar();
|
|
37104
|
-
const button = /* @__PURE__ */
|
|
37359
|
+
const button = /* @__PURE__ */ jsx128(
|
|
37105
37360
|
Comp,
|
|
37106
37361
|
{
|
|
37107
37362
|
ref,
|
|
@@ -37120,9 +37375,9 @@ var SidebarMenuButton = React94.forwardRef(
|
|
|
37120
37375
|
children: tooltip
|
|
37121
37376
|
};
|
|
37122
37377
|
}
|
|
37123
|
-
return /* @__PURE__ */
|
|
37124
|
-
/* @__PURE__ */
|
|
37125
|
-
/* @__PURE__ */
|
|
37378
|
+
return /* @__PURE__ */ jsxs82(Tooltip, { children: [
|
|
37379
|
+
/* @__PURE__ */ jsx128(TooltipTrigger, { asChild: true, children: button }),
|
|
37380
|
+
/* @__PURE__ */ jsx128(
|
|
37126
37381
|
TooltipContent,
|
|
37127
37382
|
{
|
|
37128
37383
|
side: "right",
|
|
@@ -37135,9 +37390,9 @@ var SidebarMenuButton = React94.forwardRef(
|
|
|
37135
37390
|
}
|
|
37136
37391
|
);
|
|
37137
37392
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
37138
|
-
var SidebarMenuAction =
|
|
37393
|
+
var SidebarMenuAction = React96.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
37139
37394
|
const Comp = asChild ? Slot6 : "button";
|
|
37140
|
-
return /* @__PURE__ */
|
|
37395
|
+
return /* @__PURE__ */ jsx128(
|
|
37141
37396
|
Comp,
|
|
37142
37397
|
{
|
|
37143
37398
|
ref,
|
|
@@ -37158,7 +37413,7 @@ var SidebarMenuAction = React94.forwardRef(({ className, asChild = false, showOn
|
|
|
37158
37413
|
);
|
|
37159
37414
|
});
|
|
37160
37415
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
37161
|
-
var SidebarMenuBadge =
|
|
37416
|
+
var SidebarMenuBadge = React96.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx128(
|
|
37162
37417
|
"div",
|
|
37163
37418
|
{
|
|
37164
37419
|
ref,
|
|
@@ -37176,11 +37431,11 @@ var SidebarMenuBadge = React94.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
37176
37431
|
}
|
|
37177
37432
|
));
|
|
37178
37433
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
37179
|
-
var SidebarMenuSkeleton =
|
|
37180
|
-
const width =
|
|
37434
|
+
var SidebarMenuSkeleton = React96.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
37435
|
+
const width = React96.useMemo(() => {
|
|
37181
37436
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
37182
37437
|
}, []);
|
|
37183
|
-
return /* @__PURE__ */
|
|
37438
|
+
return /* @__PURE__ */ jsxs82(
|
|
37184
37439
|
"div",
|
|
37185
37440
|
{
|
|
37186
37441
|
ref,
|
|
@@ -37188,14 +37443,14 @@ var SidebarMenuSkeleton = React94.forwardRef(({ className, showIcon = false, ...
|
|
|
37188
37443
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
37189
37444
|
...props,
|
|
37190
37445
|
children: [
|
|
37191
|
-
showIcon && /* @__PURE__ */
|
|
37446
|
+
showIcon && /* @__PURE__ */ jsx128(
|
|
37192
37447
|
Skeleton,
|
|
37193
37448
|
{
|
|
37194
37449
|
className: "size-4 rounded-md",
|
|
37195
37450
|
"data-sidebar": "menu-skeleton-icon"
|
|
37196
37451
|
}
|
|
37197
37452
|
),
|
|
37198
|
-
/* @__PURE__ */
|
|
37453
|
+
/* @__PURE__ */ jsx128(
|
|
37199
37454
|
Skeleton,
|
|
37200
37455
|
{
|
|
37201
37456
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -37210,7 +37465,7 @@ var SidebarMenuSkeleton = React94.forwardRef(({ className, showIcon = false, ...
|
|
|
37210
37465
|
);
|
|
37211
37466
|
});
|
|
37212
37467
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
37213
|
-
var SidebarMenuSub =
|
|
37468
|
+
var SidebarMenuSub = React96.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx128(
|
|
37214
37469
|
"ul",
|
|
37215
37470
|
{
|
|
37216
37471
|
ref,
|
|
@@ -37224,11 +37479,11 @@ var SidebarMenuSub = React94.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
37224
37479
|
}
|
|
37225
37480
|
));
|
|
37226
37481
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
37227
|
-
var SidebarMenuSubItem =
|
|
37482
|
+
var SidebarMenuSubItem = React96.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx128("li", { ref, ...props }));
|
|
37228
37483
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
37229
|
-
var SidebarMenuSubButton =
|
|
37484
|
+
var SidebarMenuSubButton = React96.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
37230
37485
|
const Comp = asChild ? Slot6 : "a";
|
|
37231
|
-
return /* @__PURE__ */
|
|
37486
|
+
return /* @__PURE__ */ jsx128(
|
|
37232
37487
|
Comp,
|
|
37233
37488
|
{
|
|
37234
37489
|
ref,
|
|
@@ -37252,20 +37507,20 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
37252
37507
|
// src/components/ui/sonner.tsx
|
|
37253
37508
|
import { useTheme } from "next-themes";
|
|
37254
37509
|
import { Toaster as Sonner } from "sonner";
|
|
37255
|
-
import { jsx as
|
|
37510
|
+
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
37256
37511
|
var Toaster = ({ ...props }) => {
|
|
37257
37512
|
const { theme = "system" } = useTheme();
|
|
37258
|
-
return /* @__PURE__ */
|
|
37513
|
+
return /* @__PURE__ */ jsx129(
|
|
37259
37514
|
Sonner,
|
|
37260
37515
|
{
|
|
37261
37516
|
theme,
|
|
37262
37517
|
className: "toaster group",
|
|
37263
37518
|
icons: {
|
|
37264
|
-
success: /* @__PURE__ */
|
|
37265
|
-
info: /* @__PURE__ */
|
|
37266
|
-
warning: /* @__PURE__ */
|
|
37267
|
-
error: /* @__PURE__ */
|
|
37268
|
-
loading: /* @__PURE__ */
|
|
37519
|
+
success: /* @__PURE__ */ jsx129(CircleCheck, { className: "h-4 w-4" }),
|
|
37520
|
+
info: /* @__PURE__ */ jsx129(Info, { className: "h-4 w-4" }),
|
|
37521
|
+
warning: /* @__PURE__ */ jsx129(TriangleAlert, { className: "h-4 w-4" }),
|
|
37522
|
+
error: /* @__PURE__ */ jsx129(OctagonX, { className: "h-4 w-4" }),
|
|
37523
|
+
loading: /* @__PURE__ */ jsx129(LoaderCircle, { className: "h-4 w-4 animate-spin" })
|
|
37269
37524
|
},
|
|
37270
37525
|
toastOptions: {
|
|
37271
37526
|
classNames: {
|
|
@@ -37281,26 +37536,26 @@ var Toaster = ({ ...props }) => {
|
|
|
37281
37536
|
};
|
|
37282
37537
|
|
|
37283
37538
|
// src/components/ui/toggle-group.tsx
|
|
37284
|
-
import * as
|
|
37539
|
+
import * as React97 from "react";
|
|
37285
37540
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
37286
|
-
import { jsx as
|
|
37287
|
-
var ToggleGroupContext =
|
|
37541
|
+
import { jsx as jsx130 } from "react/jsx-runtime";
|
|
37542
|
+
var ToggleGroupContext = React97.createContext({
|
|
37288
37543
|
size: "default",
|
|
37289
37544
|
variant: "default"
|
|
37290
37545
|
});
|
|
37291
|
-
var ToggleGroup =
|
|
37546
|
+
var ToggleGroup = React97.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ jsx130(
|
|
37292
37547
|
ToggleGroupPrimitive.Root,
|
|
37293
37548
|
{
|
|
37294
37549
|
ref,
|
|
37295
37550
|
className: cn("flex items-center justify-center gap-1", className),
|
|
37296
37551
|
...props,
|
|
37297
|
-
children: /* @__PURE__ */
|
|
37552
|
+
children: /* @__PURE__ */ jsx130(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
37298
37553
|
}
|
|
37299
37554
|
));
|
|
37300
37555
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
37301
|
-
var ToggleGroupItem =
|
|
37302
|
-
const context =
|
|
37303
|
-
return /* @__PURE__ */
|
|
37556
|
+
var ToggleGroupItem = React97.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
37557
|
+
const context = React97.useContext(ToggleGroupContext);
|
|
37558
|
+
return /* @__PURE__ */ jsx130(
|
|
37304
37559
|
ToggleGroupPrimitive.Item,
|
|
37305
37560
|
{
|
|
37306
37561
|
ref,
|
|
@@ -37319,7 +37574,7 @@ var ToggleGroupItem = React95.forwardRef(({ className, children, variant, size,
|
|
|
37319
37574
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
37320
37575
|
|
|
37321
37576
|
// src/render/PXEngineRenderer.tsx
|
|
37322
|
-
import { jsx as
|
|
37577
|
+
import { jsx as jsx131, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
37323
37578
|
var CONTEXT_DEPENDENT_COMPONENTS = /* @__PURE__ */ new Set([
|
|
37324
37579
|
// Form components - require FormField + FormItem context
|
|
37325
37580
|
"FormLabel",
|
|
@@ -37411,24 +37666,24 @@ var COMPONENT_SUGGESTIONS = {
|
|
|
37411
37666
|
};
|
|
37412
37667
|
var renderContextDependentError = (componentName, normalizedName, key) => {
|
|
37413
37668
|
const suggestion = COMPONENT_SUGGESTIONS[normalizedName] || `${componentName}Atom (if available)`;
|
|
37414
|
-
return /* @__PURE__ */
|
|
37669
|
+
return /* @__PURE__ */ jsxs83(
|
|
37415
37670
|
"div",
|
|
37416
37671
|
{
|
|
37417
37672
|
className: "p-4 border-2 border-amber-500/50 rounded-lg bg-amber-50/80 space-y-2 my-2",
|
|
37418
37673
|
children: [
|
|
37419
|
-
/* @__PURE__ */
|
|
37420
|
-
/* @__PURE__ */
|
|
37421
|
-
/* @__PURE__ */
|
|
37422
|
-
/* @__PURE__ */
|
|
37674
|
+
/* @__PURE__ */ jsxs83("div", { className: "flex items-start gap-2", children: [
|
|
37675
|
+
/* @__PURE__ */ jsx131("span", { className: "text-amber-600 font-bold text-lg", children: "\u26A0\uFE0F" }),
|
|
37676
|
+
/* @__PURE__ */ jsxs83("div", { className: "flex-1", children: [
|
|
37677
|
+
/* @__PURE__ */ jsxs83("p", { className: "text-sm font-semibold text-amber-900", children: [
|
|
37423
37678
|
"Invalid Component: ",
|
|
37424
37679
|
componentName
|
|
37425
37680
|
] }),
|
|
37426
|
-
/* @__PURE__ */
|
|
37681
|
+
/* @__PURE__ */ jsx131("p", { className: "text-xs text-amber-700 mt-1", children: "This component requires React Context and cannot be rendered directly in schemas." })
|
|
37427
37682
|
] })
|
|
37428
37683
|
] }),
|
|
37429
|
-
/* @__PURE__ */
|
|
37430
|
-
/* @__PURE__ */
|
|
37431
|
-
/* @__PURE__ */
|
|
37684
|
+
/* @__PURE__ */ jsxs83("div", { className: "bg-white/60 p-3 rounded border border-amber-200", children: [
|
|
37685
|
+
/* @__PURE__ */ jsx131("p", { className: "text-xs font-semibold text-gray-700 mb-1.5", children: "\u2713 Use instead:" }),
|
|
37686
|
+
/* @__PURE__ */ jsx131("code", { className: "text-xs text-blue-700 bg-blue-50 px-2 py-1 rounded", children: suggestion })
|
|
37432
37687
|
] })
|
|
37433
37688
|
]
|
|
37434
37689
|
},
|
|
@@ -37499,7 +37754,8 @@ var normalizeProps = (props) => {
|
|
|
37499
37754
|
};
|
|
37500
37755
|
var PXEngineRenderer = ({
|
|
37501
37756
|
schema,
|
|
37502
|
-
onAction
|
|
37757
|
+
onAction,
|
|
37758
|
+
disabled
|
|
37503
37759
|
}) => {
|
|
37504
37760
|
if (!schema) return null;
|
|
37505
37761
|
const root = schema.root || schema;
|
|
@@ -37507,7 +37763,7 @@ var PXEngineRenderer = ({
|
|
|
37507
37763
|
if (typeof component === "string" || typeof component === "number") {
|
|
37508
37764
|
return component;
|
|
37509
37765
|
}
|
|
37510
|
-
if (
|
|
37766
|
+
if (React98.isValidElement(component)) {
|
|
37511
37767
|
return component;
|
|
37512
37768
|
}
|
|
37513
37769
|
if (!component || typeof component !== "object") return null;
|
|
@@ -37523,6 +37779,9 @@ var PXEngineRenderer = ({
|
|
|
37523
37779
|
const componentName = name || type || componentType;
|
|
37524
37780
|
if (!componentName || typeof componentName !== "string") return null;
|
|
37525
37781
|
const rawProps = { ...remainingProps, ...props };
|
|
37782
|
+
if (disabled !== void 0 && rawProps.disabled === void 0) {
|
|
37783
|
+
rawProps.disabled = disabled;
|
|
37784
|
+
}
|
|
37526
37785
|
const { normalized: finalProps, dynamicStyle } = normalizeProps(rawProps);
|
|
37527
37786
|
if (id && !finalProps.id) {
|
|
37528
37787
|
finalProps.id = id;
|
|
@@ -37582,7 +37841,7 @@ var PXEngineRenderer = ({
|
|
|
37582
37841
|
const isAtomWithRenderProp = ATOMS_WITH_RENDER.has(atomName);
|
|
37583
37842
|
const finalStyle = { ...dynamicStyle, ...finalProps.style || {} };
|
|
37584
37843
|
if (isAtomWithRenderProp) {
|
|
37585
|
-
return /* @__PURE__ */
|
|
37844
|
+
return /* @__PURE__ */ jsx131(
|
|
37586
37845
|
TargetComponent,
|
|
37587
37846
|
{
|
|
37588
37847
|
...finalProps,
|
|
@@ -37594,7 +37853,7 @@ var PXEngineRenderer = ({
|
|
|
37594
37853
|
uniqueKey
|
|
37595
37854
|
);
|
|
37596
37855
|
} else {
|
|
37597
|
-
return /* @__PURE__ */
|
|
37856
|
+
return /* @__PURE__ */ jsx131(
|
|
37598
37857
|
TargetComponent,
|
|
37599
37858
|
{
|
|
37600
37859
|
...finalProps,
|
|
@@ -37606,7 +37865,7 @@ var PXEngineRenderer = ({
|
|
|
37606
37865
|
);
|
|
37607
37866
|
}
|
|
37608
37867
|
};
|
|
37609
|
-
return /* @__PURE__ */
|
|
37868
|
+
return /* @__PURE__ */ jsx131("div", { className: "px-engine-root relative w-full h-full", children: renderRecursive(root) });
|
|
37610
37869
|
};
|
|
37611
37870
|
export {
|
|
37612
37871
|
Accordion,
|
|
@@ -37652,6 +37911,7 @@ export {
|
|
|
37652
37911
|
ButtonAtom,
|
|
37653
37912
|
Calendar2 as Calendar,
|
|
37654
37913
|
CalendarAtom,
|
|
37914
|
+
CampaignConceptCard,
|
|
37655
37915
|
CampaignSeedCard,
|
|
37656
37916
|
Card,
|
|
37657
37917
|
CardAtom,
|
|
@@ -37699,6 +37959,7 @@ export {
|
|
|
37699
37959
|
CreatorActionHeader,
|
|
37700
37960
|
CreatorGridCard,
|
|
37701
37961
|
CreatorProfileSummary,
|
|
37962
|
+
CreatorSearch,
|
|
37702
37963
|
DataGrid,
|
|
37703
37964
|
Dialog,
|
|
37704
37965
|
DialogAtom,
|