@vaadin/rich-text-editor 25.0.0-alpha9 → 25.0.0-beta1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/rich-text-editor",
3
- "version": "25.0.0-alpha9",
3
+ "version": "25.0.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,9 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/styles/*-base-styles.d.ts",
25
- "!src/styles/*-base-styles.js",
26
- "theme",
27
24
  "vaadin-*.d.ts",
28
25
  "vaadin-*.js",
29
26
  "vendor",
@@ -38,27 +35,28 @@
38
35
  ],
39
36
  "dependencies": {
40
37
  "@open-wc/dedupe-mixin": "^1.3.0",
41
- "@vaadin/button": "25.0.0-alpha9",
42
- "@vaadin/component-base": "25.0.0-alpha9",
43
- "@vaadin/confirm-dialog": "25.0.0-alpha9",
44
- "@vaadin/overlay": "25.0.0-alpha9",
45
- "@vaadin/text-field": "25.0.0-alpha9",
46
- "@vaadin/tooltip": "25.0.0-alpha9",
47
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
48
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
38
+ "@vaadin/a11y-base": "25.0.0-beta1",
39
+ "@vaadin/button": "25.0.0-beta1",
40
+ "@vaadin/component-base": "25.0.0-beta1",
41
+ "@vaadin/confirm-dialog": "25.0.0-beta1",
42
+ "@vaadin/overlay": "25.0.0-beta1",
43
+ "@vaadin/text-field": "25.0.0-beta1",
44
+ "@vaadin/tooltip": "25.0.0-beta1",
45
+ "@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
49
46
  "lit": "^3.0.0"
50
47
  },
51
48
  "devDependencies": {
52
- "@vaadin/a11y-base": "25.0.0-alpha9",
53
- "@vaadin/chai-plugins": "25.0.0-alpha9",
54
- "@vaadin/test-runner-commands": "25.0.0-alpha9",
49
+ "@vaadin/a11y-base": "25.0.0-alpha17",
50
+ "@vaadin/chai-plugins": "25.0.0-beta1",
51
+ "@vaadin/test-runner-commands": "25.0.0-beta1",
55
52
  "@vaadin/testing-helpers": "^2.0.0",
56
- "sinon": "^18.0.0"
53
+ "@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
54
+ "sinon": "^21.0.0"
57
55
  },
58
56
  "cvdlName": "vaadin-rich-text-editor",
59
57
  "web-types": [
60
58
  "web-types.json",
61
59
  "web-types.lit.json"
62
60
  ],
63
- "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
61
+ "gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
64
62
  }
@@ -12,25 +12,27 @@ import { css } from 'lit';
12
12
 
