@varlet/ui 3.14.2 → 3.15.0-alpha.1776572752298
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.mjs +1 -1
- package/es/action-sheet/index.mjs +1 -1
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/alert/Alert.mjs +1 -1
- package/es/app-bar/AppBar.mjs +1 -1
- package/es/auto-complete/AutoComplete.mjs +1 -1
- package/es/avatar/Avatar.mjs +1 -1
- package/es/back-top/BackTop.mjs +1 -1
- package/es/badge/Badge.mjs +1 -1
- package/es/bottom-navigation/BottomNavigation.mjs +1 -1
- package/es/bottom-navigation/provide.mjs +1 -1
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +1 -1
- package/es/breadcrumb/Breadcrumb.mjs +1 -1
- package/es/breadcrumbs/provide.mjs +1 -1
- package/es/button/Button.mjs +1 -1
- package/es/button-group/provide.mjs +1 -1
- package/es/card/Card.mjs +2 -2
- package/es/cell/Cell.mjs +1 -1
- package/es/checkbox/Checkbox.mjs +1 -1
- package/es/checkbox-group/CheckboxGroup.mjs +1 -1
- package/es/checkbox-group/provide.mjs +1 -1
- package/es/chip/Chip.mjs +1 -1
- package/es/code/Code.mjs +1 -1
- package/es/col/Col.mjs +1 -1
- package/es/collapse/Collapse.mjs +1 -1
- package/es/collapse/provide.mjs +1 -1
- package/es/collapse-transition/useCollapseTransition.mjs +2 -2
- package/es/context/stack.mjs +1 -1
- package/es/count-to/CountTo.mjs +1 -1
- package/es/countdown/Countdown.mjs +1 -1
- package/es/counter/Counter.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +1 -1
- package/es/date-picker/src/day-picker-panel.mjs +5 -5
- package/es/date-picker/src/month-picker-panel.mjs +1 -1
- package/es/date-picker/src/panel-header.mjs +1 -1
- package/es/date-picker/src/year-picker-panel.mjs +3 -3
- package/es/dialog/Dialog.mjs +1 -1
- package/es/dialog/index.mjs +1 -1
- package/es/divider/Divider.mjs +1 -1
- package/es/drag/Drag.mjs +1 -1
- package/es/ellipsis/Ellipsis.mjs +1 -1
- package/es/fab/Fab.mjs +2 -1
- package/es/field-decorator/FieldDecorator.mjs +2 -2
- package/es/floating-panel/FloatingPanel.mjs +1 -1
- package/es/form/Form.mjs +1 -1
- package/es/form/provide.mjs +2 -2
- package/es/highlighter-provider/HighlighterProvider.mjs +1 -1
- package/es/highlighter-provider/provide.mjs +2 -2
- package/es/hover-overlay/HoverOverlay.mjs +1 -1
- package/es/icon/Icon.mjs +1 -1
- package/es/image/Image.mjs +1 -1
- package/es/image-preview/ImagePreview.mjs +1 -1
- package/es/image-preview/index.mjs +1 -1
- package/es/index-bar/IndexBar.mjs +2 -2
- package/es/index-bar/provide.mjs +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +1 -1
- package/es/link/Link.mjs +1 -1
- package/es/list/List.mjs +1 -1
- package/es/loading/Loading.mjs +1 -1
- package/es/locale/index.mjs +1 -1
- package/es/locale-provider/LocaleProvider.mjs +1 -1
- package/es/locale-provider/provide.mjs +2 -2
- package/es/menu/usePopover.mjs +1 -1
- package/es/menu-option/MenuOption.mjs +1 -1
- package/es/menu-select/MenuChildren.mjs +1 -1
- package/es/menu-select/MenuSelect.mjs +1 -1
- package/es/menu-select/provide.mjs +1 -1
- package/es/option/Option.mjs +1 -1
- package/es/overlay/Overlay.mjs +2 -1
- package/es/pagination/Pagination.mjs +1 -1
- package/es/paper/Paper.mjs +1 -1
- package/es/picker/Picker.mjs +1 -1
- package/es/picker/index.mjs +1 -1
- package/es/popup/Popup.mjs +2 -1
- package/es/popup/provide.mjs +1 -1
- package/es/progress/Progress.mjs +1 -1
- package/es/pull-refresh/PullRefresh.mjs +1 -1
- package/es/radio/Radio.mjs +1 -1
- package/es/radio-group/RadioGroup.mjs +1 -1
- package/es/radio-group/provide.mjs +1 -1
- package/es/rate/Rate.mjs +1 -1
- package/es/row/Row.mjs +1 -1
- package/es/row/provide.mjs +1 -1
- package/es/select/Select.mjs +2 -2
- package/es/select/SelectFilter.mjs +1 -1
- package/es/select/provide.mjs +1 -1
- package/es/select/useOptionsMutationObserver.mjs +3 -3
- package/es/select/useSelectController.mjs +1 -1
- package/es/signature/Signature.mjs +1 -1
- package/es/skeleton/Skeleton.mjs +1 -1
- package/es/slider/Slider.mjs +1 -1
- package/es/snackbar/core.mjs +1 -1
- package/es/snackbar/index.mjs +2 -1
- package/es/space/Space.mjs +2 -1
- package/es/step/Step.mjs +1 -1
- package/es/steps/Steps.mjs +1 -1
- package/es/steps/provide.mjs +1 -1
- package/es/sticky/Sticky.mjs +2 -2
- package/es/style-provider/StyleProvider.mjs +1 -1
- package/es/swipe/Swipe.mjs +3 -3
- package/es/swipe/provide.mjs +2 -2
- package/es/switch/Switch.mjs +1 -1
- package/es/tab/Tab.mjs +1 -1
- package/es/tab-item/provide.mjs +1 -1
- package/es/tabs/Tabs.mjs +2 -2
- package/es/tabs/provide.mjs +1 -1
- package/es/tabs-items/TabsItems.mjs +2 -2
- package/es/tabs-items/provide.mjs +1 -1
- package/es/time-picker/TimePicker.mjs +1 -1
- package/es/time-picker/clock.mjs +1 -1
- package/es/uploader/Uploader.mjs +2 -2
- package/es/utils/components.mjs +12 -12
- package/es/utils/test.mjs +1 -1
- package/es/varlet.css +2 -1
- package/es/varlet.esm.js +12721 -16443
- package/es/watermark/Watermark.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 +27769 -31826
- package/lib/varlet.css +1 -1
- package/package.json +11 -11
- package/types/menu.d.ts +1 -1
- package/types/menuSelect.d.ts +1 -1
- package/types/tooltip.d.ts +1 -1
- package/umd/varlet.js +7 -13
package/es/uploader/Uploader.mjs
CHANGED
|
@@ -18,9 +18,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { computed, defineComponent, nextTick, reactive, ref, watch } from "vue";
|
|
22
21
|
import { call, isNumber, normalizeToArray, toDataURL, toNumber } from "@varlet/shared";
|
|
23
22
|
import { useEventListener } from "@varlet/use";
|
|
23
|
+
import { computed, defineComponent, nextTick, reactive, ref, watch } from "vue";
|
|
24
24
|
import VarFormDetails from "../form-details/index.mjs";
|
|
25
25
|
import { useForm } from "../form/provide.mjs";
|
|
26
26
|
import Hover from "../hover/index.mjs";
|
|
@@ -393,7 +393,7 @@ const __sfc__ = defineComponent({
|
|
|
393
393
|
const limit = Math.min(varFiles2.length, toNumber(maxlength) - modelValue.length);
|
|
394
394
|
return varFiles2.slice(0, limit);
|
|
395
395
|
};
|
|
396
|
-
const getFilterVarFiles = (varFiles2) => __async(
|
|
396
|
+
const getFilterVarFiles = (varFiles2) => __async(null, null, function* () {
|
|
397
397
|
if (!onBeforeFilter) {
|
|
398
398
|
return varFiles2;
|
|
399
399
|
}
|
package/es/utils/components.mjs
CHANGED
|
@@ -37,16 +37,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
import {
|
|
41
|
-
Comment,
|
|
42
|
-
createApp,
|
|
43
|
-
defineComponent,
|
|
44
|
-
Fragment,
|
|
45
|
-
h,
|
|
46
|
-
onActivated,
|
|
47
|
-
onDeactivated,
|
|
48
|
-
ref
|
|
49
|
-
} from "vue";
|
|
50
40
|
import {
|
|
51
41
|
createNamespaceFn,
|
|
52
42
|
hasOwn,
|
|
@@ -57,6 +47,16 @@ import {
|
|
|
57
47
|
normalizeToArray
|
|
58
48
|
} from "@varlet/shared";
|
|
59
49
|
import { useEventListener } from "@varlet/use";
|
|
50
|
+
import {
|
|
51
|
+
Comment,
|
|
52
|
+
createApp,
|
|
53
|
+
defineComponent,
|
|
54
|
+
Fragment,
|
|
55
|
+
h,
|
|
56
|
+
onActivated,
|
|
57
|
+
onDeactivated,
|
|
58
|
+
ref
|
|
59
|
+
} from "vue";
|
|
60
60
|
function pickProps(props, propsKey) {
|
|
61
61
|
return isArray(propsKey) ? propsKey.reduce((pickedProps, key) => {
|
|
62
62
|
pickedProps[key] = props[key];
|
|
@@ -138,7 +138,7 @@ function isZodResult(result) {
|
|
|
138
138
|
}
|
|
139
139
|
function useValidation() {
|
|
140
140
|
const errorMessage = ref("");
|
|
141
|
-
const validate = (ruleOrRules, value, apis) => __async(
|
|
141
|
+
const validate = (ruleOrRules, value, apis) => __async(null, null, function* () {
|
|
142
142
|
const rules = normalizeToArray(ruleOrRules).filter((rule) => isZodRule(rule) || isFunction(rule));
|
|
143
143
|
const results = yield Promise.all(
|
|
144
144
|
rules.map((rule) => isZodRule(rule) ? rule.safeParseAsync(value) : rule(value, apis))
|
|
@@ -160,7 +160,7 @@ function useValidation() {
|
|
|
160
160
|
const resetValidation = () => {
|
|
161
161
|
errorMessage.value = "";
|
|
162
162
|
};
|
|
163
|
-
const validateWithTrigger = (validateTrigger, trigger, rules, value, apis) => __async(
|
|
163
|
+
const validateWithTrigger = (validateTrigger, trigger, rules, value, apis) => __async(null, null, function* () {
|
|
164
164
|
if (validateTrigger.includes(trigger)) {
|
|
165
165
|
;
|
|
166
166
|
(yield validate(rules, value, apis)) && (errorMessage.value = "");
|
package/es/utils/test.mjs
CHANGED
|
@@ -21,9 +21,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
import { nextTick } from "vue";
|
|
25
24
|
import { getStyle, isPlainObject } from "@varlet/shared";
|
|
26
25
|
import { config } from "@vue/test-utils";
|
|
26
|
+
import { nextTick } from "vue";
|
|
27
27
|
const delay = (time) => new Promise((resolve) => {
|
|
28
28
|
setTimeout(resolve, time);
|
|
29
29
|
});
|