@vaadin/card 25.1.0-beta2 → 25.1.0-beta3

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/README.md CHANGED
@@ -7,15 +7,15 @@ A visual content container.
7
7
  [![npm version](https://badgen.net/npm/v/@vaadin/card)](https://www.npmjs.com/package/@vaadin/card)
8
8
 
9
9
  ```html
10
- <vaadin-card class="flex flex-col overflow-hidden">
10
+ <vaadin-card theme="cover-media">
11
11
  <img
12
+ slot="media"
12
13
  src="https://images.unsplash.com/photo-1519681393784-d120267933ba?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80"
13
- alt="">
14
- <div class="flex flex-col items-start p-m">
15
- <h3>Card Title</h3>
16
- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</p>
17
- <span theme="badge">Label</span>
18
- </div>
14
+ alt=""
15
+ />
16
+ <h3 slot="title">Card Title</h3>
17
+ <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut.</p>
18
+ <vaadin-badge>Label</vaadin-badge>
19
19
  </vaadin-card>
20
20
  ```
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/card",
3
- "version": "25.1.0-beta2",
3
+ "version": "25.1.0-beta3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,26 +34,26 @@
34
34
  "web-component"
35
35
  ],
36
36
  "dependencies": {
37
- "@vaadin/component-base": "25.1.0-beta2",
38
- "@vaadin/vaadin-themable-mixin": "25.1.0-beta2",
37
+ "@vaadin/component-base": "25.1.0-beta3",
38
+ "@vaadin/vaadin-themable-mixin": "25.1.0-beta3",
39
39
  "lit": "^3.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@vaadin/aura": "25.1.0-beta2",
43
- "@vaadin/avatar": "25.1.0-beta2",
44
- "@vaadin/button": "25.1.0-beta2",
45
- "@vaadin/chai-plugins": "25.1.0-beta2",
46
- "@vaadin/icon": "25.1.0-beta2",
47
- "@vaadin/icons": "25.1.0-beta2",
48
- "@vaadin/test-runner-commands": "25.1.0-beta2",
42
+ "@vaadin/aura": "25.1.0-beta3",
43
+ "@vaadin/avatar": "25.1.0-beta3",
44
+ "@vaadin/button": "25.1.0-beta3",
45
+ "@vaadin/chai-plugins": "25.1.0-beta3",
46
+ "@vaadin/icon": "25.1.0-beta3",
47
+ "@vaadin/icons": "25.1.0-beta3",
48
+ "@vaadin/test-runner-commands": "25.1.0-beta3",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.1.0-beta2",
51
- "sinon": "^21.0.0"
50
+ "@vaadin/vaadin-lumo-styles": "25.1.0-beta3",
51
+ "sinon": "^21.0.2"
52
52
  },
53
53
  "customElements": "custom-elements.json",
54
54
  "web-types": [
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "ffbedbae08a5160d13bcd1c6fcaa328df5103a05"
58
+ "gitHead": "4251850231a42298fda23b83928da588831cdb5d"
59
59
  }
@@ -229,6 +229,14 @@ export const cardStyles = css`
229
229
  height: 100%;
230
230
  }
231
231
 
232
+ :host([theme~='cover-media']) {
233
+ --_media-width: calc(100% + var(--_padding) * 2);
234
+ }
235
+
236
+ :host([theme~='horizontal'][theme~='cover-media']) {
237
+ --_media-width: calc(100% + var(--_padding));
238
+ }
239
+
232
240
  :host([theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
233
241
  border-radius: inherit;
234
242
  border-end-end-radius: 0;
@@ -236,7 +244,7 @@ export const cardStyles = css`
236
244
  margin-inline: calc(var(--_padding) * -1);
237
245
  margin-top: calc(var(--_padding) * -1);
238
246
  max-width: none;
239
- width: calc(100% + var(--_padding) * 2);
247
+ width: var(--_media-width);
240
248
  }
241
249
 
242
250
  :host([theme~='horizontal'][theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
@@ -245,7 +253,6 @@ export const cardStyles = css`
245
253
  border-start-end-radius: 0;
246
254
  height: calc(100% + var(--_padding) * 2);
247
255
  margin-inline-end: 0;
248
- width: calc(100% + var(--_padding));
249
256
  }
250
257
 
251
258
  /* Scroller in content */
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/card",
4
- "version": "25.1.0-beta2",
4
+ "version": "25.1.0-beta3",
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/card",
4
- "version": "25.1.0-beta2",
4
+ "version": "25.1.0-beta3",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {