From ea7e5e3f24bca5b059df80f54f2cd8535090c99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Gr=C3=A9lard?= Date: Tue, 21 Jun 2022 12:00:59 +0100 Subject: [PATCH] List exports explicitly in index files (#1483) Fixes #1428 --- .yarn/versions/25f70c5b.yml | 60 +++++++++++++++++++ packages/core/number/src/index.ts | 2 +- packages/core/popper/src/index.ts | 3 +- packages/core/primitive/src/index.ts | 2 +- packages/core/rect/src/index.ts | 3 +- packages/react/accessible-icon/src/index.ts | 7 ++- packages/react/accordion/src/index.ts | 24 +++++++- packages/react/alert-dialog/src/index.ts | 35 ++++++++++- packages/react/announce/src/index.ts | 7 ++- packages/react/arrow/src/index.ts | 7 ++- packages/react/aspect-ratio/src/index.ts | 7 ++- packages/react/avatar/src/index.ts | 13 +++- packages/react/checkbox/src/index.ts | 11 +++- packages/react/collapsible/src/index.ts | 17 +++++- packages/react/collection/src/index.ts | 3 +- packages/react/compose-refs/src/index.ts | 2 +- packages/react/context-menu/src/index.ts | 56 ++++++++++++++++- packages/react/context/src/index.ts | 3 +- packages/react/dialog/src/index.ts | 34 ++++++++++- packages/react/direction/src/index.ts | 8 ++- packages/react/dismissable-layer/src/index.ts | 9 ++- packages/react/dropdown-menu/src/index.ts | 56 ++++++++++++++++- packages/react/focus-guards/src/index.ts | 8 ++- packages/react/focus-scope/src/index.ts | 7 ++- packages/react/hover-card/src/index.ts | 23 ++++++- packages/react/id/src/index.ts | 2 +- packages/react/label/src/index.ts | 9 ++- packages/react/menu/src/index.ts | 56 ++++++++++++++++- .../navigation-menu/src/NavigationMenu.tsx | 1 - packages/react/navigation-menu/src/index.ts | 35 ++++++++++- packages/react/popover/src/index.ts | 29 ++++++++- packages/react/popper/src/index.ts | 20 ++++++- packages/react/portal/src/index.ts | 7 ++- packages/react/presence/src/index.ts | 3 +- packages/react/primitive/src/index.ts | 9 ++- packages/react/progress/src/index.ts | 11 +++- packages/react/radio-group/src/index.ts | 13 +++- packages/react/roving-focus/src/index.ts | 11 +++- packages/react/scroll-area/src/index.ts | 23 ++++++- packages/react/select/src/index.ts | 53 +++++++++++++++- packages/react/separator/src/index.ts | 7 ++- packages/react/slider/src/index.ts | 15 ++++- packages/react/slot/src/index.ts | 8 ++- packages/react/switch/src/index.ts | 11 +++- packages/react/tabs/src/index.ts | 15 ++++- packages/react/toast/src/index.ts | 29 ++++++++- packages/react/toggle-group/src/index.ts | 15 ++++- packages/react/toggle/src/index.ts | 7 ++- packages/react/toolbar/src/index.ts | 27 ++++++++- packages/react/tooltip/src/index.ts | 25 +++++++- packages/react/use-callback-ref/src/index.ts | 2 +- .../react/use-controllable-state/src/index.ts | 2 +- .../react/use-escape-keydown/src/index.ts | 2 +- packages/react/use-layout-effect/src/index.ts | 2 +- packages/react/use-previous/src/index.ts | 2 +- packages/react/use-rect/src/index.ts | 2 +- packages/react/use-size/src/index.ts | 2 +- packages/react/visually-hidden/src/index.ts | 7 ++- 58 files changed, 812 insertions(+), 57 deletions(-) create mode 100644 .yarn/versions/25f70c5b.yml diff --git a/.yarn/versions/25f70c5b.yml b/.yarn/versions/25f70c5b.yml new file mode 100644 index 0000000000..0e7772b93f --- /dev/null +++ b/.yarn/versions/25f70c5b.yml @@ -0,0 +1,60 @@ +releases: + "@radix-ui/number": patch + "@radix-ui/popper": patch + "@radix-ui/primitive": patch + "@radix-ui/react-accessible-icon": patch + "@radix-ui/react-accordion": patch + "@radix-ui/react-alert-dialog": patch + "@radix-ui/react-announce": patch + "@radix-ui/react-arrow": patch + "@radix-ui/react-aspect-ratio": patch + "@radix-ui/react-avatar": patch + "@radix-ui/react-checkbox": patch + "@radix-ui/react-collapsible": patch + "@radix-ui/react-collection": patch + "@radix-ui/react-compose-refs": patch + "@radix-ui/react-context": patch + "@radix-ui/react-context-menu": patch + "@radix-ui/react-dialog": patch + "@radix-ui/react-direction": patch + "@radix-ui/react-dismissable-layer": patch + "@radix-ui/react-dropdown-menu": patch + "@radix-ui/react-focus-guards": patch + "@radix-ui/react-focus-scope": patch + "@radix-ui/react-hover-card": patch + "@radix-ui/react-id": patch + "@radix-ui/react-label": patch + "@radix-ui/react-menu": patch + "@radix-ui/react-navigation-menu": patch + "@radix-ui/react-popover": patch + "@radix-ui/react-popper": patch + "@radix-ui/react-portal": patch + "@radix-ui/react-presence": patch + "@radix-ui/react-primitive": patch + "@radix-ui/react-progress": patch + "@radix-ui/react-radio-group": patch + "@radix-ui/react-roving-focus": patch + "@radix-ui/react-scroll-area": patch + "@radix-ui/react-select": patch + "@radix-ui/react-separator": patch + "@radix-ui/react-slider": patch + "@radix-ui/react-slot": patch + "@radix-ui/react-switch": patch + "@radix-ui/react-tabs": patch + "@radix-ui/react-toast": patch + "@radix-ui/react-toggle": patch + "@radix-ui/react-toggle-group": patch + "@radix-ui/react-toolbar": patch + "@radix-ui/react-tooltip": patch + "@radix-ui/react-use-callback-ref": patch + "@radix-ui/react-use-controllable-state": patch + "@radix-ui/react-use-escape-keydown": patch + "@radix-ui/react-use-layout-effect": patch + "@radix-ui/react-use-previous": patch + "@radix-ui/react-use-rect": patch + "@radix-ui/react-use-size": patch + "@radix-ui/react-visually-hidden": patch + "@radix-ui/rect": patch + +declined: + - primitives diff --git a/packages/core/number/src/index.ts b/packages/core/number/src/index.ts index 3238b292cb..63f9c21568 100644 --- a/packages/core/number/src/index.ts +++ b/packages/core/number/src/index.ts @@ -1 +1 @@ -export * from './number'; +export { clamp } from './number'; diff --git a/packages/core/popper/src/index.ts b/packages/core/popper/src/index.ts index 1929454b18..ca1d1680ee 100644 --- a/packages/core/popper/src/index.ts +++ b/packages/core/popper/src/index.ts @@ -1 +1,2 @@ -export * from './popper'; +export { getPlacementData, SIDE_OPTIONS, ALIGN_OPTIONS } from './popper'; +export type { Side, Align } from './popper'; diff --git a/packages/core/primitive/src/index.ts b/packages/core/primitive/src/index.ts index b82573e29f..edd754dec2 100644 --- a/packages/core/primitive/src/index.ts +++ b/packages/core/primitive/src/index.ts @@ -1 +1 @@ -export * from './primitive'; +export { composeEventHandlers } from './primitive'; diff --git a/packages/core/rect/src/index.ts b/packages/core/rect/src/index.ts index eaca5db331..1e0df24139 100644 --- a/packages/core/rect/src/index.ts +++ b/packages/core/rect/src/index.ts @@ -1 +1,2 @@ -export * from './observeElementRect'; +export { observeElementRect } from './observeElementRect'; +export type { Measurable } from './observeElementRect'; diff --git a/packages/react/accessible-icon/src/index.ts b/packages/react/accessible-icon/src/index.ts index 43ff608253..ae90d387c8 100644 --- a/packages/react/accessible-icon/src/index.ts +++ b/packages/react/accessible-icon/src/index.ts @@ -1 +1,6 @@ -export * from './AccessibleIcon'; +export { + AccessibleIcon, + // + Root, +} from './AccessibleIcon'; +export type { AccessibleIconProps } from './AccessibleIcon'; diff --git a/packages/react/accordion/src/index.ts b/packages/react/accordion/src/index.ts index 63f62bc659..21d76c77ac 100644 --- a/packages/react/accordion/src/index.ts +++ b/packages/react/accordion/src/index.ts @@ -1 +1,23 @@ -export * from './Accordion'; +export { + createAccordionScope, + // + Accordion, + AccordionItem, + AccordionHeader, + AccordionTrigger, + AccordionContent, + // + Root, + Item, + Header, + Trigger, + Content, +} from './Accordion'; +export type { + AccordionSingleProps, + AccordionMultipleProps, + AccordionItemProps, + AccordionHeaderProps, + AccordionTriggerProps, + AccordionContentProps, +} from './Accordion'; diff --git a/packages/react/alert-dialog/src/index.ts b/packages/react/alert-dialog/src/index.ts index 76a8200459..8c9eab7e32 100644 --- a/packages/react/alert-dialog/src/index.ts +++ b/packages/react/alert-dialog/src/index.ts @@ -1 +1,34 @@ -export * from './AlertDialog'; +export { + createAlertDialogScope, + // + AlertDialog, + AlertDialogTrigger, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogContent, + AlertDialogAction, + AlertDialogCancel, + AlertDialogTitle, + AlertDialogDescription, + // + Root, + Trigger, + Portal, + Overlay, + Content, + Action, + Cancel, + Title, + Description, +} from './AlertDialog'; +export type { + AlertDialogProps, + AlertDialogTriggerProps, + AlertDialogPortalProps, + AlertDialogOverlayProps, + AlertDialogContentProps, + AlertDialogActionProps, + AlertDialogCancelProps, + AlertDialogTitleProps, + AlertDialogDescriptionProps, +} from './AlertDialog'; diff --git a/packages/react/announce/src/index.ts b/packages/react/announce/src/index.ts index afedcf38ef..64cc48f731 100644 --- a/packages/react/announce/src/index.ts +++ b/packages/react/announce/src/index.ts @@ -1 +1,6 @@ -export * from './Announce'; +export { + Announce, + // + Root, +} from './Announce'; +export type { AnnounceProps } from './Announce'; diff --git a/packages/react/arrow/src/index.ts b/packages/react/arrow/src/index.ts index 28c9aef176..8ecd1cb32c 100644 --- a/packages/react/arrow/src/index.ts +++ b/packages/react/arrow/src/index.ts @@ -1 +1,6 @@ -export * from './Arrow'; +export { + Arrow, + // + Root, +} from './Arrow'; +export type { ArrowProps } from './Arrow'; diff --git a/packages/react/aspect-ratio/src/index.ts b/packages/react/aspect-ratio/src/index.ts index 487b034c39..e59f27c3aa 100644 --- a/packages/react/aspect-ratio/src/index.ts +++ b/packages/react/aspect-ratio/src/index.ts @@ -1 +1,6 @@ -export * from './AspectRatio'; +export { + AspectRatio, + // + Root, +} from './AspectRatio'; +export type { AspectRatioProps } from './AspectRatio'; diff --git a/packages/react/avatar/src/index.ts b/packages/react/avatar/src/index.ts index 27700fe3f3..22a6d8b1b7 100644 --- a/packages/react/avatar/src/index.ts +++ b/packages/react/avatar/src/index.ts @@ -1 +1,12 @@ -export * from './Avatar'; +export { + createAvatarScope, + // + Avatar, + AvatarImage, + AvatarFallback, + // + Root, + Image, + Fallback, +} from './Avatar'; +export type { AvatarProps, AvatarImageProps, AvatarFallbackProps } from './Avatar'; diff --git a/packages/react/checkbox/src/index.ts b/packages/react/checkbox/src/index.ts index f5c939faf4..1ff2e64b74 100644 --- a/packages/react/checkbox/src/index.ts +++ b/packages/react/checkbox/src/index.ts @@ -1 +1,10 @@ -export * from './Checkbox'; +export { + createCheckboxScope, + // + Checkbox, + CheckboxIndicator, + // + Root, + Indicator, +} from './Checkbox'; +export type { CheckboxProps, CheckboxIndicatorProps } from './Checkbox'; diff --git a/packages/react/collapsible/src/index.ts b/packages/react/collapsible/src/index.ts index 870f572291..7a4df678fd 100644 --- a/packages/react/collapsible/src/index.ts +++ b/packages/react/collapsible/src/index.ts @@ -1 +1,16 @@ -export * from './Collapsible'; +export { + createCollapsibleScope, + // + Collapsible, + CollapsibleTrigger, + CollapsibleContent, + // + Root, + Trigger, + Content, +} from './Collapsible'; +export type { + CollapsibleProps, + CollapsibleTriggerProps, + CollapsibleContentProps, +} from './Collapsible'; diff --git a/packages/react/collection/src/index.ts b/packages/react/collection/src/index.ts index 11e99ee3cb..f4981a1906 100644 --- a/packages/react/collection/src/index.ts +++ b/packages/react/collection/src/index.ts @@ -1 +1,2 @@ -export * from './Collection'; +export { createCollection } from './Collection'; +export type { CollectionProps } from './Collection'; diff --git a/packages/react/compose-refs/src/index.ts b/packages/react/compose-refs/src/index.ts index 74aa492bc3..ce3a86e40b 100644 --- a/packages/react/compose-refs/src/index.ts +++ b/packages/react/compose-refs/src/index.ts @@ -1 +1 @@ -export * from './composeRefs'; +export { composeRefs, useComposedRefs } from './composeRefs'; diff --git a/packages/react/context-menu/src/index.ts b/packages/react/context-menu/src/index.ts index 0839b04d7e..aa7b898a3e 100644 --- a/packages/react/context-menu/src/index.ts +++ b/packages/react/context-menu/src/index.ts @@ -1 +1,55 @@ -export * from './ContextMenu'; +export { + createContextMenuScope, + // + ContextMenu, + ContextMenuTrigger, + ContextMenuPortal, + ContextMenuContent, + ContextMenuGroup, + ContextMenuLabel, + ContextMenuItem, + ContextMenuCheckboxItem, + ContextMenuRadioGroup, + ContextMenuRadioItem, + ContextMenuItemIndicator, + ContextMenuSeparator, + ContextMenuArrow, + ContextMenuSub, + ContextMenuSubTrigger, + ContextMenuSubContent, + // + Root, + Trigger, + Portal, + Content, + Group, + Label, + Item, + CheckboxItem, + RadioGroup, + RadioItem, + ItemIndicator, + Separator, + Arrow, + Sub, + SubTrigger, + SubContent, +} from './ContextMenu'; +export type { + ContextMenuProps, + ContextMenuTriggerProps, + ContextMenuPortalProps, + ContextMenuContentProps, + ContextMenuGroupProps, + ContextMenuLabelProps, + ContextMenuItemProps, + ContextMenuCheckboxItemProps, + ContextMenuRadioGroupProps, + ContextMenuRadioItemProps, + ContextMenuItemIndicatorProps, + ContextMenuSeparatorProps, + ContextMenuArrowProps, + ContextMenuSubProps, + ContextMenuSubTriggerProps, + ContextMenuSubContentProps, +} from './ContextMenu'; diff --git a/packages/react/context/src/index.ts b/packages/react/context/src/index.ts index 0856fbddf9..426177eed0 100644 --- a/packages/react/context/src/index.ts +++ b/packages/react/context/src/index.ts @@ -1 +1,2 @@ -export * from './createContext'; +export { createContext, createContextScope } from './createContext'; +export type { CreateScope, Scope } from './createContext'; diff --git a/packages/react/dialog/src/index.ts b/packages/react/dialog/src/index.ts index a5d3159726..ba4e95447a 100644 --- a/packages/react/dialog/src/index.ts +++ b/packages/react/dialog/src/index.ts @@ -1 +1,33 @@ -export * from './Dialog'; +export { + createDialogScope, + // + Dialog, + DialogTrigger, + DialogPortal, + DialogOverlay, + DialogContent, + DialogTitle, + DialogDescription, + DialogClose, + // + Root, + Trigger, + Portal, + Overlay, + Content, + Title, + Description, + Close, + // + WarningProvider, +} from './Dialog'; +export type { + DialogProps, + DialogTriggerProps, + DialogPortalProps, + DialogOverlayProps, + DialogContentProps, + DialogTitleProps, + DialogDescriptionProps, + DialogCloseProps, +} from './Dialog'; diff --git a/packages/react/direction/src/index.ts b/packages/react/direction/src/index.ts index dfb682c5ad..89ab6a3127 100644 --- a/packages/react/direction/src/index.ts +++ b/packages/react/direction/src/index.ts @@ -1 +1,7 @@ -export * from './Direction'; +export { + useDirection, + // + Provider, + // + DirectionProvider, +} from './Direction'; diff --git a/packages/react/dismissable-layer/src/index.ts b/packages/react/dismissable-layer/src/index.ts index d2c49f9e15..88eb2be10f 100644 --- a/packages/react/dismissable-layer/src/index.ts +++ b/packages/react/dismissable-layer/src/index.ts @@ -1 +1,8 @@ -export * from './DismissableLayer'; +export { + DismissableLayer, + DismissableLayerBranch, + // + Root, + Branch, +} from './DismissableLayer'; +export type { DismissableLayerProps } from './DismissableLayer'; diff --git a/packages/react/dropdown-menu/src/index.ts b/packages/react/dropdown-menu/src/index.ts index 8aadf2fa5f..0ccbed560f 100644 --- a/packages/react/dropdown-menu/src/index.ts +++ b/packages/react/dropdown-menu/src/index.ts @@ -1 +1,55 @@ -export * from './DropdownMenu'; +export { + createDropdownMenuScope, + // + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuPortal, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuLabel, + DropdownMenuItem, + DropdownMenuCheckboxItem, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuItemIndicator, + DropdownMenuSeparator, + DropdownMenuArrow, + DropdownMenuSub, + DropdownMenuSubTrigger, + DropdownMenuSubContent, + // + Root, + Trigger, + Portal, + Content, + Group, + Label, + Item, + CheckboxItem, + RadioGroup, + RadioItem, + ItemIndicator, + Separator, + Arrow, + Sub, + SubTrigger, + SubContent, +} from './DropdownMenu'; +export type { + DropdownMenuProps, + DropdownMenuTriggerProps, + DropdownMenuPortalProps, + DropdownMenuContentProps, + DropdownMenuGroupProps, + DropdownMenuLabelProps, + DropdownMenuItemProps, + DropdownMenuCheckboxItemProps, + DropdownMenuRadioGroupProps, + DropdownMenuRadioItemProps, + DropdownMenuItemIndicatorProps, + DropdownMenuSeparatorProps, + DropdownMenuArrowProps, + DropdownMenuSubProps, + DropdownMenuSubTriggerProps, + DropdownMenuSubContentProps, +} from './DropdownMenu'; diff --git a/packages/react/focus-guards/src/index.ts b/packages/react/focus-guards/src/index.ts index ce5e3f85db..37679122e8 100644 --- a/packages/react/focus-guards/src/index.ts +++ b/packages/react/focus-guards/src/index.ts @@ -1 +1,7 @@ -export * from './FocusGuards'; +export { + FocusGuards, + // + Root, + // + useFocusGuards, +} from './FocusGuards'; diff --git a/packages/react/focus-scope/src/index.ts b/packages/react/focus-scope/src/index.ts index ee4f01571d..5bd3a43b3a 100644 --- a/packages/react/focus-scope/src/index.ts +++ b/packages/react/focus-scope/src/index.ts @@ -1 +1,6 @@ -export * from './FocusScope'; +export { + FocusScope, + // + Root, +} from './FocusScope'; +export type { FocusScopeProps } from './FocusScope'; diff --git a/packages/react/hover-card/src/index.ts b/packages/react/hover-card/src/index.ts index 476d287650..ab02bf023b 100644 --- a/packages/react/hover-card/src/index.ts +++ b/packages/react/hover-card/src/index.ts @@ -1 +1,22 @@ -export * from './HoverCard'; +export { + createHoverCardScope, + // + HoverCard, + HoverCardTrigger, + HoverCardPortal, + HoverCardContent, + HoverCardArrow, + // + Root, + Trigger, + Portal, + Content, + Arrow, +} from './HoverCard'; +export type { + HoverCardProps, + HoverCardTriggerProps, + HoverCardPortalProps, + HoverCardContentProps, + HoverCardArrowProps, +} from './HoverCard'; diff --git a/packages/react/id/src/index.ts b/packages/react/id/src/index.ts index 116cb6c06f..c9cf13bd72 100644 --- a/packages/react/id/src/index.ts +++ b/packages/react/id/src/index.ts @@ -1 +1 @@ -export * from './id'; +export { IdProvider, useId } from './id'; diff --git a/packages/react/label/src/index.ts b/packages/react/label/src/index.ts index ca58c61a25..674523fb56 100644 --- a/packages/react/label/src/index.ts +++ b/packages/react/label/src/index.ts @@ -1 +1,8 @@ -export * from './Label'; +export { + Label, + // + Root, + // + useLabelContext, +} from './Label'; +export type { LabelProps } from './Label'; diff --git a/packages/react/menu/src/index.ts b/packages/react/menu/src/index.ts index 629d3d0aa1..7a9ab885e8 100644 --- a/packages/react/menu/src/index.ts +++ b/packages/react/menu/src/index.ts @@ -1 +1,55 @@ -export * from './Menu'; +export { + createMenuScope, + // + Menu, + MenuAnchor, + MenuPortal, + MenuContent, + MenuGroup, + MenuLabel, + MenuItem, + MenuCheckboxItem, + MenuRadioGroup, + MenuRadioItem, + MenuItemIndicator, + MenuSeparator, + MenuArrow, + MenuSub, + MenuSubTrigger, + MenuSubContent, + // + Root, + Anchor, + Portal, + Content, + Group, + Label, + Item, + CheckboxItem, + RadioGroup, + RadioItem, + ItemIndicator, + Separator, + Arrow, + Sub, + SubTrigger, + SubContent, +} from './Menu'; +export type { + MenuProps, + MenuAnchorProps, + MenuPortalProps, + MenuContentProps, + MenuGroupProps, + MenuLabelProps, + MenuItemProps, + MenuCheckboxItemProps, + MenuRadioGroupProps, + MenuRadioItemProps, + MenuItemIndicatorProps, + MenuSeparatorProps, + MenuArrowProps, + MenuSubProps, + MenuSubTriggerProps, + MenuSubContentProps, +} from './Menu'; diff --git a/packages/react/navigation-menu/src/NavigationMenu.tsx b/packages/react/navigation-menu/src/NavigationMenu.tsx index 8f4d579606..a4849a4583 100644 --- a/packages/react/navigation-menu/src/NavigationMenu.tsx +++ b/packages/react/navigation-menu/src/NavigationMenu.tsx @@ -1171,7 +1171,6 @@ export { Content, Viewport, }; - export type { NavigationMenuProps, NavigationMenuSubProps, diff --git a/packages/react/navigation-menu/src/index.ts b/packages/react/navigation-menu/src/index.ts index 3c7aa8831c..638468ae52 100644 --- a/packages/react/navigation-menu/src/index.ts +++ b/packages/react/navigation-menu/src/index.ts @@ -1 +1,34 @@ -export * from './NavigationMenu'; +export { + createNavigationMenuScope, + // + NavigationMenu, + NavigationMenuSub, + NavigationMenuList, + NavigationMenuItem, + NavigationMenuTrigger, + NavigationMenuLink, + NavigationMenuIndicator, + NavigationMenuContent, + NavigationMenuViewport, + // + Root, + Sub, + List, + Item, + Trigger, + Link, + Indicator, + Content, + Viewport, +} from './NavigationMenu'; +export type { + NavigationMenuProps, + NavigationMenuSubProps, + NavigationMenuListProps, + NavigationMenuItemProps, + NavigationMenuTriggerProps, + NavigationMenuLinkProps, + NavigationMenuIndicatorProps, + NavigationMenuContentProps, + NavigationMenuViewportProps, +} from './NavigationMenu'; diff --git a/packages/react/popover/src/index.ts b/packages/react/popover/src/index.ts index 8f473de4b9..e365e9910d 100644 --- a/packages/react/popover/src/index.ts +++ b/packages/react/popover/src/index.ts @@ -1 +1,28 @@ -export * from './Popover'; +export { + createPopoverScope, + // + Popover, + PopoverAnchor, + PopoverTrigger, + PopoverPortal, + PopoverContent, + PopoverClose, + PopoverArrow, + // + Root, + Anchor, + Trigger, + Portal, + Content, + Close, + Arrow, +} from './Popover'; +export type { + PopoverProps, + PopoverAnchorProps, + PopoverTriggerProps, + PopoverPortalProps, + PopoverContentProps, + PopoverCloseProps, + PopoverArrowProps, +} from './Popover'; diff --git a/packages/react/popper/src/index.ts b/packages/react/popper/src/index.ts index 86443d1e3b..860a974ca1 100644 --- a/packages/react/popper/src/index.ts +++ b/packages/react/popper/src/index.ts @@ -1 +1,19 @@ -export * from './Popper'; +export { + createPopperScope, + // + Popper, + PopperAnchor, + PopperContent, + PopperArrow, + // + Root, + Anchor, + Content, + Arrow, +} from './Popper'; +export type { + PopperProps, + PopperAnchorProps, + PopperContentProps, + PopperArrowProps, +} from './Popper'; diff --git a/packages/react/portal/src/index.ts b/packages/react/portal/src/index.ts index 73d42c80c4..d69622f688 100644 --- a/packages/react/portal/src/index.ts +++ b/packages/react/portal/src/index.ts @@ -1 +1,6 @@ -export * from './Portal'; +export { + Portal, + // + Root, +} from './Portal'; +export type { PortalProps } from './Portal'; diff --git a/packages/react/presence/src/index.ts b/packages/react/presence/src/index.ts index 88fcdf78b5..63a93b76ba 100644 --- a/packages/react/presence/src/index.ts +++ b/packages/react/presence/src/index.ts @@ -1 +1,2 @@ -export * from './Presence'; +export { Presence } from './Presence'; +export type { PresenceProps } from './Presence'; diff --git a/packages/react/primitive/src/index.ts b/packages/react/primitive/src/index.ts index 2b1567c9db..0c1ff5077f 100644 --- a/packages/react/primitive/src/index.ts +++ b/packages/react/primitive/src/index.ts @@ -1 +1,8 @@ -export * from './Primitive'; +export { + Primitive, + // + Root, + // + dispatchDiscreteCustomEvent, +} from './Primitive'; +export type { ComponentPropsWithoutRef, PrimitivePropsWithRef } from './Primitive'; diff --git a/packages/react/progress/src/index.ts b/packages/react/progress/src/index.ts index 1803677d94..99a5c978c0 100644 --- a/packages/react/progress/src/index.ts +++ b/packages/react/progress/src/index.ts @@ -1 +1,10 @@ -export * from './Progress'; +export { + createProgressScope, + // + Progress, + ProgressIndicator, + // + Root, + Indicator, +} from './Progress'; +export type { ProgressProps, ProgressIndicatorProps } from './Progress'; diff --git a/packages/react/radio-group/src/index.ts b/packages/react/radio-group/src/index.ts index ad083eb488..2bdd29e804 100644 --- a/packages/react/radio-group/src/index.ts +++ b/packages/react/radio-group/src/index.ts @@ -1 +1,12 @@ -export * from './RadioGroup'; +export { + createRadioGroupScope, + // + RadioGroup, + RadioGroupItem, + RadioGroupIndicator, + // + Root, + Item, + Indicator, +} from './RadioGroup'; +export type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps } from './RadioGroup'; diff --git a/packages/react/roving-focus/src/index.ts b/packages/react/roving-focus/src/index.ts index a3b1937930..2b1cba2764 100644 --- a/packages/react/roving-focus/src/index.ts +++ b/packages/react/roving-focus/src/index.ts @@ -1 +1,10 @@ -export * from './RovingFocusGroup'; +export { + createRovingFocusGroupScope, + // + RovingFocusGroup, + RovingFocusGroupItem, + // + Root, + Item, +} from './RovingFocusGroup'; +export type { RovingFocusGroupProps, RovingFocusItemProps } from './RovingFocusGroup'; diff --git a/packages/react/scroll-area/src/index.ts b/packages/react/scroll-area/src/index.ts index 4ab76e5c94..0e73b98153 100644 --- a/packages/react/scroll-area/src/index.ts +++ b/packages/react/scroll-area/src/index.ts @@ -1 +1,22 @@ -export * from './ScrollArea'; +export { + createScrollAreaScope, + // + ScrollArea, + ScrollAreaViewport, + ScrollAreaScrollbar, + ScrollAreaThumb, + ScrollAreaCorner, + // + Root, + Viewport, + Scrollbar, + Thumb, + Corner, +} from './ScrollArea'; +export type { + ScrollAreaProps, + ScrollAreaViewportProps, + ScrollAreaScrollbarProps, + ScrollAreaThumbProps, + ScrollAreaCornerProps, +} from './ScrollArea'; diff --git a/packages/react/select/src/index.ts b/packages/react/select/src/index.ts index 7868ecbae2..db7e6a41cc 100644 --- a/packages/react/select/src/index.ts +++ b/packages/react/select/src/index.ts @@ -1 +1,52 @@ -export * from './Select'; +export { + createSelectScope, + // + Select, + SelectTrigger, + SelectValue, + SelectIcon, + SelectPortal, + SelectContent, + SelectViewport, + SelectGroup, + SelectLabel, + SelectItem, + SelectItemText, + SelectItemIndicator, + SelectScrollUpButton, + SelectScrollDownButton, + SelectSeparator, + // + Root, + Trigger, + Value, + Icon, + Portal, + Content, + Viewport, + Group, + Label, + Item, + ItemText, + ItemIndicator, + ScrollUpButton, + ScrollDownButton, + Separator, +} from './Select'; +export type { + SelectProps, + SelectTriggerProps, + SelectValueProps, + SelectIconProps, + SelectPortalProps, + SelectContentProps, + SelectViewportProps, + SelectGroupProps, + SelectLabelProps, + SelectItemProps, + SelectItemTextProps, + SelectItemIndicatorProps, + SelectScrollUpButtonProps, + SelectScrollDownButtonProps, + SelectSeparatorProps, +} from './Select'; diff --git a/packages/react/separator/src/index.ts b/packages/react/separator/src/index.ts index 6e97479974..36b15ec13d 100644 --- a/packages/react/separator/src/index.ts +++ b/packages/react/separator/src/index.ts @@ -1 +1,6 @@ -export * from './Separator'; +export { + Separator, + // + Root, +} from './Separator'; +export type { SeparatorProps } from './Separator'; diff --git a/packages/react/slider/src/index.ts b/packages/react/slider/src/index.ts index f48a854158..2139226d01 100644 --- a/packages/react/slider/src/index.ts +++ b/packages/react/slider/src/index.ts @@ -1 +1,14 @@ -export * from './Slider'; +export { + createSliderScope, + // + Slider, + SliderTrack, + SliderRange, + SliderThumb, + // + Root, + Track, + Range, + Thumb, +} from './Slider'; +export type { SliderProps, SliderTrackProps, SliderRangeProps, SliderThumbProps } from './Slider'; diff --git a/packages/react/slot/src/index.ts b/packages/react/slot/src/index.ts index 41835581cd..13a40843ac 100644 --- a/packages/react/slot/src/index.ts +++ b/packages/react/slot/src/index.ts @@ -1 +1,7 @@ -export * from './Slot'; +export { + Slot, + Slottable, + // + Root, +} from './Slot'; +export type { SlotProps } from './Slot'; diff --git a/packages/react/switch/src/index.ts b/packages/react/switch/src/index.ts index 1b19c1d39c..e665d8641e 100644 --- a/packages/react/switch/src/index.ts +++ b/packages/react/switch/src/index.ts @@ -1 +1,10 @@ -export * from './Switch'; +export { + createSwitchScope, + // + Switch, + SwitchThumb, + // + Root, + Thumb, +} from './Switch'; +export type { SwitchProps, SwitchThumbProps } from './Switch'; diff --git a/packages/react/tabs/src/index.ts b/packages/react/tabs/src/index.ts index 856dbbb347..8bef435b3a 100644 --- a/packages/react/tabs/src/index.ts +++ b/packages/react/tabs/src/index.ts @@ -1 +1,14 @@ -export * from './Tabs'; +export { + createTabsScope, + // + Tabs, + TabsList, + TabsTrigger, + TabsContent, + // + Root, + List, + Trigger, + Content, +} from './Tabs'; +export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps } from './Tabs'; diff --git a/packages/react/toast/src/index.ts b/packages/react/toast/src/index.ts index 1b794ee786..3821c489fb 100644 --- a/packages/react/toast/src/index.ts +++ b/packages/react/toast/src/index.ts @@ -1 +1,28 @@ -export * from './Toast'; +export { + createToastScope, + // + ToastProvider, + ToastViewport, + Toast, + ToastTitle, + ToastDescription, + ToastAction, + ToastClose, + // + Provider, + Viewport, + Root, + Title, + Description, + Action, + Close, +} from './Toast'; +export type { + ToastProviderProps, + ToastViewportProps, + ToastProps, + ToastTitleProps, + ToastDescriptionProps, + ToastActionProps, + ToastCloseProps, +} from './Toast'; diff --git a/packages/react/toggle-group/src/index.ts b/packages/react/toggle-group/src/index.ts index bc2db3c72e..46b8c75a56 100644 --- a/packages/react/toggle-group/src/index.ts +++ b/packages/react/toggle-group/src/index.ts @@ -1 +1,14 @@ -export * from './ToggleGroup'; +export { + createToggleGroupScope, + // + ToggleGroup, + ToggleGroupItem, + // + Root, + Item, +} from './ToggleGroup'; +export type { + ToggleGroupSingleProps, + ToggleGroupMultipleProps, + ToggleGroupItemProps, +} from './ToggleGroup'; diff --git a/packages/react/toggle/src/index.ts b/packages/react/toggle/src/index.ts index 7aaab1d76e..7e98c54e15 100644 --- a/packages/react/toggle/src/index.ts +++ b/packages/react/toggle/src/index.ts @@ -1 +1,6 @@ -export * from './Toggle'; +export { + Toggle, + // + Root, +} from './Toggle'; +export type { ToggleProps } from './Toggle'; diff --git a/packages/react/toolbar/src/index.ts b/packages/react/toolbar/src/index.ts index 7c6430332b..8a9b7c55a7 100644 --- a/packages/react/toolbar/src/index.ts +++ b/packages/react/toolbar/src/index.ts @@ -1 +1,26 @@ -export * from './Toolbar'; +export { + createToolbarScope, + // + Toolbar, + ToolbarSeparator, + ToolbarButton, + ToolbarLink, + ToolbarToggleGroup, + ToolbarToggleItem, + // + Root, + Separator, + Button, + Link, + ToggleGroup, + ToggleItem, +} from './Toolbar'; +export type { + ToolbarProps, + ToolbarSeparatorProps, + ToolbarButtonProps, + ToolbarLinkProps, + ToolbarToggleGroupSingleProps, + ToolbarToggleGroupMultipleProps, + ToolbarToggleItemProps, +} from './Toolbar'; diff --git a/packages/react/tooltip/src/index.ts b/packages/react/tooltip/src/index.ts index 7594a8f06c..21c9550ccc 100644 --- a/packages/react/tooltip/src/index.ts +++ b/packages/react/tooltip/src/index.ts @@ -1 +1,24 @@ -export * from './Tooltip'; +export { + createTooltipScope, + // + TooltipProvider, + Tooltip, + TooltipTrigger, + TooltipPortal, + TooltipContent, + TooltipArrow, + // + Provider, + Root, + Trigger, + Portal, + Content, + Arrow, +} from './Tooltip'; +export type { + TooltipProps, + TooltipTriggerProps, + TooltipPortalProps, + TooltipContentProps, + TooltipArrowProps, +} from './Tooltip'; diff --git a/packages/react/use-callback-ref/src/index.ts b/packages/react/use-callback-ref/src/index.ts index fc1c52148a..16eab509f5 100644 --- a/packages/react/use-callback-ref/src/index.ts +++ b/packages/react/use-callback-ref/src/index.ts @@ -1 +1 @@ -export * from './useCallbackRef'; +export { useCallbackRef } from './useCallbackRef'; diff --git a/packages/react/use-controllable-state/src/index.ts b/packages/react/use-controllable-state/src/index.ts index d9789d18f7..1781d4af31 100644 --- a/packages/react/use-controllable-state/src/index.ts +++ b/packages/react/use-controllable-state/src/index.ts @@ -1 +1 @@ -export * from './useControllableState'; +export { useControllableState } from './useControllableState'; diff --git a/packages/react/use-escape-keydown/src/index.ts b/packages/react/use-escape-keydown/src/index.ts index ed270fd74d..28dc4e514a 100644 --- a/packages/react/use-escape-keydown/src/index.ts +++ b/packages/react/use-escape-keydown/src/index.ts @@ -1 +1 @@ -export * from './useEscapeKeydown'; +export { useEscapeKeydown } from './useEscapeKeydown'; diff --git a/packages/react/use-layout-effect/src/index.ts b/packages/react/use-layout-effect/src/index.ts index c3c77f9272..f52617bd6c 100644 --- a/packages/react/use-layout-effect/src/index.ts +++ b/packages/react/use-layout-effect/src/index.ts @@ -1 +1 @@ -export * from './useLayoutEffect'; +export { useLayoutEffect } from './useLayoutEffect'; diff --git a/packages/react/use-previous/src/index.ts b/packages/react/use-previous/src/index.ts index 3a29340b4e..72c4c0b6f6 100644 --- a/packages/react/use-previous/src/index.ts +++ b/packages/react/use-previous/src/index.ts @@ -1 +1 @@ -export * from './usePrevious'; +export { usePrevious } from './usePrevious'; diff --git a/packages/react/use-rect/src/index.ts b/packages/react/use-rect/src/index.ts index b9ead4117a..ba4227e6e3 100644 --- a/packages/react/use-rect/src/index.ts +++ b/packages/react/use-rect/src/index.ts @@ -1 +1 @@ -export * from './useRect'; +export { useRect } from './useRect'; diff --git a/packages/react/use-size/src/index.ts b/packages/react/use-size/src/index.ts index e33952355e..2a07f20ecf 100644 --- a/packages/react/use-size/src/index.ts +++ b/packages/react/use-size/src/index.ts @@ -1 +1 @@ -export * from './useSize'; +export { useSize } from './useSize'; diff --git a/packages/react/visually-hidden/src/index.ts b/packages/react/visually-hidden/src/index.ts index f11f3f421b..fa2ef1e831 100644 --- a/packages/react/visually-hidden/src/index.ts +++ b/packages/react/visually-hidden/src/index.ts @@ -1 +1,6 @@ -export * from './VisuallyHidden'; +export { + VisuallyHidden, + // + Root, +} from './VisuallyHidden'; +export type { VisuallyHiddenProps } from './VisuallyHidden';