|
4 | 4 | * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ |
5 | 5 | */ |
6 | 6 | @media lumo_components_dashboard-widget { |
7 | | - :host { |
8 | | - display: flex; |
9 | | - flex-direction: column; |
10 | | - grid-column: var(--_item-column); |
11 | | - grid-row: var(--_item-row); |
12 | | - background: var(--_widget-background); |
13 | | - border-radius: var(--_widget-border-radius); |
14 | | - box-shadow: var(--_widget-shadow); |
15 | | - position: relative; |
16 | | - } |
17 | | - |
18 | 7 | :host::before { |
19 | | - content: ''; |
20 | | - position: absolute; |
21 | 8 | inset: calc(-1 * var(--_widget-border-width)); |
22 | 9 | border: var(--_widget-border-width) solid var(--_widget-border-color); |
23 | 10 | border-radius: calc(var(--_widget-border-radius) + var(--_widget-border-width)); |
24 | | - pointer-events: none; |
25 | | - } |
26 | | - |
27 | | - :host([hidden]) { |
28 | | - display: none !important; |
29 | | - } |
30 | | - |
31 | | - :host(:not([editable])) [part~='resize-button'] { |
32 | | - display: none; |
33 | | - } |
34 | | - |
35 | | - [part~='content'] { |
36 | | - flex: 1; |
37 | | - overflow: hidden; |
38 | 11 | } |
39 | 12 |
|
40 | 13 | /* Widget states */ |
41 | 14 |
|
42 | 15 | :host([editable]) { |
43 | | - --vaadin-dashboard-widget-shadow: var(--_widget-editable-shadow); |
44 | 16 | --_widget-border-color: var(--lumo-contrast-20pct); |
45 | 17 | --_widget-border-width: 1px; |
46 | 18 | } |
|
51 | 23 | } |
52 | 24 |
|
53 | 25 | :host([selected]) { |
54 | | - --vaadin-dashboard-widget-shadow: var(--_widget-selected-shadow); |
55 | 26 | background: var(--lumo-primary-color-10pct); |
56 | 27 | } |
57 | 28 |
|
|
62 | 33 | } |
63 | 34 |
|
64 | 35 | :host([resizing])::after { |
65 | | - content: ''; |
66 | | - z-index: 2; |
67 | | - position: absolute; |
68 | 36 | top: -1px; |
69 | | - width: var(--_widget-resizer-width, 0); |
70 | | - height: var(--_widget-resizer-height, 0); |
71 | | - border-radius: inherit; |
72 | 37 | background: var(--_drop-target-background-color); |
73 | 38 | border: var(--_drop-target-border); |
74 | 39 | } |
|
81 | 46 | } |
82 | 47 |
|
83 | 48 | :host([editable]) header { |
84 | | - padding-inline: var(--lumo-space-xs); |
| 49 | + padding: var(--lumo-space-xs); |
85 | 50 | } |
86 | 51 |
|
87 | 52 | [part='title'] { |
|
113 | 78 | /* Resize handle */ |
114 | 79 |
|
115 | 80 | [part~='resize-button'] { |
116 | | - z-index: 1; |
117 | | - overflow: hidden; |
118 | 81 | --_resize-button-offset: min(var(--_gap), var(--_padding), var(--lumo-space-xs)); |
119 | | - position: absolute; |
120 | 82 | bottom: calc(-1 * var(--_resize-button-offset)); |
121 | 83 | inset-inline-end: calc(-1 * var(--_resize-button-offset)); |
122 | | - cursor: nwse-resize; |
123 | | - touch-action: none; |
124 | 84 | --icon: var(--lumo-icons-resize-handle); |
125 | 85 | } |
126 | 86 |
|
127 | | - :host([dir='rtl']) [part~='resize-button'] { |
128 | | - cursor: sw-resize; |
129 | | - } |
130 | | - |
131 | | - :host([dir='rtl']) [part~='resize-button'] .icon::before { |
132 | | - transform: scaleX(-1); |
133 | | - } |
134 | | - |
135 | 87 | /* Accessible resize mode controls */ |
136 | 88 |
|
137 | 89 | [part~='resize-apply-button'] { |
|
146 | 98 | min-width: var(--lumo-size-s); |
147 | 99 | } |
148 | 100 |
|
149 | | - [part~='resize-shrink-width-button'] + [part~='resize-grow-width-button'] { |
150 | | - margin-left: 1px; |
151 | | - } |
152 | | - |
153 | 101 | [part~='resize-grow-height-button'], |
154 | 102 | [part~='resize-shrink-height-button'] { |
155 | 103 | height: var(--lumo-size-s); |
156 | 104 | padding-right: 0; |
157 | 105 | padding-left: 0; |
158 | | - border-bottom-left-radius: 0; |
159 | | - border-bottom-right-radius: 0; |
160 | | - } |
161 | | - |
162 | | - [part~='resize-shrink-height-button']:not([hidden]) + [part~='resize-grow-height-button'] { |
163 | | - border-top-left-radius: 0; |
164 | | - border-top-right-radius: 0; |
165 | | - } |
166 | | - |
167 | | - [part~='resize-shrink-height-button'] + [part~='resize-grow-height-button'] { |
168 | | - margin-top: 1px; |
169 | | - } |
170 | | - |
171 | | - :host(:not([dir='rtl'])) [part~='resize-grow-width-button'], |
172 | | - :host(:not([dir='rtl'])) [part~='resize-shrink-width-button'] { |
173 | | - border-top-right-radius: 0; |
174 | | - border-bottom-right-radius: 0; |
175 | | - } |
176 | | - |
177 | | - :host([dir='rtl']) [part~='resize-grow-width-button'], |
178 | | - :host([dir='rtl']) [part~='resize-shrink-width-button'] { |
179 | | - border-top-left-radius: 0; |
180 | | - border-bottom-left-radius: 0; |
181 | | - } |
182 | | - |
183 | | - :host(:not([dir='rtl'])) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] { |
184 | | - border-top-left-radius: 0; |
185 | | - border-bottom-left-radius: 0; |
186 | | - } |
187 | | - |
188 | | - :host([dir='rtl']) [part~='resize-shrink-width-button']:not([hidden]) + [part~='resize-grow-width-button'] { |
189 | | - border-top-right-radius: 0; |
190 | | - border-bottom-right-radius: 0; |
191 | 106 | } |
192 | 107 |
|
193 | 108 | [part~='resize-grow-height-button'], |
|
0 commit comments