@ckeditor/ckeditor5-ui 35.2.1 → 35.3.1

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 (59) hide show
  1. package/package.json +31 -23
  2. package/src/bindings/addkeyboardhandlingforgrid.js +45 -57
  3. package/src/bindings/clickoutsidehandler.js +15 -21
  4. package/src/bindings/injectcsstransitiondisabler.js +16 -20
  5. package/src/bindings/preventdefault.js +6 -8
  6. package/src/bindings/submithandler.js +5 -7
  7. package/src/button/button.js +5 -0
  8. package/src/button/buttonview.js +220 -259
  9. package/src/button/switchbuttonview.js +56 -71
  10. package/src/colorgrid/colorgridview.js +135 -197
  11. package/src/colorgrid/colortileview.js +37 -47
  12. package/src/colorgrid/utils.js +57 -66
  13. package/src/componentfactory.js +79 -93
  14. package/src/dropdown/button/dropdownbutton.js +5 -0
  15. package/src/dropdown/button/dropdownbuttonview.js +44 -57
  16. package/src/dropdown/button/splitbuttonview.js +159 -207
  17. package/src/dropdown/dropdownpanelfocusable.js +5 -0
  18. package/src/dropdown/dropdownpanelview.js +101 -112
  19. package/src/dropdown/dropdownview.js +396 -438
  20. package/src/dropdown/utils.js +164 -213
  21. package/src/editableui/editableuiview.js +125 -141
  22. package/src/editableui/inline/inlineeditableuiview.js +44 -54
  23. package/src/editorui/bodycollection.js +61 -75
  24. package/src/editorui/boxed/boxededitoruiview.js +91 -104
  25. package/src/editorui/editoruiview.js +30 -39
  26. package/src/focuscycler.js +214 -245
  27. package/src/formheader/formheaderview.js +58 -70
  28. package/src/icon/iconview.js +145 -111
  29. package/src/iframe/iframeview.js +37 -49
  30. package/src/index.js +0 -17
  31. package/src/input/inputview.js +170 -198
  32. package/src/inputnumber/inputnumberview.js +48 -56
  33. package/src/inputtext/inputtextview.js +14 -18
  34. package/src/label/labelview.js +44 -53
  35. package/src/labeledfield/labeledfieldview.js +212 -235
  36. package/src/labeledfield/utils.js +39 -57
  37. package/src/labeledinput/labeledinputview.js +190 -221
  38. package/src/list/listitemview.js +40 -50
  39. package/src/list/listseparatorview.js +15 -19
  40. package/src/list/listview.js +94 -115
  41. package/src/model.js +19 -25
  42. package/src/notification/notification.js +151 -202
  43. package/src/panel/balloon/balloonpanelview.js +535 -628
  44. package/src/panel/balloon/contextualballoon.js +611 -732
  45. package/src/panel/sticky/stickypanelview.js +238 -270
  46. package/src/template.js +1049 -1479
  47. package/src/toolbar/balloon/balloontoolbar.js +337 -424
  48. package/src/toolbar/block/blockbuttonview.js +32 -42
  49. package/src/toolbar/block/blocktoolbar.js +375 -477
  50. package/src/toolbar/normalizetoolbarconfig.js +17 -21
  51. package/src/toolbar/toolbarlinebreakview.js +15 -19
  52. package/src/toolbar/toolbarseparatorview.js +15 -19
  53. package/src/toolbar/toolbarview.js +866 -1053
  54. package/src/tooltipmanager.js +324 -353
  55. package/src/view.js +389 -430
  56. package/src/viewcollection.js +147 -178
  57. package/src/button/button.jsdoc +0 -165
  58. package/src/dropdown/button/dropdownbutton.jsdoc +0 -22
  59. package/src/dropdown/dropdownpanelfocusable.jsdoc +0 -27
@@ -2,14 +2,11 @@
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module ui/editorui/boxed/boxededitoruiview
8
7
  */
9
-
10
- import EditorUIView from '../../editorui/editoruiview';
8
+ import EditorUIView from '../editoruiview';
11
9
  import LabelView from '../../label/labelview';
