@react-spectrum/list 3.0.0-alpha.7 → 3.0.0-beta.0
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/dist/main.css +1 -1
- package/dist/main.js +767 -370
- package/dist/main.js.map +1 -1
- package/dist/module.js +765 -368
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +6 -14
- package/dist/types.d.ts.map +1 -1
- package/package.json +40 -30
- package/src/DragPreview.tsx +60 -0
- package/src/InsertionIndicator.tsx +46 -0
- package/src/ListView.tsx +203 -93
- package/src/ListViewItem.tsx +190 -53
- package/src/RootDropIndicator.tsx +28 -0
- package/src/styles.css +593 -0
- package/src/listview.css +0 -197
package/src/styles.css
ADDED
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--spectrum-listview-item-compact-padding-y: var(--spectrum-global-dimension-size-50);
|
|
15
|
+
--spectrum-listview-item-regular-padding-y: var(--spectrum-global-dimension-size-85);
|
|
16
|
+
--spectrum-listview-item-spacious-padding-y: var(--spectrum-global-dimension-size-100);
|
|
17
|
+
--spectrum-listview-border-width: var(--spectrum-table-border-size, var(--spectrum-alias-border-size-thin));
|
|
18
|
+
--spectrum-listview-border-radius: var(--spectrum-table-border-radius, var(--spectrum-alias-border-radius-regular));
|
|
19
|
+
--spectrum-listview-item-border-radius: calc(var(--spectrum-listview-border-radius) - var(--spectrum-listview-border-width));
|
|
20
|
+
--spectrum-listview-row-sticky-focus-indicator-width: 3px;
|
|
21
|
+
--spectrum-listview-item-line-height: calc(var(--spectrum-table-cell-text-size, var(--spectrum-alias-font-size-default)) * var(--spectrum-table-cell-text-line-height, var(--spectrum-alias-body-text-line-height)) - 1px);
|
|
22
|
+
--spectrum-listview-item-title-text-color: var(--spectrum-global-color-gray-800);
|
|
23
|
+
--spectrum-listview-item-title-text-size: var(--spectrum-global-dimension-font-size-100);
|
|
24
|
+
--spectrum-listview-item-description-text-color: var(--spectrum-global-color-gray-700);
|
|
25
|
+
--spectrum-listview-item-description-text-size: var(--spectrum-global-dimension-font-size-75);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.react-spectrum-ListView {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
border-color: var(--spectrum-table-border-color, var(--spectrum-alias-border-color-mid));
|
|
31
|
+
border-style: solid;
|
|
32
|
+
position: relative;
|
|
33
|
+
border-width: var(--spectrum-listview-border-width);
|
|
34
|
+
border-radius: var(--spectrum-listview-border-radius);
|
|
35
|
+
overflow: auto;
|
|
36
|
+
vertical-align: var(--spectrum-table-cell-vertical-alignment);
|
|
37
|
+
border-collapse: separate;
|
|
38
|
+
border-spacing: 0;
|
|
39
|
+
transform: translate3d(0, 0, 0);
|
|
40
|
+
padding: 0;
|
|
41
|
+
background-color: var(--spectrum-table-background-color, var(--spectrum-global-color-gray-50));
|
|
42
|
+
outline: 0;
|
|
43
|
+
user-select: none;
|
|
44
|
+
|
|
45
|
+
.react-spectrum-ListView-row {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.react-spectrum-ListView--emphasized {
|
|
50
|
+
&.react-spectrum-ListView--dropTarget {
|
|
51
|
+
.react-spectrum-ListViewItem:not(.is-selected) {
|
|
52
|
+
/* shift bottom border inwards so it doesn't overlap the root drop target */
|
|
53
|
+
&:after {
|
|
54
|
+
inset-inline-start: 1px;
|
|
55
|
+
inset-inline-end: 1px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
.react-spectrum-ListViewItem {
|
|
60
|
+
/* common pseudoelement for box shadows */
|
|
61
|
+
&:after {
|
|
62
|
+
content: '';
|
|
63
|
+
display: block;
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset-inline-start: 0;
|
|
66
|
+
inset-inline-end: 0;
|
|
67
|
+
inset-block-end: 0;
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
z-index: 3;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.is-selected {
|
|
74
|
+
background-color: var(--spectrum-table-row-background-color-selected);
|
|
75
|
+
&.is-hovered,
|
|
76
|
+
&.is-active {
|
|
77
|
+
background-color: var(--spectrum-table-row-background-color-selected-hover);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:focus-ring {
|
|
81
|
+
background-color: var(--spectrum-table-row-background-color-selected-key-focus);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Negative block start causes borders to actually be shared between items. Only works if we allow item overflow to be visible, like card focus rings. */
|
|
85
|
+
&:after {
|
|
86
|
+
inset-block-start: -1px;
|
|
87
|
+
box-shadow: inset 1px 0 0 0 var(--spectrum-global-color-blue-500), inset -1px 0 0 0 var(--spectrum-global-color-blue-500), inset 0 -1px 0 0 var(--spectrum-global-color-blue-500), inset 0 1px 0 0 var(--spectrum-global-color-blue-500);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* First item in the ListView should not have a border that extends outside of itself to the top, it doesn't need to share a border space. */
|
|
92
|
+
&.react-spectrum-ListViewItem--firstRow {
|
|
93
|
+
&.is-selected {
|
|
94
|
+
&:after {
|
|
95
|
+
inset-block-start: 0px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:not(.react-spectrum-ListView--quiet) {
|
|
102
|
+
.react-spectrum-ListViewItem {
|
|
103
|
+
/* Box shadow for bottom border for non-selected rows that aren't immediately above a selected row (grey border bottom). */
|
|
104
|
+
/* Also omit bottom border for last row if the total content height of the ListView is equal or greater than the height of the container. This avoids overlapping bottom borders. */
|
|
105
|
+
&:not(.is-selected):not(.is-next-selected):not(.react-spectrum-ListViewItem--isFlushBottom) {
|
|
106
|
+
&:after {
|
|
107
|
+
box-shadow: inset 0 -1px 0 0 var(--spectrum-table-cell-border-color);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.react-spectrum-ListViewItem--firstRow.is-selected {
|
|
112
|
+
&:after {
|
|
113
|
+
border-start-start-radius: var(--spectrum-listview-item-border-radius);
|
|
114
|
+
border-start-end-radius: var(--spectrum-listview-item-border-radius);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:not(.react-spectrum-ListView--loadingMore) {
|
|
120
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem--isFlushBottom.is-selected {
|
|
121
|
+
&:after {
|
|
122
|
+
border-end-start-radius: var(--spectrum-listview-item-border-radius);
|
|
123
|
+
border-end-end-radius: var(--spectrum-listview-item-border-radius);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&.react-spectrum-ListView--isVerticalScrollbarVisible {
|
|
129
|
+
.react-spectrum-ListViewItem {
|
|
130
|
+
&.react-spectrum-ListViewItem--firstRow.is-selected {
|
|
131
|
+
&:after {
|
|
132
|
+
border-start-end-radius: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:not(.react-spectrum-ListView--loadingMore) {
|
|
138
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem--isFlushBottom.is-selected {
|
|
139
|
+
&:after {
|
|
140
|
+
border-end-end-radius: 0;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.react-spectrum-ListView--isHorizontalScrollbarVisible {
|
|
147
|
+
&:not(.react-spectrum-ListView--loadingMore) {
|
|
148
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem--isFlushBottom.is-selected {
|
|
149
|
+
&:after {
|
|
150
|
+
border-end-start-radius: 0;
|
|
151
|
+
border-end-end-radius: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
&.react-spectrum-ListView--wrap .react-spectrum-ListViewItem {
|
|
159
|
+
& .react-spectrum-ListViewItem-content,
|
|
160
|
+
& .react-spectrum-ListViewItem-description {
|
|
161
|
+
white-space: normal;
|
|
162
|
+
height: auto;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.react-spectrum-ListView-row {
|
|
168
|
+
cursor: default;
|
|
169
|
+
/* Not sticky because listview is a single column. If we want to make sticky, will need a cell wrapper like TableView for display: inline-block */
|
|
170
|
+
&:focus-ring {
|
|
171
|
+
&:before {
|
|
172
|
+
content: '';
|
|
173
|
+
position: absolute;
|
|
174
|
+
inset-block-start: 0;
|
|
175
|
+
inset-block-end: 0;
|
|
176
|
+
inset-inline-start: 0;
|
|
177
|
+
width: var(--spectrum-listview-row-sticky-focus-indicator-width);
|
|
178
|
+
z-index: 4;
|
|
179
|
+
background: var(--spectrum-selectlist-option-focus-indicator-color);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.react-spectrum-ListView.react-spectrum-ListView--quiet {
|
|
185
|
+
background-color: var(--spectrum-alias-background-color-transparent);
|
|
186
|
+
border-width: 0;
|
|
187
|
+
border-radius: 0;
|
|
188
|
+
|
|
189
|
+
.react-spectrum-ListView-row {
|
|
190
|
+
&.round-tops {
|
|
191
|
+
&:focus-ring {
|
|
192
|
+
&:before {
|
|
193
|
+
border-start-start-radius: var(--spectrum-listview-item-border-radius);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
& > .react-spectrum-ListViewItem {
|
|
197
|
+
border-start-start-radius: var(--spectrum-listview-item-border-radius);
|
|
198
|
+
border-start-end-radius: var(--spectrum-listview-item-border-radius);
|
|
199
|
+
|
|
200
|
+
&:after {
|
|
201
|
+
border-start-start-radius: var(--spectrum-listview-item-border-radius);
|
|
202
|
+
border-start-end-radius: var(--spectrum-listview-item-border-radius);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&.round-bottoms {
|
|
208
|
+
&:focus-ring {
|
|
209
|
+
&:before {
|
|
210
|
+
border-end-start-radius: var(--spectrum-listview-item-border-radius);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
& > .react-spectrum-ListViewItem {
|
|
214
|
+
border-end-start-radius: var(--spectrum-listview-item-border-radius);
|
|
215
|
+
border-end-end-radius: var(--spectrum-listview-item-border-radius);
|
|
216
|
+
|
|
217
|
+
&:after {
|
|
218
|
+
border-end-start-radius: var(--spectrum-listview-item-border-radius);
|
|
219
|
+
border-end-end-radius: var(--spectrum-listview-item-border-radius);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.react-spectrum-ListViewItem {
|
|
227
|
+
display: grid; /* TODO: define grid areas */
|
|
228
|
+
box-sizing: border-box;
|
|
229
|
+
font-size: var(--spectrum-table-cell-text-size, var(--spectrum-alias-font-size-default));
|
|
230
|
+
font-weight: var(--spectrum-table-cell-text-font-weight, var(--spectrum-global-font-weight-regular));
|
|
231
|
+
line-height: var(--spectrum-listview-item-line-height);
|
|
232
|
+
padding: var(--spectrum-listview-item-regular-padding-y) var(--spectrum-global-dimension-size-160);
|
|
233
|
+
position: relative;
|
|
234
|
+
/*background-color: var(--spectrum-table-background-color, var(--spectrum-global-color-gray-50));*/
|
|
235
|
+
color: var(--spectrum-table-cell-text-color, var(--spectrum-alias-text-color));
|
|
236
|
+
outline: 0;
|
|
237
|
+
min-height: var(--spectrum-global-dimension-size-500);
|
|
238
|
+
|
|
239
|
+
&.is-hovered,
|
|
240
|
+
&.is-focused {
|
|
241
|
+
background-color: var(--spectrum-table-row-background-color-hover);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
&:focus-ring {
|
|
245
|
+
background-color: var(--spectrum-table-row-background-color-hover);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&.is-active {
|
|
249
|
+
background-color: var(--spectrum-table-row-background-color-down);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&.is-selected {
|
|
253
|
+
background-color: var(--spectrum-table-row-background-color-hover);
|
|
254
|
+
|
|
255
|
+
&.is-hovered,
|
|
256
|
+
&.is-active {
|
|
257
|
+
background-color: var(--spectrum-table-row-background-color-hover);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
&:focus-ring {
|
|
261
|
+
background-color: var(--spectrum-table-row-background-color-selected-key-focus);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
&.is-disabled {
|
|
266
|
+
&, .react-spectrum-ListViewItem-content, .react-spectrum-ListViewItem-description {
|
|
267
|
+
color: var(--spectrum-alias-text-color-disabled);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&.has-checkbox {
|
|
272
|
+
/* have to eliminate vertical padding to allow proper vertical alignment */
|
|
273
|
+
padding-top: 0px;
|
|
274
|
+
padding-bottom: 0px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.react-spectrum-ListViewItem-grid {
|
|
278
|
+
display: grid;
|
|
279
|
+
grid-template-columns: auto auto auto auto 1fr auto auto;
|
|
280
|
+
grid-template-rows: 1fr auto;
|
|
281
|
+
grid-template-areas:
|
|
282
|
+
"draghandle checkbox icon image content actions actionmenu chevron"
|
|
283
|
+
"draghandle checkbox icon image description actions actionmenu chevron";
|
|
284
|
+
align-items: center;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.react-spectrum-ListViewItem-draghandle-container {
|
|
288
|
+
grid-area: draghandle;
|
|
289
|
+
width: var(--spectrum-global-dimension-size-250);
|
|
290
|
+
display: flex;
|
|
291
|
+
align-self: stretch;
|
|
292
|
+
justify-self: stretch;
|
|
293
|
+
justify-content: center;
|
|
294
|
+
padding: var(--spectrum-global-dimension-size-25);
|
|
295
|
+
padding-inline-start: var(--spectrum-global-dimension-size-40);
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
.react-spectrum-ListViewItem-draghandle-button {
|
|
299
|
+
width: var(--spectrum-global-dimension-size-200);
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
justify-content: center;
|
|
303
|
+
border-radius: var(--spectrum-alias-border-radius-regular);
|
|
304
|
+
|
|
305
|
+
&:focus-ring {
|
|
306
|
+
box-shadow: inset 0 0 0 2px var(--spectrum-table-cell-border-color-key-focus);
|
|
307
|
+
outline: none;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.react-spectrum-ListViewItem-checkboxWrapper {
|
|
313
|
+
grid-area: checkbox;
|
|
314
|
+
align-items: center;
|
|
315
|
+
justify-items: center;
|
|
316
|
+
transition-duration: 160ms;
|
|
317
|
+
display: flex;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.react-spectrum-ListViewItem-checkbox {
|
|
321
|
+
min-height: 0;
|
|
322
|
+
height: 100%;
|
|
323
|
+
|
|
324
|
+
> span {
|
|
325
|
+
margin: 0;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.react-spectrum-ListViewItem-icon,
|
|
330
|
+
.react-spectrum-ListViewItem-image {
|
|
331
|
+
grid-area: image;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-items: center;
|
|
334
|
+
padding-inline-end: var(--spectrum-global-dimension-size-100);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.react-spectrum-ListViewItem-image {
|
|
338
|
+
display: flex;
|
|
339
|
+
border-radius: var(--spectrum-global-dimension-size-25);
|
|
340
|
+
width: var(--spectrum-global-dimension-size-400);
|
|
341
|
+
height: var(--spectrum-global-dimension-size-400);
|
|
342
|
+
align-items: center;
|
|
343
|
+
justify-content: center;
|
|
344
|
+
> img {
|
|
345
|
+
width: unset;
|
|
346
|
+
height: unset;
|
|
347
|
+
max-height: 100%;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.react-spectrum-ListViewItem-content,
|
|
352
|
+
.react-spectrum-ListViewItem-description {
|
|
353
|
+
flex-grow: 1;
|
|
354
|
+
|
|
355
|
+
/* truncate text with ellipsis */
|
|
356
|
+
overflow: hidden;
|
|
357
|
+
white-space: nowrap;
|
|
358
|
+
text-overflow: ellipsis;
|
|
359
|
+
height: var(--spectrum-listview-item-line-height);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.react-spectrum-ListViewItem-content {
|
|
363
|
+
grid-area: content;
|
|
364
|
+
color: var(--spectrum-listview-item-title-text-color);
|
|
365
|
+
font-size: var(--spectrum-listview-item-title-text-size);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
&:not(.react-spectrum-ListView--hasDescription) {
|
|
369
|
+
.react-spectrum-ListViewItem-content {
|
|
370
|
+
grid-area: content / description;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.react-spectrum-ListViewItem-description {
|
|
375
|
+
grid-area: description;
|
|
376
|
+
color: var(--spectrum-listview-item-description-text-color);
|
|
377
|
+
font-size: var(--spectrum-listview-item-description-text-size);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.react-spectrum-ListViewItem-actions {
|
|
381
|
+
grid-area: actions;
|
|
382
|
+
flex-grow: 0;
|
|
383
|
+
flex-shrink: 0;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.react-spectrum-ListViewItem-actionmenu {
|
|
387
|
+
grid-area: actionmenu;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.react-spectrum-ListViewItem-parentIndicator {
|
|
391
|
+
grid-area: chevron;
|
|
392
|
+
padding-inline-start: var(--spectrum-global-dimension-size-75);
|
|
393
|
+
display: none;
|
|
394
|
+
transition: color var(--spectrum-global-animation-duration-100);
|
|
395
|
+
|
|
396
|
+
&.is-disabled {
|
|
397
|
+
color: var(--spectrum-alias-icon-color-disabled);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
&.react-spectrum-ListViewItem-dragPreview {
|
|
402
|
+
width: var(--spectrum-global-dimension-size-2400);
|
|
403
|
+
border: 1px solid var(--spectrum-dropzone-border-color-selected-hover);
|
|
404
|
+
border-radius: var(--spectrum-alias-border-radius-regular);
|
|
405
|
+
background-color: var(--spectrum-table-background-color, var(--spectrum-global-color-gray-50));
|
|
406
|
+
|
|
407
|
+
.react-spectrum-ListViewItem-grid {
|
|
408
|
+
grid-template-areas:
|
|
409
|
+
"icon image content . badge"
|
|
410
|
+
"icon image description . badge";
|
|
411
|
+
grid-template-columns: auto auto auto 1fr;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.react-spectrum-ListViewItem-badge {
|
|
415
|
+
grid-area: badge;
|
|
416
|
+
color: white;
|
|
417
|
+
background: var(--spectrum-global-color-blue-400);
|
|
418
|
+
padding: 0 8px;
|
|
419
|
+
border-radius: var(--spectrum-alias-border-radius-regular);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
&.react-spectrum-ListViewItem-dragPreview--multiple {
|
|
423
|
+
position: relative;
|
|
424
|
+
|
|
425
|
+
&:after {
|
|
426
|
+
content: '';
|
|
427
|
+
display: block;
|
|
428
|
+
position: absolute;
|
|
429
|
+
z-index: -1;
|
|
430
|
+
top: 4px;
|
|
431
|
+
inset-inline-start: 4px;
|
|
432
|
+
width: 100%;
|
|
433
|
+
height: 100%;
|
|
434
|
+
border: 1px solid var(--spectrum-dropzone-border-color-selected-hover);
|
|
435
|
+
border-radius: var(--spectrum-alias-border-radius-regular);
|
|
436
|
+
background-color: var(--spectrum-table-background-color, var(--spectrum-global-color-gray-50));
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.react-spectrum-ListViewItem-actions,
|
|
441
|
+
.react-spectrum-ListViewItem-actionmenu {
|
|
442
|
+
display: none;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
.react-spectrum-ListView:not(.react-spectrum-ListView--quiet) {
|
|
447
|
+
/* give first and last items border-radius to match listview container */
|
|
448
|
+
|
|
449
|
+
.react-spectrum-ListViewItem--firstRow.react-spectrum-ListViewItem {
|
|
450
|
+
border-start-start-radius: var(--spectrum-listview-item-start-end-border-radius);
|
|
451
|
+
border-start-end-radius: var(--spectrum-listview-item-start-end-border-radius);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem {
|
|
455
|
+
border-end-start-radius: var(--spectrum-listview-item-start-end-border-radius);
|
|
456
|
+
border-end-end-radius: var(--spectrum-listview-item-start-end-border-radius);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
&.react-spectrum-ListView--isVerticalScrollbarVisible {
|
|
460
|
+
.react-spectrum-ListViewItem--firstRow.react-spectrum-ListViewItem {
|
|
461
|
+
border-start-end-radius: 0;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem {
|
|
465
|
+
border-end-end-radius: 0;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
&.react-spectrum-ListView--isHorizontalScrollbarVisible {
|
|
470
|
+
.react-spectrum-ListViewItem--lastRow.react-spectrum-ListViewItem {
|
|
471
|
+
border-end-start-radius: 0;
|
|
472
|
+
border-end-end-radius: 0;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.react-spectrum-ListView {
|
|
478
|
+
/* When we can use subgrid, get rid of this. */
|
|
479
|
+
&.react-spectrum-ListView--hasAnyChildren {
|
|
480
|
+
.react-spectrum-ListViewItem-parentIndicator {
|
|
481
|
+
display: inline-block;
|
|
482
|
+
visibility: hidden;
|
|
483
|
+
}
|
|
484
|
+
.react-spectrum-ListViewItem-parentIndicator--hasChildItems {
|
|
485
|
+
visibility: visible;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.react-spectrum-ListView--compact .react-spectrum-ListViewItem {
|
|
491
|
+
padding-top: var(--spectrum-listview-item-compact-padding-y);
|
|
492
|
+
padding-bottom: var(--spectrum-listview-item-compact-padding-y);
|
|
493
|
+
min-height: var(--spectrum-global-dimension-size-400);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.react-spectrum-ListView--spacious .react-spectrum-ListViewItem {
|
|
497
|
+
padding-top: var(--spectrum-listview-item-spacious-padding-y);
|
|
498
|
+
padding-bottom: var(--spectrum-listview-item-spacious-padding-y);
|
|
499
|
+
min-height: var(--spectrum-global-dimension-size-600);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.react-spectrum-ListView--draggable .react-spectrum-ListViewItem {
|
|
503
|
+
padding-inline-start: 0;
|
|
504
|
+
|
|
505
|
+
.react-spectrum-ListViewItem-checkbox {
|
|
506
|
+
input {
|
|
507
|
+
inset-inline-start: 0;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.react-spectrum-ListViewItem--dropTarget {
|
|
513
|
+
background-color: var(--spectrum-alias-highlight-selected);
|
|
514
|
+
box-shadow:
|
|
515
|
+
inset 2px 0 0 0 var(--spectrum-table-cell-border-color-key-focus),
|
|
516
|
+
inset -2px 0 0 0 var(--spectrum-table-cell-border-color-key-focus),
|
|
517
|
+
inset 0 -3px 0 0 var(--spectrum-table-cell-border-color-key-focus),
|
|
518
|
+
inset 0 2px 0 0 var(--spectrum-table-cell-border-color-key-focus);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.react-spectrum-ListView.react-spectrum-ListView--dropTarget {
|
|
522
|
+
border-color: var(--spectrum-global-color-blue-500);
|
|
523
|
+
background-color: var(--spectrum-alias-highlight-selected);
|
|
524
|
+
box-shadow: inset 0 0 0 1px var(--spectrum-table-cell-border-color-key-focus);
|
|
525
|
+
|
|
526
|
+
/* Add border to quiet ListView only when it is a drop target */
|
|
527
|
+
&.react-spectrum-ListView--quiet {
|
|
528
|
+
box-shadow: inset 0 0 0 1px var(--spectrum-table-cell-border-color-key-focus), 0 0 0 1px var(--spectrum-table-cell-border-color-key-focus);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.react-spectrum-ListView-centeredWrapper {
|
|
533
|
+
display: flex;
|
|
534
|
+
align-items: center;
|
|
535
|
+
justify-content: center;
|
|
536
|
+
width: 100%;
|
|
537
|
+
height: 100%;
|
|
538
|
+
&.react-spectrum-ListView-centeredWrapper--loadingMore {
|
|
539
|
+
padding-top: var(--spectrum-global-dimension-size-50);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.react-spectrum-ListViewInsertionIndicator {
|
|
544
|
+
width: calc(100% - (2 * var(--spectrum-dropindicator-circle-size)));
|
|
545
|
+
inset-inline-start: var(--spectrum-dropindicator-circle-size);
|
|
546
|
+
position: absolute;
|
|
547
|
+
outline: none;
|
|
548
|
+
|
|
549
|
+
&.react-spectrum-ListViewInsertionIndicator--dropTarget {
|
|
550
|
+
background: var(--spectrum-dropindicator-border-color);
|
|
551
|
+
border-bottom: 2px solid var(--spectrum-dropindicator-border-color);
|
|
552
|
+
|
|
553
|
+
&:before {
|
|
554
|
+
left: calc(var(--spectrum-dropindicator-circle-size) * -1);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
&:after {
|
|
558
|
+
right: calc(var(--spectrum-dropindicator-circle-size) * -1);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
&:before,
|
|
562
|
+
&:after {
|
|
563
|
+
content: '';
|
|
564
|
+
position: absolute;
|
|
565
|
+
top: calc(var(--spectrum-dropindicator-circle-size) * -1 / 2 + var(--spectrum-dropindicator-border-size) / 2);
|
|
566
|
+
width: var(--spectrum-dropindicator-circle-size);
|
|
567
|
+
height: var(--spectrum-dropindicator-circle-size);
|
|
568
|
+
border-radius: 50%;
|
|
569
|
+
border: var(--spectrum-dropindicator-border-size) solid;
|
|
570
|
+
box-sizing: border-box;
|
|
571
|
+
border-color: var(--spectrum-dropindicator-circle-border-color);
|
|
572
|
+
background-color: var(--spectrum-table-background-color, var(--spectrum-global-color-gray-50));
|
|
573
|
+
z-index: 5;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.react-spectrum-ListViewItem-checkbox--enter {
|
|
579
|
+
opacity: 0.01;
|
|
580
|
+
max-width: 0px;
|
|
581
|
+
}
|
|
582
|
+
.react-spectrum-ListViewItem-checkbox--enterActive {
|
|
583
|
+
opacity: 1;
|
|
584
|
+
max-width: 80px;
|
|
585
|
+
}
|
|
586
|
+
.react-spectrum-ListViewItem-checkbox--exit {
|
|
587
|
+
opacity: 1;
|
|
588
|
+
max-width: 80px;
|
|
589
|
+
}
|
|
590
|
+
.react-spectrum-ListViewItem-checkbox--exitActive {
|
|
591
|
+
opacity: 0.01;
|
|
592
|
+
max-width: 0px;
|
|
593
|
+
}
|