@admin-core/design 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 +395 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/package.json +50 -0
- package/src/scss-bem/README.md +296 -0
- package/src/scss-bem/bem.scss +234 -0
- package/src/scss-bem/constants.scss +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
# @admin-core/design
|
|
2
|
+
|
|
3
|
+
设计系统(样式、令牌)
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# npm
|
|
9
|
+
npm install @admin-core/design
|
|
10
|
+
|
|
11
|
+
# pnpm
|
|
12
|
+
pnpm add @admin-core/design
|
|
13
|
+
|
|
14
|
+
# yarn
|
|
15
|
+
yarn add @admin-core/design
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## 使用方式
|
|
19
|
+
|
|
20
|
+
### 1. CSS 样式导入
|
|
21
|
+
|
|
22
|
+
#### ESM (推荐)
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import '@admin-core/design/css'
|
|
26
|
+
|
|
27
|
+
// 使用 CSS 变量
|
|
28
|
+
// 在你的组件中直接使用设计令牌
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
#### CommonJS
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
require('@admin-core/design/css')
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. SCSS BEM 工具
|
|
38
|
+
|
|
39
|
+
如果你的项目使用 SCSS,可以导入 BEM 命名规范工具:
|
|
40
|
+
|
|
41
|
+
```scss
|
|
42
|
+
// 导入 BEM Mixin 工具
|
|
43
|
+
@use '@admin-core/design/scss-bem' as *;
|
|
44
|
+
|
|
45
|
+
// 使用 BEM Mixin
|
|
46
|
+
@include b(button) {
|
|
47
|
+
padding: 8px 16px;
|
|
48
|
+
|
|
49
|
+
@include e(icon) {
|
|
50
|
+
margin-right: 8px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@include m(primary) {
|
|
54
|
+
background: blue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include is(disabled) {
|
|
58
|
+
opacity: 0.5;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
详细的 BEM 工具使用文档,请查看 [SCSS BEM 文档](./src/scss-bem/README.md)
|
|
64
|
+
|
|
65
|
+
### 3. CDN (UMD)
|
|
66
|
+
|
|
67
|
+
#### unpkg
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<!-- 样式 -->
|
|
71
|
+
<link rel="stylesheet" href="https://unpkg.com/@admin-core/design/dist/style.css">
|
|
72
|
+
|
|
73
|
+
<!-- JavaScript -->
|
|
74
|
+
<script src="https://unpkg.com/@admin-core/design/dist/index.umd.js"></script>
|
|
75
|
+
<script>
|
|
76
|
+
// 全局变量 AdminKitDesign
|
|
77
|
+
console.log(AdminKitDesign)
|
|
78
|
+
</script>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### jsDelivr
|
|
82
|
+
|
|
83
|
+
```html
|
|
84
|
+
<!-- 样式 -->
|
|
85
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@admin-core/design/dist/style.css">
|
|
86
|
+
|
|
87
|
+
<!-- JavaScript -->
|
|
88
|
+
<script src="https://cdn.jsdelivr.net/npm/@admin-core/design/dist/index.umd.js"></script>
|
|
89
|
+
<script>
|
|
90
|
+
console.log(AdminKitDesign)
|
|
91
|
+
</script>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 包含内容
|
|
95
|
+
|
|
96
|
+
### 样式文件
|
|
97
|
+
|
|
98
|
+
- **global.css** - 全局样式、盒模型、滚动条、视图过渡
|
|
99
|
+
- **nprogress.css** - 进度条样式和旋转加载动画
|
|
100
|
+
- **transition.css** - Vue 过渡动画(滑动、淡入淡出、缩放等)
|
|
101
|
+
- **ui.css** - UI 组件样式(侧边内容、面包屑、弹窗层级等)
|
|
102
|
+
- **light.css** - 浅色主题 CSS 变量
|
|
103
|
+
- **dark.css** - 暗色主题 CSS 变量
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
# 设计令牌(Design Tokens)
|
|
108
|
+
|
|
109
|
+
## 概述
|
|
110
|
+
|
|
111
|
+
设计令牌是设计系统的基础,定义了应用中所有的颜色、间距、字体等视觉属性。通过 CSS 变量实现,可以轻松切换主题和适配暗色模式。
|
|
112
|
+
|
|
113
|
+
## 文件说明
|
|
114
|
+
|
|
115
|
+
### light.css - 浅色主题
|
|
116
|
+
|
|
117
|
+
**用途:**
|
|
118
|
+
- 定义浅色主题下的所有 CSS 变量
|
|
119
|
+
- 提供 12 种预设主题变体(default、violet、pink、rose、sky-blue、deep-blue、green、deep-green、orange、yellow、zinc、neutral、slate、gray)
|
|
120
|
+
- 作为整个设计系统的颜色基础
|
|
121
|
+
|
|
122
|
+
**核心变量:**
|
|
123
|
+
- `--background` - 页面背景色
|
|
124
|
+
- `--foreground` - 文字颜色
|
|
125
|
+
- `--primary` - 主题色
|
|
126
|
+
- `--secondary` - 次要色
|
|
127
|
+
- `--accent` - 强调色
|
|
128
|
+
- `--destructive` - 危险操作色
|
|
129
|
+
- `--success` - 成功提示色
|
|
130
|
+
- `--warning` - 警告提示色
|
|
131
|
+
- `--border` - 边框色
|
|
132
|
+
- `--input` - 输入框边框色
|
|
133
|
+
- `--card` - 卡片背景色
|
|
134
|
+
- `--popover` - 弹出层背景色
|
|
135
|
+
|
|
136
|
+
**使用示例:**
|
|
137
|
+
```html
|
|
138
|
+
<!-- 默认主题 -->
|
|
139
|
+
<html>
|
|
140
|
+
<body>默认浅色主题</body>
|
|
141
|
+
</html>
|
|
142
|
+
|
|
143
|
+
<!-- 紫色主题 -->
|
|
144
|
+
<html data-theme="violet">
|
|
145
|
+
<body>紫色浅色主题</body>
|
|
146
|
+
</html>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### dark.css - 暗色主题
|
|
150
|
+
|
|
151
|
+
**用途:**
|
|
152
|
+
- 定义暗色模式下的所有 CSS 变量
|
|
153
|
+
- 提供护眼的深色配色方案
|
|
154
|
+
- 支持与浅色主题相同的 12 种主题变体
|
|
155
|
+
- 通过 `.dark` 类名自动应用
|
|
156
|
+
|
|
157
|
+
**特点:**
|
|
158
|
+
- 背景色使用深色调(低亮度值)
|
|
159
|
+
- 前景色使用浅色调(高亮度值)
|
|
160
|
+
- 优化的对比度,确保文字可读性
|
|
161
|
+
- 减少夜间使用时的眼睛疲劳
|
|
162
|
+
|
|
163
|
+
**使用示例:**
|
|
164
|
+
```html
|
|
165
|
+
<!-- 暗色模式 -->
|
|
166
|
+
<html class="dark">
|
|
167
|
+
<body>默认暗色主题</body>
|
|
168
|
+
</html>
|
|
169
|
+
|
|
170
|
+
<!-- 暗色模式 + 紫色主题 -->
|
|
171
|
+
<html class="dark" data-theme="violet">
|
|
172
|
+
<body>紫色暗色主题</body>
|
|
173
|
+
</html>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## 主题系统
|
|
177
|
+
|
|
178
|
+
### 预设主题列表
|
|
179
|
+
|
|
180
|
+
| 主题名称 | data-theme 值 | 描述 |
|
|
181
|
+
|---------|--------------|------|
|
|
182
|
+
| 默认 | 不设置 | 蓝色系主题 |
|
|
183
|
+
| 紫罗兰 | `violet` | 紫色系主题 |
|
|
184
|
+
| 粉色 | `pink` | 粉色系主题 |
|
|
185
|
+
| 玫瑰 | `rose` | 玫瑰色系主题 |
|
|
186
|
+
| 天蓝 | `sky-blue` | 天蓝色系主题 |
|
|
187
|
+
| 深蓝 | `deep-blue` | 深蓝色系主题 |
|
|
188
|
+
| 绿色 | `green` | 绿色系主题 |
|
|
189
|
+
| 深绿 | `deep-green` | 深绿色系主题 |
|
|
190
|
+
| 橙色 | `orange` | 橙色系主题 |
|
|
191
|
+
| 黄色 | `yellow` | 黄色系主题 |
|
|
192
|
+
| 锌灰 | `zinc` | 锌灰色系主题 |
|
|
193
|
+
| 中性灰 | `neutral` | 中性灰色系主题 |
|
|
194
|
+
| 石板灰 | `slate` | 石板灰色系主题 |
|
|
195
|
+
| 灰色 | `gray` | 灰色系主题 |
|
|
196
|
+
|
|
197
|
+
### 主题切换实现
|
|
198
|
+
|
|
199
|
+
**JavaScript 切换:**
|
|
200
|
+
```javascript
|
|
201
|
+
// 切换到暗色模式
|
|
202
|
+
document.documentElement.classList.add('dark')
|
|
203
|
+
|
|
204
|
+
// 切换到浅色模式
|
|
205
|
+
document.documentElement.classList.remove('dark')
|
|
206
|
+
|
|
207
|
+
// 切换主题颜色
|
|
208
|
+
document.documentElement.setAttribute('data-theme', 'violet')
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Vue 组合式函数:**
|
|
212
|
+
```typescript
|
|
213
|
+
import { ref } from 'vue'
|
|
214
|
+
|
|
215
|
+
export function useTheme() {
|
|
216
|
+
const isDark = ref(false)
|
|
217
|
+
const theme = ref('default')
|
|
218
|
+
|
|
219
|
+
const toggleDark = () => {
|
|
220
|
+
isDark.value = !isDark.value
|
|
221
|
+
document.documentElement.classList.toggle('dark', isDark.value)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const setTheme = (newTheme: string) => {
|
|
225
|
+
theme.value = newTheme
|
|
226
|
+
document.documentElement.setAttribute('data-theme', newTheme)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return { isDark, theme, toggleDark, setTheme }
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## CSS 变量使用
|
|
234
|
+
|
|
235
|
+
### 在组件中使用
|
|
236
|
+
|
|
237
|
+
```css
|
|
238
|
+
.my-button {
|
|
239
|
+
/* 使用主题色 */
|
|
240
|
+
background-color: hsl(var(--primary));
|
|
241
|
+
color: hsl(var(--primary-foreground));
|
|
242
|
+
|
|
243
|
+
/* 使用边框色 */
|
|
244
|
+
border: 1px solid hsl(var(--border));
|
|
245
|
+
|
|
246
|
+
/* 使用圆角 */
|
|
247
|
+
border-radius: var(--radius);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.my-button:hover {
|
|
251
|
+
/* 使用强调色 */
|
|
252
|
+
background-color: hsl(var(--accent));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.my-button.destructive {
|
|
256
|
+
/* 使用危险色 */
|
|
257
|
+
background-color: hsl(var(--destructive));
|
|
258
|
+
color: hsl(var(--destructive-foreground));
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### 颜色值格式
|
|
263
|
+
|
|
264
|
+
所有颜色变量使用 HSL 格式(色相 饱和度 亮度),需要配合 `hsl()` 函数使用:
|
|
265
|
+
|
|
266
|
+
```css
|
|
267
|
+
/* ✅ 正确 */
|
|
268
|
+
background-color: hsl(var(--primary));
|
|
269
|
+
|
|
270
|
+
/* ❌ 错误 */
|
|
271
|
+
background-color: var(--primary);
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### 透明度支持
|
|
275
|
+
|
|
276
|
+
可以通过 HSL 的第四个参数添加透明度:
|
|
277
|
+
|
|
278
|
+
```css
|
|
279
|
+
/* 50% 透明度的主题色 */
|
|
280
|
+
background-color: hsl(var(--primary) / 0.5);
|
|
281
|
+
|
|
282
|
+
/* 20% 透明度的边框色 */
|
|
283
|
+
border-color: hsl(var(--border) / 0.2);
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## 变量分类
|
|
287
|
+
|
|
288
|
+
### 基础颜色
|
|
289
|
+
- `--background` / `--background-deep` - 背景色
|
|
290
|
+
- `--foreground` - 前景色(文字)
|
|
291
|
+
- `--border` - 边框色
|
|
292
|
+
|
|
293
|
+
### 组件颜色
|
|
294
|
+
- `--card` - 卡片背景
|
|
295
|
+
- `--popover` - 弹出层背景
|
|
296
|
+
- `--input` - 输入框边框
|
|
297
|
+
- `--muted` - 柔和背景
|
|
298
|
+
|
|
299
|
+
### 语义颜色
|
|
300
|
+
- `--primary` - 主题色(品牌色)
|
|
301
|
+
- `--secondary` - 次要色
|
|
302
|
+
- `--accent` - 强调色(悬停效果)
|
|
303
|
+
- `--destructive` - 危险操作(删除、警告)
|
|
304
|
+
- `--success` - 成功提示
|
|
305
|
+
- `--warning` - 警告提示
|
|
306
|
+
- `--info` - 信息提示
|
|
307
|
+
|
|
308
|
+
### 布局组件
|
|
309
|
+
- `--sidebar` - 侧边栏背景
|
|
310
|
+
- `--header` - 头部背景
|
|
311
|
+
- `--menu` - 菜单背景
|
|
312
|
+
|
|
313
|
+
### 其他
|
|
314
|
+
- `--radius` - 圆角大小
|
|
315
|
+
- `--ring` - 焦点环颜色
|
|
316
|
+
- `--overlay` - 遮罩颜色
|
|
317
|
+
- `--font-size-base` - 基础字体大小
|
|
318
|
+
|
|
319
|
+
## 最佳实践
|
|
320
|
+
|
|
321
|
+
1. **始终使用语义化变量**
|
|
322
|
+
```css
|
|
323
|
+
/* ✅ 推荐 */
|
|
324
|
+
color: hsl(var(--foreground));
|
|
325
|
+
|
|
326
|
+
/* ❌ 不推荐 */
|
|
327
|
+
color: #000000;
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
2. **为不同状态使用对应的颜色**
|
|
331
|
+
```css
|
|
332
|
+
.button-primary { background: hsl(var(--primary)); }
|
|
333
|
+
.button-danger { background: hsl(var(--destructive)); }
|
|
334
|
+
.button-success { background: hsl(var(--success)); }
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
3. **利用前景色变量确保对比度**
|
|
338
|
+
```css
|
|
339
|
+
.card {
|
|
340
|
+
background: hsl(var(--card));
|
|
341
|
+
color: hsl(var(--card-foreground));
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
4. **使用 accent 系列实现悬停效果**
|
|
346
|
+
```css
|
|
347
|
+
.menu-item {
|
|
348
|
+
background: transparent;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.menu-item:hover {
|
|
352
|
+
background: hsl(var(--accent));
|
|
353
|
+
color: hsl(var(--accent-foreground));
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## 扩展自定义主题
|
|
358
|
+
|
|
359
|
+
如需添加新的主题变体,在对应的 CSS 文件中添加:
|
|
360
|
+
|
|
361
|
+
```css
|
|
362
|
+
/* light.css */
|
|
363
|
+
[data-theme='my-theme'] {
|
|
364
|
+
--primary: 200 100% 50%;
|
|
365
|
+
--primary-foreground: 0 0% 100%;
|
|
366
|
+
/* ... 其他变量 */
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/* dark.css */
|
|
370
|
+
.dark[data-theme='my-theme'] {
|
|
371
|
+
--primary: 200 80% 40%;
|
|
372
|
+
--primary-foreground: 0 0% 100%;
|
|
373
|
+
/* ... 其他变量 */
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## 构建输出
|
|
380
|
+
|
|
381
|
+
- `dist/index.js` - ESM 格式(已压缩)
|
|
382
|
+
- `dist/index.cjs` - CommonJS 格式(已压缩)
|
|
383
|
+
- `dist/index.umd.js` - UMD 格式,用于 CDN(已压缩)
|
|
384
|
+
- `dist/index.d.ts` - TypeScript 类型定义
|
|
385
|
+
- `dist/style.css` - 合并的样式文件(42.20 kB,gzip: 9.01 kB)
|
|
386
|
+
|
|
387
|
+
## 技术栈
|
|
388
|
+
|
|
389
|
+
- **构建工具**: Vite 7.x
|
|
390
|
+
- **样式**: Tailwind CSS v4 + 原生 CSS
|
|
391
|
+
- **类型定义**: TypeScript 5.x
|
|
392
|
+
|
|
393
|
+
## License
|
|
394
|
+
|
|
395
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,cAAc,CAAC;AAEtB,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer theme,base,components,utilities;@layer theme,base,components,utilities;@layer theme{@theme default{ --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --color-red-50: oklch(97.1% .013 17.38); --color-red-100: oklch(93.6% .032 17.717); --color-red-200: oklch(88.5% .062 18.334); --color-red-300: oklch(80.8% .114 19.571); --color-red-400: oklch(70.4% .191 22.216); --color-red-500: oklch(63.7% .237 25.331); --color-red-600: oklch(57.7% .245 27.325); --color-red-700: oklch(50.5% .213 27.518); --color-red-800: oklch(44.4% .177 26.899); --color-red-900: oklch(39.6% .141 25.723); --color-red-950: oklch(25.8% .092 26.042); --color-orange-50: oklch(98% .016 73.684); --color-orange-100: oklch(95.4% .038 75.164); --color-orange-200: oklch(90.1% .076 70.697); --color-orange-300: oklch(83.7% .128 66.29); --color-orange-400: oklch(75% .183 55.934); --color-orange-500: oklch(70.5% .213 47.604); --color-orange-600: oklch(64.6% .222 41.116); --color-orange-700: oklch(55.3% .195 38.402); --color-orange-800: oklch(47% .157 37.304); --color-orange-900: oklch(40.8% .123 38.172); --color-orange-950: oklch(26.6% .079 36.259); --color-amber-50: oklch(98.7% .022 95.277); --color-amber-100: oklch(96.2% .059 95.617); --color-amber-200: oklch(92.4% .12 95.746); --color-amber-300: oklch(87.9% .169 91.605); --color-amber-400: oklch(82.8% .189 84.429); --color-amber-500: oklch(76.9% .188 70.08); --color-amber-600: oklch(66.6% .179 58.318); --color-amber-700: oklch(55.5% .163 48.998); --color-amber-800: oklch(47.3% .137 46.201); --color-amber-900: oklch(41.4% .112 45.904); --color-amber-950: oklch(27.9% .077 45.635); --color-yellow-50: oklch(98.7% .026 102.212); --color-yellow-100: oklch(97.3% .071 103.193); --color-yellow-200: oklch(94.5% .129 101.54); --color-yellow-300: oklch(90.5% .182 98.111); --color-yellow-400: oklch(85.2% .199 91.936); --color-yellow-500: oklch(79.5% .184 86.047); --color-yellow-600: oklch(68.1% .162 75.834); --color-yellow-700: oklch(55.4% .135 66.442); --color-yellow-800: oklch(47.6% .114 61.907); --color-yellow-900: oklch(42.1% .095 57.708); --color-yellow-950: oklch(28.6% .066 53.813); --color-lime-50: oklch(98.6% .031 120.757); --color-lime-100: oklch(96.7% .067 122.328); --color-lime-200: oklch(93.8% .127 124.321); --color-lime-300: oklch(89.7% .196 126.665); --color-lime-400: oklch(84.1% .238 128.85); --color-lime-500: oklch(76.8% .233 130.85); --color-lime-600: oklch(64.8% .2 131.684); --color-lime-700: oklch(53.2% .157 131.589); --color-lime-800: oklch(45.3% .124 130.933); --color-lime-900: oklch(40.5% .101 131.063); --color-lime-950: oklch(27.4% .072 132.109); --color-green-50: oklch(98.2% .018 155.826); --color-green-100: oklch(96.2% .044 156.743); --color-green-200: oklch(92.5% .084 155.995); --color-green-300: oklch(87.1% .15 154.449); --color-green-400: oklch(79.2% .209 151.711); --color-green-500: oklch(72.3% .219 149.579); --color-green-600: oklch(62.7% .194 149.214); --color-green-700: oklch(52.7% .154 150.069); --color-green-800: oklch(44.8% .119 151.328); --color-green-900: oklch(39.3% .095 152.535); --color-green-950: oklch(26.6% .065 152.934); --color-emerald-50: oklch(97.9% .021 166.113); --color-emerald-100: oklch(95% .052 163.051); --color-emerald-200: oklch(90.5% .093 164.15); --color-emerald-300: oklch(84.5% .143 164.978); --color-emerald-400: oklch(76.5% .177 163.223); --color-emerald-500: oklch(69.6% .17 162.48); --color-emerald-600: oklch(59.6% .145 163.225); --color-emerald-700: oklch(50.8% .118 165.612); --color-emerald-800: oklch(43.2% .095 166.913); --color-emerald-900: oklch(37.8% .077 168.94); --color-emerald-950: oklch(26.2% .051 172.552); --color-teal-50: oklch(98.4% .014 180.72); --color-teal-100: oklch(95.3% .051 180.801); --color-teal-200: oklch(91% .096 180.426); --color-teal-300: oklch(85.5% .138 181.071); --color-teal-400: oklch(77.7% .152 181.912); --color-teal-500: oklch(70.4% .14 182.503); --color-teal-600: oklch(60% .118 184.704); --color-teal-700: oklch(51.1% .096 186.391); --color-teal-800: oklch(43.7% .078 188.216); --color-teal-900: oklch(38.6% .063 188.416); --color-teal-950: oklch(27.7% .046 192.524); --color-cyan-50: oklch(98.4% .019 200.873); --color-cyan-100: oklch(95.6% .045 203.388); --color-cyan-200: oklch(91.7% .08 205.041); --color-cyan-300: oklch(86.5% .127 207.078); --color-cyan-400: oklch(78.9% .154 211.53); --color-cyan-500: oklch(71.5% .143 215.221); --color-cyan-600: oklch(60.9% .126 221.723); --color-cyan-700: oklch(52% .105 223.128); --color-cyan-800: oklch(45% .085 224.283); --color-cyan-900: oklch(39.8% .07 227.392); --color-cyan-950: oklch(30.2% .056 229.695); --color-sky-50: oklch(97.7% .013 236.62); --color-sky-100: oklch(95.1% .026 236.824); --color-sky-200: oklch(90.1% .058 230.902); --color-sky-300: oklch(82.8% .111 230.318); --color-sky-400: oklch(74.6% .16 232.661); --color-sky-500: oklch(68.5% .169 237.323); --color-sky-600: oklch(58.8% .158 241.966); --color-sky-700: oklch(50% .134 242.749); --color-sky-800: oklch(44.3% .11 240.79); --color-sky-900: oklch(39.1% .09 240.876); --color-sky-950: oklch(29.3% .066 243.157); --color-blue-50: oklch(97% .014 254.604); --color-blue-100: oklch(93.2% .032 255.585); --color-blue-200: oklch(88.2% .059 254.128); --color-blue-300: oklch(80.9% .105 251.813); --color-blue-400: oklch(70.7% .165 254.624); --color-blue-500: oklch(62.3% .214 259.815); --color-blue-600: oklch(54.6% .245 262.881); --color-blue-700: oklch(48.8% .243 264.376); --color-blue-800: oklch(42.4% .199 265.638); --color-blue-900: oklch(37.9% .146 265.522); --color-blue-950: oklch(28.2% .091 267.935); --color-indigo-50: oklch(96.2% .018 272.314); --color-indigo-100: oklch(93% .034 272.788); --color-indigo-200: oklch(87% .065 274.039); --color-indigo-300: oklch(78.5% .115 274.713); --color-indigo-400: oklch(67.3% .182 276.935); --color-indigo-500: oklch(58.5% .233 277.117); --color-indigo-600: oklch(51.1% .262 276.966); --color-indigo-700: oklch(45.7% .24 277.023); --color-indigo-800: oklch(39.8% .195 277.366); --color-indigo-900: oklch(35.9% .144 278.697); --color-indigo-950: oklch(25.7% .09 281.288); --color-violet-50: oklch(96.9% .016 293.756); --color-violet-100: oklch(94.3% .029 294.588); --color-violet-200: oklch(89.4% .057 293.283); --color-violet-300: oklch(81.1% .111 293.571); --color-violet-400: oklch(70.2% .183 293.541); --color-violet-500: oklch(60.6% .25 292.717); --color-violet-600: oklch(54.1% .281 293.009); --color-violet-700: oklch(49.1% .27 292.581); --color-violet-800: oklch(43.2% .232 292.759); --color-violet-900: oklch(38% .189 293.745); --color-violet-950: oklch(28.3% .141 291.089); --color-purple-50: oklch(97.7% .014 308.299); --color-purple-100: oklch(94.6% .033 307.174); --color-purple-200: oklch(90.2% .063 306.703); --color-purple-300: oklch(82.7% .119 306.383); --color-purple-400: oklch(71.4% .203 305.504); --color-purple-500: oklch(62.7% .265 303.9); --color-purple-600: oklch(55.8% .288 302.321); --color-purple-700: oklch(49.6% .265 301.924); --color-purple-800: oklch(43.8% .218 303.724); --color-purple-900: oklch(38.1% .176 304.987); --color-purple-950: oklch(29.1% .149 302.717); --color-fuchsia-50: oklch(97.7% .017 320.058); --color-fuchsia-100: oklch(95.2% .037 318.852); --color-fuchsia-200: oklch(90.3% .076 319.62); --color-fuchsia-300: oklch(83.3% .145 321.434); --color-fuchsia-400: oklch(74% .238 322.16); --color-fuchsia-500: oklch(66.7% .295 322.15); --color-fuchsia-600: oklch(59.1% .293 322.896); --color-fuchsia-700: oklch(51.8% .253 323.949); --color-fuchsia-800: oklch(45.2% .211 324.591); --color-fuchsia-900: oklch(40.1% .17 325.612); --color-fuchsia-950: oklch(29.3% .136 325.661); --color-pink-50: oklch(97.1% .014 343.198); --color-pink-100: oklch(94.8% .028 342.258); --color-pink-200: oklch(89.9% .061 343.231); --color-pink-300: oklch(82.3% .12 346.018); --color-pink-400: oklch(71.8% .202 349.761); --color-pink-500: oklch(65.6% .241 354.308); --color-pink-600: oklch(59.2% .249 .584); --color-pink-700: oklch(52.5% .223 3.958); --color-pink-800: oklch(45.9% .187 3.815); --color-pink-900: oklch(40.8% .153 2.432); --color-pink-950: oklch(28.4% .109 3.907); --color-rose-50: oklch(96.9% .015 12.422); --color-rose-100: oklch(94.1% .03 12.58); --color-rose-200: oklch(89.2% .058 10.001); --color-rose-300: oklch(81% .117 11.638); --color-rose-400: oklch(71.2% .194 13.428); --color-rose-500: oklch(64.5% .246 16.439); --color-rose-600: oklch(58.6% .253 17.585); --color-rose-700: oklch(51.4% .222 16.935); --color-rose-800: oklch(45.5% .188 13.697); --color-rose-900: oklch(41% .159 10.272); --color-rose-950: oklch(27.1% .105 12.094); --color-slate-50: oklch(98.4% .003 247.858); --color-slate-100: oklch(96.8% .007 247.896); --color-slate-200: oklch(92.9% .013 255.508); --color-slate-300: oklch(86.9% .022 252.894); --color-slate-400: oklch(70.4% .04 256.788); --color-slate-500: oklch(55.4% .046 257.417); --color-slate-600: oklch(44.6% .043 257.281); --color-slate-700: oklch(37.2% .044 257.287); --color-slate-800: oklch(27.9% .041 260.031); --color-slate-900: oklch(20.8% .042 265.755); --color-slate-950: oklch(12.9% .042 264.695); --color-gray-50: oklch(98.5% .002 247.839); --color-gray-100: oklch(96.7% .003 264.542); --color-gray-200: oklch(92.8% .006 264.531); --color-gray-300: oklch(87.2% .01 258.338); --color-gray-400: oklch(70.7% .022 261.325); --color-gray-500: oklch(55.1% .027 264.364); --color-gray-600: oklch(44.6% .03 256.802); --color-gray-700: oklch(37.3% .034 259.733); --color-gray-800: oklch(27.8% .033 256.848); --color-gray-900: oklch(21% .034 264.665); --color-gray-950: oklch(13% .028 261.692); --color-zinc-50: oklch(98.5% 0 0); --color-zinc-100: oklch(96.7% .001 286.375); --color-zinc-200: oklch(92% .004 286.32); --color-zinc-300: oklch(87.1% .006 286.286); --color-zinc-400: oklch(70.5% .015 286.067); --color-zinc-500: oklch(55.2% .016 285.938); --color-zinc-600: oklch(44.2% .017 285.786); --color-zinc-700: oklch(37% .013 285.805); --color-zinc-800: oklch(27.4% .006 286.033); --color-zinc-900: oklch(21% .006 285.885); --color-zinc-950: oklch(14.1% .005 285.823); --color-neutral-50: oklch(98.5% 0 0); --color-neutral-100: oklch(97% 0 0); --color-neutral-200: oklch(92.2% 0 0); --color-neutral-300: oklch(87% 0 0); --color-neutral-400: oklch(70.8% 0 0); --color-neutral-500: oklch(55.6% 0 0); --color-neutral-600: oklch(43.9% 0 0); --color-neutral-700: oklch(37.1% 0 0); --color-neutral-800: oklch(26.9% 0 0); --color-neutral-900: oklch(20.5% 0 0); --color-neutral-950: oklch(14.5% 0 0); --color-stone-50: oklch(98.5% .001 106.423); --color-stone-100: oklch(97% .001 106.424); --color-stone-200: oklch(92.3% .003 48.717); --color-stone-300: oklch(86.9% .005 56.366); --color-stone-400: oklch(70.9% .01 56.259); --color-stone-500: oklch(55.3% .013 58.071); --color-stone-600: oklch(44.4% .011 73.639); --color-stone-700: oklch(37.4% .01 67.558); --color-stone-800: oklch(26.8% .007 34.298); --color-stone-900: oklch(21.6% .006 56.043); --color-stone-950: oklch(14.7% .004 49.25); --color-black: #000; --color-white: #fff; --spacing: .25rem; --breakpoint-sm: 40rem; --breakpoint-md: 48rem; --breakpoint-lg: 64rem; --breakpoint-xl: 80rem; --breakpoint-2xl: 96rem; --container-3xs: 16rem; --container-2xs: 18rem; --container-xs: 20rem; --container-sm: 24rem; --container-md: 28rem; --container-lg: 32rem; --container-xl: 36rem; --container-2xl: 42rem; --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-6xl: 72rem; --container-7xl: 80rem; --text-xs: .75rem; --text-xs--line-height: calc(1 / .75); --text-sm: .875rem; --text-sm--line-height: calc(1.25 / .875); --text-base: 1rem; --text-base--line-height: 1.5 ; --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; --text-xl--line-height: calc(1.75 / 1.25); --text-2xl: 1.5rem; --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: 1.2 ; --text-4xl: 2.25rem; --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; --text-7xl: 4.5rem; --text-7xl--line-height: 1; --text-8xl: 6rem; --text-8xl--line-height: 1; --text-9xl: 8rem; --text-9xl--line-height: 1; --font-weight-thin: 100; --font-weight-extralight: 200; --font-weight-light: 300; --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; --font-weight-extrabold: 800; --font-weight-black: 900; --tracking-tighter: -.05em; --tracking-tight: -.025em; --tracking-normal: 0em; --tracking-wide: .025em; --tracking-wider: .05em; --tracking-widest: .1em; --leading-tight: 1.25; --leading-snug: 1.375; --leading-normal: 1.5; --leading-relaxed: 1.625; --leading-loose: 2; --radius-xs: .125rem; --radius-sm: .25rem; --radius-md: .375rem; --radius-lg: .5rem; --radius-xl: .75rem; --radius-2xl: 1rem; --radius-3xl: 1.5rem; --radius-4xl: 2rem; --shadow-2xs: 0 1px rgb(0 0 0 / .05); --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05); --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / .25); --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / .05); --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / .05); --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / .05); --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / .05); --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / .15); --drop-shadow-md: 0 3px 3px rgb(0 0 0 / .12); --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / .15); --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / .1); --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / .15); --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / .15); --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / .2); --text-shadow-sm: 0px 1px 0px rgb(0 0 0 / .075), 0px 1px 1px rgb(0 0 0 / .075), 0px 2px 2px rgb(0 0 0 / .075); --text-shadow-md: 0px 1px 1px rgb(0 0 0 / .1), 0px 1px 2px rgb(0 0 0 / .1), 0px 2px 4px rgb(0 0 0 / .1); --text-shadow-lg: 0px 1px 2px rgb(0 0 0 / .1), 0px 3px 2px rgb(0 0 0 / .1), 0px 4px 8px rgb(0 0 0 / .1); --ease-in: cubic-bezier(.4, 0, 1, 1); --ease-out: cubic-bezier(0, 0, .2, 1); --ease-in-out: cubic-bezier(.4, 0, .2, 1); --animate-spin: spin 1s linear infinite; --animate-ping: ping 1s cubic-bezier(0, 0, .2, 1) infinite; --animate-pulse: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; --animate-bounce: bounce 1s infinite; @keyframes spin { to { transform: rotate(360deg); } } @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } } @keyframes pulse { 50% { opacity: .5; } } @keyframes bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, .2, 1); } } --blur-xs: 4px; --blur-sm: 8px; --blur-md: 12px; --blur-lg: 16px; --blur-xl: 24px; --blur-2xl: 40px; --blur-3xl: 64px; --perspective-dramatic: 100px; --perspective-near: 300px; --perspective-normal: 500px; --perspective-midrange: 800px; --perspective-distant: 1200px; --aspect-video: 16 / 9; --default-transition-duration: .15s; --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1); --default-font-family: --theme(--font-sans, initial); --default-font-feature-settings: --theme( --font-sans--font-feature-settings, initial ); --default-font-variation-settings: --theme( --font-sans--font-variation-settings, initial ); --default-mono-font-family: --theme(--font-mono, initial); --default-mono-font-feature-settings: --theme( --font-mono--font-feature-settings, initial ); --default-mono-font-variation-settings: --theme( --font-mono--font-variation-settings, initial ); }@theme default inline reference{ --blur: 8px; --shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1); --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / .05); --drop-shadow: 0 1px 2px rgb(0 0 0 / .1), 0 1px 1px rgb(0 0 0 / .06); --radius: .25rem; --max-width-prose: 65ch; }}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:--theme(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:--theme(--default-font-feature-settings,normal);font-variation-settings:--theme(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:--theme(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:--theme(--default-mono-font-feature-settings,normal);font-variation-settings:--theme(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{@tailwind utilities;}@layer base{*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--color-border)}html{color:var(--color-foreground);background-color:var(--color-background);font-family:var(--font-family-sans);font-size:var(--font-size-base, 16px);font-variation-settings:normal;line-height:1.15;text-size-adjust:100%;font-synthesis-weight:none;scroll-behavior:smooth;text-rendering:optimizelegibility;-webkit-tap-highlight-color:transparent}#app,body,html{width:100%;height:100%}body{min-height:100vh}a,a:active,a:hover,a:link,a:visited{text-decoration:none}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:2147483646}html.dark::view-transition-old(root){z-index:2147483646}html.dark::view-transition-new(root){z-index:1}input::placeholder,textarea::placeholder{opacity:1}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{margin:0;appearance:none}html:not([data-platform=macOs]) ::-webkit-scrollbar{height:10px;width:10px}html:not([data-platform=macOs]) ::-webkit-scrollbar-thumb{background-color:var(--color-border);border-radius:.125rem;border:none}html:not([data-platform=macOs]) ::-webkit-scrollbar-track{border-radius:.125rem;border:none;background-color:transparent;box-shadow:none}html:not([data-platform=macOs]) ::-webkit-scrollbar-button{display:none}}@layer components{.flex-center{display:flex;align-items:center;justify-content:center}.flex-col-center{display:flex;flex-direction:column;align-items:center;justify-content:center}.outline-box{position:relative;cursor:pointer;border-radius:.375rem;padding:.25rem;outline:1px solid var(--color-border)}.outline-box:after{content:"";position:absolute;left:50%;top:50%;z-index:20;height:0;width:1px;border-radius:.125rem;opacity:0;outline:2px solid transparent;transition:all .3s}.outline-box.outline-box-active{outline:2px solid var(--color-primary)}.outline-box.outline-box-active:after{display:none}.outline-box:not(.outline-box-active):hover:after{left:0;top:0;height:100%;width:100%;padding:.25rem;opacity:1;outline-color:var(--color-primary)}.admin-link{color:var(--color-primary);cursor:pointer}.admin-link:hover{color:var(--color-primary-hover)}.admin-link:active{color:var(--color-primary-active)}.card-box{background-color:var(--color-card);color:var(--color-card-foreground);border:1px solid var(--color-border);border-radius:.75rem}}html.invert-mode{filter:invert(1)}html.grayscale-mode{filter:grayscale(1)}#nprogress{pointer-events:none}#nprogress .bar{background-color:var(--color-primary);position:fixed;left:0;top:0;z-index:1031;height:2px;width:100%}#nprogress .peg{position:absolute;right:0;display:block;height:100%;width:100px;box-shadow:0 0 10px var(--color-primary),0 0 5px var(--color-primary);opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{position:fixed;right:1rem;top:1rem;z-index:1031;display:block}#nprogress .spinner-icon{width:1rem;height:1rem;border-radius:9999px;border:2px solid transparent;border-top-color:var(--color-primary);border-left-color:var(--color-primary);animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{position:relative;overflow:hidden}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@keyframes nprogress-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.slide-up-enter-active,.slide-up-leave-active{transition:.25s cubic-bezier(.25,.8,.5,1)}.slide-up-move{transition:transform .3s}.slide-up-enter-from,.slide-up-leave-to{opacity:0;transform:translateY(-15px)}.slide-down-enter-active,.slide-down-leave-active{transition:.25s cubic-bezier(.25,.8,.5,1)}.slide-down-move{transition:transform .3s}.slide-down-enter-from,.slide-down-leave-to{opacity:0;transform:translateY(15px)}.slide-left-enter-active,.slide-left-leave-active{transition:.25s cubic-bezier(.25,.8,.5,1)}.slide-left-move{transition:transform .3s}.slide-left-enter-from,.slide-left-leave-to{opacity:0;transform:translate(-15px)}.slide-right-enter-active,.slide-right-leave-active{transition:.25s cubic-bezier(.25,.8,.5,1)}.slide-right-move{transition:transform .3s}.slide-right-enter-from,.slide-right-leave-to{opacity:0;transform:translate(15px)}.fade-transition-enter-active,.fade-transition-leave-active{transition:opacity .2s ease-in-out}.fade-transition-enter-from,.fade-transition-leave-to{opacity:0}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease-in-out}.fade-enter-from,.fade-leave-to{opacity:0}.fade-slide-leave-active,.fade-slide-enter-active{transition:all .3s}.fade-slide-enter-from{opacity:0;transform:translate(-30px)}.fade-slide-leave-to{opacity:0;transform:translate(30px)}.fade-down-enter-active,.fade-down-leave-active{transition:opacity .25s,transform .3s}.fade-down-enter-from{opacity:0;transform:translateY(-10%)}.fade-down-leave-to{opacity:0;transform:translateY(10%)}.fade-scale-leave-active,.fade-scale-enter-active{transition:all .28s}.fade-scale-enter-from{opacity:0;transform:scale(1.2)}.fade-scale-leave-to{opacity:0;transform:scale(.8)}.fade-up-enter-active,.fade-up-leave-active{transition:opacity .2s,transform .25s}.fade-up-enter-from{opacity:0;transform:translateY(10%)}.fade-up-leave-to{opacity:0;transform:translateY(-10%)}@keyframes fade-slide{0%{opacity:0;transform:translate(-30px)}50%{opacity:1}to{opacity:0;transform:translate(30px)}}@keyframes fade{0%{opacity:0}50%{opacity:1}to{opacity:0}}@keyframes fade-up{0%{opacity:0;transform:translateY(10%)}50%{opacity:1}to{opacity:0;transform:translateY(-10%)}}@keyframes fade-down{0%{opacity:0;transform:translateY(-10%)}50%{opacity:1}to{opacity:0;transform:translateY(10%)}}.fade-slow{animation:fade 3s infinite}.fade-slide-slow{animation:fade-slide 3s infinite}.fade-up-slow{animation:fade-up 3s infinite}.fade-down-slow{animation:fade-down 3s infinite}.collapse-transition{transition:.2s height ease-in-out,.2s padding-top ease-in-out,.2s padding-bottom ease-in-out}.collapse-transition-leave-active,.collapse-transition-enter-active{transition:.2s max-height ease-in-out,.2s padding-top ease-in-out,.2s margin-top ease-in-out}.side-content{animation-duration:.3s;animation-timing-function:cubic-bezier(.16,1,.3,1)}.side-content[data-side=top]{animation-name:slide-up}.side-content[data-side=bottom]{animation-name:slide-down}.side-content[data-side=left]{animation-name:slide-left}.side-content[data-side=right]{animation-name:slide-right}.breadcrumb-transition-enter-active{transition:transform .4s cubic-bezier(.76,0,.24,1),opacity .4s cubic-bezier(.76,0,.24,1)}.breadcrumb-transition-leave-active{display:none}.breadcrumb-transition-enter-from{opacity:0;transform:translate(30px) skew(-30deg)}@keyframes slide-down{0%{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-left{0%{opacity:0;transform:translate(-50px)}to{opacity:1;transform:translate(0)}}@keyframes slide-right{0%{opacity:0;transform:translate(50px)}to{opacity:1;transform:translate(0)}}@keyframes slide-up{0%{opacity:0;transform:translateY(-50px)}to{opacity:1;transform:translateY(0)}}.z-popup{z-index:var(--popup-z-index)}@keyframes shrink{0%{transform:scale(1)}50%{transform:scale(.9)}to{transform:scale(1)}}:root{--popup-z-index: 2000;--font-family: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--background: 0 0% 100%;--background-deep: 216 20.11% 95.47%;--foreground: 210 6% 21%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--primary: 212 100% 45%;--primary-foreground: 0 0% 98%;--destructive: 359.33 100% 65.1%;--destructive-foreground: 0 0% 98%;--info: 240 5% 96%;--info-foreground: 220 4% 58%;--success: 144 57% 58%;--success-foreground: 0 0% 98%;--warning: 42 84% 61%;--warning-foreground: 0 0% 98%;--secondary: 240 5% 96%;--secondary-foreground: 240 6% 10%;--accent: 240 5% 96%;--accent-foreground: 240 6% 10%;--border: 240 5.9% 90%;--input: 240 5.88% 90%;--input-placeholder: 217 10.6% 65%;--input-background: 0 0% 100%;--ring: 222.2 84% 4.9%;--radius: .5rem;--overlay: 0 0% 0% / 45%;--overlay-content: 0 0% 95% / 45%;--font-size-base: 16px;--sidebar: 0 0% 100%;--sidebar-deep: 0 0% 100%;--menu: var(--sidebar);--header: 0 0% 100%;accent-color:var(--primary);color-scheme:light}[data-theme=violet]{--foreground: 224 71.4% 4.1%;--card-foreground: 224 71.4% 4.1%;--popover-foreground: 224 71.4% 4.1%;--primary-foreground: 210 20% 98%;--secondary: 220 14.3% 95.9%;--secondary-foreground: 220.9 39.3% 11%;--muted: 220 14.3% 95.9%;--muted-foreground: 220 8.9% 46.1%;--accent: 220 14.3% 95.9%;--accent-foreground: 220.9 39.3% 11%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 20% 98%;--border: 220 13% 91%;--input: 220 13% 91%;--ring: 262.1 83.3% 57.8%}[data-theme=pink],[data-theme=rose]{--foreground: 240 10% 3.9%;--card-foreground: 240 10% 3.9%;--popover-foreground: 240 10% 3.9%;--primary-foreground: 355.7 100% 97.3%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 346.8 77.2% 49.8%}[data-theme=sky-blue],[data-theme=deep-blue]{--foreground: 222.2 84% 4.9%;--card-foreground: 222.2 84% 4.9%;--popover-foreground: 222.2 84% 4.9%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 221.2 83.2% 53.3%}[data-theme=green],[data-theme=deep-green]{--foreground: 240 10% 3.9%;--card-foreground: 240 10% 3.9%;--popover-foreground: 240 10% 3.9%;--primary-foreground: 355.7 100% 97.3%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 142.1 76.2% 36.3%}[data-theme=orange]{--foreground: 20 14.3% 4.1%;--card-foreground: 20 14.3% 4.1%;--popover-foreground: 20 14.3% 4.1%;--primary-foreground: 60 9.1% 97.8%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 24.6 95% 53.1%}[data-theme=yellow]{--foreground: 20 14.3% 4.1%;--card-foreground: 20 14.3% 4.1%;--popover-foreground: 20 14.3% 4.1%;--primary-foreground: 26 83.3% 14.1%;--secondary: 60 4.8% 95.9%;--secondary-foreground: 24 9.8% 10%;--muted: 60 4.8% 95.9%;--muted-foreground: 25 5.3% 44.7%;--accent: 60 4.8% 95.9%;--accent-foreground: 24 9.8% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 60 9.1% 97.8%;--border: 20 5.9% 90%;--input: 20 5.9% 90%;--ring: 20 14.3% 4.1%}[data-theme=zinc]{--foreground: 240 10% 3.9%;--card-foreground: 240 10% 3.9%;--popover-foreground: 240 10% 3.9%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 5.9% 10%}[data-theme=neutral]{--foreground: 0 0% 3.9%;--card-foreground: 0 0% 3.9%;--popover-foreground: 0 0% 3.9%;--primary-foreground: 0 0% 98%;--secondary: 0 0% 96.1%;--secondary-foreground: 0 0% 9%;--muted: 0 0% 96.1%;--muted-foreground: 0 0% 45.1%;--accent: 0 0% 96.1%;--accent-foreground: 0 0% 9%;--destructive: 0 84.2% 60.2%;--border: 0 0% 89.8%;--input: 0 0% 89.8%;--ring: 0 0% 3.9%}[data-theme=slate]{--foreground: 222.2 84% 4.9%;--card-foreground: 222.2 84% 4.9%;--popover-foreground: 222.2 84% 4.9%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%}[data-theme=gray]{--foreground: 224 71.4% 4.1%;--card-foreground: 224 71.4% 4.1%;--popover-foreground: 224 71.4% 4.1%;--primary-foreground: 210 20% 98%;--secondary: 220 14.3% 95.9%;--secondary-foreground: 220.9 39.3% 11%;--muted: 220 14.3% 95.9%;--muted-foreground: 220 8.9% 46.1%;--accent: 220 14.3% 95.9%;--accent-foreground: 220.9 39.3% 11%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 20% 98%;--border: 220 13% 91%;--input: 220 13% 91%;--ring: 224 71.4% 4.1%}.dark{--background: 222.34deg 10.43% 12.27%;--background-deep: 220deg 13.06% 9%;--foreground: 0 0% 95%;--card: 222.34deg 10.43% 12.27%;--card-foreground: 210 40% 98%;--popover: 0 0% 14.2%;--popover-foreground: 210 40% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--primary-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 0% 98%;--info: 180 1.54% 12.75%;--info-foreground: 220 4% 58%;--success: 144 57% 58%;--success-foreground: 0 0% 98%;--warning: 42 84% 61%;--warning-foreground: 0 0% 98%;--secondary: 240 5% 17%;--secondary-foreground: 0 0% 98%;--accent: 216 5% 19%;--accent-foreground: 0 0% 98%;--border: 240 3.7% 22%;--input: 0 0% 100% / 10%;--input-placeholder: 218 11% 65%;--input-background: 0 0% 100% / 5%;--ring: 222.2 84% 4.9%;--radius: .5rem;--overlay: 0 0% 0% / 40%;--overlay-content: 0 0% 0% / 40%;--font-size-base: 16px;--sidebar: 222.34deg 10.43% 12.27%;--sidebar-deep: 220deg 13.06% 9%;--menu: var(--sidebar);--header: 222.34deg 10.43% 12.27%;color-scheme:dark}.dark[data-theme=violet],[data-theme=violet] .dark{--background: 224 71.4% 4.1%;--background-deep: var(--background);--foreground: 210 20% 98%;--card: 224 71.4% 4.1%;--card-foreground: 210 20% 98%;--popover: 224 71.4% 4.1%;--popover-foreground: 210 20% 98%;--primary-foreground: 210 20% 98%;--secondary: 215 27.9% 16.9%;--secondary-foreground: 210 20% 98%;--muted: 215 27.9% 16.9%;--muted-foreground: 217.9 10.6% 64.9%;--accent: 215 27.9% 16.9%;--accent-foreground: 210 20% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 210 20% 98%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--ring: 263.4 70% 50.4%;--sidebar: 224 71.4% 4.1%;--sidebar-deep: 224 71.4% 4.1%;--header: 224 71.4% 4.1%}.dark[data-theme=pink],[data-theme=pink] .dark{--background: 20 14.3% 4.1%;--background-deep: var(--background);--foreground: 0 0% 95%;--card: 0 0% 9%;--card-foreground: 0 0% 95%;--popover: 0 0% 9%;--popover-foreground: 0 0% 95%;--primary-foreground: 355.7 100% 97.3%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 15%;--muted-foreground: 240 5% 64.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 85.7% 97.3%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 346.8 77.2% 49.8%;--sidebar: 20 14.3% 4.1%;--sidebar-deep: 20 14.3% 4.1%;--header: 20 14.3% 4.1%}.dark[data-theme=rose],[data-theme=rose] .dark{--background: 0 0% 3.9%;--background-deep: var(--background);--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary-foreground: 0 85.7% 97.3%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 72.2% 50.6%;--sidebar: 0 0% 3.9%;--sidebar-deep: 0 0% 3.9%;--header: 0 0% 3.9%}.dark[data-theme=sky-blue],[data-theme=sky-blue] .dark,.dark[data-theme=deep-blue],[data-theme=deep-blue] .dark{--background: 222.2 84% 4.9%;--background-deep: var(--background);--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary-foreground: 210 20% 98%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 224.3 76.3% 48%;--sidebar: 222.2 84% 4.9%;--sidebar-deep: 222.2 84% 4.9%;--header: 222.2 84% 4.9%}.dark[data-theme=green],[data-theme=green] .dark,.dark[data-theme=deep-green],[data-theme=deep-green] .dark{--background: 20 14.3% 4.1%;--background-deep: var(--background);--foreground: 0 0% 95%;--card: 24 9.8% 6%;--card-foreground: 0 0% 95%;--popover: 0 0% 9%;--popover-foreground: 0 0% 95%;--primary-foreground: 210 20% 98%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 15%;--muted-foreground: 240 5% 64.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 85.7% 97.3%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 142.4 71.8% 29.2%;--sidebar: 20 14.3% 4.1%;--sidebar-deep: 20 14.3% 4.1%;--header: 20 14.3% 4.1%}.dark[data-theme=orange],[data-theme=orange] .dark{--background: 20 14.3% 4.1%;--background-deep: var(--background);--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary-foreground: 60 9.1% 97.8%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 0 72.2% 50.6%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 20.5 90.2% 48.2%;--sidebar: 20 14.3% 4.1%;--sidebar-deep: 20 14.3% 4.1%;--header: 20 14.3% 4.1%}.dark[data-theme=yellow],[data-theme=yellow] .dark{--background: 20 14.3% 4.1%;--background-deep: var(--background);--foreground: 60 9.1% 97.8%;--card: 20 14.3% 4.1%;--card-foreground: 60 9.1% 97.8%;--popover: 20 14.3% 4.1%;--popover-foreground: 60 9.1% 97.8%;--primary-foreground: 26 83.3% 14.1%;--secondary: 12 6.5% 15.1%;--secondary-foreground: 60 9.1% 97.8%;--muted: 12 6.5% 15.1%;--muted-foreground: 24 5.4% 63.9%;--accent: 12 6.5% 15.1%;--accent-foreground: 60 9.1% 97.8%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 60 9.1% 97.8%;--border: 12 6.5% 15.1%;--input: 12 6.5% 15.1%;--ring: 35.5 91.7% 32.9%;--sidebar: 20 14.3% 4.1%;--sidebar-deep: 20 14.3% 4.1%;--header: 20 14.3% 4.1%}.dark[data-theme=zinc],[data-theme=zinc] .dark{--background: 240 10% 3.9%;--background-deep: var(--background);--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%;--sidebar: 240 10% 3.9%;--sidebar-deep: 240 10% 3.9%;--header: 240 10% 3.9%}.dark[data-theme=neutral],[data-theme=neutral] .dark{--background: 0 0% 3.9%;--background-deep: var(--background);--foreground: 0 0% 98%;--card: 0 0% 3.9%;--card-foreground: 0 0% 98%;--popover: 0 0% 3.9%;--popover-foreground: 0 0% 98%;--primary-foreground: 0 0% 9%;--secondary: 0 0% 14.9%;--secondary-foreground: 0 0% 98%;--muted: 0 0% 14.9%;--muted-foreground: 0 0% 63.9%;--accent: 0 0% 14.9%;--accent-foreground: 0 0% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 0 0% 98%;--border: 0 0% 14.9%;--input: 0 0% 14.9%;--ring: 0 0% 83.1%;--sidebar: 0 0% 3.9%;--sidebar-deep: 0 0% 3.9%;--header: 0 0% 3.9%}.dark[data-theme=slate],[data-theme=slate] .dark{--background: 222.2 84% 4.9%;--background-deep: var(--background);--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9;--sidebar: 222.2 84% 4.9%;--sidebar-deep: 222.2 84% 4.9%;--header: 222.2 84% 4.9%}.dark[data-theme=gray],[data-theme=gray] .dark{--background: 224 71.4% 4.1%;--background-deep: var(--background);--foreground: 210 20% 98%;--card: 224 71.4% 4.1%;--card-foreground: 210 20% 98%;--popover: 224 71.4% 4.1%;--popover-foreground: 210 20% 98%;--primary-foreground: 220.9 39.3% 11%;--secondary: 215 27.9% 16.9%;--secondary-foreground: 210 20% 98%;--muted: 215 27.9% 16.9%;--muted-foreground: 217.9 10.6% 64.9%;--accent: 215 27.9% 16.9%;--accent-foreground: 210 20% 98%;--destructive: 359.21 68.47% 56.47%;--destructive-foreground: 210 20% 98%;--border: 215 27.9% 16.9%;--input: 215 27.9% 16.9%;--ring: 216 12.2% 83.9%;--sidebar: 224 71.4% 4.1%;--sidebar-deep: 224 71.4% 4.1%;--header: 224 71.4% 4.1%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,aAAa,CAAC;AACrB,OAAO,YAAY,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@admin-core/design",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "设计系统(样式、令牌)",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"admin-kit",
|
|
9
|
+
"admin-core",
|
|
10
|
+
"design",
|
|
11
|
+
"tokens",
|
|
12
|
+
"styles",
|
|
13
|
+
"css"
|
|
14
|
+
],
|
|
15
|
+
"author": "Admin Kit Team",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/jackBoVip/admin-kit.git",
|
|
20
|
+
"directory": "packages/design"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./css": "./dist/style.css",
|
|
29
|
+
"./umd": "./dist/index.umd.js",
|
|
30
|
+
"./scss-bem": "./src/scss-bem/bem.scss",
|
|
31
|
+
"./scss-bem/*": "./src/scss-bem/*"
|
|
32
|
+
},
|
|
33
|
+
"main": "./dist/index.cjs",
|
|
34
|
+
"module": "./dist/index.js",
|
|
35
|
+
"unpkg": "./dist/index.umd.js",
|
|
36
|
+
"jsdelivr": "./dist/index.umd.js",
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"src/scss-bem",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "vite build",
|
|
48
|
+
"dev": "vite build --watch"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# BEM 命名规范工具集
|
|
2
|
+
|
|
3
|
+
基于 BEM(Block Element Modifier)方法论的 SCSS Mixin 工具集,用于快速生成符合规范的 CSS 类名。
|
|
4
|
+
|
|
5
|
+
## 功能特性
|
|
6
|
+
|
|
7
|
+
- ✅ **Block(块)** - 定义独立组件
|
|
8
|
+
- ✅ **Element(元素)** - 定义组件的子元素
|
|
9
|
+
- ✅ **Modifier(修饰符)** - 定义组件的变体,支持单个和组合修饰符
|
|
10
|
+
- ✅ **State(状态)** - 定义组件的状态类(is-*)
|
|
11
|
+
- ✅ **When(条件)** - 定义组件的条件类(has-*、with-*、without-*)
|
|
12
|
+
- ✅ **Pseudo(伪类/伪元素)** - 快速添加伪类和伪元素样式
|
|
13
|
+
|
|
14
|
+
## 配置常量
|
|
15
|
+
|
|
16
|
+
```scss
|
|
17
|
+
$namespace: 'admin'; // 命名空间前缀
|
|
18
|
+
$common-separator: '-'; // 通用分隔符,用于连接命名空间和块名
|
|
19
|
+
$element-separator: '__'; // 元素分隔符
|
|
20
|
+
$modifier-separator: '--'; // 修饰符分隔符
|
|
21
|
+
$state-prefix: 'is'; // 状态类前缀
|
|
22
|
+
$when-prefixes: ('has', 'with', 'without'); // 条件类前缀列表
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 自定义配置示例
|
|
26
|
+
|
|
27
|
+
如果你想自定义命名规范,可以在导入前覆盖这些变量:
|
|
28
|
+
|
|
29
|
+
```scss
|
|
30
|
+
// 自定义配置
|
|
31
|
+
$namespace: 'my-app';
|
|
32
|
+
$common-separator: '_';
|
|
33
|
+
$element-separator: '-';
|
|
34
|
+
$modifier-separator: '--';
|
|
35
|
+
|
|
36
|
+
// 导入 BEM 工具
|
|
37
|
+
@use '@admin-core/design/scss-bem' as *;
|
|
38
|
+
|
|
39
|
+
@include b(button) {
|
|
40
|
+
// 生成 .my-app_button
|
|
41
|
+
padding: 8px 16px;
|
|
42
|
+
|
|
43
|
+
@include e(icon) {
|
|
44
|
+
// 生成 .my-app_button-icon
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 使用示例
|
|
51
|
+
|
|
52
|
+
### 基础用法
|
|
53
|
+
|
|
54
|
+
```scss
|
|
55
|
+
@use '@admin-core/design/scss-bem' as *;
|
|
56
|
+
|
|
57
|
+
@include b(button) {
|
|
58
|
+
// 生成 .admin-button
|
|
59
|
+
padding: 8px 16px;
|
|
60
|
+
border: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
|
|
63
|
+
@include e(icon) {
|
|
64
|
+
// 生成 .admin-button__icon
|
|
65
|
+
margin-right: 8px;
|
|
66
|
+
font-size: 16px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@include e(text) {
|
|
70
|
+
// 生成 .admin-button__text
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@include m(primary) {
|
|
75
|
+
// 生成 .admin-button--primary
|
|
76
|
+
background: blue;
|
|
77
|
+
color: white;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include m(large) {
|
|
81
|
+
// 生成 .admin-button--large
|
|
82
|
+
padding: 12px 24px;
|
|
83
|
+
font-size: 18px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@include is(disabled) {
|
|
87
|
+
// 生成 .admin-button.is-disabled
|
|
88
|
+
opacity: 0.5;
|
|
89
|
+
cursor: not-allowed;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@include when(icon) {
|
|
93
|
+
// 生成 .admin-button.has-icon
|
|
94
|
+
padding-left: 32px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@include pseudo(hover) {
|
|
98
|
+
// 生成 .admin-button:hover
|
|
99
|
+
opacity: 0.9;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 组合修饰符
|
|
105
|
+
|
|
106
|
+
```scss
|
|
107
|
+
@include b(card) {
|
|
108
|
+
padding: 16px;
|
|
109
|
+
|
|
110
|
+
// 单个修饰符
|
|
111
|
+
@include m(primary) {
|
|
112
|
+
// 生成 .admin-card--primary
|
|
113
|
+
border-color: blue;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 组合修饰符(需要同时满足多个条件)
|
|
117
|
+
@include m((primary, large)) {
|
|
118
|
+
// 生成 .admin-card--primary.admin-card--large
|
|
119
|
+
border-color: blue;
|
|
120
|
+
padding: 24px;
|
|
121
|
+
font-size: 18px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 条件类的不同前缀
|
|
127
|
+
|
|
128
|
+
```scss
|
|
129
|
+
@include b(input) {
|
|
130
|
+
border: 1px solid #ccc;
|
|
131
|
+
|
|
132
|
+
@include when(icon) {
|
|
133
|
+
// 生成 .admin-input.has-icon
|
|
134
|
+
padding-left: 32px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@include when(border, 'with') {
|
|
138
|
+
// 生成 .admin-input.with-border
|
|
139
|
+
border: 2px solid #000;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@include when(padding, 'without') {
|
|
143
|
+
// 生成 .admin-input.without-padding
|
|
144
|
+
padding: 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### 伪类和伪元素
|
|
150
|
+
|
|
151
|
+
```scss
|
|
152
|
+
@include b(link) {
|
|
153
|
+
color: blue;
|
|
154
|
+
|
|
155
|
+
@include pseudo(hover) {
|
|
156
|
+
// 生成 .admin-link:hover
|
|
157
|
+
color: darkblue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@include pseudo(visited) {
|
|
161
|
+
// 生成 .admin-link:visited
|
|
162
|
+
color: purple;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@include pseudo(before) {
|
|
166
|
+
// 生成 .admin-link::before
|
|
167
|
+
content: '→';
|
|
168
|
+
margin-right: 4px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@include pseudo(after) {
|
|
172
|
+
// 生成 .admin-link::after
|
|
173
|
+
content: '←';
|
|
174
|
+
margin-left: 4px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## 生成的 CSS 示例
|
|
180
|
+
|
|
181
|
+
```css
|
|
182
|
+
/* Block */
|
|
183
|
+
.admin-button {
|
|
184
|
+
padding: 8px 16px;
|
|
185
|
+
border: none;
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Element */
|
|
190
|
+
.admin-button__icon {
|
|
191
|
+
margin-right: 8px;
|
|
192
|
+
font-size: 16px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.admin-button__text {
|
|
196
|
+
font-weight: 500;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* Modifier */
|
|
200
|
+
.admin-button--primary {
|
|
201
|
+
background: blue;
|
|
202
|
+
color: white;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.admin-button--large {
|
|
206
|
+
padding: 12px 24px;
|
|
207
|
+
font-size: 18px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* State */
|
|
211
|
+
.admin-button.is-disabled {
|
|
212
|
+
opacity: 0.5;
|
|
213
|
+
cursor: not-allowed;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* When */
|
|
217
|
+
.admin-button.has-icon {
|
|
218
|
+
padding-left: 32px;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* Pseudo */
|
|
222
|
+
.admin-button:hover {
|
|
223
|
+
opacity: 0.9;
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## 优化亮点
|
|
228
|
+
|
|
229
|
+
### 1. 移除未使用的变量
|
|
230
|
+
- 删除了 `$common-separator` 变量(未在代码中使用)
|
|
231
|
+
|
|
232
|
+
### 2. 增强的 Modifier 支持
|
|
233
|
+
- 支持单个修饰符:`@include m(primary)`
|
|
234
|
+
- 支持组合修饰符:`@include m((primary, large))`
|
|
235
|
+
|
|
236
|
+
### 3. 新增 When Mixin
|
|
237
|
+
- 支持条件类的定义
|
|
238
|
+
- 灵活的前缀配置(has、with、without)
|
|
239
|
+
- 语义化的条件状态表达
|
|
240
|
+
|
|
241
|
+
### 4. 新增 Pseudo Mixin
|
|
242
|
+
- 自动识别伪类和伪元素
|
|
243
|
+
- 简化伪类/伪元素的编写
|
|
244
|
+
- 支持所有常用的伪类和伪元素
|
|
245
|
+
|
|
246
|
+
## API 参考
|
|
247
|
+
|
|
248
|
+
### @mixin b($block)
|
|
249
|
+
定义一个块(Block)
|
|
250
|
+
|
|
251
|
+
**参数:**
|
|
252
|
+
- `$block` (String) - 块的名称
|
|
253
|
+
|
|
254
|
+
### @mixin e($name)
|
|
255
|
+
定义一个元素(Element)
|
|
256
|
+
|
|
257
|
+
**参数:**
|
|
258
|
+
- `$name` (String) - 元素的名称
|
|
259
|
+
|
|
260
|
+
### @mixin m($name)
|
|
261
|
+
定义一个修饰符(Modifier)
|
|
262
|
+
|
|
263
|
+
**参数:**
|
|
264
|
+
- `$name` (String | List) - 修饰符的名称,支持单个或多个
|
|
265
|
+
|
|
266
|
+
### @mixin is($state, $prefix: 'is')
|
|
267
|
+
定义一个状态类(State)
|
|
268
|
+
|
|
269
|
+
**参数:**
|
|
270
|
+
- `$state` (String) - 状态的名称
|
|
271
|
+
- `$prefix` (String) - 状态前缀,默认为 'is'
|
|
272
|
+
|
|
273
|
+
### @mixin when($condition, $prefix: 'has')
|
|
274
|
+
定义一个条件类(When)
|
|
275
|
+
|
|
276
|
+
**参数:**
|
|
277
|
+
- `$condition` (String) - 条件的名称
|
|
278
|
+
- `$prefix` (String) - 条件前缀,默认为 'has'
|
|
279
|
+
|
|
280
|
+
### @mixin pseudo($pseudo)
|
|
281
|
+
定义伪类或伪元素
|
|
282
|
+
|
|
283
|
+
**参数:**
|
|
284
|
+
- `$pseudo` (String) - 伪类或伪元素名称(不需要冒号)
|
|
285
|
+
|
|
286
|
+
## 最佳实践
|
|
287
|
+
|
|
288
|
+
1. **保持扁平化**:避免过深的嵌套,最多 Block > Element > Modifier
|
|
289
|
+
2. **语义化命名**:使用有意义的名称,如 `button`、`card`、`header`
|
|
290
|
+
3. **状态优先**:使用 `is-*` 表示状态,`has-*` 表示条件
|
|
291
|
+
4. **避免缩写**:使用完整单词,提高可读性
|
|
292
|
+
5. **一致性**:在整个项目中保持命名风格一致
|
|
293
|
+
|
|
294
|
+
## 许可证
|
|
295
|
+
|
|
296
|
+
MIT
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BEM 命名规范 Mixin 工具集
|
|
3
|
+
*
|
|
4
|
+
* 提供一套基于 BEM 方法论的 SCSS Mixin,用于快速生成符合规范的 CSS 类名。
|
|
5
|
+
*
|
|
6
|
+
* 用途:
|
|
7
|
+
* 1. 统一组件的 CSS 命名规范
|
|
8
|
+
* 2. 提高样式的可维护性和可读性
|
|
9
|
+
* 3. 避免样式冲突和命名污染
|
|
10
|
+
* 4. 简化 BEM 类名的编写过程
|
|
11
|
+
*
|
|
12
|
+
* 使用示例:
|
|
13
|
+
* @include b(button) {
|
|
14
|
+
* // 生成 .admin-button
|
|
15
|
+
* color: blue;
|
|
16
|
+
*
|
|
17
|
+
* @include e(icon) {
|
|
18
|
+
* // 生成 .admin-button__icon
|
|
19
|
+
* font-size: 16px;
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @include m(primary) {
|
|
23
|
+
* // 生成 .admin-button--primary
|
|
24
|
+
* background: blue;
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* @include is(disabled) {
|
|
28
|
+
* // 生成 .admin-button.is-disabled
|
|
29
|
+
* opacity: 0.5;
|
|
30
|
+
* }
|
|
31
|
+
*
|
|
32
|
+
* @include when(icon) {
|
|
33
|
+
* // 生成 .admin-button.has-icon
|
|
34
|
+
* padding-left: 32px;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* 生成的 CSS:
|
|
39
|
+
* .admin-button { color: blue; }
|
|
40
|
+
* .admin-button__icon { font-size: 16px; }
|
|
41
|
+
* .admin-button--primary { background: blue; }
|
|
42
|
+
* .admin-button.is-disabled { opacity: 0.5; }
|
|
43
|
+
* .admin-button.has-icon { padding-left: 32px; }
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
@forward './constants';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Block(块)Mixin
|
|
50
|
+
*
|
|
51
|
+
* 用于定义一个独立的组件块,是 BEM 结构的最外层。
|
|
52
|
+
*
|
|
53
|
+
* @param {String} $block - 块的名称
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* @include b(card) {
|
|
57
|
+
* padding: 16px;
|
|
58
|
+
* }
|
|
59
|
+
* // 生成:.admin-card { padding: 16px; }
|
|
60
|
+
*/
|
|
61
|
+
@mixin b($block) {
|
|
62
|
+
$B: $namespace + $common-separator + $block !global;
|
|
63
|
+
|
|
64
|
+
.#{$B} {
|
|
65
|
+
@content;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Element(元素)Mixin
|
|
71
|
+
*
|
|
72
|
+
* 用于定义块的组成部分,必须在 @include b() 内部使用。
|
|
73
|
+
* 元素是块的子组件,不能独立存在。
|
|
74
|
+
*
|
|
75
|
+
* @param {String} $name - 元素的名称
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* @include b(card) {
|
|
79
|
+
* @include e(header) {
|
|
80
|
+
* font-weight: bold;
|
|
81
|
+
* }
|
|
82
|
+
* }
|
|
83
|
+
* // 生成:.admin-card__header { font-weight: bold; }
|
|
84
|
+
*/
|
|
85
|
+
@mixin e($name) {
|
|
86
|
+
@at-root {
|
|
87
|
+
&#{$element-separator}#{$name} {
|
|
88
|
+
@content;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Modifier(修饰符)Mixin
|
|
95
|
+
*
|
|
96
|
+
* 用于定义块或元素的不同状态、主题或变体。
|
|
97
|
+
* 可以在 @include b() 或 @include e() 内部使用。
|
|
98
|
+
*
|
|
99
|
+
* @param {String|List} $name - 修饰符的名称,支持单个或多个修饰符
|
|
100
|
+
*
|
|
101
|
+
* @example 单个修饰符
|
|
102
|
+
* @include b(button) {
|
|
103
|
+
* @include m(primary) {
|
|
104
|
+
* background: blue;
|
|
105
|
+
* }
|
|
106
|
+
* }
|
|
107
|
+
* // 生成:.admin-button--primary { background: blue; }
|
|
108
|
+
*
|
|
109
|
+
* @example 多个修饰符(组合)
|
|
110
|
+
* @include b(button) {
|
|
111
|
+
* @include m((primary, large)) {
|
|
112
|
+
* background: blue;
|
|
113
|
+
* font-size: 18px;
|
|
114
|
+
* }
|
|
115
|
+
* }
|
|
116
|
+
* // 生成:.admin-button--primary.admin-button--large { ... }
|
|
117
|
+
*/
|
|
118
|
+
@mixin m($name) {
|
|
119
|
+
@at-root {
|
|
120
|
+
@if type-of($name) == 'list' {
|
|
121
|
+
$selector: &;
|
|
122
|
+
@each $item in $name {
|
|
123
|
+
$selector: $selector + #{$modifier-separator}#{$item};
|
|
124
|
+
}
|
|
125
|
+
#{$selector} {
|
|
126
|
+
@content;
|
|
127
|
+
}
|
|
128
|
+
} @else {
|
|
129
|
+
&#{$modifier-separator}#{$name} {
|
|
130
|
+
@content;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* State(状态)Mixin
|
|
138
|
+
*
|
|
139
|
+
* 用于定义组件的状态类,如 disabled、active、loading 等。
|
|
140
|
+
* 状态类使用 .is- 前缀,与块或元素类名组合使用。
|
|
141
|
+
*
|
|
142
|
+
* @param {String} $state - 状态的名称
|
|
143
|
+
* @param {String} $prefix - 状态前缀,默认为 'is'
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* @include b(button) {
|
|
147
|
+
* @include is(disabled) {
|
|
148
|
+
* opacity: 0.5;
|
|
149
|
+
* cursor: not-allowed;
|
|
150
|
+
* }
|
|
151
|
+
* @include is(loading) {
|
|
152
|
+
* pointer-events: none;
|
|
153
|
+
* }
|
|
154
|
+
* }
|
|
155
|
+
* // 生成:
|
|
156
|
+
* // .admin-button.is-disabled { opacity: 0.5; cursor: not-allowed; }
|
|
157
|
+
* // .admin-button.is-loading { pointer-events: none; }
|
|
158
|
+
*/
|
|
159
|
+
@mixin is($state, $prefix: $state-prefix) {
|
|
160
|
+
@at-root {
|
|
161
|
+
&.#{$prefix}-#{$state} {
|
|
162
|
+
@content;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* When(条件)Mixin
|
|
169
|
+
*
|
|
170
|
+
* 用于定义组件的条件类,如 has-icon、with-border、without-padding 等。
|
|
171
|
+
* 条件类使用 has-、with-、without- 等前缀,表示组件包含或不包含某些特性。
|
|
172
|
+
*
|
|
173
|
+
* @param {String} $condition - 条件的名称
|
|
174
|
+
* @param {String} $prefix - 条件前缀,默认为 'has'
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* @include b(button) {
|
|
178
|
+
* @include when(icon) {
|
|
179
|
+
* padding-left: 32px;
|
|
180
|
+
* }
|
|
181
|
+
* @include when(border, 'with') {
|
|
182
|
+
* border: 1px solid #ccc;
|
|
183
|
+
* }
|
|
184
|
+
* @include when(margin, 'without') {
|
|
185
|
+
* margin: 0;
|
|
186
|
+
* }
|
|
187
|
+
* }
|
|
188
|
+
* // 生成:
|
|
189
|
+
* // .admin-button.has-icon { padding-left: 32px; }
|
|
190
|
+
* // .admin-button.with-border { border: 1px solid #ccc; }
|
|
191
|
+
* // .admin-button.without-margin { margin: 0; }
|
|
192
|
+
*/
|
|
193
|
+
@mixin when($condition, $prefix: 'has') {
|
|
194
|
+
@at-root {
|
|
195
|
+
&.#{$prefix}-#{$condition} {
|
|
196
|
+
@content;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Pseudo(伪类/伪元素)Mixin
|
|
203
|
+
*
|
|
204
|
+
* 用于快速添加伪类或伪元素样式。
|
|
205
|
+
*
|
|
206
|
+
* @param {String} $pseudo - 伪类或伪元素名称(不需要冒号)
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* @include b(button) {
|
|
210
|
+
* @include pseudo(hover) {
|
|
211
|
+
* background: darkblue;
|
|
212
|
+
* }
|
|
213
|
+
* @include pseudo(before) {
|
|
214
|
+
* content: '';
|
|
215
|
+
* display: block;
|
|
216
|
+
* }
|
|
217
|
+
* }
|
|
218
|
+
* // 生成:
|
|
219
|
+
* // .admin-button:hover { background: darkblue; }
|
|
220
|
+
* // .admin-button::before { content: ''; display: block; }
|
|
221
|
+
*/
|
|
222
|
+
@mixin pseudo($pseudo) {
|
|
223
|
+
@at-root {
|
|
224
|
+
@if $pseudo == 'before' or $pseudo == 'after' or $pseudo == 'first-line' or $pseudo == 'first-letter' {
|
|
225
|
+
&::#{$pseudo} {
|
|
226
|
+
@content;
|
|
227
|
+
}
|
|
228
|
+
} @else {
|
|
229
|
+
&:#{$pseudo} {
|
|
230
|
+
@content;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BEM 命名规范常量配置
|
|
3
|
+
*
|
|
4
|
+
* BEM(Block Element Modifier)是一种 CSS 命名方法论,用于创建可重用的组件和代码共享。
|
|
5
|
+
*
|
|
6
|
+
* 命名规则:
|
|
7
|
+
* - Block(块):独立的组件,如 .admin-button
|
|
8
|
+
* - Element(元素):块的组成部分,如 .admin-button__icon
|
|
9
|
+
* - Modifier(修饰符):块或元素的不同状态或变体,如 .admin-button--primary
|
|
10
|
+
* - State(状态):组件的状态类,如 .admin-button.is-disabled
|
|
11
|
+
* - When(条件):组件的条件类,如 .admin-button.has-icon
|
|
12
|
+
*
|
|
13
|
+
* 示例:
|
|
14
|
+
* .admin-card // Block(块)
|
|
15
|
+
* .admin-card__header // Element(元素)
|
|
16
|
+
* .admin-card__header--large // Element + Modifier(元素 + 修饰符)
|
|
17
|
+
* .admin-card.is-active // Block + State(块 + 状态)
|
|
18
|
+
* .admin-card.has-footer // Block + When(块 + 条件)
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* 命名空间前缀,用于所有组件类名 */
|
|
22
|
+
$namespace: 'admin' !default;
|
|
23
|
+
|
|
24
|
+
/* 通用分隔符,用于连接命名空间和块名 */
|
|
25
|
+
$common-separator: '-' !default;
|
|
26
|
+
|
|
27
|
+
/* 元素分隔符,用于连接块和元素 */
|
|
28
|
+
$element-separator: '__' !default;
|
|
29
|
+
|
|
30
|
+
/* 修饰符分隔符,用于连接块/元素和修饰符 */
|
|
31
|
+
$modifier-separator: '--' !default;
|
|
32
|
+
|
|
33
|
+
/* 状态类前缀,用于表示组件状态(is-active、is-disabled 等) */
|
|
34
|
+
$state-prefix: 'is' !default;
|
|
35
|
+
|
|
36
|
+
/* 条件类前缀列表,用于表示组件的条件状态 */
|
|
37
|
+
$when-prefixes: ('has', 'with', 'without') !default;
|