@progress/kendo-vue-dialogs 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.
@@ -42,7 +42,8 @@ var WindowVue2 = {
42
42
  'resize': null,
43
43
  'move': null,
44
44
  'close': null,
45
- 'stagechange': null
45
+ 'stagechange': null,
46
+ 'overlayclick': null
46
47
  },
47
48
  provide: function provide() {
48
49
  return {
@@ -110,6 +111,12 @@ var WindowVue2 = {
110
111
  validator: function validator(value) {
111
112
  return ['DEFAULT', 'MINIMIZED', 'FULLSCREEN'].indexOf(value) !== -1;
112
113
  }
114
+ },
115
+ themeColor: {
116
+ type: String,
117
+ validator: function validator(value) {
118
+ return [undefined, 'primary', 'dark', 'light'].includes(value);
119
+ }
113
120
  }
114
121
  },
115
122
  // @ts-ignore
@@ -145,7 +152,9 @@ var WindowVue2 = {
145
152
  currentTop: this.getInitialTop(),
146
153
  currentLeft: this.getInitialLeft(),
147
154
  currentWidth: this.getInitialWidth(),
148
- currentHeight: this.getInitialHeight()
155
+ currentHeight: this.getInitialHeight(),
156
+ _id: (0, kendo_vue_common_1.guid)(),
157
+ titleId: this.generateTitleId()
149
158
  };
150
159
  },
151
160
  mounted: function mounted() {
@@ -174,6 +183,15 @@ var WindowVue2 = {
174
183
  }
175
184
  },
