officialblock 1.0.6 → 1.0.8

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.
Files changed (73) hide show
  1. package/dist/index-Ch_ldWmA.js +1 -0
  2. package/dist/index-DXm2cqxo.mjs +485 -0
  3. package/dist/official-block.cjs.js +74 -74
  4. package/dist/official-block.es.js +13577 -10832
  5. package/dist/official-block.umd.js +78 -78
  6. package/dist/style.css +1 -1
  7. package/dist/swiper-JiLDDxAF.js +1 -0
  8. package/dist/swiper-acbnDJoL.mjs +2035 -0
  9. package/dist/utils-DD-vVZej.mjs +316 -0
  10. package/dist/utils-DOLLD0-F.js +1 -0
  11. package/package.json +2 -1
  12. package/src/components/ArticleList/article.vue +3 -3
  13. package/src/components/ArticleList/contact.vue +9 -9
  14. package/src/components/ArticleList/index.ts +1 -1
  15. package/src/components/ArticleList/index.vue +24 -82
  16. package/src/components/ArticleList/setting.vue +61 -71
  17. package/src/components/ArticleList/type.ts +12 -18
  18. package/src/components/BannerImage/index.ts +11 -0
  19. package/src/components/BannerImage/index.vue +153 -0
  20. package/src/components/BannerImage/setting.vue +55 -0
  21. package/src/components/BannerImage/type.ts +10 -0
  22. package/src/components/BannerPage/index.ts +11 -0
  23. package/src/components/BannerPage/index.vue +283 -0
  24. package/src/components/BannerPage/setting.vue +55 -0
  25. package/src/components/BannerPage/type.ts +10 -0
  26. package/src/components/BtnList/index.ts +11 -0
  27. package/src/components/BtnList/index.vue +588 -0
  28. package/src/components/BtnList/setting.vue +255 -0
  29. package/src/components/BtnList/type.ts +10 -0
  30. package/src/components/Button/index.vue +45 -33
  31. package/src/components/CustomSpace/index.ts +11 -0
  32. package/src/components/CustomSpace/index.vue +82 -0
  33. package/src/components/CustomSpace/setting.vue +89 -0
  34. package/src/components/CustomSpace/type.ts +10 -0
  35. package/src/components/GalleryList/index.ts +12 -0
  36. package/src/components/GalleryList/index.vue +311 -0
  37. package/src/components/GalleryList/setting.vue +268 -0
  38. package/src/components/GalleryList/type.ts +10 -0
  39. package/src/components/HeroSlide/index.ts +1 -1
  40. package/src/components/HeroSlide/index.vue +85 -133
  41. package/src/components/HeroSlide/setting.vue +435 -0
  42. package/src/components/HeroSlide/type.ts +5 -14
  43. package/src/components/LinkLIst/index.ts +11 -0
  44. package/src/components/LinkLIst/index.vue +317 -0
  45. package/src/components/LinkLIst/setting.vue +264 -0
  46. package/src/components/LinkLIst/type.ts +10 -0
  47. package/src/components/Media/index.vue +18 -18
  48. package/src/components/Operate/index.vue +17 -7
  49. package/src/components/Profile/index.vue +999 -0
  50. package/src/components/Profile/modal.vue +56 -0
  51. package/src/components/Profile/setting.vue +330 -0
  52. package/src/components/QuickLinks/index.vue +166 -0
  53. package/src/components/QuoteText/index.ts +11 -0
  54. package/src/components/QuoteText/index.vue +133 -0
  55. package/src/components/QuoteText/setting.vue +81 -0
  56. package/src/components/QuoteText/type.ts +10 -0
  57. package/src/components/ScrollKeyInfo/index.vue +0 -0
  58. package/src/components/Swiper/index.vue +538 -0
  59. package/src/components/index.ts +23 -5
  60. package/src/index.ts +56 -12
  61. package/src/main.ts +6 -3
  62. package/src/router/index.ts +6 -0
  63. package/src/style.css +17 -0
  64. package/src/styles/component-isolation.scss +256 -0
  65. package/src/styles/editor.scss +1 -1
  66. package/src/styles/layers.scss +256 -0
  67. package/src/styles/main.scss +21687 -0
  68. package/src/styles/mixins/style-isolation.scss +262 -0
  69. package/src/styles/smart-reset.scss +287 -0
  70. package/src/styles/test.scss +1 -1
  71. package/src/types/button.ts +10 -0
  72. package/src/views/StyleIsolationTest.vue +292 -0
  73. package/src/views/components/ArticleListDemo.vue +49 -10
