canvas-ui-sdk 0.3.18 → 0.3.19
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.ts +25 -74
- package/dist/index.js +131 -408
- package/dist/index.js.map +1 -1
- package/mcp/dist/index.js +2 -32
- package/package.json +1 -4
- package/registry/blocks/content-dropzone.json +2 -2
- package/registry/blocks/filter-popover.json +1 -1
- package/registry/blocks/page-previews.json +4 -14
- package/registry/blocks/title-group.json +1 -1
- package/registry/hooks/use-css-variable-sync.json +1 -1
- package/registry/index.json +1 -16
- package/registry/layout/dashboard-shell.json +1 -1
- package/registry/layout/header.json +1 -1
- package/registry/ui/select.json +1 -1
- package/registry/blocks/canvas-item.json +0 -18
- package/registry/blocks/component-palette.json +0 -21
- package/registry/blocks/infinity-canvas.json +0 -58
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as React14 from 'react';
|
|
|
7
7
|
import React14__default, { createContext, useState, useContext, useEffect, useRef, Children, useMemo, useCallback, useLayoutEffect } from 'react';
|
|
8
8
|
import { Slot } from '@radix-ui/react-slot';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { Check, Calendar as Calendar$1, Upload, FileText, Trash2, ChevronLeft, ChevronRight, X, Search,
|
|
10
|
+
import { Check, Calendar as Calendar$1, Upload, FileText, Trash2, ChevronLeft, ChevronRight, X, Search, User, Key, CreditCard, Bell, Home, Users, MessageSquare, PieChart, ShoppingBag, Mail, Phone, MessageCircle, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, XIcon, CheckIcon, CircleIcon, ChevronUpIcon, PanelLeftIcon, Info, LayoutGrid, ShoppingCart, LogOut, Menu, ChevronDown, Filter, Wand2, Image, Paperclip, MoreHorizontal, PenSquare, Star as Star$1, Briefcase as Briefcase$1, MoreVertical, Minus, Plus, MapPin, Instagram, Linkedin, Twitter, Facebook, Globe as Globe$1, DollarSign, Video, BookOpen, Eye, CheckCircle, Zap, Camera as Camera$1, VideoOff, Mic, MicOff, Cast, Play, Pencil, ChevronUp, Sparkles, Copy, ArrowRight, GitBranch, FileBox, ExternalLink, Target as Target$1, AlertCircle, Quote, GripVertical, PanelRightClose, ArrowUp, Heart as Heart$1, Link2, FolderPlus, ThumbsUp, ChevronsRight, ChevronsLeft, RefreshCw, Send, Bookmark } from 'lucide-react';
|
|
11
11
|
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
12
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
13
13
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -22,10 +22,8 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
22
22
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
23
23
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
24
24
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
25
|
-
import { Flag, Target, Rocket, Trophy, Shield, Heart, Megaphone
|
|
25
|
+
import { Flag, Target, Rocket, Trophy, Shield, Heart, Megaphone, Phone as Phone$1, Envelope, ChatCircle, Drop, Fire, Moon, Sun, Tree, Leaf, Lightbulb, MusicNote, Camera, PencilSimple, Palette, ChartLine, Handshake, Storefront, Buildings, Briefcase, WifiHigh, Cloud, Globe, Database, Cpu, Terminal, Code, Infinity, Sparkle, Lightning, Star, Hexagon, Diamond, ArrowUpRight, ArrowDownRight, MagnifyingGlass, MapPin as MapPin$1, Calendar as Calendar$2, Users as Users$1, ArrowRight as ArrowRight$1, CaretLeft, CaretRight, Check as Check$1, FacebookLogo, TwitterLogo, LinkedinLogo, InstagramLogo, XLogo, Info as Info$1, CaretUp, CaretDown, DotsThreeVertical, Gear, Mountains, ShieldCheck, Coffee, Coins, CurrencyDollar, Smiley, Image as Image$1, Clock, Bed, CreditCard as CreditCard$1, UserFocus, UsersFour, Eye as Eye$1, Books } from '@phosphor-icons/react';
|
|
26
26
|
import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
|
|
27
|
-
import { useDraggable } from '@dnd-kit/core';
|
|
28
|
-
import { CSS } from '@dnd-kit/utilities';
|
|
29
27
|
import { Chart, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip as Tooltip$1, Legend, Filler, ArcElement } from 'chart.js';
|
|
30
28
|
import { Line, Doughnut } from 'react-chartjs-2';
|
|
31
29
|
import { startOfMonth, addMonths, isBefore, subMonths, format, endOfMonth, startOfWeek, endOfWeek, addDays, isSameMonth, isSameDay, isWithinInterval } from 'date-fns';
|
|
@@ -1979,7 +1977,7 @@ function SelectItem({
|
|
|
1979
1977
|
{
|
|
1980
1978
|
"data-slot": "select-item",
|
|
1981
1979
|
className: cn(
|
|
1982
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 font-[family-name:var(--typo-global-font)]",
|
|
1980
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=checked]:text-[var(--canvas-primary)] [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 font-[family-name:var(--typo-global-font)]",
|
|
1983
1981
|
className
|
|
1984
1982
|
),
|
|
1985
1983
|
...props,
|
|
@@ -3563,11 +3561,15 @@ function ThemeProvider({
|
|
|
3563
3561
|
}) {
|
|
3564
3562
|
const [previewBranding, setPreviewBranding] = useState(null);
|
|
3565
3563
|
const [previewImages, setPreviewImages] = useState(null);
|
|
3564
|
+
const [isMounted, setIsMounted] = useState(false);
|
|
3565
|
+
useEffect(() => {
|
|
3566
|
+
setIsMounted(true);
|
|
3567
|
+
}, []);
|
|
3566
3568
|
const contextValue = {
|
|
3567
3569
|
images,
|
|
3568
3570
|
branding,
|
|
3569
3571
|
brandAssets,
|
|
3570
|
-
isMounted
|
|
3572
|
+
isMounted
|
|
3571
3573
|
};
|
|
3572
3574
|
const previewBrandingValue = {
|
|
3573
3575
|
previewBranding,
|
|
@@ -3660,7 +3662,7 @@ var iconShapes = {
|
|
|
3660
3662
|
var iconMap = {
|
|
3661
3663
|
Diamond,
|
|
3662
3664
|
Hexagon,
|
|
3663
|
-
Star
|
|
3665
|
+
Star,
|
|
3664
3666
|
Lightning,
|
|
3665
3667
|
Sparkle,
|
|
3666
3668
|
Infinity,
|
|
@@ -3690,7 +3692,7 @@ var iconMap = {
|
|
|
3690
3692
|
ChatCircle,
|
|
3691
3693
|
Envelope,
|
|
3692
3694
|
Phone: Phone$1,
|
|
3693
|
-
Megaphone
|
|
3695
|
+
Megaphone,
|
|
3694
3696
|
Heart,
|
|
3695
3697
|
Shield,
|
|
3696
3698
|
Trophy,
|
|
@@ -3864,6 +3866,7 @@ function Header({
|
|
|
3864
3866
|
/* @__PURE__ */ jsx(
|
|
3865
3867
|
Button,
|
|
3866
3868
|
{
|
|
3869
|
+
variant: "primary",
|
|
3867
3870
|
className: "w-full",
|
|
3868
3871
|
size: "default",
|
|
3869
3872
|
onClick: onCheckout,
|
|
@@ -4220,7 +4223,7 @@ function Header({
|
|
|
4220
4223
|
/* @__PURE__ */ jsx(
|
|
4221
4224
|
Button,
|
|
4222
4225
|
{
|
|
4223
|
-
variant: "outline",
|
|
4226
|
+
variant: "primary-outline",
|
|
4224
4227
|
size: "default",
|
|
4225
4228
|
onClick: onLogin,
|
|
4226
4229
|
children: "Log in"
|
|
@@ -4229,7 +4232,7 @@ function Header({
|
|
|
4229
4232
|
/* @__PURE__ */ jsx(
|
|
4230
4233
|
Button,
|
|
4231
4234
|
{
|
|
4232
|
-
variant: "
|
|
4235
|
+
variant: "primary",
|
|
4233
4236
|
size: "default",
|
|
4234
4237
|
onClick: onSignUp,
|
|
4235
4238
|
children: "Sign up"
|
|
@@ -4362,7 +4365,7 @@ function Header({
|
|
|
4362
4365
|
/* @__PURE__ */ jsx(
|
|
4363
4366
|
Button,
|
|
4364
4367
|
{
|
|
4365
|
-
variant: "outline",
|
|
4368
|
+
variant: "primary-outline",
|
|
4366
4369
|
className: "w-full",
|
|
4367
4370
|
size: "lg",
|
|
4368
4371
|
onClick: () => {
|
|
@@ -4375,7 +4378,7 @@ function Header({
|
|
|
4375
4378
|
/* @__PURE__ */ jsx(
|
|
4376
4379
|
Button,
|
|
4377
4380
|
{
|
|
4378
|
-
variant: "
|
|
4381
|
+
variant: "primary",
|
|
4379
4382
|
className: "w-full",
|
|
4380
4383
|
size: "lg",
|
|
4381
4384
|
onClick: () => {
|
|
@@ -4557,7 +4560,7 @@ var iconShapes2 = [
|
|
|
4557
4560
|
var iconMap2 = {
|
|
4558
4561
|
Diamond: Diamond,
|
|
4559
4562
|
Hexagon: Hexagon,
|
|
4560
|
-
Star: Star
|
|
4563
|
+
Star: Star,
|
|
4561
4564
|
Lightning: Lightning,
|
|
4562
4565
|
Sparkle: Sparkle,
|
|
4563
4566
|
Infinity: Infinity,
|
|
@@ -4587,7 +4590,7 @@ var iconMap2 = {
|
|
|
4587
4590
|
ChatCircle: ChatCircle,
|
|
4588
4591
|
Envelope: Envelope,
|
|
4589
4592
|
Phone: Phone$1,
|
|
4590
|
-
Megaphone: Megaphone
|
|
4593
|
+
Megaphone: Megaphone,
|
|
4591
4594
|
Heart: Heart,
|
|
4592
4595
|
Shield: Shield,
|
|
4593
4596
|
Trophy: Trophy,
|
|
@@ -4702,7 +4705,31 @@ function broadcastCSSVariables(variables) {
|
|
|
4702
4705
|
}
|
|
4703
4706
|
});
|
|
4704
4707
|
}
|
|
4705
|
-
function
|
|
4708
|
+
function broadcastBranding(branding) {
|
|
4709
|
+
const iframes = document.querySelectorAll("iframe");
|
|
4710
|
+
iframes.forEach((iframe) => {
|
|
4711
|
+
try {
|
|
4712
|
+
iframe.contentWindow?.postMessage(
|
|
4713
|
+
{ type: "branding-update", branding },
|
|
4714
|
+
"*"
|
|
4715
|
+
);
|
|
4716
|
+
} catch {
|
|
4717
|
+
}
|
|
4718
|
+
});
|
|
4719
|
+
}
|
|
4720
|
+
function broadcastImages(images) {
|
|
4721
|
+
const iframes = document.querySelectorAll("iframe");
|
|
4722
|
+
iframes.forEach((iframe) => {
|
|
4723
|
+
try {
|
|
4724
|
+
iframe.contentWindow?.postMessage(
|
|
4725
|
+
{ type: "images-update", images },
|
|
4726
|
+
"*"
|
|
4727
|
+
);
|
|
4728
|
+
} catch {
|
|
4729
|
+
}
|
|
4730
|
+
});
|
|
4731
|
+
}
|
|
4732
|
+
function setupCSSVariableListener(options) {
|
|
4706
4733
|
if (typeof window === "undefined") return () => {
|
|
4707
4734
|
};
|
|
4708
4735
|
const handler = (event) => {
|
|
@@ -4716,15 +4743,21 @@ function setupCSSVariableListener() {
|
|
|
4716
4743
|
document.documentElement.style.removeProperty(name);
|
|
4717
4744
|
});
|
|
4718
4745
|
}
|
|
4746
|
+
if (event.data?.type === "branding-update") {
|
|
4747
|
+
options?.onBrandingUpdate?.(event.data.branding);
|
|
4748
|
+
}
|
|
4749
|
+
if (event.data?.type === "images-update") {
|
|
4750
|
+
options?.onImagesUpdate?.(event.data.images);
|
|
4751
|
+
}
|
|
4719
4752
|
};
|
|
4720
4753
|
window.addEventListener("message", handler);
|
|
4721
4754
|
return () => window.removeEventListener("message", handler);
|
|
4722
4755
|
}
|
|
4723
4756
|
|
|
4724
4757
|
// src/hooks/use-css-variable-sync.ts
|
|
4725
|
-
function useCSSVariableSync() {
|
|
4758
|
+
function useCSSVariableSync(options) {
|
|
4726
4759
|
useEffect(() => {
|
|
4727
|
-
const cleanup = setupCSSVariableListener();
|
|
4760
|
+
const cleanup = setupCSSVariableListener(options);
|
|
4728
4761
|
return cleanup;
|
|
4729
4762
|
}, []);
|
|
4730
4763
|
}
|
|
@@ -4746,7 +4779,7 @@ function DashboardShell({
|
|
|
4746
4779
|
onAppMenuClick?.();
|
|
4747
4780
|
console.log("App menu clicked - implement app-level mobile menu here");
|
|
4748
4781
|
};
|
|
4749
|
-
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-[var(--canvas-background)]", children: [
|
|
4782
|
+
return /* @__PURE__ */ jsxs("div", { className: "min-h-screen min-w-0 bg-[var(--canvas-background)]", children: [
|
|
4750
4783
|
/* @__PURE__ */ jsx("div", { className: "fixed top-0 left-0 right-0 lg:left-[var(--sidebar-width)] z-40", children: /* @__PURE__ */ jsx(Header, { onMenuClick: handleAppMenuClick }) }),
|
|
4751
4784
|
/* @__PURE__ */ jsx("div", { className: "hidden lg:block fixed top-0 left-0 bottom-0 z-50 w-[var(--sidebar-width)]", children: /* @__PURE__ */ jsx(
|
|
4752
4785
|
Sidebar2,
|
|
@@ -4792,7 +4825,8 @@ function DashboardShell({
|
|
|
4792
4825
|
className: cn(
|
|
4793
4826
|
"pt-[var(--header-height)]",
|
|
4794
4827
|
"lg:pl-[var(--sidebar-width)]",
|
|
4795
|
-
"min-h-screen"
|
|
4828
|
+
"min-h-screen",
|
|
4829
|
+
"overflow-x-hidden"
|
|
4796
4830
|
),
|
|
4797
4831
|
children: /* @__PURE__ */ jsxs(
|
|
4798
4832
|
"div",
|
|
@@ -4830,7 +4864,7 @@ var iconShapes3 = [
|
|
|
4830
4864
|
var iconMap3 = {
|
|
4831
4865
|
Diamond: Diamond,
|
|
4832
4866
|
Hexagon: Hexagon,
|
|
4833
|
-
Star: Star
|
|
4867
|
+
Star: Star,
|
|
4834
4868
|
Lightning: Lightning,
|
|
4835
4869
|
Sparkle: Sparkle,
|
|
4836
4870
|
Infinity: Infinity,
|
|
@@ -4860,7 +4894,7 @@ var iconMap3 = {
|
|
|
4860
4894
|
ChatCircle: ChatCircle,
|
|
4861
4895
|
Envelope: Envelope,
|
|
4862
4896
|
Phone: Phone$1,
|
|
4863
|
-
Megaphone: Megaphone
|
|
4897
|
+
Megaphone: Megaphone,
|
|
4864
4898
|
Heart: Heart,
|
|
4865
4899
|
Shield: Shield,
|
|
4866
4900
|
Trophy: Trophy,
|
|
@@ -5088,7 +5122,7 @@ var iconShapes4 = [
|
|
|
5088
5122
|
var iconMap4 = {
|
|
5089
5123
|
Diamond: Diamond,
|
|
5090
5124
|
Hexagon: Hexagon,
|
|
5091
|
-
Star: Star
|
|
5125
|
+
Star: Star,
|
|
5092
5126
|
Lightning: Lightning,
|
|
5093
5127
|
Sparkle: Sparkle,
|
|
5094
5128
|
Infinity: Infinity,
|
|
@@ -5118,7 +5152,7 @@ var iconMap4 = {
|
|
|
5118
5152
|
ChatCircle: ChatCircle,
|
|
5119
5153
|
Envelope: Envelope,
|
|
5120
5154
|
Phone: Phone$1,
|
|
5121
|
-
Megaphone: Megaphone
|
|
5155
|
+
Megaphone: Megaphone,
|
|
5122
5156
|
Heart: Heart,
|
|
5123
5157
|
Shield: Shield,
|
|
5124
5158
|
Trophy: Trophy,
|
|
@@ -5870,9 +5904,16 @@ var defaultDateRange = {
|
|
|
5870
5904
|
startPlaceholder: "Start date",
|
|
5871
5905
|
endPlaceholder: "End date"
|
|
5872
5906
|
};
|
|
5907
|
+
var filterLabelStyle = {
|
|
5908
|
+
fontFamily: "var(--typo-input-label-font)",
|
|
5909
|
+
fontSize: "var(--typo-input-label-sm-size, 12px)",
|
|
5910
|
+
fontWeight: "var(--typo-input-label-weight)",
|
|
5911
|
+
letterSpacing: "var(--typo-input-label-spacing)",
|
|
5912
|
+
lineHeight: "var(--typo-input-label-line-height)"
|
|
5913
|
+
};
|
|
5873
5914
|
function FilterDropdown({ config, value, onChange }) {
|
|
5874
5915
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5875
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
5916
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: config.label }),
|
|
5876
5917
|
/* @__PURE__ */ jsxs(Select, { value: value || void 0, onValueChange: onChange, children: [
|
|
5877
5918
|
/* @__PURE__ */ jsx(SelectTrigger, { inputSize: "sm", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: config.placeholder }) }),
|
|
5878
5919
|
/* @__PURE__ */ jsx(SelectContent, { position: "popper", side: "bottom", sideOffset: 4, children: config.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.id, children: option.label }, option.id)) })
|
|
@@ -5947,7 +5988,7 @@ function FilterPopover({
|
|
|
5947
5988
|
"button",
|
|
5948
5989
|
{
|
|
5949
5990
|
className: cn(
|
|
5950
|
-
"cursor-pointer flex items-center justify-between gap-2 bg-[var(--canvas-background)] border text-[var(--canvas-text)] whitespace-nowrap transition-colors outline-none focus:border-[var(--canvas-border-input-focus)] focus:ring-2 focus:ring-[var(--canvas-border-input-focus)]
|
|
5991
|
+
"cursor-pointer flex items-center justify-between gap-2 bg-[var(--canvas-background)] border text-[var(--canvas-text)] whitespace-nowrap transition-colors outline-none focus:border-[var(--canvas-border-input-focus)] focus:ring-2 focus:ring-[var(--canvas-border-input-focus)] data-[state=open]:border-[var(--canvas-border-input-focus)]",
|
|
5951
5992
|
className
|
|
5952
5993
|
),
|
|
5953
5994
|
style: {
|
|
@@ -5981,11 +6022,11 @@ function FilterPopover({
|
|
|
5981
6022
|
children: [
|
|
5982
6023
|
/* @__PURE__ */ jsxs("div", { className: "p-4 space-y-5 max-h-[480px] overflow-y-auto", children: [
|
|
5983
6024
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5984
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6025
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Text Input" }),
|
|
5985
6026
|
/* @__PURE__ */ jsx(TextInput, { inputSize: "sm", placeholder: "Enter text..." })
|
|
5986
6027
|
] }),
|
|
5987
6028
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
5988
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6029
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Searchbox" }),
|
|
5989
6030
|
/* @__PURE__ */ jsx(Searchbox, { inputSize: "sm", placeholder: "Search..." })
|
|
5990
6031
|
] }),
|
|
5991
6032
|
dropdowns.slice(0, 1).map((dropdown) => /* @__PURE__ */ jsx(
|
|
@@ -5998,11 +6039,11 @@ function FilterPopover({
|
|
|
5998
6039
|
dropdown.id
|
|
5999
6040
|
)),
|
|
6000
6041
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6001
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6042
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Date Input" }),
|
|
6002
6043
|
/* @__PURE__ */ jsx(DateInput, { inputSize: "sm" })
|
|
6003
6044
|
] }),
|
|
6004
6045
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6005
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6046
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Radio Buttons" }),
|
|
6006
6047
|
/* @__PURE__ */ jsxs(RadioGroup2, { defaultValue: "option1", className: "flex", children: [
|
|
6007
6048
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6008
6049
|
/* @__PURE__ */ jsx(RadioGroupItem, { value: "option1", id: "radio1" }),
|
|
@@ -6031,7 +6072,7 @@ function FilterPopover({
|
|
|
6031
6072
|
] })
|
|
6032
6073
|
] }),
|
|
6033
6074
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6034
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6075
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Radio Buttons List" }),
|
|
6035
6076
|
/* @__PURE__ */ jsxs(RadioGroup2, { defaultValue: "list-opt1", className: "flex flex-col gap-2", children: [
|
|
6036
6077
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6037
6078
|
/* @__PURE__ */ jsx(RadioGroupItem, { value: "list-opt1", id: "radio-list-1" }),
|
|
@@ -6072,7 +6113,7 @@ function FilterPopover({
|
|
|
6072
6113
|
] })
|
|
6073
6114
|
] }),
|
|
6074
6115
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6075
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6116
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Checkbox" }),
|
|
6076
6117
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6077
6118
|
/* @__PURE__ */ jsx(Checkbox, { id: "single-checkbox" }),
|
|
6078
6119
|
/* @__PURE__ */ jsx(
|
|
@@ -6087,7 +6128,7 @@ function FilterPopover({
|
|
|
6087
6128
|
] })
|
|
6088
6129
|
] }),
|
|
6089
6130
|
checkboxGroup && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6090
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6131
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Checkbox List" }),
|
|
6091
6132
|
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: checkboxGroup.options.map((option) => /* @__PURE__ */ jsx(
|
|
6092
6133
|
CheckboxWithLabel,
|
|
6093
6134
|
{
|
|
@@ -6099,7 +6140,7 @@ function FilterPopover({
|
|
|
6099
6140
|
)) })
|
|
6100
6141
|
] }),
|
|
6101
6142
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6102
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6143
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Toggle" }),
|
|
6103
6144
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6104
6145
|
/* @__PURE__ */ jsx(Switch, { id: "toggle-switch" }),
|
|
6105
6146
|
/* @__PURE__ */ jsx(
|
|
@@ -6114,7 +6155,7 @@ function FilterPopover({
|
|
|
6114
6155
|
] })
|
|
6115
6156
|
] }),
|
|
6116
6157
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
6117
|
-
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style:
|
|
6158
|
+
/* @__PURE__ */ jsx("label", { className: "text-[var(--canvas-text-muted)]", style: filterLabelStyle, children: "Multiselect Tags" }),
|
|
6118
6159
|
/* @__PURE__ */ jsx(MultiselectTags, { inputSize: "sm", tags: ["Tag 1", "Tag 2"], placeholder: "Add..." })
|
|
6119
6160
|
] })
|
|
6120
6161
|
] }),
|
|
@@ -6965,7 +7006,7 @@ var iconShapes5 = [
|
|
|
6965
7006
|
var iconMap5 = {
|
|
6966
7007
|
Diamond: Diamond,
|
|
6967
7008
|
Hexagon: Hexagon,
|
|
6968
|
-
Star: Star
|
|
7009
|
+
Star: Star,
|
|
6969
7010
|
Lightning: Lightning,
|
|
6970
7011
|
Sparkle: Sparkle,
|
|
6971
7012
|
Infinity: Infinity,
|
|
@@ -6995,7 +7036,7 @@ var iconMap5 = {
|
|
|
6995
7036
|
ChatCircle: ChatCircle,
|
|
6996
7037
|
Envelope: Envelope,
|
|
6997
7038
|
Phone: Phone$1,
|
|
6998
|
-
Megaphone: Megaphone
|
|
7039
|
+
Megaphone: Megaphone,
|
|
6999
7040
|
Heart: Heart,
|
|
7000
7041
|
Shield: Shield,
|
|
7001
7042
|
Trophy: Trophy,
|
|
@@ -7968,7 +8009,7 @@ function ContentDropzone({
|
|
|
7968
8009
|
"div",
|
|
7969
8010
|
{
|
|
7970
8011
|
className: cn(
|
|
7971
|
-
"flex flex-col gap-
|
|
8012
|
+
"flex flex-col gap-[var(--spacing-4xl)]",
|
|
7972
8013
|
className
|
|
7973
8014
|
),
|
|
7974
8015
|
children
|
|
@@ -8287,7 +8328,7 @@ function MenuSection({
|
|
|
8287
8328
|
}
|
|
8288
8329
|
var tabIcons = {
|
|
8289
8330
|
briefcase: Briefcase$1,
|
|
8290
|
-
star: Star,
|
|
8331
|
+
star: Star$1,
|
|
8291
8332
|
user: User
|
|
8292
8333
|
};
|
|
8293
8334
|
function PillTabs({
|
|
@@ -8423,10 +8464,7 @@ function TitleGroup({
|
|
|
8423
8464
|
paddingLeft: "var(--btn-small-px)",
|
|
8424
8465
|
paddingRight: "var(--btn-small-px)",
|
|
8425
8466
|
fontSize: "var(--btn-small-font-size)",
|
|
8426
|
-
borderRadius: "var(--btn-small-radius)"
|
|
8427
|
-
backgroundColor: "var(--btn-primary-bg)",
|
|
8428
|
-
color: "var(--btn-primary-text)",
|
|
8429
|
-
borderColor: "var(--btn-primary-border)"
|
|
8467
|
+
borderRadius: "var(--btn-small-radius)"
|
|
8430
8468
|
},
|
|
8431
8469
|
children: actionButtonText
|
|
8432
8470
|
}
|
|
@@ -11108,7 +11146,7 @@ function ProfileCard({
|
|
|
11108
11146
|
/* @__PURE__ */ jsx(Typography, { variant: "body-s", color: "muted", className: "text-center", children: username })
|
|
11109
11147
|
] }),
|
|
11110
11148
|
rating > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 mt-3", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx(
|
|
11111
|
-
Star,
|
|
11149
|
+
Star$1,
|
|
11112
11150
|
{
|
|
11113
11151
|
className: cn(
|
|
11114
11152
|
"size-4",
|
|
@@ -11208,7 +11246,7 @@ function SidebarProfileCard({
|
|
|
11208
11246
|
] })
|
|
11209
11247
|
] }),
|
|
11210
11248
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 justify-center", children: [
|
|
11211
|
-
/* @__PURE__ */ jsx(Star, { className: "size-4 fill-[var(--canvas-primary)] text-[var(--canvas-primary)]" }),
|
|
11249
|
+
/* @__PURE__ */ jsx(Star$1, { className: "size-4 fill-[var(--canvas-primary)] text-[var(--canvas-primary)]" }),
|
|
11212
11250
|
/* @__PURE__ */ jsx(Typography, { variant: "body-xs", className: "font-semibold", children: rating }),
|
|
11213
11251
|
/* @__PURE__ */ jsx(Typography, { variant: "body-xs", color: "muted", children: reviewCount })
|
|
11214
11252
|
] }),
|
|
@@ -11378,7 +11416,7 @@ function SkillsCard({
|
|
|
11378
11416
|
}
|
|
11379
11417
|
var badgeIcons = {
|
|
11380
11418
|
zap: Zap,
|
|
11381
|
-
star: Star,
|
|
11419
|
+
star: Star$1,
|
|
11382
11420
|
check: CheckCircle
|
|
11383
11421
|
};
|
|
11384
11422
|
var badgeColors = {
|
|
@@ -11821,7 +11859,7 @@ function StarRating2({ rating, reviewCount }) {
|
|
|
11821
11859
|
style: { gap: "var(--spacing-xxs, 2px)" },
|
|
11822
11860
|
children: [
|
|
11823
11861
|
[1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
|
|
11824
|
-
Star,
|
|
11862
|
+
Star$1,
|
|
11825
11863
|
{
|
|
11826
11864
|
className: "size-5",
|
|
11827
11865
|
fill: star <= rating ? "var(--canvas-primary)" : "var(--canvas-border)",
|
|
@@ -14481,327 +14519,6 @@ function CreditCardDisplay({
|
|
|
14481
14519
|
}
|
|
14482
14520
|
);
|
|
14483
14521
|
}
|
|
14484
|
-
function CanvasItem({
|
|
14485
|
-
item,
|
|
14486
|
-
isSelected,
|
|
14487
|
-
onSelect,
|
|
14488
|
-
onDelete,
|
|
14489
|
-
onDragStart,
|
|
14490
|
-
scale,
|
|
14491
|
-
children
|
|
14492
|
-
}) {
|
|
14493
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
14494
|
-
const handleDragHandleMouseDown = (e) => {
|
|
14495
|
-
e.preventDefault();
|
|
14496
|
-
e.stopPropagation();
|
|
14497
|
-
setIsDragging(true);
|
|
14498
|
-
onSelect(item.id);
|
|
14499
|
-
onDragStart(item.id, e.clientX, e.clientY, item.x, item.y);
|
|
14500
|
-
};
|
|
14501
|
-
const handleClick = (e) => {
|
|
14502
|
-
e.stopPropagation();
|
|
14503
|
-
onSelect(item.id);
|
|
14504
|
-
};
|
|
14505
|
-
const handleDelete = (e) => {
|
|
14506
|
-
e.stopPropagation();
|
|
14507
|
-
onDelete(item.id);
|
|
14508
|
-
};
|
|
14509
|
-
return /* @__PURE__ */ jsxs(
|
|
14510
|
-
"div",
|
|
14511
|
-
{
|
|
14512
|
-
className: cn(
|
|
14513
|
-
"absolute group",
|
|
14514
|
-
"transition-shadow duration-150",
|
|
14515
|
-
isSelected && "ring-2 ring-[var(--canvas-primary)] ring-offset-2",
|
|
14516
|
-
isDragging && "opacity-90 shadow-2xl z-50"
|
|
14517
|
-
),
|
|
14518
|
-
style: {
|
|
14519
|
-
left: item.x,
|
|
14520
|
-
top: item.y
|
|
14521
|
-
},
|
|
14522
|
-
onClick: handleClick,
|
|
14523
|
-
children: [
|
|
14524
|
-
/* @__PURE__ */ jsxs(
|
|
14525
|
-
"div",
|
|
14526
|
-
{
|
|
14527
|
-
className: cn(
|
|
14528
|
-
"absolute -top-9 left-0 right-0 flex items-center justify-between px-2 py-1.5",
|
|
14529
|
-
"bg-[var(--canvas-text)] rounded-t-md",
|
|
14530
|
-
"opacity-0 group-hover:opacity-100 transition-opacity",
|
|
14531
|
-
isSelected && "opacity-100"
|
|
14532
|
-
),
|
|
14533
|
-
children: [
|
|
14534
|
-
/* @__PURE__ */ jsxs(
|
|
14535
|
-
"div",
|
|
14536
|
-
{
|
|
14537
|
-
onMouseDown: handleDragHandleMouseDown,
|
|
14538
|
-
className: "flex items-center gap-1.5 text-white/90 cursor-grab active:cursor-grabbing select-none",
|
|
14539
|
-
style: { fontSize: "var(--typo-body-xs-size)" },
|
|
14540
|
-
children: [
|
|
14541
|
-
/* @__PURE__ */ jsx(GripHorizontal, { className: "size-4" }),
|
|
14542
|
-
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium", children: item.componentType })
|
|
14543
|
-
]
|
|
14544
|
-
}
|
|
14545
|
-
),
|
|
14546
|
-
/* @__PURE__ */ jsx(
|
|
14547
|
-
"button",
|
|
14548
|
-
{
|
|
14549
|
-
onClick: handleDelete,
|
|
14550
|
-
className: "p-1 rounded hover:bg-white/20 text-white/80 hover:text-white transition-colors",
|
|
14551
|
-
"aria-label": "Delete component",
|
|
14552
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
14553
|
-
}
|
|
14554
|
-
)
|
|
14555
|
-
]
|
|
14556
|
-
}
|
|
14557
|
-
),
|
|
14558
|
-
/* @__PURE__ */ jsx("div", { className: "pointer-events-none", children })
|
|
14559
|
-
]
|
|
14560
|
-
}
|
|
14561
|
-
);
|
|
14562
|
-
}
|
|
14563
|
-
var paletteComponents = [
|
|
14564
|
-
// =====================
|
|
14565
|
-
// PAGE TEMPLATES
|
|
14566
|
-
// =====================
|
|
14567
|
-
{ id: "page-about", type: "PageAbout", label: "About", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14568
|
-
{ id: "page-account", type: "PageAccount", label: "Account Settings", icon: /* @__PURE__ */ jsx(Settings, { className: "size-4" }), category: "Page Templates" },
|
|
14569
|
-
{ id: "page-admin-portal", type: "PageAdminPortal", label: "Admin Portal", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14570
|
-
{ id: "page-centered-profile", type: "PageCenteredProfile", label: "Centered Profile", icon: /* @__PURE__ */ jsx(User, { className: "size-4" }), category: "Page Templates" },
|
|
14571
|
-
{ id: "page-double-sidebar", type: "PageDoubleSidebar", label: "Double Sidebar", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14572
|
-
{ id: "page-icon-sidebar", type: "PageIconSidebar", label: "Icon Sidebar", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14573
|
-
{ id: "page-login", type: "PageLogin", label: "Login / Signup", icon: /* @__PURE__ */ jsx(LogIn, { className: "size-4" }), category: "Page Templates" },
|
|
14574
|
-
{ id: "page-menu-sections", type: "PageMenuSections", label: "Menu Sections", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Page Templates" },
|
|
14575
|
-
{ id: "page-messenger", type: "PageMessenger", label: "Messenger", icon: /* @__PURE__ */ jsx(MessageSquare, { className: "size-4" }), category: "Page Templates" },
|
|
14576
|
-
{ id: "page-mobile-menu", type: "PageMobileMenu", label: "Mobile Menu", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14577
|
-
{ id: "page-multistep-progressbar", type: "PageMultistepProgressbar", label: "Multistep + Progress", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Page Templates" },
|
|
14578
|
-
{ id: "page-multistep-sidebar", type: "PageMultistepSidebar", label: "Multistep + Sidebar", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Page Templates" },
|
|
14579
|
-
{ id: "page-pricing", type: "PagePricing", label: "Pricing", icon: /* @__PURE__ */ jsx(CreditCard, { className: "size-4" }), category: "Page Templates" },
|
|
14580
|
-
{ id: "page-product-homepage", type: "PageProductHomepage", label: "Product Homepage", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14581
|
-
{ id: "page-reset-password", type: "PageResetPassword", label: "Reset Password", icon: /* @__PURE__ */ jsx(LogIn, { className: "size-4" }), category: "Page Templates" },
|
|
14582
|
-
{ id: "page-search-bar", type: "PageSearchBar", label: "Search Bar", icon: /* @__PURE__ */ jsx(Search, { className: "size-4" }), category: "Page Templates" },
|
|
14583
|
-
{ id: "page-sidebar-profile", type: "PageSidebarProfile", label: "Sidebar Profile", icon: /* @__PURE__ */ jsx(User, { className: "size-4" }), category: "Page Templates" },
|
|
14584
|
-
{ id: "page-standard", type: "PageStandard", label: "Standard Page", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Page Templates" },
|
|
14585
|
-
{ id: "page-standard-multistep", type: "PageStandardMultistep", label: "Standard Multistep", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Page Templates" },
|
|
14586
|
-
{ id: "page-standard-search", type: "PageStandardSearch", label: "Standard Search", icon: /* @__PURE__ */ jsx(Search, { className: "size-4" }), category: "Page Templates" },
|
|
14587
|
-
{ id: "page-vertical-multistep", type: "PageVerticalMultistep", label: "Vertical Multistep", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Page Templates" },
|
|
14588
|
-
{ id: "page-video-chat", type: "PageVideoChat", label: "Video Chat", icon: /* @__PURE__ */ jsx(Video, { className: "size-4" }), category: "Page Templates" },
|
|
14589
|
-
{ id: "page-video-list", type: "PageVideoList", label: "Video List", icon: /* @__PURE__ */ jsx(Play, { className: "size-4" }), category: "Page Templates" },
|
|
14590
|
-
// =====================
|
|
14591
|
-
// BLOCKS
|
|
14592
|
-
// =====================
|
|
14593
|
-
// Data & Tables
|
|
14594
|
-
{ id: "standard-data-table", type: "StandardDataTable", label: "Data Table", icon: /* @__PURE__ */ jsx(Table, { className: "size-4" }), category: "Blocks" },
|
|
14595
|
-
// Cards & Profiles
|
|
14596
|
-
{ id: "profile-card", type: "ProfileCard", label: "Profile Card", icon: /* @__PURE__ */ jsx(User, { className: "size-4" }), category: "Blocks" },
|
|
14597
|
-
{ id: "sidebar-profile-card", type: "SidebarProfileCard", label: "Sidebar Profile Card", icon: /* @__PURE__ */ jsx(User, { className: "size-4" }), category: "Blocks" },
|
|
14598
|
-
{ id: "profile-info-cards", type: "ProfileInfoCards", label: "Profile Info Cards", icon: /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" }), category: "Blocks" },
|
|
14599
|
-
{ id: "sidebar-cards", type: "SidebarCards", label: "Sidebar Cards", icon: /* @__PURE__ */ jsx(Layers, { className: "size-4" }), category: "Blocks" },
|
|
14600
|
-
{ id: "credit-card-display", type: "CreditCardDisplay", label: "Credit Card Display", icon: /* @__PURE__ */ jsx(CreditCard, { className: "size-4" }), category: "Blocks" },
|
|
14601
|
-
// Navigation & Progress
|
|
14602
|
-
{ id: "step-tracker", type: "StepTracker", label: "Step Tracker", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Blocks" },
|
|
14603
|
-
{ id: "vertical-step-tracker", type: "VerticalStepTracker", label: "Vertical Step Tracker", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Blocks" },
|
|
14604
|
-
{ id: "progress-bar", type: "ProgressBar", label: "Progress Bar", icon: /* @__PURE__ */ jsx(SlidersHorizontal, { className: "size-4" }), category: "Blocks" },
|
|
14605
|
-
{ id: "pill-tabs", type: "PillTabs", label: "Pill Tabs", icon: /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" }), category: "Blocks" },
|
|
14606
|
-
{ id: "mobile-bottom-nav", type: "MobileBottomNav", label: "Mobile Bottom Nav", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Blocks" },
|
|
14607
|
-
// Banners & Headers
|
|
14608
|
-
{ id: "flair-banner", type: "FlairBanner", label: "Flair Banner", icon: /* @__PURE__ */ jsx(Type, { className: "size-4" }), category: "Blocks" },
|
|
14609
|
-
{ id: "gradient-banner", type: "GradientBanner", label: "Gradient Banner", icon: /* @__PURE__ */ jsx(Type, { className: "size-4" }), category: "Blocks" },
|
|
14610
|
-
{ id: "page-header-section", type: "PageHeaderSection", label: "Page Header Section", icon: /* @__PURE__ */ jsx(FileText, { className: "size-4" }), category: "Blocks" },
|
|
14611
|
-
// Chat & Messaging
|
|
14612
|
-
{ id: "messenger-sidebar", type: "MessengerSidebar", label: "Messenger Sidebar", icon: /* @__PURE__ */ jsx(MessageSquare, { className: "size-4" }), category: "Blocks" },
|
|
14613
|
-
{ id: "chat-message", type: "ChatMessage", label: "Chat Message", icon: /* @__PURE__ */ jsx(MessageSquare, { className: "size-4" }), category: "Blocks" },
|
|
14614
|
-
// Video
|
|
14615
|
-
{ id: "video-chat-controls", type: "VideoChatControls", label: "Video Chat Controls", icon: /* @__PURE__ */ jsx(Video, { className: "size-4" }), category: "Blocks" },
|
|
14616
|
-
{ id: "webcam-preview", type: "WebcamPreview", label: "Webcam Preview", icon: /* @__PURE__ */ jsx(Video, { className: "size-4" }), category: "Blocks" },
|
|
14617
|
-
{ id: "participant-list", type: "ParticipantList", label: "Participant List", icon: /* @__PURE__ */ jsx(Users, { className: "size-4" }), category: "Blocks" },
|
|
14618
|
-
{ id: "video-content-section", type: "VideoContentSection", label: "Video Content Section", icon: /* @__PURE__ */ jsx(Play, { className: "size-4" }), category: "Blocks" },
|
|
14619
|
-
{ id: "video-playlist", type: "VideoPlaylist", label: "Video Playlist", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Blocks" },
|
|
14620
|
-
// Search & Filters
|
|
14621
|
-
{ id: "search-bar", type: "SearchBar", label: "Search Bar", icon: /* @__PURE__ */ jsx(Search, { className: "size-4" }), category: "Blocks" },
|
|
14622
|
-
{ id: "filter-popover", type: "FilterPopover", label: "Filter Popover", icon: /* @__PURE__ */ jsx(SlidersHorizontal, { className: "size-4" }), category: "Blocks" },
|
|
14623
|
-
// Forms & Settings
|
|
14624
|
-
{ id: "settings-list-row", type: "SettingsListRow", label: "Settings List Row", icon: /* @__PURE__ */ jsx(Settings, { className: "size-4" }), category: "Blocks" },
|
|
14625
|
-
{ id: "profile-image-uploader", type: "ProfileImageUploader", label: "Profile Image Uploader", icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }), category: "Blocks" },
|
|
14626
|
-
{ id: "login-branding-panel", type: "LoginBrandingPanel", label: "Login Branding Panel", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Blocks" },
|
|
14627
|
-
// Marketing - Heroes
|
|
14628
|
-
{ id: "hero-section", type: "HeroSection", label: "Hero Section", icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }), category: "Blocks" },
|
|
14629
|
-
{ id: "hero-dark-with-image", type: "HeroDarkWithImage", label: "Hero Dark + Image", icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }), category: "Blocks" },
|
|
14630
|
-
{ id: "centered-hero", type: "CenteredHero", label: "Centered Hero", icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }), category: "Blocks" },
|
|
14631
|
-
// Marketing - Social Proof
|
|
14632
|
-
{ id: "testimonial-carousel", type: "TestimonialCarousel", label: "Testimonial Carousel", icon: /* @__PURE__ */ jsx(MessageSquare, { className: "size-4" }), category: "Blocks" },
|
|
14633
|
-
{ id: "reviews-grid", type: "ReviewsGrid", label: "Reviews Grid", icon: /* @__PURE__ */ jsx(Star, { className: "size-4" }), category: "Blocks" },
|
|
14634
|
-
{ id: "social-proof", type: "SocialProof", label: "Social Proof (Logos)", icon: /* @__PURE__ */ jsx(Award, { className: "size-4" }), category: "Blocks" },
|
|
14635
|
-
{ id: "metrics-section", type: "MetricsSection", label: "Metrics Section", icon: /* @__PURE__ */ jsx(Hash, { className: "size-4" }), category: "Blocks" },
|
|
14636
|
-
// Marketing - Features
|
|
14637
|
-
{ id: "feature-with-image", type: "FeatureWithImage", label: "Feature + Image", icon: /* @__PURE__ */ jsx(Image, { className: "size-4" }), category: "Blocks" },
|
|
14638
|
-
{ id: "core-values-grid", type: "CoreValuesGrid", label: "Core Values Grid", icon: /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" }), category: "Blocks" },
|
|
14639
|
-
{ id: "destination-cards", type: "DestinationCards", label: "Destination Cards", icon: /* @__PURE__ */ jsx(MapPin, { className: "size-4" }), category: "Blocks" },
|
|
14640
|
-
// Marketing - Team
|
|
14641
|
-
{ id: "team-cards-grid", type: "TeamCardsGrid", label: "Team Cards Grid", icon: /* @__PURE__ */ jsx(Users, { className: "size-4" }), category: "Blocks" },
|
|
14642
|
-
{ id: "team-circular-grid", type: "TeamCircularGrid", label: "Team Circular Grid", icon: /* @__PURE__ */ jsx(Users, { className: "size-4" }), category: "Blocks" },
|
|
14643
|
-
// Marketing - CTA & Footer
|
|
14644
|
-
{ id: "cta-banner", type: "CtaBanner", label: "CTA Banner", icon: /* @__PURE__ */ jsx(Megaphone, { className: "size-4" }), category: "Blocks" },
|
|
14645
|
-
{ id: "footer-navbar", type: "FooterNavbar", label: "Footer Navbar", icon: /* @__PURE__ */ jsx(Layout, { className: "size-4" }), category: "Blocks" },
|
|
14646
|
-
// Marketing - Other
|
|
14647
|
-
{ id: "featured-news-cards", type: "FeaturedNewsCards", label: "Featured News Cards", icon: /* @__PURE__ */ jsx(Newspaper, { className: "size-4" }), category: "Blocks" },
|
|
14648
|
-
{ id: "office-locations", type: "OfficeLocations", label: "Office Locations", icon: /* @__PURE__ */ jsx(Building, { className: "size-4" }), category: "Blocks" },
|
|
14649
|
-
// Pricing
|
|
14650
|
-
{ id: "pricing-cards", type: "PricingCards", label: "Pricing Cards", icon: /* @__PURE__ */ jsx(CreditCard, { className: "size-4" }), category: "Blocks" },
|
|
14651
|
-
{ id: "faq-accordion", type: "FaqAccordion", label: "FAQ Accordion", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Blocks" },
|
|
14652
|
-
{ id: "features-comparison", type: "FeaturesComparison", label: "Features Comparison", icon: /* @__PURE__ */ jsx(Table, { className: "size-4" }), category: "Blocks" },
|
|
14653
|
-
// =====================
|
|
14654
|
-
// COMPONENTS (UI Primitives)
|
|
14655
|
-
// =====================
|
|
14656
|
-
{ id: "button", type: "Button", label: "Button", icon: /* @__PURE__ */ jsx(Square, { className: "size-4" }), category: "Components" },
|
|
14657
|
-
{ id: "checkbox", type: "Checkbox", label: "Checkbox", icon: /* @__PURE__ */ jsx(CheckSquare, { className: "size-4" }), category: "Components" },
|
|
14658
|
-
{ id: "date-input", type: "DateInput", label: "Date Input", icon: /* @__PURE__ */ jsx(Calendar$1, { className: "size-4" }), category: "Components" },
|
|
14659
|
-
{ id: "input", type: "Input", label: "Text Input", icon: /* @__PURE__ */ jsx(Type, { className: "size-4" }), category: "Components" },
|
|
14660
|
-
{ id: "select", type: "Select", label: "Select", icon: /* @__PURE__ */ jsx(List, { className: "size-4" }), category: "Components" },
|
|
14661
|
-
{ id: "switch", type: "Switch", label: "Switch", icon: /* @__PURE__ */ jsx(ToggleLeft, { className: "size-4" }), category: "Components" },
|
|
14662
|
-
{ id: "radio-group", type: "RadioGroup", label: "Radio Group", icon: /* @__PURE__ */ jsx(CircleDot, { className: "size-4" }), category: "Components" },
|
|
14663
|
-
{ id: "multiselect-tags", type: "MultiselectTags", label: "Multiselect Tags", icon: /* @__PURE__ */ jsx(Tags, { className: "size-4" }), category: "Components" },
|
|
14664
|
-
{ id: "avatar", type: "Avatar", label: "Avatar", icon: /* @__PURE__ */ jsx(User, { className: "size-4" }), category: "Components" },
|
|
14665
|
-
{ id: "badge", type: "Badge", label: "Badge", icon: /* @__PURE__ */ jsx(Award, { className: "size-4" }), category: "Components" }
|
|
14666
|
-
];
|
|
14667
|
-
var componentsByCategory = paletteComponents.reduce((acc, comp) => {
|
|
14668
|
-
if (!acc[comp.category]) {
|
|
14669
|
-
acc[comp.category] = [];
|
|
14670
|
-
}
|
|
14671
|
-
acc[comp.category].push(comp);
|
|
14672
|
-
return acc;
|
|
14673
|
-
}, {});
|
|
14674
|
-
var categoryOrder = ["Page Templates", "Blocks", "Components"];
|
|
14675
|
-
function DraggableComponent({ component }) {
|
|
14676
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
14677
|
-
const { attributes, listeners, setNodeRef, transform, isDragging } = useDraggable({
|
|
14678
|
-
id: component.id,
|
|
14679
|
-
data: {
|
|
14680
|
-
type: component.type,
|
|
14681
|
-
label: component.label
|
|
14682
|
-
}
|
|
14683
|
-
});
|
|
14684
|
-
useEffect(() => {
|
|
14685
|
-
setIsMounted(true);
|
|
14686
|
-
}, []);
|
|
14687
|
-
const style = {
|
|
14688
|
-
transform: CSS.Transform.toString(transform),
|
|
14689
|
-
opacity: isDragging ? 0.5 : 1
|
|
14690
|
-
};
|
|
14691
|
-
return /* @__PURE__ */ jsxs(
|
|
14692
|
-
"div",
|
|
14693
|
-
{
|
|
14694
|
-
ref: setNodeRef,
|
|
14695
|
-
style,
|
|
14696
|
-
...isMounted ? attributes : {},
|
|
14697
|
-
...isMounted ? listeners : {},
|
|
14698
|
-
className: cn(
|
|
14699
|
-
"flex items-center gap-3 px-3 py-2.5 rounded-md cursor-grab active:cursor-grabbing",
|
|
14700
|
-
"border border-transparent",
|
|
14701
|
-
"hover:bg-[var(--canvas-surface)] hover:border-[var(--canvas-border)]",
|
|
14702
|
-
"transition-colors group"
|
|
14703
|
-
),
|
|
14704
|
-
children: [
|
|
14705
|
-
/* @__PURE__ */ jsx(
|
|
14706
|
-
"div",
|
|
14707
|
-
{
|
|
14708
|
-
className: "flex items-center justify-center size-8 rounded-md bg-[var(--canvas-surface-brand)] text-[var(--canvas-primary)]",
|
|
14709
|
-
children: component.icon
|
|
14710
|
-
}
|
|
14711
|
-
),
|
|
14712
|
-
/* @__PURE__ */ jsx(
|
|
14713
|
-
"span",
|
|
14714
|
-
{
|
|
14715
|
-
className: "text-[var(--canvas-text)]",
|
|
14716
|
-
style: {
|
|
14717
|
-
fontFamily: "var(--typo-body-s-font, var(--typo-global-font))",
|
|
14718
|
-
fontSize: "var(--typo-body-s-size)"
|
|
14719
|
-
},
|
|
14720
|
-
children: component.label
|
|
14721
|
-
}
|
|
14722
|
-
)
|
|
14723
|
-
]
|
|
14724
|
-
}
|
|
14725
|
-
);
|
|
14726
|
-
}
|
|
14727
|
-
function CategorySection({ category, components, defaultExpanded = true }) {
|
|
14728
|
-
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
14729
|
-
return /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
14730
|
-
/* @__PURE__ */ jsxs(
|
|
14731
|
-
"button",
|
|
14732
|
-
{
|
|
14733
|
-
onClick: () => setIsExpanded(!isExpanded),
|
|
14734
|
-
className: "cursor-pointer flex items-center gap-2 w-full px-3 py-2 text-left hover:bg-[var(--canvas-surface)] rounded-md transition-colors",
|
|
14735
|
-
children: [
|
|
14736
|
-
isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 text-[var(--canvas-text-muted)]" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-4 text-[var(--canvas-text-muted)]" }),
|
|
14737
|
-
/* @__PURE__ */ jsx(
|
|
14738
|
-
"span",
|
|
14739
|
-
{
|
|
14740
|
-
className: "font-semibold uppercase tracking-wider text-[var(--canvas-text-muted)]",
|
|
14741
|
-
style: { fontSize: "var(--typo-body-xs-size)" },
|
|
14742
|
-
children: category
|
|
14743
|
-
}
|
|
14744
|
-
),
|
|
14745
|
-
/* @__PURE__ */ jsx("span", { className: "ml-auto text-[var(--canvas-text-placeholder)]", style: { fontSize: "var(--typo-body-xs-size)" }, children: components.length })
|
|
14746
|
-
]
|
|
14747
|
-
}
|
|
14748
|
-
),
|
|
14749
|
-
isExpanded && /* @__PURE__ */ jsx("div", { className: "mt-1 ml-2 space-y-0.5", children: components.map((component) => /* @__PURE__ */ jsx(DraggableComponent, { component }, component.id)) })
|
|
14750
|
-
] });
|
|
14751
|
-
}
|
|
14752
|
-
function ComponentPalette({ className }) {
|
|
14753
|
-
return /* @__PURE__ */ jsxs(
|
|
14754
|
-
"aside",
|
|
14755
|
-
{
|
|
14756
|
-
className: cn(
|
|
14757
|
-
"w-[280px] h-full flex flex-col",
|
|
14758
|
-
"bg-[var(--canvas-background)] border-r border-[var(--canvas-border)]",
|
|
14759
|
-
className
|
|
14760
|
-
),
|
|
14761
|
-
children: [
|
|
14762
|
-
/* @__PURE__ */ jsxs("div", { className: "px-4 py-4 border-b border-[var(--canvas-border)]", children: [
|
|
14763
|
-
/* @__PURE__ */ jsx(
|
|
14764
|
-
"h2",
|
|
14765
|
-
{
|
|
14766
|
-
className: "font-semibold text-[var(--canvas-text)]",
|
|
14767
|
-
style: {
|
|
14768
|
-
fontFamily: "var(--typo-body-m-font, var(--typo-global-font))",
|
|
14769
|
-
fontSize: "var(--typo-body-s-size)"
|
|
14770
|
-
},
|
|
14771
|
-
children: "Components"
|
|
14772
|
-
}
|
|
14773
|
-
),
|
|
14774
|
-
/* @__PURE__ */ jsx(
|
|
14775
|
-
"p",
|
|
14776
|
-
{
|
|
14777
|
-
className: "text-[var(--canvas-text-muted)] mt-1",
|
|
14778
|
-
style: { fontSize: "var(--typo-body-xs-size)" },
|
|
14779
|
-
children: "Drag components onto the canvas"
|
|
14780
|
-
}
|
|
14781
|
-
)
|
|
14782
|
-
] }),
|
|
14783
|
-
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("div", { className: "p-3", children: categoryOrder.map((category) => {
|
|
14784
|
-
const components = componentsByCategory[category];
|
|
14785
|
-
if (!components) return null;
|
|
14786
|
-
return /* @__PURE__ */ jsx(
|
|
14787
|
-
CategorySection,
|
|
14788
|
-
{
|
|
14789
|
-
category,
|
|
14790
|
-
components,
|
|
14791
|
-
defaultExpanded: category !== "Page Templates"
|
|
14792
|
-
},
|
|
14793
|
-
category
|
|
14794
|
-
);
|
|
14795
|
-
}) }) }),
|
|
14796
|
-
/* @__PURE__ */ jsx("div", { className: "px-4 py-3 border-t border-[var(--canvas-border)] bg-[var(--canvas-surface)]", children: /* @__PURE__ */ jsxs("p", { className: "text-[var(--canvas-text-placeholder)]", style: { fontSize: "var(--typo-body-xs-size)" }, children: [
|
|
14797
|
-
"Tip: Press ",
|
|
14798
|
-
/* @__PURE__ */ jsx("kbd", { className: "px-1.5 py-0.5 bg-[var(--canvas-background)] rounded border border-[var(--canvas-border)]", style: { fontSize: "10px" }, children: "Delete" }),
|
|
14799
|
-
" to remove selected"
|
|
14800
|
-
] }) })
|
|
14801
|
-
]
|
|
14802
|
-
}
|
|
14803
|
-
);
|
|
14804
|
-
}
|
|
14805
14522
|
|
|
14806
14523
|
// src/lib/component-registry.ts
|
|
14807
14524
|
var layoutShells = {
|
|
@@ -15056,8 +14773,8 @@ var blocks = {
|
|
|
15056
14773
|
},
|
|
15057
14774
|
ContentDropzone: {
|
|
15058
14775
|
path: "@/components/blocks",
|
|
15059
|
-
description: "Placeholder dropzone for content areas
|
|
15060
|
-
props: ["
|
|
14776
|
+
description: "Placeholder dropzone for content areas. Shows dashed placeholder when empty; arranges children in a flex column with 32px (--spacing-4xl) gap between blocks. Within a block, use 12px (--spacing-lg) gap between title groups and their content.",
|
|
14777
|
+
props: ["height?", "className?", "children?"]
|
|
15061
14778
|
},
|
|
15062
14779
|
UpvotingPostsTable: {
|
|
15063
14780
|
path: "@/components/blocks",
|
|
@@ -15178,23 +14895,6 @@ var groupModalDrawerBlocks = {
|
|
|
15178
14895
|
props: ["title?", "description?", "rows?: FormRowConfig[]", "sortOptions?", "filterOptions?", "inputSize?: 'sm' | 'default' | 'lg'", "onAddNew?", "onCancel?", "onSave?", "onFieldChange?", "showHeader?", "showFooter?"]
|
|
15179
14896
|
}
|
|
15180
14897
|
};
|
|
15181
|
-
var canvasBlocks = {
|
|
15182
|
-
InfinityCanvas: {
|
|
15183
|
-
path: "@/components/blocks",
|
|
15184
|
-
description: "Pannable, zoomable infinite canvas for placing components. Supports drag-and-drop from palette.",
|
|
15185
|
-
props: ["items: CanvasItemData[]", "onItemsChange", "selectedId", "onSelectItem"]
|
|
15186
|
-
},
|
|
15187
|
-
ComponentPalette: {
|
|
15188
|
-
path: "@/components/blocks",
|
|
15189
|
-
description: "Sidebar listing draggable components grouped by category. Used with InfinityCanvas.",
|
|
15190
|
-
props: ["className?"]
|
|
15191
|
-
},
|
|
15192
|
-
CanvasItem: {
|
|
15193
|
-
path: "@/components/blocks",
|
|
15194
|
-
description: "Wrapper for components placed on the infinity canvas. Handles positioning and selection.",
|
|
15195
|
-
props: ["item: CanvasItemData", "isSelected", "onSelect", "onDelete", "children"]
|
|
15196
|
-
}
|
|
15197
|
-
};
|
|
15198
14898
|
var videoBlocks = {
|
|
15199
14899
|
VideoChatControls: {
|
|
15200
14900
|
path: "@/components/blocks",
|
|
@@ -15468,12 +15168,6 @@ var pageTemplates = {
|
|
|
15468
15168
|
description: "Video content page with player and playlist sidebar.",
|
|
15469
15169
|
shell: "custom (no shell)",
|
|
15470
15170
|
blocks: ["VideoContentSection", "VideoPlaylist", "YouTubePlayer"]
|
|
15471
|
-
},
|
|
15472
|
-
"page-canvas": {
|
|
15473
|
-
path: "/page-canvas",
|
|
15474
|
-
description: "Figma-style infinite canvas whiteboard. Drag components from sidebar palette onto a pannable, zoomable canvas.",
|
|
15475
|
-
shell: "custom (no shell)",
|
|
15476
|
-
blocks: ["InfinityCanvas", "ComponentPalette", "CanvasItem", "Header"]
|
|
15477
15171
|
}
|
|
15478
15172
|
};
|
|
15479
15173
|
function buildComponentOptions() {
|
|
@@ -16414,7 +16108,7 @@ function StarRating3({ rating }) {
|
|
|
16414
16108
|
className: "flex items-center",
|
|
16415
16109
|
style: { gap: "var(--spacing-xxs, 2px)" },
|
|
16416
16110
|
children: [1, 2, 3, 4, 5].map((star) => /* @__PURE__ */ jsx(
|
|
16417
|
-
Star,
|
|
16111
|
+
Star$1,
|
|
16418
16112
|
{
|
|
16419
16113
|
className: "size-5",
|
|
16420
16114
|
fill: star <= rating ? "var(--canvas-primary)" : "var(--canvas-border)",
|
|
@@ -16807,7 +16501,7 @@ function ProfileTileCard({ item, onClick }) {
|
|
|
16807
16501
|
style: { gap: "4px" },
|
|
16808
16502
|
children: [
|
|
16809
16503
|
/* @__PURE__ */ jsx(
|
|
16810
|
-
Star,
|
|
16504
|
+
Star$1,
|
|
16811
16505
|
{
|
|
16812
16506
|
className: "w-5 h-5",
|
|
16813
16507
|
style: { color: "var(--canvas-primary)", fill: "var(--canvas-primary)" }
|
|
@@ -20879,7 +20573,7 @@ function FeaturedPlaces() {
|
|
|
20879
20573
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-6", children: [
|
|
20880
20574
|
/* @__PURE__ */ jsx(Typography, { variant: "body-xl", as: "h3", style: { fontWeight: 600 }, children: place.name }),
|
|
20881
20575
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
20882
|
-
/* @__PURE__ */ jsx(Star
|
|
20576
|
+
/* @__PURE__ */ jsx(Star, { size: 16, weight: "fill", style: { color: "var(--canvas-primary)" } }),
|
|
20883
20577
|
/* @__PURE__ */ jsx(Typography, { variant: "body-s", as: "span", children: place.rating })
|
|
20884
20578
|
] })
|
|
20885
20579
|
] }),
|
|
@@ -20966,7 +20660,7 @@ function HowItWorks({ variant = "light", features = defaultFeatures }) {
|
|
|
20966
20660
|
}
|
|
20967
20661
|
var defaultCategories = [
|
|
20968
20662
|
{ id: "1", title: "Most popular", count: "5,000 homes", icon: /* @__PURE__ */ jsx(Heart, { size: 48 }) },
|
|
20969
|
-
{ id: "2", title: "Top rated", count: "5,000 homes", icon: /* @__PURE__ */ jsx(Star
|
|
20663
|
+
{ id: "2", title: "Top rated", count: "5,000 homes", icon: /* @__PURE__ */ jsx(Star, { size: 48 }) },
|
|
20970
20664
|
{ id: "3", title: "Unique stays", count: "5,000 homes", icon: /* @__PURE__ */ jsx(Sun, { size: 48 }) },
|
|
20971
20665
|
{ id: "4", title: "Affordable", count: "5,000 homes", icon: /* @__PURE__ */ jsx(CurrencyDollar, { size: 48 }) },
|
|
20972
20666
|
{ id: "5", title: "Friendly staff", count: "5,000 homes", icon: /* @__PURE__ */ jsx(Smiley, { size: 48 }) },
|
|
@@ -21153,7 +20847,7 @@ var defaultSteps2 = [
|
|
|
21153
20847
|
id: "4",
|
|
21154
20848
|
title: "Share your experience",
|
|
21155
20849
|
description: "Leave a review for the property and host for other users to see",
|
|
21156
|
-
icon: /* @__PURE__ */ jsx(Star
|
|
20850
|
+
icon: /* @__PURE__ */ jsx(Star, { size: 24 })
|
|
21157
20851
|
}
|
|
21158
20852
|
];
|
|
21159
20853
|
function VerticalHowItWorks({
|
|
@@ -24033,7 +23727,6 @@ function ColorInputRow({
|
|
|
24033
23727
|
{
|
|
24034
23728
|
className: "w-auto p-0",
|
|
24035
23729
|
align: "start",
|
|
24036
|
-
onPointerDownOutside: (e) => e.preventDefault(),
|
|
24037
23730
|
children: /* @__PURE__ */ jsx(HslColorPicker, { value, onChange })
|
|
24038
23731
|
}
|
|
24039
23732
|
)
|
|
@@ -24132,7 +23825,6 @@ function VariableColorRow({
|
|
|
24132
23825
|
{
|
|
24133
23826
|
className: "w-auto p-0",
|
|
24134
23827
|
align: "start",
|
|
24135
|
-
onPointerDownOutside: (e) => e.preventDefault(),
|
|
24136
23828
|
children: /* @__PURE__ */ jsx(
|
|
24137
23829
|
HslColorPicker,
|
|
24138
23830
|
{
|
|
@@ -24469,7 +24161,7 @@ function ColorsPanel({ theme }) {
|
|
|
24469
24161
|
var logoIcons = [
|
|
24470
24162
|
{ name: "Diamond", icon: Diamond },
|
|
24471
24163
|
{ name: "Hexagon", icon: Hexagon },
|
|
24472
|
-
{ name: "Star", icon: Star
|
|
24164
|
+
{ name: "Star", icon: Star },
|
|
24473
24165
|
{ name: "Lightning", icon: Lightning },
|
|
24474
24166
|
{ name: "Sparkle", icon: Sparkle },
|
|
24475
24167
|
{ name: "Infinity", icon: Infinity },
|
|
@@ -24499,7 +24191,7 @@ var logoIcons = [
|
|
|
24499
24191
|
{ name: "ChatCircle", icon: ChatCircle },
|
|
24500
24192
|
{ name: "Envelope", icon: Envelope },
|
|
24501
24193
|
{ name: "Phone", icon: Phone$1 },
|
|
24502
|
-
{ name: "Megaphone", icon: Megaphone
|
|
24194
|
+
{ name: "Megaphone", icon: Megaphone },
|
|
24503
24195
|
{ name: "Heart", icon: Heart },
|
|
24504
24196
|
{ name: "Shield", icon: Shield },
|
|
24505
24197
|
{ name: "Trophy", icon: Trophy },
|
|
@@ -26133,6 +25825,7 @@ function ThemeDrawer({
|
|
|
26133
25825
|
title = "Design Variables",
|
|
26134
25826
|
width = 464,
|
|
26135
25827
|
readOnly = false,
|
|
25828
|
+
hideSave = false,
|
|
26136
25829
|
docked = false,
|
|
26137
25830
|
stickyTopOffset = 0,
|
|
26138
25831
|
children
|
|
@@ -26143,6 +25836,8 @@ function ThemeDrawer({
|
|
|
26143
25836
|
const [open, setOpen] = useState(defaultOpen);
|
|
26144
25837
|
const [activeTab, setActiveTab] = useState("colors");
|
|
26145
25838
|
const [resetConfirmOpen, setResetConfirmOpen] = useState(false);
|
|
25839
|
+
const [localPreviewBranding, setLocalPreviewBranding] = useState(null);
|
|
25840
|
+
const [localPreviewImages, setLocalPreviewImages] = useState(null);
|
|
26146
25841
|
const isRight = triggerPosition === "bottom-right";
|
|
26147
25842
|
const [dragPos, setDragPos] = useState({ x: 20, y: 20 });
|
|
26148
25843
|
const isDraggingRef = useRef(false);
|
|
@@ -26198,13 +25893,21 @@ function ThemeDrawer({
|
|
|
26198
25893
|
useEffect(() => {
|
|
26199
25894
|
if (open) {
|
|
26200
25895
|
setPreviewBranding(theme.branding);
|
|
25896
|
+
setLocalPreviewBranding(theme.branding);
|
|
26201
25897
|
}
|
|
26202
25898
|
}, [open, theme.branding, setPreviewBranding]);
|
|
26203
25899
|
useEffect(() => {
|
|
26204
25900
|
if (open) {
|
|
26205
25901
|
setPreviewImages(theme.images);
|
|
25902
|
+
setLocalPreviewImages(theme.images);
|
|
26206
25903
|
}
|
|
26207
25904
|
}, [open, theme.images, setPreviewImages]);
|
|
25905
|
+
useEffect(() => {
|
|
25906
|
+
broadcastBranding(open ? theme.branding : null);
|
|
25907
|
+
}, [open, theme.branding]);
|
|
25908
|
+
useEffect(() => {
|
|
25909
|
+
broadcastImages(open ? theme.images : null);
|
|
25910
|
+
}, [open, theme.images]);
|
|
26208
25911
|
const handleOpenChange = useCallback(
|
|
26209
25912
|
(newOpen) => {
|
|
26210
25913
|
if (!newOpen) {
|
|
@@ -26213,6 +25916,8 @@ function ThemeDrawer({
|
|
|
26213
25916
|
}
|
|
26214
25917
|
setPreviewBranding(null);
|
|
26215
25918
|
setPreviewImages(null);
|
|
25919
|
+
setLocalPreviewBranding(null);
|
|
25920
|
+
setLocalPreviewImages(null);
|
|
26216
25921
|
setResetConfirmOpen(false);
|
|
26217
25922
|
}
|
|
26218
25923
|
setOpen(newOpen);
|
|
@@ -26229,10 +25934,12 @@ function ThemeDrawer({
|
|
|
26229
25934
|
theme.resetAll();
|
|
26230
25935
|
setPreviewBranding(null);
|
|
26231
25936
|
setPreviewImages(null);
|
|
25937
|
+
setLocalPreviewBranding(null);
|
|
25938
|
+
setLocalPreviewImages(null);
|
|
26232
25939
|
setResetConfirmOpen(false);
|
|
26233
25940
|
}, [theme, setPreviewBranding, setPreviewImages]);
|
|
26234
25941
|
const activePanels = enabledPanels ? panelConfig.filter((p) => enabledPanels.includes(p.id)) : panelConfig;
|
|
26235
|
-
const showFooter = !readOnly && (theme.isDirty || resetConfirmOpen || theme.hasCustomizations);
|
|
25942
|
+
const showFooter = !readOnly && (!hideSave && theme.isDirty || resetConfirmOpen || theme.hasCustomizations);
|
|
26236
25943
|
useEffect(() => {
|
|
26237
25944
|
if (!docked || !open) return;
|
|
26238
25945
|
const handleEscape = (e) => {
|
|
@@ -26249,14 +25956,19 @@ function ThemeDrawer({
|
|
|
26249
25956
|
const currentKeys = new Set(Object.keys(theme.overrides));
|
|
26250
25957
|
prevOverrideKeysRef.current.forEach((key) => {
|
|
26251
25958
|
if (!currentKeys.has(key)) {
|
|
26252
|
-
|
|
25959
|
+
const defaultValue = theme.variables[key];
|
|
25960
|
+
if (defaultValue) {
|
|
25961
|
+
el.style.setProperty(key, defaultValue);
|
|
25962
|
+
} else {
|
|
25963
|
+
el.style.removeProperty(key);
|
|
25964
|
+
}
|
|
26253
25965
|
}
|
|
26254
25966
|
});
|
|
26255
25967
|
Object.entries(theme.overrides).forEach(([name, value]) => {
|
|
26256
25968
|
el.style.setProperty(name, value);
|
|
26257
25969
|
});
|
|
26258
25970
|
prevOverrideKeysRef.current = currentKeys;
|
|
26259
|
-
}, [theme.overrides]);
|
|
25971
|
+
}, [theme.overrides, theme.variables]);
|
|
26260
25972
|
const scrollHeight = docked ? `calc(100vh - ${stickyTopOffset}px - ${showFooter ? 200 : 150}px)` : `calc(100vh - ${showFooter ? 200 : 150}px)`;
|
|
26261
25973
|
const tabBar = /* @__PURE__ */ jsx("div", { style: drawerStyles.tabBar, children: activePanels.map((panel) => {
|
|
26262
25974
|
const isActive = activeTab === panel.id;
|
|
@@ -26365,7 +26077,7 @@ function ThemeDrawer({
|
|
|
26365
26077
|
]
|
|
26366
26078
|
}
|
|
26367
26079
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26368
|
-
theme.isDirty && /* @__PURE__ */ jsxs(
|
|
26080
|
+
!hideSave && theme.isDirty && /* @__PURE__ */ jsxs(
|
|
26369
26081
|
"div",
|
|
26370
26082
|
{
|
|
26371
26083
|
style: {
|
|
@@ -26577,7 +26289,7 @@ function ThemeDrawer({
|
|
|
26577
26289
|
e.currentTarget.style.opacity = "0.5";
|
|
26578
26290
|
},
|
|
26579
26291
|
"aria-label": "Close theme editor",
|
|
26580
|
-
children: /* @__PURE__ */ jsx(
|
|
26292
|
+
children: /* @__PURE__ */ jsx(PanelRightClose, { size: 16, color: "#6b7280" })
|
|
26581
26293
|
}
|
|
26582
26294
|
),
|
|
26583
26295
|
/* @__PURE__ */ jsx("div", { style: { padding: "16px 16px 12px", background: "#ffffff" }, children: headerBlock }),
|
|
@@ -26593,7 +26305,18 @@ function ThemeDrawer({
|
|
|
26593
26305
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26594
26306
|
triggerButton,
|
|
26595
26307
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", minHeight: "100vh" }, children: [
|
|
26596
|
-
/* @__PURE__ */ jsx(
|
|
26308
|
+
/* @__PURE__ */ jsx(
|
|
26309
|
+
PreviewBrandingContext.Provider,
|
|
26310
|
+
{
|
|
26311
|
+
value: {
|
|
26312
|
+
previewBranding: localPreviewBranding,
|
|
26313
|
+
setPreviewBranding: setLocalPreviewBranding,
|
|
26314
|
+
previewImages: localPreviewImages,
|
|
26315
|
+
setPreviewImages: setLocalPreviewImages
|
|
26316
|
+
},
|
|
26317
|
+
children: /* @__PURE__ */ jsx("div", { ref: contentRef, style: { flex: 1, minWidth: 0, overflow: "auto", transform: "translateZ(0)" }, children })
|
|
26318
|
+
}
|
|
26319
|
+
),
|
|
26597
26320
|
dockedAside
|
|
26598
26321
|
] })
|
|
26599
26322
|
] });
|
|
@@ -26661,6 +26384,6 @@ function getTopLevelScreens(allScreens) {
|
|
|
26661
26384
|
return allScreens.filter((s) => !s.parentId);
|
|
26662
26385
|
}
|
|
26663
26386
|
|
|
26664
|
-
export { AccountSettingsShell, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, Button, Calendar,
|
|
26387
|
+
export { AccountSettingsShell, ActivityFeed, Avatar, AvatarFallback, AvatarImage, BadgesCard, BlogCards, BottomInputChatWidget, Button, Calendar, CategoryGrid, CenteredHero, ChatBubble, ChatDateSeparator, ChatInput, ChatMessageList, Checkbox, CheckboxWithLabel, CircularProgressBar, CircularProgressBarList, ColorInputRow, ComponentSearch, ContentDropzone, ContentWithImage, CoreValuesGrid, CreditCardDisplay, CtaBanner, CustomComponentHelper, DashboardHeader, DashboardShell, DateInput, DescriptionCard, DestinationCards, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChartWidget, DoubleSidebar, DoubleSidebarShell, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FaqAccordion, FaqsTable, FeatureWithImage, FeaturedNewsCards, FeaturedPlaces, FeaturesComparison, FileUploader, FilterPopover, FixedColumnDataTable, FlairBanner, FooterNavbar, FormGroup, GallerySection, GradientBanner, GraphMetricTilesDemo, GridTilesList, Header, HeroDarkCentered, HeroDarkWithImage, HeroFullwidthImage, HeroSection, HowItWorks, HslColorPicker, IconSidebar, IconSidebarShell, ImageFeedWithNestedComments, ImageUploader, InfoCard, Input, Label2 as Label, LargeImageLabelsList, Sidebar2 as LayoutSidebar, LineChartWidget, LineTabs, LinksCard, Loader, LoginBrandingPanel, MenuSection, MenufocusTemplate, MessengerInput, MessengerSidebar, MetricCard, MetricCardsRow, MetricListCard, MetricsSection, MobileBottomNav, MobileMenuShell, MonthlyCalendarWidget, MultiselectCheckboxField, MultiselectTags, MultistepProgressBarShell, MultistepShell, MultistepSidebarShell, NestedCommentsTable, NestedDataTable, OfficeLocations, PageHeaderSection, Pagination, ParticipantList, PersonaCard, PersonaGrid, PillTabs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortfolioCard, PreviewBrandingContext, PricingCards, PricingCta, ProfileCard, ProfileGridTilesList, ProfileImageUploader, ProgressBar, ProgressMetricCard, ProjectContextShell, PromptChipsRow, PromptTemplate, RadioGroup2 as RadioGroup, RadioGroupItem, RangeInput, ReviewsGrid, ReviewsTable, ScreenFlowchart, ScreenPromptBuilder, ScreenPromptTemplate, ScrollArea, ScrollBar, SearchBar, SearchBarShell, SearchSidebar, Searchbox, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectablePills, Separator3 as Separator, SettingsListRow, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNav, SidebarProfileCard, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, SkillsCard, Slider, SlideshowGridTiles, SocialFeed, SocialProof, StandardDataTable, StandardListWithImage, StandardPageShell, StatsCard, StepTracker, Switch, Tabs, TabsContent, TabsList, TabsTrigger, TeamCardsGrid, TeamCircularGrid, TestimonialCarousel, TextInput, Textarea, ThemeContext, ThemeDrawer, ThemeProvider, TitleGroup, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TwoColumnWidgets, Typography, UpvotingPostsTable, VerticalHowItWorks, VerticalMultistepShell, VerticalStepTracker, VideoChatControls, VideoContentSection, VideoPlaylistCard, VideoPlaylistItem, WebcamPreview, YouTubePlayer, accountTabs, allColorVariables, blocks, broadcastBranding, broadcastCSSVariables, broadcastImages, buttonVariants, cn, colorVariables, defaultBranding, defaultButtonColorStyles, defaultButtonColors, defaultButtonSizes, defaultColors, defaultCustomButtonStyles, defaultDoubleSidebarSections, defaultIconNavItems, defaultImages, defaultInputSizes, defaultProgressBarSteps, defaultSteps, defaultSupportLinks, defaultTypography, defaultVerticalSteps, getChildScreens, getScreenUrl, getTopLevelScreens, groupModalDrawerBlocks, layoutPrimitives, layoutShells, marketingBlocks, pageTemplates, pricingBlocks, removeCSSVariables, setCSSVariable, setCSSVariables, setupCSSVariableListener, useCSSVariableSync, useIsMobile, usePreviewBranding, useSidebar, useThemeBrandAssets, useThemeBranding, useThemeImages, videoBlocks };
|
|
26665
26388
|
//# sourceMappingURL=index.js.map
|
|
26666
26389
|
//# sourceMappingURL=index.js.map
|