@ckeditor/ckeditor5-ui 41.3.0-alpha.4 → 41.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.
- package/ckeditor5-metadata.json +1 -1
- package/lang/contexts.json +12 -2
- package/lang/translations/af.po +210 -0
- package/lang/translations/ar.po +44 -4
- package/lang/translations/ast.po +44 -4
- package/lang/translations/az.po +44 -4
- package/lang/translations/bg.po +44 -4
- package/lang/translations/bn.po +44 -4
- package/lang/translations/bs.po +210 -0
- package/lang/translations/ca.po +44 -4
- package/lang/translations/cs.po +44 -4
- package/lang/translations/da.po +44 -4
- package/lang/translations/de-ch.po +44 -4
- package/lang/translations/de.po +44 -4
- package/lang/translations/el.po +44 -4
- package/lang/translations/en-au.po +44 -4
- package/lang/translations/en-gb.po +44 -4
- package/lang/translations/en.po +44 -4
- package/lang/translations/eo.po +44 -4
- package/lang/translations/es-co.po +210 -0
- package/lang/translations/es.po +44 -4
- package/lang/translations/et.po +44 -4
- package/lang/translations/eu.po +44 -4
- package/lang/translations/fa.po +44 -4
- package/lang/translations/fi.po +44 -4
- package/lang/translations/fr.po +44 -4
- package/lang/translations/gl.po +44 -4
- package/lang/translations/he.po +44 -4
- package/lang/translations/hi.po +44 -4
- package/lang/translations/hr.po +44 -4
- package/lang/translations/hu.po +44 -4
- package/lang/translations/id.po +44 -4
- package/lang/translations/it.po +44 -4
- package/lang/translations/ja.po +44 -4
- package/lang/translations/jv.po +210 -0
- package/lang/translations/km.po +44 -4
- package/lang/translations/kn.po +44 -4
- package/lang/translations/ko.po +44 -4
- package/lang/translations/ku.po +44 -4
- package/lang/translations/lt.po +44 -4
- package/lang/translations/lv.po +44 -4
- package/lang/translations/ms.po +44 -4
- package/lang/translations/nb.po +44 -4
- package/lang/translations/ne.po +44 -4
- package/lang/translations/nl.po +44 -4
- package/lang/translations/no.po +44 -4
- package/lang/translations/pl.po +44 -4
- package/lang/translations/pt-br.po +44 -4
- package/lang/translations/pt.po +44 -4
- package/lang/translations/ro.po +44 -4
- package/lang/translations/ru.po +44 -4
- package/lang/translations/sk.po +44 -4
- package/lang/translations/sl.po +44 -4
- package/lang/translations/sq.po +44 -4
- package/lang/translations/sr-latn.po +44 -4
- package/lang/translations/sr.po +44 -4
- package/lang/translations/sv.po +44 -4
- package/lang/translations/th.po +44 -4
- package/lang/translations/tk.po +44 -4
- package/lang/translations/tr.po +44 -4
- package/lang/translations/tt.po +44 -4
- package/lang/translations/ug.po +44 -4
- package/lang/translations/uk.po +44 -4
- package/lang/translations/ur.po +44 -4
- package/lang/translations/uz.po +44 -4
- package/lang/translations/vi.po +44 -4
- package/lang/translations/zh-cn.po +44 -4
- package/lang/translations/zh.po +44 -4
- package/package.json +3 -4
- package/src/button/button.d.ts +6 -0
- package/src/button/buttonview.d.ts +4 -0
- package/src/button/buttonview.js +1 -0
- package/src/button/filedialogbuttonview.d.ts +80 -0
- package/src/button/filedialogbuttonview.js +103 -0
- package/src/dropdown/utils.js +1 -5
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +4 -0
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +25 -9
- package/src/index.d.ts +12 -3
- package/src/index.js +10 -2
- package/src/menubar/menubarmenubuttonview.d.ts +35 -0
- package/src/menubar/menubarmenubuttonview.js +64 -0
- package/src/menubar/menubarmenulistitembuttonview.d.ts +21 -0
- package/src/menubar/menubarmenulistitembuttonview.js +30 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +23 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +32 -0
- package/src/menubar/menubarmenulistitemview.d.ts +25 -0
- package/src/menubar/menubarmenulistitemview.js +34 -0
- package/src/menubar/menubarmenulistview.d.ts +24 -0
- package/src/menubar/menubarmenulistview.js +23 -0
- package/src/menubar/menubarmenupanelview.d.ts +53 -0
- package/src/menubar/menubarmenupanelview.js +60 -0
- package/src/menubar/menubarmenuview.d.ts +109 -0
- package/src/menubar/menubarmenuview.js +159 -0
- package/src/menubar/menubarview.d.ts +164 -0
- package/src/menubar/menubarview.js +254 -0
- package/src/menubar/utils.d.ts +432 -0
- package/src/menubar/utils.js +1320 -0
- package/src/toolbar/toolbarview.js +5 -3
- package/src/tooltipmanager.d.ts +11 -0
- package/src/tooltipmanager.js +37 -6
- package/theme/components/menubar/menubar.css +10 -0
- package/theme/components/menubar/menubarmenu.css +9 -0
- package/theme/components/menubar/menubarmenubutton.css +11 -0
- package/theme/components/menubar/menubarmenulistitem.css +10 -0
- package/theme/components/menubar/menubarmenulistitembutton.css +10 -0
- package/theme/components/menubar/menubarmenupanel.css +62 -0
- package/theme/components/tooltip/tooltip.css +0 -3
- package/theme/globals/_reset.css +13 -0
- package/theme/globals/globals.css +1 -0
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -445
- package/dist/index.css +0 -844
- package/dist/index.css.map +0 -1
- package/dist/translations/ar.d.ts +0 -8
- package/dist/translations/ar.js +0 -5
- package/dist/translations/ast.d.ts +0 -8
- package/dist/translations/ast.js +0 -5
- package/dist/translations/az.d.ts +0 -8
- package/dist/translations/az.js +0 -5
- package/dist/translations/bg.d.ts +0 -8
- package/dist/translations/bg.js +0 -5
- package/dist/translations/bn.d.ts +0 -8
- package/dist/translations/bn.js +0 -5
- package/dist/translations/ca.d.ts +0 -8
- package/dist/translations/ca.js +0 -5
- package/dist/translations/cs.d.ts +0 -8
- package/dist/translations/cs.js +0 -5
- package/dist/translations/da.d.ts +0 -8
- package/dist/translations/da.js +0 -5
- package/dist/translations/de-ch.d.ts +0 -8
- package/dist/translations/de-ch.js +0 -5
- package/dist/translations/de.d.ts +0 -8
- package/dist/translations/de.js +0 -5
- package/dist/translations/el.d.ts +0 -8
- package/dist/translations/el.js +0 -5
- package/dist/translations/en-au.d.ts +0 -8
- package/dist/translations/en-au.js +0 -5
- package/dist/translations/en-gb.d.ts +0 -8
- package/dist/translations/en-gb.js +0 -5
- package/dist/translations/en.d.ts +0 -8
- package/dist/translations/en.js +0 -5
- package/dist/translations/eo.d.ts +0 -8
- package/dist/translations/eo.js +0 -5
- package/dist/translations/es.d.ts +0 -8
- package/dist/translations/es.js +0 -5
- package/dist/translations/et.d.ts +0 -8
- package/dist/translations/et.js +0 -5
- package/dist/translations/eu.d.ts +0 -8
- package/dist/translations/eu.js +0 -5
- package/dist/translations/fa.d.ts +0 -8
- package/dist/translations/fa.js +0 -5
- package/dist/translations/fi.d.ts +0 -8
- package/dist/translations/fi.js +0 -5
- package/dist/translations/fr.d.ts +0 -8
- package/dist/translations/fr.js +0 -5
- package/dist/translations/gl.d.ts +0 -8
- package/dist/translations/gl.js +0 -5
- package/dist/translations/he.d.ts +0 -8
- package/dist/translations/he.js +0 -5
- package/dist/translations/hi.d.ts +0 -8
- package/dist/translations/hi.js +0 -5
- package/dist/translations/hr.d.ts +0 -8
- package/dist/translations/hr.js +0 -5
- package/dist/translations/hu.d.ts +0 -8
- package/dist/translations/hu.js +0 -5
- package/dist/translations/id.d.ts +0 -8
- package/dist/translations/id.js +0 -5
- package/dist/translations/it.d.ts +0 -8
- package/dist/translations/it.js +0 -5
- package/dist/translations/ja.d.ts +0 -8
- package/dist/translations/ja.js +0 -5
- package/dist/translations/km.d.ts +0 -8
- package/dist/translations/km.js +0 -5
- package/dist/translations/kn.d.ts +0 -8
- package/dist/translations/kn.js +0 -5
- package/dist/translations/ko.d.ts +0 -8
- package/dist/translations/ko.js +0 -5
- package/dist/translations/ku.d.ts +0 -8
- package/dist/translations/ku.js +0 -5
- package/dist/translations/lt.d.ts +0 -8
- package/dist/translations/lt.js +0 -5
- package/dist/translations/lv.d.ts +0 -8
- package/dist/translations/lv.js +0 -5
- package/dist/translations/ms.d.ts +0 -8
- package/dist/translations/ms.js +0 -5
- package/dist/translations/nb.d.ts +0 -8
- package/dist/translations/nb.js +0 -5
- package/dist/translations/ne.d.ts +0 -8
- package/dist/translations/ne.js +0 -5
- package/dist/translations/nl.d.ts +0 -8
- package/dist/translations/nl.js +0 -5
- package/dist/translations/no.d.ts +0 -8
- package/dist/translations/no.js +0 -5
- package/dist/translations/pl.d.ts +0 -8
- package/dist/translations/pl.js +0 -5
- package/dist/translations/pt-br.d.ts +0 -8
- package/dist/translations/pt-br.js +0 -5
- package/dist/translations/pt.d.ts +0 -8
- package/dist/translations/pt.js +0 -5
- package/dist/translations/ro.d.ts +0 -8
- package/dist/translations/ro.js +0 -5
- package/dist/translations/ru.d.ts +0 -8
- package/dist/translations/ru.js +0 -5
- package/dist/translations/sk.d.ts +0 -8
- package/dist/translations/sk.js +0 -5
- package/dist/translations/sl.d.ts +0 -8
- package/dist/translations/sl.js +0 -5
- package/dist/translations/sq.d.ts +0 -8
- package/dist/translations/sq.js +0 -5
- package/dist/translations/sr-latn.d.ts +0 -8
- package/dist/translations/sr-latn.js +0 -5
- package/dist/translations/sr.d.ts +0 -8
- package/dist/translations/sr.js +0 -5
- package/dist/translations/sv.d.ts +0 -8
- package/dist/translations/sv.js +0 -5
- package/dist/translations/th.d.ts +0 -8
- package/dist/translations/th.js +0 -5
- package/dist/translations/tk.d.ts +0 -8
- package/dist/translations/tk.js +0 -5
- package/dist/translations/tr.d.ts +0 -8
- package/dist/translations/tr.js +0 -5
- package/dist/translations/tt.d.ts +0 -8
- package/dist/translations/tt.js +0 -5
- package/dist/translations/ug.d.ts +0 -8
- package/dist/translations/ug.js +0 -5
- package/dist/translations/uk.d.ts +0 -8
- package/dist/translations/uk.js +0 -5
- package/dist/translations/ur.d.ts +0 -8
- package/dist/translations/ur.js +0 -5
- package/dist/translations/uz.d.ts +0 -8
- package/dist/translations/uz.js +0 -5
- package/dist/translations/vi.d.ts +0 -8
- package/dist/translations/vi.js +0 -5
- package/dist/translations/zh-cn.d.ts +0 -8
- package/dist/translations/zh-cn.js +0 -5
- package/dist/translations/zh.d.ts +0 -8
- package/dist/translations/zh.js +0 -5
- package/dist/types/arialiveannouncer.d.ts +0 -102
- package/dist/types/augmentation.d.ts +0 -92
- package/dist/types/autocomplete/autocompleteview.d.ts +0 -85
- package/dist/types/bindings/addkeyboardhandlingforgrid.d.ts +0 -31
- package/dist/types/bindings/clickoutsidehandler.d.ts +0 -32
- package/dist/types/bindings/csstransitiondisablermixin.d.ts +0 -44
- package/dist/types/bindings/draggableviewmixin.d.ts +0 -50
- package/dist/types/bindings/injectcsstransitiondisabler.d.ts +0 -63
- package/dist/types/bindings/preventdefault.d.ts +0 -37
- package/dist/types/bindings/submithandler.d.ts +0 -61
- package/dist/types/button/button.d.ts +0 -179
- package/dist/types/button/buttonlabel.d.ts +0 -38
- package/dist/types/button/buttonlabelview.d.ts +0 -35
- package/dist/types/button/buttonview.d.ts +0 -185
- package/dist/types/button/switchbuttonview.d.ts +0 -49
- package/dist/types/collapsible/collapsibleview.d.ts +0 -74
- package/dist/types/colorgrid/colorgridview.d.ts +0 -136
- package/dist/types/colorgrid/colortileview.d.ts +0 -32
- package/dist/types/colorgrid/utils.d.ts +0 -51
- package/dist/types/colorpicker/colorpickerview.d.ts +0 -146
- package/dist/types/colorpicker/utils.d.ts +0 -52
- package/dist/types/colorselector/colorgridsfragmentview.d.ts +0 -199
- package/dist/types/colorselector/colorpickerfragmentview.d.ts +0 -133
- package/dist/types/colorselector/colorselectorview.d.ts +0 -246
- package/dist/types/colorselector/documentcolorcollection.d.ts +0 -74
- package/dist/types/componentfactory.d.ts +0 -85
- package/dist/types/dialog/dialog.d.ts +0 -277
- package/dist/types/dialog/dialogactionsview.d.ts +0 -73
- package/dist/types/dialog/dialogcontentview.d.ts +0 -31
- package/dist/types/dialog/dialogview.d.ts +0 -260
- package/dist/types/dropdown/button/dropdownbutton.d.ts +0 -29
- package/dist/types/dropdown/button/dropdownbuttonview.d.ts +0 -52
- package/dist/types/dropdown/button/splitbuttonview.d.ts +0 -166
- package/dist/types/dropdown/dropdownpanelfocusable.d.ts +0 -25
- package/dist/types/dropdown/dropdownpanelview.d.ts +0 -66
- package/dist/types/dropdown/dropdownview.d.ts +0 -319
- package/dist/types/dropdown/utils.d.ts +0 -239
- package/dist/types/editableui/editableuiview.d.ts +0 -76
- package/dist/types/editableui/inline/inlineeditableuiview.d.ts +0 -44
- package/dist/types/editorui/accessibilityhelp/accessibilityhelp.d.ts +0 -51
- package/dist/types/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +0 -39
- package/dist/types/editorui/bodycollection.d.ts +0 -59
- package/dist/types/editorui/boxed/boxededitoruiview.d.ts +0 -44
- package/dist/types/editorui/editorui.d.ts +0 -292
- package/dist/types/editorui/editoruiview.d.ts +0 -43
- package/dist/types/editorui/poweredby.d.ts +0 -75
- package/dist/types/focuscycler.d.ts +0 -249
- package/dist/types/formheader/formheaderview.d.ts +0 -63
- package/dist/types/highlightedtext/highlightedtextview.d.ts +0 -42
- package/dist/types/icon/iconview.d.ts +0 -92
- package/dist/types/iframe/iframeview.d.ts +0 -54
- package/dist/types/index.d.ts +0 -78
- package/dist/types/input/inputbase.d.ts +0 -123
- package/dist/types/input/inputview.d.ts +0 -40
- package/dist/types/inputnumber/inputnumberview.d.ts +0 -53
- package/dist/types/inputtext/inputtextview.d.ts +0 -22
- package/dist/types/label/labelview.d.ts +0 -40
- package/dist/types/labeledfield/labeledfieldview.d.ts +0 -191
- package/dist/types/labeledfield/utils.d.ts +0 -127
- package/dist/types/labeledinput/labeledinputview.d.ts +0 -129
- package/dist/types/list/listitemgroupview.d.ts +0 -63
- package/dist/types/list/listitemview.d.ts +0 -40
- package/dist/types/list/listseparatorview.d.ts +0 -22
- package/dist/types/list/listview.d.ts +0 -128
- package/dist/types/model.d.ts +0 -26
- package/dist/types/notification/notification.d.ts +0 -215
- package/dist/types/panel/balloon/balloonpanelview.d.ts +0 -689
- package/dist/types/panel/balloon/contextualballoon.d.ts +0 -303
- package/dist/types/panel/sticky/stickypanelview.d.ts +0 -160
- package/dist/types/search/filteredview.d.ts +0 -35
- package/dist/types/search/searchinfoview.d.ts +0 -49
- package/dist/types/search/searchresultsview.d.ts +0 -58
- package/dist/types/search/text/searchtextqueryview.d.ts +0 -80
- package/dist/types/search/text/searchtextview.d.ts +0 -223
- package/dist/types/spinner/spinnerview.d.ts +0 -29
- package/dist/types/template.d.ts +0 -946
- package/dist/types/textarea/textareaview.d.ts +0 -108
- package/dist/types/toolbar/balloon/balloontoolbar.d.ts +0 -121
- package/dist/types/toolbar/block/blockbuttonview.d.ts +0 -39
- package/dist/types/toolbar/block/blocktoolbar.d.ts +0 -157
- package/dist/types/toolbar/normalizetoolbarconfig.d.ts +0 -44
- package/dist/types/toolbar/toolbarlinebreakview.d.ts +0 -22
- package/dist/types/toolbar/toolbarseparatorview.d.ts +0 -22
- package/dist/types/toolbar/toolbarview.d.ts +0 -271
- package/dist/types/tooltipmanager.d.ts +0 -188
- package/dist/types/view.d.ts +0 -426
- package/dist/types/viewcollection.d.ts +0 -143
|
@@ -16,6 +16,7 @@ import { FocusTracker, KeystrokeHandler, Rect, ResizeObserver, global, isVisible
|
|
|
16
16
|
import { icons } from '@ckeditor/ckeditor5-core';
|
|
17
17
|
import { isObject } from 'lodash-es';
|
|
18
18
|
import '../../theme/components/toolbar/toolbar.css';
|
|
19
|
+
const { threeVerticalDots } = icons;
|
|
19
20
|
export const NESTED_TOOLBAR_ICONS = {
|
|
20
21
|
alignLeft: icons.alignLeft,
|
|
21
22
|
bold: icons.bold,
|
|
@@ -228,7 +229,8 @@ export default class ToolbarView extends View {
|
|
|
228
229
|
* name does not exist so it was omitted when rendering the toolbar.
|
|
229
230
|
*
|
|
230
231
|
* This warning usually shows up when the {@link module:core/plugin~Plugin} which is supposed
|
|
231
|
-
* to provide a toolbar item has not been loaded or there is a typo in the
|
|
232
|
+
* to provide a toolbar item has not been loaded or there is a typo in the
|
|
233
|
+
* {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}.
|
|
232
234
|
*
|
|
233
235
|
* Make sure the plugin responsible for this toolbar item is loaded and the toolbar configuration
|
|
234
236
|
* is correct, e.g. {@link module:basic-styles/bold~Bold} is loaded for the `'bold'` toolbar item.
|
|
@@ -334,7 +336,7 @@ export default class ToolbarView extends View {
|
|
|
334
336
|
// Allow disabling icon by passing false.
|
|
335
337
|
if (icon !== false) {
|
|
336
338
|
// A pre-defined icon picked by name, SVG string, a fallback (default) icon.
|
|
337
|
-
dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon ||
|
|
339
|
+
dropdownView.buttonView.icon = NESTED_TOOLBAR_ICONS[icon] || icon || threeVerticalDots;
|
|
338
340
|
}
|
|
339
341
|
// If the icon is disabled, display the label automatically.
|
|
340
342
|
else {
|
|
@@ -692,7 +694,7 @@ class DynamicGrouping {
|
|
|
692
694
|
label: t('Show more items'),
|
|
693
695
|
tooltip: true,
|
|
694
696
|
tooltipPosition: locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw',
|
|
695
|
-
icon:
|
|
697
|
+
icon: threeVerticalDots
|
|
696
698
|
});
|
|
697
699
|
return dropdown;
|
|
698
700
|
}
|
package/src/tooltipmanager.d.ts
CHANGED
|
@@ -109,6 +109,10 @@ export default class TooltipManager extends TooltipManager_base {
|
|
|
109
109
|
* to improve the UX.
|
|
110
110
|
*/
|
|
111
111
|
private _pinTooltipDebounced;
|
|
112
|
+
/**
|
|
113
|
+
* A debounced version of {@link #_unpinTooltip}. Tooltips hide with a delay to allow hovering of their titles.
|
|
114
|
+
*/
|
|
115
|
+
private _unpinTooltipDebounced;
|
|
112
116
|
private readonly _watchdogExcluded;
|
|
113
117
|
/**
|
|
114
118
|
* A set of editors the single tooltip manager instance must listen to.
|
|
@@ -140,6 +144,13 @@ export default class TooltipManager extends TooltipManager_base {
|
|
|
140
144
|
* @returns Positioning functions to be used by the {@link #balloonPanelView}.
|
|
141
145
|
*/
|
|
142
146
|
static getPositioningFunctions(position: TooltipPosition): Array<PositioningFunction>;
|
|
147
|
+
/**
|
|
148
|
+
* Handles hiding tooltips on `keydown` in DOM.
|
|
149
|
+
*
|
|
150
|
+
* @param evt An object containing information about the fired event.
|
|
151
|
+
* @param domEvent The DOM event.
|
|
152
|
+
*/
|
|
153
|
+
private _onKeyDown;
|
|
143
154
|
/**
|
|
144
155
|
* Handles displaying tooltips on `mouseenter` and `focus` in DOM.
|
|
145
156
|
*
|
package/src/tooltipmanager.js
CHANGED
|
@@ -121,6 +121,8 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
121
121
|
this._updateTooltipPosition();
|
|
122
122
|
});
|
|
123
123
|
this._pinTooltipDebounced = debounce(this._pinTooltip, 600);
|
|
124
|
+
this._unpinTooltipDebounced = debounce(this._unpinTooltip, 400);
|
|
125
|
+
this.listenTo(global.document, 'keydown', this._onKeyDown.bind(this), { useCapture: true });
|
|
124
126
|
this.listenTo(global.document, 'mouseenter', this._onEnterOrFocus.bind(this), { useCapture: true });
|
|
125
127
|
this.listenTo(global.document, 'mouseleave', this._onLeaveOrBlur.bind(this), { useCapture: true });
|
|
126
128
|
this.listenTo(global.document, 'focus', this._onEnterOrFocus.bind(this), { useCapture: true });
|
|
@@ -179,6 +181,18 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
179
181
|
se: [defaultPositions.southArrowNorthWest]
|
|
180
182
|
}[position];
|
|
181
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Handles hiding tooltips on `keydown` in DOM.
|
|
186
|
+
*
|
|
187
|
+
* @param evt An object containing information about the fired event.
|
|
188
|
+
* @param domEvent The DOM event.
|
|
189
|
+
*/
|
|
190
|
+
_onKeyDown(evt, domEvent) {
|
|
191
|
+
if (domEvent.key === 'Escape' && this._currentElementWithTooltip) {
|
|
192
|
+
this._unpinTooltip();
|
|
193
|
+
domEvent.stopPropagation();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
182
196
|
/**
|
|
183
197
|
* Handles displaying tooltips on `mouseenter` and `focus` in DOM.
|
|
184
198
|
*
|
|
@@ -189,6 +203,11 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
189
203
|
const elementWithTooltipAttribute = getDescendantWithTooltip(target);
|
|
190
204
|
// Abort when there's no descendant needing tooltip.
|
|
191
205
|
if (!elementWithTooltipAttribute) {
|
|
206
|
+
// Unpin if element is focused, regardless of whether it contains a label or not.
|
|
207
|
+
// It also prevents tooltips from overlapping the menu bar
|
|
208
|
+
if (evt.name === 'focus') {
|
|
209
|
+
this._unpinTooltip();
|
|
210
|
+
}
|
|
192
211
|
return;
|
|
193
212
|
}
|
|
194
213
|
// Abort to avoid flashing when, for instance:
|
|
@@ -212,19 +231,28 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
212
231
|
if (!isElement(target)) {
|
|
213
232
|
return;
|
|
214
233
|
}
|
|
234
|
+
const balloonElement = this.balloonPanelView.element;
|
|
235
|
+
const isEnteringBalloon = balloonElement && (balloonElement === relatedTarget || balloonElement.contains(relatedTarget));
|
|
236
|
+
const isLeavingBalloon = !isEnteringBalloon && target === balloonElement;
|
|
237
|
+
// Do not hide the tooltip when the user moves the cursor over it.
|
|
238
|
+
if (isEnteringBalloon) {
|
|
239
|
+
this._unpinTooltipDebounced.cancel();
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
215
242
|
// If a tooltip is currently visible, don't act for a targets other than the one it is attached to.
|
|
243
|
+
// The only exception is leaving balloon, in this scenario tooltip should be closed.
|
|
216
244
|
// For instance, a random mouseleave far away in the page should not unpin the tooltip that was pinned because
|
|
217
245
|
// of a previous focus. Only leaving the same element should hide the tooltip.
|
|
218
|
-
if (this._currentElementWithTooltip && target !== this._currentElementWithTooltip) {
|
|
246
|
+
if (!isLeavingBalloon && this._currentElementWithTooltip && target !== this._currentElementWithTooltip) {
|
|
219
247
|
return;
|
|
220
248
|
}
|
|
221
249
|
const descendantWithTooltip = getDescendantWithTooltip(target);
|
|
222
250
|
const relatedDescendantWithTooltip = getDescendantWithTooltip(relatedTarget);
|
|
223
251
|
// Unpin when the mouse was leaving element with a tooltip to a place which does not have or has a different tooltip.
|
|
224
|
-
// Note that this should happen whether the tooltip is already visible or not, for instance,
|
|
225
|
-
// (debounced): it should get canceled.
|
|
226
|
-
if (descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip) {
|
|
227
|
-
this.
|
|
252
|
+
// Note that this should happen whether the tooltip is already visible or not, for instance,
|
|
253
|
+
// it could be invisible but queued (debounced): it should get canceled.
|
|
254
|
+
if (isLeavingBalloon || (descendantWithTooltip && descendantWithTooltip !== relatedDescendantWithTooltip)) {
|
|
255
|
+
this._unpinTooltipDebounced();
|
|
228
256
|
}
|
|
229
257
|
}
|
|
230
258
|
else {
|
|
@@ -235,7 +263,7 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
235
263
|
}
|
|
236
264
|
// Note that unpinning should happen whether the tooltip is already visible or not, for instance, it could be invisible but
|
|
237
265
|
// queued (debounced): it should get canceled (e.g. quick focus then quick blur using the keyboard).
|
|
238
|
-
this.
|
|
266
|
+
this._unpinTooltipDebounced();
|
|
239
267
|
}
|
|
240
268
|
}
|
|
241
269
|
/**
|
|
@@ -265,6 +293,7 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
265
293
|
* @param options.cssClass Additional CSS class of the balloon with the tooltip.
|
|
266
294
|
*/
|
|
267
295
|
_pinTooltip(targetDomElement, { text, position, cssClass }) {
|
|
296
|
+
this._unpinTooltip();
|
|
268
297
|
// Use the body collection of the first editor.
|
|
269
298
|
const bodyViewCollection = first(TooltipManager._editors.values()).ui.view.body;
|
|
270
299
|
if (!bodyViewCollection.has(this.balloonPanelView)) {
|
|
@@ -299,6 +328,7 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
299
328
|
* Unpins the tooltip and cancels all queued pinning.
|
|
300
329
|
*/
|
|
301
330
|
_unpinTooltip() {
|
|
331
|
+
this._unpinTooltipDebounced.cancel();
|
|
302
332
|
this._pinTooltipDebounced.cancel();
|
|
303
333
|
this.balloonPanelView.unpin();
|
|
304
334
|
for (const editor of TooltipManager._editors) {
|
|
@@ -306,6 +336,7 @@ class TooltipManager extends DomEmitterMixin() {
|
|
|
306
336
|
}
|
|
307
337
|
this._currentElementWithTooltip = null;
|
|
308
338
|
this._currentTooltipPosition = null;
|
|
339
|
+
this.tooltipTextView.text = '';
|
|
309
340
|
if (this._resizeObserver) {
|
|
310
341
|
this._resizeObserver.destroy();
|
|
311
342
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
* Note: This file should contain the wireframe styles only. But since there are no such styles,
|
|
8
|
+
* it acts as a message to the builder telling that it should look for the corresponding styles
|
|
9
|
+
* **in the theme** when compiling the editor.
|
|
10
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
.ck.ck-menu-bar__menu {
|
|
7
|
+
& > .ck-menu-bar__menu__button > .ck-menu-bar__menu__button__arrow {
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
z-index: var(--ck-z-default);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
* Note: This file should contain the wireframe styles only. But since there are no such styles,
|
|
8
|
+
* it acts as a message to the builder telling that it should look for the corresponding styles
|
|
9
|
+
* **in the theme** when compiling the editor.
|
|
10
|
+
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
* Note: This file should contain the wireframe styles only. But since there are no such styles,
|
|
8
|
+
* it acts as a message to the builder telling that it should look for the corresponding styles
|
|
9
|
+
* **in the theme** when compiling the editor.
|
|
10
|
+
*/
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
:root {
|
|
7
|
+
--ck-menu-bar-menu-max-width: 75vw;
|
|
8
|
+
--ck-menu-bar-nested-menu-horizontal-offset: 5px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {
|
|
12
|
+
z-index: var(--ck-z-panel);
|
|
13
|
+
max-width: var(--ck-menu-bar-menu-max-width);
|
|
14
|
+
position: absolute;
|
|
15
|
+
|
|
16
|
+
&.ck-menu-bar__menu__panel_position_ne,
|
|
17
|
+
&.ck-menu-bar__menu__panel_position_nw {
|
|
18
|
+
bottom: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.ck-menu-bar__menu__panel_position_se,
|
|
22
|
+
&.ck-menu-bar__menu__panel_position_sw {
|
|
23
|
+
top: 100%;
|
|
24
|
+
bottom: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.ck-menu-bar__menu__panel_position_ne,
|
|
28
|
+
&.ck-menu-bar__menu__panel_position_se {
|
|
29
|
+
left: 0px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.ck-menu-bar__menu__panel_position_nw,
|
|
33
|
+
&.ck-menu-bar__menu__panel_position_sw {
|
|
34
|
+
right: 0px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.ck-menu-bar__menu__panel_position_es,
|
|
38
|
+
&.ck-menu-bar__menu__panel_position_en {
|
|
39
|
+
left: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.ck-menu-bar__menu__panel_position_es {
|
|
43
|
+
top: 0px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.ck-menu-bar__menu__panel_position_en {
|
|
47
|
+
bottom: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.ck-menu-bar__menu__panel_position_ws,
|
|
51
|
+
&.ck-menu-bar__menu__panel_position_wn {
|
|
52
|
+
right: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.ck-menu-bar__menu__panel_position_ws {
|
|
56
|
+
top: 0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.ck-menu-bar__menu__panel_position_wn {
|
|
60
|
+
bottom: 0px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, 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
|
+
.ck.ck-reset,
|
|
7
|
+
.ck.ck-reset_all,
|
|
8
|
+
.ck-reset_all *:not(.ck-reset_all-excluded *) {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
width: auto;
|
|
11
|
+
height: auto;
|
|
12
|
+
position: static;
|
|
13
|
+
}
|
package/dist/content-index.css
DELETED