@gx-design-vue/pro-layout-components 0.1.0-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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +76 -0
  3. package/dist/AppsLogoComponents/AppLogoList.d.ts +24 -0
  4. package/dist/AppsLogoComponents/AppLogoList.js +43 -0
  5. package/dist/AppsLogoComponents/AppsLogo.d.ts +10 -0
  6. package/dist/AppsLogoComponents/AppsLogo.js +12 -0
  7. package/dist/AppsLogoComponents/DefaultContent.d.ts +27 -0
  8. package/dist/AppsLogoComponents/DefaultContent.js +43 -0
  9. package/dist/AppsLogoComponents/SimpleContent.d.ts +38 -0
  10. package/dist/AppsLogoComponents/SimpleContent.js +63 -0
  11. package/dist/AppsLogoComponents/index.d.ts +32 -0
  12. package/dist/AppsLogoComponents/index.js +71 -0
  13. package/dist/AppsLogoComponents/props.d.ts +26 -0
  14. package/dist/AppsLogoComponents/props.js +12 -0
  15. package/dist/AppsLogoComponents/style/default.d.ts +6 -0
  16. package/dist/AppsLogoComponents/style/default.js +70 -0
  17. package/dist/AppsLogoComponents/style/index.d.ts +7 -0
  18. package/dist/AppsLogoComponents/style/index.js +60 -0
  19. package/dist/AppsLogoComponents/style/simple.d.ts +6 -0
  20. package/dist/AppsLogoComponents/style/simple.js +83 -0
  21. package/dist/Icon/components/Paintbrush.d.ts +6 -0
  22. package/dist/Icon/components/Paintbrush.js +21 -0
  23. package/dist/Icon/components/Palette.d.ts +6 -0
  24. package/dist/Icon/components/Palette.js +20 -0
  25. package/dist/Icon/components/index.d.ts +10 -0
  26. package/dist/Icon/components/index.js +11 -0
  27. package/dist/Icon/index.d.ts +37 -0
  28. package/dist/Icon/index.js +24 -0
  29. package/dist/PageLock/Popup.d.ts +43 -0
  30. package/dist/PageLock/Popup.js +68 -0
  31. package/dist/PageLock/UserForm.d.ts +42 -0
  32. package/dist/PageLock/UserForm.js +68 -0
  33. package/dist/PageLock/index.d.ts +52 -0
  34. package/dist/PageLock/index.js +92 -0
  35. package/dist/PageLock/props.d.ts +51 -0
  36. package/dist/PageLock/props.js +29 -0
  37. package/dist/PageLock/style.d.ts +7 -0
  38. package/dist/PageLock/style.js +108 -0
  39. package/dist/PageLock/useFormState.d.ts +16 -0
  40. package/dist/PageLock/useFormState.js +19 -0
  41. package/dist/Paintbrush-EfUpNqey.js +14 -0
  42. package/dist/Palette-B5wq9KtV.js +13 -0
  43. package/dist/RightContent/Search/Panel.d.ts +42 -0
  44. package/dist/RightContent/Search/Panel.js +146 -0
  45. package/dist/RightContent/Search/index.d.ts +50 -0
  46. package/dist/RightContent/Search/index.js +118 -0
  47. package/dist/RightContent/Search/props.d.ts +17 -0
  48. package/dist/RightContent/Search/props.js +15 -0
  49. package/dist/RightContent/Search/style.d.ts +10 -0
  50. package/dist/RightContent/Search/style.js +96 -0
  51. package/dist/RightContent/index.d.ts +407 -0
  52. package/dist/RightContent/index.js +152 -0
  53. package/dist/RightContent/props.d.ts +64 -0
  54. package/dist/RightContent/props.js +63 -0
  55. package/dist/RightContent/style.d.ts +10 -0
  56. package/dist/RightContent/style.js +73 -0
  57. package/dist/ThemeEditor/components/BlockCheckbox.d.ts +39 -0
  58. package/dist/ThemeEditor/components/BlockCheckbox.js +42 -0
  59. package/dist/ThemeEditor/components/RegionalChange.d.ts +21 -0
  60. package/dist/ThemeEditor/components/RegionalChange.js +43 -0
  61. package/dist/ThemeEditor/components/Setting/index.d.ts +52 -0
  62. package/dist/ThemeEditor/components/Setting/index.js +125 -0
  63. package/dist/ThemeEditor/components/SwitchTab/index.d.ts +51 -0
  64. package/dist/ThemeEditor/components/SwitchTab/index.js +52 -0
  65. package/dist/ThemeEditor/components/SwitchTab/style.d.ts +6 -0
  66. package/dist/ThemeEditor/components/SwitchTab/style.js +54 -0
  67. package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.d.ts +7 -0
  68. package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.js +453 -0
  69. package/dist/ThemeEditor/components/Tokens/Colors/Primary.d.ts +7 -0
  70. package/dist/ThemeEditor/components/Tokens/Colors/Primary.js +58 -0
  71. package/dist/ThemeEditor/components/Tokens/Colors/Side.d.ts +7 -0
  72. package/dist/ThemeEditor/components/Tokens/Colors/Side.js +18 -0
  73. package/dist/ThemeEditor/components/Tokens/Colors/index.d.ts +7 -0
  74. package/dist/ThemeEditor/components/Tokens/Colors/index.js +15 -0
  75. package/dist/ThemeEditor/components/Tokens/context.d.ts +9 -0
  76. package/dist/ThemeEditor/components/Tokens/context.js +7 -0
  77. package/dist/ThemeEditor/components/Tokens/index.d.ts +45 -0
  78. package/dist/ThemeEditor/components/Tokens/index.js +69 -0
  79. package/dist/ThemeEditor/components/Tokens/utils/config.d.ts +10 -0
  80. package/dist/ThemeEditor/components/Tokens/utils/config.js +8 -0
  81. package/dist/ThemeEditor/components/Trigger.d.ts +21 -0
  82. package/dist/ThemeEditor/components/Trigger.js +46 -0
  83. package/dist/ThemeEditor/context.d.ts +14 -0
  84. package/dist/ThemeEditor/context.js +7 -0
  85. package/dist/ThemeEditor/index.d.ts +841 -0
  86. package/dist/ThemeEditor/index.js +165 -0
  87. package/dist/ThemeEditor/props.d.ts +57 -0
  88. package/dist/ThemeEditor/props.js +40 -0
  89. package/dist/ThemeEditor/style/animate.d.ts +9 -0
  90. package/dist/ThemeEditor/style/animate.js +38 -0
  91. package/dist/ThemeEditor/style/index.d.ts +10 -0
  92. package/dist/ThemeEditor/style/index.js +318 -0
  93. package/dist/ThemeEditor/style/theme.d.ts +6 -0
  94. package/dist/ThemeEditor/style/theme.js +71 -0
  95. package/dist/ThemeEditor/utils/config.d.ts +37 -0
  96. package/dist/ThemeEditor/utils/config.js +132 -0
  97. package/dist/ThemeEditor/utils/index.d.ts +9 -0
  98. package/dist/ThemeEditor/utils/index.js +64 -0
  99. package/dist/hooks/useClockTime/index.d.ts +11 -0
  100. package/dist/hooks/useClockTime/index.js +28 -0
  101. package/dist/index.d.ts +7 -0
  102. package/dist/index.js +5 -0
  103. package/dist/pro-layout-components.esm.js +6258 -0
  104. package/dist/pro-layout-components.js +5 -0
  105. package/dist/utils/index.d.ts +2 -0
  106. package/dist/utils/index.js +3 -0
  107. package/dist/utils/util.d.ts +10 -0
  108. package/dist/utils/util.js +17 -0
  109. package/global.d.ts +10 -0
  110. package/package.json +77 -0
