@vaadin/field-highlighter 25.0.0-alpha3 → 25.0.0-alpha5

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/field-highlighter",
3
- "version": "25.0.0-alpha3",
3
+ "version": "25.0.0-alpha5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,30 +33,29 @@
33
33
  "field"
34
34
  ],
35
35
  "dependencies": {
36
- "@vaadin/a11y-base": "25.0.0-alpha3",
37
- "@vaadin/component-base": "25.0.0-alpha3",
38
- "@vaadin/overlay": "25.0.0-alpha3",
39
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha3",
40
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha3",
36
+ "@vaadin/a11y-base": "25.0.0-alpha5",
37
+ "@vaadin/component-base": "25.0.0-alpha5",
38
+ "@vaadin/overlay": "25.0.0-alpha5",
39
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha5",
40
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha5",
41
41
  "lit": "^3.0.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@vaadin/chai-plugins": "25.0.0-alpha3",
45
- "@vaadin/checkbox": "25.0.0-alpha3",
46
- "@vaadin/checkbox-group": "25.0.0-alpha3",
47
- "@vaadin/combo-box": "25.0.0-alpha3",
48
- "@vaadin/date-picker": "25.0.0-alpha3",
49
- "@vaadin/date-time-picker": "25.0.0-alpha3",
50
- "@vaadin/item": "25.0.0-alpha3",
51
- "@vaadin/list-box": "25.0.0-alpha3",
52
- "@vaadin/radio-group": "25.0.0-alpha3",
53
- "@vaadin/select": "25.0.0-alpha3",
54
- "@vaadin/test-runner-commands": "25.0.0-alpha3",
44
+ "@vaadin/chai-plugins": "25.0.0-alpha5",
45
+ "@vaadin/checkbox": "25.0.0-alpha5",
46
+ "@vaadin/checkbox-group": "25.0.0-alpha5",
47
+ "@vaadin/date-picker": "25.0.0-alpha5",
48
+ "@vaadin/date-time-picker": "25.0.0-alpha5",
49
+ "@vaadin/item": "25.0.0-alpha5",
50
+ "@vaadin/list-box": "25.0.0-alpha5",
51
+ "@vaadin/radio-group": "25.0.0-alpha5",
52
+ "@vaadin/select": "25.0.0-alpha5",
53
+ "@vaadin/test-runner-commands": "25.0.0-alpha5",
55
54
  "@vaadin/testing-helpers": "^2.0.0",
56
- "@vaadin/text-area": "25.0.0-alpha3",
57
- "@vaadin/text-field": "25.0.0-alpha3",
58
- "@vaadin/time-picker": "25.0.0-alpha3",
55
+ "@vaadin/text-area": "25.0.0-alpha5",
56
+ "@vaadin/text-field": "25.0.0-alpha5",
57
+ "@vaadin/time-picker": "25.0.0-alpha5",
59
58
  "sinon": "^18.0.0"
60
59
  },
61
- "gitHead": "8367dd20a47f53ca5589ad349a8e286ec2673055"
60
+ "gitHead": "7dc87bb2a3cae81ed53259fa10b58f990d50c6fd"
62
61
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const fieldOutlineStyles: CSSResult;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css } from 'lit';
7
+
8
+ export const fieldOutlineStyles = css`
9
+ :host {
10
+ display: block;
11
+ box-sizing: border-box;
12
+ position: absolute;
13
+ inset: 0;
14
+ width: 100%;
15
+ height: 100%;
16
+ pointer-events: none;
17
+ user-select: none;
18
+ opacity: 0;
19
+ --_active-user-color: transparent;
20
+ }
21
+
22
+ :host([has-active-user]) {
23
+ opacity: 1;
24
+ }
25
+ `;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import type { CSSResult } from 'lit';
7
+
8
+ export const userTagStyles: CSSResult;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css } from 'lit';
7
+
8
+ export const userTagStyles = css`
9
+ :host {
10
+ display: block;
11
+ box-sizing: border-box;
12
+ margin: 0 0 var(--vaadin-user-tag-offset);
13
+ opacity: 0;
14
+ height: 1.3rem;
15
+ transition: opacity 0.2s ease-in-out;
16
+ background-color: var(--vaadin-user-tag-color);
17
+ color: #fff;
18
+ cursor: default;
19
+ -webkit-user-select: none;
20
+ user-select: none;
21
+ --vaadin-user-tag-offset: 4px;
22
+ }
23
+
24
+ :host(.show) {
25
+ opacity: 1;
26
+ }
27
+
28
+ :host(:last-of-type) {
29
+ margin-bottom: 0;
30
+ }
31
+
32
+ [part='name'] {
33
+ overflow: hidden;
34
+ white-space: nowrap;
35
+ text-overflow: ellipsis;
36
+ box-sizing: border-box;
37
+ padding: 2px 4px;
38
+ height: 1.3rem;
39
+ font-size: 13px;
40
+ }
41
+ `;
@@ -5,8 +5,4 @@
5
5
  */
