@vaadin/dashboard 25.0.0-alpha8 → 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/dashboard",
3
- "version": "25.0.0-alpha8",
3
+ "version": "25.0.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,6 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
24
26
  "theme",
25
27
  "vaadin-*.d.ts",
26
28
  "vaadin-*.js",
@@ -37,16 +39,16 @@
37
39
  ],
38
40
  "dependencies": {
39
41
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha8",
41
- "@vaadin/button": "25.0.0-alpha8",
42
- "@vaadin/component-base": "25.0.0-alpha8",
43
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
44
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
42
+ "@vaadin/a11y-base": "25.0.0-alpha9",
43
+ "@vaadin/button": "25.0.0-alpha9",
44
+ "@vaadin/component-base": "25.0.0-alpha9",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
46
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
45
47
  "lit": "^3.0.0"
46
48
  },
47
49
  "devDependencies": {
48
- "@vaadin/chai-plugins": "25.0.0-alpha8",
49
- "@vaadin/test-runner-commands": "25.0.0-alpha8",
50
+ "@vaadin/chai-plugins": "25.0.0-alpha9",
51
+ "@vaadin/test-runner-commands": "25.0.0-alpha9",
50
52
  "@vaadin/testing-helpers": "^2.0.0"
51
53
  },
52
54
  "cvdlName": "vaadin-dashboard",
@@ -54,5 +56,5 @@
54
56
  "web-types.json",
55
57
  "web-types.lit.json"
56
58
  ],
57
- "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
59
+ "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
58
60
  }
