@kilivi/payloadcms-theme-management 0.3.1 → 0.3.2
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/fields/ColorPickerField.js +1 -1
- package/dist/fields/ColorPickerField.js.map +1 -1
- package/dist/fields/ThemeTokenSelectField.d.ts.map +1 -1
- package/dist/fields/ThemeTokenSelectField.js +1 -1
- package/dist/fields/ThemeTokenSelectField.js.map +1 -1
- package/dist/fields/themeConfigurationField.d.ts.map +1 -1
- package/dist/fields/themeConfigurationField.js +223 -264
- package/dist/fields/themeConfigurationField.js.map +1 -1
- package/package.json +1 -1
- package/dist/fields/ExtendedThemeAutoPopulateField.d.ts +0 -12
- package/dist/fields/ExtendedThemeAutoPopulateField.d.ts.map +0 -1
- package/dist/fields/ExtendedThemeAutoPopulateField.js +0 -176
- package/dist/fields/ExtendedThemeAutoPopulateField.js.map +0 -1
- package/dist/fields/RadiusField.d.ts +0 -3
- package/dist/fields/RadiusField.d.ts.map +0 -1
- package/dist/fields/RadiusField.js +0 -174
- package/dist/fields/RadiusField.js.map +0 -1
- package/dist/fields/ThemeLivePreview.css +0 -190
- package/dist/fields/ThemeLivePreview.d.ts +0 -3
- package/dist/fields/ThemeLivePreview.d.ts.map +0 -1
- package/dist/fields/ThemeLivePreview.js +0 -195
- package/dist/fields/ThemeLivePreview.js.map +0 -1
- package/dist/fields/VISUAL_EXAMPLES.d.ts +0 -153
- package/dist/fields/VISUAL_EXAMPLES.d.ts.map +0 -1
- package/dist/fields/VISUAL_EXAMPLES.js +0 -148
- package/dist/fields/VISUAL_EXAMPLES.js.map +0 -1
- package/dist/fields/extendedThemeFields.d.ts +0 -139
- package/dist/fields/extendedThemeFields.d.ts.map +0 -1
- package/dist/fields/extendedThemeFields.js +0 -489
- package/dist/fields/extendedThemeFields.js.map +0 -1
- package/dist/views/ThemePreviewLoader.d.ts +0 -7
- package/dist/views/ThemePreviewLoader.d.ts.map +0 -1
- package/dist/views/ThemePreviewLoader.js +0 -43
- package/dist/views/ThemePreviewLoader.js.map +0 -1
- package/dist/views/ThemePreviewView.d.ts +0 -10
- package/dist/views/ThemePreviewView.d.ts.map +0 -1
- package/dist/views/ThemePreviewView.js +0 -43
- package/dist/views/ThemePreviewView.js.map +0 -1
- package/dist/views/ThemePreviewViewClient.d.ts +0 -7
- package/dist/views/ThemePreviewViewClient.d.ts.map +0 -1
- package/dist/views/ThemePreviewViewClient.js +0 -12
- package/dist/views/ThemePreviewViewClient.js.map +0 -1
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* Theme Live Preview Component
|
|
5
|
-
* Real-time preview of theme configuration
|
|
6
|
-
* Inspired by Payload CMS 3 Live Preview
|
|
7
|
-
*/ import { useFormFields } from '@payloadcms/ui';
|
|
8
|
-
import { useState } from 'react';
|
|
9
|
-
// Import CSS only in browser environment
|
|
10
|
-
// This prevents Node.js from trying to import CSS directly
|
|
11
|
-
// which causes ERR_UNKNOWN_FILE_EXTENSION error
|
|
12
|
-
if (typeof window !== 'undefined') {
|
|
13
|
-
// @ts-expect-error - Dynamic import of CSS is not recognized by TypeScript
|
|
14
|
-
import('./ThemeLivePreview.css').catch((err)=>{
|
|
15
|
-
console.warn('Failed to load CSS file:', err);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export const ThemeLivePreview = ()=>{
|
|
19
|
-
const allFields = useFormFields(([fields])=>fields);
|
|
20
|
-
const [previewMode, setPreviewMode] = useState('light');
|
|
21
|
-
const themeConfig = allFields?.themeConfiguration?.value;
|
|
22
|
-
// Extract colors from theme configuration
|
|
23
|
-
// Support both basic (lightMode/darkMode) and extended (extendedLightMode/extendedDarkMode)
|
|
24
|
-
const lightMode = themeConfig?.extendedLightMode || themeConfig?.lightMode;
|
|
25
|
-
const darkMode = themeConfig?.extendedDarkMode || themeConfig?.darkMode;
|
|
26
|
-
const activeMode = previewMode === 'light' ? lightMode : darkMode;
|
|
27
|
-
if (!themeConfig) {
|
|
28
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
29
|
-
className: "theme-live-preview-empty",
|
|
30
|
-
children: /*#__PURE__*/ _jsx("p", {
|
|
31
|
-
children: "Configure your theme to see live preview"
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return /*#__PURE__*/ _jsxs("div", {
|
|
36
|
-
className: "theme-live-preview-container",
|
|
37
|
-
"data-mode": previewMode,
|
|
38
|
-
children: [
|
|
39
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
40
|
-
className: "preview-header",
|
|
41
|
-
children: [
|
|
42
|
-
/*#__PURE__*/ _jsx("h3", {
|
|
43
|
-
children: "Live Theme Preview"
|
|
44
|
-
}),
|
|
45
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
46
|
-
className: "mode-toggle",
|
|
47
|
-
children: [
|
|
48
|
-
/*#__PURE__*/ _jsx("button", {
|
|
49
|
-
type: "button",
|
|
50
|
-
className: previewMode === 'light' ? 'active' : '',
|
|
51
|
-
onClick: ()=>setPreviewMode('light'),
|
|
52
|
-
children: "☀️ Light"
|
|
53
|
-
}),
|
|
54
|
-
/*#__PURE__*/ _jsx("button", {
|
|
55
|
-
type: "button",
|
|
56
|
-
className: previewMode === 'dark' ? 'active' : '',
|
|
57
|
-
onClick: ()=>setPreviewMode('dark'),
|
|
58
|
-
children: "🌙 Dark"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}),
|
|
64
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
65
|
-
className: "preview-content",
|
|
66
|
-
style: {
|
|
67
|
-
backgroundColor: activeMode?.background || '#ffffff',
|
|
68
|
-
color: activeMode?.foreground || '#000000'
|
|
69
|
-
},
|
|
70
|
-
children: [
|
|
71
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
72
|
-
className: "preview-section",
|
|
73
|
-
children: [
|
|
74
|
-
/*#__PURE__*/ _jsx("h1", {
|
|
75
|
-
style: {
|
|
76
|
-
color: activeMode?.foreground
|
|
77
|
-
},
|
|
78
|
-
children: "Welcome to Your Site"
|
|
79
|
-
}),
|
|
80
|
-
/*#__PURE__*/ _jsx("p", {
|
|
81
|
-
style: {
|
|
82
|
-
color: activeMode?.mutedForeground
|
|
83
|
-
},
|
|
84
|
-
children: "This is a live preview of your theme configuration"
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
}),
|
|
88
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
89
|
-
className: "preview-cards",
|
|
90
|
-
children: [
|
|
91
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
92
|
-
className: "preview-card",
|
|
93
|
-
style: {
|
|
94
|
-
backgroundColor: activeMode?.card || '#ffffff',
|
|
95
|
-
color: activeMode?.cardForeground || '#000000',
|
|
96
|
-
borderColor: activeMode?.border || '#e2e8f0'
|
|
97
|
-
},
|
|
98
|
-
children: [
|
|
99
|
-
/*#__PURE__*/ _jsx("h3", {
|
|
100
|
-
children: "Featured Content"
|
|
101
|
-
}),
|
|
102
|
-
/*#__PURE__*/ _jsx("p", {
|
|
103
|
-
style: {
|
|
104
|
-
color: activeMode?.mutedForeground
|
|
105
|
-
},
|
|
106
|
-
children: "Card component with theme colors"
|
|
107
|
-
}),
|
|
108
|
-
/*#__PURE__*/ _jsx("button", {
|
|
109
|
-
className: "preview-btn-primary",
|
|
110
|
-
style: {
|
|
111
|
-
backgroundColor: activeMode?.primary || '#0070f3',
|
|
112
|
-
color: activeMode?.primaryForeground || '#ffffff'
|
|
113
|
-
},
|
|
114
|
-
children: "Primary Action"
|
|
115
|
-
})
|
|
116
|
-
]
|
|
117
|
-
}),
|
|
118
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
119
|
-
className: "preview-card",
|
|
120
|
-
style: {
|
|
121
|
-
backgroundColor: activeMode?.card || '#ffffff',
|
|
122
|
-
color: activeMode?.cardForeground || '#000000',
|
|
123
|
-
borderColor: activeMode?.border || '#e2e8f0'
|
|
124
|
-
},
|
|
125
|
-
children: [
|
|
126
|
-
/*#__PURE__*/ _jsx("h3", {
|
|
127
|
-
children: "Secondary Card"
|
|
128
|
-
}),
|
|
129
|
-
/*#__PURE__*/ _jsx("p", {
|
|
130
|
-
style: {
|
|
131
|
-
color: activeMode?.mutedForeground
|
|
132
|
-
},
|
|
133
|
-
children: "Another card to showcase your theme"
|
|
134
|
-
}),
|
|
135
|
-
/*#__PURE__*/ _jsx("button", {
|
|
136
|
-
className: "preview-btn-secondary",
|
|
137
|
-
style: {
|
|
138
|
-
backgroundColor: activeMode?.secondary || '#f1f5f9',
|
|
139
|
-
color: activeMode?.secondaryForeground || '#0f172a'
|
|
140
|
-
},
|
|
141
|
-
children: "Secondary"
|
|
142
|
-
})
|
|
143
|
-
]
|
|
144
|
-
})
|
|
145
|
-
]
|
|
146
|
-
}),
|
|
147
|
-
/*#__PURE__*/ _jsxs("div", {
|
|
148
|
-
className: "preview-ui-elements",
|
|
149
|
-
children: [
|
|
150
|
-
/*#__PURE__*/ _jsx("input", {
|
|
151
|
-
type: "text",
|
|
152
|
-
placeholder: "Input field",
|
|
153
|
-
className: "preview-input",
|
|
154
|
-
style: {
|
|
155
|
-
backgroundColor: activeMode?.background,
|
|
156
|
-
color: activeMode?.foreground,
|
|
157
|
-
borderColor: activeMode?.input || activeMode?.border
|
|
158
|
-
}
|
|
159
|
-
}),
|
|
160
|
-
/*#__PURE__*/ _jsx("div", {
|
|
161
|
-
className: "preview-badge",
|
|
162
|
-
style: {
|
|
163
|
-
backgroundColor: activeMode?.accent || '#f1f5f9',
|
|
164
|
-
color: activeMode?.accentForeground || '#0f172a'
|
|
165
|
-
},
|
|
166
|
-
children: "Accent Badge"
|
|
167
|
-
}),
|
|
168
|
-
/*#__PURE__*/ _jsx("button", {
|
|
169
|
-
className: "preview-btn-destructive",
|
|
170
|
-
style: {
|
|
171
|
-
backgroundColor: activeMode?.destructive || '#ef4444',
|
|
172
|
-
color: activeMode?.destructiveForeground || '#ffffff'
|
|
173
|
-
},
|
|
174
|
-
children: "Destructive"
|
|
175
|
-
})
|
|
176
|
-
]
|
|
177
|
-
}),
|
|
178
|
-
/*#__PURE__*/ _jsx("div", {
|
|
179
|
-
className: "preview-muted",
|
|
180
|
-
style: {
|
|
181
|
-
backgroundColor: activeMode?.muted || '#f1f5f9',
|
|
182
|
-
color: activeMode?.mutedForeground || '#64748b'
|
|
183
|
-
},
|
|
184
|
-
children: /*#__PURE__*/ _jsx("p", {
|
|
185
|
-
children: "Muted background section for less prominent content"
|
|
186
|
-
})
|
|
187
|
-
})
|
|
188
|
-
]
|
|
189
|
-
})
|
|
190
|
-
]
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
export default ThemeLivePreview;
|
|
194
|
-
|
|
195
|
-
//# sourceMappingURL=ThemeLivePreview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fields/ThemeLivePreview.tsx"],"sourcesContent":["'use client'\n\n/**\n * Theme Live Preview Component\n * Real-time preview of theme configuration\n * Inspired by Payload CMS 3 Live Preview\n */\nimport { useFormFields } from '@payloadcms/ui'\nimport { useState } from 'react'\n\n// Import CSS only in browser environment\n// This prevents Node.js from trying to import CSS directly\n// which causes ERR_UNKNOWN_FILE_EXTENSION error\nif (typeof window !== 'undefined') {\n // @ts-expect-error - Dynamic import of CSS is not recognized by TypeScript\n import('./ThemeLivePreview.css').catch((err) => {\n console.warn('Failed to load CSS file:', err)\n })\n}\n\nexport const ThemeLivePreview = () => {\n const allFields = useFormFields(([fields]) => fields)\n const [previewMode, setPreviewMode] = useState<'light' | 'dark'>('light')\n\n const themeConfig = allFields?.themeConfiguration?.value as Record<string, unknown> | undefined\n\n // Extract colors from theme configuration\n // Support both basic (lightMode/darkMode) and extended (extendedLightMode/extendedDarkMode)\n const lightMode = (themeConfig?.extendedLightMode || themeConfig?.lightMode) as\n | Record<string, string>\n | undefined\n const darkMode = (themeConfig?.extendedDarkMode || themeConfig?.darkMode) as\n | Record<string, string>\n | undefined\n const activeMode = previewMode === 'light' ? lightMode : darkMode\n\n if (!themeConfig) {\n return (\n <div className=\"theme-live-preview-empty\">\n <p>Configure your theme to see live preview</p>\n </div>\n )\n }\n\n return (\n <div className=\"theme-live-preview-container\" data-mode={previewMode}>\n {/* Mode Toggle */}\n <div className=\"preview-header\">\n <h3>Live Theme Preview</h3>\n <div className=\"mode-toggle\">\n <button\n type=\"button\"\n className={previewMode === 'light' ? 'active' : ''}\n onClick={() => setPreviewMode('light')}\n >\n ☀️ Light\n </button>\n <button\n type=\"button\"\n className={previewMode === 'dark' ? 'active' : ''}\n onClick={() => setPreviewMode('dark')}\n >\n 🌙 Dark\n </button>\n </div>\n </div>\n\n {/* Preview Content */}\n <div\n className=\"preview-content\"\n style={{\n backgroundColor: activeMode?.background || '#ffffff',\n color: activeMode?.foreground || '#000000',\n }}\n >\n {/* Header Section */}\n <div className=\"preview-section\">\n <h1 style={{ color: activeMode?.foreground }}>Welcome to Your Site</h1>\n <p style={{ color: activeMode?.mutedForeground }}>\n This is a live preview of your theme configuration\n </p>\n </div>\n\n {/* Card Section */}\n <div className=\"preview-cards\">\n <div\n className=\"preview-card\"\n style={{\n backgroundColor: activeMode?.card || '#ffffff',\n color: activeMode?.cardForeground || '#000000',\n borderColor: activeMode?.border || '#e2e8f0',\n }}\n >\n <h3>Featured Content</h3>\n <p style={{ color: activeMode?.mutedForeground }}>Card component with theme colors</p>\n <button\n className=\"preview-btn-primary\"\n style={{\n backgroundColor: activeMode?.primary || '#0070f3',\n color: activeMode?.primaryForeground || '#ffffff',\n }}\n >\n Primary Action\n </button>\n </div>\n\n <div\n className=\"preview-card\"\n style={{\n backgroundColor: activeMode?.card || '#ffffff',\n color: activeMode?.cardForeground || '#000000',\n borderColor: activeMode?.border || '#e2e8f0',\n }}\n >\n <h3>Secondary Card</h3>\n <p style={{ color: activeMode?.mutedForeground }}>\n Another card to showcase your theme\n </p>\n <button\n className=\"preview-btn-secondary\"\n style={{\n backgroundColor: activeMode?.secondary || '#f1f5f9',\n color: activeMode?.secondaryForeground || '#0f172a',\n }}\n >\n Secondary\n </button>\n </div>\n </div>\n\n {/* UI Elements */}\n <div className=\"preview-ui-elements\">\n <input\n type=\"text\"\n placeholder=\"Input field\"\n className=\"preview-input\"\n style={{\n backgroundColor: activeMode?.background,\n color: activeMode?.foreground,\n borderColor: activeMode?.input || activeMode?.border,\n }}\n />\n\n <div\n className=\"preview-badge\"\n style={{\n backgroundColor: activeMode?.accent || '#f1f5f9',\n color: activeMode?.accentForeground || '#0f172a',\n }}\n >\n Accent Badge\n </div>\n\n <button\n className=\"preview-btn-destructive\"\n style={{\n backgroundColor: activeMode?.destructive || '#ef4444',\n color: activeMode?.destructiveForeground || '#ffffff',\n }}\n >\n Destructive\n </button>\n </div>\n\n {/* Muted Section */}\n <div\n className=\"preview-muted\"\n style={{\n backgroundColor: activeMode?.muted || '#f1f5f9',\n color: activeMode?.mutedForeground || '#64748b',\n }}\n >\n <p>Muted background section for less prominent content</p>\n </div>\n </div>\n </div>\n )\n}\n\nexport default ThemeLivePreview\n"],"names":["useFormFields","useState","window","catch","err","console","warn","ThemeLivePreview","allFields","fields","previewMode","setPreviewMode","themeConfig","themeConfiguration","value","lightMode","extendedLightMode","darkMode","extendedDarkMode","activeMode","div","className","p","data-mode","h3","button","type","onClick","style","backgroundColor","background","color","foreground","h1","mutedForeground","card","cardForeground","borderColor","border","primary","primaryForeground","secondary","secondaryForeground","input","placeholder","accent","accentForeground","destructive","destructiveForeground","muted"],"mappings":"AAAA;;AAEA;;;;CAIC,GACD,SAASA,aAAa,QAAQ,iBAAgB;AAC9C,SAASC,QAAQ,QAAQ,QAAO;AAEhC,yCAAyC;AACzC,2DAA2D;AAC3D,gDAAgD;AAChD,IAAI,OAAOC,WAAW,aAAa;IACjC,2EAA2E;IAC3E,MAAM,CAAC,0BAA0BC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AAED,eAAef,iBAAgB"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enhanced Font Selector - Visual Examples
|
|
3
|
-
*
|
|
4
|
-
* This file demonstrates how the font selector appears with actual fonts
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* BEFORE (Standard Payload Select):
|
|
8
|
-
*
|
|
9
|
-
* ┌──────────────────────────────┐
|
|
10
|
-
* │ Body font ▼ │
|
|
11
|
-
* ├──────────────────────────────┤
|
|
12
|
-
* │ System │
|
|
13
|
-
* │ Inter │
|
|
14
|
-
* │ Roboto │
|
|
15
|
-
* │ Open Sans │
|
|
16
|
-
* │ ... │
|
|
17
|
-
* └──────────────────────────────┘
|
|
18
|
-
*
|
|
19
|
-
* Issues:
|
|
20
|
-
* - No visual preview of fonts
|
|
21
|
-
* - Can't see how font looks
|
|
22
|
-
* - Generic dropdown appearance
|
|
23
|
-
* - No distinction between fonts
|
|
24
|
-
*/
|
|
25
|
-
/**
|
|
26
|
-
* AFTER (Custom Font Selector):
|
|
27
|
-
*
|
|
28
|
-
* ┌────────────────────────────────────┐
|
|
29
|
-
* │ Body font │
|
|
30
|
-
* │ ┌────────────────────────────┐ │
|
|
31
|
-
* │ │ Inter ▼ │ │
|
|
32
|
-
* │ └────────────────────────────┘ │
|
|
33
|
-
* └────────────────────────────────────┘
|
|
34
|
-
*
|
|
35
|
-
* Opens dropdown:
|
|
36
|
-
*
|
|
37
|
-
* ┌────────────────────────────────────┐
|
|
38
|
-
* │ ✓ Inter │
|
|
39
|
-
* │ The quick brown fox jumps... │
|
|
40
|
-
* │ (rendered in Inter font) │
|
|
41
|
-
* ├────────────────────────────────────┤
|
|
42
|
-
* │ Roboto │
|
|
43
|
-
* │ The quick brown fox jumps... │
|
|
44
|
-
* │ (rendered in Roboto font) │
|
|
45
|
-
* ├────────────────────────────────────┤
|
|
46
|
-
* │ Playfair Display │
|
|
47
|
-
* │ The quick brown fox jumps... │
|
|
48
|
-
* │ (rendered in Playfair font) │
|
|
49
|
-
* └────────────────────────────────────┘
|
|
50
|
-
*
|
|
51
|
-
* Features:
|
|
52
|
-
* ✅ Live font preview
|
|
53
|
-
* ✅ Check mark on selected
|
|
54
|
-
* ✅ Hover effects
|
|
55
|
-
* ✅ Smooth transitions
|
|
56
|
-
* ✅ Font category badges
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* Color Picker BEFORE (Inline Popover):
|
|
60
|
-
*
|
|
61
|
-
* ┌────────────────────────────────┐
|
|
62
|
-
* │ Primary color │
|
|
63
|
-
* │ ┌───┐ #3b82f6 │
|
|
64
|
-
* │ │███│ ──────────── │
|
|
65
|
-
* │ └───┘ │
|
|
66
|
-
* │ ┌──────────────────┐ │
|
|
67
|
-
* │ │ Color Picker │ │
|
|
68
|
-
* │ │ [Hex Wheel] │ │
|
|
69
|
-
* │ │ #3b82f6 │ │
|
|
70
|
-
* │ └──────────────────┘ │
|
|
71
|
-
* └────────────────────────────────┘
|
|
72
|
-
*
|
|
73
|
-
* Issues:
|
|
74
|
-
* - Takes up inline space
|
|
75
|
-
* - Hard to use on mobile
|
|
76
|
-
* - No quick color swatches
|
|
77
|
-
* - Click-outside handling complex
|
|
78
|
-
*/
|
|
79
|
-
/**
|
|
80
|
-
* Color Picker AFTER (Modal Drawer):
|
|
81
|
-
*
|
|
82
|
-
* Field:
|
|
83
|
-
* ┌────────────────────────────────┐
|
|
84
|
-
* │ Primary color │
|
|
85
|
-
* │ ┌───┐ #3b82f6 │
|
|
86
|
-
* │ │███│ ──────────── │
|
|
87
|
-
* │ └───┘ │
|
|
88
|
-
* └────────────────────────────────┘
|
|
89
|
-
*
|
|
90
|
-
* Click swatch → Opens Modal:
|
|
91
|
-
*
|
|
92
|
-
* ╔════════════════════════════════╗
|
|
93
|
-
* ║ Choose Primary color [×] ║
|
|
94
|
-
* ╠════════════════════════════════╣
|
|
95
|
-
* ║ ║
|
|
96
|
-
* ║ ┌────────────────────┐ ║
|
|
97
|
-
* ║ │ │ ║
|
|
98
|
-
* ║ │ [Color Wheel] │ ║
|
|
99
|
-
* ║ │ │ ║
|
|
100
|
-
* ║ └────────────────────┘ ║
|
|
101
|
-
* ║ ║
|
|
102
|
-
* ║ #3b82f6 [Done] ║
|
|
103
|
-
* ║ ║
|
|
104
|
-
* ║ Quick Colors: ║
|
|
105
|
-
* ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║
|
|
106
|
-
* ║ │██│██│██│██│██│██│██│██│ ║
|
|
107
|
-
* ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║
|
|
108
|
-
* ║ ║
|
|
109
|
-
* ╚════════════════════════════════╝
|
|
110
|
-
*
|
|
111
|
-
* Features:
|
|
112
|
-
* ✅ Full-screen modal (Payload Drawer)
|
|
113
|
-
* ✅ Larger color picker (220px)
|
|
114
|
-
* ✅ Quick color swatches
|
|
115
|
-
* ✅ Better mobile UX
|
|
116
|
-
* ✅ Escape key to close
|
|
117
|
-
*/
|
|
118
|
-
/**
|
|
119
|
-
* Theme Preset Selector (Already Had Swatches!):
|
|
120
|
-
*
|
|
121
|
-
* ┌─────────────────────────────────────┐
|
|
122
|
-
* │ Cool & Professional ●●●●● │
|
|
123
|
-
* │ cool │
|
|
124
|
-
* ├─────────────────────────────────────┤
|
|
125
|
-
* │ Warm & Inviting ●●●●● │
|
|
126
|
-
* │ warm │
|
|
127
|
-
* ├─────────────────────────────────────┤
|
|
128
|
-
* │ Dark & Modern ●●●●● │
|
|
129
|
-
* │ dark │
|
|
130
|
-
* └─────────────────────────────────────┘
|
|
131
|
-
*
|
|
132
|
-
* Legend:
|
|
133
|
-
* ● = Color swatch for:
|
|
134
|
-
* - Primary
|
|
135
|
-
* - Secondary
|
|
136
|
-
* - Accent
|
|
137
|
-
* - Background
|
|
138
|
-
* - Foreground
|
|
139
|
-
*/
|
|
140
|
-
export declare const examples: {
|
|
141
|
-
fontSelector: {
|
|
142
|
-
before: string;
|
|
143
|
-
after: string;
|
|
144
|
-
};
|
|
145
|
-
colorPicker: {
|
|
146
|
-
before: string;
|
|
147
|
-
after: string;
|
|
148
|
-
};
|
|
149
|
-
themePresets: {
|
|
150
|
-
status: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
//# sourceMappingURL=VISUAL_EXAMPLES.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VISUAL_EXAMPLES.d.ts","sourceRoot":"","sources":["../../src/fields/VISUAL_EXAMPLES.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYpB,CAAA"}
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enhanced Font Selector - Visual Examples
|
|
3
|
-
*
|
|
4
|
-
* This file demonstrates how the font selector appears with actual fonts
|
|
5
|
-
*/ /**
|
|
6
|
-
* BEFORE (Standard Payload Select):
|
|
7
|
-
*
|
|
8
|
-
* ┌──────────────────────────────┐
|
|
9
|
-
* │ Body font ▼ │
|
|
10
|
-
* ├──────────────────────────────┤
|
|
11
|
-
* │ System │
|
|
12
|
-
* │ Inter │
|
|
13
|
-
* │ Roboto │
|
|
14
|
-
* │ Open Sans │
|
|
15
|
-
* │ ... │
|
|
16
|
-
* └──────────────────────────────┘
|
|
17
|
-
*
|
|
18
|
-
* Issues:
|
|
19
|
-
* - No visual preview of fonts
|
|
20
|
-
* - Can't see how font looks
|
|
21
|
-
* - Generic dropdown appearance
|
|
22
|
-
* - No distinction between fonts
|
|
23
|
-
*/ /**
|
|
24
|
-
* AFTER (Custom Font Selector):
|
|
25
|
-
*
|
|
26
|
-
* ┌────────────────────────────────────┐
|
|
27
|
-
* │ Body font │
|
|
28
|
-
* │ ┌────────────────────────────┐ │
|
|
29
|
-
* │ │ Inter ▼ │ │
|
|
30
|
-
* │ └────────────────────────────┘ │
|
|
31
|
-
* └────────────────────────────────────┘
|
|
32
|
-
*
|
|
33
|
-
* Opens dropdown:
|
|
34
|
-
*
|
|
35
|
-
* ┌────────────────────────────────────┐
|
|
36
|
-
* │ ✓ Inter │
|
|
37
|
-
* │ The quick brown fox jumps... │
|
|
38
|
-
* │ (rendered in Inter font) │
|
|
39
|
-
* ├────────────────────────────────────┤
|
|
40
|
-
* │ Roboto │
|
|
41
|
-
* │ The quick brown fox jumps... │
|
|
42
|
-
* │ (rendered in Roboto font) │
|
|
43
|
-
* ├────────────────────────────────────┤
|
|
44
|
-
* │ Playfair Display │
|
|
45
|
-
* │ The quick brown fox jumps... │
|
|
46
|
-
* │ (rendered in Playfair font) │
|
|
47
|
-
* └────────────────────────────────────┘
|
|
48
|
-
*
|
|
49
|
-
* Features:
|
|
50
|
-
* ✅ Live font preview
|
|
51
|
-
* ✅ Check mark on selected
|
|
52
|
-
* ✅ Hover effects
|
|
53
|
-
* ✅ Smooth transitions
|
|
54
|
-
* ✅ Font category badges
|
|
55
|
-
*/ /**
|
|
56
|
-
* Color Picker BEFORE (Inline Popover):
|
|
57
|
-
*
|
|
58
|
-
* ┌────────────────────────────────┐
|
|
59
|
-
* │ Primary color │
|
|
60
|
-
* │ ┌───┐ #3b82f6 │
|
|
61
|
-
* │ │███│ ──────────── │
|
|
62
|
-
* │ └───┘ │
|
|
63
|
-
* │ ┌──────────────────┐ │
|
|
64
|
-
* │ │ Color Picker │ │
|
|
65
|
-
* │ │ [Hex Wheel] │ │
|
|
66
|
-
* │ │ #3b82f6 │ │
|
|
67
|
-
* │ └──────────────────┘ │
|
|
68
|
-
* └────────────────────────────────┘
|
|
69
|
-
*
|
|
70
|
-
* Issues:
|
|
71
|
-
* - Takes up inline space
|
|
72
|
-
* - Hard to use on mobile
|
|
73
|
-
* - No quick color swatches
|
|
74
|
-
* - Click-outside handling complex
|
|
75
|
-
*/ /**
|
|
76
|
-
* Color Picker AFTER (Modal Drawer):
|
|
77
|
-
*
|
|
78
|
-
* Field:
|
|
79
|
-
* ┌────────────────────────────────┐
|
|
80
|
-
* │ Primary color │
|
|
81
|
-
* │ ┌───┐ #3b82f6 │
|
|
82
|
-
* │ │███│ ──────────── │
|
|
83
|
-
* │ └───┘ │
|
|
84
|
-
* └────────────────────────────────┘
|
|
85
|
-
*
|
|
86
|
-
* Click swatch → Opens Modal:
|
|
87
|
-
*
|
|
88
|
-
* ╔════════════════════════════════╗
|
|
89
|
-
* ║ Choose Primary color [×] ║
|
|
90
|
-
* ╠════════════════════════════════╣
|
|
91
|
-
* ║ ║
|
|
92
|
-
* ║ ┌────────────────────┐ ║
|
|
93
|
-
* ║ │ │ ║
|
|
94
|
-
* ║ │ [Color Wheel] │ ║
|
|
95
|
-
* ║ │ │ ║
|
|
96
|
-
* ║ └────────────────────┘ ║
|
|
97
|
-
* ║ ║
|
|
98
|
-
* ║ #3b82f6 [Done] ║
|
|
99
|
-
* ║ ║
|
|
100
|
-
* ║ Quick Colors: ║
|
|
101
|
-
* ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║
|
|
102
|
-
* ║ │██│██│██│██│██│██│██│██│ ║
|
|
103
|
-
* ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║
|
|
104
|
-
* ║ ║
|
|
105
|
-
* ╚════════════════════════════════╝
|
|
106
|
-
*
|
|
107
|
-
* Features:
|
|
108
|
-
* ✅ Full-screen modal (Payload Drawer)
|
|
109
|
-
* ✅ Larger color picker (220px)
|
|
110
|
-
* ✅ Quick color swatches
|
|
111
|
-
* ✅ Better mobile UX
|
|
112
|
-
* ✅ Escape key to close
|
|
113
|
-
*/ /**
|
|
114
|
-
* Theme Preset Selector (Already Had Swatches!):
|
|
115
|
-
*
|
|
116
|
-
* ┌─────────────────────────────────────┐
|
|
117
|
-
* │ Cool & Professional ●●●●● │
|
|
118
|
-
* │ cool │
|
|
119
|
-
* ├─────────────────────────────────────┤
|
|
120
|
-
* │ Warm & Inviting ●●●●● │
|
|
121
|
-
* │ warm │
|
|
122
|
-
* ├─────────────────────────────────────┤
|
|
123
|
-
* │ Dark & Modern ●●●●● │
|
|
124
|
-
* │ dark │
|
|
125
|
-
* └─────────────────────────────────────┘
|
|
126
|
-
*
|
|
127
|
-
* Legend:
|
|
128
|
-
* ● = Color swatch for:
|
|
129
|
-
* - Primary
|
|
130
|
-
* - Secondary
|
|
131
|
-
* - Accent
|
|
132
|
-
* - Background
|
|
133
|
-
* - Foreground
|
|
134
|
-
*/ export const examples = {
|
|
135
|
-
fontSelector: {
|
|
136
|
-
before: 'Standard dropdown with no preview',
|
|
137
|
-
after: 'Custom component with live font rendering'
|
|
138
|
-
},
|
|
139
|
-
colorPicker: {
|
|
140
|
-
before: 'Inline popover',
|
|
141
|
-
after: 'Modal drawer with quick swatches'
|
|
142
|
-
},
|
|
143
|
-
themePresets: {
|
|
144
|
-
status: 'Already implemented with color swatches!'
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
//# sourceMappingURL=VISUAL_EXAMPLES.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fields/VISUAL_EXAMPLES.ts"],"sourcesContent":["/**\n * Enhanced Font Selector - Visual Examples\n *\n * This file demonstrates how the font selector appears with actual fonts\n */\n\n/**\n * BEFORE (Standard Payload Select):\n *\n * ┌──────────────────────────────┐\n * │ Body font ▼ │\n * ├──────────────────────────────┤\n * │ System │\n * │ Inter │\n * │ Roboto │\n * │ Open Sans │\n * │ ... │\n * └──────────────────────────────┘\n *\n * Issues:\n * - No visual preview of fonts\n * - Can't see how font looks\n * - Generic dropdown appearance\n * - No distinction between fonts\n */\n\n/**\n * AFTER (Custom Font Selector):\n *\n * ┌────────────────────────────────────┐\n * │ Body font │\n * │ ┌────────────────────────────┐ │\n * │ │ Inter ▼ │ │\n * │ └────────────────────────────┘ │\n * └────────────────────────────────────┘\n *\n * Opens dropdown:\n *\n * ┌────────────────────────────────────┐\n * │ ✓ Inter │\n * │ The quick brown fox jumps... │\n * │ (rendered in Inter font) │\n * ├────────────────────────────────────┤\n * │ Roboto │\n * │ The quick brown fox jumps... │\n * │ (rendered in Roboto font) │\n * ├────────────────────────────────────┤\n * │ Playfair Display │\n * │ The quick brown fox jumps... │\n * │ (rendered in Playfair font) │\n * └────────────────────────────────────┘\n *\n * Features:\n * ✅ Live font preview\n * ✅ Check mark on selected\n * ✅ Hover effects\n * ✅ Smooth transitions\n * ✅ Font category badges\n */\n\n/**\n * Color Picker BEFORE (Inline Popover):\n *\n * ┌────────────────────────────────┐\n * │ Primary color │\n * │ ┌───┐ #3b82f6 │\n * │ │███│ ──────────── │\n * │ └───┘ │\n * │ ┌──────────────────┐ │\n * │ │ Color Picker │ │\n * │ │ [Hex Wheel] │ │\n * │ │ #3b82f6 │ │\n * │ └──────────────────┘ │\n * └────────────────────────────────┘\n *\n * Issues:\n * - Takes up inline space\n * - Hard to use on mobile\n * - No quick color swatches\n * - Click-outside handling complex\n */\n\n/**\n * Color Picker AFTER (Modal Drawer):\n *\n * Field:\n * ┌────────────────────────────────┐\n * │ Primary color │\n * │ ┌───┐ #3b82f6 │\n * │ │███│ ──────────── │\n * │ └───┘ │\n * └────────────────────────────────┘\n *\n * Click swatch → Opens Modal:\n *\n * ╔════════════════════════════════╗\n * ║ Choose Primary color [×] ║\n * ╠════════════════════════════════╣\n * ║ ║\n * ║ ┌────────────────────┐ ║\n * ║ │ │ ║\n * ║ │ [Color Wheel] │ ║\n * ║ │ │ ║\n * ║ └────────────────────┘ ║\n * ║ ║\n * ║ #3b82f6 [Done] ║\n * ║ ║\n * ║ Quick Colors: ║\n * ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║\n * ║ │██│██│██│██│██│██│██│██│ ║\n * ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║\n * ║ ║\n * ╚════════════════════════════════╝\n *\n * Features:\n * ✅ Full-screen modal (Payload Drawer)\n * ✅ Larger color picker (220px)\n * ✅ Quick color swatches\n * ✅ Better mobile UX\n * ✅ Escape key to close\n */\n\n/**\n * Theme Preset Selector (Already Had Swatches!):\n *\n * ┌─────────────────────────────────────┐\n * │ Cool & Professional ●●●●● │\n * │ cool │\n * ├─────────────────────────────────────┤\n * │ Warm & Inviting ●●●●● │\n * │ warm │\n * ├─────────────────────────────────────┤\n * │ Dark & Modern ●●●●● │\n * │ dark │\n * └─────────────────────────────────────┘\n *\n * Legend:\n * ● = Color swatch for:\n * - Primary\n * - Secondary\n * - Accent\n * - Background\n * - Foreground\n */\n\nexport const examples = {\n fontSelector: {\n before: 'Standard dropdown with no preview',\n after: 'Custom component with live font rendering',\n },\n colorPicker: {\n before: 'Inline popover',\n after: 'Modal drawer with quick swatches',\n },\n themePresets: {\n status: 'Already implemented with color swatches!',\n },\n}\n"],"names":["examples","fontSelector","before","after","colorPicker","themePresets","status"],"mappings":"AAAA;;;;CAIC,GAED;;;;;;;;;;;;;;;;;;CAkBC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCC,GAED;;;;;;;;;;;;;;;;;;;;CAoBC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCC,GAED;;;;;;;;;;;;;;;;;;;;;CAqBC,GAED,OAAO,MAAMA,WAAW;IACtBC,cAAc;QACZC,QAAQ;QACRC,OAAO;IACT;IACAC,aAAa;QACXF,QAAQ;QACRC,OAAO;IACT;IACAE,cAAc;QACZC,QAAQ;IACV;AACF,EAAC"}
|