@vaadin/field-highlighter 24.2.0-alpha5 → 24.2.0-alpha6

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": "24.2.0-alpha5",
3
+ "version": "24.2.0-alpha6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,30 +34,30 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@polymer/polymer": "^3.0.0",
37
- "@vaadin/component-base": "24.2.0-alpha5",
38
- "@vaadin/overlay": "24.2.0-alpha5",
39
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha5",
40
- "@vaadin/vaadin-material-styles": "24.2.0-alpha5",
41
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha5",
37
+ "@vaadin/component-base": "24.2.0-alpha6",
38
+ "@vaadin/overlay": "24.2.0-alpha6",
39
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha6",
40
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha6",
41
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha6",
42
42
  "lit": "^2.0.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/a11y-base": "24.2.0-alpha5",
47
- "@vaadin/checkbox": "24.2.0-alpha5",
48
- "@vaadin/checkbox-group": "24.2.0-alpha5",
49
- "@vaadin/combo-box": "24.2.0-alpha5",
50
- "@vaadin/date-picker": "24.2.0-alpha5",
51
- "@vaadin/date-time-picker": "24.2.0-alpha5",
52
- "@vaadin/item": "24.2.0-alpha5",
53
- "@vaadin/list-box": "24.2.0-alpha5",
54
- "@vaadin/radio-group": "24.2.0-alpha5",
55
- "@vaadin/select": "24.2.0-alpha5",
46
+ "@vaadin/a11y-base": "24.2.0-alpha6",
47
+ "@vaadin/checkbox": "24.2.0-alpha6",
48
+ "@vaadin/checkbox-group": "24.2.0-alpha6",
49
+ "@vaadin/combo-box": "24.2.0-alpha6",
50
+ "@vaadin/date-picker": "24.2.0-alpha6",
51
+ "@vaadin/date-time-picker": "24.2.0-alpha6",
52
+ "@vaadin/item": "24.2.0-alpha6",
53
+ "@vaadin/list-box": "24.2.0-alpha6",
54
+ "@vaadin/radio-group": "24.2.0-alpha6",
55
+ "@vaadin/select": "24.2.0-alpha6",
56
56
  "@vaadin/testing-helpers": "^0.4.3",
57
- "@vaadin/text-area": "24.2.0-alpha5",
58
- "@vaadin/text-field": "24.2.0-alpha5",
59
- "@vaadin/time-picker": "24.2.0-alpha5",
57
+ "@vaadin/text-area": "24.2.0-alpha6",
58
+ "@vaadin/text-field": "24.2.0-alpha6",
59
+ "@vaadin/time-picker": "24.2.0-alpha6",
60
60
  "sinon": "^13.0.2"
61
61
  },
62
- "gitHead": "73db22a5e8993e3ce48d1e6540d30eff9cb5c257"
62
+ "gitHead": "3ef6e6cd66919b3ef7637e42916e4c54656beb51"
63
63
  }
@@ -3,74 +3,86 @@
3
3
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
6
+ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
7
9
  import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
8
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
+ import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
11
+ import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
12
 
