@vaadin/dashboard 24.6.0-alpha9 → 24.6.0-beta1

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  A responsive, grid-based dashboard layout component
4
4
 
5
+ > ⚠️ This component is experimental and the API may change. In order to use it, enable the feature flag by setting `window.Vaadin.featureFlags.dashboardComponent = true`.
6
+
5
7
  > ℹ️  A commercial Vaadin [subscription](https://vaadin.com/pricing) is required to use Dashboard in your project.
6
8
 
7
9
  [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/dashboard)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/dashboard",
3
- "version": "24.6.0-alpha9",
3
+ "version": "24.6.0-beta1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,15 +37,15 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/button": "24.6.0-alpha9",
41
- "@vaadin/component-base": "24.6.0-alpha9",
42
- "@vaadin/vaadin-lumo-styles": "24.6.0-alpha9",
43
- "@vaadin/vaadin-material-styles": "24.6.0-alpha9",
44
- "@vaadin/vaadin-themable-mixin": "24.6.0-alpha9",
40
+ "@vaadin/button": "24.6.0-beta1",
41
+ "@vaadin/component-base": "24.6.0-beta1",
42
+ "@vaadin/vaadin-lumo-styles": "24.6.0-beta1",
43
+ "@vaadin/vaadin-material-styles": "24.6.0-beta1",
44
+ "@vaadin/vaadin-themable-mixin": "24.6.0-beta1",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/chai-plugins": "24.6.0-alpha9",
48
+ "@vaadin/chai-plugins": "24.6.0-beta1",
49
49
  "@vaadin/testing-helpers": "^1.0.0"
50
50
  },
51
51
  "cvdlName": "vaadin-dashboard",
@@ -53,5 +53,5 @@
53
53
  "web-types.json",
54
54
  "web-types.lit.json"
55
55
  ],
56
- "gitHead": "e303d77ba20c3089c9998be9a318733d9ec5b53c"
56
+ "gitHead": "ab28efb0dcf2cd1ef72100e2e8f32232fa49aacc"
57
57
  }
@@ -87,6 +87,10 @@ export function fireResize(element, colspanDelta, rowspanDelta) {
87
87
  },
88
88
  }),
89
89
  );
90
+
91
+ if ('requestUpdate' in element) {
92
+ element.requestUpdate();
93
+ }
90
94
  }
91
95
 
92
96
  /**
@@ -198,7 +198,17 @@ export const DashboardItemMixin = (superClass) =>
198
198
 
199
199
  /** @private */
200
200
  __renderResizeControls() {
201
- const hasMinRowHeight = getComputedStyle(this).getPropertyValue('--_vaadin-dashboard-row-min-height') !== 'auto';
201
+ const style = getComputedStyle(this);
202
+ const hasMinRowHeight = style.getPropertyValue('--_vaadin-dashboard-row-min-height') !== 'auto';
203
+
204
+ const effectiveColCount = style.getPropertyValue('--_vaadin-dashboard-col-count');
205
+ const maxColCount = style.getPropertyValue('--_vaadin-dashboard-col-max-count');
206
+ const colCount = Math.min(effectiveColCount, maxColCount);
207
+ const colspan = style.getPropertyValue('--vaadin-dashboard-item-colspan') || 1;
208
+ const rowspan = style.getPropertyValue('--vaadin-dashboard-item-rowspan') || 1;
209
+ const canShrinkWidth = colspan > 1;
210
+ const canShrinkHeight = rowspan > 1;
211
+ const canGrowWidth = colspan < colCount;
202
212
 
203
213
  return html`<div
204
214
  id="resize-controls"
@@ -221,6 +231,7 @@ export const DashboardItemMixin = (superClass) =>
221
231
  aria-label="${this.__i18n.resizeShrinkWidth}"
222
232
  title="${this.__i18n.resizeShrinkWidth}"
223
233
  @click="${() => fireResize(this, -1, 0)}"
234
+ .hidden="${!canShrinkWidth}"
224
235
  id="resize-shrink-width"
225
236
  part="resize-shrink-width-button"
226
237
  >
@@ -231,6 +242,7 @@ export const DashboardItemMixin = (superClass) =>
231
242
  aria-label="${this.__i18n.resizeGrowWidth}"
232
243
  title="${this.__i18n.resizeGrowWidth}"
233
244
  @click="${() => fireResize(this, 1, 0)}"
245
+ .hidden="${!canGrowWidth}"
234
246
  id="resize-grow-width"
235
247
  part="resize-grow-width-button"
236
248
  >
@@ -243,7 +255,7 @@ export const DashboardItemMixin = (superClass) =>
243
255
  @click="${() => fireResize(this, 0, -1)}"
244
256
  id="resize-shrink-height"
245
257
  part="resize-shrink-height-button"
246
- .hidden="${!hasMinRowHeight}"
258
+ .hidden="${!hasMinRowHeight || !canShrinkHeight}"
247
259
  >
248
260
  <div class="icon"></div>
249
261
  </vaadin-dashboard-button>
@@ -316,6 +328,8 @@ export const DashboardItemMixin = (superClass) =>
316
328
  __focusApply() {
317
329
  if (this.__moveMode) {
318
330
  this.$['move-apply'].focus();
331
+ } else if (this.__resizeMode) {
332
+ this.$['resize-apply'].focus();
319
333
  }
320
334
  }
321
335
 
@@ -19,19 +19,14 @@ export const hasWidgetWrappers = css`
19
19
  export const dashboardWidgetAndSectionStyles = css`
20
20
  :host {
21
21
  box-sizing: border-box;
22
- /* Calculates the offset by which mode buttons that by default overflow the widget edges
23
- should be shifted inwards based on a custom --vaadin-dashboard-spacing value */
24
- --_mode-button-spacing-offset: calc(
25
- max(0px, var(--_vaadin-dashboard-default-spacing) - var(--_vaadin-dashboard-spacing))
26
- );
27
22
  }
28
23
 
29
24
  :host([dragging]) * {
30
25
  visibility: hidden;
31
26
  }
32
27
 
33
- :host(:not([editable])) #drag-handle,
34
- :host(:not([editable])) #remove-button,
28
+ :host(:not([editable])) [part~='move-button'],
29
+ :host(:not([editable])) [part~='remove-button'],
35
30
  :host(:not([editable])) #focus-button,
36
31
  :host(:not([editable])) #focus-button-wrapper,
37
32
  :host(:not([editable])) .mode-controls {
@@ -75,67 +70,85 @@ export const dashboardWidgetAndSectionStyles = css`
75
70
  }
76
71
 
77
72
  /* Move-mode buttons */
78
- #move-backward,
79
- #move-forward,
80
- #move-apply {
73
+ [part~='move-backward-button'],
74
+ [part~='move-forward-button'],
75
+ [part~='move-apply-button'] {
81
76
  position: absolute;
82
77
  top: 50%;
83
78
  }
84
79
 
85
- #move-backward {
80
+ [part~='move-backward-button'] {
86
81
  inset-inline-start: 0;
87
82
  transform: translateY(-50%);
88
83
  }
89
84
 
90
- #move-forward {
85
+ [part~='move-forward-button'] {
91
86
  inset-inline-end: 0;
92
87
  transform: translateY(-50%);
93
88
  }
94
89
 
95
- #move-apply {
90
+ [part~='move-apply-button'] {
96
91
  left: 50%;
97
92
  transform: translate(-50%, -50%);
98
93
  }
99
94
 
100
- :host([first-child]) #move-backward,
101
- :host([last-child]) #move-forward {
95
+ :host([first-child]) [part~='move-backward-button'],
96
+ :host([last-child]) [part~='move-forward-button'] {
102
97
  display: none;
103
98
  }
104
99
 
105
100
  /* Resize-mode buttons */
106
- #resize-shrink-width,
107
- #resize-shrink-height,
108
- #resize-grow-width,
109
- #resize-grow-height,
110
- #resize-apply {
101
+ [part~='resize-shrink-width-button'],
102
+ [part~='resize-shrink-height-button'],
103
+ [part~='resize-grow-width-button'],
104
+ [part~='resize-grow-height-button'],
105
+ [part~='resize-apply-button'] {
111
106
  position: absolute;
112
107
  }
