@admin-layout/tailwind-design-pro 10.0.6-alpha.9 → 10.0.9-alpha.13
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/lib/components/Layout/BasicLayout/index.d.ts +0 -6
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +18 -44
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +32 -38
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -3
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +6 -1
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -0
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +41 -10
- package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +118 -38
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +8 -2
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +1 -5
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +19 -23
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/NavigationsModes.js +281 -0
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +24 -31
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +1 -24
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +115 -110
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.js +17 -34
- package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.js +3 -0
- package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
- package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/types.d.ts +70 -0
- package/lib/components/SettingDrawer/types.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +18 -0
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/lib/components/ThemeProvider/ThemeProvider.js +62 -0
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
- package/lib/components/ThemeProvider/index.d.ts +7 -0
- package/lib/components/ThemeProvider/index.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeRegistry.d.ts +3 -0
- package/lib/components/ThemeProvider/themeRegistry.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeRegistry.js +388 -0
- package/lib/components/ThemeProvider/themeRegistry.js.map +1 -0
- package/lib/components/ThemeProvider/themeUtils.d.ts +26 -0
- package/lib/components/ThemeProvider/themeUtils.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themeUtils.js +135 -0
- package/lib/components/ThemeProvider/themeUtils.js.map +1 -0
- package/lib/components/ThemeProvider/types.d.ts +112 -0
- package/lib/components/ThemeProvider/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/typings.d.ts +8 -0
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +6 -4
- package/lib/compute.js.map +1 -1
- package/lib/icons.d.ts +14 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +13 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +0 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts +3 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +220 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +67 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/routes.json +1 -0
- package/lib/styles/index.css +438 -46
- package/package.json +5 -5
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -13
- package/lib/utils/index.js.map +0 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import {jsxs,jsx}from'react/jsx-runtime';const navigationModes = [{
|
|
2
|
+
key: 'sidebar',
|
|
3
|
+
title: 'Sidebar',
|
|
4
|
+
svg: jsxs("svg", {
|
|
5
|
+
width: "58",
|
|
6
|
+
height: "50",
|
|
7
|
+
viewBox: "0 0 58 50",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
children: [jsx("rect", {
|
|
10
|
+
width: "58",
|
|
11
|
+
height: "50",
|
|
12
|
+
rx: "8",
|
|
13
|
+
fill: "#ffffff"
|
|
14
|
+
}), jsx("rect", {
|
|
15
|
+
x: "4",
|
|
16
|
+
y: "0",
|
|
17
|
+
width: "16",
|
|
18
|
+
height: "50",
|
|
19
|
+
fill: "#f0f2f5"
|
|
20
|
+
}), jsx("rect", {
|
|
21
|
+
x: "6",
|
|
22
|
+
y: "8",
|
|
23
|
+
width: "12",
|
|
24
|
+
height: "4",
|
|
25
|
+
rx: "2",
|
|
26
|
+
fill: "#1890ff"
|
|
27
|
+
}), jsx("rect", {
|
|
28
|
+
x: "6",
|
|
29
|
+
y: "16",
|
|
30
|
+
width: "12",
|
|
31
|
+
height: "4",
|
|
32
|
+
rx: "2",
|
|
33
|
+
fill: "#000000",
|
|
34
|
+
opacity: "0.15"
|
|
35
|
+
}), jsx("rect", {
|
|
36
|
+
x: "6",
|
|
37
|
+
y: "24",
|
|
38
|
+
width: "12",
|
|
39
|
+
height: "4",
|
|
40
|
+
rx: "2",
|
|
41
|
+
fill: "#000000",
|
|
42
|
+
opacity: "0.15"
|
|
43
|
+
})]
|
|
44
|
+
})
|
|
45
|
+
}, {
|
|
46
|
+
key: 'topbar',
|
|
47
|
+
title: 'Top Bar',
|
|
48
|
+
svg: jsxs("svg", {
|
|
49
|
+
width: "58",
|
|
50
|
+
height: "50",
|
|
51
|
+
viewBox: "0 0 58 50",
|
|
52
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
+
children: [jsx("rect", {
|
|
54
|
+
width: "58",
|
|
55
|
+
height: "50",
|
|
56
|
+
rx: "8",
|
|
57
|
+
fill: "#ffffff"
|
|
58
|
+
}), jsx("rect", {
|
|
59
|
+
x: "0",
|
|
60
|
+
y: "0",
|
|
61
|
+
width: "58",
|
|
62
|
+
height: "14",
|
|
63
|
+
fill: "#f0f2f5"
|
|
64
|
+
}), jsx("rect", {
|
|
65
|
+
x: "8",
|
|
66
|
+
y: "5",
|
|
67
|
+
width: "12",
|
|
68
|
+
height: "4",
|
|
69
|
+
rx: "2",
|
|
70
|
+
fill: "#1890ff"
|
|
71
|
+
}), jsx("rect", {
|
|
72
|
+
x: "24",
|
|
73
|
+
y: "5",
|
|
74
|
+
width: "12",
|
|
75
|
+
height: "4",
|
|
76
|
+
rx: "2",
|
|
77
|
+
fill: "#000000",
|
|
78
|
+
opacity: "0.15"
|
|
79
|
+
}), jsx("rect", {
|
|
80
|
+
x: "40",
|
|
81
|
+
y: "5",
|
|
82
|
+
width: "12",
|
|
83
|
+
height: "4",
|
|
84
|
+
rx: "2",
|
|
85
|
+
fill: "#000000",
|
|
86
|
+
opacity: "0.15"
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
}, {
|
|
90
|
+
key: 'mixed',
|
|
91
|
+
title: 'Mixed',
|
|
92
|
+
svg: jsxs("svg", {
|
|
93
|
+
width: "58",
|
|
94
|
+
height: "50",
|
|
95
|
+
viewBox: "0 0 58 50",
|
|
96
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
97
|
+
children: [jsx("rect", {
|
|
98
|
+
width: "58",
|
|
99
|
+
height: "50",
|
|
100
|
+
rx: "8",
|
|
101
|
+
fill: "#ffffff"
|
|
102
|
+
}), jsx("rect", {
|
|
103
|
+
x: "0",
|
|
104
|
+
y: "0",
|
|
105
|
+
width: "58",
|
|
106
|
+
height: "14",
|
|
107
|
+
fill: "#f0f2f5"
|
|
108
|
+
}), jsx("rect", {
|
|
109
|
+
x: "24",
|
|
110
|
+
y: "5",
|
|
111
|
+
width: "12",
|
|
112
|
+
height: "4",
|
|
113
|
+
rx: "2",
|
|
114
|
+
fill: "#000000",
|
|
115
|
+
opacity: "0.15"
|
|
116
|
+
}), jsx("rect", {
|
|
117
|
+
x: "40",
|
|
118
|
+
y: "5",
|
|
119
|
+
width: "12",
|
|
120
|
+
height: "4",
|
|
121
|
+
rx: "2",
|
|
122
|
+
fill: "#000000",
|
|
123
|
+
opacity: "0.15"
|
|
124
|
+
}), jsx("rect", {
|
|
125
|
+
x: "4",
|
|
126
|
+
y: "14",
|
|
127
|
+
width: "16",
|
|
128
|
+
height: "36",
|
|
129
|
+
fill: "#f0f2f5"
|
|
130
|
+
}), jsx("rect", {
|
|
131
|
+
x: "6",
|
|
132
|
+
y: "20",
|
|
133
|
+
width: "12",
|
|
134
|
+
height: "4",
|
|
135
|
+
rx: "2",
|
|
136
|
+
fill: "#1890ff"
|
|
137
|
+
}), jsx("rect", {
|
|
138
|
+
x: "6",
|
|
139
|
+
y: "28",
|
|
140
|
+
width: "12",
|
|
141
|
+
height: "4",
|
|
142
|
+
rx: "2",
|
|
143
|
+
fill: "#000000",
|
|
144
|
+
opacity: "0.15"
|
|
145
|
+
})]
|
|
146
|
+
})
|
|
147
|
+
}];
|
|
148
|
+
const menuTypes = [{
|
|
149
|
+
key: 'classic',
|
|
150
|
+
title: 'Classic',
|
|
151
|
+
svg: jsxs("svg", {
|
|
152
|
+
width: "58",
|
|
153
|
+
height: "50",
|
|
154
|
+
viewBox: "0 0 58 50",
|
|
155
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
+
children: [jsx("rect", {
|
|
157
|
+
width: "58",
|
|
158
|
+
height: "50",
|
|
159
|
+
rx: "8",
|
|
160
|
+
fill: "#ffffff"
|
|
161
|
+
}), jsx("rect", {
|
|
162
|
+
x: "0",
|
|
163
|
+
y: "0",
|
|
164
|
+
width: "18",
|
|
165
|
+
height: "50",
|
|
166
|
+
fill: "#001529"
|
|
167
|
+
}), jsx("rect", {
|
|
168
|
+
x: "4",
|
|
169
|
+
y: "15",
|
|
170
|
+
width: "10",
|
|
171
|
+
height: "2",
|
|
172
|
+
rx: "1",
|
|
173
|
+
fill: "#ffffff",
|
|
174
|
+
opacity: "0.65"
|
|
175
|
+
}), jsx("rect", {
|
|
176
|
+
x: "4",
|
|
177
|
+
y: "25",
|
|
178
|
+
width: "10",
|
|
179
|
+
height: "2",
|
|
180
|
+
rx: "1",
|
|
181
|
+
fill: "#ffffff",
|
|
182
|
+
opacity: "0.65"
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
185
|
+
}, {
|
|
186
|
+
key: 'grouping',
|
|
187
|
+
title: 'Grouping',
|
|
188
|
+
svg: jsxs("svg", {
|
|
189
|
+
width: "58",
|
|
190
|
+
height: "50",
|
|
191
|
+
viewBox: "0 0 58 50",
|
|
192
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
193
|
+
children: [jsx("rect", {
|
|
194
|
+
width: "58",
|
|
195
|
+
height: "50",
|
|
196
|
+
rx: "8",
|
|
197
|
+
fill: "#ffffff"
|
|
198
|
+
}), jsx("rect", {
|
|
199
|
+
x: "0",
|
|
200
|
+
y: "0",
|
|
201
|
+
width: "58",
|
|
202
|
+
height: "14",
|
|
203
|
+
fill: "#001529"
|
|
204
|
+
}), jsx("rect", {
|
|
205
|
+
x: "8",
|
|
206
|
+
y: "6",
|
|
207
|
+
width: "10",
|
|
208
|
+
height: "2",
|
|
209
|
+
rx: "1",
|
|
210
|
+
fill: "#ffffff",
|
|
211
|
+
opacity: "0.65"
|
|
212
|
+
}), jsx("rect", {
|
|
213
|
+
x: "24",
|
|
214
|
+
y: "6",
|
|
215
|
+
width: "10",
|
|
216
|
+
height: "2",
|
|
217
|
+
rx: "1",
|
|
218
|
+
fill: "#ffffff",
|
|
219
|
+
opacity: "0.65"
|
|
220
|
+
})]
|
|
221
|
+
})
|
|
222
|
+
}];
|
|
223
|
+
function NavigationModes({
|
|
224
|
+
changeSetting,
|
|
225
|
+
settings
|
|
226
|
+
}) {
|
|
227
|
+
return jsxs("div", {
|
|
228
|
+
className: "space-y-8",
|
|
229
|
+
children: [jsxs("section", {
|
|
230
|
+
children: [jsx("h3", {
|
|
231
|
+
className: "text-sm font-medium text-gray-700 dark:text-gray-200 mb-3",
|
|
232
|
+
children: "Navigation Mode"
|
|
233
|
+
}), jsx("div", {
|
|
234
|
+
className: "flex flex-row gap-4",
|
|
235
|
+
children: navigationModes.map((mode, index) => jsx("div", {
|
|
236
|
+
className: "relative cursor-pointer hover:opacity-80 transition-opacity shadow-sm dark:shadow-md rounded overflow-hidden",
|
|
237
|
+
onClick: () => changeSetting('layout', {
|
|
238
|
+
...settings.layout,
|
|
239
|
+
navigationMode: mode.key
|
|
240
|
+
}),
|
|
241
|
+
children: jsxs("div", {
|
|
242
|
+
className: "relative",
|
|
243
|
+
children: [mode.svg, settings?.layout?.navigationMode === mode.key && jsx("svg", {
|
|
244
|
+
className: "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-6 h-6 text-blue-500 pointer-events-none",
|
|
245
|
+
viewBox: "0 0 24 24",
|
|
246
|
+
fill: "currentColor",
|
|
247
|
+
children: jsx("path", {
|
|
248
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
249
|
+
})
|
|
250
|
+
})]
|
|
251
|
+
})
|
|
252
|
+
}, `navMode_${index}`))
|
|
253
|
+
})]
|
|
254
|
+
}), jsxs("section", {
|
|
255
|
+
children: [jsx("h3", {
|
|
256
|
+
className: "text-sm font-medium text-gray-700 dark:text-gray-200 mb-3",
|
|
257
|
+
children: "Menu Type"
|
|
258
|
+
}), jsx("div", {
|
|
259
|
+
className: "flex flex-row gap-4",
|
|
260
|
+
children: menuTypes.map((type, index) => jsx("div", {
|
|
261
|
+
className: "relative cursor-pointer hover:opacity-80 transition-opacity shadow-sm dark:shadow-md rounded overflow-hidden",
|
|
262
|
+
onClick: () => changeSetting('layout', {
|
|
263
|
+
...settings.layout,
|
|
264
|
+
sideMenuType: type.key
|
|
265
|
+
}),
|
|
266
|
+
children: jsxs("div", {
|
|
267
|
+
className: "relative",
|
|
268
|
+
children: [type.svg, settings?.layout?.sideMenuType === type.key && jsx("svg", {
|
|
269
|
+
className: "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-6 h-6 text-blue-500 pointer-events-none",
|
|
270
|
+
viewBox: "0 0 24 24",
|
|
271
|
+
fill: "currentColor",
|
|
272
|
+
children: jsx("path", {
|
|
273
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
274
|
+
})
|
|
275
|
+
})]
|
|
276
|
+
})
|
|
277
|
+
}, `menuType_${index}`))
|
|
278
|
+
})]
|
|
279
|
+
})]
|
|
280
|
+
});
|
|
281
|
+
}export{NavigationModes as default};//# sourceMappingURL=NavigationsModes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationsModes.js","sources":["../../../src/components/SettingDrawer/NavigationsModes.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"yCAGA,MAAM,eAAe,GAAG,CAAA;AACpB,EAAA,GAAA,EAAA,SAAA;AACI,EAAA,KAAA,EAAA,SAAc;AACd,EAAA,GAAA,EAAAA,IAAA,CAAK,KAAW,EAAA;AAChB,IAAA,KAAA,EAAG,IACM;AAQZ,IAAA,MAAA,EAAA,IAAA;AACD,IAAA,OAAA,EAAA,WAAA;AACI,IAAA,KAAA,EAAG,4BAAU;AACb,IAAA,QAAA,GAAOC,GAAS,CAAA,MAAA,EAAA;AAChB,MAAA,KAAG,EAAE,IACI;AAQZ,MAAA,MAAA,EAAA,IAAA;AACD,MAAA,EAAA,EAAA,GAAA;AACI,MAAA,IAAA;AACA,KAAA,CAAA,EAAAA,GAAA,CAAK,MAAS,EAAA;SACX,GAAA;AAaN,MAAA,CAAA,EAAA,GAAA;MACH,KAAA,EAAA,IAAA;AAEF,MAAM,YAAY;AACd,MAAA,IAAA,EAAA;AACI,KAAA,CAAA,EAAAA,IAAK,MAAS,EAAA;AACd,MAAA,CAAA,EAAA,GAAA;SACG,GAAA;AAQN,MAAA,KAAA,EAAA,IAAA;AACD,MAAA,MAAA,EAAA,GAAA;AACI,MAAA,EAAA,EAAA,GAAK;AACL,MAAA,IAAA,EAAA;QACAA,GAAG,CAAE,MACD,EAAA;AAOP,MAAA,CAAA,EAAA,GAAA;MACH,CAAA,EAAA,IAAA;AAEF,MAAM,WAAkB;AACpB,MAAA,MACI,EAAK,GAAA;;;AAaoB,MAAA,OAAA,EAAA;;;;AAqDjC,MAAC,KAAA,EAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type IRegionalSettingsProps = {
|
|
3
|
-
settings?: Partial<ProSettings>;
|
|
4
|
-
changeSetting?: (key: string, value: string | boolean | any) => void;
|
|
5
|
-
};
|
|
1
|
+
import { IRegionalSettingsProps } from './types';
|
|
6
2
|
export default function RegionalSettings(props: IRegionalSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
3
|
//# sourceMappingURL=RegionalSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionalSettings.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RegionalSettings.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,sBAAsB,2CAiDrE"}
|
|
@@ -7,88 +7,81 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useTranslation}from'react-i18ne
|
|
|
7
7
|
t
|
|
8
8
|
} = useTranslation('settings');
|
|
9
9
|
const {
|
|
10
|
-
|
|
11
|
-
showFooter,
|
|
12
|
-
searchBarRender,
|
|
13
|
-
showMenu,
|
|
14
|
-
menuHeaderRender,
|
|
10
|
+
regions = {},
|
|
15
11
|
navTheme
|
|
16
|
-
} = settings;
|
|
12
|
+
} = settings || {};
|
|
13
|
+
const handleRegionChange = (key, value) => {
|
|
14
|
+
if (!changeSetting) return;
|
|
15
|
+
changeSetting('regions', {
|
|
16
|
+
...regions,
|
|
17
|
+
[key]: value
|
|
18
|
+
});
|
|
19
|
+
};
|
|
17
20
|
return jsxs("div", {
|
|
18
21
|
children: [jsxs("div", {
|
|
19
22
|
className: "flex items-center mb-2",
|
|
20
23
|
children: [jsx("p", {
|
|
21
24
|
style: {
|
|
22
|
-
color: navTheme
|
|
25
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
23
26
|
},
|
|
24
27
|
children: t('header')
|
|
25
28
|
}), jsx("div", {
|
|
26
29
|
className: "flex-grow"
|
|
27
30
|
}), jsx(Switch, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
changeSetting: changeSetting,
|
|
31
|
-
settingKey: "showHeader"
|
|
31
|
+
value: regions.showHeader,
|
|
32
|
+
onChange: checked => handleRegionChange('showHeader', checked)
|
|
32
33
|
})]
|
|
33
34
|
}), jsxs("div", {
|
|
34
35
|
className: "flex items-center mb-2",
|
|
35
36
|
children: [jsx("p", {
|
|
36
37
|
style: {
|
|
37
|
-
color: navTheme
|
|
38
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
38
39
|
},
|
|
39
40
|
children: t('footer')
|
|
40
41
|
}), jsx("div", {
|
|
41
42
|
className: "flex-grow"
|
|
42
43
|
}), jsx(Switch, {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
changeSetting: changeSetting,
|
|
46
|
-
settingKey: "showFooter"
|
|
44
|
+
value: regions.showFooter,
|
|
45
|
+
onChange: checked => handleRegionChange('showFooter', checked)
|
|
47
46
|
})]
|
|
48
47
|
}), jsxs("div", {
|
|
49
48
|
className: "flex items-center mb-2",
|
|
50
49
|
children: [jsx("p", {
|
|
51
50
|
style: {
|
|
52
|
-
color: navTheme
|
|
51
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
53
52
|
},
|
|
54
53
|
children: t('search_bar')
|
|
55
54
|
}), jsx("div", {
|
|
56
55
|
className: "flex-grow"
|
|
57
56
|
}), jsx(Switch, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
changeSetting: changeSetting,
|
|
61
|
-
settingKey: "searchBarRender"
|
|
57
|
+
value: regions.searchBarRender,
|
|
58
|
+
onChange: checked => handleRegionChange('searchBarRender', checked)
|
|
62
59
|
})]
|
|
63
60
|
}), jsxs("div", {
|
|
64
61
|
className: "flex items-center mb-2",
|
|
65
62
|
children: [jsx("p", {
|
|
66
63
|
style: {
|
|
67
|
-
color: navTheme
|
|
64
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
68
65
|
},
|
|
69
66
|
children: t('menu')
|
|
70
67
|
}), jsx("div", {
|
|
71
68
|
className: "flex-grow"
|
|
72
69
|
}), jsx(Switch, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
changeSetting: changeSetting,
|
|
76
|
-
settingKey: "showMenu"
|
|
70
|
+
value: regions.showMenu,
|
|
71
|
+
onChange: checked => handleRegionChange('showMenu', checked)
|
|
77
72
|
})]
|
|
78
73
|
}), jsxs("div", {
|
|
79
74
|
className: "flex items-center mb-2",
|
|
80
75
|
children: [jsx("p", {
|
|
81
76
|
style: {
|
|
82
|
-
color: navTheme
|
|
77
|
+
color: navTheme === 'dark' ? '#ffff' : 'black'
|
|
83
78
|
},
|
|
84
79
|
children: t('menu_header')
|
|
85
80
|
}), jsx("div", {
|
|
86
81
|
className: "flex-grow"
|
|
87
82
|
}), jsx(Switch, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
changeSetting: changeSetting,
|
|
91
|
-
settingKey: "menuHeaderRender"
|
|
83
|
+
value: regions.menuHeaderRender,
|
|
84
|
+
onChange: checked => handleRegionChange('menuHeaderRender', checked)
|
|
92
85
|
})]
|
|
93
86
|
})]
|
|
94
87
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegionalSettings.js","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RegionalSettings.js","sources":["../../../src/components/SettingDrawer/RegionalSettings.tsx"],"sourcesContent":[null],"names":[],"mappings":"2HAKwB,SAAA,gBAAgB,CAAC,KAA6B,EAAA;AAClE,EAAA,MAAA;IACA,QAAQ;IACR;AAEA,GAAA,GAAA;AACI,EAAA,MAAA;;oBAEa,CAAA,UAAU,CAAE;AACrB,EAAA,MAAA;cACC,EAAG;AACP,IAAA;AACL,GAAA,GAAE,QAAA,IAAA,EAAA;AAEF,EAAA,MAAA,kBACI,GAAA,CAAA,GAAA,EAAA,KACS,KAAA;AAiCjB,IAAC,IAAA,CAAA,aAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export type MergerSettingsType<T> = Partial<T> & {
|
|
4
|
-
primaryColor?: string;
|
|
5
|
-
colorWeak?: boolean;
|
|
6
|
-
};
|
|
7
|
-
interface IShowSettingPanel extends ProSettings {
|
|
8
|
-
showSettingPanel: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface SettingDrawerProps {
|
|
11
|
-
settings?: MergerSettingsType<IShowSettingPanel>;
|
|
12
|
-
collapse?: boolean;
|
|
13
|
-
getContainer?: any;
|
|
14
|
-
publicPath?: string;
|
|
15
|
-
hideLoading?: boolean;
|
|
16
|
-
hideColors?: boolean;
|
|
17
|
-
hideHintAlert?: boolean;
|
|
18
|
-
prefixCls?: string;
|
|
19
|
-
hideCopyButton?: boolean;
|
|
20
|
-
navTheme?: string;
|
|
21
|
-
primaryColor?: string;
|
|
22
|
-
onCollapseChange?: (collapse: boolean) => void;
|
|
23
|
-
onSettingChange?: (settings: MergerSettingsType<ProSettings>) => void;
|
|
24
|
-
}
|
|
2
|
+
import { SettingDrawerProps } from './types';
|
|
25
3
|
export declare const SettingDrawer: React.FC<SettingDrawerProps>;
|
|
26
|
-
export {};
|
|
27
4
|
//# sourceMappingURL=SettingDrawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/SettingDrawer/SettingDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,EAAsB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsRjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgNtD,CAAC"}
|