@vaadin/field-highlighter 24.2.0-dev.f254716fe → 24.3.0-alpha2

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-dev.f254716fe",
3
+ "version": "24.3.0-alpha2",
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-dev.f254716fe",
38
- "@vaadin/overlay": "24.2.0-dev.f254716fe",
39
- "@vaadin/vaadin-lumo-styles": "24.2.0-dev.f254716fe",
40
- "@vaadin/vaadin-material-styles": "24.2.0-dev.f254716fe",
41
- "@vaadin/vaadin-themable-mixin": "24.2.0-dev.f254716fe",
37
+ "@vaadin/component-base": "24.3.0-alpha2",
38
+ "@vaadin/overlay": "24.3.0-alpha2",
39
+ "@vaadin/vaadin-lumo-styles": "24.3.0-alpha2",
40
+ "@vaadin/vaadin-material-styles": "24.3.0-alpha2",
41
+ "@vaadin/vaadin-themable-mixin": "24.3.0-alpha2",
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-dev.f254716fe",
47
- "@vaadin/checkbox": "24.2.0-dev.f254716fe",
48
- "@vaadin/checkbox-group": "24.2.0-dev.f254716fe",
49
- "@vaadin/combo-box": "24.2.0-dev.f254716fe",
50
- "@vaadin/date-picker": "24.2.0-dev.f254716fe",
51
- "@vaadin/date-time-picker": "24.2.0-dev.f254716fe",
52
- "@vaadin/item": "24.2.0-dev.f254716fe",
53
- "@vaadin/list-box": "24.2.0-dev.f254716fe",
54
- "@vaadin/radio-group": "24.2.0-dev.f254716fe",
55
- "@vaadin/select": "24.2.0-dev.f254716fe",
56
- "@vaadin/testing-helpers": "^0.4.3",
57
- "@vaadin/text-area": "24.2.0-dev.f254716fe",
58
- "@vaadin/text-field": "24.2.0-dev.f254716fe",
59
- "@vaadin/time-picker": "24.2.0-dev.f254716fe",
46
+ "@vaadin/a11y-base": "24.3.0-alpha2",
47
+ "@vaadin/checkbox": "24.3.0-alpha2",
48
+ "@vaadin/checkbox-group": "24.3.0-alpha2",
49
+ "@vaadin/combo-box": "24.3.0-alpha2",
50
+ "@vaadin/date-picker": "24.3.0-alpha2",
51
+ "@vaadin/date-time-picker": "24.3.0-alpha2",
52
+ "@vaadin/item": "24.3.0-alpha2",
53
+ "@vaadin/list-box": "24.3.0-alpha2",
54
+ "@vaadin/radio-group": "24.3.0-alpha2",
55
+ "@vaadin/select": "24.3.0-alpha2",
56
+ "@vaadin/testing-helpers": "^0.5.0",
57
+ "@vaadin/text-area": "24.3.0-alpha2",
58
+ "@vaadin/text-field": "24.3.0-alpha2",
59
+ "@vaadin/time-picker": "24.3.0-alpha2",
60
60
  "sinon": "^13.0.2"
61
61
  },
62
- "gitHead": "da54950b9f8c14c6451ede0d426e16a489c7fb9b"
62
+ "gitHead": "0fd437292fa2a2f65e29b424d2456909ad2d684b"
63
63
  }
@@ -6,6 +6,7 @@
6
6
  import './vaadin-field-outline.js';
7
7
  import './vaadin-user-tags.js';
8
8
  import { announce } from '@vaadin/a11y-base/src/announce.js';
9
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
10
  import { CheckboxGroupObserver } from './fields/vaadin-checkbox-group-observer.js';
10
11
  import { DatePickerObserver } from './fields/vaadin-date-picker-observer.js';
11
12
  import { DateTimePickerObserver } from './fields/vaadin-date-time-picker-observer.js';
