@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/src/vaadin-dashboard.js
CHANGED
|
@@ -17,7 +17,7 @@ import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
|
|
|
17
17
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
18
18
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
19
19
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
20
|
-
import { dashboardStyles } from './styles/vaadin-dashboard-
|
|
20
|
+
import { dashboardStyles } from './styles/vaadin-dashboard-base-styles.js';
|
|
21
21
|
import {
|
|
22
22
|
getElementItem,
|
|
23
23
|
getItemsArrayOfItem,
|
|
@@ -120,6 +120,12 @@ class Dashboard extends DashboardLayoutMixin(
|
|
|
120
120
|
return dashboardStyles;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
static get lumoInjector() {
|
|
124
|
+
return {
|
|
125
|
+
includeBaseStyles: true,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
123
129
|
static get properties() {
|
|
124
130
|
return {
|
|
125
131
|
/**
|
|
@@ -186,7 +192,7 @@ class Dashboard extends DashboardLayoutMixin(
|
|
|
186
192
|
* just the individual properties you want to change.
|
|
187
193
|
*
|
|
188
194
|
* The object has the following structure and default values:
|
|
189
|
-
* ```
|
|
195
|
+
* ```js
|
|
190
196
|
* {
|
|
191
197
|
* selectSection: 'Select section for editing',
|
|
192
198
|
* selectWidget: 'Select widget for editing',
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
9
|
* license.
|
|
10
10
|
*/
|
|
11
|
-
import { addListener } from '@vaadin/component-base/src/gestures.js';
|
|
11
|
+
import { addListener, setTouchAction } from '@vaadin/component-base/src/gestures.js';
|
|
12
12
|
import { getElementItem, itemsEqual, WRAPPER_LOCAL_NAME } from './vaadin-dashboard-helpers.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -20,6 +20,8 @@ export class WidgetResizeController {
|
|
|
20
20
|
this.__resizedElementRemoveObserver = new MutationObserver(() => this.__restoreResizedElement());
|
|
21
21
|
this.__touchMoveCancelListener = (e) => e.preventDefault();
|
|
22
22
|
addListener(host, 'track', (e) => this.__onTrack(e));
|
|
23
|
+
// Do not set touch-action: none to allow scroll on mobile
|
|
24
|
+
setTouchAction(host, '');
|
|
23
25
|
host.addEventListener('item-resize', (e) => this.__itemResize(e));
|
|
24
26
|
}
|
|
25
27
|
|
package/vaadin-dashboard.js
CHANGED
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-
|
|
4
|
+
"version": "25.0.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/25.0.0-
|
|
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-beta1/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.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-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",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
205
|
"name": "i18n",
|
|
206
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n
|
|
206
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n```js\n{\n selectSection: 'Select section for editing',\n selectWidget: 'Select widget for editing',\n remove: 'Remove',\n resize: 'Resize',\n resizeApply: 'Apply',\n resizeShrinkWidth: 'Shrink width',\n resizeGrowWidth: 'Grow width',\n resizeShrinkHeight: 'Shrink height',\n resizeGrowHeight: 'Grow height',\n move: 'Move',\n moveApply: 'Apply',\n moveForward: 'Move Forward',\n moveBackward: 'Move Backward',\n}\n```",
|
|
207
207
|
"value": {
|
|
208
208
|
"type": [
|
|
209
209
|
"DashboardI18n"
|
package/web-types.lit.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-
|
|
4
|
+
"version": "25.0.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/25.0.0-
|
|
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-beta1/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.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-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
|
{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"name": ".i18n",
|
|
80
|
-
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n
|
|
80
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following structure and default values:\n```js\n{\n selectSection: 'Select section for editing',\n selectWidget: 'Select widget for editing',\n remove: 'Remove',\n resize: 'Resize',\n resizeApply: 'Apply',\n resizeShrinkWidth: 'Shrink width',\n resizeGrowWidth: 'Grow width',\n resizeShrinkHeight: 'Shrink height',\n resizeGrowHeight: 'Grow height',\n move: 'Move',\n moveApply: 'Apply',\n moveForward: 'Move Forward',\n moveBackward: 'Move Backward',\n}\n```",
|
|
81
81
|
"value": {
|
|
82
82
|
"kind": "expression"
|
|
83
83
|
}
|
|
@@ -1,57 +0,0 @@
|
|
|
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 widgetStyles = css`
|
|
15
|
-
:host {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
grid-column: var(--_item-column);
|
|
19
|
-
grid-row: var(--_item-row);
|
|
20
|
-
position: relative;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host([hidden]) {
|
|
24
|
-
display: none !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
:host(:not([editable])) [part~='resize-button'] {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[part~='content'] {
|
|
32
|
-
flex: 1;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
min-height: 1rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[part~='resize-button'] {
|
|
38
|
-
position: absolute;
|
|
39
|
-
bottom: 0;
|
|
40
|
-
inset-inline-end: 0;
|
|
41
|
-
z-index: 1;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([resizing])::after {
|
|
46
|
-
content: '';
|
|
47
|
-
z-index: 2;
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: -1px;
|
|
50
|
-
width: var(--_widget-resizer-width, 0);
|
|
51
|
-
height: var(--_widget-resizer-height, 0);
|
|
52
|
-
background: rgba(0, 0, 0, 0.1);
|
|
53
|
-
border-radius: inherit;
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
|
|
57
|
-
export const dashboardWidgetStyles = [widgetStyles, dashboardWidgetAndSectionStyles];
|
|
@@ -1,151 +0,0 @@
|
|
|
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 dashboardWidgetAndSectionStyles = css`
|
|
14
|
-
:host {
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:host([dragging]) * {
|
|
19
|
-
visibility: hidden;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host(:not([editable])) [part~='move-button'],
|
|
23
|
-
:host(:not([editable])) [part~='remove-button'],
|
|
24
|
-
:host(:not([editable])) #focus-button,
|
|
25
|
-
:host(:not([editable])) #focus-button-wrapper,
|
|
26
|
-
:host(:not([editable])) .mode-controls {
|
|
27
|
-
display: none;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
#focustrap {
|
|
31
|
-
display: contents;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
header {
|
|
35
|
-
display: flex;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
vaadin-dashboard-button {
|
|
40
|
-
z-index: 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
#focus-button-wrapper,
|
|
44
|
-
#focus-button {
|
|
45
|
-
position: absolute;
|
|
46
|
-
inset: 0;
|
|
47
|
-
opacity: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
#focus-button {
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
padding: 0;
|
|
53
|
-
border: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.mode-controls {
|
|
57
|
-
position: absolute;
|
|
58
|
-
inset: 0;
|
|
59
|
-
z-index: 2;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.mode-controls[hidden] {
|
|
63
|
-
display: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Move-mode buttons */
|
|
67
|
-
[part~='move-backward-button'],
|
|
68
|
-
[part~='move-forward-button'],
|
|
69
|
-
[part~='move-apply-button'] {
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: 50%;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[part~='move-backward-button'] {
|
|
75
|
-
inset-inline-start: 0;
|
|
76
|
-
transform: translateY(-50%);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
[part~='move-forward-button'] {
|
|
80
|
-
inset-inline-end: 0;
|
|
81
|
-
transform: translateY(-50%);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[part~='move-apply-button'] {
|
|
85
|
-
left: 50%;
|
|
86
|
-
transform: translate(-50%, -50%);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
:host([first-child]) [part~='move-backward-button'],
|
|
90
|
-
:host([last-child]) [part~='move-forward-button'] {
|
|
91
|
-
display: none;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Resize-mode buttons */
|
|
95
|
-
[part~='resize-shrink-width-button'],
|
|
96
|
-
[part~='resize-shrink-height-button'],
|
|
97
|
-
[part~='resize-grow-width-button'],
|
|
98
|
-
[part~='resize-grow-height-button'],
|
|
99
|
-
[part~='resize-apply-button'] {
|
|
100
|
-
position: absolute;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
[part~='resize-shrink-width-button'] {
|
|
104
|
-
inset-inline-end: 0;
|
|
105
|
-
top: 50%;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
:host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
|
|
109
|
-
transform: translateY(-50%) translateX(-100%);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:host([dir='rtl']) [part~='resize-shrink-width-button'] {
|
|
113
|
-
transform: translateY(-50%) translateX(100%);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.mode-controls:has([part~='resize-grow-width-button'][hidden]) [part~='resize-shrink-width-button'] {
|
|
117
|
-
transform: translateY(-50%);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
[part~='resize-grow-width-button'] {
|
|
121
|
-
inset-inline-start: 100%;
|
|
122
|
-
top: 50%;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host(:not([dir='rtl'])) [part~='resize-grow-width-button'] {
|
|
126
|
-
transform: translateY(-50%) translateX(-100%);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
:host([dir='rtl']) [part~='resize-grow-width-button'] {
|
|
130
|
-
transform: translateY(-50%) translateX(100%);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
[part~='resize-shrink-height-button'] {
|
|
134
|
-
bottom: 0;
|
|
135
|
-
left: 50%;
|
|
136
|
-
transform: translateX(-50%) translateY(-100%);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
[part~='resize-grow-height-button'] {
|
|
140
|
-
top: 100%;
|
|
141
|
-
left: 50%;
|
|
142
|
-
transform: translateX(-50%) translateY(-100%);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
[part~='resize-apply-button'] {
|
|
146
|
-
left: 50%;
|
|
147
|
-
top: 50%;
|
|
148
|
-
|
|
149
|
-
transform: translate(-50%, -50%);
|
|
150
|
-
}
|
|
151
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './vaadin-dashboard-button-styles.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './vaadin-dashboard-button-styles.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dashboardLayoutStyles: import("lit").CSSResult;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
2
|
-
|
|
3
|
-
export const dashboardLayoutStyles = css`
|
|
4
|
-
:host([theme~='shaded-background']) {
|
|
5
|
-
background: var(--lumo-shade-5pct);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:host([theme~='elevated-widgets']) {
|
|
9
|
-
--vaadin-dashboard-widget-shadow: var(--lumo-box-shadow-xs);
|
|
10
|
-
--vaadin-dashboard-widget-border-color: var(--lumo-contrast-10pct);
|
|
11
|
-
--vaadin-dashboard-widget-background: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct))
|
|
12
|
-
var(--lumo-base-color);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host([theme~='flat-widgets']) {
|
|
16
|
-
--vaadin-dashboard-widget-background: var(--lumo-contrast-5pct);
|
|
17
|
-
--vaadin-dashboard-widget-border-color: transparent;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
#grid {
|
|
21
|
-
--_default-gap: var(--lumo-space-m);
|
|
22
|
-
--_default-padding: var(--lumo-space-m);
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
registerStyles('vaadin-dashboard-layout', [dashboardLayoutStyles], {
|
|
27
|
-
moduleId: 'lumo-dashboard-layout',
|
|
28
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
3
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
4
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
5
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
6
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
|
-
import { dashboardWidgetAndSection } from './vaadin-dashboard-widget-styles.js';
|
|
8
|
-
|
|
9
|
-
const section = css`
|
|
10
|
-
/* stylelint-disable rule-empty-line-before */
|
|
11
|
-
|
|
12
|
-
:host {
|
|
13
|
-
--_section-outline-offset: calc(min(var(--_gap), var(--_padding)) / 3);
|
|
14
|
-
--_focus-ring-offset: calc((var(--_section-outline-offset) - var(--_focus-ring-width)));
|
|
15
|
-
border-radius: var(--lumo-border-radius-l);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
header {
|
|
19
|
-
margin-bottom: calc(-1 * var(--_section-outline-offset));
|
|
20
|
-
line-height: var(--lumo-line-height-s);
|
|
21
|
-
padding-inline: var(--lumo-space-s);
|
|
22
|
-
min-height: var(--lumo-size-l);
|
|
23
|
-
align-items: center;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[part='title'] {
|
|
27
|
-
font-size: var(--lumo-font-size-xl);
|
|
28
|
-
font-weight: 600;
|
|
29
|
-
white-space: nowrap;
|
|
30
|
-
line-height: var(--lumo-line-height-m);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Section states */
|
|
34
|
-
|
|
35
|
-
:host([editable]) {
|
|
36
|
-
outline: 1px solid var(--lumo-contrast-10pct);
|
|
37
|
-
outline-offset: calc(var(--_section-outline-offset) - 1px);
|
|
38
|
-
background: var(--lumo-contrast-5pct);
|
|
39
|
-
box-shadow: 0 0 0 var(--_section-outline-offset) var(--lumo-contrast-5pct);
|
|
40
|
-
}
|
|
41
|
-
:host([editable]) header {
|
|
42
|
-
padding-inline: var(--lumo-space-xs);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([focused])::after {
|
|
46
|
-
content: '';
|
|
47
|
-
display: block;
|
|
48
|
-
position: absolute;
|
|
49
|
-
inset: 0;
|
|
50
|
-
border-radius: var(--lumo-border-radius-l);
|
|
51
|
-
z-index: 9;
|
|
52
|
-
outline: var(--_focus-ring-width) solid var(--_focus-ring-color);
|
|
53
|
-
outline-offset: var(--_focus-ring-offset);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:host([selected]) {
|
|
57
|
-
background: var(--lumo-primary-color-10pct);
|
|
58
|
-
box-shadow: 0 0 0 var(--_section-outline-offset) var(--lumo-primary-color-10pct);
|
|
59
|
-
}
|
|
60
|
-
:host([selected]:not([focused])) {
|
|
61
|
-
outline-color: var(--lumo-primary-color-50pct);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:host([move-mode]) ::slotted(*) {
|
|
65
|
-
--_widget-opacity: 0.3;
|
|
66
|
-
--_widget-filter: blur(10px);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
:host([dragging]) {
|
|
70
|
-
background: var(--_drop-target-background-color);
|
|
71
|
-
outline: var(--_drop-target-border);
|
|
72
|
-
box-shadow: 0 0 0 var(--_section-outline-offset) var(--_drop-target-background-color);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Accessible move mode controls */
|
|
76
|
-
|
|
77
|
-
[part~='move-backward-button'] {
|
|
78
|
-
inset-inline-start: calc(-1 * var(--_section-outline-offset));
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[part~='move-forward-button'] {
|
|
82
|
-
inset-inline-end: calc(-1 * var(--_section-outline-offset));
|
|
83
|
-
transform: translateY(-50%);
|
|
84
|
-
}
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
registerStyles('vaadin-dashboard-section', [dashboardWidgetAndSection, section], {
|
|
88
|
-
moduleId: 'lumo-dashboard-section',
|
|
89
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
2
|
-
import { dashboardLayoutStyles } from './vaadin-dashboard-layout-styles.js';
|
|
3
|
-
|
|
4
|
-
const dashboard = css`
|
|
5
|
-
:host {
|
|
6
|
-
--_widget-opacity: 1;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host([item-selected]) {
|
|
10
|
-
--_widget-opacity: 0.7;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
registerStyles('vaadin-dashboard', [dashboardLayoutStyles, dashboard], {
|
|
15
|
-
moduleId: 'lumo-dashboard',
|
|
16
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
2
|
-
import '@vaadin/vaadin-lumo-styles/sizing.js';
|
|
3
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
4
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
5
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
6
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
7
|
-
declare const dashboardWidgetAndSection: import("lit").CSSResult;
|
|
8
|
-
declare const dashboardWidget: import("lit").CSSResult;
|
|
9
|
-
export { dashboardWidget, dashboardWidgetAndSection };
|