@ckeditor/ckeditor5-ui 35.0.1 → 35.1.0

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 (86) hide show
  1. package/lang/contexts.json +3 -1
  2. package/lang/translations/ar.po +8 -0
  3. package/lang/translations/ast.po +8 -0
  4. package/lang/translations/az.po +8 -0
  5. package/lang/translations/bg.po +8 -0
  6. package/lang/translations/bn.po +8 -0
  7. package/lang/translations/ca.po +8 -0
  8. package/lang/translations/cs.po +8 -0
  9. package/lang/translations/da.po +8 -0
  10. package/lang/translations/de-ch.po +8 -0
  11. package/lang/translations/de.po +8 -0
  12. package/lang/translations/el.po +8 -0
  13. package/lang/translations/en-au.po +9 -1
  14. package/lang/translations/en-gb.po +8 -0
  15. package/lang/translations/en.po +8 -0
  16. package/lang/translations/eo.po +8 -0
  17. package/lang/translations/es.po +8 -0
  18. package/lang/translations/et.po +8 -0
  19. package/lang/translations/eu.po +8 -0
  20. package/lang/translations/fa.po +8 -0
  21. package/lang/translations/fi.po +8 -0
  22. package/lang/translations/fr.po +8 -0
  23. package/lang/translations/gl.po +9 -1
  24. package/lang/translations/he.po +8 -0
  25. package/lang/translations/hi.po +8 -0
  26. package/lang/translations/hr.po +8 -0
  27. package/lang/translations/hu.po +8 -0
  28. package/lang/translations/id.po +8 -0
  29. package/lang/translations/it.po +8 -0
  30. package/lang/translations/ja.po +8 -0
  31. package/lang/translations/km.po +8 -0
  32. package/lang/translations/kn.po +8 -0
  33. package/lang/translations/ko.po +8 -0
  34. package/lang/translations/ku.po +8 -0
  35. package/lang/translations/lt.po +8 -0
  36. package/lang/translations/lv.po +8 -0
  37. package/lang/translations/ms.po +8 -0
  38. package/lang/translations/nb.po +8 -0
  39. package/lang/translations/ne.po +8 -0
  40. package/lang/translations/nl.po +8 -0
  41. package/lang/translations/no.po +8 -0
  42. package/lang/translations/pl.po +8 -0
  43. package/lang/translations/pt-br.po +8 -0
  44. package/lang/translations/pt.po +8 -0
  45. package/lang/translations/ro.po +8 -0
  46. package/lang/translations/ru.po +8 -0
  47. package/lang/translations/sk.po +8 -0
  48. package/lang/translations/sl.po +8 -0
  49. package/lang/translations/sq.po +8 -0
  50. package/lang/translations/sr-latn.po +8 -0
  51. package/lang/translations/sr.po +8 -0
  52. package/lang/translations/sv.po +8 -0
  53. package/lang/translations/th.po +8 -0
  54. package/lang/translations/tk.po +8 -0
  55. package/lang/translations/tr.po +8 -0
  56. package/lang/translations/tt.po +113 -0
  57. package/lang/translations/ug.po +8 -0
  58. package/lang/translations/uk.po +8 -0
  59. package/lang/translations/ur.po +8 -0
  60. package/lang/translations/uz.po +8 -0
  61. package/lang/translations/vi.po +8 -0
  62. package/lang/translations/zh-cn.po +8 -0
  63. package/lang/translations/zh.po +8 -0
  64. package/package.json +21 -19
  65. package/src/bindings/addkeyboardhandlingforgrid.js +76 -0
  66. package/src/button/button.jsdoc +2 -2
  67. package/src/button/buttonview.js +5 -29
  68. package/src/colorgrid/colorgridview.js +19 -25
  69. package/src/dropdown/button/dropdownbuttonview.js +2 -1
  70. package/src/dropdown/button/splitbuttonview.js +4 -1
  71. package/src/dropdown/dropdownview.js +2 -1
  72. package/src/icon/iconview.js +3 -1
  73. package/src/index.js +2 -2
  74. package/src/list/listitemview.js +14 -1
  75. package/src/panel/balloon/balloonpanelview.js +128 -74
  76. package/src/toolbar/balloon/balloontoolbar.js +17 -5
  77. package/src/toolbar/block/blocktoolbar.js +17 -0
  78. package/src/tooltipmanager.js +430 -0
  79. package/theme/components/button/button.css +0 -11
  80. package/theme/components/dropdown/dropdown.css +0 -12
  81. package/theme/components/dropdown/splitbutton.css +0 -7
  82. package/theme/components/responsive-form/responsiveform.css +28 -16
  83. package/theme/components/tooltip/tooltip.css +3 -26
  84. package/src/toolbar/enabletoolbarkeyboardfocus.js +0 -64
  85. package/src/tooltip/tooltipview.js +0 -107
  86. package/theme/components/tooltip/mixins/_tooltip.css +0 -54
