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
|
@@ -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.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-dialog-width: 350px;--zt-dialog-max-width: 90%;--zt-dialog-font-size: var(--zt-font-size-lg);--zt-dialog-transition: var(--zt-duration-base);--zt-dialog-radius: 12px;--zt-dialog-background: var(--zt-background-2);--zt-dialog-header-font-weight: var(--zt-font-bold);--zt-dialog-header-line-height: 24px;--zt-dialog-header-padding-top: 24px;--zt-dialog-header-isolated-padding: var(--zt-padding-lg) 0;--zt-dialog-header-primary-padding: 10px;--zt-dialog-message-padding: var(--zt-padding-lg) var(--zt-padding-md);--zt-dialog-message-font-size: var(--zt-font-size-lg);--zt-dialog-message-line-height: var(--zt-line-height-md);--zt-dialog-message-max-height: 60vh;--zt-dialog-has-title-message-font-size: var(--zt-font-size-md);--zt-dialog-has-title-message-text-color: var(--zt-gray-a6);--zt-dialog-has-title-message-padding-top: var(--zt-padding-xs);--zt-dialog-has-title-message-primary-header: var(--zt-padding-lg);--zt-dialog-confirm-button-text-color: var(--zt-white);--zt-dialog-cancel-button-background-color: var(--zt-white);--zt-dialog-cancel-button-border:
|
|
1
|
+
:root{--zt-dialog-width: 350px;--zt-dialog-max-width: 90%;--zt-dialog-font-size: var(--zt-font-size-lg);--zt-dialog-transition: var(--zt-duration-base);--zt-dialog-radius: 12px;--zt-dialog-background: var(--zt-background-2);--zt-dialog-header-font-weight: var(--zt-font-bold);--zt-dialog-header-line-height: 24px;--zt-dialog-header-padding-top: 24px;--zt-dialog-header-isolated-padding: var(--zt-padding-lg) 0;--zt-dialog-header-primary-padding: 10px;--zt-dialog-message-padding: var(--zt-padding-lg) var(--zt-padding-md);--zt-dialog-message-font-size: var(--zt-font-size-lg);--zt-dialog-message-line-height: var(--zt-line-height-md);--zt-dialog-message-max-height: 60vh;--zt-dialog-has-title-message-font-size: var(--zt-font-size-md);--zt-dialog-has-title-message-text-color: var(--zt-gray-a6);--zt-dialog-has-title-message-padding-top: var(--zt-padding-xs);--zt-dialog-has-title-message-primary-header: var(--zt-padding-lg);--zt-dialog-confirm-button-text-color: var(--zt-white);--zt-dialog-cancel-button-background-color: var(--zt-white);--zt-dialog-cancel-button-border: none}.zt-dialog{top:45%;width:var(--zt-dialog-width);max-width:var(--zt-dialog-max-width);overflow:hidden;font-size:var(--zt-dialog-font-size);background:var(--zt-dialog-background);border-radius:var(--zt-dialog-radius);-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:var(--zt-dialog-transition);transition-property:transform,opacity}.zt-dialog__header{color:var(--zt-text-color);padding-top:var(--zt-dialog-header-padding-top);font-weight:var(--zt-dialog-header-font-weight);line-height:var(--zt-dialog-header-line-height);text-align:center}.zt-dialog__header--isolated{padding:var(--zt-dialog-header-isolated-padding)}.zt-dialog__header--custom-title{padding-left:0;padding-right:0;padding-top:0}.zt-dialog__header--primary{padding:var(--zt-dialog-header-primary-padding);background:var(--zt-primary-color);color:var(--zt-white)}.zt-dialog__content{text-align:center;font-size:0}.zt-dialog__message{display:inline-block;color:var(--zt-gray-a8);max-height:var(--zt-dialog-message-max-height);padding:var(--zt-dialog-message-padding);overflow-y:auto;font-size:var(--zt-dialog-message-font-size);line-height:var(--zt-dialog-message-line-height);white-space:pre-wrap;text-align:left;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:var(--zt-dialog-has-title-message-padding-top);color:var(--zt-dialog-has-title-message-text-color);font-size:var(--zt-dialog-has-title-message-font-size)}.zt-dialog__message--primary-header{padding-top:var(--zt-dialog-has-title-message-primary-header)}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__message--justify{text-align:justify}.zt-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;user-select:none;margin:0 var(--zt-padding-xl) var(--zt-padding-lg)}.zt-dialog__confirm,.zt-dialog__cancel{flex:1;margin:0;border:var(--zt-dialog-cancel-button-border);background-color:var(--zt-dialog-cancel-button-background-color)}.zt-dialog__confirm,.zt-dialog__confirm:active{color:var(--zt-dialog-confirm-button-text-color)}.zt-dialog__confirm--with-cancel{margin-left:8px}.zt-dialog--round-button .zt-dialog__footer{position:relative;height:auto;padding:var(--zt-padding-xs) var(--zt-padding-lg) var(--zt-padding-md)}.zt-dialog--round-button .zt-dialog__message{padding-bottom:var(--zt-padding-md);color:var(--zt-text-color)}.zt-dialog--round-button .zt-dialog__confirm,.zt-dialog--round-button .zt-dialog__cancel{height:var(--zt-dialog-round-button-height)}.zt-dialog--round-button .zt-dialog__confirm{color:var(--zt-white)}.zt-dialog-bounce-enter-from{transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}.zt-theme-dark{--zt-dialog-cancel-button-border: .5px solid rgba(255, 255, 255, .2);--zt-dialog-cancel-button-background-color: rbga(255, 255, 255, .2)}
|
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
package/lib/divider/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export declare const Divider: import("../utils").WithInstall<import("vue").Defin
|
|
|
19
19
|
default: import("./Divider").DividerContentPosition;
|
|
20
20
|
};
|
|
21
21
|
}>>, {
|
|
22
|
-
hairline: boolean;
|
|
23
22
|
dashed: boolean;
|
|
23
|
+
hairline: boolean;
|
|
24
24
|
contentPosition: import("./Divider").DividerContentPosition;
|
|
25
25
|
}, {}>>;
|
|
26
26
|
export default Divider;
|
|
@@ -189,7 +189,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
189
189
|
if (props.multiSelect) {
|
|
190
190
|
return (0, import_vue.createVNode)(import_cell.Cell, {
|
|
191
191
|
"role": "menuitem",
|
|
192
|
-
"key": option.value,
|
|
192
|
+
"key": String(option.value),
|
|
193
193
|
"title-icon": option.icon,
|
|
194
194
|
"title": option.text,
|
|
195
195
|
"direction": "horizontal",
|
|
@@ -208,7 +208,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
208
208
|
}
|
|
209
209
|
return (0, import_vue.createVNode)(import_cell.Cell, {
|
|
210
210
|
"role": "menuitem",
|
|
211
|
-
"key": option.value,
|
|
211
|
+
"key": String(option.value),
|
|
212
212
|
"title-icon": option.icon,
|
|
213
213
|
"title": option.text,
|
|
214
214
|
"direction": "horizontal",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DropdownItemProps } from './DropdownItem';
|
|
2
2
|
import type { VNode, ComponentPublicInstance } from 'vue';
|
|
3
3
|
import type { Numeric } from '../utils';
|
|
4
|
+
export type DropdownItemOptionValue = Numeric | boolean;
|
|
4
5
|
export type DropdownItemOption = {
|
|
5
6
|
text: string;
|
|
6
7
|
icon?: string;
|
|
7
|
-
value:
|
|
8
|
+
value: DropdownItemOptionValue;
|
|
8
9
|
selected: boolean;
|
|
9
10
|
};
|
|
10
11
|
export type DropdownItemExpose = {
|
|
@@ -73,8 +73,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
default: true;
|
|
74
74
|
};
|
|
75
75
|
}>>, {
|
|
76
|
-
direction: DropdownMenuDirection;
|
|
77
76
|
overlay: boolean;
|
|
77
|
+
direction: DropdownMenuDirection;
|
|
78
78
|
duration: string | number;
|
|
79
79
|
closeOnClickOverlay: boolean;
|
|
80
80
|
closeOnClickOutside: boolean;
|
|
@@ -46,8 +46,8 @@ export declare const DropdownMenu: import("../utils").WithInstall<import("vue").
|
|
|
46
46
|
default: true;
|
|
47
47
|
};
|
|
48
48
|
}>>, {
|
|
49
|
-
direction: import("./types").DropdownMenuDirection;
|
|
50
49
|
overlay: boolean;
|
|
50
|
+
direction: import("./types").DropdownMenuDirection;
|
|
51
51
|
duration: string | number;
|
|
52
52
|
closeOnClickOverlay: boolean;
|
|
53
53
|
closeOnClickOutside: boolean;
|
package/lib/empty/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-empty-image-width: 200px;--zt-empty-image-height: 200px;--zt-empty-image-background-color:
|
|
1
|
+
:root{--zt-empty-image-width: 200px;--zt-empty-image-height: 200px;--zt-empty-image-background-color: var(--zt-primary-color-a1);--zt-empty-description-padding: 8px 64px 16px;--zt-empty-description-color: var(--zt-gray-a6);--zt-empty-description-font-size: var(--zt-font-size-md);--zt-empty-description-line-height: var(--zt-line-height-md);--zt-empty-bottom-margin-top: 32px}.zt-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box}.zt-empty__image{width:var(--zt-empty-image-width);height:var(--zt-empty-image-height);color:var(--zt-empty-image-background-color)}.zt-empty__image img{width:100%;height:100%}.zt-empty__description{text-align:center;padding:var(--zt-empty-description-padding);color:var(--zt-empty-description-color);font-size:var(--zt-empty-description-font-size);line-height:var(--zt-empty-description-line-height)}.zt-empty__bottom{margin-top:var(--zt-empty-bottom-margin-top);width:100%}.zt-theme-dark{--zt-empty-image-background-color: var(--zt-gray-a1)}
|
package/lib/field/Field.d.ts
CHANGED
|
@@ -236,7 +236,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
236
|
type: BooleanConstructor;
|
|
237
237
|
default: null;
|
|
238
238
|
};
|
|
239
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
239
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
240
240
|
leftIcon: StringConstructor;
|
|
241
241
|
titleIcon: StringConstructor;
|
|
242
242
|
title: (NumberConstructor | StringConstructor)[];
|
|
@@ -347,10 +347,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
347
347
|
autofocus: boolean;
|
|
348
348
|
disabled: boolean;
|
|
349
349
|
value: string;
|
|
350
|
-
direction: import("../cell").CellDirection;
|
|
351
350
|
center: boolean;
|
|
352
|
-
isLink: boolean;
|
|
353
351
|
border: boolean;
|
|
352
|
+
direction: import("../cell").CellDirection;
|
|
353
|
+
isLink: boolean;
|
|
354
354
|
required: boolean;
|
|
355
355
|
clickable: boolean | null;
|
|
356
356
|
clearable: boolean;
|
package/lib/field/Field.js
CHANGED
|
@@ -491,6 +491,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
491
491
|
});
|
|
492
492
|
return () => {
|
|
493
493
|
const disabled = getProp("disabled");
|
|
494
|
+
const readonly = getProp("readonly");
|
|
494
495
|
const labelAlign = getProp("labelAlign");
|
|
495
496
|
const Label = renderLabel();
|
|
496
497
|
const TitleIcon = renderTitleIcon();
|
|
@@ -502,6 +503,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
502
503
|
"class": bem({
|
|
503
504
|
error: showError.value,
|
|
504
505
|
disabled,
|
|
506
|
+
readonly,
|
|
505
507
|
[`label-${labelAlign}`]: labelAlign,
|
|
506
508
|
"error-message": props.errorMessage !== "" && typeof props.errorMessage !== "undefined",
|
|
507
509
|
description: props.description !== "" && typeof props.description !== "undefined",
|
package/lib/field/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--zt-field-label-width: 100%;--zt-field-label-color: var(--zt-text-color);--zt-field-label-margin: 16px 12px 8px 0;--zt-field-value-border-radius: var(--zt-radius-md);--zt-field-input-text-color: var(--zt-text-color);--zt-field-input-disabled-text-color: var(--zt-
|
|
1
|
+
:root{--zt-field-label-width: 100%;--zt-field-label-color: var(--zt-text-color);--zt-field-label-margin: 16px 12px 8px 0;--zt-field-value-border-radius: var(--zt-radius-md);--zt-field-input-text-color: var(--zt-text-color);--zt-field-input-disabled-text-color: var(--zt-gray-a4);--zt-field-placeholder-text-color: var(--zt-placeholder-color);--zt-field-icon-size: 20px;--zt-field-clear-icon-size: 20px;--zt-field-clear-icon-color: var(--zt-gray-a6);--zt-field-left-icon-color: var(--zt-gray-a4);--zt-field-right-icon-color: var(--zt-gray-a4);--zt-field-password-icon-color: var(--zt-gray-a6);--zt-field-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-field-error-message-color: var(--zt-red);--zt-field-error-message-font-size: 12px;--zt-field-description-background-color: var(--zt-gray-a04);--zt-field-description-color: var(--zt-gray-a6);--zt-field-description-font-size: 12px;--zt-field-description-border-color: var(--zt-gray-a2);--zt-field-text-area-min-height: 60px;--zt-field-word-limit-color: var(--zt-gray-a4);--zt-field-word-limit-font-size: var(--zt-font-size-md);--zt-field-word-limit-line-height: var(--zt-line-height-md);--zt-field-disabled-text-color: var(--zt-gray-a6);--zt-field-required-mark-color: var(--zt-red);--zt-field-required-mark-margin: 0 0 0 4px;--zt-field-caret-color: var(--zt-primary-color)}.zt-field__label{flex:none;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field__label--required:after{margin:var(--zt-field-required-mark-margin);color:var(--zt-field-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-field--disabled .zt-field__label{color:var(--zt-field-disabled-text-color)}.zt-field--disabled .zt-cell__value--vertical,.zt-field--readonly .zt-cell__value--vertical{background:var(--zt-gray-a04)}.zt-field__value{display:block;overflow:visible;border-radius:var(--zt-field-value-border-radius)}.zt-field__body{width:100%;display:flex;align-items:center}.zt-field__body input,.zt-field__body textarea{caret-color:var(--zt-field-caret-color)}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--zt-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.zt-field__control::-webkit-input-placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control::placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control:disabled{color:var(--zt-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--zt-field-input-disabled-text-color)}.zt-field__control:read-only{cursor:default}.zt-field__control--center{justify-content:center;text-align:center}.zt-field__control--right{justify-content:flex-end;text-align:right}.zt-field__control--custom{display:flex;align-items:center;min-height:var(--zt-cell-line-height)}.zt-field__control--min-height{min-height:var(--zt-field-text-area-min-height)}.zt-field__control[type=date],.zt-field__control[type=time],.zt-field__control[type=datetime-local]{min-height:var(--zt-cell-line-height)}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__clear,.zt-field__icon,.zt-field__button,.zt-field__right-icon{flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:calc(var(--zt-padding-xs) * -1);padding:0 var(--zt-padding-xs);line-height:inherit}.zt-field__clear{color:var(--zt-field-clear-icon-color);font-size:var(--zt-field-clear-icon-size);cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:var(--zt-field-icon-size)}.zt-field__left-icon{color:var(--zt-field-left-icon-color);margin-right:var(--zt-padding-base);display:flex;align-items:center}.zt-field__right-icon{color:var(--zt-field-right-icon-color)}.zt-field__button{padding-left:var(--zt-padding-xs)}.zt-field__error-message{color:var(--zt-field-error-message-color);font-size:var(--zt-field-error-message-font-size);text-align:left}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:var(--zt-padding-md);color:var(--zt-field-word-limit-color);font-size:var(--zt-field-word-limit-font-size);line-height:var(--zt-field-word-limit-line-height)}.zt-field__word-num--exceed{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-cell__value,.zt-field--error .zt-cell__value,.zt-field--description .zt-cell__value{border-bottom-left-radius:0;border-bottom-right-radius:0}.zt-field__bottom{border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md)}.zt-field--error-message .zt-field__label,.zt-field--error .zt-field__label{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-field__error-message,.zt-field--error .zt-field__error-message{background:var(--zt-field-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-field-error-message-font-size);color:var(--zt-field-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field--error-message .zt-field__error-message:before,.zt-field--error .zt-field__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-error-message-color);transform:scaleY(.5)}.zt-field--error-message.zt-field--description .zt-field__error-message,.zt-field--error.zt-field--description .zt-field__error-message{border-radius:0}.zt-field__description{background:var(--zt-field-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-field-description-font-size);color:var(--zt-field-description-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-description-border-color);transform:scaleY(.5)}.zt-field__password{width:100%;display:flex;justify-content:space-between;align-items:center}.zt-field__password .zt-icon{color:var(--zt-field-password-icon-color);font-size:var(--zt-field-icon-size)}.zt-field--is-link .zt-field__value{display:flex}.zt-theme-dark{--zt-field-left-icon-color: var(--zt-gray)}
|
package/lib/field/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
94
94
|
type: BooleanConstructor;
|
|
95
95
|
default: null;
|
|
96
96
|
};
|
|
97
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
97
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
98
98
|
leftIcon: StringConstructor;
|
|
99
99
|
titleIcon: StringConstructor;
|
|
100
100
|
title: (NumberConstructor | StringConstructor)[];
|
|
@@ -205,10 +205,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
205
205
|
autofocus: boolean;
|
|
206
206
|
disabled: boolean;
|
|
207
207
|
value: string;
|
|
208
|
-
direction: import("..").CellDirection;
|
|
209
208
|
center: boolean;
|
|
210
|
-
isLink: boolean;
|
|
211
209
|
border: boolean;
|
|
210
|
+
direction: import("..").CellDirection;
|
|
211
|
+
isLink: boolean;
|
|
212
212
|
required: boolean;
|
|
213
213
|
clickable: boolean | null;
|
|
214
214
|
clearable: boolean;
|
package/lib/grid/Grid.d.ts
CHANGED
package/lib/grid/index.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ export declare const Grid: import("../utils").WithInstall<import("vue").DefineCo
|
|
|
40
40
|
reverse: boolean;
|
|
41
41
|
center: boolean;
|
|
42
42
|
border: boolean;
|
|
43
|
-
clickable: boolean;
|
|
44
43
|
square: boolean;
|
|
44
|
+
clickable: boolean;
|
|
45
45
|
columnNum: string | number;
|
|
46
46
|
}, {}>>;
|
|
47
47
|
export default Grid;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
|
+
import { HierarchyData } from './types';
|
|
2
3
|
declare const hierarchySelectProps: {
|
|
3
4
|
treeData: {
|
|
4
5
|
type: ArrayConstructor;
|
|
5
6
|
default: () => never[];
|
|
6
7
|
};
|
|
8
|
+
checkedList: {
|
|
9
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
10
|
+
default: () => HierarchyData[];
|
|
11
|
+
};
|
|
7
12
|
disableParent: {
|
|
8
13
|
type: BooleanConstructor;
|
|
9
14
|
default: boolean;
|
|
@@ -35,6 +40,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
40
|
type: ArrayConstructor;
|
|
36
41
|
default: () => never[];
|
|
37
42
|
};
|
|
43
|
+
checkedList: {
|
|
44
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
45
|
+
default: () => HierarchyData[];
|
|
46
|
+
};
|
|
38
47
|
disableParent: {
|
|
39
48
|
type: BooleanConstructor;
|
|
40
49
|
default: boolean;
|
|
@@ -59,11 +68,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
68
|
default: string;
|
|
60
69
|
};
|
|
61
70
|
autoChangeToChildren: BooleanConstructor;
|
|
62
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter")[], "selected" | "change" | "asyncGetter", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
71
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("selected" | "change" | "asyncGetter" | "update:checkedList")[], "selected" | "change" | "asyncGetter" | "update:checkedList", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
63
72
|
treeData: {
|
|
64
73
|
type: ArrayConstructor;
|
|
65
74
|
default: () => never[];
|
|
66
75
|
};
|
|
76
|
+
checkedList: {
|
|
77
|
+
type: import("vue").PropType<HierarchyData[]>;
|
|
78
|
+
default: () => HierarchyData[];
|
|
79
|
+
};
|
|
67
80
|
disableParent: {
|
|
68
81
|
type: BooleanConstructor;
|
|
69
82
|
default: boolean;
|
|
@@ -92,12 +105,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
92
105
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
93
106
|
onSelected?: ((...args: any[]) => any) | undefined;
|
|
94
107
|
onAsyncGetter?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
"onUpdate:checkedList"?: ((...args: any[]) => any) | undefined;
|
|
95
109
|
}, {
|
|
96
110
|
multiple: boolean;
|
|
97
111
|
valueKey: string;
|
|
98
112
|
textKey: string;
|
|
99
113
|
breadcrumbTitle: string;
|
|
100
114
|
treeData: unknown[];
|
|
115
|
+
checkedList: HierarchyData[];
|
|
101
116
|
disableParent: boolean;
|
|
102
117
|
autoChangeToChildren: boolean;
|
|
103
118
|
}, {}>;
|