@kilivi/payloadcms-theme-management 0.1.6 → 0.1.7
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/README.md +97 -97
- package/dist/components/ServerThemeInjector.d.ts +1 -1
- package/dist/components/ServerThemeInjector.d.ts.map +1 -1
- package/dist/components/{ServerThemeInjector.jsx → ServerThemeInjector.js} +50 -37
- package/dist/components/ServerThemeInjector.js.map +1 -0
- package/dist/components/ThemePreview.js +318 -0
- package/dist/components/ThemePreview.js.map +1 -0
- package/dist/components/typographyPreviewUtils.js +12 -17
- package/dist/components/typographyPreviewUtils.js.map +1 -1
- package/dist/constants/themeFonts.js +94 -24
- package/dist/constants/themeFonts.js.map +1 -1
- package/dist/fields/ColorPickerField.js +332 -0
- package/dist/fields/ColorPickerField.js.map +1 -0
- package/dist/fields/RadiusField.js +174 -0
- package/dist/fields/RadiusField.js.map +1 -0
- package/dist/fields/ThemeColorPickerField.css +138 -138
- package/dist/fields/ThemeColorPickerField.js +163 -0
- package/dist/fields/ThemeColorPickerField.js.map +1 -0
- package/dist/fields/ThemePreviewField.js +558 -0
- package/dist/fields/ThemePreviewField.js.map +1 -0
- package/dist/fields/ThemeTokenSelectField.js +209 -0
- package/dist/fields/ThemeTokenSelectField.js.map +1 -0
- package/dist/fields/colorModeFields.js +167 -73
- package/dist/fields/colorModeFields.js.map +1 -1
- package/dist/fields/themeConfigurationField.d.ts +1 -1
- package/dist/fields/themeConfigurationField.d.ts.map +1 -1
- package/dist/fields/themeConfigurationField.js +227 -134
- package/dist/fields/themeConfigurationField.js.map +1 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -52
- package/dist/index.js.map +1 -1
- package/dist/payload-types.js +5 -5
- package/dist/payload-types.js.map +1 -1
- package/dist/plugin.d.ts +1 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +2 -1
- package/dist/plugin.js.map +1 -1
- package/dist/presets.js +66 -65
- package/dist/presets.js.map +1 -1
- package/dist/providers/Theme/index.d.ts +1 -1
- package/dist/providers/Theme/index.d.ts.map +1 -1
- package/dist/providers/Theme/{index.jsx → index.js} +61 -31
- package/dist/providers/Theme/index.js.map +1 -0
- package/dist/providers/Theme/shared.d.ts +1 -1
- package/dist/providers/Theme/shared.d.ts.map +1 -1
- package/dist/providers/Theme/shared.js +34 -9
- package/dist/providers/Theme/shared.js.map +1 -1
- package/dist/providers/Theme/themeConfig.d.ts +1 -1
- package/dist/providers/Theme/themeConfig.d.ts.map +1 -1
- package/dist/providers/Theme/themeConfig.js +37 -36
- package/dist/providers/Theme/themeConfig.js.map +1 -1
- package/dist/providers/Theme/types.js +15 -13
- package/dist/providers/Theme/types.js.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/dist/src/--verbose/dist/fields/ThemeColorPickerField.scss +138 -0
- package/dist/src/dist/fields/ThemeColorPickerField.scss +138 -0
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/resolveThemeConfiguration.d.ts +3 -3
- package/dist/utils/resolveThemeConfiguration.d.ts.map +1 -1
- package/dist/utils/resolveThemeConfiguration.js +53 -34
- package/dist/utils/resolveThemeConfiguration.js.map +1 -1
- package/dist/utils/themeAssets.d.ts +1 -1
- package/dist/utils/themeAssets.d.ts.map +1 -1
- package/dist/utils/themeAssets.js +4 -4
- package/dist/utils/themeAssets.js.map +1 -1
- package/dist/utils/themeColors.js +95 -41
- package/dist/utils/themeColors.js.map +1 -1
- package/dist/utils/themeUtils.d.ts +2 -2
- package/dist/utils/themeUtils.d.ts.map +1 -1
- package/dist/utils/themeUtils.js +38 -53
- package/dist/utils/themeUtils.js.map +1 -1
- package/package.json +13 -5
- package/dist/components/ServerThemeInjector.jsx.map +0 -1
- package/dist/components/ThemePreview.jsx +0 -231
- package/dist/components/ThemePreview.jsx.map +0 -1
- package/dist/fields/ColorPickerField.jsx +0 -205
- package/dist/fields/ColorPickerField.jsx.map +0 -1
- package/dist/fields/RadiusField.jsx +0 -123
- package/dist/fields/RadiusField.jsx.map +0 -1
- package/dist/fields/ThemeColorPickerField.jsx +0 -110
- package/dist/fields/ThemeColorPickerField.jsx.map +0 -1
- package/dist/fields/ThemePreviewField.jsx +0 -420
- package/dist/fields/ThemePreviewField.jsx.map +0 -1
- package/dist/fields/ThemeTokenSelectField.jsx +0 -151
- package/dist/fields/ThemeTokenSelectField.jsx.map +0 -1
- package/dist/providers/Theme/index.jsx.map +0 -1
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { BASE_FONT_SIZE_OPTIONS, BODY_FONT_OPTIONS, HEADING_FONT_OPTIONS, LINE_HEIGHT_OPTIONS
|
|
2
|
-
import { darkModeField, lightModeField } from './colorModeFields';
|
|
3
|
-
/**
|
|
4
|
-
* Theme Configuration Field with Theme Selection as default value setter
|
|
5
|
-
* Theme Selection populates lightMode/darkMode colors automatically
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const themeOptions = themePresets.map((preset) => {
|
|
1
|
+
import { BASE_FONT_SIZE_OPTIONS, BODY_FONT_OPTIONS, HEADING_FONT_OPTIONS, LINE_HEIGHT_OPTIONS } from '../constants/themeFonts.js';
|
|
2
|
+
import { darkModeField, lightModeField } from './colorModeFields.js';
|
|
3
|
+
/**
|
|
4
|
+
* Theme Configuration Field with Theme Selection as default value setter
|
|
5
|
+
* Theme Selection populates lightMode/darkMode colors automatically
|
|
6
|
+
*/ export function createThemeConfigurationField(options) {
|
|
7
|
+
const { themePresets, defaultTheme, includeColorModeToggle, includeCustomCSS, enableAdvancedFeatures = true } = options;
|
|
8
|
+
const themeOptions = themePresets.map((preset)=>{
|
|
10
9
|
const previewColor = preset.preview?.colors.primary;
|
|
11
10
|
const label = previewColor ? `${preset.label} • ${previewColor}` : preset.label;
|
|
12
11
|
return {
|
|
13
12
|
label,
|
|
14
|
-
value: preset.name
|
|
13
|
+
value: preset.name
|
|
15
14
|
};
|
|
16
15
|
});
|
|
17
16
|
const fields = [
|
|
@@ -23,18 +22,18 @@ export function createThemeConfigurationField(options) {
|
|
|
23
22
|
options: themeOptions,
|
|
24
23
|
label: {
|
|
25
24
|
en: '🎨 Theme Selection',
|
|
26
|
-
cs: '🎨 Výběr tématu'
|
|
25
|
+
cs: '🎨 Výběr tématu'
|
|
27
26
|
},
|
|
28
27
|
admin: {
|
|
29
28
|
description: {
|
|
30
29
|
en: 'Select a theme to auto-populate color values. You can customize colors after selection.',
|
|
31
|
-
cs: 'Vyberte téma pro automatické předvyplnění barev. Po výběru můžete barvy upravit.'
|
|
30
|
+
cs: 'Vyberte téma pro automatické předvyplnění barev. Po výběru můžete barvy upravit.'
|
|
32
31
|
},
|
|
33
32
|
components: {
|
|
34
|
-
Field: '@payloadcms-plugins/theme-management/fields/ThemePreviewField'
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
33
|
+
Field: '@payloadcms-plugins/theme-management/fields/ThemePreviewField'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
38
37
|
];
|
|
39
38
|
// Color Mode Settings
|
|
40
39
|
if (includeColorModeToggle) {
|
|
@@ -42,14 +41,14 @@ export function createThemeConfigurationField(options) {
|
|
|
42
41
|
type: 'collapsible',
|
|
43
42
|
label: {
|
|
44
43
|
en: '🌗 Color Mode Settings',
|
|
45
|
-
cs: '🌗 Nastavení barevného režimu'
|
|
44
|
+
cs: '🌗 Nastavení barevného režimu'
|
|
46
45
|
},
|
|
47
46
|
admin: {
|
|
48
47
|
initCollapsed: false,
|
|
49
48
|
description: {
|
|
50
49
|
en: 'Configure light and dark mode colors. Changes here override theme selection.',
|
|
51
|
-
cs: 'Nakonfigurujte barvy světlého a tmavého režimu. Změny zde přepíší výběr tématu.'
|
|
52
|
-
}
|
|
50
|
+
cs: 'Nakonfigurujte barvy světlého a tmavého režimu. Změny zde přepíší výběr tématu.'
|
|
51
|
+
}
|
|
53
52
|
},
|
|
54
53
|
fields: [
|
|
55
54
|
{
|
|
@@ -60,69 +59,75 @@ export function createThemeConfigurationField(options) {
|
|
|
60
59
|
type: 'select',
|
|
61
60
|
label: {
|
|
62
61
|
en: 'Default Color Mode',
|
|
63
|
-
cs: 'Výchozí barevný režim'
|
|
62
|
+
cs: 'Výchozí barevný režim'
|
|
64
63
|
},
|
|
65
64
|
defaultValue: 'auto',
|
|
66
65
|
options: [
|
|
67
66
|
{
|
|
68
67
|
label: {
|
|
69
68
|
en: 'Auto (System)',
|
|
70
|
-
cs: 'Automaticky (Systém)'
|
|
69
|
+
cs: 'Automaticky (Systém)'
|
|
71
70
|
},
|
|
72
|
-
value: 'auto'
|
|
71
|
+
value: 'auto'
|
|
73
72
|
},
|
|
74
73
|
{
|
|
75
|
-
label: {
|
|
76
|
-
|
|
74
|
+
label: {
|
|
75
|
+
en: 'Light',
|
|
76
|
+
cs: 'Světlý'
|
|
77
|
+
},
|
|
78
|
+
value: 'light'
|
|
77
79
|
},
|
|
78
80
|
{
|
|
79
|
-
label: {
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
label: {
|
|
82
|
+
en: 'Dark',
|
|
83
|
+
cs: 'Tmavý'
|
|
84
|
+
},
|
|
85
|
+
value: 'dark'
|
|
86
|
+
}
|
|
82
87
|
],
|
|
83
88
|
admin: {
|
|
84
89
|
description: {
|
|
85
90
|
en: 'Default color mode for visitors',
|
|
86
|
-
cs: 'Výchozí barevný režim pro návštěvníky'
|
|
91
|
+
cs: 'Výchozí barevný režim pro návštěvníky'
|
|
87
92
|
},
|
|
88
|
-
width: '50%'
|
|
89
|
-
}
|
|
93
|
+
width: '50%'
|
|
94
|
+
}
|
|
90
95
|
},
|
|
91
96
|
{
|
|
92
97
|
name: 'allowColorModeToggle',
|
|
93
98
|
type: 'checkbox',
|
|
94
99
|
label: {
|
|
95
100
|
en: 'Enable Mode Toggle',
|
|
96
|
-
cs: 'Povolit přepínač režimu'
|
|
101
|
+
cs: 'Povolit přepínač režimu'
|
|
97
102
|
},
|
|
98
103
|
defaultValue: true,
|
|
99
104
|
admin: {
|
|
100
105
|
description: {
|
|
101
106
|
en: 'Let visitors switch modes',
|
|
102
|
-
cs: 'Umožnit návštěvníkům přepínat režimy'
|
|
107
|
+
cs: 'Umožnit návštěvníkům přepínat režimy'
|
|
103
108
|
},
|
|
104
|
-
width: '50%'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
]
|
|
109
|
+
width: '50%'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
108
113
|
},
|
|
109
114
|
lightModeField,
|
|
110
|
-
darkModeField
|
|
111
|
-
]
|
|
115
|
+
darkModeField
|
|
116
|
+
]
|
|
112
117
|
});
|
|
113
118
|
}
|
|
114
119
|
fields.push({
|
|
115
120
|
type: 'collapsible',
|
|
116
121
|
label: {
|
|
117
122
|
en: '🅰️ Typography',
|
|
118
|
-
cs: '🅰️ Typografie'
|
|
123
|
+
cs: '🅰️ Typografie'
|
|
119
124
|
},
|
|
120
125
|
admin: {
|
|
121
126
|
initCollapsed: true,
|
|
122
127
|
description: {
|
|
123
128
|
en: 'Choose font families and base typography settings. Leave fields on "Use preset" to inherit the theme defaults.',
|
|
124
|
-
cs: 'Zvolte rodiny písem a základní typografické nastavení. Hodnota "Použít výchozí" zachová nastavení motivu.'
|
|
125
|
-
}
|
|
129
|
+
cs: 'Zvolte rodiny písem a základní typografické nastavení. Hodnota "Použít výchozí" zachová nastavení motivu.'
|
|
130
|
+
}
|
|
126
131
|
},
|
|
127
132
|
fields: [
|
|
128
133
|
{
|
|
@@ -137,34 +142,34 @@ export function createThemeConfigurationField(options) {
|
|
|
137
142
|
type: 'select',
|
|
138
143
|
label: {
|
|
139
144
|
en: 'Body font',
|
|
140
|
-
cs: 'Písmo pro text'
|
|
145
|
+
cs: 'Písmo pro text'
|
|
141
146
|
},
|
|
142
147
|
defaultValue: 'preset',
|
|
143
|
-
options: BODY_FONT_OPTIONS.map((option)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
options: BODY_FONT_OPTIONS.map((option)=>({
|
|
149
|
+
label: option.label,
|
|
150
|
+
value: option.value
|
|
151
|
+
})),
|
|
147
152
|
admin: {
|
|
148
|
-
width: '50%'
|
|
149
|
-
}
|
|
153
|
+
width: '50%'
|
|
154
|
+
}
|
|
150
155
|
},
|
|
151
156
|
{
|
|
152
157
|
name: 'headingFont',
|
|
153
158
|
type: 'select',
|
|
154
159
|
label: {
|
|
155
160
|
en: 'Heading font',
|
|
156
|
-
cs: 'Písmo pro nadpisy'
|
|
161
|
+
cs: 'Písmo pro nadpisy'
|
|
157
162
|
},
|
|
158
163
|
defaultValue: 'preset',
|
|
159
|
-
options: HEADING_FONT_OPTIONS.map((option)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
options: HEADING_FONT_OPTIONS.map((option)=>({
|
|
165
|
+
label: option.label,
|
|
166
|
+
value: option.value
|
|
167
|
+
})),
|
|
163
168
|
admin: {
|
|
164
|
-
width: '50%'
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
]
|
|
169
|
+
width: '50%'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
]
|
|
168
173
|
},
|
|
169
174
|
{
|
|
170
175
|
type: 'row',
|
|
@@ -174,36 +179,36 @@ export function createThemeConfigurationField(options) {
|
|
|
174
179
|
type: 'text',
|
|
175
180
|
label: {
|
|
176
181
|
en: 'Custom body font stack',
|
|
177
|
-
cs: 'Vlastní písmo pro text'
|
|
182
|
+
cs: 'Vlastní písmo pro text'
|
|
178
183
|
},
|
|
179
184
|
admin: {
|
|
180
185
|
width: '50%',
|
|
181
186
|
placeholder: '"IBM Plex Sans", sans-serif',
|
|
182
187
|
description: {
|
|
183
188
|
en: 'Provide full CSS font-family stack when using a custom font.',
|
|
184
|
-
cs: 'Při volbě vlastního písma zadejte celý CSS zápis font-family.'
|
|
189
|
+
cs: 'Při volbě vlastního písma zadejte celý CSS zápis font-family.'
|
|
185
190
|
},
|
|
186
|
-
condition: (_, siblingData)
|
|
187
|
-
}
|
|
191
|
+
condition: (_, siblingData)=>siblingData?.bodyFont === 'custom'
|
|
192
|
+
}
|
|
188
193
|
},
|
|
189
194
|
{
|
|
190
195
|
name: 'headingFontCustom',
|
|
191
196
|
type: 'text',
|
|
192
197
|
label: {
|
|
193
198
|
en: 'Custom heading font stack',
|
|
194
|
-
cs: 'Vlastní písmo pro nadpisy'
|
|
199
|
+
cs: 'Vlastní písmo pro nadpisy'
|
|
195
200
|
},
|
|
196
201
|
admin: {
|
|
197
202
|
width: '50%',
|
|
198
203
|
placeholder: '"Cormorant Garamond", serif',
|
|
199
204
|
description: {
|
|
200
205
|
en: 'Provide full CSS font-family stack when using a custom heading font.',
|
|
201
|
-
cs: 'Při volbě vlastního nadpisového písma zadejte celý CSS zápis font-family.'
|
|
206
|
+
cs: 'Při volbě vlastního nadpisového písma zadejte celý CSS zápis font-family.'
|
|
202
207
|
},
|
|
203
|
-
condition: (_, siblingData)
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
]
|
|
208
|
+
condition: (_, siblingData)=>siblingData?.headingFont === 'custom'
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
]
|
|
207
212
|
},
|
|
208
213
|
{
|
|
209
214
|
type: 'row',
|
|
@@ -213,48 +218,48 @@ export function createThemeConfigurationField(options) {
|
|
|
213
218
|
type: 'select',
|
|
214
219
|
label: {
|
|
215
220
|
en: 'Base font size',
|
|
216
|
-
cs: 'Základní velikost písma'
|
|
221
|
+
cs: 'Základní velikost písma'
|
|
217
222
|
},
|
|
218
223
|
defaultValue: 'preset',
|
|
219
|
-
options: BASE_FONT_SIZE_OPTIONS.map((option)
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
options: BASE_FONT_SIZE_OPTIONS.map((option)=>({
|
|
225
|
+
label: option.label,
|
|
226
|
+
value: option.value
|
|
227
|
+
})),
|
|
223
228
|
admin: {
|
|
224
|
-
width: '50%'
|
|
225
|
-
}
|
|
229
|
+
width: '50%'
|
|
230
|
+
}
|
|
226
231
|
},
|
|
227
232
|
{
|
|
228
233
|
name: 'lineHeight',
|
|
229
234
|
type: 'select',
|
|
230
235
|
label: {
|
|
231
236
|
en: 'Line height',
|
|
232
|
-
cs: 'Řádkování'
|
|
237
|
+
cs: 'Řádkování'
|
|
233
238
|
},
|
|
234
239
|
defaultValue: 'preset',
|
|
235
|
-
options: LINE_HEIGHT_OPTIONS.map((option)
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
240
|
+
options: LINE_HEIGHT_OPTIONS.map((option)=>({
|
|
241
|
+
label: option.label,
|
|
242
|
+
value: option.value
|
|
243
|
+
})),
|
|
239
244
|
admin: {
|
|
240
|
-
width: '50%'
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
]
|
|
244
|
-
}
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
]
|
|
245
|
+
width: '50%'
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
]
|
|
248
253
|
});
|
|
249
254
|
// Design Customization
|
|
250
255
|
fields.push({
|
|
251
256
|
type: 'collapsible',
|
|
252
257
|
label: {
|
|
253
258
|
en: '✨ Design Customization',
|
|
254
|
-
cs: '✨ Přizpůsobení designu'
|
|
259
|
+
cs: '✨ Přizpůsobení designu'
|
|
255
260
|
},
|
|
256
261
|
admin: {
|
|
257
|
-
initCollapsed: true
|
|
262
|
+
initCollapsed: true
|
|
258
263
|
},
|
|
259
264
|
fields: [
|
|
260
265
|
{
|
|
@@ -262,58 +267,124 @@ export function createThemeConfigurationField(options) {
|
|
|
262
267
|
type: 'select',
|
|
263
268
|
label: {
|
|
264
269
|
en: 'Border Radius',
|
|
265
|
-
cs: 'Zaoblení rohů'
|
|
270
|
+
cs: 'Zaoblení rohů'
|
|
266
271
|
},
|
|
267
272
|
defaultValue: 'medium',
|
|
268
273
|
options: [
|
|
269
|
-
{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
{
|
|
275
|
+
label: {
|
|
276
|
+
en: 'None',
|
|
277
|
+
cs: 'Žádné'
|
|
278
|
+
},
|
|
279
|
+
value: 'none'
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
label: {
|
|
283
|
+
en: 'Small',
|
|
284
|
+
cs: 'Malé'
|
|
285
|
+
},
|
|
286
|
+
value: 'small'
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: {
|
|
290
|
+
en: 'Medium',
|
|
291
|
+
cs: 'Střední'
|
|
292
|
+
},
|
|
293
|
+
value: 'medium'
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
label: {
|
|
297
|
+
en: 'Large',
|
|
298
|
+
cs: 'Velké'
|
|
299
|
+
},
|
|
300
|
+
value: 'large'
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
label: {
|
|
304
|
+
en: 'Full',
|
|
305
|
+
cs: 'Plné'
|
|
306
|
+
},
|
|
307
|
+
value: 'xl'
|
|
308
|
+
}
|
|
274
309
|
],
|
|
275
310
|
admin: {
|
|
276
311
|
components: {
|
|
277
|
-
Field: '@payloadcms-plugins/theme-management/fields/RadiusField'
|
|
312
|
+
Field: '@payloadcms-plugins/theme-management/fields/RadiusField'
|
|
278
313
|
},
|
|
279
|
-
width: '33%'
|
|
280
|
-
}
|
|
314
|
+
width: '33%'
|
|
315
|
+
}
|
|
281
316
|
},
|
|
282
317
|
{
|
|
283
318
|
name: 'fontScale',
|
|
284
319
|
type: 'select',
|
|
285
320
|
label: {
|
|
286
321
|
en: 'Font Scale',
|
|
287
|
-
cs: 'Velikost písma'
|
|
322
|
+
cs: 'Velikost písma'
|
|
288
323
|
},
|
|
289
324
|
defaultValue: 'medium',
|
|
290
325
|
options: [
|
|
291
|
-
{
|
|
292
|
-
|
|
293
|
-
|
|
326
|
+
{
|
|
327
|
+
label: {
|
|
328
|
+
en: 'Small',
|
|
329
|
+
cs: 'Malé'
|
|
330
|
+
},
|
|
331
|
+
value: 'small'
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
label: {
|
|
335
|
+
en: 'Medium',
|
|
336
|
+
cs: 'Střední'
|
|
337
|
+
},
|
|
338
|
+
value: 'medium'
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
label: {
|
|
342
|
+
en: 'Large',
|
|
343
|
+
cs: 'Velké'
|
|
344
|
+
},
|
|
345
|
+
value: 'large'
|
|
346
|
+
}
|
|
294
347
|
],
|
|
295
348
|
admin: {
|
|
296
|
-
width: '33%'
|
|
297
|
-
}
|
|
349
|
+
width: '33%'
|
|
350
|
+
}
|
|
298
351
|
},
|
|
299
352
|
{
|
|
300
353
|
name: 'spacing',
|
|
301
354
|
type: 'select',
|
|
302
355
|
label: {
|
|
303
356
|
en: 'Spacing',
|
|
304
|
-
cs: 'Mezery'
|
|
357
|
+
cs: 'Mezery'
|
|
305
358
|
},
|
|
306
359
|
defaultValue: 'medium',
|
|
307
360
|
options: [
|
|
308
|
-
{
|
|
309
|
-
|
|
310
|
-
|
|
361
|
+
{
|
|
362
|
+
label: {
|
|
363
|
+
en: 'Compact',
|
|
364
|
+
cs: 'Kompaktní'
|
|
365
|
+
},
|
|
366
|
+
value: 'compact'
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
label: {
|
|
370
|
+
en: 'Medium',
|
|
371
|
+
cs: 'Střední'
|
|
372
|
+
},
|
|
373
|
+
value: 'medium'
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
label: {
|
|
377
|
+
en: 'Spacious',
|
|
378
|
+
cs: 'Prostorné'
|
|
379
|
+
},
|
|
380
|
+
value: 'spacious'
|
|
381
|
+
}
|
|
311
382
|
],
|
|
312
383
|
admin: {
|
|
313
|
-
width: '34%'
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
]
|
|
384
|
+
width: '34%'
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
]
|
|
317
388
|
});
|
|
318
389
|
// Advanced Settings
|
|
319
390
|
if (enableAdvancedFeatures) {
|
|
@@ -323,23 +394,47 @@ export function createThemeConfigurationField(options) {
|
|
|
323
394
|
type: 'select',
|
|
324
395
|
label: {
|
|
325
396
|
en: 'Animation Level',
|
|
326
|
-
cs: 'Úroveň animací'
|
|
397
|
+
cs: 'Úroveň animací'
|
|
327
398
|
},
|
|
328
399
|
defaultValue: 'medium',
|
|
329
400
|
options: [
|
|
330
|
-
{
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
401
|
+
{
|
|
402
|
+
label: {
|
|
403
|
+
en: 'None',
|
|
404
|
+
cs: 'Žádné'
|
|
405
|
+
},
|
|
406
|
+
value: 'none'
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
label: {
|
|
410
|
+
en: 'Reduced',
|
|
411
|
+
cs: 'Snížené'
|
|
412
|
+
},
|
|
413
|
+
value: 'reduced'
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
label: {
|
|
417
|
+
en: 'Medium',
|
|
418
|
+
cs: 'Střední'
|
|
419
|
+
},
|
|
420
|
+
value: 'medium'
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
label: {
|
|
424
|
+
en: 'High',
|
|
425
|
+
cs: 'Vysoké'
|
|
426
|
+
},
|
|
427
|
+
value: 'high'
|
|
428
|
+
}
|
|
334
429
|
],
|
|
335
430
|
admin: {
|
|
336
431
|
description: {
|
|
337
432
|
en: 'Control website animations and transitions',
|
|
338
|
-
cs: 'Kontrola animací a přechodů na webu'
|
|
433
|
+
cs: 'Kontrola animací a přechodů na webu'
|
|
339
434
|
},
|
|
340
|
-
width: '50%'
|
|
341
|
-
}
|
|
342
|
-
}
|
|
435
|
+
width: '50%'
|
|
436
|
+
}
|
|
437
|
+
}
|
|
343
438
|
];
|
|
344
439
|
if (includeCustomCSS) {
|
|
345
440
|
advancedFields.push({
|
|
@@ -347,30 +442,27 @@ export function createThemeConfigurationField(options) {
|
|
|
347
442
|
type: 'code',
|
|
348
443
|
label: {
|
|
349
444
|
en: 'Custom CSS',
|
|
350
|
-
cs: 'Vlastní CSS'
|
|
445
|
+
cs: 'Vlastní CSS'
|
|
351
446
|
},
|
|
352
447
|
admin: {
|
|
353
448
|
language: 'css',
|
|
354
449
|
description: {
|
|
355
450
|
en: 'Add custom CSS to override default styles',
|
|
356
|
-
cs: 'Přidejte vlastní CSS pro přepsání výchozích stylů'
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// ':root {\n --primary: #your-color;\n --border-radius: 8px;\n --font-family: "Your Font";\n}\n\n.custom-class {\n /* Your custom styles */\n}',
|
|
360
|
-
// rows: 8,
|
|
361
|
-
},
|
|
451
|
+
cs: 'Přidejte vlastní CSS pro přepsání výchozích stylů'
|
|
452
|
+
}
|
|
453
|
+
}
|
|
362
454
|
});
|
|
363
455
|
}
|
|
364
456
|
fields.push({
|
|
365
457
|
type: 'collapsible',
|
|
366
458
|
label: {
|
|
367
459
|
en: '⚙️ Advanced Settings',
|
|
368
|
-
cs: '⚙️ Pokročilé nastavení'
|
|
460
|
+
cs: '⚙️ Pokročilé nastavení'
|
|
369
461
|
},
|
|
370
462
|
admin: {
|
|
371
|
-
initCollapsed: true
|
|
463
|
+
initCollapsed: true
|
|
372
464
|
},
|
|
373
|
-
fields: advancedFields
|
|
465
|
+
fields: advancedFields
|
|
374
466
|
});
|
|
375
467
|
}
|
|
376
468
|
return {
|
|
@@ -380,10 +472,11 @@ export function createThemeConfigurationField(options) {
|
|
|
380
472
|
admin: {
|
|
381
473
|
description: {
|
|
382
474
|
en: 'Configure website appearance and styling',
|
|
383
|
-
cs: 'Nakonfigurujte vzhled a stylování webu'
|
|
384
|
-
}
|
|
475
|
+
cs: 'Nakonfigurujte vzhled a stylování webu'
|
|
476
|
+
}
|
|
385
477
|
},
|
|
386
|
-
fields
|
|
478
|
+
fields
|
|
387
479
|
};
|
|
388
480
|
}
|
|
481
|
+
|
|
389
482
|
//# sourceMappingURL=themeConfigurationField.js.map
|