@iris-ui-kit/vue 0.2.24 → 0.2.25
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/behaviors.cjs +25 -8
- package/dist/behaviors.cjs.map +1 -1
- package/dist/behaviors.js +1 -1
- package/dist/{chunk-FSDQHBI2.js → chunk-3547J6IN.js} +2 -2
- package/dist/chunk-3547J6IN.js.map +1 -0
- package/dist/{chunk-3IH7IJ5S.js → chunk-7L6UB6MD.js} +27 -10
- package/dist/chunk-7L6UB6MD.js.map +1 -0
- package/dist/error-boundary.cjs.map +1 -1
- package/dist/error-boundary.js +1 -1
- package/dist/index.cjs +25 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-3IH7IJ5S.js.map +0 -1
- package/dist/chunk-FSDQHBI2.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -19064,13 +19064,11 @@ var IrisLongPress = vue.defineComponent({
|
|
|
19064
19064
|
longpress: () => true
|
|
19065
19065
|
},
|
|
19066
19066
|
setup(props, { slots, emit }) {
|
|
19067
|
-
const
|
|
19068
|
-
|
|
19069
|
-
|
|
19070
|
-
|
|
19071
|
-
|
|
19072
|
-
}
|
|
19073
|
-
});
|
|
19067
|
+
const fire = () => {
|
|
19068
|
+
props.onLongPress?.();
|
|
19069
|
+
emit("longpress");
|
|
19070
|
+
};
|
|
19071
|
+
let ctrl = core.createLongPress({ holdDelay: props.holdDelay, onLongPress: fire });
|
|
19074
19072
|
const onPointerDown = () => {
|
|
19075
19073
|
if (props.disabled) return;
|
|
19076
19074
|
ctrl.press();
|
|
@@ -19081,6 +19079,24 @@ var IrisLongPress = vue.defineComponent({
|
|
|
19081
19079
|
const onPointerLeave = () => {
|
|
19082
19080
|
ctrl.cancel();
|
|
19083
19081
|
};
|
|
19082
|
+
const onPointerCancel = () => {
|
|
19083
|
+
ctrl.cancel();
|
|
19084
|
+
};
|
|
19085
|
+
vue.watch(
|
|
19086
|
+
() => props.holdDelay,
|
|
19087
|
+
(holdDelay) => {
|
|
19088
|
+
const wasPressing = ctrl.state() === "pressing";
|
|
19089
|
+
ctrl.cancel();
|
|
19090
|
+
ctrl = core.createLongPress({ holdDelay, onLongPress: fire });
|
|
19091
|
+
if (wasPressing) ctrl.press();
|
|
19092
|
+
}
|
|
19093
|
+
);
|
|
19094
|
+
vue.watch(
|
|
19095
|
+
() => props.disabled,
|
|
19096
|
+
(disabled) => {
|
|
19097
|
+
if (disabled) ctrl.cancel();
|
|
19098
|
+
}
|
|
19099
|
+
);
|
|
19084
19100
|
vue.onBeforeUnmount(() => ctrl.cancel());
|
|
19085
19101
|
return () => vue.h(
|
|
19086
19102
|
"span",
|
|
@@ -19089,7 +19105,8 @@ var IrisLongPress = vue.defineComponent({
|
|
|
19089
19105
|
style: { display: "contents" },
|
|
19090
19106
|
onPointerdown: onPointerDown,
|
|
19091
19107
|
onPointerup: onPointerUp,
|
|
19092
|
-
onPointerleave: onPointerLeave
|
|
19108
|
+
onPointerleave: onPointerLeave,
|
|
19109
|
+
onPointercancel: onPointerCancel
|
|
19093
19110
|
},
|
|
19094
19111
|
slots.default?.()
|
|
19095
19112
|
);
|