@vaadin/dashboard 25.0.0-alpha9 → 25.0.0-beta2

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.
Files changed (52) hide show
  1. package/package.json +10 -13
  2. package/src/styles/vaadin-dashboard-base-styles.js +1 -1
  3. package/src/styles/vaadin-dashboard-button-base-styles.js +3 -3
  4. package/src/styles/vaadin-dashboard-layout-base-styles.js +3 -2
  5. package/src/styles/vaadin-dashboard-section-base-styles.js +2 -2
  6. package/src/styles/vaadin-dashboard-widget-base-styles.js +4 -3
  7. package/src/styles/vaadin-dashboard-widget-section-base-styles.js +6 -9
  8. package/src/vaadin-dashboard-button.js +1 -1
  9. package/src/vaadin-dashboard-item-mixin.js +8 -3
  10. package/src/vaadin-dashboard-layout.js +7 -1
  11. package/src/vaadin-dashboard-section.js +8 -2
  12. package/src/vaadin-dashboard-widget.js +8 -2
  13. package/src/vaadin-dashboard.d.ts +1 -1
  14. package/src/vaadin-dashboard.js +8 -2
  15. package/src/widget-resize-controller.js +3 -1
  16. package/vaadin-dashboard-layout.js +1 -1
  17. package/vaadin-dashboard-section.js +1 -1
  18. package/vaadin-dashboard-widget.js +1 -1
  19. package/vaadin-dashboard.js +1 -1
  20. package/web-types.json +3 -3
  21. package/web-types.lit.json +3 -3
  22. package/src/styles/vaadin-dashboard-button-core-styles.d.ts +0 -13
  23. package/src/styles/vaadin-dashboard-button-core-styles.js +0 -20
  24. package/src/styles/vaadin-dashboard-core-styles.d.ts +0 -13
  25. package/src/styles/vaadin-dashboard-core-styles.js +0 -25
  26. package/src/styles/vaadin-dashboard-layout-core-styles.d.ts +0 -13
  27. package/src/styles/vaadin-dashboard-layout-core-styles.js +0 -85
  28. package/src/styles/vaadin-dashboard-section-core-styles.d.ts +0 -13
  29. package/src/styles/vaadin-dashboard-section-core-styles.js +0 -53
  30. package/src/styles/vaadin-dashboard-widget-core-styles.d.ts +0 -13
  31. package/src/styles/vaadin-dashboard-widget-core-styles.js +0 -57
  32. package/src/styles/vaadin-dashboard-widget-section-core-styles.js +0 -151
  33. package/theme/lumo/vaadin-dashboard-button-styles.d.ts +0 -2
  34. package/theme/lumo/vaadin-dashboard-button-styles.js +0 -8
  35. package/theme/lumo/vaadin-dashboard-button.d.ts +0 -1
  36. package/theme/lumo/vaadin-dashboard-button.js +0 -1
  37. package/theme/lumo/vaadin-dashboard-layout-styles.d.ts +0 -1
  38. package/theme/lumo/vaadin-dashboard-layout-styles.js +0 -28
  39. package/theme/lumo/vaadin-dashboard-layout.d.ts +0 -2
  40. package/theme/lumo/vaadin-dashboard-layout.js +0 -2
  41. package/theme/lumo/vaadin-dashboard-section-styles.d.ts +0 -5
  42. package/theme/lumo/vaadin-dashboard-section-styles.js +0 -83
  43. package/theme/lumo/vaadin-dashboard-section.d.ts +0 -3
  44. package/theme/lumo/vaadin-dashboard-section.js +0 -3
  45. package/theme/lumo/vaadin-dashboard-styles.d.ts +0 -1
  46. package/theme/lumo/vaadin-dashboard-styles.js +0 -16
  47. package/theme/lumo/vaadin-dashboard-widget-styles.d.ts +0 -9
  48. package/theme/lumo/vaadin-dashboard-widget-styles.js +0 -329
  49. package/theme/lumo/vaadin-dashboard-widget.d.ts +0 -3
  50. package/theme/lumo/vaadin-dashboard-widget.js +0 -3
  51. package/theme/lumo/vaadin-dashboard.d.ts +0 -4
  52. package/theme/lumo/vaadin-dashboard.js +0 -4