@@ -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 dashboardStyles: CSSResult;
@@ -0,0 +1,25 @@
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 { dashboardLayoutStyles } from './vaadin-dashboard-layout-core-styles.js';
13
+
14
+ const dashboard = css`
15
+ #grid[item-resizing] {
16
+ -webkit-user-select: none;
17
+ user-select: none;
18
+ }
19
+
20
+ ::slotted(vaadin-dashboard-widget-wrapper) {
21
+ display: contents;
22
+ }
23
+ `;
24
+
25
+ export const dashboardStyles = [dashboardLayoutStyles, dashboard];
@@ -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 dashboardButtonStyles: CSSResult;
@@ -0,0 +1,24 @@
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 { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-core-styles.js';
13
+
14
+ const dashboardButton = css`
15
+ :host {
16
+ min-width: 1em;
17
+ }
18
+
19
+ :host([theme~='tertiary']) {
20
+ color: var(--vaadin-dashboard-button-text-color, var(--vaadin-color-subtle));
21
+ }
22
+ `;
23
+
24
+ export const dashboardButtonStyles = [buttonStyles, dashboardButton];
@@ -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 dashboardLayoutStyles: CSSResult;
@@ -0,0 +1,85 @@
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
+
13
+ export const dashboardLayoutStyles = css`
14
+ :host {
15
+ display: block;
16
+ overflow: auto;
17
+ box-sizing: border-box;
18
+ width: 100%;
19
+ }
20
+
21
+ :host([hidden]) {
22
+ display: none !important;
23
+ }
24
+
25
+ :host([dense-layout]) #grid {
26
+ grid-auto-flow: dense;
27
+ }
28
+
29
+ #grid {
30
+ box-sizing: border-box;
31
+
32
+ /* Padding around dashboard edges */
33
+ --_default-padding: 1em;
34
+ --_padding: max(0px, var(--vaadin-dashboard-padding, var(--_default-padding)));
35
+ padding: var(--_padding);
36
+
37
+ /* Gap between widgets */
38
+ --_default-gap: 0.5em;
39
+ --_gap: max(0px, var(--vaadin-dashboard-gap, var(--_default-gap)));
40
+ gap: var(--_gap);
41
+
42
+ /* Default min and max column widths */
43
+ --_default-col-min-width: 25em;
44
+ --_default-col-max-width: 1fr;
45
+
46
+ /* Effective min and max column widths */
47
+ --_col-min-width: var(--vaadin-dashboard-col-min-width, var(--_default-col-min-width));
48
+ --_col-max-width: var(--vaadin-dashboard-col-max-width, var(--_default-col-max-width));
49
+
50
+ /* Effective max column count */
51
+ --_col-max-count: var(--vaadin-dashboard-col-max-count, var(--_col-count));
52
+
53
+ /* Effective column count */
54
+ --_effective-col-count: min(var(--_col-count), var(--_col-max-count));
55
+
56
+ /* Default row min height */
57
+ --_default-row-min-height: 12em;
58
+ /* Effective row min height */
59
+ --_row-min-height: var(--vaadin-dashboard-row-min-height, var(--_default-row-min-height));
60
+ /* Effective row height */
61
+ --_row-height: minmax(var(--_row-min-height, auto), auto);
62
+
63
+ display: grid;
64
+ overflow: hidden;
65
+ min-width: calc(var(--_col-min-width) + var(--_padding) * 2);
66
+
67
+ grid-template-columns: repeat(
68
+ var(--_effective-col-count, auto-fill),
69
+ minmax(var(--_col-min-width), var(--_col-max-width))
70
+ );
71
+
72
+ grid-auto-rows: var(--_row-height);
73
+ }
74
+
75
+ ::slotted(*) {
76
+ /* The grid-column value applied to children */
77
+ --_item-column: span min(var(--vaadin-dashboard-widget-colspan, 1), var(--_effective-col-count, var(--_col-count)));
78
+
79
+ grid-column: var(--_item-column);
80
+
81
+ /* The grid-row value applied to children */
82
+ --_item-row: span var(--vaadin-dashboard-widget-rowspan, 1);
83
+ grid-row: var(--_item-row);
84
+ }
85
+ `;
@@ -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 dashboardSectionStyles: CSSResult;
@@ -0,0 +1,64 @@
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
+ import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-core-styles.js';
14
+
15
+ const sectionStyles = css`
16
+ :host {
17
+ display: grid;
18
+ position: relative;
19
+ grid-template-columns: subgrid;
20
+ --_section-column: 1 / calc(var(--_effective-col-count) + 1);
21
+ grid-column: var(--_section-column) !important;
22
+ gap: var(--_gap);
23
+ /* Dashboard section header height */
24
+ grid-template-rows: minmax(0, auto) repeat(auto-fill, var(--_row-height));
25
+ grid-auto-rows: var(--_row-height);
26
+ border: var(--_widget-border-width) solid var(--_widget-border-color);
27
+ border-radius: var(--vaadin-dashboard-section-border-radius, var(--vaadin-radius-l));
28
+ padding: calc(var(--_gap) - var(--_widget-border-width));
29
+ margin-inline: calc(var(--_gap) * -1);
30
+ margin-block: var(--_gap);
31
+ }
32
+
33
+ :host([hidden]) {
34
+ display: none !important;
35
+ }
36
+
37
+ ::slotted(*) {
38
+ --_item-column: span min(var(--vaadin-dashboard-widget-colspan, 1), var(--_effective-col-count, var(--_col-count)));
39
+
40
+ grid-column: var(--_item-column);
41
+ --_item-row: span var(--vaadin-dashboard-widget-rowspan, 1);
42
+ grid-row: var(--_item-row);
43
+ }
44
+
45
+ header {
46
+ grid-column: var(--_section-column);
47
+ }
48
+
49
+ :host::before {
50
+ z-index: 2 !important;
51
+ }
52
+
53
+ ::slotted(vaadin-dashboard-widget-wrapper) {
54
+ display: contents;
55
+ }
56
+
57
+ /* Section states */
58
+
59
+ :host(:not([editable])) {
60
+ --_widget-border-width: 0px;
61
+ }
62
+ `;
63
+
64
+ export const dashboardSectionStyles = [sectionStyles, dashboardWidgetAndSectionStyles];
@@ -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,109 @@
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
+ import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-core-styles.js';
14
+
15
+ const widgetStyles = css`
16
+ :host {
17
+ display: flex;
18
+ flex-direction: column;
19
+ grid-column: var(--_item-column);
20
+ grid-row: var(--_item-row);
21
+ position: relative;
22
+ background: var(--_widget-background);
23
+ border-radius: var(--_widget-border-radius);
24
+ box-shadow: var(--_widget-shadow);
25
+ border-color: var(--_widget-border-color);
26
+ }
27
+
28
+ :host::before {
29
+ content: '';
30
+ position: absolute;
31
+ inset: 0;
32
+ border-color: inherit;
33
+ border-width: var(--_widget-border-width);
34
+ border-style: solid;
35
+ border-radius: inherit;
36
+ pointer-events: none;
37
+ }
38
+
39
+ :host([hidden]) {
40
+ display: none !important;
41
+ }
42
+
43
+ :host(:not([editable])) [part~='resize-button'] {
44
+ display: none;
45
+ }
46
+
47
+ [part~='content'] {
48
+ flex: 1;
49
+ overflow: hidden;
50
+ min-height: 1em;
51
+ }
52
+
53
+ [part~='resize-button'] {
54
+ position: absolute;
55
+ bottom: 0;
56
+ inset-inline-end: 0;
57
+ z-index: 1;
58
+ overflow: hidden;
59
+ cursor: nwse-resize;
60
+ --icon: var(--_vaadin-icon-resize);
61
+ }
62
+
63
+ :host([dir='rtl']) [part~='resize-button'] {
64
+ cursor: sw-resize;
65
+ }
66
+
67
+ :host([dir='rtl']) [part~='resize-button'] .icon::before {
68
+ transform: scaleX(-1);
69
+ }
70
+
71
+ /* Widget states */
72
+
73
+ :host([editable]) {
74
+ --vaadin-dashboard-widget-shadow: var(--_widget-editable-shadow);
75
+ }
76
+
77
+ :host([selected]) {
78
+ --vaadin-dashboard-widget-shadow: var(--_widget-selected-shadow);
79
+ }
80
+
81
+ :host([resizing])::after {
82
+ content: '';
83
+ z-index: 2;
84
+ position: absolute;
85
+ top: 0;
86
+ width: var(--_widget-resizer-width, 0);
87
+ height: var(--_widget-resizer-height, 0);
88
+ background: color-mix(in srgb, currentColor 5%, var(--_widget-background) 70%);
89
+ border-color: color-mix(in srgb, currentColor 10%, transparent);
90
+ border-width: var(--_widget-border-width);
91
+ border-style: solid;
92
+ border-radius: inherit;
93
+ }
94
+
95
+ /* Widget parts */
96
+ header {
97
+ padding: var(--vaadin-dashboard-widget-header-padding, var(--vaadin-padding-container));
98
+ }
99
+
100
+ :host([editable]) header {
101
+ padding: var(--vaadin-dashboard-widget-header-padding, var(--vaadin-padding));
102
+ }
103
+
104
+ header:has([part~='title'][hidden]) {
105
+ padding: 0;
106
+ }
107
+ `;
108
+
109
+ 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
+ `;
@@ -66,12 +66,6 @@ const section = css`
66
66
  --_widget-filter: blur(10px);
67
67
  }