@@ -103,3 +103,11 @@ msgstr ""
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr ""
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Plava"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Ljubičasta"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Плава"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Љубичаста"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Blå"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Lila"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "สีน้ำเงิน"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "สีม่วง"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Gök"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Gyrmyzy"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Mavi"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Mor"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -0,0 +1,113 @@
1
+ # Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
2
+ #
3
+ # !!! IMPORTANT !!!
4
+ #
5
+ # Before you edit this file, please keep in mind that contributing to the project
6
+ # translations is possible ONLY via the Transifex online service.
7
+ #
8
+ # To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
9
+ #
10
+ # To learn more, check out the official contributor's guide:
11
+ # https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
12
+ #
13
+ msgid ""
14
+ msgstr ""
15
+ "Language-Team: Tatar (https://www.transifex.com/ckeditor/teams/11143/tt/)\n"
16
+ "Language: tt\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+
19
+ msgctxt "Title of the CKEditor5 editor."
20
+ msgid "Rich Text Editor"
21
+ msgstr ""
22
+
23
+ msgctxt "Accessible label of the specific editing area belonging to a container with an ARIA application role."
24
+ msgid "Editor editing area: %0"
25
+ msgstr ""
26
+
27
+ msgctxt "Label of the block toolbar icon (a block toolbar is displayed next to each paragraph, heading, list item, etc. and contains e.g. block formatting options)"
28
+ msgid "Edit block"
29
+ msgstr ""
30
+
31
+ msgctxt "Label for a button showing the next thing (tab, page, etc.)."
32
+ msgid "Next"
33
+ msgstr ""
34
+
35
+ msgctxt "Label for a button showing the previous thing (tab, page, etc.)."
36
+ msgid "Previous"
37
+ msgstr ""
38
+
39
+ msgctxt "Label used by assistive technologies describing a generic editor toolbar."
40
+ msgid "Editor toolbar"
41
+ msgstr ""
42
+
43
+ msgctxt "Label used by assistive technologies describing a toolbar displayed inside a dropdown."
44
+ msgid "Dropdown toolbar"
45
+ msgstr ""
46
+
47
+ msgctxt "Label of a button that applies a black color in color pickers."
48
+ msgid "Black"
49
+ msgstr "Кара"
50
+
51
+ msgctxt "Label of a button that applies a dim grey color in color pickers."
52
+ msgid "Dim grey"
53
+ msgstr ""
54
+
55
+ msgctxt "Label of a button that applies a grey color in color pickers."
56
+ msgid "Grey"
57
+ msgstr "Соры"
58
+
59
+ msgctxt "Label of a button that applies a light grey color in color pickers."
60
+ msgid "Light grey"
61
+ msgstr "Ачык соры"
62
+
63
+ msgctxt "Label of a button that applies a white color in color pickers."
64
+ msgid "White"
65
+ msgstr "Ак"
66
+
67
+ msgctxt "Label of a button that applies a red color in color pickers."
68
+ msgid "Red"
69
+ msgstr "Кызыл"
70
+
71
+ msgctxt "Label of a button that applies a orange color in color pickers."
72
+ msgid "Orange"
73
+ msgstr "Кызгылт"
74
+
75
+ msgctxt "Label of a button that applies a yellow color in color pickers."
76
+ msgid "Yellow"
77
+ msgstr "Сары"
78
+
79
+ msgctxt "Label of a button that applies a light green color in color pickers."
80
+ msgid "Light green"
81
+ msgstr "Ачык яшел"
82
+
83
+ msgctxt "Label of a button that applies a green color in color pickers."
84
+ msgid "Green"
85
+ msgstr "Яшел"
86
+
87
+ msgctxt "Label of a button that applies a aquamarine color in color pickers."
88
+ msgid "Aquamarine"
89
+ msgstr "Аквамарин"
90
+
91
+ msgctxt "Label of a button that applies a turquoise color in color pickers."
92
+ msgid "Turquoise"
93
+ msgstr "Фервоз"
94
+
95
+ msgctxt "Label of a button that applies a light blue color in color pickers."
96
+ msgid "Light blue"
97
+ msgstr "Ачык зәңгәр"
98
+
99
+ msgctxt "Label of a button that applies a blue color in color pickers."
100
+ msgid "Blue"
101
+ msgstr "Зәңгәр"
102
+
103
+ msgctxt "Label of a button that applies a purple color in color pickers."
104
+ msgid "Purple"
105
+ msgstr "Шәмәхә"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr ""
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr ""
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Синій"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Фіолетовий"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "نیلا"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "ارغوانی"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Ko'k"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Siyohrang"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "Xanh biển"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "Tím"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "蓝色"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "紫色"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
@@ -103,3 +103,11 @@ msgstr "藍色"
103
103
  msgctxt "Label of a button that applies a purple color in color pickers."
