From e92ccd7568db87ed15b828b9e0b4a7de5dababd1 Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:31:52 -0700 Subject: [PATCH] chore: add accordion to monopackage (#7285) * chore: add accordion to monopackage * update package json, update react-aria monopackage * fix version * update yarn.lock --- packages/@adobe/react-spectrum/package.json | 1 + packages/@adobe/react-spectrum/src/index.ts | 2 ++ packages/react-aria/package.json | 2 ++ packages/react-aria/src/index.ts | 4 ++++ yarn.lock | 9 ++++++--- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/@adobe/react-spectrum/package.json b/packages/@adobe/react-spectrum/package.json index b46c7215aa6..a433d949c95 100644 --- a/packages/@adobe/react-spectrum/package.json +++ b/packages/@adobe/react-spectrum/package.json @@ -42,6 +42,7 @@ "@react-aria/ssr": "^3.9.6", "@react-aria/utils": "^3.25.3", "@react-aria/visually-hidden": "^3.8.17", + "@react-spectrum/accordion": "^3.0.0-alpha.35", "@react-spectrum/actionbar": "^3.6.1", "@react-spectrum/actiongroup": "^3.10.9", "@react-spectrum/avatar": "^3.0.16", diff --git a/packages/@adobe/react-spectrum/src/index.ts b/packages/@adobe/react-spectrum/src/index.ts index f66569292a0..c1a90c4a8ec 100644 --- a/packages/@adobe/react-spectrum/src/index.ts +++ b/packages/@adobe/react-spectrum/src/index.ts @@ -17,6 +17,7 @@ import 'client-only'; export {ActionGroup} from '@react-spectrum/actiongroup'; export {Badge} from '@react-spectrum/badge'; export {Breadcrumbs} from '@react-spectrum/breadcrumbs'; +export {Accordion, Disclosure, DisclosurePanel, DisclosureHeader} from '@react-spectrum/accordion'; export {ActionBar, ActionBarContainer} from '@react-spectrum/actionbar'; export {ActionButton, Button, LogicButton, ToggleButton} from '@react-spectrum/button'; export {Avatar} from '@react-spectrum/avatar'; @@ -122,3 +123,4 @@ export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, Locale, export type {SSRProviderProps} from '@react-aria/ssr'; export type {DirectoryDropItem, DragAndDropHooks, DragAndDropOptions, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem} from '@react-spectrum/dnd'; export type {Key, Selection, ItemProps, SectionProps, RouterConfig} from '@react-types/shared'; +export type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureHeaderProps} from '@react-spectrum/accordion'; diff --git a/packages/react-aria/package.json b/packages/react-aria/package.json index 12ac3f0b066..dbb84eb38dd 100644 --- a/packages/react-aria/package.json +++ b/packages/react-aria/package.json @@ -38,6 +38,7 @@ }, "dependencies": { "@internationalized/string": "^3.2.4", + "@react-aria/accordion": "^3.0.0-alpha.35", "@react-aria/breadcrumbs": "^3.5.18", "@react-aria/button": "^3.10.1", "@react-aria/calendar": "^3.5.13", @@ -46,6 +47,7 @@ "@react-aria/combobox": "^3.10.5", "@react-aria/datepicker": "^3.11.4", "@react-aria/dialog": "^3.5.19", + "@react-aria/disclosure": "^3.0.0-alpha.1", "@react-aria/dnd": "^3.7.4", "@react-aria/focus": "^3.18.4", "@react-aria/gridlist": "^3.9.5", diff --git a/packages/react-aria/src/index.ts b/packages/react-aria/src/index.ts index 0a59275fc72..b2c53b5a7b3 100644 --- a/packages/react-aria/src/index.ts +++ b/packages/react-aria/src/index.ts @@ -10,6 +10,7 @@ * governing permissions and limitations under the License. */ +export {useAccordionItem, useAccordion} from '@react-aria/accordion'; export {useBreadcrumbItem, useBreadcrumbs} from '@react-aria/breadcrumbs'; export {useButton, useToggleButton} from '@react-aria/button'; export {useCalendar, useCalendarCell, useCalendarGrid, useRangeCalendar} from '@react-aria/calendar'; @@ -18,6 +19,7 @@ export {useColorArea, useColorChannelField, useColorField, useColorSlider, useCo export {useComboBox} from '@react-aria/combobox'; export {useDateField, useDatePicker, useDateRangePicker, useDateSegment, useTimeField} from '@react-aria/datepicker'; export {useDialog} from '@react-aria/dialog'; +export {useDisclosure} from '@react-aria/disclosure'; export {useDrag, useDrop, useDraggableCollection, useDroppableCollection, useDroppableItem, useDropIndicator, useDraggableItem, useClipboard, DragPreview, ListDropTargetDelegate, DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem} from '@react-aria/dnd'; export {FocusRing, FocusScope, useFocusManager, useFocusRing, useFocusable} from '@react-aria/focus'; export {I18nProvider, useCollator, useDateFormatter, useFilter, useLocale, useLocalizedStringFormatter, useMessageFormatter, useNumberFormatter} from '@react-aria/i18n'; @@ -47,6 +49,7 @@ export {useTooltip, useTooltipTrigger} from '@react-aria/tooltip'; export {chain, mergeProps, useId, useObjectRef, RouterProvider} from '@react-aria/utils'; export {VisuallyHidden, useVisuallyHidden} from '@react-aria/visually-hidden'; +export type {AriaAccordionProps, AccordionAria, AccordionItemAria, AccordionItemAriaProps} from '@react-aria/accordion'; export type {AriaBreadcrumbItemProps, AriaBreadcrumbsProps, BreadcrumbItemAria, BreadcrumbsAria} from '@react-aria/breadcrumbs'; export type {AriaButtonOptions, AriaButtonProps, AriaToggleButtonProps, ButtonAria} from '@react-aria/button'; export type {AriaCalendarCellProps, AriaCalendarGridProps, AriaCalendarProps, AriaRangeCalendarProps, CalendarAria, CalendarCellAria, CalendarGridAria, CalendarProps, RangeCalendarProps} from '@react-aria/calendar'; @@ -55,6 +58,7 @@ export type {AriaColorAreaOptions, AriaColorChannelFieldProps, AriaColorFieldPro export type {AriaComboBoxOptions, AriaComboBoxProps, ComboBoxAria} from '@react-aria/combobox'; export type {AriaDateFieldProps, AriaDatePickerProps, AriaDateRangePickerProps, AriaTimeFieldProps, DateFieldAria, DatePickerAria, DateRangePickerAria, DateSegmentAria, DateRange, DateValue, TimeValue} from '@react-aria/datepicker'; export type {AriaDialogProps, DialogAria} from '@react-aria/dialog'; +export type {DisclosureAria, AriaDisclosureProps} from '@react-aria/disclosure'; export type {AriaFocusRingProps, FocusableAria, FocusableOptions, FocusManager, FocusManagerOptions, FocusRingAria, FocusRingProps, FocusScopeProps} from '@react-aria/focus'; export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, I18nProviderProps, Locale, LocalizedStringFormatter, LocalizedStrings} from '@react-aria/i18n'; export type {ClipboardProps, ClipboardResult, DirectoryDropItem, DragEndEvent, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionOptions, DraggableCollectionStartEvent, DraggableItemProps, DraggableItemResult, DragItem, DragMoveEvent, DragOptions, DragPreviewProps, DragPreviewRenderer, DragResult, DragStartEvent, DragTypes, DropEnterEvent, DropEvent, DropExitEvent, DropIndicatorAria, DropIndicatorProps, DropItem, DropMoveEvent, DropOperation, DropOptions, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionOptions, DroppableCollectionReorderEvent, DroppableCollectionResult, DroppableCollectionRootDropEvent, DroppableItemOptions, DroppableItemResult, DropPosition, DropResult, DropTarget, DropTargetDelegate, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem} from '@react-aria/dnd'; diff --git a/yarn.lock b/yarn.lock index b1098d9f2b8..13e4eb00196 100644 --- a/yarn.lock +++ b/yarn.lock @@ -70,6 +70,7 @@ __metadata: "@react-aria/ssr": "npm:^3.9.6" "@react-aria/utils": "npm:^3.25.3" "@react-aria/visually-hidden": "npm:^3.8.17" + "@react-spectrum/accordion": "npm:^3.0.0-alpha.35" "@react-spectrum/actionbar": "npm:^3.6.1" "@react-spectrum/actiongroup": "npm:^3.10.9" "@react-spectrum/avatar": "npm:^3.0.16" @@ -5626,7 +5627,7 @@ __metadata: languageName: node linkType: hard -"@react-aria/accordion@npm:3.0.0-alpha.35, @react-aria/accordion@workspace:packages/@react-aria/accordion": +"@react-aria/accordion@npm:3.0.0-alpha.35, @react-aria/accordion@npm:^3.0.0-alpha.35, @react-aria/accordion@workspace:packages/@react-aria/accordion": version: 0.0.0-use.local resolution: "@react-aria/accordion@workspace:packages/@react-aria/accordion" dependencies: @@ -5869,7 +5870,7 @@ __metadata: languageName: unknown linkType: soft -"@react-aria/disclosure@npm:3.0.0-alpha.1, @react-aria/disclosure@workspace:packages/@react-aria/disclosure": +"@react-aria/disclosure@npm:3.0.0-alpha.1, @react-aria/disclosure@npm:^3.0.0-alpha.1, @react-aria/disclosure@workspace:packages/@react-aria/disclosure": version: 0.0.0-use.local resolution: "@react-aria/disclosure@workspace:packages/@react-aria/disclosure" dependencies: @@ -6600,7 +6601,7 @@ __metadata: languageName: unknown linkType: soft -"@react-spectrum/accordion@workspace:packages/@react-spectrum/accordion": +"@react-spectrum/accordion@npm:^3.0.0-alpha.35, @react-spectrum/accordion@workspace:packages/@react-spectrum/accordion": version: 0.0.0-use.local resolution: "@react-spectrum/accordion@workspace:packages/@react-spectrum/accordion" dependencies: @@ -29027,6 +29028,7 @@ __metadata: "@babel/cli": "npm:^7.24.1" "@babel/core": "npm:^7.24.3" "@internationalized/string": "npm:^3.2.4" + "@react-aria/accordion": "npm:^3.0.0-alpha.35" "@react-aria/breadcrumbs": "npm:^3.5.18" "@react-aria/button": "npm:^3.10.1" "@react-aria/calendar": "npm:^3.5.13" @@ -29035,6 +29037,7 @@ __metadata: "@react-aria/combobox": "npm:^3.10.5" "@react-aria/datepicker": "npm:^3.11.4" "@react-aria/dialog": "npm:^3.5.19" + "@react-aria/disclosure": "npm:^3.0.0-alpha.1" "@react-aria/dnd": "npm:^3.7.4" "@react-aria/focus": "npm:^3.18.4" "@react-aria/gridlist": "npm:^3.9.5"