@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/styles/common.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.var--box { box-sizing: border-box;}.var--box * { box-sizing: border-box;}.var--relative { position: relative;}.var--absolute { position: absolute;}.var--hidden { overflow: hidden;}.var--lock { overflow: hidden;}.var--block { display: block;}.var--inline-block { display: inline-block;}.var--flex { display: flex;}.var--inline-flex { display: inline-flex;}:root { --font-size-xs: 10px; --font-size-sm: 12px; --font-size-md: 14px; --font-size-lg: 16px; --icon-size-xs: 16px; --icon-size-sm: 18px; --icon-size-md: 20px; --icon-size-lg: 22px; --color-body: #fff; --color-text: #333; --color-primary: #3a7afe; --color-info: #00afef; --color-success: #00c48f; --color-warning: #ff9f00; --color-danger: #f44336; --color-disabled: #e0e0e0; --color-text-disabled: #aaa; --cubic-bezier: cubic-bezier(0.25, 0.8, 0.5, 1); --shadow-key-umbra-opacity: rgba(0, 0, 0, 0.2); --shadow-key-penumbra-opacity: rgba(0, 0, 0, 0.14); --shadow-key-ambient-opacity: rgba(0, 0, 0, 0.12);}
|
|
1
|
+
.var--box { box-sizing: border-box;}.var--box * { box-sizing: border-box;}.var--relative { position: relative;}.var--absolute { position: absolute;}.var--hidden { overflow: hidden;}.var--lock { overflow: hidden;}.var--block { display: block;}.var--ellipsis { overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap;}.var--inline-block { display: inline-block;}.var--flex { display: flex;}.var--inline-flex { display: inline-flex;}:root { --font-size-xs: 10px; --font-size-sm: 12px; --font-size-md: 14px; --font-size-lg: 16px; --icon-size-xs: 16px; --icon-size-sm: 18px; --icon-size-md: 20px; --icon-size-lg: 22px; --color-body: #fff; --color-text: #333; --color-primary: #3a7afe; --color-info: #00afef; --color-success: #00c48f; --color-warning: #ff9f00; --color-danger: #f44336; --color-disabled: #e0e0e0; --color-text-disabled: #aaa; --cubic-bezier: cubic-bezier(0.25, 0.8, 0.5, 1); --shadow-key-umbra-opacity: rgba(0, 0, 0, 0.2); --shadow-key-penumbra-opacity: rgba(0, 0, 0, 0.14); --shadow-key-ambient-opacity: rgba(0, 0, 0, 0.12);}
|
package/lib/styles/common.less
CHANGED
package/lib/swipe/Swipe.js
CHANGED
|
@@ -187,12 +187,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
var initialIndex = () => {
|
|
190
|
-
lockDuration.value = true;
|
|
191
190
|
index.value = boundaryIndex((0, _shared.toNumber)(props.initialIndex));
|
|
192
|
-
translate.value = index.value * -size.value;
|
|
193
|
-
(0, _elements.nextTickFrame)(() => {
|
|
194
|
-
lockDuration.value = false;
|
|
195
|
-
});
|
|
196
191
|
};
|
|
197
192
|
|
|
198
193
|
var startAutoplay = () => {
|
|
@@ -300,10 +295,17 @@ var _default = (0, _vue.defineComponent)({
|
|
|
300
295
|
|
|
301
296
|
|
|
302
297
|
var resize = () => {
|
|
298
|
+
lockDuration.value = true;
|
|
303
299
|
size.value = props.vertical ? swipeEl.value.offsetHeight : swipeEl.value.offsetWidth;
|
|
304
300
|
trackSize.value = size.value * length.value;
|
|
305
|
-
|
|
301
|
+
translate.value = index.value * -size.value;
|
|
302
|
+
swipeItems.forEach(swipeItem => {
|
|
303
|
+
swipeItem.setTranslate(0);
|
|
304
|
+
});
|
|
306
305
|
startAutoplay();
|
|
306
|
+
setTimeout(() => {
|
|
307
|
+
lockDuration.value = false;
|
|
308
|
+
});
|
|
307
309
|
}; // expose
|
|
308
310
|
|
|
309
311
|
|
|
@@ -377,7 +379,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
377
379
|
vertical
|
|
378
380
|
};
|
|
379
381
|
bindSwipeItems(swipeProvider);
|
|
380
|
-
(0, _vue.watch)(() => length.value,
|
|
382
|
+
(0, _vue.watch)(() => length.value, () => {
|
|
383
|
+
initialIndex();
|
|
384
|
+
resize();
|
|
385
|
+
});
|
|
381
386
|
(0, _vue.onMounted)(() => {
|
|
382
387
|
window.addEventListener('resize', resize);
|
|
383
388
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -22,9 +22,7 @@
|
|
|
22
22
|
"umd",
|
|
23
23
|
"highlight",
|
|
24
24
|
"types",
|
|
25
|
-
"CHANGELOG.md"
|
|
26
|
-
"README.md",
|
|
27
|
-
"README.zh-CN.md"
|
|
25
|
+
"CHANGELOG.md"
|
|
28
26
|
],
|
|
29
27
|
"author": "haoziqaq <357229046@qq.com>",
|
|
30
28
|
"license": "MIT",
|
|
@@ -49,9 +47,9 @@
|
|
|
49
47
|
"peerDependencies": {
|
|
50
48
|
"vue": "^3.2.0"
|
|
51
49
|
},
|
|
52
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "859769307c762134844c0ddfdb69452631f76d62",
|
|
53
51
|
"devDependencies": {
|
|
54
|
-
"@varlet/cli": "^1.
|
|
52
|
+
"@varlet/cli": "^1.24.0"
|
|
55
53
|
},
|
|
56
54
|
"dependencies": {
|
|
57
55
|
"dayjs": "^1.10.4",
|