@@ -0,0 +1,54 @@
1
+ //#region src/ThemeEditor/components/SwitchTab/style.ts
2
+ const switchTabStyleToken = (token) => {
3
+ return { [`${token.componentCls}`]: {
4
+ display: "flex",
5
+ alignItems: "flex-start",
6
+ flex: 1,
7
+ overflow: "hidden",
8
+ "&-nav": {
9
+ position: "relative",
10
+ paddingInline: token.paddingXS
11
+ },
12
+ "&-line": {
13
+ position: "absolute",
14
+ width: 3,
15
+ height: 80,
16
+ left: 0,
17
+ background: token.colorPrimary,
18
+ transition: `top ${token.motionDurationMid}`,
19
+ borderRadius: `0 9px 9px 0`
20
+ },
21
+ "&-panel": {
22
+ cursor: "pointer",
23
+ textAlign: "center",
24
+ width: 56,
25
+ height: 80,
26
+ padding: token.paddingXXS,
27
+ borderRadius: token.borderRadius * 2,
28
+ marginBlockEnd: token.marginXS,
29
+ transition: `all ${token.motionDurationMid} linear`,
30
+ "&-active": { backgroundColor: token.layout?.header?.colorBgRightActionsItemHover },
31
+ "svg": {
32
+ fontSize: 48,
33
+ borderRadius: 9
34
+ },
35
+ "&-title": {
36
+ fontSize: token.fontSizeSM,
37
+ marginBlockStart: token.marginXXS - 2,
38
+ lineHeight: `20px`,
39
+ color: token.colorText
40
+ }
41
+ },
42
+ "&-content": {
43
+ flex: 1,
44
+ height: `calc(100% - ${token.paddingXS}px)`,
45
+ color: token.colorText,
46
+ marginInlineEnd: token.marginXS,
47
+ borderRadius: token.borderRadius * 2,
48
+ backgroundColor: token.layout?.header?.colorBgRightActionsItemHover
49
+ }
50
+ } };
51
+ };
52
+
53
+ //#endregion
54
+ export { switchTabStyleToken };
@@ -0,0 +1,7 @@
1
+ import * as vue180 from "vue";
2
+ import * as vue_jsx_runtime5 from "vue/jsx-runtime";
3
+
4
+ //#region src/ThemeEditor/components/Tokens/Colors/ColorSvg.d.ts
5
+ declare const _default: vue180.DefineComponent<{}, () => vue_jsx_runtime5.JSX.Element, {}, {}, {}, vue180.ComponentOptionsMixin, vue180.ComponentOptionsMixin, {}, string, vue180.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue180.ComponentProvideOptions, true, {}, any>;
6
+ //#endregion
7
+ export { _default as default };
@@ -0,0 +1,453 @@
1
+ import { createVNode, defineComponent } from "vue";
2
+
3
+ //#region src/ThemeEditor/components/Tokens/Colors/ColorSvg.tsx
4
+ var ColorSvg_default = /* @__PURE__ */ defineComponent({
5
+ name: "ColorSvg",
6
+ setup() {
7
+ return () => {
8
+ return createVNode("svg", {
9
+ "width": "1em",
10
+ "height": "1em",
11
+ "viewBox": "0 0 64 64",
12
+ "fill": "none",
13
+ "xmlns": "http://www.w3.org/2000/svg"
14
+ }, [
15
+ createVNode("rect", {
16
+ "width": "8",
17
+ "height": "8",
18
+ "fill": "#DBE1FC"
19
+ }, null),
20
+ createVNode("rect", {
21
+ "y": "8",
22
+ "width": "8",
23
+ "height": "8",
24
+ "fill": "#B6C5FA"
25
+ }, null),
26
+ createVNode("rect", {
27
+ "y": "16",
28
+ "width": "8",
29
+ "height": "8",
30
+ "fill": "#90A9F9"
31
+ }, null),
32
+ createVNode("rect", {
33
+ "y": "24",
34
+ "width": "8",
35
+ "height": "8",
36
+ "fill": "#688DF7"
37
+ }, null),
38
+ createVNode("rect", {
39
+ "y": "32",
40
+ "width": "8",
41
+ "height": "8",
42
+ "fill": "#4471EC"
43
+ }, null),
44
+ createVNode("rect", {
45
+ "y": "40",
46
+ "width": "8",
47
+ "height": "8",
48
+ "fill": "#2257D2"
49
+ }, null),
50
+ createVNode("rect", {
51
+ "y": "48",
52
+ "width": "8",
53
+ "height": "8",
54
+ "fill": "#1640A6"
55
+ }, null),
56
+ createVNode("rect", {
57
+ "y": "56",
58
+ "width": "8",
59
+ "height": "8",
60
+ "fill": "#0D2B76"
61
+ }, null),
62
+ createVNode("rect", {
63
+ "x": "48",
64
+ "width": "8",
65
+ "height": "8",
66
+ "fill": "#CBEAD3"
67
+ }, null),
68
+ createVNode("rect", {
69
+ "x": "48",
70
+ "y": "8",
71
+ "width": "8",
72
+ "height": "8",
73
+ "fill": "#A4D7B5"
74
+ }, null),
75
+ createVNode("rect", {
76
+ "x": "48",
77
+ "y": "16",
78
+ "width": "8",
79
+ "height": "8",
80
+ "fill": "#77BE92"
81
+ }, null),
82
+ createVNode("rect", {
83
+ "x": "48",
84
+ "y": "24",
85
+ "width": "8",
86
+ "height": "8",
87
+ "fill": "#57A075"
88
+ }, null),
89
+ createVNode("rect", {
90
+ "x": "48",
91
+ "y": "32",
92
+ "width": "8",
93
+ "height": "8",
94
+ "fill": "#3F855C"
95
+ }, null),
96
+ createVNode("rect", {
97
+ "x": "48",
98
+ "y": "40",
99
+ "width": "8",
100
+ "height": "8",
101
+ "fill": "#306948"
102
+ }, null),
103
+ createVNode("rect", {
104
+ "x": "48",
105
+ "y": "48",
106
+ "width": "8",
107
+ "height": "8",
108
+ "fill": "#235136"
109
+ }, null),
110
+ createVNode("rect", {
111
+ "x": "48",
112
+ "y": "56",
113
+ "width": "8",
114
+ "height": "8",
115
+ "fill": "#163724"
116
+ }, null),
117
+ createVNode("rect", {
118
+ "x": "32",
119
+ "width": "8",
120
+ "height": "8",
121
+ "fill": "#F8DCCA"
122
+ }, null),
123
+ createVNode("rect", {
124
+ "x": "32",
125
+ "y": "8",
126
+ "width": "8",
127
+ "height": "8",
128
+ "fill": "#F3BA94"
129
+ }, null),
130
+ createVNode("rect", {
131
+ "x": "32",
132
+ "y": "16",
133
+ "width": "8",
134
+ "height": "8",
135
+ "fill": "#EC9B66"
136
+ }, null),
137
+ createVNode("rect", {
138
+ "x": "32",
139
+ "y": "24",
140
+ "width": "8",
141
+ "height": "8",
142
+ "fill": "#D97E40"
143
+ }, null),
144
+ createVNode("rect", {
145
+ "x": "32",
146
+ "y": "32",
147
+ "width": "8",
148
+ "height": "8",
149
+ "fill": "#B9642A"
150
+ }, null),
151
+ createVNode("rect", {
152
+ "x": "32",
153
+ "y": "40",
154
+ "width": "8",
155
+ "height": "8",
156
+ "fill": "#944A1A"
157
+ }, null),
158
+ createVNode("rect", {
159
+ "x": "32",
160
+ "y": "48",
161
+ "width": "8",
162
+ "height": "8",
163
+ "fill": "#713712"
164
+ }, null),
165
+ createVNode("rect", {
166
+ "x": "32",
167
+ "y": "56",
168
+ "width": "8",
169
+ "height": "8",
170
+ "fill": "#51270A"
171
+ }, null),
172
+ createVNode("rect", {
173
+ "x": "56",
174
+ "width": "8",
175
+ "height": "8",
176
+ "fill": "#D5E3FC"
177
+ }, null),
178
+ createVNode("rect", {
179
+ "x": "56",
180
+ "y": "8",
181
+ "width": "8",
182
+ "height": "8",
183
+ "fill": "#A3C7FA"
184
+ }, null),
185
+ createVNode("rect", {
186
+ "x": "56",
187
+ "y": "16",
188
+ "width": "8",
189
+ "height": "8",
190
+ "fill": "#6EAAF8"
191
+ }, null),
192
+ createVNode("rect", {
193
+ "x": "56",
194
+ "y": "24",
195
+ "width": "8",
196
+ "height": "8",
197
+ "fill": "#4C91E7"
198
+ }, null),
199
+ createVNode("rect", {
200
+ "x": "56",
201
+ "y": "32",
202
+ "width": "8",
203
+ "height": "8",
204
+ "fill": "#3577C8"
205
+ }, null),
206
+ createVNode("rect", {
207
+ "x": "56",
208
+ "y": "40",
209
+ "width": "8",
210
+ "height": "8",
211
+ "fill": "#295EA0"
212
+ }, null),
213
+ createVNode("rect", {
214
+ "x": "56",
215
+ "y": "48",
216
+ "width": "8",
217
+ "height": "8",
218
+ "fill": "#1C4679"
219
+ }, null),
220
+ createVNode("rect", {
221
+ "x": "56",
222
+ "y": "56",
223
+ "width": "8",
224
+ "height": "8",
225
+ "fill": "#123258"
226
+ }, null),
227
+ createVNode("rect", {
228
+ "x": "24",
229
+ "width": "8",
230
+ "height": "8",
231
+ "fill": "#F8DADB"
232
+ }, null),
233
+ createVNode("rect", {
234
+ "x": "24",
235
+ "y": "8",
236
+ "width": "8",
237
+ "height": "8",
238
+ "fill": "#F1B2B3"
239
+ }, null),
240
+ createVNode("rect", {
241
+ "x": "24",
242
+ "y": "16",
243
+ "width": "8",
244
+ "height": "8",
245
+ "fill": "#ED8B8D"
246
+ }, null),
247
+ createVNode("rect", {
248
+ "x": "24",
249
+ "y": "24",
250
+ "width": "8",
251
+ "height": "8",
252
+ "fill": "#D96B6D"
253
+ }, null),
254
+ createVNode("rect", {
255
+ "x": "24",
256
+ "y": "32",
257
+ "width": "8",
258
+ "height": "8",
259
+ "fill": "#BD5156"
260
+ }, null),
261
+ createVNode("rect", {
262
+ "x": "24",
263
+ "y": "40",
264
+ "width": "8",
265
+ "height": "8",
266
+ "fill": "#96373C"
267
+ }, null),
268
+ createVNode("rect", {
269
+ "x": "24",
270
+ "y": "48",
271
+ "width": "8",
272
+ "height": "8",
273
+ "fill": "#752027"
274
+ }, null),
275
+ createVNode("rect", {
276
+ "x": "24",
277
+ "y": "56",
278
+ "width": "8",
279
+ "height": "8",
280
+ "fill": "#581119"
281
+ }, null),
282
+ createVNode("rect", {
283
+ "x": "8",
284
+ "width": "8",
285
+ "height": "8",
286
+ "fill": "#EBDDFC"
287
+ }, null),
288
+ createVNode("rect", {
289
+ "x": "8",
290
+ "y": "8",
291
+ "width": "8",
292
+ "height": "8",
293
+ "fill": "#D6BDFA"
294
+ }, null),
295
+ createVNode("rect", {
296
+ "x": "8",
297
+ "y": "16",
298
+ "width": "8",
299
+ "height": "8",
300
+ "fill": "#BE9AF8"
301
+ }, null),
302
+ createVNode("rect", {
303
+ "x": "8",
304
+ "y": "24",
305
+ "width": "8",
306
+ "height": "8",
307
+ "fill": "#A079E4"
308
+ }, null),
309
+ createVNode("rect", {
310
+ "x": "8",
311
+ "y": "32",
312
+ "width": "8",
313
+ "height": "8",
314
+ "fill": "#8862CA"
315
+ }, null),
316
+ createVNode("rect", {
317
+ "x": "8",
318
+ "y": "40",
319
+ "width": "8",
320
+ "height": "8",
321
+ "fill": "#6A44AB"
322
+ }, null),
323
+ createVNode("rect", {
324
+ "x": "8",
325
+ "y": "48",
326
+ "width": "8",
327
+ "height": "8",
328
+ "fill": "#512A91"
329
+ }, null),
330
+ createVNode("rect", {
331
+ "x": "8",
332
+ "y": "56",
333
+ "width": "8",
334
+ "height": "8",
335
+ "fill": "#360F72"
336
+ }, null),
337
+ createVNode("rect", {
338
+ "x": "40",
339
+ "width": "8",
340
+ "height": "8",
341
+ "fill": "#FBE8BF"
342
+ }, null),
343
+ createVNode("rect", {
344
+ "x": "40",
345
+ "y": "8",
346
+ "width": "8",
347
+ "height": "8",
348
+ "fill": "#F7D582"
349
+ }, null),
350
+ createVNode("rect", {
351
+ "x": "40",
352
+ "y": "16",
353
+ "width": "8",
354
+ "height": "8",
355
+ "fill": "#ECBB46"
356
+ }, null),
357
+ createVNode("rect", {
358
+ "x": "40",
359
+ "y": "24",
360
+ "width": "8",
361
+ "height": "8",
362
+ "fill": "#CA9E35"
363
+ }, null),
364
+ createVNode("rect", {
365
+ "x": "40",
366
+ "y": "32",
367
+ "width": "8",
368
+ "height": "8",
369
+ "fill": "#9B7926"
370
+ }, null),
371
+ createVNode("rect", {
372
+ "x": "40",
373
+ "y": "40",
374
+ "width": "8",
375
+ "height": "8",
376
+ "fill": "#74591A"
377
+ }, null),
378
+ createVNode("rect", {
379
+ "x": "40",
380
+ "y": "48",
381
+ "width": "8",
382
+ "height": "8",
383
+ "fill": "#584312"
384
+ }, null),
385
+ createVNode("rect", {
386
+ "x": "40",
387
+ "y": "56",
388
+ "width": "8",
389
+ "height": "8",
390
+ "fill": "#3D2E09"
391
+ }, null),
392
+ createVNode("rect", {
393
+ "x": "16",
394
+ "width": "8",
395
+ "height": "8",
396
+ "fill": "#F8D9EA"
397
+ }, null),
398
+ createVNode("rect", {
399
+ "x": "16",
400
+ "y": "8",
401
+ "width": "8",
402
+ "height": "8",
403
+ "fill": "#F1AED7"
404
+ }, null),
405
+ createVNode("rect", {
406
+ "x": "16",
407
+ "y": "16",
408
+ "width": "8",
409
+ "height": "8",
410
+ "fill": "#EC7EC7"
411
+ }, null),
412
+ createVNode("rect", {
413
+ "x": "16",
414
+ "y": "24",
415
+ "width": "8",
416
+ "height": "8",
417
+ "fill": "#D95EB1"
418
+ }, null),
419
+ createVNode("rect", {
420
+ "x": "16",
421
+ "y": "32",
422
+ "width": "8",
423
+ "height": "8",
424
+ "fill": "#BB4998"
425
+ }, null),
426
+ createVNode("rect", {
427
+ "x": "16",
428
+ "y": "40",
429
+ "width": "8",
430
+ "height": "8",
431
+ "fill": "#943477"
432
+ }, null),
433
+ createVNode("rect", {
434
+ "x": "16",
435
+ "y": "48",
436
+ "width": "8",
437
+ "height": "8",
438
+ "fill": "#72215B"
439
+ }, null),
440
+ createVNode("rect", {
441
+ "x": "16",
442
+ "y": "56",
443
+ "width": "8",
444
+ "height": "8",
445
+ "fill": "#571042"
446
+ }, null)
447
+ ]);
448
+ };
449
+ }
450
+ });
451
+
452
+ //#endregion
453
+ export { ColorSvg_default as default };
@@ -0,0 +1,7 @@
1
+ import * as vue232 from "vue";
2
+ import * as vue_jsx_runtime10 from "vue/jsx-runtime";
3
+
4
+ //#region src/ThemeEditor/components/Tokens/Colors/Primary.d.ts
5
+ declare const _default: vue232.DefineComponent<{}, () => vue_jsx_runtime10.JSX.Element, {}, {}, {}, vue232.ComponentOptionsMixin, vue232.ComponentOptionsMixin, {}, string, vue232.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue232.ComponentProvideOptions, true, {}, any>;
6
+ //#endregion
7
+ export { _default as default };
@@ -0,0 +1,58 @@
1
+ import { colorList } from "../../../utils/config.js";
2
+ import { useThemeEditorContext } from "../../../context.js";
3
+ import { useThemeTokensStateContext } from "../context.js";
4
+ import { Body } from "../../../index.js";
5
+ import { computed, createTextVNode, createVNode, defineComponent } from "vue";
6
+ import { useProConfigContext } from "@gx-design-vue/pro-provider";
7
+ import { classNames } from "@gx-design-vue/pro-utils";
8
+ import { Tooltip } from "ant-design-vue";
9
+ import { CheckOutlined, EditOutlined } from "@ant-design/icons-vue";
10
+ import { AggregationColor, GColorPicker } from "@gx-design-vue/color-picker";
11
+
12
+ //#region src/ThemeEditor/components/Tokens/Colors/Primary.tsx
13
+ var Primary_default = /* @__PURE__ */ defineComponent({ setup() {
14
+ const { prefixCls, hashId, tokens } = useThemeEditorContext();
15
+ const { onChange } = useThemeTokensStateContext();
16
+ const { token } = useProConfigContext();
17
+ const colorsState = computed(() => {
18
+ return { colorPrimary: tokens.value.colorPrimary || token.value.colorPrimary };
19
+ });
20
+ const colorPrimaryStr = computed(() => {
21
+ const colors = new AggregationColor(colorsState.value.colorPrimary);
22
+ return {
23
+ hsb: colors.toHsbString(),
24
+ rgb: colors.toRgbString(),
25
+ hex: colors.toHexString()
26
+ };
27
+ });
28
+ return () => {
29
+ return createVNode(Body, {
30
+ "hashId": hashId.value,
31
+ "prefixCls": prefixCls,
32
+ "title": "主题色"
33
+ }, { default: () => [createVNode("div", { "class": classNames(`${prefixCls}-color-list`, hashId.value) }, [colorList.map((item) => createVNode(Tooltip, {
34
+ "title": item.title,
35
+ "key": item.key
36
+ }, { default: () => [createVNode("div", {
37
+ "class": classNames(`${prefixCls}-color-item`, hashId.value),
38
+ "style": { background: item.color },
39
+ "onClick": () => {
40
+ onChange?.({ colorPrimary: item.color });
41
+ }
42
+ }, [item.color.toLowerCase() === colorsState.value.colorPrimary.toLowerCase() ? createVNode(CheckOutlined, { "style": {
43
+ color: token.value.colorWhite,
44
+ fontSize: "12px"
45
+ } }, null) : null])] }))]), createVNode(GColorPicker, {
46
+ "value": colorsState.value.colorPrimary,
47
+ "onChangeComplete": (c) => {
48
+ onChange?.({ colorPrimary: c.toHexString() });
49
+ }
50
+ }, { default: () => [createVNode("div", { "class": classNames(`${prefixCls}-color-picker`, hashId.value) }, [createVNode("div", { "class": classNames(`${prefixCls}-color-picker-inner`, hashId.value) }, [createVNode("div", {
51
+ "class": classNames(`${prefixCls}-color-picker-top`, hashId.value),
52
+ "style": { background: colorsState.value.colorPrimary }
53
+ }, [createVNode("p", null, [createTextVNode("hsb:"), colorPrimaryStr.value.hsb]), createVNode("p", null, [createTextVNode("rgb:"), colorPrimaryStr.value.rgb])]), createVNode("div", { "class": classNames(`${prefixCls}-color-picker-bottom`, hashId.value) }, [createVNode("div", null, [createVNode("p", null, [createTextVNode("自定义主题颜色")]), createVNode("p", null, [createTextVNode("HEX:"), colorPrimaryStr.value.hex])]), createVNode(EditOutlined, { "style": { fontSize: "18px" } }, null)])])])] })] });
54
+ };
55
+ } });
56
+
57
+ //#endregion
58
+ export { Primary_default as default };
@@ -0,0 +1,7 @@
1
+ import * as vue227 from "vue";
2
+ import * as vue_jsx_runtime9 from "vue/jsx-runtime";
3
+
4
+ //#region src/ThemeEditor/components/Tokens/Colors/Side.d.ts
5
+ declare const _default: vue227.DefineComponent<{}, () => vue_jsx_runtime9.JSX.Element, {}, {}, {}, vue227.ComponentOptionsMixin, vue227.ComponentOptionsMixin, {}, string, vue227.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue227.ComponentProvideOptions, true, {}, any>;
6
+ //#endregion
7
+ export { _default as default };
@@ -0,0 +1,18 @@
1
+ import { useThemeEditorContext } from "../../../context.js";
2
+ import { Body } from "../../../index.js";
3
+ import { createVNode, defineComponent } from "vue";
4
+
5
+ //#region src/ThemeEditor/components/Tokens/Colors/Side.tsx
6
+ var Side_default = /* @__PURE__ */ defineComponent({ setup() {
7
+ const { prefixCls, hashId } = useThemeEditorContext();
8
+ return () => {
9
+ return createVNode(Body, {
10
+ "hashId": hashId.value,
11
+ "prefixCls": prefixCls,
12
+ "title": "侧边主题色"
13
+ }, null);
14
+ };
15
+ } });
16
+
17
+ //#endregion
18
+ export { Side_default as default };
@@ -0,0 +1,7 @@
1
+ import * as vue285 from "vue";
2
+ import * as vue_jsx_runtime14 from "vue/jsx-runtime";
3
+
4
+ //#region src/ThemeEditor/components/Tokens/Colors/index.d.ts
5
+ declare const _default: vue285.DefineComponent<{}, () => vue_jsx_runtime14.JSX.Element, {}, {}, {}, vue285.ComponentOptionsMixin, vue285.ComponentOptionsMixin, {}, string, vue285.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue285.ComponentProvideOptions, true, {}, any>;
6
+ //#endregion
7
+ export { _default as default };
@@ -0,0 +1,15 @@
1
+ import Primary_default from "./Primary.js";
2
+ import Side_default from "./Side.js";
3
+ import { createVNode, defineComponent } from "vue";
4
+ import { unit, useProConfigContext } from "@gx-design-vue/pro-provider";
5
+
6
+ //#region src/ThemeEditor/components/Tokens/Colors/index.tsx
7
+ var Colors_default = /* @__PURE__ */ defineComponent({ setup() {
8
+ const { token } = useProConfigContext();
9
+ return () => {
10
+ return createVNode("div", { "style": { padding: unit(token.value.padding) } }, [createVNode(Primary_default, null, null), createVNode(Side_default, null, null)]);
11
+ };
12
+ } });
13
+
14
+ //#endregion
15
+ export { Colors_default as default };
@@ -0,0 +1,9 @@
1
+ import { DeepPartial, ProAliasToken } from "@gx-design-vue/pro-provider";
2
+
3
+ //#region src/ThemeEditor/components/Tokens/context.d.ts
4
+ interface TokensStateContext {
5
+ onChange: ((val: DeepPartial<ProAliasToken>) => void) | undefined;
6
+ }
7
+ declare const provideTokensStateContext: (value: TokensStateContext) => void, useThemeTokensStateContext: (injectDefaultValue?: TokensStateContext) => TokensStateContext;
8
+ //#endregion
9
+ export { TokensStateContext, provideTokensStateContext, useThemeTokensStateContext };
@@ -0,0 +1,7 @@
1
+ import { useContext } from "@gx-design-vue/context";
2
+
3
+ //#region src/ThemeEditor/components/Tokens/context.ts
4
+ const { provideContext: provideTokensStateContext, useInjectContext: useThemeTokensStateContext } = useContext("tokens-state");
5
+
6
+ //#endregion
7
+ export { provideTokensStateContext, useThemeTokensStateContext };