@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { computed, defineComponent, ref } from "vue";
|
|
2
|
+
import { call, clamp, preventDefault, toNumber } from "@varlet/shared";
|
|
3
|
+
import { useEventListener, useTouch, useVModel } from "@varlet/use";
|
|
3
4
|
import VarIcon from "../icon/index.mjs";
|
|
4
5
|
import VarPopup from "../popup/index.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useEventListener, useTouch, useVModel } from "@varlet/use";
|
|
8
|
-
import { props } from "./props.mjs";
|
|
6
|
+
import VarSwipe from "../swipe/index.mjs";
|
|
7
|
+
import VarSwipeItem from "../swipe-item/index.mjs";
|
|
9
8
|
import { createNamespace } from "../utils/components.mjs";
|
|
9
|
+
import { props } from "./props.mjs";
|
|
10
10
|
const { name, n, classes } = createNamespace("image-preview");
|
|
11
11
|
const DISTANCE_OFFSET = 12;
|
|
12
12
|
const EVENT_DELAY = 200;
|
|
@@ -23,6 +23,8 @@ function __render__(_ctx, _cache) {
|
|
|
23
23
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
24
24
|
const _component_var_popup = _resolveComponent("var-popup");
|
|
25
25
|
return _openBlock(), _createBlock(_component_var_popup, {
|
|
26
|
+
show: _ctx.show,
|
|
27
|
+
"onUpdate:show": _cache[3] || (_cache[3] = ($event) => _ctx.show = $event),
|
|
26
28
|
"var-image-preview-cover": "",
|
|
27
29
|
class: _normalizeClass(_ctx.n("popup")),
|
|
28
30
|
transition: _ctx.n("$-fade"),
|
|
@@ -31,8 +33,6 @@ function __render__(_ctx, _cache) {
|
|
|
31
33
|
"close-on-key-escape": _ctx.closeOnKeyEscape,
|
|
32
34
|
"lock-scroll": _ctx.lockScroll,
|
|
33
35
|
teleport: _ctx.teleport,
|
|
34
|
-
show: _ctx.show,
|
|
35
|
-
"onUpdate:show": _cache[3] || (_cache[3] = ($event) => _ctx.show = $event),
|
|
36
36
|
onOpen: _ctx.onOpen,
|
|
37
37
|
onClose: _ctx.onClose,
|
|
38
38
|
onClosed: _ctx.onClosed,
|
|
@@ -48,18 +48,17 @@ function __render__(_ctx, _cache) {
|
|
|
48
48
|
touchable: _ctx.canSwipe,
|
|
49
49
|
indicator: _ctx.indicator && _ctx.images.length > 1,
|
|
50
50
|
"initial-index": _ctx.toNumber(_ctx.initialIndex),
|
|
51
|
-
loop: _ctx.loop
|
|
52
|
-
|
|
53
|
-
}, _ctx.$attrs), {
|
|
51
|
+
loop: _ctx.loop
|
|
52
|
+
}, _ctx.$attrs, { onChange: _ctx.onChange }), {
|
|
54
53
|
default: _withCtx(() => [
|
|
55
54
|
(_openBlock(true), _createElementBlock(
|
|
56
55
|
_Fragment,
|
|
57
56
|
null,
|
|
58
57
|
_renderList(_ctx.images, (image, idx) => {
|
|
59
58
|
return _openBlock(), _createBlock(_component_var_swipe_item, {
|
|
59
|
+
key: image,
|
|
60
60
|
class: _normalizeClass(_ctx.n("swipe-item")),
|
|
61
|
-
"var-image-preview-cover": ""
|
|
62
|
-
key: image
|
|
61
|
+
"var-image-preview-cover": ""
|
|
63
62
|
}, {
|
|
64
63
|
default: _withCtx(() => [
|
|
65
64
|
_createElementVNode("div", {
|
|
@@ -134,7 +133,7 @@ function __render__(_ctx, _cache) {
|
|
|
134
133
|
]),
|
|
135
134
|
_: 3
|
|
136
135
|
/* FORWARDED */
|
|
137
|
-
}, 8, ["class", "transition", "close-on-key-escape", "lock-scroll", "teleport", "
|
|
136
|
+
}, 8, ["show", "class", "transition", "close-on-key-escape", "lock-scroll", "teleport", "onOpen", "onClose", "onClosed", "onOpened", "onKeyEscape", "onRouteChange"]);
|
|
138
137
|
}
|
|
139
138
|
const __sfc__ = defineComponent({
|
|
140
139
|
name,
|
|
@@ -17,10 +17,10 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import VarImagePreview from "./ImagePreview.mjs";
|
|
21
20
|
import { nextTick, reactive } from "vue";
|
|
22
|
-
import { inBrowser, isArray, isString
|
|
21
|
+
import { call, inBrowser, isArray, isString } from "@varlet/shared";
|
|
23
22
|
import { mountInstance, withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
23
|
+
import VarImagePreview from "./ImagePreview.mjs";
|
|
24
24
|
import { props as imagePreviewProps } from "./props.mjs";
|
|
25
25
|
let singletonOptions;
|
|
26
26
|
let defaultOptions = {};
|
|
@@ -14,9 +14,9 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
18
|
-
import { swipeProps } from "../swipe/index.mjs";
|
|
19
17
|
import { popupProps } from "../popup/index.mjs";
|
|
18
|
+
import { swipeProps } from "../swipe/index.mjs";
|
|
19
|
+
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
20
20
|
const props = __spreadValues(__spreadValues({
|
|
21
21
|
show: Boolean,
|
|
22
22
|
imagePreventDefault: Boolean,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import VarSticky from "../sticky/index.mjs";
|
|
2
1
|
import { computed, defineComponent, ref, Transition } from "vue";
|
|
3
|
-
import
|
|
4
|
-
import { props } from "./props.mjs";
|
|
2
|
+
import VarSticky from "../sticky/index.mjs";
|
|
5
3
|
import { createNamespace } from "../utils/components.mjs";
|
|
4
|
+
import { props } from "./props.mjs";
|
|
5
|
+
import { useIndexBar } from "./provide.mjs";
|
|
6
6
|
const { name, n, classes } = createNamespace("index-anchor");
|
|
7
7
|
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, mergeProps as _mergeProps, createElementVNode as _createElementVNode, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
8
8
|
function __render__(_ctx, _cache) {
|
|
9
9
|
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.sticky ? _ctx.n("$-sticky") : _ctx.Transition), {
|
|
10
|
+
ref: "anchorEl",
|
|
10
11
|
"offset-top": _ctx.sticky ? _ctx.stickyOffsetTop : null,
|
|
11
12
|
"z-index": _ctx.sticky ? _ctx.zIndex : null,
|
|
12
13
|
disabled: _ctx.disabled && !_ctx.cssMode,
|
|
13
|
-
"css-mode": _ctx.cssMode
|
|
14
|
-
ref: "anchorEl"
|
|
14
|
+
"css-mode": _ctx.cssMode
|
|
15
15
|
}, {
|
|
16
16
|
default: _withCtx(() => [
|
|
17
17
|
_createElementVNode(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import IndexAnchor from "./IndexAnchor.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import IndexAnchor from "./IndexAnchor.mjs";
|
|
3
3
|
import { props as indexAnchorProps } from "./props.mjs";
|
|
4
4
|
withInstall(IndexAnchor);
|
|
5
5
|
withPropsDefaultsSetter(IndexAnchor, indexAnchorProps);
|
|
@@ -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 { INDEX_BAR_BIND_INDEX_ANCHOR_KEY } from "../index-bar/provide.mjs";
|
|
4
4
|
function useIndexBar() {
|
|
5
5
|
const { parentProvider, index, bindParent } = useParent(
|
|
@@ -18,23 +18,23 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { computed, defineComponent,
|
|
21
|
+
import { computed, defineComponent, onActivated, onBeforeUnmount, onDeactivated, ref, watch } from "vue";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
toNumber,
|
|
23
|
+
call,
|
|
25
24
|
doubleRaf,
|
|
26
|
-
requestAnimationFrame,
|
|
27
25
|
getRect,
|
|
28
26
|
getScrollLeft,
|
|
29
27
|
getScrollTop,
|
|
30
|
-
|
|
28
|
+
isPlainObject,
|
|
29
|
+
requestAnimationFrame,
|
|
30
|
+
toNumber
|
|
31
31
|
} from "@varlet/shared";
|
|
32
|
+
import { onSmartMounted } from "@varlet/use";
|
|
33
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
34
|
+
import { getParentScroller, toPxNum, scrollTo as varScrollTo } from "../utils/elements.mjs";
|
|
32
35
|
import { easeInOutCubic } from "../utils/shared.mjs";
|
|
33
|
-
import { getParentScroller, scrollTo as varScrollTo, toPxNum } from "../utils/elements.mjs";
|
|
34
|
-
import { useIndexAnchors } from "./provide.mjs";
|
|
35
36
|
import { props } from "./props.mjs";
|
|
36
|
-
import {
|
|
37
|
-
import { onSmartMounted } from "@varlet/use";
|
|
37
|
+
import { useIndexAnchors } from "./provide.mjs";
|
|
38
38
|
const { name, n, classes } = createNamespace("index-bar");
|
|
39
39
|
import { renderSlot as _renderSlot, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode } from "vue";
|
|
40
40
|
const _hoisted_1 = ["onClick"];
|
|
@@ -42,8 +42,8 @@ function __render__(_ctx, _cache) {
|
|
|
42
42
|
return _openBlock(), _createElementBlock(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
ref: "barEl",
|
|
46
|
+
class: _normalizeClass(_ctx.n())
|
|
47
47
|
},
|
|
48
48
|
[
|
|
49
49
|
_renderSlot(_ctx.$slots, "default"),
|
|
@@ -121,7 +121,9 @@ const __sfc__ = defineComponent({
|
|
|
121
121
|
removeScrollerListener();
|
|
122
122
|
});
|
|
123
123
|
onActivated(() => {
|
|
124
|
-
if (!isDeactivated || active.value === void 0)
|
|
124
|
+
if (!isDeactivated || active.value === void 0) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
125
127
|
anchorClick({
|
|
126
128
|
anchorName: active.value,
|
|
127
129
|
options: { event: false }
|
|
@@ -131,7 +133,9 @@ const __sfc__ = defineComponent({
|
|
|
131
133
|
bindIndexAnchors(indexBarProvider);
|
|
132
134
|
function emitEvent(anchor, options) {
|
|
133
135
|
const anchorName = isPlainObject(anchor) ? anchor.name.value : anchor;
|
|
134
|
-
if (anchorName === active.value || anchorName === void 0)
|
|
136
|
+
if (anchorName === active.value || anchorName === void 0) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
135
139
|
active.value = anchorName;
|
|
136
140
|
if ((options == null ? void 0 : options.event) !== false) {
|
|
137
141
|
call(props2.onChange, anchorName);
|
package/es/index-bar/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import IndexBar from "./IndexBar.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import IndexBar from "./IndexBar.mjs";
|
|
3
3
|
import { props as indexBarProps } from "./props.mjs";
|
|
4
4
|
withInstall(IndexBar);
|
|
5
5
|
withPropsDefaultsSetter(IndexBar, indexBarProps);
|
package/es/index.bundle.mjs
CHANGED
|
@@ -280,7 +280,7 @@ import './tooltip/style/index.mjs'
|
|
|
280
280
|
import './uploader/style/index.mjs'
|
|
281
281
|
import './watermark/style/index.mjs'
|
|
282
282
|
|
|
283
|
-
const version = '3.8.
|
|
283
|
+
const version = '3.8.3'
|
|
284
284
|
|
|
285
285
|
function install(app) {
|
|
286
286
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -186,7 +186,7 @@ export * from './tooltip/index.mjs'
|
|
|
186
186
|
export * from './uploader/index.mjs'
|
|
187
187
|
export * from './watermark/index.mjs'
|
|
188
188
|
|
|
189
|
-
const version = '3.8.
|
|
189
|
+
const version = '3.8.3'
|
|
190
190
|
|
|
191
191
|
function install(app) {
|
|
192
192
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/input/Input.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { computed, defineComponent, nextTick, ref } from "vue";
|
|
2
|
+
import { call, isEmpty, preventDefault, toNumber } from "@varlet/shared";
|
|
3
|
+
import { onSmartMounted, useClientId } from "@varlet/use";
|
|
2
4
|
import VarFieldDecorator from "../field-decorator/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { props } from "./props.mjs";
|
|
5
|
-
import { isEmpty, preventDefault, toNumber, call } from "@varlet/shared";
|
|
6
|
-
import { useValidation, createNamespace } from "../utils/components.mjs";
|
|
5
|
+
import VarFormDetails from "../form-details/index.mjs";
|
|
7
6
|
import { useForm } from "../form/provide.mjs";
|
|
8
|
-
import {
|
|
7
|
+
import { createNamespace, useValidation } from "../utils/components.mjs";
|
|
8
|
+
import { props } from "./props.mjs";
|
|
9
9
|
const { name, n, classes } = createNamespace("input");
|
|
10
10
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, createSlots as _createSlots, createVNode as _createVNode, createBlock as _createBlock } from "vue";
|
|
11
11
|
const _hoisted_1 = ["placeholder", "enterkeyhint"];
|
|
12
|
-
const _hoisted_2 = ["
|
|
13
|
-
const _hoisted_3 = ["
|
|
12
|
+
const _hoisted_2 = ["id", "autocomplete", "disabled", "readonly", "type", "value", "placeholder", "maxlength", "rows", "enterkeyhint", "inputmode"];
|
|
13
|
+
const _hoisted_3 = ["id", "autocomplete", "disabled", "readonly", "type", "value", "placeholder", "maxlength", "enterkeyhint", "inputmode"];
|
|
14
14
|
function __render__(_ctx, _cache) {
|
|
15
15
|
const _component_var_field_decorator = _resolveComponent("var-field-decorator");
|
|
16
16
|
const _component_var_form_details = _resolveComponent("var-form-details");
|
|
@@ -65,6 +65,8 @@ function __render__(_ctx, _cache) {
|
|
|
65
65
|
}, null, 14, _hoisted_1)) : _createCommentVNode("v-if", true),
|
|
66
66
|
_ctx.textarea ? (_openBlock(), _createElementBlock("textarea", {
|
|
67
67
|
key: 1,
|
|
68
|
+
id: _ctx.id,
|
|
69
|
+
ref: "el",
|
|
68
70
|
class: _normalizeClass(
|
|
69
71
|
_ctx.classes(
|
|
70
72
|
_ctx.n("input"),
|
|
@@ -74,9 +76,7 @@ function __render__(_ctx, _cache) {
|
|
|
74
76
|
[_ctx.errorMessage, _ctx.n("--caret-error")]
|
|
75
77
|
)
|
|
76
78
|
),
|
|
77
|
-
ref: "el",
|
|
78
79
|
autocomplete: _ctx.autocomplete ? _ctx.autocomplete : "new-password",
|
|
79
|
-
id: _ctx.id,
|
|
80
80
|
disabled: _ctx.formDisabled || _ctx.disabled,
|
|
81
81
|
readonly: _ctx.formReadonly || _ctx.readonly,
|
|
82
82
|
type: _ctx.normalizedType,
|
|
@@ -100,6 +100,8 @@ function __render__(_ctx, _cache) {
|
|
|
100
100
|
onCompositionend: _cache[5] || (_cache[5] = (...args) => _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...args))
|
|
101
101
|
}, null, 46, _hoisted_2)) : (_openBlock(), _createElementBlock("input", {
|
|
102
102
|
key: 2,
|
|
103
|
+
id: _ctx.id,
|
|
104
|
+
ref: "el",
|
|
103
105
|
class: _normalizeClass(
|
|
104
106
|
_ctx.classes(
|
|
105
107
|
_ctx.n("input"),
|
|
@@ -108,9 +110,7 @@ function __render__(_ctx, _cache) {
|
|
|
108
110
|
[_ctx.errorMessage, _ctx.n("--caret-error")]
|
|
109
111
|
)
|
|
110
112
|
),
|
|
111
|
-
ref: "el",
|
|
112
113
|
autocomplete: _ctx.autocomplete ? _ctx.autocomplete : "new-password",
|
|
113
|
-
id: _ctx.id,
|
|
114
114
|
disabled: _ctx.formDisabled || _ctx.disabled,
|
|
115
115
|
readonly: _ctx.formReadonly || _ctx.readonly,
|
|
116
116
|
type: _ctx.normalizedType,
|
package/es/input/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Input from "./Input.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Input from "./Input.mjs";
|
|
3
3
|
import { props as inputProps } from "./props.mjs";
|
|
4
4
|
withInstall(Input);
|
|
5
5
|
withPropsDefaultsSetter(Input, inputProps);
|
package/es/input/props.mjs
CHANGED
|
@@ -17,8 +17,8 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
21
20
|
import { fieldDecoratorProps } from "../field-decorator/index.mjs";
|
|
21
|
+
import { defineListenerProp, pickProps } from "../utils/components.mjs";
|
|
22
22
|
const props = __spreadProps(__spreadValues({
|
|
23
23
|
modelValue: String,
|
|
24
24
|
modelModifiers: {
|
package/es/lazy/index.mjs
CHANGED
|
@@ -34,8 +34,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34
34
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
+
import { call, doubleRaf, inViewport, removeItem, throttle } from "@varlet/shared";
|
|
37
38
|
import { getAllParentScroller } from "../utils/elements.mjs";
|
|
38
|
-
import { removeItem, throttle, doubleRaf, inViewport, call } from "@varlet/shared";
|
|
39
39
|
import { createCache } from "../utils/shared.mjs";
|
|
40
40
|
const BACKGROUND_IMAGE_ARG_NAME = "background-image";
|
|
41
41
|
const LAZY_LOADING = "lazy-loading";
|
package/es/link/Link.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, defineComponent, ref } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { call, inMobile } from "@varlet/shared";
|
|
3
3
|
import { createNamespace } from "../utils/components.mjs";
|
|
4
4
|
import { toSizeUnit } from "../utils/elements.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { props } from "./props.mjs";
|
|
6
6
|
const { name, n, classes } = createNamespace("link");
|
|
7
7
|
import { renderSlot as _renderSlot, resolveDynamicComponent as _resolveDynamicComponent, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
8
8
|
function __render__(_ctx, _cache) {
|
package/es/link/index.mjs
CHANGED
package/es/list/List.mjs
CHANGED
|
@@ -18,17 +18,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
+
import { defineComponent, nextTick, ref, watch } from "vue";
|
|
22
|
+
import { call, getRect, isNumber } from "@varlet/shared";
|
|
23
|
+
import { onSmartMounted, onSmartUnmounted } from "@varlet/use";
|
|
21
24
|
import VarLoading from "../loading/index.mjs";
|
|
25
|
+
import { t } from "../locale/index.mjs";
|
|
26
|
+
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
22
27
|
import Ripple from "../ripple/index.mjs";
|
|
23
|
-
import {
|
|
28
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
24
29
|
import { getParentScroller, toPxNum } from "../utils/elements.mjs";
|
|
25
30
|
import { props } from "./props.mjs";
|
|
26
|
-
import { isNumber, getRect, call } from "@varlet/shared";
|
|
27
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
28
|
-
import { t } from "../locale/index.mjs";
|
|
29
|
-
import { onSmartMounted, onSmartUnmounted } from "@varlet/use";
|
|
30
31
|
import { useTabItem } from "./provide.mjs";
|
|
31
|
-
import { injectLocaleProvider } from "../locale-provider/provide.mjs";
|
|
32
32
|
const { name, n, classes } = createNamespace("list");
|
|
33
33
|
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
34
34
|
function __render__(_ctx, _cache) {
|
|
@@ -37,8 +37,8 @@ function __render__(_ctx, _cache) {
|
|
|
37
37
|
return _openBlock(), _createElementBlock(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
ref: "listEl",
|
|
41
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box")))
|
|
42
42
|
},
|
|
43
43
|
[
|
|
44
44
|
_renderSlot(_ctx.$slots, "default"),
|
|
@@ -110,8 +110,8 @@ function __render__(_ctx, _cache) {
|
|
|
110
110
|
_createElementVNode(
|
|
111
111
|
"div",
|
|
112
112
|
{
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
ref: "detectorEl",
|
|
114
|
+
class: _normalizeClass(_ctx.n("detector"))
|
|
115
115
|
},
|
|
116
116
|
null,
|
|
117
117
|
2
|
package/es/list/index.mjs
CHANGED
package/es/list/provide.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TAB_ITEM_BIND_LIST_KEY } from "../tab-item/provide.mjs";
|
|
2
1
|
import { useParent } from "@varlet/use";
|
|
2
|
+
import { TAB_ITEM_BIND_LIST_KEY } from "../tab-item/provide.mjs";
|
|
3
3
|
function useTabItem() {
|
|
4
4
|
const { parentProvider, bindParent, index } = useParent(TAB_ITEM_BIND_LIST_KEY);
|
|
5
5
|
return {
|
package/es/loading/Loading.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, defineComponent } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { call } from "@varlet/shared";
|
|
3
3
|
import { createNamespace } from "../utils/components.mjs";
|
|
4
4
|
import { multiplySizeUnit } from "../utils/elements.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { props } from "./props.mjs";
|
|
6
6
|
const { name, n, classes } = createNamespace("loading");
|
|
7
7
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode } from "vue";
|
|
8
8
|
function __render__(_ctx, _cache) {
|
package/es/loading/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Loading from "./Loading.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import Loading from "./Loading.mjs";
|
|
3
3
|
import { props as loadingProps } from "./props.mjs";
|
|
4
4
|
withInstall(Loading);
|
|
5
5
|
withPropsDefaultsSetter(Loading, loadingProps);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
1
|
+
import { defineComponent, createVNode as _createVNode } from "vue";
|
|
2
2
|
import context from "../context/index.mjs";
|
|
3
|
-
import { defineComponent } from "vue";
|
|
4
3
|
import { createNamespace } from "../utils/components.mjs";
|
|
5
4
|
import { toSizeUnit } from "../utils/elements.mjs";
|
|
6
5
|
import { props } from "./props.mjs";
|
package/es/loading-bar/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import LoadingBarComponent from "./LoadingBar.mjs";
|
|
2
1
|
import { reactive } from "vue";
|
|
3
2
|
import { mountInstance } from "../utils/components.mjs";
|
|
3
|
+
import LoadingBarComponent from "./LoadingBar.mjs";
|
|
4
4
|
import { props as loadingBarProps } from "./props.mjs";
|
|
5
5
|
const OPACITY_DELAY = 200;
|
|
6
6
|
let valueTimer;
|
package/es/locale/index.mjs
CHANGED
|
@@ -14,13 +14,13 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import zhCN from "./zh-CN.mjs";
|
|
18
|
-
import enUS from "./en-US.mjs";
|
|
19
|
-
import zhTW from "./zh-TW.mjs";
|
|
20
|
-
import zhHK from "./zh-HK.mjs";
|
|
21
|
-
import faIR from "./fa-IR.mjs";
|
|
22
17
|
import { ref } from "vue";
|
|
23
18
|
import { hasOwn } from "@varlet/shared";
|
|
19
|
+
import enUS from "./en-US.mjs";
|
|
20
|
+
import faIR from "./fa-IR.mjs";
|
|
21
|
+
import zhCN from "./zh-CN.mjs";
|
|
22
|
+
import zhHK from "./zh-HK.mjs";
|
|
23
|
+
import zhTW from "./zh-TW.mjs";
|
|
24
24
|
function useLocale() {
|
|
25
25
|
const messages2 = ref({});
|
|
26
26
|
const currentMessage2 = ref({});
|
|
@@ -18,9 +18,9 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { computed, defineComponent, h } from "vue";
|
|
21
|
-
import { props } from "./props.mjs";
|
|
22
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
23
21
|
import { call, hasOwn } from "@varlet/shared";
|
|
22
|
+
import { createNamespace } from "../utils/components.mjs";
|
|
23
|
+
import { props } from "./props.mjs";
|
|
24
24
|
import { provideLocaleProvider } from "./provide.mjs";
|
|
25
25
|
const { name, n } = createNamespace("locale-provider");
|
|
26
26
|
const __sfc__ = defineComponent({
|
|
@@ -30,12 +30,15 @@ const __sfc__ = defineComponent({
|
|
|
30
30
|
const messages = computed(
|
|
31
31
|
() => {
|
|
32
32
|
var _a;
|
|
33
|
-
return Object.entries((_a = props2.messages) != null ? _a : {}).reduce(
|
|
34
|
-
messages2[key
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
return Object.entries((_a = props2.messages) != null ? _a : {}).reduce(
|
|
34
|
+
(messages2, [key, value]) => {
|
|
35
|
+
messages2[key] = __spreadProps(__spreadValues({}, value), {
|
|
36
|
+
lang: key
|
|
37
|
+
});
|
|
38
|
+
return messages2;
|
|
39
|
+
},
|
|
40
|
+
{}
|
|
41
|
+
);
|
|
39
42
|
}
|
|
40
43
|
);
|
|
41
44
|
provideLocaleProvider({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import LocaleProvider from "./LocaleProvider.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import LocaleProvider from "./LocaleProvider.mjs";
|
|
3
3
|
import { props as localeProviderProps } from "./props.mjs";
|
|
4
4
|
withInstall(LocaleProvider);
|
|
5
5
|
withPropsDefaultsSetter(LocaleProvider, localeProviderProps);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { keyInProvides } from "@varlet/use";
|
|
2
1
|
import { inject, provide } from "vue";
|
|
2
|
+
import { keyInProvides } from "@varlet/use";
|
|
3
3
|
const LOCALE_PROVIDER_KEY = Symbol("LOCALE_PROVIDER_KEY");
|
|
4
4
|
function provideLocaleProvider(localeProvider) {
|
|
5
5
|
provide(LOCALE_PROVIDER_KEY, localeProvider);
|
package/es/menu/Menu.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createNamespace, formatElevation, useTeleport } from "../utils/components.mjs";
|
|
2
1
|
import { defineComponent } from "vue";
|
|
2
|
+
import { createNamespace, formatElevation, useTeleport } from "../utils/components.mjs";
|
|
3
|
+
import { toSizeUnit } from "../utils/elements.mjs";
|
|
3
4
|
import { props } from "./props.mjs";
|
|
4
5
|
import { usePopover } from "./usePopover.mjs";
|
|
5
|
-
import { toSizeUnit } from "../utils/elements.mjs";
|
|
6
6
|
const { name, n, classes } = createNamespace("menu");
|
|
7
7
|
import { renderSlot as _renderSlot, vShow as _vShow, withModifiers as _withModifiers, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, Teleport as _Teleport, openBlock as _openBlock, createBlock as _createBlock, createElementBlock as _createElementBlock } from "vue";
|
|
8
8
|
function __render__(_ctx, _cache) {
|
package/es/menu/index.mjs
CHANGED
package/es/menu/usePopover.mjs
CHANGED
|
@@ -37,16 +37,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
+
import { onMounted, onUnmounted, ref, watch } from "vue";
|
|
41
|
+
import computeStyles from "@popperjs/core/lib/modifiers/computeStyles.js";
|
|
40
42
|
import flip from "@popperjs/core/lib/modifiers/flip.js";
|
|
41
43
|
import offset from "@popperjs/core/lib/modifiers/offset.js";
|
|
42
|
-
import computeStyles from "@popperjs/core/lib/modifiers/computeStyles.js";
|
|
43
|
-
import { onWindowResize, useEventListener, useVModel } from "@varlet/use";
|
|
44
|
-
import { doubleRaf, getStyle, call, preventDefault, isString } from "@varlet/shared";
|
|
45
|
-
import { toPxNum } from "../utils/elements.mjs";
|
|
46
|
-
import { onMounted, onUnmounted, ref, watch } from "vue";
|
|
47
44
|
import { createPopper } from "@popperjs/core/lib/popper-lite.js";
|
|
48
|
-
import {
|
|
45
|
+
import { call, doubleRaf, getStyle, isString, preventDefault } from "@varlet/shared";
|
|
46
|
+
import { onWindowResize, useEventListener, useVModel } from "@varlet/use";
|
|
49
47
|
import { useStack } from "../context/stack.mjs";
|
|
48
|
+
import { useZIndex } from "../context/zIndex.mjs";
|
|
49
|
+
import { toPxNum } from "../utils/elements.mjs";
|
|
50
50
|
function usePopover(options) {
|
|
51
51
|
const host = ref(null);
|
|
52
52
|
const popover = ref(null);
|
|
@@ -18,17 +18,17 @@ 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, isBoolean, isFunction, preventDefault } from "@varlet/shared";
|
|
23
|
+
import { useEventListener } from "@varlet/use";
|
|
21
24
|
import VarCheckbox from "../checkbox/index.mjs";
|
|
22
|
-
import
|
|
25
|
+
import Hover from "../hover/index.mjs";
|
|
23
26
|
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
27
|
+
import VarIcon from "../icon/index.mjs";
|
|
24
28
|
import Ripple from "../ripple/index.mjs";
|
|
25
|
-
import Hover from "../hover/index.mjs";
|
|
26
|
-
import { defineComponent, computed, ref, watch, nextTick } from "vue";
|
|
27
|
-
import { useMenuSelect } from "./provide.mjs";
|
|
28
29
|
import { createNamespace, MaybeVNode } from "../utils/components.mjs";
|
|
29
30
|
import { props } from "./props.mjs";
|
|
30
|
-
import {
|
|
31
|
-
import { useEventListener } from "@varlet/use";
|
|
31
|
+
import { useMenuSelect } from "./provide.mjs";
|
|
32
32
|
const { name, n, classes } = createNamespace("menu-option");
|
|
33
33
|
import { normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createVNode as _createVNode, createElementBlock as _createElementBlock, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
|
34
34
|
const _hoisted_1 = ["tabindex"];
|
|
@@ -85,9 +85,9 @@ function __render__(_ctx, _cache) {
|
|
|
85
85
|
},
|
|
86
86
|
[
|
|
87
87
|
_createVNode(_component_maybe_v_node, {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, null, 8, ["
|
|
88
|
+
is: _ctx.labelVNode,
|
|
89
|
+
class: _normalizeClass(_ctx.n("$--ellipsis"))
|
|
90
|
+
}, null, 8, ["is", "class"])
|
|
91
91
|
],
|
|
92
92
|
2
|
|
93
93
|
/* CLASS */
|
package/es/menu-option/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import MenuOption from "./MenuOption.mjs";
|
|
2
1
|
import { withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
2
|
+
import MenuOption from "./MenuOption.mjs";
|
|
3
3
|
import { props as menuOptionProps } from "./props.mjs";
|
|
4
4
|
withInstall(MenuOption);
|
|
5
5
|
withPropsDefaultsSetter(MenuOption, menuOptionProps);
|
|
@@ -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 { MENU_SELECT_BIND_MENU_OPTION_KEY } from "../menu-select/provide.mjs";
|
|
4
4
|
function useMenuSelect() {
|
|
5
5
|
const { index, parentProvider, bindParent } = useParent(
|