@react-spectrum/list 3.7.10-nightly.4623 → 3.7.10
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/DragPreview.main.js +13 -13
- package/dist/DragPreview.mjs +13 -13
- package/dist/DragPreview.module.js +13 -13
- package/dist/InsertionIndicator.main.js +4 -4
- package/dist/InsertionIndicator.mjs +4 -4
- package/dist/InsertionIndicator.module.js +4 -4
- package/dist/ListView.main.js +34 -34
- package/dist/ListView.main.js.map +1 -1
- package/dist/ListView.mjs +32 -32
- package/dist/ListView.module.js +32 -32
- package/dist/ListViewItem.main.js +52 -52
- package/dist/ListViewItem.mjs +52 -52
- package/dist/ListViewItem.module.js +52 -52
- package/dist/RootDropIndicator.main.js +4 -4
- package/dist/RootDropIndicator.mjs +4 -4
- package/dist/RootDropIndicator.module.js +4 -4
- package/package.json +26 -26
package/dist/ListViewItem.mjs
CHANGED
|
@@ -75,7 +75,7 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
75
75
|
let { checkboxProps: checkboxProps } = (0, $asbps$useGridListSelectionCheckbox)({
|
|
76
76
|
key: item.key
|
|
77
77
|
}, state);
|
|
78
|
-
let hasDescription = (0, $asbps$useHasChild)(`.${(0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
78
|
+
let hasDescription = (0, $asbps$useHasChild)(`.${(0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-description']}`, rowRef);
|
|
79
79
|
let draggableItem;
|
|
80
80
|
if (isListDraggable) {
|
|
81
81
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -91,9 +91,9 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
91
91
|
let dropIndicatorRef = (0, $asbps$useRef)();
|
|
92
92
|
if (isListDroppable) {
|
|
93
93
|
let target = {
|
|
94
|
-
type:
|
|
94
|
+
type: 'item',
|
|
95
95
|
key: item.key,
|
|
96
|
-
dropPosition:
|
|
96
|
+
dropPosition: 'on'
|
|
97
97
|
};
|
|
98
98
|
isDropTarget = dropState.isDropTarget(target);
|
|
99
99
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -104,25 +104,25 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
104
104
|
let dragButtonRef = (0, $asbps$react).useRef();
|
|
105
105
|
let { buttonProps: buttonProps } = (0, $asbps$useButton)({
|
|
106
106
|
...draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragButtonProps,
|
|
107
|
-
elementType:
|
|
107
|
+
elementType: 'div'
|
|
108
108
|
}, dragButtonRef);
|
|
109
|
-
let chevron = direction ===
|
|
109
|
+
let chevron = direction === 'ltr' ? /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$spectrumiconsuiChevronRightMedium), {
|
|
110
110
|
"aria-hidden": "true",
|
|
111
|
-
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
112
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
113
|
+
'is-disabled': !hasAction
|
|
114
114
|
})
|
|
115
115
|
}) : /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$spectrumiconsuiChevronLeftMedium), {
|
|
116
116
|
"aria-hidden": "true",
|
|
117
|
-
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
118
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
119
|
+
'is-disabled': !hasAction
|
|
120
120
|
})
|
|
121
121
|
});
|
|
122
|
-
let showCheckbox = state.selectionManager.selectionMode !==
|
|
122
|
+
let showCheckbox = state.selectionManager.selectionMode !== 'none' && state.selectionManager.selectionBehavior === 'toggle';
|
|
123
123
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $asbps$useVisuallyHidden)();
|
|
124
124
|
let dropProps = isDroppable ? droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps : {
|
|
125
|
-
|
|
125
|
+
'aria-hidden': droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps['aria-hidden']
|
|
126
126
|
};
|
|
127
127
|
const mergedProps = (0, $asbps$mergeProps)(rowProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, dropProps, hoverProps, focusWithinProps, focusProps, // Remove tab index from list row if performing a screenreader drag. This prevents TalkBack from focusing the row,
|
|
128
128
|
// allowing for single swipe navigation between row drop indicator
|
|
@@ -135,53 +135,53 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
135
135
|
// border corners of the last row when selected and we can get rid of the bottom border if it isn't selected to avoid border overlap
|
|
136
136
|
// with bottom border
|
|
137
137
|
let isFlushWithContainerBottom = false;
|
|
138
|
-
if (isLastRow && loadingState !==
|
|
138
|
+
if (isLastRow && loadingState !== 'loadingMore') {
|
|
139
139
|
if (((_layout_getContentSize = layout.getContentSize()) === null || _layout_getContentSize === void 0 ? void 0 : _layout_getContentSize.height) >= ((_layout_virtualizer = layout.virtualizer) === null || _layout_virtualizer === void 0 ? void 0 : _layout_virtualizer.getVisibleRect().height)) isFlushWithContainerBottom = true;
|
|
140
140
|
}
|
|
141
141
|
// previous item isn't selected
|
|
142
142
|
// and the previous item isn't focused or, if it is focused, then if focus globally isn't visible or just focus isn't in the listview
|
|
143
143
|
let roundTops = !state.selectionManager.isSelected(item.prevKey) && (state.selectionManager.focusedKey !== item.prevKey || !((0, $asbps$isFocusVisible)() && state.selectionManager.isFocused));
|
|
144
144
|
let roundBottoms = !state.selectionManager.isSelected(item.nextKey) && (state.selectionManager.focusedKey !== item.nextKey || !((0, $asbps$isFocusVisible)() && state.selectionManager.isFocused));
|
|
145
|
-
let content = typeof item.rendered ===
|
|
145
|
+
let content = typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Text), null, item.rendered) : item.rendered;
|
|
146
146
|
if (isDisabled) content = /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Provider), {
|
|
147
147
|
isDisabled: true
|
|
148
148
|
}, content);
|
|
149
149
|
return /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
150
150
|
...mergedProps,
|
|
151
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListView-row', {
|
|
152
|
+
'focus-ring': isFocusVisible,
|
|
153
|
+
'round-tops': roundTops || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key,
|
|
154
|
+
'round-bottoms': roundBottoms || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key
|
|
155
155
|
}),
|
|
156
156
|
ref: rowRef
|
|
157
157
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
158
158
|
// TODO: refactor the css here now that we are focusing the row?
|
|
159
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem', {
|
|
160
|
+
'is-active': isPressed,
|
|
161
|
+
'is-focused': isFocusVisibleWithin,
|
|
162
|
+
'focus-ring': isFocusVisible,
|
|
163
|
+
'is-hovered': isHovered,
|
|
164
|
+
'is-selected': isSelected,
|
|
165
|
+
'is-disabled': isDisabled,
|
|
166
|
+
'is-prev-selected': state.selectionManager.isSelected(item.prevKey),
|
|
167
|
+
'is-next-selected': state.selectionManager.isSelected(item.nextKey),
|
|
168
|
+
'react-spectrum-ListViewItem--highlightSelection': state.selectionManager.selectionBehavior === 'replace' && (isSelected || state.selectionManager.isSelected(item.nextKey)),
|
|
169
|
+
'react-spectrum-ListViewItem--dropTarget': !!isDropTarget,
|
|
170
|
+
'react-spectrum-ListViewItem--firstRow': isFirstRow,
|
|
171
|
+
'react-spectrum-ListViewItem--lastRow': isLastRow,
|
|
172
|
+
'react-spectrum-ListViewItem--isFlushBottom': isFlushWithContainerBottom,
|
|
173
|
+
'react-spectrum-ListViewItem--hasDescription': hasDescription
|
|
174
174
|
}),
|
|
175
175
|
...gridCellProps
|
|
176
176
|
}, /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Grid), {
|
|
177
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
177
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-grid']
|
|
178
178
|
}, isListDraggable && /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
179
|
-
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
179
|
+
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-draghandle-container']
|
|
180
180
|
}, !isDisabled && /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$FocusRing), {
|
|
181
|
-
focusRingClass: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
181
|
+
focusRingClass: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'focus-ring')
|
|
182
182
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
183
183
|
...buttonProps,
|
|
184
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
184
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-draghandle-button'),
|
|
185
185
|
style: !isFocusVisibleWithin ? {
|
|
186
186
|
...visuallyHiddenProps.style
|
|
187
187
|
} : {},
|
|
@@ -196,46 +196,46 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
196
196
|
in: showCheckbox,
|
|
197
197
|
unmountOnExit: true,
|
|
198
198
|
classNames: {
|
|
199
|
-
enter: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
200
|
-
enterActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
201
|
-
exit: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
202
|
-
exitActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
199
|
+
enter: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--enter'],
|
|
200
|
+
enterActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--enterActive'],
|
|
201
|
+
exit: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--exit'],
|
|
202
|
+
exitActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--exitActive']
|
|
203
203
|
},
|
|
204
204
|
timeout: 160,
|
|
205
205
|
nodeRef: checkboxWrapperRef
|
|
206
206
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
207
207
|
ref: checkboxWrapperRef,
|
|
208
|
-
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
208
|
+
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkboxWrapper']
|
|
209
209
|
}, /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Checkbox), {
|
|
210
210
|
...checkboxProps,
|
|
211
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
211
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox'],
|
|
212
212
|
isEmphasized: isEmphasized
|
|
213
213
|
}))), /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$SlotProvider), {
|
|
214
214
|
slots: {
|
|
215
215
|
text: {
|
|
216
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
216
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-content']
|
|
217
217
|
},
|
|
218
218
|
description: {
|
|
219
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
219
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-description'],
|
|
220
220
|
...descriptionProps
|
|
221
221
|
},
|
|
222
222
|
illustration: {
|
|
223
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
223
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
224
224
|
},
|
|
225
225
|
image: {
|
|
226
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
226
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
227
227
|
},
|
|
228
228
|
actionButton: {
|
|
229
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
229
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
230
230
|
isQuiet: true
|
|
231
231
|
},
|
|
232
232
|
actionGroup: {
|
|
233
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
233
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
234
234
|
isQuiet: true,
|
|
235
|
-
density:
|
|
235
|
+
density: 'compact'
|
|
236
236
|
},
|
|
237
237
|
actionMenu: {
|
|
238
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
238
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actionmenu'],
|
|
239
239
|
isQuiet: true
|
|
240
240
|
}
|
|
241
241
|
}
|
|
@@ -75,7 +75,7 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
75
75
|
let { checkboxProps: checkboxProps } = (0, $asbps$useGridListSelectionCheckbox)({
|
|
76
76
|
key: item.key
|
|
77
77
|
}, state);
|
|
78
|
-
let hasDescription = (0, $asbps$useHasChild)(`.${(0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
78
|
+
let hasDescription = (0, $asbps$useHasChild)(`.${(0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-description']}`, rowRef);
|
|
79
79
|
let draggableItem;
|
|
80
80
|
if (isListDraggable) {
|
|
81
81
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -91,9 +91,9 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
91
91
|
let dropIndicatorRef = (0, $asbps$useRef)();
|
|
92
92
|
if (isListDroppable) {
|
|
93
93
|
let target = {
|
|
94
|
-
type:
|
|
94
|
+
type: 'item',
|
|
95
95
|
key: item.key,
|
|
96
|
-
dropPosition:
|
|
96
|
+
dropPosition: 'on'
|
|
97
97
|
};
|
|
98
98
|
isDropTarget = dropState.isDropTarget(target);
|
|
99
99
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -104,25 +104,25 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
104
104
|
let dragButtonRef = (0, $asbps$react).useRef();
|
|
105
105
|
let { buttonProps: buttonProps } = (0, $asbps$useButton)({
|
|
106
106
|
...draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragButtonProps,
|
|
107
|
-
elementType:
|
|
107
|
+
elementType: 'div'
|
|
108
108
|
}, dragButtonRef);
|
|
109
|
-
let chevron = direction ===
|
|
109
|
+
let chevron = direction === 'ltr' ? /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$spectrumiconsuiChevronRightMedium), {
|
|
110
110
|
"aria-hidden": "true",
|
|
111
|
-
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
112
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
113
|
+
'is-disabled': !hasAction
|
|
114
114
|
})
|
|
115
115
|
}) : /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$spectrumiconsuiChevronLeftMedium), {
|
|
116
116
|
"aria-hidden": "true",
|
|
117
|
-
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
UNSAFE_className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
118
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
119
|
+
'is-disabled': !hasAction
|
|
120
120
|
})
|
|
121
121
|
});
|
|
122
|
-
let showCheckbox = state.selectionManager.selectionMode !==
|
|
122
|
+
let showCheckbox = state.selectionManager.selectionMode !== 'none' && state.selectionManager.selectionBehavior === 'toggle';
|
|
123
123
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $asbps$useVisuallyHidden)();
|
|
124
124
|
let dropProps = isDroppable ? droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps : {
|
|
125
|
-
|
|
125
|
+
'aria-hidden': droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps['aria-hidden']
|
|
126
126
|
};
|
|
127
127
|
const mergedProps = (0, $asbps$mergeProps)(rowProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, dropProps, hoverProps, focusWithinProps, focusProps, // Remove tab index from list row if performing a screenreader drag. This prevents TalkBack from focusing the row,
|
|
128
128
|
// allowing for single swipe navigation between row drop indicator
|
|
@@ -135,53 +135,53 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
135
135
|
// border corners of the last row when selected and we can get rid of the bottom border if it isn't selected to avoid border overlap
|
|
136
136
|
// with bottom border
|
|
137
137
|
let isFlushWithContainerBottom = false;
|
|
138
|
-
if (isLastRow && loadingState !==
|
|
138
|
+
if (isLastRow && loadingState !== 'loadingMore') {
|
|
139
139
|
if (((_layout_getContentSize = layout.getContentSize()) === null || _layout_getContentSize === void 0 ? void 0 : _layout_getContentSize.height) >= ((_layout_virtualizer = layout.virtualizer) === null || _layout_virtualizer === void 0 ? void 0 : _layout_virtualizer.getVisibleRect().height)) isFlushWithContainerBottom = true;
|
|
140
140
|
}
|
|
141
141
|
// previous item isn't selected
|
|
142
142
|
// and the previous item isn't focused or, if it is focused, then if focus globally isn't visible or just focus isn't in the listview
|
|
143
143
|
let roundTops = !state.selectionManager.isSelected(item.prevKey) && (state.selectionManager.focusedKey !== item.prevKey || !((0, $asbps$isFocusVisible)() && state.selectionManager.isFocused));
|
|
144
144
|
let roundBottoms = !state.selectionManager.isSelected(item.nextKey) && (state.selectionManager.focusedKey !== item.nextKey || !((0, $asbps$isFocusVisible)() && state.selectionManager.isFocused));
|
|
145
|
-
let content = typeof item.rendered ===
|
|
145
|
+
let content = typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Text), null, item.rendered) : item.rendered;
|
|
146
146
|
if (isDisabled) content = /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Provider), {
|
|
147
147
|
isDisabled: true
|
|
148
148
|
}, content);
|
|
149
149
|
return /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
150
150
|
...mergedProps,
|
|
151
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListView-row', {
|
|
152
|
+
'focus-ring': isFocusVisible,
|
|
153
|
+
'round-tops': roundTops || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key,
|
|
154
|
+
'round-bottoms': roundBottoms || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key
|
|
155
155
|
}),
|
|
156
156
|
ref: rowRef
|
|
157
157
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
158
158
|
// TODO: refactor the css here now that we are focusing the row?
|
|
159
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem', {
|
|
160
|
+
'is-active': isPressed,
|
|
161
|
+
'is-focused': isFocusVisibleWithin,
|
|
162
|
+
'focus-ring': isFocusVisible,
|
|
163
|
+
'is-hovered': isHovered,
|
|
164
|
+
'is-selected': isSelected,
|
|
165
|
+
'is-disabled': isDisabled,
|
|
166
|
+
'is-prev-selected': state.selectionManager.isSelected(item.prevKey),
|
|
167
|
+
'is-next-selected': state.selectionManager.isSelected(item.nextKey),
|
|
168
|
+
'react-spectrum-ListViewItem--highlightSelection': state.selectionManager.selectionBehavior === 'replace' && (isSelected || state.selectionManager.isSelected(item.nextKey)),
|
|
169
|
+
'react-spectrum-ListViewItem--dropTarget': !!isDropTarget,
|
|
170
|
+
'react-spectrum-ListViewItem--firstRow': isFirstRow,
|
|
171
|
+
'react-spectrum-ListViewItem--lastRow': isLastRow,
|
|
172
|
+
'react-spectrum-ListViewItem--isFlushBottom': isFlushWithContainerBottom,
|
|
173
|
+
'react-spectrum-ListViewItem--hasDescription': hasDescription
|
|
174
174
|
}),
|
|
175
175
|
...gridCellProps
|
|
176
176
|
}, /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Grid), {
|
|
177
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
177
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-grid']
|
|
178
178
|
}, isListDraggable && /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
179
|
-
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
179
|
+
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-draghandle-container']
|
|
180
180
|
}, !isDisabled && /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$FocusRing), {
|
|
181
|
-
focusRingClass: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
181
|
+
focusRingClass: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'focus-ring')
|
|
182
182
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
183
183
|
...buttonProps,
|
|
184
|
-
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))),
|
|
184
|
+
className: (0, $asbps$classNames)((0, ($parcel$interopDefault($asbps$styles_cssmodulejs))), 'react-spectrum-ListViewItem-draghandle-button'),
|
|
185
185
|
style: !isFocusVisibleWithin ? {
|
|
186
186
|
...visuallyHiddenProps.style
|
|
187
187
|
} : {},
|
|
@@ -196,46 +196,46 @@ function $d7c07ca2efc5ba02$export$c6bde0c04b033c0e(props) {
|
|
|
196
196
|
in: showCheckbox,
|
|
197
197
|
unmountOnExit: true,
|
|
198
198
|
classNames: {
|
|
199
|
-
enter: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
200
|
-
enterActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
201
|
-
exit: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
202
|
-
exitActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
199
|
+
enter: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--enter'],
|
|
200
|
+
enterActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--enterActive'],
|
|
201
|
+
exit: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--exit'],
|
|
202
|
+
exitActive: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox--exitActive']
|
|
203
203
|
},
|
|
204
204
|
timeout: 160,
|
|
205
205
|
nodeRef: checkboxWrapperRef
|
|
206
206
|
}, /*#__PURE__*/ (0, $asbps$react).createElement("div", {
|
|
207
207
|
ref: checkboxWrapperRef,
|
|
208
|
-
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
208
|
+
className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkboxWrapper']
|
|
209
209
|
}, /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$Checkbox), {
|
|
210
210
|
...checkboxProps,
|
|
211
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
211
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-checkbox'],
|
|
212
212
|
isEmphasized: isEmphasized
|
|
213
213
|
}))), /*#__PURE__*/ (0, $asbps$react).createElement((0, $asbps$SlotProvider), {
|
|
214
214
|
slots: {
|
|
215
215
|
text: {
|
|
216
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
216
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-content']
|
|
217
217
|
},
|
|
218
218
|
description: {
|
|
219
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
219
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-description'],
|
|
220
220
|
...descriptionProps
|
|
221
221
|
},
|
|
222
222
|
illustration: {
|
|
223
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
223
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
224
224
|
},
|
|
225
225
|
image: {
|
|
226
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
226
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-thumbnail']
|
|
227
227
|
},
|
|
228
228
|
actionButton: {
|
|
229
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
229
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
230
230
|
isQuiet: true
|
|
231
231
|
},
|
|
232
232
|
actionGroup: {
|
|
233
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
233
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actions'],
|
|
234
234
|
isQuiet: true,
|
|
235
|
-
density:
|
|
235
|
+
density: 'compact'
|
|
236
236
|
},
|
|
237
237
|
actionMenu: {
|
|
238
|
-
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))[
|
|
238
|
+
UNSAFE_className: (0, ($parcel$interopDefault($asbps$styles_cssmodulejs)))['react-spectrum-ListViewItem-actionmenu'],
|
|
239
239
|
isQuiet: true
|
|
240
240
|
}
|
|
241
241
|
}
|
|
@@ -20,17 +20,17 @@ function $c59d3898f402f50b$export$2e2bcd8739ae039() {
|
|
|
20
20
|
let ref = (0, $63sFO$react.useRef)();
|
|
21
21
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
22
22
|
target: {
|
|
23
|
-
type:
|
|
23
|
+
type: 'root'
|
|
24
24
|
}
|
|
25
25
|
}, dropState, ref);
|
|
26
26
|
let isDropTarget = dropState.isDropTarget({
|
|
27
|
-
type:
|
|
27
|
+
type: 'root'
|
|
28
28
|
});
|
|
29
29
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $63sFO$reactariavisuallyhidden.useVisuallyHidden)();
|
|
30
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
30
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
31
31
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($63sFO$react))).createElement("div", {
|
|
32
32
|
role: "row",
|
|
33
|
-
"aria-hidden": dropIndicatorProps[
|
|
33
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
34
34
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($63sFO$react))).createElement("div", {
|
|
35
35
|
role: "gridcell",
|
|
36
36
|
"aria-selected": "false"
|
|
@@ -10,17 +10,17 @@ function $41a60729487a82d7$export$2e2bcd8739ae039() {
|
|
|
10
10
|
let ref = (0, $jzbuT$useRef)();
|
|
11
11
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
12
12
|
target: {
|
|
13
|
-
type:
|
|
13
|
+
type: 'root'
|
|
14
14
|
}
|
|
15
15
|
}, dropState, ref);
|
|
16
16
|
let isDropTarget = dropState.isDropTarget({
|
|
17
|
-
type:
|
|
17
|
+
type: 'root'
|
|
18
18
|
});
|
|
19
19
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $jzbuT$useVisuallyHidden)();
|
|
20
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
20
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
21
21
|
return /*#__PURE__*/ (0, $jzbuT$react).createElement("div", {
|
|
22
22
|
role: "row",
|
|
23
|
-
"aria-hidden": dropIndicatorProps[
|
|
23
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
24
24
|
}, /*#__PURE__*/ (0, $jzbuT$react).createElement("div", {
|
|
25
25
|
role: "gridcell",
|
|
26
26
|
"aria-selected": "false"
|
|
@@ -10,17 +10,17 @@ function $41a60729487a82d7$export$2e2bcd8739ae039() {
|
|
|
10
10
|
let ref = (0, $jzbuT$useRef)();
|
|
11
11
|
let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
|
|
12
12
|
target: {
|
|
13
|
-
type:
|
|
13
|
+
type: 'root'
|
|
14
14
|
}
|
|
15
15
|
}, dropState, ref);
|
|
16
16
|
let isDropTarget = dropState.isDropTarget({
|
|
17
|
-
type:
|
|
17
|
+
type: 'root'
|
|
18
18
|
});
|
|
19
19
|
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $jzbuT$useVisuallyHidden)();
|
|
20
|
-
if (!isDropTarget && dropIndicatorProps[
|
|
20
|
+
if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
|
|
21
21
|
return /*#__PURE__*/ (0, $jzbuT$react).createElement("div", {
|
|
22
22
|
role: "row",
|
|
23
|
-
"aria-hidden": dropIndicatorProps[
|
|
23
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
24
24
|
}, /*#__PURE__*/ (0, $jzbuT$react).createElement("div", {
|
|
25
25
|
role: "gridcell",
|
|
26
26
|
"aria-selected": "false"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/list",
|
|
3
|
-
"version": "3.7.10
|
|
3
|
+
"version": "3.7.10",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,34 +36,34 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "3.
|
|
40
|
-
"@react-aria/focus": "3.
|
|
41
|
-
"@react-aria/gridlist": "3.8.1
|
|
42
|
-
"@react-aria/i18n": "3.
|
|
43
|
-
"@react-aria/interactions": "3.
|
|
44
|
-
"@react-aria/utils": "3.
|
|
45
|
-
"@react-aria/virtualizer": "3.10.1
|
|
46
|
-
"@react-aria/visually-hidden": "3.
|
|
47
|
-
"@react-spectrum/checkbox": "3.
|
|
48
|
-
"@react-spectrum/dnd": "3.3.10
|
|
49
|
-
"@react-spectrum/layout": "3.6.5
|
|
50
|
-
"@react-spectrum/progress": "3.
|
|
51
|
-
"@react-spectrum/text": "3.5.5
|
|
52
|
-
"@react-spectrum/utils": "3.
|
|
53
|
-
"@react-stately/collections": "3.
|
|
54
|
-
"@react-stately/layout": "3.13.9
|
|
55
|
-
"@react-stately/list": "3.10.5
|
|
56
|
-
"@react-types/grid": "3.2.6
|
|
57
|
-
"@react-types/shared": "3.
|
|
58
|
-
"@spectrum-icons/ui": "3.
|
|
39
|
+
"@react-aria/button": "^3.9.5",
|
|
40
|
+
"@react-aria/focus": "^3.17.1",
|
|
41
|
+
"@react-aria/gridlist": "^3.8.1",
|
|
42
|
+
"@react-aria/i18n": "^3.11.1",
|
|
43
|
+
"@react-aria/interactions": "^3.21.3",
|
|
44
|
+
"@react-aria/utils": "^3.24.1",
|
|
45
|
+
"@react-aria/virtualizer": "^3.10.1",
|
|
46
|
+
"@react-aria/visually-hidden": "^3.8.12",
|
|
47
|
+
"@react-spectrum/checkbox": "^3.9.6",
|
|
48
|
+
"@react-spectrum/dnd": "^3.3.10",
|
|
49
|
+
"@react-spectrum/layout": "^3.6.5",
|
|
50
|
+
"@react-spectrum/progress": "^3.7.7",
|
|
51
|
+
"@react-spectrum/text": "^3.5.5",
|
|
52
|
+
"@react-spectrum/utils": "^3.11.7",
|
|
53
|
+
"@react-stately/collections": "^3.10.7",
|
|
54
|
+
"@react-stately/layout": "^3.13.9",
|
|
55
|
+
"@react-stately/list": "^3.10.5",
|
|
56
|
+
"@react-types/grid": "^3.2.6",
|
|
57
|
+
"@react-types/shared": "^3.23.1",
|
|
58
|
+
"@spectrum-icons/ui": "^3.6.7",
|
|
59
59
|
"@swc/helpers": "^0.5.0",
|
|
60
60
|
"react-transition-group": "^4.4.5"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@adobe/spectrum-css-temp": "3.0.0-
|
|
64
|
-
"@react-aria/dnd": "3.
|
|
65
|
-
"@react-spectrum/button": "3.
|
|
66
|
-
"@react-stately/dnd": "3.
|
|
63
|
+
"@adobe/spectrum-css-temp": "^3.0.0-alpha.1",
|
|
64
|
+
"@react-aria/dnd": "^3.0.0",
|
|
65
|
+
"@react-spectrum/button": "^3.8.1",
|
|
66
|
+
"@react-stately/dnd": "^3.0.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@react-spectrum/provider": "^3.2.0",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
77
77
|
}
|