@varlet/ui 2.17.1 → 2.18.0-alpha.1697472019506
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/actionSheet.css +1 -1
- package/es/drag/Drag.mjs +2 -2
- package/es/form/Form.mjs +3 -3
- package/es/image-preview/ImagePreview.mjs +2 -2
- package/es/index-bar/indexBar.css +1 -1
- package/es/index.bundle.mjs +13 -1
- package/es/index.mjs +11 -1
- package/es/input/Input.mjs +2 -2
- package/es/menu/style/index.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +122 -0
- package/es/menu-option/MenuOptionSfc.css +0 -0
- package/es/menu-option/index.mjs +11 -0
- package/es/menu-option/menuOption.css +1 -0
- package/es/menu-option/props.mjs +8 -0
- package/es/menu-option/provide.mjs +19 -0
- package/es/menu-option/style/index.mjs +5 -0
- package/es/menu-select/MenuSelect.mjs +110 -0
- package/es/menu-select/MenuSelectSfc.css +0 -0
- package/es/menu-select/index.mjs +9 -0
- package/es/menu-select/menuSelect.css +1 -0
- package/es/menu-select/props.mjs +58 -0
- package/es/menu-select/provide.mjs +16 -0
- package/es/menu-select/style/index.mjs +5 -0
- package/es/pull-refresh/PullRefresh.mjs +2 -2
- package/es/ripple/index.mjs +2 -0
- package/es/select/Select.mjs +14 -47
- package/es/select/useSelectController.mjs +67 -0
- package/es/slider/Slider.mjs +2 -2
- package/es/style.css +1 -1
- package/es/style.mjs +2 -0
- package/es/swipe/Swipe.mjs +13 -13
- package/es/themes/dark/index.mjs +3 -2
- package/es/themes/dark/menuOption.mjs +6 -0
- package/es/time-picker/TimePicker.mjs +2 -2
- package/es/varlet.esm.js +5546 -5256
- package/highlight/web-types.en-US.json +336 -89
- package/highlight/web-types.zh-CN.json +249 -2
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +2120 -1770
- package/package.json +7 -7
- package/types/index.d.ts +4 -0
- package/types/menuOption.d.ts +20 -0
- package/types/menuSelect.d.ts +70 -0
- package/umd/varlet.js +6 -6
package/es/style.mjs
CHANGED
|
@@ -45,6 +45,8 @@ import './loading/style/index.mjs'
|
|
|
45
45
|
import './loading-bar/style/index.mjs'
|
|
46
46
|
import './locale/style/index.mjs'
|
|
47
47
|
import './menu/style/index.mjs'
|
|
48
|
+
import './menu-option/style/index.mjs'
|
|
49
|
+
import './menu-select/style/index.mjs'
|
|
48
50
|
import './option/style/index.mjs'
|
|
49
51
|
import './overlay/style/index.mjs'
|
|
50
52
|
import './pagination/style/index.mjs'
|
package/es/swipe/Swipe.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import Hover from "../hover/index.mjs";
|
|
|
24
24
|
import { defineComponent, ref, computed, watch, onActivated } from "vue";
|
|
25
25
|
import { useSwipeItems } from "./provide.mjs";
|
|
26
26
|
import { props } from "./props.mjs";
|
|
27
|
-
import { clamp, isNumber, toNumber, doubleRaf } from "@varlet/shared";
|
|
27
|
+
import { clamp, isNumber, toNumber, doubleRaf, preventDefault } from "@varlet/shared";
|
|
28
28
|
import { call, createNamespace } from "../utils/components.mjs";
|
|
29
29
|
import { onSmartUnmounted, onWindowResize, useTouch } from "@varlet/use";
|
|
30
30
|
import { usePopup } from "../popup/provide.mjs";
|
|
@@ -372,7 +372,7 @@ const __sfc__ = defineComponent({
|
|
|
372
372
|
if (!isExpectDirection.value) {
|
|
373
373
|
return;
|
|
374
374
|
}
|
|
375
|
-
|
|
375
|
+
preventDefault(event);
|
|
376
376
|
setTrackTranslate(trackTranslate.value + (vertical2 ? moveY.value : moveX.value));
|
|
377
377
|
}
|
|
378
378
|
function handleTouchend() {
|
|
@@ -397,6 +397,17 @@ const __sfc__ = defineComponent({
|
|
|
397
397
|
call(onChange, index.value);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
+
function handleHovering(value) {
|
|
401
|
+
if (props2.navigation === "hover") {
|
|
402
|
+
hovering.value = value;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function getNavigationAnimation(type) {
|
|
406
|
+
if (props2.navigation !== "hover") {
|
|
407
|
+
return "";
|
|
408
|
+
}
|
|
409
|
+
return n(`--navigation${props2.vertical ? "-vertical" : ""}-${type}-animation`);
|
|
410
|
+
}
|
|
400
411
|
function resize() {
|
|
401
412
|
if (!swipeEl.value) {
|
|
402
413
|
return;
|
|
@@ -471,17 +482,6 @@ const __sfc__ = defineComponent({
|
|
|
471
482
|
task({ event: index2 === count - 1 ? options == null ? void 0 : options.event : false });
|
|
472
483
|
});
|
|
473
484
|
}
|
|
474
|
-
const handleHovering = (value) => {
|
|
475
|
-
if (props2.navigation === "hover") {
|
|
476
|
-
hovering.value = value;
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
function getNavigationAnimation(type) {
|
|
480
|
-
if (props2.navigation !== "hover") {
|
|
481
|
-
return "";
|
|
482
|
-
}
|
|
483
|
-
return props2.vertical ? n(`--navigation-vertical-${type}-animation`) : n(`--navigation-${type}-animation`);
|
|
484
|
-
}
|
|
485
485
|
return {
|
|
486
486
|
length,
|
|
487
487
|
index,
|
package/es/themes/dark/index.mjs
CHANGED
|
@@ -53,7 +53,8 @@ import progress from "./progress.mjs";
|
|
|
53
53
|
import option from "./option.mjs";
|
|
54
54
|
import countdown from "./countdown.mjs";
|
|
55
55
|
import watermark from "./watermark.mjs";
|
|
56
|
-
|
|
56
|
+
import menuOption from "./menuOption.mjs";
|
|
57
|
+
var stdin_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
57
58
|
// common
|
|
58
59
|
"--color-body": "#1e1e1e",
|
|
59
60
|
"--color-text": "#fff",
|
|
@@ -64,7 +65,7 @@ var stdin_default = __spreadValues(__spreadValues(__spreadValues(__spreadValues(
|
|
|
64
65
|
"--color-danger": "#ef5350",
|
|
65
66
|
"--color-disabled": "#404040",
|
|
66
67
|
"--color-text-disabled": "#757575"
|
|
67
|
-
}, button), cell), card), timePicker), datePicker), skeleton), tabs), tab), popup), dialog), actionSheet), chip), badge), uploader), collapse), pullRefresh), switchThemes), steps), pagination), table), fieldDecorator), select), radio), checkbox), divider), picker), appBar), bottomNavigation), bottomNavigationItem), menu), result), breadcrumb), paper), avatar), link), progress), option), countdown), watermark);
|
|
68
|
+
}, button), cell), card), timePicker), datePicker), skeleton), tabs), tab), popup), dialog), actionSheet), chip), badge), uploader), collapse), pullRefresh), switchThemes), steps), pagination), table), fieldDecorator), select), radio), checkbox), divider), picker), appBar), bottomNavigation), bottomNavigationItem), menu), result), breadcrumb), paper), avatar), link), progress), option), countdown), watermark), menuOption);
|
|
68
69
|
export {
|
|
69
70
|
stdin_default as default
|
|
70
71
|
};
|
|
@@ -2,7 +2,7 @@ import dayjs from "dayjs/esm";
|
|
|
2
2
|
import Clock from "./clock.mjs";
|
|
3
3
|
import { computed, defineComponent, reactive, ref, watch } from "vue";
|
|
4
4
|
import { props, hoursAmpm, hours24 } from "./props.mjs";
|
|
5
|
-
import { toNumber, getRect } from "@varlet/shared";
|
|
5
|
+
import { toNumber, getRect, preventDefault } from "@varlet/shared";
|
|
6
6
|
import { createNamespace, call, formatElevation } from "../utils/components.mjs";
|
|
7
7
|
import { padStart } from "../utils/shared.mjs";
|
|
8
8
|
import { getNumberTime, getIsDisableMinute, getIsDisableSecond } from "./utils.mjs";
|
|
@@ -358,7 +358,7 @@ const __sfc__ = defineComponent({
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
function moveHand(event) {
|
|
361
|
-
|
|
361
|
+
preventDefault(event);
|
|
362
362
|
if (props2.readonly)
|
|
363
363
|
return;
|
|
364
364
|
setCenterAndRange();
|