6
6
  import type { CSSResult } from 'lit';
7
7
 
8
- export const fieldOutlineStyles: CSSResult;
9
-
10
- export const userTagStyles: CSSResult;
11
-
12
8
  export const userTagsOverlayStyles: CSSResult;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import { css } from 'lit';
7
+ import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-core-styles.js';
8
+
9
+ const userTagsOverlay = css`
10
+ :host {
11
+ background: transparent;
12
+ box-shadow: none;
13
+ }
14
+
15
+ :scope [part='overlay'] {
16
+ box-shadow: none;
17
+ background: transparent;
18
+ position: relative;
19
+ left: -4px;
20
+ padding: 4px;
21
+ outline: none;
22
+ overflow: visible;
23
+ }
24
+
25
+ ::slotted([part='tags']) {
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: flex-start;
29
+ }
30
+
31
+ :host([dir='rtl']) [part='overlay'] {
32
+ left: auto;
33
+ right: -4px;
34
+ }
35
+
36
+ :scope [part='content'] {
37
+ padding: 0;
38
+ }
39
+
40
+ :host([opening]),
41
+ :host([closing]) {
42
+ animation: 0.14s user-tags-overlay-dummy-animation;
43
+ }
44
+
45
+ @keyframes user-tags-overlay-dummy-animation {
46
+ 0% {
47
+ opacity: 1;
48
+ }
49
+
50
+ 100% {
51
+ opacity: 1;
52
+ }
53
+ }
54
+ `;
55
+
56
+ export const userTagsOverlayStyles = [overlayStyles, userTagsOverlay];
@@ -7,10 +7,9 @@ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { fieldOutlineStyles } from './vaadin-field-highlighter-styles.js';
12
-
13
- registerStyles('vaadin-field-outline', fieldOutlineStyles, { moduleId: 'vaadin-field-outline-styles' });
10
+ import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
11
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { fieldOutlineStyles } from './styles/vaadin-field-outline-core-styles.js';
14
13
 
15
14
  /**
16
15
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
@@ -20,11 +19,15 @@ registerStyles('vaadin-field-outline', fieldOutlineStyles, { moduleId: 'vaadin-f
20
19
  * @mixes ThemableMixin
21
20
  * @private
22
21
  */
