zartui 3.1.7 → 3.1.8
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 +25 -0
- package/es/action-sheet/ActionSheet.d.ts +2 -2
- package/es/action-sheet/index.d.ts +2 -2
- package/es/button/Button.d.ts +3 -3
- package/es/button/index.d.ts +3 -3
- package/es/calendar/Calendar.d.ts +2 -2
- 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.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/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.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/field/Field.d.ts +3 -3
- 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/icon/config.mjs +34 -11
- package/es/icon/index.css +1 -1
- package/es/image/Image.d.ts +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.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.d.ts +2 -0
- 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/NumberKeyboardKey.d.ts +1 -1
- package/es/number-keyboard/index.d.ts +3 -3
- 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.d.ts +2 -2
- package/es/search/Search.d.ts +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/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/swipe/Swipe.mjs +1 -1
- package/es/swipe/index.css +1 -1
- package/es/swipe-cell/SwipeCell.mjs +10 -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.d.ts +12 -3
- 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.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.d.ts +2 -2
- package/lib/button/Button.d.ts +3 -3
- package/lib/button/index.d.ts +3 -3
- package/lib/calendar/Calendar.d.ts +2 -2
- 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.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/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.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/field/Field.d.ts +3 -3
- 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/icon/config.js +34 -11
- package/lib/icon/index.css +1 -1
- package/lib/image/Image.d.ts +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.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.d.ts +2 -0
- 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/NumberKeyboardKey.d.ts +1 -1
- package/lib/number-keyboard/index.d.ts +3 -3
- 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.d.ts +2 -2
- package/lib/search/Search.d.ts +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/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/swipe/Swipe.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/swipe-cell/SwipeCell.js +10 -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.d.ts +12 -3
- 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.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 +214 -88
- package/lib/zartui.es.js +215 -89
- package/lib/zartui.js +214 -88
- package/lib/zartui.min.js +1 -1
- package/package.json +19 -9
|
@@ -1,57 +1,70 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import type { ExtractPropTypes } from 'vue';
|
|
2
3
|
declare const checkboxProps: {
|
|
3
|
-
name:
|
|
4
|
+
name: PropType<unknown>;
|
|
4
5
|
shape: {
|
|
5
|
-
type:
|
|
6
|
+
type: PropType<import("./Checker").CheckerShape>;
|
|
6
7
|
default: import("./Checker").CheckerShape;
|
|
7
8
|
};
|
|
8
9
|
disabled: BooleanConstructor;
|
|
9
10
|
iconSize: (NumberConstructor | StringConstructor)[];
|
|
10
|
-
modelValue:
|
|
11
|
+
modelValue: PropType<unknown>;
|
|
11
12
|
checkedColor: StringConstructor;
|
|
12
|
-
labelPosition:
|
|
13
|
+
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
|
13
14
|
labelDisabled: BooleanConstructor;
|
|
14
15
|
} & {
|
|
15
16
|
bindGroup: {
|
|
16
17
|
type: BooleanConstructor;
|
|
17
18
|
default: true;
|
|
18
19
|
};
|
|
20
|
+
indeterminate: {
|
|
21
|
+
type: PropType<boolean | null>;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
19
24
|
};
|
|
20
25
|
export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
|
|
21
26
|
declare const _default: import("vue").DefineComponent<{
|
|
22
|
-
name:
|
|
27
|
+
name: PropType<unknown>;
|
|
23
28
|
shape: {
|
|
24
|
-
type:
|
|
29
|
+
type: PropType<import("./Checker").CheckerShape>;
|
|
25
30
|
default: import("./Checker").CheckerShape;
|
|
26
31
|
};
|
|
27
32
|
disabled: BooleanConstructor;
|
|
28
33
|
iconSize: (NumberConstructor | StringConstructor)[];
|
|
29
|
-
modelValue:
|
|
34
|
+
modelValue: PropType<unknown>;
|
|
30
35
|
checkedColor: StringConstructor;
|
|
31
|
-
labelPosition:
|
|
36
|
+
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
|
32
37
|
labelDisabled: BooleanConstructor;
|
|
33
38
|
} & {
|
|
34
39
|
bindGroup: {
|
|
35
40
|
type: BooleanConstructor;
|
|
36
41
|
default: true;
|
|
37
42
|
};
|
|
43
|
+
indeterminate: {
|
|
44
|
+
type: PropType<boolean | null>;
|
|
45
|
+
default: null;
|
|
46
|
+
};
|
|
38
47
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
39
|
-
name:
|
|
48
|
+
name: PropType<unknown>;
|
|
40
49
|
shape: {
|
|
41
|
-
type:
|
|
50
|
+
type: PropType<import("./Checker").CheckerShape>;
|
|
42
51
|
default: import("./Checker").CheckerShape;
|
|
43
52
|
};
|
|
44
53
|
disabled: BooleanConstructor;
|
|
45
54
|
iconSize: (NumberConstructor | StringConstructor)[];
|
|
46
|
-
modelValue:
|
|
55
|
+
modelValue: PropType<unknown>;
|
|
47
56
|
checkedColor: StringConstructor;
|
|
48
|
-
labelPosition:
|
|
57
|
+
labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
|
|
49
58
|
labelDisabled: BooleanConstructor;
|
|
50
59
|
} & {
|
|
51
60
|
bindGroup: {
|
|
52
61
|
type: BooleanConstructor;
|
|
53
62
|
default: true;
|
|
54
63
|
};
|
|
64
|
+
indeterminate: {
|
|
65
|
+
type: PropType<boolean | null>;
|
|
66
|
+
default: null;
|
|
67
|
+
};
|
|
55
68
|
}>> & {
|
|
56
69
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
57
70
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -60,5 +73,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
73
|
disabled: boolean;
|
|
61
74
|
labelDisabled: boolean;
|
|
62
75
|
bindGroup: boolean;
|
|
76
|
+
indeterminate: boolean | null;
|
|
63
77
|
}, {}>;
|
|
64
78
|
export default _default;
|
package/lib/checkbox/Checkbox.js
CHANGED
|
@@ -39,7 +39,11 @@ var import_use_expose = require("../composables/use-expose");
|
|
|
39
39
|
var import_Checker = __toESM(require("./Checker"));
|
|
40
40
|
const [name, bem] = (0, import_utils.createNamespace)("checkbox");
|
|
41
41
|
const checkboxProps = (0, import_utils.extend)({}, import_Checker.checkerProps, {
|
|
42
|
-
bindGroup: import_utils.truthProp
|
|
42
|
+
bindGroup: import_utils.truthProp,
|
|
43
|
+
indeterminate: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: null
|
|
46
|
+
}
|
|
43
47
|
});
|
|
44
48
|
var stdin_default = (0, import_vue2.defineComponent)({
|
|
45
49
|
name,
|
|
@@ -90,9 +94,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
90
94
|
setParentValue(newValue);
|
|
91
95
|
} else {
|
|
92
96
|
emit("update:modelValue", newValue);
|
|
97
|
+
if (props.indeterminate !== null) {
|
|
98
|
+
emit("change", newValue);
|
|
99
|
+
}
|
|
93
100
|
}
|
|
94
101
|
};
|
|
95
|
-
(0, import_vue2.watch)(() => props.modelValue, (value) =>
|
|
102
|
+
(0, import_vue2.watch)(() => props.modelValue, (value) => {
|
|
103
|
+
if (props.indeterminate === null) {
|
|
104
|
+
emit("change", value);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
96
107
|
(0, import_use_expose.useExpose)({
|
|
97
108
|
toggle,
|
|
98
109
|
props,
|
|
@@ -48,6 +48,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
type: BooleanConstructor;
|
|
49
49
|
default: true;
|
|
50
50
|
};
|
|
51
|
+
indeterminate: {
|
|
52
|
+
type: PropType<boolean | null>;
|
|
53
|
+
default: null;
|
|
54
|
+
};
|
|
51
55
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "toggle")[], "click" | "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
56
|
name: PropType<unknown>;
|
|
53
57
|
shape: {
|
|
@@ -72,6 +76,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
76
|
type: BooleanConstructor;
|
|
73
77
|
default: true;
|
|
74
78
|
};
|
|
79
|
+
indeterminate: {
|
|
80
|
+
type: PropType<boolean | null>;
|
|
81
|
+
default: null;
|
|
82
|
+
};
|
|
75
83
|
}>> & {
|
|
76
84
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
77
85
|
onToggle?: ((...args: any[]) => any) | undefined;
|
|
@@ -81,5 +89,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
81
89
|
checked: boolean;
|
|
82
90
|
labelDisabled: boolean;
|
|
83
91
|
bindGroup: boolean;
|
|
92
|
+
indeterminate: boolean | null;
|
|
84
93
|
}, {}>;
|
|
85
94
|
export default _default;
|
package/lib/checkbox/Checker.js
CHANGED
|
@@ -41,7 +41,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
41
41
|
role: String,
|
|
42
42
|
parent: Object,
|
|
43
43
|
checked: Boolean,
|
|
44
|
-
bindGroup: import_utils.truthProp
|
|
44
|
+
bindGroup: import_utils.truthProp,
|
|
45
|
+
indeterminate: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: null
|
|
48
|
+
}
|
|
45
49
|
}),
|
|
46
50
|
emits: ["click", "toggle"],
|
|
47
51
|
setup(props, {
|
|
@@ -80,14 +84,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
80
84
|
const {
|
|
81
85
|
bem,
|
|
82
86
|
shape,
|
|
83
|
-
checked
|
|
87
|
+
checked,
|
|
88
|
+
indeterminate
|
|
84
89
|
} = props;
|
|
85
90
|
const iconSize = props.iconSize || getParentProp("iconSize");
|
|
86
91
|
return (0, import_vue.createVNode)("div", {
|
|
87
92
|
"ref": iconRef,
|
|
88
93
|
"class": bem("icon", [shape, {
|
|
89
94
|
disabled: disabled.value,
|
|
90
|
-
checked
|
|
95
|
+
checked,
|
|
96
|
+
indeterminate
|
|
91
97
|
}]),
|
|
92
98
|
"style": {
|
|
93
99
|
fontSize: (0, import_utils.addUnit)(iconSize)
|
|
@@ -95,14 +101,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
95
101
|
}, [slots.icon ? slots.icon({
|
|
96
102
|
checked,
|
|
97
103
|
disabled: disabled.value
|
|
98
|
-
}) : props.role === "radio" ? (0, import_vue.createVNode)(import_icon.Icon, {
|
|
99
|
-
"style": iconStyle.value
|
|
100
|
-
}, {
|
|
101
|
-
default: () => [checked ? (0, import_vue.createVNode)("div", {
|
|
102
|
-
"class": bem("dot")
|
|
103
|
-
}, null) : ""]
|
|
104
104
|
}) : (0, import_vue.createVNode)(import_icon.Icon, {
|
|
105
|
-
"name": "checkbox-select",
|
|
105
|
+
"name": indeterminate ? "minus" : "checkbox-select",
|
|
106
106
|
"style": iconStyle.value
|
|
107
107
|
}, null)]);
|
|
108
108
|
};
|
package/lib/checkbox/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-checkbox-size: 16px;--zt-checkbox-padding: 12px 0;--zt-checkbox-border-color: var(--zt-gray-5);--zt-checkbox-duration: var(--zt-duration-fast);--zt-checkbox-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-checkbox-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-checkbox-label-margin: var(--zt-padding-xs);--zt-checkbox-label-color: var(--zt-text-color);--zt-checkbox-label-font-size: var(--zt-font-size-md);--zt-checkbox-checked-icon-color: var(--zt-primary-color);--zt-checkbox-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-checkbox-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-icon-color: var(--zt-gray-5);--zt-checkbox-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-label-color: var(--zt-text-color-3);--zt-checkbox-disabled-background: var(--zt-border-color);--zt-checkbox-disabled-checked-icon-opacity: .4;--zt-checkbox-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%)}.zt-checkbox{position:relative;display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:var(--zt-checkbox-padding)}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-right:var(--zt-padding-sm)}.zt-checkbox__icon{font-size:var(--zt-checkbox-size);cursor:pointer;box-sizing:border-box}.zt-checkbox__icon .zt-icon{display:flex;justify-content:center;align-items:center;width:1em;height:1em;color:transparent;text-align:center;border:1px solid var(--zt-checkbox-border-color);transition-duration:var(--zt-checkbox-duration);transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%;border:var(--zt-checkbox-round-icon-border);box-shadow:var(--zt-checkbox-round-icon-box-shadow);background:var(--zt-checkbox-round-icon-background)}.zt-checkbox__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:var(--zt-checkbox-disabled-icon-border);box-shadow:var(--zt-checkbox-disabled-icon-shadow);background:var(--zt-checkbox-disabled-icon-background)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:var(--zt-checkbox-disabled-checked-icon-opacity);background:var(--zt-blue);color:var(--zt-white)}.zt-checkbox__label{margin-left:var(--zt-checkbox-label-margin);color:var(--zt-checkbox-label-color);font-size:var(--zt-checkbox-label-font-size)}.zt-checkbox__label--left{margin:0 var(--zt-checkbox-label-margin) 0 0}.zt-checkbox__label--disabled{color:var(--zt-checkbox-disabled-label-color)}.zt-theme-dark{--zt-checkbox-round-icon-box-shadow: none;--zt-checkbox-disabled-icon-shadow: none;--zt-checkbox-round-icon-background: rgba(255, 255, 255, .04);--zt-checkbox-round-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-background: rgba(255, 255, 255, .2)}
|
|
1
|
+
:root{--zt-checkbox-size: 16px;--zt-checkbox-padding: 12px 0;--zt-checkbox-border-color: var(--zt-gray-5);--zt-checkbox-duration: var(--zt-duration-fast);--zt-checkbox-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-checkbox-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-checkbox-label-margin: var(--zt-padding-xs);--zt-checkbox-label-color: var(--zt-text-color);--zt-checkbox-label-font-size: var(--zt-font-size-md);--zt-checkbox-checked-icon-color: var(--zt-primary-color);--zt-checkbox-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-checkbox-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-icon-color: var(--zt-gray-5);--zt-checkbox-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-checkbox-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-checkbox-disabled-label-color: var(--zt-text-color-3);--zt-checkbox-disabled-background: var(--zt-border-color);--zt-checkbox-disabled-checked-icon-opacity: .4;--zt-checkbox-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%)}.zt-checkbox{position:relative;display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:var(--zt-checkbox-padding)}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-right:var(--zt-padding-sm)}.zt-checkbox__icon{font-size:var(--zt-checkbox-size);cursor:pointer;box-sizing:border-box}.zt-checkbox__icon .zt-icon{display:flex;justify-content:center;align-items:center;width:1em;height:1em;color:transparent;text-align:center;border:1px solid var(--zt-checkbox-border-color);transition-duration:var(--zt-checkbox-duration);transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%;border:var(--zt-checkbox-round-icon-border);box-shadow:var(--zt-checkbox-round-icon-box-shadow);background:var(--zt-checkbox-round-icon-background)}.zt-checkbox__icon--indeterminate .zt-icon,.zt-checkbox__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:var(--zt-checkbox-disabled-icon-border);box-shadow:var(--zt-checkbox-disabled-icon-shadow);background:var(--zt-checkbox-disabled-icon-background)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:var(--zt-checkbox-disabled-checked-icon-opacity);background:var(--zt-blue);color:var(--zt-white)}.zt-checkbox__label{margin-left:var(--zt-checkbox-label-margin);color:var(--zt-checkbox-label-color);font-size:var(--zt-checkbox-label-font-size)}.zt-checkbox__label--left{margin:0 var(--zt-checkbox-label-margin) 0 0}.zt-checkbox__label--disabled{color:var(--zt-checkbox-disabled-label-color)}.zt-theme-dark{--zt-checkbox-round-icon-box-shadow: none;--zt-checkbox-disabled-icon-shadow: none;--zt-checkbox-round-icon-background: rgba(255, 255, 255, .04);--zt-checkbox-round-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-border: 1px solid var(--zt-gray-default);--zt-checkbox-disabled-icon-background: rgba(255, 255, 255, .2)}
|
package/lib/checkbox/index.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: true;
|
|
17
17
|
};
|
|
18
|
+
indeterminate: {
|
|
19
|
+
type: import("vue").PropType<boolean | null>;
|
|
20
|
+
default: null;
|
|
21
|
+
};
|
|
18
22
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
23
|
name: import("vue").PropType<unknown>;
|
|
20
24
|
shape: {
|
|
@@ -32,6 +36,10 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
|
|
|
32
36
|
type: BooleanConstructor;
|
|
33
37
|
default: true;
|
|
34
38
|
};
|
|
39
|
+
indeterminate: {
|
|
40
|
+
type: import("vue").PropType<boolean | null>;
|
|
41
|
+
default: null;
|
|
42
|
+
};
|
|
35
43
|
}>> & {
|
|
36
44
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
37
45
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -40,6 +48,7 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
|
|
|
40
48
|
disabled: boolean;
|
|
41
49
|
labelDisabled: boolean;
|
|
42
50
|
bindGroup: boolean;
|
|
51
|
+
indeterminate: boolean | null;
|
|
43
52
|
}, {}>>;
|
|
44
53
|
export default Checkbox;
|
|
45
54
|
export type { CheckboxProps } from './Checkbox';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
setGlobalZIndex: () => setGlobalZIndex,
|
|
21
|
+
useGlobalZIndex: () => useGlobalZIndex
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
24
|
+
let globalZIndex = 2e3;
|
|
25
|
+
const useGlobalZIndex = () => ++globalZIndex;
|
|
26
|
+
const setGlobalZIndex = (val) => {
|
|
27
|
+
globalZIndex = val;
|
|
28
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
useScopeId: () => useScopeId
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
const useScopeId = () => {
|
|
25
|
+
var _a;
|
|
26
|
+
const { scopeId } = ((_a = (0, import_vue.getCurrentInstance)()) == null ? void 0 : _a.vnode) || {};
|
|
27
|
+
return scopeId ? { [scopeId]: "" } : null;
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
useSyncPropRef: () => useSyncPropRef
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
const useSyncPropRef = (getProp, setProp) => {
|
|
25
|
+
const propRef = (0, import_vue.ref)(getProp());
|
|
26
|
+
(0, import_vue.watch)(getProp, (value) => {
|
|
27
|
+
if (value !== propRef.value) {
|
|
28
|
+
propRef.value = value;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
(0, import_vue.watch)(propRef, (value) => {
|
|
32
|
+
if (value !== getProp()) {
|
|
33
|
+
setProp(value);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return propRef;
|
|
37
|
+
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type
|
|
1
|
+
import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
|
|
2
|
+
import { type Numeric } from '../utils';
|
|
3
3
|
export type ConfigProviderTheme = 'light' | 'dark';
|
|
4
|
+
export type ConfigProviderThemeVarsScope = 'local' | 'global';
|
|
4
5
|
export type ConfigProviderProvide = {
|
|
5
6
|
iconPrefix?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const CONFIG_PROVIDER_KEY: InjectionKey<ConfigProviderProvide>;
|
|
8
|
-
|
|
9
|
+
export type ThemeVars = PropType<Record<string, Numeric>>;
|
|
10
|
+
export declare const configProviderProps: {
|
|
9
11
|
tag: {
|
|
10
12
|
type: PropType<keyof HTMLElementTagNameMap>;
|
|
11
13
|
default: keyof HTMLElementTagNameMap;
|
|
@@ -14,7 +16,14 @@ declare const configProviderProps: {
|
|
|
14
16
|
type: PropType<ConfigProviderTheme>;
|
|
15
17
|
default: ConfigProviderTheme;
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
zIndex: NumberConstructor;
|
|
20
|
+
themeVars: ThemeVars;
|
|
21
|
+
themeVarsDark: ThemeVars;
|
|
22
|
+
themeVarsLight: ThemeVars;
|
|
23
|
+
themeVarsScope: {
|
|
24
|
+
type: PropType<ConfigProviderThemeVarsScope>;
|
|
25
|
+
default: ConfigProviderThemeVarsScope;
|
|
26
|
+
};
|
|
18
27
|
iconPrefix: StringConstructor;
|
|
19
28
|
};
|
|
20
29
|
export type ConfigProviderProps = ExtractPropTypes<typeof configProviderProps>;
|
|
@@ -27,7 +36,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
36
|
type: PropType<ConfigProviderTheme>;
|
|
28
37
|
default: ConfigProviderTheme;
|
|
29
38
|
};
|
|
30
|
-
|
|
39
|
+
zIndex: NumberConstructor;
|
|
40
|
+
themeVars: ThemeVars;
|
|
41
|
+
themeVarsDark: ThemeVars;
|
|
42
|
+
themeVarsLight: ThemeVars;
|
|
43
|
+
themeVarsScope: {
|
|
44
|
+
type: PropType<ConfigProviderThemeVarsScope>;
|
|
45
|
+
default: ConfigProviderThemeVarsScope;
|
|
46
|
+
};
|
|
31
47
|
iconPrefix: StringConstructor;
|
|
32
48
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
33
49
|
tag: {
|
|
@@ -38,10 +54,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
38
54
|
type: PropType<ConfigProviderTheme>;
|
|
39
55
|
default: ConfigProviderTheme;
|
|
40
56
|
};
|
|
41
|
-
|
|
57
|
+
zIndex: NumberConstructor;
|
|
58
|
+
themeVars: ThemeVars;
|
|
59
|
+
themeVarsDark: ThemeVars;
|
|
60
|
+
themeVarsLight: ThemeVars;
|
|
61
|
+
themeVarsScope: {
|
|
62
|
+
type: PropType<ConfigProviderThemeVarsScope>;
|
|
63
|
+
default: ConfigProviderThemeVarsScope;
|
|
64
|
+
};
|
|
42
65
|
iconPrefix: StringConstructor;
|
|
43
66
|
}>>, {
|
|
44
67
|
tag: keyof HTMLElementTagNameMap;
|
|
45
68
|
theme: ConfigProviderTheme;
|
|
69
|
+
themeVarsScope: ConfigProviderThemeVarsScope;
|
|
46
70
|
}, {}>;
|
|
47
71
|
export default _default;
|
|
@@ -18,38 +18,56 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var stdin_exports = {};
|
|
19
19
|
__export(stdin_exports, {
|
|
20
20
|
CONFIG_PROVIDER_KEY: () => CONFIG_PROVIDER_KEY,
|
|
21
|
+
configProviderProps: () => configProviderProps,
|
|
21
22
|
default: () => stdin_default
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(stdin_exports);
|
|
24
25
|
var import_vue = require("vue");
|
|
25
26
|
var import_vue2 = require("vue");
|
|
26
27
|
var import_utils = require("../utils");
|
|
28
|
+
var import_use_global_z_index = require("../composables/use-global-z-index");
|
|
27
29
|
const [name, bem] = (0, import_utils.createNamespace)("config-provider");
|
|
28
30
|
const CONFIG_PROVIDER_KEY = Symbol(name);
|
|
29
31
|
const configProviderProps = {
|
|
30
32
|
tag: (0, import_utils.makeStringProp)("div"),
|
|
31
33
|
theme: (0, import_utils.makeStringProp)("light"),
|
|
34
|
+
zIndex: Number,
|
|
32
35
|
themeVars: Object,
|
|
36
|
+
themeVarsDark: Object,
|
|
37
|
+
themeVarsLight: Object,
|
|
38
|
+
themeVarsScope: (0, import_utils.makeStringProp)("local"),
|
|
33
39
|
iconPrefix: String
|
|
34
40
|
};
|
|
41
|
+
function insertDash(str) {
|
|
42
|
+
return str.replace(/([a-zA-Z])(\d)/g, "$1-$2");
|
|
43
|
+
}
|
|
35
44
|
function mapThemeVarsToCSSVars(themeVars) {
|
|
36
45
|
const cssVars = {};
|
|
37
46
|
Object.keys(themeVars).forEach((key) => {
|
|
38
|
-
|
|
47
|
+
const formattedKey = insertDash((0, import_utils.kebabCase)(key));
|
|
48
|
+
cssVars[`--zt-${formattedKey}`] = themeVars[key];
|
|
39
49
|
});
|
|
40
50
|
return cssVars;
|
|
41
51
|
}
|
|
52
|
+
function syncThemeVarsOnRoot(newStyle = {}, oldStyle = {}) {
|
|
53
|
+
Object.keys(newStyle).forEach((key) => {
|
|
54
|
+
if (newStyle[key] !== oldStyle[key]) {
|
|
55
|
+
document.documentElement.style.setProperty(key, newStyle[key]);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
Object.keys(oldStyle).forEach((key) => {
|
|
59
|
+
if (!newStyle[key]) {
|
|
60
|
+
document.documentElement.style.removeProperty(key);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
42
64
|
var stdin_default = (0, import_vue2.defineComponent)({
|
|
43
65
|
name,
|
|
44
66
|
props: configProviderProps,
|
|
45
67
|
setup(props, {
|
|
46
68
|
slots
|
|
47
69
|
}) {
|
|
48
|
-
const style = (0, import_vue2.computed)(() => {
|
|
49
|
-
if (props.themeVars) {
|
|
50
|
-
return mapThemeVarsToCSSVars(props.themeVars);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
70
|
+
const style = (0, import_vue2.computed)(() => mapThemeVarsToCSSVars((0, import_utils.extend)({}, props.themeVars, props.theme === "dark" ? props.themeVarsDark : props.themeVarsLight)));
|
|
53
71
|
if (import_utils.inBrowser) {
|
|
54
72
|
const addTheme = () => {
|
|
55
73
|
document.documentElement.classList.add(`zt-theme-${props.theme}`);
|
|
@@ -68,11 +86,32 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
68
86
|
(0, import_vue2.onActivated)(addTheme);
|
|
69
87
|
(0, import_vue2.onDeactivated)(removeTheme);
|
|
70
88
|
(0, import_vue2.onBeforeUnmount)(removeTheme);
|
|
89
|
+
(0, import_vue2.watch)(style, (newStyle, oldStyle) => {
|
|
90
|
+
if (props.themeVarsScope === "global") {
|
|
91
|
+
syncThemeVarsOnRoot(newStyle, oldStyle);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
(0, import_vue2.watch)(() => props.themeVarsScope, (newScope, oldScope) => {
|
|
95
|
+
if (oldScope === "global") {
|
|
96
|
+
syncThemeVarsOnRoot({}, style.value);
|
|
97
|
+
}
|
|
98
|
+
if (newScope === "global") {
|
|
99
|
+
syncThemeVarsOnRoot(style.value, {});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
if (props.themeVarsScope === "global") {
|
|
103
|
+
syncThemeVarsOnRoot(style.value, {});
|
|
104
|
+
}
|
|
71
105
|
}
|
|
72
106
|
(0, import_vue2.provide)(CONFIG_PROVIDER_KEY, props);
|
|
107
|
+
(0, import_vue2.watchEffect)(() => {
|
|
108
|
+
if (props.zIndex !== void 0) {
|
|
109
|
+
(0, import_use_global_z_index.setGlobalZIndex)(props.zIndex);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
73
112
|
return () => (0, import_vue.createVNode)(props.tag, {
|
|
74
113
|
"class": bem(),
|
|
75
|
-
"style": style.value
|
|
114
|
+
"style": props.themeVarsScope === "local" ? style.value : void 0
|
|
76
115
|
}, {
|
|
77
116
|
default: () => {
|
|
78
117
|
var _a;
|
|
@@ -7,7 +7,14 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
|
|
|
7
7
|
type: import("vue").PropType<import("./ConfigProvider").ConfigProviderTheme>;
|
|
8
8
|
default: import("./ConfigProvider").ConfigProviderTheme;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
zIndex: NumberConstructor;
|
|
11
|
+
themeVars: import("./ConfigProvider").ThemeVars;
|
|
12
|
+
themeVarsDark: import("./ConfigProvider").ThemeVars;
|
|
13
|
+
themeVarsLight: import("./ConfigProvider").ThemeVars;
|
|
14
|
+
themeVarsScope: {
|
|
15
|
+
type: import("vue").PropType<import("./ConfigProvider").ConfigProviderThemeVarsScope>;
|
|
16
|
+
default: import("./ConfigProvider").ConfigProviderThemeVarsScope;
|
|
17
|
+
};
|
|
11
18
|
iconPrefix: StringConstructor;
|
|
12
19
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
20
|
tag: {
|
|
@@ -18,11 +25,19 @@ export declare const ConfigProvider: import("../utils").WithInstall<import("vue"
|
|
|
18
25
|
type: import("vue").PropType<import("./ConfigProvider").ConfigProviderTheme>;
|
|
19
26
|
default: import("./ConfigProvider").ConfigProviderTheme;
|
|
20
27
|
};
|
|
21
|
-
|
|
28
|
+
zIndex: NumberConstructor;
|
|
29
|
+
themeVars: import("./ConfigProvider").ThemeVars;
|
|
30
|
+
themeVarsDark: import("./ConfigProvider").ThemeVars;
|
|
31
|
+
themeVarsLight: import("./ConfigProvider").ThemeVars;
|
|
32
|
+
themeVarsScope: {
|
|
33
|
+
type: import("vue").PropType<import("./ConfigProvider").ConfigProviderThemeVarsScope>;
|
|
34
|
+
default: import("./ConfigProvider").ConfigProviderThemeVarsScope;
|
|
35
|
+
};
|
|
22
36
|
iconPrefix: StringConstructor;
|
|
23
37
|
}>>, {
|
|
24
38
|
tag: keyof HTMLElementTagNameMap;
|
|
25
39
|
theme: import("./ConfigProvider").ConfigProviderTheme;
|
|
40
|
+
themeVarsScope: import("./ConfigProvider").ConfigProviderThemeVarsScope;
|
|
26
41
|
}, {}>>;
|
|
27
42
|
export default ConfigProvider;
|
|
28
43
|
export type { ConfigProviderProps, ConfigProviderTheme, } from './ConfigProvider';
|
|
@@ -215,11 +215,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
215
215
|
}, {
|
|
216
216
|
title: string;
|
|
217
217
|
range: boolean;
|
|
218
|
+
overlay: boolean;
|
|
219
|
+
show: boolean;
|
|
218
220
|
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
|
219
221
|
modelValue: string[];
|
|
220
222
|
readonly: boolean;
|
|
221
|
-
show: boolean;
|
|
222
|
-
overlay: boolean;
|
|
223
223
|
lockScroll: boolean;
|
|
224
224
|
lazyRender: boolean;
|
|
225
225
|
transitionAppear: boolean;
|
|
@@ -307,11 +307,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
307
307
|
}, {
|
|
308
308
|
title: string;
|
|
309
309
|
range: boolean;
|
|
310
|
+
overlay: boolean;
|
|
311
|
+
show: boolean;
|
|
310
312
|
formatter: (type: string, option: import("../picker").PickerOption) => import("../picker").PickerOption;
|
|
311
313
|
modelValue: string[];
|
|
312
314
|
readonly: boolean;
|
|
313
|
-
show: boolean;
|
|
314
|
-
overlay: boolean;
|
|
315
315
|
lockScroll: boolean;
|
|
316
316
|
lazyRender: boolean;
|
|
317
317
|
transitionAppear: boolean;
|
|
@@ -212,11 +212,11 @@ export declare const DateTimePicker: import("../utils").WithInstall<import("vue"
|
|
|
212
212
|
}, {
|
|
213
213
|
title: string;
|
|
214
214
|
range: boolean;
|
|
215
|
+
overlay: boolean;
|
|
216
|
+
show: boolean;
|
|
215
217
|
formatter: (type: string, option: import("..").PickerOption) => import("..").PickerOption;
|
|
216
218
|
modelValue: string[];
|
|
217
219
|
readonly: boolean;
|
|
218
|
-
show: boolean;
|
|
219
|
-
overlay: boolean;
|
|
220
220
|
lockScroll: boolean;
|
|
221
221
|
lazyRender: boolean;
|
|
222
222
|
transitionAppear: boolean;
|
package/lib/dialog/Dialog.d.ts
CHANGED
|
@@ -173,8 +173,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
173
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
174
174
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
175
175
|
}, {
|
|
176
|
-
show: boolean;
|
|
177
176
|
overlay: boolean;
|
|
177
|
+
show: boolean;
|
|
178
178
|
lockScroll: boolean;
|
|
179
179
|
lazyRender: boolean;
|
|
180
180
|
transitionAppear: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { DialogOptions } from './types';
|
|
2
|
-
export declare function showDialog(options: DialogOptions): Promise<
|
|
1
|
+
import type { DialogAction, DialogOptions } from './types';
|
|
2
|
+
export declare function showDialog(options: DialogOptions): Promise<DialogAction | undefined>;
|
|
3
3
|
export declare const setDialogDefaultOptions: (options: DialogOptions) => void;
|
|
4
4
|
export declare const resetDialogDefaultOptions: () => void;
|
|
5
|
-
export declare const showConfirmDialog: (options: DialogOptions) => Promise<
|
|
5
|
+
export declare const showConfirmDialog: (options: DialogOptions) => Promise<DialogAction | undefined>;
|
|
6
6
|
export declare const closeDialog: () => void;
|
package/lib/dialog/index.d.ts
CHANGED
|
@@ -114,8 +114,8 @@ export declare const Dialog: import("../utils").WithInstall<import("vue").Define
|
|
|
114
114
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
115
115
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
116
116
|
}, {
|
|
117
|
-
show: boolean;
|
|
118
117
|
overlay: boolean;
|
|
118
|
+
show: boolean;
|
|
119
119
|
lockScroll: boolean;
|
|
120
120
|
lazyRender: boolean;
|
|
121
121
|
transitionAppear: boolean;
|
package/lib/divider/Divider.d.ts
CHANGED