@vaadin/dashboard 25.0.0-alpha8 → 25.0.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/package.json +10 -11
- package/src/styles/{vaadin-dashboard-core-styles.js → vaadin-dashboard-base-styles.js} +1 -1
- package/src/styles/{vaadin-dashboard-button-core-styles.js → vaadin-dashboard-button-base-styles.js} +6 -2
- package/src/styles/{vaadin-dashboard-layout-core-styles.js → vaadin-dashboard-layout-base-styles.js} +5 -4
- package/src/styles/{vaadin-dashboard-section-core-styles.js → vaadin-dashboard-section-base-styles.js} +15 -4
- package/src/styles/vaadin-dashboard-widget-base-styles.js +110 -0
- package/src/styles/vaadin-dashboard-widget-section-base-styles.js +294 -0
- package/src/vaadin-dashboard-button.js +1 -1
- package/src/vaadin-dashboard-item-mixin.js +8 -3
- package/src/vaadin-dashboard-layout.js +7 -1
- package/src/vaadin-dashboard-section.js +8 -2
- package/src/vaadin-dashboard-widget.js +8 -2
- package/src/vaadin-dashboard.d.ts +1 -1
- package/src/vaadin-dashboard.js +8 -2
- package/src/widget-resize-controller.js +3 -1
- package/vaadin-dashboard-layout.js +1 -1
- package/vaadin-dashboard-section.js +1 -1
- package/vaadin-dashboard-widget.js +1 -1
- package/vaadin-dashboard.js +1 -1
- package/web-types.json +3 -3
- package/web-types.lit.json +3 -3
- package/src/styles/vaadin-dashboard-widget-core-styles.js +0 -57
- package/src/styles/vaadin-dashboard-widget-section-core-styles.js +0 -151
- package/theme/lumo/vaadin-dashboard-button-styles.d.ts +0 -2
- package/theme/lumo/vaadin-dashboard-button-styles.js +0 -8
- package/theme/lumo/vaadin-dashboard-button.d.ts +0 -1
- package/theme/lumo/vaadin-dashboard-button.js +0 -1
- package/theme/lumo/vaadin-dashboard-layout-styles.d.ts +0 -1
- package/theme/lumo/vaadin-dashboard-layout-styles.js +0 -28
- package/theme/lumo/vaadin-dashboard-layout.d.ts +0 -2
- package/theme/lumo/vaadin-dashboard-layout.js +0 -2
- package/theme/lumo/vaadin-dashboard-section-styles.d.ts +0 -5
- package/theme/lumo/vaadin-dashboard-section-styles.js +0 -89
- package/theme/lumo/vaadin-dashboard-section.d.ts +0 -3
- package/theme/lumo/vaadin-dashboard-section.js +0 -3
- package/theme/lumo/vaadin-dashboard-styles.d.ts +0 -1
- package/theme/lumo/vaadin-dashboard-styles.js +0 -16
- package/theme/lumo/vaadin-dashboard-widget-styles.d.ts +0 -9
- package/theme/lumo/vaadin-dashboard-widget-styles.js +0 -327
- package/theme/lumo/vaadin-dashboard-widget.d.ts +0 -3
- package/theme/lumo/vaadin-dashboard-widget.js +0 -3
- package/theme/lumo/vaadin-dashboard.d.ts +0 -4
- package/theme/lumo/vaadin-dashboard.js +0 -4
- /package/src/styles/{vaadin-dashboard-core-styles.d.ts → vaadin-dashboard-base-styles.d.ts} +0 -0
- /package/src/styles/{vaadin-dashboard-button-core-styles.d.ts → vaadin-dashboard-button-base-styles.d.ts} +0 -0
- /package/src/styles/{vaadin-dashboard-layout-core-styles.d.ts → vaadin-dashboard-layout-base-styles.d.ts} +0 -0
- /package/src/styles/{vaadin-dashboard-section-core-styles.d.ts → vaadin-dashboard-section-base-styles.d.ts} +0 -0
- /package/src/styles/{vaadin-dashboard-widget-core-styles.d.ts → vaadin-dashboard-widget-base-styles.d.ts} +0 -0
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-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"theme",
|
|
25
24
|
"vaadin-*.d.ts",
|
|
26
25
|
"vaadin-*.js",
|
|
27
26
|
"web-types.json",
|
|
@@ -37,22 +36,22 @@
|
|
|
37
36
|
],
|
|
38
37
|
"dependencies": {
|
|
39
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
41
|
-
"@vaadin/button": "25.0.0-
|
|
42
|
-
"@vaadin/component-base": "25.0.0-
|
|
43
|
-
"@vaadin/vaadin-
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
|
|
39
|
+
"@vaadin/a11y-base": "25.0.0-beta1",
|
|
40
|
+
"@vaadin/button": "25.0.0-beta1",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-beta1",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
|
|
45
43
|
"lit": "^3.0.0"
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
49
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
50
|
-
"@vaadin/testing-helpers": "^2.0.0"
|
|
46
|
+
"@vaadin/chai-plugins": "25.0.0-beta1",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.0.0-beta1",
|
|
48
|
+
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta1"
|
|
51
50
|
},
|
|
52
51
|
"cvdlName": "vaadin-dashboard",
|
|
53
52
|
"web-types": [
|
|
54
53
|
"web-types.json",
|
|
55
54
|
"web-types.lit.json"
|
|
56
55
|
],
|
|
57
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
|
|
58
57
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
11
|
import { css } from 'lit';
|
|
12
|
-
import { dashboardLayoutStyles } from './vaadin-dashboard-layout-
|
|
12
|
+
import { dashboardLayoutStyles } from './vaadin-dashboard-layout-base-styles.js';
|
|
13
13
|
|
|
14
14
|
const dashboard = css`
|
|
15
15
|
#grid[item-resizing] {
|
package/src/styles/{vaadin-dashboard-button-core-styles.js → vaadin-dashboard-button-base-styles.js}
RENAMED
|
@@ -9,11 +9,15 @@
|
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
11
|
import { css } from 'lit';
|
|
12
|
-
import { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-
|
|
12
|
+
import { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-base-styles.js';
|
|
13
13
|
|
|
14
14
|
const dashboardButton = css`
|
|
15
15
|
:host {
|
|
16
|
-
|
|
16
|
+
padding: 4px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([theme~='tertiary']) {
|
|
20
|
+
color: var(--vaadin-dashboard-button-text-color, var(--vaadin-text-color-secondary));
|
|
17
21
|
}
|
|
18
22
|
`;
|
|
19
23
|
|
package/src/styles/{vaadin-dashboard-layout-core-styles.js → vaadin-dashboard-layout-base-styles.js}
RENAMED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
11
12
|
import { css } from 'lit';
|
|
12
13
|
|
|
13
14
|
export const dashboardLayoutStyles = css`
|
|
@@ -30,17 +31,17 @@ export const dashboardLayoutStyles = css`
|
|
|
30
31
|
box-sizing: border-box;
|
|
31
32
|
|
|
32
33
|
/* Padding around dashboard edges */
|
|
33
|
-
--_default-padding:
|
|
34
|
+
--_default-padding: var(--vaadin-padding-l);
|
|
34
35
|
--_padding: max(0px, var(--vaadin-dashboard-padding, var(--_default-padding)));
|
|
35
36
|
padding: var(--_padding);
|
|
36
37
|
|
|
37
38
|
/* Gap between widgets */
|
|
38
|
-
--_default-gap:
|
|
39
|
+
--_default-gap: var(--vaadin-gap-s);
|
|
39
40
|
--_gap: max(0px, var(--vaadin-dashboard-gap, var(--_default-gap)));
|
|
40
41
|
gap: var(--_gap);
|
|
41
42
|
|
|
42
43
|
/* Default min and max column widths */
|
|
43
|
-
--_default-col-min-width:
|
|
44
|
+
--_default-col-min-width: 25em;
|
|
44
45
|
--_default-col-max-width: 1fr;
|
|
45
46
|
|
|
46
47
|
/* Effective min and max column widths */
|
|
@@ -54,7 +55,7 @@ export const dashboardLayoutStyles = css`
|
|
|
54
55
|
--_effective-col-count: min(var(--_col-count), var(--_col-max-count));
|
|
55
56
|
|
|
56
57
|
/* Default row min height */
|
|
57
|
-
--_default-row-min-height:
|
|
58
|
+
--_default-row-min-height: 12em;
|
|
58
59
|
/* Effective row min height */
|
|
59
60
|
--_row-min-height: var(--vaadin-dashboard-row-min-height, var(--_default-row-min-height));
|
|
60
61
|
/* Effective row height */
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
11
12
|
import { css } from 'lit';
|
|
12
|
-
import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-
|
|
13
|
+
import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-base-styles.js';
|
|
13
14
|
|
|
14
15
|
const sectionStyles = css`
|
|
15
16
|
:host {
|
|
@@ -18,11 +19,15 @@ const sectionStyles = css`
|
|
|
18
19
|
grid-template-columns: subgrid;
|
|
19
20
|
--_section-column: 1 / calc(var(--_effective-col-count) + 1);
|
|
20
21
|
grid-column: var(--_section-column) !important;
|
|
21
|
-
gap: var(--_gap
|
|
22
|
+
gap: var(--_gap);
|
|
22
23
|
/* Dashboard section header height */
|
|
23
|
-
|
|
24
|
-
grid-template-rows: var(--_section-header-height) repeat(auto-fill, var(--_row-height));
|
|
24
|
+
grid-template-rows: minmax(0, auto) repeat(auto-fill, var(--_row-height));
|
|
25
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);
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
:host([hidden]) {
|
|
@@ -48,6 +53,12 @@ const sectionStyles = css`
|
|
|
48
53
|
::slotted(vaadin-dashboard-widget-wrapper) {
|
|
49
54
|
display: contents;
|
|
50
55
|
}
|
|
56
|
+
|
|
57
|
+
/* Section states */
|
|
58
|
+
|
|
59
|
+
:host(:not([editable])) {
|
|
60
|
+
--_widget-border-width: 0px;
|
|
61
|
+
}
|
|
51
62
|
`;
|
|
52
63
|
|
|
53
64
|
export const dashboardSectionStyles = [sectionStyles, dashboardWidgetAndSectionStyles];
|
|
@@ -0,0 +1,110 @@
|
|
|
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/styles/style-props.js';
|
|
12
|
+
import { css } from 'lit';
|
|
13
|
+
import { dashboardWidgetAndSectionStyles } from './vaadin-dashboard-widget-section-base-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
|
+
touch-action: none;
|
|
60
|
+
cursor: nwse-resize;
|
|
61
|
+
--icon: var(--_vaadin-icon-resize);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:host([dir='rtl']) [part~='resize-button'] {
|
|
65
|
+
cursor: sw-resize;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([dir='rtl']) [part~='resize-button'] .icon::before {
|
|
69
|
+
transform: scaleX(-1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Widget states */
|
|
73
|
+
|
|
74
|
+
:host([editable]) {
|
|
75
|
+
--vaadin-dashboard-widget-shadow: var(--_widget-editable-shadow);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([selected]) {
|
|
79
|
+
--vaadin-dashboard-widget-shadow: var(--_widget-selected-shadow);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
:host([resizing])::after {
|
|
83
|
+
content: '';
|
|
84
|
+
z-index: 2;
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
width: var(--_widget-resizer-width, 0);
|
|
88
|
+
height: var(--_widget-resizer-height, 0);
|
|
89
|
+
background: color-mix(in srgb, currentColor 5%, var(--_widget-background) 70%);
|
|
90
|
+
border-color: color-mix(in srgb, currentColor 10%, transparent);
|
|
91
|
+
border-width: var(--_widget-border-width);
|
|
92
|
+
border-style: solid;
|
|
93
|
+
border-radius: inherit;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Widget parts */
|
|
97
|
+
header {
|
|
98
|
+
padding: var(--vaadin-dashboard-widget-header-padding, var(--vaadin-padding-container));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([editable]) header {
|
|
102
|
+
padding: var(--vaadin-dashboard-widget-header-padding, var(--vaadin-padding-s));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
header:has([part~='title'][hidden]) {
|
|
106
|
+
padding: 0;
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
|
|
110
|
+
export const dashboardWidgetStyles = [widgetStyles, dashboardWidgetAndSectionStyles];
|
|
@@ -0,0 +1,294 @@
|
|
|
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/styles/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-secondary));
|
|
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-secondary));
|
|
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-s));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
[part='title'] {
|
|
67
|
+
flex: 1;
|
|
68
|
+
color: var(--vaadin-dashboard-widget-title-color, var(--vaadin-text-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
|
+
}
|
|
81
|
+
|
|
82
|
+
vaadin-dashboard-button .icon::before {
|
|
83
|
+
display: block;
|
|
84
|
+
content: '';
|
|
85
|
+
height: var(--vaadin-icon-size, 1lh);
|
|
86
|
+
width: var(--vaadin-icon-size, 1lh);
|
|
87
|
+
background: currentColor;
|
|
88
|
+
mask: var(--icon) 50% / var(--vaadin-icon-visual-size, 100%) no-repeat;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
#focus-button-wrapper,
|
|
92
|
+
#focus-button {
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 0;
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
#focus-button {
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
padding: 0;
|
|
101
|
+
border: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mode-controls {
|
|
105
|
+
position: absolute;
|
|
106
|
+
inset: 0;
|
|
107
|
+
z-index: 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mode-controls[hidden] {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Drag handle */
|
|
115
|
+
[part~='move-button'] {
|
|
116
|
+
cursor: move;
|
|
117
|
+
--icon: var(--_vaadin-icon-drag);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Remove button */
|
|
121
|
+
[part~='remove-button'] {
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
--icon: var(--_vaadin-icon-cross);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Move-mode buttons */
|
|
127
|
+
[part~='move-backward-button'],
|
|
128
|
+
[part~='move-forward-button'],
|
|
129
|
+
[part~='move-apply-button'] {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 50%;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[part~='move-backward-button'] {
|
|
135
|
+
inset-inline-start: 0;
|
|
136
|
+
transform: translateY(-50%);
|
|
137
|
+
--icon: var(--_vaadin-icon-chevron-down);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[part~='move-forward-button'] {
|
|
141
|
+
inset-inline-end: 0;
|
|
142
|
+
transform: translateY(-50%);
|
|
143
|
+
--icon: var(--_vaadin-icon-chevron-down);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[part~='move-apply-button'] {
|
|
147
|
+
left: 50%;
|
|
148
|
+
transform: translate(-50%, -50%);
|
|
149
|
+
--icon: var(--_vaadin-icon-checkmark);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([first-child]) [part~='move-backward-button'],
|
|
153
|
+
:host([last-child]) [part~='move-forward-button'] {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host(:not([dir='rtl'])) [part~='move-backward-button'],
|
|
158
|
+
:host([dir='rtl']) [part~='move-forward-button'] {
|
|
159
|
+
border-top-left-radius: 0;
|
|
160
|
+
border-bottom-left-radius: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:host(:not([dir='rtl'])) [part~='move-forward-button'],
|
|
164
|
+
:host([dir='rtl']) [part~='move-backward-button'] {
|
|
165
|
+
border-top-right-radius: 0;
|
|
166
|
+
border-bottom-right-radius: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host(:not([dir='rtl'])) [part~='move-backward-button'] .icon,
|
|
170
|
+
:host([dir='rtl']) [part~='move-forward-button'] .icon {
|
|
171
|
+
rotate: 90deg;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host(:not([dir='rtl'])) [part~='move-forward-button'] .icon,
|
|
175
|
+
:host([dir='rtl']) [part~='move-backward-button'] .icon {
|
|
176
|
+
rotate: -90deg;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Resize-mode buttons */
|
|
180
|
+
[part~='resize-shrink-width-button'],
|
|
181
|
+
[part~='resize-shrink-height-button'],
|
|
182
|
+
[part~='resize-grow-width-button'],
|
|
183
|
+
[part~='resize-grow-height-button'],
|
|
184
|
+
[part~='resize-apply-button'] {
|
|
185
|
+
position: absolute;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[part~='resize-shrink-width-button'] {
|
|
189
|
+
inset-inline-end: 0;
|
|
190
|
+
top: 50%;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
|
|
194
|
+
transform: translateY(-50%) translateX(-100%);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host([dir='rtl']) [part~='resize-shrink-width-button'] {
|
|
198
|
+
transform: translateY(-50%) translateX(100%);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mode-controls:has([part~='resize-grow-width-button'][hidden]) [part~='resize-shrink-width-button'] {
|
|
202
|
+
transform: translateY(-50%);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
[part~='resize-grow-width-button'] {
|
|
206
|
+
inset-inline-start: 100%;
|
|
207
|
+
top: 50%;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host(:not([dir='rtl'])) [part~='resize-grow-width-button'] {
|
|
211
|
+
transform: translateY(-50%) translateX(-100%);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host([dir='rtl']) [part~='resize-grow-width-button'] {
|
|
215
|
+
transform: translateY(-50%) translateX(100%);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[part~='resize-shrink-height-button'] {
|
|
219
|
+
bottom: 0;
|
|
220
|
+
left: 50%;
|
|
221
|
+
transform: translateX(-50%) translateY(-100%);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
[part~='resize-grow-height-button'] {
|
|
225
|
+
top: 100%;
|
|
226
|
+
left: 50%;
|
|
227
|
+
transform: translateX(-50%) translateY(-100%);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
[part~='resize-grow-height-button'],
|
|
231
|
+
[part~='resize-grow-width-button'] {
|
|
232
|
+
--icon: var(--_vaadin-icon-plus);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
[part~='resize-shrink-height-button'],
|
|
236
|
+
[part~='resize-shrink-width-button'] {
|
|
237
|
+
--icon: var(--_vaadin-icon-minus);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
[part~='resize-apply-button'] {
|
|
241
|
+
left: 50%;
|
|
242
|
+
top: 50%;
|
|
243
|
+
transform: translate(-50%, -50%);
|
|
244
|
+
--icon: var(--_vaadin-icon-checkmark);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[part~='resize-shrink-width-button'] + [part~='resize-grow-width-button'] {
|
|
248
|
+
margin-left: 1px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[part~='resize-grow-height-button'],
|
|
252
|
+
[part~='resize-shrink-height-button'] {
|
|
253
|
+
border-bottom-left-radius: 0;
|
|
254
|
+
border-bottom-right-radius: 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
[part~='resize-shrink-height-button']:not([hidden]) + [part~='resize-grow-height-button'] {
|
|
258
|
+
border-top-left-radius: 0;
|
|
259
|
+
border-top-right-radius: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
[part~='resize-shrink-height-button'] + [part~='resize-grow-height-button'] {
|
|
263
|
+
margin-top: 1px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
:host(:not([dir='rtl'])) [part~='resize-grow-width-button'],
|
|
267
|
+
:host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
|
|
268
|
+
border-top-right-radius: 0;
|
|
269
|
+
border-bottom-right-radius: 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
:host([dir='rtl']) [part~='resize-grow-width-button'],
|
|
273
|
+
:host([dir='rtl']) [part~='resize-shrink-width-button'] {
|
|
274
|
+
border-top-left-radius: 0;
|
|
275
|
+
border-bottom-left-radius: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
:host(:not([dir='rtl'])) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
|
|
279
|
+
border-top-left-radius: 0;
|
|
280
|
+
border-bottom-left-radius: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
:host([dir='rtl']) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
|
|
284
|
+
border-top-right-radius: 0;
|
|
285
|
+
border-bottom-right-radius: 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@media (forced-colors: active) {
|
|
289
|
+
vaadin-dashboard-button .icon::before {
|
|
290
|
+
background: currentColor;
|
|
291
|
+
forced-color-adjust: none;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
`;
|
|
@@ -16,7 +16,7 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
|
16
16
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
17
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-
|
|
19
|
+
import { dashboardButtonStyles } from './styles/vaadin-dashboard-button-base-styles.js';
|
|
20
20
|
|
|
21
21
|
class DashboardButton extends ButtonMixin(ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
22
22
|
static get is() {
|
|
@@ -305,11 +305,16 @@ export const DashboardItemMixin = (superClass) =>
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
|
|
308
|
+
/**
|
|
309
|
+
* @param {FocusOptions=} options
|
|
310
|
+
* @protected
|
|
311
|
+
* @override
|
|
312
|
+
*/
|
|
313
|
+
focus(options) {
|
|
309
314
|
if (this.hasAttribute('editable')) {
|
|
310
|
-
this.$['focus-button'].focus();
|
|
315
|
+
this.$['focus-button'].focus(options);
|
|
311
316
|
} else {
|
|
312
|
-
super.focus();
|
|
317
|
+
super.focus(options);
|
|
313
318
|
}
|
|
314
319
|
}
|
|
315
320
|
|
|
@@ -14,7 +14,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
|
14
14
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
15
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
16
16
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
17
|
-
import { dashboardLayoutStyles } from './styles/vaadin-dashboard-layout-
|
|
17
|
+
import { dashboardLayoutStyles } from './styles/vaadin-dashboard-layout-base-styles.js';
|
|
18
18
|
import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -72,6 +72,12 @@ class DashboardLayout extends DashboardLayoutMixin(
|
|
|
72
72
|
return dashboardLayoutStyles;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
static get lumoInjector() {
|
|
76
|
+
return {
|
|
77
|
+
includeBaseStyles: true,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
75
81
|
/** @protected */
|
|
76
82
|
render() {
|
|
77
83
|
return html`<div id="grid"><slot></slot></div>`;
|
|
@@ -14,7 +14,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
|
14
14
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
15
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
16
16
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
17
|
-
import { dashboardSectionStyles } from './styles/vaadin-dashboard-section-
|
|
17
|
+
import { dashboardSectionStyles } from './styles/vaadin-dashboard-section-base-styles.js';
|
|
18
18
|
import { DashboardItemMixin } from './vaadin-dashboard-item-mixin.js';
|
|
19
19
|
import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
|
|
20
20
|
|
|
@@ -81,6 +81,12 @@ class DashboardSection extends DashboardItemMixin(
|
|
|
81
81
|
return dashboardSectionStyles;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
static get lumoInjector() {
|
|
85
|
+
return {
|
|
86
|
+
includeBaseStyles: true,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
84
90
|
static get properties() {
|
|
85
91
|
return {
|
|
86
92
|
/**
|
|
@@ -90,7 +96,7 @@ class DashboardSection extends DashboardItemMixin(
|
|
|
90
96
|
* `i18n` object with a custom one.
|
|
91
97
|
*
|
|
92
98
|
* The object has the following structure and default values:
|
|
93
|
-
* ```
|
|
99
|
+
* ```js
|
|
94
100
|
* {
|
|
95
101
|
* selectSection: 'Select section for editing',
|
|
96
102
|
* remove: 'Remove',
|
|
@@ -14,7 +14,7 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
|
14
14
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
15
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
16
16
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
17
|
-
import { dashboardWidgetStyles } from './styles/vaadin-dashboard-widget-
|
|
17
|
+
import { dashboardWidgetStyles } from './styles/vaadin-dashboard-widget-base-styles.js';
|
|
18
18
|
import { findAncestorInstance, SYNCHRONIZED_ATTRIBUTES, WRAPPER_LOCAL_NAME } from './vaadin-dashboard-helpers.js';
|
|
19
19
|
import { DashboardItemMixin } from './vaadin-dashboard-item-mixin.js';
|
|
20
20
|
import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
|
|
@@ -115,6 +115,12 @@ class DashboardWidget extends DashboardItemMixin(
|
|
|
115
115
|
return dashboardWidgetStyles;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
static get lumoInjector() {
|
|
119
|
+
return {
|
|
120
|
+
includeBaseStyles: true,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
118
124
|
static get properties() {
|
|
119
125
|
return {
|
|
120
126
|
/**
|
|
@@ -124,7 +130,7 @@ class DashboardWidget extends DashboardItemMixin(
|
|
|
124
130
|
* `i18n` object with a custom one.
|
|
125
131
|
*
|
|
126
132
|
* The object has the following structure and default values:
|
|
127
|
-
* ```
|
|
133
|
+
* ```js
|
|
128
134
|
* {
|
|
129
135
|
* selectWidget: 'Select widget for editing',
|
|
130
136
|
* remove: 'Remove',
|
|
@@ -259,7 +259,7 @@ declare class Dashboard<TItem extends DashboardItem = DashboardItem> extends Das
|
|
|
259
259
|
* just the individual properties you want to change.
|
|
260
260
|
*
|
|
261
261
|
* The object has the following structure and default values:
|
|
262
|
-
* ```
|
|
262
|
+
* ```js
|
|
263
263
|
* {
|
|
264
264
|
* selectSection: 'Select section for editing',
|
|
265
265
|
* selectWidget: 'Select widget for editing',
|