23
- export class FieldOutline extends ThemableMixin(DirMixin(PolylitMixin(LitElement))) {
22
+ export class FieldOutline extends ThemableMixin(DirMixin(CSSInjectionMixin(PolylitMixin(LitElement)))) {
24
23
  static get is() {
25
24
  return 'vaadin-field-outline';
26
25
  }
27
26
 
27
+ static get styles() {
28
+ return fieldOutlineStyles;
29
+ }
30
+
28
31
  static get properties() {
29
32
  return {
30
33
  /**
@@ -7,8 +7,9 @@ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
+ import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
10
11
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
- import { userTagStyles } from './vaadin-field-highlighter-styles.js';
12
+ import { userTagStyles } from './styles/vaadin-user-tag-core-styles.js';
12
13
 
13
14
  /**
14
15
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
@@ -19,7 +20,7 @@ import { userTagStyles } from './vaadin-field-highlighter-styles.js';
19
20
  * @mixes ThemableMixin
20
21
  * @private
21
22
  */
22
- export class UserTag extends ThemableMixin(DirMixin(PolylitMixin(LitElement))) {
23
+ export class UserTag extends ThemableMixin(DirMixin(CSSInjectionMixin(PolylitMixin(LitElement)))) {
23
24
  static get is() {
24
25
  return 'vaadin-user-tag';
25
26
  }
@@ -9,9 +9,9 @@ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
10
  import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
11
11
  import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
12
- import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
12
+ import { CSSInjectionMixin } from '@vaadin/vaadin-themable-mixin/css-injection-mixin.js';
13
13
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
- import { userTagsOverlayStyles } from './vaadin-field-highlighter-styles.js';
14
+ import { userTagsOverlayStyles } from './styles/vaadin-user-tags-overlay-core-styles.js';
15
15
 
16
16
  /**
17
17
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
@@ -24,13 +24,15 @@ import { userTagsOverlayStyles } from './vaadin-field-highlighter-styles.js';
24
24
  * @mixes ThemableMixin
25
25
  * @private
26
26
  */
27
- class UserTagsOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement))))) {
27
+ class UserTagsOverlay extends PositionMixin(
28
+ OverlayMixin(DirMixin(ThemableMixin(CSSInjectionMixin(PolylitMixin(LitElement))))),
29
+ ) {
28
30
  static get is() {
29
31
  return 'vaadin-user-tags-overlay';
30
32
  }
31
33
 
32
34
  static get styles() {
33
- return [overlayStyles, userTagsOverlayStyles];
35
+ return userTagsOverlayStyles;
34
36
  }
35
37
 
36
38
  /** @protected */
@@ -1,107 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
-
8
- export const fieldOutlineStyles = css`
9
- :host {
10
- display: block;
11
- box-sizing: border-box;
12
- position: absolute;
13
- inset: 0;
14
- width: 100%;
15
- height: 100%;
16
- pointer-events: none;
17
- user-select: none;
18
- opacity: 0;
19
- --_active-user-color: transparent;
20
- }
21
-
22
- :host([has-active-user]) {
23
- opacity: 1;
24
- }
25
- `;
26
-
27
- export const userTagStyles = css`
28
- :host {
29
- display: block;
30
- box-sizing: border-box;
31
- margin: 0 0 var(--vaadin-user-tag-offset);
32
- opacity: 0;
33
- height: 1.3rem;
34
- transition: opacity 0.2s ease-in-out;
35
- background-color: var(--vaadin-user-tag-color);
36
- color: #fff;
37
- cursor: default;
38
- -webkit-user-select: none;
39
- user-select: none;
40
- --vaadin-user-tag-offset: 4px;
41
- }
42
-
43
- :host(.show) {
44
- opacity: 1;
45
- }
46
-
47
- :host(:last-of-type) {
48
- margin-bottom: 0;
49
- }
50
-
51
- [part='name'] {
52
- overflow: hidden;
53
- white-space: nowrap;
54
- text-overflow: ellipsis;
55
- box-sizing: border-box;
56
- padding: 2px 4px;
57
- height: 1.3rem;
58
- font-size: 13px;
59
- }
60
- `;
61
-
62
- export const userTagsOverlayStyles = css`
63
- :host {
64
- background: transparent;
65
- box-shadow: none;
66
- }
67
-
68
- :scope [part='overlay'] {
69
- box-shadow: none;
70
- background: transparent;
71
- position: relative;
72
- left: -4px;
73
- padding: 4px;
74
- outline: none;
75
- overflow: visible;
76
- }
77
-
78
- ::slotted([part='tags']) {
79
- display: flex;
80
- flex-direction: column;
81
- align-items: flex-start;
82
- }
83
-
84
- :host([dir='rtl']) [part='overlay'] {
85
- left: auto;
86
- right: -4px;
87
- }
88
-
89
- :scope [part='content'] {
90
- padding: 0;
91
- }
92
-
93
- :host([opening]),
94
- :host([closing]) {
95
- animation: 0.14s user-tags-overlay-dummy-animation;
96
- }
97
-
98
- @keyframes user-tags-overlay-dummy-animation {
99
- 0% {
100
- opacity: 1;
101
- }
102
-
103
- 100% {
104
- opacity: 1;
105
- }
106
- }
107
- `;