@ckeditor/ckeditor5-ui 41.2.0 → 41.3.0-alpha.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 (100) hide show
  1. package/dist/content-index.css +4 -0
  2. package/dist/editor-index.css +445 -0
  3. package/dist/index.css +844 -0
  4. package/dist/index.css.map +1 -0
  5. package/dist/index.js +13857 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/types/arialiveannouncer.d.ts +98 -0
  8. package/dist/types/augmentation.d.ts +88 -0
  9. package/dist/types/autocomplete/autocompleteview.d.ts +81 -0
  10. package/dist/types/bindings/addkeyboardhandlingforgrid.d.ts +27 -0
  11. package/dist/types/bindings/clickoutsidehandler.d.ts +28 -0
  12. package/dist/types/bindings/csstransitiondisablermixin.d.ts +40 -0
  13. package/dist/types/bindings/draggableviewmixin.d.ts +46 -0
  14. package/dist/types/bindings/injectcsstransitiondisabler.d.ts +59 -0
  15. package/dist/types/bindings/preventdefault.d.ts +33 -0
  16. package/dist/types/bindings/submithandler.d.ts +57 -0
  17. package/dist/types/button/button.d.ts +175 -0
  18. package/dist/types/button/buttonlabel.d.ts +34 -0
  19. package/dist/types/button/buttonlabelview.d.ts +31 -0
  20. package/dist/types/button/buttonview.d.ts +181 -0
  21. package/dist/types/button/switchbuttonview.d.ts +45 -0
  22. package/dist/types/collapsible/collapsibleview.d.ts +70 -0
  23. package/dist/types/colorgrid/colorgridview.d.ts +132 -0
  24. package/dist/types/colorgrid/colortileview.d.ts +28 -0
  25. package/dist/types/colorgrid/utils.d.ts +47 -0
  26. package/dist/types/colorpicker/colorpickerview.d.ts +142 -0
  27. package/dist/types/colorpicker/utils.d.ts +48 -0
  28. package/dist/types/colorselector/colorgridsfragmentview.d.ts +195 -0
  29. package/dist/types/colorselector/colorpickerfragmentview.d.ts +129 -0
  30. package/dist/types/colorselector/colorselectorview.d.ts +242 -0
  31. package/dist/types/colorselector/documentcolorcollection.d.ts +70 -0
  32. package/dist/types/componentfactory.d.ts +81 -0
  33. package/dist/types/dialog/dialog.d.ts +273 -0
  34. package/dist/types/dialog/dialogactionsview.d.ts +69 -0
  35. package/dist/types/dialog/dialogcontentview.d.ts +27 -0
  36. package/dist/types/dialog/dialogview.d.ts +256 -0
  37. package/dist/types/dropdown/button/dropdownbutton.d.ts +25 -0
  38. package/dist/types/dropdown/button/dropdownbuttonview.d.ts +48 -0
  39. package/dist/types/dropdown/button/splitbuttonview.d.ts +162 -0
  40. package/dist/types/dropdown/dropdownpanelfocusable.d.ts +21 -0
  41. package/dist/types/dropdown/dropdownpanelview.d.ts +62 -0
  42. package/dist/types/dropdown/dropdownview.d.ts +315 -0
  43. package/dist/types/dropdown/utils.d.ts +235 -0
  44. package/dist/types/editableui/editableuiview.d.ts +72 -0
  45. package/dist/types/editableui/inline/inlineeditableuiview.d.ts +40 -0
  46. package/dist/types/editorui/accessibilityhelp/accessibilityhelp.d.ts +47 -0
  47. package/dist/types/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +35 -0
  48. package/dist/types/editorui/bodycollection.d.ts +55 -0
  49. package/dist/types/editorui/boxed/boxededitoruiview.d.ts +40 -0
  50. package/dist/types/editorui/editorui.d.ts +288 -0
  51. package/dist/types/editorui/editoruiview.d.ts +39 -0
  52. package/dist/types/editorui/poweredby.d.ts +71 -0
  53. package/dist/types/focuscycler.d.ts +245 -0
  54. package/dist/types/formheader/formheaderview.d.ts +59 -0
  55. package/dist/types/highlightedtext/highlightedtextview.d.ts +38 -0
  56. package/dist/types/icon/iconview.d.ts +88 -0
  57. package/dist/types/iframe/iframeview.d.ts +50 -0
  58. package/dist/types/index.d.ts +74 -0
  59. package/dist/types/input/inputbase.d.ts +107 -0
  60. package/dist/types/input/inputview.d.ts +36 -0
  61. package/dist/types/inputnumber/inputnumberview.d.ts +49 -0
  62. package/dist/types/inputtext/inputtextview.d.ts +18 -0
  63. package/dist/types/label/labelview.d.ts +36 -0
  64. package/dist/types/labeledfield/labeledfieldview.d.ts +187 -0
  65. package/dist/types/labeledfield/utils.d.ts +123 -0
  66. package/dist/types/labeledinput/labeledinputview.d.ts +125 -0
  67. package/dist/types/list/listitemgroupview.d.ts +59 -0
  68. package/dist/types/list/listitemview.d.ts +36 -0
  69. package/dist/types/list/listseparatorview.d.ts +18 -0
  70. package/dist/types/list/listview.d.ts +124 -0
  71. package/dist/types/model.d.ts +22 -0
  72. package/dist/types/notification/notification.d.ts +211 -0
  73. package/dist/types/panel/balloon/balloonpanelview.d.ts +685 -0
  74. package/dist/types/panel/balloon/contextualballoon.d.ts +299 -0
  75. package/dist/types/panel/sticky/stickypanelview.d.ts +156 -0
  76. package/dist/types/search/filteredview.d.ts +31 -0
  77. package/dist/types/search/searchinfoview.d.ts +45 -0
  78. package/dist/types/search/searchresultsview.d.ts +54 -0
  79. package/dist/types/search/text/searchtextqueryview.d.ts +76 -0
  80. package/dist/types/search/text/searchtextview.d.ts +219 -0
  81. package/dist/types/spinner/spinnerview.d.ts +25 -0
  82. package/dist/types/template.d.ts +942 -0
  83. package/dist/types/textarea/textareaview.d.ts +104 -0
  84. package/dist/types/toolbar/balloon/balloontoolbar.d.ts +117 -0
  85. package/dist/types/toolbar/block/blockbuttonview.d.ts +35 -0
  86. package/dist/types/toolbar/block/blocktoolbar.d.ts +153 -0
  87. package/dist/types/toolbar/normalizetoolbarconfig.d.ts +40 -0
  88. package/dist/types/toolbar/toolbarlinebreakview.d.ts +18 -0
  89. package/dist/types/toolbar/toolbarseparatorview.d.ts +18 -0
  90. package/dist/types/toolbar/toolbarview.d.ts +267 -0
  91. package/dist/types/tooltipmanager.d.ts +184 -0
  92. package/dist/types/view.d.ts +422 -0
  93. package/dist/types/viewcollection.d.ts +139 -0
  94. package/package.json +4 -3
  95. package/src/colorpicker/colorpickerview.js +0 -1
  96. package/src/index.d.ts +2 -2
  97. package/src/index.js +2 -1
  98. package/src/toolbar/toolbarview.js +2 -3
  99. package/theme/globals/globals.css +0 -1
  100. package/theme/globals/_reset.css +0 -13
@@ -0,0 +1,245 @@
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
+ * @module ui/focuscycler
7
+ */
8
+ import { type ArrayOrItem, type FocusTracker, type KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
9
+ import type View from './view.js';
10
+ import type ViewCollection from './viewcollection.js';
11
+ declare const FocusCycler_base: {
12
+ new (): import("@ckeditor/ckeditor5-utils").Emitter;
13
+ prototype: import("@ckeditor/ckeditor5-utils").Emitter;
14
+ };
15
+ /**
16
+ * A utility class that helps cycling over {@link module:ui/focuscycler~FocusableView focusable views} in a
17
+ * {@link module:ui/viewcollection~ViewCollection} when the focus is tracked by the
18
+ * {@link module:utils/focustracker~FocusTracker} instance. It helps implementing keyboard
19
+ * navigation in HTML forms, toolbars, lists and the like.
20
+ *
21
+ * To work properly it requires:
22
+ * * a collection of focusable (HTML `tabindex` attribute) views that implement the `focus()` method,
23
+ * * an associated focus tracker to determine which view is focused.
24
+ *
25
+ * A simple cycler setup can look like this:
26
+ *
27
+ * ```ts
28
+ * const focusables = new ViewCollection<FocusableView>();
29
+ * const focusTracker = new FocusTracker();
30
+ *
31
+ * // Add focusable views to the focus tracker.
32
+ * focusTracker.add( ... );
33
+ * ```
34
+ *
35
+ * Then, the cycler can be used manually:
36
+ *
37
+ * ```ts
38
+ * const cycler = new FocusCycler( { focusables, focusTracker } );
39
+ *
40
+ * // Will focus the first focusable view in #focusables.
41
+ * cycler.focusFirst();
42
+ *
43
+ * // Will log the next focusable item in #focusables.
44
+ * console.log( cycler.next );
45
+ * ```
46
+ *
47
+ * Alternatively, it can work side by side with the {@link module:utils/keystrokehandler~KeystrokeHandler}:
48
+ *
49
+ * ```ts
50
+ * const keystrokeHandler = new KeystrokeHandler();
51
+ *
52
+ * // Activate the keystroke handler.
53
+ * keystrokeHandler.listenTo( sourceOfEvents );
54
+ *
55
+ * const cycler = new FocusCycler( {
56
+ * focusables, focusTracker, keystrokeHandler,
57
+ * actions: {
58
+ * // When arrowup of arrowleft is detected by the #keystrokeHandler,
59
+ * // focusPrevious() will be called on the cycler.
60
+ * focusPrevious: [ 'arrowup', 'arrowleft' ],
61
+ * }
62
+ * } );
63
+ * ```
64
+ *
65
+ * Check out the {@glink framework/deep-dive/ui/focus-tracking "Deep dive into focus tracking"} guide to learn more.
66
+ */
67
+ export default class FocusCycler extends FocusCycler_base {
68
+ /**
69
+ * A {@link module:ui/focuscycler~FocusableView focusable views} collection that the cycler operates on.
70
+ */
71
+ readonly focusables: ViewCollection<FocusableView>;
72
+ /**
73
+ * A focus tracker instance that the cycler uses to determine the current focus
74
+ * state in {@link #focusables}.
75
+ */
76
+ readonly focusTracker: FocusTracker;
77
+ /**
78
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}
79
+ * which can respond to certain keystrokes and cycle the focus.
80
+ */
81
+ readonly keystrokeHandler?: KeystrokeHandler;
82
+ /**
83
+ * Actions that the cycler can take when a keystroke is pressed. Requires
84
+ * `options.keystrokeHandler` to be passed and working. When an action is
85
+ * performed, `preventDefault` and `stopPropagation` will be called on the event
86
+ * the keystroke fired in the DOM.
87
+ *
88
+ * ```ts
89
+ * actions: {
90
+ * // Will call #focusPrevious() when arrowleft or arrowup is pressed.
91
+ * focusPrevious: [ 'arrowleft', 'arrowup' ],
92
+ *
93
+ * // Will call #focusNext() when arrowdown is pressed.
94
+ * focusNext: 'arrowdown'
95
+ * }
96
+ * ```
97
+ */
98
+ readonly actions?: FocusCyclerActions;
99
+ /**
100
+ * Creates an instance of the focus cycler utility.
101
+ *
102
+ * @param options Configuration options.
103
+ */
104
+ constructor(options: {
105
+ focusables: ViewCollection<FocusableView>;
106
+ focusTracker: FocusTracker;
107
+ keystrokeHandler?: KeystrokeHandler;
108
+ actions?: FocusCyclerActions;
109
+ });
110
+ /**
111
+ * Returns the first focusable view in {@link #focusables}.
112
+ * Returns `null` if there is none.
113
+ *
114
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
115
+ */
116
+ get first(): FocusableView | null;
117
+ /**
118
+ * Returns the last focusable view in {@link #focusables}.
119
+ * Returns `null` if there is none.
120
+ *
121
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
122
+ */
123
+ get last(): FocusableView | null;
124
+ /**
125
+ * Returns the next focusable view in {@link #focusables} based on {@link #current}.
126
+ * Returns `null` if there is none.
127
+ *
128
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
129
+ */
130
+ get next(): FocusableView | null;
131
+ /**
132
+ * Returns the previous focusable view in {@link #focusables} based on {@link #current}.
133
+ * Returns `null` if there is none.
134
+ *
135
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
136
+ */
137
+ get previous(): FocusableView | null;
138
+ /**
139
+ * An index of the view in the {@link #focusables} which is focused according
140
+ * to {@link #focusTracker}. Returns `null` when there is no such view.
141
+ */
142
+ get current(): number | null;
143
+ /**
144
+ * Focuses the {@link #first} item in {@link #focusables}.
145
+ *
146
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
147
+ */
148
+ focusFirst(): void;
149
+ /**
150
+ * Focuses the {@link #last} item in {@link #focusables}.
151
+ *
152
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
153
+ */
154
+ focusLast(): void;
155
+ /**
156
+ * Focuses the {@link #next} item in {@link #focusables}.
157
+ *
158
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
159
+ */
160
+ focusNext(): void;
161
+ /**
162
+ * Focuses the {@link #previous} item in {@link #focusables}.
163
+ *
164
+ * **Note**: Hidden views (e.g. with `display: none`) are ignored.
165
+ */
166
+ focusPrevious(): void;
167
+ /**
168
+ * Focuses the given view if it exists.
169
+ *
170
+ * @param view The view to be focused
171
+ * @param direction The direction of the focus if the view has focusable children.
172
+ * @returns
173
+ */
174
+ private _focus;
175
+ /**
176
+ * Returns the next or previous focusable view in {@link #focusables} with respect
177
+ * to {@link #current}.
178
+ *
179
+ * @param step Either `1` for checking forward from {@link #current} or `-1` for checking backwards.
180
+ */
181
+ private _getDomFocusableItem;
182
+ }
183
+ /**
184
+ * A {@link module:ui/view~View} that can be focused (e.g. has `focus()` method).
185
+ */
186
+ export type FocusableView = View & {
187
+ /**
188
+ * Focuses the view.
189
+ *
190
+ * @param direction This optional parameter helps improve the UX by providing additional information about the direction the focus moved
191
+ * (e.g. in a complex view or a form). It is useful for views that host multiple focusable children (e.g. lists, toolbars):
192
+ * * `1` indicates that the focus moved forward and, in most cases, the first child of the focused view should get focused,
193
+ * * `-1` indicates that the focus moved backwards, and the last focusable child should get focused
194
+ *
195
+ * See {@link module:ui/focuscycler~FocusCycler#event:forwardCycle} and {@link module:ui/focuscycler~FocusCycler#event:backwardCycle}
196
+ * to learn more.
197
+ */
198
+ focus(direction?: 1 | -1): void;
199
+ };
200
+ /**
201
+ * A {@link module:ui/view~View} that hosts one or more of focusable children being managed by a {@link module:ui/focuscycler~FocusCycler}
202
+ * instance exposed under `focusCycler` property.
203
+ */
204
+ export type ViewWithFocusCycler = FocusableView & {
205
+ focusCycler: FocusCycler;
206
+ };
207
+ export interface FocusCyclerActions {
208
+ focusFirst?: ArrayOrItem<string>;
209
+ focusLast?: ArrayOrItem<string>;
210
+ focusNext?: ArrayOrItem<string>;
211
+ focusPrevious?: ArrayOrItem<string>;
212
+ }
213
+ /**
214
+ * Fired when the focus cycler is about to move the focus from the last focusable item
215
+ * to the first one.
216
+ *
217
+ * @eventName ~FocusCycler#forwardCycle
218
+ */
219
+ export type FocusCyclerForwardCycleEvent = {
220
+ name: 'forwardCycle';
221
+ args: [];
222
+ };
223
+ /**
224
+ * Fired when the focus cycler is about to move the focus from the first focusable item
225
+ * to the last one.
226
+ *
227
+ * @eventName ~FocusCycler#backwardCycle
228
+ */
229
+ export type FocusCyclerBackwardCycleEvent = {
230
+ name: 'backwardCycle';
231
+ args: [];
232
+ };
233
+ /**
234
+ * Checks whether a view is {@link ~FocusableView}.
235
+ *
236
+ * @param view A view to be checked.
237
+ */
238
+ export declare function isFocusable(view: View): view is FocusableView;
239
+ /**
240
+ * Checks whether a view is an instance of {@link ~ViewWithFocusCycler}.
241
+ *
242
+ * @param view A view to be checked.
243
+ */
244
+ export declare function isViewWithFocusCycler(view: View): view is ViewWithFocusCycler;
245
+ export {};
@@ -0,0 +1,59 @@
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
+ * @module ui/formheader/formheaderview
7
+ */
8
+ import View from '../view.js';
9
+ import type ViewCollection from '../viewcollection.js';
10
+ import IconView from '../icon/iconview.js';
11
+ import type { Locale } from '@ckeditor/ckeditor5-utils';
12
+ import '../../theme/components/formheader/formheader.css';
13
+ /**
14
+ * The class component representing a form header view. It should be used in more advanced forms to
15
+ * describe the main purpose of the form.
16
+ *
17
+ * By default the component contains a bolded label view that has to be set. The label is usually a short (at most 3-word) string.
18
+ * The component can also be extended by any other elements, like: icons, dropdowns, etc.
19
+ *
20
+ * It is used i.a.
21
+ * by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}
22
+ * and {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}.
23
+ *
24
+ * The latter is an example, where the component has been extended by {@link module:ui/dropdown/dropdownview~DropdownView} view.
25
+ */
26
+ export default class FormHeaderView extends View {
27
+ /**
28
+ * A collection of header items.
29
+ */
30
+ readonly children: ViewCollection;
31
+ /**
32
+ * The label of the header.
33
+ *
34
+ * @observable
35
+ */
36
+ label: string;
37
+ /**
38
+ * An additional CSS class added to the {@link #element}.
39
+ *
40
+ * @observable
41
+ */
42
+ class: string | null;
43
+ /**
44
+ * The icon view instance. Defined only if icon was passed in the constructor's options.
45
+ */
46
+ readonly iconView?: IconView;
47
+ /**
48
+ * Creates an instance of the form header class.
49
+ *
50
+ * @param locale The locale instance.
51
+ * @param options.label A label.
52
+ * @param options.class An additional class.
53
+ */
54
+ constructor(locale: Locale | undefined, options?: {
55
+ label?: string | null;
56
+ class?: string | null;
57
+ icon?: string | null;
58
+ });
59
+ }
@@ -0,0 +1,38 @@
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
+ * @module ui/highlightedtext/highlightedtextview
7
+ */
8
+ import View from '../view.js';
9
+ import '../../theme/components/highlightedtext/highlightedtext.css';
10
+ /**
11
+ * A class representing a view that displays a text which subset can be highlighted using the
12
+ * {@link #highlightText} method.
13
+ */
14
+ export default class HighlightedTextView extends View {
15
+ /**
16
+ * The text that can be highlighted using the {@link #highlightText} method.
17
+ *
18
+ * **Note:** When this property changes, the previous highlighting is removed.
19
+ *
20
+ * @observable
21
+ */
22
+ text: string | undefined;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ constructor();
27
+ /**
28
+ * Highlights view's {@link #text} according to the specified `RegExp`. If the passed RegExp is `null`, the
29
+ * highlighting is removed
30
+ *
31
+ * @param regExp
32
+ */
33
+ highlightText(regExp: RegExp | null): void;
34
+ /**
35
+ * Updates element's `innerHTML` with the passed content.
36
+ */
37
+ private _updateInnerHTML;
38
+ }
@@ -0,0 +1,88 @@
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
+ * @module ui/icon/iconview
7
+ */
8
+ import View from '../view.js';
9
+ import '../../theme/components/icon/icon.css';
10
+ /**
11
+ * The icon view class.
12
+ */
13
+ export default class IconView extends View {
14
+ /**
15
+ * The SVG source of the icon.
16
+ *
17
+ * The user must provide the entire XML string, not just the path. See the
18
+ * {@glink framework/architecture/ui-library#setting-label-icon-and-tooltip UI library} guide for details.
19
+ *
20
+ * @observable
21
+ */
22
+ content: string | undefined;
23
+ /**
24
+ * This attribute specifies the boundaries to which the
25
+ * icon content should stretch.
26
+ *
27
+ * @observable
28
+ * @default '0 0 20 20'
29
+ */
30
+ viewBox: string;
31
+ /**
32
+ * The fill color of the child `path.ck-icon__fill`.
33
+ *
34
+ * @observable
35
+ * @default ''
36
+ */
37
+ fillColor: string;
38
+ /**
39
+ * When set true (default), all parts of the icon inherit the fill color from the CSS `color` property of the
40
+ * icon's DOM parent.
41
+ *
42
+ * This effectively makes the icon monochromatic and allows it to change its fill color dynamically, for instance,
43
+ * when a {@link module:ui/button/buttonview~ButtonView} displays an icon and it switches between different states
44
+ * (pushed, hovered, etc.) the icon will follow along.
45
+ *
46
+ * **Note**: For the monochromatic icon to render properly, it must be made up of shapes that can be filled
47
+ * with color instead of, for instance, paths with strokes. Be sure to use the *outline stroke* tool
48
+ * (the name could be different in your vector graphics editor) before exporting your icon. Also, remove any
49
+ * excess `fill="..."` attributes that could break the color inheritance.
50
+ *
51
+ * **Note**: If you want to preserve the original look of your icon and disable dynamic color inheritance,
52
+ * set this flag to `false`.
53
+ *
54
+ * @observable
55
+ * @default true
56
+ */
57
+ isColorInherited: boolean;
58
+ /**
59
+ * Controls whether the icon is visible.
60
+ *
61
+ * @observable
62
+ * @default true
63
+ */
64
+ isVisible: boolean;
65
+ /**
66
+ * A list of presentational attributes that can be set on the `<svg>` element and should be preserved
67
+ * when the icon {@link module:ui/icon/iconview~IconView#content content} is loaded.
68
+ *
69
+ * See the [specification](https://www.w3.org/TR/SVG/styling.html#TermPresentationAttribute) to learn more.
70
+ */
71
+ private static presentationalAttributeNames;
72
+ /**
73
+ * @inheritDoc
74
+ */
75
+ constructor();
76
+ /**
77
+ * @inheritDoc
78
+ */
79
+ render(): void;
80
+ /**
81
+ * Updates the {@link #element} with the value of {@link #content}.
82
+ */
83
+ private _updateXMLContent;
84
+ /**
85
+ * Fills all child `path.ck-icon__fill` with the `#fillColor`.
86
+ */
87
+ private _colorFillPaths;
88
+ }
@@ -0,0 +1,50 @@
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
+ * @module ui/iframe/iframeview
7
+ */
8
+ import View from '../view.js';
9
+ import type { Locale } from '@ckeditor/ckeditor5-utils';
10
+ /**
11
+ * The iframe view class.
12
+ *
13
+ * ```ts
14
+ * const iframe = new IframeView();
15
+ *
16
+ * iframe.render();
17
+ * document.body.appendChild( iframe.element );
18
+ *
19
+ * iframe.on( 'loaded', () => {
20
+ * console.log( 'The iframe has loaded', iframe.element.contentWindow );
21
+ * } );
22
+ *
23
+ * iframe.element.src = 'https://ckeditor.com';
24
+ * ```
25
+ */
26
+ export default class IframeView extends View<HTMLIFrameElement> {
27
+ /**
28
+ * Creates a new instance of the iframe view.
29
+ *
30
+ * @param locale The locale instance.
31
+ */
32
+ constructor(locale?: Locale);
33
+ /**
34
+ * Renders the iframe's {@link #element} and returns a `Promise` for asynchronous
35
+ * child `contentDocument` loading process.
36
+ *
37
+ * @returns A promise which resolves once the iframe `contentDocument` has
38
+ * been {@link #event:loaded}.
39
+ */
40
+ render(): Promise<unknown>;
41
+ }
42
+ /**
43
+ * Fired when the DOM iframe's `contentDocument` finished loading.
44
+ *
45
+ * @eventName ~IframeView#loaded
46
+ */
47
+ export type IframeViewLoadedEvent = {
48
+ name: 'loaded';
49
+ args: [];
50
+ };
@@ -0,0 +1,74 @@
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
+ * @module ui
7
+ */
8
+ export { default as View, type UIViewRenderEvent } from './view.js';
9
+ export { default as clickOutsideHandler } from './bindings/clickoutsidehandler.js';
10
+ export { default as injectCssTransitionDisabler } from './bindings/injectcsstransitiondisabler.js';
11
+ export { default as CssTransitionDisablerMixin, type ViewWithCssTransitionDisabler } from './bindings/csstransitiondisablermixin.js';
12
+ export { default as submitHandler } from './bindings/submithandler.js';
13
+ export { default as addKeyboardHandlingForGrid } from './bindings/addkeyboardhandlingforgrid.js';
14
+ export { default as AccessibilityHelp } from './editorui/accessibilityhelp/accessibilityhelp.js';
15
+ export { default as BodyCollection } from './editorui/bodycollection.js';
16
+ export { type ButtonExecuteEvent } from './button/button.js';
17
+ export type { default as ButtonLabel } from './button/buttonlabel.js';
18
+ export { default as ButtonView } from './button/buttonview.js';
19
+ export { default as ButtonLabelView } from './button/buttonlabelview.js';
20
+ export { default as SwitchButtonView } from './button/switchbuttonview.js';
21
+ export { default as CollapsibleView } from './collapsible/collapsibleview.js';
22
+ export * from './colorgrid/utils.js';
23
+ export { default as ColorGridView, type ColorDefinition } from './colorgrid/colorgridview.js';
24
+ export { default as ColorTileView } from './colorgrid/colortileview.js';
25
+ export { default as ColorPickerView } from './colorpicker/colorpickerview.js';
26
+ export type { ColorPickerConfig, ColorPickerViewConfig, ColorPickerOutputFormat } from './colorpicker/utils.js';
27
+ export { default as ColorSelectorView, type ColorSelectorExecuteEvent, type ColorSelectorColorPickerCancelEvent, type ColorSelectorColorPickerShowEvent } from './colorselector/colorselectorview.js';
28
+ export { default as ComponentFactory } from './componentfactory.js';
29
+ export { default as Dialog } from './dialog/dialog.js';
30
+ export { default as DialogView, DialogViewPosition, type DialogViewMoveToEvent } from './dialog/dialogview.js';
31
+ export { default as DropdownView } from './dropdown/dropdownview.js';
32
+ export { default as DropdownPanelView } from './dropdown/dropdownpanelview.js';
33
+ export { default as DropdownButtonView } from './dropdown/button/dropdownbuttonview.js';
34
+ export { default as SplitButtonView } from './dropdown/button/splitbuttonview.js';
35
+ export * from './dropdown/utils.js';
36
+ export { default as EditorUI, type EditorUIReadyEvent, type EditorUIUpdateEvent } from './editorui/editorui.js';
37
+ export { default as EditorUIView } from './editorui/editoruiview.js';
38
+ export { default as BoxedEditorUIView } from './editorui/boxed/boxededitoruiview.js';
39
+ export { default as InlineEditableUIView } from './editableui/inline/inlineeditableuiview.js';
40
+ export { default as FormHeaderView } from './formheader/formheaderview.js';
41
+ export { default as FocusCycler, type FocusableView, type ViewWithFocusCycler, type FocusCyclerForwardCycleEvent, type FocusCyclerBackwardCycleEvent, isViewWithFocusCycler, isFocusable } from './focuscycler.js';
42
+ export { default as IconView } from './icon/iconview.js';
43
+ export { default as InputView } from './input/inputview.js';
44
+ export { default as InputTextView } from './inputtext/inputtextview.js';
45
+ export { default as InputNumberView } from './inputnumber/inputnumberview.js';
46
+ export { default as TextareaView, type TextareaViewUpdateEvent } from './textarea/textareaview.js';
47
+ export { default as IframeView } from './iframe/iframeview.js';
48
+ export { default as LabelView } from './label/labelview.js';
49
+ export { type LabeledFieldViewCreator, default as LabeledFieldView } from './labeledfield/labeledfieldview.js';
50
+ export * from './labeledfield/utils.js';
51
+ export { default as ListItemGroupView } from './list/listitemgroupview.js';
52
+ export { default as ListItemView } from './list/listitemview.js';
53
+ export { default as ListView } from './list/listview.js';
54
+ export { default as Notification } from './notification/notification.js';
55
+ export { default as ViewModel } from './model.js';
56
+ export { default as BalloonPanelView } from './panel/balloon/balloonpanelview.js';
57
+ export { default as ContextualBalloon } from './panel/balloon/contextualballoon.js';
58
+ export { default as StickyPanelView } from './panel/sticky/stickypanelview.js';
59
+ export { default as AutocompleteView, type AutocompleteViewConfig, type AutocompleteResultsView } from './autocomplete/autocompleteview.js';
60
+ export { default as SearchTextView, type SearchTextViewSearchEvent, type SearchTextViewConfig } from './search/text/searchtextview.js';
61
+ export { default as SearchInfoView } from './search/searchinfoview.js';
62
+ export type { default as FilteredView, FilteredViewExecuteEvent } from './search/filteredview.js';
63
+ export { default as HighlightedTextView } from './highlightedtext/highlightedtextview.js';
64
+ export { default as TooltipManager } from './tooltipmanager.js';
65
+ export { default as Template, type TemplateDefinition } from './template.js';
66
+ export { default as SpinnerView } from './spinner/spinnerview.js';
67
+ export { default as ToolbarView } from './toolbar/toolbarview.js';
68
+ export { default as ToolbarLineBreakView } from './toolbar/toolbarlinebreakview.js';
69
+ export { default as ToolbarSeparatorView } from './toolbar/toolbarseparatorview.js';
70
+ export { default as normalizeToolbarConfig } from './toolbar/normalizetoolbarconfig.js';
71
+ export { default as BalloonToolbar, type BalloonToolbarShowEvent } from './toolbar/balloon/balloontoolbar.js';
72
+ export { default as BlockToolbar } from './toolbar/block/blocktoolbar.js';
73
+ export { default as ViewCollection } from './viewcollection.js';
74
+ import './augmentation.js';
@@ -0,0 +1,107 @@
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
+ * @module ui/input/inputbase
7
+ */
8
+ import View from '../view.js';
9
+ import { FocusTracker, type Locale } from '@ckeditor/ckeditor5-utils';
10
+ /**
11
+ * The base input view class.
12
+ */
13
+ export default abstract class InputBase<TElement extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> extends View<TElement> {
14
+ /**
15
+ * Stores information about the editor UI focus and propagates it so various plugins and components
16
+ * are unified as a focus group.
17
+ */
18
+ readonly focusTracker: FocusTracker;
19
+ /**
20
+ * The value of the input.
21
+ *
22
+ * @observable
23
+ */
24
+ value: string | undefined;
25
+ /**
26
+ * The `id` attribute of the input (i.e. to pair with a `<label>` element).
27
+ *
28
+ * @observable
29
+ */
30
+ id: string | undefined;
31
+ /**
32
+ * The `placeholder` attribute of the input.
33
+ *
34
+ * @observable
35
+ */
36
+ placeholder: string | undefined;
37
+ /**
38
+ * Controls whether the input view is in read-only mode.
39
+ *
40
+ * @observable
41
+ */
42
+ isReadOnly: boolean;
43
+ /**
44
+ * Set to `true` when the field has some error. Usually controlled via
45
+ * {@link module:ui/labeledinput/labeledinputview~LabeledInputView#errorText}.
46
+ *
47
+ * @observable
48
+ */
49
+ hasError: boolean;
50
+ /**
51
+ * The `id` of the element describing this field, e.g. when it has
52
+ * some error; it helps screen readers read the error text.
53
+ *
54
+ * @observable
55
+ */
56
+ ariaDescribedById: string | undefined;
57
+ /**
58
+ * An observable flag set to `true` when the input is currently focused by the user.
59
+ * Set to `false` otherwise.
60
+ *
61
+ * @readonly
62
+ * @observable
63
+ * @default false
64
+ */
65
+ isFocused: boolean;
66
+ /**
67
+ * An observable flag set to `true` when the input contains no text, i.e.
68
+ * when {@link #value} is `''`, `null`, or `false`.
69
+ *
70
+ * @readonly
71
+ * @observable
72
+ * @default true
73
+ */
74
+ isEmpty: boolean;
75
+ /**
76
+ * @inheritDoc
77
+ */
78
+ constructor(locale?: Locale);
79
+ /**
80
+ * @inheritDoc
81
+ */
82
+ render(): void;
83
+ /**
84
+ * @inheritDoc
85
+ */
86
+ destroy(): void;
87
+ /**
88
+ * Moves the focus to the input and selects the value.
89
+ */
90
+ select(): void;
91
+ /**
92
+ * Focuses the input.
93
+ */
94
+ focus(): void;
95
+ /**
96
+ * Resets the value of the input
97
+ */
98
+ reset(): void;
99
+ /**
100
+ * Updates the {@link #isEmpty} property value on demand.
101
+ */
102
+ protected _updateIsEmpty(): void;
103
+ /**
104
+ * Sets the `value` property of the {@link #element DOM element} on demand.
105
+ */
106
+ private _setDomElementValue;
107
+ }