12
-
13
10
  /**
14
11
  * The boxed editor UI view class. This class represents an editor interface
15
12
  * consisting of a toolbar and an editable area, enclosed within a box.
@@ -17,104 +14,94 @@ import LabelView from '../../label/labelview';
17
14
  * @extends module:ui/editorui/editoruiview~EditorUIView
18
15
  */
19
16
  export default class BoxedEditorUIView extends EditorUIView {
20
- /**
21
- * Creates an instance of the boxed editor UI view class.
22
- *
23
- * @param {module:utils/locale~Locale} locale The locale instance..
24
- */
25
- constructor( locale ) {
26
- super( locale );
27
-
28
- /**
29
- * Collection of the child views located in the top (`.ck-editor__top`)
30
- * area of the UI.
31
- *
32
- * @readonly
33
- * @member {module:ui/viewcollection~ViewCollection}
34
- */
35
- this.top = this.createCollection();
36
-
37
- /**
38
- * Collection of the child views located in the main (`.ck-editor__main`)
39
- * area of the UI.
40
- *
41
- * @readonly
42
- * @member {module:ui/viewcollection~ViewCollection}
43
- */
44
- this.main = this.createCollection();
45
-
46
- /**
47
- * Voice label of the UI.
48
- *
49
- * @protected
50
- * @readonly
51
- * @member {module:ui/view~View} #_voiceLabelView
52
- */
53
- this._voiceLabelView = this._createVoiceLabel();
54
-
55
- this.setTemplate( {
56
- tag: 'div',
57
-
58
- attributes: {
59
- class: [
60
- 'ck',
61
- 'ck-reset',
62
- 'ck-editor',
63
- 'ck-rounded-corners'
64
- ],
65
- role: 'application',
66
- dir: locale.uiLanguageDirection,
67
- lang: locale.uiLanguage,
68
- 'aria-labelledby': this._voiceLabelView.id
69
- },
70
-
71
- children: [
72
- this._voiceLabelView,
73
- {
74
- tag: 'div',
75
- attributes: {
76
- class: [
77
- 'ck',
78
- 'ck-editor__top',
79
- 'ck-reset_all'
80
- ],
81
- role: 'presentation'
82
- },
83
- children: this.top
84
- },
85
- {
86
- tag: 'div',
87
- attributes: {
88
- class: [
89
- 'ck',
90
- 'ck-editor__main'
91
- ],
92
- role: 'presentation'
93
- },
94
- children: this.main
95
- }
96
- ]
97
- } );
98
- }
99
-
100
- /**
101
- * Creates a voice label view instance.
102
- *
103
- * @private
104
- * @returns {module:ui/label/labelview~LabelView}
105
- */
106
- _createVoiceLabel() {
107
- const t = this.t;
108
- const voiceLabel = new LabelView();
109
-
110
- voiceLabel.text = t( 'Rich Text Editor' );
111
-
112
- voiceLabel.extendTemplate( {
113
- attributes: {
114
- class: 'ck-voice-label'
115
- }
116
- } );
117
-
118
- return voiceLabel;
119
- }
17
+ /**
18
+ * Creates an instance of the boxed editor UI view class.
19
+ *
20
+ * @param {module:utils/locale~Locale} locale The locale instance..
21
+ */
22
+ constructor(locale) {
23
+ super(locale);
24
+ /**
25
+ * Collection of the child views located in the top (`.ck-editor__top`)
26
+ * area of the UI.
27
+ *
28
+ * @readonly
29
+ * @member {module:ui/viewcollection~ViewCollection}
30
+ */
31
+ this.top = this.createCollection();
32
+ /**
33
+ * Collection of the child views located in the main (`.ck-editor__main`)
34
+ * area of the UI.
35
+ *
36
+ * @readonly
37
+ * @member {module:ui/viewcollection~ViewCollection}
38
+ */
39
+ this.main = this.createCollection();
40
+ /**
41
+ * Voice label of the UI.
42
+ *
43
+ * @protected
44
+ * @readonly
45
+ * @member {module:ui/view~View} #_voiceLabelView
46
+ */
47
+ this._voiceLabelView = this._createVoiceLabel();
48
+ this.setTemplate({
49
+ tag: 'div',
50
+ attributes: {
51
+ class: [
52
+ 'ck',
53
+ 'ck-reset',
54
+ 'ck-editor',
55
+ 'ck-rounded-corners'
56
+ ],
57
+ role: 'application',
58
+ dir: locale.uiLanguageDirection,
59
+ lang: locale.uiLanguage,
60
+ 'aria-labelledby': this._voiceLabelView.id
61
+ },
62
+ children: [
63
+ this._voiceLabelView,
64
+ {
65
+ tag: 'div',
66
+ attributes: {
67
+ class: [
68
+ 'ck',
69
+ 'ck-editor__top',
70
+ 'ck-reset_all'
71
+ ],
72
+ role: 'presentation'
73
+ },
74
+ children: this.top
75
+ },
76
+ {
77
+ tag: 'div',
78
+ attributes: {
79
+ class: [
80
+ 'ck',
81
+ 'ck-editor__main'
82
+ ],
83
+ role: 'presentation'
84
+ },
85
+ children: this.main
86
+ }
87
+ ]
88
+ });
89
+ }
90
+ /**
91
+ * Creates a voice label view instance.
92
+ *
93
+ * @private
94
+ * @returns {module:ui/label/labelview~LabelView}
95
+ */
96
+ _createVoiceLabel() {
97
+ const t = this.t;
98
+ const voiceLabel = new LabelView();
99
+ voiceLabel.text = t('Rich Text Editor');
100
+ voiceLabel.extendTemplate({
101
+ attributes: {
102
+ class: 'ck-voice-label'
103
+ }
104
+ });
105
+ return voiceLabel;
106
+ }
120
107
  }
