Skip to content

Commit e3ed3c7

Browse files
authored
feat: S2 treeview (#7343)
* Render a TreeView * Correct styles * update styles to better fix s2 * fix install * fix lint, add preliminary test * fix lint * Add tests and test util * save point * Add emptyState * fix lint * detached styles * detached styling with actions * fix disabled, icon placement, and add examples * fix lint * update snapshots * fix lint and tests * fix imports * Match row selection to table * fix lint, again * feat: S2 treeview virtualized (#7465) * feature: s2 treeview virtualization * support both detached and non in the layout * fix lint * fix height for docs * default tree disabled behavior to all to match our other components * fix tests * update snapshots * fix lint * fix alignment and remove minwidth * increase gap between detached items * remove restriction for isDetached and isEmphasized * fix border radius * review comments * fix lint
1 parent beb8bd5 commit e3ed3c7

File tree

14 files changed

+1030
-56
lines changed

14 files changed

+1030
-56
lines changed

packages/@react-spectrum/s2/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
"@react-aria/i18n": "^3.12.5",
134134
"@react-aria/interactions": "^3.23.0",
135135
"@react-aria/live-announcer": "^3.4.1",
136+
"@react-aria/tree": "3.0.0-beta.3",
136137
"@react-aria/utils": "^3.27.0",
137138
"@react-spectrum/utils": "^3.12.1",
138139
"@react-stately/layout": "^4.1.1",

packages/@react-spectrum/s2/src/Menu.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
SubmenuTrigger as AriaSubmenuTrigger,
2323
SubmenuTriggerProps as AriaSubmenuTriggerProps,
2424
ContextValue,
25+
DEFAULT_SLOT,
2526
Provider,
2627
Separator,
2728
SeparatorProps
@@ -490,6 +491,7 @@ export function MenuItem(props: MenuItemProps) {
490491
}],
491492
[TextContext, {
492493
slots: {
494+
[DEFAULT_SLOT]: {styles: label({size})},
493495
label: {styles: label({size})},
494496
description: {styles: description({...renderProps, size})},
495497
value: {styles: value}

0 commit comments

Comments
 (0)