10
- registerStyles(
11
- 'vaadin-user-tags-overlay',
12
- css`
13
- :host {
14
- background: transparent;
15
- box-shadow: none;
16
- }
13
+ const userTagsOverlayStyles = css`
14
+ :host {
15
+ background: transparent;
16
+ box-shadow: none;
17
+ }
17
18
 
18
- [part='overlay'] {
19
- box-shadow: none;
20
- background: transparent;
21
- position: relative;
22
- left: -4px;
23
- padding: 4px;
24
- outline: none;
25
- overflow: visible;
26
- }
19
+ [part='overlay'] {
20
+ box-shadow: none;
21
+ background: transparent;
22
+ position: relative;
23
+ left: -4px;
24
+ padding: 4px;
25
+ outline: none;
26
+ overflow: visible;
27
+ }
27
28
 
28
- ::slotted([part='tags']) {
29
- display: flex;
30
- flex-direction: column;
31
- align-items: flex-start;
32
- }
29
+ ::slotted([part='tags']) {
30
+ display: flex;
31
+ flex-direction: column;
32
+ align-items: flex-start;
33
+ }
33
34
 
34
- :host([dir='rtl']) [part='overlay'] {
35
- left: auto;
36
- right: -4px;
37
- }
35
+ :host([dir='rtl']) [part='overlay'] {
36
+ left: auto;
37
+ right: -4px;
38
+ }
38
39
 
39
- [part='content'] {
40
- padding: 0;
41
- }
40
+ [part='content'] {
41
+ padding: 0;
42
+ }
42
43
 
43
- :host([opening]),
44
- :host([closing]) {
45
- animation: 0.14s user-tags-overlay-dummy-animation;
46
- }
44
+ :host([opening]),
45
+ :host([closing]) {
46
+ animation: 0.14s user-tags-overlay-dummy-animation;
47
+ }
47
48
 
48
- @keyframes user-tags-overlay-dummy-animation {
49
- 0% {
50
- opacity: 1;
51
- }
49
+ @keyframes user-tags-overlay-dummy-animation {
50
+ 0% {
51
+ opacity: 1;
52
+ }
52
53
 
53
- 100% {
54
- opacity: 1;
55
- }
54
+ 100% {
55
+ opacity: 1;
56
56
  }
57
- `,
58
- );
57
+ }
58
+ `;
59
+
60
+ registerStyles('vaadin-user-tags-overlay', [overlayStyles, userTagsOverlayStyles]);
59
61
 
60
62
  /**
61
63
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
62
64
  *
63
- * @extends Overlay
65
+ * @extends HTMLElement
66
+ * @mixes PositionMixin
67
+ * @mixes OverlayMixin
68
+ * @mixes DirMixin
69
+ * @mixes ThemableMixin
64
70
  * @private
65
71
  */
66
- class UserTagsOverlay extends PositionMixin(Overlay) {
72
+ class UserTagsOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
67
73
  static get is() {
68
74
  return 'vaadin-user-tags-overlay';
69
75
  }
70
76
 
71
- ready() {
72
- super.ready();
73
- this.$.overlay.setAttribute('tabindex', '-1');
77
+ static get template() {
78
+ return html`
79
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
80
+ <div part="overlay" id="overlay">
81
+ <div part="content" id="content">
82
+ <slot></slot>
83
+ </div>
84
+ </div>
85
+ `;
74
86
  }
75
87
  }
76
88
 
@@ -7,35 +7,39 @@ import '@vaadin/vaadin-lumo-styles/color.js';
7
7
  import '@vaadin/vaadin-lumo-styles/spacing.js';
8
8
  import '@vaadin/vaadin-lumo-styles/style.js';
9
9
  import '@vaadin/vaadin-lumo-styles/typography.js';
10
+ import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
10
11
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
12
 
12
13
  registerStyles(
13
14
  'vaadin-user-tags-overlay',
14
- css`
15
- [part='overlay'] {
16
- will-change: opacity, transform;
17
- }
15
+ [
16
+ overlay,
17
+ css`
18
+ [part='overlay'] {
19
+ will-change: opacity, transform;
20
+ }
18
21
 
19
- :host([opening]) [part='overlay'] {
20
- animation: 0.1s lumo-user-tags-enter ease-out both;
21
- }
22
+ :host([opening]) [part='overlay'] {
23
+ animation: 0.1s lumo-user-tags-enter ease-out both;
24
+ }
22
25
 
23
- @keyframes lumo-user-tags-enter {
24
- 0% {
25
- opacity: 0;
26
+ @keyframes lumo-user-tags-enter {
27
+ 0% {
28
+ opacity: 0;
29
+ }
26
30
  }
27
- }
28
31
 
29
- :host([closing]) [part='overlay'] {
30
- animation: 0.1s lumo-user-tags-exit both;
31
- }
32
+ :host([closing]) [part='overlay'] {
33
+ animation: 0.1s lumo-user-tags-exit both;
34
+ }
32
35
 
33
- @keyframes lumo-user-tags-exit {
34
- 100% {
35
- opacity: 0;
36
+ @keyframes lumo-user-tags-exit {
37
+ 100% {
38
+ opacity: 0;
39
+ }
36
40
  }
37
- }
38
- `,
41
+ `,
42
+ ],
39
43
  {
40
44
  moduleId: 'lumo-user-tags-overlay',
41
45
  },
@@ -3,6 +3,5 @@
3
3
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import '@vaadin/overlay/theme/lumo/vaadin-overlay.js';
7
6
  import './vaadin-user-tags-styles.js';
8
7
  import '../../src/vaadin-user-tags.js';
@@ -6,8 +6,13 @@
6
6
  import '@vaadin/vaadin-material-styles/color.js';
7
7
  import '@vaadin/vaadin-material-styles/shadow.js';
8
8
  import '@vaadin/vaadin-material-styles/typography.js';
9
+ import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';
9
10
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
 
12
+ registerStyles('vaadin-user-tags-overlay', [overlay], {
13
+ moduleId: 'material-user-tags-overlay',
14
+ });
15
+
11
16
  registerStyles(
12
17
  'vaadin-user-tag',
13
18
  css`
@@ -3,6 +3,5 @@
3
3
  * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import '@vaadin/overlay/theme/material/vaadin-overlay.js';
7
6
  import './vaadin-user-tags-styles.js';
8
7
  import '../../src/vaadin-user-tags.js';