@vaadin/dashboard 25.0.0-alpha2 → 25.0.0-alpha21
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-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-layout-base-styles.d.ts +13 -0
- package/src/styles/vaadin-dashboard-layout-base-styles.js +86 -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-widget-base-styles.d.ts +13 -0
- 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 +4 -3
- package/src/vaadin-dashboard-item-mixin.js +8 -8
- package/src/vaadin-dashboard-layout-mixin.js +0 -78
- package/src/vaadin-dashboard-layout.js +15 -1
- package/src/vaadin-dashboard-section.js +13 -42
- package/src/vaadin-dashboard-widget.js +13 -46
- package/src/vaadin-dashboard.d.ts +1 -1
- package/src/vaadin-dashboard.js +12 -14
- 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/vaadin-dashboard-styles.js +0 -157
- 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 -334
- 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/vaadin-dashboard.js
CHANGED
|
@@ -15,7 +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 {
|
|
18
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
19
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
20
|
+
import { dashboardStyles } from './styles/vaadin-dashboard-base-styles.js';
|
|
19
21
|
import {
|
|
20
22
|
getElementItem,
|
|
21
23
|
getItemsArrayOfItem,
|
|
@@ -26,7 +28,6 @@ import {
|
|
|
26
28
|
import { getDefaultI18n } from './vaadin-dashboard-item-mixin.js';
|
|
27
29
|
import { DashboardLayoutMixin } from './vaadin-dashboard-layout-mixin.js';
|
|
28
30
|
import { DashboardSection } from './vaadin-dashboard-section.js';
|
|
29
|
-
import { hasWidgetWrappers } from './vaadin-dashboard-styles.js';
|
|
30
31
|
import { WidgetReorderController } from './widget-reorder-controller.js';
|
|
31
32
|
import { WidgetResizeController } from './widget-resize-controller.js';
|
|
32
33
|
|
|
@@ -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(PolylitMixin(LumoInjectionMixin(LitElement))))),
|
|
109
110
|
) {
|
|
110
111
|
static get is() {
|
|
111
112
|
return 'vaadin-dashboard';
|
|
@@ -116,16 +117,13 @@ class Dashboard extends DashboardLayoutMixin(
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
static get styles() {
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
`,
|
|
127
|
-
hasWidgetWrappers,
|
|
128
|
-
];
|
|
120
|
+
return dashboardStyles;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static get lumoInjector() {
|
|
124
|
+
return {
|
|
125
|
+
includeBaseStyles: true,
|
|
126
|
+
};
|
|
129
127
|
}
|
|
130
128
|
|
|
131
129
|
static get properties() {
|
|
@@ -194,7 +192,7 @@ class Dashboard extends DashboardLayoutMixin(
|
|
|
194
192
|
* just the individual properties you want to change.
|
|
195
193
|
*
|
|
196
194
|
* The object has the following structure and default values:
|
|
197
|
-
* ```
|
|
195
|
+
* ```js
|
|
198
196
|
* {
|
|
199
197
|
* selectSection: 'Select section for editing',
|
|
200
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-alpha21",
|
|
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-alpha21/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/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-alpha21",
|
|
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-alpha21/#/elements/vaadin-dashboard#property-items) property.\nSet a renderer function to the [`renderer`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha21/#/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,157 +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 '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
|
-
|
|
13
|
-
export const hasWidgetWrappers = css`
|
|
14
|
-
::slotted(vaadin-dashboard-widget-wrapper) {
|
|
15
|
-
display: contents;
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
|
|
19
|
-
export const dashboardWidgetAndSectionStyles = css`
|
|
20
|
-
:host {
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
:host([dragging]) * {
|
|
25
|
-
visibility: hidden;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host(:not([editable])) [part~='move-button'],
|
|
29
|
-
:host(:not([editable])) [part~='remove-button'],
|
|
30
|
-
:host(:not([editable])) #focus-button,
|
|
31
|
-
:host(:not([editable])) #focus-button-wrapper,
|
|
32
|
-
:host(:not([editable])) .mode-controls {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
#focustrap {
|
|
37
|
-
display: contents;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
header {
|
|
41
|
-
display: flex;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
vaadin-dashboard-button {
|
|
46
|
-
z-index: 1;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#focus-button-wrapper,
|
|
50
|
-
#focus-button {
|
|
51
|
-
position: absolute;
|
|
52
|
-
inset: 0;
|
|
53
|
-
opacity: 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
#focus-button {
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
padding: 0;
|
|
59
|
-
border: none;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.mode-controls {
|
|
63
|
-
position: absolute;
|
|
64
|
-
inset: 0;
|
|
65
|
-
z-index: 2;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.mode-controls[hidden] {
|
|
69
|
-
display: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* Move-mode buttons */
|
|
73
|
-
[part~='move-backward-button'],
|
|
74
|
-
[part~='move-forward-button'],
|
|
75
|
-
[part~='move-apply-button'] {
|
|
76
|
-
position: absolute;
|
|
77
|
-
top: 50%;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
[part~='move-backward-button'] {
|
|
81
|
-
inset-inline-start: 0;
|
|
82
|
-
transform: translateY(-50%);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[part~='move-forward-button'] {
|
|
86
|
-
inset-inline-end: 0;
|
|
87
|
-
transform: translateY(-50%);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
[part~='move-apply-button'] {
|
|
91
|
-
left: 50%;
|
|
92
|
-
transform: translate(-50%, -50%);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host([first-child]) [part~='move-backward-button'],
|
|
96
|
-
:host([last-child]) [part~='move-forward-button'] {
|
|
97
|
-
display: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/* Resize-mode buttons */
|
|
101
|
-
[part~='resize-shrink-width-button'],
|
|
102
|
-
[part~='resize-shrink-height-button'],
|
|
103
|
-
[part~='resize-grow-width-button'],
|
|
104
|
-
[part~='resize-grow-height-button'],
|
|
105
|
-
[part~='resize-apply-button'] {
|
|
106
|
-
position: absolute;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
[part~='resize-shrink-width-button'] {
|
|
110
|
-
inset-inline-end: 0;
|
|
111
|
-
top: 50%;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
:host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
|
|
115
|
-
transform: translateY(-50%) translateX(-100%);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
:host([dir='rtl']) [part~='resize-shrink-width-button'] {
|
|
119
|
-
transform: translateY(-50%) translateX(100%);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.mode-controls:has([part~='resize-grow-width-button'][hidden]) [part~='resize-shrink-width-button'] {
|
|
123
|
-
transform: translateY(-50%);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
[part~='resize-grow-width-button'] {
|
|
127
|
-
inset-inline-start: 100%;
|
|
128
|
-
top: 50%;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:host(:not([dir='rtl'])) [part~='resize-grow-width-button'] {
|
|
132
|
-
transform: translateY(-50%) translateX(-100%);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:host([dir='rtl']) [part~='resize-grow-width-button'] {
|
|
136
|
-
transform: translateY(-50%) translateX(100%);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
[part~='resize-shrink-height-button'] {
|
|
140
|
-
bottom: 0;
|
|
141
|
-
left: 50%;
|
|
142
|
-
transform: translateX(-50%) translateY(-100%);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
[part~='resize-grow-height-button'] {
|
|
146
|
-
top: 100%;
|
|
147
|
-
left: 50%;
|
|
148
|
-
transform: translateX(-50%) translateY(-100%);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
[part~='resize-apply-button'] {
|
|
152
|
-
left: 50%;
|
|
153
|
-
top: 50%;
|
|
154
|
-
|
|
155
|
-
transform: translate(-50%, -50%);
|
|
156
|
-
}
|
|
157
|
-
`;
|
|
@@ -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 };
|