@@ -2,55 +2,46 @@
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module ui/editorui/editoruiview
8
7
  */
9
-
10
8
  import View from '../view';
11
9
  import BodyCollection from './bodycollection';
12
-
13
10
  import '../../theme/components/editorui/editorui.css';
14
-
15
11
  /**
16
12
  * The editor UI view class. Base class for the editor main views.
17
13
  *
18
14
  * @extends module:ui/view~View
19
15
  */
20
16
  export default class EditorUIView extends View {
21
- /**
22
- * Creates an instance of the editor UI view class.
23
- *
24
- * @param {module:utils/locale~Locale} [locale] The locale instance.
25
- */
26
- constructor( locale ) {
27
- super( locale );
28
-
29
- /**
30
- * Collection of the child views, detached from the DOM
31
- * structure of the editor, like panels, icons etc.
32
- *
33
- * @readonly
34
- * @member {module:ui/viewcollection~ViewCollection} #body
35
- */
36
- this.body = new BodyCollection( locale );
37
- }
38
-
39
- /**
40
- * @inheritDoc
41
- */
42
- render() {
43
- super.render();
44
-
45
- this.body.attachToDom();
46
- }
47
-
48
- /**
49
- * @inheritDoc
50
- */
51
- destroy() {
52
- this.body.detachFromDom();
53
-
54
- return super.destroy();
55
- }
17
+ /**
18
+ * Creates an instance of the editor UI view class.
19
+ *
20
+ * @param {module:utils/locale~Locale} [locale] The locale instance.
21
+ */
22
+ constructor(locale) {
23
+ super(locale);
24
+ /**
25
+ * Collection of the child views, detached from the DOM
26
+ * structure of the editor, like panels, icons etc.
27
+ *
28
+ * @readonly
29
+ * @member {module:ui/viewcollection~ViewCollection} #body
30
+ */
31
+ this.body = new BodyCollection(locale);
32
+ }
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ render() {
37
+ super.render();
38
+ this.body.attachToDom();
39
+ }
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ destroy() {
44
+ this.body.detachFromDom();
45
+ return super.destroy();
46
+ }
56
47
  }