@vaadin/dashboard 25.0.0-alpha1 → 25.0.0-alpha10

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.
Files changed (35) hide show
  1. package/README.md +0 -2
  2. package/package.json +12 -9
  3. package/src/styles/vaadin-dashboard-base-styles.d.ts +13 -0
  4. package/src/styles/vaadin-dashboard-base-styles.js +25 -0
  5. package/src/styles/vaadin-dashboard-button-base-styles.d.ts +13 -0
  6. package/src/styles/vaadin-dashboard-button-base-styles.js +24 -0
  7. package/src/styles/vaadin-dashboard-button-core-styles.d.ts +13 -0
  8. package/src/styles/vaadin-dashboard-button-core-styles.js +20 -0
  9. package/src/styles/vaadin-dashboard-core-styles.d.ts +13 -0
  10. package/src/styles/vaadin-dashboard-core-styles.js +25 -0
  11. package/src/styles/vaadin-dashboard-layout-base-styles.d.ts +13 -0
  12. package/src/styles/vaadin-dashboard-layout-base-styles.js +85 -0
  13. package/src/styles/vaadin-dashboard-layout-core-styles.d.ts +13 -0
  14. package/src/styles/vaadin-dashboard-layout-core-styles.js +85 -0
  15. package/src/styles/vaadin-dashboard-section-base-styles.d.ts +13 -0
  16. package/src/styles/vaadin-dashboard-section-base-styles.js +64 -0
  17. package/src/styles/vaadin-dashboard-section-core-styles.d.ts +13 -0
  18. package/src/styles/vaadin-dashboard-section-core-styles.js +53 -0
  19. package/src/styles/vaadin-dashboard-widget-base-styles.d.ts +13 -0
  20. package/src/styles/vaadin-dashboard-widget-base-styles.js +109 -0
  21. package/src/styles/vaadin-dashboard-widget-core-styles.d.ts +13 -0
  22. package/src/styles/vaadin-dashboard-widget-core-styles.js +57 -0
  23. package/src/styles/vaadin-dashboard-widget-section-base-styles.js +297 -0
  24. package/src/{vaadin-dashboard-styles.js → styles/vaadin-dashboard-widget-section-core-styles.js} +1 -7
  25. package/src/vaadin-dashboard-button.js +4 -7
  26. package/src/vaadin-dashboard-item-mixin.js +0 -5
  27. package/src/vaadin-dashboard-layout-mixin.js +0 -78
  28. package/src/vaadin-dashboard-layout.js +9 -5
  29. package/src/vaadin-dashboard-section.js +7 -46
  30. package/src/vaadin-dashboard-widget.js +7 -50
  31. package/src/vaadin-dashboard.js +5 -17
  32. package/theme/lumo/vaadin-dashboard-section-styles.js +0 -6
  33. package/theme/lumo/vaadin-dashboard-widget-styles.js +16 -21
  34. package/web-types.json +2 -2
  35. package/web-types.lit.json +2 -2
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import type { CSSResult } from 'lit';
12
+
13
+ export const dashboardWidgetStyles: CSSResult;
@@ -0,0 +1,57 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import { css } from 'lit';
12
+ import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-core-styles.js';
13
+
14
+ const widgetStyles = css`
15
+ :host {
16
+ display: flex;
17
+ flex-direction: column;
18
+ grid-column: var(--_item-column);
19
+ grid-row: var(--_item-row);
20
+ position: relative;
21
+ }
22
+
23
+ :host([hidden]) {
24
+ display: none !important;
25
+ }
26
+
27
+ :host(:not([editable])) [part~='resize-button'] {
28
+ display: none;
29
+ }
30
+
31
+ [part~='content'] {
32
+ flex: 1;
33
+ overflow: hidden;
34
+ min-height: 1rem;
35
+ }
36
+
37
+ [part~='resize-button'] {
38
+ position: absolute;
39
+ bottom: 0;
40
+ inset-inline-end: 0;
41
+ z-index: 1;
42
+ overflow: hidden;
43
+ }
44
+
45
+ :host([resizing])::after {
46
+ content: '';
47
+ z-index: 2;
48
+ position: absolute;
49
+ top: -1px;
50
+ width: var(--_widget-resizer-width, 0);
51
+ height: var(--_widget-resizer-height, 0);
52
+ background: rgba(0, 0, 0, 0.1);
53
+ border-radius: inherit;
54
+ }
55
+ `;
56
+
57
+ export const dashboardWidgetStyles = [widgetStyles, dashboardWidgetAndSectionStyles];
@@ -0,0 +1,297 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2000 - 2025 Vaadin Ltd.
4
+ *
5
+ * This program is available under Vaadin Commercial License and Service Terms.
6
+ *
7
+ *
8
+ * See https://vaadin.com/commercial-license-and-service-terms for the full
9
+ * license.
10
+ */
11
+ import '@vaadin/component-base/src/style-props.js';
12
+ import { css } from 'lit';
13
+
14
+ export const dashboardWidgetAndSectionStyles = css`
15
+ :host {
16
+ box-sizing: border-box;
17
+ --_widget-background: var(--vaadin-dashboard-widget-background, var(--vaadin-background-color));
18
+ --_widget-border-radius: var(--vaadin-dashboard-widget-border-radius, var(--vaadin-radius-m));
19
+ --_widget-border-width: var(--vaadin-dashboard-widget-border-width, 1px);
20
+ --_widget-border-color: var(--vaadin-dashboard-widget-border-color, var(--vaadin-border-color));
21
+ --_widget-shadow: var(--vaadin-dashboard-widget-shadow, 0 0 0 0 transparent);
22
+ --_widget-editable-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3);
23
+ --_widget-selected-shadow: 0 3px 12px -1px rgba(0, 0, 0, 0.3);
24
+ --_drop-target-background: var(--vaadin-dashboard-drop-target-background, var(--vaadin-background-container));
25
+ --_drop-target-border-color: var(--vaadin-dashboard-drop-target-border-color, var(--vaadin-border-color));
26
+ --_focus-ring-color: var(--vaadin-focus-ring-color);
27
+ --_focus-ring-width: var(--vaadin-focus-ring-width);
28
+ }
29
+
30
+ :host([focused]) {
31
+ z-index: 1;
32
+ outline: var(--_focus-ring-width) solid var(--_focus-ring-color);
33
+ outline-offset: calc(var(--_widget-border-width) * -1);
34
+ }
35
+
36
+ :host([dragging]) {
37
+ box-shadow: none;
38
+ background: var(--_drop-target-background);
39
+ border-color: var(--_drop-target-border-color);
40
+ }
41
+
42
+ :host([dragging]) * {
43
+ visibility: hidden;
44
+ }
45
+
46
+ :host(:not([editable])) [part~='move-button'],
47
+ :host(:not([editable])) [part~='remove-button'],
48
+ :host(:not([editable])) #focus-button,
49
+ :host(:not([editable])) #focus-button-wrapper,
50
+ :host(:not([editable])) .mode-controls {
51
+ display: none;
52
+ }
53
+
54
+ #focustrap {
55
+ display: contents;
56
+ }
57
+
58
+ header {
59
+ display: flex;
60
+ align-items: center;
61
+ box-sizing: border-box;
62
+ justify-content: space-between;
63
+ gap: var(--vaadin-dashboard-header-gap, var(--vaadin-gap-container-inline));
64
+ }
65
+
66
+ [part='title'] {
67
+ flex: 1;
68
+ color: var(--vaadin-dashboard-widget-title-color, var(--vaadin-color));
69
+ font-size: var(--vaadin-dashboard-widget-title-font-size, 1em);
70
+ font-weight: var(--vaadin-dashboard-widget-title-font-weight, 500);
71
+ line-height: var(--vaadin-dashboard-widget-title-line-height, inherit);
72
+ white-space: var(--vaadin-dashboard-widget-title-wrap, wrap);
73
+ text-overflow: ellipsis;
74
+ overflow: hidden;
75
+ align-self: safe center;
76
+ }
77
+
78
+ vaadin-dashboard-button {
79
+ z-index: 1;
80
+ padding: 4px;
81
+ }
82
+
83
+ vaadin-dashboard-button .icon::before {
84
+ display: block;
85
+ content: '';
86
+ height: var(--vaadin-icon-size, 1lh);
87
+ width: var(--vaadin-icon-size, 1lh);
88
+ background: currentColor;
89
+ mask-image: var(--icon);
90
+ /* TODO not sure why this is needed. Probably something wrong with the --_vaadin-icon-drag SVG */
91
+ mask-size: 100%;
92
+ }
93
+
94
+ #focus-button-wrapper,
95
+ #focus-button {
96
+ position: absolute;
97
+ inset: 0;
98
+ opacity: 0;
99
+ }
100
+
101
+ #focus-button {
102
+ pointer-events: none;
103
+ padding: 0;
104
+ border: none;
105
+ }
106
+
107
+ .mode-controls {
108
+ position: absolute;
109
+ inset: 0;
110
+ z-index: 2;
111
+ }
112
+
113
+ .mode-controls[hidden] {
114
+ display: none;
115
+ }
116
+
117
+ /* Drag handle */
118
+ [part~='move-button'] {
119
+ cursor: move;
120
+ --icon: var(--_vaadin-icon-drag);
121
+ }
122
+
123
+ /* Remove button */
124
+ [part~='remove-button'] {
125
+ cursor: pointer;
126
+ --icon: var(--_vaadin-icon-cross);
127
+ }
128
+
129
+ /* Move-mode buttons */
130
+ [part~='move-backward-button'],
131
+ [part~='move-forward-button'],
132
+ [part~='move-apply-button'] {
133
+ position: absolute;
134
+ top: 50%;
135
+ }
136
+
137
+ [part~='move-backward-button'] {
138
+ inset-inline-start: 0;
139
+ transform: translateY(-50%);
140
+ --icon: var(--_vaadin-icon-chevron-down);
141
+ }
142
+
143
+ [part~='move-forward-button'] {
144
+ inset-inline-end: 0;
145
+ transform: translateY(-50%);
146
+ --icon: var(--_vaadin-icon-chevron-down);
147
+ }
148
+
149
+ [part~='move-apply-button'] {
150
+ left: 50%;
151
+ transform: translate(-50%, -50%);
152
+ --icon: var(--_vaadin-icon-checkmark);
153
+ }
154
+
155
+ :host([first-child]) [part~='move-backward-button'],
156
+ :host([last-child]) [part~='move-forward-button'] {
157
+ display: none;
158
+ }
159
+
160
+ :host(:not([dir='rtl'])) [part~='move-backward-button'],
161
+ :host([dir='rtl']) [part~='move-forward-button'] {
162
+ border-top-left-radius: 0;
163
+ border-bottom-left-radius: 0;
164
+ }
165
+
166
+ :host(:not([dir='rtl'])) [part~='move-forward-button'],
167
+ :host([dir='rtl']) [part~='move-backward-button'] {
168
+ border-top-right-radius: 0;
169
+ border-bottom-right-radius: 0;
170
+ }
171
+
172
+ :host(:not([dir='rtl'])) [part~='move-backward-button'] .icon,
173
+ :host([dir='rtl']) [part~='move-forward-button'] .icon {
174
+ rotate: 90deg;
175
+ }
176
+
177
+ :host(:not([dir='rtl'])) [part~='move-forward-button'] .icon,
178
+ :host([dir='rtl']) [part~='move-backward-button'] .icon {
179
+ rotate: -90deg;
180
+ }
181
+
182
+ /* Resize-mode buttons */
183
+ [part~='resize-shrink-width-button'],
184
+ [part~='resize-shrink-height-button'],
185
+ [part~='resize-grow-width-button'],
186
+ [part~='resize-grow-height-button'],
187
+ [part~='resize-apply-button'] {
188
+ position: absolute;
189
+ }
190
+
191
+ [part~='resize-shrink-width-button'] {
192
+ inset-inline-end: 0;
193
+ top: 50%;
194
+ }
195
+
196
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
197
+ transform: translateY(-50%) translateX(-100%);
198
+ }
199
+
200
+ :host([dir='rtl']) [part~='resize-shrink-width-button'] {
201
+ transform: translateY(-50%) translateX(100%);
202
+ }
203
+
204
+ .mode-controls:has([part~='resize-grow-width-button'][hidden]) [part~='resize-shrink-width-button'] {
205
+ transform: translateY(-50%);
206
+ }
207
+
208
+ [part~='resize-grow-width-button'] {
209
+ inset-inline-start: 100%;
210
+ top: 50%;
211
+ }
212
+
213
+ :host(:not([dir='rtl'])) [part~='resize-grow-width-button'] {
214
+ transform: translateY(-50%) translateX(-100%);
215
+ }
216
+
217
+ :host([dir='rtl']) [part~='resize-grow-width-button'] {
218
+ transform: translateY(-50%) translateX(100%);
219
+ }
220
+
221
+ [part~='resize-shrink-height-button'] {
222
+ bottom: 0;
223
+ left: 50%;
224
+ transform: translateX(-50%) translateY(-100%);
225
+ }
226
+
227
+ [part~='resize-grow-height-button'] {
228
+ top: 100%;
229
+ left: 50%;
230
+ transform: translateX(-50%) translateY(-100%);
231
+ }
232
+
233
+ [part~='resize-grow-height-button'],
234
+ [part~='resize-grow-width-button'] {
235
+ --icon: var(--_vaadin-icon-plus);
236
+ }
237
+
238
+ [part~='resize-shrink-height-button'],
239
+ [part~='resize-shrink-width-button'] {
240
+ --icon: var(--_vaadin-icon-minus);
241
+ }
242
+
243
+ [part~='resize-apply-button'] {
244
+ left: 50%;
245
+ top: 50%;
246
+ transform: translate(-50%, -50%);
247
+ --icon: var(--_vaadin-icon-checkmark);
248
+ }
249
+
250
+ [part~='resize-shrink-width-button'] + [part~='resize-grow-width-button'] {
251
+ margin-left: 1px;
252
+ }
253
+
254
+ [part~='resize-grow-height-button'],
255
+ [part~='resize-shrink-height-button'] {
256
+ border-bottom-left-radius: 0;
257
+ border-bottom-right-radius: 0;
258
+ }
259
+
260
+ [part~='resize-shrink-height-button']:not([hidden]) + [part~='resize-grow-height-button'] {
261
+ border-top-left-radius: 0;
262
+ border-top-right-radius: 0;
263
+ }
264
+
265
+ [part~='resize-shrink-height-button'] + [part~='resize-grow-height-button'] {
266
+ margin-top: 1px;
267
+ }
268
+
269
+ :host(:not([dir='rtl'])) [part~='resize-grow-width-button'],
270
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
271
+ border-top-right-radius: 0;
272
+ border-bottom-right-radius: 0;
273
+ }
274
+
275
+ :host([dir='rtl']) [part~='resize-grow-width-button'],
276
+ :host([dir='rtl']) [part~='resize-shrink-width-button'] {
277
+ border-top-left-radius: 0;
278
+ border-bottom-left-radius: 0;
279
+ }
280
+
281
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
282
+ border-top-left-radius: 0;
283
+ border-bottom-left-radius: 0;
284
+ }
285
+
286
+ :host([dir='rtl']) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
287
+ border-top-right-radius: 0;
288
+ border-bottom-right-radius: 0;
289
+ }
290
+
291
+ @media (forced-colors: active) {
292
+ vaadin-dashboard-button .icon::before {
293
+ background: currentColor;
294
+ forced-color-adjust: none;
295
+ }
296
+ }
297
+ `;
@@ -8,13 +8,7 @@
8
8
  * See https://vaadin.com/commercial-license-and-service-terms for the full
9
9
  * license.
10
10
  */
11
- import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
-
13
- export const hasWidgetWrappers = css`
14
- ::slotted(vaadin-dashboard-widget-wrapper) {
15
- display: contents;
16
- }
17
- `;
11
+ import { css } from 'lit';
18
12
 
19
13
  export const dashboardWidgetAndSectionStyles = css`
20
14
  :host {
@@ -9,25 +9,22 @@
9
9
  * license.
10
10
  */
11
11
  import { html, LitElement } from 'lit';
12
- import { buttonStyles } from '@vaadin/button/src/vaadin-button-core-styles.js';
13
12
  import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
14
13
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
15
14
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
16
15
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
17
16
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
17
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
18
18
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
19
+ import { dashboardButtonStyles } from './styles/vaadin-dashboard-button-core-styles.js';
19
20
 
20
- class DashboardButton extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
21
+ class DashboardButton extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
21
22
  static get is() {
22
23
  return 'vaadin-dashboard-button';
23
24
  }
24
25
 
25
- static get experimental() {
26
- return 'dashboardComponent';
27
- }
28
-
29
26
  static get styles() {
30
- return buttonStyles;
27
+ return dashboardButtonStyles;
31
28
  }
32
29
 
33
30
  /** @protected */
@@ -14,7 +14,6 @@ import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller
14
14
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
15
15
  import { KeyboardController } from './keyboard-controller.js';
16
16
  import { fireMove, fireRemove, fireResize } from './vaadin-dashboard-helpers.js';
17
- import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-styles.js';
18
17
 
19
18
  const DEFAULT_I18N = {
20
19
  selectWidget: 'Select widget for editing',
@@ -47,10 +46,6 @@ export function getDefaultI18n() {
47
46
  */
48
47
  export const DashboardItemMixin = (superClass) =>
49
48
  class DashboardItemMixinClass extends ResizeMixin(superClass) {
50
- static get styles() {
51
- return dashboardWidgetAndSectionStyles;
52
- }
53
-
54
49
  static get properties() {
55
50
  return {
56
51
  /** @protected */
@@ -9,7 +9,6 @@
9
9
  * license.
10
10
  */
11
11
  import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
12
- import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
12
 
14
13
  /**
15
14
  * A mixin to enable the dashboard layout functionality
@@ -19,83 +18,6 @@ import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
19
18
  */
20
19
  export const DashboardLayoutMixin = (superClass) =>
21
20
  class DashboardLayoutMixinClass extends ResizeMixin(superClass) {
22
- static get styles() {
23
- return css`
24
- :host {
25
- display: block;
26
- overflow: auto;
27
- box-sizing: border-box;
28
- width: 100%;
29
- }
30
-
31
- :host([hidden]) {
32
- display: none !important;
33
- }
34
-
35
- :host([dense-layout]) #grid {
36
- grid-auto-flow: dense;
37
- }
38
-
39
- #grid {
40
- box-sizing: border-box;
41
-
42
- /* Padding around dashboard edges */
43
- --_default-padding: 1rem;
44
- --_padding: max(0px, var(--vaadin-dashboard-padding, var(--_default-padding)));
45
- padding: var(--_padding);
46
-
47
- /* Gap between widgets */
48
- --_default-gap: 1rem;
49
- --_gap: max(0px, var(--vaadin-dashboard-gap, var(--_default-gap)));
50
- gap: var(--_gap);
51
-
52
- /* Default min and max column widths */
53
- --_default-col-min-width: 25rem;
54
- --_default-col-max-width: 1fr;
55
-
56
- /* Effective min and max column widths */
57
- --_col-min-width: var(--vaadin-dashboard-col-min-width, var(--_default-col-min-width));
58
- --_col-max-width: var(--vaadin-dashboard-col-max-width, var(--_default-col-max-width));
59
-
60
- /* Effective max column count */
61
- --_col-max-count: var(--vaadin-dashboard-col-max-count, var(--_col-count));
62
-
63
- /* Effective column count */
64
- --_effective-col-count: min(var(--_col-count), var(--_col-max-count));
65
-
66
- /* Default row min height */
67
- --_default-row-min-height: 12rem;
68
- /* Effective row min height */
69
- --_row-min-height: var(--vaadin-dashboard-row-min-height, var(--_default-row-min-height));
70
- /* Effective row height */
71
- --_row-height: minmax(var(--_row-min-height, auto), auto);
72
-
73
- display: grid;
74
- overflow: hidden;
75
- min-width: calc(var(--_col-min-width) + var(--_padding) * 2);
76
-
77
- grid-template-columns: repeat(
78
- var(--_effective-col-count, auto-fill),
79
- minmax(var(--_col-min-width), var(--_col-max-width))
80
- );
81
-
82
- grid-auto-rows: var(--_row-height);
83
- }
84
-
85
- ::slotted(*) {
86
- /* The grid-column value applied to children */
87
- --_item-column: span
88
- min(var(--vaadin-dashboard-widget-colspan, 1), var(--_effective-col-count, var(--_col-count)));
89
-
90
- grid-column: var(--_item-column);
91
-
92
- /* The grid-row value applied to children */
93
- --_item-row: span var(--vaadin-dashboard-widget-rowspan, 1);
94
- grid-row: var(--_item-row);
95
- }
96
- `;
97
- }
98
-
99
21
  static get properties() {
100
22
  return {
101
23
  /**
@@ -12,7 +12,9 @@ import { html, LitElement } from 'lit';
12
12
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
13
13
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
14
14
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
15
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
15
16
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
17
+ import { dashboardLayoutStyles } from './styles/vaadin-dashboard-layout-core-styles.js';
16
18
  import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
17
19
 
18
20
  /**
@@ -55,19 +57,21 @@ import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
55
57
  * @mixes ElementMixin
56
58
  * @mixes ThemableMixin
57
59
  */
58
- class DashboardLayout extends DashboardLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
60
+ class DashboardLayout extends DashboardLayoutMixin(
61
+ ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
62
+ ) {
59
63
  static get is() {
60
64
  return 'vaadin-dashboard-layout';
61
65
  }
62
66
 
63
- static get experimental() {
64
- return 'dashboardComponent';
65
- }
66
-
67
67
  static get cvdlName() {
68
68
  return 'vaadin-dashboard';
69
69
  }
70
70
 
71
+ static get styles() {
72
+ return dashboardLayoutStyles;
73
+ }
74
+
71
75
  /** @protected */
72
76
  render() {
73
77
  return html`<div id="grid"><slot></slot></div>`;
@@ -12,10 +12,11 @@ import { html, LitElement } from 'lit';
12
12
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
13
13
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
14
14
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
15
- import { css, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
15
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
16
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
17
+ import { dashboardSectionStyles } from './styles/vaadin-dashboard-section-core-styles.js';
16
18
  import { DashboardItemMixin } from './vaadin-dashboard-item-mixin.js';
17
19
  import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
18
- import { hasWidgetWrappers } from './vaadin-dashboard-styles.js';
19
20
 
20
21
  /**
21
22
  * A section component for use with the Dashboard component
@@ -69,55 +70,15 @@ import { hasWidgetWrappers } from './vaadin-dashboard-styles.js';
69
70
  * @mixes ThemableMixin
70
71
  * @mixes DashboardItemMixin
71
72
  */
72
- class DashboardSection extends DashboardItemMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
73
+ class DashboardSection extends DashboardItemMixin(
74
+ ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
75
+ ) {
73
76
  static get is() {
74
77
  return 'vaadin-dashboard-section';
75
78
  }
76
79
 
77
- static get experimental() {
78
- return 'dashboardComponent';
79
- }
80
-
81
80
  static get styles() {
82
- return [
83
- css`
84
- :host {
85
- display: grid;
86
- position: relative;
87
- grid-template-columns: subgrid;
88
- --_section-column: 1 / calc(var(--_effective-col-count) + 1);
89
- grid-column: var(--_section-column) !important;
90
- gap: var(--_gap, 1rem);
91
- /* Dashboard section header height */
92
- --_section-header-height: minmax(0, auto);
93
- grid-template-rows: var(--_section-header-height) repeat(auto-fill, var(--_row-height));
94
- grid-auto-rows: var(--_row-height);
95
- }
96
-
97
- :host([hidden]) {
98
- display: none !important;
99
- }
100
-
101
- ::slotted(*) {
102
- --_item-column: span
103
- min(var(--vaadin-dashboard-widget-colspan, 1), var(--_effective-col-count, var(--_col-count)));
104
-
105
- grid-column: var(--_item-column);
106
- --_item-row: span var(--vaadin-dashboard-widget-rowspan, 1);
107
- grid-row: var(--_item-row);
108
- }
109
-
110
- header {
111
- grid-column: var(--_section-column);
112
- }
113
-
114
- :host::before {
115
- z-index: 2 !important;
116
- }
117
- `,
118
- hasWidgetWrappers,
119
- super.styles,
120
- ];
81
+ return dashboardSectionStyles;
121
82
  }
122
83
 
123
84
  static get properties() {