@vaadin/rich-text-editor 25.0.0-alpha15 → 25.0.0-alpha17
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/package.json +14 -14
- package/src/styles/vaadin-rich-text-editor-base-styles.js +1 -7
- package/src/vaadin-rich-text-editor-mixin.js +13 -7
- package/src/vaadin-rich-text-editor-popup.js +2 -2
- package/src/vaadin-rich-text-editor.js +6 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/confirm-dialog": "25.0.0-
|
|
41
|
-
"@vaadin/overlay": "25.0.0-
|
|
42
|
-
"@vaadin/text-field": "25.0.0-
|
|
43
|
-
"@vaadin/tooltip": "25.0.0-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
38
|
+
"@vaadin/button": "25.0.0-alpha17",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha17",
|
|
40
|
+
"@vaadin/confirm-dialog": "25.0.0-alpha17",
|
|
41
|
+
"@vaadin/overlay": "25.0.0-alpha17",
|
|
42
|
+
"@vaadin/text-field": "25.0.0-alpha17",
|
|
43
|
+
"@vaadin/tooltip": "25.0.0-alpha17",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha17",
|
|
45
45
|
"lit": "^3.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
49
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
48
|
+
"@vaadin/a11y-base": "25.0.0-alpha17",
|
|
49
|
+
"@vaadin/chai-plugins": "25.0.0-alpha17",
|
|
50
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha17",
|
|
51
51
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
53
|
-
"sinon": "^
|
|
52
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha17",
|
|
53
|
+
"sinon": "^21.0.0"
|
|
54
54
|
},
|
|
55
55
|
"cvdlName": "vaadin-rich-text-editor",
|
|
56
56
|
"web-types": [
|
|
57
57
|
"web-types.json",
|
|
58
58
|
"web-types.lit.json"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "8264c71309907be99368b09414f0f8d7f591e0b9"
|
|
61
61
|
}
|
|
@@ -368,12 +368,6 @@ export const content = css`
|
|
|
368
368
|
padding: 0.125rem 0.25rem;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
pre {
|
|
372
|
-
white-space: pre-wrap;
|
|
373
|
-
margin-block: var(--vaadin-padding-s);
|
|
374
|
-
padding: var(--vaadin-padding-container);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
371
|
img {
|
|
378
372
|
max-width: 100%;
|
|
379
373
|
}
|
|
@@ -417,7 +411,7 @@ const toolbar = css`
|
|
|
417
411
|
}
|
|
418
412
|
|
|
419
413
|
[part~='toolbar-button']::before {
|
|
420
|
-
background:
|
|
414
|
+
background: currentColor;
|
|
421
415
|
content: '';
|
|
422
416
|
display: block;
|
|
423
417
|
height: var(--vaadin-icon-size, 1lh);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
11
|
import '../vendor/vaadin-quill.js';
|
|
12
|
+
import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
12
13
|
import { timeOut } from '@vaadin/component-base/src/async.js';
|
|
13
14
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
14
15
|
import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
|
|
@@ -412,9 +413,9 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
412
413
|
// Set up tooltip to show when hovering or focusing toolbar buttons
|
|
413
414
|
this._tooltip = document.createElement('vaadin-tooltip');
|
|
414
415
|
this._tooltip.slot = 'tooltip';
|
|
415
|
-
//
|
|
416
|
-
// tooltip being in the light DOM
|
|
417
|
-
this._tooltip.ariaTarget =
|
|
416
|
+
// Set ariaTarget to null, as toolbar buttons already have aria-label,
|
|
417
|
+
// and also cannot be linked with the tooltip being in the light DOM
|
|
418
|
+
this._tooltip.ariaTarget = null;
|
|
418
419
|
this.append(this._tooltip);
|
|
419
420
|
|
|
420
421
|
const buttons = this.shadowRoot.querySelectorAll('[part~="toolbar-button"]');
|
|
@@ -425,13 +426,16 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
425
426
|
}
|
|
426
427
|
|
|
427
428
|
/** @private */
|
|
428
|
-
__showTooltip(
|
|
429
|
-
|
|
429
|
+
__showTooltip({ type, target }) {
|
|
430
|
+
// Only show tooltip when focused with keyboard
|
|
431
|
+
if (type === 'focusin' && !isKeyboardActive()) {
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
430
434
|
this._tooltip.target = target;
|
|
431
435
|
this._tooltip.text = target.ariaLabel;
|
|
432
436
|
this._tooltip._stateController.open({
|
|
433
|
-
focus:
|
|
434
|
-
hover:
|
|
437
|
+
focus: type === 'focusin',
|
|
438
|
+
hover: type === 'mouseenter',
|
|
435
439
|
});
|
|
436
440
|
}
|
|
437
441
|
|
|
@@ -662,6 +666,7 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
662
666
|
|
|
663
667
|
/** @private */
|
|
664
668
|
__onColorClick() {
|
|
669
|
+
this._tooltip.opened = false;
|
|
665
670
|
this._colorEditing = true;
|
|
666
671
|
}
|
|
667
672
|
|
|
@@ -678,6 +683,7 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
678
683
|
|
|
679
684
|
/** @private */
|
|
680
685
|
__onBackgroundClick() {
|
|
686
|
+
this._tooltip.opened = false;
|
|
681
687
|
this._backgroundEditing = true;
|
|
682
688
|
}
|
|
683
689
|
|
|
@@ -174,11 +174,11 @@ class RichTextEditorPopupOverlay extends PositionMixin(
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Override method from OverlayFocusMixin to use owner as
|
|
177
|
+
* Override method from OverlayFocusMixin to use owner as focus trap root
|
|
178
178
|
* @protected
|
|
179
179
|
* @override
|
|
180
180
|
*/
|
|
181
|
-
get
|
|
181
|
+
get _focusTrapRoot() {
|
|
182
182
|
return this.owner;
|
|
183
183
|
}
|
|
184
184
|
}
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED