@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.
Files changed (113) hide show
  1. package/lib/components/Layout/BasicLayout/index.d.ts +0 -6
  2. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  3. package/lib/components/Layout/BasicLayout/index.js +18 -44
  4. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  5. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -1
  6. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  7. package/lib/components/Layout/GlobalHeader/Header.js +32 -38
  8. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  9. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -3
  10. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  11. package/lib/components/Layout/GlobalHeader/RightContent.js +23 -0
  12. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
  13. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
  14. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  15. package/lib/components/Layout/ProTailwindLayout.js +6 -1
  16. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  17. package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -0
  18. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
  19. package/lib/components/Layout/Sidebar/Sidebar.js +41 -10
  20. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  21. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
  22. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
  23. package/lib/components/Layout/Sidebar/SidebarMenu.js +118 -38
  24. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
  25. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  26. package/lib/components/Layout/TailwindLayout.js +8 -2
  27. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  28. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +4 -0
  29. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
  30. package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
  31. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
  32. package/lib/components/Layout/slot-fill/index.d.ts +1 -0
  33. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  34. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
  35. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
  36. package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
  37. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
  38. package/lib/components/SettingDrawer/LayoutChange.d.ts +1 -5
  39. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
  40. package/lib/components/SettingDrawer/LayoutChange.js +19 -23
  41. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
  42. package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
  43. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
  44. package/lib/components/SettingDrawer/NavigationsModes.js +281 -0
  45. package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
  46. package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
  47. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  48. package/lib/components/SettingDrawer/RegionalSettings.js +24 -31
  49. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  50. package/lib/components/SettingDrawer/SettingDrawer.d.ts +1 -24
  51. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  52. package/lib/components/SettingDrawer/SettingDrawer.js +115 -110
  53. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  54. package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
  55. package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
  56. package/lib/components/SettingDrawer/Switch/index.js +17 -34
  57. package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
  58. package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
  59. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
  60. package/lib/components/SettingDrawer/ThemeColor.js +3 -0
  61. package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
  62. package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
  63. package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
  64. package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
  65. package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
  66. package/lib/components/SettingDrawer/types.d.ts +70 -0
  67. package/lib/components/SettingDrawer/types.d.ts.map +1 -0
  68. package/lib/components/ThemeProvider/ThemeProvider.d.ts +18 -0
  69. package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -0
  70. package/lib/components/ThemeProvider/ThemeProvider.js +62 -0
  71. package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -0
  72. package/lib/components/ThemeProvider/ThemeToggle.d.ts +7 -0
  73. package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +1 -0
  74. package/lib/components/ThemeProvider/index.d.ts +7 -0
  75. package/lib/components/ThemeProvider/index.d.ts.map +1 -0
  76. package/lib/components/ThemeProvider/themeRegistry.d.ts +3 -0
  77. package/lib/components/ThemeProvider/themeRegistry.d.ts.map +1 -0
  78. package/lib/components/ThemeProvider/themeRegistry.js +388 -0
  79. package/lib/components/ThemeProvider/themeRegistry.js.map +1 -0
  80. package/lib/components/ThemeProvider/themeUtils.d.ts +26 -0
  81. package/lib/components/ThemeProvider/themeUtils.d.ts.map +1 -0
  82. package/lib/components/ThemeProvider/themeUtils.js +135 -0
  83. package/lib/components/ThemeProvider/themeUtils.js.map +1 -0
  84. package/lib/components/ThemeProvider/types.d.ts +112 -0
  85. package/lib/components/ThemeProvider/types.d.ts.map +1 -0
  86. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +3 -1
  87. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  88. package/lib/components/typings.d.ts +8 -0
  89. package/lib/components/typings.d.ts.map +1 -1
  90. package/lib/compute.d.ts.map +1 -1
  91. package/lib/compute.js +6 -4
  92. package/lib/compute.js.map +1 -1
  93. package/lib/icons.d.ts +14 -0
  94. package/lib/icons.d.ts.map +1 -0
  95. package/lib/icons.js +13 -0
  96. package/lib/icons.js.map +1 -0
  97. package/lib/index.d.ts +0 -3
  98. package/lib/index.d.ts.map +1 -1
  99. package/lib/index.js +1 -1
  100. package/lib/index.js.map +1 -1
  101. package/lib/machines/settingsMachine.d.ts +3 -0
  102. package/lib/machines/settingsMachine.d.ts.map +1 -0
  103. package/lib/machines/settingsMachine.js +220 -0
  104. package/lib/machines/settingsMachine.js.map +1 -0
  105. package/lib/machines/types.d.ts +67 -0
  106. package/lib/machines/types.d.ts.map +1 -0
  107. package/lib/routes.json +1 -0
  108. package/lib/styles/index.css +438 -46
  109. package/package.json +5 -5
  110. package/lib/utils/index.d.ts +0 -2
  111. package/lib/utils/index.d.ts.map +0 -1
  112. package/lib/utils/index.js +0 -13
  113. 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 { ProSettings } from '../defaultSettings';
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":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,KAAK,sBAAsB,GAAG;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,GAAG,KAAK,IAAI,CAAC;CACxE,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,sBAAsB,2CA4DrE"}
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
- showHeader,
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 == 'dark' ? '#ffff' : 'black'
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
- settings: settings,
29
- value: showHeader || showHeader === undefined,
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 == 'dark' ? '#ffff' : 'black'
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
- settings: settings,
44
- value: showFooter || showFooter === undefined,
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 == 'dark' ? '#ffff' : 'black'
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
- settings: settings,
59
- value: searchBarRender || searchBarRender === undefined,
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 == 'dark' ? '#ffff' : 'black'
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
- settings: settings,
74
- value: showMenu || showMenu === undefined,
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 == 'dark' ? '#ffff' : 'black'
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
- settings: settings,
89
- value: menuHeaderRender || menuHeaderRender === undefined,
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":"2HAUwB,SAAA,gBAAgB,CAAC,KAA6B,EAAA;AAClE,EAAA,MAAA;IACA,QAAQ;AACR,IAAA;MACM,KAAA;AAEN,EAAA,MAAA;AAsDJ,IAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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 { ProSettings } from '../defaultSettings';
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;AAQ/B,OAAO,EAAmB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAOlE,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AACF,UAAU,iBAAkB,SAAQ,WAAW;IAC3C,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACzE;AA6QD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiNtD,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"}