|
1 | 1 | @import '../../styles/common'; |
2 | 2 |
|
3 | 3 | @mixin action-hide { |
4 | | - clip: rect(1px, 1px, 1px, 1px); |
| 4 | + clip: rect(0, 0, 0, 0); |
5 | 5 | overflow: hidden; |
6 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
7 | | - height: 1px; |
8 | 6 | } |
9 | 7 |
|
10 | 8 | @mixin action-unhide { |
11 | 9 | clip: auto; |
12 | 10 | overflow: visible; |
13 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
14 | | - height: 100%; |
15 | | -} |
16 | | - |
17 | | -.CheckboxWrapper { |
18 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
19 | | - display: flex; |
20 | 11 | } |
21 | 12 |
|
22 | 13 | .ResourceItem { |
23 | 14 | // stylelint-disable -- Polaris component custom properties |
24 | 15 | --pc-resource-item-min-height: 44px; |
25 | 16 | --pc-resource-item-disclosure-width: 48px; |
26 | | - // Offset equals handle width + handle margin-left + handle margin-right |
27 | | - --pc-resource-item-offset: 40px; |
| 17 | + --pc-resource-item-offset: 38px; |
28 | 18 | --pc-resource-item-clickable-stacking-order: 1; |
29 | 19 | --pc-resource-item-content-stacking-order: 2; |
30 | 20 | // stylelint-enable |
31 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
32 | | - position: relative; |
33 | 21 | outline: none; |
34 | 22 | cursor: pointer; |
35 | 23 |
|
36 | | - &:not(.persistActions) { |
37 | | - .Actions { |
38 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
39 | | - right: var(--p-space-4); |
40 | | - } |
41 | | - } |
42 | | - |
43 | 24 | &:hover { |
44 | 25 | background-color: var(--p-surface-hovered); |
45 | 26 |
|
46 | | - &:not(.persistActions) { |
47 | | - // stylelint-disable-next-line selector-max-specificity -- generated by polaris-migrator DO NOT COPY |
48 | | - .Actions { |
| 27 | + .Actions { |
| 28 | + /* stylelint-disable-next-line selector-max-combinators */ |
| 29 | + > * { |
49 | 30 | @include action-unhide; |
50 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
51 | | - @media #{$p-breakpoints-lg-down} { |
52 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
53 | | - display: none; |
54 | | - } |
55 | 31 | } |
56 | 32 | } |
57 | 33 | } |
|
95 | 71 | border: none; |
96 | 72 | } |
97 | 73 |
|
98 | | -// Item inner container |
99 | | -.Container { |
100 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
101 | | - position: relative; |
102 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
103 | | - z-index: var(--pc-resource-item-content-stacking-order); |
104 | | - padding: var(--p-space-3) var(--p-space-4); |
105 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
106 | | - min-height: var(--pc-resource-item-min-height); |
107 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
108 | | - display: flex; |
109 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
110 | | - align-items: flex-start; |
111 | | - |
112 | | - @media #{$p-breakpoints-sm-up} { |
113 | | - padding: var(--p-space-3) var(--p-space-5); |
114 | | - } |
115 | | -} |
116 | | - |
117 | | -.alignmentLeading { |
118 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
119 | | - align-items: flex-start; |
120 | | -} |
121 | | - |
122 | | -.alignmentTrailing { |
123 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
124 | | - align-items: flex-end; |
125 | | -} |
126 | | - |
127 | | -.alignmentCenter { |
128 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
129 | | - align-items: center; |
130 | | -} |
131 | | - |
132 | | -.alignmentFill { |
133 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
134 | | - align-items: stretch; |
135 | | -} |
136 | | - |
137 | | -.alignmentBaseline { |
138 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
139 | | - align-items: baseline; |
140 | | -} |
141 | | - |
142 | | -.Owned { |
143 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
144 | | - display: flex; |
145 | | -} |
146 | | - |
147 | | -.OwnedNoMedia { |
148 | | - padding-top: var(--p-space-1); |
149 | | -} |
150 | | - |
151 | | -// Item handle |
152 | | -.Handle { |
153 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
154 | | - width: 48px; |
155 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
156 | | - min-height: var(--pc-resource-item-min-height); |
157 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
158 | | - justify-content: center; |
159 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
160 | | - align-items: center; |
161 | | - margin: calc(-1 * var(--p-space-3)) var(--p-space-1) |
162 | | - calc(-1 * var(--p-space-3)) calc(-1 * var(--p-space-3)); |
163 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
164 | | - display: flex; |
165 | | - |
166 | | - @media #{$p-breakpoints-sm-down} { |
167 | | - visibility: hidden; |
168 | | - |
169 | | - .selectMode & { |
170 | | - visibility: visible; |
171 | | - } |
172 | | - } |
173 | | -} |
174 | | - |
175 | 74 | .selectable { |
176 | 75 | // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
177 | 76 | width: calc(100% + var(--pc-resource-item-offset)); |
|
193 | 92 | } |
194 | 93 | } |
195 | 94 |
|
196 | | -.Media { |
197 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
198 | | - flex: 0 0 auto; |
199 | | - margin-right: var(--p-space-5); |
200 | | - color: inherit; |
201 | | - text-decoration: none; |
202 | | -} |
203 | | - |
204 | | -// Item content |
205 | | -.Content { |
206 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
207 | | - @include layout-flex-fix; |
208 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
209 | | - flex: 1 1 auto; |
210 | | -} |
211 | | - |
212 | 95 | // Item actions |
213 | 96 | .Actions { |
214 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
215 | | - position: absolute; |
216 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
217 | | - top: 0; |
218 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
219 | | - display: flex; |
220 | | - pointer-events: initial; |
221 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
222 | | - height: 100%; |
223 | | - max-height: 56px; |
224 | | - |
225 | | - @include action-hide; |
226 | | - |
227 | | - .focused & { |
228 | | - @include action-unhide; |
| 97 | + > * { |
| 98 | + @include action-hide; |
229 | 99 | } |
230 | 100 |
|
231 | | - @media #{$p-breakpoints-lg-down} { |
232 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
233 | | - display: none; |
234 | | - } |
235 | | -} |
236 | | - |
237 | | -.persistActions { |
238 | | - .Actions { |
239 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
240 | | - position: relative; |
241 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
242 | | - display: flex; |
243 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
244 | | - flex: 0 0 auto; |
245 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
246 | | - flex-basis: auto; |
247 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
248 | | - align-items: center; |
249 | | - margin-top: 0; |
250 | | - margin-left: var(--p-space-4); |
251 | | - pointer-events: initial; |
252 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
253 | | - height: 100%; |
254 | | - |
255 | | - @media #{$p-breakpoints-lg-down} { |
256 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
257 | | - display: none; |
| 101 | + .focused & { |
| 102 | + // stylelint-disable-next-line selector-max-combinators |
| 103 | + > * { |
| 104 | + @include action-unhide; |
258 | 105 | } |
259 | 106 | } |
260 | 107 | } |
261 | 108 |
|
262 | | -.Disclosure { |
263 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
264 | | - position: relative; |
265 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
266 | | - top: calc(-1 * var(--p-space-3)); |
267 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
268 | | - right: calc(-1 * var(--p-space-4)); |
269 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
270 | | - display: none; |
271 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
272 | | - width: var(--pc-resource-item-disclosure-width); |
273 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
274 | | - min-height: var(--pc-resource-item-min-height); |
275 | | - pointer-events: initial; |
276 | | - |
277 | | - .selectMode & { |
278 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
279 | | - display: none; |
280 | | - } |
281 | | - |
282 | | - @media #{$p-breakpoints-lg-down} { |
283 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
284 | | - display: flex; |
285 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
286 | | - flex: 0 0 var(--pc-resource-item-disclosure-width); |
287 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
288 | | - justify-content: center; |
289 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
290 | | - align-items: center; |
291 | | - } |
292 | | -} |
293 | | - |
294 | 109 | .selected { |
295 | 110 | background-color: var(--p-surface-selected); |
296 | 111 |
|
|
304 | 119 | } |
305 | 120 |
|
306 | 121 | .ListItem { |
307 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
308 | | - position: relative; |
309 | | - // stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY |
310 | 122 | @include focus-ring($border-width: -1px); |
311 | 123 |
|
312 | 124 | .ListItem + & { |
|
0 commit comments