@uzum-tech/ui 2.0.1 → 2.0.3
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/dist/index.js +319 -92
- package/dist/index.mjs +319 -92
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/chat/src/ChatParts/MainArea.mjs +3 -1
- package/es/components.d.ts +51 -0
- package/es/input-number/src/InputNumber.d.ts +14 -0
- package/es/input-number/src/InputNumber.mjs +121 -48
- package/es/input-number/src/constants.d.ts +14 -0
- package/es/input-number/src/constants.mjs +15 -0
- package/es/input-number/src/interface.d.ts +4 -0
- package/es/input-number/src/utils.d.ts +12 -0
- package/es/input-number/src/utils.mjs +89 -1
- package/es/mapping-card/src/MappingCardList.d.ts +2 -0
- package/es/mapping-card/src/MappingCardList.mjs +11 -2
- package/es/mapping-card/src/interface.d.ts +3 -0
- package/es/mapping-card/src/interface.mjs +2 -1
- package/es/mapping-card/src/styles/index.cssr.mjs +8 -1
- package/es/modal/src/BodyWrapper.d.ts +39 -0
- package/es/modal/src/Modal.d.ts +56 -0
- package/es/modal/src/ModalEnvironment.d.ts +39 -0
- package/es/modal/src/presetProps.d.ts +18 -1
- package/es/modal/src/presetProps.mjs +2 -1
- package/es/notification/src/NotificationEnvironment.d.ts +4 -0
- package/es/notification/src/NotificationEnvironment.mjs +45 -9
- package/es/notification/src/NotificationProvider.d.ts +2 -0
- package/es/notification/src/styles/index.cssr.d.ts +1 -2
- package/es/notification/src/styles/index.cssr.mjs +13 -23
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/chat/src/ChatParts/MainArea.js +45 -43
- package/lib/components.d.ts +51 -0
- package/lib/input-number/src/InputNumber.d.ts +14 -0
- package/lib/input-number/src/InputNumber.js +128 -51
- package/lib/input-number/src/constants.d.ts +14 -0
- package/lib/input-number/src/constants.js +18 -0
- package/lib/input-number/src/interface.d.ts +4 -0
- package/lib/input-number/src/utils.d.ts +12 -0
- package/lib/input-number/src/utils.js +112 -1
- package/lib/mapping-card/src/MappingCardList.d.ts +2 -0
- package/lib/mapping-card/src/MappingCardList.js +9 -4
- package/lib/mapping-card/src/interface.d.ts +3 -0
- package/lib/mapping-card/src/interface.js +2 -1
- package/lib/mapping-card/src/styles/index.cssr.js +8 -1
- package/lib/modal/src/BodyWrapper.d.ts +39 -0
- package/lib/modal/src/Modal.d.ts +56 -0
- package/lib/modal/src/ModalEnvironment.d.ts +39 -0
- package/lib/modal/src/presetProps.d.ts +18 -1
- package/lib/modal/src/presetProps.js +2 -1
- package/lib/notification/src/NotificationEnvironment.d.ts +4 -0
- package/lib/notification/src/NotificationEnvironment.js +46 -9
- package/lib/notification/src/NotificationProvider.d.ts +2 -0
- package/lib/notification/src/styles/index.cssr.d.ts +1 -2
- package/lib/notification/src/styles/index.cssr.js +13 -23
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -1
- package/web-types.json +8 -1
|
@@ -2,6 +2,7 @@ import type { PropType, VNodeChild } from 'vue';
|
|
|
2
2
|
import type { BuiltinType, BuiltinTypeMap, ComponentConfig } from '../../_internal/component-renderer';
|
|
3
3
|
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
4
4
|
import type { ButtonProps } from '../../button';
|
|
5
|
+
import type { EmptyProps } from '../../empty';
|
|
5
6
|
import type { IconProps } from '../../icon';
|
|
6
7
|
import type { PaginationProps } from '../../pagination';
|
|
7
8
|
import type { SwitchProps } from '../../switch';
|
|
@@ -55,6 +56,7 @@ export interface MappingCardListInterface {
|
|
|
55
56
|
items?: MappingCardProps[];
|
|
56
57
|
pagination?: PaginationProps | false;
|
|
57
58
|
gap?: number;
|
|
59
|
+
emptyProps?: Partial<EmptyProps>;
|
|
58
60
|
}
|
|
59
61
|
export declare const mappingCardProps: {
|
|
60
62
|
readonly title: PropType<MappingCardInterface["title"]>;
|
|
@@ -104,6 +106,7 @@ export declare const mappingCardListProps: {
|
|
|
104
106
|
readonly type: NumberConstructor;
|
|
105
107
|
readonly default: 16;
|
|
106
108
|
};
|
|
109
|
+
readonly emptyProps: PropType<Partial<EmptyProps>>;
|
|
107
110
|
};
|
|
108
111
|
export type MappingCardProps = ExtractPublicPropTypes<typeof mappingCardProps>;
|
|
109
112
|
export type MappingCardListProps = ExtractPublicPropTypes<typeof mappingCardListProps>;
|
|
@@ -92,6 +92,13 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('mapping-card', `
|
|
|
92
92
|
color: var(--u-arrow-color);
|
|
93
93
|
font-size: 16px;
|
|
94
94
|
flex-shrink: 0;
|
|
95
|
-
`)]), (0, cssr_1.cB)('mapping-card-list',
|
|
95
|
+
`)]), (0, cssr_1.cB)('mapping-card-list', `
|
|
96
|
+
display: flex;
|
|
97
|
+
justify-content: space-between;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
height: 100%;
|
|
100
|
+
`, [(0, cssr_1.cE)('pagination', `
|
|
96
101
|
margin-top: 16px;
|
|
102
|
+
`), (0, cssr_1.cE)('empty', `
|
|
103
|
+
margin: auto;
|
|
97
104
|
`)])]);
|
|
@@ -55,6 +55,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
55
55
|
loading: BooleanConstructor;
|
|
56
56
|
bordered: BooleanConstructor;
|
|
57
57
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
58
|
+
contentClass: StringConstructor;
|
|
59
|
+
contentScrollable: BooleanConstructor;
|
|
60
|
+
contentStyle: PropType<import("vue").CSSProperties | string>;
|
|
61
|
+
headerStyle: PropType<import("vue").CSSProperties | string>;
|
|
62
|
+
headerExtraStyle: PropType<import("vue").CSSProperties | string>;
|
|
63
|
+
footerStyle: PropType<import("vue").CSSProperties | string>;
|
|
64
|
+
embedded: BooleanConstructor;
|
|
65
|
+
segmented: {
|
|
66
|
+
readonly type: PropType<boolean | import("../../card").CardSegmented>;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
hoverable: BooleanConstructor;
|
|
70
|
+
role: StringConstructor;
|
|
71
|
+
tag: {
|
|
72
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
73
|
+
readonly default: "div";
|
|
74
|
+
};
|
|
58
75
|
show: {
|
|
59
76
|
type: BooleanConstructor;
|
|
60
77
|
required: true;
|
|
@@ -1283,6 +1300,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1283
1300
|
loading: BooleanConstructor;
|
|
1284
1301
|
bordered: BooleanConstructor;
|
|
1285
1302
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
1303
|
+
contentClass: StringConstructor;
|
|
1304
|
+
contentScrollable: BooleanConstructor;
|
|
1305
|
+
contentStyle: PropType<import("vue").CSSProperties | string>;
|
|
1306
|
+
headerStyle: PropType<import("vue").CSSProperties | string>;
|
|
1307
|
+
headerExtraStyle: PropType<import("vue").CSSProperties | string>;
|
|
1308
|
+
footerStyle: PropType<import("vue").CSSProperties | string>;
|
|
1309
|
+
embedded: BooleanConstructor;
|
|
1310
|
+
segmented: {
|
|
1311
|
+
readonly type: PropType<boolean | import("../../card").CardSegmented>;
|
|
1312
|
+
readonly default: false;
|
|
1313
|
+
};
|
|
1314
|
+
hoverable: BooleanConstructor;
|
|
1315
|
+
role: StringConstructor;
|
|
1316
|
+
tag: {
|
|
1317
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
1318
|
+
readonly default: "div";
|
|
1319
|
+
};
|
|
1286
1320
|
show: {
|
|
1287
1321
|
type: BooleanConstructor;
|
|
1288
1322
|
required: true;
|
|
@@ -1310,8 +1344,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1310
1344
|
type: "default" | "error" | "warning" | "success" | "info";
|
|
1311
1345
|
size: "small" | "medium" | "large";
|
|
1312
1346
|
loading: boolean;
|
|
1347
|
+
tag: keyof HTMLElementTagNameMap;
|
|
1313
1348
|
showIcon: boolean;
|
|
1314
1349
|
closable: boolean;
|
|
1350
|
+
contentScrollable: boolean;
|
|
1351
|
+
embedded: boolean;
|
|
1352
|
+
segmented: boolean | import("../../card").CardSegmented;
|
|
1353
|
+
hoverable: boolean;
|
|
1315
1354
|
draggable: boolean | ModalDraggableOptions;
|
|
1316
1355
|
trapFocus: boolean;
|
|
1317
1356
|
autoFocus: boolean;
|
package/lib/modal/src/Modal.d.ts
CHANGED
|
@@ -51,6 +51,23 @@ export declare const modalProps: {
|
|
|
51
51
|
loading: BooleanConstructor;
|
|
52
52
|
bordered: BooleanConstructor;
|
|
53
53
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
54
|
+
contentClass: StringConstructor;
|
|
55
|
+
contentScrollable: BooleanConstructor;
|
|
56
|
+
contentStyle: PropType<CSSProperties | string>;
|
|
57
|
+
headerStyle: PropType<CSSProperties | string>;
|
|
58
|
+
headerExtraStyle: PropType<CSSProperties | string>;
|
|
59
|
+
footerStyle: PropType<CSSProperties | string>;
|
|
60
|
+
embedded: BooleanConstructor;
|
|
61
|
+
segmented: {
|
|
62
|
+
readonly type: PropType<boolean | import("../../card").CardSegmented>;
|
|
63
|
+
readonly default: false;
|
|
64
|
+
};
|
|
65
|
+
hoverable: BooleanConstructor;
|
|
66
|
+
role: StringConstructor;
|
|
67
|
+
tag: {
|
|
68
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
69
|
+
readonly default: "div";
|
|
70
|
+
};
|
|
54
71
|
show: BooleanConstructor;
|
|
55
72
|
unstableShowMask: {
|
|
56
73
|
type: BooleanConstructor;
|
|
@@ -1097,6 +1114,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
1097
1114
|
loading: BooleanConstructor;
|
|
1098
1115
|
bordered: BooleanConstructor;
|
|
1099
1116
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
1117
|
+
contentClass: StringConstructor;
|
|
1118
|
+
contentScrollable: BooleanConstructor;
|
|
1119
|
+
contentStyle: PropType<CSSProperties | string>;
|
|
1120
|
+
headerStyle: PropType<CSSProperties | string>;
|
|
1121
|
+
headerExtraStyle: PropType<CSSProperties | string>;
|
|
1122
|
+
footerStyle: PropType<CSSProperties | string>;
|
|
1123
|
+
embedded: BooleanConstructor;
|
|
1124
|
+
segmented: {
|
|
1125
|
+
readonly type: PropType<boolean | import("../../card").CardSegmented>;
|
|
1126
|
+
readonly default: false;
|
|
1127
|
+
};
|
|
1128
|
+
hoverable: BooleanConstructor;
|
|
1129
|
+
role: StringConstructor;
|
|
1130
|
+
tag: {
|
|
1131
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
1132
|
+
readonly default: "div";
|
|
1133
|
+
};
|
|
1100
1134
|
show: BooleanConstructor;
|
|
1101
1135
|
unstableShowMask: {
|
|
1102
1136
|
type: BooleanConstructor;
|
|
@@ -2159,6 +2193,23 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
2159
2193
|
loading: BooleanConstructor;
|
|
2160
2194
|
bordered: BooleanConstructor;
|
|
2161
2195
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
2196
|
+
contentClass: StringConstructor;
|
|
2197
|
+
contentScrollable: BooleanConstructor;
|
|
2198
|
+
contentStyle: PropType<CSSProperties | string>;
|
|
2199
|
+
headerStyle: PropType<CSSProperties | string>;
|
|
2200
|
+
headerExtraStyle: PropType<CSSProperties | string>;
|
|
2201
|
+
footerStyle: PropType<CSSProperties | string>;
|
|
2202
|
+
embedded: BooleanConstructor;
|
|
2203
|
+
segmented: {
|
|
2204
|
+
readonly type: PropType<boolean | import("../../card").CardSegmented>;
|
|
2205
|
+
readonly default: false;
|
|
2206
|
+
};
|
|
2207
|
+
hoverable: BooleanConstructor;
|
|
2208
|
+
role: StringConstructor;
|
|
2209
|
+
tag: {
|
|
2210
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
2211
|
+
readonly default: "div";
|
|
2212
|
+
};
|
|
2162
2213
|
show: BooleanConstructor;
|
|
2163
2214
|
unstableShowMask: {
|
|
2164
2215
|
type: BooleanConstructor;
|
|
@@ -3155,9 +3206,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
3155
3206
|
type: "default" | "error" | "warning" | "success" | "info";
|
|
3156
3207
|
size: "small" | "medium" | "large";
|
|
3157
3208
|
loading: boolean;
|
|
3209
|
+
tag: keyof HTMLElementTagNameMap;
|
|
3158
3210
|
showIcon: boolean;
|
|
3159
3211
|
closable: boolean;
|
|
3160
3212
|
show: boolean;
|
|
3213
|
+
contentScrollable: boolean;
|
|
3214
|
+
embedded: boolean;
|
|
3215
|
+
segmented: boolean | import("../../card").CardSegmented;
|
|
3216
|
+
hoverable: boolean;
|
|
3161
3217
|
displayDirective: "show" | "if";
|
|
3162
3218
|
maskClosable: boolean;
|
|
3163
3219
|
trapFocus: boolean;
|
|
@@ -55,6 +55,23 @@ export declare const UModalEnvironment: import("vue").DefineComponent<import("vu
|
|
|
55
55
|
loading: BooleanConstructor;
|
|
56
56
|
bordered: BooleanConstructor;
|
|
57
57
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
58
|
+
contentClass: StringConstructor;
|
|
59
|
+
contentScrollable: BooleanConstructor;
|
|
60
|
+
contentStyle: PropType<import("vue").CSSProperties | string>;
|
|
61
|
+
headerStyle: PropType<import("vue").CSSProperties | string>;
|
|
62
|
+
headerExtraStyle: PropType<import("vue").CSSProperties | string>;
|
|
63
|
+
footerStyle: PropType<import("vue").CSSProperties | string>;
|
|
64
|
+
embedded: BooleanConstructor;
|
|
65
|
+
segmented: {
|
|
66
|
+
readonly type: PropType<boolean | import("../..").CardSegmented>;
|
|
67
|
+
readonly default: false;
|
|
68
|
+
};
|
|
69
|
+
hoverable: BooleanConstructor;
|
|
70
|
+
role: StringConstructor;
|
|
71
|
+
tag: {
|
|
72
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
73
|
+
readonly default: "div";
|
|
74
|
+
};
|
|
58
75
|
show: BooleanConstructor;
|
|
59
76
|
unstableShowMask: {
|
|
60
77
|
type: BooleanConstructor;
|
|
@@ -1112,6 +1129,23 @@ export declare const UModalEnvironment: import("vue").DefineComponent<import("vu
|
|
|
1112
1129
|
loading: BooleanConstructor;
|
|
1113
1130
|
bordered: BooleanConstructor;
|
|
1114
1131
|
iconPlacement: PropType<import("../../dialog/src/interface").IconPlacement>;
|
|
1132
|
+
contentClass: StringConstructor;
|
|
1133
|
+
contentScrollable: BooleanConstructor;
|
|
1134
|
+
contentStyle: PropType<import("vue").CSSProperties | string>;
|
|
1135
|
+
headerStyle: PropType<import("vue").CSSProperties | string>;
|
|
1136
|
+
headerExtraStyle: PropType<import("vue").CSSProperties | string>;
|
|
1137
|
+
footerStyle: PropType<import("vue").CSSProperties | string>;
|
|
1138
|
+
embedded: BooleanConstructor;
|
|
1139
|
+
segmented: {
|
|
1140
|
+
readonly type: PropType<boolean | import("../..").CardSegmented>;
|
|
1141
|
+
readonly default: false;
|
|
1142
|
+
};
|
|
1143
|
+
hoverable: BooleanConstructor;
|
|
1144
|
+
role: StringConstructor;
|
|
1145
|
+
tag: {
|
|
1146
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
1147
|
+
readonly default: "div";
|
|
1148
|
+
};
|
|
1115
1149
|
show: BooleanConstructor;
|
|
1116
1150
|
unstableShowMask: {
|
|
1117
1151
|
type: BooleanConstructor;
|
|
@@ -2108,9 +2142,14 @@ export declare const UModalEnvironment: import("vue").DefineComponent<import("vu
|
|
|
2108
2142
|
type: "default" | "error" | "warning" | "success" | "info";
|
|
2109
2143
|
size: "small" | "medium" | "large";
|
|
2110
2144
|
loading: boolean;
|
|
2145
|
+
tag: keyof HTMLElementTagNameMap;
|
|
2111
2146
|
showIcon: boolean;
|
|
2112
2147
|
closable: boolean;
|
|
2113
2148
|
show: boolean;
|
|
2149
|
+
contentScrollable: boolean;
|
|
2150
|
+
embedded: boolean;
|
|
2151
|
+
segmented: boolean | import("../..").CardSegmented;
|
|
2152
|
+
hoverable: boolean;
|
|
2114
2153
|
displayDirective: "show" | "if";
|
|
2115
2154
|
maskClosable: boolean;
|
|
2116
2155
|
trapFocus: boolean;
|
|
@@ -31,6 +31,23 @@ declare const presetProps: {
|
|
|
31
31
|
onPositiveClick: PropType<(e: MouseEvent) => void>;
|
|
32
32
|
onNegativeClick: PropType<(e: MouseEvent) => void>;
|
|
33
33
|
onClose: PropType<() => void>;
|
|
34
|
+
contentClass: StringConstructor;
|
|
35
|
+
contentScrollable: BooleanConstructor;
|
|
36
|
+
contentStyle: PropType<import("vue").CSSProperties | string>;
|
|
37
|
+
headerStyle: PropType<import("vue").CSSProperties | string>;
|
|
38
|
+
headerExtraStyle: PropType<import("vue").CSSProperties | string>;
|
|
39
|
+
footerStyle: PropType<import("vue").CSSProperties | string>;
|
|
40
|
+
embedded: BooleanConstructor;
|
|
41
|
+
segmented: {
|
|
42
|
+
readonly type: PropType<boolean | import("../../card/src/Card").CardSegmented>;
|
|
43
|
+
readonly default: false;
|
|
44
|
+
};
|
|
45
|
+
hoverable: BooleanConstructor;
|
|
46
|
+
role: StringConstructor;
|
|
47
|
+
tag: {
|
|
48
|
+
readonly type: PropType<keyof HTMLElementTagNameMap>;
|
|
49
|
+
readonly default: "div";
|
|
50
|
+
};
|
|
34
51
|
};
|
|
35
|
-
declare const presetPropsKeys: ("bordered" | "icon" | "type" | "content" | "body" | "title" | "size" | "positiveText" | "negativeText" | "loading" | "showIcon" | "closable" | "onClose" | "iconPlacement" | "positiveButtonProps" | "negativeButtonProps" | "action" | "onPositiveClick" | "onNegativeClick")[];
|
|
52
|
+
declare const presetPropsKeys: ("bordered" | "icon" | "type" | "content" | "body" | "title" | "size" | "positiveText" | "negativeText" | "loading" | "tag" | "showIcon" | "closable" | "onClose" | "contentClass" | "contentStyle" | "iconPlacement" | "contentScrollable" | "headerStyle" | "headerExtraStyle" | "footerStyle" | "embedded" | "segmented" | "hoverable" | "role" | "positiveButtonProps" | "negativeButtonProps" | "action" | "onPositiveClick" | "onNegativeClick")[];
|
|
36
53
|
export { presetProps, presetPropsKeys };
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.presetPropsKeys = exports.presetProps = void 0;
|
|
4
4
|
const _utils_1 = require("../../_utils");
|
|
5
|
+
const Card_1 = require("../../card/src/Card");
|
|
5
6
|
const dialogProps_1 = require("../../dialog/src/dialogProps");
|
|
6
|
-
const presetProps = Object.assign(Object.assign({}, dialogProps_1.dialogProps), { size: {
|
|
7
|
+
const presetProps = Object.assign(Object.assign(Object.assign({}, Card_1.cardBaseProps), dialogProps_1.dialogProps), { size: {
|
|
7
8
|
type: String,
|
|
8
9
|
default: 'medium'
|
|
9
10
|
} });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
export declare const notificationEnvOptions: {
|
|
3
3
|
readonly duration: NumberConstructor;
|
|
4
|
+
readonly pauseOnVisibilityChange: BooleanConstructor;
|
|
4
5
|
readonly onClose: PropType<() => Promise<boolean> | boolean | any>;
|
|
5
6
|
readonly onLeave: PropType<() => void>;
|
|
6
7
|
readonly onAfterEnter: PropType<() => void>;
|
|
@@ -41,6 +42,7 @@ export declare const NotificationEnvironment: import("vue").DefineComponent<Extr
|
|
|
41
42
|
required: true;
|
|
42
43
|
};
|
|
43
44
|
duration: NumberConstructor;
|
|
45
|
+
pauseOnVisibilityChange: BooleanConstructor;
|
|
44
46
|
onClose: PropType<() => Promise<boolean> | boolean | any>;
|
|
45
47
|
onLeave: PropType<() => void>;
|
|
46
48
|
onAfterEnter: PropType<() => void>;
|
|
@@ -87,6 +89,7 @@ export declare const NotificationEnvironment: import("vue").DefineComponent<Extr
|
|
|
87
89
|
required: true;
|
|
88
90
|
};
|
|
89
91
|
duration: NumberConstructor;
|
|
92
|
+
pauseOnVisibilityChange: BooleanConstructor;
|
|
90
93
|
onClose: PropType<() => Promise<boolean> | boolean | any>;
|
|
91
94
|
onLeave: PropType<() => void>;
|
|
92
95
|
onAfterEnter: PropType<() => void>;
|
|
@@ -116,5 +119,6 @@ export declare const NotificationEnvironment: import("vue").DefineComponent<Extr
|
|
|
116
119
|
type: "default" | "error" | "warning" | "success" | "info" | "primary";
|
|
117
120
|
closable: boolean;
|
|
118
121
|
keepAliveOnHover: boolean;
|
|
122
|
+
pauseOnVisibilityChange: boolean;
|
|
119
123
|
hideIcon: boolean;
|
|
120
124
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -5,7 +5,7 @@ const vue_1 = require("vue");
|
|
|
5
5
|
const _utils_1 = require("../../_utils");
|
|
6
6
|
const context_1 = require("./context");
|
|
7
7
|
const Notification_1 = require("./Notification");
|
|
8
|
-
exports.notificationEnvOptions = Object.assign(Object.assign({}, Notification_1.notificationProps), { duration: Number, onClose: Function, onLeave: Function, onAfterEnter: Function, onAfterLeave: Function,
|
|
8
|
+
exports.notificationEnvOptions = Object.assign(Object.assign({}, Notification_1.notificationProps), { duration: Number, pauseOnVisibilityChange: Boolean, onClose: Function, onLeave: Function, onAfterEnter: Function, onAfterLeave: Function,
|
|
9
9
|
/** @deprecated */
|
|
10
10
|
onHide: Function,
|
|
11
11
|
/** @deprecated */
|
|
@@ -27,10 +27,44 @@ exports.NotificationEnvironment = (0, vue_1.defineComponent)({
|
|
|
27
27
|
const { wipTransitionCountRef } = (0, vue_1.inject)(context_1.notificationProviderInjectionKey);
|
|
28
28
|
const showRef = (0, vue_1.ref)(true);
|
|
29
29
|
let timerId = null;
|
|
30
|
+
let remainingDuration = null;
|
|
31
|
+
let timerStartedAt = null;
|
|
32
|
+
let timerPausedForVisibility = false;
|
|
33
|
+
function clearTimer() {
|
|
34
|
+
if (timerId !== null) {
|
|
35
|
+
window.clearTimeout(timerId);
|
|
36
|
+
timerId = null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
30
39
|
function hide() {
|
|
31
40
|
showRef.value = false;
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
clearTimer();
|
|
42
|
+
}
|
|
43
|
+
function startTimer(duration) {
|
|
44
|
+
clearTimer();
|
|
45
|
+
remainingDuration = duration;
|
|
46
|
+
timerStartedAt = Date.now();
|
|
47
|
+
timerId = window.setTimeout(hide, duration);
|
|
48
|
+
}
|
|
49
|
+
function handleVisibilityChange() {
|
|
50
|
+
if (document.visibilityState === 'hidden') {
|
|
51
|
+
if (timerId !== null) {
|
|
52
|
+
clearTimer();
|
|
53
|
+
if (timerStartedAt !== null && remainingDuration !== null) {
|
|
54
|
+
remainingDuration = Math.max(0, remainingDuration - (Date.now() - timerStartedAt));
|
|
55
|
+
}
|
|
56
|
+
timerStartedAt = null;
|
|
57
|
+
timerPausedForVisibility = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else if (timerPausedForVisibility) {
|
|
61
|
+
timerPausedForVisibility = false;
|
|
62
|
+
if (remainingDuration !== null && remainingDuration > 0) {
|
|
63
|
+
startTimer(remainingDuration);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
hide();
|
|
67
|
+
}
|
|
34
68
|
}
|
|
35
69
|
}
|
|
36
70
|
function handleBeforeEnter(el) {
|
|
@@ -81,16 +115,13 @@ exports.NotificationEnvironment = (0, vue_1.defineComponent)({
|
|
|
81
115
|
function setHideTimeout() {
|
|
82
116
|
const { duration } = props;
|
|
83
117
|
if (duration) {
|
|
84
|
-
|
|
118
|
+
startTimer(duration);
|
|
85
119
|
}
|
|
86
120
|
}
|
|
87
121
|
function handleMouseenter(e) {
|
|
88
122
|
if (e.currentTarget !== e.target)
|
|
89
123
|
return;
|
|
90
|
-
|
|
91
|
-
window.clearTimeout(timerId);
|
|
92
|
-
timerId = null;
|
|
93
|
-
}
|
|
124
|
+
clearTimer();
|
|
94
125
|
}
|
|
95
126
|
function handleMouseleave(e) {
|
|
96
127
|
if (e.currentTarget !== e.target)
|
|
@@ -112,8 +143,14 @@ exports.NotificationEnvironment = (0, vue_1.defineComponent)({
|
|
|
112
143
|
}
|
|
113
144
|
(0, vue_1.onMounted)(() => {
|
|
114
145
|
if (props.duration) {
|
|
115
|
-
|
|
146
|
+
startTimer(props.duration);
|
|
116
147
|
}
|
|
148
|
+
if (props.pauseOnVisibilityChange) {
|
|
149
|
+
document.addEventListener('visibilitychange', handleVisibilityChange);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
(0, vue_1.onBeforeUnmount)(() => {
|
|
153
|
+
document.removeEventListener('visibilitychange', handleVisibilityChange);
|
|
117
154
|
});
|
|
118
155
|
return {
|
|
119
156
|
show: showRef,
|
|
@@ -741,6 +741,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
741
741
|
type?: "default" | "error" | "warning" | "success" | "info" | "primary" | undefined;
|
|
742
742
|
closable?: boolean | undefined;
|
|
743
743
|
keepAliveOnHover?: boolean | undefined;
|
|
744
|
+
pauseOnVisibilityChange?: boolean | undefined;
|
|
744
745
|
hideIcon?: boolean | undefined;
|
|
745
746
|
avatar?: (() => import("vue").VNodeChild) | undefined;
|
|
746
747
|
content?: string | (() => import("vue").VNodeChild) | undefined;
|
|
@@ -766,6 +767,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
|
|
|
766
767
|
type?: "default" | "error" | "warning" | "success" | "info" | "primary" | undefined;
|
|
767
768
|
closable?: boolean | undefined;
|
|
768
769
|
keepAliveOnHover?: boolean | undefined;
|
|
770
|
+
pauseOnVisibilityChange?: boolean | undefined;
|
|
769
771
|
hideIcon?: boolean | undefined;
|
|
770
772
|
avatar?: (() => import("vue").VNodeChild) | undefined;
|
|
771
773
|
content?: string | (() => import("vue").VNodeChild) | undefined;
|
|
@@ -36,12 +36,16 @@ const cssr_1 = require("../../../_utils/cssr");
|
|
|
36
36
|
exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
37
37
|
z-index: 4000;
|
|
38
38
|
position: fixed;
|
|
39
|
+
left: 0;
|
|
40
|
+
right: 0;
|
|
39
41
|
overflow: visible;
|
|
40
42
|
display: flex;
|
|
41
43
|
flex-direction: column;
|
|
42
44
|
align-items: flex-end;
|
|
45
|
+
pointer-events: none;
|
|
43
46
|
`, [(0, cssr_1.c)('>', [(0, cssr_1.cB)('scrollbar', `
|
|
44
|
-
width:
|
|
47
|
+
width: -moz-fit-content;
|
|
48
|
+
width: fit-content;
|
|
45
49
|
overflow: visible;
|
|
46
50
|
height: -moz-fit-content !important;
|
|
47
51
|
height: fit-content !important;
|
|
@@ -67,8 +71,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
67
71
|
margin-bottom: 0;
|
|
68
72
|
margin-top: 12px;
|
|
69
73
|
`)]), (0, cssr_1.cM)('top, bottom', `
|
|
70
|
-
|
|
71
|
-
transform: translateX(-50%);
|
|
74
|
+
align-items: center;
|
|
72
75
|
`, [(0, cssr_1.cB)('notification-wrapper', [(0, cssr_1.c)('&.notification-transition-enter-from, &.notification-transition-leave-to', `
|
|
73
76
|
transform: scale(0.85);
|
|
74
77
|
`), (0, cssr_1.c)('&.notification-transition-leave-from, &.notification-transition-enter-to', `
|
|
@@ -77,15 +80,11 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
77
80
|
transform-origin: top center;
|
|
78
81
|
`)]), (0, cssr_1.cM)('bottom', [(0, cssr_1.cB)('notification-wrapper', `
|
|
79
82
|
transform-origin: bottom center;
|
|
80
|
-
`)]), (0, cssr_1.cM)('top-right', `
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
right: 0;
|
|
86
|
-
`, [placementTransformStyle('bottom-right')]), (0, cssr_1.cM)('bottom-left', `
|
|
87
|
-
left: 0;
|
|
88
|
-
`, [placementTransformStyle('bottom-left')]), (0, cssr_1.cM)('scrollable', [(0, cssr_1.cM)('top-right', `
|
|
83
|
+
`)]), (0, cssr_1.cM)('top-right, bottom-right', `
|
|
84
|
+
align-items: flex-end;
|
|
85
|
+
`), (0, cssr_1.cM)('top-left, bottom-left', `
|
|
86
|
+
align-items: flex-start;
|
|
87
|
+
`), (0, cssr_1.cM)('scrollable', [(0, cssr_1.cM)('top-right', `
|
|
89
88
|
top: 0;
|
|
90
89
|
`), (0, cssr_1.cM)('top-left', `
|
|
91
90
|
top: 0;
|
|
@@ -122,6 +121,7 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
122
121
|
`)]), (0, cssr_1.cB)('notification', `
|
|
123
122
|
background-color: var(--u-color);
|
|
124
123
|
color: var(--u-text-color);
|
|
124
|
+
pointer-events: auto;
|
|
125
125
|
transition:
|
|
126
126
|
background-color .3s var(--u-bezier),
|
|
127
127
|
color .3s var(--u-bezier),
|
|
@@ -219,14 +219,4 @@ exports.default = (0, cssr_1.c)([(0, cssr_1.cB)('notification-container', `
|
|
|
219
219
|
color: var(--u-text-color);
|
|
220
220
|
`, [(0, cssr_1.c)('&:first-child', {
|
|
221
221
|
margin: 0
|
|
222
|
-
})])])])])]);
|
|
223
|
-
function placementTransformStyle(placement) {
|
|
224
|
-
const direction = placement.split('-')[1];
|
|
225
|
-
const transformXEnter = direction === 'left' ? 'calc(-100%)' : 'calc(100%)';
|
|
226
|
-
const transformXLeave = '0';
|
|
227
|
-
return (0, cssr_1.cB)('notification-wrapper', [(0, cssr_1.c)('&.notification-transition-enter-from, &.notification-transition-leave-to', `
|
|
228
|
-
transform: translate(${transformXEnter}, 0);
|
|
229
|
-
`), (0, cssr_1.c)('&.notification-transition-leave-from, &.notification-transition-enter-to', `
|
|
230
|
-
transform: translate(${transformXLeave}, 0);
|
|
231
|
-
`)]);
|
|
232
|
-
}
|
|
222
|
+
})])])])])]);
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.
|
|
1
|
+
declare const _default: "2.0.3";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uzum-tech/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A Vue 3 Component Library. Fairly Complete, Theme Customizable, Uses TypeScript, Fast",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "KapitalLab",
|
|
@@ -181,6 +181,9 @@
|
|
|
181
181
|
"overrides": {
|
|
182
182
|
"cssstyle": "5.2.1"
|
|
183
183
|
},
|
|
184
|
+
"onlyBuiltDependencies": [
|
|
185
|
+
"esbuild"
|
|
186
|
+
],
|
|
184
187
|
"peerDependencyRules": {
|
|
185
188
|
"ignoreMissing": [
|
|
186
189
|
"@babel/core",
|
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@uzum-tech/ui",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.3",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -8618,6 +8618,13 @@
|
|
|
8618
8618
|
"description": "Whether to show increase/decrease buttons.",
|
|
8619
8619
|
"default": "true"
|
|
8620
8620
|
},
|
|
8621
|
+
{
|
|
8622
|
+
"name": "type",
|
|
8623
|
+
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/input-number",
|
|
8624
|
+
"type": "'default' | 'amount'",
|
|
8625
|
+
"description": "When set to `amount`, the input will format numbers with a space thousands separator and increase/decrease buttons will be hidden.",
|
|
8626
|
+
"default": "'default'"
|
|
8627
|
+
},
|
|
8621
8628
|
{
|
|
8622
8629
|
"name": "size",
|
|
8623
8630
|
"doc-url": "https://uzum-ui.kapitalbank.uz/en-US/os-theme/components/input-number",
|