@progress/kendo-vue-common 3.7.4-dev.202212020747 → 3.7.4-dev.202212300853
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 +1 -1
- package/dist/cdn/js/kendo-vue-common.js +1 -1
- package/dist/es/icons/BaseIconProps.d.ts +66 -0
- package/dist/es/icons/BaseIconProps.js +1 -0
- package/dist/es/icons/FontIcon.d.ts +51 -0
- package/dist/es/icons/FontIcon.js +65 -0
- package/dist/es/icons/Icon.d.ts +49 -0
- package/dist/es/icons/Icon.js +97 -0
- package/dist/es/icons/SvgIcon.d.ts +95 -0
- package/dist/es/icons/SvgIcon.js +88 -0
- package/dist/es/icons/constants.d.ts +11 -0
- package/dist/es/icons/constants.js +11 -0
- package/dist/es/icons/models/flip.d.ts +11 -0
- package/dist/es/icons/models/flip.js +1 -0
- package/dist/es/icons/models/size.d.ts +13 -0
- package/dist/es/icons/models/size.js +1 -0
- package/dist/es/icons/models/theme-color.d.ts +21 -0
- package/dist/es/icons/models/theme-color.js +1 -0
- package/dist/es/main.d.ts +6 -0
- package/dist/es/main.js +6 -0
- package/dist/esm/icons/BaseIconProps.d.ts +66 -0
- package/dist/esm/icons/BaseIconProps.js +1 -0
- package/dist/esm/icons/FontIcon.d.ts +51 -0
- package/dist/esm/icons/FontIcon.js +65 -0
- package/dist/esm/icons/Icon.d.ts +49 -0
- package/dist/esm/icons/Icon.js +97 -0
- package/dist/esm/icons/SvgIcon.d.ts +95 -0
- package/dist/esm/icons/SvgIcon.js +88 -0
- package/dist/esm/icons/constants.d.ts +11 -0
- package/dist/esm/icons/constants.js +11 -0
- package/dist/esm/icons/models/flip.d.ts +11 -0
- package/dist/esm/icons/models/flip.js +1 -0
- package/dist/esm/icons/models/size.d.ts +13 -0
- package/dist/esm/icons/models/size.js +1 -0
- package/dist/esm/icons/models/theme-color.d.ts +21 -0
- package/dist/esm/icons/models/theme-color.js +1 -0
- package/dist/esm/main.d.ts +6 -0
- package/dist/esm/main.js +6 -0
- package/dist/npm/icons/BaseIconProps.d.ts +66 -0
- package/dist/npm/icons/BaseIconProps.js +2 -0
- package/dist/npm/icons/FontIcon.d.ts +51 -0
- package/dist/npm/icons/FontIcon.js +72 -0
- package/dist/npm/icons/Icon.d.ts +49 -0
- package/dist/npm/icons/Icon.js +104 -0
- package/dist/npm/icons/SvgIcon.d.ts +95 -0
- package/dist/npm/icons/SvgIcon.js +95 -0
- package/dist/npm/icons/constants.d.ts +11 -0
- package/dist/npm/icons/constants.js +14 -0
- package/dist/npm/icons/models/flip.d.ts +11 -0
- package/dist/npm/icons/models/flip.js +2 -0
- package/dist/npm/icons/models/size.d.ts +13 -0
- package/dist/npm/icons/models/size.js +2 -0
- package/dist/npm/icons/models/theme-color.d.ts +21 -0
- package/dist/npm/icons/models/theme-color.js +2 -0
- package/dist/npm/main.d.ts +6 -0
- package/dist/npm/main.js +6 -0
- package/package.json +3 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the theme color of the Icon.
|
|
3
|
+
*
|
|
4
|
+
* The possible values are:
|
|
5
|
+
* * `inherit` (Default)—Applies coloring based on the current color.
|
|
6
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
7
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
8
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
9
|
+
* * `info`—Applies coloring based on info theme color.
|
|
10
|
+
* * `success`— Applies coloring based on success theme color.
|
|
11
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
12
|
+
* * `error`— Applies coloring based on error theme color.
|
|
13
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
14
|
+
* * `light`— Applies coloring based on light theme color.
|
|
15
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
16
|
+
*
|
|
17
|
+
* If the property is not set, the icon inherits the color from its parent.
|
|
18
|
+
*
|
|
19
|
+
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
20
|
+
*/
|
|
21
|
+
export declare type IconThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/main.d.ts
CHANGED
|
@@ -23,3 +23,9 @@ export * from './treeDataOperations';
|
|
|
23
23
|
export * from './browser-support.service';
|
|
24
24
|
export * from './scrollbarWidth';
|
|
25
25
|
export * from './hasRelativeStackingContext';
|
|
26
|
+
export * from './icons/Icon';
|
|
27
|
+
export * from './icons/FontIcon';
|
|
28
|
+
export * from './icons/SvgIcon';
|
|
29
|
+
export * from './icons/models/flip';
|
|
30
|
+
export * from './icons/models/size';
|
|
31
|
+
export * from './icons/models/theme-color';
|
package/dist/esm/main.js
CHANGED
|
@@ -22,3 +22,9 @@ export * from './treeDataOperations.js';
|
|
|
22
22
|
export * from './browser-support.service.js';
|
|
23
23
|
export * from './scrollbarWidth.js';
|
|
24
24
|
export * from './hasRelativeStackingContext.js';
|
|
25
|
+
export * from './icons/Icon.js';
|
|
26
|
+
export * from './icons/FontIcon.js';
|
|
27
|
+
export * from './icons/SvgIcon.js';
|
|
28
|
+
export * from './icons/models/flip.js';
|
|
29
|
+
export * from './icons/models/size.js';
|
|
30
|
+
export * from './icons/models/theme-color.js';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IconThemeColor } from './models/theme-color';
|
|
2
|
+
import { IconSize } from './models/size';
|
|
3
|
+
import { IconFlip } from './models/flip';
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseIconProps {
|
|
8
|
+
/**
|
|
9
|
+
* Sets the `tabIndex` of the icon element.
|
|
10
|
+
*/
|
|
11
|
+
tabIndex?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the `id` of the icon element.
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies a list of CSS classes that will be added to the root DOM element.
|
|
18
|
+
*/
|
|
19
|
+
class?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies the theme color of the Icon.
|
|
22
|
+
*
|
|
23
|
+
* The possible values are:
|
|
24
|
+
* * `inherit` (Default)—Applies coloring based on the current color.
|
|
25
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
26
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
27
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
28
|
+
* * `info`—Applies coloring based on info theme color.
|
|
29
|
+
* * `success`— Applies coloring based on success theme color.
|
|
30
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
31
|
+
* * `error`— Applies coloring based on error theme color.
|
|
32
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
33
|
+
* * `light`— Applies coloring based on light theme color.
|
|
34
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
35
|
+
*
|
|
36
|
+
* If the property is not set, the icon inherits the color from its parent.
|
|
37
|
+
*
|
|
38
|
+
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
39
|
+
*/
|
|
40
|
+
themeColor?: IconThemeColor | string;
|
|
41
|
+
/**
|
|
42
|
+
* Specifies the size of the icon.
|
|
43
|
+
*
|
|
44
|
+
* The possible values are:
|
|
45
|
+
* * `default` (Default)—Font-size: 16px; Width: 16px; Height: 16px.
|
|
46
|
+
* * `xsmall`—Font-size: 8px; Width: 8px; Height: 8px.
|
|
47
|
+
* * `small`—Font-size: 12px; Width: 12px; Height: 12px.
|
|
48
|
+
* * `medium`—Font-size: 32px; Width: 32px; Height: 32px.
|
|
49
|
+
* * `large`—Font-size: 48px; Width: 48px; Height: 48px.
|
|
50
|
+
* * `xlarge`—Font-size: 64px; Width: 64px; Height: 64px.
|
|
51
|
+
*
|
|
52
|
+
* You can use the `style` prop to apply custom font size to the icon.
|
|
53
|
+
*/
|
|
54
|
+
size?: IconSize | string;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies the icon flip direction.
|
|
57
|
+
*
|
|
58
|
+
* The possible values are:
|
|
59
|
+
* * `default` (Default)—No flipping applied.
|
|
60
|
+
* * `horizontal`—Flips the icon in horizontal direction.
|
|
61
|
+
* * `vertical`—Flips the icon in vertical direction.
|
|
62
|
+
* * `both`—Flips the icon in both horizontal and vertical directions.
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
flip?: IconFlip | string;
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
import { BaseIconProps } from './BaseIconProps';
|
|
7
|
+
/**
|
|
8
|
+
* Represents the props of the [Kendo UI for Vue Icon component]({% slug overview_icon %}).
|
|
9
|
+
*/
|
|
10
|
+
export interface FontIconProps extends BaseIconProps {
|
|
11
|
+
/**
|
|
12
|
+
* Represents the name of the icon.
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export interface FontIconState {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export interface FontIconComputed {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
export interface FontIconMethods {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export interface FontIconData {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
export interface FontIconAll extends Vue2type, FontIconMethods, FontIconData, FontIconComputed, FontIconState {
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
declare let FontIconVue2: ComponentOptions<FontIconAll, DefaultData<FontIconData>, DefaultMethods<FontIconAll>, FontIconComputed, RecordPropsDefinition<FontIconProps>>;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
declare const FontIcon: DefineComponent<FontIconProps, any, FontIconData, FontIconComputed, FontIconMethods, {}, {}, {}, string, FontIconProps, FontIconProps, {}>;
|
|
51
|
+
export { FontIcon, FontIconVue2 };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FontIconVue2 = exports.FontIcon = void 0;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
var allVue = Vue;
|
|
10
|
+
var gh = allVue.h;
|
|
11
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
+
var constants_1 = require("./constants");
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
var FontIconVue2 = {
|
|
17
|
+
name: 'KendoFontIcon',
|
|
18
|
+
props: {
|
|
19
|
+
name: String,
|
|
20
|
+
themeColor: {
|
|
21
|
+
type: String
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
type: String
|
|
25
|
+
},
|
|
26
|
+
flip: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
id: String,
|
|
30
|
+
tabIndex: Number
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
fontClassNames: function fontClassNames() {
|
|
34
|
+
var _a;
|
|
35
|
+
var _b = this.$props,
|
|
36
|
+
name = _b.name,
|
|
37
|
+
flip = _b.flip,
|
|
38
|
+
size = _b.size,
|
|
39
|
+
themeColor = _b.themeColor;
|
|
40
|
+
return _a = {
|
|
41
|
+
'k-icon': true
|
|
42
|
+
}, _a['k-i-' + name] = name, _a['k-color-' + themeColor] = themeColor, _a['k-flip-h'] = flip === 'horizontal' || flip === 'both', _a['k-flip-v'] = flip === 'vertical' || flip === 'both', _a[constants_1.SIZE_CLASSES[size]] = size, _a;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
setup: !isV3 ? undefined : function () {
|
|
47
|
+
var v3 = !!isV3;
|
|
48
|
+
return {
|
|
49
|
+
v3: v3
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
render: function render(createElement) {
|
|
54
|
+
var h = gh || createElement;
|
|
55
|
+
var id = this.$props.id;
|
|
56
|
+
return h("span", {
|
|
57
|
+
"class": this.fontClassNames,
|
|
58
|
+
id: id,
|
|
59
|
+
attrs: this.v3 ? undefined : {
|
|
60
|
+
id: id,
|
|
61
|
+
role: "presentation"
|
|
62
|
+
},
|
|
63
|
+
role: "presentation"
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.FontIconVue2 = FontIconVue2;
|
|
68
|
+
/**
|
|
69
|
+
* @hidden
|
|
70
|
+
*/
|
|
71
|
+
var FontIcon = FontIconVue2;
|
|
72
|
+
exports.FontIcon = FontIcon;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
import { SvgIconProps } from './SvgIcon';
|
|
3
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
|
+
declare type DefaultMethods<V> = {
|
|
5
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export interface IconProps extends SvgIconProps {
|
|
11
|
+
iconType?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export interface IconState {
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
export interface IconComputed {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export interface IconMethods {
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
export interface IconData {
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
export interface IconAll extends Vue2type, IconMethods, IconData, IconComputed, IconState {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
declare let IconVue2: ComponentOptions<IconAll, DefaultData<IconData>, DefaultMethods<IconAll>, IconComputed, RecordPropsDefinition<IconProps>>;
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
declare const Icon: DefineComponent<IconProps, any, IconData, IconComputed, IconMethods, {}, {}, {}, string, IconProps, IconProps, {}>;
|
|
49
|
+
export { Icon, IconVue2 };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
return __assign.apply(this, arguments);
|
|
14
|
+
};
|
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
exports.IconVue2 = exports.Icon = void 0;
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
var Vue = require("vue");
|
|
21
|
+
var allVue = Vue;
|
|
22
|
+
var gh = allVue.h;
|
|
23
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
24
|
+
var FontIcon_1 = require("./FontIcon");
|
|
25
|
+
var SvgIcon_1 = require("./SvgIcon");
|
|
26
|
+
/**
|
|
27
|
+
* @hidden
|
|
28
|
+
*/
|
|
29
|
+
var IconVue2 = {
|
|
30
|
+
name: 'KendoIcon',
|
|
31
|
+
props: {
|
|
32
|
+
iconType: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'font'
|
|
35
|
+
},
|
|
36
|
+
name: String,
|
|
37
|
+
icon: Object,
|
|
38
|
+
themeColor: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
type: String
|
|
43
|
+
},
|
|
44
|
+
flip: {
|
|
45
|
+
type: String
|
|
46
|
+
},
|
|
47
|
+
id: String,
|
|
48
|
+
viewBox: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: '0 0 24 24'
|
|
51
|
+
},
|
|
52
|
+
tabIndex: Number
|
|
53
|
+
},
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
setup: !isV3 ? undefined : function () {
|
|
56
|
+
var v3 = !!isV3;
|
|
57
|
+
return {
|
|
58
|
+
v3: v3
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
render: function render(createElement) {
|
|
63
|
+
var h = gh || createElement;
|
|
64
|
+
var _a = this.$props,
|
|
65
|
+
iconType = _a.iconType,
|
|
66
|
+
name = _a.name,
|
|
67
|
+
icon = _a.icon,
|
|
68
|
+
themeColor = _a.themeColor,
|
|
69
|
+
size = _a.size,
|
|
70
|
+
flip = _a.flip,
|
|
71
|
+
id = _a.id,
|
|
72
|
+
viewBox = _a.viewBox,
|
|
73
|
+
tabIndex = _a.tabIndex;
|
|
74
|
+
var resolvedName = name || (icon && icon.name ? icon.name.split('-icon')[0] : undefined);
|
|
75
|
+
var commonProps = {
|
|
76
|
+
themeColor: themeColor,
|
|
77
|
+
size: size,
|
|
78
|
+
flip: flip,
|
|
79
|
+
id: id,
|
|
80
|
+
tabIndex: tabIndex
|
|
81
|
+
};
|
|
82
|
+
var fontIcon = h(FontIcon_1.FontIcon, __assign(__assign({}, commonProps), {
|
|
83
|
+
name: resolvedName,
|
|
84
|
+
attrs: this.v3 ? undefined : __assign(__assign({}, commonProps), {
|
|
85
|
+
name: resolvedName
|
|
86
|
+
})
|
|
87
|
+
}));
|
|
88
|
+
var svgIcon = h(SvgIcon_1.SvgIcon, __assign(__assign({}, commonProps), {
|
|
89
|
+
icon: icon,
|
|
90
|
+
viewBox: viewBox,
|
|
91
|
+
attrs: this.v3 ? undefined : __assign(__assign({}, commonProps), {
|
|
92
|
+
icon: icon,
|
|
93
|
+
viewBox: viewBox
|
|
94
|
+
})
|
|
95
|
+
}));
|
|
96
|
+
return iconType === 'font' ? fontIcon : svgIcon;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.IconVue2 = IconVue2;
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
var Icon = IconVue2;
|
|
104
|
+
exports.Icon = Icon;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
import { BaseIconProps } from './BaseIconProps';
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the SVG icon.
|
|
9
|
+
*/
|
|
10
|
+
export interface SVGIcon {
|
|
11
|
+
/**
|
|
12
|
+
* The unique name of the icon.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The entire SVG content of the icon.
|
|
17
|
+
*/
|
|
18
|
+
content: string;
|
|
19
|
+
/**
|
|
20
|
+
* The [viewBox](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox)
|
|
21
|
+
* definition that should be used for the icon.
|
|
22
|
+
*/
|
|
23
|
+
viewBox: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export interface SvgIconHandle {
|
|
29
|
+
/**
|
|
30
|
+
* The SvgIconHandle element.
|
|
31
|
+
*/
|
|
32
|
+
element: HTMLSpanElement | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents the props of the [Kendo UI for Vue SvgIcon component]({% slug overview_svgicon %}).
|
|
36
|
+
*/
|
|
37
|
+
export interface SvgIconProps extends BaseIconProps {
|
|
38
|
+
/**
|
|
39
|
+
* Specifies the SVG icon.
|
|
40
|
+
*
|
|
41
|
+
* * The possible keys are:
|
|
42
|
+
* * `name`—The unique name of the icon.
|
|
43
|
+
* * `content`—The entire SVG content of the icon.
|
|
44
|
+
* * `viewBox`—The viewBox definition that should be used for the icon.
|
|
45
|
+
*/
|
|
46
|
+
icon?: SVGIcon;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies the viewBox of the custom SVG icon.
|
|
49
|
+
*/
|
|
50
|
+
viewBox?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Specifies a list of CSS classes that will be added to the svg element.
|
|
53
|
+
*/
|
|
54
|
+
svgClassName?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Sets additional CSS styles to the svg element.
|
|
57
|
+
*/
|
|
58
|
+
svgStyle?: object;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
export interface SvgIconState {
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @hidden
|
|
67
|
+
*/
|
|
68
|
+
export interface SvgIconComputed {
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @hidden
|
|
73
|
+
*/
|
|
74
|
+
export interface SvgIconMethods {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
export interface SvgIconData {
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
export interface SvgIconAll extends Vue2type, SvgIconMethods, SvgIconData, SvgIconComputed, SvgIconState {
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @hidden
|
|
89
|
+
*/
|
|
90
|
+
declare let SvgIconVue2: ComponentOptions<SvgIconAll, DefaultData<SvgIconData>, DefaultMethods<SvgIconAll>, SvgIconComputed, RecordPropsDefinition<SvgIconProps>>;
|
|
91
|
+
/**
|
|
92
|
+
* @hidden
|
|
93
|
+
*/
|
|
94
|
+
declare const SvgIcon: DefineComponent<SvgIconProps, any, SvgIconData, SvgIconComputed, SvgIconMethods, {}, {}, {}, string, SvgIconProps, SvgIconProps, {}>;
|
|
95
|
+
export { SvgIcon, SvgIconVue2 };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SvgIconVue2 = exports.SvgIcon = void 0;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
var allVue = Vue;
|
|
10
|
+
var gh = allVue.h;
|
|
11
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
+
var constants_1 = require("./constants");
|
|
13
|
+
var defaultSlots_1 = require("../defaultSlots");
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
var SvgIconVue2 = {
|
|
18
|
+
name: 'KendoSvgIcon',
|
|
19
|
+
props: {
|
|
20
|
+
icon: Object,
|
|
21
|
+
themeColor: {
|
|
22
|
+
type: String
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
type: String
|
|
26
|
+
},
|
|
27
|
+
flip: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
id: String,
|
|
31
|
+
viewBox: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '0 0 24 24'
|
|
34
|
+
},
|
|
35
|
+
tabIndex: Number
|
|
36
|
+
},
|
|
37
|
+
computed: {
|
|
38
|
+
wrapperClass: function wrapperClass() {
|
|
39
|
+
var _a;
|
|
40
|
+
var _b = this.$props,
|
|
41
|
+
name = _b.name,
|
|
42
|
+
flip = _b.flip,
|
|
43
|
+
size = _b.size,
|
|
44
|
+
themeColor = _b.themeColor;
|
|
45
|
+
return _a = {
|
|
46
|
+
'k-svg-icon': true
|
|
47
|
+
}, _a['k-color-' + themeColor] = true, _a['k-svg-i-' + name] = name, _a['k-flip-h'] = flip === 'horizontal' || flip === 'both', _a['k-flip-v'] = flip === 'vertical' || flip === 'both', _a[constants_1.SIZE_CLASSES[size]] = true, _a;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
setup: !isV3 ? undefined : function () {
|
|
52
|
+
var v3 = !!isV3;
|
|
53
|
+
return {
|
|
54
|
+
v3: v3
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
render: function render(createElement) {
|
|
59
|
+
var h = gh || createElement;
|
|
60
|
+
var defaultSlot = (0, defaultSlots_1.getDefaultSlots)(this);
|
|
61
|
+
var _a = this.$props,
|
|
62
|
+
svgClassName = _a.svgClassName,
|
|
63
|
+
icon = _a.icon,
|
|
64
|
+
id = _a.id,
|
|
65
|
+
tabIndex = _a.tabIndex,
|
|
66
|
+
svgStyle = _a.svgStyle,
|
|
67
|
+
viewBox = _a.viewBox;
|
|
68
|
+
var innerHTML = icon ? icon.content : undefined;
|
|
69
|
+
var svg = h('svg', {
|
|
70
|
+
attrs: {
|
|
71
|
+
id: id,
|
|
72
|
+
'aria-hidden': true,
|
|
73
|
+
tabIndex: tabIndex,
|
|
74
|
+
focusable: 'false',
|
|
75
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
76
|
+
viewBox: icon ? icon.viewBox : viewBox
|
|
77
|
+
},
|
|
78
|
+
domProps: {
|
|
79
|
+
innerHTML: innerHTML
|
|
80
|
+
},
|
|
81
|
+
innerHTML: innerHTML,
|
|
82
|
+
'class': svgClassName,
|
|
83
|
+
style: svgStyle
|
|
84
|
+
}, [icon ? undefined : defaultSlot]);
|
|
85
|
+
return h("span", {
|
|
86
|
+
"class": this.wrapperClass
|
|
87
|
+
}, [svg]);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
exports.SvgIconVue2 = SvgIconVue2;
|
|
91
|
+
/**
|
|
92
|
+
* @hidden
|
|
93
|
+
*/
|
|
94
|
+
var SvgIcon = SvgIconVue2;
|
|
95
|
+
exports.SvgIcon = SvgIcon;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SIZE_CLASSES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
exports.SIZE_CLASSES = {
|
|
8
|
+
'default': '',
|
|
9
|
+
'xsmall': 'k-icon-xs',
|
|
10
|
+
'small': 'k-icon-sm',
|
|
11
|
+
'medium': 'k-icon-md',
|
|
12
|
+
'large': 'k-icon-lg',
|
|
13
|
+
'xlarge': 'k-icon-xl'
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the icon flip direction.
|
|
3
|
+
*
|
|
4
|
+
* The possible values are:
|
|
5
|
+
* * `default` (Default)—No flipping applied.
|
|
6
|
+
* * `horizontal`—Flips the icon in horizontal direction.
|
|
7
|
+
* * `vertical`—Flips the icon in vertical direction.
|
|
8
|
+
* * `both`—Flips the icon in both horizontal and vertical directions.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare type IconFlip = 'default' | 'horizontal' | 'vertical' | 'both';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the size of the icon.
|
|
3
|
+
*
|
|
4
|
+
* The possible values are:
|
|
5
|
+
* * `default` (Default)—Font-size: 16px; Width: 16px; Height: 16px.
|
|
6
|
+
* * `xsmall`—Font-size: 8px; Width: 8px; Height: 8px.
|
|
7
|
+
* * `small`—Font-size: 12px; Width: 12px; Height: 12px.
|
|
8
|
+
* * `medium`—Font-size: 32px; Width: 32px; Height: 32px.
|
|
9
|
+
* * `large`—Font-size: 48px; Width: 48px; Height: 48px.
|
|
10
|
+
* * `xlarge`—Font-size: 64px; Width: 64px; Height: 64px.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare type IconSize = 'default' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specifies the theme color of the Icon.
|
|
3
|
+
*
|
|
4
|
+
* The possible values are:
|
|
5
|
+
* * `inherit` (Default)—Applies coloring based on the current color.
|
|
6
|
+
* * `primary` —Applies coloring based on primary theme color.
|
|
7
|
+
* * `secondary`—Applies coloring based on secondary theme color.
|
|
8
|
+
* * `tertiary`— Applies coloring based on tertiary theme color.
|
|
9
|
+
* * `info`—Applies coloring based on info theme color.
|
|
10
|
+
* * `success`— Applies coloring based on success theme color.
|
|
11
|
+
* * `warning`— Applies coloring based on warning theme color.
|
|
12
|
+
* * `error`— Applies coloring based on error theme color.
|
|
13
|
+
* * `dark`— Applies coloring based on dark theme color.
|
|
14
|
+
* * `light`— Applies coloring based on light theme color.
|
|
15
|
+
* * `inverse`— Applies coloring based on inverse theme color.
|
|
16
|
+
*
|
|
17
|
+
* If the property is not set, the icon inherits the color from its parent.
|
|
18
|
+
*
|
|
19
|
+
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
20
|
+
*/
|
|
21
|
+
export declare type IconThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'dark' | 'light' | 'inverse';
|
package/dist/npm/main.d.ts
CHANGED
|
@@ -23,3 +23,9 @@ export * from './treeDataOperations';
|
|
|
23
23
|
export * from './browser-support.service';
|
|
24
24
|
export * from './scrollbarWidth';
|
|
25
25
|
export * from './hasRelativeStackingContext';
|
|
26
|
+
export * from './icons/Icon';
|
|
27
|
+
export * from './icons/FontIcon';
|
|
28
|
+
export * from './icons/SvgIcon';
|
|
29
|
+
export * from './icons/models/flip';
|
|
30
|
+
export * from './icons/models/size';
|
|
31
|
+
export * from './icons/models/theme-color';
|