@varlet/ui 3.8.2 → 3.8.3
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/ActionItem.mjs +4 -4
- package/es/action-sheet/ActionSheet.mjs +9 -9
- package/es/action-sheet/index.mjs +2 -2
- package/es/action-sheet/props.mjs +1 -1
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/alert/Alert.mjs +3 -3
- package/es/alert/index.mjs +1 -1
- package/es/app-bar/AppBar.mjs +5 -5
- package/es/app-bar/index.mjs +1 -1
- package/es/auto-complete/AutoComplete.mjs +23 -27
- package/es/auto-complete/index.mjs +1 -1
- package/es/auto-complete/props.mjs +1 -1
- package/es/avatar/Avatar.mjs +5 -5
- package/es/avatar/index.mjs +1 -1
- package/es/avatar-group/AvatarGroup.mjs +2 -2
- package/es/avatar-group/index.mjs +1 -1
- package/es/back-top/BackTop.mjs +7 -7
- package/es/back-top/index.mjs +1 -1
- package/es/badge/Badge.mjs +3 -3
- package/es/badge/index.mjs +1 -1
- package/es/badge/props.mjs +1 -1
- package/es/bottom-navigation/BottomNavigation.mjs +8 -9
- package/es/bottom-navigation/index.mjs +1 -1
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +4 -4
- package/es/bottom-navigation-item/index.mjs +1 -1
- package/es/bottom-navigation-item/provide.mjs +1 -1
- package/es/breadcrumb/Breadcrumb.mjs +3 -3
- package/es/breadcrumb/index.mjs +1 -1
- package/es/breadcrumb/provide.mjs +1 -1
- package/es/breadcrumbs/Breadcrumbs.mjs +2 -2
- package/es/breadcrumbs/index.mjs +1 -1
- package/es/button/Button.mjs +6 -6
- package/es/button/index.mjs +1 -1
- package/es/button-group/ButtonGroup.mjs +1 -1
- package/es/button-group/index.mjs +1 -1
- package/es/card/Card.mjs +39 -39
- package/es/card/index.mjs +1 -1
- package/es/cell/Cell.mjs +3 -3
- package/es/cell/index.mjs +1 -1
- package/es/cell/props.mjs +1 -1
- package/es/checkbox/Checkbox.mjs +7 -7
- package/es/checkbox/index.mjs +1 -1
- package/es/checkbox-group/CheckboxGroup.mjs +5 -5
- package/es/checkbox-group/index.mjs +1 -1
- package/es/chip/Chip.mjs +4 -4
- package/es/chip/index.mjs +1 -1
- package/es/chip/props.mjs +1 -1
- package/es/code/Code.mjs +1 -1
- package/es/code/index.mjs +1 -1
- package/es/col/Col.mjs +4 -4
- package/es/col/index.mjs +1 -1
- package/es/collapse/Collapse.mjs +6 -4
- package/es/collapse/index.mjs +1 -1
- package/es/collapse-item/CollapseItem.mjs +4 -4
- package/es/collapse-item/index.mjs +1 -1
- package/es/collapse-item/provide.mjs +1 -1
- package/es/collapse-transition/CollapseTransition.mjs +2 -2
- package/es/collapse-transition/index.mjs +1 -1
- package/es/collapse-transition/useCollapseTransition.mjs +1 -1
- package/es/context/lock.mjs +1 -1
- package/es/context/stack.mjs +1 -1
- package/es/context/zIndex.mjs +1 -1
- package/es/count-to/CountTo.mjs +4 -4
- package/es/count-to/index.mjs +1 -1
- package/es/countdown/Countdown.mjs +2 -2
- package/es/countdown/index.mjs +1 -1
- package/es/counter/Counter.mjs +8 -8
- package/es/counter/index.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +92 -43
- package/es/date-picker/index.mjs +1 -1
- package/es/date-picker/src/day-picker-panel.mjs +59 -27
- package/es/date-picker/src/month-picker-panel.mjs +57 -23
- package/es/date-picker/src/panel-header.mjs +12 -6
- package/es/date-picker/src/year-picker-panel.mjs +53 -23
- package/es/dialog/Dialog.mjs +5 -5
- package/es/dialog/index.mjs +3 -3
- package/es/dialog/props.mjs +1 -1
- package/es/divider/Divider.mjs +4 -4
- package/es/divider/index.mjs +1 -1
- package/es/drag/Drag.mjs +21 -42
- package/es/drag/index.mjs +1 -1
- package/es/ellipsis/Ellipsis.mjs +2 -2
- package/es/ellipsis/index.mjs +1 -1
- package/es/fab/Fab.mjs +4 -5
- package/es/fab/index.mjs +1 -1
- package/es/fab/props.mjs +1 -1
- package/es/field-decorator/FieldDecorator.mjs +5 -5
- package/es/field-decorator/index.mjs +1 -1
- package/es/floating-panel/FloatingPanel.mjs +6 -6
- package/es/floating-panel/index.mjs +1 -1
- package/es/form/Form.mjs +4 -4
- package/es/form/index.mjs +2 -2
- package/es/form/provide.mjs +1 -1
- package/es/form-details/index.mjs +1 -1
- package/es/highlighter-provider/HighlighterProvider.mjs +2 -2
- package/es/highlighter-provider/index.mjs +1 -1
- package/es/highlighter-provider/provide.mjs +1 -1
- package/es/hover/index.mjs +12 -7
- package/es/hover-overlay/HoverOverlay.mjs +2 -2
- package/es/hover-overlay/index.mjs +2 -2
- package/es/icon/Icon.mjs +3 -3
- package/es/icon/index.mjs +1 -1
- package/es/image/Image.mjs +5 -5
- package/es/image/index.mjs +1 -1
- package/es/image-preview/ImagePreview.mjs +13 -14
- package/es/image-preview/index.mjs +2 -2
- package/es/image-preview/props.mjs +2 -2
- package/es/index-anchor/IndexAnchor.mjs +5 -5
- package/es/index-anchor/index.mjs +1 -1
- package/es/index-anchor/provide.mjs +1 -1
- package/es/index-bar/IndexBar.mjs +17 -13
- package/es/index-bar/index.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +12 -12
- package/es/input/index.mjs +1 -1
- package/es/input/props.mjs +1 -1
- package/es/lazy/index.mjs +1 -1
- package/es/link/Link.mjs +2 -2
- package/es/link/index.mjs +1 -1
- package/es/list/List.mjs +10 -10
- package/es/list/index.mjs +1 -1
- package/es/list/provide.mjs +1 -1
- package/es/loading/Loading.mjs +2 -2
- package/es/loading/index.mjs +1 -1
- package/es/loading-bar/LoadingBar.mjs +1 -2
- package/es/loading-bar/index.mjs +1 -1
- package/es/locale/index.mjs +5 -5
- package/es/locale-provider/LocaleProvider.mjs +11 -8
- package/es/locale-provider/index.mjs +1 -1
- package/es/locale-provider/provide.mjs +1 -1
- package/es/menu/Menu.mjs +2 -2
- package/es/menu/index.mjs +1 -1
- package/es/menu/usePopover.mjs +6 -6
- package/es/menu-option/MenuOption.mjs +9 -9
- package/es/menu-option/index.mjs +1 -1
- package/es/menu-option/provide.mjs +1 -1
- package/es/menu-select/MenuChildren.mjs +21 -21
- package/es/menu-select/MenuSelect.mjs +9 -9
- package/es/menu-select/index.mjs +1 -1
- package/es/option/Option.mjs +5 -5
- package/es/option/index.mjs +1 -1
- package/es/option/provide.mjs +1 -1
- package/es/overlay/Overlay.mjs +4 -4
- package/es/overlay/index.mjs +1 -1
- package/es/pagination/Pagination.mjs +26 -18
- package/es/pagination/index.mjs +1 -1
- package/es/paper/Paper.mjs +3 -3
- package/es/paper/index.mjs +1 -1
- package/es/picker/Picker.mjs +9 -9
- package/es/picker/index.mjs +2 -2
- package/es/picker/props.mjs +1 -1
- package/es/popup/Popup.mjs +6 -6
- package/es/popup/index.mjs +1 -1
- package/es/progress/Progress.mjs +4 -4
- package/es/progress/index.mjs +1 -1
- package/es/pull-refresh/PullRefresh.mjs +10 -12
- package/es/pull-refresh/index.mjs +1 -1
- package/es/radio/Radio.mjs +10 -9
- package/es/radio/index.mjs +1 -1
- package/es/radio-group/RadioGroup.mjs +7 -6
- package/es/radio-group/index.mjs +1 -1
- package/es/rate/Rate.mjs +8 -8
- package/es/rate/index.mjs +1 -1
- package/es/rate/props.mjs +1 -1
- package/es/result/Result.mjs +7 -7
- package/es/result/index.mjs +1 -1
- package/es/ripple/index.mjs +1 -1
- package/es/row/Row.mjs +4 -4
- package/es/row/index.mjs +1 -1
- package/es/select/Select.mjs +13 -13
- package/es/select/index.mjs +1 -1
- package/es/select/props.mjs +1 -1
- package/es/skeleton/Skeleton.mjs +3 -3
- package/es/skeleton/index.mjs +1 -1
- package/es/slider/Slider.mjs +9 -9
- package/es/slider/index.mjs +1 -1
- package/es/snackbar/Snackbar.mjs +1 -1
- package/es/snackbar/core.mjs +8 -8
- package/es/snackbar/index.mjs +9 -8
- package/es/snackbar/props.mjs +1 -1
- package/es/space/Space.mjs +2 -2
- package/es/space/index.mjs +1 -1
- package/es/step/Step.mjs +3 -3
- package/es/step/index.mjs +1 -1
- package/es/step/provide.mjs +1 -1
- package/es/steps/Steps.mjs +3 -3
- package/es/steps/index.mjs +1 -1
- package/es/sticky/Sticky.mjs +7 -7
- package/es/sticky/index.mjs +1 -1
- package/es/style-provider/StyleProvider.mjs +2 -2
- package/es/style-provider/index.mjs +2 -2
- package/es/swipe/Swipe.mjs +10 -10
- package/es/swipe/index.mjs +1 -1
- package/es/swipe-item/SwipeItem.mjs +1 -1
- package/es/swipe-item/index.mjs +1 -1
- package/es/swipe-item/provide.mjs +1 -1
- package/es/switch/Switch.mjs +6 -6
- package/es/switch/index.mjs +1 -1
- package/es/tab/Tab.mjs +4 -4
- package/es/tab/index.mjs +1 -1
- package/es/tab/provide.mjs +1 -1
- package/es/tab-item/TabItem.mjs +3 -3
- package/es/tab-item/index.mjs +1 -1
- package/es/tab-item/provide.mjs +1 -1
- package/es/table/Table.mjs +1 -1
- package/es/table/index.mjs +1 -1
- package/es/tabs/Tabs.mjs +9 -7
- package/es/tabs/index.mjs +1 -1
- package/es/tabs/props.mjs +1 -1
- package/es/tabs-items/TabsItems.mjs +4 -4
- package/es/tabs-items/index.mjs +1 -1
- package/es/themes/dark/index.mjs +33 -33
- package/es/themes/index.mjs +1 -1
- package/es/themes/md3-dark/index.mjs +45 -45
- package/es/themes/md3-light/index.mjs +39 -39
- package/es/time-picker/TimePicker.mjs +48 -24
- package/es/time-picker/clock.mjs +41 -19
- package/es/time-picker/index.mjs +1 -1
- package/es/time-picker/utils.mjs +13 -5
- package/es/tooltip/Tooltip.mjs +2 -2
- package/es/tooltip/index.mjs +1 -1
- package/es/uploader/Uploader.mjs +14 -14
- package/es/uploader/index.mjs +1 -1
- package/es/utils/components.mjs +5 -5
- package/es/utils/elements.mjs +9 -9
- package/es/utils/test.mjs +1 -1
- package/es/varlet.esm.js +20946 -20941
- package/es/watermark/Watermark.mjs +15 -17
- package/es/watermark/index.mjs +1 -1
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +25205 -25003
- package/package.json +34 -34
- package/types/actionSheet.d.ts +2 -2
- package/types/alert.d.ts +1 -1
- package/types/appBar.d.ts +1 -1
- package/types/autoComplete.d.ts +4 -4
- package/types/avatar.d.ts +1 -1
- package/types/avatarGroup.d.ts +1 -1
- package/types/backTop.d.ts +1 -1
- package/types/badge.d.ts +1 -1
- package/types/bottomNavigation.d.ts +2 -2
- package/types/bottomNavigationItem.d.ts +2 -2
- package/types/breadcrumb.d.ts +1 -1
- package/types/breadcrumbs.d.ts +1 -1
- package/types/button.d.ts +5 -5
- package/types/buttonGroup.d.ts +2 -2
- package/types/card.d.ts +1 -1
- package/types/cell.d.ts +1 -1
- package/types/checkbox.d.ts +1 -1
- package/types/checkboxGroup.d.ts +2 -2
- package/types/chip.d.ts +3 -3
- package/types/code.d.ts +1 -1
- package/types/col.d.ts +1 -1
- package/types/collapse.d.ts +1 -1
- package/types/collapseItem.d.ts +1 -1
- package/types/collapseTransition.d.ts +1 -1
- package/types/countTo.d.ts +1 -1
- package/types/countdown.d.ts +1 -1
- package/types/counter.d.ts +1 -1
- package/types/datePicker.d.ts +1 -1
- package/types/dialog.d.ts +1 -1
- package/types/divider.d.ts +1 -1
- package/types/drag.d.ts +1 -1
- package/types/ellipsis.d.ts +1 -1
- package/types/fab.d.ts +2 -2
- package/types/floatingPanel.d.ts +2 -2
- package/types/form.d.ts +1 -1
- package/types/formDetails.d.ts +1 -1
- package/types/highlighterProvider.d.ts +1 -1
- package/types/hover.d.ts +1 -1
- package/types/hoverOverlay.d.ts +1 -1
- package/types/icon.d.ts +1 -1
- package/types/image.d.ts +2 -2
- package/types/imagePreview.d.ts +2 -2
- package/types/indexAnchor.d.ts +1 -1
- package/types/indexBar.d.ts +1 -1
- package/types/input.d.ts +4 -4
- package/types/link.d.ts +1 -1
- package/types/list.d.ts +1 -1
- package/types/loading.d.ts +1 -1
- package/types/localeProvider.d.ts +2 -2
- package/types/menu.d.ts +2 -2
- package/types/menuOption.d.ts +1 -1
- package/types/menuSelect.d.ts +2 -2
- package/types/option.d.ts +1 -1
- package/types/overlay.d.ts +2 -2
- package/types/pagination.d.ts +1 -1
- package/types/paper.d.ts +1 -1
- package/types/picker.d.ts +3 -3
- package/types/popup.d.ts +2 -2
- package/types/progress.d.ts +1 -1
- package/types/pullRefresh.d.ts +1 -1
- package/types/radio.d.ts +1 -1
- package/types/radioGroup.d.ts +3 -3
- package/types/rate.d.ts +1 -1
- package/types/result.d.ts +1 -1
- package/types/row.d.ts +1 -1
- package/types/select.d.ts +3 -3
- package/types/skeleton.d.ts +1 -1
- package/types/slider.d.ts +4 -4
- package/types/snackbar.d.ts +2 -2
- package/types/space.d.ts +1 -1
- package/types/step.d.ts +1 -1
- package/types/steps.d.ts +3 -3
- package/types/sticky.d.ts +1 -1
- package/types/styleProvider.d.ts +2 -2
- package/types/swipe.d.ts +1 -1
- package/types/swipeItem.d.ts +1 -1
- package/types/switch.d.ts +1 -1
- package/types/tab.d.ts +1 -1
- package/types/tabItem.d.ts +1 -1
- package/types/table.d.ts +1 -1
- package/types/tabs.d.ts +3 -3
- package/types/tabsItems.d.ts +2 -2
- package/types/timePicker.d.ts +1 -1
- package/types/tooltip.d.ts +2 -2
- package/types/uploader.d.ts +2 -2
- package/types/watermark.d.ts +1 -1
- package/umd/varlet.js +7 -7
|
@@ -34,13 +34,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34
34
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
import VarMenu from "../menu/Menu.mjs";
|
|
38
|
-
import VarMenuOption from "../menu-option/MenuOption.mjs";
|
|
39
37
|
import { defineComponent, ref, watch } from "vue";
|
|
38
|
+
import { call, raf } from "@varlet/shared";
|
|
39
|
+
import VarMenuOption from "../menu-option/MenuOption.mjs";
|
|
40
|
+
import VarMenu from "../menu/Menu.mjs";
|
|
40
41
|
import { createNamespace, defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
41
|
-
import { props as menuSelectProps } from "./props.mjs";
|
|
42
42
|
import { focusChildElementByKey } from "../utils/elements.mjs";
|
|
43
|
-
import {
|
|
43
|
+
import { props as menuSelectProps } from "./props.mjs";
|
|
44
44
|
const { name, n } = createNamespace("menu-children");
|
|
45
45
|
import { resolveComponent as _resolveComponent, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, withCtx as _withCtx, createSlots as _createSlots } from "vue";
|
|
46
46
|
const _hoisted_1 = { ref: "menuOptions" };
|
|
@@ -50,6 +50,8 @@ function __render__(_ctx, _cache) {
|
|
|
50
50
|
const _component_var_menu = _resolveComponent("var-menu");
|
|
51
51
|
return _openBlock(), _createBlock(_component_var_menu, {
|
|
52
52
|
ref: "menu",
|
|
53
|
+
show: _ctx.show,
|
|
54
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.show = $event),
|
|
53
55
|
trigger: "hover",
|
|
54
56
|
placement: "right-start",
|
|
55
57
|
"cascade-optimization": "",
|
|
@@ -57,9 +59,7 @@ function __render__(_ctx, _cache) {
|
|
|
57
59
|
class: _normalizeClass(_ctx.n()),
|
|
58
60
|
disabled: _ctx.disabled,
|
|
59
61
|
teleport: false,
|
|
60
|
-
"close-on-click-reference": false
|
|
61
|
-
show: _ctx.show,
|
|
62
|
-
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.show = $event)
|
|
62
|
+
"close-on-click-reference": false
|
|
63
63
|
}, _createSlots({
|
|
64
64
|
default: _withCtx(() => [
|
|
65
65
|
_createVNode(_component_var_menu_option, {
|
|
@@ -88,32 +88,32 @@ function __render__(_ctx, _cache) {
|
|
|
88
88
|
(_openBlock(true), _createElementBlock(
|
|
89
89
|
_Fragment,
|
|
90
90
|
null,
|
|
91
|
-
_renderList(_ctx.options, (
|
|
91
|
+
_renderList(_ctx.options, (menuOption) => {
|
|
92
92
|
return _openBlock(), _createElementBlock(
|
|
93
93
|
_Fragment,
|
|
94
94
|
{
|
|
95
|
-
key:
|
|
95
|
+
key: menuOption[_ctx.valueKey]
|
|
96
96
|
},
|
|
97
97
|
[
|
|
98
|
-
|
|
98
|
+
menuOption[_ctx.childrenKey] ? (_openBlock(), _createBlock(_component_var_menu_children, {
|
|
99
99
|
key: 0,
|
|
100
100
|
ref_for: true,
|
|
101
101
|
ref: "menuChildren",
|
|
102
102
|
"parent-show": _ctx.show,
|
|
103
|
-
option,
|
|
104
|
-
options:
|
|
103
|
+
option: menuOption,
|
|
104
|
+
options: menuOption[_ctx.childrenKey],
|
|
105
105
|
"highlight-options": _ctx.highlightOptions,
|
|
106
|
-
disabled:
|
|
106
|
+
disabled: menuOption.disabled,
|
|
107
107
|
onKeyArrowX: _ctx.handleArrowLeft,
|
|
108
|
-
onKeyArrowRightOpen: ($event) => _ctx.allowChildrenClose(
|
|
109
|
-
onMouseenter: ($event) => _ctx.allowChildrenClose(
|
|
108
|
+
onKeyArrowRightOpen: ($event) => _ctx.allowChildrenClose(menuOption),
|
|
109
|
+
onMouseenter: ($event) => _ctx.allowChildrenClose(menuOption)
|
|
110
110
|
}, null, 8, ["parent-show", "option", "options", "highlight-options", "disabled", "onKeyArrowX", "onKeyArrowRightOpen", "onMouseenter"])) : (_openBlock(), _createBlock(_component_var_menu_option, {
|
|
111
111
|
key: 1,
|
|
112
|
-
label:
|
|
113
|
-
value:
|
|
114
|
-
option,
|
|
115
|
-
ripple:
|
|
116
|
-
disabled:
|
|
112
|
+
label: menuOption[_ctx.labelKey],
|
|
113
|
+
value: menuOption[_ctx.valueKey],
|
|
114
|
+
option: menuOption,
|
|
115
|
+
ripple: menuOption.ripple,
|
|
116
|
+
disabled: menuOption.disabled,
|
|
117
117
|
onKeyArrowX: _ctx.handleArrowLeft,
|
|
118
118
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => _ctx.allowChildrenClose())
|
|
119
119
|
}, null, 8, ["label", "value", "option", "ripple", "disabled", "onKeyArrowX"]))
|
|
@@ -132,7 +132,7 @@ function __render__(_ctx, _cache) {
|
|
|
132
132
|
]),
|
|
133
133
|
key: "0"
|
|
134
134
|
} : void 0
|
|
135
|
-
]), 1032, ["
|
|
135
|
+
]), 1032, ["show", "class", "disabled"]);
|
|
136
136
|
}
|
|
137
137
|
const __sfc__ = defineComponent({
|
|
138
138
|
name,
|
|
@@ -17,17 +17,17 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { computed, defineComponent, ref } from "vue";
|
|
21
|
+
import { call, preventDefault } from "@varlet/shared";
|
|
22
|
+
import { useEventListener, useVModel } from "@varlet/use";
|
|
20
23
|
import VarMenu from "../menu/index.mjs";
|
|
21
24
|
import VarMenuOption from "../menu-option/index.mjs";
|
|
25
|
+
import { useSelectController } from "../select/useSelectController.mjs";
|
|
26
|
+
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
27
|
+
import { focusChildElementByKey } from "../utils/elements.mjs";
|
|
22
28
|
import VarMenuChildren from "./MenuChildren.mjs";
|
|
23
|
-
import { defineComponent, computed, ref } from "vue";
|
|
24
29
|
import { props } from "./props.mjs";
|
|
25
|
-
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
26
30
|
import { useMenuOptions } from "./provide.mjs";
|
|
27
|
-
import { useSelectController } from "../select/useSelectController.mjs";
|
|
28
|
-
import { call, preventDefault } from "@varlet/shared";
|
|
29
|
-
import { useEventListener, useVModel } from "@varlet/use";
|
|
30
|
-
import { focusChildElementByKey } from "../utils/elements.mjs";
|
|
31
31
|
const { name, n, classes } = createNamespace("menu-select");
|
|
32
32
|
import { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, withCtx as _withCtx } from "vue";
|
|
33
33
|
function __render__(_ctx, _cache) {
|
|
@@ -36,6 +36,8 @@ function __render__(_ctx, _cache) {
|
|
|
36
36
|
const _component_var_menu = _resolveComponent("var-menu");
|
|
37
37
|
return _openBlock(), _createBlock(_component_var_menu, {
|
|
38
38
|
ref: "menu",
|
|
39
|
+
show: _ctx.show,
|
|
40
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.show = $event),
|
|
39
41
|
tabindex: "-1",
|
|
40
42
|
class: _normalizeClass(_ctx.n()),
|
|
41
43
|
disabled: _ctx.disabled,
|
|
@@ -52,8 +54,6 @@ function __render__(_ctx, _cache) {
|
|
|
52
54
|
"popover-class": _ctx.popoverClass,
|
|
53
55
|
"close-on-click-reference": _ctx.closeOnClickReference,
|
|
54
56
|
"close-on-key-escape": false,
|
|
55
|
-
show: _ctx.show,
|
|
56
|
-
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => _ctx.show = $event),
|
|
57
57
|
onOpen: _ctx.onOpen,
|
|
58
58
|
onOpened: _ctx.onOpened,
|
|
59
59
|
onClose: _ctx.onClose,
|
|
@@ -117,7 +117,7 @@ function __render__(_ctx, _cache) {
|
|
|
117
117
|
]),
|
|
118
118
|
_: 3
|
|
119
119
|
/* FORWARDED */
|
|
120
|
-
}, 8, ["class", "disabled", "trigger", "reference", "placement", "strategy", "offset-x", "offset-y", "teleport", "same-width", "elevation", "popover-class", "close-on-click-reference", "
|
|
120
|
+
}, 8, ["show", "class", "disabled", "trigger", "reference", "placement", "strategy", "offset-x", "offset-y", "teleport", "same-width", "elevation", "popover-class", "close-on-click-reference", "onOpen", "onOpened", "onClose", "onClosed", "onClickOutside"]);
|
|
121
121
|
}
|
|
122
122
|
const __sfc__ = defineComponent({
|
|
123
123
|
name,
|
package/es/menu-select/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import MenuSelect from "./MenuSelect.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import MenuSelect from "./MenuSelect.mjs";
|
|
3
3
|
import { props as menuSelectProps } from "./props.mjs";
|
|
4
4
|
withInstall(MenuSelect);
|
|
5
5
|
withPropsDefaultsSetter(MenuSelect, menuSelectProps);
|
package/es/option/Option.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { computed, defineComponent, ref, watch } from "vue";
|
|
2
|
+
import { isFunction, preventDefault } from "@varlet/shared";
|
|
3
|
+
import { useEventListener } from "@varlet/use";
|
|
1
4
|
import VarCheckbox from "../checkbox/index.mjs";
|
|
2
|
-
import Ripple from "../ripple/index.mjs";
|
|
3
5
|
import Hover from "../hover/index.mjs";
|
|
4
6
|
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import { useSelect } from "./provide.mjs";
|
|
7
|
+
import Ripple from "../ripple/index.mjs";
|
|
7
8
|
import { createNamespace, MaybeVNode } from "../utils/components.mjs";
|
|
8
9
|
import { props } from "./props.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import { useEventListener } from "@varlet/use";
|
|
10
|
+
import { useSelect } from "./provide.mjs";
|
|
11
11
|
const { name, n, classes } = createNamespace("option");
|
|
12
12
|
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createVNode as _createVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
13
13
|
const _hoisted_1 = ["tabindex"];
|
package/es/option/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Option from "./Option.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Option from "./Option.mjs";
|
|
3
3
|
import { props as optionProps } from "./props.mjs";
|
|
4
4
|
withInstall(Option);
|
|
5
5
|
withPropsDefaultsSetter(Option, optionProps);
|
package/es/option/provide.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useParent } from "@varlet/use";
|
|
2
1
|
import { assert } from "@varlet/shared";
|
|
2
|
+
import { useParent } from "@varlet/use";
|
|
3
3
|
import { SELECT_BIND_OPTION_KEY } from "../select/provide.mjs";
|
|
4
4
|
function useSelect() {
|
|
5
5
|
const { index, parentProvider, bindParent } = useParent(SELECT_BIND_OPTION_KEY);
|
package/es/overlay/Overlay.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent, Teleport, Transition, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { call, preventDefault } from "@varlet/shared";
|
|
3
|
+
import { useEventListener } from "@varlet/use";
|
|
3
4
|
import { useLock } from "../context/lock.mjs";
|
|
5
|
+
import { useStack } from "../context/stack.mjs";
|
|
4
6
|
import { useZIndex } from "../context/zIndex.mjs";
|
|
5
7
|
import { createNamespace, useTeleport } from "../utils/components.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { useStack } from "../context/stack.mjs";
|
|
8
|
-
import { useEventListener } from "@varlet/use";
|
|
8
|
+
import { props } from "./props.mjs";
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
const {
|
package/es/overlay/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Overlay from "./Overlay.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Overlay from "./Overlay.mjs";
|
|
3
3
|
import { props as overlayProps } from "./props.mjs";
|
|
4
4
|
withInstall(Overlay);
|
|
5
5
|
withPropsDefaultsSetter(Overlay, overlayProps);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import Ripple from "../ripple/index.mjs";
|
|
1
|
+
import { computed, defineComponent, ref, watch } from "vue";
|
|
2
|
+
import { call, isNumber, toNumber } from "@varlet/shared";
|
|
4
3
|
import VarIcon from "../icon/index.mjs";
|
|
5
4
|
import VarInput from "../input/index.mjs";
|
|
6
|
-
import { defineComponent, ref, computed, watch } from "vue";
|
|
7
|
-
import { props } from "./props.mjs";
|
|
8
|
-
import { isNumber, toNumber, call } from "@varlet/shared";
|
|
9
5
|
import { t } from "../locale/index.mjs";
|
|
10
|
-
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
11
6
|
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
7
|
+
import VarMenuOption from "../menu-option/index.mjs";
|
|
8
|
+
import VarMenuSelect from "../menu-select/index.mjs";
|
|
9
|
+
import Ripple from "../ripple/index.mjs";
|
|
10
|
+
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
11
|
+
import { props } from "./props.mjs";
|
|
12
12
|
const { name, n, classes } = createNamespace("pagination");
|
|
13
13
|
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, withKeys as _withKeys, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
14
14
|
const _hoisted_1 = ["item-mode", "onClick"];
|
|
@@ -55,14 +55,14 @@ function __render__(_ctx, _cache) {
|
|
|
55
55
|
},
|
|
56
56
|
[
|
|
57
57
|
_createVNode(_component_var_input, {
|
|
58
|
+
modelValue: _ctx.simpleCurrentValue,
|
|
59
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.simpleCurrentValue = $event),
|
|
58
60
|
"var-pagination-cover": "",
|
|
59
61
|
hint: false,
|
|
60
62
|
disabled: _ctx.disabled,
|
|
61
|
-
modelValue: _ctx.simpleCurrentValue,
|
|
62
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.simpleCurrentValue = $event),
|
|
63
63
|
onBlur: _cache[2] || (_cache[2] = ($event) => _ctx.setPage("simple", _ctx.simpleCurrentValue, $event)),
|
|
64
64
|
onKeydown: _cache[3] || (_cache[3] = _withKeys(($event) => _ctx.setPage("simple", _ctx.simpleCurrentValue, $event), ["enter"]))
|
|
65
|
-
}, null, 8, ["
|
|
65
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
66
66
|
_createElementVNode("span", null, [
|
|
67
67
|
_createTextVNode(
|
|
68
68
|
" / " + _toDisplayString(_ctx.pageCount) + " ",
|
|
@@ -144,10 +144,10 @@ function __render__(_ctx, _cache) {
|
|
|
144
144
|
},
|
|
145
145
|
[
|
|
146
146
|
_createVNode(_component_var_menu_select, {
|
|
147
|
-
placement: "cover-top",
|
|
148
|
-
disabled: _ctx.disabled,
|
|
149
147
|
modelValue: _ctx.size,
|
|
150
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.size = $event)
|
|
148
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.size = $event),
|
|
149
|
+
placement: "cover-top",
|
|
150
|
+
disabled: _ctx.disabled
|
|
151
151
|
}, {
|
|
152
152
|
options: _withCtx(() => [
|
|
153
153
|
(_openBlock(true), _createElementBlock(
|
|
@@ -200,7 +200,7 @@ function __render__(_ctx, _cache) {
|
|
|
200
200
|
]),
|
|
201
201
|
_: 1
|
|
202
202
|
/* STABLE */
|
|
203
|
-
}, 8, ["
|
|
203
|
+
}, 8, ["modelValue", "disabled"])
|
|
204
204
|
],
|
|
205
205
|
2
|
|
206
206
|
/* CLASS */
|
|
@@ -291,7 +291,9 @@ const __sfc__ = defineComponent({
|
|
|
291
291
|
simpleCurrentValue.value = `${newCurrent}`;
|
|
292
292
|
if (newCount - 2 > maxPagerCount) {
|
|
293
293
|
if (oldCurrent === void 0 || newCount !== oldCount) {
|
|
294
|
-
for (let i = 2; i < maxPagerCount + 2; i++)
|
|
294
|
+
for (let i = 2; i < maxPagerCount + 2; i++) {
|
|
295
|
+
list.push(i);
|
|
296
|
+
}
|
|
295
297
|
}
|
|
296
298
|
if (newCurrent <= maxPagerCount && newCurrent < rEllipseSign) {
|
|
297
299
|
list = [];
|
|
@@ -319,7 +321,9 @@ const __sfc__ = defineComponent({
|
|
|
319
321
|
}
|
|
320
322
|
list = [1, "...", ...list, "...", newCount];
|
|
321
323
|
} else {
|
|
322
|
-
for (let i = 1; i <= newCount; i++)
|
|
324
|
+
for (let i = 1; i <= newCount; i++) {
|
|
325
|
+
list.push(i);
|
|
326
|
+
}
|
|
323
327
|
}
|
|
324
328
|
pageList.value = list;
|
|
325
329
|
if (oldCurrent != null && newCount > 0) {
|
|
@@ -333,11 +337,15 @@ const __sfc__ = defineComponent({
|
|
|
333
337
|
}
|
|
334
338
|
);
|
|
335
339
|
function isHideEllipsis(item, index) {
|
|
336
|
-
if (isNumber(item))
|
|
340
|
+
if (isNumber(item)) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
337
343
|
return index === 1 ? isHideEllipsisHead.value : isHideEllipsisTail.value;
|
|
338
344
|
}
|
|
339
345
|
function getMode(item, index) {
|
|
340
|
-
if (isNumber(item))
|
|
346
|
+
if (isNumber(item)) {
|
|
347
|
+
return "basic";
|
|
348
|
+
}
|
|
341
349
|
return index === 1 ? "head" : "tail";
|
|
342
350
|
}
|
|
343
351
|
function clickItem(item, index) {
|
package/es/pagination/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Pagination from "./Pagination.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Pagination from "./Pagination.mjs";
|
|
3
3
|
import { props as paginationProps } from "./props.mjs";
|
|
4
4
|
withInstall(Pagination);
|
|
5
5
|
withPropsDefaultsSetter(Pagination, paginationProps);
|
package/es/paper/Paper.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import Ripple from "../ripple/index.mjs";
|
|
2
1
|
import { defineComponent } from "vue";
|
|
2
|
+
import { call } from "@varlet/shared";
|
|
3
|
+
import Ripple from "../ripple/index.mjs";
|
|
3
4
|
import { createNamespace, formatElevation } from "../utils/components.mjs";
|
|
4
|
-
import { props } from "./props.mjs";
|
|
5
5
|
import { toSizeUnit } from "../utils/elements.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { props } from "./props.mjs";
|
|
7
7
|
const { name, n, classes } = createNamespace("paper");
|
|
8
8
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
9
9
|
function __render__(_ctx, _cache) {
|
package/es/paper/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Paper from "./Paper.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Paper from "./Paper.mjs";
|
|
3
3
|
import { props as paperProps } from "./props.mjs";
|
|
4
4
|
withInstall(Paper);
|
|
5
5
|
withPropsDefaultsSetter(Paper, paperProps);
|
package/es/picker/Picker.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { defineComponent, watch, ref, computed, Transition } from "vue";
|
|
4
|
-
import { props } from "./props.mjs";
|
|
1
|
+
import { computed, defineComponent, ref, Transition, watch } from "vue";
|
|
2
|
+
import { call, clamp, clampArrayRange, toNumber } from "@varlet/shared";
|
|
5
3
|
import { useTouch, useVModel } from "@varlet/use";
|
|
6
|
-
import
|
|
7
|
-
import { toPxNum, getTranslateY } from "../utils/elements.mjs";
|
|
4
|
+
import VarButton from "../button/index.mjs";
|
|
8
5
|
import { t } from "../locale/index.mjs";
|
|
9
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
10
6
|
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
7
|
+
import VarPopup from "../popup/index.mjs";
|
|
8
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
9
|
+
import { getTranslateY, toPxNum } from "../utils/elements.mjs";
|
|
10
|
+
import { props } from "./props.mjs";
|
|
11
11
|
const { name, n, classes } = createNamespace("picker");
|
|
12
12
|
const MOMENTUM_RECORD_TIME = 300;
|
|
13
13
|
const MOMENTUM_ALLOW_DISTANCE = 15;
|
|
@@ -131,16 +131,16 @@ function __render__(_ctx, _cache) {
|
|
|
131
131
|
null,
|
|
132
132
|
_renderList(_ctx.scrollColumns, (c) => {
|
|
133
133
|
return _openBlock(), _createElementBlock("div", {
|
|
134
|
-
class: _normalizeClass(_ctx.n("column")),
|
|
135
134
|
key: c.id,
|
|
135
|
+
class: _normalizeClass(_ctx.n("column")),
|
|
136
136
|
onTouchstartPassive: ($event) => _ctx.handleTouchstart($event, c),
|
|
137
137
|
onTouchmove: _withModifiers(($event) => _ctx.handleTouchmove($event, c), ["prevent"]),
|
|
138
138
|
onTouchend: ($event) => _ctx.handleTouchend(c)
|
|
139
139
|
}, [
|
|
140
140
|
_createElementVNode("div", {
|
|
141
|
-
class: _normalizeClass(_ctx.n("scroller")),
|
|
142
141
|
ref_for: true,
|
|
143
142
|
ref: (el) => _ctx.setScrollEl(el, c),
|
|
143
|
+
class: _normalizeClass(_ctx.n("scroller")),
|
|
144
144
|
style: _normalizeStyle({
|
|
145
145
|
transform: `translateY(${c.translate}px)`,
|
|
146
146
|
transitionDuration: `${c.duration}ms`,
|
package/es/picker/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import VarPicker from "./Picker.mjs";
|
|
2
1
|
import { nextTick, reactive } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { call, isArray } from "@varlet/shared";
|
|
4
3
|
import { mountInstance, withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
4
|
+
import VarPicker from "./Picker.mjs";
|
|
5
5
|
import { props as pickerProps } from "./props.mjs";
|
|
6
6
|
let singletonOptions;
|
|
7
7
|
function Picker(options) {
|
package/es/picker/props.mjs
CHANGED
|
@@ -14,8 +14,8 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
18
17
|
import { popupProps } from "../popup/index.mjs";
|
|
18
|
+
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
19
19
|
const props = __spreadValues({
|
|
20
20
|
modelValue: {
|
|
21
21
|
type: Array,
|
package/es/popup/Popup.mjs
CHANGED
|
@@ -14,15 +14,15 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { defineComponent,
|
|
18
|
-
import {
|
|
17
|
+
import { computed, defineComponent, Teleport, Transition, watch, createVNode as _createVNode, vShow as _vShow, mergeProps as _mergeProps, withDirectives as _withDirectives } from "vue";
|
|
18
|
+
import { call, preventDefault } from "@varlet/shared";
|
|
19
|
+
import { useEventListener, useInitialized } from "@varlet/use";
|
|
19
20
|
import { useLock } from "../context/lock.mjs";
|
|
20
|
-
import { useZIndex } from "../context/zIndex.mjs";
|
|
21
21
|
import { useStack } from "../context/stack.mjs";
|
|
22
|
-
import {
|
|
22
|
+
import { useZIndex } from "../context/zIndex.mjs";
|
|
23
|
+
import { createNamespace, useRouteListener, useTeleport } from "../utils/components.mjs";
|
|
24
|
+
import { props } from "./props.mjs";
|
|
23
25
|
import { usePopupItems } from "./provide.mjs";
|
|
24
|
-
import { useEventListener, useInitialized } from "@varlet/use";
|
|
25
|
-
import { call, preventDefault } from "@varlet/shared";
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
const {
|
package/es/popup/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Popup from "./Popup.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Popup from "./Popup.mjs";
|
|
3
3
|
import { props as popupProps } from "./props.mjs";
|
|
4
4
|
withInstall(Popup);
|
|
5
5
|
withPropsDefaultsSetter(Popup, popupProps);
|
package/es/progress/Progress.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { isPlainObject, toNumber, clamp } from "@varlet/shared";
|
|
1
|
+
import { computed, defineComponent } from "vue";
|
|
2
|
+
import { clamp, isPlainObject, toNumber } from "@varlet/shared";
|
|
4
3
|
import { useClientId } from "@varlet/use";
|
|
5
|
-
import { toSizeUnit, toPxNum } from "../utils/elements.mjs";
|
|
6
4
|
import { createNamespace } from "../utils/components.mjs";
|
|
5
|
+
import { toPxNum, toSizeUnit } from "../utils/elements.mjs";
|
|
6
|
+
import { props } from "./props.mjs";
|
|
7
7
|
const MAX = 100;
|
|
8
8
|
const MIN = 0;
|
|
9
9
|
const RADIUS = 20;
|
package/es/progress/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Progress from "./Progress.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Progress from "./Progress.mjs";
|
|
3
3
|
import { props as progressProps } from "./props.mjs";
|
|
4
4
|
withInstall(Progress);
|
|
5
5
|
withPropsDefaultsSetter(Progress, progressProps);
|
|
@@ -18,13 +18,13 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
+
import { computed, defineComponent, nextTick, ref, watch } from "vue";
|
|
22
|
+
import { call, getRect, getScrollTop, isNumber, isString, preventDefault, toNumber } from "@varlet/shared";
|
|
23
|
+
import { onSmartMounted, useEventListener, useTouch } from "@varlet/use";
|
|
21
24
|
import VarIcon from "../icon/index.mjs";
|
|
22
|
-
import {
|
|
25
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
23
26
|
import { getParentScroller, getTarget } from "../utils/elements.mjs";
|
|
24
27
|
import { props } from "./props.mjs";
|
|
25
|
-
import { isNumber, isString, toNumber, getRect, preventDefault, getScrollTop, call } from "@varlet/shared";
|
|
26
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
27
|
-
import { useEventListener, onSmartMounted, useTouch } from "@varlet/use";
|
|
28
28
|
const { name, n, classes } = createNamespace("pull-refresh");
|
|
29
29
|
const ICON_TRANSITION = 150;
|
|
30
30
|
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
@@ -108,14 +108,12 @@ const __sfc__ = defineComponent({
|
|
|
108
108
|
onSmartMounted(setScroller);
|
|
109
109
|
useEventListener(freshNode, "touchmove", handleTouchmove);
|
|
110
110
|
function startIconTransition(name2) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
window.setTimeout(resolve, ICON_TRANSITION);
|
|
118
|
-
});
|
|
111
|
+
if (iconName.value === name2) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
iconName.value = name2;
|
|
115
|
+
return new Promise((resolve) => {
|
|
116
|
+
window.setTimeout(resolve, ICON_TRANSITION);
|
|
119
117
|
});
|
|
120
118
|
}
|
|
121
119
|
function lockEvent(action) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import PullRefresh from "./PullRefresh.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
3
2
|
import { props as pullRefreshProps } from "./props.mjs";
|
|
3
|
+
import PullRefresh from "./PullRefresh.mjs";
|
|
4
4
|
withInstall(PullRefresh);
|
|
5
5
|
withPropsDefaultsSetter(PullRefresh, pullRefreshProps);
|
|
6
6
|
const _PullRefreshComponent = PullRefresh;
|
package/es/radio/Radio.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { computed, defineComponent, nextTick, ref } from "vue";
|
|
2
|
+
import { call, preventDefault } from "@varlet/shared";
|
|
3
|
+
import { useEventListener, useVModel } from "@varlet/use";
|
|
2
4
|
import VarFormDetails from "../form-details/index.mjs";
|
|
3
|
-
import
|
|
5
|
+
import { useForm } from "../form/provide.mjs";
|
|
4
6
|
import Hover from "../hover/index.mjs";
|
|
5
7
|
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
6
|
-
import
|
|
8
|
+
import VarIcon from "../icon/index.mjs";
|
|
9
|
+
import Ripple from "../ripple/index.mjs";
|
|
10
|
+
import { createNamespace, useValidation } from "../utils/components.mjs";
|
|
7
11
|
import { props } from "./props.mjs";
|
|
8
|
-
import { useValidation, createNamespace } from "../utils/components.mjs";
|
|
9
12
|
import { useRadioGroup } from "./provide.mjs";
|
|
10
|
-
import { useForm } from "../form/provide.mjs";
|
|
11
|
-
import { call, preventDefault } from "@varlet/shared";
|
|
12
|
-
import { useEventListener, useVModel } from "@varlet/use";
|
|
13
13
|
const { name, n, classes } = createNamespace("radio");
|
|
14
14
|
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives, mergeProps as _mergeProps, createElementVNode as _createElementVNode } from "vue";
|
|
15
15
|
const _hoisted_1 = ["tabindex"];
|
|
@@ -28,9 +28,10 @@ function __render__(_ctx, _cache) {
|
|
|
28
28
|
_createElementVNode(
|
|
29
29
|
"div",
|
|
30
30
|
_mergeProps({
|
|
31
|
-
class: _ctx.n()
|
|
31
|
+
class: _ctx.n()
|
|
32
|
+
}, _ctx.$attrs, {
|
|
32
33
|
onClick: _cache[3] || (_cache[3] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
33
|
-
}
|
|
34
|
+
}),
|
|
34
35
|
[
|
|
35
36
|
_withDirectives((_openBlock(), _createElementBlock("div", {
|
|
36
37
|
ref: "action",
|
package/es/radio/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Radio from "./Radio.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
3
2
|
import { props as radioProps } from "./props.mjs";
|
|
3
|
+
import Radio from "./Radio.mjs";
|
|
4
4
|
withInstall(Radio);
|
|
5
5
|
withPropsDefaultsSetter(Radio, radioProps);
|
|
6
6
|
const _RadioComponent = Radio;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { computed, defineComponent, nextTick, watch } from "vue";
|
|
2
|
+
import { call, isFunction, preventDefault } from "@varlet/shared";
|
|
3
|
+
import { useEventListener } from "@varlet/use";
|
|
1
4
|
import VarFormDetails from "../form-details/index.mjs";
|
|
5
|
+
import { useForm } from "../form/provide.mjs";
|
|
2
6
|
import VarRadio from "../radio/index.mjs";
|
|
3
|
-
import {
|
|
7
|
+
import { createNamespace, MaybeVNode, useValidation } from "../utils/components.mjs";
|
|
4
8
|
import { props } from "./props.mjs";
|
|
5
|
-
import { useValidation, createNamespace, MaybeVNode } from "../utils/components.mjs";
|
|
6
9
|
import { useRadios } from "./provide.mjs";
|
|
7
|
-
import { useForm } from "../form/provide.mjs";
|
|
8
|
-
import { call, preventDefault, isFunction } from "@varlet/shared";
|
|
9
|
-
import { useEventListener } from "@varlet/use";
|
|
10
10
|
const { name, n, classes } = createNamespace("radio-group");
|
|
11
11
|
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode } from "vue";
|
|
12
12
|
function __render__(_ctx, _cache) {
|
|
@@ -105,7 +105,8 @@ const __sfc__ = defineComponent({
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
function moveRadio(fromIndex, method) {
|
|
108
|
-
|
|
108
|
+
const looping = true;
|
|
109
|
+
while (looping) {
|
|
109
110
|
if (method === "prev") {
|
|
110
111
|
fromIndex--;
|
|
111
112
|
} else {
|
package/es/radio-group/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import RadioGroup from "./RadioGroup.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
3
2
|
import { props as radioGroupProps } from "./props.mjs";
|
|
3
|
+
import RadioGroup from "./RadioGroup.mjs";
|
|
4
4
|
withInstall(RadioGroup);
|
|
5
5
|
withPropsDefaultsSetter(RadioGroup, radioGroupProps);
|
|
6
6
|
const _RadioGroupComponent = RadioGroup;
|
package/es/rate/Rate.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import VarIcon from "../icon/index.mjs";
|
|
2
|
-
import VarFormDetails from "../form-details/index.mjs";
|
|
3
|
-
import Ripple from "../ripple/index.mjs";
|
|
4
|
-
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
5
|
-
import Hover from "../hover/index.mjs";
|
|
6
1
|
import { defineComponent, nextTick, ref } from "vue";
|
|
2
|
+
import { call, toNumber } from "@varlet/shared";
|
|
3
|
+
import VarFormDetails from "../form-details/index.mjs";
|
|
7
4
|
import { useForm } from "../form/provide.mjs";
|
|
8
|
-
import
|
|
5
|
+
import Hover from "../hover/index.mjs";
|
|
6
|
+
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
7
|
+
import VarIcon from "../icon/index.mjs";
|
|
8
|
+
import Ripple from "../ripple/index.mjs";
|
|
9
|
+
import { createNamespace, useValidation } from "../utils/components.mjs";
|
|
9
10
|
import { toSizeUnit } from "../utils/elements.mjs";
|
|
10
|
-
import { toNumber, call } from "@varlet/shared";
|
|
11
11
|
import { props } from "./props.mjs";
|
|
12
12
|
const { name, n } = createNamespace("rate");
|
|
13
13
|
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createVNode as _createVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode } from "vue";
|
|
@@ -156,7 +156,7 @@ const __sfc__ = defineComponent({
|
|
|
156
156
|
return v(props2.rules, props2.modelValue);
|
|
157
157
|
}
|
|
158
158
|
function validateWithTrigger() {
|
|
159
|
-
|
|
159
|
+
nextTick(() => vt(["onChange"], "onChange", props2.rules, props2.modelValue));
|
|
160
160
|
}
|
|
161
161
|
function handleClick(score, event) {
|
|
162
162
|
const { readonly, disabled } = props2;
|