104
104
  msgid "Purple"
105
105
  msgstr "紫色"
106
+
107
+ msgctxt "Accessible label of a toolbar that shows up next to the blocks of content (e.g. headings, paragraphs)."
108
+ msgid "Editor block content toolbar"
109
+ msgstr ""
110
+
111
+ msgctxt "Accessible label of a balloon toolbar that shows up right next to the user selection (the caret)."
112
+ msgid "Editor contextual toolbar"
113
+ msgstr ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ui",
3
- "version": "35.0.1",
3
+ "version": "35.1.0",
4
4
  "description": "The UI framework and standard UI library of CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -11,27 +11,29 @@
11
11
  ],
12
12
  "main": "src/index.js",
13
13
  "dependencies": {
14
- "@ckeditor/ckeditor5-utils": "^35.0.1",
15
- "@ckeditor/ckeditor5-core": "^35.0.1",
14
+ "@ckeditor/ckeditor5-utils": "^35.1.0",
15
+ "@ckeditor/ckeditor5-core": "^35.1.0",
16
16
  "lodash-es": "^4.17.15"
17
17
  },
18
18
  "devDependencies": {
19
- "@ckeditor/ckeditor5-basic-styles": "^35.0.1",
20
- "@ckeditor/ckeditor5-block-quote": "^35.0.1",
21
- "@ckeditor/ckeditor5-editor-balloon": "^35.0.1",
22
- "@ckeditor/ckeditor5-editor-classic": "^35.0.1",
23
- "@ckeditor/ckeditor5-engine": "^35.0.1",
24
- "@ckeditor/ckeditor5-enter": "^35.0.1",
25
- "@ckeditor/ckeditor5-essentials": "^35.0.1",
26
- "@ckeditor/ckeditor5-heading": "^35.0.1",
27
- "@ckeditor/ckeditor5-image": "^35.0.1",
28
- "@ckeditor/ckeditor5-link": "^35.0.1",
29
- "@ckeditor/ckeditor5-list": "^35.0.1",
30
- "@ckeditor/ckeditor5-mention": "^35.0.1",
31
- "@ckeditor/ckeditor5-paragraph": "^35.0.1",
32
- "@ckeditor/ckeditor5-horizontal-line": "^35.0.1",
33
- "@ckeditor/ckeditor5-table": "^35.0.1",
34
- "@ckeditor/ckeditor5-typing": "^35.0.1"
19
+ "@ckeditor/ckeditor5-basic-styles": "^35.1.0",
20
+ "@ckeditor/ckeditor5-block-quote": "^35.1.0",
21
+ "@ckeditor/ckeditor5-editor-balloon": "^35.1.0",
22
+ "@ckeditor/ckeditor5-editor-classic": "^35.1.0",
23
+ "@ckeditor/ckeditor5-engine": "^35.1.0",
24
+ "@ckeditor/ckeditor5-enter": "^35.1.0",
25
+ "@ckeditor/ckeditor5-essentials": "^35.1.0",
26
+ "@ckeditor/ckeditor5-font": "^35.1.0",
27
+ "@ckeditor/ckeditor5-find-and-replace": "^35.1.0",
28
+ "@ckeditor/ckeditor5-heading": "^35.1.0",
29
+ "@ckeditor/ckeditor5-image": "^35.1.0",
30
+ "@ckeditor/ckeditor5-link": "^35.1.0",
31
+ "@ckeditor/ckeditor5-list": "^35.1.0",
32
+ "@ckeditor/ckeditor5-mention": "^35.1.0",
33
+ "@ckeditor/ckeditor5-paragraph": "^35.1.0",
34
+ "@ckeditor/ckeditor5-horizontal-line": "^35.1.0",
35
+ "@ckeditor/ckeditor5-table": "^35.1.0",
36
+ "@ckeditor/ckeditor5-typing": "^35.1.0"
35
37
  },
