@ew-color-picker/style 2.0.14 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.css +321 -107
- package/dist/all.min.css +1 -1
- package/dist/button.css +55 -21
- package/dist/button.min.css +1 -1
- package/dist/checkbox.css +29 -11
- package/dist/checkbox.min.css +1 -1
- package/dist/index.css +118 -13
- package/dist/index.min.css +1 -1
- package/dist/input-number.css +27 -27
- package/dist/input-number.min.css +1 -1
- package/dist/input.css +51 -10
- package/dist/input.min.css +1 -1
- package/dist/select.css +32 -20
- package/dist/select.min.css +1 -1
- package/dist/tooltip.css +10 -5
- package/dist/tooltip.min.css +1 -1
- package/package.json +1 -1
- package/src/button.scss +57 -21
- package/src/checkbox.scss +30 -11
- package/src/index.scss +145 -13
- package/src/input-number.scss +27 -27
- package/src/input.scss +52 -10
- package/src/select.scss +33 -20
- package/src/tooltip.scss +12 -5
package/dist/input.css
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
height: 32px;
|
|
4
4
|
padding: 0 11px;
|
|
5
5
|
box-sizing: border-box;
|
|
6
|
-
border: 1px solid #dcdfe6;
|
|
6
|
+
border: 1px solid var(--ewcp-color-border, #dcdfe6);
|
|
7
7
|
border-radius: var(--input-radius, 4px);
|
|
8
|
-
background: #fff;
|
|
9
|
-
color: #303133;
|
|
8
|
+
background: var(--ewcp-color-bg, #fff);
|
|
9
|
+
color: var(--ewcp-color-text, #303133);
|
|
10
10
|
font-family: inherit;
|
|
11
11
|
font-size: 14px;
|
|
12
12
|
line-height: 1.5;
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.ew-input:hover {
|
|
18
|
-
border-color: #c0c4cc;
|
|
18
|
+
border-color: var(--ewcp-color-border-hover, #c0c4cc);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.ew-input:focus {
|
|
22
|
-
border-color: #4096ef;
|
|
22
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
23
23
|
box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.12);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.ew-input::placeholder {
|
|
27
|
-
color: #a8abb2;
|
|
27
|
+
color: var(--ewcp-color-text-tertiary, #a8abb2);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.ew-input--small {
|
|
@@ -41,13 +41,54 @@
|
|
|
41
41
|
|
|
42
42
|
.ew-input:disabled,
|
|
43
43
|
.ew-input--disabled {
|
|
44
|
-
border-color: #e4e7ed;
|
|
45
|
-
background: #f5f7fa;
|
|
46
|
-
color: #c0c4cc;
|
|
44
|
+
border-color: var(--ewcp-color-border-light, #e4e7ed);
|
|
45
|
+
background: var(--ewcp-color-bg-disabled, #f5f7fa);
|
|
46
|
+
color: var(--ewcp-color-border-hover, #c0c4cc);
|
|
47
47
|
cursor: not-allowed;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.ew-input--readonly {
|
|
51
|
-
background: #fafafa;
|
|
51
|
+
background: var(--ewcp-color-bg-secondary, #fafafa);
|
|
52
52
|
cursor: default;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ew-input-wrapper {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ew-input-wrapper > .ew-input {
|
|
63
|
+
padding-right: 30px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.ew-input__clear {
|
|
67
|
+
position: absolute;
|
|
68
|
+
right: 8px;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: 16px;
|
|
73
|
+
height: 16px;
|
|
74
|
+
padding: 0;
|
|
75
|
+
border: 0;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
background: var(--ewcp-color-border-hover, #c0c4cc);
|
|
78
|
+
color: var(--ewcp-color-bg, #fff);
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ew-input__clear:hover {
|
|
83
|
+
background: var(--ewcp-color-info, #909399);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ew-input__clear--hidden {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ew-input__clear-icon {
|
|
91
|
+
display: block;
|
|
92
|
+
width: 10px;
|
|
93
|
+
height: 10px;
|
|
53
94
|
}
|
package/dist/input.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ew-input{width:100%;height:32px;padding:0 11px;box-sizing:border-box;border:1px solid #dcdfe6;border-radius:var(--input-radius, 4px);background
|
|
1
|
+
.ew-input{width:100%;height:32px;padding:0 11px;box-sizing:border-box;border:1px solid var(--ewcp-color-border, #dcdfe6);border-radius:var(--input-radius, 4px);background:var(--ewcp-color-bg, #fff);color:var(--ewcp-color-text, #303133);font-family:inherit;font-size:14px;line-height:1.5;outline:none;transition:border-color .2s,box-shadow .2s}.ew-input:hover{border-color:var(--ewcp-color-border-hover, #c0c4cc)}.ew-input:focus{border-color:var(--ewcp-color-primary, #4096ef);box-shadow:0 0 0 2px rgba(64,150,239,.12)}.ew-input::placeholder{color:var(--ewcp-color-text-tertiary, #a8abb2)}.ew-input--small{height:28px;padding:0 9px;font-size:12px}.ew-input--large{height:36px;padding:0 13px;font-size:14px}.ew-input:disabled,.ew-input--disabled{border-color:var(--ewcp-color-border-light, #e4e7ed);background:var(--ewcp-color-bg-disabled, #f5f7fa);color:var(--ewcp-color-border-hover, #c0c4cc);cursor:not-allowed}.ew-input--readonly{background:var(--ewcp-color-bg-secondary, #fafafa);cursor:default}.ew-input-wrapper{position:relative;display:inline-flex;align-items:center;width:100%}.ew-input-wrapper>.ew-input{padding-right:30px}.ew-input__clear{position:absolute;right:8px;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:var(--ewcp-color-border-hover, #c0c4cc);color:var(--ewcp-color-bg, #fff);cursor:pointer}.ew-input__clear:hover{background:var(--ewcp-color-info, #909399)}.ew-input__clear--hidden{display:none}.ew-input__clear-icon{display:block;width:10px;height:10px}
|
package/dist/select.css
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
height: var(--select-height, 32px);
|
|
18
18
|
padding: var(--select-padding, 0 10px);
|
|
19
|
-
border: var(--select-border-width, 1.5px) solid #d9d9d9;
|
|
19
|
+
border: var(--select-border-width, 1.5px) solid var(--ewcp-color-border, #d9d9d9);
|
|
20
20
|
border-radius: var(--select-radius, 8px);
|
|
21
|
-
background: #fff;
|
|
22
|
-
color: #222;
|
|
21
|
+
background: var(--ewcp-color-bg, #fff);
|
|
22
|
+
color: var(--ewcp-color-text, #222);
|
|
23
23
|
font-family: inherit;
|
|
24
24
|
font-size: var(--select-font-size, 14px);
|
|
25
25
|
line-height: 1;
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
|
|
32
32
|
.ew-select__trigger:focus {
|
|
33
33
|
outline: none;
|
|
34
|
-
border-color: #4096ef;
|
|
34
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.ew-select--open .ew-select__trigger {
|
|
38
|
-
border-color: #4096ef;
|
|
38
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.ew-select__value {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.ew-select__value--placeholder {
|
|
50
|
-
color: #999;
|
|
50
|
+
color: var(--ewcp-color-text-tertiary, #999);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/* 富内容(节点 / HTML):图标与文字水平居中对齐 */
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
flex: 0 0 var(--select-clear-size, 12px);
|
|
65
65
|
width: var(--select-clear-size, 12px);
|
|
66
66
|
height: var(--select-clear-size, 12px);
|
|
67
|
-
color: #999;
|
|
67
|
+
color: var(--ewcp-color-text-tertiary, #999);
|
|
68
68
|
border-radius: 50%;
|
|
69
69
|
cursor: pointer;
|
|
70
70
|
transition: color 0.15s;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.ew-select__clear:hover {
|
|
74
|
-
color: #666;
|
|
74
|
+
color: var(--ewcp-color-text-secondary, #666);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.ew-select__clear--hidden {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
flex: 0 0 var(--select-arrow-size, 12px);
|
|
93
93
|
width: var(--select-arrow-size, 12px);
|
|
94
94
|
height: var(--select-arrow-size, 12px);
|
|
95
|
-
color: #999;
|
|
95
|
+
color: var(--ewcp-color-text-tertiary, #999);
|
|
96
96
|
transition: transform 0.2s;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -112,15 +112,15 @@
|
|
|
112
112
|
top: calc(100% + 4px);
|
|
113
113
|
left: 0;
|
|
114
114
|
right: 0;
|
|
115
|
-
z-index: 3;
|
|
115
|
+
z-index: var(--ewcp-z-popper, 3);
|
|
116
116
|
display: none;
|
|
117
117
|
max-height: 200px;
|
|
118
118
|
overflow-y: auto;
|
|
119
119
|
padding: 4px;
|
|
120
|
-
border: 1px solid #e5e6eb;
|
|
120
|
+
border: 1px solid var(--ewcp-color-border-light, #e5e6eb);
|
|
121
121
|
border-radius: 8px;
|
|
122
|
-
background: #fff;
|
|
123
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
122
|
+
background: var(--ewcp-color-bg, #fff);
|
|
123
|
+
box-shadow: var(--ewcp-shadow-popper, 0 4px 16px rgba(0, 0, 0, 0.12));
|
|
124
124
|
box-sizing: border-box;
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -128,10 +128,22 @@
|
|
|
128
128
|
display: block;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
.ew-select__dropdown--open {
|
|
132
|
+
display: block;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.ew-select__empty,
|
|
136
|
+
.ew-select__loading {
|
|
137
|
+
padding: 8px 10px;
|
|
138
|
+
color: var(--ewcp-color-text-tertiary, #999);
|
|
139
|
+
font-size: 13px;
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
131
143
|
.ew-select__option {
|
|
132
144
|
padding: 6px 10px;
|
|
133
145
|
border-radius: 6px;
|
|
134
|
-
color: #333;
|
|
146
|
+
color: var(--ewcp-color-text, #333);
|
|
135
147
|
font-size: 13px;
|
|
136
148
|
line-height: 20px;
|
|
137
149
|
white-space: nowrap;
|
|
@@ -150,16 +162,16 @@
|
|
|
150
162
|
|
|
151
163
|
.ew-select__option:hover,
|
|
152
164
|
.ew-select__option--active {
|
|
153
|
-
background: #f0f8ff;
|
|
165
|
+
background: var(--ewcp-color-bg-hover, #f0f8ff);
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
.ew-select__option--selected {
|
|
157
|
-
color: #4096ef;
|
|
169
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
158
170
|
font-weight: 500;
|
|
159
171
|
}
|
|
160
172
|
|
|
161
173
|
.ew-select__option--disabled {
|
|
162
|
-
color: #ccc;
|
|
174
|
+
color: var(--ewcp-color-text-disabled, #ccc);
|
|
163
175
|
background: transparent;
|
|
164
176
|
cursor: not-allowed;
|
|
165
177
|
}
|
|
@@ -169,9 +181,9 @@
|
|
|
169
181
|
}
|
|
170
182
|
|
|
171
183
|
.ew-select--disabled .ew-select__trigger {
|
|
172
|
-
border-color: #e5e6eb;
|
|
173
|
-
background: #f7f8fa;
|
|
174
|
-
color: #ccc;
|
|
184
|
+
border-color: var(--ewcp-color-border-light, #e5e6eb);
|
|
185
|
+
background: var(--ewcp-color-bg-disabled, #f7f8fa);
|
|
186
|
+
color: var(--ewcp-color-text-disabled, #ccc);
|
|
175
187
|
cursor: not-allowed;
|
|
176
188
|
}
|
|
177
189
|
|
package/dist/select.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ew-select{position:relative;display:inline-block;width:100%;min-width:0;font-family:inherit;box-sizing:border-box}.ew-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;height:var(--select-height, 32px);padding:var(--select-padding, 0 10px);border:var(--select-border-width, 1.5px) solid #d9d9d9;border-radius:var(--select-radius, 8px);background
|
|
1
|
+
.ew-select{position:relative;display:inline-block;width:100%;min-width:0;font-family:inherit;box-sizing:border-box}.ew-select__trigger{display:flex;align-items:center;justify-content:space-between;gap:4px;width:100%;height:var(--select-height, 32px);padding:var(--select-padding, 0 10px);border:var(--select-border-width, 1.5px) solid var(--ewcp-color-border, #d9d9d9);border-radius:var(--select-radius, 8px);background:var(--ewcp-color-bg, #fff);color:var(--ewcp-color-text, #222);font-family:inherit;font-size:var(--select-font-size, 14px);line-height:1;text-align:left;cursor:pointer;box-sizing:border-box;transition:border-color .2s}.ew-select__trigger:focus{outline:none;border-color:var(--ewcp-color-primary, #4096ef)}.ew-select--open .ew-select__trigger{border-color:var(--ewcp-color-primary, #4096ef)}.ew-select__value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ew-select__value--placeholder{color:var(--ewcp-color-text-tertiary, #999)}.ew-select__value--rich{display:inline-flex;align-items:center;gap:6px}.ew-select__clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 var(--select-clear-size, 12px);width:var(--select-clear-size, 12px);height:var(--select-clear-size, 12px);color:var(--ewcp-color-text-tertiary, #999);border-radius:50%;cursor:pointer;transition:color .15s}.ew-select__clear:hover{color:var(--ewcp-color-text-secondary, #666)}.ew-select__clear--hidden{display:none}.ew-select__clear-icon{display:block;width:var(--select-clear-size, 12px);height:var(--select-clear-size, 12px);pointer-events:none}.ew-select__arrow{display:flex;align-items:center;justify-content:center;flex:0 0 var(--select-arrow-size, 12px);width:var(--select-arrow-size, 12px);height:var(--select-arrow-size, 12px);color:var(--ewcp-color-text-tertiary, #999);transition:transform .2s}.ew-select--open .ew-select__arrow{transform:rotate(180deg)}.ew-select__arrow-icon{display:block;width:var(--select-arrow-size, 12px);height:var(--select-arrow-size, 12px);pointer-events:none}.ew-select__dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:var(--ewcp-z-popper, 3);display:none;max-height:200px;overflow-y:auto;padding:4px;border:1px solid var(--ewcp-color-border-light, #e5e6eb);border-radius:8px;background:var(--ewcp-color-bg, #fff);box-shadow:var(--ewcp-shadow-popper, 0 4px 16px rgba(0, 0, 0, 0.12));box-sizing:border-box}.ew-select--open .ew-select__dropdown{display:block}.ew-select__dropdown--open{display:block}.ew-select__empty,.ew-select__loading{padding:8px 10px;color:var(--ewcp-color-text-tertiary, #999);font-size:13px;text-align:center}.ew-select__option{padding:6px 10px;border-radius:6px;color:var(--ewcp-color-text, #333);font-size:13px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;transition:background .15s}.ew-select__option--rich{display:flex;align-items:center;gap:6px;text-overflow:clip}.ew-select__option:hover,.ew-select__option--active{background:var(--ewcp-color-bg-hover, #f0f8ff)}.ew-select__option--selected{color:var(--ewcp-color-primary, #4096ef);font-weight:500}.ew-select__option--disabled{color:var(--ewcp-color-text-disabled, #ccc);background:rgba(0,0,0,0);cursor:not-allowed}.ew-select--disabled{cursor:not-allowed}.ew-select--disabled .ew-select__trigger{border-color:var(--ewcp-color-border-light, #e5e6eb);background:var(--ewcp-color-bg-disabled, #f7f8fa);color:var(--ewcp-color-text-disabled, #ccc);cursor:not-allowed}.ew-select--small .ew-select__trigger{height:24px;padding:0 8px;font-size:12px;border-radius:6px}.ew-select--small .ew-select__option{padding:4px 8px;font-size:12px}.ew-select--large .ew-select__trigger{height:40px;padding:0 12px;font-size:15px}.ew-select--large .ew-select__option{padding:8px 12px;font-size:14px}
|
package/dist/tooltip.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.ew-tooltip {
|
|
2
2
|
position: fixed;
|
|
3
|
-
z-index: 3000;
|
|
3
|
+
z-index: var(--ewcp-z-tooltip, 3000);
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
max-width: var(--ew-tooltip-max-width, none);
|
|
6
6
|
padding: 5px 10px;
|
|
@@ -24,12 +24,17 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.ew-tooltip--light {
|
|
27
|
-
--ew-tooltip-bg: #fff;
|
|
28
|
-
--ew-tooltip-color: #303133;
|
|
29
|
-
--ew-tooltip-border-color: #e4e7ed;
|
|
30
|
-
--ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
|
27
|
+
--ew-tooltip-bg: var(--ewcp-color-bg, #fff);
|
|
28
|
+
--ew-tooltip-color: var(--ewcp-color-text, #303133);
|
|
29
|
+
--ew-tooltip-border-color: var(--ewcp-color-border-light, #e4e7ed);
|
|
30
|
+
--ew-tooltip-shadow: var(--ewcp-shadow-popper, 0 2px 12px rgba(0, 0, 0, 0.1));
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
@media (prefers-reduced-motion: reduce) {
|
|
34
|
+
.ew-tooltip {
|
|
35
|
+
transition: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
33
38
|
.ew-tooltip--dark,
|
|
34
39
|
.ew-tooltip--light {
|
|
35
40
|
background: var(--ew-tooltip-bg);
|
package/dist/tooltip.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ew-tooltip{position:fixed;z-index:3000;box-sizing:border-box;max-width:var(--ew-tooltip-max-width, none);padding:5px 10px;border-radius:4px;font-family:inherit;font-size:12px;line-height:1.4;text-align:left;word-break:break-word;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.ew-tooltip--dark{--ew-tooltip-bg: #303133;--ew-tooltip-color: #fff;--ew-tooltip-border-color: transparent;--ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.2)}.ew-tooltip--light{--ew-tooltip-bg: #fff;--ew-tooltip-color: #303133;--ew-tooltip-border-color: #e4e7ed;--ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.1)}.ew-tooltip--dark,.ew-tooltip--light{background:var(--ew-tooltip-bg);color:var(--ew-tooltip-color);border:1px solid var(--ew-tooltip-border-color);box-shadow:var(--ew-tooltip-shadow)}.ew-tooltip--visible{opacity:1;visibility:visible}.ew-tooltip--enterable{pointer-events:auto}.ew-tooltip__content{display:block}.ew-tooltip__arrow{position:absolute;width:8px;height:8px;box-sizing:border-box;background:inherit;border:1px solid rgba(0,0,0,0);border-color:rgba(0,0,0,0);transform:rotate(45deg);pointer-events:none;z-index:-1}.ew-tooltip[data-placement^=top] .ew-tooltip__arrow{border-right-color:var(--ew-tooltip-border-color);border-bottom-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=bottom] .ew-tooltip__arrow{border-left-color:var(--ew-tooltip-border-color);border-top-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=left] .ew-tooltip__arrow{border-top-color:var(--ew-tooltip-border-color);border-right-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=right] .ew-tooltip__arrow{border-left-color:var(--ew-tooltip-border-color);border-bottom-color:var(--ew-tooltip-border-color)}
|
|
1
|
+
.ew-tooltip{position:fixed;z-index:var(--ewcp-z-tooltip, 3000);box-sizing:border-box;max-width:var(--ew-tooltip-max-width, none);padding:5px 10px;border-radius:4px;font-family:inherit;font-size:12px;line-height:1.4;text-align:left;word-break:break-word;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.ew-tooltip--dark{--ew-tooltip-bg: #303133;--ew-tooltip-color: #fff;--ew-tooltip-border-color: transparent;--ew-tooltip-shadow: 0 2px 12px rgba(0, 0, 0, 0.2)}.ew-tooltip--light{--ew-tooltip-bg: var(--ewcp-color-bg, #fff);--ew-tooltip-color: var(--ewcp-color-text, #303133);--ew-tooltip-border-color: var(--ewcp-color-border-light, #e4e7ed);--ew-tooltip-shadow: var(--ewcp-shadow-popper, 0 2px 12px rgba(0, 0, 0, 0.1))}@media(prefers-reduced-motion: reduce){.ew-tooltip{transition:none}}.ew-tooltip--dark,.ew-tooltip--light{background:var(--ew-tooltip-bg);color:var(--ew-tooltip-color);border:1px solid var(--ew-tooltip-border-color);box-shadow:var(--ew-tooltip-shadow)}.ew-tooltip--visible{opacity:1;visibility:visible}.ew-tooltip--enterable{pointer-events:auto}.ew-tooltip__content{display:block}.ew-tooltip__arrow{position:absolute;width:8px;height:8px;box-sizing:border-box;background:inherit;border:1px solid rgba(0,0,0,0);border-color:rgba(0,0,0,0);transform:rotate(45deg);pointer-events:none;z-index:-1}.ew-tooltip[data-placement^=top] .ew-tooltip__arrow{border-right-color:var(--ew-tooltip-border-color);border-bottom-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=bottom] .ew-tooltip__arrow{border-left-color:var(--ew-tooltip-border-color);border-top-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=left] .ew-tooltip__arrow{border-top-color:var(--ew-tooltip-border-color);border-right-color:var(--ew-tooltip-border-color)}.ew-tooltip[data-placement^=right] .ew-tooltip__arrow{border-left-color:var(--ew-tooltip-border-color);border-bottom-color:var(--ew-tooltip-border-color)}
|
package/package.json
CHANGED
package/src/button.scss
CHANGED
|
@@ -10,10 +10,10 @@ $prefix: "ew-" !default;
|
|
|
10
10
|
height: 32px;
|
|
11
11
|
padding: 0 15px;
|
|
12
12
|
box-sizing: border-box;
|
|
13
|
-
border: 1px solid #dcdfe6;
|
|
13
|
+
border: 1px solid var(--ewcp-color-border, #dcdfe6);
|
|
14
14
|
border-radius: var(--btn-radius, 4px);
|
|
15
|
-
background: #fff;
|
|
16
|
-
color: #606266;
|
|
15
|
+
background: var(--ewcp-color-bg, #fff);
|
|
16
|
+
color: var(--ewcp-color-text-secondary, #606266);
|
|
17
17
|
font-family: inherit;
|
|
18
18
|
font-size: 14px;
|
|
19
19
|
line-height: 1;
|
|
@@ -24,44 +24,80 @@ $prefix: "ew-" !default;
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.#{$prefix}button:hover {
|
|
27
|
-
border-color: #4096ef;
|
|
28
|
-
color: #4096ef;
|
|
27
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
28
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.#{$prefix}button--primary {
|
|
32
|
-
border-color: #4096ef;
|
|
33
|
-
background: #4096ef;
|
|
34
|
-
color: #fff;
|
|
32
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
33
|
+
background: var(--ewcp-color-primary, #4096ef);
|
|
34
|
+
color: var(--ewcp-color-bg, #fff);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.#{$prefix}button--primary:hover {
|
|
38
|
-
border-color: #66b1ff;
|
|
39
|
-
background: #66b1ff;
|
|
40
|
-
color: #fff;
|
|
38
|
+
border-color: var(--ewcp-color-primary-hover, #66b1ff);
|
|
39
|
+
background: var(--ewcp-color-primary-hover, #66b1ff);
|
|
40
|
+
color: var(--ewcp-color-bg, #fff);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.#{$prefix}button--danger {
|
|
44
|
-
border-color: #f56c6c;
|
|
45
|
-
background: #f56c6c;
|
|
46
|
-
color: #fff;
|
|
44
|
+
border-color: var(--ewcp-color-danger, #f56c6c);
|
|
45
|
+
background: var(--ewcp-color-danger, #f56c6c);
|
|
46
|
+
color: var(--ewcp-color-bg, #fff);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.#{$prefix}button--danger:hover {
|
|
50
50
|
border-color: #f78989;
|
|
51
51
|
background: #f78989;
|
|
52
|
-
color: #fff;
|
|
52
|
+
color: var(--ewcp-color-bg, #fff);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.#{$prefix}button--text {
|
|
56
56
|
border-color: transparent;
|
|
57
57
|
background: transparent;
|
|
58
|
-
color: #4096ef;
|
|
58
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.#{$prefix}button--text:hover {
|
|
62
62
|
border-color: transparent;
|
|
63
63
|
background: transparent;
|
|
64
|
-
color: #66b1ff;
|
|
64
|
+
color: var(--ewcp-color-primary-hover, #66b1ff);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ghost:描边风格,透明底
|
|
68
|
+
.#{$prefix}button--ghost {
|
|
69
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
70
|
+
background: transparent;
|
|
71
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.#{$prefix}button--ghost:hover {
|
|
75
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
76
|
+
background: rgba(64, 150, 239, 0.08);
|
|
77
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// link:纯文字链接风格
|
|
81
|
+
.#{$prefix}button--link {
|
|
82
|
+
border-color: transparent;
|
|
83
|
+
background: transparent;
|
|
84
|
+
color: var(--ewcp-color-primary, #4096ef);
|
|
85
|
+
text-decoration: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$prefix}button--link:hover {
|
|
89
|
+
border-color: transparent;
|
|
90
|
+
background: transparent;
|
|
91
|
+
color: var(--ewcp-color-primary-hover, #66b1ff);
|
|
92
|
+
text-decoration: underline;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
a.#{$prefix}button {
|
|
96
|
+
text-decoration: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
a.#{$prefix}button--disabled {
|
|
100
|
+
pointer-events: none;
|
|
65
101
|
}
|
|
66
102
|
|
|
67
103
|
.#{$prefix}button--small {
|
|
@@ -83,9 +119,9 @@ $prefix: "ew-" !default;
|
|
|
83
119
|
|
|
84
120
|
.#{$prefix}button:disabled,
|
|
85
121
|
.#{$prefix}button--disabled {
|
|
86
|
-
border-color: #e4e7ed;
|
|
87
|
-
background: #f5f7fa;
|
|
88
|
-
color: #c0c4cc;
|
|
122
|
+
border-color: var(--ewcp-color-border-light, #e4e7ed);
|
|
123
|
+
background: var(--ewcp-color-bg-disabled, #f5f7fa);
|
|
124
|
+
color: var(--ewcp-color-text-disabled, #c0c4cc);
|
|
89
125
|
cursor: not-allowed;
|
|
90
126
|
}
|
|
91
127
|
|
|
@@ -93,5 +129,5 @@ $prefix: "ew-" !default;
|
|
|
93
129
|
.#{$prefix}button--danger:disabled {
|
|
94
130
|
border-color: #a0cfff;
|
|
95
131
|
background: #a0cfff;
|
|
96
|
-
color: #fff;
|
|
132
|
+
color: var(--ewcp-color-bg, #fff);
|
|
97
133
|
}
|
package/src/checkbox.scss
CHANGED
|
@@ -7,7 +7,7 @@ $prefix: "ew-" !default;
|
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
gap: var(--checkbox-gap, 6px);
|
|
10
|
-
color: #666;
|
|
10
|
+
color: var(--ewcp-color-text-secondary, #666);
|
|
11
11
|
font-family: inherit;
|
|
12
12
|
font-size: var(--checkbox-font-size, 12px);
|
|
13
13
|
line-height: 1;
|
|
@@ -46,9 +46,9 @@ $prefix: "ew-" !default;
|
|
|
46
46
|
flex: 0 0 var(--checkbox-box-size, 16px);
|
|
47
47
|
width: var(--checkbox-box-size, 16px);
|
|
48
48
|
height: var(--checkbox-box-size, 16px);
|
|
49
|
-
border: var(--checkbox-border-width, 1.5px) solid #d9d9d9;
|
|
49
|
+
border: var(--checkbox-border-width, 1.5px) solid var(--ewcp-color-checkbox-border, #d9d9d9);
|
|
50
50
|
border-radius: var(--checkbox-box-radius, 4px);
|
|
51
|
-
background: #fff;
|
|
51
|
+
background: var(--ewcp-color-bg, #fff);
|
|
52
52
|
box-sizing: border-box;
|
|
53
53
|
transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
|
|
54
54
|
}
|
|
@@ -57,15 +57,15 @@ $prefix: "ew-" !default;
|
|
|
57
57
|
display: block;
|
|
58
58
|
width: var(--checkbox-icon-size, 10px);
|
|
59
59
|
height: var(--checkbox-icon-size, 10px);
|
|
60
|
-
color: #fff;
|
|
60
|
+
color: var(--ewcp-color-bg, #fff);
|
|
61
61
|
opacity: 0;
|
|
62
62
|
pointer-events: none;
|
|
63
63
|
transition: opacity 0.15s;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.#{$prefix}checkbox__input:checked + .#{$prefix}checkbox__box {
|
|
67
|
-
border-color: #4096ef;
|
|
68
|
-
background: #4096ef;
|
|
67
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
68
|
+
background: var(--ewcp-color-primary, #4096ef);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.#{$prefix}checkbox__input:checked + .#{$prefix}checkbox__box .#{$prefix}checkbox__check-icon {
|
|
@@ -76,19 +76,38 @@ $prefix: "ew-" !default;
|
|
|
76
76
|
box-shadow: 0 0 0 2px rgba(64, 150, 239, 0.18);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// 半选态:视觉显示横杠,优先级高于勾选态
|
|
80
|
+
.#{$prefix}checkbox--indeterminate .#{$prefix}checkbox__box {
|
|
81
|
+
border-color: var(--ewcp-color-primary, #4096ef);
|
|
82
|
+
background: var(--ewcp-color-primary, #4096ef);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.#{$prefix}checkbox__indeterminate-icon {
|
|
86
|
+
display: block;
|
|
87
|
+
width: var(--checkbox-icon-size, 10px);
|
|
88
|
+
height: var(--checkbox-icon-size, 10px);
|
|
89
|
+
color: var(--ewcp-color-bg, #fff);
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
79
93
|
.#{$prefix}checkbox--disabled {
|
|
80
|
-
color: #ccc;
|
|
94
|
+
color: var(--ewcp-color-text-disabled, #ccc);
|
|
81
95
|
cursor: not-allowed;
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
.#{$prefix}checkbox--disabled .#{$prefix}checkbox__box {
|
|
85
|
-
border-color: #e5e6eb;
|
|
86
|
-
background: #f7f8fa;
|
|
99
|
+
border-color: var(--ewcp-color-border-light, #e5e6eb);
|
|
100
|
+
background: var(--ewcp-color-checkbox-disabled-bg, #f7f8fa);
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
.#{$prefix}checkbox--disabled .#{$prefix}checkbox__input:checked + .#{$prefix}checkbox__box {
|
|
90
|
-
border-color: #c8c9cc;
|
|
91
|
-
background: #c8c9cc;
|
|
104
|
+
border-color: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
|
|
105
|
+
background: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.#{$prefix}checkbox--disabled.#{$prefix}checkbox--indeterminate .#{$prefix}checkbox__box {
|
|
109
|
+
border-color: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
|
|
110
|
+
background: var(--ewcp-color-checkbox-disabled-checked, #c8c9cc);
|
|
92
111
|
}
|
|
93
112
|
|
|
94
113
|
.#{$prefix}checkbox--small {
|