@plus-vben5/design 1.0.0-beta.1

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.
@@ -0,0 +1,383 @@
1
+ :root {
2
+ /** 弹出层的基础层级 **/
3
+ --popup-z-index: 2000;
4
+ --font-family:
5
+ -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, 'Helvetica Neue',
6
+ arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
7
+ 'Segoe UI Symbol', 'Noto Color Emoji';
8
+
9
+ /* Default background color of <body />...etc */
10
+ --background: 0 0% 100%;
11
+
12
+ /* 主体区域背景色 */
13
+ --background-deep: 216 20.11% 95.47%;
14
+ --foreground: 210 6% 21%;
15
+
16
+ /* Background color for <Card /> */
17
+ --card: 0 0% 100%;
18
+ --card-foreground: 222.2 84% 4.9%;
19
+
20
+ /* Background color for popovers such as <DropdownMenu />, <HoverCard />, <Popover /> */
21
+ --popover: 0 0% 100%;
22
+ --popover-foreground: 222.2 84% 4.9%;
23
+
24
+ /* Muted backgrounds such as <TabsList />, <Skeleton /> and <Switch /> */
25
+
26
+ /* --muted: 210 40% 96.1%;
27
+ --muted-foreground: 215.4 16.3% 46.9%; */
28
+
29
+ --muted: 240 4.8% 95.9%;
30
+ --muted-foreground: 240 3.8% 46.1%;
31
+
32
+ /* 主题颜色 */
33
+
34
+ --primary: 212 100% 45%;
35
+ --primary-foreground: 0 0% 98%;
36
+
37
+ /* Used for destructive actions such as <Button variant="destructive"> */
38
+
39
+ --destructive: 359.33 100% 65.1%;
40
+ --destructive-foreground: 0 0% 98%;
41
+
42
+ /* Used for success actions such as <message> */
43
+
44
+ --info: 240, 5%, 96%;
45
+ --info-foreground: 220, 4%, 58%;
46
+
47
+ /* Used for success actions such as <message> */
48
+
49
+ --success: 144 57% 58%;
50
+ --success-foreground: 0 0% 98%;
51
+
52
+ /* Used for warning actions such as <message> */
53
+
54
+ --warning: 42 84% 61%;
55
+ --warning-foreground: 0 0% 98%;
56
+
57
+ /* Secondary colors for <Button /> */
58
+
59
+ --secondary: 240 5% 96%;
60
+ --secondary-foreground: 240 6% 10%;
61
+
62
+ /* Used for accents such as hover effects on <DropdownMenuItem>, <SelectItem>...etc */
63
+ --accent: 240 5% 96%;
64
+ --accent-dark: 216 14% 93%;
65
+ --accent-darker: 216 11% 91%;
66
+ --accent-lighter: 240 0% 98%;
67
+ --accent-hover: 200deg 10% 90%;
68
+ --accent-foreground: 240 6% 10%;
69
+
70
+ /* Darker color */
71
+ --heavy: 192deg 9.43% 89.61%;
72
+ --heavy-foreground: var(--accent-foreground);
73
+
74
+ /* Default border color */
75
+ --border: 240 5.9% 90%;
76
+
77
+ /* Border color for inputs such as <Input />, <Select />, <Textarea /> */
78
+ --input: 240deg 5.88% 90%;
79
+ --input-placeholder: 217 10.6% 65%;
80
+ --input-background: 0 0% 100%;
81
+
82
+ /* Used for focus ring */
83
+ --ring: 222.2 84% 4.9%;
84
+
85
+ /* Border radius for card, input and buttons */
86
+ --radius: 0.5rem;
87
+
88
+ /* ============= custom ============= */
89
+
90
+ /* 遮罩颜色 */
91
+ --overlay: 0 0% 0% / 45%;
92
+ --overlay-content: 0 0% 95% / 45%;
93
+
94
+ /* 基本文字大小 */
95
+ --font-size-base: 16px;
96
+ --menu-font-size: calc(var(--font-size-base) * 0.875);
97
+
98
+ /* =============component & UI============= */
99
+
100
+ /* menu */
101
+ --sidebar: 0 0% 100%;
102
+ --sidebar-deep: 0 0% 100%;
103
+ --menu: var(--sidebar);
104
+
105
+ /* header */
106
+ --header: 0 0% 100%;
107
+
108
+ accent-color: var(--primary);
109
+ color-scheme: light;
110
+ }
111
+
112
+ [data-theme='violet'] {
113
+ /* --background: 0 0% 100%; */
114
+ --foreground: 224 71.4% 4.1%;
115
+ --card: 0 0% 100%;
116
+ --card-foreground: 224 71.4% 4.1%;
117
+ --popover: 0 0% 100%;
118
+ --popover-foreground: 224 71.4% 4.1%;
119
+ --primary-foreground: 210 20% 98%;
120
+ --secondary: 220 14.3% 95.9%;
121
+ --secondary-foreground: 220.9 39.3% 11%;
122
+ --muted: 220 14.3% 95.9%;
123
+ --muted-foreground: 220 8.9% 46.1%;
124
+ --accent: 220 14.3% 95.9%;
125
+ --accent-foreground: 220.9 39.3% 11%;
126
+ --destructive: 0 84.2% 60.2%;
127
+ --destructive-foreground: 210 20% 98%;
128
+ --border: 220 13% 91%;
129
+ --input: 220 13% 91%;
130
+ --ring: 262.1 83.3% 57.8%;
131
+ }
132
+
133
+ [data-theme='pink'] {
134
+ /* --background: 0 0% 100%; */
135
+ --foreground: 240 10% 3.9%;
136
+ --card: 0 0% 100%;
137
+ --card-foreground: 240 10% 3.9%;
138
+ --popover: 0 0% 100%;
139
+ --popover-foreground: 240 10% 3.9%;
140
+ --primary-foreground: 355.7 100% 97.3%;
141
+ --secondary: 240 4.8% 95.9%;
142
+ --secondary-foreground: 240 5.9% 10%;
143
+ --muted: 240 4.8% 95.9%;
144
+ --muted-foreground: 240 3.8% 46.1%;
145
+ --accent: 240 4.8% 95.9%;
146
+ --accent-foreground: 240 5.9% 10%;
147
+ --destructive: 0 84.2% 60.2%;
148
+ --destructive-foreground: 0 0% 98%;
149
+ --border: 240 5.9% 90%;
150
+ --input: 240 5.9% 90%;
151
+ --ring: 346.8 77.2% 49.8%;
152
+ }
153
+
154
+ [data-theme='rose'] {
155
+ /* --background: 0 0% 100%; */
156
+ --foreground: 240 10% 3.9%;
157
+ --card: 0 0% 100%;
158
+ --card-foreground: 240 10% 3.9%;
159
+ --popover: 0 0% 100%;
160
+ --popover-foreground: 240 10% 3.9%;
161
+ --primary-foreground: 355.7 100% 97.3%;
162
+ --secondary: 240 4.8% 95.9%;
163
+ --secondary-foreground: 240 5.9% 10%;
164
+ --muted: 240 4.8% 95.9%;
165
+ --muted-foreground: 240 3.8% 46.1%;
166
+ --accent: 240 4.8% 95.9%;
167
+ --accent-foreground: 240 5.9% 10%;
168
+ --destructive: 0 84.2% 60.2%;
169
+ --destructive-foreground: 0 0% 98%;
170
+ --border: 240 5.9% 90%;
171
+ --input: 240 5.9% 90%;
172
+ --ring: 346.8 77.2% 49.8%;
173
+ }
174
+
175
+ [data-theme='sky-blue'] {
176
+ /* --background: 0 0% 100%; */
177
+ --foreground: 222.2 84% 4.9%;
178
+ --card: 0 0% 100%;
179
+ --card-foreground: 222.2 84% 4.9%;
180
+ --popover: 0 0% 100%;
181
+ --popover-foreground: 222.2 84% 4.9%;
182
+ --primary-foreground: 210 40% 98%;
183
+ --secondary: 210 40% 96.1%;
184
+ --secondary-foreground: 222.2 47.4% 11.2%;
185
+ --muted: 210 40% 96.1%;
186
+ --muted-foreground: 215.4 16.3% 46.9%;
187
+ --accent: 210 40% 96.1%;
188
+ --accent-foreground: 222.2 47.4% 11.2%;
189
+ --destructive: 0 84.2% 60.2%;
190
+ --destructive-foreground: 210 40% 98%;
191
+ --border: 214.3 31.8% 91.4%;
192
+ --input: 214.3 31.8% 91.4%;
193
+ --ring: 221.2 83.2% 53.3%;
194
+ }
195
+
196
+ [data-theme='deep-blue'] {
197
+ /* --background: 0 0% 100%; */
198
+ --foreground: 222.2 84% 4.9%;
199
+ --card: 0 0% 100%;
200
+ --card-foreground: 222.2 84% 4.9%;
201
+ --popover: 0 0% 100%;
202
+ --popover-foreground: 222.2 84% 4.9%;
203
+ --primary-foreground: 210 40% 98%;
204
+ --secondary: 210 40% 96.1%;
205
+ --secondary-foreground: 222.2 47.4% 11.2%;
206
+ --muted: 210 40% 96.1%;
207
+ --muted-foreground: 215.4 16.3% 46.9%;
208
+ --accent: 210 40% 96.1%;
209
+ --accent-foreground: 222.2 47.4% 11.2%;
210
+ --destructive: 0 84.2% 60.2%;
211
+ --destructive-foreground: 210 40% 98%;
212
+ --border: 214.3 31.8% 91.4%;
213
+ --input: 214.3 31.8% 91.4%;
214
+ --ring: 221.2 83.2% 53.3%;
215
+ }
216
+
217
+ [data-theme='green'] {
218
+ /* --background: 0 0% 100%; */
219
+ --foreground: 240 10% 3.9%;
220
+ --card: 0 0% 100%;
221
+ --card-foreground: 240 10% 3.9%;
222
+ --popover: 0 0% 100%;
223
+ --popover-foreground: 240 10% 3.9%;
224
+ --primary-foreground: 355.7 100% 97.3%;
225
+ --secondary: 240 4.8% 95.9%;
226
+ --secondary-foreground: 240 5.9% 10%;
227
+ --muted: 240 4.8% 95.9%;
228
+ --muted-foreground: 240 3.8% 46.1%;
229
+ --accent: 240 4.8% 95.9%;
230
+ --accent-foreground: 240 5.9% 10%;
231
+ --destructive: 0 84.2% 60.2%;
232
+ --destructive-foreground: 0 0% 98%;
233
+ --border: 240 5.9% 90%;
234
+ --input: 240 5.9% 90%;
235
+ --ring: 142.1 76.2% 36.3%;
236
+ }
237
+
238
+ [data-theme='deep-green'] {
239
+ /* --background: 0 0% 100%; */
240
+ --foreground: 240 10% 3.9%;
241
+ --card: 0 0% 100%;
242
+ --card-foreground: 240 10% 3.9%;
243
+ --popover: 0 0% 100%;
244
+ --popover-foreground: 240 10% 3.9%;
245
+ --primary-foreground: 355.7 100% 97.3%;
246
+ --secondary: 240 4.8% 95.9%;
247
+ --secondary-foreground: 240 5.9% 10%;
248
+ --muted: 240 4.8% 95.9%;
249
+ --muted-foreground: 240 3.8% 46.1%;
250
+ --accent: 240 4.8% 95.9%;
251
+ --accent-foreground: 240 5.9% 10%;
252
+ --destructive: 0 84.2% 60.2%;
253
+ --destructive-foreground: 0 0% 98%;
254
+ --border: 240 5.9% 90%;
255
+ --input: 240 5.9% 90%;
256
+ --ring: 142.1 76.2% 36.3%;
257
+ }
258
+
259
+ [data-theme='orange'] {
260
+ /* --background: 0 0% 100%; */
261
+ --foreground: 20 14.3% 4.1%;
262
+ --card: 0 0% 100%;
263
+ --card-foreground: 20 14.3% 4.1%;
264
+ --popover: 0 0% 100%;
265
+ --popover-foreground: 20 14.3% 4.1%;
266
+ --primary-foreground: 60 9.1% 97.8%;
267
+ --secondary: 60 4.8% 95.9%;
268
+ --secondary-foreground: 24 9.8% 10%;
269
+ --muted: 60 4.8% 95.9%;
270
+ --muted-foreground: 25 5.3% 44.7%;
271
+ --accent: 60 4.8% 95.9%;
272
+ --accent-foreground: 24 9.8% 10%;
273
+ --destructive: 0 84.2% 60.2%;
274
+ --destructive-foreground: 60 9.1% 97.8%;
275
+ --border: 20 5.9% 90%;
276
+ --input: 20 5.9% 90%;
277
+ --ring: 24.6 95% 53.1%;
278
+ }
279
+
280
+ [data-theme='yellow'] {
281
+ /* --background: 0 0% 100%; */
282
+ --foreground: 20 14.3% 4.1%;
283
+ --card: 0 0% 100%;
284
+ --card-foreground: 20 14.3% 4.1%;
285
+ --popover: 0 0% 100%;
286
+ --popover-foreground: 20 14.3% 4.1%;
287
+ --primary-foreground: 26 83.3% 14.1%;
288
+ --secondary: 60 4.8% 95.9%;
289
+ --secondary-foreground: 24 9.8% 10%;
290
+ --muted: 60 4.8% 95.9%;
291
+ --muted-foreground: 25 5.3% 44.7%;
292
+ --accent: 60 4.8% 95.9%;
293
+ --accent-foreground: 24 9.8% 10%;
294
+ --destructive: 0 84.2% 60.2%;
295
+ --destructive-foreground: 60 9.1% 97.8%;
296
+ --border: 20 5.9% 90%;
297
+ --input: 20 5.9% 90%;
298
+ --ring: 20 14.3% 4.1%;
299
+ }
300
+
301
+ [data-theme='zinc'] {
302
+ /* --background: 0 0% 100%; */
303
+ --foreground: 240 10% 3.9%;
304
+ --card: 0 0% 100%;
305
+ --card-foreground: 240 10% 3.9%;
306
+ --popover: 0 0% 100%;
307
+ --popover-foreground: 240 10% 3.9%;
308
+ --primary-foreground: 0 0% 98%;
309
+ --secondary: 240 4.8% 95.9%;
310
+ --secondary-foreground: 240 5.9% 10%;
311
+ --muted: 240 4.8% 95.9%;
312
+ --muted-foreground: 240 3.8% 46.1%;
313
+ --accent: 240 4.8% 95.9%;
314
+ --accent-foreground: 240 5.9% 10%;
315
+ --destructive: 0 84.2% 60.2%;
316
+ --destructive-foreground: 0 0% 98%;
317
+ --border: 240 5.9% 90%;
318
+ --input: 240 5.9% 90%;
319
+ --ring: 240 5.9% 10%;
320
+ }
321
+
322
+ [data-theme='neutral'] {
323
+ /* --background: 0 0% 100%; */
324
+ --foreground: 0 0% 3.9%;
325
+ --card: 0 0% 100%;
326
+ --card-foreground: 0 0% 3.9%;
327
+ --popover: 0 0% 100%;
328
+ --popover-foreground: 0 0% 3.9%;
329
+ --primary-foreground: 0 0% 98%;
330
+ --secondary: 0 0% 96.1%;
331
+ --secondary-foreground: 0 0% 9%;
332
+ --muted: 0 0% 96.1%;
333
+ --muted-foreground: 0 0% 45.1%;
334
+ --accent: 0 0% 96.1%;
335
+ --accent-foreground: 0 0% 9%;
336
+ --destructive: 0 84.2% 60.2%;
337
+ --destructive-foreground: 0 0% 98%;
338
+ --border: 0 0% 89.8%;
339
+ --input: 0 0% 89.8%;
340
+ --ring: 0 0% 3.9%;
341
+ }
342
+
343
+ [data-theme='slate'] {
344
+ /* --background: 0 0% 100%; */
345
+ --foreground: 222.2 84% 4.9%;
346
+ --card: 0 0% 100%;
347
+ --card-foreground: 222.2 84% 4.9%;
348
+ --popover: 0 0% 100%;
349
+ --popover-foreground: 222.2 84% 4.9%;
350
+ --primary-foreground: 210 40% 98%;
351
+ --secondary: 210 40% 96.1%;
352
+ --secondary-foreground: 222.2 47.4% 11.2%;
353
+ --muted: 210 40% 96.1%;
354
+ --muted-foreground: 215.4 16.3% 46.9%;
355
+ --accent: 210 40% 96.1%;
356
+ --accent-foreground: 222.2 47.4% 11.2%;
357
+ --destructive: 0 84.2% 60.2%;
358
+ --destructive-foreground: 210 40% 98%;
359
+ --border: 214.3 31.8% 91.4%;
360
+ --input: 214.3 31.8% 91.4%;
361
+ --ring: 222.2 84% 4.9%;
362
+ }
363
+
364
+ [data-theme='gray'] {
365
+ /* --background: 0 0% 100%; */
366
+ --foreground: 224 71.4% 4.1%;
367
+ --card: 0 0% 100%;
368
+ --card-foreground: 224 71.4% 4.1%;
369
+ --popover: 0 0% 100%;
370
+ --popover-foreground: 224 71.4% 4.1%;
371
+ --primary-foreground: 210 20% 98%;
372
+ --secondary: 220 14.3% 95.9%;
373
+ --secondary-foreground: 220.9 39.3% 11%;
374
+ --muted: 220 14.3% 95.9%;
375
+ --muted-foreground: 220 8.9% 46.1%;
376
+ --accent: 220 14.3% 95.9%;
377
+ --accent-foreground: 220.9 39.3% 11%;
378
+ --destructive: 0 84.2% 60.2%;
379
+ --destructive-foreground: 210 20% 98%;
380
+ --border: 220 13% 91%;
381
+ --input: 220 13% 91%;
382
+ --ring: 224 71.4% 4.1%;
383
+ }
@@ -0,0 +1,2 @@
1
+ import './default.css';
2
+ import './dark.css';
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ import './design-tokens';
2
+
3
+ import './css/global.css';
4
+ import './css/transition.css';
5
+ import './css/nprogress.css';
6
+ import './css/ui.css';
@@ -0,0 +1,34 @@
1
+ @forward './constants';
2
+
3
+ @mixin b($block) {
4
+ $B: $namespace + '-' + $block !global;
5
+
6
+ .#{$B} {
7
+ @content;
8
+ }
9
+ }
10
+
11
+ @mixin e($name) {
12
+ @at-root {
13
+ &#{$element-separator}#{$name} {
14
+ @content;
15
+ }
16
+ }
17
+ }
18
+
19
+ @mixin m($name) {
20
+ @at-root {
21
+ &#{$modifier-separator}#{$name} {
22
+ @content;
23
+ }
24
+ }
25
+ }
26
+
27
+ // block__element.is-active {}
28
+ @mixin is($state, $prefix: $state-prefix) {
29
+ @at-root {
30
+ &.#{$prefix}-#{$state} {
31
+ @content;
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,5 @@
1
+ $namespace: 'vben' !default;
2
+ $common-separator: '-' !default;
3
+ $element-separator: '__' !default;
4
+ $modifier-separator: '--' !default;
5
+ $state-prefix: 'is' !default;