36
38
  "engines": {
37
39
  "node": ">=14.0.0",
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+
6
+ /**
7
+ * @module ui/bindings/addkeyboardhandlingforgrid
8
+ */
9
+
10
+ /**
11
+ * A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.
12
+ *
13
+ * @param {Object} options Configuration options.
14
+ * @param {module:utils/keystrokehandler~KeystrokeHandler} options.keystrokeHandler Keystroke handler to register navigation with arrow
15
+ * keys.
16
+ * @param {module:utils/focustracker~FocusTracker} options.focusTracker A focus tracker for grid elements.
17
+ * @param {module:ui/viewcollection~ViewCollection} options.gridItems A collection of grid items.
18
+ * @param {Number|Function} options.numberOfColumns Number of columns in the grid. Can be specified as a function that returns
19
+ * the number (e.g. for responsive grids).
20
+ */
21
+ export default function addKeyboardHandlingForGrid( { keystrokeHandler, focusTracker, gridItems, numberOfColumns } ) {
22
+ const getNumberOfColumns = typeof numberOfColumns === 'number' ? () => numberOfColumns : numberOfColumns;
23
+
24
+ keystrokeHandler.set( 'arrowright', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {
25
+ if ( focusedElementIndex === gridItems.length - 1 ) {
26
+ return 0;
27
+ } else {
28
+ return focusedElementIndex + 1;
29
+ }
30
+ } ) );
31
+
32
+ keystrokeHandler.set( 'arrowleft', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {
33
+ if ( focusedElementIndex === 0 ) {
34
+ return gridItems.length - 1;
35
+ } else {
36
+ return focusedElementIndex - 1;
37
+ }
38
+ } ) );
39
+
40
+ keystrokeHandler.set( 'arrowup', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {
41
+ let nextIndex = focusedElementIndex - getNumberOfColumns();
42
+
43
+ if ( nextIndex < 0 ) {
44
+ nextIndex = focusedElementIndex + getNumberOfColumns() * Math.floor( gridItems.length / getNumberOfColumns() );
45
+
46
+ if ( nextIndex > gridItems.length - 1 ) {
47
+ nextIndex -= getNumberOfColumns();
48
+ }
49
+ }
50
+
51
+ return nextIndex;
52
+ } ) );
53
+
54
+ keystrokeHandler.set( 'arrowdown', getGridItemFocuser( ( focusedElementIndex, gridItems ) => {
55
+ let nextIndex = focusedElementIndex + getNumberOfColumns();
56
+
57
+ if ( nextIndex > gridItems.length - 1 ) {
58
+ nextIndex = focusedElementIndex % getNumberOfColumns();
59
+ }
60
+
61
+ return nextIndex;
62
+ } ) );
63
+
64
+ function getGridItemFocuser( getIndexToFocus ) {
65
+ return evt => {
66
+ const focusedElement = gridItems.find( item => item.element === focusTracker.focusedElement );
67
+ const focusedElementIndex = gridItems.getIndex( focusedElement );
68
+ const nextIndexToFocus = getIndexToFocus( focusedElementIndex, gridItems );
69
+
70
+ gridItems.get( nextIndexToFocus ).focus();
71
+
72
+ evt.stopPropagation();
73
+ evt.preventDefault();
74
+ };
75
+ }
76
+ }
@@ -51,8 +51,8 @@
51
51
  */
52
52
 
53
53
  /**
54
- * (Optional) The position of the tooltip. See {@link module:ui/tooltip/tooltipview~TooltipView#position}
55
- * to learn more about the available position values.
54
+ * (Optional) The position of the tooltip. See {@link module:ui/tooltipmanager~TooltipManager}
55
+ * to learn more about the tooltip system.
56
56
  *
57
57
  * **Note:** It makes sense only when the {@link #tooltip `tooltip` attribute} is defined.
58
58
  *
@@ -9,7 +9,6 @@
9
9
 
10
10
  import View from '../view';
11
11
  import IconView from '../icon/iconview';
12
- import TooltipView from '../tooltip/tooltipview';
13
12
 
14
13
  import uid from '@ckeditor/ckeditor5-utils/src/uid';
15
14
  import { getEnvKeystrokeText } from '@ckeditor/ckeditor5-utils/src/keyboard';
@@ -71,14 +70,6 @@ export default class ButtonView extends View {
71
70
  */
