@webdevarif/dashui 1.2.3 → 1.2.6
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.d.mts +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +382 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +379 -39
- package/dist/index.mjs.map +1 -1
- package/package.json +89 -95
- package/dist/styles/animations.css +0 -13
- package/dist/styles/globals.css +0 -437
- package/dist/tokens/index.css +0 -11
- package/dist/tokens/primitives.css +0 -92
- package/dist/tokens/semantic-dark.css +0 -87
- package/dist/tokens/semantic-light.css +0 -116
- package/dist/tokens/storefront-schemes.css +0 -96
package/dist/index.js
CHANGED
|
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
|
57
57
|
ColorPickerHue: () => ColorPickerHue,
|
|
58
58
|
ColorPickerOutput: () => ColorPickerOutput,
|
|
59
59
|
ColorPickerSelection: () => ColorPickerSelection,
|
|
60
|
+
ColorSchemaPanel: () => ColorSchemaPanel,
|
|
60
61
|
ConfirmDialog: () => ConfirmDialog,
|
|
61
62
|
DEVICES: () => DEVICES,
|
|
62
63
|
DEVICE_ICONS: () => DEVICE_ICONS,
|
|
@@ -136,6 +137,7 @@ __export(index_exports, {
|
|
|
136
137
|
TabsList: () => TabsList,
|
|
137
138
|
TabsTrigger: () => TabsTrigger,
|
|
138
139
|
Textarea: () => Textarea,
|
|
140
|
+
ThemeBuilder: () => ThemeBuilder,
|
|
139
141
|
ThemeProvider: () => import_next_themes2.ThemeProvider,
|
|
140
142
|
ThemeToggle: () => ThemeToggle,
|
|
141
143
|
TiptapEditor: () => TiptapEditor,
|
|
@@ -144,6 +146,7 @@ __export(index_exports, {
|
|
|
144
146
|
TooltipProvider: () => TooltipProvider,
|
|
145
147
|
TooltipTrigger: () => TooltipTrigger,
|
|
146
148
|
TopBar: () => TopBar,
|
|
149
|
+
TypographyPanel: () => TypographyPanel,
|
|
147
150
|
UploadProgressPanel: () => UploadProgressPanel,
|
|
148
151
|
UploadZone: () => UploadZone,
|
|
149
152
|
badgeVariants: () => badgeVariants,
|
|
@@ -3869,10 +3872,347 @@ function ToolbarButton({
|
|
|
3869
3872
|
);
|
|
3870
3873
|
}
|
|
3871
3874
|
|
|
3872
|
-
// src/
|
|
3875
|
+
// src/components/cms/theme-builder.tsx
|
|
3873
3876
|
var import_react8 = require("react");
|
|
3877
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3878
|
+
function ThemeBuilder({ theme, onSave, onPreviewUpdate, previewUrl }) {
|
|
3879
|
+
const [sidebarTab, setSidebarTab] = (0, import_react8.useState)("variables");
|
|
3880
|
+
const [iframeLoaded, setIframeLoaded] = (0, import_react8.useState)(false);
|
|
3881
|
+
const iframeRef = (0, import_react8.useRef)(null);
|
|
3882
|
+
const handleSave = (0, import_react8.useCallback)(() => {
|
|
3883
|
+
onSave(theme);
|
|
3884
|
+
}, [theme, onSave]);
|
|
3885
|
+
const handlePreviewReload = (0, import_react8.useCallback)(() => {
|
|
3886
|
+
if (iframeRef.current) {
|
|
3887
|
+
iframeRef.current.src = previewUrl || "about:blank";
|
|
3888
|
+
}
|
|
3889
|
+
}, [previewUrl]);
|
|
3890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex h-screen bg-[#0f1117] text-white overflow-hidden", children: [
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "w-11 bg-[#010409] border-r border-white/10 flex flex-col items-center py-4 gap-6", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3893
|
+
"button",
|
|
3894
|
+
{
|
|
3895
|
+
onClick: () => setSidebarTab("ai"),
|
|
3896
|
+
title: "AI Assistant",
|
|
3897
|
+
className: `p-2 rounded transition-colors ${sidebarTab === "ai" ? "bg-[#287f71]/20 text-[#287f71]" : "text-white/40 hover:text-white/60"}`,
|
|
3898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z" }) })
|
|
3899
|
+
}
|
|
3900
|
+
),
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3902
|
+
"button",
|
|
3903
|
+
{
|
|
3904
|
+
onClick: () => setSidebarTab("variables"),
|
|
3905
|
+
title: "Variables",
|
|
3906
|
+
className: `p-2 rounded transition-colors ${sidebarTab === "variables" ? "bg-[#287f71]/20 text-[#287f71]" : "text-white/40 hover:text-white/60"}`,
|
|
3907
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "6", cy: "6", r: "2" }),
|
|
3909
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "12", cy: "12", r: "2" }),
|
|
3910
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "18", cy: "18", r: "2" }),
|
|
3911
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M8 8l8 8M6 18l12-12" })
|
|
3912
|
+
] })
|
|
3913
|
+
}
|
|
3914
|
+
),
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3916
|
+
"button",
|
|
3917
|
+
{
|
|
3918
|
+
onClick: () => setSidebarTab("styles"),
|
|
3919
|
+
title: "Styles",
|
|
3920
|
+
className: `p-2 rounded transition-colors ${sidebarTab === "styles" ? "bg-[#287f71]/20 text-[#287f71]" : "text-white/40 hover:text-white/60"}`,
|
|
3921
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { className: "w-5 h-5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3 6h18M3 12h18M3 18h18" }) })
|
|
3922
|
+
}
|
|
3923
|
+
)
|
|
3924
|
+
] }),
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "w-80 bg-[#13151e] border-r border-white/10 overflow-y-auto p-4", children: [
|
|
3926
|
+
sidebarTab === "variables" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-6", children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-lg font-semibold", children: "Theme Variables" }),
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-sm text-white/50 p-4 bg-white/5 rounded", children: "\u{1F4A1} Variables panel component \u2014 render color schema, typography, page layout sections here" }),
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3930
|
+
"button",
|
|
3931
|
+
{
|
|
3932
|
+
onClick: handleSave,
|
|
3933
|
+
className: "w-full px-4 py-2 bg-[#287f71] text-white rounded-lg hover:bg-[#287f71]/80 transition-colors font-medium",
|
|
3934
|
+
children: "Save Changes"
|
|
3935
|
+
}
|
|
3936
|
+
)
|
|
3937
|
+
] }),
|
|
3938
|
+
sidebarTab === "ai" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-4", children: [
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-lg font-semibold", children: "AI Assistant" }),
|
|
3940
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-sm text-white/50 p-4 bg-white/5 rounded", children: "\u{1F916} AI chat component \u2014 connect to OpenAI/Anthropic API" })
|
|
3941
|
+
] }),
|
|
3942
|
+
sidebarTab === "styles" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-4", children: [
|
|
3943
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-lg font-semibold", children: "Style Classes" }),
|
|
3944
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-sm text-white/50 p-4 bg-white/5 rounded", children: "\u{1F3A8} Style Classes editor \u2014 coming soon" })
|
|
3945
|
+
] })
|
|
3946
|
+
] }),
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex-1 flex flex-col bg-[#161b22]", children: [
|
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "h-12 bg-[#0d1117] border-b border-white/10 flex items-center justify-between px-4", children: [
|
|
3949
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h1", { className: "text-sm font-medium", children: "Preview" }),
|
|
3950
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3951
|
+
"button",
|
|
3952
|
+
{
|
|
3953
|
+
onClick: handlePreviewReload,
|
|
3954
|
+
className: "px-3 py-1 text-xs bg-white/10 hover:bg-white/20 rounded transition-colors",
|
|
3955
|
+
children: "Reload"
|
|
3956
|
+
}
|
|
3957
|
+
)
|
|
3958
|
+
] }),
|
|
3959
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3960
|
+
"iframe",
|
|
3961
|
+
{
|
|
3962
|
+
ref: iframeRef,
|
|
3963
|
+
src: previewUrl || "about:blank",
|
|
3964
|
+
onLoad: () => setIframeLoaded(true),
|
|
3965
|
+
className: "flex-1 border-0",
|
|
3966
|
+
title: "Theme preview"
|
|
3967
|
+
}
|
|
3968
|
+
)
|
|
3969
|
+
] })
|
|
3970
|
+
] });
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
// src/components/cms/color-schema-panel.tsx
|
|
3974
|
+
var import_react9 = require("react");
|
|
3975
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3976
|
+
function ColorSchemaPanel({
|
|
3977
|
+
schemas = [],
|
|
3978
|
+
activeSchemaId,
|
|
3979
|
+
onSchemaSelect,
|
|
3980
|
+
onSchemaSave,
|
|
3981
|
+
onSchemaCreate
|
|
3982
|
+
}) {
|
|
3983
|
+
const [showCreate, setShowCreate] = (0, import_react9.useState)(false);
|
|
3984
|
+
const [newName, setNewName] = (0, import_react9.useState)("");
|
|
3985
|
+
const activeSchema = schemas.find((s) => s.id === activeSchemaId);
|
|
3986
|
+
const handleCreate = () => {
|
|
3987
|
+
if (newName.trim()) {
|
|
3988
|
+
onSchemaCreate(newName);
|
|
3989
|
+
setNewName("");
|
|
3990
|
+
setShowCreate(false);
|
|
3991
|
+
}
|
|
3992
|
+
};
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-4", children: [
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
3995
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h3", { className: "text-sm font-semibold text-white", children: "Color Schemas" }),
|
|
3996
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3997
|
+
"button",
|
|
3998
|
+
{
|
|
3999
|
+
onClick: () => setShowCreate(!showCreate),
|
|
4000
|
+
className: "text-xs px-2 py-1 bg-[#287f71] text-white rounded hover:bg-[#287f71]/80 transition-colors",
|
|
4001
|
+
children: "+ New"
|
|
4002
|
+
}
|
|
4003
|
+
)
|
|
4004
|
+
] }),
|
|
4005
|
+
showCreate && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex gap-2 p-3 bg-white/5 rounded-lg", children: [
|
|
4006
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4007
|
+
Input,
|
|
4008
|
+
{
|
|
4009
|
+
value: newName,
|
|
4010
|
+
onChange: (e) => setNewName(e.target.value),
|
|
4011
|
+
placeholder: "Schema name",
|
|
4012
|
+
className: "h-8 text-xs bg-white/10 border-white/20 text-white placeholder:text-white/30"
|
|
4013
|
+
}
|
|
4014
|
+
),
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4016
|
+
"button",
|
|
4017
|
+
{
|
|
4018
|
+
onClick: handleCreate,
|
|
4019
|
+
className: "px-3 py-1 text-xs bg-[#287f71] text-white rounded hover:bg-[#287f71]/80",
|
|
4020
|
+
children: "Create"
|
|
4021
|
+
}
|
|
4022
|
+
),
|
|
4023
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4024
|
+
"button",
|
|
4025
|
+
{
|
|
4026
|
+
onClick: () => setShowCreate(false),
|
|
4027
|
+
className: "px-3 py-1 text-xs bg-white/10 text-white/70 rounded hover:bg-white/20",
|
|
4028
|
+
children: "Cancel"
|
|
4029
|
+
}
|
|
4030
|
+
)
|
|
4031
|
+
] }),
|
|
4032
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "space-y-2", children: schemas.map((schema) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
4033
|
+
"button",
|
|
4034
|
+
{
|
|
4035
|
+
onClick: () => onSchemaSelect(schema.id),
|
|
4036
|
+
className: `w-full p-3 rounded-lg border-2 transition-colors text-left ${activeSchemaId === schema.id ? "border-[#287f71] bg-[#287f71]/10" : "border-white/10 bg-white/5 hover:border-white/20"}`,
|
|
4037
|
+
children: [
|
|
4038
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-sm font-medium text-white", children: schema.name }),
|
|
4039
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-xs text-white/50", children: [
|
|
4040
|
+
Object.keys(schema.light).length,
|
|
4041
|
+
" tokens"
|
|
4042
|
+
] })
|
|
4043
|
+
]
|
|
4044
|
+
},
|
|
4045
|
+
schema.id
|
|
4046
|
+
)) }),
|
|
4047
|
+
activeSchema && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "p-3 bg-white/5 rounded-lg border border-white/10 space-y-3", children: [
|
|
4048
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h4", { className: "text-xs font-semibold text-white", children: "Light Mode" }),
|
|
4049
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "grid grid-cols-4 gap-2", children: Object.entries(activeSchema.light).slice(0, 8).map(([key, color]) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4050
|
+
"div",
|
|
4051
|
+
{
|
|
4052
|
+
className: "rounded border border-white/10 overflow-hidden",
|
|
4053
|
+
title: key,
|
|
4054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4055
|
+
"div",
|
|
4056
|
+
{
|
|
4057
|
+
className: "h-6",
|
|
4058
|
+
style: { backgroundColor: color }
|
|
4059
|
+
}
|
|
4060
|
+
)
|
|
4061
|
+
},
|
|
4062
|
+
key
|
|
4063
|
+
)) }),
|
|
4064
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h4", { className: "text-xs font-semibold text-white mt-3", children: "Dark Mode" }),
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "grid grid-cols-4 gap-2", children: Object.entries(activeSchema.dark).slice(0, 8).map(([key, color]) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4066
|
+
"div",
|
|
4067
|
+
{
|
|
4068
|
+
className: "rounded border border-white/10 overflow-hidden",
|
|
4069
|
+
title: key,
|
|
4070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4071
|
+
"div",
|
|
4072
|
+
{
|
|
4073
|
+
className: "h-6",
|
|
4074
|
+
style: { backgroundColor: color }
|
|
4075
|
+
}
|
|
4076
|
+
)
|
|
4077
|
+
},
|
|
4078
|
+
key
|
|
4079
|
+
)) })
|
|
4080
|
+
] })
|
|
4081
|
+
] });
|
|
4082
|
+
}
|
|
4083
|
+
|
|
4084
|
+
// src/components/cms/typography-panel.tsx
|
|
4085
|
+
var import_react10 = require("react");
|
|
4086
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4087
|
+
function TypographyPanel({
|
|
4088
|
+
typography,
|
|
4089
|
+
onSave
|
|
4090
|
+
}) {
|
|
4091
|
+
const [expanded, setExpanded] = (0, import_react10.useState)("body");
|
|
4092
|
+
const handleFontChange = (role, font) => {
|
|
4093
|
+
const updated = {
|
|
4094
|
+
...typography,
|
|
4095
|
+
fonts: { ...typography.fonts, [role]: font }
|
|
4096
|
+
};
|
|
4097
|
+
onSave(updated);
|
|
4098
|
+
};
|
|
4099
|
+
const handlePresetChange = (presetKey, field, value) => {
|
|
4100
|
+
const isHeading = presetKey.startsWith("h");
|
|
4101
|
+
const updated = isHeading ? {
|
|
4102
|
+
...typography,
|
|
4103
|
+
headings: {
|
|
4104
|
+
...typography.headings,
|
|
4105
|
+
[presetKey]: { ...typography.headings[presetKey], [field]: value }
|
|
4106
|
+
}
|
|
4107
|
+
} : {
|
|
4108
|
+
...typography,
|
|
4109
|
+
body: { ...typography.body, [field]: value }
|
|
4110
|
+
};
|
|
4111
|
+
onSave(updated);
|
|
4112
|
+
};
|
|
4113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-4", children: [
|
|
4114
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { className: "text-sm font-semibold text-white", children: "Typography" }),
|
|
4115
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-2 border-b border-white/10 pb-4", children: [
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-xs font-medium text-white/70 uppercase", children: "Fonts" }),
|
|
4117
|
+
Object.entries(typography.fonts || {}).map(([role, font]) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
4118
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label2, { className: "text-xs text-white/60", children: role }),
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4120
|
+
Input,
|
|
4121
|
+
{
|
|
4122
|
+
value: font,
|
|
4123
|
+
onChange: (e) => handleFontChange(role, e.target.value),
|
|
4124
|
+
placeholder: "Font name",
|
|
4125
|
+
className: "h-8 text-xs bg-white/10 border-white/20 text-white placeholder:text-white/30"
|
|
4126
|
+
}
|
|
4127
|
+
)
|
|
4128
|
+
] }, role))
|
|
4129
|
+
] }),
|
|
4130
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-2", children: [
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-xs font-medium text-white/70 uppercase", children: "Text Styles" }),
|
|
4132
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4133
|
+
"button",
|
|
4134
|
+
{
|
|
4135
|
+
onClick: () => setExpanded(expanded === "body" ? null : "body"),
|
|
4136
|
+
className: "w-full text-left p-2 rounded hover:bg-white/5 transition-colors",
|
|
4137
|
+
children: [
|
|
4138
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-sm font-medium text-white", children: "Body Text" }),
|
|
4139
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4140
|
+
"svg",
|
|
4141
|
+
{
|
|
4142
|
+
className: `w-3 h-3 inline ml-2 transition-transform ${expanded === "body" ? "rotate-180" : ""}`,
|
|
4143
|
+
viewBox: "0 0 24 24",
|
|
4144
|
+
fill: "none",
|
|
4145
|
+
stroke: "currentColor",
|
|
4146
|
+
strokeWidth: "2",
|
|
4147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
4148
|
+
}
|
|
4149
|
+
)
|
|
4150
|
+
]
|
|
4151
|
+
}
|
|
4152
|
+
),
|
|
4153
|
+
expanded === "body" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ml-2 space-y-2 p-2 bg-white/5 rounded", children: [
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label2, { className: "text-xs text-white/60", children: "Size" }),
|
|
4156
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4157
|
+
Input,
|
|
4158
|
+
{
|
|
4159
|
+
type: "number",
|
|
4160
|
+
value: typography.body?.size?.desktop || 16,
|
|
4161
|
+
onChange: (e) => handlePresetChange("body", "size", { desktop: +e.target.value }),
|
|
4162
|
+
className: "h-8 text-xs bg-white/10 border-white/20 text-white"
|
|
4163
|
+
}
|
|
4164
|
+
)
|
|
4165
|
+
] }),
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
4167
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Label2, { className: "text-xs text-white/60", children: "Line Height" }),
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4169
|
+
Input,
|
|
4170
|
+
{
|
|
4171
|
+
value: typography.body?.lineHeight || "1.5",
|
|
4172
|
+
onChange: (e) => handlePresetChange("body", "lineHeight", e.target.value),
|
|
4173
|
+
className: "h-8 text-xs bg-white/10 border-white/20 text-white"
|
|
4174
|
+
}
|
|
4175
|
+
)
|
|
4176
|
+
] })
|
|
4177
|
+
] }),
|
|
4178
|
+
["h1", "h2", "h3", "h4", "h5", "h6"].map((heading) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4179
|
+
"button",
|
|
4180
|
+
{
|
|
4181
|
+
onClick: () => setExpanded(expanded === heading ? null : heading),
|
|
4182
|
+
className: "w-full text-left p-2 rounded hover:bg-white/5 transition-colors",
|
|
4183
|
+
children: [
|
|
4184
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-sm font-medium text-white uppercase", children: heading }),
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4186
|
+
"svg",
|
|
4187
|
+
{
|
|
4188
|
+
className: `w-3 h-3 inline ml-2 transition-transform ${expanded === heading ? "rotate-180" : ""}`,
|
|
4189
|
+
viewBox: "0 0 24 24",
|
|
4190
|
+
fill: "none",
|
|
4191
|
+
stroke: "currentColor",
|
|
4192
|
+
strokeWidth: "2",
|
|
4193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
4194
|
+
}
|
|
4195
|
+
)
|
|
4196
|
+
]
|
|
4197
|
+
},
|
|
4198
|
+
heading
|
|
4199
|
+
))
|
|
4200
|
+
] }),
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4202
|
+
"button",
|
|
4203
|
+
{
|
|
4204
|
+
onClick: () => onSave(typography),
|
|
4205
|
+
className: "w-full px-4 py-2 bg-[#287f71] text-white rounded-lg hover:bg-[#287f71]/80 transition-colors font-medium text-sm mt-4",
|
|
4206
|
+
children: "Save Typography"
|
|
4207
|
+
}
|
|
4208
|
+
)
|
|
4209
|
+
] });
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
// src/hooks/index.ts
|
|
4213
|
+
var import_react11 = require("react");
|
|
3874
4214
|
function useDisclosure(initial = false) {
|
|
3875
|
-
const [isOpen, setIsOpen] = (0,
|
|
4215
|
+
const [isOpen, setIsOpen] = (0, import_react11.useState)(initial);
|
|
3876
4216
|
return {
|
|
3877
4217
|
isOpen,
|
|
3878
4218
|
open: () => setIsOpen(true),
|
|
@@ -3882,15 +4222,15 @@ function useDisclosure(initial = false) {
|
|
|
3882
4222
|
};
|
|
3883
4223
|
}
|
|
3884
4224
|
function usePagination(total, pageSize = 20) {
|
|
3885
|
-
const [page, setPage] = (0,
|
|
4225
|
+
const [page, setPage] = (0, import_react11.useState)(1);
|
|
3886
4226
|
const totalPages = Math.ceil(total / pageSize);
|
|
3887
4227
|
return { page, setPage, pageSize, total, totalPages };
|
|
3888
4228
|
}
|
|
3889
4229
|
|
|
3890
4230
|
// src/components/auth/AuthShell.tsx
|
|
3891
|
-
var
|
|
4231
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3892
4232
|
function AuthShell({ children, pattern = "dots", maxWidth = "520px" }) {
|
|
3893
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3894
4234
|
"div",
|
|
3895
4235
|
{
|
|
3896
4236
|
style: {
|
|
@@ -3905,7 +4245,7 @@ function AuthShell({ children, pattern = "dots", maxWidth = "520px" }) {
|
|
|
3905
4245
|
overflow: "hidden"
|
|
3906
4246
|
},
|
|
3907
4247
|
children: [
|
|
3908
|
-
pattern === "dots" && /* @__PURE__ */ (0,
|
|
4248
|
+
pattern === "dots" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3909
4249
|
"div",
|
|
3910
4250
|
{
|
|
3911
4251
|
"aria-hidden": true,
|
|
@@ -3919,7 +4259,7 @@ function AuthShell({ children, pattern = "dots", maxWidth = "520px" }) {
|
|
|
3919
4259
|
}
|
|
3920
4260
|
}
|
|
3921
4261
|
),
|
|
3922
|
-
pattern === "grid" && /* @__PURE__ */ (0,
|
|
4262
|
+
pattern === "grid" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3923
4263
|
"div",
|
|
3924
4264
|
{
|
|
3925
4265
|
"aria-hidden": true,
|
|
@@ -3933,16 +4273,16 @@ function AuthShell({ children, pattern = "dots", maxWidth = "520px" }) {
|
|
|
3933
4273
|
}
|
|
3934
4274
|
}
|
|
3935
4275
|
),
|
|
3936
|
-
/* @__PURE__ */ (0,
|
|
4276
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { position: "relative", zIndex: 1, width: "100%", maxWidth }, children })
|
|
3937
4277
|
]
|
|
3938
4278
|
}
|
|
3939
4279
|
);
|
|
3940
4280
|
}
|
|
3941
4281
|
|
|
3942
4282
|
// src/components/auth/AuthCard.tsx
|
|
3943
|
-
var
|
|
4283
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3944
4284
|
function AuthCard({ children, padding = "24px 28px" }) {
|
|
3945
|
-
return /* @__PURE__ */ (0,
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3946
4286
|
"div",
|
|
3947
4287
|
{
|
|
3948
4288
|
style: {
|
|
@@ -3959,10 +4299,10 @@ function AuthCard({ children, padding = "24px 28px" }) {
|
|
|
3959
4299
|
}
|
|
3960
4300
|
|
|
3961
4301
|
// src/components/auth/AuthLogo.tsx
|
|
3962
|
-
var
|
|
4302
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3963
4303
|
function AuthLogo({ appName = "Builify CMS", letter = "B", imageUrl, size = 36 }) {
|
|
3964
|
-
return /* @__PURE__ */ (0,
|
|
3965
|
-
imageUrl ? /* @__PURE__ */ (0,
|
|
4304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", gap: "10px", marginBottom: "28px" }, children: [
|
|
4305
|
+
imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3966
4306
|
"img",
|
|
3967
4307
|
{
|
|
3968
4308
|
src: imageUrl,
|
|
@@ -3971,7 +4311,7 @@ function AuthLogo({ appName = "Builify CMS", letter = "B", imageUrl, size = 36 }
|
|
|
3971
4311
|
height: size,
|
|
3972
4312
|
style: { borderRadius: "calc(var(--radius, 0.5rem) * 1.2)", flexShrink: 0, display: "block" }
|
|
3973
4313
|
}
|
|
3974
|
-
) : /* @__PURE__ */ (0,
|
|
4314
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3975
4315
|
"div",
|
|
3976
4316
|
{
|
|
3977
4317
|
style: {
|
|
@@ -3990,7 +4330,7 @@ function AuthLogo({ appName = "Builify CMS", letter = "B", imageUrl, size = 36 }
|
|
|
3990
4330
|
children: letter
|
|
3991
4331
|
}
|
|
3992
4332
|
),
|
|
3993
|
-
/* @__PURE__ */ (0,
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3994
4334
|
"span",
|
|
3995
4335
|
{
|
|
3996
4336
|
style: {
|
|
@@ -4006,10 +4346,10 @@ function AuthLogo({ appName = "Builify CMS", letter = "B", imageUrl, size = 36 }
|
|
|
4006
4346
|
}
|
|
4007
4347
|
|
|
4008
4348
|
// src/components/auth/AuthHeader.tsx
|
|
4009
|
-
var
|
|
4349
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
4010
4350
|
function AuthHeader({ title, description }) {
|
|
4011
|
-
return /* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { style: { marginBottom: "24px", textAlign: "center" }, children: [
|
|
4352
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
4013
4353
|
"h1",
|
|
4014
4354
|
{
|
|
4015
4355
|
style: {
|
|
@@ -4022,7 +4362,7 @@ function AuthHeader({ title, description }) {
|
|
|
4022
4362
|
children: title
|
|
4023
4363
|
}
|
|
4024
4364
|
),
|
|
4025
|
-
description && /* @__PURE__ */ (0,
|
|
4365
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
4026
4366
|
"p",
|
|
4027
4367
|
{
|
|
4028
4368
|
style: {
|
|
@@ -4038,12 +4378,12 @@ function AuthHeader({ title, description }) {
|
|
|
4038
4378
|
}
|
|
4039
4379
|
|
|
4040
4380
|
// src/components/auth/AuthField.tsx
|
|
4041
|
-
var
|
|
4381
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4042
4382
|
function AuthField({ label, error, hint, rightLabel, id, ...props }) {
|
|
4043
4383
|
const fieldId = id ?? label.toLowerCase().replace(/\s+/g, "-");
|
|
4044
|
-
return /* @__PURE__ */ (0,
|
|
4045
|
-
/* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: [
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4047
4387
|
"label",
|
|
4048
4388
|
{
|
|
4049
4389
|
htmlFor: fieldId,
|
|
@@ -4055,9 +4395,9 @@ function AuthField({ label, error, hint, rightLabel, id, ...props }) {
|
|
|
4055
4395
|
children: label
|
|
4056
4396
|
}
|
|
4057
4397
|
),
|
|
4058
|
-
rightLabel && /* @__PURE__ */ (0,
|
|
4398
|
+
rightLabel && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { style: { fontSize: "0.8125rem" }, children: rightLabel })
|
|
4059
4399
|
] }),
|
|
4060
|
-
/* @__PURE__ */ (0,
|
|
4400
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
4061
4401
|
"input",
|
|
4062
4402
|
{
|
|
4063
4403
|
id: fieldId,
|
|
@@ -4087,13 +4427,13 @@ function AuthField({ label, error, hint, rightLabel, id, ...props }) {
|
|
|
4087
4427
|
...props
|
|
4088
4428
|
}
|
|
4089
4429
|
),
|
|
4090
|
-
error && /* @__PURE__ */ (0,
|
|
4091
|
-
hint && !error && /* @__PURE__ */ (0,
|
|
4430
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { style: { fontSize: "0.8rem", color: "var(--destructive)", margin: 0 }, children: error }),
|
|
4431
|
+
hint && !error && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { style: { fontSize: "0.8rem", color: "var(--muted-foreground)", margin: 0 }, children: hint })
|
|
4092
4432
|
] });
|
|
4093
4433
|
}
|
|
4094
4434
|
|
|
4095
4435
|
// src/components/auth/AuthButton.tsx
|
|
4096
|
-
var
|
|
4436
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4097
4437
|
function AuthButton({
|
|
4098
4438
|
loading,
|
|
4099
4439
|
variant = "primary",
|
|
@@ -4136,7 +4476,7 @@ function AuthButton({
|
|
|
4136
4476
|
color: "var(--foreground)"
|
|
4137
4477
|
}
|
|
4138
4478
|
};
|
|
4139
|
-
return /* @__PURE__ */ (0,
|
|
4479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4140
4480
|
"button",
|
|
4141
4481
|
{
|
|
4142
4482
|
disabled: loading || disabled,
|
|
@@ -4148,8 +4488,8 @@ function AuthButton({
|
|
|
4148
4488
|
e.currentTarget.style.filter = "none";
|
|
4149
4489
|
},
|
|
4150
4490
|
...props,
|
|
4151
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
4152
|
-
/* @__PURE__ */ (0,
|
|
4491
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
4492
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4153
4493
|
"span",
|
|
4154
4494
|
{
|
|
4155
4495
|
style: {
|
|
@@ -4170,19 +4510,19 @@ function AuthButton({
|
|
|
4170
4510
|
}
|
|
4171
4511
|
|
|
4172
4512
|
// src/components/auth/AuthDivider.tsx
|
|
4173
|
-
var
|
|
4513
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4174
4514
|
function AuthDivider({ label = "or" }) {
|
|
4175
|
-
return /* @__PURE__ */ (0,
|
|
4176
|
-
/* @__PURE__ */ (0,
|
|
4177
|
-
/* @__PURE__ */ (0,
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px", margin: "20px 0" }, children: [
|
|
4516
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { style: { flex: 1, height: 1, background: "var(--border)" } }),
|
|
4517
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { style: { fontSize: "0.75rem", color: "var(--muted-foreground)", userSelect: "none" }, children: label }),
|
|
4518
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { style: { flex: 1, height: 1, background: "var(--border)" } })
|
|
4179
4519
|
] });
|
|
4180
4520
|
}
|
|
4181
4521
|
|
|
4182
4522
|
// src/components/auth/AuthFootnote.tsx
|
|
4183
|
-
var
|
|
4523
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4184
4524
|
function AuthFootnote({ text, linkText, linkHref }) {
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("p", { style: {
|
|
4186
4526
|
textAlign: "center",
|
|
4187
4527
|
marginTop: "20px",
|
|
4188
4528
|
fontSize: "0.8125rem",
|
|
@@ -4190,7 +4530,7 @@ function AuthFootnote({ text, linkText, linkHref }) {
|
|
|
4190
4530
|
}, children: [
|
|
4191
4531
|
text,
|
|
4192
4532
|
" ",
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4533
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4194
4534
|
"a",
|
|
4195
4535
|
{
|
|
4196
4536
|
href: linkHref,
|
|
@@ -4238,6 +4578,7 @@ var import_next_themes2 = require("next-themes");
|
|
|
4238
4578
|
ColorPickerHue,
|
|
4239
4579
|
ColorPickerOutput,
|
|
4240
4580
|
ColorPickerSelection,
|
|
4581
|
+
ColorSchemaPanel,
|
|
4241
4582
|
ConfirmDialog,
|
|
4242
4583
|
DEVICES,
|
|
4243
4584
|
DEVICE_ICONS,
|
|
@@ -4317,6 +4658,7 @@ var import_next_themes2 = require("next-themes");
|
|
|
4317
4658
|
TabsList,
|
|
4318
4659
|
TabsTrigger,
|
|
4319
4660
|
Textarea,
|
|
4661
|
+
ThemeBuilder,
|
|
4320
4662
|
ThemeProvider,
|
|
4321
4663
|
ThemeToggle,
|
|
4322
4664
|
TiptapEditor,
|
|
@@ -4325,6 +4667,7 @@ var import_next_themes2 = require("next-themes");
|
|
|
4325
4667
|
TooltipProvider,
|
|
4326
4668
|
TooltipTrigger,
|
|
4327
4669
|
TopBar,
|
|
4670
|
+
TypographyPanel,
|
|
4328
4671
|
UploadProgressPanel,
|
|
4329
4672
|
UploadZone,
|
|
4330
4673
|
badgeVariants,
|