@admin-layout/tailwind-design-pro 10.0.9-alpha.65 → 10.0.9-alpha.67

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.
Files changed (31) hide show
  1. package/lib/cdm-locales/en/settings.json +15 -1
  2. package/lib/cdm-locales/es/settings.json +16 -2
  3. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  4. package/lib/components/Layout/BasicLayout/index.js +47 -7
  5. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  6. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  7. package/lib/components/Layout/GlobalHeader/Header.js +50 -13
  8. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  9. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  10. package/lib/components/Layout/TailwindLayout.js +1 -1
  11. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  12. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  13. package/lib/components/SettingDrawer/RegionalSettings.js +697 -462
  14. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  15. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  16. package/lib/components/SettingDrawer/SettingDrawer.js +4 -24
  17. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  18. package/lib/config/constants.d.ts +1 -0
  19. package/lib/config/constants.d.ts.map +1 -1
  20. package/lib/config/constants.js +27 -1
  21. package/lib/config/constants.js.map +1 -1
  22. package/lib/config/env-config.d.ts +1 -0
  23. package/lib/config/env-config.d.ts.map +1 -1
  24. package/lib/config/env-config.js +5 -1
  25. package/lib/config/env-config.js.map +1 -1
  26. package/lib/machines/settingsMachine.d.ts.map +1 -1
  27. package/lib/machines/settingsMachine.js +62 -101
  28. package/lib/machines/settingsMachine.js.map +1 -1
  29. package/lib/machines/types.d.ts +9 -2
  30. package/lib/machines/types.d.ts.map +1 -1
  31. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import {SearchBarBehavior}from'../../machines/types.js';import {config}from'../../config/env-config.js';function RegionalSettings(props) {
1
+ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch/index.js';import {SearchBarBehavior}from'../../machines/types.js';import {config}from'../../config/env-config.js';import'@react-icons/all-files/fa/FaMoon.js';import'@react-icons/all-files/fa/FaSun.js';import'../../hooks/use-get-current-lat-long.js';import {useMediaQuery}from'../../hooks/useMediaQuery.js';function RegionalSettings(props) {
2
2
  const {
3
3
  t
4
4
  } = useTranslation('settings');
@@ -15,19 +15,66 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
15
15
  regions = {}
16
16
  } = settings?.routeSettings?.[currentRoute] || {};
17
17
  const [isHeaderExpanded, setIsHeaderExpanded] = React.useState(false);
18
- const contentRef = React.useRef(null);
19
- const [contentHeight, setContentHeight] = React.useState(0);
18
+ const [isBackgroundExpanded, setIsBackgroundExpanded] = React.useState(true);
19
+ const [activeBackgroundTab, setActiveBackgroundTab] = React.useState('desktop');
20
+ const [activeHeaderTab, setActiveHeaderTab] = React.useState('desktop');
21
+ const {
22
+ isMobile
23
+ } = useMediaQuery();
20
24
  const scrollThresholdConfig = JSON.parse(config.SCROLL_THRESHOLD);