72
71
  this.children = this.createCollection();
73
72
 
74
- /**
75
- * Tooltip of the button view. It is configurable using the {@link #tooltip tooltip attribute}.
76
- *
77
- * @readonly
78
- * @member {module:ui/tooltip/tooltipview~TooltipView} #tooltipView
79
- */
80
- this.tooltipView = this._createTooltipView();
81
-
82
73
  /**
83
74
  * Label of the button view. It is configurable using the {@link #label label attribute}.
84
75
  *
@@ -119,7 +110,7 @@ export default class ButtonView extends View {
119
110
  * @see #_getTooltipString
120
111
  * @private
121
112
  * @observable
122
- * @member {Boolean} #_tooltipString
113
+ * @member {String|undefined} #_tooltipString
123
114
  */
124
115
  this.bind( '_tooltipString' ).to(
125
116
  this, 'tooltip',
@@ -146,7 +137,9 @@ export default class ButtonView extends View {
146
137
  tabindex: bind.to( 'tabindex' ),
147
138
  'aria-labelledby': `ck-editor__aria-label_${ ariaLabelUid }`,
148
139
  'aria-disabled': bind.if( 'isEnabled', true, value => !value ),
149
- 'aria-pressed': bind.to( 'isOn', value => this.isToggleable ? String( !!value ) : false )
140
+ 'aria-pressed': bind.to( 'isOn', value => this.isToggleable ? String( !!value ) : false ),
141
+ 'data-cke-tooltip-text': bind.to( '_tooltipString' ),
142
+ 'data-cke-tooltip-position': bind.to( 'tooltipPosition' )
150
143
  },
151
144
 
152
145
  children: this.children,
@@ -189,7 +182,6 @@ export default class ButtonView extends View {
189
182
  this.children.add( this.iconView );
190
183
  }
191
184
 
192
- this.children.add( this.tooltipView );
193
185
  this.children.add( this.labelView );
194
186
 
195
187
  if ( this.withKeystroke && this.keystroke ) {
@@ -204,22 +196,6 @@ export default class ButtonView extends View {
204
196
  this.element.focus();
205
197
  }
206
198
 
207
- /**
208
- * Creates a {@link module:ui/tooltip/tooltipview~TooltipView} instance and binds it with button
209
- * attributes.
210
- *
211
- * @private
212
- * @returns {module:ui/tooltip/tooltipview~TooltipView}
213
- */
214
- _createTooltipView() {
215
- const tooltipView = new TooltipView();
216
-
217
- tooltipView.bind( 'text' ).to( this, '_tooltipString' );
218
- tooltipView.bind( 'position' ).to( this, 'tooltipPosition' );
219
-
220
- return tooltipView;
221
- }
222
-
223
199
  /**
224
200
  * Creates a label view instance and binds it with button attributes.
225
201
  *
@@ -284,7 +260,7 @@ export default class ButtonView extends View {
284
260
  }
285
261
 
286
262
  /**
287
- * Gets the text for the {@link #tooltipView} from the combination of
263
+ * Gets the text for the tooltip from the combination of
288
264
  * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.
289
265
  *
290
266
  * @private
@@ -10,8 +10,9 @@
10
10
  import View from '../view';
11
11
  import ColorTileView from './colortileview';
12
12
  import FocusTracker from '@ckeditor/ckeditor5-utils/src/focustracker';
13
- import FocusCycler from '../focuscycler';
14
13
  import KeystrokeHandler from '@ckeditor/ckeditor5-utils/src/keystrokehandler';
14
+ import addKeyboardHandlingForGrid from '../bindings/addkeyboardhandlingforgrid';
15
+
15
16
  import '../../theme/components/colorgrid/colorgrid.css';
16
17
 
17
18
  /**
@@ -27,7 +28,7 @@ export default class ColorGridView extends View {
27
28
  * @param {Object} options Component configuration
28
29
  * @param {Array.<module:ui/colorgrid/colorgrid~ColorDefinition>} [options.colorDefinitions] Array with definitions
29
30
  * required to create the {@link module:ui/colorgrid/colortile~ColorTileView tiles}.
30
- * @param {Number} options.columns A number of columns to display the tiles.
31
+ * @param {Number} [options.columns=5] A number of columns to display the tiles.
31
32
  */
32
33
  constructor( locale, options ) {
33
34
  super( locale );
@@ -35,9 +36,15 @@ export default class ColorGridView extends View {
35
36
  const colorDefinitions = options && options.colorDefinitions || [];
36
37
  const viewStyleAttribute = {};
37
38
 
38
- if ( options && options.columns ) {
39
- viewStyleAttribute.gridTemplateColumns = `repeat( ${ options.columns }, 1fr)`;
40
- }
39
+ /**
40
+ * A number of columns for the tiles grid.
41
+ *
42
+ * @readonly
43
+ * @member {Number}
44
+ */
45
+ this.columns = options && options.columns ? options.columns : 5;
46
+
47
+ viewStyleAttribute.gridTemplateColumns = `repeat( ${ this.columns }, 1fr)`;
41
48
 
42
49
  /**
43
50
  * The color of the currently selected color tile in {@link #items}.
@@ -71,26 +78,6 @@ export default class ColorGridView extends View {
71
78
  */
72
79
  this.keystrokes = new KeystrokeHandler();
73
80
 
74
- /**
75
- * Helps cycling over focusable {@link #items} in the grid.
76
- *
77
- * @readonly
78
- * @protected
79
- * @member {module:ui/focuscycler~FocusCycler}
80
- */
81
- this._focusCycler = new FocusCycler( {
82
- focusables: this.items,
83
- focusTracker: this.focusTracker,
84
- keystrokeHandler: this.keystrokes,
85
- actions: {
86
- // Navigate grid items backwards using the arrowup key.
87
- focusPrevious: 'arrowleft',
88
-
89
- // Navigate grid items forwards using the arrowdown key.
90
- focusNext: 'arrowright'
91
- }
92
- } );
93
-
94
81
  this.items.on( 'add', ( evt, colorTile ) => {
95
82
  colorTile.isOn = colorTile.color === this.selectedColor;
96
83
  } );
@@ -174,6 +161,13 @@ export default class ColorGridView extends View {
174
161
 
175
162
  // Start listening for the keystrokes coming from #element.
176
163
  this.keystrokes.listenTo( this.element );
164
+
165
+ addKeyboardHandlingForGrid( {
166
+ keystrokeHandler: this.keystrokes,
167
+ focusTracker: this.focusTracker,
168
+ gridItems: this.items,
169
+ numberOfColumns: this.columns
170
+ } );
177
171
  }
178
172
 
179
173
  /**
@@ -49,7 +49,8 @@ export default class DropdownButtonView extends ButtonView {
49
49
 
50
50
  this.extendTemplate( {
51
51
  attributes: {
52
- 'aria-haspopup': true
52
+ 'aria-haspopup': true,
53
+ 'aria-expanded': this.bindTemplate.to( 'isOn', value => String( value ) )
53
54
  }
54
55
  } );
55
56
 
@@ -222,7 +222,10 @@ export default class SplitButtonView extends View {
222
222
 
223
223
  arrowView.extendTemplate( {
224
224
  attributes: {
225
- class: 'ck-splitbutton__arrow',
225
+ class: [
226
+ 'ck-splitbutton__arrow'
227
+ ],
228
+ 'data-cke-tooltip-disabled': bind.to( 'isOn' ),
226
229
  'aria-haspopup': true,
227
230
  'aria-expanded': bind.to( 'isOn', value => String( value ) )
228
231
  }
@@ -194,7 +194,8 @@ export default class DropdownView extends View {
194
194
  attributes: {
195
195
  class: [
196
196
  'ck-dropdown__button'
197
- ]
197
+ ],
198
+ 'data-cke-tooltip-disabled': bind.to( 'isOpen' )
198
199
  }
199
200
  } );
200
201
 
@@ -103,7 +103,9 @@ export default class IconView extends View {
103
103
  this.viewBox = viewBox;
104
104
  }
105
105
 
106
- this.element.innerHTML = '';
106
+ while ( this.element.firstChild ) {
107
+ this.element.removeChild( this.element.firstChild );
108
+ }
107
109
 
108
110
  while ( svg.childNodes.length > 0 ) {
109
111
  this.element.appendChild( svg.childNodes[ 0 ] );