@vef-framework/shared 1.0.122 → 1.0.124
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/cjs/color.cjs +11 -0
- package/cjs/constants.cjs +39 -0
- package/cjs/context.cjs +36 -0
- package/cjs/dom.cjs +23 -0
- package/cjs/error.cjs +30 -0
- package/cjs/event.cjs +11 -0
- package/cjs/expression.cjs +27 -0
- package/cjs/function.cjs +16 -0
- package/cjs/icons.cjs +136 -0
- package/cjs/id.cjs +14 -0
- package/cjs/index.cjs +317 -0
- package/cjs/json.cjs +18 -0
- package/cjs/lib.cjs +232 -0
- package/cjs/message.cjs +303 -0
- package/cjs/path.cjs +40 -0
- package/cjs/pinyin.cjs +33 -0
- package/cjs/security.cjs +27 -0
- package/cjs/store.cjs +105 -0
- package/cjs/styles.cjs +55 -0
- package/cjs/temporal.cjs +27 -0
- package/cjs/theme-variables.cjs +354 -0
- package/cjs/types.cjs +4 -0
- package/cjs/utils.cjs +117 -0
- package/cjs/validation.cjs +189 -0
- package/cjs/yaml.cjs +11 -0
- package/esm/color.js +9 -0
- package/esm/constants.js +31 -0
- package/esm/context.js +34 -0
- package/esm/dom.js +21 -0
- package/esm/error.js +28 -0
- package/esm/event.js +9 -0
- package/esm/expression.js +23 -0
- package/esm/function.js +14 -0
- package/esm/icons.js +129 -0
- package/esm/id.js +12 -0
- package/esm/index.js +32 -0
- package/esm/json.js +16 -0
- package/esm/lib.js +21 -0
- package/esm/message.js +282 -0
- package/esm/path.js +33 -0
- package/esm/pinyin.js +30 -0
- package/esm/security.js +24 -0
- package/esm/store.js +100 -0
- package/esm/styles.js +51 -0
- package/esm/temporal.js +23 -0
- package/esm/theme-variables.js +352 -0
- package/esm/types.js +2 -0
- package/esm/utils.js +109 -0
- package/esm/validation.js +151 -0
- package/esm/yaml.js +9 -0
- package/package.json +11 -10
- package/es/color.js +0 -1
- package/es/constants.js +0 -1
- package/es/context.js +0 -1
- package/es/dom.js +0 -1
- package/es/error.js +0 -1
- package/es/event.js +0 -1
- package/es/expression.js +0 -1
- package/es/function.js +0 -1
- package/es/icons.js +0 -1
- package/es/id.js +0 -1
- package/es/index.js +0 -1
- package/es/json.js +0 -1
- package/es/lib.js +0 -1
- package/es/message.js +0 -1
- package/es/path.js +0 -1
- package/es/pinyin.js +0 -1
- package/es/security.js +0 -1
- package/es/store.js +0 -1
- package/es/styles.js +0 -1
- package/es/temporal.js +0 -1
- package/es/theme-variables.js +0 -1
- package/es/utils.js +0 -1
- package/es/validation.js +0 -1
- package/es/yaml.js +0 -1
- package/lib/color.cjs +0 -1
- package/lib/constants.cjs +0 -1
- package/lib/context.cjs +0 -1
- package/lib/dom.cjs +0 -1
- package/lib/error.cjs +0 -1
- package/lib/event.cjs +0 -1
- package/lib/expression.cjs +0 -1
- package/lib/function.cjs +0 -1
- package/lib/icons.cjs +0 -1
- package/lib/id.cjs +0 -1
- package/lib/index.cjs +0 -1
- package/lib/json.cjs +0 -1
- package/lib/lib.cjs +0 -1
- package/lib/message.cjs +0 -1
- package/lib/path.cjs +0 -1
- package/lib/pinyin.cjs +0 -1
- package/lib/security.cjs +0 -1
- package/lib/store.cjs +0 -1
- package/lib/styles.cjs +0 -1
- package/lib/temporal.cjs +0 -1
- package/lib/theme-variables.cjs +0 -1
- package/lib/types.cjs +0 -1
- package/lib/utils.cjs +0 -1
- package/lib/validation.cjs +0 -1
- package/lib/yaml.cjs +0 -1
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use strict";
|
|
3
|
+
const themeVariables = {
|
|
4
|
+
colorChart1: "hsl(221.2 83.2% 53.3%)",
|
|
5
|
+
colorChart2: "hsl(216 92% 60%)",
|
|
6
|
+
colorChart3: "hsl(212 95% 68%)",
|
|
7
|
+
colorChart4: "hsl(210 98% 78%)",
|
|
8
|
+
colorChart5: "hsl(212 97% 87%)",
|
|
9
|
+
blue: "var(--vef-blue)",
|
|
10
|
+
purple: "var(--vef-purple)",
|
|
11
|
+
cyan: "var(--vef-cyan)",
|
|
12
|
+
green: "var(--vef-green)",
|
|
13
|
+
magenta: "var(--vef-magenta)",
|
|
14
|
+
pink: "var(--vef-pink)",
|
|
15
|
+
red: "var(--vef-red)",
|
|
16
|
+
orange: "var(--vef-orange)",
|
|
17
|
+
yellow: "var(--vef-yellow)",
|
|
18
|
+
volcano: "var(--vef-volcano)",
|
|
19
|
+
geekblue: "var(--vef-geekblue)",
|
|
20
|
+
gold: "var(--vef-gold)",
|
|
21
|
+
lime: "var(--vef-lime)",
|
|
22
|
+
colorPrimary: "var(--vef-color-primary)",
|
|
23
|
+
colorSuccess: "var(--vef-color-success)",
|
|
24
|
+
colorWarning: "var(--vef-color-warning)",
|
|
25
|
+
colorError: "var(--vef-color-error)",
|
|
26
|
+
colorInfo: "var(--vef-color-info)",
|
|
27
|
+
colorLink: "var(--vef-color-link)",
|
|
28
|
+
colorTextBase: "var(--vef-color-text-base)",
|
|
29
|
+
colorBgBase: "var(--vef-color-bg-base)",
|
|
30
|
+
fontFamily: "var(--vef-font-family)",
|
|
31
|
+
fontFamilyCode: "var(--vef-font-family-code)",
|
|
32
|
+
fontSize: "var(--vef-font-size)",
|
|
33
|
+
lineWidth: "var(--vef-line-width)",
|
|
34
|
+
lineType: "var(--vef-line-type)",
|
|
35
|
+
motionEaseOutCirc: "var(--vef-motion-ease-out-circ)",
|
|
36
|
+
motionEaseInOutCirc: "var(--vef-motion-ease-in-out-circ)",
|
|
37
|
+
motionEaseOut: "var(--vef-motion-ease-out)",
|
|
38
|
+
motionEaseInOut: "var(--vef-motion-ease-in-out)",
|
|
39
|
+
motionEaseOutBack: "var(--vef-motion-ease-out-back)",
|
|
40
|
+
motionEaseInBack: "var(--vef-motion-ease-in-back)",
|
|
41
|
+
motionEaseInQuint: "var(--vef-motion-ease-in-quint)",
|
|
42
|
+
motionEaseOutQuint: "var(--vef-motion-ease-out-quint)",
|
|
43
|
+
borderRadius: "var(--vef-border-radius)",
|
|
44
|
+
sizePopupArrow: "var(--vef-size-popup-arrow)",
|
|
45
|
+
controlHeight: "var(--vef-control-height)",
|
|
46
|
+
zIndexBase: "var(--vef-z-index-base)",
|
|
47
|
+
zIndexPopupBase: "var(--vef-z-index-popup-base)",
|
|
48
|
+
opacityImage: "var(--vef-opacity-image)",
|
|
49
|
+
colorBgLayout: "var(--vef-color-bg-layout)",
|
|
50
|
+
colorBgSpotlight: "var(--vef-color-bg-spotlight)",
|
|
51
|
+
blue1: "var(--vef-blue-1)",
|
|
52
|
+
blue2: "var(--vef-blue-2)",
|
|
53
|
+
blue3: "var(--vef-blue-3)",
|
|
54
|
+
blue4: "var(--vef-blue-4)",
|
|
55
|
+
blue5: "var(--vef-blue-5)",
|
|
56
|
+
blue6: "var(--vef-blue-6)",
|
|
57
|
+
blue7: "var(--vef-blue-7)",
|
|
58
|
+
blue8: "var(--vef-blue-8)",
|
|
59
|
+
blue9: "var(--vef-blue-9)",
|
|
60
|
+
blue10: "var(--vef-blue-10)",
|
|
61
|
+
purple1: "var(--vef-purple-1)",
|
|
62
|
+
purple2: "var(--vef-purple-2)",
|
|
63
|
+
purple3: "var(--vef-purple-3)",
|
|
64
|
+
purple4: "var(--vef-purple-4)",
|
|
65
|
+
purple5: "var(--vef-purple-5)",
|
|
66
|
+
purple6: "var(--vef-purple-6)",
|
|
67
|
+
purple7: "var(--vef-purple-7)",
|
|
68
|
+
purple8: "var(--vef-purple-8)",
|
|
69
|
+
purple9: "var(--vef-purple-9)",
|
|
70
|
+
purple10: "var(--vef-purple-10)",
|
|
71
|
+
cyan1: "var(--vef-cyan-1)",
|
|
72
|
+
cyan2: "var(--vef-cyan-2)",
|
|
73
|
+
cyan3: "var(--vef-cyan-3)",
|
|
74
|
+
cyan4: "var(--vef-cyan-4)",
|
|
75
|
+
cyan5: "var(--vef-cyan-5)",
|
|
76
|
+
cyan6: "var(--vef-cyan-6)",
|
|
77
|
+
cyan7: "var(--vef-cyan-7)",
|
|
78
|
+
cyan8: "var(--vef-cyan-8)",
|
|
79
|
+
cyan9: "var(--vef-cyan-9)",
|
|
80
|
+
cyan10: "var(--vef-cyan-10)",
|
|
81
|
+
green1: "var(--vef-green-1)",
|
|
82
|
+
green2: "var(--vef-green-2)",
|
|
83
|
+
green3: "var(--vef-green-3)",
|
|
84
|
+
green4: "var(--vef-green-4)",
|
|
85
|
+
green5: "var(--vef-green-5)",
|
|
86
|
+
green6: "var(--vef-green-6)",
|
|
87
|
+
green7: "var(--vef-green-7)",
|
|
88
|
+
green8: "var(--vef-green-8)",
|
|
89
|
+
green9: "var(--vef-green-9)",
|
|
90
|
+
green10: "var(--vef-green-10)",
|
|
91
|
+
magenta1: "var(--vef-magenta-1)",
|
|
92
|
+
magenta2: "var(--vef-magenta-2)",
|
|
93
|
+
magenta3: "var(--vef-magenta-3)",
|
|
94
|
+
magenta4: "var(--vef-magenta-4)",
|
|
95
|
+
magenta5: "var(--vef-magenta-5)",
|
|
96
|
+
magenta6: "var(--vef-magenta-6)",
|
|
97
|
+
magenta7: "var(--vef-magenta-7)",
|
|
98
|
+
magenta8: "var(--vef-magenta-8)",
|
|
99
|
+
magenta9: "var(--vef-magenta-9)",
|
|
100
|
+
magenta10: "var(--vef-magenta-10)",
|
|
101
|
+
pink1: "var(--vef-pink-1)",
|
|
102
|
+
pink2: "var(--vef-pink-2)",
|
|
103
|
+
pink3: "var(--vef-pink-3)",
|
|
104
|
+
pink4: "var(--vef-pink-4)",
|
|
105
|
+
pink5: "var(--vef-pink-5)",
|
|
106
|
+
pink6: "var(--vef-pink-6)",
|
|
107
|
+
pink7: "var(--vef-pink-7)",
|
|
108
|
+
pink8: "var(--vef-pink-8)",
|
|
109
|
+
pink9: "var(--vef-pink-9)",
|
|
110
|
+
pink10: "var(--vef-pink-10)",
|
|
111
|
+
red1: "var(--vef-red-1)",
|
|
112
|
+
red2: "var(--vef-red-2)",
|
|
113
|
+
red3: "var(--vef-red-3)",
|
|
114
|
+
red4: "var(--vef-red-4)",
|
|
115
|
+
red5: "var(--vef-red-5)",
|
|
116
|
+
red6: "var(--vef-red-6)",
|
|
117
|
+
red7: "var(--vef-red-7)",
|
|
118
|
+
red8: "var(--vef-red-8)",
|
|
119
|
+
red9: "var(--vef-red-9)",
|
|
120
|
+
red10: "var(--vef-red-10)",
|
|
121
|
+
orange1: "var(--vef-orange-1)",
|
|
122
|
+
orange2: "var(--vef-orange-2)",
|
|
123
|
+
orange3: "var(--vef-orange-3)",
|
|
124
|
+
orange4: "var(--vef-orange-4)",
|
|
125
|
+
orange5: "var(--vef-orange-5)",
|
|
126
|
+
orange6: "var(--vef-orange-6)",
|
|
127
|
+
orange7: "var(--vef-orange-7)",
|
|
128
|
+
orange8: "var(--vef-orange-8)",
|
|
129
|
+
orange9: "var(--vef-orange-9)",
|
|
130
|
+
orange10: "var(--vef-orange-10)",
|
|
131
|
+
yellow1: "var(--vef-yellow-1)",
|
|
132
|
+
yellow2: "var(--vef-yellow-2)",
|
|
133
|
+
yellow3: "var(--vef-yellow-3)",
|
|
134
|
+
yellow4: "var(--vef-yellow-4)",
|
|
135
|
+
yellow5: "var(--vef-yellow-5)",
|
|
136
|
+
yellow6: "var(--vef-yellow-6)",
|
|
137
|
+
yellow7: "var(--vef-yellow-7)",
|
|
138
|
+
yellow8: "var(--vef-yellow-8)",
|
|
139
|
+
yellow9: "var(--vef-yellow-9)",
|
|
140
|
+
yellow10: "var(--vef-yellow-10)",
|
|
141
|
+
volcano1: "var(--vef-volcano-1)",
|
|
142
|
+
volcano2: "var(--vef-volcano-2)",
|
|
143
|
+
volcano3: "var(--vef-volcano-3)",
|
|
144
|
+
volcano4: "var(--vef-volcano-4)",
|
|
145
|
+
volcano5: "var(--vef-volcano-5)",
|
|
146
|
+
volcano6: "var(--vef-volcano-6)",
|
|
147
|
+
volcano7: "var(--vef-volcano-7)",
|
|
148
|
+
volcano8: "var(--vef-volcano-8)",
|
|
149
|
+
volcano9: "var(--vef-volcano-9)",
|
|
150
|
+
volcano10: "var(--vef-volcano-10)",
|
|
151
|
+
geekblue1: "var(--vef-geekblue-1)",
|
|
152
|
+
geekblue2: "var(--vef-geekblue-2)",
|
|
153
|
+
geekblue3: "var(--vef-geekblue-3)",
|
|
154
|
+
geekblue4: "var(--vef-geekblue-4)",
|
|
155
|
+
geekblue5: "var(--vef-geekblue-5)",
|
|
156
|
+
geekblue6: "var(--vef-geekblue-6)",
|
|
157
|
+
geekblue7: "var(--vef-geekblue-7)",
|
|
158
|
+
geekblue8: "var(--vef-geekblue-8)",
|
|
159
|
+
geekblue9: "var(--vef-geekblue-9)",
|
|
160
|
+
geekblue10: "var(--vef-geekblue-10)",
|
|
161
|
+
gold1: "var(--vef-gold-1)",
|
|
162
|
+
gold2: "var(--vef-gold-2)",
|
|
163
|
+
gold3: "var(--vef-gold-3)",
|
|
164
|
+
gold4: "var(--vef-gold-4)",
|
|
165
|
+
gold5: "var(--vef-gold-5)",
|
|
166
|
+
gold6: "var(--vef-gold-6)",
|
|
167
|
+
gold7: "var(--vef-gold-7)",
|
|
168
|
+
gold8: "var(--vef-gold-8)",
|
|
169
|
+
gold9: "var(--vef-gold-9)",
|
|
170
|
+
gold10: "var(--vef-gold-10)",
|
|
171
|
+
lime1: "var(--vef-lime-1)",
|
|
172
|
+
lime2: "var(--vef-lime-2)",
|
|
173
|
+
lime3: "var(--vef-lime-3)",
|
|
174
|
+
lime4: "var(--vef-lime-4)",
|
|
175
|
+
lime5: "var(--vef-lime-5)",
|
|
176
|
+
lime6: "var(--vef-lime-6)",
|
|
177
|
+
lime7: "var(--vef-lime-7)",
|
|
178
|
+
lime8: "var(--vef-lime-8)",
|
|
179
|
+
lime9: "var(--vef-lime-9)",
|
|
180
|
+
lime10: "var(--vef-lime-10)",
|
|
181
|
+
colorText: "var(--vef-color-text)",
|
|
182
|
+
colorTextSecondary: "var(--vef-color-text-secondary)",
|
|
183
|
+
colorTextTertiary: "var(--vef-color-text-tertiary)",
|
|
184
|
+
colorTextQuaternary: "var(--vef-color-text-quaternary)",
|
|
185
|
+
colorTextSlate: "#64748b",
|
|
186
|
+
colorFill: "var(--vef-color-fill)",
|
|
187
|
+
colorFillSecondary: "var(--vef-color-fill-secondary)",
|
|
188
|
+
colorFillTertiary: "var(--vef-color-fill-tertiary)",
|
|
189
|
+
colorFillQuaternary: "var(--vef-color-fill-quaternary)",
|
|
190
|
+
colorBgSolid: "var(--vef-color-bg-solid)",
|
|
191
|
+
colorBgSolidHover: "var(--vef-color-bg-solid-hover)",
|
|
192
|
+
colorBgSolidActive: "var(--vef-color-bg-solid-active)",
|
|
193
|
+
colorBgContainer: "var(--vef-color-bg-container)",
|
|
194
|
+
colorBgElevated: "var(--vef-color-bg-elevated)",
|
|
195
|
+
colorBgBlur: "var(--vef-color-bg-blur)",
|
|
196
|
+
colorBorder: "var(--vef-color-border)",
|
|
197
|
+
colorBorderSecondary: "var(--vef-color-border-secondary)",
|
|
198
|
+
colorPrimaryBg: "var(--vef-color-primary-bg)",
|
|
199
|
+
colorPrimaryBgHover: "var(--vef-color-primary-bg-hover)",
|
|
200
|
+
colorPrimaryBorder: "var(--vef-color-primary-border)",
|
|
201
|
+
colorPrimaryBorderHover: "var(--vef-color-primary-border-hover)",
|
|
202
|
+
colorPrimaryHover: "var(--vef-color-primary-hover)",
|
|
203
|
+
colorPrimaryActive: "var(--vef-color-primary-active)",
|
|
204
|
+
colorPrimaryTextHover: "var(--vef-color-primary-text-hover)",
|
|
205
|
+
colorPrimaryText: "var(--vef-color-primary-text)",
|
|
206
|
+
colorPrimaryTextActive: "var(--vef-color-primary-text-active)",
|
|
207
|
+
colorSuccessBg: "var(--vef-color-success-bg)",
|
|
208
|
+
colorSuccessBgHover: "var(--vef-color-success-bg-hover)",
|
|
209
|
+
colorSuccessBorder: "var(--vef-color-success-border)",
|
|
210
|
+
colorSuccessBorderHover: "var(--vef-color-success-border-hover)",
|
|
211
|
+
colorSuccessHover: "var(--vef-color-success-hover)",
|
|
212
|
+
colorSuccessActive: "var(--vef-color-success-active)",
|
|
213
|
+
colorSuccessTextHover: "var(--vef-color-success-text-hover)",
|
|
214
|
+
colorSuccessText: "var(--vef-color-success-text)",
|
|
215
|
+
colorSuccessTextActive: "var(--vef-color-success-text-active)",
|
|
216
|
+
colorErrorBg: "var(--vef-color-error-bg)",
|
|
217
|
+
colorErrorBgHover: "var(--vef-color-error-bg-hover)",
|
|
218
|
+
colorErrorBgFilledHover: "var(--vef-color-error-bg-filled-hover)",
|
|
219
|
+
colorErrorBgActive: "var(--vef-color-error-bg-active)",
|
|
220
|
+
colorErrorBorder: "var(--vef-color-error-border)",
|
|
221
|
+
colorErrorBorderHover: "var(--vef-color-error-border-hover)",
|
|
222
|
+
colorErrorHover: "var(--vef-color-error-hover)",
|
|
223
|
+
colorErrorActive: "var(--vef-color-error-active)",
|
|
224
|
+
colorErrorTextHover: "var(--vef-color-error-text-hover)",
|
|
225
|
+
colorErrorText: "var(--vef-color-error-text)",
|
|
226
|
+
colorErrorTextActive: "var(--vef-color-error-text-active)",
|
|
227
|
+
colorWarningBg: "var(--vef-color-warning-bg)",
|
|
228
|
+
colorWarningBgHover: "var(--vef-color-warning-bg-hover)",
|
|
229
|
+
colorWarningBorder: "var(--vef-color-warning-border)",
|
|
230
|
+
colorWarningBorderHover: "var(--vef-color-warning-border-hover)",
|
|
231
|
+
colorWarningHover: "var(--vef-color-warning-hover)",
|
|
232
|
+
colorWarningActive: "var(--vef-color-warning-active)",
|
|
233
|
+
colorWarningTextHover: "var(--vef-color-warning-text-hover)",
|
|
234
|
+
colorWarningText: "var(--vef-color-warning-text)",
|
|
235
|
+
colorWarningTextActive: "var(--vef-color-warning-text-active)",
|
|
236
|
+
colorInfoBg: "var(--vef-color-info-bg)",
|
|
237
|
+
colorInfoBgHover: "var(--vef-color-info-bg-hover)",
|
|
238
|
+
colorInfoBorder: "var(--vef-color-info-border)",
|
|
239
|
+
colorInfoBorderHover: "var(--vef-color-info-border-hover)",
|
|
240
|
+
colorInfoHover: "var(--vef-color-info-hover)",
|
|
241
|
+
colorInfoActive: "var(--vef-color-info-active)",
|
|
242
|
+
colorInfoTextHover: "var(--vef-color-info-text-hover)",
|
|
243
|
+
colorInfoText: "var(--vef-color-info-text)",
|
|
244
|
+
colorInfoTextActive: "var(--vef-color-info-text-active)",
|
|
245
|
+
colorLinkHover: "var(--vef-color-link-hover)",
|
|
246
|
+
colorLinkActive: "var(--vef-color-link-active)",
|
|
247
|
+
colorBgMask: "var(--vef-color-bg-mask)",
|
|
248
|
+
colorWhite: "var(--vef-color-white)",
|
|
249
|
+
fontSizeSm: "var(--vef-font-size-sm)",
|
|
250
|
+
fontSizeLg: "var(--vef-font-size-lg)",
|
|
251
|
+
fontSizeXl: "var(--vef-font-size-xl)",
|
|
252
|
+
fontSizeHeading1: "var(--vef-font-size-heading-1)",
|
|
253
|
+
fontSizeHeading2: "var(--vef-font-size-heading-2)",
|
|
254
|
+
fontSizeHeading3: "var(--vef-font-size-heading-3)",
|
|
255
|
+
fontSizeHeading4: "var(--vef-font-size-heading-4)",
|
|
256
|
+
fontSizeHeading5: "var(--vef-font-size-heading-5)",
|
|
257
|
+
lineHeight: "var(--vef-line-height)",
|
|
258
|
+
lineHeightLg: "var(--vef-line-height-lg)",
|
|
259
|
+
lineHeightSm: "var(--vef-line-height-sm)",
|
|
260
|
+
fontHeight: "var(--vef-font-height)",
|
|
261
|
+
fontHeightLg: "var(--vef-font-height-lg)",
|
|
262
|
+
fontHeightSm: "var(--vef-font-height-sm)",
|
|
263
|
+
lineHeightHeading1: "var(--vef-line-height-heading-1)",
|
|
264
|
+
lineHeightHeading2: "var(--vef-line-height-heading-2)",
|
|
265
|
+
lineHeightHeading3: "var(--vef-line-height-heading-3)",
|
|
266
|
+
lineHeightHeading4: "var(--vef-line-height-heading-4)",
|
|
267
|
+
lineHeightHeading5: "var(--vef-line-height-heading-5)",
|
|
268
|
+
controlHeightSm: "var(--vef-control-height-sm)",
|
|
269
|
+
controlHeightXs: "var(--vef-control-height-xs)",
|
|
270
|
+
controlHeightLg: "var(--vef-control-height-lg)",
|
|
271
|
+
motionDurationFast: "var(--vef-motion-duration-fast)",
|
|
272
|
+
motionDurationMid: "var(--vef-motion-duration-mid)",
|
|
273
|
+
motionDurationSlow: "var(--vef-motion-duration-slow)",
|
|
274
|
+
lineWidthBold: "var(--vef-line-width-bold)",
|
|
275
|
+
borderRadiusXs: "var(--vef-border-radius-xs)",
|
|
276
|
+
borderRadiusSm: "var(--vef-border-radius-sm)",
|
|
277
|
+
borderRadiusLg: "var(--vef-border-radius-lg)",
|
|
278
|
+
borderRadiusOuter: "var(--vef-border-radius-outer)",
|
|
279
|
+
colorFillContent: "var(--vef-color-fill-content)",
|
|
280
|
+
colorFillContentHover: "var(--vef-color-fill-content-hover)",
|
|
281
|
+
colorFillAlt: "var(--vef-color-fill-alter)",
|
|
282
|
+
colorBgContainerDisabled: "var(--vef-color-bg-container-disabled)",
|
|
283
|
+
colorBorderBg: "var(--vef-color-border-bg)",
|
|
284
|
+
colorSplit: "var(--vef-color-split)",
|
|
285
|
+
colorTextPlaceholder: "var(--vef-color-text-placeholder)",
|
|
286
|
+
colorTextDisabled: "var(--vef-color-text-disabled)",
|
|
287
|
+
colorTextHeading: "var(--vef-color-text-heading)",
|
|
288
|
+
colorTextLabel: "var(--vef-color-text-label)",
|
|
289
|
+
colorTextDescription: "var(--vef-color-text-description)",
|
|
290
|
+
colorTextLightSolid: "var(--vef-color-text-light-solid)",
|
|
291
|
+
colorHighlight: "var(--vef-color-highlight)",
|
|
292
|
+
colorBgTextHover: "var(--vef-color-bg-text-hover)",
|
|
293
|
+
colorBgTextActive: "var(--vef-color-bg-text-active)",
|
|
294
|
+
colorIcon: "var(--vef-color-icon)",
|
|
295
|
+
colorIconHover: "var(--vef-color-icon-hover)",
|
|
296
|
+
colorErrorOutline: "var(--vef-color-error-outline)",
|
|
297
|
+
colorWarningOutline: "var(--vef-color-warning-outline)",
|
|
298
|
+
fontSizeIcon: "var(--vef-font-size-icon)",
|
|
299
|
+
lineWidthFocus: "var(--vef-line-width-focus)",
|
|
300
|
+
controlOutlineWidth: "var(--vef-control-outline-width)",
|
|
301
|
+
controlInteractiveSize: "var(--vef-control-interactive-size)",
|
|
302
|
+
controlItemBgHover: "var(--vef-control-item-bg-hover)",
|
|
303
|
+
controlItemBgActive: "var(--vef-control-item-bg-active)",
|
|
304
|
+
controlItemBgActiveHover: "var(--vef-control-item-bg-active-hover)",
|
|
305
|
+
controlItemBgActiveDisabled: "var(--vef-control-item-bg-active-disabled)",
|
|
306
|
+
controlTmpOutline: "var(--vef-control-tmp-outline)",
|
|
307
|
+
controlOutline: "var(--vef-control-outline)",
|
|
308
|
+
fontWeightStrong: "var(--vef-font-weight-strong)",
|
|
309
|
+
opacityLoading: "var(--vef-opacity-loading)",
|
|
310
|
+
linkDecoration: "var(--vef-link-decoration)",
|
|
311
|
+
linkHoverDecoration: "var(--vef-link-hover-decoration)",
|
|
312
|
+
linkFocusDecoration: "var(--vef-link-focus-decoration)",
|
|
313
|
+
controlPaddingHorizontal: "var(--vef-control-padding-horizontal)",
|
|
314
|
+
controlPaddingHorizontalSm: "var(--vef-control-padding-horizontal-sm)",
|
|
315
|
+
paddingXxs: "var(--vef-padding-xxs)",
|
|
316
|
+
paddingXs: "var(--vef-padding-xs)",
|
|
317
|
+
paddingSm: "var(--vef-padding-sm)",
|
|
318
|
+
padding: "var(--vef-padding)",
|
|
319
|
+
paddingMd: "var(--vef-padding-md)",
|
|
320
|
+
paddingLg: "var(--vef-padding-lg)",
|
|
321
|
+
paddingXl: "var(--vef-padding-xl)",
|
|
322
|
+
paddingContentHorizontalLg: "var(--vef-padding-content-horizontal-lg)",
|
|
323
|
+
paddingContentVerticalLg: "var(--vef-padding-content-vertical-lg)",
|
|
324
|
+
paddingContentHorizontal: "var(--vef-padding-content-horizontal)",
|
|
325
|
+
paddingContentVertical: "var(--vef-padding-content-vertical)",
|
|
326
|
+
paddingContentHorizontalSm: "var(--vef-padding-content-horizontal-sm)",
|
|
327
|
+
paddingContentVerticalSm: "var(--vef-padding-content-vertical-sm)",
|
|
328
|
+
marginXxs: "var(--vef-margin-xxs)",
|
|
329
|
+
marginXs: "var(--vef-margin-xs)",
|
|
330
|
+
marginSm: "var(--vef-margin-sm)",
|
|
331
|
+
margin: "var(--vef-margin)",
|
|
332
|
+
marginMd: "var(--vef-margin-md)",
|
|
333
|
+
marginLg: "var(--vef-margin-lg)",
|
|
334
|
+
marginXl: "var(--vef-margin-xl)",
|
|
335
|
+
marginXxl: "var(--vef-margin-xxl)",
|
|
336
|
+
boxShadow: "var(--vef-box-shadow)",
|
|
337
|
+
boxShadowSecondary: "var(--vef-box-shadow-secondary)",
|
|
338
|
+
boxShadowTertiary: "var(--vef-box-shadow-tertiary)",
|
|
339
|
+
boxShadowPopoverArrow: "var(--vef-box-shadow-popover-arrow)",
|
|
340
|
+
boxShadowCard: "var(--vef-box-shadow-card)",
|
|
341
|
+
boxShadowDrawerRight: "var(--vef-box-shadow-drawer-right)",
|
|
342
|
+
boxShadowDrawerLeft: "var(--vef-box-shadow-drawer-left)",
|
|
343
|
+
boxShadowDrawerUp: "var(--vef-box-shadow-drawer-up)",
|
|
344
|
+
boxShadowDrawerDown: "var(--vef-box-shadow-drawer-down)",
|
|
345
|
+
boxShadowTabsOverflowLeft: "var(--vef-box-shadow-tabs-overflow-left)",
|
|
346
|
+
boxShadowTabsOverflowRight: "var(--vef-box-shadow-tabs-overflow-right)",
|
|
347
|
+
boxShadowTabsOverflowTop: "var(--vef-box-shadow-tabs-overflow-top)",
|
|
348
|
+
boxShadowTabsOverflowBottom: "var(--vef-box-shadow-tabs-overflow-bottom)",
|
|
349
|
+
boxShadowElevated: "0 0 1px rgb(0 0 0 / 30%), 0 4px 14px rgb(0 0 0 / 10%)"
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export { themeVariables };
|
package/esm/types.js
ADDED
package/esm/utils.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import './lib.js';
|
|
3
|
+
import { isFunction, snake, isNumber } from 'radashi';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function isAsyncFunction(fn) {
|
|
7
|
+
if (!isFunction(fn)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return fn.constructor.name === "AsyncFunction" || Object.prototype.toString.call(fn) === "[object AsyncFunction]" || fn.toString().startsWith("async ");
|
|
11
|
+
}
|
|
12
|
+
async function invokeMaybeAsyncFn(fn, {
|
|
13
|
+
beforeInvoke,
|
|
14
|
+
onSuccess,
|
|
15
|
+
onFinally
|
|
16
|
+
}, ...args) {
|
|
17
|
+
if (isAsyncFunction(fn)) {
|
|
18
|
+
try {
|
|
19
|
+
beforeInvoke?.();
|
|
20
|
+
const result = await fn(...args);
|
|
21
|
+
onSuccess?.(result);
|
|
22
|
+
return result;
|
|
23
|
+
} finally {
|
|
24
|
+
onFinally?.();
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
const returned = fn(...args);
|
|
28
|
+
if (returned instanceof Promise) {
|
|
29
|
+
try {
|
|
30
|
+
beforeInvoke?.();
|
|
31
|
+
const result = await returned;
|
|
32
|
+
onSuccess?.(result);
|
|
33
|
+
return result;
|
|
34
|
+
} finally {
|
|
35
|
+
onFinally?.();
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
return returned;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function difference(oldValues, newValues) {
|
|
43
|
+
return Object.keys(newValues).filter((key) => oldValues[key] !== newValues[key]).reduce(
|
|
44
|
+
(acc, key) => {
|
|
45
|
+
acc[key] = newValues[key];
|
|
46
|
+
return acc;
|
|
47
|
+
},
|
|
48
|
+
{}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function constantCase(value) {
|
|
52
|
+
return snake(value).toUpperCase();
|
|
53
|
+
}
|
|
54
|
+
function isInternalFunction(fn) {
|
|
55
|
+
if (isAsyncFunction(fn) && Reflect.has(fn, "name") && Reflect.has(fn, "key") && Reflect.get(fn, "name") === "apiFn") {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
function getStringLength(value) {
|
|
61
|
+
if (isNumber(value)) {
|
|
62
|
+
return `${value}px`;
|
|
63
|
+
}
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
function buildRouteParentMenusMappings(menus) {
|
|
67
|
+
return new Map(doBuildRouteParentMenusMappings(menus));
|
|
68
|
+
}
|
|
69
|
+
function doBuildRouteParentMenusMappings(menus, parents = []) {
|
|
70
|
+
return menus.flatMap((menu) => {
|
|
71
|
+
if (menu.type === "item") {
|
|
72
|
+
return [[menu.key, [menu, parents]]];
|
|
73
|
+
} else if (menu.type === "submenu" || menu.type === "group") {
|
|
74
|
+
const { children, ...parent } = menu;
|
|
75
|
+
return [
|
|
76
|
+
[
|
|
77
|
+
parent.key,
|
|
78
|
+
[
|
|
79
|
+
{
|
|
80
|
+
...parent,
|
|
81
|
+
children: []
|
|
82
|
+
},
|
|
83
|
+
parents
|
|
84
|
+
]
|
|
85
|
+
],
|
|
86
|
+
...doBuildRouteParentMenusMappings(children, [
|
|
87
|
+
...parents,
|
|
88
|
+
{
|
|
89
|
+
...parent,
|
|
90
|
+
children: children.filter((child) => child.type !== "divider").map((child) => {
|
|
91
|
+
if (child.type === "item") {
|
|
92
|
+
return {
|
|
93
|
+
...child
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...child,
|
|
98
|
+
children: []
|
|
99
|
+
};
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
])
|
|
103
|
+
];
|
|
104
|
+
}
|
|
105
|
+
return [];
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { buildRouteParentMenusMappings, constantCase, difference, getStringLength, invokeMaybeAsyncFn, isAsyncFunction, isInternalFunction };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import validator from 'validator';
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
function isAlpha(value) {
|
|
6
|
+
return validator.isAlpha(value);
|
|
7
|
+
}
|
|
8
|
+
function isAlphanumeric(value) {
|
|
9
|
+
return validator.isAlphanumeric(value);
|
|
10
|
+
}
|
|
11
|
+
function isAscii(value) {
|
|
12
|
+
return validator.isAscii(value);
|
|
13
|
+
}
|
|
14
|
+
function isNumeric(value) {
|
|
15
|
+
return validator.isNumeric(value);
|
|
16
|
+
}
|
|
17
|
+
function isDecimal(value) {
|
|
18
|
+
return validator.isDecimal(value);
|
|
19
|
+
}
|
|
20
|
+
function isFloat(value, options) {
|
|
21
|
+
return validator.isFloat(value, options);
|
|
22
|
+
}
|
|
23
|
+
function isBoolean(value) {
|
|
24
|
+
return validator.isBoolean(value, {
|
|
25
|
+
loose: false
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function isDate(value) {
|
|
29
|
+
return validator.isDate(value, {
|
|
30
|
+
format: "YYYY-MM-DD",
|
|
31
|
+
strictMode: true
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function isEmpty(value) {
|
|
35
|
+
return validator.isEmpty(value);
|
|
36
|
+
}
|
|
37
|
+
function isBlank(value) {
|
|
38
|
+
return validator.isEmpty(value, {
|
|
39
|
+
ignore_whitespace: true
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function isIdentityCard(value) {
|
|
43
|
+
return validator.isIdentityCard(value, "zh-CN");
|
|
44
|
+
}
|
|
45
|
+
function isAfter(value, date) {
|
|
46
|
+
return validator.isAfter(value, date);
|
|
47
|
+
}
|
|
48
|
+
function isBefore(value, date) {
|
|
49
|
+
return validator.isBefore(value, date);
|
|
50
|
+
}
|
|
51
|
+
function isEmail(value) {
|
|
52
|
+
return validator.isEmail(value);
|
|
53
|
+
}
|
|
54
|
+
function isHexColor(value) {
|
|
55
|
+
return validator.isHexColor(value);
|
|
56
|
+
}
|
|
57
|
+
function isIn(value, values) {
|
|
58
|
+
return validator.isIn(value, values);
|
|
59
|
+
}
|
|
60
|
+
function isInt(value, options) {
|
|
61
|
+
return validator.isInt(value, options);
|
|
62
|
+
}
|
|
63
|
+
function isIp(value, version) {
|
|
64
|
+
return validator.isIP(value, version);
|
|
65
|
+
}
|
|
66
|
+
function isIpRange(value, version) {
|
|
67
|
+
return validator.isIPRange(value, version);
|
|
68
|
+
}
|
|
69
|
+
function isJson(value) {
|
|
70
|
+
return validator.isJSON(value);
|
|
71
|
+
}
|
|
72
|
+
function isJwt(value) {
|
|
73
|
+
return validator.isJWT(value);
|
|
74
|
+
}
|
|
75
|
+
function isLatLong(value) {
|
|
76
|
+
return validator.isLatLong(value);
|
|
77
|
+
}
|
|
78
|
+
function isLength(value, options) {
|
|
79
|
+
return validator.isLength(value, options);
|
|
80
|
+
}
|
|
81
|
+
function isMimeType(value) {
|
|
82
|
+
return validator.isMimeType(value);
|
|
83
|
+
}
|
|
84
|
+
function isMobilePhone(value) {
|
|
85
|
+
return validator.isMobilePhone(value, "zh-CN");
|
|
86
|
+
}
|
|
87
|
+
function isPort(value) {
|
|
88
|
+
return validator.isPort(value);
|
|
89
|
+
}
|
|
90
|
+
function isPostalCode(value) {
|
|
91
|
+
return validator.isPostalCode(value, "CN");
|
|
92
|
+
}
|
|
93
|
+
function isSemVer(value) {
|
|
94
|
+
return validator.isSemVer(value);
|
|
95
|
+
}
|
|
96
|
+
function isSlug(value) {
|
|
97
|
+
return validator.isSlug(value);
|
|
98
|
+
}
|
|
99
|
+
function isStrongPassword(value) {
|
|
100
|
+
return validator.isStrongPassword(value, {
|
|
101
|
+
minLength: 8,
|
|
102
|
+
minLowercase: 1,
|
|
103
|
+
minUppercase: 1,
|
|
104
|
+
minNumbers: 1,
|
|
105
|
+
minSymbols: 1
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function isTime(value, options) {
|
|
109
|
+
return validator.isTime(value, options);
|
|
110
|
+
}
|
|
111
|
+
function isUrl(value) {
|
|
112
|
+
return validator.isURL(value, {
|
|
113
|
+
protocols: ["http", "https"],
|
|
114
|
+
require_tld: true,
|
|
115
|
+
require_protocol: true,
|
|
116
|
+
require_host: true,
|
|
117
|
+
require_port: false,
|
|
118
|
+
require_valid_protocol: true,
|
|
119
|
+
allow_underscores: true
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function isUri(value) {
|
|
123
|
+
return validator.isURL(value, {
|
|
124
|
+
protocols: [],
|
|
125
|
+
require_tld: false,
|
|
126
|
+
require_protocol: false,
|
|
127
|
+
require_host: false,
|
|
128
|
+
require_port: false,
|
|
129
|
+
require_valid_protocol: false,
|
|
130
|
+
allow_underscores: true,
|
|
131
|
+
allow_fragments: false,
|
|
132
|
+
allow_query_components: false,
|
|
133
|
+
allow_protocol_relative_urls: false
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function isUuid(value, version) {
|
|
137
|
+
return validator.isUUID(value, version);
|
|
138
|
+
}
|
|
139
|
+
function isDateTime(value) {
|
|
140
|
+
const [date, time] = value.split(" ", 2);
|
|
141
|
+
return isDate(date) && isTime(time);
|
|
142
|
+
}
|
|
143
|
+
function matches(value, pattern, modifiers) {
|
|
144
|
+
return validator.matches(value, pattern, modifiers);
|
|
145
|
+
}
|
|
146
|
+
const chineseNameRegExp = /^[\u4E00-\u9FA5]+\d*$/;
|
|
147
|
+
function isChineseName(value) {
|
|
148
|
+
return chineseNameRegExp.test(value);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { isAfter, isAlpha, isAlphanumeric, isAscii, isBefore, isBlank, isBoolean, isChineseName, isDate, isDateTime, isDecimal, isEmail, isEmpty, isFloat, isHexColor, isIdentityCard, isIn, isInt, isIp, isIpRange, isJson, isJwt, isLatLong, isLength, isMimeType, isMobilePhone, isNumeric, isPort, isPostalCode, isSemVer, isSlug, isStrongPassword, isTime, isUri, isUrl, isUuid, matches };
|
package/esm/yaml.js
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.124",
|
|
5
5
|
"private": false,
|
|
6
|
-
"packageManager": "pnpm@9.15.0",
|
|
7
6
|
"description": "Shared fundamental to the VEF framework",
|
|
8
7
|
"author": "Venus",
|
|
9
8
|
"keywords": [
|
|
@@ -15,11 +14,11 @@
|
|
|
15
14
|
"exports": {
|
|
16
15
|
".": {
|
|
17
16
|
"types": "./types/index.d.ts",
|
|
18
|
-
"import": "./
|
|
19
|
-
"require": "./
|
|
17
|
+
"import": "./esm/index.js",
|
|
18
|
+
"require": "./cjs/index.cjs"
|
|
20
19
|
}
|
|
21
20
|
},
|
|
22
|
-
"main": "
|
|
21
|
+
"main": "cjs/index.cjs",
|
|
23
22
|
"types": "types/index.d.ts",
|
|
24
23
|
"files": [
|
|
25
24
|
"*"
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
"@emotion/cache": "11.14.0",
|
|
37
36
|
"@emotion/react": "11.14.0",
|
|
38
37
|
"@emotion/styled": "11.14.0",
|
|
39
|
-
"antd": "5.24.
|
|
38
|
+
"antd": "5.24.4",
|
|
40
39
|
"tslib": "2.8.1",
|
|
41
40
|
"use-sync-external-store": "^1.4.0",
|
|
42
41
|
"@ant-design/icons": "5.6.1",
|
|
@@ -45,15 +44,15 @@
|
|
|
45
44
|
"ajv-formats": "^3.0.1",
|
|
46
45
|
"colord": "2.9.3",
|
|
47
46
|
"date-fns": "4.1.0",
|
|
48
|
-
"i18next": "^24.2.
|
|
47
|
+
"i18next": "^24.2.3",
|
|
49
48
|
"js-yaml": "^4.1.0",
|
|
50
49
|
"jsencrypt": "3.3.2",
|
|
51
50
|
"json-schema": "^0.4.0",
|
|
52
51
|
"mitt": "3.0.1",
|
|
53
|
-
"nanoid": "5.1.
|
|
52
|
+
"nanoid": "5.1.4",
|
|
54
53
|
"path-browserify": "1.0.1",
|
|
55
54
|
"pinyin-pro": "3.26.0",
|
|
56
|
-
"radashi": "12.
|
|
55
|
+
"radashi": "12.4.0",
|
|
57
56
|
"react-fast-compare": "3.2.2",
|
|
58
57
|
"scheduler": "0.25.0",
|
|
59
58
|
"type-fest": "4.37.0",
|
|
@@ -64,5 +63,7 @@
|
|
|
64
63
|
},
|
|
65
64
|
"publishConfig": {
|
|
66
65
|
"access": "public"
|
|
67
|
-
}
|
|
66
|
+
},
|
|
67
|
+
"module": "esm/index.js",
|
|
68
|
+
"packageManager": "pnpm@10.6.3"
|
|
68
69
|
}
|
package/es/color.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.122, build time: 2025-03-11T09:32:17.994Z, made by Venus. */import{colord}from"colord";function isValidColor(color){return colord(color).isValid()}/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */export{isValidColor};
|