@@ -1,329 +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
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
-
9
- /* Styles shared between widgets and sections */
10
- const dashboardWidgetAndSection = css`
11
- /* stylelint-disable rule-empty-line-before */
12
-
13
- :host {
14
- --_widget-background: var(--vaadin-dashboard-widget-background, var(--lumo-base-color));
15
- --_widget-border-radius: var(--vaadin-dashboard-widget-border-radius, var(--lumo-border-radius-l));
16
- --_widget-border-width: var(--vaadin-dashboard-widget-border-width, 1px);
17
- --_widget-border-color: var(--vaadin-dashboard-widget-border-color, var(--lumo-contrast-20pct));
18
- --_widget-shadow: var(--vaadin-dashboard-widget-shadow, 0 0 0 0 transparent);
19
- --_widget-editable-shadow: var(--lumo-box-shadow-s);
20
- --_widget-selected-shadow:
21
- 0 2px 4px -1px var(--lumo-primary-color-10pct), 0 3px 12px -1px var(--lumo-primary-color-50pct);
22
- --_drop-target-background-color: var(
23
- --vaadin-dashboard-drop-target-background-color,
24
- var(--lumo-primary-color-10pct)
25
- );
26
- --_drop-target-border: var(--vaadin-dashboard-drop-target-border, 1px dashed var(--lumo-primary-color-50pct));
27
-
28
- color: var(--lumo-body-text-color);
29
- font-family: var(--lumo-font-family);
30
- font-size: var(--lumo-font-size-m);
31
- line-height: var(--lumo-line-height-m);
32
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
33
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
34
- --_icon-color: var(--lumo-contrast-60pct);
35
- opacity: var(--_widget-opacity);
36
- filter: var(--_widget-filter);
37
- }
38
-
39
- :host([focused]) {
40
- z-index: 1;
41
- }
42
-
43
- header {
44
- display: flex;
45
- align-items: start;
46
- box-sizing: border-box;
47
- justify-content: space-between;
48
- }
49
-
50
- [part='title'] {
51
- flex: 1;
52
- color: var(--lumo-header-text-color);
53
- white-space: var(--vaadin-dashboard-widget-title-wrap, wrap);
54
- text-overflow: ellipsis;
55
- overflow: hidden;
56
- line-height: var(--lumo-line-height-s);
57
- margin: 0 0 1px;
58
- align-self: safe center;
59
- }
60
-
61
- vaadin-dashboard-button {
62
- font-family: 'lumo-icons';
63
- font-size: var(--lumo-icon-size-m);
64
- margin: 0;
65
- }
66
-
67
- vaadin-dashboard-button .icon::before {
68
- display: block;
69
- content: var(--icon);
70
- }
71
-
72
- /* Common styles for non-mode edit buttons */
73
- [part='move-button'],
74
- [part='resize-button'],
75
- [part='remove-button'] {
76
- color: var(--_icon-color);
77
- padding-inline: 0;
78
- }
79
- :where([part='move-button'], [part='resize-button'], [part='remove-button']):hover {
80
- --_icon-color: var(--lumo-primary-text-color);
81
- }
82
- :host([selected]) {
83
- opacity: 1;
84
- z-index: 1;
85
- --_icon-color: var(--lumo-primary-text-color);
86
- }
87
- :host(:is([move-mode], [resize-mode])) {
88
- --_icon-color: var(--lumo-disabled-text-color);
89
- }
90
-
91
- /* Drag handle */
92
- [part~='move-button'] {
93
- cursor: move;
94
- --icon: var(--lumo-icons-drag-handle);
95
- }
96
-
97
- /* Remove button */
98
- [part~='remove-button'] {
99
- cursor: pointer;
100
- --icon: var(--lumo-icons-cross);
101
- margin-inline-start: var(--lumo-space-xs);
102
- }
103
-
104
- /* Mode controls */
105
- .mode-controls vaadin-dashboard-button[focused] {
106
- z-index: 3;
107
- }
108
-
109
- /* Move mode */
110
-
111
- :host(:not([dir='rtl'])) [part~='move-backward-button'],
112
- :host([dir='rtl']) [part~='move-forward-button'] {
113
- border-top-left-radius: 0;
114
- border-bottom-left-radius: 0;
115
- --icon: var(--lumo-icons-angle-left);
116
- }
117
-
118
- :host(:not([dir='rtl'])) [part~='move-forward-button'],
119
- :host([dir='rtl']) [part~='move-backward-button'] {
120
- border-top-right-radius: 0;
121
- border-bottom-right-radius: 0;
122
- --icon: var(--lumo-icons-angle-right);
123
- }
124
-
125
- [part~='move-apply-button'] {
126
- --icon: var(--lumo-icons-checkmark);
127
- font-size: var(--lumo-icon-size-m);
128
- }
129
- `;
130
-
131
- /* Widget styles */
132
- const dashboardWidget = css`
133
- :host {
134
- background: var(--_widget-background);
135
- border-radius: var(--_widget-border-radius);
136
- box-shadow: var(--_widget-shadow);
137
- position: relative;
138
- }
139
-
140
- :host::before {
141
- content: '';
142
- position: absolute;
143
- inset: calc(-1 * var(--_widget-border-width));
144
- border: var(--_widget-border-width) solid var(--_widget-border-color);
145
- border-radius: calc(var(--_widget-border-radius) + var(--_widget-border-width));
146
- pointer-events: none;
147
- }
148
-
149
- /* Widget states */
150
-
151
- :host([editable]) {
152
- --vaadin-dashboard-widget-shadow: var(--_widget-editable-shadow);
153
- --_widget-border-color: var(--lumo-contrast-20pct);
154
- --_widget-border-width: 1px;
155
- }
156
-
157
- :host([focused])::before {
158
- border-width: var(--_focus-ring-width);
159
- border-color: var(--_focus-ring-color);
160
- }
161
-
162
- :host([selected]) {
163
- --vaadin-dashboard-widget-shadow: var(--_widget-selected-shadow);
164
- background: var(--lumo-primary-color-10pct);
165
- }
166
-
167
- :host([dragging]) {
168
- box-shadow: none;
169
- background: var(--_drop-target-background-color);
170
- border: var(--_drop-target-border);
171
- }
172
-
173
- :host([resizing])::after {
174
- background: var(--_drop-target-background-color);
175
- border: var(--_drop-target-border);
176
- }
177
-
178
- /* Widget parts */
179
-
180
- header {
181
- min-height: var(--lumo-size-l);
182
- padding: var(--lumo-space-xs) var(--lumo-space-m);
183
- }
184
-
185
- :host([editable]) header {
186
- padding-inline: var(--lumo-space-xs);
187
- }
188
-
189
- [part='title'] {
190
- font-size: var(--lumo-font-size-l);
191
- font-weight: 600;
192
- }
193
-
194
- #content {
195
- min-height: var(--lumo-size-m);
196
- padding: var(--vaadin-dashboard-widget-padding, 0);
197
- padding-top: 0;
198
- border-radius: inherit;
199
- border-top-left-radius: 0;
200
- border-top-right-radius: 0;
201
- overflow: hidden;
202
- }
203
-
204
- ::slotted([slot='header-content']) {
205
- align-self: center;
206
- }
207
-
208
- :host([resize-mode]) #content,
209
- :host([move-mode]) #content {
210
- opacity: 0.75;
211
- filter: blur(10px);
212
- }
213
-
214
- /* Resize handle */
215
-
216
- [part~='resize-button'] {
217
- --_resize-button-offset: min(var(--_gap), var(--_padding), var(--lumo-space-xs));
218
- position: absolute;
219
- bottom: calc(-1 * var(--_resize-button-offset));
220
- inset-inline-end: calc(-1 * var(--_resize-button-offset));
221
- cursor: nwse-resize;
222
- --icon: var(--lumo-icons-resize-handle);
223
- }
224
-
225
- :host([dir='rtl']) [part~='resize-button'] {
226
- cursor: sw-resize;
227
- }
228
-
229
- :host([dir='rtl']) [part~='resize-button'] .icon::before {
230
- transform: scaleX(-1);
231
- }
232
-
233
- /* Accessible resize mode controls */
234
-
235
- [part~='resize-apply-button'] {
236
- --icon: var(--lumo-icons-checkmark);
237
- font-size: var(--lumo-icon-size-m);
238
- }
239
-
240
- [part~='resize-grow-width-button'],
241
- [part~='resize-shrink-width-button'] {
242
- padding-right: 0;
243
- padding-left: 0;
244
- min-width: var(--lumo-size-s);
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
- height: var(--lumo-size-s);
254
- padding-right: 0;
255
- padding-left: 0;
256
- border-bottom-left-radius: 0;
257
- border-bottom-right-radius: 0;
258
- }
259
-
260
- [part~='resize-shrink-height-button']:not([hidden]) + [part~='resize-grow-height-button'] {
261
- border-top-left-radius: 0;
262
- border-top-right-radius: 0;
263
- }
264
-
265
- [part~='resize-shrink-height-button'] + [part~='resize-grow-height-button'] {
266
- margin-top: 1px;
267
- }
268
-
269
- :host(:not([dir='rtl'])) [part~='resize-grow-width-button'],
270
- :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] {
271
- border-top-right-radius: 0;
272
- border-bottom-right-radius: 0;
273
- }
274
-
275
- :host([dir='rtl']) [part~='resize-grow-width-button'],
276
- :host([dir='rtl']) [part~='resize-shrink-width-button'] {
277
- border-top-left-radius: 0;
278
- border-bottom-left-radius: 0;
279
- }
280
-
281
- :host(:not([dir='rtl'])) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
282
- border-top-left-radius: 0;
283
- border-bottom-left-radius: 0;
284
- }
285
-
286
- :host([dir='rtl']) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] {
287
- border-top-right-radius: 0;
288
- border-bottom-right-radius: 0;
289
- }
290
-
291
- [part~='resize-grow-height-button'],
292
- [part~='resize-grow-width-button'] {
293
- --icon: var(--lumo-icons-plus);
294
- }
295
-
296
- [part~='resize-shrink-height-button'],
297
- [part~='resize-shrink-width-button'] {
298
- --icon: var(--lumo-icons-minus);
299
- }
300
-
301
- /* Windows High Contrast Mode */
302
- @media (forced-colors: active) {
303
- :host {
304
- border: 1px solid;
305
- }
306
-
307
- :host([focused]) {
308
- outline: 2px solid;
309
- outline-offset: 1px;
310
- }
311
-
312
- :host([selected]) {
313
- outline-width: 1px;
314
- outline-offset: 0;
315
- outline-color: Highlight;
316
- }
317
-
318
- :host([selected][focused]) {
319
- outline-width: 3px;
320
- outline-offset: 0;
321
- }
322
- }
323
- `;
324
-
325
- registerStyles('vaadin-dashboard-widget', [dashboardWidget, dashboardWidgetAndSection], {
326
- moduleId: 'lumo-dashboard-widget',
327
- });
328
-
329
- export { dashboardWidget, dashboardWidgetAndSection };
@@ -1,3 +0,0 @@
1
- import './vaadin-dashboard-widget-styles.js';
2
- import './vaadin-dashboard-button.js';
3
- import '../../src/vaadin-dashboard-widget.js';
@@ -1,3 +0,0 @@
1
- import './vaadin-dashboard-widget-styles.js';
2
- import './vaadin-dashboard-button.js';
3
- import '../../src/vaadin-dashboard-widget.js';
@@ -1,4 +0,0 @@
1
- import './vaadin-dashboard-section.js';
2
- import './vaadin-dashboard-widget.js';
3
- import './vaadin-dashboard-styles.js';
4
- import '../../src/vaadin-dashboard.js';
@@ -1,4 +0,0 @@
1
- import './vaadin-dashboard-section.js';
2
- import './vaadin-dashboard-widget.js';
3
- import './vaadin-dashboard-styles.js';
4
- import '../../src/vaadin-dashboard.js';