@varlet/ui 1.23.11 → 1.24.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/CHANGELOG.md +25 -0
- package/es/card/card.css +1 -1
- package/es/card/card.less +1 -0
- package/es/icon/icon.css +1 -1
- package/es/input/Input.js +1 -1
- package/es/input/input.css +1 -1
- package/es/input/input.less +6 -2
- package/es/loading/Loading.js +33 -6
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +55 -3
- package/es/loading/props.js +7 -0
- package/es/locale/en-US.d.ts +5 -0
- package/es/locale/zh-CN.d.ts +5 -0
- package/es/select/Select.js +1 -1
- package/es/select/select.css +1 -1
- package/es/select/select.less +3 -1
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/styles/common.css +1 -1
- package/es/styles/common.less +6 -0
- package/es/swipe/Swipe.js +12 -7
- package/highlight/attributes.json +11 -3
- package/highlight/tags.json +5 -3
- package/highlight/web-types.json +32 -5
- package/lib/card/card.css +1 -1
- package/lib/card/card.less +1 -0
- package/lib/icon/icon.css +1 -1
- package/lib/input/Input.js +1 -1
- package/lib/input/input.css +1 -1
- package/lib/input/input.less +6 -2
- package/lib/loading/Loading.js +32 -5
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +55 -3
- package/lib/loading/props.js +7 -0
- package/lib/locale/en-US.d.ts +5 -0
- package/lib/locale/zh-CN.d.ts +5 -0
- package/lib/select/Select.js +1 -1
- package/lib/select/select.css +1 -1
- package/lib/select/select.less +3 -1
- package/lib/style.css +1 -1
- package/lib/styles/common.css +1 -1
- package/lib/styles/common.less +6 -0
- package/lib/swipe/Swipe.js +12 -7
- package/package.json +4 -6
- package/types/loading.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/lib/loading/loading.less
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@import '../styles/var';
|
|
2
2
|
|
|
3
|
+
@loading-opacity: 0.38;
|
|
4
|
+
@loading-desc-margin: 8px 0 0;
|
|
3
5
|
@loading-normal-width: 50px;
|
|
4
6
|
@loading-normal-height: @font-size-md + 2;
|
|
5
7
|
|
|
@@ -12,10 +14,60 @@
|
|
|
12
14
|
@loading-mini-width: 22px;
|
|
13
15
|
@loading-mini-height: @font-size-xs + 2;
|
|
14
16
|
|
|
17
|
+
:root {
|
|
18
|
+
--loading-opacity: @loading-opacity;
|
|
19
|
+
--loading-desc-margin: @loading-desc-margin;
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
.var-loading {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
position: relative;
|
|
24
|
+
|
|
25
|
+
&__content {
|
|
26
|
+
transition: opacity 0.3s;
|
|
27
|
+
opacity: 1;
|
|
28
|
+
|
|
29
|
+
&--active {
|
|
30
|
+
opacity: var(--loading-opacity);
|
|
31
|
+
user-select: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__body {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
height: 100%;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__inside {
|
|
44
|
+
position: absolute;
|
|
45
|
+
left: 50%;
|
|
46
|
+
top: 50%;
|
|
47
|
+
transform: translate(-50%, -50%);
|
|
48
|
+
z-index: 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__description {
|
|
52
|
+
color: currentColor;
|
|
53
|
+
margin: var(--loading-desc-margin);
|
|
54
|
+
|
|
55
|
+
&--large {
|
|
56
|
+
font-size: @font-size-lg;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--normal {
|
|
60
|
+
font-size: @font-size-md;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--small {
|
|
64
|
+
font-size: @font-size-sm;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--mini {
|
|
68
|
+
font-size: @font-size-xs;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
19
71
|
|
|
20
72
|
&__circle {
|
|
21
73
|
display: flex;
|
package/lib/loading/props.js
CHANGED
package/lib/select/Select.js
CHANGED
|
@@ -124,7 +124,7 @@ function render(_ctx, _cache) {
|
|
|
124
124
|
, ["class"])], 6
|
|
125
125
|
/* CLASS, STYLE */
|
|
126
126
|
), (0, _vue.createElementVNode)("label", {
|
|
127
|
-
class: (0, _vue.normalizeClass)(["var-select__placeholder", [_ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null, _ctx.computePlaceholderState(), !_ctx.hint ? 'var-select--placeholder-non-hint' : null]])
|
|
127
|
+
class: (0, _vue.normalizeClass)(["var-select__placeholder var--ellipsis", [_ctx.formDisabled || _ctx.disabled ? 'var-select--disabled' : null, _ctx.computePlaceholderState(), !_ctx.hint ? 'var-select--placeholder-non-hint' : null]])
|
|
128
128
|
}, (0, _vue.toDisplayString)(_ctx.placeholder), 3
|
|
129
129
|
/* TEXT, CLASS */
|
|
130
130
|
)], 2
|
package/lib/select/select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --select-select-text-color: #555; --select-select-padding: 5px 0; --select-error-color: var(--color-danger); --select-blur-color: #888; --select-focus-color: var(--color-primary); --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-placeholder-size: 16px; --select-icon-padding: 16px 0 0; --select-icon-size: 20px; --select-chip-margin: 5px 5px 0; --select-line-size: 1px; --select-line-spread-size: 2px; --select-arrow-size: 20px; --select-disabled-color: var(--color-text-disabled);}.var-select-footer-margin-enter-from,.var-select-footer-margin-leave-to { opacity: 0; margin-top: 2px !important;}.var-select-footer-margin-enter-active,.var-select-footer-margin-leave-active { transition: 0.2s all var(--cubic-bezier);}.var-select { width: 100%; color: var(--select-select-text-color);}.var-select__controller { width: 100%; display: flex; position: relative;}.var-select__menu[var-select-cover] { flex-grow: 1; background: transparent;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto;}.var-select__wrap { position: relative; display: flex; flex-direction: column; padding-top: var(--select-placeholder-size);}.var-select__icon { display: flex; align-items: center; padding: var(--select-icon-padding); font-size: 20px;}.var-select__placeholder { position: absolute; top: 50%; left: 0; transform-origin: left; transition-property: top, transform; transition-duration: 0.3s; transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1); font-size: var(--select-placeholder-size); color: var(--select-blur-color);}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 32px; padding: var(--select-select-padding); outline: none; border: none; font-size: inherit; color: var(--select-select-text-color); overflow-x: auto;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select__line { width: 100%; height: var(--select-line-size); background: var(--select-blur-color);}.var-select__dot { width: 100%; height: var(--select-line-spread-size); background: var(--select-focus-color); transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--cubic-bezier);}.var-select--placeholder-hint { top: 0; transform: translate(0, 0) scale(0.75);}.var-select--placeholder-non-hint { top: 50%; transform: translate(0, -50%) scale(1);}.var-select--non-hint { padding-top: 0;}.var-select--placeholder-hidden { visibility: hidden;}.var-select--focus { color: var(--select-focus-color);}.var-select--spread { transform: scaleX(1);}.var-select--disabled { color: var(--select-disabled-color);}.var-select--error { color: var(--select-error-color);}.var-select--line-disabled { background: var(--select-disabled-color);}.var-select--line-error { background: var(--select-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}
|
|
1
|
+
:root { --select-select-text-color: #555; --select-select-padding: 5px 0; --select-error-color: var(--color-danger); --select-blur-color: #888; --select-focus-color: var(--color-primary); --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-placeholder-size: 16px; --select-icon-padding: 16px 0 0; --select-icon-size: 20px; --select-chip-margin: 5px 5px 0; --select-line-size: 1px; --select-line-spread-size: 2px; --select-arrow-size: 20px; --select-disabled-color: var(--color-text-disabled);}.var-select-footer-margin-enter-from,.var-select-footer-margin-leave-to { opacity: 0; margin-top: 2px !important;}.var-select-footer-margin-enter-active,.var-select-footer-margin-leave-active { transition: 0.2s all var(--cubic-bezier);}.var-select { width: 100%; color: var(--select-select-text-color);}.var-select__controller { width: 100%; display: flex; position: relative;}.var-select__menu[var-select-cover] { flex-grow: 1; background: transparent;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto;}.var-select__wrap { position: relative; display: flex; flex-direction: column; padding-top: var(--select-placeholder-size);}.var-select__icon { display: flex; align-items: center; padding: var(--select-icon-padding); font-size: 20px;}.var-select__placeholder { position: absolute; top: 50%; left: 0; width: 100%; transform-origin: left; transition-property: top, transform, width; transition-duration: 0.3s; transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1); font-size: var(--select-placeholder-size); color: var(--select-blur-color);}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 32px; padding: var(--select-select-padding); outline: none; border: none; font-size: inherit; color: var(--select-select-text-color); overflow-x: auto;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select__line { width: 100%; height: var(--select-line-size); background: var(--select-blur-color);}.var-select__dot { width: 100%; height: var(--select-line-spread-size); background: var(--select-focus-color); transform: scaleX(0); transform-origin: center; transition: transform 0.3s var(--cubic-bezier);}.var-select--placeholder-hint { top: 0; width: 133.33%; transform: translate(0, 0) scale(0.75);}.var-select--placeholder-non-hint { top: 50%; transform: translate(0, -50%) scale(1);}.var-select--non-hint { padding-top: 0;}.var-select--placeholder-hidden { visibility: hidden;}.var-select--focus { color: var(--select-focus-color);}.var-select--spread { transform: scaleX(1);}.var-select--disabled { color: var(--select-disabled-color);}.var-select--error { color: var(--select-error-color);}.var-select--line-disabled { background: var(--select-disabled-color);}.var-select--line-error { background: var(--select-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}
|
package/lib/select/select.less
CHANGED
|
@@ -91,8 +91,9 @@
|
|
|
91
91
|
position: absolute;
|
|
92
92
|
top: 50%;
|
|
93
93
|
left: 0;
|
|
94
|
+
width: 100%;
|
|
94
95
|
transform-origin: left;
|
|
95
|
-
transition-property: top, transform;
|
|
96
|
+
transition-property: top, transform, width;
|
|
96
97
|
transition-duration: 0.3s;
|
|
97
98
|
transform: translate(0, calc(-50% + var(--select-placeholder-size) / 2)) scale(1);
|
|
98
99
|
font-size: var(--select-placeholder-size);
|
|
@@ -135,6 +136,7 @@
|
|
|
135
136
|
|
|
136
137
|
&--placeholder-hint {
|
|
137
138
|
top: 0;
|
|
139
|
+
width: 133.33%;
|
|
138
140
|
transform: translate(0, 0) scale(0.75);
|
|
139
141
|
}
|
|
140
142
|
|