@qsxy/element-plus-react 1.0.1 → 1.0.2
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/Calendar/Calendar.js +12 -3
- package/dist/Calendar/Footer.js +4 -2
- package/dist/Calendar/QuarterPanel.d.ts +4 -0
- package/dist/Calendar/QuarterPanel.js +109 -0
- package/dist/Calendar/WeekPanel.js +1 -1
- package/dist/Calendar/typings.d.ts +1 -1
- package/dist/Card/Card.js +9 -4
- package/dist/Card/typings.d.ts +1 -1
- package/dist/Cascader/Cascader.js +1 -1
- package/dist/DatePicker/DatePicker.js +38 -12
- package/dist/DatePicker/DateRangePicker.js +27 -9
- package/dist/DatePicker/main.js +1 -1
- package/dist/DatePicker/typings.d.ts +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +2 -2
- package/dist/Input/Input.1.d.ts +16 -0
- package/dist/Input/Input.1.js +376 -0
- package/dist/Input/Input.js +137 -121
- package/dist/Input/InputRange.js +1 -1
- package/dist/Input/TextArea.js +87 -12
- package/dist/Input/typings.d.ts +15 -5
- package/dist/Input/useComposition.d.ts +23 -0
- package/dist/Input/useComposition.js +63 -0
- package/dist/Input/utils.d.ts +6 -0
- package/dist/Input/utils.js +91 -0
- package/dist/InputNumber/InputNumber.js +1 -1
- package/dist/InputNumber/typings.d.ts +1 -1
- package/dist/Select/Option.js +30 -14
- package/dist/Select/SelectContext.d.ts +3 -4
- package/dist/Select/SelectCore.d.ts +2 -2
- package/dist/Select/SelectCore.js +164 -447
- package/dist/Select/SelectDropdown.js +67 -145
- package/dist/Select/typings.d.ts +47 -21
- package/dist/Select/useSelect.d.ts +125 -0
- package/dist/Select/useSelect.js +516 -0
- package/dist/Table/util.js +6 -5
- package/dist/Tag/Tag.js +22 -17
- package/dist/TimePicker/TimePicker.js +2 -2
- package/dist/TreeSelect/TreeSelect.js +2 -2
- package/dist/Util/aria.d.ts +25 -0
- package/dist/Util/aria.js +118 -0
- package/dist/hooks/useCalcInputWidth.d.ts +8 -0
- package/dist/hooks/useCalcInputWidth.js +30 -0
- package/dist/hooks/useComposition.d.ts +16 -0
- package/dist/hooks/useComposition.js +39 -0
- package/dist/hooks/useCursor.d.ts +2 -0
- package/dist/hooks/useCursor.js +52 -0
- package/dist/hooks/useFocusController.d.ts +27 -0
- package/dist/hooks/useFocusController.js +72 -0
- package/dist/index.css +1 -1
- package/dist/locale/en.d.ts +15 -0
- package/dist/locale/en.js +15 -0
- package/dist/locale/zhCn.d.ts +15 -0
- package/dist/locale/zhCn.js +15 -0
- package/package.json +1 -1
- package/theme-chalk/calendar/index.scss +1 -0
- package/theme-chalk/calendar/quarter-table.scss +78 -0
- package/theme-chalk/common/var.scss +1 -1
- package/theme-chalk/input/input.scss +424 -578
- package/theme-chalk/input/input.scss--bak +578 -0
- package/theme-chalk/select/index.scss +272 -247
- package/theme-chalk/select/index.scss--bak +247 -0
- package/theme-chalk/select/option-group.scss +2 -2
- package/theme-chalk/select/option.scss +2 -2
- package/theme-chalk/select/select-dropdown.scss +2 -2
- package/theme-chalk/tag.scss +181 -203
- package/theme-chalk/tag.scss--bak +203 -0
|
@@ -1,247 +1,272 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
border-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
height:
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../mixins/mixins' as *;
|
|
4
|
+
@use '../mixins/utils' as *;
|
|
5
|
+
@use '../mixins/var' as *;
|
|
6
|
+
@use '../common/var' as *;
|
|
7
|
+
@use './select-dropdown.scss';
|
|
8
|
+
@use './option.scss';
|
|
9
|
+
@use './option-group.scss';
|
|
10
|
+
|
|
11
|
+
@mixin mixed-input-border($color) {
|
|
12
|
+
box-shadow: 0 0 0 1px $color inset;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include b(select) {
|
|
16
|
+
@include set-component-css-var('select', $select);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include b(select) {
|
|
20
|
+
display: inline-block;
|
|
21
|
+
position: relative;
|
|
22
|
+
vertical-align: middle;
|
|
23
|
+
width: getCssVar('select-width');
|
|
24
|
+
|
|
25
|
+
@include e(wrapper) {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
position: relative;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
text-align: left;
|
|
32
|
+
font-size: map.get($input-font-size, 'default');
|
|
33
|
+
padding: map.get($select-wrapper-padding, 'default');
|
|
34
|
+
gap: map.get($select-item-gap, 'default');
|
|
35
|
+
min-height: map.get($input-height, 'default');
|
|
36
|
+
line-height: map.get($select-item-height, 'default');
|
|
37
|
+
border-radius: getCssVar('border-radius-base');
|
|
38
|
+
background-color: getCssVar('fill-color', 'blank');
|
|
39
|
+
transition: getCssVar('transition', 'duration');
|
|
40
|
+
transform: translate3d(0, 0, 0);
|
|
41
|
+
@include mixed-input-border(#{getCssVar('border-color')});
|
|
42
|
+
|
|
43
|
+
@include when(filterable) {
|
|
44
|
+
cursor: text;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include when(focused) {
|
|
48
|
+
@include mixed-input-border(#{getCssVar('color-primary')});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include when(hovering) {
|
|
52
|
+
&:not(.is-focused) {
|
|
53
|
+
@include mixed-input-border(#{getCssVar('border-color-hover')});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include when(disabled) {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
|
|
60
|
+
background-color: getCssVar('fill-color', 'light');
|
|
61
|
+
color: getCssVar('text-color', 'placeholder');
|
|
62
|
+
@include mixed-input-border(#{getCssVar('select-disabled-border')});
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
@include mixed-input-border(#{getCssVar('select-disabled-border')});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.is-focus {
|
|
69
|
+
@include mixed-input-border(#{getCssVar('input-focus-border-color')});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include e(selected-item) {
|
|
73
|
+
color: getCssVar('select-disabled-color');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include e(caret) {
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.#{$namespace}-tag {
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// When the native input tag is disabled, the cursor value is the 'default'.
|
|
85
|
+
input {
|
|
86
|
+
cursor: not-allowed;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.#{$namespace}-select__prefix,
|
|
90
|
+
.#{$namespace}-select__suffix {
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include e(prefix) {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
flex-shrink: 0;
|
|
100
|
+
gap: map.get($select-item-gap, 'default');
|
|
101
|
+
color: var(#{getCssVarName('input-icon-color')}, map.get($input, 'icon-color'));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@include e(suffix) {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
gap: map.get($select-item-gap, 'default');
|
|
109
|
+
color: var(#{getCssVarName('input-icon-color')}, map.get($input, 'icon-color'));
|
|
110
|
+
|
|
111
|
+
@include when(hidden-clear) {
|
|
112
|
+
.#{$namespace}-select__clear {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@include when(hidden-arrow) {
|
|
118
|
+
.#{$namespace}-select__arrow {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@include e(caret) {
|
|
125
|
+
color: getCssVar('select-input-color');
|
|
126
|
+
font-size: getCssVar('select-input-font-size');
|
|
127
|
+
transition: getCssVar('transition', 'duration');
|
|
128
|
+
transform: rotateZ(0deg);
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
|
|
131
|
+
@include when(reverse) {
|
|
132
|
+
transform: rotateZ(180deg);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@include e(clear) {
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
color: getCssVar('select-close-hover-color');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include e(selection) {
|
|
145
|
+
position: relative;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-wrap: wrap;
|
|
148
|
+
align-items: center;
|
|
149
|
+
flex: 1;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
gap: map.get($select-item-gap, 'default');
|
|
152
|
+
|
|
153
|
+
@include when(near) {
|
|
154
|
+
margin-left: map.get($select-near-margin-left, 'default');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.#{$namespace}-tag {
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
border-color: transparent;
|
|
160
|
+
|
|
161
|
+
&.#{$namespace}-tag--plain {
|
|
162
|
+
border-color: getCssVar('tag', 'border-color');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.#{$namespace}-tag__content {
|
|
166
|
+
min-width: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@include e(selected-item) {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-wrap: wrap;
|
|
174
|
+
user-select: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@include e(tags-text) {
|
|
178
|
+
display: block;
|
|
179
|
+
line-height: normal;
|
|
180
|
+
@include utils-ellipsis;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@include e(placeholder) {
|
|
184
|
+
position: absolute;
|
|
185
|
+
z-index: -1;
|
|
186
|
+
display: block;
|
|
187
|
+
top: 50%;
|
|
188
|
+
transform: translateY(-50%);
|
|
189
|
+
width: 100%;
|
|
190
|
+
@include utils-ellipsis;
|
|
191
|
+
color: var(#{getCssVarName('input-text-color')}, map.get($input, 'text-color'));
|
|
192
|
+
|
|
193
|
+
@include when(transparent) {
|
|
194
|
+
user-select: none;
|
|
195
|
+
color: getCssVar('text-color', 'placeholder');
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@include e(popper) {
|
|
200
|
+
@include picker-popper(map.get($select-dropdown, 'bg-color'), map.get($select-dropdown, 'border'), map.get($select-dropdown, 'shadow'));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include e(input-wrapper) {
|
|
204
|
+
flex: 1;
|
|
205
|
+
|
|
206
|
+
@include when(hidden) {
|
|
207
|
+
// Out of the document flow
|
|
208
|
+
position: absolute;
|
|
209
|
+
opacity: 0;
|
|
210
|
+
z-index: -1;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@include e(input) {
|
|
215
|
+
border: none;
|
|
216
|
+
outline: none;
|
|
217
|
+
padding: 0;
|
|
218
|
+
color: getCssVar('select-multiple-input-color');
|
|
219
|
+
font-size: inherit;
|
|
220
|
+
font-family: inherit;
|
|
221
|
+
appearance: none;
|
|
222
|
+
height: map.get($select-item-height, 'default');
|
|
223
|
+
width: 100%;
|
|
224
|
+
background-color: transparent;
|
|
225
|
+
|
|
226
|
+
@include when(disabled) {
|
|
227
|
+
cursor: not-allowed;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@include e(input-calculator) {
|
|
232
|
+
position: absolute;
|
|
233
|
+
left: 0;
|
|
234
|
+
top: 0;
|
|
235
|
+
max-width: 100%;
|
|
236
|
+
visibility: hidden;
|
|
237
|
+
white-space: pre;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@each $size in (large, small) {
|
|
242
|
+
@include m($size) {
|
|
243
|
+
@include e(wrapper) {
|
|
244
|
+
gap: map.get($select-item-gap, $size);
|
|
245
|
+
padding: map.get($select-wrapper-padding, $size);
|
|
246
|
+
min-height: map.get($input-height, $size);
|
|
247
|
+
line-height: map.get($select-item-height, $size);
|
|
248
|
+
font-size: map.get($input-font-size, $size);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@include e(selection) {
|
|
252
|
+
gap: map.get($select-item-gap, $size);
|
|
253
|
+
|
|
254
|
+
@include when(near) {
|
|
255
|
+
margin-left: map.get($select-near-margin-left, $size);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@include e(prefix) {
|
|
260
|
+
gap: map.get($select-item-gap, $size);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@include e(suffix) {
|
|
264
|
+
gap: map.get($select-item-gap, $size);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@include e(input) {
|
|
268
|
+
height: map.get($select-item-height, $size);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|