@yunlefun/ui 0.0.7 → 0.2.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.
- package/dist/adapters/nuxt-ui.css +1 -0
- package/dist/adapters/shadcn.css +1 -0
- package/dist/adapters/tdesign.css +1 -0
- package/dist/admin.css +1 -0
- package/dist/compat.css +1 -0
- package/dist/editor.css +1 -0
- package/dist/fonts.css +1 -0
- package/dist/index.css +1 -1
- package/dist/patterns.css +1 -1
- package/dist/tokens.css +1 -0
- package/dist/tokens.json +1371 -0
- package/package.json +53 -8
- package/styles/adapters/nuxt-ui.css +36 -0
- package/styles/adapters/shadcn.css +38 -0
- package/styles/adapters/tdesign.css +160 -0
- package/styles/admin.css +239 -43
- package/styles/compat.css +48 -0
- package/styles/css-vars.scss +427 -396
- package/styles/editor.css +255 -52
- package/styles/tokens.css +402 -0
- package/tokens/index.d.ts +73 -0
- package/tokens/index.mjs +75 -0
- package/tokens/source.mjs +734 -0
- package/unocss.d.ts +17 -0
- package/unocss.mjs +150 -0
package/unocss.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface YunlefunThemeColors {
|
|
2
|
+
[key: string]: string | YunlefunThemeColors
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface YunlefunPreset {
|
|
6
|
+
name: string
|
|
7
|
+
rules: Array<[string, Record<string, string>]>
|
|
8
|
+
theme: {
|
|
9
|
+
colors: YunlefunThemeColors
|
|
10
|
+
borderRadius: Record<string, string>
|
|
11
|
+
fontFamily: Record<string, string>
|
|
12
|
+
zIndex: Record<string, string>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare function presetYunlefun(): YunlefunPreset
|
|
17
|
+
export default presetYunlefun
|
package/unocss.mjs
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ylfAccentTones, ylfStatuses, ylfZIndex } from './tokens/source.mjs'
|
|
2
|
+
|
|
3
|
+
function accentColorEntry(tone) {
|
|
4
|
+
return {
|
|
5
|
+
DEFAULT: `var(--ylf-accent-${tone})`,
|
|
6
|
+
hover: `var(--ylf-accent-${tone}-hover)`,
|
|
7
|
+
soft: `var(--ylf-accent-${tone}-soft)`,
|
|
8
|
+
text: `var(--ylf-accent-${tone}-text)`,
|
|
9
|
+
on: `var(--ylf-accent-${tone}-on)`,
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function statusColorEntry(status) {
|
|
14
|
+
return {
|
|
15
|
+
DEFAULT: `var(--ylf-status-${status}-text)`,
|
|
16
|
+
base: `var(--ylf-status-${status})`,
|
|
17
|
+
hover: `var(--ylf-status-${status}-hover)`,
|
|
18
|
+
soft: `var(--ylf-status-${status}-soft)`,
|
|
19
|
+
text: `var(--ylf-status-${status}-text)`,
|
|
20
|
+
on: `var(--ylf-status-${status}-on)`,
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function presetYunlefun() {
|
|
25
|
+
const paletteColors = Object.fromEntries(ylfAccentTones.map(tone => [tone, `var(--ylf-palette-${tone})`]))
|
|
26
|
+
const accentColors = Object.fromEntries(ylfAccentTones.map(tone => [
|
|
27
|
+
tone,
|
|
28
|
+
accentColorEntry(tone),
|
|
29
|
+
]))
|
|
30
|
+
const statusColors = Object.fromEntries(ylfStatuses.map(status => [
|
|
31
|
+
status,
|
|
32
|
+
statusColorEntry(status),
|
|
33
|
+
]))
|
|
34
|
+
const zIndex = Object.fromEntries(Object.keys(ylfZIndex).map(key => [`ylf-${key}`, `var(--ylf-z-${key})`]))
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
name: 'unocss-preset-yunlefun',
|
|
38
|
+
rules: [
|
|
39
|
+
[
|
|
40
|
+
'bg-hero',
|
|
41
|
+
{ 'background-image': 'var(--ylf-hero-background)' },
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
'bg-brand-gradient',
|
|
45
|
+
{ 'background-image': 'var(--ylf-hero-background)' },
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'bg-spectrum',
|
|
49
|
+
{ 'background-image': 'linear-gradient(90deg, var(--ylf-spectrum-stops))' },
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
'shadow-soft-sm',
|
|
53
|
+
{ 'box-shadow': 'var(--ylf-shadow-sm)' },
|
|
54
|
+
],
|
|
55
|
+
[
|
|
56
|
+
'shadow-soft',
|
|
57
|
+
{ 'box-shadow': 'var(--ylf-shadow)' },
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
'shadow-soft-lg',
|
|
61
|
+
{ 'box-shadow': 'var(--ylf-shadow-lg)' },
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
'shadow-control',
|
|
65
|
+
{ 'box-shadow': 'var(--ylf-shadow-control)' },
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
'shadow-panel',
|
|
69
|
+
{ 'box-shadow': 'var(--ylf-shadow-panel)' },
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
'ylf-glass',
|
|
73
|
+
{
|
|
74
|
+
'background': 'var(--ylf-glass-bg)',
|
|
75
|
+
'backdrop-filter': 'var(--ylf-glass-blur)',
|
|
76
|
+
'-webkit-backdrop-filter': 'var(--ylf-glass-blur)',
|
|
77
|
+
'border': '1px solid var(--ylf-glass-border)',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
],
|
|
81
|
+
theme: {
|
|
82
|
+
colors: {
|
|
83
|
+
primary: 'var(--ylf-c-brand)',
|
|
84
|
+
brand: {
|
|
85
|
+
DEFAULT: 'var(--ylf-c-brand)',
|
|
86
|
+
hover: 'var(--ylf-c-brand-hover)',
|
|
87
|
+
active: 'var(--ylf-c-brand-active)',
|
|
88
|
+
soft: 'var(--ylf-c-brand-soft)',
|
|
89
|
+
},
|
|
90
|
+
palette: paletteColors,
|
|
91
|
+
accent: {
|
|
92
|
+
DEFAULT: 'var(--ylf-accent)',
|
|
93
|
+
hover: 'var(--ylf-accent-hover)',
|
|
94
|
+
soft: 'var(--ylf-accent-soft)',
|
|
95
|
+
text: 'var(--ylf-accent-text)',
|
|
96
|
+
on: 'var(--ylf-accent-on)',
|
|
97
|
+
...accentColors,
|
|
98
|
+
},
|
|
99
|
+
status: statusColors,
|
|
100
|
+
success: statusColors.success,
|
|
101
|
+
warning: statusColors.warning,
|
|
102
|
+
danger: statusColors.danger,
|
|
103
|
+
info: statusColors.info,
|
|
104
|
+
surface: {
|
|
105
|
+
DEFAULT: 'var(--ylf-c-surface)',
|
|
106
|
+
raised: 'var(--ylf-c-surface-raised)',
|
|
107
|
+
inset: 'var(--ylf-c-surface-inset)',
|
|
108
|
+
panel: 'var(--ylf-c-panel)',
|
|
109
|
+
},
|
|
110
|
+
bg: {
|
|
111
|
+
DEFAULT: 'var(--ylf-c-bg)',
|
|
112
|
+
soft: 'var(--ylf-c-bg-soft)',
|
|
113
|
+
mute: 'var(--ylf-c-bg-mute)',
|
|
114
|
+
},
|
|
115
|
+
fg: {
|
|
116
|
+
DEFAULT: 'var(--ylf-c-text)',
|
|
117
|
+
muted: 'var(--ylf-c-text-2)',
|
|
118
|
+
subtle: 'var(--ylf-c-text-3)',
|
|
119
|
+
onAccent: 'var(--ylf-c-text-on-accent)',
|
|
120
|
+
},
|
|
121
|
+
border: {
|
|
122
|
+
DEFAULT: 'var(--ylf-c-border)',
|
|
123
|
+
strong: 'var(--ylf-c-border-strong)',
|
|
124
|
+
control: 'var(--ylf-c-border-control)',
|
|
125
|
+
edge: 'var(--ylf-c-edge)',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
borderRadius: {
|
|
129
|
+
'ylf-2xs': 'var(--ylf-radius-2xs)',
|
|
130
|
+
'ylf-xs': 'var(--ylf-radius-xs)',
|
|
131
|
+
'ylf-sm': 'var(--ylf-radius-sm)',
|
|
132
|
+
'ylf': 'var(--ylf-radius)',
|
|
133
|
+
'ylf-lg': 'var(--ylf-radius-lg)',
|
|
134
|
+
'ylf-xl': 'var(--ylf-radius-xl)',
|
|
135
|
+
'ylf-pill': 'var(--ylf-radius-pill)',
|
|
136
|
+
},
|
|
137
|
+
fontFamily: {
|
|
138
|
+
mono: 'var(--ylf-font-mono)',
|
|
139
|
+
display: 'var(--ylf-font-display)',
|
|
140
|
+
wordmark: 'var(--ylf-font-wordmark)',
|
|
141
|
+
heading: 'var(--ylf-font-heading)',
|
|
142
|
+
body: 'var(--ylf-font-body)',
|
|
143
|
+
ui: 'var(--ylf-font-ui)',
|
|
144
|
+
},
|
|
145
|
+
zIndex,
|
|
146
|
+
},
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export default presetYunlefun
|