@varlet/ui 3.2.14-alpha.1717685185218 → 3.2.14
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/es/action-sheet/style/index.mjs +1 -1
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +19 -1
- package/es/swipe-item/SwipeItem.mjs +8 -3
- package/es/swipe-item/swipeItem.css +1 -1
- package/es/varlet.esm.js +1432 -1422
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +26 -3
- package/package.json +7 -7
- package/types/styleVars.d.ts +15 -797
- package/umd/varlet.js +6 -6
package/lib/varlet.cjs.js
CHANGED
|
@@ -15459,6 +15459,7 @@ const __sfc__$J = vue.defineComponent({
|
|
|
15459
15459
|
vertical
|
|
15460
15460
|
};
|
|
15461
15461
|
bindSwipeItems(swipeProvider);
|
|
15462
|
+
useEventListener(() => window, "keydown", handleKeydown);
|
|
15462
15463
|
call(bindPopup, null);
|
|
15463
15464
|
vue.watch(
|
|
15464
15465
|
() => length.value,
|
|
@@ -15630,6 +15631,23 @@ const __sfc__$J = vue.defineComponent({
|
|
|
15630
15631
|
}
|
|
15631
15632
|
return n$H(`--navigation${props2.vertical ? "-vertical" : ""}-${type}-animation`);
|
|
15632
15633
|
}
|
|
15634
|
+
function handleKeydown(event) {
|
|
15635
|
+
if (!swipeItems.length) {
|
|
15636
|
+
return;
|
|
15637
|
+
}
|
|
15638
|
+
const focusingSwipeItemIndex = swipeItems.findIndex(({ isFocusing }) => isFocusing.value);
|
|
15639
|
+
if (focusingSwipeItemIndex === -1) {
|
|
15640
|
+
return;
|
|
15641
|
+
}
|
|
15642
|
+
const { key } = event;
|
|
15643
|
+
preventDefault(event);
|
|
15644
|
+
if (key === "ArrowLeft") {
|
|
15645
|
+
prev();
|
|
15646
|
+
}
|
|
15647
|
+
if (key === "ArrowRight") {
|
|
15648
|
+
next();
|
|
15649
|
+
}
|
|
15650
|
+
}
|
|
15633
15651
|
function resize() {
|
|
15634
15652
|
if (!swipeEl.value) {
|
|
15635
15653
|
return;
|
|
@@ -15756,19 +15774,23 @@ function __render__$H(_ctx, _cache) {
|
|
|
15756
15774
|
transform: `translate${_ctx.vertical ? "Y" : "X"}(${_ctx.toSizeUnit(_ctx.translate)})`
|
|
15757
15775
|
}),
|
|
15758
15776
|
tabindex: "-1",
|
|
15759
|
-
"aria-hidden": _ctx.currentIndex !== _ctx.index
|
|
15777
|
+
"aria-hidden": _ctx.currentIndex !== _ctx.index,
|
|
15778
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => _ctx.isFocusing = true),
|
|
15779
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => _ctx.isFocusing = false)
|
|
15760
15780
|
}, [
|
|
15761
15781
|
vue.renderSlot(_ctx.$slots, "default")
|
|
15762
|
-
],
|
|
15782
|
+
], 46, _hoisted_1$l);
|
|
15763
15783
|
}
|
|
15764
15784
|
const __sfc__$I = vue.defineComponent({
|
|
15765
15785
|
name: name$E,
|
|
15766
15786
|
setup() {
|
|
15767
15787
|
const translate = vue.ref(0);
|
|
15788
|
+
const isFocusing = vue.ref(false);
|
|
15768
15789
|
const { swipe, bindSwipe, index } = useSwipe();
|
|
15769
15790
|
const { size, currentIndex, vertical } = swipe;
|
|
15770
15791
|
const swipeItemProvider = {
|
|
15771
15792
|
index,
|
|
15793
|
+
isFocusing: vue.computed(() => isFocusing.value),
|
|
15772
15794
|
setTranslate
|
|
15773
15795
|
};
|
|
15774
15796
|
bindSwipe(swipeItemProvider);
|
|
@@ -15776,6 +15798,7 @@ const __sfc__$I = vue.defineComponent({
|
|
|
15776
15798
|
translate.value = x;
|
|
15777
15799
|
}
|
|
15778
15800
|
return {
|
|
15801
|
+
isFocusing,
|
|
15779
15802
|
size,
|
|
15780
15803
|
index,
|
|
15781
15804
|
currentIndex,
|
|
@@ -28746,7 +28769,7 @@ withInstall(stdin_default$1);
|
|
|
28746
28769
|
withPropsDefaultsSetter(stdin_default$1, props);
|
|
28747
28770
|
const _WatermarkComponent = stdin_default$1;
|
|
28748
28771
|
var stdin_default = stdin_default$1;
|
|
28749
|
-
const version = "3.2.14
|
|
28772
|
+
const version = "3.2.14";
|
|
28750
28773
|
function install(app) {
|
|
28751
28774
|
stdin_default$5G.install && app.use(stdin_default$5G);
|
|
28752
28775
|
stdin_default$5E.install && app.use(stdin_default$5E);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "3.2.14
|
|
3
|
+
"version": "3.2.14",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/
|
|
51
|
+
"@varlet/use": "3.2.14",
|
|
52
|
+
"@varlet/icons": "3.2.14",
|
|
53
|
+
"@varlet/shared": "3.2.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.4.21",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.4.21",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/touch-emulator": "3.2.14",
|
|
70
|
+
"@varlet/cli": "3.2.14",
|
|
71
|
+
"@varlet/ui": "3.2.14"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|