@ckeditor/ckeditor5-ui 42.0.2 → 43.0.0-alpha.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.
- package/CHANGELOG.md +1 -539
- package/dist/button/button.d.ts +0 -6
- package/dist/button/buttonview.d.ts +16 -4
- package/dist/button/filedialogbuttonview.d.ts +42 -15
- package/dist/button/listitembuttonview.d.ts +82 -0
- package/dist/editorui/accessibilityhelp/accessibilityhelp.d.ts +1 -1
- package/dist/editorui/editorui.d.ts +57 -0
- package/dist/editorui/editoruiview.d.ts +5 -0
- package/dist/focuscycler.d.ts +53 -7
- package/dist/formheader/formheaderview.d.ts +1 -2
- package/dist/highlightedtext/buttonlabelwithhighlightview.d.ts +34 -0
- package/dist/highlightedtext/labelwithhighlightview.d.ts +30 -0
- package/dist/index-editor.css +32 -0
- package/dist/index.css +42 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +4934 -4291
- package/dist/index.js.map +1 -1
- package/dist/menubar/menubarmenubuttonview.d.ts +2 -2
- package/dist/menubar/menubarmenulistitembuttonview.d.ts +2 -2
- package/dist/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +2 -2
- package/dist/menubar/menubarmenulistview.d.ts +5 -0
- package/dist/menubar/menubarview.d.ts +10 -1
- package/dist/menubar/utils.d.ts +16 -10
- package/dist/panel/balloon/balloonpanelview.d.ts +13 -1
- package/dist/search/filtergroupanditemnames.d.ts +19 -0
- package/dist/toolbar/block/blocktoolbar.d.ts +14 -0
- package/dist/tooltipmanager.d.ts +0 -7
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/lang/translations/sr-latn.po +17 -17
- package/package.json +3 -3
- package/src/arialiveannouncer.js +0 -1
- package/src/bindings/draggableviewmixin.js +1 -1
- package/src/button/button.d.ts +0 -6
- package/src/button/buttonview.d.ts +16 -4
- package/src/button/buttonview.js +32 -2
- package/src/button/filedialogbuttonview.d.ts +42 -15
- package/src/button/filedialogbuttonview.js +69 -27
- package/src/button/listitembuttonview.d.ts +78 -0
- package/src/button/listitembuttonview.js +129 -0
- package/src/colorpicker/colorpickerview.js +5 -0
- package/src/colorselector/colorgridsfragmentview.js +9 -5
- package/src/dialog/dialog.js +4 -1
- package/src/dialog/dialogview.js +1 -14
- package/src/dropdown/utils.js +23 -3
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +1 -1
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +20 -12
- package/src/editorui/bodycollection.js +2 -1
- package/src/editorui/editorui.d.ts +57 -0
- package/src/editorui/editorui.js +104 -12
- package/src/editorui/editoruiview.d.ts +5 -0
- package/src/focuscycler.d.ts +53 -7
- package/src/focuscycler.js +79 -1
- package/src/formheader/formheaderview.d.ts +1 -2
- package/src/formheader/formheaderview.js +1 -2
- package/src/highlightedtext/buttonlabelwithhighlightview.d.ts +30 -0
- package/src/highlightedtext/buttonlabelwithhighlightview.js +31 -0
- package/src/highlightedtext/labelwithhighlightview.d.ts +26 -0
- package/src/highlightedtext/labelwithhighlightview.js +33 -0
- package/src/index.d.ts +6 -2
- package/src/index.js +6 -2
- package/src/menubar/menubarmenubuttonview.d.ts +2 -2
- package/src/menubar/menubarmenubuttonview.js +2 -2
- package/src/menubar/menubarmenulistitembuttonview.d.ts +2 -2
- package/src/menubar/menubarmenulistitembuttonview.js +2 -2
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +2 -2
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +2 -2
- package/src/menubar/menubarmenulistview.d.ts +5 -0
- package/src/menubar/menubarmenulistview.js +49 -0
- package/src/menubar/menubarview.d.ts +10 -1
- package/src/menubar/menubarview.js +11 -4
- package/src/menubar/utils.d.ts +16 -10
- package/src/menubar/utils.js +84 -53
- package/src/panel/balloon/balloonpanelview.d.ts +13 -1
- package/src/panel/balloon/balloonpanelview.js +41 -3
- package/src/search/filtergroupanditemnames.d.ts +15 -0
- package/src/search/filtergroupanditemnames.js +38 -0
- package/src/search/text/searchtextview.js +1 -0
- package/src/toolbar/balloon/balloontoolbar.js +1 -1
- package/src/toolbar/block/blocktoolbar.d.ts +14 -0
- package/src/toolbar/block/blocktoolbar.js +83 -3
- package/src/tooltipmanager.d.ts +0 -7
- package/src/tooltipmanager.js +1 -18
- package/theme/components/button/listitembutton.css +38 -0
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
7
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
8
|
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/button/filedialogbuttonview
|
|
11
|
+
*/
|
|
12
|
+
import View from '../view.js';
|
|
9
13
|
import ButtonView from './buttonview.js';
|
|
10
|
-
import type {
|
|
14
|
+
import type { Mixed } from '@ckeditor/ckeditor5-utils';
|
|
15
|
+
import ListItemButtonView from './listitembuttonview.js';
|
|
16
|
+
declare const FileDialogButtonView_base: Mixed<typeof ButtonView, FileDialogButtonViewBase>;
|
|
11
17
|
/**
|
|
12
18
|
* The file dialog button view.
|
|
13
19
|
*
|
|
@@ -32,17 +38,45 @@ import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
|
32
38
|
* } );
|
|
33
39
|
* ```
|
|
34
40
|
*/
|
|
35
|
-
export default class FileDialogButtonView extends
|
|
41
|
+
export default class FileDialogButtonView extends /* #__PURE__ */ FileDialogButtonView_base {
|
|
42
|
+
}
|
|
43
|
+
declare const FileDialogListItemButtonView_base: Mixed<typeof ListItemButtonView, FileDialogButtonViewBase>;
|
|
44
|
+
/**
|
|
45
|
+
* The file dialog button view used in a lists.
|
|
46
|
+
*
|
|
47
|
+
* This component provides a button that opens the native file selection dialog.
|
|
48
|
+
* It can be used to implement the UI of a file upload feature.
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* const view = new FileDialogListItemButtonView( locale );
|
|
52
|
+
*
|
|
53
|
+
* view.set( {
|
|
54
|
+
* acceptedType: 'image/*',
|
|
55
|
+
* allowMultipleFiles: true
|
|
56
|
+
* label: t( 'Insert image' ),
|
|
57
|
+
* icon: imageIcon,
|
|
58
|
+
* tooltip: true
|
|
59
|
+
* } );
|
|
60
|
+
*
|
|
61
|
+
* view.on( 'done', ( evt, files ) => {
|
|
62
|
+
* for ( const file of Array.from( files ) ) {
|
|
63
|
+
* console.log( 'Selected file', file );
|
|
64
|
+
* }
|
|
65
|
+
* } );
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare class FileDialogListItemButtonView extends /* #__PURE__ */ FileDialogListItemButtonView_base {
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Represents the base view for a file dialog button component.
|
|
72
|
+
*/
|
|
73
|
+
type FileDialogButtonViewBase = View & {
|
|
36
74
|
/**
|
|
37
75
|
* The button view of the component.
|
|
38
76
|
*
|
|
39
77
|
* @deprecated
|
|
40
78
|
*/
|
|
41
79
|
buttonView: ButtonView;
|
|
42
|
-
/**
|
|
43
|
-
* A hidden `<input>` view used to execute file dialog.
|
|
44
|
-
*/
|
|
45
|
-
private _fileInputView;
|
|
46
80
|
/**
|
|
47
81
|
* Accepted file types. Can be provided in form of file extensions, media type or one of:
|
|
48
82
|
* * `audio/*`,
|
|
@@ -58,15 +92,7 @@ export default class FileDialogButtonView extends ButtonView {
|
|
|
58
92
|
* @observable
|
|
59
93
|
*/
|
|
60
94
|
allowMultipleFiles: boolean;
|
|
61
|
-
|
|
62
|
-
* @inheritDoc
|
|
63
|
-
*/
|
|
64
|
-
constructor(locale?: Locale);
|
|
65
|
-
/**
|
|
66
|
-
* @inheritDoc
|
|
67
|
-
*/
|
|
68
|
-
render(): void;
|
|
69
|
-
}
|
|
95
|
+
};
|
|
70
96
|
/**
|
|
71
97
|
* Fired when file dialog is closed with file selected.
|
|
72
98
|
*
|
|
@@ -82,3 +108,4 @@ export type FileInputViewDoneEvent = {
|
|
|
82
108
|
name: 'done';
|
|
83
109
|
args: [files: FileList];
|
|
84
110
|
};
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/button/listitembuttonview
|
|
11
|
+
*/
|
|
12
|
+
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
13
|
+
import type ButtonLabel from './buttonlabel.js';
|
|
14
|
+
import type ViewCollection from '../viewcollection.js';
|
|
15
|
+
import ButtonView from './buttonview.js';
|
|
16
|
+
import View from '../view.js';
|
|
17
|
+
import '../../theme/components/button/listitembutton.css';
|
|
18
|
+
/**
|
|
19
|
+
* Button that is used as dropdown list item entry.
|
|
20
|
+
*/
|
|
21
|
+
export default class ListItemButtonView extends ButtonView {
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether the button view has reserved space for a check holder.
|
|
24
|
+
*
|
|
25
|
+
* @observable
|
|
26
|
+
*/
|
|
27
|
+
hasCheckSpace: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The flag that indicates if the button should render a check holder.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
* @readonly
|
|
33
|
+
* @observable
|
|
34
|
+
*/
|
|
35
|
+
_hasCheck: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Holds the view for the check icon of a button list item.
|
|
38
|
+
*/
|
|
39
|
+
private readonly _checkIconHolderView;
|
|
40
|
+
/**
|
|
41
|
+
* @inheritDoc
|
|
42
|
+
*/
|
|
43
|
+
constructor(locale?: Locale, labelView?: ButtonLabel);
|
|
44
|
+
/**
|
|
45
|
+
* @inheritDoc
|
|
46
|
+
*/
|
|
47
|
+
render(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Renders the check icon if the button is toggleable.
|
|
50
|
+
*/
|
|
51
|
+
private _watchCheckIconHolderMount;
|
|
52
|
+
}
|
|
53
|
+
export declare class CheckIconHolderView extends View {
|
|
54
|
+
/**
|
|
55
|
+
* Collection of child views.
|
|
56
|
+
*/
|
|
57
|
+
readonly children: ViewCollection<View>;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates whether the button is in the "on" state.
|
|
60
|
+
*/
|
|
61
|
+
isOn: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The view for the check icon of the button list item.
|
|
64
|
+
*/
|
|
65
|
+
private readonly _checkIconView;
|
|
66
|
+
/**
|
|
67
|
+
* @inheritDoc
|
|
68
|
+
*/
|
|
69
|
+
constructor();
|
|
70
|
+
/**
|
|
71
|
+
* @inheritDoc
|
|
72
|
+
*/
|
|
73
|
+
render(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Renders the check icon if the button is toggleable.
|
|
76
|
+
*/
|
|
77
|
+
private _watchCheckIconMount;
|
|
78
|
+
/**
|
|
79
|
+
* Creates a check icon view.
|
|
80
|
+
*/
|
|
81
|
+
private _createCheckIconView;
|
|
82
|
+
}
|
|
@@ -17,6 +17,7 @@ import type EditorUIView from './editoruiview.js';
|
|
|
17
17
|
import type ToolbarView from '../toolbar/toolbarview.js';
|
|
18
18
|
import { FocusTracker } from '@ckeditor/ckeditor5-utils';
|
|
19
19
|
import type { Editor } from '@ckeditor/ckeditor5-core';
|
|
20
|
+
import type { default as MenuBarView, MenuBarConfigAddedGroup, MenuBarConfigAddedItem, MenuBarConfigAddedMenu } from '../menubar/menubarview.js';
|
|
20
21
|
declare const EditorUI_base: {
|
|
21
22
|
new (): import("@ckeditor/ckeditor5-utils").Observable;
|
|
22
23
|
prototype: import("@ckeditor/ckeditor5-utils").Observable;
|
|
@@ -104,6 +105,14 @@ export default abstract class EditorUI extends /* #__PURE__ */ EditorUI_base {
|
|
|
104
105
|
* All available & focusable toolbars.
|
|
105
106
|
*/
|
|
106
107
|
private _focusableToolbarDefinitions;
|
|
108
|
+
/**
|
|
109
|
+
* All additional menu bar items, groups or menus that have their default location defined.
|
|
110
|
+
*/
|
|
111
|
+
private _extraMenuBarElements;
|
|
112
|
+
/**
|
|
113
|
+
* The last focused element to which focus should return on `Esc` press.
|
|
114
|
+
*/
|
|
115
|
+
private _lastFocusedForeignElement;
|
|
107
116
|
/**
|
|
108
117
|
* Creates an instance of the editor UI class.
|
|
109
118
|
*
|
|
@@ -169,12 +178,56 @@ export default abstract class EditorUI extends /* #__PURE__ */ EditorUI_base {
|
|
|
169
178
|
* @param toolbarView A instance of the toolbar to be registered.
|
|
170
179
|
*/
|
|
171
180
|
addToolbar(toolbarView: ToolbarView, options?: FocusableToolbarOptions): void;
|
|
181
|
+
/**
|
|
182
|
+
* Registers an extra menu bar element, which could be a single item, a group of items, or a menu containing groups.
|
|
183
|
+
*
|
|
184
|
+
* ```ts
|
|
185
|
+
* // Register a new menu bar item.
|
|
186
|
+
* editor.ui.extendMenuBar( {
|
|
187
|
+
* item: 'menuBar:customFunctionButton',
|
|
188
|
+
* position: 'after:menuBar:bold'
|
|
189
|
+
* } );
|
|
190
|
+
*
|
|
191
|
+
* // Register a new menu bar group.
|
|
192
|
+
* editor.ui.extendMenuBar( {
|
|
193
|
+
* group: {
|
|
194
|
+
* groupId: 'customGroup',
|
|
195
|
+
* items: [
|
|
196
|
+
* 'menuBar:customFunctionButton'
|
|
197
|
+
* ]
|
|
198
|
+
* },
|
|
199
|
+
* position: 'start:help'
|
|
200
|
+
* } );
|
|
201
|
+
*
|
|
202
|
+
* // Register a new menu bar menu.
|
|
203
|
+
* editor.ui.extendMenuBar( {
|
|
204
|
+
* menu: {
|
|
205
|
+
* menuId: 'customMenu',
|
|
206
|
+
* label: 'customMenu',
|
|
207
|
+
* groups: [
|
|
208
|
+
* {
|
|
209
|
+
* groupId: 'customGroup',
|
|
210
|
+
* items: [
|
|
211
|
+
* 'menuBar:customFunctionButton'
|
|
212
|
+
* ]
|
|
213
|
+
* }
|
|
214
|
+
* ]
|
|
215
|
+
* },
|
|
216
|
+
* position: 'after:help'
|
|
217
|
+
* } );
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
extendMenuBar(config: MenuBarConfigAddedItem | MenuBarConfigAddedGroup | MenuBarConfigAddedMenu): void;
|
|
172
221
|
/**
|
|
173
222
|
* Stores all editable elements used by the editor instance.
|
|
174
223
|
*
|
|
175
224
|
* @deprecated
|
|
176
225
|
*/
|
|
177
226
|
protected get _editableElements(): unknown;
|
|
227
|
+
/**
|
|
228
|
+
* Initializes menu bar.
|
|
229
|
+
*/
|
|
230
|
+
protected _initMenuBar(menuBarView: MenuBarView): void;
|
|
178
231
|
/**
|
|
179
232
|
* Returns viewport offsets object:
|
|
180
233
|
*
|
|
@@ -196,6 +249,10 @@ export default abstract class EditorUI extends /* #__PURE__ */ EditorUI_base {
|
|
|
196
249
|
* to allow users navigate across the UI.
|
|
197
250
|
*/
|
|
198
251
|
private _initFocusTracking;
|
|
252
|
+
/**
|
|
253
|
+
* Saves last focused element that doen not belong to editing view to restore focus on `Esc`.
|
|
254
|
+
*/
|
|
255
|
+
private _saveLastFocusedForeignElement;
|
|
199
256
|
/**
|
|
200
257
|
* Returns definitions of toolbars that could potentially be focused, sorted by their importance for the user.
|
|
201
258
|
*
|
|
@@ -14,6 +14,7 @@ import BodyCollection from './bodycollection.js';
|
|
|
14
14
|
import type EditableUIView from '../editableui/editableuiview.js';
|
|
15
15
|
import type { Locale, LocaleTranslate } from '@ckeditor/ckeditor5-utils';
|
|
16
16
|
import '../../theme/components/editorui/editorui.css';
|
|
17
|
+
import type MenuBarView from '../menubar/menubarview.js';
|
|
17
18
|
/**
|
|
18
19
|
* The editor UI view class. Base class for the editor main views.
|
|
19
20
|
*/
|
|
@@ -26,6 +27,10 @@ export default abstract class EditorUIView extends View {
|
|
|
26
27
|
locale: Locale;
|
|
27
28
|
t: LocaleTranslate;
|
|
28
29
|
abstract get editable(): EditableUIView;
|
|
30
|
+
/**
|
|
31
|
+
* Menu bar view instance. May not be initialized in some editor types.
|
|
32
|
+
*/
|
|
33
|
+
menuBarView?: MenuBarView;
|
|
29
34
|
/**
|
|
30
35
|
* Creates an instance of the editor UI view class.
|
|
31
36
|
*
|
package/dist/focuscycler.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/**
|
|
10
10
|
* @module ui/focuscycler
|
|
11
11
|
*/
|
|
12
|
-
import { type ArrayOrItem, type FocusTracker, type KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
|
|
12
|
+
import { type ArrayOrItem, type FocusTracker, type KeystrokeHandler, type KeystrokeHandlerOptions } from '@ckeditor/ckeditor5-utils';
|
|
13
13
|
import type View from './view.js';
|
|
14
14
|
import type ViewCollection from './viewcollection.js';
|
|
15
15
|
declare const FocusCycler_base: {
|
|
@@ -109,6 +109,7 @@ export default class FocusCycler extends /* #__PURE__ */ FocusCycler_base {
|
|
|
109
109
|
focusables: ViewCollection<FocusableView>;
|
|
110
110
|
focusTracker: FocusTracker;
|
|
111
111
|
keystrokeHandler?: KeystrokeHandler;
|
|
112
|
+
keystrokeHandlerOptions?: KeystrokeHandlerOptions;
|
|
112
113
|
actions?: FocusCyclerActions;
|
|
113
114
|
});
|
|
114
115
|
/**
|
|
@@ -168,6 +169,54 @@ export default class FocusCycler extends /* #__PURE__ */ FocusCycler_base {
|
|
|
168
169
|
* **Note**: Hidden views (e.g. with `display: none`) are ignored.
|
|
169
170
|
*/
|
|
170
171
|
focusPrevious(): void;
|
|
172
|
+
/**
|
|
173
|
+
* Allows for creating continuous focus cycling across multiple focus cyclers and their collections of {@link #focusables}.
|
|
174
|
+
*
|
|
175
|
+
* It starts listening to the {@link module:ui/focuscycler~FocusCyclerForwardCycleEvent} and
|
|
176
|
+
* {@link module:ui/focuscycler~FocusCyclerBackwardCycleEvent} events of the chained focus cycler and engages,
|
|
177
|
+
* whenever the user reaches the last (forwards navigation) or first (backwards navigation) focusable view
|
|
178
|
+
* and would normally start over. Instead, the navigation continues on the higher level (flattens).
|
|
179
|
+
*
|
|
180
|
+
* For instance, for the following nested focus navigation structure, the focus would get stuck the moment
|
|
181
|
+
* the AB gets focused and its focus cycler starts managing it:
|
|
182
|
+
*
|
|
183
|
+
* ┌────────────┐ ┌──────────────────────────────────┐ ┌────────────┐
|
|
184
|
+
* │ AA │ │ AB │ │ AC │
|
|
185
|
+
* │ │ │ │ │ │
|
|
186
|
+
* │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │
|
|
187
|
+
* │ │ │ ┌──► ABA ├──► ABB ├──► ABC ├───┐ │ │ │
|
|
188
|
+
* │ ├───► │ └─────┘ └─────┘ └─────┘ │ │ │ │
|
|
189
|
+
* │ │ │ │ │ │ │ │
|
|
190
|
+
* │ │ │ │ │ │ │ │
|
|
191
|
+
* │ │ │ └──────────────────────────────┘ │ │ │
|
|
192
|
+
* │ │ │ │ │ │
|
|
193
|
+
* └────────────┘ └──────────────────────────────────┘ └────────────┘
|
|
194
|
+
*
|
|
195
|
+
* Chaining a focus tracker that manages AA, AB, and AC with the focus tracker that manages ABA, ABB, and ABC
|
|
196
|
+
* creates a seamless navigation experience instead:
|
|
197
|
+
*
|
|
198
|
+
* ┌────────────┐ ┌──────────────────────────────────┐ ┌────────────┐
|
|
199
|
+
* │ AA │ │ AB │ │ AC │
|
|
200
|
+
* │ │ │ │ │ │
|
|
201
|
+
* │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │
|
|
202
|
+
* │ │ │ ┌──► ABA ├──► ABB ├──► ABC ├──┐ │ │ │
|
|
203
|
+
* ┌──► ├───┼─┘ └─────┘ └─────┘ └─────┘ └──┼───► ├──┐
|
|
204
|
+
* │ │ │ │ │ │ │ │
|
|
205
|
+
* │ │ │ │ │ │ │ │
|
|
206
|
+
* │ │ │ │ │ │ │ │
|
|
207
|
+
* │ │ │ │ │ │ │ │
|
|
208
|
+
* │ └────────────┘ └──────────────────────────────────┘ └────────────┘ │
|
|
209
|
+
* │ │
|
|
210
|
+
* │ │
|
|
211
|
+
* └──────────────────────────────────────────────────────────────────────────┘
|
|
212
|
+
*
|
|
213
|
+
* See {@link #unchain} to reverse the chaining.
|
|
214
|
+
*/
|
|
215
|
+
chain(chainedFocusCycler: FocusCycler): void;
|
|
216
|
+
/**
|
|
217
|
+
* Reverses a chaining made by {@link #chain}.
|
|
218
|
+
*/
|
|
219
|
+
unchain(otherFocusCycler: FocusCycler): void;
|
|
171
220
|
/**
|
|
172
221
|
* Focuses the given view if it exists.
|
|
173
222
|
*
|
|
@@ -208,12 +257,9 @@ export type FocusableView = View & {
|
|
|
208
257
|
export type ViewWithFocusCycler = FocusableView & {
|
|
209
258
|
focusCycler: FocusCycler;
|
|
210
259
|
};
|
|
211
|
-
export
|
|
212
|
-
focusFirst?: ArrayOrItem<string>;
|
|
213
|
-
|
|
214
|
-
focusNext?: ArrayOrItem<string>;
|
|
215
|
-
focusPrevious?: ArrayOrItem<string>;
|
|
216
|
-
}
|
|
260
|
+
export type FocusCyclerActions = {
|
|
261
|
+
[key in 'focusFirst' | 'focusLast' | 'focusPrevious' | 'focusNext']?: ArrayOrItem<string>;
|
|
262
|
+
};
|
|
217
263
|
/**
|
|
218
264
|
* Fired when the focus cycler is about to move the focus from the last focusable item
|
|
219
265
|
* to the first one.
|
|
@@ -22,8 +22,7 @@ import '../../theme/components/formheader/formheader.css';
|
|
|
22
22
|
* The component can also be extended by any other elements, like: icons, dropdowns, etc.
|
|
23
23
|
*
|
|
24
24
|
* It is used i.a.
|
|
25
|
-
* by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}
|
|
26
|
-
* and {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}.
|
|
25
|
+
* by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}.
|
|
27
26
|
*
|
|
28
27
|
* The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.
|
|
29
28
|
*/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/highlightedtext/buttonlabelwithhighlightview
|
|
11
|
+
*/
|
|
12
|
+
import type ButtonLabel from '../button/buttonlabel.js';
|
|
13
|
+
import HighlightedTextView from './highlightedtextview.js';
|
|
14
|
+
/**
|
|
15
|
+
* A button label view that can highlight a text fragment.
|
|
16
|
+
*/
|
|
17
|
+
export default class ButtonLabelWithHighlightView extends HighlightedTextView implements ButtonLabel {
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
style: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
text: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
id: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
constructor();
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license 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
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ui/highlightedtext/labelwithhighlightview
|
|
11
|
+
*/
|
|
12
|
+
import HighlightedTextView from './highlightedtextview.js';
|
|
13
|
+
import type LabelView from '../label/labelview.js';
|
|
14
|
+
/**
|
|
15
|
+
* A label view that can highlight a text fragment.
|
|
16
|
+
*/
|
|
17
|
+
export default class LabelWithHighlightView extends HighlightedTextView implements LabelView {
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
readonly id: string;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
for: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
package/dist/index-editor.css
CHANGED
|
@@ -113,6 +113,38 @@ a.ck.ck-button{
|
|
|
113
113
|
display:block;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
.ck.ck-list-item-button{
|
|
117
|
+
min-height:unset;
|
|
118
|
+
width:100%;
|
|
119
|
+
border-radius:0;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[dir="ltr"] .ck.ck-list-item-button{
|
|
123
|
+
text-align:left;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[dir="rtl"] .ck.ck-list-item-button{
|
|
127
|
+
text-align:right;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ck.ck-list-item-button .ck-list-item-button__check-holder{
|
|
131
|
+
display:inline-flex;
|
|
132
|
+
width:1em;
|
|
133
|
+
height:1em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[dir="ltr"] .ck.ck-list-item-button .ck-list-item-button__check-holder{
|
|
137
|
+
margin-right:var(--ck-spacing-standard);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[dir="rtl"] .ck.ck-list-item-button .ck-list-item-button__check-holder{
|
|
141
|
+
margin-left:var(--ck-spacing-standard);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.ck.ck-list-item-button .ck-list-item-button__check-icon{
|
|
145
|
+
height:100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
116
148
|
.ck.ck-collapsible.ck-collapsible_collapsed > .ck-collapsible__children{
|
|
117
149
|
display:none;
|
|
118
150
|
}
|
package/dist/index.css
CHANGED
|
@@ -174,6 +174,48 @@ a.ck.ck-button {
|
|
|
174
174
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
175
175
|
*/
|
|
176
176
|
|
|
177
|
+
/*
|
|
178
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
179
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
.ck.ck-list-item-button {
|
|
183
|
+
min-height: unset;
|
|
184
|
+
width: 100%;
|
|
185
|
+
border-radius: 0;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[dir="ltr"] .ck.ck-list-item-button {
|
|
189
|
+
text-align: left;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
[dir="rtl"] .ck.ck-list-item-button {
|
|
193
|
+
text-align: right;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.ck.ck-list-item-button .ck-list-item-button__check-holder {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
width: 1em;
|
|
199
|
+
height: 1em;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
[dir="ltr"] .ck.ck-list-item-button .ck-list-item-button__check-holder {
|
|
203
|
+
margin-right: var(--ck-spacing-standard);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
[dir="rtl"] .ck.ck-list-item-button .ck-list-item-button__check-holder {
|
|
207
|
+
margin-left: var(--ck-spacing-standard);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.ck.ck-list-item-button .ck-list-item-button__check-icon {
|
|
211
|
+
height: 100%;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/*
|
|
215
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
216
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
217
|
+
*/
|
|
218
|
+
|
|
177
219
|
.ck.ck-collapsible.ck-collapsible_collapsed > .ck-collapsible__children {
|
|
178
220
|
display: none;
|
|
179
221
|
}
|