@ts-element-ui/theme-chalk 1.0.0 → 1.3.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.
@@ -0,0 +1,256 @@
1
+ @charset "UTF-8";
2
+ /**
3
+ * CSS 变量 - 运行时主题切换支持
4
+ */
5
+
6
+ :root {
7
+ /* 主色 */
8
+ --ts-color-primary: #409eff;
9
+ --ts-color-primary-light-1: #ecf5ff;
10
+ --ts-color-primary-light-2: #d9ecff;
11
+ --ts-color-primary-light-3: #bedaff;
12
+ --ts-color-primary-light-4: #9ec5fe;
13
+ --ts-color-primary-light-5: #79bbff;
14
+ --ts-color-primary-light-6: #a0cfff;
15
+ --ts-color-primary-light-7: #66b1ff;
16
+ --ts-color-primary-light-8: #409eff;
17
+ --ts-color-primary-light-9: #337ecc;
18
+
19
+ /* 功能色 */
20
+ --ts-color-success: #67c23a;
21
+ --ts-color-success-light: #e1f3d8;
22
+ --ts-color-warning: #e6a23c;
23
+ --ts-color-warning-light: #faecd8;
24
+ --ts-color-danger: #f56c6c;
25
+ --ts-color-danger-light: #fde2e2;
26
+ --ts-color-error: #f56c6c;
27
+ --ts-color-error-light: #fde2e2;
28
+ --ts-color-info: #909399;
29
+ --ts-color-info-light: #e9e9eb;
30
+
31
+ /* 文本色 */
32
+ --ts-text-color-primary: #303133;
33
+ --ts-text-color-regular: #606266;
34
+ --ts-text-color-secondary: #909399;
35
+ --ts-text-color-placeholder: #a8abb2;
36
+ --ts-text-color-disabled: #c0c4cc;
37
+
38
+ /* 边框色 */
39
+ --ts-border-color: #dcdfe6;
40
+ --ts-border-color-light: #e4e7ed;
41
+ --ts-border-color-lighter: #ebeef5;
42
+ --ts-border-color-extra-light: #f2f6fc;
43
+
44
+ /* 填充色 */
45
+ --ts-fill-color: #f2f3f5;
46
+ --ts-fill-color-light: #f5f7fa;
47
+ --ts-fill-color-lighter: #fafafa;
48
+ --ts-fill-color-blank: #ffffff;
49
+
50
+ /* 背景色 */
51
+ --ts-bg-color: #ffffff;
52
+ --ts-bg-color-page: #f2f3f5;
53
+ --ts-mask-color: rgba(0, 0, 0, 0.5);
54
+
55
+ /* 字体大小 */
56
+ --ts-font-size-extra-large: 20px;
57
+ --ts-font-size-large: 18px;
58
+ --ts-font-size-medium: 16px;
59
+ --ts-font-size-base: 14px;
60
+ --ts-font-size-small: 13px;
61
+ --ts-font-size-extra-small: 12px;
62
+
63
+ /* 圆角 */
64
+ --ts-border-radius-base: 4px;
65
+ --ts-border-radius-small: 2px;
66
+ --ts-border-radius-round: 20px;
67
+ --ts-border-radius-circle: 100%;
68
+
69
+ /* 阴影 */
70
+ --ts-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
71
+ --ts-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
72
+ --ts-box-shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.12);
73
+
74
+ /* 过渡 */
75
+ --ts-transition-duration: 0.3s;
76
+ --ts-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
77
+
78
+ /* 尺寸 */
79
+ --ts-component-size-large: 40px;
80
+ --ts-component-size-base: 32px;
81
+ --ts-component-size-small: 24px;
82
+
83
+ /* 命名空间 */
84
+ --ts-namespace: 'ts';
85
+ }
86
+
87
+ /* 暗黑主题 */
88
+ html.dark {
89
+ --ts-text-color-primary: #e5eaf3;
90
+ --ts-text-color-regular: #cfd3dc;
91
+ --ts-text-color-secondary: #a3a6ad;
92
+ --ts-text-color-placeholder: #8d9095;
93
+ --ts-text-color-disabled: #6c6e72;
94
+
95
+ --ts-border-color: #414243;
96
+ --ts-border-color-light: #363637;
97
+ --ts-border-color-lighter: #2c2c2d;
98
+ --ts-border-color-extra-light: #262727;
99
+
100
+ --ts-fill-color: #303233;
101
+ --ts-fill-color-light: #262727;
102
+ --ts-fill-color-lighter: #1d1e1f;
103
+ --ts-fill-color-blank: #141414;
104
+
105
+ --ts-bg-color: #141414;
106
+ --ts-bg-color-page: #0a0a0a;
107
+
108
+ --ts-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
109
+ --ts-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
110
+ --ts-box-shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.6);
111
+ }
112
+ /**
113
+ * TSElement 主题变量
114
+ * 使用 CSS 变量 + SCSS 变量双重支持
115
+ * 参考 Element Plus 设计 token,统一收敛
116
+ */
117
+ /**
118
+ * TSElement - Image 图片 组件样式
119
+ */
120
+ .ts-image {
121
+ position: relative;
122
+ display: inline-block;
123
+ overflow: hidden;
124
+ vertical-align: middle;
125
+ }
126
+ .ts-image__inner {
127
+ display: block;
128
+ width: 100%;
129
+ height: 100%;
130
+ }
131
+ .ts-image__placeholder, .ts-image__error {
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: center;
135
+ width: 100%;
136
+ height: 100%;
137
+ min-height: 32px;
138
+ color: #909399;
139
+ font-size: 12px;
140
+ background-color: #f5f7fa;
141
+ }
142
+ .ts-image--previewable .ts-image__inner {
143
+ cursor: pointer;
144
+ }
145
+ .ts-image--loading .ts-image__inner {
146
+ opacity: 0;
147
+ }
148
+
149
+ .ts-image-preview {
150
+ position: fixed;
151
+ inset: 0;
152
+ z-index: 3000;
153
+ display: flex;
154
+ align-items: center;
155
+ justify-content: center;
156
+ overflow: hidden;
157
+ }
158
+ .ts-image-preview__mask {
159
+ position: absolute;
160
+ inset: 0;
161
+ background-color: rgba(0, 0, 0, 0.75);
162
+ }
163
+ .ts-image-preview__img {
164
+ position: relative;
165
+ max-width: 90%;
166
+ max-height: 90%;
167
+ transition: transform 0.3s ease;
168
+ user-select: none;
169
+ }
170
+ .ts-image-preview__close {
171
+ position: absolute;
172
+ top: 20px;
173
+ right: 24px;
174
+ z-index: 2;
175
+ width: 40px;
176
+ height: 40px;
177
+ padding: 0;
178
+ font-size: 28px;
179
+ line-height: 1;
180
+ color: #fff;
181
+ cursor: pointer;
182
+ background: transparent;
183
+ border: 0;
184
+ border-radius: 100%;
185
+ }
186
+ .ts-image-preview__close:hover {
187
+ background-color: rgba(255, 255, 255, 0.15);
188
+ }
189
+ .ts-image-preview__arrow {
190
+ position: absolute;
191
+ top: 50%;
192
+ z-index: 2;
193
+ width: 44px;
194
+ height: 44px;
195
+ padding: 0;
196
+ font-size: 22px;
197
+ color: #fff;
198
+ cursor: pointer;
199
+ background: rgba(0, 0, 0, 0.3);
200
+ border: 0;
201
+ border-radius: 100%;
202
+ transform: translateY(-50%);
203
+ }
204
+ .ts-image-preview__arrow:hover {
205
+ background-color: rgba(0, 0, 0, 0.5);
206
+ }
207
+ .ts-image-preview__arrow--prev {
208
+ left: 24px;
209
+ }
210
+ .ts-image-preview__arrow--next {
211
+ right: 24px;
212
+ }
213
+ .ts-image-preview__indicator {
214
+ position: absolute;
215
+ bottom: 24px;
216
+ z-index: 2;
217
+ padding: 2px 10px;
218
+ font-size: 13px;
219
+ color: #fff;
220
+ background-color: rgba(0, 0, 0, 0.4);
221
+ border-radius: 20px;
222
+ }
223
+ .ts-image-preview__actions {
224
+ position: absolute;
225
+ top: 20px;
226
+ left: 50%;
227
+ z-index: 2;
228
+ display: flex;
229
+ gap: 8px;
230
+ align-items: center;
231
+ padding: 4px 10px;
232
+ background-color: rgba(0, 0, 0, 0.4);
233
+ border-radius: 20px;
234
+ transform: translateX(-50%);
235
+ }
236
+ .ts-image-preview__actions button {
237
+ width: 28px;
238
+ height: 28px;
239
+ padding: 0;
240
+ font-size: 16px;
241
+ line-height: 1;
242
+ color: #fff;
243
+ cursor: pointer;
244
+ background: transparent;
245
+ border: 0;
246
+ border-radius: 100%;
247
+ }
248
+ .ts-image-preview__actions button:hover {
249
+ background-color: rgba(255, 255, 255, 0.2);
250
+ }
251
+ .ts-image-preview__scale {
252
+ min-width: 44px;
253
+ font-size: 12px;
254
+ color: #fff;
255
+ text-align: center;
256
+ }
@@ -0,0 +1,196 @@
1
+ @charset "UTF-8";
2
+ /**
3
+ * CSS 变量 - 运行时主题切换支持
4
+ */
5
+
6
+ :root {
7
+ /* 主色 */
8
+ --ts-color-primary: #409eff;
9
+ --ts-color-primary-light-1: #ecf5ff;
10
+ --ts-color-primary-light-2: #d9ecff;
11
+ --ts-color-primary-light-3: #bedaff;
12
+ --ts-color-primary-light-4: #9ec5fe;
13
+ --ts-color-primary-light-5: #79bbff;
14
+ --ts-color-primary-light-6: #a0cfff;
15
+ --ts-color-primary-light-7: #66b1ff;
16
+ --ts-color-primary-light-8: #409eff;
17
+ --ts-color-primary-light-9: #337ecc;
18
+
19
+ /* 功能色 */
20
+ --ts-color-success: #67c23a;
21
+ --ts-color-success-light: #e1f3d8;
22
+ --ts-color-warning: #e6a23c;
23
+ --ts-color-warning-light: #faecd8;
24
+ --ts-color-danger: #f56c6c;
25
+ --ts-color-danger-light: #fde2e2;
26
+ --ts-color-error: #f56c6c;
27
+ --ts-color-error-light: #fde2e2;
28
+ --ts-color-info: #909399;
29
+ --ts-color-info-light: #e9e9eb;
30
+
31
+ /* 文本色 */
32
+ --ts-text-color-primary: #303133;
33
+ --ts-text-color-regular: #606266;
34
+ --ts-text-color-secondary: #909399;
35
+ --ts-text-color-placeholder: #a8abb2;
36
+ --ts-text-color-disabled: #c0c4cc;
37
+
38
+ /* 边框色 */
39
+ --ts-border-color: #dcdfe6;
40
+ --ts-border-color-light: #e4e7ed;
41
+ --ts-border-color-lighter: #ebeef5;
42
+ --ts-border-color-extra-light: #f2f6fc;
43
+
44
+ /* 填充色 */
45
+ --ts-fill-color: #f2f3f5;
46
+ --ts-fill-color-light: #f5f7fa;
47
+ --ts-fill-color-lighter: #fafafa;
48
+ --ts-fill-color-blank: #ffffff;
49
+
50
+ /* 背景色 */
51
+ --ts-bg-color: #ffffff;
52
+ --ts-bg-color-page: #f2f3f5;
53
+ --ts-mask-color: rgba(0, 0, 0, 0.5);
54
+
55
+ /* 字体大小 */
56
+ --ts-font-size-extra-large: 20px;
57
+ --ts-font-size-large: 18px;
58
+ --ts-font-size-medium: 16px;
59
+ --ts-font-size-base: 14px;
60
+ --ts-font-size-small: 13px;
61
+ --ts-font-size-extra-small: 12px;
62
+
63
+ /* 圆角 */
64
+ --ts-border-radius-base: 4px;
65
+ --ts-border-radius-small: 2px;
66
+ --ts-border-radius-round: 20px;
67
+ --ts-border-radius-circle: 100%;
68
+
69
+ /* 阴影 */
70
+ --ts-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
71
+ --ts-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
72
+ --ts-box-shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.12);
73
+
74
+ /* 过渡 */
75
+ --ts-transition-duration: 0.3s;
76
+ --ts-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
77
+
78
+ /* 尺寸 */
79
+ --ts-component-size-large: 40px;
80
+ --ts-component-size-base: 32px;
81
+ --ts-component-size-small: 24px;
82
+
83
+ /* 命名空间 */
84
+ --ts-namespace: 'ts';
85
+ }
86
+
87
+ /* 暗黑主题 */
88
+ html.dark {
89
+ --ts-text-color-primary: #e5eaf3;
90
+ --ts-text-color-regular: #cfd3dc;
91
+ --ts-text-color-secondary: #a3a6ad;
92
+ --ts-text-color-placeholder: #8d9095;
93
+ --ts-text-color-disabled: #6c6e72;
94
+
95
+ --ts-border-color: #414243;
96
+ --ts-border-color-light: #363637;
97
+ --ts-border-color-lighter: #2c2c2d;
98
+ --ts-border-color-extra-light: #262727;
99
+
100
+ --ts-fill-color: #303233;
101
+ --ts-fill-color-light: #262727;
102
+ --ts-fill-color-lighter: #1d1e1f;
103
+ --ts-fill-color-blank: #141414;
104
+
105
+ --ts-bg-color: #141414;
106
+ --ts-bg-color-page: #0a0a0a;
107
+
108
+ --ts-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
109
+ --ts-box-shadow-light: 0 2px 12px 0 rgba(0, 0, 0, 0.5);
110
+ --ts-box-shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.6);
111
+ }
112
+ /**
113
+ * TSElement 主题变量
114
+ * 使用 CSS 变量 + SCSS 变量双重支持
115
+ * 参考 Element Plus 设计 token,统一收敛
116
+ */
117
+ /**
118
+ * TSElement - Mention 提及 组件样式
119
+ */
120
+ .ts-mention {
121
+ position: relative;
122
+ display: inline-block;
123
+ width: 100%;
124
+ }
125
+ .ts-mention__anchor {
126
+ position: absolute;
127
+ width: 0;
128
+ height: 0;
129
+ pointer-events: none;
130
+ }
131
+ .ts-mention__input {
132
+ width: 100%;
133
+ min-height: 80px;
134
+ padding: 8px 12px;
135
+ border: 1px solid var(--ts-border-color);
136
+ border-radius: 4px;
137
+ background-color: var(--ts-bg-color);
138
+ color: var(--ts-text-color-regular);
139
+ font-family: inherit;
140
+ font-size: 14px;
141
+ line-height: 1.6;
142
+ outline: none;
143
+ resize: vertical;
144
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
145
+ }
146
+ .ts-mention__input:focus {
147
+ border-color: var(--ts-color-primary);
148
+ }
149
+ .ts-mention__input:disabled {
150
+ background-color: var(--ts-fill-color-light);
151
+ cursor: not-allowed;
152
+ }
153
+ .ts-mention__clear {
154
+ position: absolute;
155
+ top: 10px;
156
+ right: 10px;
157
+ display: inline-flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ width: 16px;
161
+ height: 16px;
162
+ color: var(--ts-text-color-secondary);
163
+ cursor: pointer;
164
+ }
165
+ .ts-mention__clear:hover {
166
+ color: var(--ts-text-color-regular);
167
+ }
168
+ .ts-mention__popper {
169
+ position: fixed;
170
+ z-index: 2000;
171
+ background-color: var(--ts-bg-color);
172
+ border: 1px solid var(--ts-border-color-lighter);
173
+ border-radius: 4px;
174
+ box-shadow: var(--ts-box-shadow-light);
175
+ }
176
+
177
+ .ts-mention-panel__list {
178
+ min-width: 180px;
179
+ max-height: 220px;
180
+ margin: 0;
181
+ padding: 4px 0;
182
+ overflow-y: auto;
183
+ list-style: none;
184
+ }
185
+ .ts-mention-panel__item {
186
+ padding: 6px 12px;
187
+ font-size: 14px;
188
+ color: var(--ts-text-color-regular);
189
+ white-space: nowrap;
190
+ cursor: pointer;
191
+ transition: background-color 0.2s;
192
+ }
193
+ .ts-mention-panel__item:hover, .ts-mention-panel__item.is-active {
194
+ color: var(--ts-color-primary);
195
+ background-color: var(--ts-fill-color-light);
196
+ }
@@ -164,4 +164,22 @@ html.dark {
164
164
  }
