@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.
- package/README.md +0 -2
- package/package.json +12 -9
- package/src/styles/vaadin-dashboard-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-base-styles.js +25 -0
- package/src/styles/vaadin-dashboard-button-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-button-base-styles.js +24 -0
- package/src/styles/vaadin-dashboard-button-core-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-button-core-styles.js +20 -0
- package/src/styles/vaadin-dashboard-core-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-core-styles.js +25 -0
- package/src/styles/vaadin-dashboard-layout-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-layout-base-styles.js +85 -0
- package/src/styles/vaadin-dashboard-layout-core-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-layout-core-styles.js +85 -0
- package/src/styles/vaadin-dashboard-section-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-section-base-styles.js +64 -0
- package/src/styles/vaadin-dashboard-section-core-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-section-core-styles.js +53 -0
- package/src/styles/vaadin-dashboard-widget-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-widget-base-styles.js +109 -0
- package/src/styles/vaadin-dashboard-widget-core-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-widget-core-styles.js +57 -0
- package/src/styles/vaadin-dashboard-widget-section-base-styles.js +297 -0
- package/src/{vaadin-dashboard-styles.js → styles/vaadin-dashboard-widget-section-core-styles.js} +1 -7
- package/src/vaadin-dashboard-button.js +4 -7
- package/src/vaadin-dashboard-item-mixin.js +0 -5
- package/src/vaadin-dashboard-layout-mixin.js +0 -78
- package/src/vaadin-dashboard-layout.js +9 -5
- package/src/vaadin-dashboard-section.js +7 -46
- package/src/vaadin-dashboard-widget.js +7 -50
- package/src/vaadin-dashboard.js +5 -17
- package/theme/lumo/vaadin-dashboard-section-styles.js +0 -6
- package/theme/lumo/vaadin-dashboard-widget-styles.js +16 -21
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
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
|
-
|
|
7
5
|
> ℹ️ A commercial Vaadin [subscription](https://vaadin.com/pricing) is required to use Dashboard in your project.
|
|
8
6
|
|
|
9
7
|
[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": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha10",
|
|
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,21 +39,22 @@
|
|
|
37
39
|
],
|
|
38
40
|
"dependencies": {
|
|
39
41
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/
|
|
41
|
-
"@vaadin/
|
|
42
|
-
"@vaadin/
|
|
43
|
-
"@vaadin/vaadin-
|
|
42
|
+
"@vaadin/a11y-base": "25.0.0-alpha10",
|
|
43
|
+
"@vaadin/button": "25.0.0-alpha10",
|
|
44
|
+
"@vaadin/component-base": "25.0.0-alpha10",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
|
|
44
47
|
"lit": "^3.0.0"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
48
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
49
|
-
"@vaadin/testing-helpers": "^
|
|
50
|
+
"@vaadin/chai-plugins": "25.0.0-alpha10",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha10",
|
|
52
|
+
"@vaadin/testing-helpers": "^2.0.0"
|
|
50
53
|
},
|
|
51
54
|
"cvdlName": "vaadin-dashboard",
|
|
52
55
|
"web-types": [
|
|
53
56
|
"web-types.json",
|
|
54
57
|
"web-types.lit.json"
|
|
55
58
|
],
|
|
56
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
|
|
57
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 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];
|
|
@@ -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 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 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: 1rem;
|
|
34
|
+
--_padding: max(0px, var(--vaadin-dashboard-padding, var(--_default-padding)));
|
|
35
|
+
padding: var(--_padding);
|
|
36
|
+
|
|
37
|
+
/* Gap between widgets */
|
|
38
|
+
--_default-gap: 1rem;
|
|
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: 25rem;
|
|
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: 12rem;
|
|
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 dashboardSectionStyles: CSSResult;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 sectionStyles = css`
|
|
15
|
+
:host {
|
|
16
|
+
display: grid;
|
|
17
|
+
position: relative;
|
|
18
|
+
grid-template-columns: subgrid;
|
|
19
|
+
--_section-column: 1 / calc(var(--_effective-col-count) + 1);
|
|
20
|
+
grid-column: var(--_section-column) !important;
|
|
21
|
+
gap: var(--_gap, 1rem);
|
|
22
|
+
/* Dashboard section header height */
|
|
23
|
+
--_section-header-height: minmax(0, auto);
|
|
24
|
+
grid-template-rows: var(--_section-header-height) repeat(auto-fill, var(--_row-height));
|
|
25
|
+
grid-auto-rows: var(--_row-height);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([hidden]) {
|
|
29
|
+
display: none !important;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
::slotted(*) {
|
|
33
|
+
--_item-column: span min(var(--vaadin-dashboard-widget-colspan, 1), var(--_effective-col-count, var(--_col-count)));
|
|
34
|
+
|
|
35
|
+
grid-column: var(--_item-column);
|
|
36
|
+
--_item-row: span var(--vaadin-dashboard-widget-rowspan, 1);
|
|
37
|
+
grid-row: var(--_item-row);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
header {
|
|
41
|
+
grid-column: var(--_section-column);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host::before {
|
|
45
|
+
z-index: 2 !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
::slotted(vaadin-dashboard-widget-wrapper) {
|
|
49
|
+
display: contents;
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
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];
|