@vaadin/avatar 25.0.0-alpha10 → 25.0.0-alpha11

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-alpha10",
3
+ "version": "25.0.0-alpha11",
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
  "web-types.json",
@@ -38,22 +35,22 @@
38
35
  ],
39
36
  "dependencies": {
40
37
  "@open-wc/dedupe-mixin": "^1.3.0",
41
- "@vaadin/a11y-base": "25.0.0-alpha10",
42
- "@vaadin/component-base": "25.0.0-alpha10",
43
- "@vaadin/tooltip": "25.0.0-alpha10",
44
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
45
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
38
+ "@vaadin/a11y-base": "25.0.0-alpha11",
39
+ "@vaadin/component-base": "25.0.0-alpha11",
40
+ "@vaadin/tooltip": "25.0.0-alpha11",
41
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha11",
46
42
  "lit": "^3.0.0"
47
43
  },
48
44
  "devDependencies": {
49
- "@vaadin/chai-plugins": "25.0.0-alpha10",
50
- "@vaadin/test-runner-commands": "25.0.0-alpha10",
45
+ "@vaadin/chai-plugins": "25.0.0-alpha11",
46
+ "@vaadin/test-runner-commands": "25.0.0-alpha11",
51
47
  "@vaadin/testing-helpers": "^2.0.0",
48
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha11",
52
49
  "sinon": "^18.0.0"
53
50
  },
54
51
  "web-types": [
55
52
  "web-types.json",
56
53
  "web-types.lit.json"
57
54
  ],
58
- "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
55
+ "gitHead": "abfd315ba5a7484a613e0768635a4e8fe945a44b"
59
56
  }
@@ -3,7 +3,8 @@
3
3
  * Copyright (c) 2017 - 2025 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/component-base/src/style-props.js';
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
+ import '@vaadin/component-base/src/styles/user-colors.js';
7
8
  import { css } from 'lit';
8
9
 
9
10
  export const avatarStyles = css`
@@ -12,7 +12,7 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
12
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
13
13
  import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
14
14
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
15
- import { avatarStyles } from './styles/vaadin-avatar-core-styles.js';
15
+ import { avatarStyles } from './styles/vaadin-avatar-base-styles.js';
16
16
  import { AvatarMixin } from './vaadin-avatar-mixin.js';
17
17
 
18
18
  /**
package/vaadin-avatar.js CHANGED
@@ -1,2 +1,2 @@
1
- import './theme/lumo/vaadin-avatar.js';
1
+ import './src/vaadin-avatar.js';
2
2
  export * from './src/vaadin-avatar.js';
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-alpha10",
4
+ "version": "25.0.0-alpha11",
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-alpha10",
4
+ "version": "25.0.0-alpha11",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2020 - 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 avatarStyles: CSSResult;
@@ -1,58 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2020 - 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 avatarStyles = css`
9
- :host {
10
- position: relative;
11
- display: inline-block;
12
- flex: none;
13
- border-radius: 50%;
14
- overflow: hidden;
15
- height: var(--vaadin-avatar-size, 64px);
16
- width: var(--vaadin-avatar-size, 64px);
17
- border: var(--vaadin-avatar-outline-width) solid transparent;
18
- margin: calc(var(--vaadin-avatar-outline-width) * -1);
19
- background-clip: content-box;
20
- --vaadin-avatar-outline-width: var(--vaadin-focus-ring-width, 2px);
21
- }
22
-
23
- img {
24
- height: 100%;
25
- width: 100%;
26
- object-fit: cover;
27
- }
28
-
29
- [part='icon'] {
30
- display: flex;
31
- align-items: center;
32
- justify-content: center;
33
- height: 100%;
34
- font-size: var(--vaadin-avatar-size, 64px);
35
- line-height: 1;
36
- }
37
-
38
- [part='abbr'] {
39
- font-size: 2.2em;
40
- }
41
-
42
- :host([hidden]),
43
- [hidden] {
44
- display: none !important;
45
- }
46
-
47
- :host([has-color-index]) {
48
- background-color: var(--vaadin-avatar-user-color);
49
- }
50
-
51
- :host([has-color-index])::before {
52
- position: absolute;
53
- content: '';
54
- inset: 0;
55
- border-radius: inherit;
56
- box-shadow: inset 0 0 0 2px var(--vaadin-avatar-user-color);
57
- }
58
- `;
@@ -1,7 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import '@vaadin/vaadin-lumo-styles/user-colors.js';
@@ -1,83 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/sizing.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/style.js';
5
- import '@vaadin/vaadin-lumo-styles/font-icons.js';
6
- import '@vaadin/vaadin-lumo-styles/typography.js';
7
- import '@vaadin/vaadin-lumo-styles/user-colors.js';
8
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
-
10
- const globalStyle = document.createElement('style');
11
- globalStyle.textContent = 'html { --vaadin-avatar-size: var(--lumo-size-m); }';
12
- document.head.appendChild(globalStyle);
13
-
14
- registerStyles(
15
- 'vaadin-avatar',
16
- css`
17
- :host {
18
- color: var(--lumo-secondary-text-color);
19
- background-color: var(--lumo-contrast-10pct);
20
- border-radius: 50%;
21
- outline: none;
22
- cursor: default;
23
- user-select: none;
24
- -webkit-tap-highlight-color: transparent;
25
- -webkit-font-smoothing: antialiased;
26
- -moz-osx-font-smoothing: grayscale;
27
- }
28
-
29
- :host([has-color-index]) {
30
- color: var(--lumo-base-color);
31
- }
32
-
33
- :host([focus-ring]) {
34
- border-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
35
- }
36
-
37
- [part='icon']::before {
38
- content: var(--lumo-icons-user);
39
- font-family: lumo-icons;
40
- font-size: 0.9em;
41
- }
42
-
43
- [part='abbr'] {
44
- font-family: var(--lumo-font-family);
45
- font-size: 2.4375em;
46
- font-weight: 500;
47
- fill: currentColor;
48
- }
49
-
50
- :host([theme~='xlarge']) [part='abbr'] {
51
- font-size: 2.5em;
52
- }
53
-
54
- :host([theme~='large']) [part='abbr'] {
55
- font-size: 2.375em;
56
- }
57
-
58
- :host([theme~='small']) [part='abbr'] {
59
- font-size: 2.75em;
60
- }
61
-
62
- :host([theme~='xsmall']) [part='abbr'] {
63
- font-size: 3em;
64
- }
65
-
66
- :host([theme~='xlarge']) {
67
- --vaadin-avatar-size: var(--lumo-size-xl);
68
- }
69
-
70
- :host([theme~='large']) {
71
- --vaadin-avatar-size: var(--lumo-size-l);
72
- }
73
-
74
- :host([theme~='small']) {
75
- --vaadin-avatar-size: var(--lumo-size-s);
76
- }
77
-
78
- :host([theme~='xsmall']) {
79
- --vaadin-avatar-size: var(--lumo-size-xs);
80
- }
81
- `,
82
- { moduleId: 'lumo-avatar' },
83
- );
@@ -1,3 +0,0 @@
1
- import '@vaadin/tooltip/theme/lumo/vaadin-tooltip.js';
2
- import './vaadin-avatar-styles.js';
3
- import '../../src/vaadin-avatar.js';
@@ -1,3 +0,0 @@
1
- import '@vaadin/tooltip/theme/lumo/vaadin-tooltip.js';
2
- import './vaadin-avatar-styles.js';
3
- import '../../src/vaadin-avatar.js';