@vaadin/card 25.0.0-alpha2 → 25.0.0-alpha21

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/card",
3
- "version": "25.0.0-alpha2",
3
+ "version": "25.0.0-alpha21",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,7 +21,6 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "theme",
25
24
  "vaadin-*.d.ts",
26
25
  "vaadin-*.js",
27
26
  "web-types.json",
@@ -34,20 +33,21 @@
34
33
  "web-component"
35
34
  ],
36
35
  "dependencies": {
37
- "@vaadin/component-base": "25.0.0-alpha2",
38
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha2",
39
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
36
+ "@vaadin/component-base": "25.0.0-alpha21",
37
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
40
38
  "lit": "^3.0.0"
41
39
  },
42
40
  "devDependencies": {
43
- "@vaadin/chai-plugins": "25.0.0-alpha2",
44
- "@vaadin/test-runner-commands": "25.0.0-alpha2",
41
+ "@vaadin/avatar": "25.0.0-alpha21",
42
+ "@vaadin/chai-plugins": "25.0.0-alpha21",
43
+ "@vaadin/test-runner-commands": "25.0.0-alpha21",
45
44
  "@vaadin/testing-helpers": "^2.0.0",
46
- "sinon": "^18.0.0"
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha21",
46
+ "sinon": "^21.0.0"
47
47
  },
48
48
  "web-types": [
49
49
  "web-types.json",
50
50
  "web-types.lit.json"
51
51
  ],
52
- "gitHead": "67ffcd5355cf21ce1b5039c598525109fc4c164b"
52
+ "gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
53
53
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2024 - 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 cardStyles: CSSResult;
@@ -0,0 +1,272 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2024 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/component-base/src/styles/style-props.js';
7
+ import { css } from 'lit';
8
+
9
+ export const cardStyles = css`
10
+ :host {
11
+ --_content: 0;
12
+ --_footer: 0;
13
+ --_gap: var(--vaadin-card-gap, var(--vaadin-gap-m));
14
+ --_header: max(var(--_header-prefix), var(--_title), var(--_subtitle), var(--_header-suffix));
15
+ --_header-prefix: 0;
16
+ --_header-suffix: 0;
17
+ --_media: 0;
18
+ --_padding: var(--vaadin-card-padding, var(--vaadin-padding-m));
19
+ --_subtitle: 0;
20
+ --_title: 0;
21
+ background: var(--vaadin-card-background, var(--vaadin-background-container));
22
+ border-radius: var(--vaadin-card-border-radius, var(--vaadin-radius-m));
23
+ box-shadow: var(--vaadin-card-shadow, none);
24
+ box-sizing: border-box;
25
+ display: flex;
26
+ flex-direction: column;
27
+ gap: var(--_gap);
28
+ padding: var(--_padding);
29
+ position: relative;
30
+ }
31
+
32
+ /* Could be an inset outline on the host as well, but let's reserve that for a potential focus outline */
33
+ :host::before {
34
+ border: var(--vaadin-card-border-width, 0) solid
35
+ var(--vaadin-card-border-color, var(--vaadin-border-color-secondary));
36
+ border-radius: inherit;
37
+ content: '';
38
+ inset: 0;
39
+ pointer-events: none;
40
+ position: absolute;
41
+ }
42
+
43
+ :host([hidden]) {
44
+ display: none !important;
45
+ }
46
+
47
+ :host(:not([theme~='horizontal'])) {
48
+ justify-content: space-between;
49
+ }
50
+
51
+ :host([_m]) {
52
+ --_media: 1;
53
+ }
54
+
55
+ :host([_t]) {
56
+ --_title: 1;
57
+ }
58
+
59
+ :host([_st]) {
60
+ --_subtitle: 1;
61
+ }
62
+
63
+ :host([_h]) {
64
+ --_header: 1;
65
+ --_title: 0;
66
+ --_subtitle: 0;
67
+ }
68
+
69
+ :host([_hp]) {
70
+ --_header-prefix: 1;
71
+ }
72
+
73
+ :host([_hs]) {
74
+ --_header-suffix: 1;
75
+ }
76
+
77
+ :host([_c]) {
78
+ --_content: 1;
79
+ }
80
+
81
+ :host([_f]) {
82
+ --_footer: 1;
83
+ }
84
+
85
+ [part='media'],
86
+ [part='header'],
87
+ [part='content'],
88
+ [part='footer'] {
89
+ display: none;
90
+ }
91
+
92
+ :host([_m]) [part='media'] {
93
+ display: block;
94
+ }
95
+
96
+ :host(:is([_h], [_t], [_st], [_hp], [_hs])) [part='header'] {
97
+ align-items: center;
98
+ display: grid;
99
+ gap: var(--_gap);
100
+ row-gap: 0;
101
+ }
102
+
103
+ :host([_hs]) [part='header'] {
104
+ grid-template-columns: 1fr auto;
105
+ }
106
+
107
+ :host([_hp]) [part='header'] {
108
+ grid-template-columns: repeat(var(--_header-prefix), auto) 1fr;
109
+ }
110
+
111
+ :host([_c]) [part='content'] {
112
+ display: block;
113
+ }
114
+
115
+ :host([_f]) [part='footer'] {
116
+ display: flex;
117
+ flex-wrap: wrap;
118
+ gap: var(--_gap);
119
+ }
120
+
121
+ slot {
122
+ border-radius: inherit;
123
+ }
124
+
125
+ ::slotted([slot='header-prefix']) {
126
+ grid-column: 1;
127
+ grid-row: 1 / span calc(var(--_title) + var(--_subtitle));
128
+ }
129
+
130
+ ::slotted([slot='header']),
131
+ ::slotted([slot='title']) {
132
+ grid-column: calc(1 + var(--_header-prefix));
133
+ grid-row: 1;
134
+ }
135
+
136
+ ::slotted([slot='title']) {
137
+ color: var(--vaadin-card-title-color, var(--vaadin-text-color)) !important;
138
+ font-size: var(--vaadin-card-title-font-size, inherit) !important;
139
+ font-weight: var(--vaadin-card-title-font-weight, 500) !important;
140
+ line-height: var(--vaadin-card-title-line-height, inherit) !important;
141
+ margin: 0 !important;
142
+ }
143
+
144
+ ::slotted([slot='subtitle']) {
145
+ color: var(--vaadin-card-subtitle-color, var(--vaadin-text-color-secondary)) !important;
146
+ font-size: var(--vaadin-card-subtitle-font-size, inherit) !important;
147
+ font-weight: var(--vaadin-card-subtitle-font-weight, 400) !important;
148
+ line-height: var(--vaadin-card-subtitle-line-height, inherit) !important;
149
+ margin: 0 !important;
150
+ grid-column: calc(1 + var(--_header-prefix));
151
+ grid-row: calc(1 + var(--_title));
152
+ }
153
+
154
+ ::slotted([slot='header-suffix']) {
155
+ grid-column: calc(2 + var(--_header-prefix));
156
+ grid-row: 1 / span calc(var(--_title) + var(--_subtitle));
157
+ }
158
+
159
+ /* Horizontal */
160
+ :host([theme~='horizontal']) {
161
+ align-items: start;
162
+ display: grid;
163
+ grid-template-columns: repeat(var(--_media), minmax(auto, max-content)) 1fr;
164
+ }
165
+
166
+ :host([theme~='horizontal'][_f]) {
167
+ grid-template-rows: 1fr auto;
168
+ }
169
+
170
+ :host([theme~='horizontal'][_c]) {
171
+ grid-template-rows: repeat(var(--_header), auto) 1fr;
172
+ }
173
+
174
+ [part='media'] {
175
+ align-self: stretch;
176
+ border-radius: inherit;
177
+ grid-column: 1;
178
+ grid-row: 1 / span calc(var(--_header) + var(--_content) + var(--_footer));
179
+ }
180
+
181
+ [part='header'] {
182
+ margin-bottom: auto;
183
+ grid-column: calc(1 + var(--_media));
184
+ grid-row: 1;
185
+ }
186
+
187
+ [part='content'] {
188
+ grid-column: calc(1 + var(--_media));
189
+ grid-row: calc(1 + var(--_header));
190
+ flex: auto;
191
+ min-height: 0;
192
+ }
193
+
194
+ [part='footer'] {
195
+ border-radius: inherit;
196
+ grid-column: calc(1 + var(--_media));
197
+ grid-row: calc(1 + var(--_header) + var(--_content));
198
+ }
199
+
200
+ :host([theme~='horizontal']) [part='footer'] {
201
+ align-self: end;
202
+ }
203
+
204
+ :host(:not([theme~='horizontal'])) ::slotted([slot='media']:is(img, video, svg)) {
205
+ max-width: 100%;
206
+ }
207
+
208
+ ::slotted([slot='media']) {
209
+ vertical-align: middle;
210
+ }
211
+
212
+ :host(:is([theme~='cover-media'], [theme~='stretch-media']))
213
+ ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
214
+ aspect-ratio: var(--vaadin-card-media-aspect-ratio, 16/9);
215
+ height: auto;
216
+ object-fit: cover;
217
+ /* Fixes an issue where an icon overflows the card boundaries on Firefox: https://github.com/vaadin/web-components/issues/8641 */
218
+ overflow: hidden;
219
+ width: 100%;
220
+ }
221
+
222
+ :host([theme~='horizontal']:is([theme~='cover-media'], [theme~='stretch-media'])) {
223
+ grid-template-columns: repeat(var(--_media), minmax(auto, 0.5fr)) 1fr;
224
+ }
225
+
226
+ :host([theme~='horizontal']:is([theme~='cover-media'], [theme~='stretch-media']))
227
+ ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
228
+ aspect-ratio: auto;
229
+ height: 100%;
230
+ }
231
+
232
+ :host([theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
233
+ border-radius: inherit;
234
+ border-end-end-radius: 0;
235
+ border-end-start-radius: 0;
236
+ margin-inline: calc(var(--_padding) * -1);
237
+ margin-top: calc(var(--_padding) * -1);
238
+ max-width: none;
239
+ width: calc(100% + var(--_padding) * 2);
240
+ }
241
+
242
+ :host([theme~='horizontal'][theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
243
+ border-radius: inherit;
244
+ border-end-end-radius: 0;
245
+ border-start-end-radius: 0;
246
+ height: calc(100% + var(--_padding) * 2);
247
+ margin-inline-end: 0;
248
+ width: calc(100% + var(--_padding));
249
+ }
250
+
251
+ /* Scroller in content */
252
+ [part='content'] ::slotted(vaadin-scroller) {
253
+ margin-inline: calc(var(--_padding) * -1);
254
+ padding-inline: var(--_padding);
255
+ }
256
+
257
+ [part='content'] ::slotted(vaadin-scroller)::before,
258
+ [part='content'] ::slotted(vaadin-scroller)::after {
259
+ margin-inline: calc(var(--_padding) * -1);
260
+ }
261
+
262
+ /* Outlined */
263
+ :host([theme~='outlined']) {
264
+ --vaadin-card-border-width: 1px;
265
+ }
266
+
267
+ /* Elevated */
268
+ :host([theme~='elevated']) {
269
+ --vaadin-card-background: var(--vaadin-background-color);
270
+ box-shadow: var(--vaadin-card-shadow, 0 1px 4px -1px rgba(0, 0, 0, 0.3));
271
+ }
272
+ `;
@@ -3,12 +3,14 @@
3
3
  * Copyright (c) 2024 - 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 { css, html, LitElement } from 'lit';