package/src/index.ts CHANGED
@@ -1,13 +1,28 @@
1
1
  import type { App, Plugin } from 'vue'
2
- import { ArticleList, HeroSlide, RichTextEditor, ThemePreview } from './components'
2
+ import {
3
+ ArticleList,
4
+ BannerImage,
5
+ BannerPage,
6
+ BtnList,
7
+ CustomSpace,
8
+ GalleryList,
9
+ HeroSlide,
10
+ LinkList,
11
+ QuoteText
12
+ } from './components'
3
13
 
4
14
  // 全部引入插件
5
15
  const OfficialBlock = {
6
16
  install: (app: App) => {
7
17
  app.component('ArticleList', ArticleList)
18
+ app.component('BannerImage', BannerImage)
19
+ app.component('BannerPage', BannerPage)
20
+ app.component('BtnList', BtnList)
21
+ app.component('CustomSpace', CustomSpace)
22
+ app.component('GalleryList', GalleryList)
8
23
  app.component('HeroSlide', HeroSlide)
9
- app.component('RichTextEditor', RichTextEditor)
10
- app.component('ThemePreview', ThemePreview)
24
+ app.component('LinkList', LinkList)
25
+ app.component('QuoteText', QuoteText)
11
26
  },
12
27
  } satisfies Plugin
13
28
 
@@ -15,10 +30,30 @@ const OfficialBlock = {
15
30
  export default OfficialBlock
16
31
 
17
32
  // 按需引入 - 导出组件
18
- export { ArticleList, HeroSlide, RichTextEditor, ThemePreview }
33
+ export {
34
+ ArticleList,
35
+ BannerImage,
36
+ BannerPage,
37
+ BtnList,
38
+ CustomSpace,
39
+ GalleryList,
40
+ HeroSlide,
41
+ LinkList,
42
+ QuoteText
43
+ }
19
44
 
20
45
  // 按需引入 - 导出单个组件的插件
21
- export { ArticleListPlugin, HeroSlidePlugin } from './components'
46
+ export {
47
+ ArticleListPlugin,
48
+ BannerImagePlugin,
49
+ BannerPagePlugin,
50
+ BtnListPlugin,
51
+ CustomSpacePlugin,
52
+ GalleryListPlugin,
53
+ HeroSlidePlugin,
54
+ LinkListPlugin,
55
+ QuoteTextPlugin
56
+ } from './components'
22
57
 
23
58
  // 导出主题相关功能
24
59
  export { useTheme } from './composables/useTheme'
@@ -26,15 +61,24 @@ export { ThemeUtils, ResponsiveUtils, AnimationUtils, StorageUtils } from './uti
26
61
 
27
62
  // 导出类型定义
28
63
  export type {
29
- ComponentProps,
30
- ComponentEmits,
31
- ComponentSlots,
64
+ ArticleListProps,
65
+ ArticleListEmits,
66
+ BannerImageProps,
67
+ BannerImageEmits,
68
+ BannerPageProps,
69
+ BannerPageEmits,
70
+ BtnListProps,
71
+ BtnListEmits,
72
+ CustomSpaceProps,
73
+ CustomSpaceEmits,
74
+ GalleryListProps,
75
+ GalleryListEmits,
32
76
  HeroSlideProps,
33
77
  HeroSlideEmits,
34
- SlideItem,
35
- IDomEditor,
36
- IEditorConfig,
37
- IToolbarConfig
78
+ LinkListProps,
79
+ LinkListEmits,
80
+ QuoteTextProps,
81
+ QuoteTextEmits,
38
82
  } from './components'
39
83
 
40
84
  export type { ThemeConfig } from './composables/useTheme'
package/src/main.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import { createApp } from 'vue'
2
- import './style.css'
3
- import './styles/variables.scss'
2
+ // 使用 CSS 层级管理系统来控制样式优先级
3
+ import './styles/layers.scss' // 1. CSS 层级管理(包含所有层级定义)
4
+ import './style.css' // 2. 基础样式
5
+ import './styles/main.scss' // 3. 全局样式(会被放入 vendors 层)
6
+ import '@arco-design/web-vue/dist/arco.css' // 4. 第三方库样式(会被放入 vendors 层)
7
+ import './styles/component-isolation.scss' // 5. 组件隔离工具(会被放入 utilities 层)
4
8
  import App from './App.vue'
5
9
  import router from './router'
6
10
  import ArcoVue from '@arco-design/web-vue'
7
11
  import ArcoVueIcon from '@arco-design/web-vue/es/icon';
8
- import '@arco-design/web-vue/dist/arco.css'
9
12
 
10
13
  const app = createApp(App)
11
14
  app.use(router)
@@ -74,6 +74,12 @@ const routes: RouteRecordRaw[] = [
74
74
  }
75
75
  ]
