@admin-layout/tailwind-design-pro 12.0.16-alpha.92 → 12.2.1-alpha.0
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 +40 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +25 -32
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +96 -103
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +2 -2
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +69 -88
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +25 -30
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +32 -43
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +71 -81
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +25 -29
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +112 -136
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +1 -2
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.js +148 -184
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +2 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js +26 -28
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.js +75 -97
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +113 -129
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +108 -133
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +71 -85
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +13 -19
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +2 -2
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.js +2 -2
- package/lib/components/Layout/slot-fill/Logo.js.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts +2 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +2 -2
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +3 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.js +2 -2
- package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +117 -144
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +17 -23
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +2 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +85 -97
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +2 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/DeviceTabs.js +67 -75
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/InvitationSettings.js +41 -52
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +2 -1
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/LayoutChange.js +75 -94
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +50 -63
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +2 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/NavigationsModes.js +272 -290
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +2 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/RegionalSettings.js +437 -535
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsActions.js +29 -56
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +2 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +13 -16
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts +2 -1
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/Switch.js +8 -10
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeColor.js +24 -26
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +2 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/ThemeSelector.js +11 -13
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -1
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +17 -19
- package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -1
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +0 -4
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -1
- package/lib/components/SettingDrawer/utils/transformers.js +0 -3
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -3
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.d.ts +1 -1
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +16 -17
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +0 -6
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
- package/lib/utils/__tests__/menu.test.d.ts +2 -0
- package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
- package/lib/utils/__tests__/selectors.test.d.ts +2 -0
- package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
- package/package.json +6 -6
- package/lib/machines/settingsMachine.test.d.ts.map +0 -1
- /package/lib/{machines → utils/__tests__}/settingsMachine.test.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import {useTranslation}from'react-i18next';import {Switch}from'./Switch.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 {useMediaQuery}from'../../../hooks/useMediaQuery.js';import {getSettingValue}from'../../../utils/settingsUtils.js';function RegionalSettings(props) {
|
|
2
2
|
const {
|
|
3
3
|
t
|
|
4
4
|
} = useTranslation('settings');
|
|
@@ -73,545 +73,447 @@ import {jsxs,jsx,Fragment}from'react/jsx-runtime';import*as React from'react';im
|
|
|
73
73
|
}), [activeBackgroundTab, currentRoute, settings, applyToAllRoutes]);
|
|
74
74
|
// Helper function to render background settings based on current active tab
|
|
75
75
|
const renderBackgroundSettings = () => {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
children: jsx("p", {
|
|
253
|
-
style: {
|
|
254
|
-
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
255
|
-
},
|
|
256
|
-
children: t('video_thumbnail')
|
|
257
|
-
})
|
|
258
|
-
}), jsx("input", {
|
|
259
|
-
type: "text",
|
|
260
|
-
placeholder: t('video_thumbnail'),
|
|
261
|
-
value: background?.videoThumbnail || '',
|
|
262
|
-
onChange: e => handleBackgroundChange('videoThumbnail', e.target.value),
|
|
263
|
-
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
264
|
-
}), jsx("div", {
|
|
265
|
-
className: "flex flex-wrap gap-2 mt-3",
|
|
266
|
-
children: !background?.video && background?.videoThumbnail && jsx("div", {
|
|
267
|
-
className: "mt-2 p-1 border border-gray-300 rounded w-full",
|
|
268
|
-
children: jsx("img", {
|
|
269
|
-
src: background?.videoThumbnail,
|
|
270
|
-
alt: "Video thumbnail preview",
|
|
271
|
-
className: "w-full h-24 object-cover",
|
|
272
|
-
onError: e => {
|
|
273
|
-
const target = e.target;
|
|
274
|
-
target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5Z29uIHBvaW50cz0iMjMgNyAxNiAxMiAyMyAxNyAyMyA3Ij48L3BvbHlnb24+PHJlY3QgeD0iMSIgeT0iNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE0IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48L3N2Zz4=';
|
|
275
|
-
}
|
|
276
|
-
})
|
|
277
|
-
})
|
|
278
|
-
})]
|
|
279
|
-
})]
|
|
280
|
-
});
|
|
76
|
+
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
77
|
+
className: "mb-4"
|
|
78
|
+
}, React.createElement("p", {
|
|
79
|
+
className: "font-medium mb-2",
|
|
80
|
+
style: {
|
|
81
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
82
|
+
}
|
|
83
|
+
}, t('background_type')), React.createElement("div", {
|
|
84
|
+
className: "flex mb-3 rounded-lg overflow-hidden border border-gray-200 divide-x divide-gray-200 bg-gray-50"
|
|
85
|
+
}, React.createElement("button", {
|
|
86
|
+
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'}`,
|
|
87
|
+
onClick: () => handleBackgroundChange('type', 'color')
|
|
88
|
+
}, React.createElement("span", {
|
|
89
|
+
className: "mr-1"
|
|
90
|
+
}, React.createElement("svg", {
|
|
91
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
92
|
+
width: "16",
|
|
93
|
+
height: "16",
|
|
94
|
+
viewBox: "0 0 24 24",
|
|
95
|
+
fill: "none",
|
|
96
|
+
stroke: "currentColor",
|
|
97
|
+
strokeWidth: "2",
|
|
98
|
+
strokeLinecap: "round",
|
|
99
|
+
strokeLinejoin: "round"
|
|
100
|
+
}, React.createElement("circle", {
|
|
101
|
+
cx: "12",
|
|
102
|
+
cy: "12",
|
|
103
|
+
r: "10"
|
|
104
|
+
}), React.createElement("path", {
|
|
105
|
+
d: "M12 8v8M8 12h8"
|
|
106
|
+
}))), t('color')), React.createElement("button", {
|
|
107
|
+
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'}`,
|
|
108
|
+
onClick: () => handleBackgroundChange('type', 'image')
|
|
109
|
+
}, React.createElement("span", {
|
|
110
|
+
className: "mr-1"
|
|
111
|
+
}, React.createElement("svg", {
|
|
112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
113
|
+
width: "16",
|
|
114
|
+
height: "16",
|
|
115
|
+
viewBox: "0 0 24 24",
|
|
116
|
+
fill: "none",
|
|
117
|
+
stroke: "currentColor",
|
|
118
|
+
strokeWidth: "2",
|
|
119
|
+
strokeLinecap: "round",
|
|
120
|
+
strokeLinejoin: "round"
|
|
121
|
+
}, React.createElement("rect", {
|
|
122
|
+
x: "3",
|
|
123
|
+
y: "3",
|
|
124
|
+
width: "18",
|
|
125
|
+
height: "18",
|
|
126
|
+
rx: "2",
|
|
127
|
+
ry: "2"
|
|
128
|
+
}), React.createElement("circle", {
|
|
129
|
+
cx: "8.5",
|
|
130
|
+
cy: "8.5",
|
|
131
|
+
r: "1.5"
|
|
132
|
+
}), React.createElement("polyline", {
|
|
133
|
+
points: "21 15 16 10 5 21"
|
|
134
|
+
}))), t('image')), React.createElement("button", {
|
|
135
|
+
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'}`,
|
|
136
|
+
onClick: () => handleBackgroundChange('type', 'video')
|
|
137
|
+
}, React.createElement("span", {
|
|
138
|
+
className: "mr-1"
|
|
139
|
+
}, React.createElement("svg", {
|
|
140
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
141
|
+
width: "16",
|
|
142
|
+
height: "16",
|
|
143
|
+
viewBox: "0 0 24 24",
|
|
144
|
+
fill: "none",
|
|
145
|
+
stroke: "currentColor",
|
|
146
|
+
strokeWidth: "2",
|
|
147
|
+
strokeLinecap: "round",
|
|
148
|
+
strokeLinejoin: "round"
|
|
149
|
+
}, React.createElement("polygon", {
|
|
150
|
+
points: "23 7 16 12 23 17 23 7"
|
|
151
|
+
}), React.createElement("rect", {
|
|
152
|
+
x: "1",
|
|
153
|
+
y: "5",
|
|
154
|
+
width: "15",
|
|
155
|
+
height: "14",
|
|
156
|
+
rx: "2",
|
|
157
|
+
ry: "2"
|
|
158
|
+
}))), t('video')))), background?.type === 'color' && React.createElement("div", {
|
|
159
|
+
className: "mb-4"
|
|
160
|
+
}, React.createElement("p", {
|
|
161
|
+
className: "mb-2",
|
|
162
|
+
style: {
|
|
163
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
164
|
+
}
|
|
165
|
+
}, t('background_color')), React.createElement("div", {
|
|
166
|
+
className: "flex items-center"
|
|
167
|
+
}, React.createElement("div", {
|
|
168
|
+
className: "w-12 h-12 rounded-lg border border-gray-300 mr-3 flex-shrink-0 shadow-sm",
|
|
169
|
+
style: {
|
|
170
|
+
backgroundColor: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff'
|
|
171
|
+
}
|
|
172
|
+
}), React.createElement("div", {
|
|
173
|
+
className: "flex-grow"
|
|
174
|
+
}, React.createElement("input", {
|
|
175
|
+
type: "color",
|
|
176
|
+
value: background?.color === 'inherit' ? '#ffffff' : background?.color || '#ffffff',
|
|
177
|
+
onChange: e => handleBackgroundChange('color', e.target.value),
|
|
178
|
+
className: "w-full h-10 rounded cursor-pointer"
|
|
179
|
+
}))), React.createElement("div", {
|
|
180
|
+
className: "flex flex-wrap gap-2 mt-3"
|
|
181
|
+
}, ['#ffffff', '#f2f2f2', '#e6e6e6', '#1890ff', '#52c41a', '#faad14', '#f5222d', '#722ed1'].map(color => React.createElement("button", {
|
|
182
|
+
key: color,
|
|
183
|
+
className: `w-8 h-8 rounded-full border ${color === (background?.color || '#ffffff') ? 'border-blue-500 border-2' : 'border-gray-300'}`,
|
|
184
|
+
style: {
|
|
185
|
+
backgroundColor: color
|
|
186
|
+
},
|
|
187
|
+
onClick: () => handleBackgroundChange('color', color),
|
|
188
|
+
"aria-label": `Select color ${color}`
|
|
189
|
+
})))), background?.type === 'image' && React.createElement("div", {
|
|
190
|
+
className: "mb-2"
|
|
191
|
+
}, React.createElement("div", {
|
|
192
|
+
className: "flex items-center mb-1"
|
|
193
|
+
}, React.createElement("p", {
|
|
194
|
+
style: {
|
|
195
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
196
|
+
}
|
|
197
|
+
}, t('image_url'))), React.createElement("input", {
|
|
198
|
+
type: "text",
|
|
199
|
+
placeholder: t('image_url'),
|
|
200
|
+
value: background?.image || '',
|
|
201
|
+
onChange: e => handleBackgroundChange('image', e.target.value),
|
|
202
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
203
|
+
}), background?.image && React.createElement("div", {
|
|
204
|
+
className: "mt-2 p-1 border border-gray-300 rounded"
|
|
205
|
+
}, React.createElement("img", {
|
|
206
|
+
src: background?.image,
|
|
207
|
+
alt: "Background preview",
|
|
208
|
+
className: "w-full h-24 object-cover",
|
|
209
|
+
onError: e => {
|
|
210
|
+
const target = e.target;
|
|
211
|
+
target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgcng9IjIiIHJ5PSIyIj48L3JlY3Q+PGNpcmNsZSBjeD0iOC41IiBjeT0iOC41IiByPSIxLjUiPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjIxIDEzLjg1IDE2IDEwLjk4IDgiIDE1Ij48L3BvbHlsaW5lPjwvc3ZnPg==';
|
|
212
|
+
}
|
|
213
|
+
}))), background?.type === 'video' && React.createElement("div", {
|
|
214
|
+
className: "mb-2"
|
|
215
|
+
}, React.createElement("div", {
|
|
216
|
+
className: "flex items-center mb-1"
|
|
217
|
+
}, React.createElement("p", {
|
|
218
|
+
style: {
|
|
219
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
220
|
+
}
|
|
221
|
+
}, t('video_url'))), React.createElement("input", {
|
|
222
|
+
type: "text",
|
|
223
|
+
placeholder: t('video_url'),
|
|
224
|
+
value: background?.video || '',
|
|
225
|
+
onChange: e => handleBackgroundChange('video', e.target.value),
|
|
226
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
227
|
+
}), React.createElement("div", {
|
|
228
|
+
className: "flex items-center mt-3 mb-1"
|
|
229
|
+
}, React.createElement("p", {
|
|
230
|
+
style: {
|
|
231
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
232
|
+
}
|
|
233
|
+
}, t('video_thumbnail'))), React.createElement("input", {
|
|
234
|
+
type: "text",
|
|
235
|
+
placeholder: t('video_thumbnail'),
|
|
236
|
+
value: background?.videoThumbnail || '',
|
|
237
|
+
onChange: e => handleBackgroundChange('videoThumbnail', e.target.value),
|
|
238
|
+
className: "w-full p-1 text-sm border border-gray-300 rounded"
|
|
239
|
+
}), React.createElement("div", {
|
|
240
|
+
className: "flex flex-wrap gap-2 mt-3"
|
|
241
|
+
}, !background?.video && background?.videoThumbnail && React.createElement("div", {
|
|
242
|
+
className: "mt-2 p-1 border border-gray-300 rounded w-full"
|
|
243
|
+
}, React.createElement("img", {
|
|
244
|
+
src: background?.videoThumbnail,
|
|
245
|
+
alt: "Video thumbnail preview",
|
|
246
|
+
className: "w-full h-24 object-cover",
|
|
247
|
+
onError: e => {
|
|
248
|
+
const target = e.target;
|
|
249
|
+
target.src = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwb2x5Z29uIHBvaW50cz0iMjMgNyAxNiAxMiAyMyAxNyAyMyA3Ij48L3BvbHlnb24+PHJlY3QgeD0iMSIgeT0iNSIgd2lkdGg9IjE1IiBoZWlnaHQ9IjE0IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48L3N2Zz4=';
|
|
250
|
+
}
|
|
251
|
+
})))));
|
|
281
252
|
};
|
|
282
253
|
// Helper function to render header settings based on current active tab
|
|
283
254
|
const renderHeaderSettings = () => {
|
|
284
|
-
return
|
|
285
|
-
className: "space-y-2"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}), jsx(Switch, {
|
|
387
|
-
value: header?.showPageTitle,
|
|
388
|
-
onChange: checked => handleHeaderChange('showPageTitle', checked)
|
|
389
|
-
})]
|
|
390
|
-
}), jsxs("div", {
|
|
391
|
-
className: "flex items-center",
|
|
392
|
-
children: [jsx("p", {
|
|
393
|
-
style: {
|
|
394
|
-
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
395
|
-
},
|
|
396
|
-
children: t('show_action_buttons')
|
|
397
|
-
}), jsx("div", {
|
|
398
|
-
className: "flex-grow"
|
|
399
|
-
}), jsx(Switch, {
|
|
400
|
-
value: header?.showActionButtons,
|
|
401
|
-
onChange: checked => handleHeaderChange('showActionButtons', checked)
|
|
402
|
-
})]
|
|
403
|
-
})]
|
|
404
|
-
});
|
|
255
|
+
return React.createElement("div", {
|
|
256
|
+
className: "space-y-2"
|
|
257
|
+
}, React.createElement("div", {
|
|
258
|
+
className: "flex items-center"
|
|
259
|
+
}, React.createElement("p", {
|
|
260
|
+
style: {
|
|
261
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
262
|
+
}
|
|
263
|
+
}, t('show_header')), React.createElement("div", {
|
|
264
|
+
className: "flex-grow"
|
|
265
|
+
}), React.createElement(Switch, {
|
|
266
|
+
value: header?.showHeader ?? true,
|
|
267
|
+
onChange: checked => handleHeaderChange('showHeader', checked)
|
|
268
|
+
})), React.createElement("div", {
|
|
269
|
+
className: "flex items-center"
|
|
270
|
+
}, React.createElement("p", {
|
|
271
|
+
style: {
|
|
272
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
273
|
+
}
|
|
274
|
+
}, t('fixed_header')), React.createElement("div", {
|
|
275
|
+
className: "flex-grow"
|
|
276
|
+
}), React.createElement(Switch, {
|
|
277
|
+
value: header?.fixedHeader,
|
|
278
|
+
onChange: checked => handleHeaderChange('fixedHeader', checked)
|
|
279
|
+
})), React.createElement("div", {
|
|
280
|
+
className: "flex items-center"
|
|
281
|
+
}, React.createElement("p", {
|
|
282
|
+
style: {
|
|
283
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
284
|
+
}
|
|
285
|
+
}, t('show_logo')), React.createElement("div", {
|
|
286
|
+
className: "flex-grow"
|
|
287
|
+
}), React.createElement(Switch, {
|
|
288
|
+
value: header?.showLogo,
|
|
289
|
+
onChange: checked => handleHeaderChange('showLogo', checked)
|
|
290
|
+
})), React.createElement("div", {
|
|
291
|
+
className: "flex items-center"
|
|
292
|
+
}, React.createElement("p", {
|
|
293
|
+
style: {
|
|
294
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
295
|
+
}
|
|
296
|
+
}, t('show_search_slot')), React.createElement("div", {
|
|
297
|
+
className: "flex-grow"
|
|
298
|
+
}), React.createElement(Switch, {
|
|
299
|
+
value: header?.showSearchSlot,
|
|
300
|
+
onChange: checked => handleHeaderChange('showSearchSlot', checked)
|
|
301
|
+
})), React.createElement("div", {
|
|
302
|
+
className: "flex items-center"
|
|
303
|
+
}, React.createElement("p", {
|
|
304
|
+
style: {
|
|
305
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
306
|
+
}
|
|
307
|
+
}, t('show_right_content')), React.createElement("div", {
|
|
308
|
+
className: "flex-grow"
|
|
309
|
+
}), React.createElement(Switch, {
|
|
310
|
+
value: header?.showRightContent,
|
|
311
|
+
onChange: checked => handleHeaderChange('showRightContent', checked)
|
|
312
|
+
})), React.createElement("div", {
|
|
313
|
+
className: "flex items-center"
|
|
314
|
+
}, React.createElement("p", {
|
|
315
|
+
style: {
|
|
316
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
317
|
+
}
|
|
318
|
+
}, t('show_menu_toggle')), React.createElement("div", {
|
|
319
|
+
className: "flex-grow"
|
|
320
|
+
}), React.createElement(Switch, {
|
|
321
|
+
value: header?.showMenuToggle,
|
|
322
|
+
onChange: checked => handleHeaderChange('showMenuToggle', checked)
|
|
323
|
+
})), React.createElement("div", {
|
|
324
|
+
className: "flex items-center"
|
|
325
|
+
}, React.createElement("p", {
|
|
326
|
+
style: {
|
|
327
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
328
|
+
}
|
|
329
|
+
}, t('show_back_button')), React.createElement("div", {
|
|
330
|
+
className: "flex-grow"
|
|
331
|
+
}), React.createElement(Switch, {
|
|
332
|
+
value: header?.showBackButton,
|
|
333
|
+
onChange: checked => handleHeaderChange('showBackButton', checked)
|
|
334
|
+
})), React.createElement("div", {
|
|
335
|
+
className: "flex items-center"
|
|
336
|
+
}, React.createElement("p", {
|
|
337
|
+
style: {
|
|
338
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
339
|
+
}
|
|
340
|
+
}, t('show_page_title')), React.createElement("div", {
|
|
341
|
+
className: "flex-grow"
|
|
342
|
+
}), React.createElement(Switch, {
|
|
343
|
+
value: header?.showPageTitle,
|
|
344
|
+
onChange: checked => handleHeaderChange('showPageTitle', checked)
|
|
345
|
+
})), React.createElement("div", {
|
|
346
|
+
className: "flex items-center"
|
|
347
|
+
}, React.createElement("p", {
|
|
348
|
+
style: {
|
|
349
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
350
|
+
}
|
|
351
|
+
}, t('show_action_buttons')), React.createElement("div", {
|
|
352
|
+
className: "flex-grow"
|
|
353
|
+
}), React.createElement(Switch, {
|
|
354
|
+
value: header?.showActionButtons,
|
|
355
|
+
onChange: checked => handleHeaderChange('showActionButtons', checked)
|
|
356
|
+
})));
|
|
405
357
|
};
|
|
406
358
|
// Helper function to render search bar settings based on current active tab
|
|
407
359
|
const renderSearchBarSettings = () => {
|
|
408
|
-
return
|
|
409
|
-
className: "space-y-2"
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
min: scrollThresholdConfig.MIN,
|
|
470
|
-
max: scrollThresholdConfig.MAX,
|
|
471
|
-
step: scrollThresholdConfig.STEP,
|
|
472
|
-
value: header?.scrollThreshold || scrollThresholdConfig.DEFAULT,
|
|
473
|
-
onChange: e => handleHeaderChange('scrollThreshold', parseInt(e.target.value)),
|
|
474
|
-
className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
|
|
475
|
-
}), jsxs("div", {
|
|
476
|
-
className: "flex justify-between text-xs mt-2",
|
|
477
|
-
children: [jsxs("span", {
|
|
478
|
-
children: [scrollThresholdConfig.MIN, "px"]
|
|
479
|
-
}), jsxs("span", {
|
|
480
|
-
children: [scrollThresholdConfig.MAX / 2, "px"]
|
|
481
|
-
}), jsxs("span", {
|
|
482
|
-
children: [scrollThresholdConfig.MAX, "px"]
|
|
483
|
-
})]
|
|
484
|
-
})]
|
|
485
|
-
})]
|
|
486
|
-
})]
|
|
487
|
-
});
|
|
360
|
+
return React.createElement("div", {
|
|
361
|
+
className: "space-y-2"
|
|
362
|
+
}, React.createElement("div", {
|
|
363
|
+
className: "flex items-center"
|
|
364
|
+
}, React.createElement("p", {
|
|
365
|
+
style: {
|
|
366
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
367
|
+
}
|
|
368
|
+
}, t('search_bar')), React.createElement("div", {
|
|
369
|
+
className: "flex-grow"
|
|
370
|
+
}), React.createElement(Switch, {
|
|
371
|
+
value: header?.searchBarRender,
|
|
372
|
+
onChange: checked => handleHeaderChange('searchBarRender', checked)
|
|
373
|
+
})), React.createElement("div", {
|
|
374
|
+
className: "flex items-center"
|
|
375
|
+
}, React.createElement("p", {
|
|
376
|
+
style: {
|
|
377
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
378
|
+
}
|
|
379
|
+
}, t('search_bar_on_scroll')), React.createElement("div", {
|
|
380
|
+
className: "flex-grow"
|
|
381
|
+
}), React.createElement(Switch, {
|
|
382
|
+
value: header?.searchBarBehavior === SearchBarBehavior.ON_SCROLL,
|
|
383
|
+
onChange: checked => handleHeaderChange('searchBarBehavior', checked ? SearchBarBehavior.ON_SCROLL : SearchBarBehavior.PERMANENT)
|
|
384
|
+
})), React.createElement("div", {
|
|
385
|
+
className: "flex items-center"
|
|
386
|
+
}, React.createElement("p", {
|
|
387
|
+
style: {
|
|
388
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
389
|
+
}
|
|
390
|
+
}, t('search_bar_overlay')), React.createElement("div", {
|
|
391
|
+
className: "flex-grow"
|
|
392
|
+
}), React.createElement(Switch, {
|
|
393
|
+
value: header?.searchBarOverlay,
|
|
394
|
+
onChange: checked => handleHeaderChange('searchBarOverlay', checked)
|
|
395
|
+
})), React.createElement("div", {
|
|
396
|
+
className: "mb-4"
|
|
397
|
+
}, React.createElement("div", {
|
|
398
|
+
className: "flex items-center justify-between mb-2"
|
|
399
|
+
}, React.createElement("p", {
|
|
400
|
+
style: {
|
|
401
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
402
|
+
}
|
|
403
|
+
}, t('scroll_threshold')), React.createElement("span", {
|
|
404
|
+
className: "text-sm",
|
|
405
|
+
style: {
|
|
406
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
407
|
+
}
|
|
408
|
+
}, header?.scrollThreshold || scrollThresholdConfig.DEFAULT, "px")), React.createElement("div", {
|
|
409
|
+
className: "relative"
|
|
410
|
+
}, React.createElement("input", {
|
|
411
|
+
type: "range",
|
|
412
|
+
min: scrollThresholdConfig.MIN,
|
|
413
|
+
max: scrollThresholdConfig.MAX,
|
|
414
|
+
step: scrollThresholdConfig.STEP,
|
|
415
|
+
value: header?.scrollThreshold || scrollThresholdConfig.DEFAULT,
|
|
416
|
+
onChange: e => handleHeaderChange('scrollThreshold', parseInt(e.target.value)),
|
|
417
|
+
className: "w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer"
|
|
418
|
+
}), React.createElement("div", {
|
|
419
|
+
className: "flex justify-between text-xs mt-2"
|
|
420
|
+
}, React.createElement("span", null, scrollThresholdConfig.MIN, "px"), React.createElement("span", null, scrollThresholdConfig.MAX / 2, "px"), React.createElement("span", null, scrollThresholdConfig.MAX, "px")))));
|
|
488
421
|
};
|
|
489
|
-
return
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
value: getConfigValue('footer.showFooter', true),
|
|
587
|
-
onChange: checked => handleRegionFooterChange('showFooter', checked)
|
|
588
|
-
})]
|
|
589
|
-
}), jsxs("div", {
|
|
590
|
-
className: "flex items-center mb-2",
|
|
591
|
-
children: [jsx("p", {
|
|
592
|
-
style: {
|
|
593
|
-
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
594
|
-
},
|
|
595
|
-
children: t('menu')
|
|
596
|
-
}), jsx("div", {
|
|
597
|
-
className: "flex-grow"
|
|
598
|
-
}), jsx(Switch, {
|
|
599
|
-
value: getConfigValue('header.showMenu', true),
|
|
600
|
-
onChange: checked => handleRegionChange('showMenu', checked)
|
|
601
|
-
})]
|
|
602
|
-
}), jsxs("div", {
|
|
603
|
-
className: "flex items-center mb-2",
|
|
604
|
-
children: [jsx("p", {
|
|
605
|
-
style: {
|
|
606
|
-
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
607
|
-
},
|
|
608
|
-
children: t('menu_header')
|
|
609
|
-
}), jsx("div", {
|
|
610
|
-
className: "flex-grow"
|
|
611
|
-
}), jsx(Switch, {
|
|
612
|
-
value: getConfigValue('header.menuHeaderRender', true),
|
|
613
|
-
onChange: checked => handleRegionChange('menuHeaderRender', checked)
|
|
614
|
-
})]
|
|
615
|
-
})]
|
|
616
|
-
});
|
|
422
|
+
return React.createElement("div", null, React.createElement("div", null, React.createElement("div", {
|
|
423
|
+
className: "flex items-center mb-2"
|
|
424
|
+
}, React.createElement("button", {
|
|
425
|
+
onClick: () => setIsBackgroundExpanded(!isBackgroundExpanded),
|
|
426
|
+
className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200"
|
|
427
|
+
}, React.createElement("svg", {
|
|
428
|
+
className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isBackgroundExpanded ? 'rotate-180' : ''}`,
|
|
429
|
+
fill: "none",
|
|
430
|
+
stroke: "currentColor",
|
|
431
|
+
viewBox: "0 0 24 24"
|
|
432
|
+
}, React.createElement("path", {
|
|
433
|
+
strokeLinecap: "round",
|
|
434
|
+
strokeLinejoin: "round",
|
|
435
|
+
strokeWidth: 2,
|
|
436
|
+
d: "M19 9l-7 7-7-7"
|
|
437
|
+
})), React.createElement("p", {
|
|
438
|
+
style: {
|
|
439
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
440
|
+
}
|
|
441
|
+
}, t('background')))), React.createElement("div", {
|
|
442
|
+
className: `grid transition-all duration-300 ease-in-out ${isBackgroundExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`
|
|
443
|
+
}, React.createElement("div", {
|
|
444
|
+
className: "overflow-hidden"
|
|
445
|
+
}, React.createElement("div", {
|
|
446
|
+
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4"
|
|
447
|
+
}, React.createElement("div", {
|
|
448
|
+
className: "mb-4"
|
|
449
|
+
}, renderBackgroundSettings()))))), React.createElement("div", null, React.createElement("div", {
|
|
450
|
+
className: "flex items-center mb-2"
|
|
451
|
+
}, React.createElement("button", {
|
|
452
|
+
onClick: () => setIsHeaderExpanded(!isHeaderExpanded),
|
|
453
|
+
className: "flex items-center gap-2 hover:opacity-80 transition-all duration-200"
|
|
454
|
+
}, React.createElement("svg", {
|
|
455
|
+
className: `w-4 h-4 transition-transform duration-300 ease-in-out ${isHeaderExpanded ? 'rotate-180' : ''}`,
|
|
456
|
+
fill: "none",
|
|
457
|
+
stroke: "currentColor",
|
|
458
|
+
viewBox: "0 0 24 24"
|
|
459
|
+
}, React.createElement("path", {
|
|
460
|
+
strokeLinecap: "round",
|
|
461
|
+
strokeLinejoin: "round",
|
|
462
|
+
strokeWidth: 2,
|
|
463
|
+
d: "M19 9l-7 7-7-7"
|
|
464
|
+
})), React.createElement("p", {
|
|
465
|
+
style: {
|
|
466
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
467
|
+
}
|
|
468
|
+
}, t('header')))), React.createElement("div", {
|
|
469
|
+
className: `grid transition-all duration-300 ease-in-out ${isHeaderExpanded ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`
|
|
470
|
+
}, React.createElement("div", {
|
|
471
|
+
className: "overflow-hidden"
|
|
472
|
+
}, React.createElement("div", {
|
|
473
|
+
className: "ml-4 mb-4 border-l-2 border-gray-200 pl-4"
|
|
474
|
+
}, React.createElement("div", {
|
|
475
|
+
className: "mb-4"
|
|
476
|
+
}, renderHeaderSettings()), React.createElement("div", {
|
|
477
|
+
className: "mt-6 mb-4"
|
|
478
|
+
}, React.createElement("p", {
|
|
479
|
+
className: "font-medium mb-2",
|
|
480
|
+
style: {
|
|
481
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
482
|
+
}
|
|
483
|
+
}, t('search_bar')), React.createElement("div", {
|
|
484
|
+
className: "pl-4 space-y-2"
|
|
485
|
+
}, renderSearchBarSettings())))))), React.createElement("div", {
|
|
486
|
+
className: "flex items-center mb-2"
|
|
487
|
+
}, React.createElement("p", {
|
|
488
|
+
style: {
|
|
489
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
490
|
+
}
|
|
491
|
+
}, t('footer')), React.createElement("div", {
|
|
492
|
+
className: "flex-grow"
|
|
493
|
+
}), React.createElement(Switch, {
|
|
494
|
+
value: getConfigValue('footer.showFooter', true),
|
|
495
|
+
onChange: checked => handleRegionFooterChange('showFooter', checked)
|
|
496
|
+
})), React.createElement("div", {
|
|
497
|
+
className: "flex items-center mb-2"
|
|
498
|
+
}, React.createElement("p", {
|
|
499
|
+
style: {
|
|
500
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
501
|
+
}
|
|
502
|
+
}, t('menu')), React.createElement("div", {
|
|
503
|
+
className: "flex-grow"
|
|
504
|
+
}), React.createElement(Switch, {
|
|
505
|
+
value: getConfigValue('header.showMenu', true),
|
|
506
|
+
onChange: checked => handleRegionChange('showMenu', checked)
|
|
507
|
+
})), React.createElement("div", {
|
|
508
|
+
className: "flex items-center mb-2"
|
|
509
|
+
}, React.createElement("p", {
|
|
510
|
+
style: {
|
|
511
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
512
|
+
}
|
|
513
|
+
}, t('menu_header')), React.createElement("div", {
|
|
514
|
+
className: "flex-grow"
|
|
515
|
+
}), React.createElement(Switch, {
|
|
516
|
+
value: getConfigValue('header.menuHeaderRender', true),
|
|
517
|
+
onChange: checked => handleRegionChange('menuHeaderRender', checked)
|
|
518
|
+
})));
|
|
617
519
|
}export{RegionalSettings};//# sourceMappingURL=RegionalSettings.js.map
|