68
68
 
69
- :host([dragging]) {
70
- background: var(--_drop-target-background-color);
71
- outline: var(--_drop-target-border);
72
- box-shadow: 0 0 0 var(--_section-outline-offset) var(--_drop-target-background-color);
73
- }
74
-
75
69
  /* Accessible move mode controls */
76
70
 
77
71
  [part~='move-backward-button'] {
@@ -9,7 +9,6 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
9
9
  /* Styles shared between widgets and sections */
10
10
  const dashboardWidgetAndSection = css`
11
11
  /* stylelint-disable rule-empty-line-before */
12
- /* stylelint-disable length-zero-no-unit */
13
12
 
14
13
  :host {
15
14
  --_widget-background: var(--vaadin-dashboard-widget-background, var(--lumo-base-color));
@@ -304,18 +303,21 @@ const dashboardWidget = css`
304
303
  :host {
305
304
  border: 1px solid;
306
305
  }
306
+
307
307
  :host([focused]) {
308
308
  outline: 2px solid;
309
309
  outline-offset: 1px;
310
310
  }
311
+
311
312
  :host([selected]) {
312
313
  outline-width: 1px;
313
- outline-offset: 0px;
314
+ outline-offset: 0;
314
315
  outline-color: Highlight;
315
316
  }
317
+
316
318
  :host([selected][focused]) {
317
319
  outline-width: 3px;
318
- outline-offset: 0px;
320
+ outline-offset: 0;
319
321
  }
320
322
  }