113
108
 
114
- #resize-shrink-width {
115
- inset-inline-end: calc(0px + var(--_mode-button-spacing-offset));
109
+ [part~='resize-shrink-width-button'] {
110
+ inset-inline-end: 0;
116
111
  top: 50%;
112
+ }
113
+
114
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
115
+ transform: translateY(-50%) translateX(-100%);
116
+ }
117
+
118
+ :host([dir='rtl']) [part~='resize-shrink-width-button'] {
119
+ transform: translateY(-50%) translateX(100%);
120
+ }
121
+
122
+ .mode-controls:has([part~='resize-grow-width-button'][hidden]) [part~='resize-shrink-width-button'] {
117
123
  transform: translateY(-50%);
118
124
  }
119
125
 
120
- #resize-grow-width {
121
- inset-inline-start: calc(100% - var(--_mode-button-spacing-offset));
126
+ [part~='resize-grow-width-button'] {
127
+ inset-inline-start: 100%;
122
128
  top: 50%;
123
- transform: translateY(-50%);
124
129
  }
125
130
 
126
- #resize-shrink-height {
127
- bottom: calc(0px + var(--_mode-button-spacing-offset));
131
+ :host(:not([dir='rtl'])) [part~='resize-grow-width-button'] {
132
+ transform: translateY(-50%) translateX(-100%);
133
+ }
134
+
135
+ :host([dir='rtl']) [part~='resize-grow-width-button'] {
136
+ transform: translateY(-50%) translateX(100%);
137
+ }
138
+
139
+ [part~='resize-shrink-height-button'] {
140
+ bottom: 0;
128
141
  left: 50%;
129
- transform: translateX(-50%);
142
+ transform: translateX(-50%) translateY(-100%);
130
143
  }
131
144
 
132
- #resize-grow-height {
133
- top: calc(100% - var(--_mode-button-spacing-offset));
145
+ [part~='resize-grow-height-button'] {
146
+ top: 100%;
134
147
  left: 50%;
135
- transform: translateX(-50%);
148
+ transform: translateX(-50%) translateY(-100%);
136
149
  }
137
150
 
