@duxweb/dvha-core 0.1.15 → 0.1.16
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/dist/cjs/components/auth/can.cjs +1 -1
- package/dist/cjs/directive/permission.cjs +1 -1
- package/dist/cjs/hooks/overlay.cjs +1 -1
- package/dist/cjs/hooks/theme.cjs +8 -1
- package/dist/cjs/hooks/themeColor.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/provider/app.cjs +1 -1
- package/dist/cjs/stores/theme.cjs +1 -0
- package/dist/cjs/utils/theme.cjs +1 -0
- package/dist/esm/components/auth/can.js +7 -6
- package/dist/esm/directive/permission.js +3 -2
- package/dist/esm/hooks/overlay.js +3 -2
- package/dist/esm/hooks/theme.js +177 -23
- package/dist/esm/hooks/themeColor.js +291 -0
- package/dist/esm/index.js +55 -49
- package/dist/esm/provider/app.js +8 -7
- package/dist/esm/stores/theme.js +57 -0
- package/dist/esm/utils/theme.js +82 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/theme.d.ts +252 -3
- package/dist/types/hooks/themeColor.d.ts +288 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/theme.d.ts +104 -0
- package/dist/types/types/theme.d.ts +2 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/theme.d.ts +52 -0
- package/package.json +2 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
const f = {
|
|
2
|
+
slate: {
|
|
3
|
+
50: "#f8fafc",
|
|
4
|
+
100: "#f1f5f9",
|
|
5
|
+
200: "#e2e8f0",
|
|
6
|
+
300: "#cbd5e1",
|
|
7
|
+
400: "#94a3b8",
|
|
8
|
+
500: "#64748b",
|
|
9
|
+
600: "#475569",
|
|
10
|
+
700: "#334155",
|
|
11
|
+
800: "#1e293b",
|
|
12
|
+
900: "#0f172a",
|
|
13
|
+
950: "#020617"
|
|
14
|
+
},
|
|
15
|
+
gray: {
|
|
16
|
+
50: "#f9fafb",
|
|
17
|
+
100: "#f3f4f6",
|
|
18
|
+
200: "#e5e7eb",
|
|
19
|
+
300: "#d1d5db",
|
|
20
|
+
400: "#9ca3af",
|
|
21
|
+
500: "#6b7280",
|
|
22
|
+
600: "#4b5563",
|
|
23
|
+
700: "#374151",
|
|
24
|
+
800: "#1f2937",
|
|
25
|
+
900: "#111827",
|
|
26
|
+
950: "#030712"
|
|
27
|
+
},
|
|
28
|
+
zinc: {
|
|
29
|
+
50: "#fafafa",
|
|
30
|
+
100: "#f4f4f5",
|
|
31
|
+
200: "#e4e4e7",
|
|
32
|
+
300: "#d4d4d8",
|
|
33
|
+
400: "#a1a1aa",
|
|
34
|
+
500: "#71717a",
|
|
35
|
+
600: "#52525b",
|
|
36
|
+
700: "#3f3f46",
|
|
37
|
+
800: "#27272a",
|
|
38
|
+
900: "#18181b",
|
|
39
|
+
950: "#09090b"
|
|
40
|
+
},
|
|
41
|
+
neutral: {
|
|
42
|
+
50: "#fafafa",
|
|
43
|
+
100: "#f5f5f5",
|
|
44
|
+
200: "#e5e5e5",
|
|
45
|
+
300: "#d4d4d4",
|
|
46
|
+
400: "#a3a3a3",
|
|
47
|
+
500: "#737373",
|
|
48
|
+
600: "#525252",
|
|
49
|
+
700: "#404040",
|
|
50
|
+
800: "#262626",
|
|
51
|
+
900: "#171717",
|
|
52
|
+
950: "#0a0a0a"
|
|
53
|
+
},
|
|
54
|
+
stone: {
|
|
55
|
+
50: "#fafaf9",
|
|
56
|
+
100: "#f5f5f4",
|
|
57
|
+
200: "#e7e5e4",
|
|
58
|
+
300: "#d6d3d1",
|
|
59
|
+
400: "#a8a29e",
|
|
60
|
+
500: "#78716c",
|
|
61
|
+
600: "#57534e",
|
|
62
|
+
700: "#44403c",
|
|
63
|
+
800: "#292524",
|
|
64
|
+
900: "#1c1917",
|
|
65
|
+
950: "#0c0a09"
|
|
66
|
+
},
|
|
67
|
+
red: {
|
|
68
|
+
50: "#fef2f2",
|
|
69
|
+
100: "#fee2e2",
|
|
70
|
+
200: "#fecaca",
|
|
71
|
+
300: "#fca5a5",
|
|
72
|
+
400: "#f87171",
|
|
73
|
+
500: "#ef4444",
|
|
74
|
+
600: "#dc2626",
|
|
75
|
+
700: "#b91c1c",
|
|
76
|
+
800: "#991b1b",
|
|
77
|
+
900: "#7f1d1d",
|
|
78
|
+
950: "#450a0a"
|
|
79
|
+
},
|
|
80
|
+
orange: {
|
|
81
|
+
50: "#fff7ed",
|
|
82
|
+
100: "#ffedd5",
|
|
83
|
+
200: "#fed7aa",
|
|
84
|
+
300: "#fdba74",
|
|
85
|
+
400: "#fb923c",
|
|
86
|
+
500: "#f97316",
|
|
87
|
+
600: "#ea580c",
|
|
88
|
+
700: "#c2410c",
|
|
89
|
+
800: "#9a3412",
|
|
90
|
+
900: "#7c2d12",
|
|
91
|
+
950: "#431407"
|
|
92
|
+
},
|
|
93
|
+
amber: {
|
|
94
|
+
50: "#fffbeb",
|
|
95
|
+
100: "#fef3c7",
|
|
96
|
+
200: "#fde68a",
|
|
97
|
+
300: "#fcd34d",
|
|
98
|
+
400: "#fbbf24",
|
|
99
|
+
500: "#f59e0b",
|
|
100
|
+
600: "#d97706",
|
|
101
|
+
700: "#b45309",
|
|
102
|
+
800: "#92400e",
|
|
103
|
+
900: "#78350f",
|
|
104
|
+
950: "#451a03"
|
|
105
|
+
},
|
|
106
|
+
yellow: {
|
|
107
|
+
50: "#fefce8",
|
|
108
|
+
100: "#fef9c3",
|
|
109
|
+
200: "#fef08a",
|
|
110
|
+
300: "#fde047",
|
|
111
|
+
400: "#facc15",
|
|
112
|
+
500: "#eab308",
|
|
113
|
+
600: "#ca8a04",
|
|
114
|
+
700: "#a16207",
|
|
115
|
+
800: "#854d0e",
|
|
116
|
+
900: "#713f12",
|
|
117
|
+
950: "#422006"
|
|
118
|
+
},
|
|
119
|
+
lime: {
|
|
120
|
+
50: "#f7fee7",
|
|
121
|
+
100: "#ecfccb",
|
|
122
|
+
200: "#d9f99d",
|
|
123
|
+
300: "#bef264",
|
|
124
|
+
400: "#a3e635",
|
|
125
|
+
500: "#84cc16",
|
|
126
|
+
600: "#65a30d",
|
|
127
|
+
700: "#4d7c0f",
|
|
128
|
+
800: "#3f6212",
|
|
129
|
+
900: "#365314",
|
|
130
|
+
950: "#1a2e05"
|
|
131
|
+
},
|
|
132
|
+
green: {
|
|
133
|
+
50: "#f0fdf4",
|
|
134
|
+
100: "#dcfce7",
|
|
135
|
+
200: "#bbf7d0",
|
|
136
|
+
300: "#86efac",
|
|
137
|
+
400: "#4ade80",
|
|
138
|
+
500: "#22c55e",
|
|
139
|
+
600: "#16a34a",
|
|
140
|
+
700: "#15803d",
|
|
141
|
+
800: "#166534",
|
|
142
|
+
900: "#14532d",
|
|
143
|
+
950: "#052e16"
|
|
144
|
+
},
|
|
145
|
+
emerald: {
|
|
146
|
+
50: "#ecfdf5",
|
|
147
|
+
100: "#d1fae5",
|
|
148
|
+
200: "#a7f3d0",
|
|
149
|
+
300: "#6ee7b7",
|
|
150
|
+
400: "#34d399",
|
|
151
|
+
500: "#10b981",
|
|
152
|
+
600: "#059669",
|
|
153
|
+
700: "#047857",
|
|
154
|
+
800: "#065f46",
|
|
155
|
+
900: "#064e3b",
|
|
156
|
+
950: "#022c22"
|
|
157
|
+
},
|
|
158
|
+
teal: {
|
|
159
|
+
50: "#f0fdfa",
|
|
160
|
+
100: "#ccfbf1",
|
|
161
|
+
200: "#99f6e4",
|
|
162
|
+
300: "#5eead4",
|
|
163
|
+
400: "#2dd4bf",
|
|
164
|
+
500: "#14b8a6",
|
|
165
|
+
600: "#0d9488",
|
|
166
|
+
700: "#0f766e",
|
|
167
|
+
800: "#115e59",
|
|
168
|
+
900: "#134e4a",
|
|
169
|
+
950: "#042f2e"
|
|
170
|
+
},
|
|
171
|
+
cyan: {
|
|
172
|
+
50: "#ecfeff",
|
|
173
|
+
100: "#cffafe",
|
|
174
|
+
200: "#a5f3fc",
|
|
175
|
+
300: "#67e8f9",
|
|
176
|
+
400: "#22d3ee",
|
|
177
|
+
500: "#06b6d4",
|
|
178
|
+
600: "#0891b2",
|
|
179
|
+
700: "#0e7490",
|
|
180
|
+
800: "#155e75",
|
|
181
|
+
900: "#164e63",
|
|
182
|
+
950: "#083344"
|
|
183
|
+
},
|
|
184
|
+
sky: {
|
|
185
|
+
50: "#f0f9ff",
|
|
186
|
+
100: "#e0f2fe",
|
|
187
|
+
200: "#bae6fd",
|
|
188
|
+
300: "#7dd3fc",
|
|
189
|
+
400: "#38bdf8",
|
|
190
|
+
500: "#0ea5e9",
|
|
191
|
+
600: "#0284c7",
|
|
192
|
+
700: "#0369a1",
|
|
193
|
+
800: "#075985",
|
|
194
|
+
900: "#0c4a6e",
|
|
195
|
+
950: "#082f49"
|
|
196
|
+
},
|
|
197
|
+
blue: {
|
|
198
|
+
50: "#eff6ff",
|
|
199
|
+
100: "#dbeafe",
|
|
200
|
+
200: "#bfdbfe",
|
|
201
|
+
300: "#93c5fd",
|
|
202
|
+
400: "#60a5fa",
|
|
203
|
+
500: "#3b82f6",
|
|
204
|
+
600: "#2563eb",
|
|
205
|
+
700: "#1d4ed8",
|
|
206
|
+
800: "#1e40af",
|
|
207
|
+
900: "#1e3a8a",
|
|
208
|
+
950: "#172554"
|
|
209
|
+
},
|
|
210
|
+
indigo: {
|
|
211
|
+
50: "#eef2ff",
|
|
212
|
+
100: "#e0e7ff",
|
|
213
|
+
200: "#c7d2fe",
|
|
214
|
+
300: "#a5b4fc",
|
|
215
|
+
400: "#818cf8",
|
|
216
|
+
500: "#6366f1",
|
|
217
|
+
600: "#4f46e5",
|
|
218
|
+
700: "#4338ca",
|
|
219
|
+
800: "#3730a3",
|
|
220
|
+
900: "#312e81",
|
|
221
|
+
950: "#1e1b4b"
|
|
222
|
+
},
|
|
223
|
+
violet: {
|
|
224
|
+
50: "#f5f3ff",
|
|
225
|
+
100: "#ede9fe",
|
|
226
|
+
200: "#ddd6fe",
|
|
227
|
+
300: "#c4b5fd",
|
|
228
|
+
400: "#a78bfa",
|
|
229
|
+
500: "#8b5cf6",
|
|
230
|
+
600: "#7c3aed",
|
|
231
|
+
700: "#6d28d9",
|
|
232
|
+
800: "#5b21b6",
|
|
233
|
+
900: "#4c1d95",
|
|
234
|
+
950: "#2e1065"
|
|
235
|
+
},
|
|
236
|
+
purple: {
|
|
237
|
+
50: "#faf5ff",
|
|
238
|
+
100: "#f3e8ff",
|
|
239
|
+
200: "#e9d5ff",
|
|
240
|
+
300: "#d8b4fe",
|
|
241
|
+
400: "#c084fc",
|
|
242
|
+
500: "#a855f7",
|
|
243
|
+
600: "#9333ea",
|
|
244
|
+
700: "#7e22ce",
|
|
245
|
+
800: "#6b21a8",
|
|
246
|
+
900: "#581c87",
|
|
247
|
+
950: "#3b0764"
|
|
248
|
+
},
|
|
249
|
+
fuchsia: {
|
|
250
|
+
50: "#fdf4ff",
|
|
251
|
+
100: "#fae8ff",
|
|
252
|
+
200: "#f5d0fe",
|
|
253
|
+
300: "#f0abfc",
|
|
254
|
+
400: "#e879f9",
|
|
255
|
+
500: "#d946ef",
|
|
256
|
+
600: "#c026d3",
|
|
257
|
+
700: "#a21caf",
|
|
258
|
+
800: "#86198f",
|
|
259
|
+
900: "#701a75",
|
|
260
|
+
950: "#4a044e"
|
|
261
|
+
},
|
|
262
|
+
pink: {
|
|
263
|
+
50: "#fdf2f8",
|
|
264
|
+
100: "#fce7f3",
|
|
265
|
+
200: "#fbcfe8",
|
|
266
|
+
300: "#f9a8d4",
|
|
267
|
+
400: "#f472b6",
|
|
268
|
+
500: "#ec4899",
|
|
269
|
+
600: "#db2777",
|
|
270
|
+
700: "#be185d",
|
|
271
|
+
800: "#9d174d",
|
|
272
|
+
900: "#831843",
|
|
273
|
+
950: "#500724"
|
|
274
|
+
},
|
|
275
|
+
rose: {
|
|
276
|
+
50: "#fff1f2",
|
|
277
|
+
100: "#ffe4e6",
|
|
278
|
+
200: "#fecdd3",
|
|
279
|
+
300: "#fda4af",
|
|
280
|
+
400: "#fb7185",
|
|
281
|
+
500: "#f43f5e",
|
|
282
|
+
600: "#e11d48",
|
|
283
|
+
700: "#be123c",
|
|
284
|
+
800: "#9f1239",
|
|
285
|
+
900: "#881337",
|
|
286
|
+
950: "#4c0519"
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
export {
|
|
290
|
+
f as themeColor
|
|
291
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createDux as o } from "./main.js";
|
|
2
|
-
import { useCan as u, useCheck as s, useError as p, useForgotPassword as m, useGetAuth as x, useIsLogin as
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useClient as
|
|
2
|
+
import { useCan as u, useCheck as s, useError as p, useForgotPassword as m, useGetAuth as x, useIsLogin as f, useLogin as a, useLogout as i, useRegister as n, useUpdatePassword as d } from "./hooks/auth.js";
|
|
3
|
+
import { useConfig as C } from "./hooks/config.js";
|
|
4
|
+
import { useClient as v, useCreate as g, useCreateMany as h, useCustom as I, useCustomMutation as L, useDelete as M, useDeleteMany as S, useInfiniteList as T, useInvalidate as c, useList as y, useMany as P, useOne as U, useUpdate as A, useUpdateMany as R } from "./hooks/data.js";
|
|
5
5
|
import { useManage as E } from "./hooks/manage.js";
|
|
6
6
|
import { useMenu as b } from "./hooks/menu.js";
|
|
7
7
|
import { useTheme as k } from "./hooks/theme.js";
|
|
@@ -16,50 +16,55 @@ import { useImportCsv as _ } from "./hooks/importCsv.js";
|
|
|
16
16
|
import { useUpload as ee } from "./hooks/upload.js";
|
|
17
17
|
import { createLocalUploadDriver as oe } from "./hooks/upload/local.js";
|
|
18
18
|
import { createS3UploadDriver as ue } from "./hooks/upload/s3.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
19
|
+
import { themeColor as pe } from "./hooks/themeColor.js";
|
|
20
|
+
import { initRouter as xe } from "./router/route.js";
|
|
21
|
+
import { useAuthStore as ae } from "./stores/auth.js";
|
|
22
|
+
import { useRouteStore as ne } from "./stores/route.js";
|
|
23
|
+
import { useTabStore as le } from "./stores/tab.js";
|
|
24
|
+
import { useManageStore as De } from "./stores/manage.js";
|
|
25
|
+
import { useI18nStore as ge } from "./stores/i18n.js";
|
|
26
|
+
import { useThemeStore as Ie } from "./stores/theme.js";
|
|
27
|
+
import { DuxLogo as Me } from "./components/common/logo.js";
|
|
28
|
+
import { default as Te } from "./components/loader/iframe.js";
|
|
29
|
+
import { DuxOverlay as ye } from "./components/overlay/overlay.js";
|
|
30
|
+
import { DuxCan as Ue } from "./components/auth/can.js";
|
|
31
|
+
import { arrayToTree as Re, searchTree as we, treeToArr as Ee } from "./utils/tree.js";
|
|
32
|
+
import { themePreset as be } from "./utils/theme.js";
|
|
33
|
+
import { DuxAppProvider as ke } from "./provider/app.js";
|
|
34
|
+
import { DuxTabRouterView as Ve } from "./provider/tab.js";
|
|
35
|
+
import { simpleAuthProvider as qe } from "./preset/authProvider.js";
|
|
36
|
+
import { simpleDataProvider as Be } from "./preset/dataProvider.js";
|
|
37
|
+
import { i18nProvider as Je } from "./preset/i18nProvider.js";
|
|
35
38
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
ke as DuxAppProvider,
|
|
40
|
+
Ue as DuxCan,
|
|
41
|
+
Te as DuxLoaderIframe,
|
|
42
|
+
Me as DuxLogo,
|
|
43
|
+
ye as DuxOverlay,
|
|
44
|
+
Ve as DuxTabRouterView,
|
|
45
|
+
Re as arrayToTree,
|
|
43
46
|
o as createDux,
|
|
44
47
|
oe as createLocalUploadDriver,
|
|
45
48
|
ue as createS3UploadDriver,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
Je as i18nProvider,
|
|
50
|
+
xe as initRouter,
|
|
51
|
+
we as searchTree,
|
|
52
|
+
qe as simpleAuthProvider,
|
|
53
|
+
Be as simpleDataProvider,
|
|
54
|
+
pe as themeColor,
|
|
55
|
+
be as themePreset,
|
|
56
|
+
Ee as treeToArr,
|
|
57
|
+
ae as useAuthStore,
|
|
53
58
|
u as useCan,
|
|
54
59
|
s as useCheck,
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
v as useClient,
|
|
61
|
+
C as useConfig,
|
|
57
62
|
g as useCreate,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
h as useCreateMany,
|
|
64
|
+
I as useCustom,
|
|
65
|
+
L as useCustomMutation,
|
|
66
|
+
M as useDelete,
|
|
67
|
+
S as useDeleteMany,
|
|
63
68
|
p as useError,
|
|
64
69
|
N as useExport,
|
|
65
70
|
Y as useExportCsv,
|
|
@@ -67,26 +72,27 @@ export {
|
|
|
67
72
|
J as useForm,
|
|
68
73
|
x as useGetAuth,
|
|
69
74
|
q as useI18n,
|
|
70
|
-
|
|
75
|
+
ge as useI18nStore,
|
|
71
76
|
W as useImport,
|
|
72
77
|
_ as useImportCsv,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
T as useInfiniteList,
|
|
79
|
+
c as useInvalidate,
|
|
80
|
+
f as useIsLogin,
|
|
81
|
+
y as useList,
|
|
82
|
+
a as useLogin,
|
|
78
83
|
i as useLogout,
|
|
79
84
|
E as useManage,
|
|
80
|
-
|
|
85
|
+
De as useManageStore,
|
|
81
86
|
P as useMany,
|
|
82
87
|
b as useMenu,
|
|
83
88
|
U as useOne,
|
|
84
89
|
V as useOverlay,
|
|
85
90
|
n as useRegister,
|
|
86
|
-
|
|
91
|
+
ne as useRouteStore,
|
|
87
92
|
B as useSelect,
|
|
88
|
-
|
|
93
|
+
le as useTabStore,
|
|
89
94
|
k as useTheme,
|
|
95
|
+
Ie as useThemeStore,
|
|
90
96
|
A as useUpdate,
|
|
91
97
|
R as useUpdateMany,
|
|
92
98
|
d as useUpdatePassword,
|
package/dist/esm/provider/app.js
CHANGED
|
@@ -12,21 +12,22 @@ import { useRouteStore as Q } from "../stores/route.js";
|
|
|
12
12
|
import { useManageStore as T } from "../stores/manage.js";
|
|
13
13
|
import { useI18nStore as W } from "../stores/i18n.js";
|
|
14
14
|
import "@vueuse/core";
|
|
15
|
+
import "colorizr";
|
|
15
16
|
import "clsx";
|
|
16
17
|
import "json-2-csv";
|
|
17
18
|
import "axios";
|
|
18
|
-
const
|
|
19
|
+
const ge = /* @__PURE__ */ O({
|
|
19
20
|
name: "DuxAppProvider",
|
|
20
21
|
props: {},
|
|
21
22
|
setup(X, {
|
|
22
|
-
slots:
|
|
23
|
+
slots: u
|
|
23
24
|
}) {
|
|
24
|
-
const f = U("dux.manage"),
|
|
25
|
+
const f = U("dux.manage"), m = H(), s = B();
|
|
25
26
|
return s.beforeEach(async (r, Y, n) => {
|
|
26
27
|
var P, R, b, A, S, $, M, k, w, z, I, C, y, D;
|
|
27
28
|
const t = r.meta.manageName, _ = r.meta.authorization === !1;
|
|
28
29
|
if (!t) {
|
|
29
|
-
const e =
|
|
30
|
+
const e = m.defaultManage || ((R = (P = m.manages) == null ? void 0 : P[0]) == null ? void 0 : R.name) || "";
|
|
30
31
|
return n({
|
|
31
32
|
path: `/${e}`,
|
|
32
33
|
replace: !0
|
|
@@ -34,7 +35,7 @@ const le = /* @__PURE__ */ O({
|
|
|
34
35
|
}
|
|
35
36
|
f && (f.value = t);
|
|
36
37
|
const h = T(t);
|
|
37
|
-
h.isInit() || h.setConfig((b =
|
|
38
|
+
h.isInit() || h.setConfig((b = m.manages) == null ? void 0 : b.find((e) => e.name === t), m);
|
|
38
39
|
const i = Q(t), a = J(t), d = K(t), l = W(t);
|
|
39
40
|
if ((A = a.config) != null && A.i18nProvider && !l.isInit()) {
|
|
40
41
|
const e = l.getLocale();
|
|
@@ -138,11 +139,11 @@ const le = /* @__PURE__ */ O({
|
|
|
138
139
|
}), () => V(q, null, {
|
|
139
140
|
default: () => {
|
|
140
141
|
var r;
|
|
141
|
-
return [(r =
|
|
142
|
+
return [(r = u.default) == null ? void 0 : r.call(u)];
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
147
|
export {
|
|
147
|
-
|
|
148
|
+
ge as DuxAppProvider
|
|
148
149
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineStore as d } from "pinia";
|
|
2
|
+
import { inject as v, ref as n } from "vue";
|
|
3
|
+
const s = {
|
|
4
|
+
primary: "blue",
|
|
5
|
+
info: "cyan",
|
|
6
|
+
success: "green",
|
|
7
|
+
warning: "amber",
|
|
8
|
+
error: "red",
|
|
9
|
+
gray: "gray"
|
|
10
|
+
};
|
|
11
|
+
function g(t) {
|
|
12
|
+
const e = v("dux.manage");
|
|
13
|
+
if (t || (t = (e == null ? void 0 : e.value) || ""), !t)
|
|
14
|
+
throw new Error("manage not found");
|
|
15
|
+
return T(t)();
|
|
16
|
+
}
|
|
17
|
+
function T(t) {
|
|
18
|
+
return d(`theme-${t}`, () => {
|
|
19
|
+
const e = n(s), o = n("auto"), u = n(!1);
|
|
20
|
+
function c() {
|
|
21
|
+
u.value = !0;
|
|
22
|
+
}
|
|
23
|
+
function i(r) {
|
|
24
|
+
o.value = r;
|
|
25
|
+
}
|
|
26
|
+
function f(r, a) {
|
|
27
|
+
e.value[r] = a;
|
|
28
|
+
}
|
|
29
|
+
function m(r) {
|
|
30
|
+
Object.assign(e.value, r);
|
|
31
|
+
}
|
|
32
|
+
function h() {
|
|
33
|
+
e.value = { ...s };
|
|
34
|
+
}
|
|
35
|
+
function l() {
|
|
36
|
+
return e.value;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
mode: o,
|
|
40
|
+
setMode: i,
|
|
41
|
+
theme: e,
|
|
42
|
+
cssInit: u,
|
|
43
|
+
setCssInit: c,
|
|
44
|
+
setThemeColor: f,
|
|
45
|
+
setThemeColors: m,
|
|
46
|
+
resetTheme: h,
|
|
47
|
+
getTheme: l
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
persist: {
|
|
51
|
+
pick: ["theme", "mode"]
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
g as useThemeStore
|
|
57
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const l = (i) => {
|
|
2
|
+
const e = {}, c = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"], u = ["primary", "info", "success", "warning", "error", "gray"], b = ["hover", "pressed", "focus", "disabled"];
|
|
3
|
+
e.white = { DEFAULT: "var(--color-white)" }, e.black = { DEFAULT: "var(--color-black)" }, Object.keys(i).forEach((r) => {
|
|
4
|
+
e[r] = {}, c.forEach((o) => {
|
|
5
|
+
e[r][o] = `var(--base-color-${r}-${o})`;
|
|
6
|
+
});
|
|
7
|
+
}), u.forEach((r) => {
|
|
8
|
+
e[r] = {}, e[r].DEFAULT = `var(--ui-color-${r})`, c.forEach((o) => {
|
|
9
|
+
e[r][o] = `var(--ui-color-${r}-${o})`;
|
|
10
|
+
}), b.forEach((o) => {
|
|
11
|
+
e[r][o] = `var(--ui-color-${r}-${o})`;
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const t = {
|
|
15
|
+
// 文字颜色
|
|
16
|
+
text: {
|
|
17
|
+
color: "var(--ui-text)"
|
|
18
|
+
},
|
|
19
|
+
"text-dimmed": {
|
|
20
|
+
color: "var(--ui-text-dimmed)"
|
|
21
|
+
},
|
|
22
|
+
"text-muted": {
|
|
23
|
+
color: "var(--ui-text-muted)"
|
|
24
|
+
},
|
|
25
|
+
"text-toned": {
|
|
26
|
+
color: "var(--ui-text-toned)"
|
|
27
|
+
},
|
|
28
|
+
"text-highlighted": {
|
|
29
|
+
color: "var(--ui-text-highlighted)"
|
|
30
|
+
},
|
|
31
|
+
"text-inverted": {
|
|
32
|
+
color: "var(--ui-text-inverted)"
|
|
33
|
+
},
|
|
34
|
+
// 背景颜色
|
|
35
|
+
bg: {
|
|
36
|
+
"background-color": "var(--ui-bg)"
|
|
37
|
+
},
|
|
38
|
+
"bg-muted": {
|
|
39
|
+
"background-color": "var(--ui-bg-muted)"
|
|
40
|
+
},
|
|
41
|
+
"bg-elevated": {
|
|
42
|
+
"background-color": "var(--ui-bg-elevated)"
|
|
43
|
+
},
|
|
44
|
+
"bg-accented": {
|
|
45
|
+
"background-color": "var(--ui-bg-accented)"
|
|
46
|
+
},
|
|
47
|
+
"bg-inverted": {
|
|
48
|
+
"background-color": "var(--ui-bg-inverted)"
|
|
49
|
+
},
|
|
50
|
+
// 边框颜色
|
|
51
|
+
border: {
|
|
52
|
+
"border-color": "var(--ui-border)"
|
|
53
|
+
},
|
|
54
|
+
"border-muted": {
|
|
55
|
+
"border-color": "var(--ui-border-muted)"
|
|
56
|
+
},
|
|
57
|
+
"border-accented": {
|
|
58
|
+
"border-color": "var(--ui-border-accented)"
|
|
59
|
+
},
|
|
60
|
+
"border-inverted": {
|
|
61
|
+
"border-color": "var(--ui-border-inverted)"
|
|
62
|
+
}
|
|
63
|
+
}, a = {};
|
|
64
|
+
Object.entries(t).forEach(([r, o]) => {
|
|
65
|
+
a[`.${r}`] = o;
|
|
66
|
+
});
|
|
67
|
+
const d = [];
|
|
68
|
+
return Object.entries(t).forEach(([r, o]) => {
|
|
69
|
+
d.push([
|
|
70
|
+
r,
|
|
71
|
+
o
|
|
72
|
+
]);
|
|
73
|
+
}), {
|
|
74
|
+
colors: e,
|
|
75
|
+
classes: t,
|
|
76
|
+
rules: d,
|
|
77
|
+
utilities: a
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
l as themePreset
|
|
82
|
+
};
|