@progress/kendo-vue-common 3.7.4-dev.202212020747 → 3.7.4-dev.202301091431

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.
Files changed (57) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/js/kendo-vue-common.js +1 -1
  3. package/dist/es/icons/BaseIconProps.d.ts +74 -0
  4. package/dist/es/icons/BaseIconProps.js +1 -0
  5. package/dist/es/icons/FontIcon.d.ts +51 -0
  6. package/dist/es/icons/FontIcon.js +90 -0
  7. package/dist/es/icons/Icon.d.ts +49 -0
  8. package/dist/es/icons/Icon.js +125 -0
  9. package/dist/es/icons/SvgIcon.d.ts +95 -0
  10. package/dist/es/icons/SvgIcon.js +120 -0
  11. package/dist/es/icons/constants.d.ts +11 -0
  12. package/dist/es/icons/constants.js +11 -0
  13. package/dist/es/icons/models/flip.d.ts +11 -0
  14. package/dist/es/icons/models/flip.js +1 -0
  15. package/dist/es/icons/models/size.d.ts +13 -0
  16. package/dist/es/icons/models/size.js +1 -0
  17. package/dist/es/icons/models/theme-color.d.ts +21 -0
  18. package/dist/es/icons/models/theme-color.js +1 -0
  19. package/dist/es/main.d.ts +6 -0
  20. package/dist/es/main.js +6 -0
  21. package/dist/esm/icons/BaseIconProps.d.ts +74 -0
  22. package/dist/esm/icons/BaseIconProps.js +1 -0
  23. package/dist/esm/icons/FontIcon.d.ts +51 -0
  24. package/dist/esm/icons/FontIcon.js +90 -0
  25. package/dist/esm/icons/Icon.d.ts +49 -0
  26. package/dist/esm/icons/Icon.js +125 -0
  27. package/dist/esm/icons/SvgIcon.d.ts +95 -0
  28. package/dist/esm/icons/SvgIcon.js +120 -0
  29. package/dist/esm/icons/constants.d.ts +11 -0
  30. package/dist/esm/icons/constants.js +11 -0
  31. package/dist/esm/icons/models/flip.d.ts +11 -0
  32. package/dist/esm/icons/models/flip.js +1 -0
  33. package/dist/esm/icons/models/size.d.ts +13 -0
  34. package/dist/esm/icons/models/size.js +1 -0
  35. package/dist/esm/icons/models/theme-color.d.ts +21 -0
  36. package/dist/esm/icons/models/theme-color.js +1 -0
  37. package/dist/esm/main.d.ts +6 -0
  38. package/dist/esm/main.js +6 -0
  39. package/dist/npm/icons/BaseIconProps.d.ts +74 -0
  40. package/dist/npm/icons/BaseIconProps.js +2 -0
  41. package/dist/npm/icons/FontIcon.d.ts +51 -0
  42. package/dist/npm/icons/FontIcon.js +97 -0
  43. package/dist/npm/icons/Icon.d.ts +49 -0
  44. package/dist/npm/icons/Icon.js +132 -0
  45. package/dist/npm/icons/SvgIcon.d.ts +95 -0
  46. package/dist/npm/icons/SvgIcon.js +127 -0
  47. package/dist/npm/icons/constants.d.ts +11 -0
  48. package/dist/npm/icons/constants.js +14 -0
  49. package/dist/npm/icons/models/flip.d.ts +11 -0
  50. package/dist/npm/icons/models/flip.js +2 -0
  51. package/dist/npm/icons/models/size.d.ts +13 -0
  52. package/dist/npm/icons/models/size.js +2 -0
  53. package/dist/npm/icons/models/theme-color.d.ts +21 -0
  54. package/dist/npm/icons/models/theme-color.js +2 -0
  55. package/dist/npm/main.d.ts +6 -0
  56. package/dist/npm/main.js +6 -0
  57. package/package.json +5 -3