76
76
  },
77
+ {
78
+ path: '/style-isolation-test',
79
+ name: 'StyleIsolationTest',
80
+ component: () => import('../views/StyleIsolationTest.vue'),
81
+ meta: { title: '样式隔离测试' }
82
+ },
77
83
  {
78
84
  path: '/:pathMatch(.*)*',
79
85
  name: 'NotFound',
package/src/style.css CHANGED
@@ -75,3 +75,20 @@ button:focus-visible {
75
75
  background-color: #f9f9f9;
76
76
  }
77
77
  }
78
+
79
+ :root {
80
+ --primary-color: #d65a00;
81
+ --link-active-color: #ff8200;
82
+ --link-blue-color: #172386;
83
+ --link-light-color: rgba(255, 255, 255, 1);
84
+ --label-color: #d65a00;
85
+ --quote-line-color: #ff8200;
86
+ --quote-text-color: #172386;
87
+ --tab-color: #ff8200;
88
+ --tab-color--search: #ff8200;
89
+ --text-color--primary: #0032a0;
90
+ --header-height: 72px;
91
+ --header-height-calc: 72px;
92
+ --alert-height: 0px;
93
+ --vh: 8.57px;
94
+ }
@@ -0,0 +1,256 @@
1
+ /**
2
+ * 组件样式隔离
3
+ * 用于确保组件样式不被全局样式污染
4
+ */
5
+
6
+ // 导入样式隔离 mixins
7
+ @import './mixins/style-isolation.scss';
8
+
9
+ // 创建一个组件隔离容器
10
+ .component-isolation {
11
+ // 重置字体继承,让组件可以自由设置字体大小
12
+ font-size: initial;
13
+ font-family: initial;
14
+ font-weight: initial;
15
+ line-height: initial;
16
+
17
+ // 重置其他可能被继承的样式
18
+ color: initial;
19
+ text-align: initial;
20
+ text-decoration: initial;
21
+ text-transform: initial;
22
+ letter-spacing: initial;
23
+
24
+ // 确保子元素不继承全局样式
25
+ * {
26
+ font-size: inherit;
27
+ font-family: inherit;
28
+ font-weight: inherit;
29
+ line-height: inherit;
30
+ color: inherit;
31
+ }
32
+ }
33
+
34
+ // 为特定组件提供样式隔离
35
+ .operate-component-isolation {
36
+ @include operate-component-isolation();
37
+ }
38
+
39
+ // 通用的字体大小工具类(不会被全局样式覆盖)
40
+ .fs-isolated {
41
+ &-8 { font-size: 8px !important; }
42
+ &-9 { font-size: 9px !important; }
43
+ &-10 { font-size: 10px !important; }
44
+ &-11 { font-size: 11px !important; }
45
+ &-12 { font-size: 12px !important; }
46
+ &-13 { font-size: 13px !important; }
47
+ &-14 { font-size: 14px !important; }
48
+ &-15 { font-size: 15px !important; }
49
+ &-16 { font-size: 16px !important; }
50
+ &-18 { font-size: 18px !important; }
51
+ &-20 { font-size: 20px !important; }
52
+ &-24 { font-size: 24px !important; }
53
+ &-28 { font-size: 28px !important; }
54
+ &-32 { font-size: 32px !important; }
55
+ }
56
+
57
+ // 字体权重工具类
58
+ .fw-isolated {
59
+ &-100 { font-weight: 100 !important; }
60
+ &-200 { font-weight: 200 !important; }
61
+ &-300 { font-weight: 300 !important; }
62
+ &-400 { font-weight: 400 !important; }
63
+ &-500 { font-weight: 500 !important; }
64
+ &-600 { font-weight: 600 !important; }
65
+ &-700 { font-weight: 700 !important; }
66
+ &-800 { font-weight: 800 !important; }
67
+ &-900 { font-weight: 900 !important; }
68
+ }
69
+
70
+ // 行高工具类
71
+ .lh-isolated {
72
+ &-1 { line-height: 1 !important; }
73
+ &-1-2 { line-height: 1.2 !important; }
74
+ &-1-4 { line-height: 1.4 !important; }
75
+ &-1-5 { line-height: 1.5 !important; }
76
+ &-1-6 { line-height: 1.6 !important; }
77
+ &-2 { line-height: 2 !important; }
78
+ }
79
+
80
+ // 颜色工具类(不会被全局样式覆盖)
81
+ .text-isolated {
82
+ &-white { color: #ffffff !important; }
83
+ &-black { color: #000000 !important; }
84
+ &-gray-100 { color: #f8f9fa !important; }
85
+ &-gray-200 { color: #e9ecef !important; }
86
+ &-gray-300 { color: #dee2e6 !important; }
87
+ &-gray-400 { color: #ced4da !important; }
88
+ &-gray-500 { color: #adb5bd !important; }
89
+ &-gray-600 { color: #6c757d !important; }
90
+ &-gray-700 { color: #495057 !important; }
91
+ &-gray-800 { color: #343a40 !important; }
92
+ &-gray-900 { color: #212529 !important; }
93
+ &-primary { color: #007bff !important; }
94
+ &-secondary { color: #6c757d !important; }
95
+ &-success { color: #28a745 !important; }
96
+ &-danger { color: #dc3545 !important; }
97
+ &-warning { color: #ffc107 !important; }
98
+ &-info { color: #17a2b8 !important; }
99
+ }
100
+
101
+ // 背景色工具类
102
+ .bg-isolated {
103
+ &-white { background-color: #ffffff !important; }
104
+ &-black { background-color: #000000 !important; }
105
+ &-transparent { background-color: transparent !important; }
106
+ &-primary { background-color: #007bff !important; }
107
+ &-secondary { background-color: #6c757d !important; }
108
+ &-success { background-color: #28a745 !important; }
109
+ &-danger { background-color: #dc3545 !important; }
110
+ &-warning { background-color: #ffc107 !important; }
111
+ &-info { background-color: #17a2b8 !important; }
112
+ }
113
+
114
+ // 边距工具类(不会被全局样式覆盖)
115
+ .m-isolated {
116
+ &-0 { margin: 0 !important; }
117
+ &-1 { margin: 0.25rem !important; }
118
+ &-2 { margin: 0.5rem !important; }
119
+ &-3 { margin: 1rem !important; }
120
+ &-4 { margin: 1.5rem !important; }
121
+ &-5 { margin: 3rem !important; }
122
+ }
123
+
124
+ .p-isolated {
125
+ &-0 { padding: 0 !important; }
126
+ &-1 { padding: 0.25rem !important; }
127
+ &-2 { padding: 0.5rem !important; }
128
+ &-3 { padding: 1rem !important; }
129
+ &-4 { padding: 1.5rem !important; }
130
+ &-5 { padding: 3rem !important; }
131
+ }
132
+
133
+ // 显示工具类
134
+ .d-isolated {
135
+ &-none { display: none !important; }
136
+ &-block { display: block !important; }
137
+ &-inline { display: inline !important; }
138
+ &-inline-block { display: inline-block !important; }
139
+ &-flex { display: flex !important; }
140
+ &-inline-flex { display: inline-flex !important; }
141
+ &-grid { display: grid !important; }
142
+ }
143
+
144
+ // Flex 工具类
145
+ .flex-isolated {
146
+ &-row { flex-direction: row !important; }
147
+ &-column { flex-direction: column !important; }
148
+ &-wrap { flex-wrap: wrap !important; }
149
+ &-nowrap { flex-wrap: nowrap !important; }
150
+ }
151
+
152
+ .justify-isolated {
153
+ &-start { justify-content: flex-start !important; }
154
+ &-center { justify-content: center !important; }
155
+ &-end { justify-content: flex-end !important; }
156
+ &-between { justify-content: space-between !important; }
157
+ &-around { justify-content: space-around !important; }
158
+ &-evenly { justify-content: space-evenly !important; }
159
+ }
160
+
161
+ .align-isolated {
162
+ &-start { align-items: flex-start !important; }
163
+ &-center { align-items: center !important; }
164
+ &-end { align-items: flex-end !important; }
165
+ &-stretch { align-items: stretch !important; }
166
+ &-baseline { align-items: baseline !important; }
167
+ }
168
+
169
+ // 边框工具类
170
+ .border-isolated {
171
+ &-0 { border: 0 !important; }
172
+ &-1 { border: 1px solid #dee2e6 !important; }
173
+ &-2 { border: 2px solid #dee2e6 !important; }
174
+ &-3 { border: 3px solid #dee2e6 !important; }
175
+ }
176
+
177
+ .rounded-isolated {
178
+ &-0 { border-radius: 0 !important; }
179
+ &-1 { border-radius: 0.25rem !important; }
180
+ &-2 { border-radius: 0.375rem !important; }
181
+ &-3 { border-radius: 0.5rem !important; }
182
+ &-circle { border-radius: 50% !important; }
183
+ &-pill { border-radius: 50rem !important; }
184
+ }
185
+
186
+ // 位置工具类
187
+ .position-isolated {
188
+ &-static { position: static !important; }
189
+ &-relative { position: relative !important; }
190
+ &-absolute { position: absolute !important; }
191
+ &-fixed { position: fixed !important; }
192
+ &-sticky { position: sticky !important; }
193
+ }
194
+
195
+ // 宽度和高度工具类
196
+ .w-isolated {
197
+ &-auto { width: auto !important; }
198
+ &-25 { width: 25% !important; }
199
+ &-50 { width: 50% !important; }
200
+ &-75 { width: 75% !important; }
201
+ &-100 { width: 100% !important; }
202
+ }
203
+
204
+ .h-isolated {
205
+ &-auto { height: auto !important; }
206
+ &-25 { height: 25% !important; }
207
+ &-50 { height: 50% !important; }
208
+ &-75 { height: 75% !important; }
209
+ &-100 { height: 100% !important; }
210
+ }
211
+
212
+ // 文本对齐工具类
213
+ .text-align-isolated {
214
+ &-left { text-align: left !important; }
215
+ &-center { text-align: center !important; }
216
+ &-right { text-align: right !important; }
217
+ &-justify { text-align: justify !important; }
218
+ }
219
+
220
+ // 光标工具类
221
+ .cursor-isolated {
222
+ &-auto { cursor: auto !important; }
223
+ &-default { cursor: default !important; }
224
+ &-pointer { cursor: pointer !important; }
225
+ &-wait { cursor: wait !important; }
226
+ &-text { cursor: text !important; }
227
+ &-move { cursor: move !important; }
228
+ &-not-allowed { cursor: not-allowed !important; }
229
+ }
230
+
231
+ // 用户选择工具类
232
+ .user-select-isolated {
233
+ &-none { user-select: none !important; }
234
+ &-auto { user-select: auto !important; }
235
+ &-text { user-select: text !important; }
236
+ &-all { user-select: all !important; }
237
+ }
238
+
239
+ // 溢出工具类
240
+ .overflow-isolated {
241
+ &-auto { overflow: auto !important; }
242
+ &-hidden { overflow: hidden !important; }
243
+ &-visible { overflow: visible !important; }
244
+ &-scroll { overflow: scroll !important; }
245
+ }
246
+
247
+ // Z-index 工具类
248
+ .z-isolated {
249
+ &-0 { z-index: 0 !important; }
250
+ &-10 { z-index: 10 !important; }
251
+ &-20 { z-index: 20 !important; }
252
+ &-30 { z-index: 30 !important; }
253
+ &-40 { z-index: 40 !important; }
254
+ &-50 { z-index: 50 !important; }
255
+ &-auto { z-index: auto !important; }
256
+ }
@@ -1,4 +1,4 @@
1
- @use "variables.scss" as *;
1
+ @use "main.scss" as *;
2
2
 
3
3
  .editor-content {
4
4
  margin-top: 16px;
@@ -0,0 +1,256 @@
1
+ /**
2
+ * CSS 层级管理
3
+ * 使用 @layer 规则来明确定义样式优先级
4
+ */
5
+
6
+ /* 定义层级顺序(从低到高优先级) */
7
+ @layer reset, base, vendors, components, utilities, overrides;
8
+
9
+ /* 重置层 - 最低优先级 */
10
+ @layer reset {
11
+ /* 基础重置样式 */
12
+ *,
13
+ *::before,
14
+ *::after {
15
+ box-sizing: border-box;
16
+ }
17
+
18
+ * {
19
+ margin: 0;
20
+ padding: 0;
21
+ }
22
+
23
+ html {
24
+ font-size: 16px;
25
+ line-height: 1.15;
26
+ }
27
+
28
+ body {
29
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
30
+ /* 不设置 font-size,让后续层级控制 */
31
+ font-weight: 400;
32
+ line-height: 1.5;
33
+ color: #212529;
34
+ background-color: #fff;
35
+ }
36
+ }
37
+
38
+ /* 基础层 - 基础样式 */
39
+ @layer base {
40
+ /* 这里可以放置基础的样式设置 */
41
+ :root {
42
+ --font-size-xs: 12px;
43
+ --font-size-sm: 14px;
44
+ --font-size-base: 16px;
45
+ --font-size-lg: 18px;
46
+ --font-size-xl: 20px;
47
+
48
+ --color-primary: #007bff;
49
+ --color-success: #28a745;
50
+ --color-warning: #ffc107;
51
+ --color-danger: #dc3545;
52
+ --color-info: #17a2b8;
53
+ }
54
+
55
+ /* 默认字体大小设置 */
56
+ body {
57
+ font-size: var(--font-size-sm); /* 14px 作为默认值 */
58
+ }
59
+ }
60
+
61
+ /* 第三方库层 */
62
+ @layer vendors {
63
+ /* 这里会放置第三方库的样式 */
64
+ /* Arco Design 等第三方库样式会在这一层 */
65
+ }
66
+
67
+ /* 组件层 - 组件样式 */
68
+ @layer components {
69
+ /* 组件样式会在这一层,优先级高于基础层和第三方库层 */
70
+
71
+ /* Operate 组件样式 */
72
+ .operate-component {
73
+ .operate-btn {
74
+ .btn-item {
75
+ font-size: 10px; /* 这里不需要 !important,因为层级优先级更高 */
76
+ color: #fff;
77
+ font-weight: 600;
78
+ padding: 4px 16px;
79
+ border-radius: 4px;
80
+ cursor: pointer;
81
+ transition: all 0.2s ease;
82
+
83
+ &:hover {
84
+ transform: translateY(-1px);
85
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
86
+ }
87
+ }
88
+
89
+ .btn-copy {
90
+ background: var(--color-warning);
91
+ }
92
+
93
+ .btn-delete {
94
+ background: var(--color-danger);
95
+ }
96
+
97
+ .btn-edit {
98
+ background: var(--color-primary);
99
+ }
100
+ }
101
+ }
102
+ }
103
+
104
+ /* 工具类层 */
105
+ @layer utilities {
106
+ /* 工具类样式,优先级很高 */
107
+ .fs-10 { font-size: 10px; }
108
+ .fs-12 { font-size: 12px; }
109
+ .fs-14 { font-size: 14px; }
110
+ .fs-16 { font-size: 16px; }
111
+ .fs-18 { font-size: 18px; }
112
+ .fs-20 { font-size: 20px; }
113
+
114
+ .fw-300 { font-weight: 300; }
115
+ .fw-400 { font-weight: 400; }
116
+ .fw-500 { font-weight: 500; }
117
+ .fw-600 { font-weight: 600; }
118
+ .fw-700 { font-weight: 700; }
119
+
120
+ .text-primary { color: var(--color-primary); }
121
+ .text-success { color: var(--color-success); }
122
+ .text-warning { color: var(--color-warning); }
123
+ .text-danger { color: var(--color-danger); }
124
+ .text-info { color: var(--color-info); }
125
+
126
+ .bg-primary { background-color: var(--color-primary); }
127
+ .bg-success { background-color: var(--color-success); }
128
+ .bg-warning { background-color: var(--color-warning); }
129
+ .bg-danger { background-color: var(--color-danger); }
130
+ .bg-info { background-color: var(--color-info); }
131
+
132
+ .d-none { display: none; }
133
+ .d-block { display: block; }
134
+ .d-flex { display: flex; }
135
+ .d-inline-flex { display: inline-flex; }
136
+
137
+ .justify-start { justify-content: flex-start; }
138
+ .justify-center { justify-content: center; }
139
+ .justify-end { justify-content: flex-end; }
140
+ .justify-between { justify-content: space-between; }
141
+
142
+ .align-start { align-items: flex-start; }
143
+ .align-center { align-items: center; }
144
+ .align-end { align-items: flex-end; }
145
+
146
+ .m-0 { margin: 0; }
147
+ .m-1 { margin: 0.25rem; }
148
+ .m-2 { margin: 0.5rem; }
149
+ .m-3 { margin: 1rem; }
150
+ .m-4 { margin: 1.5rem; }
151
+
152
+ .p-0 { padding: 0; }
153
+ .p-1 { padding: 0.25rem; }
154
+ .p-2 { padding: 0.5rem; }
155
+ .p-3 { padding: 1rem; }
156
+ .p-4 { padding: 1.5rem; }
157
+
158
+ .border { border: 1px solid #dee2e6; }
159
+ .border-0 { border: 0; }
160
+ .rounded { border-radius: 0.375rem; }
161
+ .rounded-0 { border-radius: 0; }
162
+
163
+ .shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
164
+ .shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); }
165
+ .shadow-none { box-shadow: none; }
166
+ }
167
+
168
+ /* 覆盖层 - 最高优先级 */
169
+ @layer overrides {
170
+ /* 这里放置需要强制覆盖的样式 */
171
+ /* 通常应该避免使用这一层,除非绝对必要 */
172
+
173
+ /* 特殊情况下的样式覆盖 */
174
+ .force-font-10 {
175
+ font-size: 10px;
176
+ }
177
+
178
+ .force-font-12 {
179
+ font-size: 12px;
180
+ }
181
+ }
182
+
183
+ /* 响应式工具类 */
184
+ @media (max-width: 575.98px) {
185
+ @layer utilities {
186
+ .fs-sm-10 { font-size: 10px; }
187
+ .fs-sm-12 { font-size: 12px; }
188
+ .fs-sm-14 { font-size: 14px; }
189
+
190
+ .d-sm-none { display: none; }
191
+ .d-sm-block { display: block; }
192
+ .d-sm-flex { display: flex; }
193
+ }
194
+ }
195
+
196
+ @media (max-width: 767.98px) {
197
+ @layer utilities {
198
+ .fs-md-10 { font-size: 10px; }
199
+ .fs-md-12 { font-size: 12px; }
200
+ .fs-md-14 { font-size: 14px; }
201
+
202
+ .d-md-none { display: none; }
203
+ .d-md-block { display: block; }
204
+ .d-md-flex { display: flex; }
205
+ }
206
+ }
207
+
208
+ @media (max-width: 991.98px) {
209
+ @layer utilities {
210
+ .fs-lg-10 { font-size: 10px; }
211
+ .fs-lg-12 { font-size: 12px; }
212
+ .fs-lg-14 { font-size: 14px; }
213
+
214
+ .d-lg-none { display: none; }
215
+ .d-lg-block { display: block; }
216
+ .d-lg-flex { display: flex; }
217
+ }
218
+ }
219
+
220
+ /* 打印样式 */
221
+ @media print {
222
+ @layer utilities {
223
+ .print-hidden { display: none; }
224
+ .print-visible { display: block; }
225
+ }
226
+ }
227
+
228
+ /* 暗色主题支持 */
229
+ @media (prefers-color-scheme: dark) {
230
+ @layer base {
231
+ :root {
232
+ --color-text: #ffffff;
233
+ --color-bg: #1a1a1a;
234
+ --color-border: #333333;
235
+ }
236
+
237
+ body {
238
+ color: var(--color-text);
239
+ background-color: var(--color-bg);
240
+ }
241
+ }
242
+ }
243
+
244
+ /* 减少动画偏好支持 */
245
+ @media (prefers-reduced-motion: reduce) {
246
+ @layer base {
247
+ *,
248
+ *::before,
249
+ *::after {
250
+ animation-duration: 0.01ms !important;
251
+ animation-iteration-count: 1 !important;
252
+ transition-duration: 0.01ms !important;
253
+ scroll-behavior: auto !important;
254
+ }
255
+ }
256
+ }