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
package/es/tabs/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
41
41
|
};
|
|
42
42
|
titleActiveColor: StringConstructor;
|
|
43
43
|
titleInactiveColor: StringConstructor;
|
|
44
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("scroll" | "change" | "rendered" | "clickTab" | "update:active")[], "scroll" | "change" | "rendered" | "clickTab" | "update:active", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
45
45
|
type: {
|
|
46
46
|
type: import("vue").PropType<import("./types").TabsType>;
|
|
47
47
|
default: import("./types").TabsType;
|
|
@@ -91,12 +91,12 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
91
91
|
"onUpdate:active"?: ((...args: any[]) => any) | undefined;
|
|
92
92
|
}, {
|
|
93
93
|
type: import("./types").TabsType;
|
|
94
|
-
border: boolean;
|
|
95
|
-
duration: string | number;
|
|
96
|
-
lazyRender: boolean;
|
|
97
94
|
ellipsis: boolean;
|
|
98
95
|
sticky: boolean;
|
|
96
|
+
border: boolean;
|
|
99
97
|
active: string | number;
|
|
98
|
+
duration: string | number;
|
|
99
|
+
lazyRender: boolean;
|
|
100
100
|
offsetTop: string | number;
|
|
101
101
|
shrink: boolean;
|
|
102
102
|
animated: boolean;
|
package/es/tag/Tag.d.ts
CHANGED
package/es/tag/index.d.ts
CHANGED
|
@@ -72,8 +72,8 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
72
72
|
mark: boolean;
|
|
73
73
|
type: import("./Tag").TagType;
|
|
74
74
|
badge: boolean;
|
|
75
|
-
show: boolean;
|
|
76
75
|
round: boolean;
|
|
76
|
+
show: boolean;
|
|
77
77
|
closeable: boolean;
|
|
78
78
|
plain: boolean;
|
|
79
79
|
badgeWidth: number;
|
|
@@ -4,6 +4,10 @@ export declare const textEllipsisProps: {
|
|
|
4
4
|
type: (NumberConstructor | StringConstructor)[];
|
|
5
5
|
default: number;
|
|
6
6
|
};
|
|
7
|
+
dots: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
7
11
|
content: {
|
|
8
12
|
type: import("vue").PropType<string>;
|
|
9
13
|
default: string;
|
|
@@ -16,7 +20,7 @@ export declare const textEllipsisProps: {
|
|
|
16
20
|
type: import("vue").PropType<string>;
|
|
17
21
|
default: string;
|
|
18
22
|
};
|
|
19
|
-
|
|
23
|
+
position: {
|
|
20
24
|
type: import("vue").PropType<string>;
|
|
21
25
|
default: string;
|
|
22
26
|
};
|
|
@@ -27,6 +31,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
31
|
type: (NumberConstructor | StringConstructor)[];
|
|
28
32
|
default: number;
|
|
29
33
|
};
|
|
34
|
+
dots: {
|
|
35
|
+
type: import("vue").PropType<string>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
30
38
|
content: {
|
|
31
39
|
type: import("vue").PropType<string>;
|
|
32
40
|
default: string;
|
|
@@ -39,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
47
|
type: import("vue").PropType<string>;
|
|
40
48
|
default: string;
|
|
41
49
|
};
|
|
42
|
-
|
|
50
|
+
position: {
|
|
43
51
|
type: import("vue").PropType<string>;
|
|
44
52
|
default: string;
|
|
45
53
|
};
|
|
@@ -48,6 +56,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
56
|
type: (NumberConstructor | StringConstructor)[];
|
|
49
57
|
default: number;
|
|
50
58
|
};
|
|
59
|
+
dots: {
|
|
60
|
+
type: import("vue").PropType<string>;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
51
63
|
content: {
|
|
52
64
|
type: import("vue").PropType<string>;
|
|
53
65
|
default: string;
|
|
@@ -60,7 +72,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
72
|
type: import("vue").PropType<string>;
|
|
61
73
|
default: string;
|
|
62
74
|
};
|
|
63
|
-
|
|
75
|
+
position: {
|
|
64
76
|
type: import("vue").PropType<string>;
|
|
65
77
|
default: string;
|
|
66
78
|
};
|
|
@@ -68,9 +80,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
80
|
onClickAction?: ((...args: any[]) => any) | undefined;
|
|
69
81
|
}, {
|
|
70
82
|
content: string;
|
|
83
|
+
position: string;
|
|
71
84
|
rows: string | number;
|
|
85
|
+
dots: string;
|
|
72
86
|
expandText: string;
|
|
73
87
|
collapseText: string;
|
|
74
|
-
highlight: string;
|
|
75
88
|
}, {}>;
|
|
76
89
|
export default _default;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { ref, watch, onMounted, defineComponent } from "vue";
|
|
2
|
+
import { ref, watch, computed, onMounted, defineComponent } from "vue";
|
|
3
3
|
import { useEventListener } from "@zartui/use";
|
|
4
4
|
import { makeNumericProp, makeStringProp, createNamespace } from "../utils/index.mjs";
|
|
5
5
|
const [name, bem] = createNamespace("text-ellipsis");
|
|
6
6
|
const textEllipsisProps = {
|
|
7
7
|
rows: makeNumericProp(1),
|
|
8
|
+
dots: makeStringProp("..."),
|
|
8
9
|
content: makeStringProp(""),
|
|
9
10
|
expandText: makeStringProp(""),
|
|
10
11
|
collapseText: makeStringProp(""),
|
|
11
|
-
|
|
12
|
+
position: makeStringProp("end")
|
|
12
13
|
};
|
|
13
14
|
var stdin_default = defineComponent({
|
|
14
15
|
name,
|
|
@@ -21,6 +22,7 @@ var stdin_default = defineComponent({
|
|
|
21
22
|
const expanded = ref(false);
|
|
22
23
|
const hasAction = ref(false);
|
|
23
24
|
const root = ref();
|
|
25
|
+
const actionText = computed(() => expanded.value ? props.collapseText : props.expandText);
|
|
24
26
|
const pxToNum = (value) => {
|
|
25
27
|
if (!value)
|
|
26
28
|
return 0;
|
|
@@ -50,23 +52,52 @@ var stdin_default = defineComponent({
|
|
|
50
52
|
const calcEllipsisText = (container2, maxHeight2) => {
|
|
51
53
|
const {
|
|
52
54
|
content,
|
|
53
|
-
|
|
55
|
+
position,
|
|
56
|
+
dots
|
|
54
57
|
} = props;
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
const end = content.length;
|
|
59
|
+
const calcEllipse = () => {
|
|
60
|
+
const tail = (left, right) => {
|
|
61
|
+
if (right - left <= 1) {
|
|
62
|
+
if (position === "end") {
|
|
63
|
+
return content.slice(0, left) + dots;
|
|
64
|
+
}
|
|
65
|
+
return dots + content.slice(right, end);
|
|
66
|
+
}
|
|
67
|
+
const middle2 = Math.round((left + right) / 2);
|
|
68
|
+
if (position === "end") {
|
|
69
|
+
container2.innerText = content.slice(0, middle2) + dots + actionText.value;
|
|
70
|
+
} else {
|
|
71
|
+
container2.innerText = dots + content.slice(middle2, end) + actionText.value;
|
|
72
|
+
}
|
|
73
|
+
if (container2.offsetHeight > maxHeight2) {
|
|
74
|
+
if (position === "end") {
|
|
75
|
+
return tail(left, middle2);
|
|
76
|
+
}
|
|
77
|
+
return tail(middle2, right);
|
|
78
|
+
}
|
|
79
|
+
if (position === "end") {
|
|
80
|
+
return tail(middle2, right);
|
|
81
|
+
}
|
|
82
|
+
return tail(left, middle2);
|
|
83
|
+
};
|
|
84
|
+
container2.innerText = tail(0, end);
|
|
85
|
+
};
|
|
86
|
+
const middleTail = (leftPart, rightPart) => {
|
|
87
|
+
if (leftPart[1] - leftPart[0] <= 1 && rightPart[1] - rightPart[0] <= 1) {
|
|
88
|
+
return content.slice(0, leftPart[0]) + dots + content.slice(rightPart[1], end);
|
|
67
89
|
}
|
|
68
|
-
|
|
69
|
-
|
|
90
|
+
const leftMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
|
|
91
|
+
const rightMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
|
|
92
|
+
container2.innerText = props.content.slice(0, leftMiddle) + props.dots + props.content.slice(rightMiddle, end) + props.expandText;
|
|
93
|
+
if (container2.offsetHeight >= maxHeight2) {
|
|
94
|
+
return middleTail([leftPart[0], leftMiddle], [rightMiddle, rightPart[1]]);
|
|
95
|
+
}
|
|
96
|
+
return middleTail([leftMiddle, leftPart[1]], [rightPart[0], rightMiddle]);
|
|
97
|
+
};
|
|
98
|
+
const middle = 0 + end >> 1;
|
|
99
|
+
props.position === "middle" ? container2.innerText = middleTail([0, middle], [middle, end]) : calcEllipse();
|
|
100
|
+
return container2.innerText;
|
|
70
101
|
};
|
|
71
102
|
const container = cloneContainer();
|
|
72
103
|
if (!container)
|
|
@@ -76,7 +107,7 @@ var stdin_default = defineComponent({
|
|
|
76
107
|
paddingTop,
|
|
77
108
|
lineHeight
|
|
78
109
|
} = container.style;
|
|
79
|
-
const maxHeight = (Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom);
|
|
110
|
+
const maxHeight = Math.ceil((Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom));
|
|
80
111
|
if (maxHeight < container.offsetHeight) {
|
|
81
112
|
hasAction.value = true;
|
|
82
113
|
text.value = calcEllipsisText(container, maxHeight);
|
|
@@ -90,26 +121,17 @@ var stdin_default = defineComponent({
|
|
|
90
121
|
expanded.value = !expanded.value;
|
|
91
122
|
emit("clickAction", event);
|
|
92
123
|
};
|
|
93
|
-
const formatSearchKeyword = (keywords, text2) => {
|
|
94
|
-
if (!keywords)
|
|
95
|
-
return text2;
|
|
96
|
-
const replaceReg = new RegExp(keywords, "ig");
|
|
97
|
-
const replaceString = `<span style="color: #0091FA; background: rgba(0, 145, 250, 0.1);">${keywords}</span>`;
|
|
98
|
-
return text2.replace(replaceReg, replaceString);
|
|
99
|
-
};
|
|
100
124
|
const renderAction = () => _createVNode("span", {
|
|
101
125
|
"class": bem("action"),
|
|
102
126
|
"onClick": onClickAction
|
|
103
|
-
}, [
|
|
127
|
+
}, [actionText.value]);
|
|
104
128
|
onMounted(calcEllipsised);
|
|
105
|
-
watch(() => [props.content, props.rows], calcEllipsised);
|
|
129
|
+
watch(() => [props.content, props.rows, props.position], calcEllipsised);
|
|
106
130
|
useEventListener("resize", calcEllipsised);
|
|
107
131
|
return () => _createVNode("div", {
|
|
108
132
|
"ref": root,
|
|
109
133
|
"class": bem()
|
|
110
|
-
}, [
|
|
111
|
-
"innerHTML": formatSearchKeyword(props.highlight, expanded.value ? props.content : text.value)
|
|
112
|
-
}, null), hasAction.value ? renderAction() : null]);
|
|
134
|
+
}, [expanded.value ? props.content : text.value, hasAction.value ? renderAction() : null]);
|
|
113
135
|
}
|
|
114
136
|
});
|
|
115
137
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-text-ellipsis-line-height:calc(200% - 8px);--zt-text-ellipsis-action-color: var(--zt-
|
|
1
|
+
:root{--zt-text-ellipsis-line-height:calc(200% - 8px);--zt-text-ellipsis-action-color: var(--zt-primary-color)}.zt-text-ellipsis{line-height:var(--zt-text-ellipsis-line-height);white-space:pre-wrap;word-break:break-all}.zt-text-ellipsis__action{cursor:pointer;color:var(--zt-text-ellipsis-action-color)}.zt-text-ellipsis__action:active{opacity:var(--zt-active-opacity)}
|
|
@@ -3,6 +3,10 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
|
3
3
|
type: (NumberConstructor | StringConstructor)[];
|
|
4
4
|
default: number;
|
|
5
5
|
};
|
|
6
|
+
dots: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
6
10
|
content: {
|
|
7
11
|
type: import("vue").PropType<string>;
|
|
8
12
|
default: string;
|
|
@@ -15,7 +19,7 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
|
15
19
|
type: import("vue").PropType<string>;
|
|
16
20
|
default: string;
|
|
17
21
|
};
|
|
18
|
-
|
|
22
|
+
position: {
|
|
19
23
|
type: import("vue").PropType<string>;
|
|
20
24
|
default: string;
|
|
21
25
|
};
|
|
@@ -24,6 +28,10 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
|
24
28
|
type: (NumberConstructor | StringConstructor)[];
|
|
25
29
|
default: number;
|
|
26
30
|
};
|
|
31
|
+
dots: {
|
|
32
|
+
type: import("vue").PropType<string>;
|
|
33
|
+
default: string;
|
|
34
|
+
};
|
|
27
35
|
content: {
|
|
28
36
|
type: import("vue").PropType<string>;
|
|
29
37
|
default: string;
|
|
@@ -36,7 +44,7 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
|
36
44
|
type: import("vue").PropType<string>;
|
|
37
45
|
default: string;
|
|
38
46
|
};
|
|
39
|
-
|
|
47
|
+
position: {
|
|
40
48
|
type: import("vue").PropType<string>;
|
|
41
49
|
default: string;
|
|
42
50
|
};
|
|
@@ -44,10 +52,11 @@ export declare const TextEllipsis: import("../utils").WithInstall<import("vue").
|
|
|
44
52
|
onClickAction?: ((...args: any[]) => any) | undefined;
|
|
45
53
|
}, {
|
|
46
54
|
content: string;
|
|
55
|
+
position: string;
|
|
47
56
|
rows: string | number;
|
|
57
|
+
dots: string;
|
|
48
58
|
expandText: string;
|
|
49
59
|
collapseText: string;
|
|
50
|
-
highlight: string;
|
|
51
60
|
}, {}>>;
|
|
52
61
|
export default TextEllipsis;
|
|
53
62
|
export { textEllipsisProps } from './TextEllipsis';
|
package/es/time-picker/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-time-picker-cancel-margin: 8px 4px 8px 16px;--zt-time-picker-confirm-margin: 8px 16px 8px 4px;--zt-time-picker-title-height: 44px;--zt-time-picker-title-border-radius: 16px 16px 0 0;--zt-time-picker-frame-background-color: var(--zt-gray-a04);--zt-time-picker-cancel-background-color: var(--zt-white);--zt-time-picker-title-text-color: var(--zt-gray-a4);--zt-time-picker-background: var(--zt-background-2);--zt-time-picker-toolbar-height: 60px;--zt-time-picker-title-font-size: var(--zt-font-size-md);--zt-time-picker-title-line-height: var(--zt-line-height-md);--zt-time-picker-action-padding: 0 var(--zt-padding-md);--zt-time-picker-action-font-size: var(--zt-font-size-lg);--zt-time-picker-confirm-action-color: var(--zt-white);--zt-time-picker-cancel-action-color: var(--zt-text-color);--zt-time-picker-option-font-size: 24px;--zt-time-picker-option-radius: 8px;--zt-time-picker-option-padding: 0 var(--zt-padding-base);--zt-time-picker-option-text-color: var(--zt-text-color);--zt-time-picker-option-disabled-opacity:
|
|
1
|
+
:root{--zt-time-picker-cancel-margin: 8px 4px 8px 16px;--zt-time-picker-confirm-margin: 8px 16px 8px 4px;--zt-time-picker-title-height: 44px;--zt-time-picker-title-border-radius: 16px 16px 0 0;--zt-time-picker-frame-background-color: var(--zt-gray-a04);--zt-time-picker-cancel-background-color: var(--zt-white);--zt-time-picker-title-text-color: var(--zt-gray-a4);--zt-time-picker-background: var(--zt-background-2);--zt-time-picker-toolbar-height: 60px;--zt-time-picker-title-font-size: var(--zt-font-size-md);--zt-time-picker-title-line-height: var(--zt-line-height-md);--zt-time-picker-action-padding: 0 var(--zt-padding-md);--zt-time-picker-action-font-size: var(--zt-font-size-lg);--zt-time-picker-confirm-action-color: var(--zt-white);--zt-time-picker-cancel-action-color: var(--zt-text-color);--zt-time-picker-option-font-size: 24px;--zt-time-picker-option-radius: 8px;--zt-time-picker-option-padding: 0 var(--zt-padding-base);--zt-time-picker-option-text-color: var(--zt-text-color);--zt-time-picker-option-disabled-opacity: var(--zt-disabled-opacity);--zt-time-picker-loading-icon-color: var(--zt-primary-color);--zt-time-picker-loading-mask-color: rgba(255, 255, 255, .9);--zt-time-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-time-picker-unit-font-size: var(--zt-font-size-md);--zt-time-picker-unit-background: var(--zt-white)}.zt-theme-dark{--zt-time-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-time-picker-unit-background: rgba(255, 255, 255, .04)}.zt-time-picker{position:relative;background:var(--zt-time-picker-background);-webkit-user-select:none;user-select:none}.zt-time-picker__toolbar{display:flex;align-items:center;justify-content:space-between;height:var(--zt-time-picker-toolbar-height)}.zt-time-picker__cancel,.zt-time-picker__confirm{width:50%}.zt-time-picker__cancel{background:#ffffff;margin:var(--zt-time-picker-cancel-margin)}.zt-time-picker__confirm{margin:var(--zt-time-picker-confirm-margin)}.zt-time-picker__title{display:flex;justify-content:center;align-items:center;width:100%;height:var(--zt-time-picker-title-height);border-radius:var(--zt-time-picker-title-border-radius);font-size:var(--zt-time-picker-title-font-size);background:#ffffff;color:var(--zt-time-picker-title-text-color)}.zt-time-picker__columns{background:var(--zt-time-picker-background);position:relative;display:flex;cursor:-webkit-grab;cursor:grab;padding:16px 0;justify-content:space-evenly}.zt-time-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-time-picker-loading-icon-color);background:var(--zt-time-picker-loading-mask-color)}.zt-time-picker__frame{position:absolute;top:50%;z-index:2;transform:translateY(-50%);pointer-events:none;width:100%;background:var(--zt-time-picker-frame-background-color)}.zt-time-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--zt-time-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.zt-time-picker__separator{position:absolute;display:flex;align-items:center;width:100%;height:100%;top:0}.zt-time-picker__colon{position:relative}.zt-time-picker__colon:only-child{left:50%}.zt-time-picker__colon:not(:only-child):first-child{left:35%}.zt-time-picker__colon:not(:only-child):last-child{left:65%}.zt-time-picker__colon:before{position:absolute;content:" ";width:6px;height:6px;border-radius:50%;background:var(--zt-gray);left:calc(50% - 3px);top:calc(50% - 9px)}.zt-time-picker__colon:after{position:absolute;content:" ";width:6px;height:6px;border-radius:50%;background:var(--zt-gray);left:calc(50% - 3px);top:calc(50% + 3px)}.zt-time-picker-column{position:relative;overflow:hidden;font-size:var(--zt-time-picker-option-font-size);background:var(--zt-gray-a04);border-radius:var(--zt-time-picker-option-radius)}.zt-time-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.zt-time-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--zt-time-picker-option-padding);color:var(--zt-time-picker-option-text-color)}.zt-time-picker-column__item--disabled{cursor:not-allowed;opacity:var(--zt-time-picker-option-disabled-opacity)}.zt-time-picker-column__unit{position:absolute;display:flex;align-items:center;justify-content:center;background:var(--zt-time-picker-unit-background);color:var(--zt-time-picker-option-text-color);font-size:var(--zt-time-picker-option-font-size);width:100%;height:100%}.zt-time-picker-column__unit-text{margin:0 4px;font-size:var(--zt-time-picker-unit-font-size);font-weight:700}.zt-time-picker-column__arrow-top{width:16px;height:6px;position:absolute;top:8px;left:calc(50% - 8px)}.zt-time-picker-column__arrow-bottom{width:16px;height:6px;transform:rotate(180deg);position:absolute;bottom:8px;left:calc(50% - 8px)}
|
package/es/timeline/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-timeline-title-color: var(--zt-gray
|
|
1
|
+
:root{--zt-timeline-title-color: var(--zt-gray);--zt-timeline-sub-title-color: var(--zt-gray-a6);--zt-timeline-content-color: var(--zt-gray);--zt-timeline-background: var(--zt-white);--zt-timeline-bar-background: var(--zt-primary-color);--zt-timeline-time-color: var(--zt-gray-a8)}.zt-timeline{background-color:var(--zt-timeline-background)}.zt-timeline__top-bar{height:44px;display:flex;justify-content:space-between;align-items:center}.zt-timeline__top-left{display:flex;align-items:center}.zt-timeline__bar{width:4px;height:16px;background:var(--zt-timeline-bar-background);margin-right:12px}.zt-timeline__title{font-size:16px;font-weight:700;color:var(--zt-timeline-title-color);line-height:24px}.zt-timeline__top-right{padding-right:16px;display:flex;align-items:center}.zt-timeline__top-right .zt-switch--on{background:var(--zt-timeline-bar-background)}.zt-timeline__fold-text{font-size:16px;color:var(--zt-gray-a6);line-height:24px;margin-right:8px}.zt-timeline__container{padding-top:16px}.zt-timeline__item{padding:0 16px 16px;display:flex}.zt-timeline__item.last-item .zt-timeline__line-dot,.zt-timeline__item.last-item .zt-timeline__line{height:0}.zt-timeline__item.last-item .zt-timeline__dot{border-color:var(--zt-timeline-bar-background)}.zt-timeline__left-container{margin-right:8px;display:flex;flex-direction:column;align-items:center;position:relative}.zt-timeline__right-container{flex:1}.zt-timeline__dot-container{top:5px}.zt-timeline__dot{width:12px;height:12px;background-color:#fff;border:1px solid rgba(45,75,115,.2);border-radius:50%;z-index:2}.zt-timeline__avatar-box{width:40px;height:40px;z-index:2}.zt-timeline__avatar{width:40px;height:40px;background:#0091fa;border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt-timeline__line-dot{position:absolute;background-color:#f5f5f5;width:2px;height:calc(100% + 16px)}.zt-timeline__title-box{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.zt-timeline__time{font-size:12px;color:var(--zt-timeline-time-color);line-height:16px}.zt-timeline__content-box{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;padding-bottom:8px}.zt-timeline__main-container{background:rgba(0,0,0,.02);border-radius:4px;padding:8px 12px}.zt-timeline__main-container:before{border-radius:4px}.zt-timeline__main-container .zt-timeline__text-bold{font-weight:700}.zt-timeline__opinion-box{padding-top:7px}.zt-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:var(--zt-timeline-sub-title-color);line-height:20px}.zt-timeline__opinion{font-size:14px;color:var(--zt-timeline-content-color);line-height:20px;word-break:break-all}
|
package/es/toast/Toast.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PropType, CSSProperties, ExtractPropTypes } from 'vue';
|
|
2
2
|
import { LoadingType } from '../loading';
|
|
3
|
-
import type { ToastType, ToastPosition } from './types';
|
|
3
|
+
import type { ToastType, ToastPosition, ToastWordBreak } from './types';
|
|
4
4
|
declare const toastProps: {
|
|
5
5
|
icon: StringConstructor;
|
|
6
6
|
show: BooleanConstructor;
|
|
@@ -20,6 +20,7 @@ declare const toastProps: {
|
|
|
20
20
|
default: ToastPosition;
|
|
21
21
|
};
|
|
22
22
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
23
|
+
wordBreak: PropType<ToastWordBreak>;
|
|
23
24
|
className: PropType<unknown>;
|
|
24
25
|
iconPrefix: StringConstructor;
|
|
25
26
|
transition: {
|
|
@@ -53,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
54
|
default: ToastPosition;
|
|
54
55
|
};
|
|
55
56
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
57
|
+
wordBreak: PropType<ToastWordBreak>;
|
|
56
58
|
className: PropType<unknown>;
|
|
57
59
|
iconPrefix: StringConstructor;
|
|
58
60
|
transition: {
|
|
@@ -84,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
86
|
default: ToastPosition;
|
|
85
87
|
};
|
|
86
88
|
teleport: PropType<string | import("vue").RendererElement | null | undefined>;
|
|
89
|
+
wordBreak: PropType<ToastWordBreak>;
|
|
87
90
|
className: PropType<unknown>;
|
|
88
91
|
iconPrefix: StringConstructor;
|
|
89
92
|
transition: {
|
|
@@ -101,8 +104,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
104
|
}, {
|
|
102
105
|
type: ToastType;
|
|
103
106
|
position: ToastPosition;
|
|
104
|
-
show: boolean;
|
|
105
107
|
overlay: boolean;
|
|
108
|
+
show: boolean;
|
|
106
109
|
duration: number;
|
|
107
110
|
closeOnClickOverlay: boolean;
|
|
108
111
|
transition: string;
|
package/es/toast/Toast.mjs
CHANGED
|
@@ -17,6 +17,7 @@ const toastProps = {
|
|
|
17
17
|
duration: makeNumberProp(2e3),
|
|
18
18
|
position: makeStringProp("middle"),
|
|
19
19
|
teleport: [String, Object],
|
|
20
|
+
wordBreak: String,
|
|
20
21
|
className: unknownProp,
|
|
21
22
|
iconPrefix: String,
|
|
22
23
|
transition: makeStringProp("zt-fade"),
|
|
@@ -102,7 +103,7 @@ var stdin_default = defineComponent({
|
|
|
102
103
|
onMounted(toggleClickable);
|
|
103
104
|
onUnmounted(toggleClickable);
|
|
104
105
|
return () => _createVNode(Popup, _mergeProps({
|
|
105
|
-
"class": [bem([props.position, {
|
|
106
|
+
"class": [bem([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
|
|
106
107
|
[props.type]: !props.icon
|
|
107
108
|
}]), props.className],
|
|
108
109
|
"lockScroll": false,
|
package/es/toast/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-toast-max-width: 70%;--zt-toast-font-size: var(--zt-font-size-md);--zt-toast-text-color: var(--zt-white);--zt-toast-loading-icon-color: var(--zt-white);--zt-toast-line-height: var(--zt-line-height-md);--zt-toast-radius: var(--zt-radius-lg);--zt-toast-background:
|
|
1
|
+
:root{--zt-toast-max-width: 70%;--zt-toast-font-size: var(--zt-font-size-md);--zt-toast-text-color: var(--zt-white);--zt-toast-loading-icon-color: var(--zt-white);--zt-toast-line-height: var(--zt-line-height-md);--zt-toast-radius: var(--zt-radius-lg);--zt-toast-background: var(--zt-gray-a8);--zt-toast-icon-size: 36px;--zt-toast-text-min-width: 96px;--zt-toast-text-padding: var(--zt-padding-xs) var(--zt-padding-sm);--zt-toast-default-padding: var(--zt-padding-md);--zt-toast-default-width: 88px;--zt-toast-default-min-height: 84px;--zt-toast-position-top-distance: 20%;--zt-toast-position-bottom-distance: 20%}.zt-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--zt-duration-fast);width:var(--zt-toast-default-width);max-width:var(--zt-toast-max-width);min-height:var(--zt-toast-default-min-height);padding:var(--zt-toast-default-padding);color:var(--zt-toast-text-color);font-size:var(--zt-toast-font-size);line-height:var(--zt-toast-line-height);white-space:pre-wrap;text-align:center;word-break:break-all;background:var(--zt-toast-background);border-radius:var(--zt-toast-radius)}.zt-toast--break-normal{word-break:normal;word-wrap:normal}.zt-toast--break-word{word-break:normal;word-wrap:break-word}.zt-toast--unclickable{overflow:hidden;cursor:not-allowed}.zt-toast--unclickable *{pointer-events:none}.zt-toast--text,.zt-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--zt-toast-text-min-width);min-height:0;padding:var(--zt-toast-text-padding)}.zt-toast--text .zt-toast__text,.zt-toast--html .zt-toast__text{margin-top:0}.zt-toast--top{top:var(--zt-toast-position-top-distance)}.zt-toast--bottom{top:auto;bottom:var(--zt-toast-position-bottom-distance)}.zt-toast__icon{font-size:var(--zt-toast-icon-size)}.zt-toast__loading{padding:var(--zt-padding-base);color:var(--zt-toast-loading-icon-color)}.zt-toast__text{margin-top:var(--zt-padding-xs)}.zt-theme-dark{--zt-toast-background: var(--zt-gray-a1)}
|
package/es/toast/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
|
17
17
|
default: import("./types").ToastPosition;
|
|
18
18
|
};
|
|
19
19
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
20
|
+
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
|
|
20
21
|
className: import("vue").PropType<unknown>;
|
|
21
22
|
iconPrefix: StringConstructor;
|
|
22
23
|
transition: {
|
|
@@ -48,6 +49,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
|
48
49
|
default: import("./types").ToastPosition;
|
|
49
50
|
};
|
|
50
51
|
teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
|
|
52
|
+
wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
|
|
51
53
|
className: import("vue").PropType<unknown>;
|
|
52
54
|
iconPrefix: StringConstructor;
|
|
53
55
|
transition: {
|
|
@@ -65,8 +67,8 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
|
65
67
|
}, {
|
|
66
68
|
type: import("./types").ToastType;
|
|
67
69
|
position: import("./types").ToastPosition;
|
|
68
|
-
show: boolean;
|
|
69
70
|
overlay: boolean;
|
|
71
|
+
show: boolean;
|
|
70
72
|
duration: number;
|
|
71
73
|
closeOnClickOverlay: boolean;
|
|
72
74
|
transition: string;
|
|
@@ -76,7 +78,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
|
|
|
76
78
|
export default Toast;
|
|
77
79
|
export { showToast, closeToast, showFailToast, showLoadingToast, showSuccessToast, allowMultipleToast, setToastDefaultOptions, resetToastDefaultOptions, } from './function-call';
|
|
78
80
|
export type { ToastProps } from './Toast';
|
|
79
|
-
export type { ToastType, ToastOptions, ToastPosition } from './types';
|
|
81
|
+
export type { ToastType, ToastOptions, ToastPosition, ToastWordBreak, ToastWrapperInstance, } from './types';
|
|
80
82
|
declare module 'vue' {
|
|
81
83
|
interface GlobalComponents {
|
|
82
84
|
ZtToast: typeof Toast;
|
package/es/toast/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { LoadingType } from '../loading';
|
|
|
3
3
|
import type { Numeric } from '../utils';
|
|
4
4
|
export type ToastType = 'text' | 'loading' | 'success' | 'warning' | 'html';
|
|
5
5
|
export type ToastPosition = 'top' | 'middle' | 'bottom';
|
|
6
|
+
export type ToastWordBreak = 'break-all' | 'break-word' | 'normal';
|
|
6
7
|
export type ToastOptions = {
|
|
7
8
|
icon?: string;
|
|
8
9
|
type?: ToastType;
|
|
@@ -18,6 +19,7 @@ export type ToastOptions = {
|
|
|
18
19
|
className?: unknown;
|
|
19
20
|
transition?: string;
|
|
20
21
|
iconPrefix?: string;
|
|
22
|
+
wordBreak?: ToastWordBreak;
|
|
21
23
|
loadingType?: LoadingType;
|
|
22
24
|
forbidClick?: boolean;
|
|
23
25
|
closeOnClick?: boolean;
|
|
@@ -197,10 +197,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
197
197
|
name: string | number;
|
|
198
198
|
disabled: boolean;
|
|
199
199
|
accept: string;
|
|
200
|
+
multiple: boolean;
|
|
200
201
|
modelValue: UploaderFileListItem[];
|
|
201
202
|
readonly: boolean;
|
|
202
203
|
lazyLoad: boolean;
|
|
203
|
-
multiple: boolean;
|
|
204
204
|
resultType: UploaderResultType;
|
|
205
205
|
maxCount: string | number;
|
|
206
206
|
imageFit: ImageFit;
|
package/es/uploader/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-uploader-size: 80px;--zt-uploader-icon-size: 24px;--zt-uploader-icon-color: var(--zt-gray-4);--zt-uploader-text-color: var(--zt-
|
|
1
|
+
:root{--zt-uploader-size: 80px;--zt-uploader-icon-size: 24px;--zt-uploader-icon-color: var(--zt-gray-4);--zt-uploader-text-color: var(--zt-gray-a2);--zt-uploader-text-font-size: var(--zt-font-size-sm);--zt-uploader-upload-background: var(--zt-gray-a1);--zt-uploader-upload-active-color: var(--zt-active-color);--zt-uploader-delete-color: var(--zt-white);--zt-uploader-delete-icon-size: 14px;--zt-uploader-delete-background: rgba(0, 0, 0, .7);--zt-uploader-file-background: var(--zt-background);--zt-uploader-file-icon-size: 20px;--zt-uploader-file-icon-color: var(--zt-gray-7);--zt-uploader-file-name-padding: 0 var(--zt-padding-base);--zt-uploader-file-name-margin-top: var(--zt-padding-xs);--zt-uploader-file-name-font-size: var(--zt-font-size-sm);--zt-uploader-file-name-text-color: var(--zt-gray-7);--zt-uploader-mask-text-color: var(--zt-white);--zt-uploader-mask-background: rgba(50, 50, 51, .88);--zt-uploader-mask-icon-size: 22px;--zt-uploader-mask-message-font-size: var(--zt-font-size-sm);--zt-uploader-mask-message-line-height: var(--zt-line-height-xs);--zt-uploader-loading-icon-size: 22px;--zt-uploader-loading-icon-color: var(--zt-white);--zt-uploader-disabled-opacity: var(--zt-disabled-opacity)}.zt-uploader{position:relative;display:inline-block}.zt-uploader__wrapper{display:flex;flex-wrap:wrap}.zt-uploader__wrapper--disabled{opacity:var(--zt-uploader-disabled-opacity)}.zt-uploader__input{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;cursor:pointer;opacity:0}.zt-uploader__input-wrapper{position:relative}.zt-uploader__input:disabled{cursor:not-allowed}.zt-uploader__upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:var(--zt-uploader-size);height:var(--zt-uploader-size);margin:0 var(--zt-padding-xs) var(--zt-padding-xs) 0;background:var(--zt-uploader-upload-background)}.zt-uploader__upload:active{background-color:var(--zt-uploader-upload-active-color)}.zt-uploader__upload--readonly:active{background-color:var(--zt-uploader-upload-background)}.zt-uploader__upload-icon{color:var(--zt-uploader-icon-color);font-size:var(--zt-uploader-icon-size)}.zt-uploader__upload-text{margin-top:var(--zt-padding-xs);color:var(--zt-uploader-text-color);font-size:var(--zt-uploader-text-font-size)}.zt-uploader__preview{position:relative;margin:0 var(--zt-padding-xs) var(--zt-padding-xs) 0;cursor:pointer}.zt-uploader__preview-image{display:block;width:var(--zt-uploader-size);height:var(--zt-uploader-size);overflow:hidden}.zt-uploader__preview-delete{position:absolute;top:0;right:0}.zt-uploader__preview-delete--shadow{width:var(--zt-uploader-delete-icon-size);height:var(--zt-uploader-delete-icon-size);background:var(--zt-uploader-delete-background);border-radius:0 0 0 12px}.zt-uploader__preview-delete-icon{position:absolute;top:0;right:0;color:var(--zt-uploader-delete-color);font-size:var(--zt-uploader-delete-icon-size);transform:scale(.7) translate(10%,-10%)}.zt-uploader__preview-cover{position:absolute;top:0;right:0;bottom:0;left:0}.zt-uploader__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-uploader-mask-text-color);background:var(--zt-uploader-mask-background)}.zt-uploader__mask-icon{font-size:var(--zt-uploader-mask-icon-size)}.zt-uploader__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-uploader__loading{width:var(--zt-uploader-loading-icon-size);height:var(--zt-uploader-loading-icon-size);color:var(--zt-uploader-loading-icon-color)}.zt-uploader__file{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--zt-uploader-size);height:var(--zt-uploader-size);background:var(--zt-uploader-file-background)}.zt-uploader__file-icon{color:var(--zt-uploader-file-icon-color);font-size:var(--zt-uploader-file-icon-size)}.zt-uploader__file-name{box-sizing:border-box;width:100%;margin-top:var(--zt-uploader-file-name-margin-top);padding:var(--zt-uploader-file-name-padding);color:var(--zt-uploader-file-name-text-color);font-size:var(--zt-uploader-file-name-font-size);text-align:center}
|
package/es/uploader/index.d.ts
CHANGED
|
@@ -130,10 +130,10 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
|
130
130
|
name: string | number;
|
|
131
131
|
disabled: boolean;
|
|
132
132
|
accept: string;
|
|
133
|
+
multiple: boolean;
|
|
133
134
|
modelValue: import("./types").UploaderFileListItem[];
|
|
134
135
|
readonly: boolean;
|
|
135
136
|
lazyLoad: boolean;
|
|
136
|
-
multiple: boolean;
|
|
137
137
|
resultType: import("./types").UploaderResultType;
|
|
138
138
|
maxCount: string | number;
|
|
139
139
|
imageFit: import("..").ImageFit;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void;
|
|
2
|
-
export declare function callInterceptor(interceptor: Interceptor | undefined, { args, done, canceled, }: {
|
|
2
|
+
export declare function callInterceptor(interceptor: Interceptor | undefined, { args, done, canceled, error, }: {
|
|
3
3
|
args?: unknown[];
|
|
4
4
|
done: () => void;
|
|
5
5
|
canceled?: () => void;
|
|
6
|
+
error?: () => void;
|
|
6
7
|
}): void;
|
package/es/utils/interceptor.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import { isPromise } from "./validate.mjs";
|
|
|
3
3
|
function callInterceptor(interceptor, {
|
|
4
4
|
args = [],
|
|
5
5
|
done,
|
|
6
|
-
canceled
|
|
6
|
+
canceled,
|
|
7
|
+
error
|
|
7
8
|
}) {
|
|
8
9
|
if (interceptor) {
|
|
9
10
|
const returnVal = interceptor.apply(null, args);
|
|
@@ -14,7 +15,7 @@ function callInterceptor(interceptor, {
|
|
|
14
15
|
} else if (canceled) {
|
|
15
16
|
canceled();
|
|
16
17
|
}
|
|
17
|
-
}).catch(noop);
|
|
18
|
+
}).catch(error || noop);
|
|
18
19
|
} else if (returnVal) {
|
|
19
20
|
done();
|
|
20
21
|
} else if (canceled) {
|
package/es/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue';
|
|
4
|
-
const Component: DefineComponent;
|
|
5
|
-
export default Component;
|
|
6
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
const Component: DefineComponent;
|
|
5
|
+
export default Component;
|
|
6
|
+
}
|
package/es/vue-tsx-shim.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'vue';
|
|
2
|
-
|
|
3
|
-
type EventHandler = (...args: any[]) => void;
|
|
4
|
-
|
|
5
|
-
declare module 'vue' {
|
|
6
|
-
interface ComponentCustomProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
tabindex?: number;
|
|
10
|
-
onClick?: EventHandler;
|
|
11
|
-
onTouchend?: EventHandler;
|
|
12
|
-
onTouchmove?: EventHandler;
|
|
13
|
-
onTouchstart?: EventHandler;
|
|
14
|
-
onTouchcancel?: EventHandler;
|
|
15
|
-
onTouchmovePassive?: EventHandler;
|
|
16
|
-
onTouchstartPassive?: EventHandler;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HTMLAttributes {
|
|
20
|
-
onTouchmovePassive?: EventHandler;
|
|
21
|
-
onTouchstartPassive?: EventHandler;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -177,13 +177,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
177
177
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
178
178
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
179
179
|
}, {
|
|
180
|
-
show: boolean;
|
|
181
180
|
overlay: boolean;
|
|
181
|
+
round: boolean;
|
|
182
|
+
show: boolean;
|
|
182
183
|
lockScroll: boolean;
|
|
183
184
|
lazyRender: boolean;
|
|
184
185
|
transitionAppear: boolean;
|
|
185
186
|
closeOnClickOverlay: boolean;
|
|
186
|
-
round: boolean;
|
|
187
187
|
closeIcon: string;
|
|
188
188
|
closeable: boolean;
|
|
189
189
|
closeOnPopstate: boolean;
|