@@ -151,8 +152,14 @@ export class FieldHighlighterController {
151
152
  * by configuring a reactive controller for a field instance.
152
153
  *
153
154
  * See https://vaadin.com/collaboration for Collaboration Engine documentation.
155
+ *
156
+ * @customElement
154
157
  */
155
158
  export class FieldHighlighter extends HTMLElement {
159
+ static get is() {
160
+ return 'vaadin-field-highlighter';
161
+ }
162
+
156
163
  static init(field) {
157
164
  if (!field._highlighterController) {
158
165
  // Create instance
@@ -186,4 +193,4 @@ export class FieldHighlighter extends HTMLElement {
186
193
  }
187
194
  }
188
195
 
189
- customElements.define('vaadin-field-highlighter', FieldHighlighter);
196
+ defineCustomElement(FieldHighlighter);
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
7
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
9
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
10
 
@@ -82,4 +83,4 @@ export class FieldOutline extends ThemableMixin(DirMixin(PolymerElement)) {
82
83
  }
83
84
  }
84
85
 
85
- customElements.define(FieldOutline.is, FieldOutline);
86
+ defineCustomElement(FieldOutline);
@@ -4,12 +4,14 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
7
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
9
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
10
 
10
11
  /**
11
12
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
12
13
  *
14
+ * @customElement
13
15
  * @extends HTMLElement
14
16
  * @mixes DirMixin
15
17
  * @mixes ThemableMixin
@@ -121,4 +123,4 @@ export class UserTag extends ThemableMixin(DirMixin(PolymerElement)) {
121
123
  }
122
124
  }
123
125
 
124
- customElements.define(UserTag.is, UserTag);
126
+ defineCustomElement(UserTag);
@@ -3,75 +3,89 @@
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 { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
7
10
  import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
8
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
+ import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
12
+ import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
13
 
10
- registerStyles(
11
- 'vaadin-user-tags-overlay',
12
- css`
13
- :host {
14
- background: transparent;
15
- box-shadow: none;
16
- }
14
+ const userTagsOverlayStyles = css`
15
+ :host {
16
+ background: transparent;
17
+ box-shadow: none;
18
+ }
17
19
 
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
- }
20
+ [part='overlay'] {
21
+ box-shadow: none;
22
+ background: transparent;
23
+ position: relative;
24
+ left: -4px;
25
+ padding: 4px;
26
+ outline: none;
27
+ overflow: visible;
28
+ }
27
29
 
28
- ::slotted([part='tags']) {
29
- display: flex;
30
- flex-direction: column;
31
- align-items: flex-start;
32
- }
30
+ ::slotted([part='tags']) {
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ }
33
35
 
34
- :host([dir='rtl']) [part='overlay'] {
35
- left: auto;
36
- right: -4px;
37
- }
36
+ :host([dir='rtl']) [part='overlay'] {
37
+ left: auto;
38
+ right: -4px;
39
+ }
38
40
 
39
- [part='content'] {
40
- padding: 0;
41
- }
41
+ [part='content'] {
42
+ padding: 0;
43
+ }
42
44
 
43
- :host([opening]),
44
- :host([closing]) {
45
- animation: 0.14s user-tags-overlay-dummy-animation;
46
- }
45
+ :host([opening]),
46
+ :host([closing]) {
47
+ animation: 0.14s user-tags-overlay-dummy-animation;
48
+ }
47
49
 
48
- @keyframes user-tags-overlay-dummy-animation {
49
- 0% {
50
- opacity: 1;
51
- }
50
+ @keyframes user-tags-overlay-dummy-animation {
51
+ 0% {
52
+ opacity: 1;
53
+ }
52
54
 
53
- 100% {
54
- opacity: 1;
55
- }
55
+ 100% {
56
+ opacity: 1;
56
57
  }
57
- `,
58
- );
58
+ }
59
+ `;
60
+
61
+ registerStyles('vaadin-user-tags-overlay', [overlayStyles, userTagsOverlayStyles]);
59
62
 
60
63
  /**
61
64
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
62
65
  *
63
- * @extends Overlay
66
+ * @customElement
67
+ * @extends HTMLElement
68
+ * @mixes PositionMixin
69
+ * @mixes OverlayMixin
70
+ * @mixes DirMixin
71
+ * @mixes ThemableMixin
64
72
  * @private
65
73
  */
66
- class UserTagsOverlay extends PositionMixin(Overlay) {
74
+ class UserTagsOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
67
75
  static get is() {
68
76
  return 'vaadin-user-tags-overlay';
69
77
  }
70
78
 
71
- ready() {
72
- super.ready();
73
- this.$.overlay.setAttribute('tabindex', '-1');
79
+ static get template() {
80
+ return html`
81
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
82
+ <div part="overlay" id="overlay">
83
+ <div part="content" id="content">
84
+ <slot></slot>
85
+ </div>
86
+ </div>
87
+ `;
74
88
  }
75
89
  }
76
90
 
77
- customElements.define(UserTagsOverlay.is, UserTagsOverlay);
91
+ defineCustomElement(UserTagsOverlay);
@@ -9,6 +9,7 @@ import { calculateSplices } from '@polymer/polymer/lib/utils/array-splice.js';
9
9
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
10
10
  import { timeOut } from '@vaadin/component-base/src/async.js';
11
11
  import { Debouncer } from '@vaadin/component-base/src/debounce.js';
12
+ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
13
 
13
14
  const listenOnce = (elem, type) => {
14
15
  return new Promise((resolve) => {
@@ -23,6 +24,7 @@ const listenOnce = (elem, type) => {
23
24
  /**
24
25
  * An element used internally by `<vaadin-field-highlighter>`. Not intended to be used separately.
25
26
  *
27
+ * @customElement
26
28
  * @extends HTMLElement
27
29
  * @private
28
30
  */
@@ -450,4 +452,4 @@ export class UserTags extends PolymerElement {
450
452
  }
451
453
  }
452
454
 
453
- customElements.define(UserTags.is, UserTags);
455
+ defineCustomElement(UserTags);
@@ -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';