176
185
  computed: {
186
+ windowElementClass: function windowElementClass() {
187
+ var _a;
188
+ var _b = this.$props,
189
+ windowClass = _b.windowClass,
190
+ themeColor = _b.themeColor;
191
+ return _a = {
192
+ 'k-window': true
193
+ }, _a[windowClass] = windowClass, _a["k-window-".concat(themeColor)] = themeColor, _a['k-window-minimized'] = this.currentStage === 'MINIMIZED', _a;
194
+ },
177
195
  computedTop: function computedTop() {
178
196
  if (this.windowStage !== StageEnum_1.windowStage.FULLSCREEN) {
179
197
  return Math.max(this.$props.top || this.currentTop, 0);
@@ -368,6 +386,9 @@ var WindowVue2 = {
368
386
  }
369
387
  return height;
370
388
  },
389
+ generateTitleId: function generateTitleId() {
390
+ return 'window-title-' + this._id;
391
+ },
371
392
  handleMinimize: function handleMinimize(event) {
372
393
  event.preventDefault();
373
394
  this.windowCoordinatesState.leftBeforeAction = this.computedLeft;
@@ -470,15 +491,15 @@ var WindowVue2 = {
470
491
  this.currentWidth = window.innerWidth;
471
492
  this.currentHeight = window.innerHeight;
472
493
  }
494
+ },
495
+ handleClick: function handleClick(e) {
496
+ this.$emit('overlayclick', e);
473
497
  }
474
498
  },
475
499
  // @ts-ignore
476
500
  render: function render(createElement) {
477
501
  var _this = this;
478
502
  var h = gh || createElement;
479
- var classNamesWindow = (0, kendo_vue_common_1.classNames)('k-widget', 'k-window', this.$props.windowClass, {
480
- 'k-window-minimized': this.currentStage === 'MINIMIZED'
481
- });
482
503
  var titleRender = kendo_vue_common_1.templateRendering.call(this, this.$props.titleRender, kendo_vue_common_1.getListeners.call(this));
483
504
  var closeButton = kendo_vue_common_1.templateRendering.call(this, this.$props.closeButton, kendo_vue_common_1.getListeners.call(this));
484
505
  var minimizeButton = kendo_vue_common_1.templateRendering.call(this, this.$props.minimizeButton, kendo_vue_common_1.getListeners.call(this));
@@ -488,11 +509,17 @@ var WindowVue2 = {
488
509
  var windowElement = h("div", {
489
510
  ref: 'wrapper'
490
511
  }, [this.$props.modal && h("div", {
491
- "class": "k-overlay"
512
+ "class": "k-overlay",
513
+ onClick: this.handleClick,
514
+ on: this.v3 ? undefined : {
515
+ "click": this.handleClick
516
+ }
492
517
  }), h("div", {
493
518
  tabindex: 0,
494
519
  attrs: this.v3 ? undefined : {
495
- tabindex: 0
520
+ tabindex: 0,
521
+ role: 'dialog',
522
+ "aria-labelledby": this.titleId
496
523
  },
497
524
  onFocus: function onFocus(e) {
498
525
  return e.target.classList.add('k-focus');
@@ -511,7 +538,9 @@ var WindowVue2 = {
511
538
  },
512
539
  onKeydown: this.handleKeyDown,
513
540
  ref: 'windowElement',
514
- "class": classNamesWindow,
541
+ "class": this.windowElementClass,
542
+ role: 'dialog',
543
+ "aria-labelledby": this.titleId,
515
544
  style: __assign({
516
545
  top: this.computedTop + 'px',
517
546
  left: this.computedLeft + 'px',
@@ -538,6 +567,7 @@ var WindowVue2 = {
538
567
  attrs: _this.v3 ? undefined : {
539
568
  stage: _this.windowStage,
540
569
  title: _this.$props.title,
570
+ titleId: _this.titleId,
541
571
  titleRender: titleRender,
542
572
  closeButton: closeButton,
543
573
  minimizeButton: minimizeButton,
@@ -545,6 +575,7 @@ var WindowVue2 = {
545
575
  restoreButton: restoreButton
546
576
  },
547
577
  title: _this.$props.title,
578
+ titleId: _this.titleId,
548
579
  titleRender: titleRender,
549
580
  onDoubleclick: _this.handleDoubleClick,
550
581
  on: _this.v3 ? undefined : {
@@ -568,6 +599,7 @@ var WindowVue2 = {
568
599
  attrs: _this.v3 ? undefined : {
569
600
  stage: _this.windowStage,
570
601
  title: _this.$props.title,
602
+ titleId: _this.titleId,
571
603
  titleRender: titleRender,
572
604
  closeButton: closeButton,
573
605
  minimizeButton: minimizeButton,
@@ -575,6 +607,7 @@ var WindowVue2 = {
575
607
  restoreButton: restoreButton
576
608
  },
577
609
  title: _this.$props.title,
610
+ titleId: _this.titleId,
578
611
  titleRender: titleRender,
579
612
  onDoubleclick: _this.handleDoubleClick,
580
613
  on: _this.v3 ? undefined : {
@@ -593,7 +626,7 @@ var WindowVue2 = {
593
626
  maximizeButton: maximizeButton,
594
627
  restoreButton: restoreButton
595
628
  })]), this.windowStage !== StageEnum_1.windowStage.MINIMIZED ? h("div", {
596
- "class": "k-content k-window-content"
629
+ "class": "k-window-content"
597
630
  }, [defaultSlot]) : null, this.windowStage === StageEnum_1.windowStage.DEFAULT && this.$props.resizable
598
631
  // @ts-ignore function children
599
632
  ? h(WindowResizeHandlers_1.ResizeHandlers, {
@@ -77,6 +77,10 @@ export interface WindowProps {
77
77
  * Specifies if the Window will be resizable ([see example]({% slug dimensionsresizing_window %}#toc-resizing)).
78
78
  */
79
79
  resizable?: boolean;
80
+ /**
81
+ * Specifies the theme color of the Dialog.
82
+ */
83
+ themeColor?: 'promary' | 'dark' | 'light' | string;
80
84
  /**
81
85
  * Acccepts a named slot `string`, functional or class component for the restore button. If set to `false` the button is not rendered.
82
86
  * @default true
@@ -127,4 +131,8 @@ export interface WindowProps {
127
131
  * Fires when the Window resizes.
128
132
  */
129
133
  onResize?: (event: WindowMoveEvent) => void;
134
+ /**
135
+ * Fires when modal overlay of the Window is clicked.
136
+ */
137
+ onOverlayclick?: (event: any) => void;
130
138
  }
@@ -36,6 +36,10 @@ export interface WindowTitleBarProps {
36
36
  * @hidden
37
37
  */
38
38
  title?: string;
39
+ /**
40
+ * @hidden
41
+ */
42
+ titleId?: string;
39
43
  /**
40
44
  * @hidden
41
45
  */
@@ -14,6 +14,7 @@ var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
14
14
  var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
15
15
  var StageEnum_1 = require("./StageEnum");
16
16
  var main_1 = require("./messages/main");
17
+ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
17
18
  /**
18
19
  * @hidden
19
20
  */
@@ -27,6 +28,7 @@ var WindowTitleBarVue2 = {
27
28
  maximizeButton: [String, Function, Object, Boolean],
28
29
  restoreButton: [String, Function, Object, Boolean],
29
30
  title: String,
31
+ titleId: String,
30
32
  titleRender: [String, Function, Object, Boolean]
31
33
  },
32
34
  inject: {
@@ -82,11 +84,13 @@ var WindowTitleBarVue2 = {
82
84
  attrs: this.v3 ? undefined : {
83
85
  type: "button",
84
86
  icon: 'window-minimize',
87
+ svgIcon: kendo_svg_icons_1.windowMinimizeIcon,
85
88
  fillMode: 'flat',
86
89
  "aria-label": ls.toLanguageString(main_1.dialogsWindowMinimizeButton, main_1.messages[main_1.dialogsWindowMinimizeButton])
87
90
  },
88
- "class": "k-window-action",
91
+ "class": "k-window-titlebar-action",
89
92
  icon: 'window-minimize',
93
+ svgIcon: kendo_svg_icons_1.windowMinimizeIcon,
90
94
  fillMode: 'flat',
91
95
  onClick: this.onMinimizeClick,
92
96
  on: this.v3 ? undefined : {
@@ -105,12 +109,14 @@ var WindowTitleBarVue2 = {
105
109
  type: "button",
106
110
  attrs: this.v3 ? undefined : {
107
111
  type: "button",
108
- icon: 'window-maximize',
112
+ icon: 'window',
113
+ svgIcon: kendo_svg_icons_1.windowIcon,
109
114
  fillMode: 'flat',
110
115
  "aria-label": ls.toLanguageString(main_1.dialogsWindowMaximizeButton, main_1.messages[main_1.dialogsWindowMaximizeButton])
111
116
  },
112
- "class": "k-window-action",
113
- icon: 'window-maximize',
117
+ "class": "k-window-titlebar-action",
118
+ icon: 'window',
119
+ svgIcon: kendo_svg_icons_1.windowIcon,
114
120
  fillMode: 'flat',
115
121
  onClick: this.onFullScreenClick,
116
122
  on: this.v3 ? undefined : {
@@ -130,11 +136,13 @@ var WindowTitleBarVue2 = {
130
136
  attrs: this.v3 ? undefined : {
131
137
  type: "button",
132
138
  icon: 'window-restore',
139
+ svgIcon: kendo_svg_icons_1.windowRestoreIcon,
133
140
  fillMode: 'flat',
134
141
  "aria-label": ls.toLanguageString(main_1.dialogsWindowRestoreButton, main_1.messages[main_1.dialogsWindowRestoreButton])
135
142
  },
136
- "class": "k-window-action",
143
+ "class": "k-window-titlebar-action",
137
144
  icon: 'window-restore',
145
+ svgIcon: kendo_svg_icons_1.windowRestoreIcon,
138
146
  fillMode: 'flat',
139
147
  onClick: this.onRestoreClick,
140
148
  on: this.v3 ? undefined : {
@@ -154,11 +162,13 @@ var WindowTitleBarVue2 = {
154
162
  attrs: this.v3 ? undefined : {
155
163
  type: "button",
156
164
  icon: 'x',
165
+ svgIcon: kendo_svg_icons_1.xIcon,
157
166
  fillMode: 'flat',
158
167
  "aria-label": ls.toLanguageString(main_1.dialogsWindowCloseButton, main_1.messages[main_1.dialogsWindowCloseButton])
159
168
  },
160
- "class": "k-window-action",
169
+ "class": "k-window-titlebar-action",
161
170
  icon: 'x',
171
+ svgIcon: kendo_svg_icons_1.xIcon,
162
172
  fillMode: 'flat',
163
173
  onClick: this.onCloseClick,
164
174
  on: this.v3 ? undefined : {
@@ -172,7 +182,7 @@ var WindowTitleBarVue2 = {
172
182
  defaultRendering: closeButtonDefault
173
183
  });
174
184
  return h("div", {
175
- "class": "k-window-titlebar k-dialog-titlebar",
185
+ "class": "k-window-titlebar",
176
186
  style: {
177
187
  touchAction: 'none'
178
188
  },
@@ -181,9 +191,13 @@ var WindowTitleBarVue2 = {
181
191
  "dblclick": this.onDoubleClick
182
192
  }
183
193
  }, [h("div", {
184
- "class": "k-window-title"
194
+ "class": "k-window-title",
195
+ id: this.$props.titleId,
196
+ attrs: this.v3 ? undefined : {
197
+ id: this.$props.titleId
198
+ }
185
199
  }, [titleElement]), h("div", {
186
- "class": "k-window-actions"
200
+ "class": "k-window-titlebar-actions"
187
201
  }, [stage === StageEnum_1.windowStage.DEFAULT && minimizeButtonRender, stage === StageEnum_1.windowStage.DEFAULT && maximizeButtonRender, stage !== StageEnum_1.windowStage.DEFAULT && restoreButtonRender, closeButtonRender])]);
188
202
  }
189
203
  };
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-vue-dialogs',
9
9
  productName: 'Kendo UI for Vue',
10
10
  productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
11
- publishDate: 1669966363,
11
+ publishDate: 1673273393,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
14
14
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-dialogs",
3
3
  "description": "Kendo UI for Vue Dialogs 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"
@@ -38,17 +38,19 @@
38
38
  "framework": "Kendo UI for Vue"
39
39
  },
40
40
  "peerDependencies": {
41
- "@progress/kendo-licensing": "^1.1.0",
41
+ "@progress/kendo-licensing": "^1.3.0",
42
+ "@progress/kendo-svg-icons": "^1.0.0",
42
43
  "@progress/kendo-vue-intl": "^3.6.0",
43
44
  "vue": "^2.6.12 || ^3.0.2"
44
45
  },
45
46
  "dependencies": {
46
- "@progress/kendo-vue-buttons": "3.7.4-dev.202212020747",
47
- "@progress/kendo-vue-common": "3.7.4-dev.202212020747"
47
+ "@progress/kendo-vue-buttons": "3.7.4-dev.202301091431",
48
+ "@progress/kendo-vue-common": "3.7.4-dev.202301091431"
48
49
  },
49
50
  "devDependencies": {
50
- "@progress/kendo-licensing": "^1.1.0",
51
- "@progress/kendo-vue-intl": "3.7.4-dev.202212020747"
51
+ "@progress/kendo-licensing": "^1.3.0",
52
+ "@progress/kendo-svg-icons": "^1.0.0",
53
+ "@progress/kendo-vue-intl": "3.7.4-dev.202301091431"
52
54
  },
53
55
  "author": "Progress",
54
56
  "license": "SEE LICENSE IN LICENSE.md",