21
- React.useEffect(() => {
22
- if (contentRef.current) {
23
- setContentHeight(contentRef.current.scrollHeight);
24
- }
25
- }, [regions.desktop?.header?.showHeader, regions.mobile?.header?.showHeader]);
25
+ const deviceType = isMobile ? 'mobile' : 'desktop';
26
26
  const handleRegionChange = (key, value) => {
27
27
  if (!changeSetting) return;
28
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.header`, {
29
+ ...regions[deviceType].header,
30
+ [key]: value
31
+ });
32
+ };
33
+ const handleRegionFooterChange = (key, value) => {
34
+ if (!changeSetting) return;
35
+ changeSetting(`routeSettings.${currentRoute}.regions.${deviceType}.footer`, {
36
+ ...regions[deviceType].footer,
37
+ [key]: value
38
+ });
39
+ };
40
+ const handleDesktopBackgroundChange = (property, value) => {
41
+ if (!changeSetting) return;
42
+ const desktopBackground = regions.desktop?.background || {
43
+ type: 'color',
44
+ color: 'inherit',
45
+ image: '',
46
+ video: '',
47
+ videoThumbnail: ''
48
+ };
28
49
  changeSetting(`routeSettings.${currentRoute}.regions`, {
29
50
  ...regions,
30
- [key]: value
51
+ desktop: {
52
+ ...regions.desktop,
53
+ background: {
54
+ ...desktopBackground,
55
+ [property]: value
56
+ }
57
+ }
58
+ });
59
+ };
60
+ const handleMobileBackgroundChange = (property, value) => {
61
+ if (!changeSetting) return;
62
+ const mobileBackground = regions.mobile?.background || {
63
+ type: 'color',
64
+ color: 'inherit',
65
+ image: '',
66
+ video: '',
67
+ videoThumbnail: ''
68
+ };
69
+ changeSetting(`routeSettings.${currentRoute}.regions`, {
70
+ ...regions,
71
+ mobile: {
72
+ ...regions.mobile,
73
+ background: {
74
+ ...mobileBackground,
75
+ [property]: value
76
+ }
77
+ }
31
78
  });
32
79
  };
33
80
  const handleDesktopHeaderChange = (element, value) => {
@@ -42,7 +89,6 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
42
89
  showActionButtons: true,
43
90
  position: 'fixed',
44
91
  height: '64px',
45
- backgroundColor: 'inherit',
46
92
  elevation: 2,
47
93
  showHeader: true,
48
94
  showMenu: true,
@@ -76,7 +122,6 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
76
122
  showActionButtons: true,
77
123
  position: 'fixed',
78
124
  height: '56px',
79
- backgroundColor: 'inherit',
80
125
  elevation: 2,
81
126
  showHeader: true,
82
127
  showMenu: true,
@@ -108,7 +153,6 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
108
153
  showActionButtons: true,
109
154
  position: 'fixed',
110
155
  height: '64px',
111
- backgroundColor: 'inherit',
112
156
  elevation: 2,
113
157
  showHeader: true,
114
158
  showMenu: true,
@@ -129,7 +173,6 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
129
173
  showActionButtons: true,
130
174
  position: 'fixed',
131
175
  height: '56px',
132
- backgroundColor: 'inherit',
133
176
  elevation: 2,
134
177
  showHeader: true,
135
178
  showMenu: true,
@@ -140,395 +183,663 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
140
183
  scrollThreshold: 50,
141
184
  fixedHeader: false
142
185
  };
143
- return jsxs("div", {
144
- children: [jsx("div", {
145
- className: "flex items-center mb-2",
146
- children: jsxs("button", {
147
- onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
148
- className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
149
- children: [jsx("svg", {
150
- className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isHeaderExpanded ? 'rotate-180' : ''}`,
151
- fill: "none",
152
- stroke: "currentColor",
153
- viewBox: "0 0 24 24",
154
- children: jsx("path", {
155
- strokeLinecap: "round",
156
- strokeLinejoin: "round",
157
- strokeWidth: 2,
158
- d: "M19 9l-7 7-7-7"
186
+ const desktopBackground = regions.desktop?.background || {
187
+ type: 'color',
188
+ color: 'inherit',
189
+ image: '',
190
+ video: '',
191
+ videoThumbnail: ''
192
+ };
193
+ const mobileBackground = regions.mobile?.background || {
194
+ type: 'color',
195
+ color: 'inherit',
196
+ image: '',
197
+ video: '',
198
+ videoThumbnail: ''
199
+ };
200
+ // Helper function to render background settings based on current active tab
201
+ const renderBackgroundSettings = () => {
202
+ const isDesktop = activeBackgroundTab === 'desktop';
203
+ const background = isDesktop ? desktopBackground : mobileBackground;
204
+ const handleBackgroundChange = isDesktop ? handleDesktopBackgroundChange : handleMobileBackgroundChange;
205
+ return jsxs(Fragment, {
206
+ children: [jsxs("div", {
207
+ className: "mb-4",
208
+ children: [jsx("p", {
209
+ className: "font-medium mb-2",
210
+ style: {
211
+ color: navTheme === 'dark' ? '#ffff' : 'black'
212
+ },
213
+ children: t('background_type')
214
+ }), jsxs("div", {
215
+ className: "flex mb-3 rounded-lg overflow-hidden border border-gray-200 divide-x divide-gray-200 bg-gray-50",
216
+ children: [jsxs("button", {
217
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background.type === 'color' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
218
+ onClick: () => handleBackgroundChange('type', 'color'),
219
+ children: [jsx("span", {
220
+ className: "mr-1",
221
+ children: jsxs("svg", {
222
+ xmlns: "http://www.w3.org/2000/svg",
223
+ width: "16",
224
+ height: "16",
225
+ viewBox: "0 0 24 24",
226
+ fill: "none",
227
+ stroke: "currentColor",
228
+ strokeWidth: "2",
229
+ strokeLinecap: "round",
230
+ strokeLinejoin: "round",
231
+ children: [jsx("circle", {
232
+ cx: "12",
233
+ cy: "12",
234
+ r: "10"
235
+ }), jsx("path", {
236
+ d: "M12 8v8M8 12h8"
237
+ })]
238
+ })
239
+ }), t('color')]
240
+ }), jsxs("button", {
241
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background.type === 'image' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
242
+ onClick: () => handleBackgroundChange('type', 'image'),
243
+ children: [jsx("span", {
244
+ className: "mr-1",
245
+ children: jsxs("svg", {
246
+ xmlns: "http://www.w3.org/2000/svg",
247
+ width: "16",
248
+ height: "16",
249
+ viewBox: "0 0 24 24",
250
+ fill: "none",
251
+ stroke: "currentColor",
252
+ strokeWidth: "2",
253
+ strokeLinecap: "round",
254
+ strokeLinejoin: "round",
255
+ children: [jsx("rect", {
256
+ x: "3",
257
+ y: "3",
258
+ width: "18",
259
+ height: "18",
260
+ rx: "2",
261
+ ry: "2"
262
+ }), jsx("circle", {
263
+ cx: "8.5",
264
+ cy: "8.5",
265
+ r: "1.5"
266
+ }), jsx("polyline", {
267
+ points: "21 15 16 10 5 21"
268
+ })]
269
+ })
270
+ }), t('image')]
271
+ }), jsxs("button", {
272
+ className: `flex-1 py-2 px-3 text-sm font-medium transition-colors duration-200 flex items-center justify-center ${background.type === 'video' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700 hover:bg-gray-100'}`,
273
+ onClick: () => handleBackgroundChange('type', 'video'),
274
+ children: [jsx("span", {
275
+ className: "mr-1",
276
+ children: jsxs("svg", {
277
+ xmlns: "http://www.w3.org/2000/svg",
278
+ width: "16",
279
+ height: "16",
280
+ viewBox: "0 0 24 24",
281
+ fill: "none",
282
+ stroke: "currentColor",
283
+ strokeWidth: "2",
284
+ strokeLinecap: "round",
285
+ strokeLinejoin: "round",
286
+ children: [jsx("polygon", {
287
+ points: "23 7 16 12 23 17 23 7"
288
+ }), jsx("rect", {
289
+ x: "1",
290
+ y: "5",
291
+ width: "15",
292
+ height: "14",
293
+ rx: "2",
294
+ ry: "2"
295
+ })]
296
+ })
297
+ }), t('video')]
298
+ })]
299
+ })]
300
+ }), background.type === 'color' && jsxs("div", {
301
+ className: "mb-4",
302
+ children: [jsx("p", {
303
+ className: "mb-2",
304
+ style: {
305
+ color: navTheme === 'dark' ? '#ffff' : 'black'
306
+ },
307
+ children: t('background_color')
308
+ }), jsxs("div", {
309
+ className: "flex items-center",
310
+ children: [jsx("div", {
311
+ className: "w-12 h-12 rounded-lg border border-gray-300 mr-3 flex-shrink-0 shadow-sm",
312
+ style: {
313
+ backgroundColor: background.color === 'inherit' ? '#ffffff' : background.color || '#ffffff'
314
+ }
315
+ }), jsx("div", {
316
+ className: "flex-grow",
317
+ children: jsx("input", {
318
+ type: "color",
319
+ value: background.color === 'inherit' ? '#ffffff' : background.color || '#ffffff',
320
+ onChange: e => handleBackgroundChange('color', e.target.value),
321
+ className: "w-full h-10 rounded cursor-pointer"
322
+ })
323
+ })]
324
+ }), jsx("div", {
325
+ className: "flex flex-wrap gap-2 mt-3",
326
+ children: ['#ffffff', '#f2f2f2', '#e6e6e6', '#1890ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'].map(color => jsx("button", {
327
+ className: `w-8 h-8 rounded-full border ${color === (background.color || '#ffffff') ? 'border-blue-500 border-2' : 'border-gray-300'}`,
328
+ style: {
329
+ backgroundColor: color
330
+ },
331
+ onClick: () => handleBackgroundChange('color', color),
332
+ "aria-label": `Select color ${color}`
333
+ }, color))
334
+ })]
335
+ }), background.type === 'image' && jsxs("div", {
336
+ className: "mb-2",
337
+ children: [jsx("div", {
338
+ className: "flex items-center mb-1",
339
+ children: jsx("p", {
340
+ style: {
341
+ color: navTheme === 'dark' ? '#ffff' : 'black'
342
+ },
343
+ children: t('image_url')
159
344
  })
160
- }), jsx("p", {
345
+ }), jsx("input", {
346
+ type: "text",
347
+ placeholder: t('image_url'),
348
+ value: background.image || '',
349
+ onChange: e => handleBackgroundChange('image', e.target.value),
350
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
351
+ }), background.image && jsx("div", {
352
+ className: "mt-2 p-1 border border-gray-300 rounded",
353
+ children: jsx("img", {
354
+ src: background.image,
355
+ alt: "Background preview",
356
+ className: "w-full h-24 object-cover",
357
+ onError: e => {
358
+ const target = e.target;
359
+ target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGNpcmNsZSBjeD0iOC41IiBjeT0iOC41IiByPSIxLjUiPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjIxIDEzLjg1IDE2IDEwLjk4IDgiIDE1Ij48L3BvbHlsaW5lPjwvc3ZnPg==';
360
+ }
361
+ })
362
+ })]
363
+ }), background.type === 'video' && jsxs("div", {
364
+ className: "mb-2",
365
+ children: [jsx("div", {
366
+ className: "flex items-center mb-1",
367
+ children: jsx("p", {
368
+ style: {
369
+ color: navTheme === 'dark' ? '#ffff' : 'black'
370
+ },
371
+ children: t('video_url')
372
+ })
373
+ }), jsx("input", {
374
+ type: "text",
375
+ placeholder: t('video_url'),
376
+ value: background.video || '',
377
+ onChange: e => handleBackgroundChange('video', e.target.value),
378
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
379
+ }), jsx("div", {
380
+ className: "flex items-center mt-3 mb-1",
381
+ children: jsx("p", {
382
+ style: {
383
+ color: navTheme === 'dark' ? '#ffff' : 'black'
384
+ },
385
+ children: t('video_thumbnail')
386
+ })
387
+ }), jsx("input", {
388
+ type: "text",
389
+ placeholder: t('video_thumbnail'),
390
+ value: background.videoThumbnail || '',
391
+ onChange: e => handleBackgroundChange('videoThumbnail', e.target.value),
392
+ className: "w-full p-1 text-sm border border-gray-300 rounded"
393
+ }), jsxs("div", {
394
+ className: "flex flex-wrap gap-2 mt-3",
395
+ children: [background.video && jsx("div", {
396
+ className: "mt-2 p-1 border border-gray-300 rounded w-full",
397
+ children: jsx("video", {
398
+ src: background.video,
399
+ controls: true,
400
+ className: "w-full h-24 object-cover",
401
+ poster: background.videoThumbnail || ''
402
+ })
403
+ }), !background.video && background.videoThumbnail && jsx("div", {
404
+ className: "mt-2 p-1 border border-gray-300 rounded w-full",
405
+ children: jsx("img", {
406
+ src: background.videoThumbnail,
407
+ alt: "Video thumbnail preview",
408
+ className: "w-full h-24 object-cover",
409
+ onError: e => {
410
+ const target = e.target;
411
+ target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5Z29uIHBvaW50cz0iMjMgNyAxNiAxMiAyMyAxNyAyMyA3Ij48L3BvbHlnb24+PHJlY3QgeD0iMSIgeT0iNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE0IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48L3N2Zz4=';
412
+ }
413
+ })
414
+ })]
415
+ })]
416
+ })]
417
+ });
418
+ };
419
+ // Helper function to render header settings based on current active tab
420
+ const renderHeaderSettings = () => {
421
+ const isDesktop = activeHeaderTab === 'desktop';
422
+ const header = isDesktop ? desktopHeader : mobileHeader;
423
+ const handleHeaderChange = isDesktop ? handleDesktopHeaderChange : handleMobileHeaderChange;
424
+ return jsxs("div", {
425
+ className: "space-y-2",
426
+ children: [jsxs("div", {
427
+ className: "flex items-center",
428
+ children: [jsx("p", {
429
+ style: {
430
+ color: navTheme === 'dark' ? '#ffff' : 'black'
431
+ },
432
+ children: t('show_header')
433
+ }), jsx("div", {
434
+ className: "flex-grow"
435
+ }), jsx(Switch, {
436
+ value: isDesktop ? regions.desktop?.header?.showHeader ?? true : regions.mobile?.header?.showHeader ?? true,
437
+ onChange: checked => handleHeaderChange('showHeader', checked)
438
+ })]
439
+ }), jsxs("div", {
440
+ className: "flex items-center",
441
+ children: [jsx("p", {
161
442
  style: {
162
443
  color: navTheme === 'dark' ? '#ffff' : 'black'
163
444
  },
164
- children: t('header')
445
+ children: t('fixed_header')
446
+ }), jsx("div", {
447
+ className: "flex-grow"
448
+ }), jsx(Switch, {
449
+ value: header.fixedHeader,
450
+ onChange: checked => handleHeaderChange('fixedHeader', checked)
165
451
  })]
166
- })
167
- }), jsx("div", {
168
- ref: contentRef,
169
- className: "overflow-hidden transition-all duration-300 ease-in-out",
170
- style: {
171
- maxHeight: isHeaderExpanded ? `${contentHeight + 50}px` : '0px',
172
- opacity: isHeaderExpanded ? 1 : 0
173
- },
174
- children: jsxs("div", {
175
- className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
452
+ }), jsxs("div", {
453
+ className: "flex items-center",
454
+ children: [jsx("p", {
455
+ style: {
456
+ color: navTheme === 'dark' ? '#ffff' : 'black'
457
+ },
458
+ children: t('show_logo')
459
+ }), jsx("div", {
460
+ className: "flex-grow"
461
+ }), jsx(Switch, {
462
+ value: header.showLogo,
463
+ onChange: checked => handleHeaderChange('showLogo', checked)
464
+ })]
465
+ }), jsxs("div", {
466
+ className: "flex items-center",
467
+ children: [jsx("p", {
468
+ style: {
469
+ color: navTheme === 'dark' ? '#ffff' : 'black'
470
+ },
471
+ children: t('show_search_slot')
472
+ }), jsx("div", {
473
+ className: "flex-grow"
474
+ }), jsx(Switch, {
475
+ value: header.showSearchSlot,
476
+ onChange: checked => handleHeaderChange('showSearchSlot', checked)
477
+ })]
478
+ }), jsxs("div", {
479
+ className: "flex items-center",
480
+ children: [jsx("p", {
481
+ style: {
482
+ color: navTheme === 'dark' ? '#ffff' : 'black'
483
+ },
484
+ children: t('show_right_content')
485
+ }), jsx("div", {
486
+ className: "flex-grow"
487
+ }), jsx(Switch, {
488
+ value: header.showRightContent,
489
+ onChange: checked => handleHeaderChange('showRightContent', checked)
490
+ })]
491
+ }), jsxs("div", {
492
+ className: "flex items-center",
493
+ children: [jsx("p", {
494
+ style: {
495
+ color: navTheme === 'dark' ? '#ffff' : 'black'
496
+ },
497
+ children: t('show_menu_toggle')
498
+ }), jsx("div", {
499
+ className: "flex-grow"
500
+ }), jsx(Switch, {
501
+ value: header.showMenuToggle,
502
+ onChange: checked => handleHeaderChange('showMenuToggle', checked)
503
+ })]
504
+ }), jsxs("div", {
505
+ className: "flex items-center",
506
+ children: [jsx("p", {
507
+ style: {
508
+ color: navTheme === 'dark' ? '#ffff' : 'black'
509
+ },
510
+ children: t('show_back_button')
511
+ }), jsx("div", {
512
+ className: "flex-grow"
513
+ }), jsx(Switch, {
514
+ value: header.showBackButton,
515
+ onChange: checked => handleHeaderChange('showBackButton', checked)
516
+ })]
517
+ }), jsxs("div", {
518
+ className: "flex items-center",
519
+ children: [jsx("p", {
520
+ style: {
521
+ color: navTheme === 'dark' ? '#ffff' : 'black'
522
+ },
523
+ children: t('show_page_title')
524
+ }), jsx("div", {
525
+ className: "flex-grow"
526
+ }), jsx(Switch, {
527
+ value: header.showPageTitle,
528
+ onChange: checked => handleHeaderChange('showPageTitle', checked)
529
+ })]
530
+ }), jsxs("div", {
531
+ className: "flex items-center",
532
+ children: [jsx("p", {
533
+ style: {
534
+ color: navTheme === 'dark' ? '#ffff' : 'black'
535
+ },
536
+ children: t('show_action_buttons')
537
+ }), jsx("div", {
538
+ className: "flex-grow"
539
+ }), jsx(Switch, {
540
+ value: header.showActionButtons,
541
+ onChange: checked => handleHeaderChange('showActionButtons', checked)
542
+ })]
543
+ })]
544
+ });
545
+ };
546
+ // Helper function to render search bar settings based on current active tab
547
+ const renderSearchBarSettings = () => {
548
+ const isDesktop = activeHeaderTab === 'desktop';
549
+ const header = isDesktop ? desktopHeader : mobileHeader;
550
+ const handleHeaderChange = isDesktop ? handleDesktopHeaderChange : handleMobileHeaderChange;
551
+ return jsxs("div", {
552
+ className: "space-y-2",
553
+ children: [jsxs("div", {
554
+ className: "flex items-center",
555
+ children: [jsx("p", {
556
+ style: {
557
+ color: navTheme === 'dark' ? '#ffff' : 'black'
558
+ },
559
+ children: t('search_bar')
560
+ }), jsx("div", {
561
+ className: "flex-grow"
562
+ }), jsx(Switch, {
563
+ value: header.searchBarRender,
564
+ onChange: checked => handleHeaderChange('searchBarRender', checked)
565
+ })]
566
+ }), jsxs("div", {
567
+ className: "flex items-center",
568
+ children: [jsx("p", {
569
+ style: {
570
+ color: navTheme === 'dark' ? '#ffff' : 'black'
571
+ },
572
+ children: t('search_bar_on_scroll')
573
+ }), jsx("div", {
574
+ className: "flex-grow"
575
+ }), jsx(Switch, {
576
+ value: header.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
577
+ onChange: checked => handleHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
578
+ })]
579
+ }), jsxs("div", {
580
+ className: "flex items-center",
581
+ children: [jsx("p", {
582
+ style: {
583
+ color: navTheme === 'dark' ? '#ffff' : 'black'
584
+ },
585
+ children: t('search_bar_overlay')
586
+ }), jsx("div", {
587
+ className: "flex-grow"
588
+ }), jsx(Switch, {
589
+ value: header.searchBarOverlay,
590
+ onChange: checked => handleHeaderChange('searchBarOverlay', checked)
591
+ })]
592
+ }), jsxs("div", {
593
+ className: "mb-4",
176
594
  children: [jsxs("div", {
177
- className: "mb-4",
595
+ className: "flex items-center justify-between mb-2",
178
596
  children: [jsx("p", {
179
- className: "font-medium mb-2",
180
597
  style: {
181
598
  color: navTheme === 'dark' ? '#ffff' : 'black'
182
599
  },
183
- children: t('desktop_settings')
600
+ children: t('scroll_threshold')
601
+ }), jsxs("span", {
602
+ className: "text-sm",
603
+ style: {
604
+ color: navTheme === 'dark' ? '#ffff' : 'black'
605
+ },
606
+ children: [header.scrollThreshold || scrollThresholdConfig.DEFAULT, "px"]
607
+ })]
608
+ }), jsxs("div", {
609
+ className: "relative",
610
+ children: [jsx("input", {
611
+ type: "range",
612
+ min: scrollThresholdConfig.MIN,
613
+ max: scrollThresholdConfig.MAX,
614
+ step: scrollThresholdConfig.STEP,
615
+ value: header.scrollThreshold || scrollThresholdConfig.DEFAULT,
616
+ onChange: e => handleHeaderChange('scrollThreshold', parseInt(e.target.value)),
617
+ className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
184
618
  }), jsxs("div", {
185
- className: "pl-4 space-y-2",
186
- children: [jsxs("div", {
187
- className: "flex items-center",
188
- children: [jsx("p", {
189
- style: {
190
- color: navTheme === 'dark' ? '#ffff' : 'black'
191
- },
192
- children: t('show_header')
193
- }), jsx("div", {
194
- className: "flex-grow"
195
- }), jsx(Switch, {
196
- value: regions.desktop?.header?.showHeader ?? true,
197
- onChange: checked => handleDesktopHeaderChange('showHeader', checked)
198
- })]
199
- }), jsxs("div", {
200
- className: "flex items-center",
201
- children: [jsx("p", {
202
- style: {
203
- color: navTheme === 'dark' ? '#ffff' : 'black'
204
- },
205
- children: t('fixed_header')
206
- }), jsx("div", {
207
- className: "flex-grow"
208
- }), jsx(Switch, {
209
- value: desktopHeader.fixedHeader,
210
- onChange: checked => handleDesktopHeaderChange('fixedHeader', checked)
211
- })]
212
- }), jsxs("div", {
213
- className: "flex items-center",
214
- children: [jsx("p", {
215
- style: {
216
- color: navTheme === 'dark' ? '#ffff' : 'black'
217
- },
218
- children: t('show_logo')
219
- }), jsx("div", {
220
- className: "flex-grow"
221
- }), jsx(Switch, {
222
- value: desktopHeader.showLogo,
223
- onChange: checked => handleDesktopHeaderChange('showLogo', checked)
224
- })]
225
- }), jsxs("div", {
226
- className: "flex items-center",
227
- children: [jsx("p", {
228
- style: {
229
- color: navTheme === 'dark' ? '#ffff' : 'black'
230
- },
231
- children: t('show_search_slot')
232
- }), jsx("div", {
233
- className: "flex-grow"
234
- }), jsx(Switch, {
235
- value: desktopHeader.showSearchSlot,
236
- onChange: checked => handleDesktopHeaderChange('showSearchSlot', checked)
237
- })]
238
- }), jsxs("div", {
239
- className: "flex items-center",
240
- children: [jsx("p", {
241
- style: {
242
- color: navTheme === 'dark' ? '#ffff' : 'black'
243
- },
244
- children: t('show_right_content')
245
- }), jsx("div", {
246
- className: "flex-grow"
247
- }), jsx(Switch, {
248
- value: desktopHeader.showRightContent,
249
- onChange: checked => handleDesktopHeaderChange('showRightContent', checked)
250
- })]
251
- }), jsxs("div", {
252
- className: "flex items-center",
253
- children: [jsx("p", {
254
- style: {
255
- color: navTheme === 'dark' ? '#ffff' : 'black'
256
- },
257
- children: t('show_menu_toggle')
258
- }), jsx("div", {
259
- className: "flex-grow"
260
- }), jsx(Switch, {
261
- value: desktopHeader.showMenuToggle,
262
- onChange: checked => handleDesktopHeaderChange('showMenuToggle', checked)
263
- })]
264
- }), jsxs("div", {
265
- className: "flex items-center",
266
- children: [jsx("p", {
267
- style: {
268
- color: navTheme === 'dark' ? '#ffff' : 'black'
269
- },
270
- children: t('show_back_button')
271
- }), jsx("div", {
272
- className: "flex-grow"
273
- }), jsx(Switch, {
274
- value: desktopHeader.showBackButton,
275
- onChange: checked => handleDesktopHeaderChange('showBackButton', checked)
276
- })]
277
- }), jsxs("div", {
278
- className: "flex items-center",
279
- children: [jsx("p", {
280
- style: {
281
- color: navTheme === 'dark' ? '#ffff' : 'black'
282
- },
283
- children: t('show_page_title')
284
- }), jsx("div", {
285
- className: "flex-grow"
286
- }), jsx(Switch, {
287
- value: desktopHeader.showPageTitle,
288
- onChange: checked => handleDesktopHeaderChange('showPageTitle', checked)
289
- })]
290
- }), jsxs("div", {
291
- className: "flex items-center",
292
- children: [jsx("p", {
293
- style: {
294
- color: navTheme === 'dark' ? '#ffff' : 'black'
295
- },
296
- children: t('show_action_buttons')
297
- }), jsx("div", {
298
- className: "flex-grow"
299
- }), jsx(Switch, {
300
- value: desktopHeader.showActionButtons,
301
- onChange: checked => handleDesktopHeaderChange('showActionButtons', checked)
302
- })]
619
+ className: "flex justify-between text-xs mt-2",
620
+ children: [jsxs("span", {
621
+ children: [scrollThresholdConfig.MIN, "px"]
622
+ }), jsxs("span", {
623
+ children: [scrollThresholdConfig.MAX / 2, "px"]
624
+ }), jsxs("span", {
625
+ children: [scrollThresholdConfig.MAX, "px"]
303
626
  })]
304
627
  })]
305
- }), jsxs("div", {
306
- className: "mt-6 mb-4",
307
- children: [jsx("p", {
308
- className: "font-medium mb-2",
628
+ })]
629
+ })]
630
+ });
631
+ };
632
+ return jsxs("div", {
633
+ children: [jsxs("div", {
634
+ children: [jsx("div", {
635
+ className: "flex items-center mb-2",
636
+ children: jsxs("button", {
637
+ onClick: () => setIsBackgroundExpanded(!isBackgroundExpanded),
638
+ className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
639
+ children: [jsx("svg", {
640
+ className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isBackgroundExpanded ? 'rotate-180' : ''}`,
641
+ fill: "none",
642
+ stroke: "currentColor",
643
+ viewBox: "0 0 24 24",
644
+ children: jsx("path", {
645
+ strokeLinecap: "round",
646
+ strokeLinejoin: "round",
647
+ strokeWidth: 2,
648
+ d: "M19 9l-7 7-7-7"
649
+ })
650
+ }), jsx("p", {
309
651
  style: {
310
652
  color: navTheme === 'dark' ? '#ffff' : 'black'
311
653
  },
312
- children: t('mobile_settings')
313
- }), jsxs("div", {
314
- className: "pl-4 space-y-2",
654
+ children: t('background')
655
+ })]
656
+ })
657
+ }), jsx("div", {
658
+ className: `grid transition-all duration-300 ease-in-out ${isBackgroundExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
659
+ children: jsx("div", {
660
+ className: "overflow-hidden",
661
+ children: jsxs("div", {
662
+ className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
315
663
  children: [jsxs("div", {
316
- className: "flex items-center",
317
- children: [jsx("p", {
318
- style: {
319
- color: navTheme === 'dark' ? '#ffff' : 'black'
320
- },
321
- children: t('show_header')
322
- }), jsx("div", {
323
- className: "flex-grow"
324
- }), jsx(Switch, {
325
- value: regions.mobile?.header?.showHeader ?? true,
326
- onChange: checked => handleMobileHeaderChange('showHeader', checked)
327
- })]
328
- }), jsxs("div", {
329
- className: "flex items-center",
330
- children: [jsx("p", {
331
- style: {
332
- color: navTheme === 'dark' ? '#ffff' : 'black'
333
- },
334
- children: t('fixed_header')
335
- }), jsx("div", {
336
- className: "flex-grow"
337
- }), jsx(Switch, {
338
- value: mobileHeader.fixedHeader,
339
- onChange: checked => handleMobileHeaderChange('fixedHeader', checked)
340
- })]
341
- }), jsxs("div", {
342
- className: "flex items-center",
343
- children: [jsx("p", {
344
- style: {
345
- color: navTheme === 'dark' ? '#ffff' : 'black'
346
- },
347
- children: t('show_logo')
348
- }), jsx("div", {
349
- className: "flex-grow"
350
- }), jsx(Switch, {
351
- value: mobileHeader.showLogo,
352
- onChange: checked => handleMobileHeaderChange('showLogo', checked)
353
- })]
354
- }), jsxs("div", {
355
- className: "flex items-center",
356
- children: [jsx("p", {
357
- style: {
358
- color: navTheme === 'dark' ? '#ffff' : 'black'
359
- },
360
- children: t('show_search_slot')
361
- }), jsx("div", {
362
- className: "flex-grow"
363
- }), jsx(Switch, {
364
- value: mobileHeader.showSearchSlot,
365
- onChange: checked => handleMobileHeaderChange('showSearchSlot', checked)
366
- })]
367
- }), jsxs("div", {
368
- className: "flex items-center",
369
- children: [jsx("p", {
370
- style: {
371
- color: navTheme === 'dark' ? '#ffff' : 'black'
372
- },
373
- children: t('show_right_content')
374
- }), jsx("div", {
375
- className: "flex-grow"
376
- }), jsx(Switch, {
377
- value: mobileHeader.showRightContent,
378
- onChange: checked => handleMobileHeaderChange('showRightContent', checked)
379
- })]
380
- }), jsxs("div", {
381
- className: "flex items-center",
382
- children: [jsx("p", {
383
- style: {
384
- color: navTheme === 'dark' ? '#ffff' : 'black'
385
- },
386
- children: t('show_menu_toggle')
387
- }), jsx("div", {
388
- className: "flex-grow"
389
- }), jsx(Switch, {
390
- value: mobileHeader.showMenuToggle,
391
- onChange: checked => handleMobileHeaderChange('showMenuToggle', checked)
392
- })]
393
- }), jsxs("div", {
394
- className: "flex items-center",
395
- children: [jsx("p", {
396
- style: {
397
- color: navTheme === 'dark' ? '#ffff' : 'black'
398
- },
399
- children: t('show_back_button')
400
- }), jsx("div", {
401
- className: "flex-grow"
402
- }), jsx(Switch, {
403
- value: mobileHeader.showBackButton,
404
- onChange: checked => handleMobileHeaderChange('showBackButton', checked)
405
- })]
406
- }), jsxs("div", {
407
- className: "flex items-center",
408
- children: [jsx("p", {
409
- style: {
410
- color: navTheme === 'dark' ? '#ffff' : 'black'
411
- },
412
- children: t('show_page_title')
413
- }), jsx("div", {
414
- className: "flex-grow"
415
- }), jsx(Switch, {
416
- value: mobileHeader.showPageTitle,
417
- onChange: checked => handleMobileHeaderChange('showPageTitle', checked)
418
- })]
419
- }), jsxs("div", {
420
- className: "flex items-center",
421
- children: [jsx("p", {
422
- style: {
423
- color: navTheme === 'dark' ? '#ffff' : 'black'
424
- },
425
- children: t('show_action_buttons')
426
- }), jsx("div", {
427
- className: "flex-grow"
428
- }), jsx(Switch, {
429
- value: mobileHeader.showActionButtons,
430
- onChange: checked => handleMobileHeaderChange('showActionButtons', checked)
664
+ className: "flex mb-4 mt-1",
665
+ children: [jsx("button", {
666
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeBackgroundTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
667
+ onClick: () => setActiveBackgroundTab('desktop'),
668
+ children: jsxs("span", {
669
+ className: "flex items-center justify-center",
670
+ children: [jsxs("svg", {
671
+ xmlns: "http://www.w3.org/2000/svg",
672
+ width: "16",
673
+ height: "16",
674
+ viewBox: "0 0 24 24",
675
+ fill: "none",
676
+ stroke: "currentColor",
677
+ strokeWidth: "2",
678
+ strokeLinecap: "round",
679
+ strokeLinejoin: "round",
680
+ className: "mr-1",
681
+ children: [jsx("rect", {
682
+ x: "2",
683
+ y: "3",
684
+ width: "20",
685
+ height: "14",
686
+ rx: "2",
687
+ ry: "2"
688
+ }), jsx("line", {
689
+ x1: "8",
690
+ y1: "21",
691
+ x2: "16",
692
+ y2: "21"
693
+ }), jsx("line", {
694
+ x1: "12",
695
+ y1: "17",
696
+ x2: "12",
697
+ y2: "21"
698
+ })]
699
+ }), t('desktop_tab')]
700
+ })
701
+ }), jsx("button", {
702
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeBackgroundTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
703
+ onClick: () => setActiveBackgroundTab('mobile'),
704
+ children: jsxs("span", {
705
+ className: "flex items-center justify-center",
706
+ children: [jsxs("svg", {
707
+ xmlns: "http://www.w3.org/2000/svg",
708
+ width: "16",
709
+ height: "16",
710
+ viewBox: "0 0 24 24",
711
+ fill: "none",
712
+ stroke: "currentColor",
713
+ strokeWidth: "2",
714
+ strokeLinecap: "round",
715
+ strokeLinejoin: "round",
716
+ className: "mr-1",
717
+ children: [jsx("rect", {
718
+ x: "5",
719
+ y: "2",
720
+ width: "14",
721
+ height: "20",
722
+ rx: "2",
723
+ ry: "2"
724
+ }), jsx("line", {
725
+ x1: "12",
726
+ y1: "18",
727
+ x2: "12",
728
+ y2: "18"
729
+ })]
730
+ }), t('mobile_tab')]
731
+ })
431
732
  })]
733
+ }), jsx("div", {
734
+ className: "mb-4",
735
+ children: renderBackgroundSettings()
432
736
  })]
433
- })]
434
- }), jsxs("div", {
435
- className: "mt-6 mb-4",
436
- children: [jsx("p", {
437
- className: "font-medium mb-2",
737
+ })
738
+ })
739
+ })]
740
+ }), jsxs("div", {
741
+ children: [jsx("div", {
742
+ className: "flex items-center mb-2",
743
+ children: jsxs("button", {
744
+ onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
745
+ className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200",
746
+ children: [jsx("svg", {
747
+ className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isHeaderExpanded ? 'rotate-180' : ''}`,
748
+ fill: "none",
749
+ stroke: "currentColor",
750
+ viewBox: "0 0 24 24",
751
+ children: jsx("path", {
752
+ strokeLinecap: "round",
753
+ strokeLinejoin: "round",
754
+ strokeWidth: 2,
755
+ d: "M19 9l-7 7-7-7"
756
+ })
757
+ }), jsx("p", {
438
758
  style: {
439
759
  color: navTheme === 'dark' ? '#ffff' : 'black'
440
760
  },
441
- children: t('search_bar')
442
- }), jsxs("div", {
443
- className: "pl-4 space-y-2",
761
+ children: t('header')
762
+ })]
763
+ })
764
+ }), jsx("div", {
765
+ className: `grid transition-all duration-300 ease-in-out ${isHeaderExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`,
766
+ children: jsx("div", {
767
+ className: "overflow-hidden",
768
+ children: jsxs("div", {
769
+ className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4",
444
770
  children: [jsxs("div", {
445
- className: "mb-4",
446
- children: [jsx("p", {
447
- className: "font-medium mb-2",
448
- style: {
449
- color: navTheme === 'dark' ? '#ffff' : 'black'
450
- },
451
- children: t('desktop_settings')
452
- }), jsxs("div", {
453
- className: "pl-4 space-y-2",
454
- children: [jsxs("div", {
455
- className: "flex items-center",
456
- children: [jsx("p", {
457
- style: {
458
- color: navTheme === 'dark' ? '#ffff' : 'black'
459
- },
460
- children: t('search_bar')
461
- }), jsx("div", {
462
- className: "flex-grow"
463
- }), jsx(Switch, {
464
- value: desktopHeader.searchBarRender,
465
- onChange: checked => handleDesktopHeaderChange('searchBarRender', checked)
466
- })]
467
- }), jsxs("div", {
468
- className: "flex items-center",
469
- children: [jsx("p", {
470
- style: {
471
- color: navTheme === 'dark' ? '#ffff' : 'black'
472
- },
473
- children: t('search_bar_on_scroll')
474
- }), jsx("div", {
475
- className: "flex-grow"
476
- }), jsx(Switch, {
477
- value: desktopHeader.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
478
- onChange: checked => handleDesktopHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
479
- })]
480
- }), jsxs("div", {
481
- className: "flex items-center",
482
- children: [jsx("p", {
483
- style: {
484
- color: navTheme === 'dark' ? '#ffff' : 'black'
485
- },
486
- children: t('search_bar_overlay')
487
- }), jsx("div", {
488
- className: "flex-grow"
489
- }), jsx(Switch, {
490
- value: desktopHeader.searchBarOverlay,
491
- onChange: checked => handleDesktopHeaderChange('searchBarOverlay', checked)
492
- })]
493
- }), jsxs("div", {
494
- className: "mb-4",
495
- children: [jsxs("div", {
496
- className: "flex items-center justify-between mb-2",
497
- children: [jsx("p", {
498
- style: {
499
- color: navTheme === 'dark' ? '#ffff' : 'black'
500
- },
501
- children: t('scroll_threshold')
502
- }), jsxs("span", {
503
- className: "text-sm",
504
- style: {
505
- color: navTheme === 'dark' ? '#ffff' : 'black'
506
- },
507
- children: [desktopHeader.scrollThreshold || scrollThresholdConfig.DEFAULT, "px"]
771
+ className: "flex mb-4 mt-1",
772
+ children: [jsx("button", {
773
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-l-lg border border-r-0 border-gray-300 ${activeHeaderTab === 'desktop' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
774
+ onClick: () => setActiveHeaderTab('desktop'),
775
+ children: jsxs("span", {
776
+ className: "flex items-center justify-center",
777
+ children: [jsxs("svg", {
778
+ xmlns: "http://www.w3.org/2000/svg",
779
+ width: "16",
780
+ height: "16",
781
+ viewBox: "0 0 24 24",
782
+ fill: "none",
783
+ stroke: "currentColor",
784
+ strokeWidth: "2",
785
+ strokeLinecap: "round",
786
+ strokeLinejoin: "round",
787
+ className: "mr-1",
788
+ children: [jsx("rect", {
789
+ x: "2",
790
+ y: "3",
791
+ width: "20",
792
+ height: "14",
793
+ rx: "2",
794
+ ry: "2"
795
+ }), jsx("line", {
796
+ x1: "8",
797
+ y1: "21",
798
+ x2: "16",
799
+ y2: "21"
800
+ }), jsx("line", {
801
+ x1: "12",
802
+ y1: "17",
803
+ x2: "12",
804
+ y2: "21"
508
805
  })]
509
- }), jsxs("div", {
510
- className: "relative",
511
- children: [jsx("input", {
512
- type: "range",
513
- min: scrollThresholdConfig.MIN,
514
- max: scrollThresholdConfig.MAX,
515
- step: scrollThresholdConfig.STEP,
516
- value: desktopHeader.scrollThreshold || scrollThresholdConfig.DEFAULT,
517
- onChange: e => handleDesktopHeaderChange('scrollThreshold', parseInt(e.target.value)),
518
- className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
519
- }), jsxs("div", {
520
- className: "flex justify-between text-xs mt-2",
521
- children: [jsxs("span", {
522
- children: [scrollThresholdConfig.MIN, "px"]
523
- }), jsxs("span", {
524
- children: [scrollThresholdConfig.MAX / 2, "px"]
525
- }), jsxs("span", {
526
- children: [scrollThresholdConfig.MAX, "px"]
527
- })]
806
+ }), t('desktop_tab')]
807
+ })
808
+ }), jsx("button", {
809
+ className: `flex-1 py-2 px-4 text-sm font-medium transition-colors duration-200 rounded-r-lg border border-gray-300 ${activeHeaderTab === 'mobile' ? 'bg-blue-500 text-white border-blue-500' : 'bg-white text-gray-700 hover:bg-gray-50'}`,
810
+ onClick: () => setActiveHeaderTab('mobile'),
811
+ children: jsxs("span", {
812
+ className: "flex items-center justify-center",
813
+ children: [jsxs("svg", {
814
+ xmlns: "http://www.w3.org/2000/svg",
815
+ width: "16",
816
+ height: "16",
817
+ viewBox: "0 0 24 24",
818
+ fill: "none",
819
+ stroke: "currentColor",
820
+ strokeWidth: "2",
821
+ strokeLinecap: "round",
822
+ strokeLinejoin: "round",
823
+ className: "mr-1",
824
+ children: [jsx("rect", {
825
+ x: "5",
826
+ y: "2",
827
+ width: "14",
828
+ height: "20",
829
+ rx: "2",
830
+ ry: "2"
831
+ }), jsx("line", {
832
+ x1: "12",
833
+ y1: "18",
834
+ x2: "12",
835
+ y2: "18"
528
836
  })]
529
- })]
530
- })]
837
+ }), t('mobile_tab')]
838
+ })
531
839
  })]
840
+ }), jsx("div", {
841
+ className: "mb-4",
842
+ children: renderHeaderSettings()
532
843
  }), jsxs("div", {
533
844
  className: "mt-6 mb-4",
534
845
  children: [jsx("p", {
@@ -536,91 +847,15 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
536
847
  style: {
537
848
  color: navTheme === 'dark' ? '#ffff' : 'black'
538
849
  },
539
- children: t('mobile_settings')
540
- }), jsxs("div", {
850
+ children: t('search_bar')
851
+ }), jsx("div", {
541
852
  className: "pl-4 space-y-2",
542
- children: [jsxs("div", {
543
- className: "flex items-center",
544
- children: [jsx("p", {
545
- style: {
546
- color: navTheme === 'dark' ? '#ffff' : 'black'
547
- },
548
- children: t('search_bar')
549
- }), jsx("div", {
550
- className: "flex-grow"
551
- }), jsx(Switch, {
552
- value: mobileHeader.searchBarRender,
553
- onChange: checked => handleMobileHeaderChange('searchBarRender', checked)
554
- })]
555
- }), jsxs("div", {
556
- className: "flex items-center",
557
- children: [jsx("p", {
558
- style: {
559
- color: navTheme === 'dark' ? '#ffff' : 'black'
560
- },
561
- children: t('search_bar_on_scroll')
562
- }), jsx("div", {
563
- className: "flex-grow"
564
- }), jsx(Switch, {
565
- value: mobileHeader.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
566
- onChange: checked => handleMobileHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
567
- })]
568
- }), jsxs("div", {
569
- className: "flex items-center",
570
- children: [jsx("p", {
571
- style: {
572
- color: navTheme === 'dark' ? '#ffff' : 'black'
573
- },
574
- children: t('search_bar_overlay')
575
- }), jsx("div", {
576
- className: "flex-grow"
577
- }), jsx(Switch, {
578
- value: mobileHeader.searchBarOverlay,
579
- onChange: checked => handleMobileHeaderChange('searchBarOverlay', checked)
580
- })]
581
- }), jsxs("div", {
582
- className: "mb-4",
583
- children: [jsxs("div", {
584
- className: "flex items-center justify-between mb-2",
585
- children: [jsx("p", {
586
- style: {
587
- color: navTheme === 'dark' ? '#ffff' : 'black'
588
- },
589
- children: t('scroll_threshold')
590
- }), jsxs("span", {
591
- className: "text-sm",
592
- style: {
593
- color: navTheme === 'dark' ? '#ffff' : 'black'
594
- },
595
- children: [mobileHeader.scrollThreshold || scrollThresholdConfig.DEFAULT, "px"]
596
- })]
597
- }), jsxs("div", {
598
- className: "relative",
599
- children: [jsx("input", {
600
- type: "range",
601
- min: scrollThresholdConfig.MIN,
602
- max: scrollThresholdConfig.MAX,
603
- step: scrollThresholdConfig.STEP,
604
- value: mobileHeader.scrollThreshold || scrollThresholdConfig.DEFAULT,
605
- onChange: e => handleMobileHeaderChange('scrollThreshold', parseInt(e.target.value)),
606
- className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
607
- }), jsxs("div", {
608
- className: "flex justify-between text-xs mt-2",
609
- children: [jsxs("span", {
610
- children: [scrollThresholdConfig.MIN, "px"]
611
- }), jsxs("span", {
612
- children: [scrollThresholdConfig.MAX / 2, "px"]
613
- }), jsxs("span", {
614
- children: [scrollThresholdConfig.MAX, "px"]
615
- })]
616
- })]
617
- })]
618
- })]
853
+ children: renderSearchBarSettings()
619
854
  })]
620
855
  })]
621
- })]
622
- })]
623
- })
856
+ })
857
+ })
858
+ })]
624
859
  }), jsxs("div", {
625
860
  className: "flex items-center mb-2",
626
861
  children: [jsx("p", {
@@ -631,8 +866,8 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
631
866
  }), jsx("div", {
632
867
  className: "flex-grow"
633
868
  }), jsx(Switch, {
634
- value: regions.showFooter,
635
- onChange: checked => handleRegionChange('showFooter', checked)
869
+ value: regions[deviceType].footer.showFooter,
870
+ onChange: checked => handleRegionFooterChange('showFooter', checked)
636
871
  })]
637
872
  }), jsxs("div", {
638
873
  className: "flex items-center mb-2",
@@ -644,7 +879,7 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
644
879
  }), jsx("div", {
645
880
  className: "flex-grow"
646
881
  }), jsx(Switch, {
647
- value: regions.showMenu,
882
+ value: regions[deviceType].header.showMenu,
648
883
  onChange: checked => handleRegionChange('showMenu', checked)
649
884
  })]
650
885
  }), jsxs("div", {
@@ -657,7 +892,7 @@ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {use
657
892
  }), jsx("div", {
658
893
  className: "flex-grow"
659
894
  }), jsx(Switch, {
660
- value: regions.menuHeaderRender,
895
+ value: regions[deviceType].header.menuHeaderRender,
661
896
  onChange: checked => handleRegionChange('menuHeaderRender', checked)
662
897
  })]
663
898
  })]