diff --git a/UNRELEASED.md b/UNRELEASED.md
index 023cfe018af..b4ee38c35bb 100644
--- a/UNRELEASED.md
+++ b/UNRELEASED.md
@@ -15,5 +15,6 @@
### Code quality
- Converted `/tests/build.test.js` to TypeScript ([#2617](https://github.com/Shopify/polaris-react/pull/2617))
+- Use `export *` to rexport component content in component indexs and subcomponent listings ([#2625](https://github.com/Shopify/polaris-react/pull/2625))
### Deprecations
diff --git a/src/components/AccountConnection/index.ts b/src/components/AccountConnection/index.ts
index 864745032b4..1e2b0e3adfa 100644
--- a/src/components/AccountConnection/index.ts
+++ b/src/components/AccountConnection/index.ts
@@ -1 +1 @@
-export {AccountConnection, AccountConnectionProps} from './AccountConnection';
+export * from './AccountConnection';
diff --git a/src/components/ActionList/components/Item/index.ts b/src/components/ActionList/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/ActionList/components/Item/index.ts
+++ b/src/components/ActionList/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/ActionList/components/Section/index.ts b/src/components/ActionList/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/ActionList/components/Section/index.ts
+++ b/src/components/ActionList/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/ActionList/components/index.ts b/src/components/ActionList/components/index.ts
index 029ec98e8df..1f6e50145f3 100644
--- a/src/components/ActionList/components/index.ts
+++ b/src/components/ActionList/components/index.ts
@@ -1,3 +1,3 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/ActionList/index.ts b/src/components/ActionList/index.ts
index 28da31ede9b..cb756037c18 100644
--- a/src/components/ActionList/index.ts
+++ b/src/components/ActionList/index.ts
@@ -1 +1 @@
-export {ActionList, ActionListProps} from './ActionList';
+export * from './ActionList';
diff --git a/src/components/ActionMenu/ActionMenu.tsx b/src/components/ActionMenu/ActionMenu.tsx
index 8c78276f0ef..33b2c06d103 100644
--- a/src/components/ActionMenu/ActionMenu.tsx
+++ b/src/components/ActionMenu/ActionMenu.tsx
@@ -106,7 +106,7 @@ export function hasGroupsWithActions(groups: ActionMenuProps['groups'] = []) {
: groups.some((group) => group.actions.length > 0);
}
-export function convertGroupToSection({
+function convertGroupToSection({
title,
actions,
}: MenuGroupDescriptor): ActionListSection {
diff --git a/src/components/ActionMenu/components/MenuAction/index.ts b/src/components/ActionMenu/components/MenuAction/index.ts
index e59101fa10c..9f93c3233c3 100644
--- a/src/components/ActionMenu/components/MenuAction/index.ts
+++ b/src/components/ActionMenu/components/MenuAction/index.ts
@@ -1 +1 @@
-export {MenuAction, MenuActionProps} from './MenuAction';
+export * from './MenuAction';
diff --git a/src/components/ActionMenu/components/MenuGroup/index.ts b/src/components/ActionMenu/components/MenuGroup/index.ts
index abe8f075c8d..b15a373f461 100644
--- a/src/components/ActionMenu/components/MenuGroup/index.ts
+++ b/src/components/ActionMenu/components/MenuGroup/index.ts
@@ -1 +1 @@
-export {MenuGroup, MenuGroupProps} from './MenuGroup';
+export * from './MenuGroup';
diff --git a/src/components/ActionMenu/components/RollupActions/index.ts b/src/components/ActionMenu/components/RollupActions/index.ts
index 483ffad2aa4..3f3a3a489a7 100644
--- a/src/components/ActionMenu/components/RollupActions/index.ts
+++ b/src/components/ActionMenu/components/RollupActions/index.ts
@@ -1 +1 @@
-export {RollupActions, RollupActionsProps} from './RollupActions';
+export * from './RollupActions';
diff --git a/src/components/ActionMenu/components/index.ts b/src/components/ActionMenu/components/index.ts
index f55c125f03d..e9eefe7dc26 100644
--- a/src/components/ActionMenu/components/index.ts
+++ b/src/components/ActionMenu/components/index.ts
@@ -1,5 +1,5 @@
-export {MenuAction, MenuActionProps} from './MenuAction';
+export * from './MenuAction';
-export {MenuGroup, MenuGroupProps} from './MenuGroup';
+export * from './MenuGroup';
-export {RollupActions, RollupActionsProps} from './RollupActions';
+export * from './RollupActions';
diff --git a/src/components/ActionMenu/index.ts b/src/components/ActionMenu/index.ts
index 127524de4c7..ef0c9807a59 100644
--- a/src/components/ActionMenu/index.ts
+++ b/src/components/ActionMenu/index.ts
@@ -1 +1 @@
-export {ActionMenu, ActionMenuProps, hasGroupsWithActions} from './ActionMenu';
+export * from './ActionMenu';
diff --git a/src/components/ActionMenu/tests/ActionMenu.test.tsx b/src/components/ActionMenu/tests/ActionMenu.test.tsx
index 58406b32fe9..b6bdba8c7cd 100644
--- a/src/components/ActionMenu/tests/ActionMenu.test.tsx
+++ b/src/components/ActionMenu/tests/ActionMenu.test.tsx
@@ -4,11 +4,7 @@ import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
import {MenuGroupDescriptor, ActionListItemDescriptor} from '../../../types';
import {MenuAction, MenuGroup, RollupActions} from '../components';
-import {
- ActionMenu,
- ActionMenuProps,
- convertGroupToSection,
-} from '../ActionMenu';
+import {ActionMenu, ActionMenuProps} from '../ActionMenu';
describe('', () => {
const mockProps: ActionMenuProps = {
@@ -72,9 +68,9 @@ describe('', () => {
});
it('renders as `sections` when `rollup` is `true`', () => {
- const convertedSections = mockGroups.map((group) =>
- convertGroupToSection(group),
- );
+ const convertedSections = mockGroups.map((group) => {
+ return {title: group.title, items: group.actions};
+ });
const wrapper = mountWithAppProvider(
,
);
diff --git a/src/components/AfterInitialMount/index.ts b/src/components/AfterInitialMount/index.ts
index 561c9c775d0..3f90305fb1c 100644
--- a/src/components/AfterInitialMount/index.ts
+++ b/src/components/AfterInitialMount/index.ts
@@ -1 +1 @@
-export {AfterInitialMount} from './AfterInitialMount';
+export * from './AfterInitialMount';
diff --git a/src/components/AppProvider/index.ts b/src/components/AppProvider/index.ts
index 020b20af464..bd2c0cdccb2 100644
--- a/src/components/AppProvider/index.ts
+++ b/src/components/AppProvider/index.ts
@@ -1 +1 @@
-export {AppProvider, AppProviderProps} from './AppProvider';
+export * from './AppProvider';
diff --git a/src/components/Autocomplete/components/ComboBox/ComboBox.tsx b/src/components/Autocomplete/components/ComboBox/ComboBox.tsx
index d38a79f0646..ccead1d7738 100644
--- a/src/components/Autocomplete/components/ComboBox/ComboBox.tsx
+++ b/src/components/Autocomplete/components/ComboBox/ComboBox.tsx
@@ -23,7 +23,7 @@ interface State {
popoverWasActive: boolean;
}
-export interface ComboBoxProps {
+interface ComboBoxProps {
/** A unique identifier for the ComboBox */
id?: string;
/** Collection of options to be listed */
diff --git a/src/components/Autocomplete/components/ComboBox/index.ts b/src/components/Autocomplete/components/ComboBox/index.ts
index 94540f37e9e..d122f03ba63 100644
--- a/src/components/Autocomplete/components/ComboBox/index.ts
+++ b/src/components/Autocomplete/components/ComboBox/index.ts
@@ -1 +1 @@
-export {ComboBox} from './ComboBox';
+export * from './ComboBox';
diff --git a/src/components/Autocomplete/components/TextField/index.ts b/src/components/Autocomplete/components/TextField/index.ts
index 35e9e6ed312..665fa3cb54f 100644
--- a/src/components/Autocomplete/components/TextField/index.ts
+++ b/src/components/Autocomplete/components/TextField/index.ts
@@ -1 +1 @@
-export {TextField} from './TextField';
+export * from './TextField';
diff --git a/src/components/Autocomplete/components/index.ts b/src/components/Autocomplete/components/index.ts
index 8a65d0fe030..c8e78f10ae4 100644
--- a/src/components/Autocomplete/components/index.ts
+++ b/src/components/Autocomplete/components/index.ts
@@ -1,3 +1,3 @@
-export {ComboBox} from './ComboBox';
+export * from './ComboBox';
-export {TextField} from './TextField';
+export * from './TextField';
diff --git a/src/components/Autocomplete/index.ts b/src/components/Autocomplete/index.ts
index e9a10de0eb3..a796c54c60e 100644
--- a/src/components/Autocomplete/index.ts
+++ b/src/components/Autocomplete/index.ts
@@ -1 +1 @@
-export {Autocomplete, AutocompleteProps} from './Autocomplete';
+export * from './Autocomplete';
diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx
index 3ff50ef5ccc..c766903f2dd 100644
--- a/src/components/Avatar/Avatar.tsx
+++ b/src/components/Avatar/Avatar.tsx
@@ -9,7 +9,7 @@ import {Image} from '../Image';
import styles from './Avatar.scss';
import * as avatars from './images';
-export type Size = 'small' | 'medium' | 'large';
+type Size = 'small' | 'medium' | 'large';
enum Status {
Pending = 'PENDING',
@@ -17,7 +17,7 @@ enum Status {
Errored = 'ERRORED',
}
-export const STYLE_CLASSES = ['one', 'two', 'three', 'four', 'five'];
+const STYLE_CLASSES = ['one', 'two', 'three', 'four', 'five'];
const AVATAR_IMAGES = Object.keys(avatars).map(
// import/namespace does not allow computed values by default
// eslint-disable-next-line import/namespace
diff --git a/src/components/Avatar/index.ts b/src/components/Avatar/index.ts
index 2822843f0cf..27700fe3f37 100644
--- a/src/components/Avatar/index.ts
+++ b/src/components/Avatar/index.ts
@@ -1 +1 @@
-export {Avatar, AvatarProps} from './Avatar';
+export * from './Avatar';
diff --git a/src/components/Avatar/tests/Avatar.test.tsx b/src/components/Avatar/tests/Avatar.test.tsx
index 1c6130a809c..7c52c6e6209 100644
--- a/src/components/Avatar/tests/Avatar.test.tsx
+++ b/src/components/Avatar/tests/Avatar.test.tsx
@@ -3,7 +3,6 @@ import React from 'react';
import {mountWithAppProvider} from 'test-utilities/legacy';
import {mountWithApp} from 'test-utilities';
import {Avatar, Image} from 'components';
-import {STYLE_CLASSES} from '../Avatar';
describe('', () => {
describe('intials', () => {
@@ -116,10 +115,6 @@ describe('', () => {
});
describe('styleClass', () => {
- it('defaults to five styles', () => {
- expect(STYLE_CLASSES).toHaveLength(5);
- });
-
it('renders a sixth style when unstableGlobalTheming is false', () => {
const avatar = mountWithApp(, {
features: {unstableGlobalTheming: false},
diff --git a/src/components/Backdrop/index.ts b/src/components/Backdrop/index.ts
index 4161d9da33f..b4c58db120a 100644
--- a/src/components/Backdrop/index.ts
+++ b/src/components/Backdrop/index.ts
@@ -1 +1 @@
-export {Backdrop, BackdropProps} from './Backdrop';
+export * from './Backdrop';
diff --git a/src/components/Badge/Badge.tsx b/src/components/Badge/Badge.tsx
index 43c9fa68d94..3bca2e7a7f1 100644
--- a/src/components/Badge/Badge.tsx
+++ b/src/components/Badge/Badge.tsx
@@ -4,9 +4,9 @@ import {useI18n} from '../../utilities/i18n';
import {VisuallyHidden} from '../VisuallyHidden';
import styles from './Badge.scss';
-export type Status = 'success' | 'info' | 'attention' | 'warning' | 'new';
-export type Progress = 'incomplete' | 'partiallyComplete' | 'complete';
-export type Size = 'small' | 'medium';
+type Status = 'success' | 'info' | 'attention' | 'warning' | 'new';
+type Progress = 'incomplete' | 'partiallyComplete' | 'complete';
+type Size = 'small' | 'medium';
export interface BadgeProps {
/** The content to display inside the badge. */
diff --git a/src/components/Badge/index.ts b/src/components/Badge/index.ts
index 3ab47e3b088..9c8edca28a4 100644
--- a/src/components/Badge/index.ts
+++ b/src/components/Badge/index.ts
@@ -1,8 +1 @@
-export {
- Badge,
- Progress,
- BadgeProps,
- Status,
- PROGRESS_LABELS,
- STATUS_LABELS,
-} from './Badge';
+export * from './Badge';
diff --git a/src/components/Badge/tests/Badge.test.tsx b/src/components/Badge/tests/Badge.test.tsx
index fa10065b9d8..07d109f4710 100644
--- a/src/components/Badge/tests/Badge.test.tsx
+++ b/src/components/Badge/tests/Badge.test.tsx
@@ -2,7 +2,7 @@ import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
import {VisuallyHidden} from 'components';
-import {Badge, Status, Progress, PROGRESS_LABELS, STATUS_LABELS} from '..';
+import {Badge, PROGRESS_LABELS, STATUS_LABELS} from '..';
describe('', () => {
it('renders its children', () => {
@@ -12,7 +12,7 @@ describe('', () => {
});
it('accepts a status prop and renders a visually hidden label', () => {
- Object.keys(STATUS_LABELS).forEach((key: Status) => {
+ Object.keys(STATUS_LABELS).forEach((key: keyof typeof STATUS_LABELS) => {
const badge = mountWithAppProvider();
expect(badge.find(VisuallyHidden).exists()).toBe(true);
badge.unmount();
@@ -20,12 +20,14 @@ describe('', () => {
});
it('accepts a progress prop and renders a visually hidden label', () => {
- Object.keys(PROGRESS_LABELS).forEach((key: Progress) => {
- const badge = mountWithAppProvider(
- ,
- );
- expect(badge.find(VisuallyHidden).exists()).toBe(true);
- badge.unmount();
- });
+ Object.keys(PROGRESS_LABELS).forEach(
+ (key: keyof typeof PROGRESS_LABELS) => {
+ const badge = mountWithAppProvider(
+ ,
+ );
+ expect(badge.find(VisuallyHidden).exists()).toBe(true);
+ badge.unmount();
+ },
+ );
});
});
diff --git a/src/components/Banner/index.ts b/src/components/Banner/index.ts
index f5404b5b4d7..bc95f09d62a 100644
--- a/src/components/Banner/index.ts
+++ b/src/components/Banner/index.ts
@@ -1 +1 @@
-export {Banner, BannerProps, BannerStatus} from './Banner';
+export * from './Banner';
diff --git a/src/components/Breadcrumbs/index.ts b/src/components/Breadcrumbs/index.ts
index 7a663c9d3d9..ce977548b14 100644
--- a/src/components/Breadcrumbs/index.ts
+++ b/src/components/Breadcrumbs/index.ts
@@ -1 +1 @@
-export {Breadcrumbs, BreadcrumbsProps} from './Breadcrumbs';
+export * from './Breadcrumbs';
diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx
index bf99f2f6712..3c303c1d143 100644
--- a/src/components/Button/Button.tsx
+++ b/src/components/Button/Button.tsx
@@ -10,11 +10,11 @@ import {IconProps} from '../../types';
import {Spinner} from '../Spinner';
import styles from './Button.scss';
-export type Size = 'slim' | 'medium' | 'large';
+type Size = 'slim' | 'medium' | 'large';
-export type TextAlign = 'left' | 'right' | 'center';
+type TextAlign = 'left' | 'right' | 'center';
-export type IconSource = IconProps['source'];
+type IconSource = IconProps['source'];
export interface ButtonProps {
/** The content to display inside the button */
@@ -274,7 +274,7 @@ export function Button({
);
}
-export function IconWrapper({children}: any) {
+function IconWrapper({children}: any) {
return {children};
}
diff --git a/src/components/Button/tests/Button.test.tsx b/src/components/Button/tests/Button.test.tsx
index c72a386d1c1..87de955cbf4 100644
--- a/src/components/Button/tests/Button.test.tsx
+++ b/src/components/Button/tests/Button.test.tsx
@@ -4,7 +4,7 @@ import {PlusMinor} from '@shopify/polaris-icons';
import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
import {mountWithApp} from 'test-utilities';
import {UnstyledLink, Icon, Spinner} from 'components';
-import {Button, IconWrapper} from '../Button';
+import {Button} from '../Button';
describe('', () => {
describe('url', () => {
@@ -168,7 +168,7 @@ describe('', () => {
it('does not render the markup for the icon if none is provided', () => {
const button = mountWithAppProvider();
- expect(button.find(IconWrapper).exists()).toBe(false);
+ expect(button.find('svg').exists()).toBe(false);
});
});
diff --git a/src/components/ButtonGroup/components/Item/index.ts b/src/components/ButtonGroup/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/ButtonGroup/components/Item/index.ts
+++ b/src/components/ButtonGroup/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/ButtonGroup/components/index.ts b/src/components/ButtonGroup/components/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/ButtonGroup/components/index.ts
+++ b/src/components/ButtonGroup/components/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/ButtonGroup/index.ts b/src/components/ButtonGroup/index.ts
index b4468f2197b..cd9c57b0a19 100644
--- a/src/components/ButtonGroup/index.ts
+++ b/src/components/ButtonGroup/index.ts
@@ -1 +1 @@
-export {ButtonGroup, ButtonGroupProps} from './ButtonGroup';
+export * from './ButtonGroup';
diff --git a/src/components/CalloutCard/index.ts b/src/components/CalloutCard/index.ts
index a7b7478bc7b..214d850797f 100644
--- a/src/components/CalloutCard/index.ts
+++ b/src/components/CalloutCard/index.ts
@@ -1 +1 @@
-export {CalloutCard, CalloutCardProps} from './CalloutCard';
+export * from './CalloutCard';
diff --git a/src/components/Caption/index.ts b/src/components/Caption/index.ts
index 267e08e75fd..2c6dacc019b 100644
--- a/src/components/Caption/index.ts
+++ b/src/components/Caption/index.ts
@@ -1 +1 @@
-export {Caption, CaptionProps} from './Caption';
+export * from './Caption';
diff --git a/src/components/Card/components/Header/index.ts b/src/components/Card/components/Header/index.ts
index c5990fc6821..266dec8a1bc 100644
--- a/src/components/Card/components/Header/index.ts
+++ b/src/components/Card/components/Header/index.ts
@@ -1 +1 @@
-export {Header, HeaderProps} from './Header';
+export * from './Header';
diff --git a/src/components/Card/components/Section/index.ts b/src/components/Card/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/Card/components/Section/index.ts
+++ b/src/components/Card/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Card/components/Subsection/index.ts b/src/components/Card/components/Subsection/index.ts
index ccc7a88753b..cddeba60629 100644
--- a/src/components/Card/components/Subsection/index.ts
+++ b/src/components/Card/components/Subsection/index.ts
@@ -1 +1 @@
-export {Subsection, SubsectionProps} from './Subsection';
+export * from './Subsection';
diff --git a/src/components/Card/components/index.ts b/src/components/Card/components/index.ts
index d9aefd51e39..194aac47a90 100644
--- a/src/components/Card/components/index.ts
+++ b/src/components/Card/components/index.ts
@@ -1,5 +1,5 @@
-export {Header, HeaderProps} from './Header';
+export * from './Header';
-export {Section, SectionProps} from './Section';
+export * from './Section';
-export {Subsection, SubsectionProps} from './Subsection';
+export * from './Subsection';
diff --git a/src/components/Card/index.ts b/src/components/Card/index.ts
index 9b8a3676a38..ca0b060473a 100644
--- a/src/components/Card/index.ts
+++ b/src/components/Card/index.ts
@@ -1 +1 @@
-export {Card, CardProps} from './Card';
+export * from './Card';
diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx
index 368f5b6e9ff..b9382569bad 100644
--- a/src/components/Checkbox/Checkbox.tsx
+++ b/src/components/Checkbox/Checkbox.tsx
@@ -11,7 +11,7 @@ import {Error, Key, CheckboxHandles} from '../../types';
import styles from './Checkbox.scss';
-export interface BaseProps {
+export interface CheckboxProps {
/** Indicates the ID of the element that describes the checkbox*/
ariaDescribedBy?: string;
/** Label for the checkbox */
@@ -40,8 +40,6 @@ export interface BaseProps {
onBlur?(): void;
}
-export interface CheckboxProps extends BaseProps {}
-
export const Checkbox = React.forwardRef(
function Checkbox(
{
diff --git a/src/components/Checkbox/index.ts b/src/components/Checkbox/index.ts
index 71a7d3ef7c3..f5c939faf48 100644
--- a/src/components/Checkbox/index.ts
+++ b/src/components/Checkbox/index.ts
@@ -1 +1 @@
-export {Checkbox, CheckboxProps} from './Checkbox';
+export * from './Checkbox';
diff --git a/src/components/Choice/index.ts b/src/components/Choice/index.ts
index 1f697a9d9dc..26cc138cdf6 100644
--- a/src/components/Choice/index.ts
+++ b/src/components/Choice/index.ts
@@ -1 +1 @@
-export {Choice, ChoiceProps, helpTextID} from './Choice';
+export * from './Choice';
diff --git a/src/components/ChoiceList/ChoiceList.tsx b/src/components/ChoiceList/ChoiceList.tsx
index d45a77170ad..e7d3e7c388b 100644
--- a/src/components/ChoiceList/ChoiceList.tsx
+++ b/src/components/ChoiceList/ChoiceList.tsx
@@ -10,7 +10,7 @@ import {Error} from '../../types';
import styles from './ChoiceList.scss';
-export interface ChoiceDescriptor {
+interface Choice {
/** Value of the choice */
value: string;
/** Label for the choice */
@@ -25,8 +25,6 @@ export interface ChoiceDescriptor {
renderChildren?(isSelected: boolean): React.ReactNode | false;
}
-export type Choice = ChoiceDescriptor;
-
export interface ChoiceListProps {
/** Label for list of choices */
title: React.ReactNode;
diff --git a/src/components/ChoiceList/tests/ChoiceList.test.tsx b/src/components/ChoiceList/tests/ChoiceList.test.tsx
index 6afbd58bfda..889c8435051 100644
--- a/src/components/ChoiceList/tests/ChoiceList.test.tsx
+++ b/src/components/ChoiceList/tests/ChoiceList.test.tsx
@@ -3,10 +3,10 @@ import {mountWithApp} from 'test-utilities';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider, ReactWrapper} from 'test-utilities/legacy';
import {RadioButton, Checkbox, InlineError, errorTextID} from 'components';
-import {ChoiceList, ChoiceDescriptor} from '../ChoiceList';
+import {ChoiceList, ChoiceListProps} from '../ChoiceList';
describe('', () => {
- let choices: ChoiceDescriptor[];
+ let choices: ChoiceListProps['choices'];
beforeEach(() => {
choices = [
diff --git a/src/components/Collapsible/Collapsible.tsx b/src/components/Collapsible/Collapsible.tsx
index 1c0bba758a6..d8566290802 100644
--- a/src/components/Collapsible/Collapsible.tsx
+++ b/src/components/Collapsible/Collapsible.tsx
@@ -18,7 +18,7 @@ export interface CollapsibleProps {
children?: React.ReactNode;
}
-export type AnimationState =
+type AnimationState =
| 'idle'
| 'measuring'
| 'closingStart'
@@ -34,7 +34,7 @@ interface State {
const ParentCollapsibleExpandingContext = createContext(false);
-class Collapsible extends React.Component {
+class CollapsibleInner extends React.Component {
static contextType = ParentCollapsibleExpandingContext;
static getDerivedStateFromProps(
@@ -165,7 +165,7 @@ function collapsibleHeight(
return `${height || 0}px`;
}
-// Use named export once we work out why not casting this breaks web
-// eslint-disable-next-line import/no-default-export
-export default Collapsible as ComponentClass &
- typeof Collapsible;
+export const Collapsible = CollapsibleInner as ComponentClass<
+ CollapsibleProps
+> &
+ typeof CollapsibleInner;
diff --git a/src/components/Collapsible/index.ts b/src/components/Collapsible/index.ts
index 4c6c0dabffc..870f572291e 100644
--- a/src/components/Collapsible/index.ts
+++ b/src/components/Collapsible/index.ts
@@ -1,3 +1 @@
-import Collapsible, {CollapsibleProps} from './Collapsible';
-
-export {Collapsible, CollapsibleProps};
+export * from './Collapsible';
diff --git a/src/components/Collapsible/tests/Collapsible.test.tsx b/src/components/Collapsible/tests/Collapsible.test.tsx
index 0ed22baf565..572e17e4cc5 100644
--- a/src/components/Collapsible/tests/Collapsible.test.tsx
+++ b/src/components/Collapsible/tests/Collapsible.test.tsx
@@ -1,7 +1,7 @@
import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
-import Collapsible from '../Collapsible';
+import {Collapsible} from '../Collapsible';
describe('', () => {
const ariaHiddenSelector = '[aria-hidden=true]';
diff --git a/src/components/ColorPicker/ColorPicker.tsx b/src/components/ColorPicker/ColorPicker.tsx
index 60092b2d68f..0bd445b0827 100644
--- a/src/components/ColorPicker/ColorPicker.tsx
+++ b/src/components/ColorPicker/ColorPicker.tsx
@@ -10,12 +10,12 @@ interface State {
pickerSize: number;
}
-export interface Color extends HSBColor {
+interface Color extends HSBColor {
/** Level of transparency */
alpha?: HSBAColor['alpha'];
}
-export interface BaseProps {
+export interface ColorPickerProps {
/** ID for the element */
id?: string;
/** The currently selected color */
@@ -26,8 +26,6 @@ export interface BaseProps {
onChange(color: HSBAColor): void;
}
-export interface ColorPickerProps extends BaseProps {}
-
export class ColorPicker extends React.PureComponent {
state: State = {
pickerSize: 0,
diff --git a/src/components/ColorPicker/components/AlphaPicker/index.ts b/src/components/ColorPicker/components/AlphaPicker/index.ts
index 3370e046b1d..f3c7a3956d5 100644
--- a/src/components/ColorPicker/components/AlphaPicker/index.ts
+++ b/src/components/ColorPicker/components/AlphaPicker/index.ts
@@ -1 +1 @@
-export {AlphaPicker, AlphaPickerProps} from './AlphaPicker';
+export * from './AlphaPicker';
diff --git a/src/components/ColorPicker/components/HuePicker/index.ts b/src/components/ColorPicker/components/HuePicker/index.ts
index 35e8e4e44b8..3e23a643c70 100644
--- a/src/components/ColorPicker/components/HuePicker/index.ts
+++ b/src/components/ColorPicker/components/HuePicker/index.ts
@@ -1 +1 @@
-export {HuePicker, HuePickerProps} from './HuePicker';
+export * from './HuePicker';
diff --git a/src/components/ColorPicker/components/Slidable/index.ts b/src/components/ColorPicker/components/Slidable/index.ts
index 0fb9f465165..1a4292f10fd 100644
--- a/src/components/ColorPicker/components/Slidable/index.ts
+++ b/src/components/ColorPicker/components/Slidable/index.ts
@@ -1 +1 @@
-export {Slidable, SlidableProps, Position} from './Slidable';
+export * from './Slidable';
diff --git a/src/components/ColorPicker/components/index.ts b/src/components/ColorPicker/components/index.ts
index 1ac3f93c438..3c133749808 100644
--- a/src/components/ColorPicker/components/index.ts
+++ b/src/components/ColorPicker/components/index.ts
@@ -1,5 +1,5 @@
-export {AlphaPicker, AlphaPickerProps} from './AlphaPicker';
+export * from './AlphaPicker';
-export {HuePicker, HuePickerProps} from './HuePicker';
+export * from './HuePicker';
-export {Slidable, SlidableProps, Position} from './Slidable';
+export * from './Slidable';
diff --git a/src/components/ColorPicker/index.ts b/src/components/ColorPicker/index.ts
index 4e94cc1d280..5b81c0814e8 100644
--- a/src/components/ColorPicker/index.ts
+++ b/src/components/ColorPicker/index.ts
@@ -1,4 +1,3 @@
-export {ColorPicker, ColorPickerProps} from './ColorPicker';
-
+export * from './ColorPicker';
export * from '../../utilities/color-types';
export * from '../../utilities/color-transformers';
diff --git a/src/components/Connected/components/Item/index.ts b/src/components/Connected/components/Item/index.ts
index a38f85e2af4..c924835a042 100644
--- a/src/components/Connected/components/Item/index.ts
+++ b/src/components/Connected/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps, ItemPosition} from './Item';
+export * from './Item';
diff --git a/src/components/Connected/components/index.ts b/src/components/Connected/components/index.ts
index a38f85e2af4..c924835a042 100644
--- a/src/components/Connected/components/index.ts
+++ b/src/components/Connected/components/index.ts
@@ -1 +1 @@
-export {Item, ItemProps, ItemPosition} from './Item';
+export * from './Item';
diff --git a/src/components/Connected/index.ts b/src/components/Connected/index.ts
index 835824d31e3..5f2ce38300a 100644
--- a/src/components/Connected/index.ts
+++ b/src/components/Connected/index.ts
@@ -1 +1 @@
-export {Connected, ConnectedProps} from './Connected';
+export * from './Connected';
diff --git a/src/components/ContextualSaveBar/index.ts b/src/components/ContextualSaveBar/index.ts
index a53bc9d28d0..b53f2fead2c 100644
--- a/src/components/ContextualSaveBar/index.ts
+++ b/src/components/ContextualSaveBar/index.ts
@@ -1 +1 @@
-export {ContextualSaveBar, ContextualSaveBarProps} from './ContextualSaveBar';
+export * from './ContextualSaveBar';
diff --git a/src/components/DataTable/DataTable.tsx b/src/components/DataTable/DataTable.tsx
index ec2bbdd8923..4860d5266f7 100644
--- a/src/components/DataTable/DataTable.tsx
+++ b/src/components/DataTable/DataTable.tsx
@@ -62,7 +62,10 @@ export interface DataTableProps {
onSort?(headingIndex: number, direction: SortDirection): void;
}
-class DataTable extends React.PureComponent {
+class DataTableInner extends React.PureComponent<
+ CombinedProps,
+ DataTableState
+> {
state: DataTableState = {
condensed: false,
columnVisibilityData: [],
@@ -411,6 +414,4 @@ class DataTable extends React.PureComponent {
};
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(DataTable);
+export const DataTable = withAppProvider()(DataTableInner);
diff --git a/src/components/DataTable/components/Cell/index.ts b/src/components/DataTable/components/Cell/index.ts
index b42c9beb4a8..24409763405 100644
--- a/src/components/DataTable/components/Cell/index.ts
+++ b/src/components/DataTable/components/Cell/index.ts
@@ -1 +1 @@
-export {Cell, CellProps} from './Cell';
+export * from './Cell';
diff --git a/src/components/DataTable/components/Navigation/index.ts b/src/components/DataTable/components/Navigation/index.ts
index 471b39990d3..95e14a93f1c 100644
--- a/src/components/DataTable/components/Navigation/index.ts
+++ b/src/components/DataTable/components/Navigation/index.ts
@@ -1 +1 @@
-export {Navigation, NavigationProps} from './Navigation';
+export * from './Navigation';
diff --git a/src/components/DataTable/components/index.ts b/src/components/DataTable/components/index.ts
index 82eb5dcb550..e69c9340f94 100644
--- a/src/components/DataTable/components/index.ts
+++ b/src/components/DataTable/components/index.ts
@@ -1,3 +1,3 @@
-export {Cell, CellProps} from './Cell';
+export * from './Cell';
-export {Navigation, NavigationProps} from './Navigation';
+export * from './Navigation';
diff --git a/src/components/DataTable/index.ts b/src/components/DataTable/index.ts
index 6267c9725cd..0cd95be52d9 100644
--- a/src/components/DataTable/index.ts
+++ b/src/components/DataTable/index.ts
@@ -1,9 +1,3 @@
-import DataTable, {
- DataTableProps,
- TableRow,
- TableData,
- ColumnContentType,
-} from './DataTable';
+export * from './DataTable';
-export {DataTable, DataTableProps, TableRow, TableData, ColumnContentType};
export {SortDirection} from './types';
diff --git a/src/components/DataTable/tests/DataTable.test.tsx b/src/components/DataTable/tests/DataTable.test.tsx
index fc509948f88..29935cd2959 100644
--- a/src/components/DataTable/tests/DataTable.test.tsx
+++ b/src/components/DataTable/tests/DataTable.test.tsx
@@ -2,7 +2,7 @@ import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
import {Cell} from '../components';
-import DataTable, {DataTableProps} from '../DataTable';
+import {DataTable, DataTableProps} from '../DataTable';
describe('', () => {
const headings = ['Product', 'Price', 'Order Number', 'Quantity', 'Subtotal'];
diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx
index becc2f4a613..56257fa74c0 100644
--- a/src/components/DatePicker/DatePicker.tsx
+++ b/src/components/DatePicker/DatePicker.tsx
@@ -22,7 +22,7 @@ import styles from './DatePicker.scss';
export {Range, Months, Year};
-export interface BaseProps {
+export interface DatePickerProps {
/** ID for the element */
id?: string;
/** The selected date or range of dates */
@@ -47,8 +47,6 @@ export interface BaseProps {
onMonthChange?(month: Months, year: Year): void;
}
-export interface DatePickerProps extends BaseProps {}
-
export function DatePicker({
id,
selected,
diff --git a/src/components/DatePicker/components/Day/index.ts b/src/components/DatePicker/components/Day/index.ts
index 9726cab545a..a62947ddc2b 100644
--- a/src/components/DatePicker/components/Day/index.ts
+++ b/src/components/DatePicker/components/Day/index.ts
@@ -1 +1 @@
-export {Day, DayProps} from './Day';
+export * from './Day';
diff --git a/src/components/DatePicker/components/Month/index.ts b/src/components/DatePicker/components/Month/index.ts
index d70a44e1ad1..ec1a1a908d3 100644
--- a/src/components/DatePicker/components/Month/index.ts
+++ b/src/components/DatePicker/components/Month/index.ts
@@ -1 +1 @@
-export {Month, MonthProps} from './Month';
+export * from './Month';
diff --git a/src/components/DatePicker/components/Weekday/index.ts b/src/components/DatePicker/components/Weekday/index.ts
index daab9771b20..d37e01ae005 100644
--- a/src/components/DatePicker/components/Weekday/index.ts
+++ b/src/components/DatePicker/components/Weekday/index.ts
@@ -1 +1 @@
-export {Weekday, WeekdayProps} from './Weekday';
+export * from './Weekday';
diff --git a/src/components/DatePicker/components/index.ts b/src/components/DatePicker/components/index.ts
index 15ae0a1485a..77ef43dd343 100644
--- a/src/components/DatePicker/components/index.ts
+++ b/src/components/DatePicker/components/index.ts
@@ -1,5 +1,5 @@
-export {Day, DayProps} from './Day';
+export * from './Day';
-export {Month, MonthProps} from './Month';
+export * from './Month';
-export {Weekday, WeekdayProps} from './Weekday';
+export * from './Weekday';
diff --git a/src/components/DatePicker/index.ts b/src/components/DatePicker/index.ts
index 451e2cad281..a48b62e4dfc 100644
--- a/src/components/DatePicker/index.ts
+++ b/src/components/DatePicker/index.ts
@@ -1 +1 @@
-export {DatePicker, DatePickerProps, Range, Months, Year} from './DatePicker';
+export * from './DatePicker';
diff --git a/src/components/DescriptionList/DescriptionList.tsx b/src/components/DescriptionList/DescriptionList.tsx
index e7ce4c25195..185c3e6974c 100644
--- a/src/components/DescriptionList/DescriptionList.tsx
+++ b/src/components/DescriptionList/DescriptionList.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {createUniqueIDFactory} from '@shopify/javascript-utilities/other';
import styles from './DescriptionList.scss';
-export interface Item {
+interface Item {
/** Title of the item */
term: React.ReactNode;
/** Item content */
diff --git a/src/components/DescriptionList/index.ts b/src/components/DescriptionList/index.ts
index 649af8ce4dd..dff05c90307 100644
--- a/src/components/DescriptionList/index.ts
+++ b/src/components/DescriptionList/index.ts
@@ -1 +1 @@
-export {DescriptionList, DescriptionListProps} from './DescriptionList';
+export * from './DescriptionList';
diff --git a/src/components/DisplayText/DisplayText.tsx b/src/components/DisplayText/DisplayText.tsx
index 0ef87e30fdd..64fd30d0dec 100644
--- a/src/components/DisplayText/DisplayText.tsx
+++ b/src/components/DisplayText/DisplayText.tsx
@@ -3,7 +3,7 @@ import {classNames, variationName} from '../../utilities/css';
import {HeadingTagName} from '../../types';
import styles from './DisplayText.scss';
-export type Size = 'small' | 'medium' | 'large' | 'extraLarge';
+type Size = 'small' | 'medium' | 'large' | 'extraLarge';
export interface DisplayTextProps {
/**
diff --git a/src/components/DisplayText/index.ts b/src/components/DisplayText/index.ts
index 8a184592781..1688b1c39f6 100644
--- a/src/components/DisplayText/index.ts
+++ b/src/components/DisplayText/index.ts
@@ -1 +1 @@
-export {DisplayText, DisplayTextProps} from './DisplayText';
+export * from './DisplayText';
diff --git a/src/components/DropZone/DropZone.tsx b/src/components/DropZone/DropZone.tsx
index 8f3c3210b11..bd790bfb14c 100755
--- a/src/components/DropZone/DropZone.tsx
+++ b/src/components/DropZone/DropZone.tsx
@@ -38,7 +38,7 @@ import {fileAccepted, getDataTransferFiles} from './utils';
import styles from './DropZone.scss';
-export type Type = 'file' | 'image';
+type Type = 'file' | 'image';
export interface DropZoneProps {
/** Label for the file input */
diff --git a/src/components/DropZone/components/FileUpload/index.ts b/src/components/DropZone/components/FileUpload/index.ts
index f65ec72d0a5..fca98b5becc 100644
--- a/src/components/DropZone/components/FileUpload/index.ts
+++ b/src/components/DropZone/components/FileUpload/index.ts
@@ -1 +1 @@
-export {FileUpload, FileUploadProps} from './FileUpload';
+export * from './FileUpload';
diff --git a/src/components/DropZone/components/index.ts b/src/components/DropZone/components/index.ts
index f65ec72d0a5..fca98b5becc 100644
--- a/src/components/DropZone/components/index.ts
+++ b/src/components/DropZone/components/index.ts
@@ -1 +1 @@
-export {FileUpload, FileUploadProps} from './FileUpload';
+export * from './FileUpload';
diff --git a/src/components/DropZone/index.ts b/src/components/DropZone/index.ts
index b8c90b24e16..d832ddf8631 100755
--- a/src/components/DropZone/index.ts
+++ b/src/components/DropZone/index.ts
@@ -1,2 +1 @@
-export {DropZone, DropZoneProps} from './DropZone';
-export * from './types';
+export * from './DropZone';
diff --git a/src/components/DropZone/types.ts b/src/components/DropZone/types.ts
deleted file mode 100755
index 68ff9b46a88..00000000000
--- a/src/components/DropZone/types.ts
+++ /dev/null
@@ -1 +0,0 @@
-export type DropZoneEvent = DragEvent | React.ChangeEvent;
diff --git a/src/components/DropZone/utils/index.ts b/src/components/DropZone/utils/index.ts
index 79f9bb99ece..128018b1a6f 100755
--- a/src/components/DropZone/utils/index.ts
+++ b/src/components/DropZone/utils/index.ts
@@ -1,4 +1,4 @@
-import {DropZoneEvent} from '../types';
+type DropZoneEvent = DragEvent | React.ChangeEvent;
const dragEvents = ['dragover', 'dragenter', 'drop'];
diff --git a/src/components/EmptySearchResult/index.ts b/src/components/EmptySearchResult/index.ts
index 060c6491b20..71defbf5127 100644
--- a/src/components/EmptySearchResult/index.ts
+++ b/src/components/EmptySearchResult/index.ts
@@ -1 +1 @@
-export {EmptySearchResult, EmptySearchResultProps} from './EmptySearchResult';
+export * from './EmptySearchResult';
diff --git a/src/components/EmptyState/index.ts b/src/components/EmptyState/index.ts
index cdc206e251f..c54a68a9de7 100644
--- a/src/components/EmptyState/index.ts
+++ b/src/components/EmptyState/index.ts
@@ -1 +1 @@
-export {EmptyState, EmptyStateProps} from './EmptyState';
+export * from './EmptyState';
diff --git a/src/components/EventListener/EventListener.tsx b/src/components/EventListener/EventListener.tsx
index 0cbefb813ae..4b54d844f51 100644
--- a/src/components/EventListener/EventListener.tsx
+++ b/src/components/EventListener/EventListener.tsx
@@ -4,7 +4,7 @@ import {
removeEventListener,
} from '@shopify/javascript-utilities/events';
-export interface BaseEventProps {
+interface BaseEventProps {
event: string;
capture?: boolean;
handler(event: Event): void;
diff --git a/src/components/EventListener/index.ts b/src/components/EventListener/index.ts
index 41c7243b23d..23a7233933b 100644
--- a/src/components/EventListener/index.ts
+++ b/src/components/EventListener/index.ts
@@ -1 +1 @@
-export {EventListener, EventListenerProps} from './EventListener';
+export * from './EventListener';
diff --git a/src/components/ExceptionList/ExceptionList.tsx b/src/components/ExceptionList/ExceptionList.tsx
index 63fdae66abc..6a6f223f085 100644
--- a/src/components/ExceptionList/ExceptionList.tsx
+++ b/src/components/ExceptionList/ExceptionList.tsx
@@ -7,12 +7,12 @@ import {Truncate} from '../Truncate';
import styles from './ExceptionList.scss';
-export type Description =
+type Description =
| string
| React.ReactElement
| (string | React.ReactElement)[];
-export interface Item {
+interface Item {
/** Set the color of the icon and title for the given item. */
status?: 'critical' | 'warning';
/** Icon displayed by the list item */
diff --git a/src/components/ExceptionList/index.ts b/src/components/ExceptionList/index.ts
index bef160ee34e..13e495c8f73 100644
--- a/src/components/ExceptionList/index.ts
+++ b/src/components/ExceptionList/index.ts
@@ -1 +1 @@
-export {ExceptionList, ExceptionListProps} from './ExceptionList';
+export * from './ExceptionList';
diff --git a/src/components/Filters/Filters.tsx b/src/components/Filters/Filters.tsx
index 826001f9cf3..768bbc91e9f 100644
--- a/src/components/Filters/Filters.tsx
+++ b/src/components/Filters/Filters.tsx
@@ -20,7 +20,7 @@ import {ScrollLock} from '../ScrollLock';
import {Icon} from '../Icon';
import {TextField} from '../TextField';
import {Tag} from '../Tag';
-import {TextStyle, VariationValue} from '../TextStyle';
+import {TextStyle} from '../TextStyle';
import {Badge} from '../Badge';
import {Focus} from '../Focus';
import {Sheet} from '../Sheet';
@@ -98,7 +98,7 @@ enum Suffix {
Shortcut = 'Shortcut',
}
-class Filters extends React.Component {
+class FiltersInner extends React.Component {
static contextType = ResourceListContext;
state: State = {
@@ -180,7 +180,7 @@ class Filters extends React.Component {
@@ -532,6 +532,4 @@ function getShortcutFilters(filters: FilterInterface[]) {
return filters.filter((filter) => filter.shortcut === true);
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Filters);
+export const Filters = withAppProvider()(FiltersInner);
diff --git a/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx b/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx
index 6112da70865..72fd0fd9fd7 100644
--- a/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx
+++ b/src/components/Filters/components/ConnectedFilterControl/ConnectedFilterControl.tsx
@@ -35,9 +35,7 @@ interface State {
proxyButtonsWidth: ComputedProperty;
}
-export const FILTER_FIELD_MIN_WIDTH = 150;
-
-export const FILTER_FIELD_CUSTOM_PROPERTY = '--textfield-min-width';
+const FILTER_FIELD_MIN_WIDTH = 150;
export class ConnectedFilterControl extends React.Component<
ConnectedFilterControlProps,
diff --git a/src/components/Filters/components/ConnectedFilterControl/components/Item/index.ts b/src/components/Filters/components/ConnectedFilterControl/components/Item/index.ts
index 374108f2e57..c924835a042 100644
--- a/src/components/Filters/components/ConnectedFilterControl/components/Item/index.ts
+++ b/src/components/Filters/components/ConnectedFilterControl/components/Item/index.ts
@@ -1 +1 @@
-export {Item} from './Item';
+export * from './Item';
diff --git a/src/components/Filters/components/ConnectedFilterControl/components/index.ts b/src/components/Filters/components/ConnectedFilterControl/components/index.ts
index 374108f2e57..c924835a042 100644
--- a/src/components/Filters/components/ConnectedFilterControl/components/index.ts
+++ b/src/components/Filters/components/ConnectedFilterControl/components/index.ts
@@ -1 +1 @@
-export {Item} from './Item';
+export * from './Item';
diff --git a/src/components/Filters/components/ConnectedFilterControl/index.ts b/src/components/Filters/components/ConnectedFilterControl/index.ts
index 23cb57aff61..fbbacc73aab 100644
--- a/src/components/Filters/components/ConnectedFilterControl/index.ts
+++ b/src/components/Filters/components/ConnectedFilterControl/index.ts
@@ -1,5 +1 @@
-export {
- ConnectedFilterControl,
- ConnectedFilterControlProps,
- PopoverableAction,
-} from './ConnectedFilterControl';
+export * from './ConnectedFilterControl';
diff --git a/src/components/Filters/components/index.ts b/src/components/Filters/components/index.ts
index 23cb57aff61..fbbacc73aab 100644
--- a/src/components/Filters/components/index.ts
+++ b/src/components/Filters/components/index.ts
@@ -1,5 +1 @@
-export {
- ConnectedFilterControl,
- ConnectedFilterControlProps,
- PopoverableAction,
-} from './ConnectedFilterControl';
+export * from './ConnectedFilterControl';
diff --git a/src/components/Filters/index.ts b/src/components/Filters/index.ts
index 6d0c7979e20..c7b59bcd2f6 100644
--- a/src/components/Filters/index.ts
+++ b/src/components/Filters/index.ts
@@ -1,7 +1 @@
-import Filters, {
- FiltersProps,
- AppliedFilterInterface,
- FilterInterface,
-} from './Filters';
-
-export {Filters, FiltersProps, AppliedFilterInterface, FilterInterface};
+export * from './Filters';
diff --git a/src/components/Filters/tests/Filters.test.tsx b/src/components/Filters/tests/Filters.test.tsx
index 48bcc4fb472..33c9ee696f0 100644
--- a/src/components/Filters/tests/Filters.test.tsx
+++ b/src/components/Filters/tests/Filters.test.tsx
@@ -9,7 +9,7 @@ import {
ReactWrapper,
} from 'test-utilities/legacy';
-import Filters, {FiltersProps} from '../Filters';
+import {Filters, FiltersProps} from '../Filters';
import {ConnectedFilterControl} from '../components';
const MockFilter = (props: {id: string}) => ;
diff --git a/src/components/Focus/index.ts b/src/components/Focus/index.ts
index a2acf13b6fa..f5ada4f8faf 100644
--- a/src/components/Focus/index.ts
+++ b/src/components/Focus/index.ts
@@ -1 +1 @@
-export {Focus, FocusProps} from './Focus';
+export * from './Focus';
diff --git a/src/components/FooterHelp/index.ts b/src/components/FooterHelp/index.ts
index dba0b23390c..3342a700a0c 100644
--- a/src/components/FooterHelp/index.ts
+++ b/src/components/FooterHelp/index.ts
@@ -1 +1 @@
-export {FooterHelp, FooterHelpProps} from './FooterHelp';
+export * from './FooterHelp';
diff --git a/src/components/Form/index.ts b/src/components/Form/index.ts
index 52ccf1629a5..b690c60a16d 100644
--- a/src/components/Form/index.ts
+++ b/src/components/Form/index.ts
@@ -1 +1 @@
-export {Form, FormProps, Enctype, Method, Target} from './Form';
+export * from './Form';
diff --git a/src/components/FormLayout/components/Group/index.ts b/src/components/FormLayout/components/Group/index.ts
index e367408634a..8401278d655 100644
--- a/src/components/FormLayout/components/Group/index.ts
+++ b/src/components/FormLayout/components/Group/index.ts
@@ -1 +1 @@
-export {Group, GroupProps} from './Group';
+export * from './Group';
diff --git a/src/components/FormLayout/components/Item/index.ts b/src/components/FormLayout/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/FormLayout/components/Item/index.ts
+++ b/src/components/FormLayout/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/FormLayout/components/index.ts b/src/components/FormLayout/components/index.ts
index 9c8af724502..c9068b59efb 100644
--- a/src/components/FormLayout/components/index.ts
+++ b/src/components/FormLayout/components/index.ts
@@ -1,3 +1,3 @@
-export {Group, GroupProps} from './Group';
+export * from './Group';
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/FormLayout/index.ts b/src/components/FormLayout/index.ts
index 25aa30f8b88..d3e718e0e3e 100644
--- a/src/components/FormLayout/index.ts
+++ b/src/components/FormLayout/index.ts
@@ -1 +1 @@
-export {FormLayout, FormLayoutProps} from './FormLayout';
+export * from './FormLayout';
diff --git a/src/components/Frame/Frame.tsx b/src/components/Frame/Frame.tsx
index ec3df2c9b23..c74d7e1d1cd 100644
--- a/src/components/Frame/Frame.tsx
+++ b/src/components/Frame/Frame.tsx
@@ -56,11 +56,11 @@ interface State {
showContextualSaveBar: boolean;
}
-export const GLOBAL_RIBBON_CUSTOM_PROPERTY = '--global-ribbon-height';
+const GLOBAL_RIBBON_CUSTOM_PROPERTY = '--global-ribbon-height';
-export const APP_FRAME_MAIN = 'AppFrameMain';
+const APP_FRAME_MAIN = 'AppFrameMain';
-export const APP_FRAME_MAIN_ANCHOR_TARGET = 'AppFrameMainContent';
+const APP_FRAME_MAIN_ANCHOR_TARGET = 'AppFrameMainContent';
const APP_FRAME_NAV = 'AppFrameNav';
const APP_FRAME_TOP_BAR = 'AppFrameTopBar';
@@ -68,7 +68,7 @@ const APP_FRAME_LOADING_BAR = 'AppFrameLoadingBar';
type CombinedProps = FrameProps & WithAppProviderProps;
-class Frame extends React.PureComponent {
+class FrameInner extends React.PureComponent {
state: State = {
skipFocused: false,
globalRibbonHeight: 0,
@@ -417,6 +417,4 @@ const navTransitionClasses = {
exitActive: classNames(styles['Navigation-exitActive']),
};
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Frame);
+export const Frame = withAppProvider()(FrameInner);
diff --git a/src/components/Frame/components/CSSAnimation/index.ts b/src/components/Frame/components/CSSAnimation/index.ts
index 6d70b67eaa2..777a2389f64 100644
--- a/src/components/Frame/components/CSSAnimation/index.ts
+++ b/src/components/Frame/components/CSSAnimation/index.ts
@@ -1 +1 @@
-export {CSSAnimation, AnimationType} from './CSSAnimation';
+export * from './CSSAnimation';
diff --git a/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/index.ts b/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/index.ts
index 69cc6bcc1d9..6ae1a504f61 100644
--- a/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/index.ts
+++ b/src/components/Frame/components/ContextualSaveBar/components/DiscardConfirmationModal/index.ts
@@ -1,4 +1 @@
-export {
- DiscardConfirmationModal,
- DiscardConfirmationModalProps,
-} from './DiscardConfirmationModal';
+export * from './DiscardConfirmationModal';
diff --git a/src/components/Frame/components/ContextualSaveBar/components/index.ts b/src/components/Frame/components/ContextualSaveBar/components/index.ts
index 69cc6bcc1d9..6ae1a504f61 100644
--- a/src/components/Frame/components/ContextualSaveBar/components/index.ts
+++ b/src/components/Frame/components/ContextualSaveBar/components/index.ts
@@ -1,4 +1 @@
-export {
- DiscardConfirmationModal,
- DiscardConfirmationModalProps,
-} from './DiscardConfirmationModal';
+export * from './DiscardConfirmationModal';
diff --git a/src/components/Frame/components/ContextualSaveBar/index.ts b/src/components/Frame/components/ContextualSaveBar/index.ts
index 1443ea6b788..b53f2fead2c 100644
--- a/src/components/Frame/components/ContextualSaveBar/index.ts
+++ b/src/components/Frame/components/ContextualSaveBar/index.ts
@@ -1 +1 @@
-export {ContextualSaveBar} from './ContextualSaveBar';
+export * from './ContextualSaveBar';
diff --git a/src/components/Frame/components/Loading/index.ts b/src/components/Frame/components/Loading/index.ts
index 2d49cfe791f..bc5115b2f8e 100644
--- a/src/components/Frame/components/Loading/index.ts
+++ b/src/components/Frame/components/Loading/index.ts
@@ -1 +1 @@
-export {Loading, LoadingProps} from './Loading';
+export * from './Loading';
diff --git a/src/components/Frame/components/Toast/index.ts b/src/components/Frame/components/Toast/index.ts
index ca34b50dc78..1b794ee7863 100644
--- a/src/components/Frame/components/Toast/index.ts
+++ b/src/components/Frame/components/Toast/index.ts
@@ -1,6 +1 @@
-export {
- Toast,
- ToastProps,
- DEFAULT_TOAST_DURATION,
- DEFAULT_TOAST_DURATION_WITH_ACTION,
-} from './Toast';
+export * from './Toast';
diff --git a/src/components/Frame/components/ToastManager/index.ts b/src/components/Frame/components/ToastManager/index.ts
index 47afef2b5ae..43c4e7e28db 100644
--- a/src/components/Frame/components/ToastManager/index.ts
+++ b/src/components/Frame/components/ToastManager/index.ts
@@ -1 +1 @@
-export {ToastManager, ToastManagerProps} from './ToastManager';
+export * from './ToastManager';
diff --git a/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx b/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx
index fa45c8c44a7..4e817a3aa1e 100644
--- a/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx
+++ b/src/components/Frame/components/ToastManager/tests/ToastManager.test.tsx
@@ -3,7 +3,7 @@ import {timer} from '@shopify/jest-dom-mocks';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
import {Toast} from '../../Toast';
-import Frame from '../../../Frame';
+import {Frame} from '../../../Frame';
import {ToastManager} from '..';
window.matchMedia =
diff --git a/src/components/Frame/components/index.ts b/src/components/Frame/components/index.ts
index 507163e4956..01aaa4a6992 100644
--- a/src/components/Frame/components/index.ts
+++ b/src/components/Frame/components/index.ts
@@ -1,13 +1,9 @@
-export {
- Toast,
- DEFAULT_TOAST_DURATION,
- DEFAULT_TOAST_DURATION_WITH_ACTION,
-} from './Toast';
+export * from './Toast';
-export {ToastManager, ToastManagerProps} from './ToastManager';
+export * from './ToastManager';
-export {Loading, LoadingProps} from './Loading';
+export * from './Loading';
-export {ContextualSaveBar} from './ContextualSaveBar';
+export * from './ContextualSaveBar';
-export {CSSAnimation, AnimationType} from './CSSAnimation';
+export * from './CSSAnimation';
diff --git a/src/components/Frame/index.ts b/src/components/Frame/index.ts
index 5c0e5343228..b1321e6ff24 100644
--- a/src/components/Frame/index.ts
+++ b/src/components/Frame/index.ts
@@ -1,6 +1,4 @@
-import Frame, {FrameProps} from './Frame';
-
-export {Frame, FrameProps};
+export * from './Frame';
export {
DEFAULT_TOAST_DURATION,
diff --git a/src/components/Frame/tests/Frame.test.tsx b/src/components/Frame/tests/Frame.test.tsx
index fca5742314b..eccb565a28b 100644
--- a/src/components/Frame/tests/Frame.test.tsx
+++ b/src/components/Frame/tests/Frame.test.tsx
@@ -9,7 +9,7 @@ import {
ContextualSaveBar as PolarisContextualSavebar,
Loading as PolarisLoading,
} from 'components';
-import Frame from '../Frame';
+import {Frame} from '../Frame';
import {
ContextualSaveBar as FrameContextualSavebar,
Loading as FrameLoading,
diff --git a/src/components/Heading/index.ts b/src/components/Heading/index.ts
index d8af20c48af..6406e7b07f4 100644
--- a/src/components/Heading/index.ts
+++ b/src/components/Heading/index.ts
@@ -1 +1 @@
-export {Heading, HeadingProps} from './Heading';
+export * from './Heading';
diff --git a/src/components/Icon/index.ts b/src/components/Icon/index.ts
index 88877629b8d..e263cc0e6db 100644
--- a/src/components/Icon/index.ts
+++ b/src/components/Icon/index.ts
@@ -1 +1 @@
-export {Icon} from './Icon';
+export * from './Icon';
diff --git a/src/components/Image/Image.tsx b/src/components/Image/Image.tsx
index ef79119fb07..47f4a8f898e 100644
--- a/src/components/Image/Image.tsx
+++ b/src/components/Image/Image.tsx
@@ -1,11 +1,11 @@
import React from 'react';
-export interface SourceSet {
+interface SourceSet {
source: string;
descriptor?: string;
}
-export type CrossOrigin = 'anonymous' | 'use-credentials' | '' | undefined;
+type CrossOrigin = 'anonymous' | 'use-credentials' | '' | undefined;
export interface ImageProps extends React.HTMLProps {
alt: string;
diff --git a/src/components/Image/index.ts b/src/components/Image/index.ts
index 7c54d3fbee5..4bbac90149c 100644
--- a/src/components/Image/index.ts
+++ b/src/components/Image/index.ts
@@ -1 +1 @@
-export {Image, ImageProps} from './Image';
+export * from './Image';
diff --git a/src/components/Image/tests/Image.test.tsx b/src/components/Image/tests/Image.test.tsx
index b30d0e244fa..46f233acc0e 100644
--- a/src/components/Image/tests/Image.test.tsx
+++ b/src/components/Image/tests/Image.test.tsx
@@ -1,7 +1,7 @@
import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
-import {Image, SourceSet} from '../Image';
+import {Image} from '../Image';
describe('', () => {
describe('img attributes', () => {
@@ -33,7 +33,7 @@ describe('', () => {
it('renders an img with a srcSet', () => {
const src =
'https://cdn.shopify.com/s/assets/admin/checkout/settings-customizecart-705f57c725ac05be5a34ec20c05b94298cb8afd10aac7bd9c7ad02030f48cfa0.svg';
- const srcSet: SourceSet[] = [
+ const srcSet = [
{
source:
'https://cdn.shopify.com/s/assets/admin/checkout/settings-customizecart-705f57c725ac05be5a34ec20c05b94298cb8afd10aac7bd9c7ad02030f48cfa0.svg',
diff --git a/src/components/Indicator/index.ts b/src/components/Indicator/index.ts
index 21a229e25ad..717dbf3a06f 100644
--- a/src/components/Indicator/index.ts
+++ b/src/components/Indicator/index.ts
@@ -1 +1 @@
-export {Indicator, IndicatorProps} from './Indicator';
+export * from './Indicator';
diff --git a/src/components/InlineError/index.ts b/src/components/InlineError/index.ts
index d498c5d79a5..a0e7bff8851 100644
--- a/src/components/InlineError/index.ts
+++ b/src/components/InlineError/index.ts
@@ -1 +1 @@
-export {InlineError, InlineErrorProps, errorTextID} from './InlineError';
+export * from './InlineError';
diff --git a/src/components/KeyboardKey/index.ts b/src/components/KeyboardKey/index.ts
index b5202bd5747..8258b3f775c 100644
--- a/src/components/KeyboardKey/index.ts
+++ b/src/components/KeyboardKey/index.ts
@@ -1 +1 @@
-export {KeyboardKey, KeyboardKeyProps} from './KeyboardKey';
+export * from './KeyboardKey';
diff --git a/src/components/KeypressListener/index.ts b/src/components/KeypressListener/index.ts
index ded718c5db8..120c2cc89e1 100644
--- a/src/components/KeypressListener/index.ts
+++ b/src/components/KeypressListener/index.ts
@@ -1,5 +1 @@
-export {
- KeypressListener,
- KeypressListenerProps,
- KeyEvent,
-} from './KeypressListener';
+export * from './KeypressListener';
diff --git a/src/components/Label/index.ts b/src/components/Label/index.ts
index 0003c980b33..ca58c61a25f 100644
--- a/src/components/Label/index.ts
+++ b/src/components/Label/index.ts
@@ -1 +1 @@
-export {Label, LabelProps, labelID} from './Label';
+export * from './Label';
diff --git a/src/components/Labelled/index.ts b/src/components/Labelled/index.ts
index 6117c54c70a..b695f381adb 100644
--- a/src/components/Labelled/index.ts
+++ b/src/components/Labelled/index.ts
@@ -1,8 +1 @@
-export {
- Labelled,
- LabelledProps,
- Action,
- labelID,
- errorID,
- helpTextID,
-} from './Labelled';
+export * from './Labelled';
diff --git a/src/components/Layout/components/AnnotatedSection/index.ts b/src/components/Layout/components/AnnotatedSection/index.ts
index 319a27f6878..e091383f29c 100644
--- a/src/components/Layout/components/AnnotatedSection/index.ts
+++ b/src/components/Layout/components/AnnotatedSection/index.ts
@@ -1 +1 @@
-export {AnnotatedSection, AnnotatedSectionProps} from './AnnotatedSection';
+export * from './AnnotatedSection';
diff --git a/src/components/Layout/components/Section/index.ts b/src/components/Layout/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/Layout/components/Section/index.ts
+++ b/src/components/Layout/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Layout/components/index.ts b/src/components/Layout/components/index.ts
index 12ea5c4efdc..9ce202b45f6 100644
--- a/src/components/Layout/components/index.ts
+++ b/src/components/Layout/components/index.ts
@@ -1,3 +1,3 @@
-export {AnnotatedSection, AnnotatedSectionProps} from './AnnotatedSection';
+export * from './AnnotatedSection';
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Layout/index.ts b/src/components/Layout/index.ts
index 0983e7c8c54..9877e7f4ae2 100644
--- a/src/components/Layout/index.ts
+++ b/src/components/Layout/index.ts
@@ -1 +1 @@
-export {Layout, LayoutProps} from './Layout';
+export * from './Layout';
diff --git a/src/components/Link/index.ts b/src/components/Link/index.ts
index 88890a8968a..3db78f51f07 100644
--- a/src/components/Link/index.ts
+++ b/src/components/Link/index.ts
@@ -1 +1 @@
-export {Link, LinkProps} from './Link';
+export * from './Link';
diff --git a/src/components/List/List.tsx b/src/components/List/List.tsx
index 6373d9ad3e0..fd61577d874 100644
--- a/src/components/List/List.tsx
+++ b/src/components/List/List.tsx
@@ -3,7 +3,7 @@ import {classNames, variationName} from '../../utilities/css';
import {Item} from './components';
import styles from './List.scss';
-export type Type = 'bullet' | 'number';
+type Type = 'bullet' | 'number';
export interface ListProps {
/**
diff --git a/src/components/List/components/Item/index.ts b/src/components/List/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/List/components/Item/index.ts
+++ b/src/components/List/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/List/components/index.ts b/src/components/List/components/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/List/components/index.ts
+++ b/src/components/List/components/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/List/index.ts b/src/components/List/index.ts
index 066b598fc96..4994c181370 100644
--- a/src/components/List/index.ts
+++ b/src/components/List/index.ts
@@ -1 +1 @@
-export {List, ListProps} from './List';
+export * from './List';
diff --git a/src/components/Loading/index.ts b/src/components/Loading/index.ts
index 2d49cfe791f..bc5115b2f8e 100644
--- a/src/components/Loading/index.ts
+++ b/src/components/Loading/index.ts
@@ -1 +1 @@
-export {Loading, LoadingProps} from './Loading';
+export * from './Loading';
diff --git a/src/components/MediaQueryProvider/index.ts b/src/components/MediaQueryProvider/index.ts
index 1ee7865bcb2..34ae5876497 100644
--- a/src/components/MediaQueryProvider/index.ts
+++ b/src/components/MediaQueryProvider/index.ts
@@ -1 +1 @@
-export {MediaQueryProvider} from './MediaQueryProvider';
+export * from './MediaQueryProvider';
diff --git a/src/components/MessageIndicator/index.ts b/src/components/MessageIndicator/index.ts
index 39184f2abbe..ea35bd758f4 100644
--- a/src/components/MessageIndicator/index.ts
+++ b/src/components/MessageIndicator/index.ts
@@ -1 +1 @@
-export {MessageIndicator, MessageIndicatorProps} from './MessageIndicator';
+export * from './MessageIndicator';
diff --git a/src/components/Modal/Modal.tsx b/src/components/Modal/Modal.tsx
index 68dfdb7f268..f5056a634bd 100644
--- a/src/components/Modal/Modal.tsx
+++ b/src/components/Modal/Modal.tsx
@@ -33,7 +33,7 @@ import styles from './Modal.scss';
const IFRAME_LOADING_HEIGHT = 200;
const DEFAULT_IFRAME_CONTENT_HEIGHT = 400;
-export type Size = 'Small' | 'Medium' | 'Large' | 'Full';
+type Size = 'Small' | 'Medium' | 'Large' | 'Full';
export interface ModalProps extends FooterProps {
/** Whether the modal is open or not */
@@ -95,7 +95,7 @@ const APP_BRIDGE_PROPS: (keyof ModalProps)[] = [
'secondaryActions',
];
-class Modal extends React.Component {
+class ModalInner extends React.Component {
static Section = Section;
focusReturnPointNode: HTMLElement | null = null;
@@ -413,6 +413,4 @@ function isIframeModal(
);
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Modal);
+export const Modal = withAppProvider()(ModalInner);
diff --git a/src/components/Modal/components/CloseButton/index.ts b/src/components/Modal/components/CloseButton/index.ts
index 17c66f439fe..8f0f3a0232e 100644
--- a/src/components/Modal/components/CloseButton/index.ts
+++ b/src/components/Modal/components/CloseButton/index.ts
@@ -1 +1 @@
-export {CloseButton, CloseButtonProps} from './CloseButton';
+export * from './CloseButton';
diff --git a/src/components/Modal/components/Dialog/Dialog.tsx b/src/components/Modal/components/Dialog/Dialog.tsx
index 6dec2e3a16e..295ab94e0fa 100644
--- a/src/components/Modal/components/Dialog/Dialog.tsx
+++ b/src/components/Modal/components/Dialog/Dialog.tsx
@@ -12,7 +12,7 @@ import {TrapFocus} from '../../../TrapFocus';
import {useComponentDidMount} from '../../../../utilities/use-component-did-mount';
import styles from './Dialog.scss';
-export interface BaseDialogProps {
+interface BaseDialogProps {
labelledBy?: string;
instant?: boolean;
children?: React.ReactNode;
diff --git a/src/components/Modal/components/Dialog/index.ts b/src/components/Modal/components/Dialog/index.ts
index 29a21065401..a5d31597261 100644
--- a/src/components/Modal/components/Dialog/index.ts
+++ b/src/components/Modal/components/Dialog/index.ts
@@ -1 +1 @@
-export {Dialog, DialogProps} from './Dialog';
+export * from './Dialog';
diff --git a/src/components/Modal/components/Footer/index.ts b/src/components/Modal/components/Footer/index.ts
index d570734dd6a..ddcc5a9cd18 100644
--- a/src/components/Modal/components/Footer/index.ts
+++ b/src/components/Modal/components/Footer/index.ts
@@ -1 +1 @@
-export {Footer, FooterProps} from './Footer';
+export * from './Footer';
diff --git a/src/components/Modal/components/Header/index.ts b/src/components/Modal/components/Header/index.ts
index c5990fc6821..266dec8a1bc 100644
--- a/src/components/Modal/components/Header/index.ts
+++ b/src/components/Modal/components/Header/index.ts
@@ -1 +1 @@
-export {Header, HeaderProps} from './Header';
+export * from './Header';
diff --git a/src/components/Modal/components/Section/index.ts b/src/components/Modal/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/Modal/components/Section/index.ts
+++ b/src/components/Modal/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Modal/components/index.ts b/src/components/Modal/components/index.ts
index 11c583533b1..a8f9024afc7 100644
--- a/src/components/Modal/components/index.ts
+++ b/src/components/Modal/components/index.ts
@@ -1,9 +1,9 @@
-export {Dialog, DialogProps} from './Dialog';
+export * from './Dialog';
-export {Footer, FooterProps} from './Footer';
+export * from './Footer';
-export {Header, HeaderProps} from './Header';
+export * from './Header';
-export {CloseButton} from './CloseButton';
+export * from './CloseButton';
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Modal/index.ts b/src/components/Modal/index.ts
index b902dc305fd..cb89ee17889 100644
--- a/src/components/Modal/index.ts
+++ b/src/components/Modal/index.ts
@@ -1,3 +1 @@
-import Modal, {ModalProps} from './Modal';
-
-export {Modal, ModalProps};
+export * from './Modal';
diff --git a/src/components/Modal/tests/Modal.test.tsx b/src/components/Modal/tests/Modal.test.tsx
index 5db2bc3d6b1..41f484a12bf 100644
--- a/src/components/Modal/tests/Modal.test.tsx
+++ b/src/components/Modal/tests/Modal.test.tsx
@@ -10,7 +10,7 @@ import {
} from 'test-utilities/legacy';
import {Badge, Spinner, Portal, Scrollable} from 'components';
import {Footer, Dialog} from '../components';
-import Modal from '../Modal';
+import {Modal} from '../Modal';
import {WithinContentContext} from '../../../utilities/within-content-context';
diff --git a/src/components/Navigation/components/Item/components/Secondary/index.ts b/src/components/Navigation/components/Item/components/Secondary/index.ts
index d8e2c28080e..b3d167d5c17 100644
--- a/src/components/Navigation/components/Item/components/Secondary/index.ts
+++ b/src/components/Navigation/components/Item/components/Secondary/index.ts
@@ -1 +1 @@
-export {Secondary} from './Secondary';
+export * from './Secondary';
diff --git a/src/components/Navigation/components/Item/components/index.ts b/src/components/Navigation/components/Item/components/index.ts
index d8e2c28080e..b3d167d5c17 100644
--- a/src/components/Navigation/components/Item/components/index.ts
+++ b/src/components/Navigation/components/Item/components/index.ts
@@ -1 +1 @@
-export {Secondary} from './Secondary';
+export * from './Secondary';
diff --git a/src/components/Navigation/components/Item/index.ts b/src/components/Navigation/components/Item/index.ts
index fd4f3f90bb6..c924835a042 100644
--- a/src/components/Navigation/components/Item/index.ts
+++ b/src/components/Navigation/components/Item/index.ts
@@ -1,6 +1 @@
-export {
- Item,
- ItemProps,
- SubNavigationItem,
- isNavigationItemActive,
-} from './Item';
+export * from './Item';
diff --git a/src/components/Navigation/components/Message/index.ts b/src/components/Navigation/components/Message/index.ts
index 2b1800255e2..cd58e0227ce 100644
--- a/src/components/Navigation/components/Message/index.ts
+++ b/src/components/Navigation/components/Message/index.ts
@@ -1 +1 @@
-export {Message, MessageProps} from './Message';
+export * from './Message';
diff --git a/src/components/Navigation/components/Section/index.ts b/src/components/Navigation/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/Navigation/components/Section/index.ts
+++ b/src/components/Navigation/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Navigation/components/index.ts b/src/components/Navigation/components/index.ts
index 212a759c1ee..2f6167b6359 100644
--- a/src/components/Navigation/components/index.ts
+++ b/src/components/Navigation/components/index.ts
@@ -1,10 +1,5 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
-export {
- Item,
- ItemProps,
- SubNavigationItem,
- isNavigationItemActive,
-} from './Item';
+export * from './Item';
-export {Message, MessageProps} from './Message';
+export * from './Message';
diff --git a/src/components/Navigation/index.ts b/src/components/Navigation/index.ts
index 0abd94f9757..7901656f42a 100644
--- a/src/components/Navigation/index.ts
+++ b/src/components/Navigation/index.ts
@@ -1,4 +1,4 @@
-export {Navigation, NavigationProps} from './Navigation';
+export * from './Navigation';
export {
ItemProps as NavigationItemProps,
diff --git a/src/components/OptionList/components/Checkbox/index.ts b/src/components/OptionList/components/Checkbox/index.ts
index 71a7d3ef7c3..f5c939faf48 100644
--- a/src/components/OptionList/components/Checkbox/index.ts
+++ b/src/components/OptionList/components/Checkbox/index.ts
@@ -1 +1 @@
-export {Checkbox, CheckboxProps} from './Checkbox';
+export * from './Checkbox';
diff --git a/src/components/OptionList/components/Option/index.ts b/src/components/OptionList/components/Option/index.ts
index cbf67aaa1f2..e149829a484 100644
--- a/src/components/OptionList/components/Option/index.ts
+++ b/src/components/OptionList/components/Option/index.ts
@@ -1 +1 @@
-export {Option, OptionProps} from './Option';
+export * from './Option';
diff --git a/src/components/OptionList/components/index.ts b/src/components/OptionList/components/index.ts
index 9b5408eb6bc..d06d2c4a99d 100644
--- a/src/components/OptionList/components/index.ts
+++ b/src/components/OptionList/components/index.ts
@@ -1,3 +1,3 @@
-export {Option, OptionProps} from './Option';
+export * from './Option';
-export {Checkbox, CheckboxProps} from './Checkbox';
+export * from './Checkbox';
diff --git a/src/components/OptionList/index.ts b/src/components/OptionList/index.ts
index 407446e4126..8067eefaf3c 100644
--- a/src/components/OptionList/index.ts
+++ b/src/components/OptionList/index.ts
@@ -1,6 +1 @@
-export {
- OptionList,
- OptionListProps,
- OptionDescriptor,
- SectionDescriptor,
-} from './OptionList';
+export * from './OptionList';
diff --git a/src/components/Page/Page.tsx b/src/components/Page/Page.tsx
index feac334bccf..aeda17e324f 100644
--- a/src/components/Page/Page.tsx
+++ b/src/components/Page/Page.tsx
@@ -39,7 +39,7 @@ export interface PageProps extends HeaderProps {
singleColumn?: boolean;
}
-export type ComposedProps = PageProps & WithAppProviderProps;
+type ComposedProps = PageProps & WithAppProviderProps;
const APP_BRIDGE_PROPS: (keyof PageProps)[] = [
'title',
@@ -49,7 +49,7 @@ const APP_BRIDGE_PROPS: (keyof PageProps)[] = [
'primaryAction',
];
-class Page extends React.PureComponent {
+class PageInner extends React.PureComponent {
private titlebar: AppBridgeTitleBar.TitleBar | undefined;
componentDidMount() {
@@ -200,6 +200,4 @@ class Page extends React.PureComponent {
}
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Page);
+export const Page = withAppProvider()(PageInner);
diff --git a/src/components/Page/components/Header/Header.tsx b/src/components/Page/components/Header/Header.tsx
index e30eb3e35cd..bc99ac712d3 100644
--- a/src/components/Page/components/Header/Header.tsx
+++ b/src/components/Page/components/Header/Header.tsx
@@ -2,23 +2,37 @@ import React from 'react';
import {classNames} from '../../../../utilities/css';
import {buttonsFrom} from '../../../Button';
import {useMediaQuery} from '../../../../utilities/media-query';
-import {ComplexAction, MenuGroupDescriptor} from '../../../../types';
+import {
+ ComplexAction,
+ MenuGroupDescriptor,
+ AppBridgeAction,
+ DestructableAction,
+ DisableableAction,
+ LoadableAction,
+} from '../../../../types';
import {Breadcrumbs, BreadcrumbsProps} from '../../../Breadcrumbs';
-
import {Pagination, PaginationDescriptor} from '../../../Pagination';
import {ActionMenu, hasGroupsWithActions} from '../../../ActionMenu';
-import {HeaderPrimaryAction} from '../../types';
import {Title, TitleProps} from './components';
import styles from './Header.scss';
+interface PrimaryAction
+ extends DestructableAction,
+ DisableableAction,
+ LoadableAction,
+ AppBridgeAction {
+ /** Provides extra visual weight and identifies the primary action in a set of buttons */
+ primary?: boolean;
+}
+
export interface HeaderProps extends TitleProps {
/** Visually hide the title (stand-alone app use only) */
titleHidden?: boolean;
/** Adds a border to the bottom of the page header (stand-alone app use only) */
separator?: boolean;
/** Primary page-level action */
- primaryAction?: HeaderPrimaryAction;
+ primaryAction?: PrimaryAction;
/** Page-level pagination (stand-alone app use only) */
pagination?: PaginationDescriptor;
/** Collection of breadcrumbs */
diff --git a/src/components/Page/components/Header/components/Title/index.ts b/src/components/Page/components/Header/components/Title/index.ts
index 61e9a39f3dd..304b1af24b6 100644
--- a/src/components/Page/components/Header/components/Title/index.ts
+++ b/src/components/Page/components/Header/components/Title/index.ts
@@ -1 +1 @@
-export {Title, TitleProps} from './Title';
+export * from './Title';
diff --git a/src/components/Page/components/Header/components/index.ts b/src/components/Page/components/Header/components/index.ts
index 61e9a39f3dd..304b1af24b6 100644
--- a/src/components/Page/components/Header/components/index.ts
+++ b/src/components/Page/components/Header/components/index.ts
@@ -1 +1 @@
-export {Title, TitleProps} from './Title';
+export * from './Title';
diff --git a/src/components/Page/components/Header/index.ts b/src/components/Page/components/Header/index.ts
index c5990fc6821..266dec8a1bc 100644
--- a/src/components/Page/components/Header/index.ts
+++ b/src/components/Page/components/Header/index.ts
@@ -1 +1 @@
-export {Header, HeaderProps} from './Header';
+export * from './Header';
diff --git a/src/components/Page/components/Header/tests/Header.test.tsx b/src/components/Page/components/Header/tests/Header.test.tsx
index ba601b944e5..400ed02faf0 100644
--- a/src/components/Page/components/Header/tests/Header.test.tsx
+++ b/src/components/Page/components/Header/tests/Header.test.tsx
@@ -10,7 +10,6 @@ import {
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
import {LinkAction} from '../../../../../types';
-import {HeaderPrimaryAction} from '../../../types';
import {Header, HeaderProps} from '../Header';
describe('', () => {
@@ -70,7 +69,7 @@ describe('', () => {
describe('primaryAction', () => {
it('renders a `primary` button based on the given action', () => {
- const primaryAction: HeaderPrimaryAction = {
+ const primaryAction: HeaderProps['primaryAction'] = {
content: 'Click me!',
};
@@ -83,7 +82,7 @@ describe('', () => {
});
it('renders a regular button based on the given action when primary is set to false', () => {
- const primaryAction: HeaderPrimaryAction = {
+ const primaryAction: HeaderProps['primaryAction'] = {
content: 'Click me!',
primary: false,
};
diff --git a/src/components/Page/components/index.ts b/src/components/Page/components/index.ts
index c5990fc6821..266dec8a1bc 100644
--- a/src/components/Page/components/index.ts
+++ b/src/components/Page/components/index.ts
@@ -1 +1 @@
-export {Header, HeaderProps} from './Header';
+export * from './Header';
diff --git a/src/components/Page/index.ts b/src/components/Page/index.ts
index d9528e3d0dd..d9925d7520d 100644
--- a/src/components/Page/index.ts
+++ b/src/components/Page/index.ts
@@ -1,4 +1 @@
-import Page, {PageProps} from './Page';
-
-export {Page, PageProps};
-export {HeaderPrimaryAction} from './types';
+export * from './Page';
diff --git a/src/components/Page/tests/Page.test.tsx b/src/components/Page/tests/Page.test.tsx
index a1bc2a3aeea..c04ec997e23 100644
--- a/src/components/Page/tests/Page.test.tsx
+++ b/src/components/Page/tests/Page.test.tsx
@@ -9,7 +9,6 @@ import {mountWithAppProvider} from 'test-utilities/legacy';
import {Page, PageProps, Card, Avatar, Badge} from 'components';
import {Header} from '../components';
import {LinkAction} from '../../../types';
-import {HeaderPrimaryAction} from '../types';
window.matchMedia =
window.matchMedia ||
@@ -318,7 +317,7 @@ describe('', () => {
});
it('receives neccesary transformed props', () => {
- const primaryAction: HeaderPrimaryAction = {
+ const primaryAction: PageProps['primaryAction'] = {
content: 'Foo',
url: '/foo',
target: 'APP',
diff --git a/src/components/Page/types.ts b/src/components/Page/types.ts
deleted file mode 100644
index ae9c0ed308d..00000000000
--- a/src/components/Page/types.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import {
- AppBridgeAction,
- DestructableAction,
- DisableableAction,
- LoadableAction,
-} from '../../types';
-
-export interface HeaderPrimaryAction
- extends DestructableAction,
- DisableableAction,
- LoadableAction,
- AppBridgeAction {
- /** Provides extra visual weight and identifies the primary action in a set of buttons */
- primary?: boolean;
-}
diff --git a/src/components/PageActions/index.ts b/src/components/PageActions/index.ts
index cd2e39a7592..213e94693ee 100644
--- a/src/components/PageActions/index.ts
+++ b/src/components/PageActions/index.ts
@@ -1 +1 @@
-export {PageActions, PageActionsProps} from './PageActions';
+export * from './PageActions';
diff --git a/src/components/Pagination/index.ts b/src/components/Pagination/index.ts
index 3d5049f8e12..e016c96b72e 100644
--- a/src/components/Pagination/index.ts
+++ b/src/components/Pagination/index.ts
@@ -1 +1 @@
-export {Pagination, PaginationProps, PaginationDescriptor} from './Pagination';
+export * from './Pagination';
diff --git a/src/components/PolarisTestProvider/index.ts b/src/components/PolarisTestProvider/index.ts
index d51e5bddb90..eb6d4e9db74 100644
--- a/src/components/PolarisTestProvider/index.ts
+++ b/src/components/PolarisTestProvider/index.ts
@@ -1,5 +1 @@
-export {
- PolarisTestProvider,
- PolarisTestProviderProps,
- WithPolarisTestProviderOptions,
-} from './PolarisTestProvider';
+export * from './PolarisTestProvider';
diff --git a/src/components/Popover/Popover.tsx b/src/components/Popover/Popover.tsx
index 17380527b0b..34f05b64330 100644
--- a/src/components/Popover/Popover.tsx
+++ b/src/components/Popover/Popover.tsx
@@ -12,10 +12,10 @@ import {PreferredPosition, PreferredAlignment} from '../PositionedOverlay';
import {Portal} from '../Portal';
import {portal} from '../shared';
import {useUniqueId} from '../../utilities/unique-id';
-import {CloseSource, Pane, PopoverOverlay, Section} from './components';
+import {PopoverCloseSource, Pane, PopoverOverlay, Section} from './components';
import {setActivatorAttributes} from './set-activator-attributes';
-export {CloseSource};
+export {PopoverCloseSource};
export interface PopoverProps {
/** The content to display inside the popover */
@@ -48,7 +48,7 @@ export interface PopoverProps {
/** Used to illustrate the type of popover element */
ariaHaspopup?: AriaAttributes['aria-haspopup'];
/** Callback when popover is closed */
- onClose(source: CloseSource): void;
+ onClose(source: PopoverCloseSource): void;
}
// TypeScript can't generate types that correctly infer the typing of
@@ -84,7 +84,7 @@ export const Popover: React.FunctionComponent & {
setActivatorAttributes(focusableActivator, {id, active, ariaHaspopup});
}, [active, ariaHaspopup, id]);
- const handleClose = (source: CloseSource) => {
+ const handleClose = (source: PopoverCloseSource) => {
onClose(source);
if (activatorContainer.current == null) {
@@ -92,8 +92,8 @@ export const Popover: React.FunctionComponent & {
}
if (
- (source === CloseSource.FocusOut ||
- source === CloseSource.EscapeKeypress) &&
+ (source === PopoverCloseSource.FocusOut ||
+ source === PopoverCloseSource.EscapeKeypress) &&
activatorNode
) {
const focusableActivator =
diff --git a/src/components/Popover/components/Pane/index.ts b/src/components/Popover/components/Pane/index.ts
index 7e646866f8f..92859ad99d8 100644
--- a/src/components/Popover/components/Pane/index.ts
+++ b/src/components/Popover/components/Pane/index.ts
@@ -1 +1 @@
-export {Pane, PaneProps} from './Pane';
+export * from './Pane';
diff --git a/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx b/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx
index b6190519526..02dae208e7d 100644
--- a/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx
+++ b/src/components/Popover/components/PopoverOverlay/PopoverOverlay.tsx
@@ -22,7 +22,7 @@ import {
import {Pane, PaneProps} from '../Pane';
import styles from '../../Popover.scss';
-export enum CloseSource {
+export enum PopoverCloseSource {
Click,
EscapeKeypress,
FocusOut,
@@ -49,7 +49,7 @@ export interface PopoverOverlayProps {
preventAutofocus?: boolean;
sectioned?: boolean;
fixed?: boolean;
- onClose(source: CloseSource): void;
+ onClose(source: PopoverCloseSource): void;
}
interface State {
@@ -255,23 +255,23 @@ export class PopoverOverlay extends React.PureComponent<
) {
return;
}
- onClose(CloseSource.Click);
+ onClose(PopoverCloseSource.Click);
};
private handleScrollOut = () => {
- this.props.onClose(CloseSource.ScrollOut);
+ this.props.onClose(PopoverCloseSource.ScrollOut);
};
private handleEscape = () => {
- this.props.onClose(CloseSource.EscapeKeypress);
+ this.props.onClose(PopoverCloseSource.EscapeKeypress);
};
private handleFocusFirstItem = () => {
- this.props.onClose(CloseSource.FocusOut);
+ this.props.onClose(PopoverCloseSource.FocusOut);
};
private handleFocusLastItem = () => {
- this.props.onClose(CloseSource.FocusOut);
+ this.props.onClose(PopoverCloseSource.FocusOut);
};
}
diff --git a/src/components/Popover/components/PopoverOverlay/index.ts b/src/components/Popover/components/PopoverOverlay/index.ts
index b63170aad8b..55156659a31 100644
--- a/src/components/Popover/components/PopoverOverlay/index.ts
+++ b/src/components/Popover/components/PopoverOverlay/index.ts
@@ -1,5 +1 @@
-export {
- PopoverOverlay,
- PopoverOverlayProps,
- CloseSource,
-} from './PopoverOverlay';
+export * from './PopoverOverlay';
diff --git a/src/components/Popover/components/Section/index.ts b/src/components/Popover/components/Section/index.ts
index 344c319971d..b524e0f3c49 100644
--- a/src/components/Popover/components/Section/index.ts
+++ b/src/components/Popover/components/Section/index.ts
@@ -1 +1 @@
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Popover/components/index.ts b/src/components/Popover/components/index.ts
index e79658cc8b1..c50a4125694 100644
--- a/src/components/Popover/components/index.ts
+++ b/src/components/Popover/components/index.ts
@@ -1,9 +1,5 @@
-export {Pane, PaneProps} from './Pane';
+export * from './Pane';
-export {
- PopoverOverlay,
- PopoverOverlayProps,
- CloseSource,
-} from './PopoverOverlay';
+export * from './PopoverOverlay';
-export {Section, SectionProps} from './Section';
+export * from './Section';
diff --git a/src/components/Popover/index.ts b/src/components/Popover/index.ts
index c485e62737e..8f473de4b92 100644
--- a/src/components/Popover/index.ts
+++ b/src/components/Popover/index.ts
@@ -1,5 +1 @@
-export {
- Popover,
- PopoverProps,
- CloseSource as PopoverCloseSource,
-} from './Popover';
+export * from './Popover';
diff --git a/src/components/Portal/index.ts b/src/components/Portal/index.ts
index ef6609fb2ef..73d42c80c40 100644
--- a/src/components/Portal/index.ts
+++ b/src/components/Portal/index.ts
@@ -1 +1 @@
-export {Portal, PortalProps} from './Portal';
+export * from './Portal';
diff --git a/src/components/PositionedOverlay/PositionedOverlay.tsx b/src/components/PositionedOverlay/PositionedOverlay.tsx
index e88138c43dd..fe4bfbaae2c 100644
--- a/src/components/PositionedOverlay/PositionedOverlay.tsx
+++ b/src/components/PositionedOverlay/PositionedOverlay.tsx
@@ -13,13 +13,15 @@ import {
calculateVerticalPosition,
calculateHorizontalPosition,
rectIsOutsideOfRect,
+ intersectionWithViewport,
+ windowRect,
} from './utilities/math';
import styles from './PositionedOverlay.scss';
export {PreferredPosition, PreferredAlignment};
-export type Positioning = 'above' | 'below';
+type Positioning = 'above' | 'below';
export interface OverlayDetails {
left?: number;
@@ -275,23 +277,6 @@ export class PositionedOverlay extends React.PureComponent<
};
}
-export function intersectionWithViewport(
- rect: Rect,
- viewport: Rect = windowRect(),
-) {
- const top = Math.max(rect.top, 0);
- const left = Math.max(rect.left, 0);
- const bottom = Math.min(rect.top + rect.height, viewport.height);
- const right = Math.min(rect.left + rect.width, viewport.width);
-
- return new Rect({
- top,
- left,
- height: bottom - top,
- width: right - left,
- });
-}
-
function getMarginsForNode(node: HTMLElement) {
const nodeStyles = window.getComputedStyle(node);
return {
@@ -310,15 +295,6 @@ function getZIndexForLayerFromNode(node: HTMLElement) {
return zIndex === 'auto' || isNaN(zIndex) ? null : zIndex;
}
-function windowRect() {
- return new Rect({
- top: window.scrollY,
- left: window.scrollX,
- height: window.innerHeight,
- width: document.body.clientWidth,
- });
-}
-
function isDocument(node: HTMLElement | Document): node is Document {
return node === document;
}
diff --git a/src/components/PositionedOverlay/index.ts b/src/components/PositionedOverlay/index.ts
index 3ae48a4cc6e..2b57378bb78 100644
--- a/src/components/PositionedOverlay/index.ts
+++ b/src/components/PositionedOverlay/index.ts
@@ -1,7 +1 @@
-export {
- PositionedOverlay,
- PositionedOverlayProps,
- PreferredPosition,
- PreferredAlignment,
- OverlayDetails,
-} from './PositionedOverlay';
+export * from './PositionedOverlay';
diff --git a/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx b/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx
index bc8eb803e10..150b559ea9a 100644
--- a/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx
+++ b/src/components/PositionedOverlay/tests/PositionedOverlay.test.tsx
@@ -1,12 +1,8 @@
import React from 'react';
-import {Rect} from '@shopify/javascript-utilities/geometry';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
import {EventListener} from '../../EventListener';
-import {
- PositionedOverlay,
- intersectionWithViewport,
-} from '../PositionedOverlay';
+import {PositionedOverlay} from '../PositionedOverlay';
import * as mathModule from '../utilities/math';
describe('', () => {
@@ -124,99 +120,6 @@ describe('', () => {
});
});
- describe('intersectionWithViewport', () => {
- const viewport = new Rect({
- top: 0,
- left: 0,
- width: 1000,
- height: 1000,
- });
-
- it('clips the given rect to stay within the viewport (top-left clip)', () => {
- const intersection = intersectionWithViewport(
- new Rect({
- top: -500,
- left: -500,
- width: 1000,
- height: 1000,
- }),
- viewport,
- );
-
- expect(intersection).toStrictEqual(
- new Rect({
- top: 0,
- left: 0,
- width: 500,
- height: 500,
- }),
- );
- });
-
- it('clips the given rect to stay within the viewport (bottom-right clip)', () => {
- const intersection = intersectionWithViewport(
- new Rect({
- top: 500,
- left: 500,
- width: 1000,
- height: 1000,
- }),
- viewport,
- );
-
- expect(intersection).toStrictEqual(
- new Rect({
- top: 500,
- left: 500,
- width: 500,
- height: 500,
- }),
- );
- });
-
- it('does not clip the given rect when it is fully within the viewport', () => {
- const intersection = intersectionWithViewport(
- new Rect({
- top: 250,
- left: 250,
- width: 500,
- height: 500,
- }),
- viewport,
- );
-
- expect(intersection).toStrictEqual(
- new Rect({
- top: 250,
- left: 250,
- width: 500,
- height: 500,
- }),
- );
- });
-
- it('returns a 0-size rect when the given rect is completely outside the viewport', () => {
- const intersection = intersectionWithViewport(
- new Rect({
- top: 1000,
- left: 1000,
- width: 500,
- height: 500,
- }),
- viewport,
- );
-
- expect(intersection).toStrictEqual(
- new Rect({
- top: 1000,
- left: 1000,
- width: 0,
- height: 0,
- }),
- );
- });
- });
-
describe('', () => {
it('sets an event listener for resize', () => {
const positionedOverlay = mountWithAppProvider(
diff --git a/src/components/PositionedOverlay/utilities/math.ts b/src/components/PositionedOverlay/utilities/math.ts
index 90a5132928b..2c91aa5e7d1 100644
--- a/src/components/PositionedOverlay/utilities/math.ts
+++ b/src/components/PositionedOverlay/utilities/math.ts
@@ -118,3 +118,29 @@ export function rectIsOutsideOfRect(inner: Rect, outer: Rect) {
return center.y < outer.top || center.y > outer.top + outer.height;
}
+
+export function intersectionWithViewport(
+ rect: Rect,
+ viewport: Rect = windowRect(),
+) {
+ const top = Math.max(rect.top, 0);
+ const left = Math.max(rect.left, 0);
+ const bottom = Math.min(rect.top + rect.height, viewport.height);
+ const right = Math.min(rect.left + rect.width, viewport.width);
+
+ return new Rect({
+ top,
+ left,
+ height: bottom - top,
+ width: right - left,
+ });
+}
+
+export function windowRect() {
+ return new Rect({
+ top: window.scrollY,
+ left: window.scrollX,
+ height: window.innerHeight,
+ width: document.body.clientWidth,
+ });
+}
diff --git a/src/components/PositionedOverlay/utilities/tests/math.test.ts b/src/components/PositionedOverlay/utilities/tests/math.test.ts
new file mode 100644
index 00000000000..84ab91befad
--- /dev/null
+++ b/src/components/PositionedOverlay/utilities/tests/math.test.ts
@@ -0,0 +1,95 @@
+import {Rect} from '@shopify/javascript-utilities/geometry';
+import {intersectionWithViewport} from '../math';
+
+describe('intersectionWithViewport', () => {
+ const viewport = new Rect({
+ top: 0,
+ left: 0,
+ width: 1000,
+ height: 1000,
+ });
+
+ it('clips the given rect to stay within the viewport (top-left clip)', () => {
+ const intersection = intersectionWithViewport(
+ new Rect({
+ top: -500,
+ left: -500,
+ width: 1000,
+ height: 1000,
+ }),
+ viewport,
+ );
+
+ expect(intersection).toStrictEqual(
+ new Rect({
+ top: 0,
+ left: 0,
+ width: 500,
+ height: 500,
+ }),
+ );
+ });
+
+ it('clips the given rect to stay within the viewport (bottom-right clip)', () => {
+ const intersection = intersectionWithViewport(
+ new Rect({
+ top: 500,
+ left: 500,
+ width: 1000,
+ height: 1000,
+ }),
+ viewport,
+ );
+
+ expect(intersection).toStrictEqual(
+ new Rect({
+ top: 500,
+ left: 500,
+ width: 500,
+ height: 500,
+ }),
+ );
+ });
+
+ it('does not clip the given rect when it is fully within the viewport', () => {
+ const intersection = intersectionWithViewport(
+ new Rect({
+ top: 250,
+ left: 250,
+ width: 500,
+ height: 500,
+ }),
+ viewport,
+ );
+
+ expect(intersection).toStrictEqual(
+ new Rect({
+ top: 250,
+ left: 250,
+ width: 500,
+ height: 500,
+ }),
+ );
+ });
+
+ it('returns a 0-size rect when the given rect is completely outside the viewport', () => {
+ const intersection = intersectionWithViewport(
+ new Rect({
+ top: 1000,
+ left: 1000,
+ width: 500,
+ height: 500,
+ }),
+ viewport,
+ );
+
+ expect(intersection).toStrictEqual(
+ new Rect({
+ top: 1000,
+ left: 1000,
+ width: 0,
+ height: 0,
+ }),
+ );
+ });
+});
diff --git a/src/components/ProgressBar/ProgressBar.tsx b/src/components/ProgressBar/ProgressBar.tsx
index 344e5bb366e..e5b4853403f 100644
--- a/src/components/ProgressBar/ProgressBar.tsx
+++ b/src/components/ProgressBar/ProgressBar.tsx
@@ -3,7 +3,7 @@ import {classNames, variationName} from '../../utilities/css';
import {useI18n} from '../../utilities/i18n';
import styles from './ProgressBar.scss';
-export type Size = 'small' | 'medium' | 'large';
+type Size = 'small' | 'medium' | 'large';
export interface ProgressBarProps {
/**
diff --git a/src/components/ProgressBar/index.ts b/src/components/ProgressBar/index.ts
index 6010a63cf5b..51a1fa968a3 100644
--- a/src/components/ProgressBar/index.ts
+++ b/src/components/ProgressBar/index.ts
@@ -1 +1 @@
-export {ProgressBar, ProgressBarProps} from './ProgressBar';
+export * from './ProgressBar';
diff --git a/src/components/RadioButton/RadioButton.tsx b/src/components/RadioButton/RadioButton.tsx
index 9ebec296068..7eb9807578a 100644
--- a/src/components/RadioButton/RadioButton.tsx
+++ b/src/components/RadioButton/RadioButton.tsx
@@ -5,7 +5,7 @@ import {classNames} from '../../utilities/css';
import {Choice, helpTextID} from '../Choice';
import styles from './RadioButton.scss';
-export interface BaseProps {
+export interface RadioButtonProps {
/** Indicates the ID of the element that describes the the radio button*/
ariaDescribedBy?: string;
/** Label for the radio button */
@@ -32,8 +32,6 @@ export interface BaseProps {
onBlur?(): void;
}
-export interface RadioButtonProps extends BaseProps {}
-
export function RadioButton({
ariaDescribedBy: ariaDescribedByProp,
label,
diff --git a/src/components/RadioButton/index.ts b/src/components/RadioButton/index.ts
index 2bd0a8df033..35533913ecd 100644
--- a/src/components/RadioButton/index.ts
+++ b/src/components/RadioButton/index.ts
@@ -1 +1 @@
-export {RadioButton, RadioButtonProps} from './RadioButton';
+export * from './RadioButton';
diff --git a/src/components/RangeSlider/components/DualThumb/index.ts b/src/components/RangeSlider/components/DualThumb/index.ts
index 0a51215c6fc..9d096333f28 100644
--- a/src/components/RangeSlider/components/DualThumb/index.ts
+++ b/src/components/RangeSlider/components/DualThumb/index.ts
@@ -1 +1 @@
-export {DualThumb, DualThumbProps} from './DualThumb';
+export * from './DualThumb';
diff --git a/src/components/RangeSlider/components/SingleThumb/index.ts b/src/components/RangeSlider/components/SingleThumb/index.ts
index bde0e6e4ff6..788c1d1c26e 100644
--- a/src/components/RangeSlider/components/SingleThumb/index.ts
+++ b/src/components/RangeSlider/components/SingleThumb/index.ts
@@ -1 +1 @@
-export {SingleThumb, SingleThumbProps} from './SingleThumb';
+export * from './SingleThumb';
diff --git a/src/components/RangeSlider/components/index.ts b/src/components/RangeSlider/components/index.ts
index 5ddfcea2250..f5e71bbf1f9 100644
--- a/src/components/RangeSlider/components/index.ts
+++ b/src/components/RangeSlider/components/index.ts
@@ -1,3 +1,3 @@
-export {DualThumb} from './DualThumb';
+export * from './DualThumb';
-export {SingleThumb} from './SingleThumb';
+export * from './SingleThumb';
diff --git a/src/components/RangeSlider/index.ts b/src/components/RangeSlider/index.ts
index 1f4ce58bdb4..bada9bcffe9 100644
--- a/src/components/RangeSlider/index.ts
+++ b/src/components/RangeSlider/index.ts
@@ -1,2 +1,2 @@
-export {RangeSlider} from './RangeSlider';
+export * from './RangeSlider';
export {RangeSliderProps, RangeSliderValue, DualValue} from './types';
diff --git a/src/components/ResourceItem/ResourceItem.tsx b/src/components/ResourceItem/ResourceItem.tsx
index ddb11a3daf2..b9e1c9c6809 100644
--- a/src/components/ResourceItem/ResourceItem.tsx
+++ b/src/components/ResourceItem/ResourceItem.tsx
@@ -21,13 +21,7 @@ import {
} from '../../utilities/resource-list';
import styles from './ResourceItem.scss';
-export type ExceptionStatus = 'neutral' | 'warning' | 'critical';
-
-export type MediaSize = 'small' | 'medium' | 'large';
-
-export type MediaType = 'avatar' | 'thumbnail';
-
-export interface BaseProps {
+interface BaseProps {
/** Visually hidden text for screen readers used for item link*/
accessibilityLabel?: string;
/** Individual item name used by various text labels */
@@ -56,12 +50,12 @@ export interface BaseProps {
children?: React.ReactNode;
}
-export interface PropsWithUrl extends BaseProps {
+interface PropsWithUrl extends BaseProps {
url: string;
onClick?(id?: string): void;
}
-export interface PropsWithClick extends BaseProps {
+interface PropsWithClick extends BaseProps {
url?: string;
onClick(id?: string): void;
}
@@ -80,7 +74,7 @@ interface State {
selected: boolean;
}
-export type CombinedProps = PropsFromWrapper & (PropsWithUrl | PropsWithClick);
+type CombinedProps = PropsFromWrapper & (PropsWithUrl | PropsWithClick);
const getUniqueCheckboxID = createUniqueIDFactory('ResourceListItemCheckbox');
const getUniqueOverlayID = createUniqueIDFactory('ResourceListItemOverlay');
diff --git a/src/components/ResourceItem/index.ts b/src/components/ResourceItem/index.ts
index 11733b92a91..5d14d65f5d3 100644
--- a/src/components/ResourceItem/index.ts
+++ b/src/components/ResourceItem/index.ts
@@ -1 +1 @@
-export {ResourceItem, ResourceItemProps} from './ResourceItem';
+export * from './ResourceItem';
diff --git a/src/components/ResourceList/ResourceList.tsx b/src/components/ResourceList/ResourceList.tsx
index fa763a4689b..e3c3d4da48c 100644
--- a/src/components/ResourceList/ResourceList.tsx
+++ b/src/components/ResourceList/ResourceList.tsx
@@ -37,7 +37,7 @@ const SMALL_SCREEN_WIDTH = 458;
const SMALL_SPINNER_HEIGHT = 28;
const LARGE_SPINNER_HEIGHT = 45;
-export type Items = any[];
+type Items = any[];
interface State {
selectMode: boolean;
@@ -92,7 +92,7 @@ export interface ResourceListProps {
type CombinedProps = ResourceListProps & WithAppProviderProps;
-class ResourceList extends React.Component {
+class ResourceListInner extends React.Component {
static Item = ResourceItem;
// eslint-disable-next-line import/no-deprecated
static FilterControl = FilterControl;
@@ -812,6 +812,6 @@ function isSmallScreen() {
: window.innerWidth < SMALL_SCREEN_WIDTH;
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(ResourceList);
+export const ResourceList = withAppProvider()(
+ ResourceListInner,
+);
diff --git a/src/components/ResourceList/components/BulkActions/BulkActions.tsx b/src/components/ResourceList/components/BulkActions/BulkActions.tsx
index c44c31f861d..181e63d9d3b 100644
--- a/src/components/ResourceList/components/BulkActions/BulkActions.tsx
+++ b/src/components/ResourceList/components/BulkActions/BulkActions.tsx
@@ -17,11 +17,11 @@ import {CheckableButton} from '../CheckableButton';
import {BulkActionButton} from './components';
import styles from './BulkActions.scss';
-export type BulkAction = DisableableAction;
+type BulkAction = DisableableAction;
-export type BulkActionListSection = ActionListSection;
+type BulkActionListSection = ActionListSection;
-export type TransitionStatus = 'entering' | 'entered' | 'exiting' | 'exited';
+type TransitionStatus = 'entering' | 'entered' | 'exiting' | 'exited';
const MAX_PROMOTED_ACTIONS = 2;
@@ -69,7 +69,7 @@ const slideClasses = {
type CombinedProps = BulkActionsProps & WithAppProviderProps;
-class BulkActions extends React.PureComponent {
+class BulkActionsInner extends React.PureComponent {
state: State = {
smallScreenPopoverVisible: false,
largeScreenPopoverVisible: false,
@@ -531,6 +531,6 @@ function instanceOfBulkActionArray(
return actions.length === validList.length;
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(BulkActions);
+export const BulkActions = withAppProvider()(
+ BulkActionsInner,
+);
diff --git a/src/components/ResourceList/components/BulkActions/components/BulkActionButton/index.ts b/src/components/ResourceList/components/BulkActions/components/BulkActionButton/index.ts
index 61bf407205c..ae84a5487cc 100644
--- a/src/components/ResourceList/components/BulkActions/components/BulkActionButton/index.ts
+++ b/src/components/ResourceList/components/BulkActions/components/BulkActionButton/index.ts
@@ -1 +1 @@
-export {BulkActionButton, BulkActionButtonProps} from './BulkActionButton';
+export * from './BulkActionButton';
diff --git a/src/components/ResourceList/components/BulkActions/components/index.ts b/src/components/ResourceList/components/BulkActions/components/index.ts
index 61bf407205c..ae84a5487cc 100644
--- a/src/components/ResourceList/components/BulkActions/components/index.ts
+++ b/src/components/ResourceList/components/BulkActions/components/index.ts
@@ -1 +1 @@
-export {BulkActionButton, BulkActionButtonProps} from './BulkActionButton';
+export * from './BulkActionButton';
diff --git a/src/components/ResourceList/components/BulkActions/index.ts b/src/components/ResourceList/components/BulkActions/index.ts
index 42718b32510..a8609f672d6 100644
--- a/src/components/ResourceList/components/BulkActions/index.ts
+++ b/src/components/ResourceList/components/BulkActions/index.ts
@@ -1,3 +1 @@
-import BulkActions, {BulkActionsProps} from './BulkActions';
-
-export {BulkActions, BulkActionsProps};
+export * from './BulkActions';
diff --git a/src/components/ResourceList/components/BulkActions/tests/BulkActions.test.tsx b/src/components/ResourceList/components/BulkActions/tests/BulkActions.test.tsx
index d78f423588f..26557b6391f 100644
--- a/src/components/ResourceList/components/BulkActions/tests/BulkActions.test.tsx
+++ b/src/components/ResourceList/components/BulkActions/tests/BulkActions.test.tsx
@@ -5,12 +5,12 @@ import {mountWithAppProvider, findByTestID} from 'test-utilities/legacy';
import {mountWithApp} from 'test-utilities';
import {Popover} from 'components';
import {CheckableButton} from '../../CheckableButton';
-import {BulkActionButton} from '../components';
-import BulkActions, {BulkAction} from '../BulkActions';
+import {BulkActionButton, BulkActionButtonProps} from '../components';
+import {BulkActions, BulkActionsProps} from '../BulkActions';
interface Props {
- bulkActions: BulkAction[];
- promotedActions: BulkAction[];
+ bulkActions: BulkActionButtonProps['content'][];
+ promotedActions: NonNullable;
paginatedSelectAllText: string;
selected: boolean;
accessibilityLabel: string;
@@ -18,20 +18,10 @@ interface Props {
disabled: boolean;
}
-type TestValue = BulkAction[] | string | boolean;
+type TestValue = string | boolean;
const bulkActionProps: Props = {
- bulkActions: [
- {
- content: 'button 3',
- },
- {
- content: 'button 4',
- },
- {
- content: 'button 5',
- },
- ],
+ bulkActions: ['button 3', 'button 4', 'button 5'],
promotedActions: [
{
content: 'button 1',
@@ -86,9 +76,9 @@ describe('', () => {
.filterWhere((el: any) => {
const content = el.props().content;
return (
- content === bulkActions[0].content ||
- content === bulkActions[1].content ||
- content === bulkActions[2].content
+ content === bulkActions[0] ||
+ content === bulkActions[1] ||
+ content === bulkActions[2]
);
}).length;
expect(count).toBe(0);
@@ -262,17 +252,7 @@ describe('', () => {
describe('disabled', () => {
const bulkActionProps: Props = {
- bulkActions: [
- {
- content: 'button 3',
- },
- {
- content: 'button 4',
- },
- {
- content: 'button 5',
- },
- ],
+ bulkActions: ['button 3', 'button 4', 'button 5'],
promotedActions: [
{
content: 'button 1',
diff --git a/src/components/ResourceList/components/CheckableButton/index.ts b/src/components/ResourceList/components/CheckableButton/index.ts
index e306e051779..daba293f273 100644
--- a/src/components/ResourceList/components/CheckableButton/index.ts
+++ b/src/components/ResourceList/components/CheckableButton/index.ts
@@ -1 +1 @@
-export {CheckableButton, CheckableButtonProps} from './CheckableButton';
+export * from './CheckableButton';
diff --git a/src/components/ResourceList/components/FilterControl/components/DateSelector/index.ts b/src/components/ResourceList/components/FilterControl/components/DateSelector/index.ts
index b1b80a94a05..898044cd1f5 100644
--- a/src/components/ResourceList/components/FilterControl/components/DateSelector/index.ts
+++ b/src/components/ResourceList/components/FilterControl/components/DateSelector/index.ts
@@ -1,5 +1 @@
-export {
- DateSelector,
- DateSelectorProps,
- DateFilterOption,
-} from './DateSelector';
+export * from './DateSelector';
diff --git a/src/components/ResourceList/components/FilterControl/components/FilterCreator/index.ts b/src/components/ResourceList/components/FilterControl/components/FilterCreator/index.ts
index 3fa7e845210..b69649992e3 100644
--- a/src/components/ResourceList/components/FilterControl/components/FilterCreator/index.ts
+++ b/src/components/ResourceList/components/FilterControl/components/FilterCreator/index.ts
@@ -1 +1 @@
-export {FilterCreator, FilterCreatorProps} from './FilterCreator';
+export * from './FilterCreator';
diff --git a/src/components/ResourceList/components/FilterControl/components/FilterValueSelector/index.ts b/src/components/ResourceList/components/FilterControl/components/FilterValueSelector/index.ts
index 3daabff466e..8bfbb83c12b 100644
--- a/src/components/ResourceList/components/FilterControl/components/FilterValueSelector/index.ts
+++ b/src/components/ResourceList/components/FilterControl/components/FilterValueSelector/index.ts
@@ -1,4 +1 @@
-export {
- FilterValueSelector,
- FilterValueSelectorProps,
-} from './FilterValueSelector';
+export * from './FilterValueSelector';
diff --git a/src/components/ResourceList/components/FilterControl/components/index.ts b/src/components/ResourceList/components/FilterControl/components/index.ts
index 90956c75614..6524ac21db2 100644
--- a/src/components/ResourceList/components/FilterControl/components/index.ts
+++ b/src/components/ResourceList/components/FilterControl/components/index.ts
@@ -1,12 +1,5 @@
-export {
- DateSelector,
- DateSelectorProps,
- DateFilterOption,
-} from './DateSelector';
+export * from './DateSelector';
-export {FilterCreator, FilterCreatorProps} from './FilterCreator';
+export * from './FilterCreator';
-export {
- FilterValueSelector,
- FilterValueSelectorProps,
-} from './FilterValueSelector';
+export * from './FilterValueSelector';
diff --git a/src/components/ResourceList/components/FilterControl/index.ts b/src/components/ResourceList/components/FilterControl/index.ts
index a697516d187..e899cb6b3c7 100644
--- a/src/components/ResourceList/components/FilterControl/index.ts
+++ b/src/components/ResourceList/components/FilterControl/index.ts
@@ -1,3 +1,3 @@
-export {FilterControl, FilterControlProps} from './FilterControl';
+export * from './FilterControl';
export * from './types';
diff --git a/src/components/ResourceList/components/index.ts b/src/components/ResourceList/components/index.ts
index aec6a8ccd80..ae2277b3303 100644
--- a/src/components/ResourceList/components/index.ts
+++ b/src/components/ResourceList/components/index.ts
@@ -1,5 +1,5 @@
-export {BulkActions, BulkActionsProps} from './BulkActions';
+export * from './BulkActions';
-export {CheckableButton, CheckableButtonProps} from './CheckableButton';
+export * from './CheckableButton';
-export {FilterControl, FilterControlProps} from './FilterControl';
+export * from './FilterControl';
diff --git a/src/components/ResourceList/index.ts b/src/components/ResourceList/index.ts
index 0c70cbcc9c8..a4bc1db585d 100644
--- a/src/components/ResourceList/index.ts
+++ b/src/components/ResourceList/index.ts
@@ -1,5 +1,3 @@
-import ResourceList, {ResourceListProps} from './ResourceList';
-
-export {ResourceList, ResourceListProps};
+export * from './ResourceList';
export * from './components/FilterControl/types';
export {FilterControlProps} from './components/FilterControl';
diff --git a/src/components/ResourcePicker/ResourcePicker.tsx b/src/components/ResourcePicker/ResourcePicker.tsx
index 08fd41c8e68..4fbcfcb8588 100644
--- a/src/components/ResourcePicker/ResourcePicker.tsx
+++ b/src/components/ResourcePicker/ResourcePicker.tsx
@@ -6,7 +6,7 @@ import {
WithAppProviderProps,
} from '../../utilities/with-app-provider';
-export interface SelectPayload {
+interface SelectPayload {
/** The selected resources
* @see {@link https://help.shopify.com/en/api/embedded-apps/app-bridge/actions/resourcepicker|resource picker documentation} for more information
*/
@@ -43,7 +43,7 @@ export interface ResourcePickerProps {
type CombinedProps = ResourcePickerProps & WithAppProviderProps;
/** @deprecated Use `ResourcePicker` from `@shopify/app-bridge-react` instead. */
-class ResourcePicker extends React.PureComponent {
+class ResourcePickerInner extends React.PureComponent {
private focusReturnPoint: HTMLElement | null = null;
private appBridgeResourcePicker:
| AppBridgeResourcePicker.ResourcePicker
@@ -197,6 +197,6 @@ class ResourcePicker extends React.PureComponent {
}
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(ResourcePicker);
+export const ResourcePicker = withAppProvider()(
+ ResourcePickerInner,
+);
diff --git a/src/components/ResourcePicker/index.ts b/src/components/ResourcePicker/index.ts
index 7ff3779bbe5..194681075a6 100644
--- a/src/components/ResourcePicker/index.ts
+++ b/src/components/ResourcePicker/index.ts
@@ -1,3 +1 @@
-import ResourcePicker, {ResourcePickerProps} from './ResourcePicker';
-
-export {ResourcePicker, ResourcePickerProps};
+export * from './ResourcePicker';
diff --git a/src/components/ResourcePicker/tests/ResourcePicker.test.tsx b/src/components/ResourcePicker/tests/ResourcePicker.test.tsx
index 6733e696e2e..75b16be2142 100644
--- a/src/components/ResourcePicker/tests/ResourcePicker.test.tsx
+++ b/src/components/ResourcePicker/tests/ResourcePicker.test.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {ResourcePicker as AppBridgeResourcePicker} from '@shopify/app-bridge/actions';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
-import ResourcePicker from '../ResourcePicker';
+import {ResourcePicker} from '../ResourcePicker';
describe('', () => {
describe('with app bridge', () => {
diff --git a/src/components/ScrollLock/index.ts b/src/components/ScrollLock/index.ts
index 4a75ead8926..7aeb434e967 100644
--- a/src/components/ScrollLock/index.ts
+++ b/src/components/ScrollLock/index.ts
@@ -1 +1 @@
-export {ScrollLock} from './ScrollLock';
+export * from './ScrollLock';
diff --git a/src/components/Scrollable/components/ScrollTo/index.ts b/src/components/Scrollable/components/ScrollTo/index.ts
index f26e7bf2415..1aa93e7a3fd 100644
--- a/src/components/Scrollable/components/ScrollTo/index.ts
+++ b/src/components/Scrollable/components/ScrollTo/index.ts
@@ -1 +1 @@
-export {ScrollTo} from './ScrollTo';
+export * from './ScrollTo';
diff --git a/src/components/Scrollable/components/index.ts b/src/components/Scrollable/components/index.ts
index f26e7bf2415..1aa93e7a3fd 100644
--- a/src/components/Scrollable/components/index.ts
+++ b/src/components/Scrollable/components/index.ts
@@ -1 +1 @@
-export {ScrollTo} from './ScrollTo';
+export * from './ScrollTo';
diff --git a/src/components/Scrollable/index.ts b/src/components/Scrollable/index.ts
index 8b35847313a..f1f70f1cc05 100644
--- a/src/components/Scrollable/index.ts
+++ b/src/components/Scrollable/index.ts
@@ -1 +1 @@
-export {Scrollable, ScrollableProps} from './Scrollable';
+export * from './Scrollable';
diff --git a/src/components/Select/Select.tsx b/src/components/Select/Select.tsx
index 08feef20f75..3ff07d1ed07 100644
--- a/src/components/Select/Select.tsx
+++ b/src/components/Select/Select.tsx
@@ -35,7 +35,7 @@ export interface SelectGroup {
options: SelectOption[];
}
-export interface BaseProps {
+export interface SelectProps {
/** List of options or option groups to choose from */
options?: (SelectOption | SelectGroup)[];
/** Label for the select */
@@ -68,8 +68,6 @@ export interface BaseProps {
onBlur?(): void;
}
-export interface SelectProps extends BaseProps {}
-
const PLACEHOLDER_VALUE = '';
export function Select({
diff --git a/src/components/Select/index.ts b/src/components/Select/index.ts
index 7088f4d4f38..7868ecbae29 100644
--- a/src/components/Select/index.ts
+++ b/src/components/Select/index.ts
@@ -1 +1 @@
-export {Select, SelectProps, SelectOption, SelectGroup} from './Select';
+export * from './Select';
diff --git a/src/components/SettingAction/index.ts b/src/components/SettingAction/index.ts
index 733434ec73c..af76fe037e9 100644
--- a/src/components/SettingAction/index.ts
+++ b/src/components/SettingAction/index.ts
@@ -1 +1 @@
-export {SettingAction, SettingActionProps} from './SettingAction';
+export * from './SettingAction';
diff --git a/src/components/SettingToggle/index.ts b/src/components/SettingToggle/index.ts
index 1f63e282772..4c5adb8c884 100644
--- a/src/components/SettingToggle/index.ts
+++ b/src/components/SettingToggle/index.ts
@@ -1 +1 @@
-export {SettingToggle, SettingToggleProps} from './SettingToggle';
+export * from './SettingToggle';
diff --git a/src/components/Sheet/Sheet.tsx b/src/components/Sheet/Sheet.tsx
index b5ca047def8..c879705d09b 100644
--- a/src/components/Sheet/Sheet.tsx
+++ b/src/components/Sheet/Sheet.tsx
@@ -14,14 +14,14 @@ import {KeypressListener} from '../KeypressListener';
import styles from './Sheet.scss';
-export const BOTTOM_CLASS_NAMES = {
+const BOTTOM_CLASS_NAMES = {
enter: classNames(styles.Bottom, styles.enterBottom),
enterActive: classNames(styles.Bottom, styles.enterBottomActive),
exit: classNames(styles.Bottom, styles.exitBottom),
exitActive: classNames(styles.Bottom, styles.exitBottomActive),
};
-export const RIGHT_CLASS_NAMES = {
+const RIGHT_CLASS_NAMES = {
enter: classNames(styles.Right, styles.enterRight),
enterActive: classNames(styles.Right, styles.enterRightActive),
exit: classNames(styles.Right, styles.exitRight),
diff --git a/src/components/Sheet/index.ts b/src/components/Sheet/index.ts
index 56a19964249..1c354cae55d 100644
--- a/src/components/Sheet/index.ts
+++ b/src/components/Sheet/index.ts
@@ -1 +1 @@
-export {Sheet} from './Sheet';
+export * from './Sheet';
diff --git a/src/components/Sheet/tests/Sheet.test.tsx b/src/components/Sheet/tests/Sheet.test.tsx
index e19016e3280..8ce13370309 100644
--- a/src/components/Sheet/tests/Sheet.test.tsx
+++ b/src/components/Sheet/tests/Sheet.test.tsx
@@ -4,7 +4,7 @@ import {CSSTransition} from '@material-ui/react-transition-group';
import {mountWithAppProvider} from 'test-utilities/legacy';
import {Backdrop} from 'components/Backdrop';
-import {Sheet, BOTTOM_CLASS_NAMES, RIGHT_CLASS_NAMES} from '../Sheet';
+import {Sheet} from '../Sheet';
describe('', () => {
const mockProps = {
@@ -41,9 +41,12 @@ describe('', () => {
{mediaQuery: {isNavigationCollapsed: true}},
);
- expect(sheet.find(CSSTransition).props().classNames).toStrictEqual(
- BOTTOM_CLASS_NAMES,
- );
+ expect(sheet.find(CSSTransition).props().classNames).toStrictEqual({
+ enter: 'Bottom enterBottom',
+ enterActive: 'Bottom enterBottomActive',
+ exit: 'Bottom exitBottom',
+ exitActive: 'Bottom exitBottomActive',
+ });
});
it('renders a css transition component with right class names at desktop sizes', () => {
@@ -53,9 +56,12 @@ describe('', () => {
,
);
- expect(sheet.find(CSSTransition).props().classNames).toStrictEqual(
- RIGHT_CLASS_NAMES,
- );
+ expect(sheet.find(CSSTransition).props().classNames).toStrictEqual({
+ enter: 'Right enterRight',
+ enterActive: 'Right enterRightActive',
+ exit: 'Right exitRight',
+ exitActive: 'Right exitRightActive',
+ });
});
});
diff --git a/src/components/SkeletonBodyText/index.ts b/src/components/SkeletonBodyText/index.ts
index bcc300792f3..5a4fcc2e389 100644
--- a/src/components/SkeletonBodyText/index.ts
+++ b/src/components/SkeletonBodyText/index.ts
@@ -1 +1 @@
-export {SkeletonBodyText, SkeletonBodyTextProps} from './SkeletonBodyText';
+export * from './SkeletonBodyText';
diff --git a/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx b/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx
index d79f7a455f5..e2e85f14a00 100644
--- a/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx
+++ b/src/components/SkeletonDisplayText/SkeletonDisplayText.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {classNames, variationName} from '../../utilities/css';
import styles from './SkeletonDisplayText.scss';
-export type Size = 'small' | 'medium' | 'large' | 'extraLarge';
+type Size = 'small' | 'medium' | 'large' | 'extraLarge';
export interface SkeletonDisplayTextProps {
/**
diff --git a/src/components/SkeletonDisplayText/index.ts b/src/components/SkeletonDisplayText/index.ts
index fa1554820c2..387b11f722a 100644
--- a/src/components/SkeletonDisplayText/index.ts
+++ b/src/components/SkeletonDisplayText/index.ts
@@ -1,4 +1 @@
-export {
- SkeletonDisplayText,
- SkeletonDisplayTextProps,
-} from './SkeletonDisplayText';
+export * from './SkeletonDisplayText';
diff --git a/src/components/SkeletonPage/index.ts b/src/components/SkeletonPage/index.ts
index da52a845896..9f9b76f2cb6 100644
--- a/src/components/SkeletonPage/index.ts
+++ b/src/components/SkeletonPage/index.ts
@@ -1 +1 @@
-export {SkeletonPage, SkeletonPageProps} from './SkeletonPage';
+export * from './SkeletonPage';
diff --git a/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx b/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx
index 8d3253bf304..490ce09c23e 100644
--- a/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx
+++ b/src/components/SkeletonThumbnail/SkeletonThumbnail.tsx
@@ -2,7 +2,7 @@ import React from 'react';
import {classNames, variationName} from '../../utilities/css';
import styles from './SkeletonThumbnail.scss';
-export type Size = 'small' | 'medium' | 'large';
+type Size = 'small' | 'medium' | 'large';
export interface SkeletonThumbnailProps {
/**
diff --git a/src/components/SkeletonThumbnail/index.ts b/src/components/SkeletonThumbnail/index.ts
index 8c57941afbf..5db6420815f 100644
--- a/src/components/SkeletonThumbnail/index.ts
+++ b/src/components/SkeletonThumbnail/index.ts
@@ -1 +1 @@
-export {SkeletonThumbnail, SkeletonThumbnailProps} from './SkeletonThumbnail';
+export * from './SkeletonThumbnail';
diff --git a/src/components/Spinner/Spinner.tsx b/src/components/Spinner/Spinner.tsx
index 1e1e9b7d64a..0ba6cd72e9d 100644
--- a/src/components/Spinner/Spinner.tsx
+++ b/src/components/Spinner/Spinner.tsx
@@ -7,9 +7,9 @@ import {useIsAfterInitialMount} from '../../utilities/use-is-after-initial-mount
import styles from './Spinner.scss';
import {spinnerLarge, spinnerSmall} from './images';
-export type Color = 'white' | 'teal' | 'inkLightest';
+type Color = 'white' | 'teal' | 'inkLightest';
-export type Size = 'small' | 'large';
+type Size = 'small' | 'large';
const COLORS_FOR_LARGE_SPINNER = ['teal', 'inkLightest'];
diff --git a/src/components/Spinner/index.ts b/src/components/Spinner/index.ts
index 79b79fec8a8..b259397be42 100644
--- a/src/components/Spinner/index.ts
+++ b/src/components/Spinner/index.ts
@@ -1 +1 @@
-export {Spinner, SpinnerProps} from './Spinner';
+export * from './Spinner';
diff --git a/src/components/Spinner/tests/Spinner.test.tsx b/src/components/Spinner/tests/Spinner.test.tsx
index e080eac0fc7..fb12273d771 100644
--- a/src/components/Spinner/tests/Spinner.test.tsx
+++ b/src/components/Spinner/tests/Spinner.test.tsx
@@ -2,7 +2,7 @@ import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
import {mountWithApp} from 'test-utilities';
-import {Spinner, Color} from '../Spinner';
+import {Spinner} from '../Spinner';
import {Image} from '../../Image';
import {VisuallyHidden} from '../../VisuallyHidden';
@@ -75,12 +75,10 @@ describe('', () => {
it('a large spinner with an unavailable color warns in development', () => {
process.env.NODE_ENV = 'development';
- const color = 'black' as Color;
-
- mountWithAppProvider();
+ mountWithAppProvider();
expect(warnSpy).toHaveBeenCalledWith(
- 'The color black is not meant to be used on large spinners. The colors available on large spinners are: teal, inkLightest',
+ 'The color white is not meant to be used on large spinners. The colors available on large spinners are: teal, inkLightest',
);
});
});
diff --git a/src/components/Stack/components/Item/index.ts b/src/components/Stack/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/Stack/components/Item/index.ts
+++ b/src/components/Stack/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/Stack/components/index.ts b/src/components/Stack/components/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/Stack/components/index.ts
+++ b/src/components/Stack/components/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/Stack/index.ts b/src/components/Stack/index.ts
index 16af572bab2..453d31cff2a 100644
--- a/src/components/Stack/index.ts
+++ b/src/components/Stack/index.ts
@@ -1 +1 @@
-export {Stack, StackProps, Alignment, Distribution, Spacing} from './Stack';
+export * from './Stack';
diff --git a/src/components/Sticky/Sticky.tsx b/src/components/Sticky/Sticky.tsx
index 91974ad8690..316b0bc1b87 100644
--- a/src/components/Sticky/Sticky.tsx
+++ b/src/components/Sticky/Sticky.tsx
@@ -24,7 +24,7 @@ export type StickyProps = {
type CombinedProps = StickyProps & WithAppProviderProps;
-class Sticky extends React.Component {
+class StickyInner extends React.Component {
state: State = {
isSticky: false,
style: {},
@@ -123,6 +123,4 @@ function isFunction(arg: any): arg is Function {
return typeof arg === 'function';
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Sticky);
+export const Sticky = withAppProvider()(StickyInner);
diff --git a/src/components/Sticky/index.ts b/src/components/Sticky/index.ts
index dfc18169dae..501907e046b 100644
--- a/src/components/Sticky/index.ts
+++ b/src/components/Sticky/index.ts
@@ -1,3 +1 @@
-import Sticky, {StickyProps} from './Sticky';
-
-export {Sticky, StickyProps};
+export * from './Sticky';
diff --git a/src/components/Sticky/tests/Sticky.test.tsx b/src/components/Sticky/tests/Sticky.test.tsx
index d7e3227f03e..ba3aecf0a13 100644
--- a/src/components/Sticky/tests/Sticky.test.tsx
+++ b/src/components/Sticky/tests/Sticky.test.tsx
@@ -1,7 +1,7 @@
import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider} from 'test-utilities/legacy';
-import Sticky from '../Sticky';
+import {Sticky} from '../Sticky';
describe('', () => {
it('renders children component', () => {
diff --git a/src/components/Subheading/index.ts b/src/components/Subheading/index.ts
index 1323234d504..7f596a22d06 100644
--- a/src/components/Subheading/index.ts
+++ b/src/components/Subheading/index.ts
@@ -1 +1 @@
-export {Subheading, SubheadingProps} from './Subheading';
+export * from './Subheading';
diff --git a/src/components/Tabs/Tabs.tsx b/src/components/Tabs/Tabs.tsx
index bb0fffedfad..680a66fc6e4 100644
--- a/src/components/Tabs/Tabs.tsx
+++ b/src/components/Tabs/Tabs.tsx
@@ -41,7 +41,7 @@ interface State {
tabToFocus: number;
}
-class Tabs extends React.PureComponent {
+class TabsInner extends React.PureComponent {
static getDerivedStateFromProps(nextProps: TabsProps, prevState: State) {
const {disclosureWidth, tabWidths, containerWidth} = prevState;
const {visibleTabs, hiddenTabs} = getVisibleAndHiddenTabIndices(
@@ -354,6 +354,4 @@ function handleKeyDown(event: React.KeyboardEvent) {
}
}
-// Use named export once withAppProvider is refactored away
-// eslint-disable-next-line import/no-default-export
-export default withAppProvider()(Tabs);
+export const Tabs = withAppProvider()(TabsInner);
diff --git a/src/components/Tabs/components/Item/index.ts b/src/components/Tabs/components/Item/index.ts
index e158f53cc0d..c924835a042 100644
--- a/src/components/Tabs/components/Item/index.ts
+++ b/src/components/Tabs/components/Item/index.ts
@@ -1 +1 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
diff --git a/src/components/Tabs/components/List/index.ts b/src/components/Tabs/components/List/index.ts
index 066b598fc96..4994c181370 100644
--- a/src/components/Tabs/components/List/index.ts
+++ b/src/components/Tabs/components/List/index.ts
@@ -1 +1 @@
-export {List, ListProps} from './List';
+export * from './List';
diff --git a/src/components/Tabs/components/Panel/index.ts b/src/components/Tabs/components/Panel/index.ts
index f960e003de8..8960d84f605 100644
--- a/src/components/Tabs/components/Panel/index.ts
+++ b/src/components/Tabs/components/Panel/index.ts
@@ -1 +1 @@
-export {Panel, PanelProps} from './Panel';
+export * from './Panel';
diff --git a/src/components/Tabs/components/Tab/index.ts b/src/components/Tabs/components/Tab/index.ts
index ec917d10aae..2e2986cb59f 100644
--- a/src/components/Tabs/components/Tab/index.ts
+++ b/src/components/Tabs/components/Tab/index.ts
@@ -1 +1 @@
-export {Tab, TabProps} from './Tab';
+export * from './Tab';
diff --git a/src/components/Tabs/components/TabMeasurer/index.ts b/src/components/Tabs/components/TabMeasurer/index.ts
index cbcb001f8da..954c253ee11 100644
--- a/src/components/Tabs/components/TabMeasurer/index.ts
+++ b/src/components/Tabs/components/TabMeasurer/index.ts
@@ -1 +1 @@
-export {TabMeasurer, TabMeasurerProps, TabMeasurements} from './TabMeasurer';
+export * from './TabMeasurer';
diff --git a/src/components/Tabs/components/index.ts b/src/components/Tabs/components/index.ts
index d79275e1f98..ec867d51c27 100644
--- a/src/components/Tabs/components/index.ts
+++ b/src/components/Tabs/components/index.ts
@@ -1,9 +1,9 @@
-export {Item, ItemProps} from './Item';
+export * from './Item';
-export {List, ListProps} from './List';
+export * from './List';
-export {Panel, PanelProps} from './Panel';
+export * from './Panel';
-export {Tab, TabProps} from './Tab';
+export * from './Tab';
-export {TabMeasurer, TabMeasurerProps, TabMeasurements} from './TabMeasurer';
+export * from './TabMeasurer';
diff --git a/src/components/Tabs/index.ts b/src/components/Tabs/index.ts
index 806bb9901a7..856dbbb347c 100644
--- a/src/components/Tabs/index.ts
+++ b/src/components/Tabs/index.ts
@@ -1,3 +1 @@
-import Tabs, {TabsProps} from './Tabs';
-
-export {Tabs, TabsProps};
+export * from './Tabs';
diff --git a/src/components/Tabs/tests/Tabs.test.tsx b/src/components/Tabs/tests/Tabs.test.tsx
index bb61b93360d..bef39fe01ba 100644
--- a/src/components/Tabs/tests/Tabs.test.tsx
+++ b/src/components/Tabs/tests/Tabs.test.tsx
@@ -2,7 +2,7 @@ import React from 'react';
// eslint-disable-next-line no-restricted-imports
import {mountWithAppProvider, trigger} from 'test-utilities/legacy';
import {Tab, Panel, TabMeasurer} from '../components';
-import Tabs, {TabsProps} from '../Tabs';
+import {Tabs, TabsProps} from '../Tabs';
import {getVisibleAndHiddenTabIndices} from '../utilities';
import {Popover} from '../../Popover';
diff --git a/src/components/Tag/index.ts b/src/components/Tag/index.ts
index a94cd6a633c..9790fcbf11a 100644
--- a/src/components/Tag/index.ts
+++ b/src/components/Tag/index.ts
@@ -1 +1 @@
-export {Tag, TagProps} from './Tag';
+export * from './Tag';
diff --git a/src/components/TextContainer/TextContainer.tsx b/src/components/TextContainer/TextContainer.tsx
index 41a84b705b5..c9f386b1251 100644
--- a/src/components/TextContainer/TextContainer.tsx
+++ b/src/components/TextContainer/TextContainer.tsx
@@ -3,7 +3,7 @@ import {classNames, variationName} from '../../utilities/css';
import styles from './TextContainer.scss';
-export type Spacing = 'tight' | 'loose';
+type Spacing = 'tight' | 'loose';
export interface TextContainerProps {
/** The amount of vertical spacing children will get between them */
diff --git a/src/components/TextContainer/index.ts b/src/components/TextContainer/index.ts
index 901f7ebdb18..7ae838766ff 100644
--- a/src/components/TextContainer/index.ts
+++ b/src/components/TextContainer/index.ts
@@ -1 +1 @@
-export {TextContainer, TextContainerProps} from './TextContainer';
+export * from './TextContainer';
diff --git a/src/components/TextField/TextField.tsx b/src/components/TextField/TextField.tsx
index 0187b221fac..ff350548e08 100644
--- a/src/components/TextField/TextField.tsx
+++ b/src/components/TextField/TextField.tsx
@@ -32,7 +32,7 @@ export type Type =
type Alignment = 'left' | 'center' | 'right';
-export interface BaseProps {
+interface NonMutuallyExclusiveProps {
/** Text to display before value */
prefix?: React.ReactNode;
/** Text to display after value */
@@ -113,8 +113,6 @@ export interface BaseProps {
onBlur?(): void;
}
-interface NonMutuallyExclusiveProps extends BaseProps {}
-
export type TextFieldProps = NonMutuallyExclusiveProps &
(
| {readOnly: true}
diff --git a/src/components/TextField/components/Resizer/index.ts b/src/components/TextField/components/Resizer/index.ts
index 6cbba167431..03bce537bfb 100644
--- a/src/components/TextField/components/Resizer/index.ts
+++ b/src/components/TextField/components/Resizer/index.ts
@@ -1 +1 @@
-export {Resizer, ResizerProps} from './Resizer';
+export * from './Resizer';
diff --git a/src/components/TextField/components/Spinner/index.ts b/src/components/TextField/components/Spinner/index.ts
index 79b79fec8a8..b259397be42 100644
--- a/src/components/TextField/components/Spinner/index.ts
+++ b/src/components/TextField/components/Spinner/index.ts
@@ -1 +1 @@
-export {Spinner, SpinnerProps} from './Spinner';
+export * from './Spinner';
diff --git a/src/components/TextField/components/index.ts b/src/components/TextField/components/index.ts
index 41b2a0774da..48a4d2813d9 100644
--- a/src/components/TextField/components/index.ts
+++ b/src/components/TextField/components/index.ts
@@ -1,3 +1,3 @@
-export {Resizer, ResizerProps} from './Resizer';
+export * from './Resizer';
-export {Spinner, SpinnerProps} from './Spinner';
+export * from './Spinner';
diff --git a/src/components/TextField/index.ts b/src/components/TextField/index.ts
index 6913a907556..665fa3cb54f 100644
--- a/src/components/TextField/index.ts
+++ b/src/components/TextField/index.ts
@@ -1 +1 @@
-export {TextField, TextFieldProps, Type} from './TextField';
+export * from './TextField';
diff --git a/src/components/TextStyle/TextStyle.tsx b/src/components/TextStyle/TextStyle.tsx
index e27ee35ac19..afb181d9710 100644
--- a/src/components/TextStyle/TextStyle.tsx
+++ b/src/components/TextStyle/TextStyle.tsx
@@ -2,9 +2,9 @@ import React from 'react';
import {classNames, variationName} from '../../utilities/css';
import styles from './TextStyle.scss';
-export type Variation = 'positive' | 'negative' | 'strong' | 'subdued' | 'code';
+type Variation = 'positive' | 'negative' | 'strong' | 'subdued' | 'code';
-export enum VariationValue {
+enum VariationValue {
Positive = 'positive',
Negative = 'negative',
Strong = 'strong',
diff --git a/src/components/TextStyle/index.ts b/src/components/TextStyle/index.ts
index b4517a25895..96b3d89b9e5 100644
--- a/src/components/TextStyle/index.ts
+++ b/src/components/TextStyle/index.ts
@@ -1 +1 @@
-export {TextStyle, TextStyleProps, VariationValue} from './TextStyle';
+export * from './TextStyle';
diff --git a/src/components/ThemeProvider/index.ts b/src/components/ThemeProvider/index.ts
index abddf734c96..8abd195f695 100644
--- a/src/components/ThemeProvider/index.ts
+++ b/src/components/ThemeProvider/index.ts
@@ -1 +1 @@
-export {ThemeProvider} from './ThemeProvider';
+export * from './ThemeProvider';
diff --git a/src/components/Thumbnail/Thumbnail.tsx b/src/components/Thumbnail/Thumbnail.tsx
index 48dc48e11c7..dbc57912444 100644
--- a/src/components/Thumbnail/Thumbnail.tsx
+++ b/src/components/Thumbnail/Thumbnail.tsx
@@ -3,7 +3,7 @@ import {classNames, variationName} from '../../utilities/css';
import {Image} from '../Image';
import styles from './Thumbnail.scss';
-export type Size = 'small' | 'medium' | 'large';
+type Size = 'small' | 'medium' | 'large';
export interface ThumbnailProps {
/**
diff --git a/src/components/Thumbnail/index.ts b/src/components/Thumbnail/index.ts
index 1fc8db68dc5..ae7a4b48718 100644
--- a/src/components/Thumbnail/index.ts
+++ b/src/components/Thumbnail/index.ts
@@ -1 +1 @@
-export {Thumbnail, ThumbnailProps} from './Thumbnail';
+export * from './Thumbnail';
diff --git a/src/components/Toast/index.ts b/src/components/Toast/index.ts
index ce19e000d73..1b794ee7863 100644
--- a/src/components/Toast/index.ts
+++ b/src/components/Toast/index.ts
@@ -1 +1 @@
-export {Toast, ToastProps} from './Toast';
+export * from './Toast';
diff --git a/src/components/Tooltip/components/TooltipOverlay/index.ts b/src/components/Tooltip/components/TooltipOverlay/index.ts
index bdf4aa4de85..a1b7b52f491 100644
--- a/src/components/Tooltip/components/TooltipOverlay/index.ts
+++ b/src/components/Tooltip/components/TooltipOverlay/index.ts
@@ -1 +1 @@
-export {TooltipOverlay, TooltipOverlayProps} from './TooltipOverlay';
+export * from './TooltipOverlay';
diff --git a/src/components/Tooltip/components/index.ts b/src/components/Tooltip/components/index.ts
index bdf4aa4de85..a1b7b52f491 100644
--- a/src/components/Tooltip/components/index.ts
+++ b/src/components/Tooltip/components/index.ts
@@ -1 +1 @@
-export {TooltipOverlay, TooltipOverlayProps} from './TooltipOverlay';
+export * from './TooltipOverlay';
diff --git a/src/components/Tooltip/index.ts b/src/components/Tooltip/index.ts
index d5c73534c69..7594a8f06c1 100644
--- a/src/components/Tooltip/index.ts
+++ b/src/components/Tooltip/index.ts
@@ -1 +1 @@
-export {Tooltip, TooltipProps} from './Tooltip';
+export * from './Tooltip';
diff --git a/src/components/TopBar/components/Menu/components/Message/index.ts b/src/components/TopBar/components/Menu/components/Message/index.ts
index 2b1800255e2..cd58e0227ce 100644
--- a/src/components/TopBar/components/Menu/components/Message/index.ts
+++ b/src/components/TopBar/components/Menu/components/Message/index.ts
@@ -1 +1 @@
-export {Message, MessageProps} from './Message';
+export * from './Message';
diff --git a/src/components/TopBar/components/Menu/components/index.ts b/src/components/TopBar/components/Menu/components/index.ts
index 2b1800255e2..cd58e0227ce 100644
--- a/src/components/TopBar/components/Menu/components/index.ts
+++ b/src/components/TopBar/components/Menu/components/index.ts
@@ -1 +1 @@
-export {Message, MessageProps} from './Message';
+export * from './Message';
diff --git a/src/components/TopBar/components/Menu/index.ts b/src/components/TopBar/components/Menu/index.ts
index 89c19367947..629d3d0aa12 100644
--- a/src/components/TopBar/components/Menu/index.ts
+++ b/src/components/TopBar/components/Menu/index.ts
@@ -1 +1 @@
-export {Menu, MenuProps} from './Menu';
+export * from './Menu';
diff --git a/src/components/TopBar/components/Search/index.ts b/src/components/TopBar/components/Search/index.ts
index 243c5455de0..addd53308b6 100644
--- a/src/components/TopBar/components/Search/index.ts
+++ b/src/components/TopBar/components/Search/index.ts
@@ -1 +1 @@
-export {Search, SearchProps} from './Search';
+export * from './Search';
diff --git a/src/components/TopBar/components/SearchDismissOverlay/index.ts b/src/components/TopBar/components/SearchDismissOverlay/index.ts
index 20c7e35de17..c626f0dbe08 100644
--- a/src/components/TopBar/components/SearchDismissOverlay/index.ts
+++ b/src/components/TopBar/components/SearchDismissOverlay/index.ts
@@ -1 +1 @@
-export {SearchDismissOverlay} from './SearchDismissOverlay';
+export * from './SearchDismissOverlay';
diff --git a/src/components/TopBar/components/SearchField/index.ts b/src/components/TopBar/components/SearchField/index.ts
index e1ba3495270..9f5ef334723 100644
--- a/src/components/TopBar/components/SearchField/index.ts
+++ b/src/components/TopBar/components/SearchField/index.ts
@@ -1 +1 @@
-export {SearchField, SearchFieldProps} from './SearchField';
+export * from './SearchField';
diff --git a/src/components/TopBar/components/UserMenu/index.ts b/src/components/TopBar/components/UserMenu/index.ts
index f5f4cdc0a25..504e3c1e9cd 100644
--- a/src/components/TopBar/components/UserMenu/index.ts
+++ b/src/components/TopBar/components/UserMenu/index.ts
@@ -1 +1 @@
-export {UserMenu, UserMenuProps} from './UserMenu';
+export * from './UserMenu';
diff --git a/src/components/TopBar/components/index.ts b/src/components/TopBar/components/index.ts
index 154f1887aa4..d4e058d3688 100644
--- a/src/components/TopBar/components/index.ts
+++ b/src/components/TopBar/components/index.ts
@@ -1,9 +1,9 @@
-export {Search, SearchProps} from './Search';
+export * from './Search';
-export {SearchField, SearchFieldProps} from './SearchField';
+export * from './SearchField';
-export {SearchDismissOverlay} from './SearchDismissOverlay';
+export * from './SearchDismissOverlay';
-export {UserMenu, UserMenuProps} from './UserMenu';
+export * from './UserMenu';
-export {Menu, MenuProps} from './Menu';
+export * from './Menu';
diff --git a/src/components/TopBar/index.ts b/src/components/TopBar/index.ts
index 86bf3a41b23..0299e7c7aff 100644
--- a/src/components/TopBar/index.ts
+++ b/src/components/TopBar/index.ts
@@ -1,2 +1,2 @@
-export {TopBar, TopBarProps} from './TopBar';
+export * from './TopBar';
export {UserMenuProps, SearchFieldProps} from './components';
diff --git a/src/components/TrapFocus/index.ts b/src/components/TrapFocus/index.ts
index 351d6d991d7..cc130d214e9 100644
--- a/src/components/TrapFocus/index.ts
+++ b/src/components/TrapFocus/index.ts
@@ -1 +1 @@
-export {TrapFocus, TrapFocusProps} from './TrapFocus';
+export * from './TrapFocus';
diff --git a/src/components/Truncate/index.ts b/src/components/Truncate/index.ts
index 3ae870a200d..8591507863f 100644
--- a/src/components/Truncate/index.ts
+++ b/src/components/Truncate/index.ts
@@ -1 +1 @@
-export {Truncate, TruncateProps} from './Truncate';
+export * from './Truncate';
diff --git a/src/components/UnstyledLink/index.ts b/src/components/UnstyledLink/index.ts
index dd8a6d66069..e45632f0d6d 100644
--- a/src/components/UnstyledLink/index.ts
+++ b/src/components/UnstyledLink/index.ts
@@ -1 +1 @@
-export {UnstyledLink, UnstyledLinkProps} from './UnstyledLink';
+export * from './UnstyledLink';
diff --git a/src/components/VisuallyHidden/index.ts b/src/components/VisuallyHidden/index.ts
index 123d1933c0b..f11f3f421b2 100644
--- a/src/components/VisuallyHidden/index.ts
+++ b/src/components/VisuallyHidden/index.ts
@@ -1 +1 @@
-export {VisuallyHidden, VisuallyHiddenProps} from './VisuallyHidden';
+export * from './VisuallyHidden';
diff --git a/src/components/index.ts b/src/components/index.ts
index c40281bb0b2..6a373c50cf2 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -192,7 +192,7 @@ export {SettingToggle, SettingToggleProps} from './SettingToggle';
export {DATA_ATTRIBUTE} from './shared';
-export {Sheet} from './Sheet';
+export {Sheet, SheetProps} from './Sheet';
export {SkeletonBodyText, SkeletonBodyTextProps} from './SkeletonBodyText';
diff --git a/tests/build.test.ts b/tests/build.test.ts
index b0d10b23d33..4efcb498714 100644
--- a/tests/build.test.ts
+++ b/tests/build.test.ts
@@ -130,7 +130,7 @@ describe('build', () => {
'esnext/components/Avatar/index.js',
'utf8',
);
- expect(contents).toMatch("export { Avatar } from './Avatar'");
+ expect(contents).toMatch("export * from './Avatar'");
});
it('preserves ES scss imports', () => {