138
- #resize-apply {
151
+ [part~='resize-apply-button'] {
139
152
  left: 50%;
140
153
  top: 50%;
141
154
 
@@ -118,16 +118,16 @@ class DashboardWidget extends DashboardItemMixin(ElementMixin(ThemableMixin(Poly
118
118
  display: none !important;
119
119
  }
120
120
 
121
- :host(:not([editable])) #resize-handle {
121
+ :host(:not([editable])) [part~='resize-button'] {
122
122
  display: none;
123
123
  }
124
124
 
125
- #content {
125
+ [part~='content'] {
126
126
  flex: 1;
127
127
  overflow: hidden;
128
128
  }
129
129
 
130
- #resize-handle {
130
+ [part~='resize-button'] {
131
131
  position: absolute;
132
132
  bottom: 0;
133
133
  inset-inline-end: 0;
@@ -461,6 +461,23 @@ class Dashboard extends DashboardLayoutMixin(ElementMixin(ThemableMixin(PolylitM
461
461
  this.__dispatchCustomEvent('dashboard-item-resize-mode-changed', getElementItem(e.target), e.detail.value);
462
462
  }
463
463
 
464
+ /**
465
+ * @private
466
+ */
467
+ __updateColumnCount() {
468
+ const previousColumnCount = this.$.grid.style.getPropertyValue('--_vaadin-dashboard-col-count');
469
+ super.__updateColumnCount();
470
+
471
+ // Request update for all the widgets if the column count has changed on resize
472
+ if (previousColumnCount !== this.$.grid.style.getPropertyValue('--_vaadin-dashboard-col-count')) {
473
+ this.querySelectorAll(WRAPPER_LOCAL_NAME).forEach((wrapper) => {
474
+ if (wrapper.firstElementChild && 'requestUpdate' in wrapper.firstElementChild) {
475
+ wrapper.firstElementChild.requestUpdate();
476
+ }
477
+ });
478
+ }
479
+ }
480
+
464
481
  /**
465
482
  * Fired when an item selected state changed
466
483
  *
@@ -79,13 +79,13 @@ const dashboardWidgetAndSection = css`
79
79
  }
80
80
 
81
81
  /* Drag handle styling */
82
- #drag-handle {
82
+ [part~='move-button'] {
83
83
  cursor: move;
84
- --icon: var(--lumo-icons-menu);
84
+ --icon: var(--lumo-icons-drag-handle);
85
85
  }
86
86
 
87
87
  /* Remove button styling */
88
- #remove-button {
88
+ [part~='remove-button'] {
89
89
  cursor: pointer;
90
90
  --icon: var(--lumo-icons-cross);
91
91
  }
@@ -101,7 +101,7 @@ const dashboardWidgetAndSection = css`
101
101
  }
102
102
 
103
103
  /* Content styling */
104
- #content {
104
+ [part~='content'] {
105
105
  min-height: var(--lumo-size-m);
106
106
  padding: var(--lumo-space-s);
107
107
  }
@@ -113,30 +113,30 @@ const dashboardWidgetAndSection = css`
113
113
 
114
114
  /* Move mode styling */
115
115
 
116
- #move-backward {
116
+ [part~='move-backward-button'] {
117
117
  inset-inline-start: calc(0px - var(--_focus-ring-spacing-offset));
118
118
  }
119
119
 
120
- #move-forward {
120
+ [part~='move-forward-button'] {
121
121
  inset-inline-end: calc(0px - var(--_focus-ring-spacing-offset));
122
122
  transform: translateY(-50%);
123
123
  }
124
124
 
125
- :host(:not([dir='rtl'])) #move-backward,
126
- :host([dir='rtl']) #move-forward {
125
+ :host(:not([dir='rtl'])) [part~='move-backward-button'],
126
+ :host([dir='rtl']) [part~='move-forward-button'] {
127
127
  border-top-left-radius: 0;
128
128
  border-bottom-left-radius: 0;
129
129
  --icon: var(--lumo-icons-angle-left);
130
130
  }
131
131
 
132
- :host(:not([dir='rtl'])) #move-forward,
133
- :host([dir='rtl']) #move-backward {
132
+ :host(:not([dir='rtl'])) [part~='move-forward-button'],
133
+ :host([dir='rtl']) [part~='move-backward-button'] {
134
134
  border-top-right-radius: 0;
135
135
  border-bottom-right-radius: 0;
136
136
  --icon: var(--lumo-icons-angle-right);
137
137
  }
138
138
 
139
- #move-apply {
139
+ [part~='move-apply-button'] {
140
140
  --icon: var(--lumo-icons-checkmark);
141
141
  font-size: var(--lumo-icon-size-m);
142
142
  }
@@ -157,8 +157,8 @@ const dashboardWidget = css`
157
157
  opacity: 1;
158
158
  }
159
159
 
160
- :host([resize-mode]) #content,
161
- :host([move-mode]) #content {
160
+ :host([resize-mode]) [part~='content'] ::slotted(*),
161
+ :host([move-mode]) [part~='content'] ::slotted(*) {
162
162
  opacity: 0.3;
163
163
  filter: blur(10px);
164
164
  }
@@ -169,69 +169,82 @@ const dashboardWidget = css`
169
169
  }
170
170
 
171
171
  /* Resize handle styling */
172
- #resize-handle {
172
+ [part~='resize-button'] {
173
173
  position: absolute;
174
174
  bottom: var(--lumo-space-s);
175
175
  inset-inline-end: var(--lumo-space-s);
176
176
  cursor: se-resize;
177
- --icon: var(--lumo-icons-chevron-down);
177
+ --icon: var(--lumo-icons-resize-handle);
178
178
  }
179
179
 
180
- :host([dir='rtl']) #resize-handle {
180
+ :host([dir='rtl']) [part~='resize-button'] {
181
181
  cursor: sw-resize;
182
182
  }
183
183
 
184
- #resize-handle .icon::before {
185
- transform: rotate(-45deg);
186
- }
187
-
188
- :host([dir='rtl']) #resize-handle .icon::before {
189
- transform: rotate(45deg);
184
+ :host([dir='rtl']) [part~='resize-button'] .icon::before {
185
+ transform: scaleX(-1);
190
186
  }
191
187
 
192
188
  /* Resize mode styling */
193
- #resize-apply {
189
+ [part~='resize-apply-button'] {
194
190
  --icon: var(--lumo-icons-checkmark);
195
191
  font-size: var(--lumo-icon-size-m);
196
192
  }
197
193
 
198
- #resize-grow-width,
199
- #resize-shrink-width {
194
+ [part~='resize-grow-width-button'],
195
+ [part~='resize-shrink-width-button'] {
200
196
  padding-right: 0;
201
197
  padding-left: 0;
202
198
  min-width: var(--lumo-size-s);
203
199
  }
204
200
 
205
- #resize-grow-height,
206
- #resize-shrink-height {
201
+ [part~='resize-grow-height-button'],
202
+ [part~='resize-shrink-height-button'] {
207
203
  height: var(--lumo-size-s);
208
204
  margin: 0;
209
205
  }
210
206
 
211
- :host(:not([dir='rtl'])) #resize-shrink-width,
212
- :host([dir='rtl']) #resize-grow-width {
207
+ :host(:not([dir='rtl'])) [part~='resize-grow-width-button'],
208
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
213
209
  border-top-right-radius: 0;
214
210
  border-bottom-right-radius: 0;
215
- --icon: var(--lumo-icons-angle-left);
216
211
  }
217
212
 
218
- :host(:not([dir='rtl'])) #resize-grow-width,
219
- :host([dir='rtl']) #resize-shrink-width {
213
+ :host([dir='rtl']) [part~='resize-grow-width-button'],
214
+ :host([dir='rtl']) [part~='resize-shrink-width-button'] {
220
215
  border-top-left-radius: 0;
221
216
  border-bottom-left-radius: 0;
222
- --icon: var(--lumo-icons-angle-right);
223
217
  }
224
218
 
225
- #resize-grow-height {
226
- border-top-right-radius: 0;
219
+ :host(:not([dir='rtl'])) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
227
220
  border-top-left-radius: 0;
228
- --icon: var(--lumo-icons-angle-down);
221
+ border-bottom-left-radius: 0;
229
222
  }
230
223
 
231
- #resize-shrink-height {
224
+ :host([dir='rtl']) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
225
+ border-top-right-radius: 0;
232
226
  border-bottom-right-radius: 0;
227
+ }
228
+
229
+ [part~='resize-grow-height-button'],
230
+ [part~='resize-grow-width-button'] {
231
+ --icon: var(--lumo-icons-plus);
232
+ }
233
+
234
+ [part~='resize-shrink-height-button'],
235
+ [part~='resize-shrink-width-button'] {
236
+ --icon: var(--lumo-icons-minus);
237
+ }
238
+
239
+ [part~='resize-grow-height-button'],
240
+ [part~='resize-shrink-height-button'] {
233
241
  border-bottom-left-radius: 0;
234
- --icon: var(--lumo-icons-angle-up);
242
+ border-bottom-right-radius: 0;
243
+ }
244
+
245
+ [part~='resize-shrink-height-button']:not([hidden]) + [part~='resize-grow-height-button'] {
246
+ border-top-left-radius: 0;
247
+ border-top-right-radius: 0;
235
248
  }
236
249
  `;
237
250
 
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": "24.6.0-alpha9",
4
+ "version": "24.6.0-beta1",
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/24.6.0-alpha9/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.6.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-spacing` | spacing between child elements and space around its 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/24.6.0-beta1/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-beta1/#/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-spacing` | spacing between child elements and space around its 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": "24.6.0-alpha9",
4
+ "version": "24.6.0-beta1",
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/24.6.0-alpha9/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.6.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-spacing` | spacing between child elements and space around its 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/24.6.0-beta1/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.6.0-beta1/#/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-spacing` | spacing between child elements and space around its 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
  {