@vaadin/dashboard 25.0.0-alpha4 → 25.0.0-alpha6

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-alpha4",
3
+ "version": "25.0.0-alpha6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,16 +37,16 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha4",
41
- "@vaadin/button": "25.0.0-alpha4",
42
- "@vaadin/component-base": "25.0.0-alpha4",
43
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha4",
44
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha4",
40
+ "@vaadin/a11y-base": "25.0.0-alpha6",
41
+ "@vaadin/button": "25.0.0-alpha6",
42
+ "@vaadin/component-base": "25.0.0-alpha6",
43
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha6",
44
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha6",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/chai-plugins": "25.0.0-alpha4",
49
- "@vaadin/test-runner-commands": "25.0.0-alpha4",
48
+ "@vaadin/chai-plugins": "25.0.0-alpha6",
49
+ "@vaadin/test-runner-commands": "25.0.0-alpha6",
50
50
  "@vaadin/testing-helpers": "^2.0.0"
51
51
  },
52
52
  "cvdlName": "vaadin-dashboard",
@@ -54,5 +54,5 @@
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "ce4421f0daf26027b863b91787a474e4cc264344"
57
+ "gitHead": "cd1d084198d2b326c58d44bb39fa4845b71ce551"
58
58
  }
@@ -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,20 @@
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: 1rem;
17
+ }
18
+ `;
19
+
20
+ export const dashboardButtonStyles = [buttonStyles, dashboardButton];
@@ -9,7 +9,7 @@
9
9
  * license.
10
10
  */
11
11
  import { css } from 'lit';
12
- import { dashboardLayoutStyles } from './vaadin-dashboard-layout-styles.js';
12
+ import { dashboardLayoutStyles } from './vaadin-dashboard-layout-core-styles.js';
13
13
 
14
14
  const dashboard = css`
15
15
  #grid[item-resizing] {
@@ -9,7 +9,7 @@
9
9
  * license.
10
10
  */
11
11
  import { css } from 'lit';
12
- import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-styles.js';
12
+ import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-core-styles.js';
13
13
 
14
14
  const sectionStyles = css`
15
15
  :host {
@@ -9,7 +9,7 @@
9
9
  * license.
10
10
  */
11
11
  import { css } from 'lit';
12
- import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-styles.js';
12
+ import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-core-styles.js';
13
13
 
14
14
  const widgetStyles = css`
15
15
  :host {
@@ -31,6 +31,7 @@ const widgetStyles = css`
31
31
  [part~='content'] {
32
32
  flex: 1;
33
33
  overflow: hidden;
34
+ min-height: 1rem;
34
35
  }
35
36
 
36
37
  [part~='resize-button'] {
@@ -9,21 +9,22 @@
9
9
  * license.
10
10
  */
11
11
  import { html, LitElement } from 'lit';
12
- import { buttonStyles } from '@vaadin/button/src/styles/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(LumoInjectionMixin(PolylitMixin(LitElement))))) {
21
22
  static get is() {
22
23
  return 'vaadin-dashboard-button';
23
24
  }
24
25
 
25
26
  static get styles() {
26
- return buttonStyles;
27
+ return dashboardButtonStyles;
27
28
  }
28
29
 
29
30
  /** @protected */
@@ -12,8 +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';
16
- import { dashboardLayoutStyles } from './styles/vaadin-dashboard-layout-styles.js';
17
+ import { dashboardLayoutStyles } from './styles/vaadin-dashboard-layout-core-styles.js';
17
18
  import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
18
19
 
19
20
  /**
@@ -56,7 +57,9 @@ import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
56
57
  * @mixes ElementMixin
57
58
  * @mixes ThemableMixin
58
59
  */
59
- class DashboardLayout extends DashboardLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
60
+ class DashboardLayout extends DashboardLayoutMixin(
61
+ ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
62
+ ) {
60
63
  static get is() {
61
64
  return 'vaadin-dashboard-layout';
62
65
  }
@@ -12,8 +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';
16
- import { dashboardSectionStyles } from './styles/vaadin-dashboard-section-styles.js';
17
+ import { dashboardSectionStyles } from './styles/vaadin-dashboard-section-core-styles.js';
17
18
  import { DashboardItemMixin } from './vaadin-dashboard-item-mixin.js';
18
19
  import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
19
20
 
@@ -69,7 +70,9 @@ import { getDefaultI18n } from './vaadin-dashboard-item-mixin.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(LumoInjectionMixin(PolylitMixin(LitElement)))),
75
+ ) {
73
76
  static get is() {
74
77
  return 'vaadin-dashboard-section';
75
78
  }
@@ -12,8 +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';
16
- import { dashboardWidgetStyles } from './styles/vaadin-dashboard-widget-styles.js';
17
+ import { dashboardWidgetStyles } from './styles/vaadin-dashboard-widget-core-styles.js';
17
18
  import { findAncestorInstance, SYNCHRONIZED_ATTRIBUTES, WRAPPER_LOCAL_NAME } from './vaadin-dashboard-helpers.js';
18
19
  import { DashboardItemMixin } from './vaadin-dashboard-item-mixin.js';
19
20
  import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
@@ -103,7 +104,9 @@ import { DashboardSection } from './vaadin-dashboard-section.js';
103
104
  * @mixes ThemableMixin
104
105
  * @mixes DashboardItemMixin
105
106
  */
106
- class DashboardWidget extends DashboardItemMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
107
+ class DashboardWidget extends DashboardItemMixin(
108
+ ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
109
+ ) {
107
110
  static get is() {
108
111
  return 'vaadin-dashboard-widget';
109
112
  }
@@ -15,8 +15,9 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
15
15
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
16
16
  import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
17
17
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
18
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
18
19
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
19
- import { dashboardStyles } from './styles/vaadin-dashboard-styles.js';
20
+ import { dashboardStyles } from './styles/vaadin-dashboard-core-styles.js';
20
21
  import {
21
22
  getElementItem,
22
23
  getItemsArrayOfItem,
@@ -105,7 +106,7 @@ import { WidgetResizeController } from './widget-resize-controller.js';
105
106
  * @mixes ThemableMixin
106
107
  */
107
108
  class Dashboard extends DashboardLayoutMixin(
108
- I18nMixin(getDefaultI18n(), ElementMixin(ThemableMixin(PolylitMixin(LitElement)))),
109
+ I18nMixin(getDefaultI18n(), ElementMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement))))),
109
110
  ) {
110
111
  static get is() {
111
112
  return 'vaadin-dashboard';
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-alpha4",
4
+ "version": "25.0.0-alpha6",
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-alpha4/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha4/#/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-alpha6/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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-alpha4",
4
+ "version": "25.0.0-alpha6",
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-alpha4/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha4/#/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-alpha6/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/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
  {