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