Skip to content

Commit

Permalink
List exports explicitly in index files (#1483)
Browse files Browse the repository at this point in the history
Fixes #1428
  • Loading branch information
benoitgrelard authored Jun 21, 2022
1 parent a53790e commit ea7e5e3
Show file tree
Hide file tree
Showing 58 changed files with 812 additions and 57 deletions.
60 changes: 60 additions & 0 deletions .yarn/versions/25f70c5b.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/core/number/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './number';
export { clamp } from './number';
3 changes: 2 additions & 1 deletion packages/core/popper/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './popper';
export { getPlacementData, SIDE_OPTIONS, ALIGN_OPTIONS } from './popper';
export type { Side, Align } from './popper';
2 changes: 1 addition & 1 deletion packages/core/primitive/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './primitive';
export { composeEventHandlers } from './primitive';
3 changes: 2 additions & 1 deletion packages/core/rect/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './observeElementRect';
export { observeElementRect } from './observeElementRect';
export type { Measurable } from './observeElementRect';
7 changes: 6 additions & 1 deletion packages/react/accessible-icon/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export * from './AccessibleIcon';
export {
AccessibleIcon,
//
Root,
} from './AccessibleIcon';
export type { AccessibleIconProps } from './AccessibleIcon';
24 changes: 23 additions & 1 deletion packages/react/accordion/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
35 changes: 34 additions & 1 deletion packages/react/alert-dialog/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
7 changes: 6 additions & 1 deletion packages/react/announce/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export * from './Announce';
export {
Announce,
//
Root,
} from './Announce';
export type { AnnounceProps } from './Announce';
7 changes: 6 additions & 1 deletion packages/react/arrow/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export * from './Arrow';
export {
Arrow,
//
Root,
} from './Arrow';
export type { ArrowProps } from './Arrow';
7 changes: 6 additions & 1 deletion packages/react/aspect-ratio/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export * from './AspectRatio';
export {
AspectRatio,
//
Root,
} from './AspectRatio';
export type { AspectRatioProps } from './AspectRatio';
13 changes: 12 additions & 1 deletion packages/react/avatar/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
export * from './Avatar';
export {
createAvatarScope,
//
Avatar,
AvatarImage,
AvatarFallback,
//
Root,
Image,
Fallback,
} from './Avatar';
export type { AvatarProps, AvatarImageProps, AvatarFallbackProps } from './Avatar';
11 changes: 10 additions & 1 deletion packages/react/checkbox/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
export * from './Checkbox';
export {
createCheckboxScope,
//
Checkbox,
CheckboxIndicator,
//
Root,
Indicator,
} from './Checkbox';
export type { CheckboxProps, CheckboxIndicatorProps } from './Checkbox';
17 changes: 16 additions & 1 deletion packages/react/collapsible/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
export * from './Collapsible';
export {
createCollapsibleScope,
//
Collapsible,
CollapsibleTrigger,
CollapsibleContent,
//
Root,
Trigger,
Content,
} from './Collapsible';
export type {
CollapsibleProps,
CollapsibleTriggerProps,
CollapsibleContentProps,
} from './Collapsible';
3 changes: 2 additions & 1 deletion packages/react/collection/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Collection';
export { createCollection } from './Collection';
export type { CollectionProps } from './Collection';
2 changes: 1 addition & 1 deletion packages/react/compose-refs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './composeRefs';
export { composeRefs, useComposedRefs } from './composeRefs';
56 changes: 55 additions & 1 deletion packages/react/context-menu/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
3 changes: 2 additions & 1 deletion packages/react/context/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './createContext';
export { createContext, createContextScope } from './createContext';
export type { CreateScope, Scope } from './createContext';
34 changes: 33 additions & 1 deletion packages/react/dialog/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
8 changes: 7 additions & 1 deletion packages/react/direction/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export * from './Direction';
export {
useDirection,
//
Provider,
//
DirectionProvider,
} from './Direction';
9 changes: 8 additions & 1 deletion packages/react/dismissable-layer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export * from './DismissableLayer';
export {
DismissableLayer,
DismissableLayerBranch,
//
Root,
Branch,
} from './DismissableLayer';
export type { DismissableLayerProps } from './DismissableLayer';
56 changes: 55 additions & 1 deletion packages/react/dropdown-menu/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
8 changes: 7 additions & 1 deletion packages/react/focus-guards/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export * from './FocusGuards';
export {
FocusGuards,
//
Root,
//
useFocusGuards,
} from './FocusGuards';
Loading

0 comments on commit ea7e5e3

Please sign in to comment.