@admin-layout/tailwind-design-pro 10.0.9-alpha.64 → 10.0.9-alpha.66

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