@uzum-tech/ui 1.4.0 → 1.4.2
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 +61 -17
- package/dist/index.prod.js +2 -2
- package/es/_internal/icons/SiderUnionBorder.js +1 -1
- package/es/card-list/index.d.ts +1 -0
- package/es/card-list/src/CardListItem.js +3 -6
- package/es/icon-wrapper/src/IconWrapper.d.ts +40 -9
- package/es/icon-wrapper/src/IconWrapper.js +23 -5
- package/es/icon-wrapper/src/interface.d.ts +1 -0
- package/es/icon-wrapper/src/interface.js +1 -0
- package/es/icon-wrapper/src/styles/index.cssr.js +17 -5
- package/es/layout/src/styles/layout-sider.cssr.js +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/icons/SiderUnionBorder.js +1 -1
- package/lib/card-list/index.d.ts +1 -0
- package/lib/card-list/src/CardListItem.js +3 -6
- package/lib/icon-wrapper/src/IconWrapper.d.ts +40 -9
- package/lib/icon-wrapper/src/IconWrapper.js +23 -5
- package/lib/icon-wrapper/src/interface.d.ts +1 -0
- package/lib/icon-wrapper/src/interface.js +2 -0
- package/lib/icon-wrapper/src/styles/index.cssr.js +16 -4
- package/lib/layout/src/styles/layout-sider.cssr.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +22 -1
|
@@ -3,6 +3,6 @@ export default defineComponent({
|
|
|
3
3
|
name: 'SiderUnionBorder',
|
|
4
4
|
render() {
|
|
5
5
|
return (h("svg", { viewBox: "0 0 35 82", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
6
|
-
h("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "
|
|
6
|
+
h("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "#fff" })));
|
|
7
7
|
}
|
|
8
8
|
});
|
package/es/card-list/index.d.ts
CHANGED
|
@@ -61,8 +61,7 @@ export default defineComponent({
|
|
|
61
61
|
return (h("div", { class: `${mergedClsPrefix}-card-list-item`, onClick: isDropdown && items.length ? this.toggle : undefined, ref: "selfRef" },
|
|
62
62
|
isDropdown && (h("div", { class: `${mergedClsPrefix}-card-list-item__wrapper` },
|
|
63
63
|
h("div", { class: `${mergedClsPrefix}-card-list-item__wrapper-content` },
|
|
64
|
-
this.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
65
|
-
h("strong", null, this.title))),
|
|
64
|
+
this.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` }, this.title)),
|
|
66
65
|
this.subtitle && (h("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, this.subtitle))),
|
|
67
66
|
h(ChevronDown, { style: {
|
|
68
67
|
width: '20px',
|
|
@@ -79,8 +78,7 @@ export default defineComponent({
|
|
|
79
78
|
`${mergedClsPrefix}-card-list-item__items--grid`
|
|
80
79
|
] }, items.map((item, idx) => [
|
|
81
80
|
h("div", { class: `${mergedClsPrefix}-card-list-item__item`, key: idx },
|
|
82
|
-
item.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
83
|
-
h("strong", null, item.title))),
|
|
81
|
+
item.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` }, item.title)),
|
|
84
82
|
item.content && (h("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, item.content))),
|
|
85
83
|
idx < items.length - 1 &&
|
|
86
84
|
(this.renderDivider
|
|
@@ -104,8 +102,7 @@ export default defineComponent({
|
|
|
104
102
|
e.stopPropagation();
|
|
105
103
|
} }, items.map((item, idx) => (h("li", { key: idx },
|
|
106
104
|
h("div", { class: `${mergedClsPrefix}-card-list-item__dropdown-item` },
|
|
107
|
-
item.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
108
|
-
h("strong", null, item.title))),
|
|
105
|
+
item.title && (h("div", { class: `${mergedClsPrefix}-card-list-item__title` }, item.title)),
|
|
109
106
|
item.content && (h("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, item.content)))))))) : null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 :
|
|
110
107
|
_b.call(_a)));
|
|
111
108
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { type ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
import { IconWrapperVariant } from './interface';
|
|
2
4
|
export declare const iconWrapperProps: {
|
|
3
5
|
readonly size: {
|
|
4
6
|
readonly type: NumberConstructor;
|
|
5
7
|
readonly default: 24;
|
|
6
8
|
};
|
|
9
|
+
readonly pulseSize: {
|
|
10
|
+
readonly type: NumberConstructor;
|
|
11
|
+
readonly default: 32;
|
|
12
|
+
};
|
|
7
13
|
readonly borderRadius: {
|
|
8
14
|
readonly type: NumberConstructor;
|
|
9
15
|
readonly default: 6;
|
|
10
16
|
};
|
|
17
|
+
readonly variant: {
|
|
18
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
19
|
+
readonly default: "default";
|
|
20
|
+
};
|
|
11
21
|
readonly color: StringConstructor;
|
|
22
|
+
readonly pulseColor: StringConstructor;
|
|
12
23
|
readonly iconColor: StringConstructor;
|
|
13
|
-
readonly theme:
|
|
24
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
14
25
|
color: string;
|
|
15
26
|
iconColor: string;
|
|
16
27
|
}, any>>;
|
|
17
|
-
readonly themeOverrides:
|
|
28
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
18
29
|
color: string;
|
|
19
30
|
iconColor: string;
|
|
20
31
|
}, any>>>;
|
|
21
|
-
readonly builtinThemeOverrides:
|
|
32
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
22
33
|
color: string;
|
|
23
34
|
iconColor: string;
|
|
24
35
|
}, any>>>;
|
|
@@ -29,21 +40,30 @@ export declare const UIconWrapper: import("vue").DefineComponent<{
|
|
|
29
40
|
readonly type: NumberConstructor;
|
|
30
41
|
readonly default: 24;
|
|
31
42
|
};
|
|
43
|
+
readonly pulseSize: {
|
|
44
|
+
readonly type: NumberConstructor;
|
|
45
|
+
readonly default: 32;
|
|
46
|
+
};
|
|
32
47
|
readonly borderRadius: {
|
|
33
48
|
readonly type: NumberConstructor;
|
|
34
49
|
readonly default: 6;
|
|
35
50
|
};
|
|
51
|
+
readonly variant: {
|
|
52
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
53
|
+
readonly default: "default";
|
|
54
|
+
};
|
|
36
55
|
readonly color: StringConstructor;
|
|
56
|
+
readonly pulseColor: StringConstructor;
|
|
37
57
|
readonly iconColor: StringConstructor;
|
|
38
|
-
readonly theme:
|
|
58
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
39
59
|
color: string;
|
|
40
60
|
iconColor: string;
|
|
41
61
|
}, any>>;
|
|
42
|
-
readonly themeOverrides:
|
|
62
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
43
63
|
color: string;
|
|
44
64
|
iconColor: string;
|
|
45
65
|
}, any>>>;
|
|
46
|
-
readonly builtinThemeOverrides:
|
|
66
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
47
67
|
color: string;
|
|
48
68
|
iconColor: string;
|
|
49
69
|
}, any>>>;
|
|
@@ -52,25 +72,36 @@ export declare const UIconWrapper: import("vue").DefineComponent<{
|
|
|
52
72
|
readonly type: NumberConstructor;
|
|
53
73
|
readonly default: 24;
|
|
54
74
|
};
|
|
75
|
+
readonly pulseSize: {
|
|
76
|
+
readonly type: NumberConstructor;
|
|
77
|
+
readonly default: 32;
|
|
78
|
+
};
|
|
55
79
|
readonly borderRadius: {
|
|
56
80
|
readonly type: NumberConstructor;
|
|
57
81
|
readonly default: 6;
|
|
58
82
|
};
|
|
83
|
+
readonly variant: {
|
|
84
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
85
|
+
readonly default: "default";
|
|
86
|
+
};
|
|
59
87
|
readonly color: StringConstructor;
|
|
88
|
+
readonly pulseColor: StringConstructor;
|
|
60
89
|
readonly iconColor: StringConstructor;
|
|
61
|
-
readonly theme:
|
|
90
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
62
91
|
color: string;
|
|
63
92
|
iconColor: string;
|
|
64
93
|
}, any>>;
|
|
65
|
-
readonly themeOverrides:
|
|
94
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
66
95
|
color: string;
|
|
67
96
|
iconColor: string;
|
|
68
97
|
}, any>>>;
|
|
69
|
-
readonly builtinThemeOverrides:
|
|
98
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
70
99
|
color: string;
|
|
71
100
|
iconColor: string;
|
|
72
101
|
}, any>>>;
|
|
73
102
|
}>>, {
|
|
74
103
|
readonly borderRadius: number;
|
|
75
104
|
readonly size: number;
|
|
105
|
+
readonly pulseSize: number;
|
|
106
|
+
readonly variant: IconWrapperVariant;
|
|
76
107
|
}, {}>;
|
|
@@ -6,10 +6,16 @@ import style from './styles/index.cssr';
|
|
|
6
6
|
export const iconWrapperProps = Object.assign(Object.assign({}, useTheme.props), { size: {
|
|
7
7
|
type: Number,
|
|
8
8
|
default: 24
|
|
9
|
+
}, pulseSize: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 32
|
|
9
12
|
}, borderRadius: {
|
|
10
13
|
type: Number,
|
|
11
14
|
default: 6
|
|
12
|
-
},
|
|
15
|
+
}, variant: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'default'
|
|
18
|
+
}, color: String, pulseColor: String, iconColor: String });
|
|
13
19
|
export const UIconWrapper = defineComponent({
|
|
14
20
|
name: 'IconWrapper',
|
|
15
21
|
props: iconWrapperProps,
|
|
@@ -21,7 +27,8 @@ export const UIconWrapper = defineComponent({
|
|
|
21
27
|
return {
|
|
22
28
|
'--u-bezier': cubicBezierEaseInOut,
|
|
23
29
|
'--u-color': color,
|
|
24
|
-
'--u-icon-color': iconColor
|
|
30
|
+
'--u-icon-color': iconColor,
|
|
31
|
+
'--u-pulse-background-color': props.variant === 'pulse' ? `${color}50` : 'transparent'
|
|
25
32
|
};
|
|
26
33
|
});
|
|
27
34
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -29,6 +36,7 @@ export const UIconWrapper = defineComponent({
|
|
|
29
36
|
: undefined;
|
|
30
37
|
return () => {
|
|
31
38
|
const size = formatLength(props.size);
|
|
39
|
+
const pulseSize = formatLength(props.pulseSize);
|
|
32
40
|
themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender();
|
|
33
41
|
return (h("div", { class: [
|
|
34
42
|
`${mergedClsPrefixRef.value}-icon-wrapper`,
|
|
@@ -36,13 +44,23 @@ export const UIconWrapper = defineComponent({
|
|
|
36
44
|
], style: [
|
|
37
45
|
cssVarsRef === null || cssVarsRef === void 0 ? void 0 : cssVarsRef.value,
|
|
38
46
|
{
|
|
39
|
-
|
|
47
|
+
width: props.variant === 'pulse' ? pulseSize : size,
|
|
48
|
+
height: props.variant === 'pulse' ? pulseSize : size
|
|
49
|
+
}
|
|
50
|
+
] },
|
|
51
|
+
props.variant === 'pulse' && (h("div", { class: `${mergedClsPrefixRef.value}-icon-wrapper__pulse`, style: {
|
|
52
|
+
width: pulseSize,
|
|
53
|
+
height: pulseSize,
|
|
54
|
+
backgroundColor: props.pulseColor,
|
|
55
|
+
borderRadius: formatLength(props.borderRadius)
|
|
56
|
+
} })),
|
|
57
|
+
h("div", { class: `${mergedClsPrefixRef.value}-icon-wrapper__icon`, style: {
|
|
40
58
|
width: size,
|
|
59
|
+
height: size,
|
|
41
60
|
borderRadius: formatLength(props.borderRadius),
|
|
42
61
|
backgroundColor: props.color,
|
|
43
62
|
color: props.iconColor
|
|
44
|
-
}
|
|
45
|
-
] }, slots));
|
|
63
|
+
} }, slots)));
|
|
46
64
|
};
|
|
47
65
|
}
|
|
48
66
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IconWrapperVariant = 'default' | 'pulse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import { cB } from '../../../_utils/cssr';
|
|
1
|
+
import { cB, c } from '../../../_utils/cssr';
|
|
2
2
|
// vars:
|
|
3
3
|
// --u-bezier
|
|
4
4
|
// --u-border-radius
|
|
5
5
|
// --u-color
|
|
6
6
|
// --u-icon-color
|
|
7
|
+
// --u-pulse-background-color
|
|
7
8
|
export default cB('icon-wrapper', `
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
`, [c('&__pulse', `
|
|
14
|
+
position: absolute;
|
|
15
|
+
background-color: var(--u-pulse-background-color);
|
|
16
|
+
z-index: 0;
|
|
17
|
+
transition: background-color .3s var(--u-bezier);
|
|
18
|
+
`), c('&__icon', `
|
|
8
19
|
transition:
|
|
9
|
-
color .3s var(--u-bezier)
|
|
20
|
+
color .3s var(--u-bezier);
|
|
10
21
|
background-color .3s var(--u-bezier);
|
|
11
22
|
background-color: var(--u-color);
|
|
12
|
-
|
|
23
|
+
color: var(--u-icon-color);
|
|
24
|
+
display: flex;
|
|
13
25
|
align-items: center;
|
|
14
26
|
justify-content: center;
|
|
15
|
-
|
|
16
|
-
`);
|
|
27
|
+
z-index: 1
|
|
28
|
+
`)]);
|
|
@@ -100,7 +100,7 @@ export default cB('layout-sider', `
|
|
|
100
100
|
align-items: center;
|
|
101
101
|
justify-content: center;
|
|
102
102
|
color: var(--u-toggle-button-icon-color);
|
|
103
|
-
background-color:
|
|
103
|
+
background-color: transparent;
|
|
104
104
|
transform: translateX(50%);
|
|
105
105
|
z-index: 1;
|
|
106
106
|
`, [cB('base-icon', `
|
package/es/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.4.
|
|
1
|
+
declare const _default: "1.4.2";
|
|
2
2
|
export default _default;
|
package/es/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.4.
|
|
1
|
+
export default '1.4.2';
|
|
@@ -5,6 +5,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
5
5
|
name: 'SiderUnionBorder',
|
|
6
6
|
render() {
|
|
7
7
|
return ((0, vue_1.h)("svg", { viewBox: "0 0 35 82", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
8
|
-
(0, vue_1.h)("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "
|
|
8
|
+
(0, vue_1.h)("path", { d: "M15 0L0 0V82H15V72.0682C15 67.6499 18.7463 64.209 22.7412 62.3215C29.9427 58.9189 35 50.9123 35 41.5775C35 32.2426 29.9427 24.236 22.7412 20.8334C18.7463 18.946 15 15.505 15 11.0867V0Z", fill: "#fff" })));
|
|
9
9
|
}
|
|
10
10
|
});
|
package/lib/card-list/index.d.ts
CHANGED
|
@@ -66,8 +66,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
66
66
|
return ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item`, onClick: isDropdown && items.length ? this.toggle : undefined, ref: "selfRef" },
|
|
67
67
|
isDropdown && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__wrapper` },
|
|
68
68
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__wrapper-content` },
|
|
69
|
-
this.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
70
|
-
(0, vue_1.h)("strong", null, this.title))),
|
|
69
|
+
this.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` }, this.title)),
|
|
71
70
|
this.subtitle && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, this.subtitle))),
|
|
72
71
|
(0, vue_1.h)(ChevronDown_1.default, { style: {
|
|
73
72
|
width: '20px',
|
|
@@ -84,8 +83,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
84
83
|
`${mergedClsPrefix}-card-list-item__items--grid`
|
|
85
84
|
] }, items.map((item, idx) => [
|
|
86
85
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__item`, key: idx },
|
|
87
|
-
item.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
88
|
-
(0, vue_1.h)("strong", null, item.title))),
|
|
86
|
+
item.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` }, item.title)),
|
|
89
87
|
item.content && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, item.content))),
|
|
90
88
|
idx < items.length - 1 &&
|
|
91
89
|
(this.renderDivider
|
|
@@ -109,8 +107,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
109
107
|
e.stopPropagation();
|
|
110
108
|
} }, items.map((item, idx) => ((0, vue_1.h)("li", { key: idx },
|
|
111
109
|
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__dropdown-item` },
|
|
112
|
-
item.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` },
|
|
113
|
-
(0, vue_1.h)("strong", null, item.title))),
|
|
110
|
+
item.title && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__title` }, item.title)),
|
|
114
111
|
item.content && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-card-list-item__subtitle` }, item.content)))))))) : null, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 :
|
|
115
112
|
_b.call(_a)));
|
|
116
113
|
}
|
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
import { type ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
import { IconWrapperVariant } from './interface';
|
|
2
4
|
export declare const iconWrapperProps: {
|
|
3
5
|
readonly size: {
|
|
4
6
|
readonly type: NumberConstructor;
|
|
5
7
|
readonly default: 24;
|
|
6
8
|
};
|
|
9
|
+
readonly pulseSize: {
|
|
10
|
+
readonly type: NumberConstructor;
|
|
11
|
+
readonly default: 32;
|
|
12
|
+
};
|
|
7
13
|
readonly borderRadius: {
|
|
8
14
|
readonly type: NumberConstructor;
|
|
9
15
|
readonly default: 6;
|
|
10
16
|
};
|
|
17
|
+
readonly variant: {
|
|
18
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
19
|
+
readonly default: "default";
|
|
20
|
+
};
|
|
11
21
|
readonly color: StringConstructor;
|
|
22
|
+
readonly pulseColor: StringConstructor;
|
|
12
23
|
readonly iconColor: StringConstructor;
|
|
13
|
-
readonly theme:
|
|
24
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
14
25
|
color: string;
|
|
15
26
|
iconColor: string;
|
|
16
27
|
}, any>>;
|
|
17
|
-
readonly themeOverrides:
|
|
28
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
18
29
|
color: string;
|
|
19
30
|
iconColor: string;
|
|
20
31
|
}, any>>>;
|
|
21
|
-
readonly builtinThemeOverrides:
|
|
32
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
22
33
|
color: string;
|
|
23
34
|
iconColor: string;
|
|
24
35
|
}, any>>>;
|
|
@@ -29,21 +40,30 @@ export declare const UIconWrapper: import("vue").DefineComponent<{
|
|
|
29
40
|
readonly type: NumberConstructor;
|
|
30
41
|
readonly default: 24;
|
|
31
42
|
};
|
|
43
|
+
readonly pulseSize: {
|
|
44
|
+
readonly type: NumberConstructor;
|
|
45
|
+
readonly default: 32;
|
|
46
|
+
};
|
|
32
47
|
readonly borderRadius: {
|
|
33
48
|
readonly type: NumberConstructor;
|
|
34
49
|
readonly default: 6;
|
|
35
50
|
};
|
|
51
|
+
readonly variant: {
|
|
52
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
53
|
+
readonly default: "default";
|
|
54
|
+
};
|
|
36
55
|
readonly color: StringConstructor;
|
|
56
|
+
readonly pulseColor: StringConstructor;
|
|
37
57
|
readonly iconColor: StringConstructor;
|
|
38
|
-
readonly theme:
|
|
58
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
39
59
|
color: string;
|
|
40
60
|
iconColor: string;
|
|
41
61
|
}, any>>;
|
|
42
|
-
readonly themeOverrides:
|
|
62
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
43
63
|
color: string;
|
|
44
64
|
iconColor: string;
|
|
45
65
|
}, any>>>;
|
|
46
|
-
readonly builtinThemeOverrides:
|
|
66
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
47
67
|
color: string;
|
|
48
68
|
iconColor: string;
|
|
49
69
|
}, any>>>;
|
|
@@ -52,25 +72,36 @@ export declare const UIconWrapper: import("vue").DefineComponent<{
|
|
|
52
72
|
readonly type: NumberConstructor;
|
|
53
73
|
readonly default: 24;
|
|
54
74
|
};
|
|
75
|
+
readonly pulseSize: {
|
|
76
|
+
readonly type: NumberConstructor;
|
|
77
|
+
readonly default: 32;
|
|
78
|
+
};
|
|
55
79
|
readonly borderRadius: {
|
|
56
80
|
readonly type: NumberConstructor;
|
|
57
81
|
readonly default: 6;
|
|
58
82
|
};
|
|
83
|
+
readonly variant: {
|
|
84
|
+
readonly type: PropType<IconWrapperVariant>;
|
|
85
|
+
readonly default: "default";
|
|
86
|
+
};
|
|
59
87
|
readonly color: StringConstructor;
|
|
88
|
+
readonly pulseColor: StringConstructor;
|
|
60
89
|
readonly iconColor: StringConstructor;
|
|
61
|
-
readonly theme:
|
|
90
|
+
readonly theme: PropType<import("../../_mixins").Theme<"IconWrapper", {
|
|
62
91
|
color: string;
|
|
63
92
|
iconColor: string;
|
|
64
93
|
}, any>>;
|
|
65
|
-
readonly themeOverrides:
|
|
94
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
66
95
|
color: string;
|
|
67
96
|
iconColor: string;
|
|
68
97
|
}, any>>>;
|
|
69
|
-
readonly builtinThemeOverrides:
|
|
98
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"IconWrapper", {
|
|
70
99
|
color: string;
|
|
71
100
|
iconColor: string;
|
|
72
101
|
}, any>>>;
|
|
73
102
|
}>>, {
|
|
74
103
|
readonly borderRadius: number;
|
|
75
104
|
readonly size: number;
|
|
105
|
+
readonly pulseSize: number;
|
|
106
|
+
readonly variant: IconWrapperVariant;
|
|
76
107
|
}, {}>;
|
|
@@ -12,10 +12,16 @@ const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
|
12
12
|
exports.iconWrapperProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { size: {
|
|
13
13
|
type: Number,
|
|
14
14
|
default: 24
|
|
15
|
+
}, pulseSize: {
|
|
16
|
+
type: Number,
|
|
17
|
+
default: 32
|
|
15
18
|
}, borderRadius: {
|
|
16
19
|
type: Number,
|
|
17
20
|
default: 6
|
|
18
|
-
},
|
|
21
|
+
}, variant: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'default'
|
|
24
|
+
}, color: String, pulseColor: String, iconColor: String });
|
|
19
25
|
exports.UIconWrapper = (0, vue_1.defineComponent)({
|
|
20
26
|
name: 'IconWrapper',
|
|
21
27
|
props: exports.iconWrapperProps,
|
|
@@ -27,7 +33,8 @@ exports.UIconWrapper = (0, vue_1.defineComponent)({
|
|
|
27
33
|
return {
|
|
28
34
|
'--u-bezier': cubicBezierEaseInOut,
|
|
29
35
|
'--u-color': color,
|
|
30
|
-
'--u-icon-color': iconColor
|
|
36
|
+
'--u-icon-color': iconColor,
|
|
37
|
+
'--u-pulse-background-color': props.variant === 'pulse' ? `${color}50` : 'transparent'
|
|
31
38
|
};
|
|
32
39
|
});
|
|
33
40
|
const themeClassHandle = inlineThemeDisabled
|
|
@@ -35,6 +42,7 @@ exports.UIconWrapper = (0, vue_1.defineComponent)({
|
|
|
35
42
|
: undefined;
|
|
36
43
|
return () => {
|
|
37
44
|
const size = (0, _utils_1.formatLength)(props.size);
|
|
45
|
+
const pulseSize = (0, _utils_1.formatLength)(props.pulseSize);
|
|
38
46
|
themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender();
|
|
39
47
|
return ((0, vue_1.h)("div", { class: [
|
|
40
48
|
`${mergedClsPrefixRef.value}-icon-wrapper`,
|
|
@@ -42,13 +50,23 @@ exports.UIconWrapper = (0, vue_1.defineComponent)({
|
|
|
42
50
|
], style: [
|
|
43
51
|
cssVarsRef === null || cssVarsRef === void 0 ? void 0 : cssVarsRef.value,
|
|
44
52
|
{
|
|
45
|
-
|
|
53
|
+
width: props.variant === 'pulse' ? pulseSize : size,
|
|
54
|
+
height: props.variant === 'pulse' ? pulseSize : size
|
|
55
|
+
}
|
|
56
|
+
] },
|
|
57
|
+
props.variant === 'pulse' && ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-icon-wrapper__pulse`, style: {
|
|
58
|
+
width: pulseSize,
|
|
59
|
+
height: pulseSize,
|
|
60
|
+
backgroundColor: props.pulseColor,
|
|
61
|
+
borderRadius: (0, _utils_1.formatLength)(props.borderRadius)
|
|
62
|
+
} })),
|
|
63
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-icon-wrapper__icon`, style: {
|
|
46
64
|
width: size,
|
|
65
|
+
height: size,
|
|
47
66
|
borderRadius: (0, _utils_1.formatLength)(props.borderRadius),
|
|
48
67
|
backgroundColor: props.color,
|
|
49
68
|
color: props.iconColor
|
|
50
|
-
}
|
|
51
|
-
] }, slots));
|
|
69
|
+
} }, slots)));
|
|
52
70
|
};
|
|
53
71
|
}
|
|
54
72
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IconWrapperVariant = 'default' | 'pulse';
|
|
@@ -9,13 +9,25 @@ const cssr_1 = require("../../../_utils/cssr");
|
|
|
9
9
|
// --u-border-radius
|
|
10
10
|
// --u-color
|
|
11
11
|
// --u-icon-color
|
|
12
|
+
// --u-pulse-background-color
|
|
12
13
|
exports.default = (0, cssr_1.cB)('icon-wrapper', `
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
`, [(0, cssr_1.c)('&__pulse', `
|
|
19
|
+
position: absolute;
|
|
20
|
+
background-color: var(--u-pulse-background-color);
|
|
21
|
+
z-index: 0;
|
|
22
|
+
transition: background-color .3s var(--u-bezier);
|
|
23
|
+
`), (0, cssr_1.c)('&__icon', `
|
|
13
24
|
transition:
|
|
14
|
-
color .3s var(--u-bezier)
|
|
25
|
+
color .3s var(--u-bezier);
|
|
15
26
|
background-color .3s var(--u-bezier);
|
|
16
27
|
background-color: var(--u-color);
|
|
17
|
-
|
|
28
|
+
color: var(--u-icon-color);
|
|
29
|
+
display: flex;
|
|
18
30
|
align-items: center;
|
|
19
31
|
justify-content: center;
|
|
20
|
-
|
|
21
|
-
`);
|
|
32
|
+
z-index: 1
|
|
33
|
+
`)]);
|
|
@@ -105,7 +105,7 @@ exports.default = (0, cssr_1.cB)('layout-sider', `
|
|
|
105
105
|
align-items: center;
|
|
106
106
|
justify-content: center;
|
|
107
107
|
color: var(--u-toggle-button-icon-color);
|
|
108
|
-
background-color:
|
|
108
|
+
background-color: transparent;
|
|
109
109
|
transform: translateX(50%);
|
|
110
110
|
z-index: 1;
|
|
111
111
|
`, [(0, cssr_1.cB)('base-icon', `
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.4.
|
|
1
|
+
declare const _default: "1.4.2";
|
|
2
2
|
export default _default;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
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": "1.4.
|
|
5
|
+
"version": "1.4.2",
|
|
6
6
|
"js-types-syntax": "typescript",
|
|
7
7
|
"contributions": {
|
|
8
8
|
"html": {
|
|
@@ -6902,6 +6902,13 @@
|
|
|
6902
6902
|
"since": "2.25.0"
|
|
6903
6903
|
}
|
|
6904
6904
|
},
|
|
6905
|
+
{
|
|
6906
|
+
"name": "pulse-size",
|
|
6907
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|
|
6908
|
+
"type": "number",
|
|
6909
|
+
"description": "Size of the pulse background layer",
|
|
6910
|
+
"default": "32"
|
|
6911
|
+
},
|
|
6905
6912
|
{
|
|
6906
6913
|
"name": "border-radius",
|
|
6907
6914
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|
|
@@ -6912,6 +6919,13 @@
|
|
|
6912
6919
|
"since": "2.25.0"
|
|
6913
6920
|
}
|
|
6914
6921
|
},
|
|
6922
|
+
{
|
|
6923
|
+
"name": "variant",
|
|
6924
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|
|
6925
|
+
"type": "\"default\" | \"pulse\"",
|
|
6926
|
+
"description": "Wrapper variant. Use `\"pulse\"` to show an extra background layer.",
|
|
6927
|
+
"default": "\"default\""
|
|
6928
|
+
},
|
|
6915
6929
|
{
|
|
6916
6930
|
"name": "color",
|
|
6917
6931
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|
|
@@ -6922,6 +6936,13 @@
|
|
|
6922
6936
|
"since": "2.25.0"
|
|
6923
6937
|
}
|
|
6924
6938
|
},
|
|
6939
|
+
{
|
|
6940
|
+
"name": "pulse-color",
|
|
6941
|
+
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|
|
6942
|
+
"type": "string",
|
|
6943
|
+
"description": "Color of the pulse background layer",
|
|
6944
|
+
"default": "undefined"
|
|
6945
|
+
},
|
|
6925
6946
|
{
|
|
6926
6947
|
"name": "icon-color",
|
|
6927
6948
|
"doc-url": "https://www.naiveui.com/en-US/os-theme/components/icon",
|