6
+ import { html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
9
9
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
10
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
11
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
+ import { cardStyles } from './styles/vaadin-card-base-styles.js';
12
14
 
13
15
  /**
14
16
  * `<vaadin-card>` is a versatile container for grouping related content and actions.
@@ -50,236 +52,19 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
50
52
  * @mixes ElementMixin
51
53
  * @mixes ThemableMixin
52
54
  */
53
- class Card extends ElementMixin(ThemableMixin(PolylitMixin(LitElement))) {
55
+ class Card extends ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))) {
54
56
  static get is() {
55
57
  return 'vaadin-card';
56
58
  }
57
59
 
58
60
  static get styles() {
59
- return css`
60
- :host {
61
- display: flex;
62
- flex-direction: column;
63
- box-sizing: border-box;
64
- padding: var(--_padding);
65
- gap: var(--_gap);
66
- --_padding: var(--vaadin-card-padding, 1em);
67
- --_gap: var(--vaadin-card-gap, 1em);
68
- --_media: 0;
69
- --_title: 0;
70
- --_subtitle: 0;
71
- --_header: max(var(--_header-prefix), var(--_title), var(--_subtitle), var(--_header-suffix));
72
- --_header-prefix: 0;
73
- --_header-suffix: 0;
74
- --_content: 0;
75
- --_footer: 0;
76
- }
77
-
78
- :host([hidden]) {
79
- display: none !important;
80
- }
81
-
82
- :host(:not([theme~='horizontal'])) {
83
- justify-content: space-between;
84
- }
85
-
86
- :host([_m]) {
87
- --_media: 1;
88
- }
89
-
90
- :host([_t]) {
91
- --_title: 1;
92
- }
93
-
94
- :host([_st]) {
95
- --_subtitle: 1;
96
- }
97
-
98
- :host([_h]) {
99
- --_header: 1;
100
- --_title: 0;
101
- --_subtitle: 0;
102
- }
103
-
104
- :host([_hp]) {
105
- --_header-prefix: 1;
106
- }
107
-
108
- :host([_hs]) {
109
- --_header-suffix: 1;
110
- }
111
-
112
- :host([_c]) {
113
- --_content: 1;
114
- }
115
-
116
- :host([_f]) {
117
- --_footer: 1;
118
- }
119
-
120
- [part='media'],
121
- [part='header'],
122
- [part='content'],
123
- [part='footer'] {
124
- display: none;
125
- }
126
-
127
- :host([_m]) [part='media'],
128
- :host([_c]) [part='content'] {
129
- display: block;
130
- }
131
-
132
- :host([_f]) [part='footer'] {
133
- display: flex;
134
- gap: var(--_gap);
135
- }
136
-
137
- :host(:is([_h], [_t], [_st], [_hp], [_hs])) [part='header'] {
138
- display: grid;
139
- align-items: center;
140
- gap: var(--_gap);
141
- row-gap: 0;
142
- }
143
-
144
- [part='header'] {
145
- margin-bottom: auto;
146
- }
147
-
148
- :host([_hs]) [part='header'] {
149
- grid-template-columns: 1fr auto;
150
- }
151
-
152
- :host([_hp]) [part='header'] {
153
- grid-template-columns: repeat(var(--_header-prefix), auto) 1fr;
154
- }
155
-
156
- slot {
157
- border-radius: inherit;
158
- }
159
-
160
- ::slotted([slot='header-prefix']) {
161
- grid-column: 1;
162
- grid-row: 1 / span calc(var(--_title) + var(--_subtitle));
163
- }
164
-
165
- ::slotted([slot='header']),
166
- ::slotted([slot='title']) {
167
- grid-column: calc(1 + var(--_header-prefix));
168
- grid-row: 1;
169
- }
170
-
171
- ::slotted([slot='subtitle']) {
172
- grid-column: calc(1 + var(--_header-prefix));
173
- grid-row: calc(1 + var(--_title));
174
- }
175
-
176
- ::slotted([slot='header-suffix']) {
177
- grid-column: calc(2 + var(--_header-prefix));
178
- grid-row: 1 / span calc(var(--_title) + var(--_subtitle));
179
- }
180
-
181
- /* Horizontal */
182
- :host([theme~='horizontal']) {
183
- display: grid;
184
- grid-template-columns: repeat(var(--_media), minmax(auto, max-content)) 1fr;
185
- align-items: start;
186
- }
187
-
188
- :host([theme~='horizontal'][_f]) {
189
- grid-template-rows: 1fr auto;
190
- }
191
-
192
- :host([theme~='horizontal'][_c]) {
193
- grid-template-rows: repeat(var(--_header), auto) 1fr;
194
- }
195
-
196
- [part='media'] {
197
- grid-column: 1;
198
- grid-row: 1 / span calc(var(--_header) + var(--_content) + var(--_footer));
199
- align-self: stretch;
200
- border-radius: inherit;
201
- }
202
-
203
- [part='header'] {
204
- grid-column: calc(1 + var(--_media));
205
- grid-row: 1;
206
- }
207
-
208
- [part='content'] {
209
- grid-column: calc(1 + var(--_media));
210
- grid-row: calc(1 + var(--_header));
211
- flex: auto;
212
- min-height: 0;
213
- }
214
-
215
- [part='footer'] {
216
- grid-column: calc(1 + var(--_media));
217
- grid-row: calc(1 + var(--_header) + var(--_content));
218
- border-radius: inherit;
219
- }
220
-
221
- :host([theme~='horizontal']) [part='footer'] {
222
- align-self: end;
223
- }
224
-
225
- :host(:not([theme~='horizontal'])) ::slotted([slot='media']:is(img, video, svg)) {
226
- max-width: 100%;
227
- }
228
-
229
- ::slotted([slot='media']) {
230
- vertical-align: middle;
231
- }
232
-
233
- :host(:is([theme~='cover-media'], [theme~='stretch-media']))
234
- ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
235
- width: 100%;
236
- height: auto;
237
- aspect-ratio: var(--vaadin-card-media-aspect-ratio, 16/9);
238
- object-fit: cover;
239
- /* Fixes an issue where an icon overflows the card boundaries on Firefox: https://github.com/vaadin/web-components/issues/8641 */
240
- overflow: hidden;
241
- }
242
-
243
- :host([theme~='horizontal']:is([theme~='cover-media'], [theme~='stretch-media'])) {
244
- grid-template-columns: repeat(var(--_media), minmax(auto, 0.5fr)) 1fr;
245
- }
246
-
247
- :host([theme~='horizontal']:is([theme~='cover-media'], [theme~='stretch-media']))
248
- ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
249
- height: 100%;
250
- aspect-ratio: auto;
251
- }
252
-
253
- :host([theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
254
- margin-top: calc(var(--_padding) * -1);
255
- margin-inline: calc(var(--_padding) * -1);
256
- width: calc(100% + var(--_padding) * 2);
257
- max-width: none;
258
- border-radius: inherit;
259
- border-end-end-radius: 0;
260
- border-end-start-radius: 0;
261
- }
262
-
263
- :host([theme~='horizontal'][theme~='cover-media']) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
264
- margin-inline-end: 0;
265
- width: calc(100% + var(--_padding));
266
- height: calc(100% + var(--_padding) * 2);
267
- border-radius: inherit;
268
- border-start-end-radius: 0;
269
- border-end-end-radius: 0;
270
- }
271
-
272
- /* Scroller in content */
273
- [part='content'] ::slotted(vaadin-scroller) {
274
- margin-inline: calc(var(--_padding) * -1);
275
- padding-inline: var(--_padding);
276
- }
61
+ return cardStyles;
62
+ }
277
63
 
278
- [part='content'] ::slotted(vaadin-scroller)::before,
279
- [part='content'] ::slotted(vaadin-scroller)::after {
280
- margin-inline: calc(var(--_padding) * -1);
281
- }
282
- `;
64
+ static get lumoInjector() {
65
+ return {
66
+ includeBaseStyles: true,
67
+ };
283
68
  }
284
69
 
285
70
  static get properties() {
package/vaadin-card.js CHANGED
@@ -1,3 +1,3 @@
1
- import './theme/lumo/vaadin-card.js';
1
+ import './src/vaadin-card.js';
2
2
 
3
3
  export * from './src/vaadin-card.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/card",
4
- "version": "25.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
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.0.0-alpha2",
4
+ "version": "25.0.0-alpha21",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -1,6 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/style.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
5
- declare const card: import("lit").CSSResult;
6
- export { card };
@@ -1,76 +0,0 @@
1
- import '@vaadin/vaadin-lumo-styles/color.js';
2
- import '@vaadin/vaadin-lumo-styles/style.js';
3
- import '@vaadin/vaadin-lumo-styles/spacing.js';
4
- import '@vaadin/vaadin-lumo-styles/typography.js';
5
- import { addGlobalThemeStyles, css, registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';
6
-
7
- const cardProps = css`
8
- html {
9
- --vaadin-card-background: var(--lumo-contrast-5pct);
10
- --vaadin-card-border-radius: var(--lumo-border-radius-l);
11
- --vaadin-card-border-width: 0;
12
- --vaadin-card-border-color: var(--lumo-contrast-20pct);
13
- --vaadin-card-padding: var(--lumo-space-m);
14
- --vaadin-card-gap: var(--lumo-space-m);
15
- --vaadin-card-shadow: none;
16
- }
17
- `;
18
-
19
- addGlobalThemeStyles('card-props', cardProps);
20
-
21
- const card = css`
22
- :host {
23
- background: var(--vaadin-card-background);
24
- border-radius: var(--vaadin-card-border-radius);
25
- box-shadow: var(--vaadin-card-shadow);
26
- position: relative;
27
- }
28
-
29
- /* Could be an inset outline on the host as well, but rounded outlines only work since Safari 16.4 */
30
- :host::before {
31
- content: '';
32
- position: absolute;
33
- inset: var(--_card-border-inset, 0);
34
- border-radius: var(--_card-border-pseudo-radius, inherit);
35
- border: var(--vaadin-card-border, var(--vaadin-card-border-width) solid var(--vaadin-card-border-color));
36
- pointer-events: none;
37
- }
38
-
39
- :host([theme~='outlined']) {
40
- --vaadin-card-border-width: 1px;
41
- --vaadin-card-background: var(--lumo-base-color);
42
- }
43
-
44
- :host([theme~='elevated']) {
45
- --vaadin-card-background: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct)) var(--lumo-base-color);
46
- --vaadin-card-shadow: var(--lumo-box-shadow-xs);
47
- --vaadin-card-border-width: 1px;
48
- --_card-border-inset: calc(-1 * var(--vaadin-card-border-width));
49
- --_card-border-pseudo-radius: calc(var(--vaadin-card-border-radius) + var(--vaadin-card-border-width));
50
- }
51
-
52
- :host([theme~='elevated']:not([theme~='outlined'])) {
53
- --vaadin-card-border-color: var(--lumo-contrast-10pct);
54
- }
55
-
56
- :host(:where([theme~='stretch-media'])) ::slotted([slot='media']:is(img, video, svg, vaadin-icon)) {
57
- border-radius: var(--lumo-border-radius-m);
58
- }
59
-
60
- ::slotted([slot='title']) {
61
- font-size: var(--lumo-font-size-l);
62
- line-height: var(--lumo-line-height-xs);
63
- font-weight: 600;
64
- color: var(--lumo-header-text-color);
65
- }
66
-
67
- ::slotted([slot='subtitle']) {
68
- font-size: var(--lumo-font-size-m);
69
- line-height: var(--lumo-line-height-xs);
70
- color: var(--lumo-secondary-text-color);
71
- }
72
- `;
73
-
74
- registerStyles('vaadin-card', card, { moduleId: 'lumo-card' });
75
-
76
- export { card };
@@ -1,2 +0,0 @@
1
- import './vaadin-card-styles.js';
2
- import '../../src/vaadin-card.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-card-styles.js';
2
- import '../../src/vaadin-card.js';