13
13
  export const icons = css`
14
14
  :host {
15
- --_vaadin-icon-align-center: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 10H6M21 6H3M21 14H3M18 18H6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
16
- --_vaadin-icon-align-left: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 10H3M20 6H3M20 14H3M16 18H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
17
- --_vaadin-icon-align-right: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 10H8M21 6H4M21 14H4M21 18H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
15
+ --_vaadin-icon-align-center: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H3"/><path d="M17 12H7"/><path d="M19 19H5"/></svg>');
16
+ --_vaadin-icon-align-left: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H3"/><path d="M15 12H3"/><path d="M17 19H3"/></svg>');
17
+ --_vaadin-icon-align-right: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H3"/><path d="M21 12H9"/><path d="M21 19H7"/></svg>');
18
18
  --_vaadin-icon-background: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.6 12L12 9.4L8 13.4L10.575 16L14.6 12ZM13.425 8L16 10.575L20 6.6L17.4 4L13.425 8ZM11.325 7.275L16.725 12.675L12 17.425C11.6 17.825 11.1292 18.025 10.5875 18.025C10.0458 18.025 9.575 17.825 9.175 17.425L8.5 18H3.5L6.65 14.875C6.25 14.475 6.04167 13.9958 6.025 13.4375C6.00833 12.8792 6.2 12.4 6.6 12L11.325 7.275ZM11.325 7.275L16 2.6C16.4 2.2 16.8708 2 17.4125 2C17.9542 2 18.425 2.2 18.825 2.6L21.425 5.175C21.825 5.575 22.025 6.04583 22.025 6.5875C22.025 7.12917 21.825 7.6 21.425 8L16.725 12.675L11.325 7.275Z" fill="currentColor"/></svg>');
19
19
  --_vaadin-icon-bold: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linejoin="round" d="M6.75 3.744h-.753v8.25h7.125a4.125 4.125 0 0 0 0-8.25H6.75Zm0 0v.38m0 16.122h6.747a4.5 4.5 0 0 0 0-9.001h-7.5v9h.753Zm0 0v-.37m0-15.751h6a3.75 3.75 0 1 1 0 7.5h-6m0-7.5v7.5m0 0v8.25m0-8.25h6.375a4.125 4.125 0 0 1 0 8.25H6.75m.747-15.38h4.875a3.375 3.375 0 0 1 0 6.75H7.497v-6.75Zm0 7.5h5.25a3.75 3.75 0 0 1 0 7.5h-5.25v-7.5Z" /></svg>');
20
20
  --_vaadin-icon-clear: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"/></svg>');
21
- --_vaadin-icon-code: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16 18L22 12L16 6M8 6L2 12L8 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
21
+ --_vaadin-icon-code: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m16 18 6-6-6-6"/><path d="m8 6-6 6 6 6"/></svg>');
22
22
  --_vaadin-icon-color: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.5 17L10.75 3H13.25L18.5 17H16.1L14.85 13.4H9.2L7.9 17H5.5ZM9.9 11.4H14.1L12.05 5.6H11.95L9.9 11.4Z" fill="currentColor"/></svg>');
23
23
  --_vaadin-icon-color-underline: url('data:image/svg+xml,<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2 24V20H22V24H2Z" fill="currentColor"/></svg>');
24
- --_vaadin-icon-h1: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M2.243 4.493v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501m4.501-8.627 2.25-1.5v10.126m0 0h-2.25m2.25 0h2.25" /></svg>');
25
- --_vaadin-icon-h2: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 19.5H16.5v-1.609a2.25 2.25 0 0 1 1.244-2.012l2.89-1.445c.651-.326 1.116-.955 1.116-1.683 0-.498-.04-.987-.118-1.463-.135-.825-.835-1.422-1.668-1.489a15.202 15.202 0 0 0-3.464.12M2.243 4.492v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501" /></svg>');
26
- --_vaadin-icon-h3: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M20.905 14.626a4.52 4.52 0 0 1 .738 3.603c-.154.695-.794 1.143-1.504 1.208a15.194 15.194 0 0 1-3.639-.104m4.405-4.707a4.52 4.52 0 0 0 .738-3.603c-.154-.696-.794-1.144-1.504-1.209a15.19 15.19 0 0 0-3.639.104m4.405 4.708H18M2.243 4.493v7.5m0 0v7.502m0-7.501h10.5m0-7.5v7.5m0 0v7.501" /></svg>');
27
- --_vaadin-icon-italic: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M5.248 20.246H9.05m0 0h3.696m-3.696 0 5.893-16.502m0 0h-3.697m3.697 0h3.803" /></svg>');
28
- --_vaadin-icon-list-number: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.242 5.992h12m-12 6.003H20.24m-12 5.999h12M4.117 7.495v-3.75H2.99m1.125 3.75H2.99m1.125 0H5.24m-1.92 2.577a1.125 1.125 0 1 1 1.591 1.59l-1.83 1.83h2.16M2.99 15.745h1.125a1.125 1.125 0 0 1 0 2.25H3.74m0-.002h.375a1.125 1.125 0 0 1 0 2.25H2.99" /></svg>');
29
- --_vaadin-icon-list-bullet: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" /></svg>');
30
- --_vaadin-icon-quote: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M0 0h24v24H0z" fill="none"/><path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/></svg>');
31
- --_vaadin-icon-strikethrough: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 12a8.912 8.912 0 0 1-.318-.079c-1.585-.424-2.904-1.247-3.76-2.236-.873-1.009-1.265-2.19-.968-3.301.59-2.2 3.663-3.29 6.863-2.432A8.186 8.186 0 0 1 16.5 5.21M6.42 17.81c.857.99 2.176 1.812 3.761 2.237 3.2.858 6.274-.23 6.863-2.431.233-.868.044-1.779-.465-2.617M3.75 12h16.5" /></svg>');
32
- --_vaadin-icon-subscript: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M760-160v-80q0-17 11.5-28.5T800-280h80v-40H760v-40h120q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h120v40H760Zm-525-80 185-291-172-269h106l124 200h4l123-200h107L539-531l186 291H618L482-457h-4L342-240H235Z"/></svg>');
33
- --_vaadin-icon-superscript: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"><path d="M760-600v-80q0-17 11.5-28.5T800-720h80v-40H760v-40h120q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h120v40H760ZM235-160l185-291-172-269h106l124 200h4l123-200h107L539-451l186 291H618L482-377h-4L342-160H235Z"/></svg>');
34
- --_vaadin-icon-underline: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M17.995 3.744v7.5a6 6 0 1 1-12 0v-7.5m-2.25 16.502h16.5" /></svg>');
24
+ --_vaadin-icon-h1: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h8"/><path d="M4 18V6"/><path d="M12 18V6"/><path d="m17 12 3-2v8"/></svg>');
25
+ --_vaadin-icon-h2: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h8"/><path d="M4 18V6"/><path d="M12 18V6"/><path d="M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1"/></svg>');
26
+ --_vaadin-icon-h3: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h8"/><path d="M4 18V6"/><path d="M12 18V6"/><path d="M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2"/><path d="M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2"/></svg>');
27
+ --_vaadin-icon-indent: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H11"/><path d="M21 12H11"/><path d="M21 19H11"/><path d="m3 8 4 4-4 4"/></svg>');
28
+ --_vaadin-icon-italic: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" x2="10" y1="4" y2="4"/><line x1="14" x2="5" y1="20" y2="20"/><line x1="15" x2="9" y1="4" y2="20"/></svg>');
29
+ --_vaadin-icon-list-number: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5h10"/><path d="M11 12h10"/><path d="M11 19h10"/><path d="M4 4h1v5"/><path d="M4 9h2"/><path d="M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02"/></svg>');
30
+ --_vaadin-icon-list-bullet: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h.01"/><path d="M3 12h.01"/><path d="M3 19h.01"/><path d="M8 5h13"/><path d="M8 12h13"/><path d="M8 19h13"/></svg>');
31
+ --_vaadin-icon-outdent: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 5H11"/><path d="M21 12H11"/><path d="M21 19H11"/><path d="m7 8-4 4 4 4"/></svg>');
32
+ --_vaadin-icon-quote: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 5H3"/><path d="M21 12H8"/><path d="M21 19H8"/><path d="M3 12v7"/></svg>');
33
+ --_vaadin-icon-strikethrough: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4H9a3 3 0 0 0-2.83 4"/><path d="M14 12a4 4 0 0 1 0 8H6"/><line x1="4" x2="20" y1="12" y2="12"/></svg>');
34
+ --_vaadin-icon-subscript: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m4 5 8 8"/><path d="m12 5-8 8"/><path d="M20 19h-4c0-1.5.44-2 1.5-2.5S20 15.33 20 14c0-.47-.17-.93-.48-1.29a2.11 2.11 0 0 0-2.62-.44c-.42.24-.74.62-.9 1.07"/></svg>');
35
+ --_vaadin-icon-superscript: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m4 19 8-8"/><path d="m12 19-8-8"/><path d="M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"/></svg>');
36
+ --_vaadin-icon-underline: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4v6a6 6 0 0 0 12 0V4"/><line x1="4" x2="20" y1="20" y2="20"/></svg>');
35
37
  }
36
38
  `;
@@ -15,17 +15,11 @@ const base = css`
15
15
  :host {
16
16
  background: var(--vaadin-rich-text-editor-background, var(--vaadin-background-color));
17
17
  border: var(--vaadin-input-field-border-width, 1px) solid
18
- var(--vaadin-input-field-border-color, var(--vaadin-border-color-strong));
18
+ var(--vaadin-input-field-border-color, var(--vaadin-border-color));
19
19
  border-radius: var(--vaadin-input-field-border-radius, var(--vaadin-radius-m));
20
20
  box-sizing: border-box;
21
21
  display: flex;
22
22
  flex-direction: column;
23
- overflow: hidden;
24
- }
25
-
26
- :host(:focus-within) {
27
- outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
28
- outline-offset: -1px;
29
23
  }
30
24
 
31
25
  :host([hidden]) {
@@ -47,10 +41,23 @@ const base = css`
47
41
  flex-direction: column;
48
42
  max-height: inherit;
49
43
  min-height: inherit;
44
+ border-radius: inherit;
45
+ contain: paint;
46
+ }
47
+
48
+ .vaadin-rich-text-editor-container:has([part='content']:focus-within),
49
+ .vaadin-rich-text-editor-container:has([part~='toolbar-button']:active) {
50
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
50
51
  }