165
165
  .ts-scrollbar__thumb:hover {
166
166
  background-color: rgba(144, 147, 153, 0.7);
167
+ }
168
+ .ts-scrollbar__bar--horizontal {
169
+ height: 6px;
170
+ left: 2px;
171
+ right: 2px;
172
+ bottom: 2px;
173
+ }
174
+ .ts-scrollbar__bar--vertical {
175
+ width: 6px;
176
+ top: 2px;
177
+ right: 2px;
178
+ bottom: 2px;
179
+ }
180
+ .ts-scrollbar__bar.is-always, .ts-scrollbar.is-dragging .ts-scrollbar__bar, .ts-scrollbar:hover .ts-scrollbar__bar {
181
+ opacity: 1;
182
+ }
183
+ .ts-scrollbar__thumb.is-always {
184
+ opacity: 1;
167
185
  }
@@ -166,6 +166,27 @@ html.dark {
166
166
  z-index: 1000;
167
167
  padding: 6px 0;
168
168
  }
169
+ .ts-select__tags {
170
+ position: relative;
171
+ }
172
+ .ts-select__collapse-tag {
173
+ cursor: default;
174
+ }
175
+ .ts-select__tags-tooltip {
176
+ position: absolute;
177
+ top: 100%;
178
+ left: 0;
179
+ margin-top: 6px;
180
+ padding: 6px 10px;
181
+ white-space: nowrap;
182
+ font-size: 13px;
183
+ color: var(--ts-text-color-regular);
184
+ background-color: var(--ts-bg-color);
185
+ border: 1px solid var(--ts-border-color-lighter);
186
+ border-radius: 4px;
187
+ box-shadow: var(--ts-box-shadow-light);
188
+ z-index: 1001;
189
+ }
169
190
  .ts-select__option {
170
191
  padding: 9px 16px;
171
192
  font-size: 14px;