zartui 3.1.7 → 3.1.9
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/README.md +23 -0
- package/es/action-sheet/ActionSheet.d.ts +2 -2
- package/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.d.ts +2 -2
- package/es/avatar/index.css +1 -1
- package/es/badge/index.css +1 -1
- package/es/button/Button.d.ts +3 -3
- package/es/button/index.css +1 -1
- package/es/button/index.d.ts +3 -3
- package/es/calendar/Calendar.d.ts +2 -2
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.d.ts +2 -2
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cell/Cell.d.ts +2 -2
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +2 -2
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/CellGroup.mjs +2 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/checkbox/Checkbox.d.ts +26 -12
- package/es/checkbox/Checkbox.mjs +13 -2
- package/es/checkbox/Checker.d.ts +9 -0
- package/es/checkbox/Checker.mjs +10 -10
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.d.ts +9 -0
- package/es/collapse-item/index.css +1 -1
- package/es/composables/use-global-z-index.d.ts +4 -0
- package/es/composables/use-global-z-index.mjs +9 -0
- package/es/composables/use-scope-id.d.ts +3 -0
- package/es/composables/use-scope-id.mjs +9 -0
- package/es/composables/use-sync-prop-ref.d.ts +2 -0
- package/es/composables/use-sync-prop-ref.mjs +18 -0
- package/es/config-provider/ConfigProvider.d.ts +30 -6
- package/es/config-provider/ConfigProvider.mjs +48 -9
- package/es/config-provider/index.d.ts +17 -2
- package/es/date-time-picker/DateTimePicker.d.ts +2 -2
- package/es/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
- package/es/date-time-picker/index.d.ts +2 -2
- package/es/dialog/Dialog.d.ts +1 -1
- package/es/dialog/function-call.d.ts +3 -3
- package/es/dialog/function-call.mjs +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.d.ts +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.mjs +2 -2
- package/es/dropdown-item/types.d.ts +2 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/index.css +1 -1
- package/es/field/Field.d.ts +3 -3
- package/es/field/Field.mjs +2 -0
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +3 -3
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/hierarchy-select/HierarchySelect.d.ts +16 -1
- package/es/hierarchy-select/HierarchySelect.mjs +8 -5
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.d.ts +11 -1
- package/es/icon/config.mjs +34 -11
- package/es/icon/index.css +1 -1
- package/es/image/Image.d.ts +1 -1
- package/es/image/index.css +1 -1
- package/es/image/index.d.ts +1 -1
- package/es/image-preview/ImagePreview.d.ts +17 -1
- package/es/image-preview/ImagePreview.mjs +17 -4
- package/es/image-preview/ImagePreviewItem.d.ts +6 -0
- package/es/image-preview/ImagePreviewItem.mjs +9 -3
- package/es/image-preview/function-call.mjs +1 -0
- package/es/image-preview/index.d.ts +12 -1
- package/es/image-preview/types.d.ts +1 -0
- package/es/index-bar/IndexBar.d.ts +16 -1
- package/es/index-bar/IndexBar.mjs +6 -3
- package/es/index-bar/index.d.ts +12 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/list/List.d.ts +7 -3
- package/es/list/List.mjs +5 -3
- package/es/list/index.css +1 -1
- package/es/list/index.d.ts +2 -0
- package/es/loading/index.css +1 -1
- package/es/media-picker/index.css +1 -1
- package/es/multiple-picker/index.css +1 -1
- package/es/nav-bar/NavBar.d.ts +1 -1
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notify/Notify.d.ts +1 -1
- package/es/notify/index.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +3 -3
- package/es/number-keyboard/NumberKeyboard.mjs +5 -20
- package/es/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.d.ts +3 -3
- package/es/number-keyboard/style/index.mjs +0 -1
- package/es/picker/index.css +1 -1
- package/es/popover/Popover.d.ts +1 -1
- package/es/popover/Popover.mjs +16 -12
- package/es/popover/index.d.ts +1 -1
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/Popup.mjs +9 -10
- package/es/popup/index.css +1 -1
- package/es/popup/index.d.ts +2 -2
- package/es/radio/index.css +1 -1
- package/es/radio-picker/index.css +1 -1
- package/es/search/Search.d.ts +1 -1
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +2 -2
- package/es/skeleton/index.d.ts +2 -2
- package/es/step/index.css +1 -1
- package/es/stepper/Stepper.d.ts +2 -2
- package/es/stepper/index.d.ts +2 -2
- package/es/steps/Steps.d.ts +1 -1
- package/es/steps/index.d.ts +1 -1
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/swipe/Swipe.mjs +1 -1
- package/es/swipe/index.css +1 -1
- package/es/swipe-cell/SwipeCell.mjs +10 -1
- package/es/tabbar-item/index.css +1 -1
- package/es/table/index.css +1 -1
- package/es/tabs/Tabs.d.ts +4 -4
- package/es/tabs/index.d.ts +4 -4
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +17 -4
- package/es/text-ellipsis/TextEllipsis.mjs +52 -30
- package/es/text-ellipsis/index.css +1 -1
- package/es/text-ellipsis/index.d.ts +12 -3
- package/es/time-picker/index.css +1 -1
- package/es/timeline/index.css +1 -1
- package/es/toast/Toast.d.ts +5 -2
- package/es/toast/Toast.mjs +2 -1
- package/es/toast/index.css +1 -1
- package/es/toast/index.d.ts +4 -2
- package/es/toast/types.d.ts +2 -0
- package/es/uploader/Uploader.d.ts +1 -1
- package/es/uploader/index.css +1 -1
- package/es/uploader/index.d.ts +1 -1
- package/es/utils/interceptor.d.ts +2 -1
- package/es/utils/interceptor.mjs +3 -2
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/action-sheet/ActionSheet.d.ts +2 -2
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.d.ts +2 -2
- package/lib/avatar/index.css +1 -1
- package/lib/badge/index.css +1 -1
- package/lib/button/Button.d.ts +3 -3
- package/lib/button/index.css +1 -1
- package/lib/button/index.d.ts +3 -3
- package/lib/calendar/Calendar.d.ts +2 -2
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.d.ts +2 -2
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cell/Cell.d.ts +2 -2
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +2 -2
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/CellGroup.js +2 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/checkbox/Checkbox.d.ts +26 -12
- package/lib/checkbox/Checkbox.js +13 -2
- package/lib/checkbox/Checker.d.ts +9 -0
- package/lib/checkbox/Checker.js +10 -10
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.d.ts +9 -0
- package/lib/collapse-item/index.css +1 -1
- package/lib/composables/use-global-z-index.d.ts +4 -0
- package/lib/composables/use-global-z-index.js +28 -0
- package/lib/composables/use-scope-id.d.ts +3 -0
- package/lib/composables/use-scope-id.js +28 -0
- package/lib/composables/use-sync-prop-ref.d.ts +2 -0
- package/lib/composables/use-sync-prop-ref.js +37 -0
- package/lib/config-provider/ConfigProvider.d.ts +30 -6
- package/lib/config-provider/ConfigProvider.js +46 -7
- package/lib/config-provider/index.d.ts +17 -2
- package/lib/date-time-picker/DateTimePicker.d.ts +2 -2
- package/lib/date-time-picker/DateTimePickerWrapper.d.ts +2 -2
- package/lib/date-time-picker/index.d.ts +2 -2
- package/lib/dialog/Dialog.d.ts +1 -1
- package/lib/dialog/function-call.d.ts +3 -3
- package/lib/dialog/function-call.js +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown-item/DropdownItem.js +2 -2
- package/lib/dropdown-item/types.d.ts +2 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/empty/index.css +1 -1
- package/lib/field/Field.d.ts +3 -3
- package/lib/field/Field.js +2 -0
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +3 -3
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/hierarchy-select/HierarchySelect.d.ts +16 -1
- package/lib/hierarchy-select/HierarchySelect.js +7 -4
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.d.ts +11 -1
- package/lib/icon/config.js +34 -11
- package/lib/icon/index.css +1 -1
- package/lib/image/Image.d.ts +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image/index.d.ts +1 -1
- package/lib/image-preview/ImagePreview.d.ts +17 -1
- package/lib/image-preview/ImagePreview.js +17 -4
- package/lib/image-preview/ImagePreviewItem.d.ts +6 -0
- package/lib/image-preview/ImagePreviewItem.js +9 -3
- package/lib/image-preview/function-call.js +1 -0
- package/lib/image-preview/index.d.ts +12 -1
- package/lib/image-preview/types.d.ts +1 -0
- package/lib/index-bar/IndexBar.d.ts +16 -1
- package/lib/index-bar/IndexBar.js +5 -2
- package/lib/index-bar/index.d.ts +12 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/list/List.d.ts +7 -3
- package/lib/list/List.js +4 -2
- package/lib/list/index.css +1 -1
- package/lib/list/index.d.ts +2 -0
- package/lib/loading/index.css +1 -1
- package/lib/media-picker/index.css +1 -1
- package/lib/multiple-picker/index.css +1 -1
- package/lib/nav-bar/NavBar.d.ts +1 -1
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/notify/Notify.d.ts +1 -1
- package/lib/notify/index.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +3 -3
- package/lib/number-keyboard/NumberKeyboard.js +4 -19
- package/lib/number-keyboard/NumberKeyboardKey.d.ts +1 -1
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.d.ts +3 -3
- package/lib/number-keyboard/style/index.js +0 -1
- package/lib/picker/index.css +1 -1
- package/lib/popover/Popover.d.ts +1 -1
- package/lib/popover/Popover.js +16 -12
- package/lib/popover/index.d.ts +1 -1
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/Popup.js +8 -9
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.d.ts +2 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio-picker/index.css +1 -1
- package/lib/search/Search.d.ts +1 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +1 -1
- package/lib/skeleton/Skeleton.d.ts +2 -2
- package/lib/skeleton/index.d.ts +2 -2
- package/lib/step/index.css +1 -1
- package/lib/stepper/Stepper.d.ts +2 -2
- package/lib/stepper/index.d.ts +2 -2
- package/lib/steps/Steps.d.ts +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/swipe/Swipe.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/swipe-cell/SwipeCell.js +10 -1
- package/lib/tabbar-item/index.css +1 -1
- package/lib/table/index.css +1 -1
- package/lib/tabs/Tabs.d.ts +4 -4
- package/lib/tabs/index.d.ts +4 -4
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/text-ellipsis/TextEllipsis.d.ts +17 -4
- package/lib/text-ellipsis/TextEllipsis.js +51 -29
- package/lib/text-ellipsis/index.css +1 -1
- package/lib/text-ellipsis/index.d.ts +12 -3
- package/lib/time-picker/index.css +1 -1
- package/lib/timeline/index.css +1 -1
- package/lib/toast/Toast.d.ts +5 -2
- package/lib/toast/Toast.js +2 -1
- package/lib/toast/index.css +1 -1
- package/lib/toast/index.d.ts +4 -2
- package/lib/toast/types.d.ts +2 -0
- package/lib/uploader/Uploader.d.ts +1 -1
- package/lib/uploader/index.css +1 -1
- package/lib/uploader/index.d.ts +1 -1
- package/lib/utils/interceptor.d.ts +2 -1
- package/lib/utils/interceptor.js +3 -2
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +230 -112
- package/lib/zartui.es.js +231 -113
- package/lib/zartui.js +230 -112
- package/lib/zartui.min.js +1 -1
- package/package.json +21 -11
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watch, computed, nextTick, Teleport, onMounted, defineComponent } from "vue";
|
|
3
|
-
import { isDef, isHidden, truthProp, numericProp, getScrollTop, preventDefault, makeNumberProp, createNamespace, getRootScrollTop, setRootScrollTop } from "../utils/index.mjs";
|
|
3
|
+
import { isDef, isHidden, truthProp, numericProp, getScrollTop, preventDefault, makeNumberProp, createNamespace, getRootScrollTop, setRootScrollTop, makeNumericProp } from "../utils/index.mjs";
|
|
4
4
|
import { useRect, useChildren, useScrollParent, useEventListener } from "@zartui/use";
|
|
5
5
|
import { useTouch } from "../composables/use-touch.mjs";
|
|
6
6
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
7
|
+
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
|
7
8
|
function genAlphabet() {
|
|
8
9
|
const charCodeOfA = "A".charCodeAt(0);
|
|
9
10
|
const indexList = Array(26).fill("").map((_, i) => String.fromCharCode(charCodeOfA + i));
|
|
@@ -13,6 +14,7 @@ const [name, bem] = createNamespace("index-bar");
|
|
|
13
14
|
const indexBarProps = {
|
|
14
15
|
sticky: truthProp,
|
|
15
16
|
zIndex: numericProp,
|
|
17
|
+
activeAnchor: makeNumericProp(""),
|
|
16
18
|
teleport: [String, Object],
|
|
17
19
|
highlightColor: String,
|
|
18
20
|
stickyOffsetTop: makeNumberProp(0),
|
|
@@ -25,14 +27,14 @@ const INDEX_BAR_KEY = Symbol(name);
|
|
|
25
27
|
var stdin_default = defineComponent({
|
|
26
28
|
name,
|
|
27
29
|
props: indexBarProps,
|
|
28
|
-
emits: ["select", "change"],
|
|
30
|
+
emits: ["select", "change", "anchorClick", "update:activeAnchor"],
|
|
29
31
|
setup(props, {
|
|
30
32
|
emit,
|
|
31
33
|
slots
|
|
32
34
|
}) {
|
|
33
35
|
const root = ref();
|
|
34
36
|
const sidebar = ref();
|
|
35
|
-
const activeAnchor =
|
|
37
|
+
const activeAnchor = useSyncPropRef(() => props.activeAnchor, (value) => emit("update:activeAnchor", value));
|
|
36
38
|
const touchIndex = ref("");
|
|
37
39
|
const touch = useTouch();
|
|
38
40
|
const scrollParent = useScrollParent(root);
|
|
@@ -134,6 +136,7 @@ var stdin_default = defineComponent({
|
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
138
|
const scrollTo = (index) => {
|
|
139
|
+
emit("anchorClick", index);
|
|
137
140
|
selectActiveIndex = String(index);
|
|
138
141
|
const match = getMatchAnchor(selectActiveIndex);
|
|
139
142
|
if (match) {
|
package/es/index-bar/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
5
5
|
default: true;
|
|
6
6
|
};
|
|
7
7
|
zIndex: (NumberConstructor | StringConstructor)[];
|
|
8
|
+
activeAnchor: {
|
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
8
12
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
9
13
|
highlightColor: StringConstructor;
|
|
10
14
|
stickyOffsetTop: {
|
|
@@ -15,12 +19,16 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
15
19
|
type: import("vue").PropType<import("../utils").Numeric[]>;
|
|
16
20
|
default: () => string[];
|
|
17
21
|
};
|
|
18
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change")[], "select" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "change" | "anchorClick" | "update:activeAnchor")[], "select" | "change" | "anchorClick" | "update:activeAnchor", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
23
|
sticky: {
|
|
20
24
|
type: BooleanConstructor;
|
|
21
25
|
default: true;
|
|
22
26
|
};
|
|
23
27
|
zIndex: (NumberConstructor | StringConstructor)[];
|
|
28
|
+
activeAnchor: {
|
|
29
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
24
32
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
25
33
|
highlightColor: StringConstructor;
|
|
26
34
|
stickyOffsetTop: {
|
|
@@ -34,8 +42,11 @@ export declare const IndexBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
34
42
|
}>> & {
|
|
35
43
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
36
44
|
onSelect?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
onAnchorClick?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
"onUpdate:activeAnchor"?: ((...args: any[]) => any) | undefined;
|
|
37
47
|
}, {
|
|
38
48
|
sticky: boolean;
|
|
49
|
+
activeAnchor: string | number;
|
|
39
50
|
stickyOffsetTop: number;
|
|
40
51
|
indexList: import("../utils").Numeric[];
|
|
41
52
|
}, {}>>;
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -71,7 +71,7 @@ import { TimePicker } from "./time-picker/index.mjs";
|
|
|
71
71
|
import { Timeline } from "./timeline/index.mjs";
|
|
72
72
|
import { Toast } from "./toast/index.mjs";
|
|
73
73
|
import { Uploader } from "./uploader/index.mjs";
|
|
74
|
-
const version = "3.1.
|
|
74
|
+
const version = "3.1.9";
|
|
75
75
|
function install(app) {
|
|
76
76
|
const components = [
|
|
77
77
|
ActionSheet,
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare type ListenEvent =
|
|
4
|
-
| 'scroll'
|
|
5
|
-
| 'wheel'
|
|
6
|
-
| 'mousewheel'
|
|
7
|
-
| 'resize'
|
|
8
|
-
| 'animationend'
|
|
9
|
-
| 'transitionend'
|
|
10
|
-
| 'touchmove';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line
|
|
13
|
-
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
-
|
|
15
|
-
declare type Filter = {
|
|
16
|
-
webp?: Callback;
|
|
17
|
-
progressive?: Callback;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
declare type Adapter = {
|
|
21
|
-
error?: Callback;
|
|
22
|
-
loaded?: Callback;
|
|
23
|
-
loading?: Callback;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export declare type LazyloadOptions = {
|
|
27
|
-
error?: string;
|
|
28
|
-
filter?: Filter;
|
|
29
|
-
silent?: boolean;
|
|
30
|
-
adapter?: Adapter;
|
|
31
|
-
loading?: string;
|
|
32
|
-
attempt?: number;
|
|
33
|
-
preLoad?: number;
|
|
34
|
-
observer?: boolean;
|
|
35
|
-
lazyImage?: boolean;
|
|
36
|
-
throttleWait?: number;
|
|
37
|
-
listenEvents?: ListenEvent[];
|
|
38
|
-
dispatchEvent?: boolean;
|
|
39
|
-
lazyComponent?: boolean;
|
|
40
|
-
observerOptions?: IntersectionObserverInit;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export declare const Lazyload: {
|
|
44
|
-
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare module '@vue/runtime-core' {
|
|
48
|
-
interface ComponentCustomProperties {
|
|
49
|
-
$Lazyload: {
|
|
50
|
-
$on: (event: string, handler: Callback) => void;
|
|
51
|
-
$off: (event: string, handler?: Callback) => void;
|
|
52
|
-
$once: (event: string, handler: Callback) => void;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare type ListenEvent =
|
|
4
|
+
| 'scroll'
|
|
5
|
+
| 'wheel'
|
|
6
|
+
| 'mousewheel'
|
|
7
|
+
| 'resize'
|
|
8
|
+
| 'animationend'
|
|
9
|
+
| 'transitionend'
|
|
10
|
+
| 'touchmove';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
+
|
|
15
|
+
declare type Filter = {
|
|
16
|
+
webp?: Callback;
|
|
17
|
+
progressive?: Callback;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Adapter = {
|
|
21
|
+
error?: Callback;
|
|
22
|
+
loaded?: Callback;
|
|
23
|
+
loading?: Callback;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type LazyloadOptions = {
|
|
27
|
+
error?: string;
|
|
28
|
+
filter?: Filter;
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
adapter?: Adapter;
|
|
31
|
+
loading?: string;
|
|
32
|
+
attempt?: number;
|
|
33
|
+
preLoad?: number;
|
|
34
|
+
observer?: boolean;
|
|
35
|
+
lazyImage?: boolean;
|
|
36
|
+
throttleWait?: number;
|
|
37
|
+
listenEvents?: ListenEvent[];
|
|
38
|
+
dispatchEvent?: boolean;
|
|
39
|
+
lazyComponent?: boolean;
|
|
40
|
+
observerOptions?: IntersectionObserverInit;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const Lazyload: {
|
|
44
|
+
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare module '@vue/runtime-core' {
|
|
48
|
+
interface ComponentCustomProperties {
|
|
49
|
+
$Lazyload: {
|
|
50
|
+
$on: (event: string, handler: Callback) => void;
|
|
51
|
+
$off: (event: string, handler?: Callback) => void;
|
|
52
|
+
$once: (event: string, handler: Callback) => void;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
package/es/list/List.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
2
3
|
import type { ListDirection } from './types';
|
|
3
4
|
declare const listProps: {
|
|
4
5
|
error: BooleanConstructor;
|
|
@@ -8,9 +9,10 @@ declare const listProps: {
|
|
|
8
9
|
};
|
|
9
10
|
loading: BooleanConstructor;
|
|
10
11
|
finished: BooleanConstructor;
|
|
12
|
+
scroller: PropType<Element>;
|
|
11
13
|
errorText: StringConstructor;
|
|
12
14
|
direction: {
|
|
13
|
-
type:
|
|
15
|
+
type: PropType<ListDirection>;
|
|
14
16
|
default: ListDirection;
|
|
15
17
|
};
|
|
16
18
|
loadingText: StringConstructor;
|
|
@@ -29,9 +31,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
29
31
|
};
|
|
30
32
|
loading: BooleanConstructor;
|
|
31
33
|
finished: BooleanConstructor;
|
|
34
|
+
scroller: PropType<Element>;
|
|
32
35
|
errorText: StringConstructor;
|
|
33
36
|
direction: {
|
|
34
|
-
type:
|
|
37
|
+
type: PropType<ListDirection>;
|
|
35
38
|
default: ListDirection;
|
|
36
39
|
};
|
|
37
40
|
loadingText: StringConstructor;
|
|
@@ -48,9 +51,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
51
|
};
|
|
49
52
|
loading: BooleanConstructor;
|
|
50
53
|
finished: BooleanConstructor;
|
|
54
|
+
scroller: PropType<Element>;
|
|
51
55
|
errorText: StringConstructor;
|
|
52
56
|
direction: {
|
|
53
|
-
type:
|
|
57
|
+
type: PropType<ListDirection>;
|
|
54
58
|
default: ListDirection;
|
|
55
59
|
};
|
|
56
60
|
loadingText: StringConstructor;
|
package/es/list/List.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { ref, watch, nextTick, onUpdated, onMounted, defineComponent } from "vue";
|
|
2
|
+
import { ref, watch, computed, nextTick, onUpdated, onMounted, defineComponent } from "vue";
|
|
3
3
|
import { isHidden, truthProp, makeStringProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
|
4
4
|
import { useRect, useScrollParent, useEventListener } from "@zartui/use";
|
|
5
5
|
import { useExpose } from "../composables/use-expose.mjs";
|
|
@@ -12,6 +12,7 @@ const listProps = {
|
|
|
12
12
|
offset: makeNumericProp(300),
|
|
13
13
|
loading: Boolean,
|
|
14
14
|
finished: Boolean,
|
|
15
|
+
scroller: Object,
|
|
15
16
|
errorText: String,
|
|
16
17
|
direction: makeStringProp("down"),
|
|
17
18
|
loadingText: String,
|
|
@@ -31,6 +32,7 @@ var stdin_default = defineComponent({
|
|
|
31
32
|
const placeholder = ref();
|
|
32
33
|
const tabStatus = useTabStatus();
|
|
33
34
|
const scrollParent = useScrollParent(root);
|
|
35
|
+
const scroller = computed(() => props.scroller || scrollParent.value);
|
|
34
36
|
const check = () => {
|
|
35
37
|
nextTick(() => {
|
|
36
38
|
if (loading.value || props.finished || props.error || // skip check when inside an inactive tab
|
|
@@ -41,7 +43,7 @@ var stdin_default = defineComponent({
|
|
|
41
43
|
direction
|
|
42
44
|
} = props;
|
|
43
45
|
const offset = +props.offset;
|
|
44
|
-
const scrollParentRect = useRect(
|
|
46
|
+
const scrollParentRect = useRect(scroller);
|
|
45
47
|
if (!scrollParentRect.height || isHidden(root)) {
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
@@ -122,7 +124,7 @@ var stdin_default = defineComponent({
|
|
|
122
124
|
check
|
|
123
125
|
});
|
|
124
126
|
useEventListener("scroll", check, {
|
|
125
|
-
target:
|
|
127
|
+
target: scroller,
|
|
126
128
|
passive: true
|
|
127
129
|
});
|
|
128
130
|
return () => {
|
package/es/list/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-list-text-color: var(--zt-
|
|
1
|
+
:root{--zt-list-text-color: var(--zt-gray-a6);--zt-list-text-font-size: var(--zt-font-size-md);--zt-list-text-line-height: 44px;--zt-list-loading-icon-size: 16px}.zt-list__loading,.zt-list__finished-text,.zt-list__error-text{color:var(--zt-list-text-color);font-size:var(--zt-list-text-font-size);line-height:var(--zt-list-text-line-height);text-align:center}.zt-list__placeholder{height:0;pointer-events:none}.zt-list__loading-icon .zt-loading__spinner{width:var(--zt-list-loading-icon-size);height:var(--zt-list-loading-icon-size)}
|
package/es/list/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
7
7
|
};
|
|
8
8
|
loading: BooleanConstructor;
|
|
9
9
|
finished: BooleanConstructor;
|
|
10
|
+
scroller: import("vue").PropType<Element>;
|
|
10
11
|
errorText: StringConstructor;
|
|
11
12
|
direction: {
|
|
12
13
|
type: import("vue").PropType<import("./types").ListDirection>;
|
|
@@ -26,6 +27,7 @@ export declare const List: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
26
27
|
};
|
|
27
28
|
loading: BooleanConstructor;
|
|
28
29
|
finished: BooleanConstructor;
|
|
30
|
+
scroller: import("vue").PropType<Element>;
|
|
29
31
|
errorText: StringConstructor;
|
|
30
32
|
direction: {
|
|
31
33
|
type: import("vue").PropType<import("./types").ListDirection>;
|
package/es/loading/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-loading-text-color: var(--zt-
|
|
1
|
+
:root{--zt-loading-text-color: var(--zt-gray-a6);--zt-loading-text-font-size: var(--zt-font-size-md);--zt-loading-spinner-color: var(--zt-gray-a4);--zt-loading-spinner-size: 36px;--zt-loading-spinner-duration: .8s;--zt-loading-text-line-height: 20px}.zt-loading{position:relative;color:var(--zt-loading-spinner-color);font-size:0;vertical-align:middle}.zt-loading__spinner{position:relative;display:inline-block;width:var(--zt-loading-spinner-size);max-width:100%;height:var(--zt-loading-spinner-size);max-height:100%;vertical-align:middle;animation:zt-rotate var(--zt-loading-spinner-duration) linear infinite}.zt-loading__spinner--spinner{animation-timing-function:steps(12)}.zt-loading__spinner--circular{animation-duration:2s}.zt-loading__line{position:absolute;top:0;left:0;width:100%;height:100%}.zt-loading__line:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.zt-loading__circular{display:block;width:100%;height:100%}.zt-loading__circular circle{animation:zt-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.zt-loading__snake{display:block;width:100%;height:100%}.zt-loading__text{display:inline-block;margin-left:var(--zt-padding-base);color:var(--zt-loading-text-color);font-size:var(--zt-loading-text-font-size);line-height:var(--zt-loading-text-line-height);vertical-align:middle}.zt-loading--vertical{display:flex;flex-direction:column;align-items:center}.zt-loading--vertical .zt-loading__text{margin:var(--zt-padding-base) 0 0}.zt-loading--horizontal-with-text .zt-loading__spinner--snake{width:20px;height:20px}@keyframes zt-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}.zt-loading__spinner--spinner i:nth-of-type(1){transform:rotate(30deg);opacity:1}.zt-loading__spinner--spinner i:nth-of-type(2){transform:rotate(60deg);opacity:.9375}.zt-loading__spinner--spinner i:nth-of-type(3){transform:rotate(90deg);opacity:.875}.zt-loading__spinner--spinner i:nth-of-type(4){transform:rotate(120deg);opacity:.8125}.zt-loading__spinner--spinner i:nth-of-type(5){transform:rotate(150deg);opacity:.75}.zt-loading__spinner--spinner i:nth-of-type(6){transform:rotate(180deg);opacity:.6875}.zt-loading__spinner--spinner i:nth-of-type(7){transform:rotate(210deg);opacity:.625}.zt-loading__spinner--spinner i:nth-of-type(8){transform:rotate(240deg);opacity:.5625}.zt-loading__spinner--spinner i:nth-of-type(9){transform:rotate(270deg);opacity:.5}.zt-loading__spinner--spinner i:nth-of-type(10){transform:rotate(300deg);opacity:.4375}.zt-loading__spinner--spinner i:nth-of-type(11){transform:rotate(330deg);opacity:.375}.zt-loading__spinner--spinner i:nth-of-type(12){transform:rotate(360deg);opacity:.3125}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-media-picker-image-color:
|
|
1
|
+
:root{--zt-media-picker-image-color: var(--zt-text-color);--zt-media-picker-button-background: linear-gradient(135deg, #e6ebf0 0%, #fff 100%, #fff 100%);--zt-media-picker-button-box-shadow: -4px -4px 8px 0 var(--zt-white), 4px 4px 8px 0 var(--zt-gray-a1);--zt-media-picker-button-border: 0;--zt-media-picker-button-active-border: 1px solid rgba(255, 255, 255, .75);--zt-media-picker-button-active-box-shadow: inset 4px 4px 8px 0 var(--zt-gray-a2)}.zt-media-picker__hidden{display:none}.zt-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:var(--zt-text-color);padding:0 16px}.zt-media-picker__title:before{position:absolute;width:4px;height:16px;background:var(--zt-blue);left:0;top:14px;content:" "}.zt-media-picker__title:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-media-picker__line{width:100%;height:92px;display:flex;align-items:center;overflow-x:auto}.zt-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt-media-picker__line:after{content:" ";min-width:16px;height:10px}.zt-media-picker__box{width:48px;display:flex;flex-direction:column;align-items:center}.zt-media-picker__box:first-child{margin-left:16px}.zt-media-picker__box:not(:last-child){margin-right:24px}.zt-media-picker__button{display:flex;align-items:center;justify-content:center;width:48px;height:48px;background:var(--zt-media-picker-button-background);box-shadow:var(--zt-media-picker-button-box-shadow);border:var(--zt-media-picker-button-border);border-radius:8px;box-sizing:border-box}.zt-media-picker__button:active{background:rgba(45,75,115,.04);border:var(--zt-media-picker-button-active-border);box-shadow:var(--zt-media-picker-button-active-box-shadow)}.zt-media-picker__icon{width:32px;height:32px;color:var(--zt-media-picker-image-color)}.zt-media-picker__label{margin-top:8px;font-size:12px;color:var(--zt-gray-a8);letter-spacing:0;text-align:center;line-height:16px;-webkit-user-select:none;user-select:none}.zt-media-picker__grid{padding:0 16px 8px!important}.zt-media-picker__delete{box-sizing:content-box;width:20px;height:20px;position:absolute;padding:4px;top:0;right:0}.zt-media-picker .zt-image{width:100%;height:100%}.zt-media-picker .zt-grid-item__content{padding:0}.zt-media-picker__thumbnail{width:100%;height:100%}.zt-media-picker__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-white);background-color:var(--zt-uploader-mask-background);border-radius:4px}.zt-media-picker__mask-icon{font-size:var(--zt-uploader-mask-icon-size)}.zt-media-picker__mask-message{margin-top:6px;padding:0 var(--zt-padding-base);font-size:var(--zt-uploader-mask-message-font-size);line-height:var(--zt-uploader-mask-message-line-height)}.zt-media-picker__loading{width:var(--zt-uploader-loading-icon-size);height:var(--zt-uploader-loading-icon-size);color:var(--zt-uploader-icon-color)}.zt-theme-dark{--zt-media-picker-button-background: linear-gradient(135deg, #111c29 0%, #1d2c3e 100%, #1c2a3c 100%);--zt-media-picker-button-box-shadow: -4px -4px 8px 0 rgba(255, 255, 255, .08), 4px 4px 8px 0 rgba(0, 12, 24, .8);--zt-media-picker-button-border: 1px solid var(--zt-gray-a1);--zt-media-picker-button-active-border: 1px solid var(--zt-gray-a1);--zt-media-picker-button-active-box-shadow: inset 6px 6px 6px 0 #000d1b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-multiple-picker-warpper-padding: 12px 16px 4px 16px;--zt-multiple-picker-option-text-color: var(--zt-gray-
|
|
1
|
+
:root{--zt-multiple-picker-warpper-padding: 12px 16px 4px 16px;--zt-multiple-picker-option-text-color: var(--zt-gray-a6);--zt-multiple-picker-background-color: var(--zt-background-2);--zt-multiple-picker-toolbar-height: 44px;--zt-multiple-picker-action-padding: 0 var(--zt-padding-md);--zt-multiple-picker-title-text-color: var(--zt-gray-a4);--zt-multiple-picker-title-font-size: var(--zt-font-size-md);--zt-multiple-picker-title-padding: 12px 0;--zt-multiple-picker-title-line-height: var(--zt-line-height-md);--zt-multiple-picker-item-padding: 0 4px 8px 0;--zt-multiple-picker-action-font-size: var(--zt-font-size-md);--zt-multiple-picker-option-font-size: var(--zt-font-size-md);--zt-multiple-picker-option-disabled-opacity: var(--zt-disabled-opacity);--zt-multiple-picker-option-active-opacity: var(--zt-active-opacity);--zt-multiple-picker-max-height: 84vh;--zt-multiple-picker-loading-icon-color: var(--zt-blue);--zt-multiple-picker-loading-index: 3;--zt-multiple-picker-loading-mask-color: var(--zt-picker-loading-mask-color);--zt-multiple-picker-toolbar-padding: 8px 16px;--zt-multiple-picker-ellipsis-border-radius: 18px;--zt-multiple-picker-ellipsis-border: 1px solid var(--zt-gray-a2);--zt-multiple-picker-ellipsis-line-height: 20px;--zt-multiple-picker-title-background: var(--zt-background-2)}.zt-multiple-picker{display:flex;flex-direction:column;justify-content:space-between;position:relative;background-color:var(--zt-multiple-picker-background-color);-webkit-user-select:none;user-select:none;max-height:var(--zt-multiple-picker-max-height)}.zt-multiple-picker__toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:content-box;flex-shrink:0;background:var(--zt-multiple-picker-title-background);height:var(--zt-multiple-picker-toolbar-height);padding:var(--zt-multiple-picker-toolbar-padding)}.zt-multiple-picker__title{flex-shrink:0;font-weight:var(--zt-multiple-picker-cancel-action-font-weight);font-size:var(--zt-multiple-picker-title-font-size);line-height:var(--zt-multiple-picker-title-line-height);text-align:center;background:var(--zt-multiple-picker-title-background);color:var(--zt-multiple-picker-title-text-color);padding:var(--zt-multiple-picker-title-padding)}.zt-multiple-picker__options{position:relative;display:flex;cursor:-webkit-grab;cursor:grab;overflow-y:scroll}.zt-multiple-picker__options:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-multiple-picker__options:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-multiple-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--zt-multiple-picker-loading-icon-color);background-color:var(--zt-multiple-picker-loading-mask-color)}.zt-multiple-picker-options{flex:1;overflow-y:scroll;font-size:var(--zt-multiple-picker-option-font-size);margin:0;outline:0 none;padding:0}.zt-multiple-picker-options__wrapper{display:flex;flex-wrap:wrap;background-color:var(--zt-multiple-picker-background-color);padding:var(--zt-multiple-picker-warpper-padding)}.zt-multiple-picker-options__item{color:var(--zt-multiple-picker-option-text-color);padding:var(--zt-multiple-picker-item-padding);box-sizing:border-box;text-align:center;font-size:var(--zt-font-size-md)}.zt-multiple-picker-options__item .zt-ellipsis{line-height:var(--zt-multiple-picker-ellipsis-line-height);border-radius:var(--zt-multiple-picker-ellipsis-border-radius);border:var(--zt-multiple-picker-ellipsis-border);padding:var(--zt-multiple-picker-toolbar-padding)}.zt-multiple-picker-options__item:active{opacity:var(--zt-active-opacity)}.zt-multiple-picker-options__item--disabled{cursor:not-allowed;opacity:var(--zt-multiple-picker-option-disabled-opacity)}.zt-multiple-picker-options__item--last{padding-right:0}.zt-multiple-picker-options__item--selected{color:var(--zt-primary-color)}.zt-multiple-picker-options__item--selected .zt-ellipsis{background:var(--zt-primary-color-a1)}
|
package/es/nav-bar/NavBar.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
onClickRight?: ((...args: any[]) => any) | undefined;
|
|
62
62
|
}, {
|
|
63
63
|
fixed: boolean;
|
|
64
|
-
leftIcon: boolean;
|
|
65
64
|
border: boolean;
|
|
65
|
+
leftIcon: boolean;
|
|
66
66
|
rightIcon: boolean;
|
|
67
67
|
placeholder: boolean;
|
|
68
68
|
safeAreaInsetTop: boolean;
|
package/es/nav-bar/index.d.ts
CHANGED
|
@@ -39,8 +39,8 @@ export declare const NavBar: import("../utils").WithInstall<import("vue").Define
|
|
|
39
39
|
onClickRight?: ((...args: any[]) => any) | undefined;
|
|
40
40
|
}, {
|
|
41
41
|
fixed: boolean;
|
|
42
|
-
leftIcon: boolean;
|
|
43
42
|
border: boolean;
|
|
43
|
+
leftIcon: boolean;
|
|
44
44
|
rightIcon: boolean;
|
|
45
45
|
placeholder: boolean;
|
|
46
46
|
safeAreaInsetTop: boolean;
|
package/es/notify/Notify.d.ts
CHANGED
|
@@ -124,8 +124,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
124
|
}, {
|
|
125
125
|
type: NotifyType;
|
|
126
126
|
position: NotifyPosition;
|
|
127
|
-
show: boolean;
|
|
128
127
|
overlay: boolean;
|
|
128
|
+
show: boolean;
|
|
129
129
|
lockScroll: boolean;
|
|
130
130
|
lazyRender: boolean;
|
|
131
131
|
transitionAppear: boolean;
|
package/es/notify/index.d.ts
CHANGED
|
@@ -81,8 +81,8 @@ export declare const Notify: import("../utils").WithInstall<import("vue").Define
|
|
|
81
81
|
}, {
|
|
82
82
|
type: import("./types").NotifyType;
|
|
83
83
|
position: import("./types").NotifyPosition;
|
|
84
|
-
show: boolean;
|
|
85
84
|
overlay: boolean;
|
|
85
|
+
show: boolean;
|
|
86
86
|
lockScroll: boolean;
|
|
87
87
|
lazyRender: boolean;
|
|
88
88
|
transitionAppear: boolean;
|
|
@@ -92,7 +92,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
92
|
type: PropType<string | string[]>;
|
|
93
93
|
default: string;
|
|
94
94
|
};
|
|
95
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "
|
|
95
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "hide" | "show" | "blur" | "update:modelValue" | "close" | "delete")[], "input" | "hide" | "show" | "blur" | "update:modelValue" | "close" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
96
96
|
show: BooleanConstructor;
|
|
97
97
|
title: StringConstructor;
|
|
98
98
|
theme: {
|
|
@@ -143,13 +143,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
143
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
144
144
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
145
145
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
146
|
-
onShow?: ((...args: any[]) => any) | undefined;
|
|
147
146
|
onHide?: ((...args: any[]) => any) | undefined;
|
|
147
|
+
onShow?: ((...args: any[]) => any) | undefined;
|
|
148
148
|
}, {
|
|
149
149
|
theme: NumberKeyboardTheme;
|
|
150
|
+
show: boolean;
|
|
150
151
|
maxlength: string | number;
|
|
151
152
|
modelValue: string;
|
|
152
|
-
show: boolean;
|
|
153
153
|
transition: boolean;
|
|
154
154
|
safeAreaInsetBottom: boolean;
|
|
155
155
|
blurOnClose: boolean;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
|
|
2
2
|
import { ref, watch, computed, Teleport, Transition, defineComponent } from "vue";
|
|
3
|
-
import { truthProp, numericProp, getZIndexStyle, makeStringProp, makeNumericProp, stopPropagation, createNamespace
|
|
3
|
+
import { truthProp, numericProp, getZIndexStyle, makeStringProp, makeNumericProp, stopPropagation, createNamespace } from "../utils/index.mjs";
|
|
4
4
|
import { useClickAway } from "@zartui/use";
|
|
5
5
|
import NumberKeyboardKey from "./NumberKeyboardKey.mjs";
|
|
6
|
-
import ZtButton from "../button/Button.mjs";
|
|
7
6
|
import { showToast } from "../toast/index.mjs";
|
|
8
7
|
const [name, bem] = createNamespace("number-keyboard");
|
|
9
8
|
const numberKeyboardProps = {
|
|
@@ -126,13 +125,10 @@ var stdin_default = defineComponent({
|
|
|
126
125
|
};
|
|
127
126
|
const renderTitle = () => {
|
|
128
127
|
const {
|
|
129
|
-
title
|
|
130
|
-
theme,
|
|
131
|
-
closeButtonText
|
|
128
|
+
title
|
|
132
129
|
} = props;
|
|
133
130
|
const leftSlot = slots["title-left"];
|
|
134
|
-
const
|
|
135
|
-
const showTitle = title || showClose || leftSlot;
|
|
131
|
+
const showTitle = title || leftSlot;
|
|
136
132
|
if (!showTitle) {
|
|
137
133
|
return;
|
|
138
134
|
}
|
|
@@ -140,7 +136,7 @@ var stdin_default = defineComponent({
|
|
|
140
136
|
"class": bem("header")
|
|
141
137
|
}, [leftSlot && _createVNode("span", {
|
|
142
138
|
"class": bem("title-left")
|
|
143
|
-
}, [leftSlot()]), title && _createVNode("
|
|
139
|
+
}, [leftSlot()]), title && _createVNode("div", {
|
|
144
140
|
"class": bem("title")
|
|
145
141
|
}, [title])]);
|
|
146
142
|
};
|
|
@@ -195,11 +191,8 @@ var stdin_default = defineComponent({
|
|
|
195
191
|
return () => {
|
|
196
192
|
const Title = renderTitle();
|
|
197
193
|
const {
|
|
198
|
-
theme,
|
|
199
|
-
closeButtonText,
|
|
200
194
|
title
|
|
201
195
|
} = props;
|
|
202
|
-
const showClose = closeButtonText && theme === "default";
|
|
203
196
|
const Content = _createVNode(Transition, {
|
|
204
197
|
"name": props.transition ? "zt-slide-up" : ""
|
|
205
198
|
}, {
|
|
@@ -216,15 +209,7 @@ var stdin_default = defineComponent({
|
|
|
216
209
|
"class": [bem("body"), title ? "" : bem("body-no-title")]
|
|
217
210
|
}, [_createVNode("div", {
|
|
218
211
|
"class": bem("keys")
|
|
219
|
-
}, [renderKeys()]), renderSidebar()]),
|
|
220
|
-
"class": bem("finish-button-box")
|
|
221
|
-
}, [_createVNode(ZtButton, {
|
|
222
|
-
"type": "primary",
|
|
223
|
-
"block": true,
|
|
224
|
-
"text": closeButtonText,
|
|
225
|
-
"class": [bem("finish-button"), HAPTICS_FEEDBACK],
|
|
226
|
-
"onClick": onClose
|
|
227
|
-
}, null)])]), [[_vShow, props.show]])]
|
|
212
|
+
}, [renderKeys()]), renderSidebar()])]), [[_vShow, props.show]])]
|
|
228
213
|
});
|
|
229
214
|
if (props.teleport) {
|
|
230
215
|
return _createVNode(Teleport, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-number-keyboard-background:
|
|
1
|
+
:root{--zt-number-keyboard-background: var(--zt-background-3);--zt-number-keyboard-key-height: 44px;--zt-number-keyboard-key-font-size: 24px;--zt-number-keyboard-key-background: var(--zt-background-card);--zt-number-keyboard-delete-font-size: 20px;--zt-number-keyboard-title-color: var(--zt-gray-a6);--zt-number-keyboard-title-height: 34px;--zt-number-keyboard-title-font-size: 14px;--zt-number-keyboard-button-text-color: var(--zt-white);--zt-number-keyboard-button-background: var(--zt-primary-color);--zt-number-keyboard-z-index: 100;--zt-number-keyboard-key-spacing: 0 8px 8px 0;--zt-number-keyboard-radius: 16px 16px 0 0}.zt-number-keyboard{position:fixed;bottom:0;left:0;z-index:var(--zt-number-keyboard-z-index);width:100%;padding-bottom:8px;background:var(--zt-number-keyboard-background);-webkit-user-select:none;user-select:none;border-radius:var(--zt-number-keyboard-radius);box-sizing:border-box}.zt-number-keyboard--with-title{border-radius:20px 20px 0 0}.zt-number-keyboard__header{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;height:var(--zt-number-keyboard-title-height);padding-top:2px;color:var(--zt-number-keyboard-title-color);font-size:var(--zt-number-keyboard-title-font-size);line-height:var(--zt-number-keyboard-title-height)}.zt-number-keyboard__title{display:inline-block}.zt-number-keyboard__title-left{position:absolute;left:0}.zt-number-keyboard__body{display:flex;padding:2px 8px 0 16px}.zt-number-keyboard__body-no-title{padding-top:16px}.zt-number-keyboard__keys{display:flex;flex:3;flex-wrap:wrap}.zt-number-keyboard__sidebar{display:flex;flex:1;flex-direction:column}.zt-number-keyboard--unfit{padding-bottom:0}.zt-key{display:flex;align-items:center;justify-content:center;height:var(--zt-number-keyboard-key-height);font-size:var(--zt-number-keyboard-key-font-size);line-height:var(--zt-number-keyboard-key-height);background:var(--zt-number-keyboard-key-background);border-radius:var(--zt-radius-md);cursor:pointer;color:var(--zt-text-color)}.zt-key--large{position:absolute;top:0;right:6px;bottom:8px;left:0;height:auto}.zt-key--blue,.zt-key--delete{font-size:var(--zt-number-keyboard-delete-font-size)}.zt-key--active{opacity:var(--zt-active-opacity)}.zt-key--blue{color:var(--zt-number-keyboard-button-text-color);background:var(--zt-number-keyboard-button-background);line-height:28px;letter-spacing:0}.zt-key--blue.zt-key--active{opacity:var(--zt-active-opacity)}.zt-key__wrapper{position:relative;flex:1;flex-basis:33%;box-sizing:border-box;padding:var(--zt-number-keyboard-key-spacing)}.zt-key__wrapper--wider{flex-basis:66%}.zt-key__delete-icon{width:40px;height:40px}.zt-key__collapse-icon{width:30px;height:24px}.zt-key__loading-icon{color:var(--zt-number-keyboard-button-text-color)}.zt-number-keyboard__no-title{padding-bottom:0}
|
|
@@ -43,7 +43,7 @@ export declare const NumberKeyboard: import("../utils").WithInstall<import("vue"
|
|
|
43
43
|
type: import("vue").PropType<string | string[]>;
|
|
44
44
|
default: string;
|
|
45
45
|
};
|
|
46
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "
|
|
46
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "hide" | "show" | "blur" | "update:modelValue" | "close" | "delete")[], "input" | "hide" | "show" | "blur" | "update:modelValue" | "close" | "delete", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
47
|
show: BooleanConstructor;
|
|
48
48
|
title: StringConstructor;
|
|
49
49
|
theme: {
|
|
@@ -94,13 +94,13 @@ export declare const NumberKeyboard: import("../utils").WithInstall<import("vue"
|
|
|
94
94
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
95
95
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
96
96
|
onDelete?: ((...args: any[]) => any) | undefined;
|
|
97
|
-
onShow?: ((...args: any[]) => any) | undefined;
|
|
98
97
|
onHide?: ((...args: any[]) => any) | undefined;
|
|
98
|
+
onShow?: ((...args: any[]) => any) | undefined;
|
|
99
99
|
}, {
|
|
100
100
|
theme: import("./NumberKeyboard").NumberKeyboardTheme;
|
|
101
|
+
show: boolean;
|
|
101
102
|
maxlength: string | number;
|
|
102
103
|
modelValue: string;
|
|
103
|
-
show: boolean;
|
|
104
104
|
transition: boolean;
|
|
105
105
|
safeAreaInsetBottom: boolean;
|
|
106
106
|
blurOnClose: boolean;
|
package/es/picker/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-picker-cancel-margin: 8px 4px 8px 16px;--zt-picker-confirm-margin: 8px 16px 8px 4px;--zt-picker-title-height: 44px;--zt-picker-title-border-radius: 16px 16px 0 0;--zt-picker-frame-background-color: var(--zt-gray-
|
|
1
|
+
:root{--zt-picker-cancel-margin: 8px 4px 8px 16px;--zt-picker-confirm-margin: 8px 16px 8px 4px;--zt-picker-title-height: 44px;--zt-picker-title-border-radius: 16px 16px 0 0;--zt-picker-frame-background-color: var(--zt-gray-a06);--zt-picker-cancel-background-color: var(--zt-white);--zt-picker-title-text-color: var(--zt-gray-a4);--zt-picker-background: var(--zt-background-2);--zt-picker-toolbar-height: 60px;--zt-picker-title-font-size: var(--zt-font-size-md);--zt-picker-title-background: var(--zt-background-2);--zt-picker-title-line-height: var(--zt-line-height-md);--zt-picker-action-padding: 0 var(--zt-padding-md);--zt-picker-action-font-size: var(--zt-font-size-lg);--zt-picker-confirm-action-color: var(--zt-white);--zt-picker-cancel-action-color: var(--zt-text-color);--zt-picker-option-font-size: var(--zt-font-size-lg);--zt-picker-option-padding: 0 var(--zt-padding-base);--zt-picker-option-text-color: var(--zt-text-color);--zt-picker-option-disabled-opacity: var(--zt-disabled-opacity);--zt-picker-loading-icon-color: var(--zt-primary-color);--zt-picker-loading-mask-color: rgba(255, 255, 255, .9);--zt-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4));--zt-picker-unit-font-size: var(--zt-font-size-md)}.zt-theme-dark{--zt-picker-loading-mask-color: rgba(0, 0, 0, .6);--zt-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.zt-picker{position:relative;background:var(--zt-picker-background);-webkit-user-select:none;user-select:none}.zt-picker__toolbar{display:flex;align-items:center;justify-content:space-between;height:var(--zt-picker-toolbar-height)}.zt-picker__cancel,.zt-picker__confirm{width:50%}.zt-picker__cancel{background:var(--zt-button-default-background);margin:var(--zt-picker-cancel-margin)}.zt-picker__confirm{margin:var(--zt-picker-confirm-margin)}.zt-picker__title{display:flex;justify-content:center;align-items:center;width:100%;height:var(--zt-picker-title-height);border-radius:var(--zt-picker-title-border-radius);font-size:var(--zt-picker-title-font-size);background:var(--zt-picker-title-background);color:var(--zt-picker-title-text-color)}.zt-picker__columns{position:relative;display:flex;cursor:-webkit-grab;cursor:grab}.zt-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--zt-picker-loading-icon-color);background:var(--zt-picker-loading-mask-color)}.zt-picker__frame{position:absolute;top:50%;z-index:2;transform:translateY(-50%);pointer-events:none;width:100%;background:var(--zt-picker-frame-background-color)}.zt-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--zt-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.zt-picker-column{position:relative;flex:1;overflow:hidden;font-size:var(--zt-picker-option-font-size);background:var(--zt-picker-background)}.zt-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.zt-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--zt-picker-option-padding);color:var(--zt-picker-option-text-color)}.zt-picker-column__item--disabled{cursor:not-allowed;opacity:var(--zt-picker-option-disabled-opacity)}.zt-picker-column__item--selected{font-weight:700}.zt-picker-column__unit{background:var(--zt-picker-title-background);position:absolute;display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--zt-picker-option-text-color);font-size:var(--zt-picker-option-font-size);width:100%;height:100%}.zt-picker-column__unit-text{margin:0 4px;font-size:var(--zt-picker-unit-font-size)}
|
package/es/popover/Popover.d.ts
CHANGED
|
@@ -162,8 +162,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
162
162
|
}, {
|
|
163
163
|
offset: [number, number];
|
|
164
164
|
theme: PopoverTheme;
|
|
165
|
-
show: boolean;
|
|
166
165
|
overlay: boolean;
|
|
166
|
+
show: boolean;
|
|
167
167
|
teleport: string | import("vue").RendererElement | null | undefined;
|
|
168
168
|
closeOnClickOverlay: boolean;
|
|
169
169
|
actions: PopoverAction[];
|