51
52
  `;
52
53
 
53
54
  export const content = css`
55
+ :host {
56
+ --_item-indent: var(--vaadin-padding-s);
57
+ --_marker-indent: var(--vaadin-gap-s);
58
+ --_list-indent: var(--_item-indent);
59
+ }
60
+
54
61
  [part='content'] {
55
62
  box-sizing: border-box;
56
63
  display: flex;
@@ -58,6 +65,7 @@ export const content = css`
58
65
  flex-direction: column;
59
66
  overflow: hidden;
60
67
  position: relative;
68
+ cursor: text;
61
69
  }
62
70
 
63
71
  /*
@@ -79,16 +87,15 @@ export const content = css`
79
87
 
80
88
  .ql-editor {
81
89
  box-sizing: border-box;
82
- color: var(--vaadin-rich-text-editor-editor-color, var(--vaadin-color));
90
+ color: var(--vaadin-rich-text-editor-content-color, var(--vaadin-text-color));
83
91
  flex: 1;
84
- font-size: var(--vaadin-rich-text-editor-editor-font-size, inherit);
92
+ font-size: var(--vaadin-rich-text-editor-content-font-size, inherit);
85
93
  height: 100%;
86
- line-height: var(--vaadin-rich-text-editor-editor-line-height, inherit);
94
+ line-height: var(--vaadin-rich-text-editor-content-line-height, inherit);
87
95
  outline: none;
88
96
  overflow-y: auto;
89
- padding: var(--vaadin-rich-text-editor-editor-padding, var(--vaadin-padding-container));
90
- tab-size: 4;
91
- -moz-tab-size: 4;
97
+ padding: var(--vaadin-rich-text-editor-content-padding, var(--vaadin-padding-container));
98
+ tab-size: calc(var(--_item-indent) * 2);
92
99
  text-align: left;
93
100
  white-space: pre-wrap;
94
101
  word-wrap: break-word;
@@ -118,32 +125,261 @@ export const content = css`
118
125
  .ql-align-right {
119
126
  text-align: right;
120
127
  }
128
+
129
+ .ql-code-block-container {
130
+ font-family: monospace;
131
+ background-color: var(--vaadin-background-container);
132
+ border-radius: var(--vaadin-radius-s);
133
+ white-space: pre-wrap;
134
+ margin-block: var(--vaadin-padding-s);
135
+ padding: var(--vaadin-padding-container);
136
+ }
137
+
138
+ /* lists */
139
+ .ql-editor ol {
140
+ padding-inline-start: var(--_list-indent);
141
+ }
142
+
143
+ .ql-editor li {
144
+ list-style-type: none;
145
+ position: relative;
146
+ padding-inline-start: var(--_item-indent);
147
+ }
148
+
149
+ .ql-editor li > .ql-ui::before {
150
+ display: inline-block;
151
+ width: var(--_item-indent);
152
+ margin-inline: calc(var(--_item-indent) * -1) var(--_marker-indent);
153
+ text-align: end;
154
+ white-space: nowrap;
155
+ }
156
+
157
+ .ql-editor li[data-list='bullet'] > .ql-ui::before {
158
+ content: '\\2022';
159
+ font-size: 1.5rem;
160
+ line-height: 1rem;
161
+ align-self: baseline;
162
+ vertical-align: text-top;
163
+ }
164
+
165
+ .ql-editor p,
166
+ .ql-editor h1,
167
+ .ql-editor h2,
168
+ .ql-editor h3,
169
+ .ql-editor h4,
170
+ .ql-editor h5,
171
+ .ql-editor h6 {
172
+ counter-set: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
173
+ }
174
+
175
+ /* 0 */
176
+ .ql-editor li[data-list='ordered'] {
177
+ counter-increment: list-0;
178
+ }
179
+
180
+ .ql-editor li[data-list='ordered'] > .ql-ui::before {
181
+ content: counter(list-0, decimal) '. ';
182
+ }
183
+
184
+ /* 1 */
185
+ .ql-editor li[data-list='ordered'].ql-indent-1 {
186
+ counter-increment: list-1;
187
+ }
188
+
189
+ .ql-editor li[data-list='ordered'].ql-indent-1 > .ql-ui::before {
190
+ content: counter(list-1, lower-alpha) '. ';
191
+ }
192
+
193
+ .ql-editor li[data-list].ql-indent-1 {
194
+ counter-set: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
195
+ }
196
+
197
+ /* 2 */
198
+ .ql-editor li[data-list='ordered'].ql-indent-2 {
199
+ counter-increment: list-2;
200
+ }
201
+
202
+ .ql-editor li[data-list='ordered'].ql-indent-2 > .ql-ui::before {
203
+ content: counter(list-2, lower-roman) '. ';
204
+ }
205
+
206
+ .ql-editor li[data-list].ql-indent-2 {
207
+ counter-set: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
208
+ }
209
+
210
+ /* 3 */
211
+ .ql-editor li[data-list='ordered'].ql-indent-3 {
212
+ counter-increment: list-3;
213
+ }
214
+
215
+ .ql-editor li[data-list='ordered'].ql-indent-3 > .ql-ui::before {
216
+ content: counter(list-3, decimal) '. ';
217
+ }
218
+
219
+ .ql-editor li[data-list].ql-indent-3 {
220
+ counter-set: list-4 list-5 list-6 list-7 list-8 list-9;
221
+ }
222
+
223
+ /* 4 */
224
+ .ql-editor li[data-list='ordered'].ql-indent-4 {
225
+ counter-increment: list-4;
226
+ }
227
+
228
+ .ql-editor li[data-list='ordered'].ql-indent-4 > .ql-ui::before {
229
+ content: counter(list-4, lower-alpha) '. ';
230
+ }
231
+
232
+ .ql-editor li[data-list].ql-indent-4 {
233
+ counter-set: list-5 list-6 list-7 list-8 list-9;
234
+ }
235
+
236
+ /* 5 */
237
+ .ql-editor li[data-list='ordered'].ql-indent-5 {
238
+ counter-increment: list-5;
239
+ }
240
+
241
+ .ql-editor li[data-list='ordered'].ql-indent-5 > .ql-ui::before {
242
+ content: counter(list-5, lower-roman) '. ';
243
+ }
244
+
245
+ .ql-editor li[data-list].ql-indent-5 {
246
+ counter-set: list-6 list-7 list-8 list-9;
247
+ }
248
+
249
+ /* 6 */
250
+ .ql-editor li[data-list='ordered'].ql-indent-6 {
251
+ counter-increment: list-6;
252
+ }
253
+
254
+ .ql-editor li[data-list='ordered'].ql-indent-6 > .ql-ui::before {
255
+ content: counter(list-6, decimal) '. ';
256
+ }
257
+
258
+ .ql-editor li[data-list].ql-indent-6 {
259
+ counter-set: list-7 list-8 list-9;
260
+ }
261
+
262
+ /* 7 */
263
+ .ql-editor li[data-list='ordered'].ql-indent-7 {
264
+ counter-increment: list-7;
265
+ }
266
+
267
+ .ql-editor li[data-list='ordered'].ql-indent-7 > .ql-ui::before {
268
+ content: counter(list-7, lower-alpha) '. ';
269
+ }
270
+
271
+ .ql-editor li[data-list].ql-indent-7 {
272
+ counter-set: list-8 list-9;
273
+ }
274
+
275
+ /* 8 */
276
+ .ql-editor li[data-list='ordered'].ql-indent-8 {
277
+ counter-increment: list-8;
278
+ }
279
+
280
+ .ql-editor li[data-list='ordered'].ql-indent-8 > .ql-ui::before {
281
+ content: counter(list-8, lower-roman) '. ';
282
+ }
283
+
284
+ .ql-editor li[data-list].ql-indent-8 {
285
+ counter-set: list-9;
286
+ }
287
+
288
+ /* indent 1 */
289
+ .ql-editor .ql-indent-1 {
290
+ padding-inline-start: calc(var(--_item-indent) * 2);
291
+ }
292
+
293
+ .ql-editor li.ql-indent-1 {
294
+ padding-inline-start: calc(var(--_list-indent) + var(--_item-indent) * 2);
295
+ }
296
+
297
+ /* indent 2 */
298
+ .ql-editor .ql-indent-2 {
299
+ padding-inline-start: calc(var(--_item-indent) * 4);
300
+ }
301
+
302
+ .ql-editor li.ql-indent-2 {
303
+ padding-inline-start: calc(var(--_list-indent) * 2 + var(--_item-indent) * 3);
304
+ }
305
+
306
+ /* indent 3 */
307
+ .ql-editor .ql-indent-3 {
308
+ padding-inline-start: calc(var(--_item-indent) * 6);
309
+ }
310
+
311
+ .ql-editor li.ql-indent-3 {
312
+ padding-inline-start: calc(var(--_list-indent) * 3 + var(--_item-indent) * 4);
313
+ }
314
+
315
+ /* indent 4 */
316
+ .ql-editor .ql-indent-4 {
317
+ padding-inline-start: calc(var(--_item-indent) * 8);
318
+ }
319
+
320
+ .ql-editor li.ql-indent-4 {
321
+ padding-inline-start: calc(var(--_list-indent) * 4 + var(--_item-indent) * 5);
322
+ }
323
+
324
+ /* indent 5 */
325
+ .ql-editor .ql-indent-5 {
326
+ padding-inline-start: calc(var(--_item-indent) * 10);
327
+ }
328
+
329
+ .ql-editor li.ql-indent-5 {
330
+ padding-inline-start: calc(var(--_list-indent) * 5 + var(--_item-indent) * 6);
331
+ }
332
+
333
+ /* indent 6 */
334
+ .ql-editor .ql-indent-6 {
335
+ padding-inline-start: calc(var(--_item-indent) * 12);
336
+ }
337
+
338
+ .ql-editor li.ql-indent-6 {
339
+ padding-inline-start: calc(var(--_list-indent) * 6 + var(--_item-indent) * 7);
340
+ }
341
+
342
+ /* indent 7 */
343
+ .ql-editor .ql-indent-7 {
344
+ padding-inline-start: calc(var(--_item-indent) * 14);
345
+ }
346
+
347
+ .ql-editor li.ql-indent-7 {
348
+ padding-inline-start: calc(var(--_list-indent) * 7 + var(--_item-indent) * 8);
349
+ }
350
+
351
+ /* indent 8 */
352
+ .ql-editor .ql-indent-8 {
353
+ padding-inline-start: calc(var(--_item-indent) * 16);
354
+ }
355
+
356
+ .ql-editor li.ql-indent-8 {
357
+ padding-inline-start: calc(var(--_list-indent) * 8 + var(--_item-indent) * 9);
358
+ }
121
359
  /* quill core end */
122
360
 
123
361
  blockquote {
124
- border-inline-start: 4px solid var(--vaadin-border-color);
362
+ border-inline-start: 4px solid var(--vaadin-border-color-secondary);
125
363
  margin: var(--vaadin-padding-container);
126
- padding-inline-start: var(--vaadin-padding);
364
+ padding-inline-start: var(--vaadin-padding-s);
127
365
  }
128
366
 
129
- code,
130
- pre {
367
+ code {
131
368
  background-color: var(--vaadin-background-container);
132
369
  border-radius: var(--vaadin-radius-s);
370
+ padding: 0.125rem 0.25rem;
133
371
  }
134
372
 
135
- pre {
136
- white-space: pre-wrap;
137
- margin-block: var(--vaadin-padding);
138
- padding: var(--vaadin-padding-container);
373
+ img {
374
+ max-width: 100%;
139
375
  }
140
376
 
141
- code {
142
- padding: 0.125rem 0.25rem;
377
+ .ql-editor > :is(p, ol, ul, blockquote, .ql-code-block-container):first-child {
378
+ margin-top: 0;
143
379
  }
144
380
 
145
- img {
146
- max-width: 100%;
381
+ .ql-editor > :is(p, ol, ul, blockquote, .ql-code-block-container):last-child {
382
+ margin-bottom: 0;
147
383
  }
148
384
 
149
385
  /* RTL specific styles */
@@ -159,8 +395,8 @@ const toolbar = css`
159
395
  display: flex;
160
396
  flex-shrink: 0;
161
397
  flex-wrap: wrap;
162
- gap: var(--vaadin-rich-text-editor-toolbar-gap, var(--vaadin-gap-container-inline));
163
- padding: var(--vaadin-rich-text-editor-toolbar-padding, var(--vaadin-padding));
398
+ gap: var(--vaadin-rich-text-editor-toolbar-gap, var(--vaadin-gap-s));
399
+ padding: var(--vaadin-rich-text-editor-toolbar-padding, var(--vaadin-padding-s));
164
400
  }
165
401
 
166
402
  [part~='toolbar-group'] {
@@ -172,7 +408,7 @@ const toolbar = css`
172
408
  border: var(--vaadin-rich-text-editor-toolbar-button-border-width, 1px) solid
173
409
  var(--vaadin-rich-text-editor-toolbar-button-border-color, transparent);
174
410
  border-radius: var(--vaadin-rich-text-editor-toolbar-button-border-radius, var(--vaadin-radius-m));
175
- color: var(--vaadin-rich-text-editor-toolbar-button-text-color, var(--vaadin-color));
411
+ color: var(--vaadin-rich-text-editor-toolbar-button-text-color, var(--vaadin-text-color));
176
412
  cursor: var(--vaadin-clickable-cursor);
177
413
  flex-shrink: 0;
178
414
  font-family: var(--vaadin-rich-text-editor-toolbar-button-font-family, inherit);
@@ -185,20 +421,23 @@ const toolbar = css`
185
421
  }
186
422
 
187
423
  [part~='toolbar-button']::before {
188
- background: currentcolor;
424
+ background: currentColor;
189
425
  content: '';
190
426
  display: block;
191
427
  height: var(--vaadin-icon-size, 1lh);
192
428
  width: var(--vaadin-icon-size, 1lh);
429
+ mask-size: var(--vaadin-icon-visual-size, 100%);
430
+ mask-repeat: no-repeat;
431
+ mask-position: 50%;
193
432
  }
194
433
 
195
- [part~='toolbar-button']:focus {
434
+ [part~='toolbar-button']:focus-visible {
196
435
  outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
197
436
  outline-offset: 1px;
198
437
  z-index: 1;
199
438
  }
200
439
 
201
- [part~='toolbar-button'][on],
440
+ [part~='toolbar-button-pressed'],
202
441
  [part~='toolbar-button'][aria-expanded='true'] {
203
442
  --vaadin-rich-text-editor-toolbar-button-background: var(--vaadin-background-container-strong);
204
443
  }
@@ -283,6 +522,14 @@ const toolbar = css`
283
522
  mask-image: var(--_vaadin-icon-list-bullet);
284
523
  }
285
524
 
525
+ [part~='toolbar-button-outdent']::before {
526
+ mask-image: var(--_vaadin-icon-outdent);
527
+ }
528
+
529
+ [part~='toolbar-button-indent']::before {
530
+ mask-image: var(--_vaadin-icon-indent);
531
+ }
532
+
286
533
  [part~='toolbar-button-align-left']::before {
287
534
  mask-image: var(--_vaadin-icon-align-left);
288
535
  }
@@ -320,11 +567,11 @@ const toolbar = css`
320
567
  background: CanvasText;
321
568
  }
322
569
 
323
- [part~='toolbar-button'][on] {
570
+ [part~='toolbar-button-pressed'] {
324
571
  background: Highlight;
325
572
  }
326
573
 
327
- [part~='toolbar-button'][on]::before {
574
+ [part~='toolbar-button-pressed']::before {
328
575
  background: HighlightText;
329
576
  }
330
577
  }
@@ -18,7 +18,7 @@ export const richTextEditorPopupOverlay = css`
18
18
 
19
19
  [part='content'] {
20
20
  display: grid;
21
- gap: var(--vaadin-rich-text-editor-overlay-gap, var(--vaadin-gap-container-inline));
21
+ gap: var(--vaadin-rich-text-editor-overlay-gap, var(--vaadin-gap-s));
22
22
  grid-template-columns: repeat(7, minmax(0, 1fr));
23
23
  }
24
24
 
@@ -27,6 +27,8 @@ export interface RichTextEditorI18n {
27
27
  superscript?: string;
28
28
  listOrdered?: string;
29
29
  listBullet?: string;
30
+ outdent?: string;
31
+ indent?: string;
30
32
  alignLeft?: string;
31
33
  alignCenter?: string;
32
34
  alignRight?: string;