-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[WIP] - S2 listview and highlight selection #8878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
snowystinger
wants to merge
19
commits into
main
Choose a base branch
from
s2-listview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,481
−119
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # packages/@react-spectrum/s2/src/TreeView.tsx # packages/@react-spectrum/s2/src/index.ts
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
# Conflicts: # packages/@react-spectrum/s2/src/Picker.tsx # packages/@react-spectrum/s2/src/TableView.tsx
|
Build successful! 🎉 |
## API Changes
react-aria-components/react-aria-components:GridListItemRenderProps GridListItemRenderProps {
allowsDragging?: boolean
isDisabled: boolean
isDragging?: boolean
isDropTarget?: boolean
+ isFirstItem: boolean
isFocusVisible: boolean
isFocused: boolean
isHovered: boolean
+ isLastItem: boolean
+ isNextSelected: boolean
isPressed: boolean
+ isPrevSelected: boolean
isSelected: boolean
selectionBehavior: SelectionBehavior
selectionMode: SelectionMode
}/react-aria-components:RowRenderProps RowRenderProps {
allowsDragging?: boolean
id?: Key
isDisabled: boolean
isDragging?: boolean
isDropTarget?: boolean
isFocusVisible: boolean
isFocusVisibleWithin: boolean
isFocused: boolean
isHovered: boolean
+ isNextSelected: boolean
isPressed: boolean
+ isPreviousSelected: boolean
isSelected: boolean
selectionBehavior: SelectionBehavior
selectionMode: SelectionMode
}/react-aria-components:TreeItemRenderProps TreeItemRenderProps {
allowsDragging?: boolean
hasChildItems: boolean
id: Key
isDisabled: boolean
isDragging?: boolean
isDropTarget?: boolean
isExpanded: boolean
isFocusVisible: boolean
isFocusVisibleWithin: boolean
isFocused: boolean
isHovered: boolean
isPressed: boolean
isSelected: boolean
+ isSelectionDisabled: boolean
level: number
selectionBehavior: SelectionBehavior
selectionMode: SelectionMode
state: TreeState<unknown>/react-aria-components:TreeItemContentRenderProps TreeItemContentRenderProps {
allowsDragging?: boolean
hasChildItems: boolean
id: Key
isDisabled: boolean
isDragging?: boolean
isDropTarget?: boolean
isExpanded: boolean
isFocusVisible: boolean
isFocusVisibleWithin: boolean
isFocused: boolean
isHovered: boolean
isPressed: boolean
isSelected: boolean
+ isSelectionDisabled: boolean
level: number
selectionBehavior: SelectionBehavior
selectionMode: SelectionMode
state: TreeState<unknown>@react-spectrum/s2/@react-spectrum/s2:TableView TableView {
UNSAFE_className?: UnsafeClassName
UNSAFE_style?: CSSProperties
aria-describedby?: string
aria-details?: string
aria-label?: string
aria-labelledby?: string
children?: ReactNode
defaultSelectedKeys?: 'all' | Iterable<Key>
density?: 'compact' | 'spacious' | 'regular' = 'regular'
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
+ isEmphasized?: boolean
isQuiet?: boolean
loadingState?: LoadingState
onAction?: (Key) => void
onLoadMore?: () => any
onResize?: (Map<Key, ColumnSize>) => void
onResizeEnd?: (Map<Key, ColumnSize>) => void
onResizeStart?: (Map<Key, ColumnSize>) => void
onSelectionChange?: (Selection) => void
onSortChange?: (SortDescriptor) => any
overflowMode?: 'wrap' | 'truncate' = 'truncate'
renderActionBar?: ('all' | Set<Key>) => ReactElement
selectedKeys?: 'all' | Iterable<Key>
selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
shouldSelectOnPressUp?: boolean
slot?: string | null
sortDescriptor?: SortDescriptor
styles?: StylesPropWithHeight/@react-spectrum/s2:TreeView TreeView <T extends {}> {
UNSAFE_className?: UnsafeClassName
UNSAFE_style?: CSSProperties
aria-describedby?: string
aria-details?: string
aria-label?: string
aria-labelledby?: string
autoFocus?: boolean | FocusStrategy
children?: ReactNode | (T) => ReactNode
defaultExpandedKeys?: Iterable<Key>
defaultSelectedKeys?: 'all' | Iterable<Key>
dependencies?: ReadonlyArray<any>
disabledBehavior?: DisabledBehavior = 'all'
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
expandedKeys?: Iterable<Key>
id?: string
isDetached?: boolean
isEmphasized?: boolean
items?: Iterable<T>
onAction?: (Key) => void
onExpandedChange?: (Set<Key>) => any
onSelectionChange?: (Selection) => void
renderEmptyState?: (TreeEmptyStateRenderProps) => ReactNode
selectedKeys?: 'all' | Iterable<Key>
+ selectionCornerStyle?: 'square' | 'round'
selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
shouldSelectOnPressUp?: boolean
slot?: string | null
styles?: StylesPropWithHeight
}/@react-spectrum/s2:TableViewProps TableViewProps {
UNSAFE_className?: UnsafeClassName
UNSAFE_style?: CSSProperties
aria-describedby?: string
aria-details?: string
aria-label?: string
aria-labelledby?: string
children?: ReactNode
defaultSelectedKeys?: 'all' | Iterable<Key>
density?: 'compact' | 'spacious' | 'regular' = 'regular'
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
+ isEmphasized?: boolean
isQuiet?: boolean
loadingState?: LoadingState
onAction?: (Key) => void
onLoadMore?: () => any
onResize?: (Map<Key, ColumnSize>) => void
onResizeEnd?: (Map<Key, ColumnSize>) => void
onResizeStart?: (Map<Key, ColumnSize>) => void
onSelectionChange?: (Selection) => void
onSortChange?: (SortDescriptor) => any
overflowMode?: 'wrap' | 'truncate' = 'truncate'
renderActionBar?: ('all' | Set<Key>) => ReactElement
selectedKeys?: 'all' | Iterable<Key>
selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
shouldSelectOnPressUp?: boolean
slot?: string | null
sortDescriptor?: SortDescriptor
styles?: StylesPropWithHeight/@react-spectrum/s2:TreeViewProps TreeViewProps <T> {
UNSAFE_className?: UnsafeClassName
UNSAFE_style?: CSSProperties
aria-describedby?: string
aria-details?: string
aria-label?: string
aria-labelledby?: string
autoFocus?: boolean | FocusStrategy
children?: ReactNode | (T) => ReactNode
defaultExpandedKeys?: Iterable<Key>
defaultSelectedKeys?: 'all' | Iterable<Key>
dependencies?: ReadonlyArray<any>
disabledBehavior?: DisabledBehavior = 'all'
disabledKeys?: Iterable<Key>
disallowEmptySelection?: boolean
escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
expandedKeys?: Iterable<Key>
id?: string
isDetached?: boolean
isEmphasized?: boolean
items?: Iterable<T>
onAction?: (Key) => void
onExpandedChange?: (Set<Key>) => any
onSelectionChange?: (Selection) => void
renderEmptyState?: (TreeEmptyStateRenderProps) => ReactNode
selectedKeys?: 'all' | Iterable<Key>
+ selectionCornerStyle?: 'square' | 'round'
selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
shouldSelectOnPressUp?: boolean
slot?: string | null
styles?: StylesPropWithHeight
}/@react-spectrum/s2:ListView+ListView <T extends {}> {
+ UNSAFE_className?: UnsafeClassName
+ UNSAFE_style?: CSSProperties
+ aria-describedby?: string
+ aria-details?: string
+ aria-label?: string
+ aria-labelledby?: string
+ autoFocus?: boolean
+ children: ReactNode | ({}) => ReactNode
+ defaultSelectedKeys?: 'all' | Iterable<Key>
+ dependencies?: ReadonlyArray<any>
+ disabledBehavior?: DisabledBehavior = "all"
+ disabledKeys?: Iterable<Key>
+ disallowEmptySelection?: boolean
+ disallowTypeAhead?: boolean = false
+ dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>
+ escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
+ highlightMode?: 'normal' | 'inverse'
+ id?: string
+ isEmphasized?: boolean
+ isQuiet?: boolean
+ items?: Iterable<T>
+ keyboardNavigationBehavior?: 'arrow' | 'tab' = 'arrow'
+ layout?: 'stack' | 'grid' = 'stack'
+ onAction?: (Key) => void
+ onSelectionChange?: (Selection) => void
+ renderEmptyState?: (GridListRenderProps) => ReactNode
+ selectedKeys?: 'all' | Iterable<Key>
+ selectionBehavior?: SelectionBehavior = "toggle"
+ selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
+ shouldSelectOnPressUp?: boolean
+ slot?: string | null
+ styles?: StylesPropWithHeight
+}/@react-spectrum/s2:ListViewItem+ListViewItem {
+ UNSAFE_className?: UnsafeClassName
+ UNSAFE_style?: CSSProperties
+ children: ReactNode
+ download?: boolean | string
+ href?: Href
+ hrefLang?: string
+ id?: Key
+ isDisabled?: boolean
+ onAction?: () => void
+ onClick?: (MouseEvent<FocusableElement>) => void
+ onHoverChange?: (boolean) => void
+ onHoverEnd?: (HoverEvent) => void
+ onHoverStart?: (HoverEvent) => void
+ onPress?: (PressEvent) => void
+ onPressChange?: (boolean) => void
+ onPressEnd?: (PressEvent) => void
+ onPressStart?: (PressEvent) => void
+ onPressUp?: (PressEvent) => void
+ ping?: string
+ referrerPolicy?: HTMLAttributeReferrerPolicy
+ rel?: string
+ routerOptions?: RouterOptions
+ styles?: StylesProp
+ target?: HTMLAttributeAnchorTarget
+ textValue?: string
+ value?: T
+}/@react-spectrum/s2:TreeViewContext+TreeViewContext {
+ UNTYPED
+}/@react-spectrum/s2:ListViewProps+ListViewProps <T> {
+ UNSAFE_className?: UnsafeClassName
+ UNSAFE_style?: CSSProperties
+ aria-describedby?: string
+ aria-details?: string
+ aria-label?: string
+ aria-labelledby?: string
+ autoFocus?: boolean
+ children: ReactNode | (T) => ReactNode
+ defaultSelectedKeys?: 'all' | Iterable<Key>
+ dependencies?: ReadonlyArray<any>
+ disabledBehavior?: DisabledBehavior = "all"
+ disabledKeys?: Iterable<Key>
+ disallowEmptySelection?: boolean
+ disallowTypeAhead?: boolean = false
+ dragAndDropHooks?: DragAndDropHooks<NoInfer<T>>
+ escapeKeyBehavior?: 'clearSelection' | 'none' = 'clearSelection'
+ highlightMode?: 'normal' | 'inverse'
+ id?: string
+ isEmphasized?: boolean
+ isQuiet?: boolean
+ items?: Iterable<T>
+ keyboardNavigationBehavior?: 'arrow' | 'tab' = 'arrow'
+ layout?: 'stack' | 'grid' = 'stack'
+ onAction?: (Key) => void
+ onSelectionChange?: (Selection) => void
+ renderEmptyState?: (GridListRenderProps) => ReactNode
+ selectedKeys?: 'all' | Iterable<Key>
+ selectionBehavior?: SelectionBehavior = "toggle"
+ selectionMode?: SelectionMode
+ selectionStyle?: 'highlight' | 'checkbox'
+ shouldSelectOnPressUp?: boolean
+ slot?: string | null
+ styles?: StylesPropWithHeight
+}/@react-spectrum/s2:ListViewItemProps+ListViewItemProps {
+ UNSAFE_className?: UnsafeClassName
+ UNSAFE_style?: CSSProperties
+ children: ReactNode
+ download?: boolean | string
+ href?: Href
+ hrefLang?: string
+ id?: Key
+ isDisabled?: boolean
+ onAction?: () => void
+ onClick?: (MouseEvent<FocusableElement>) => void
+ onHoverChange?: (boolean) => void
+ onHoverEnd?: (HoverEvent) => void
+ onHoverStart?: (HoverEvent) => void
+ onPress?: (PressEvent) => void
+ onPressChange?: (boolean) => void
+ onPressEnd?: (PressEvent) => void
+ onPressStart?: (PressEvent) => void
+ onPressUp?: (PressEvent) => void
+ ping?: string
+ referrerPolicy?: HTMLAttributeReferrerPolicy
+ rel?: string
+ routerOptions?: RouterOptions
+ styles?: StylesProp
+ target?: HTMLAttributeAnchorTarget
+ textValue?: string
+ value?: T
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: