@downcity/ui 0.1.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/README.md +15 -0
- package/dist/index.cjs +586 -0
- package/dist/index.d.cts +104 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +529 -0
- package/package.json +69 -0
- package/src/styles.css +137 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Downcity UI SDK 主题样式入口。
|
|
3
|
+
*
|
|
4
|
+
* 关键说明(中文)
|
|
5
|
+
* - 宿主应用需要先加载 `tailwindcss`,再引入本文件。
|
|
6
|
+
* - 本文件只负责提供 Downcity 的设计令牌与基础层,不重复声明业务布局。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@custom-variant dark (&:is(.dark *));
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
--background: #fafafa;
|
|
13
|
+
--foreground: #111113;
|
|
14
|
+
--card: #fafafa;
|
|
15
|
+
--card-foreground: #111113;
|
|
16
|
+
--popover: #fafafa;
|
|
17
|
+
--popover-foreground: #111113;
|
|
18
|
+
--primary: #111113;
|
|
19
|
+
--primary-foreground: #fafafa;
|
|
20
|
+
--secondary: #f3f4f6;
|
|
21
|
+
--secondary-foreground: #111113;
|
|
22
|
+
--muted: #f3f4f6;
|
|
23
|
+
--muted-foreground: #6b7280;
|
|
24
|
+
--accent: #f1f2f4;
|
|
25
|
+
--accent-foreground: #111113;
|
|
26
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
27
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
28
|
+
--border: #e7e7eb;
|
|
29
|
+
--input: #e7e7eb;
|
|
30
|
+
--ring: rgba(17, 17, 19, 0.16);
|
|
31
|
+
--chart-1: #111113;
|
|
32
|
+
--chart-2: #f3f4f6;
|
|
33
|
+
--chart-3: #d4d4d8;
|
|
34
|
+
--chart-4: #e7e7eb;
|
|
35
|
+
--chart-5: #9ca3af;
|
|
36
|
+
--radius: 0.6rem;
|
|
37
|
+
--sidebar: var(--background);
|
|
38
|
+
--sidebar-foreground: var(--foreground);
|
|
39
|
+
--sidebar-primary: var(--primary);
|
|
40
|
+
--sidebar-primary-foreground: var(--primary-foreground);
|
|
41
|
+
--sidebar-accent: var(--accent);
|
|
42
|
+
--sidebar-accent-foreground: var(--accent-foreground);
|
|
43
|
+
--sidebar-border: var(--border);
|
|
44
|
+
--sidebar-ring: var(--ring);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dark {
|
|
48
|
+
--background: oklch(0.145 0 0);
|
|
49
|
+
--foreground: oklch(0.985 0 0);
|
|
50
|
+
--card: oklch(0.205 0 0);
|
|
51
|
+
--card-foreground: oklch(0.985 0 0);
|
|
52
|
+
--popover: oklch(0.205 0 0);
|
|
53
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
54
|
+
--primary: oklch(0.922 0 0);
|
|
55
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
56
|
+
--secondary: oklch(0.269 0 0);
|
|
57
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
58
|
+
--muted: oklch(0.269 0 0);
|
|
59
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
60
|
+
--accent: oklch(0.269 0 0);
|
|
61
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
62
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
63
|
+
--destructive-foreground: oklch(0.985 0 0);
|
|
64
|
+
--border: oklch(1 0 0 / 10%);
|
|
65
|
+
--input: oklch(1 0 0 / 15%);
|
|
66
|
+
--ring: oklch(0.556 0 0);
|
|
67
|
+
--chart-1: oklch(0.809 0.105 251.813);
|
|
68
|
+
--chart-2: oklch(0.623 0.214 259.815);
|
|
69
|
+
--chart-3: oklch(0.546 0.245 262.881);
|
|
70
|
+
--chart-4: oklch(0.488 0.243 264.376);
|
|
71
|
+
--chart-5: oklch(0.424 0.199 265.638);
|
|
72
|
+
--sidebar: var(--background);
|
|
73
|
+
--sidebar-foreground: var(--foreground);
|
|
74
|
+
--sidebar-primary: var(--primary);
|
|
75
|
+
--sidebar-primary-foreground: var(--primary-foreground);
|
|
76
|
+
--sidebar-accent: var(--accent);
|
|
77
|
+
--sidebar-accent-foreground: var(--accent-foreground);
|
|
78
|
+
--sidebar-border: var(--border);
|
|
79
|
+
--sidebar-ring: var(--ring);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@theme inline {
|
|
83
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
84
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
85
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
86
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
87
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
88
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
89
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
90
|
+
--color-sidebar: var(--sidebar);
|
|
91
|
+
--color-chart-5: var(--chart-5);
|
|
92
|
+
--color-chart-4: var(--chart-4);
|
|
93
|
+
--color-chart-3: var(--chart-3);
|
|
94
|
+
--color-chart-2: var(--chart-2);
|
|
95
|
+
--color-chart-1: var(--chart-1);
|
|
96
|
+
--color-ring: var(--ring);
|
|
97
|
+
--color-input: var(--input);
|
|
98
|
+
--color-border: var(--border);
|
|
99
|
+
--color-destructive: var(--destructive);
|
|
100
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
101
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
102
|
+
--color-accent: var(--accent);
|
|
103
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
104
|
+
--color-muted: var(--muted);
|
|
105
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
106
|
+
--color-secondary: var(--secondary);
|
|
107
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
108
|
+
--color-primary: var(--primary);
|
|
109
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
110
|
+
--color-popover: var(--popover);
|
|
111
|
+
--color-card-foreground: var(--card-foreground);
|
|
112
|
+
--color-card: var(--card);
|
|
113
|
+
--color-foreground: var(--foreground);
|
|
114
|
+
--color-background: var(--background);
|
|
115
|
+
--radius-sm: calc(var(--radius) * 0.6);
|
|
116
|
+
--radius-md: calc(var(--radius) * 0.8);
|
|
117
|
+
--radius-lg: var(--radius);
|
|
118
|
+
--radius-xl: calc(var(--radius) * 1.4);
|
|
119
|
+
--radius-2xl: calc(var(--radius) * 1.8);
|
|
120
|
+
--radius-3xl: calc(var(--radius) * 2.2);
|
|
121
|
+
--radius-4xl: calc(var(--radius) * 2.6);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@layer base {
|
|
125
|
+
* {
|
|
126
|
+
@apply border-border outline-ring/50;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
html {
|
|
130
|
+
@apply font-sans;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
body {
|
|
134
|
+
@apply bg-background text-foreground antialiased;
|
|
135
|
+
font-feature-settings: "ss01" 1, "cv01" 1, "cv11" 1;
|
|
136
|
+
}
|
|
137
|
+
}
|