@@ -0,0 +1,132 @@
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
+ // @ts-ignore
32
+ emits: {
33
+ click: null
34
+ },
35
+ inject: {
36
+ kendoIcons: {
37
+ default: {
38
+ type: 'font',
39
+ icons: {}
40
+ }
41
+ }
42
+ },
43
+ props: {
44
+ name: String,
45
+ icon: Object,
46
+ title: String,
47
+ themeColor: {
48
+ type: String
49
+ },
50
+ size: {
51
+ type: String
52
+ },
53
+ flip: {
54
+ type: String
55
+ },
56
+ id: String,
57
+ ariaLabel: String,
58
+ viewBox: {
59
+ type: String,
60
+ default: '0 0 24 24'
61
+ },
62
+ tabIndex: Number
63
+ },
64
+ // @ts-ignore
65
+ setup: !isV3 ? undefined : function () {
66
+ var v3 = !!isV3;
67
+ return {
68
+ v3: v3
69
+ };
70
+ },
71
+ // @ts-ignore
72
+ render: function render(createElement) {
73
+ var h = gh || createElement;
74
+ var _a = this.$props,
75
+ name = _a.name,
76
+ icon = _a.icon,
77
+ themeColor = _a.themeColor,
78
+ size = _a.size,
79
+ flip = _a.flip,
80
+ id = _a.id,
81
+ viewBox = _a.viewBox,
82
+ tabIndex = _a.tabIndex,
83
+ title = _a.title,
84
+ ariaLabel = _a.ariaLabel;
85
+ var svg = icon || name && this.kendoIcons.icons[name];
86
+ var renderSVG = this.kendoIcons.type === 'svg' && svg !== undefined;
87
+ var resolvedName = name || (icon && icon.name ? icon.name : undefined);
88
+ var commonProps = {
89
+ themeColor: themeColor,
90
+ size: size,
91
+ flip: flip,
92
+ id: id,
93
+ tabIndex: tabIndex,
94
+ title: title,
95
+ ariaLabel: ariaLabel
96
+ };
97
+ var fontIcon = h(FontIcon_1.FontIcon, __assign(__assign({}, commonProps), {
98
+ name: resolvedName,
99
+ attrs: this.v3 ? undefined : __assign(__assign({}, commonProps), {
100
+ name: resolvedName
101
+ }),
102
+ onClick: this.handleClick,
103
+ on: this.v3 ? undefined : {
104
+ 'click': this.handleClick
105
+ }
106
+ }));
107
+ var svgIcon = h(SvgIcon_1.SvgIcon, __assign(__assign({}, commonProps), {
108
+ icon: icon,
109
+ viewBox: viewBox,
110
+ attrs: this.v3 ? undefined : __assign(__assign({}, commonProps), {
111
+ icon: icon,
112
+ viewBox: viewBox
113
+ }),
114
+ onClick: this.handleClick,
115
+ on: this.v3 ? undefined : {
116
+ 'click': this.handleClick
117
+ }
118
+ }));
119
+ return renderSVG ? svgIcon : fontIcon;
120
+ },
121
+ methods: {
122
+ handleClick: function handleClick(e) {
123
+ this.$emit('click', e);
124
+ }
125
+ }
126
+ };
127
+ exports.IconVue2 = IconVue2;
128
+ /**
129
+ * @hidden
130
+ */
131
+ var Icon = IconVue2;
132
+ 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`&mdash;The unique name of the icon.
43
+ * * `content`&mdash;The entire SVG content of the icon.
44
+ * * `viewBox`&mdash;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,127 @@
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.SvgIconVue2 = exports.SvgIcon = 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 constants_1 = require("./constants");
25
+ var defaultSlots_1 = require("../defaultSlots");
26
+ /**
27
+ * @hidden
28
+ */
29
+ var SvgIconVue2 = {
30
+ name: 'KendoSvgIcon',
31
+ // @ts-ignore
32
+ emits: {
33
+ click: null
34
+ },
35
+ props: {
36
+ icon: Object,
37
+ themeColor: {
38
+ type: String
39
+ },
40
+ size: {
41
+ type: String
42
+ },
43
+ flip: {
44
+ type: String
45
+ },
46
+ id: String,
47
+ ariaLabel: String,
48
+ title: String,
49
+ viewBox: {
50
+ type: String,
51
+ default: '0 0 24 24'
52
+ },
53
+ tabIndex: Number
54
+ },
55
+ computed: {
56
+ wrapperClass: function wrapperClass() {
57
+ var _a;
58
+ var _b = this.$props,
59
+ name = _b.name,
60
+ flip = _b.flip,
61
+ size = _b.size,
62
+ themeColor = _b.themeColor;
63
+ return _a = {
64
+ 'k-svg-icon': true
65
+ }, _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;
66
+ }
67
+ },
68
+ // @ts-ignore
69
+ setup: !isV3 ? undefined : function () {
70
+ var v3 = !!isV3;
71
+ return {
72
+ v3: v3
73
+ };
74
+ },
75
+ // @ts-ignore
76
+ render: function render(createElement) {
77
+ var h = gh || createElement;
78
+ var defaultSlot = (0, defaultSlots_1.getDefaultSlots)(this);
79
+ var _a = this.$props,
80
+ svgClassName = _a.svgClassName,
81
+ icon = _a.icon,
82
+ id = _a.id,
83
+ tabIndex = _a.tabIndex,
84
+ svgStyle = _a.svgStyle,
85
+ viewBox = _a.viewBox,
86
+ title = _a.title,
87
+ ariaLabel = _a.ariaLabel;
88
+ var innerHTML = icon ? icon.content : undefined;
89
+ var attrs = {
90
+ id: id,
91
+ title: title,
92
+ 'aria-hidden': true,
93
+ tabIndex: tabIndex,
94
+ ariaLabel: ariaLabel,
95
+ focusable: 'false',
96
+ xmlns: 'http://www.w3.org/2000/svg',
97
+ viewBox: icon ? icon.viewBox : viewBox
98
+ };
99
+ var svg = h('svg', __assign(__assign({}, attrs), {
100
+ attrs: attrs,
101
+ domProps: {
102
+ innerHTML: innerHTML
103
+ },
104
+ innerHTML: innerHTML,
105
+ 'class': svgClassName,
106
+ style: svgStyle
107
+ }), [icon ? undefined : defaultSlot]);
108
+ return h("span", {
109
+ "class": this.wrapperClass,
110
+ onClick: this.handleClick,
111
+ on: this.v3 ? undefined : {
112
+ "click": this.handleClick
113
+ }
114
+ }, [svg]);
115
+ },
116
+ methods: {
117
+ handleClick: function handleClick(e) {
118
+ this.$emit('click', e);
119
+ }
120
+ }
121
+ };
122
+ exports.SvgIconVue2 = SvgIconVue2;
123
+ /**
124
+ * @hidden
125
+ */
126
+ var SvgIcon = SvgIconVue2;
127
+ exports.SvgIcon = SvgIcon;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @hidden
3
+ */
4
+ export declare const SIZE_CLASSES: {
5
+ default: string;
6
+ xsmall: string;
7
+ small: string;
8
+ medium: string;
9
+ large: string;
10
+ xlarge: string;
11
+ };
@@ -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)&mdash;No flipping applied.
6
+ * * `horizontal`&mdash;Flips the icon in horizontal direction.
7
+ * * `vertical`&mdash;Flips the icon in vertical direction.
8
+ * * `both`&mdash;Flips the icon in both horizontal and vertical directions.
9
+ *
10
+ */
11
+ export declare type IconFlip = 'default' | 'horizontal' | 'vertical' | 'both';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Specifies the size of the icon.
3
+ *
4
+ * The possible values are:
5
+ * * `default` (Default)&mdash;Font-size: 16px; Width: 16px; Height: 16px.
6
+ * * `xsmall`&mdash;Font-size: 8px; Width: 8px; Height: 8px.
7
+ * * `small`&mdash;Font-size: 12px; Width: 12px; Height: 12px.
8
+ * * `medium`&mdash;Font-size: 32px; Width: 32px; Height: 32px.
9
+ * * `large`&mdash;Font-size: 48px; Width: 48px; Height: 48px.
10
+ * * `xlarge`&mdash;Font-size: 64px; Width: 64px; Height: 64px.
11
+ *
12
+ */
13
+ export declare type IconSize = 'default' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Specifies the theme color of the Icon.
3
+ *
4
+ * The possible values are:
5
+ * * `inherit` (Default)&mdash;Applies coloring based on the current color.
6
+ * * `primary` &mdash;Applies coloring based on primary theme color.
7
+ * * `secondary`&mdash;Applies coloring based on secondary theme color.
8
+ * * `tertiary`&mdash; Applies coloring based on tertiary theme color.
9
+ * * `info`&mdash;Applies coloring based on info theme color.
10
+ * * `success`&mdash; Applies coloring based on success theme color.
11
+ * * `warning`&mdash; Applies coloring based on warning theme color.
12
+ * * `error`&mdash; Applies coloring based on error theme color.
13
+ * * `dark`&mdash; Applies coloring based on dark theme color.
14
+ * * `light`&mdash; Applies coloring based on light theme color.
15
+ * * `inverse`&mdash; 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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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/npm/main.js CHANGED
@@ -69,3 +69,9 @@ __exportStar(require("./treeDataOperations"), exports);
69
69
  __exportStar(require("./browser-support.service"), exports);
70
70
  __exportStar(require("./scrollbarWidth"), exports);
71
71
  __exportStar(require("./hasRelativeStackingContext"), exports);
72
+ __exportStar(require("./icons/Icon"), exports);
73
+ __exportStar(require("./icons/FontIcon"), exports);
74
+ __exportStar(require("./icons/SvgIcon"), exports);
75
+ __exportStar(require("./icons/models/flip"), exports);
76
+ __exportStar(require("./icons/models/size"), exports);
77
+ __exportStar(require("./icons/models/theme-color"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-common",
3
3
  "description": "Kendo UI for Vue Common Utilities package",
4
- "version": "3.7.4-dev.202212020747",
4
+ "version": "3.7.4-dev.202301091431",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/telerik/kendo-vue.git"
@@ -32,14 +32,16 @@
32
32
  "framework": "Kendo UI for Vue"
33
33
  },
34
34
  "peerDependencies": {
35
- "@progress/kendo-licensing": "^1.1.0",
35
+ "@progress/kendo-licensing": "^1.3.0",
36
+ "@progress/kendo-svg-icons": "^1.0.0",
36
37
  "vue": "^2.6.12 || ^3.0.2"
37
38
  },
38
39
  "dependencies": {
39
40
  "@progress/kendo-draggable": "^3.0.1"
40
41
  },
41
42
  "devDependencies": {
42
- "@progress/kendo-licensing": "^1.1.0"
43
+ "@progress/kendo-licensing": "^1.3.0",
44
+ "@progress/kendo-svg-icons": "^1.0.0"
43
45
  },
44
46
  "author": "Progress",
45
47
  "license": "SEE LICENSE IN LICENSE.md",