321
323
  `;
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dashboard",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -136,7 +136,7 @@
136
136
  },
137
137
  {
138
138
  "name": "vaadin-dashboard",
139
- "description": "A responsive, grid-based dashboard layout component\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-dashboard#property-renderer) property.\n\nThe widgets and the sections will be generated and configured based on the renderer and the items provided.\n\n```html\n<vaadin-dashboard></vaadin-dashboard>\n```\n```js\nconst dashboard = document.querySelector('vaadin-dashboard');\n\ndashboard.items = [\n { title: 'Widget 1 title', content: 'Text 1', rowspan: 2 },\n { title: 'Widget 2 title', content: 'Text 2', colspan: 2 },\n {\n title: 'Section title',\n items: [{ title: 'Widget in section title', content: 'Text 3' }]\n },\n // ... more items\n];\n\ndashboard.renderer = (root, _dashboard, { item }) => {\n const widget = root.firstElementChild || document.createElement('vaadin-dashboard-widget');\n if (!root.contains(widget)) {\n root.appendChild(widget);\n }\n widget.widgetTitle = item.title;\n widget.textContent = item.content;\n};\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the dashboard\n`--vaadin-dashboard-col-max-width` | maximum column width of the dashboard\n`--vaadin-dashboard-row-min-height` | minimum row height of the dashboard\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`editable` | Set when the dashboard is editable.\n`dense-layout` | Set when the dashboard is in dense mode.\n`item-selected` | Set when an item is selected.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
139
+ "description": "A responsive, grid-based dashboard layout component\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-dashboard#property-renderer) property.\n\nThe widgets and the sections will be generated and configured based on the renderer and the items provided.\n\n```html\n<vaadin-dashboard></vaadin-dashboard>\n```\n```js\nconst dashboard = document.querySelector('vaadin-dashboard');\n\ndashboard.items = [\n { title: 'Widget 1 title', content: 'Text 1', rowspan: 2 },\n { title: 'Widget 2 title', content: 'Text 2', colspan: 2 },\n {\n title: 'Section title',\n items: [{ title: 'Widget in section title', content: 'Text 3' }]\n },\n // ... more items\n];\n\ndashboard.renderer = (root, _dashboard, { item }) => {\n const widget = root.firstElementChild || document.createElement('vaadin-dashboard-widget');\n if (!root.contains(widget)) {\n root.appendChild(widget);\n }\n widget.widgetTitle = item.title;\n widget.textContent = item.content;\n};\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the dashboard\n`--vaadin-dashboard-col-max-width` | maximum column width of the dashboard\n`--vaadin-dashboard-row-min-height` | minimum row height of the dashboard\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`editable` | Set when the dashboard is editable.\n`dense-layout` | Set when the dashboard is in dense mode.\n`item-selected` | Set when an item is selected.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
140
140
  "attributes": [
141
141
  {
142
142
  "name": "dense-layout",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dashboard",
4
- "version": "25.0.0-alpha8",
4
+ "version": "25.0.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -58,7 +58,7 @@
58
58
  },
59
59
  {
60
60
  "name": "vaadin-dashboard",
61
- "description": "A responsive, grid-based dashboard layout component\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha8/#/elements/vaadin-dashboard#property-renderer) property.\n\nThe widgets and the sections will be generated and configured based on the renderer and the items provided.\n\n```html\n<vaadin-dashboard></vaadin-dashboard>\n```\n```js\nconst dashboard = document.querySelector('vaadin-dashboard');\n\ndashboard.items = [\n { title: 'Widget 1 title', content: 'Text 1', rowspan: 2 },\n { title: 'Widget 2 title', content: 'Text 2', colspan: 2 },\n {\n title: 'Section title',\n items: [{ title: 'Widget in section title', content: 'Text 3' }]\n },\n // ... more items\n];\n\ndashboard.renderer = (root, _dashboard, { item }) => {\n const widget = root.firstElementChild || document.createElement('vaadin-dashboard-widget');\n if (!root.contains(widget)) {\n root.appendChild(widget);\n }\n widget.widgetTitle = item.title;\n widget.textContent = item.content;\n};\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the dashboard\n`--vaadin-dashboard-col-max-width` | maximum column width of the dashboard\n`--vaadin-dashboard-row-min-height` | minimum row height of the dashboard\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`editable` | Set when the dashboard is editable.\n`dense-layout` | Set when the dashboard is in dense mode.\n`item-selected` | Set when an item is selected.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
61
+ "description": "A responsive, grid-based dashboard layout component\n\n### Quick Start\n\nAssign an array to the [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-dashboard#property-renderer) property.\n\nThe widgets and the sections will be generated and configured based on the renderer and the items provided.\n\n```html\n<vaadin-dashboard></vaadin-dashboard>\n```\n```js\nconst dashboard = document.querySelector('vaadin-dashboard');\n\ndashboard.items = [\n { title: 'Widget 1 title', content: 'Text 1', rowspan: 2 },\n { title: 'Widget 2 title', content: 'Text 2', colspan: 2 },\n {\n title: 'Section title',\n items: [{ title: 'Widget in section title', content: 'Text 3' }]\n },\n // ... more items\n];\n\ndashboard.renderer = (root, _dashboard, { item }) => {\n const widget = root.firstElementChild || document.createElement('vaadin-dashboard-widget');\n if (!root.contains(widget)) {\n root.appendChild(widget);\n }\n widget.widgetTitle = item.title;\n widget.textContent = item.content;\n};\n```\n\n### Styling\n\nThe following custom properties are available:\n\nCustom Property | Description\n------------------------------------|-------------\n`--vaadin-dashboard-col-min-width` | minimum column width of the dashboard\n`--vaadin-dashboard-col-max-width` | maximum column width of the dashboard\n`--vaadin-dashboard-row-min-height` | minimum row height of the dashboard\n`--vaadin-dashboard-col-max-count` | maximum column count of the dashboard\n`--vaadin-dashboard-gap` | gap between child elements. Must be in length units (0 is not allowed, 0px is)\n`--vaadin-dashboard-padding` | space around the dashboard's outer edges. Must be in length units (0 is not allowed, 0px is)\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|-------------\n`editable` | Set when the dashboard is editable.\n`dense-layout` | Set when the dashboard is in dense mode.\n`item-selected` | Set when an item is selected.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
62
62
  "extension": true,
63
63
  "attributes": [
64
64
  {