@vaadin/avatar 25.0.0-alpha7 → 25.0.0-alpha9

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/avatar",
3
- "version": "25.0.0-alpha7",
3
+ "version": "25.0.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,16 +38,16 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@open-wc/dedupe-mixin": "^1.3.0",
41
- "@vaadin/a11y-base": "25.0.0-alpha7",
42
- "@vaadin/component-base": "25.0.0-alpha7",
43
- "@vaadin/tooltip": "25.0.0-alpha7",
44
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
45
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
41
+ "@vaadin/a11y-base": "25.0.0-alpha9",
42
+ "@vaadin/component-base": "25.0.0-alpha9",
43
+ "@vaadin/tooltip": "25.0.0-alpha9",
44
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
45
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "25.0.0-alpha7",
50
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
49
+ "@vaadin/chai-plugins": "25.0.0-alpha9",
50
+ "@vaadin/test-runner-commands": "25.0.0-alpha9",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
52
  "sinon": "^18.0.0"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
58
+ "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
59
59
  }
@@ -7,70 +7,68 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const avatarStyles = css`
10
- @layer base {
11
- :host {
12
- display: inline-block;
13
- flex: none;
14
- border-radius: 50%;
15
- cursor: default;
16
- color: var(--vaadin-avatar-color, var(--vaadin-color-subtle));
17
- line-height: 0;
18
- overflow: hidden;
19
- height: var(--vaadin-avatar-size, 2em);
20
- width: var(--vaadin-avatar-size, 2em);
21
- border: var(--vaadin-focus-ring-width) solid transparent;
22
- margin: calc(var(--vaadin-focus-ring-width) * -1);
23
- background: var(--vaadin-avatar-background, var(--vaadin-background-container-strong));
24
- background-clip: content-box;
25
- vertical-align: middle;
26
- -webkit-user-select: none;
27
- user-select: none;
28
- -webkit-tap-highlight-color: transparent;
29
- position: relative;
30
- }
10
+ :host {
11
+ display: inline-block;
12
+ flex: none;
13
+ border-radius: 50%;
14
+ cursor: default;
15
+ color: var(--vaadin-avatar-color, var(--vaadin-color-subtle));
16
+ line-height: 0;
17
+ overflow: hidden;
18
+ height: var(--vaadin-avatar-size, 32px);
19
+ width: var(--vaadin-avatar-size, 32px);
20
+ border: var(--vaadin-focus-ring-width) solid transparent;
21
+ margin: calc(var(--vaadin-focus-ring-width) * -1);
22
+ background: var(--vaadin-avatar-background, var(--vaadin-background-container-strong));
23
+ background-clip: content-box;
24
+ vertical-align: middle;
25
+ -webkit-user-select: none;
26
+ user-select: none;
27
+ -webkit-tap-highlight-color: transparent;
28
+ position: relative;
29
+ }
31
30
 
32
- :host([role='button']) {
33
- cursor: var(--vaadin-clickable-cursor);
34
- }
31
+ :host([role='button']) {
32
+ cursor: var(--vaadin-clickable-cursor);
33
+ }
35
34
 
36
- img {
37
- height: 100%;
38
- width: 100%;
39
- object-fit: cover;
40
- }
35
+ img {
36
+ height: 100%;
37
+ width: 100%;
38
+ object-fit: cover;
39
+ }
41
40
 
42
- [part='icon'] {
43
- height: 100%;
44
- mask: var(--_vaadin-icon-user) no-repeat center / 74%;
45
- background: currentColor;
46
- }
41
+ [part='icon'] {
42
+ height: 100%;
43
+ mask: var(--_vaadin-icon-user) no-repeat center / 74%;
44
+ background: currentColor;
45
+ }
47
46
 
48
- [part='abbr'] {
49
- font-size: 2.75em;
50
- fill: currentColor;
51
- }
47
+ [part='abbr'] {
48
+ font-size: 2.75em;
49
+ fill: currentColor;
50
+ }
52
51
 
53
- :host([hidden]),
54
- [hidden] {
55
- display: none !important;
56
- }
52
+ :host([hidden]),
53
+ [hidden] {
54
+ display: none !important;
55
+ }
57
56
 
58
- :host([has-color-index]) {
59
- background-color: var(--vaadin-avatar-user-color);
60
- color: oklch(from var(--vaadin-avatar-user-color) clamp(0, (0.62 - l) * 1000, 1) 0 0);
61
- }
57
+ :host([has-color-index]) {
58
+ background-color: var(--vaadin-avatar-user-color);
59
+ color: oklch(from var(--vaadin-avatar-user-color) clamp(0, (0.62 - l) * 1000, 1) 0 0);
60
+ }
62
61
 
63
- :host([has-color-index])::before {
64
- position: absolute;
65
- content: '';
66
- inset: 0;
67
- border-radius: inherit;
68
- border: 2px solid var(--vaadin-avatar-user-color);
69
- }
62
+ :host([has-color-index])::before {
63
+ position: absolute;
64
+ content: '';
65
+ inset: 0;
66
+ border-radius: inherit;
67
+ border: 2px solid var(--vaadin-avatar-user-color);
68
+ }
70
69
 
71
- :host([focus-ring]) {
72
- outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
73
- outline-offset: calc((var(--vaadin-focus-ring-width)) * -1);
74
- }
70
+ :host([focus-ring]) {
71
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
72
+ outline-offset: calc((var(--vaadin-focus-ring-width)) * -1);
75
73
  }
76
74
  `;
@@ -47,7 +47,7 @@ import { AvatarMixin } from './vaadin-avatar-mixin.js';
47
47
  * @mixes ElementMixin
48
48
  * @mixes ThemableMixin
49
49
  */
50
- class Avatar extends AvatarMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
50
+ class Avatar extends AvatarMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
51
51
  static get is() {
52
52
  return 'vaadin-avatar';
53
53
  }
@@ -56,6 +56,12 @@ class Avatar extends AvatarMixin(ElementMixin(ThemableMixin(LumoInjectionMixin(P
56
56
  return avatarStyles;
57
57
  }
58
58
 
59
+ static get lumoInjector() {
60
+ return {
61
+ includeBaseStyles: true,
62
+ };
63
+ }
64
+
59
65
  /** @protected */
60
66
  render() {
61
67
  return html`
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {