-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Re-export Spectrum components + prop types (#1880)
Re-export most of the React Spectrum components listed in the docs. This excludes * TableView - likely want our grid to replace this at some point * Components we have already wrapped or have components with the same names * Beta components resolves #1852
- Loading branch information
Showing
20 changed files
with
165 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export { | ||
ActionButton, | ||
type SpectrumActionButtonProps as ActionButtonProps, | ||
ActionGroup, | ||
type SpectrumActionGroupProps as ActionGroupProps, | ||
LogicButton, | ||
type SpectrumLogicButtonProps as LogicButtonProps, | ||
ToggleButton, | ||
type SpectrumToggleButtonProps as ToggleButtonProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export { | ||
ActionBar, | ||
type SpectrumActionBarProps as ActionBarProps, | ||
ActionMenu, | ||
type SpectrumActionMenuProps as ActionMenuProps, | ||
ListView, | ||
type SpectrumListViewProps as ListViewProps, | ||
MenuTrigger, | ||
type SpectrumMenuTriggerProps as MenuTriggerProps, | ||
TagGroup, | ||
type SpectrumTagGroupProps as TagGroupProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export { | ||
Avatar, | ||
type SpectrumAvatarProps as AvatarProps, | ||
Content, | ||
type ContentProps, | ||
Divider, | ||
type SpectrumDividerProps as DividerProps, | ||
Footer, | ||
type FooterProps, | ||
Heading, | ||
type HeadingProps, | ||
IllustratedMessage, | ||
type SpectrumIllustratedMessageProps as IllustratedMessageProps, | ||
Image, | ||
type SpectrumImageProps as ImageProps, | ||
Keyboard, | ||
type KeyboardProps, | ||
Text, | ||
type TextProps, | ||
View, | ||
type ViewProps, | ||
Well, | ||
type SpectrumWellProps as WellProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export { | ||
Calendar, | ||
type SpectrumCalendarProps as CalendarProps, | ||
DateField, | ||
type SpectrumDateFieldProps as DateFieldProps, | ||
DatePicker, | ||
type SpectrumDatePickerProps as DatePickerProps, | ||
DateRangePicker, | ||
type SpectrumDateRangePickerProps as DateRangePickerProps, | ||
RangeCalendar, | ||
type SpectrumRangeCalendarProps as RangeCalendarProps, | ||
TimeField, | ||
type SpectrumTimeFieldProps as TimeFieldProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export { | ||
CheckboxGroup, | ||
type SpectrumCheckboxGroupProps as CheckboxGroupProps, | ||
Form, | ||
type SpectrumFormProps as FormProps, | ||
NumberField, | ||
type SpectrumNumberFieldProps as NumberFieldProps, | ||
RangeSlider, | ||
type SpectrumRangeSliderProps as RangeSliderProps, | ||
Slider, | ||
type SpectrumSliderProps as SliderProps, | ||
Switch, | ||
type SpectrumSwitchProps as SwitchProps, | ||
TextArea, | ||
TextField, | ||
type SpectrumTextFieldProps as TextFieldProps, | ||
} from '@adobe/react-spectrum'; | ||
|
||
export { type SpectrumTextAreaProps as TextAreaProps } from '@react-types/textfield'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
export * from './Flex'; | ||
export * from './Item'; | ||
/** | ||
* Re-exporting React Spectrum components + props. | ||
*/ | ||
export * from './buttons'; | ||
export * from './collections'; | ||
export * from './content'; | ||
export * from './dateAndTime'; | ||
export * from './forms'; | ||
export * from './layout'; | ||
export * from './navigation'; | ||
export * from './overlays'; | ||
export * from './pickers'; | ||
export * from './shared'; | ||
export * from './status'; | ||
|
||
/** | ||
* Custom DH components wrapping React Spectrum components. | ||
*/ | ||
export * from './picker'; | ||
export * from './Section'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export { | ||
Flex, | ||
type FlexProps, | ||
Grid, | ||
type GridProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export { | ||
Breadcrumbs, | ||
type SpectrumBreadcrumbsProps as BreadcrumbsProps, | ||
Link, | ||
type SpectrumLinkProps as LinkProps, | ||
TabList, | ||
type SpectrumTabListProps as TabListProps, | ||
TabPanels, | ||
type SpectrumTabPanelsProps as TabPanelsProps, | ||
Tabs, | ||
type SpectrumTabsProps as TabsProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export { | ||
AlertDialog, | ||
type SpectrumAlertDialogProps as AlertDialogProps, | ||
ContextualHelp, | ||
type SpectrumContextualHelpProps as ContextualHelpProps, | ||
Dialog, | ||
type SpectrumDialogProps as DialogProps, | ||
DialogContainer, | ||
type SpectrumDialogContainerProps as DialogContainerProps, | ||
DialogTrigger, | ||
type SpectrumDialogTriggerProps as DialogTriggerProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { | ||
ComboBox, | ||
type SpectrumComboBoxProps as ComboBoxProps, | ||
} from '@adobe/react-spectrum'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Wrapping Spectrum `Item` and `Section` components will break functionality | ||
* due to the way they are consumed by collection components. They are only used | ||
* to pass data and don't render anything on their own, so they don't need to be | ||
* wrapped. If we do ever need to wrap them for whatever reason, the static | ||
* `getCollectionNode` method will need to be implemented. | ||
* See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Item.ts#L17 | ||
* https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/collections/src/Section.ts#L18 | ||
*/ | ||
export { Item, Section } from '@adobe/react-spectrum'; | ||
export type { ItemProps, SectionProps } from '@react-types/shared'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export { | ||
Badge, | ||
type SpectrumBadgeProps as BadgeProps, | ||
InlineAlert, | ||
type SpectrumInlineAlertProps as InlineAlertProps, | ||
LabeledValue, | ||
type SpectrumLabeledValueProps as LabeledValueProps, | ||
Meter, | ||
type SpectrumMeterProps as MeterProps, | ||
ProgressBar, | ||
type SpectrumProgressBarProps as ProgressBarProps, | ||
ProgressCircle, | ||
type SpectrumProgressCircleProps as ProgressCircleProps, | ||
StatusLight, | ||
type SpectrumStatusLightProps as StatusLightProps, | ||
} from '@adobe/react-spectrum'; |