Skip to content

Commit 39ea7d3

Browse files
authored
[core-docs] Use type-only imports for type-only references (mui#48386)
1 parent 94a7b2d commit 39ea7d3

57 files changed

Lines changed: 96 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages-internal/core-docs/src/Ad/AdInHouse.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import AdDisplay, { AdParameters } from './AdDisplay';
1+
import AdDisplay, { type AdParameters } from './AdDisplay';
22

33
export default function AdInHouse(props: { ad: Omit<AdParameters, 'poweredby' | 'label'> }) {
44
const { ad } = props;

packages-internal/core-docs/src/Ad/ad.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { alpha, Theme } from '@mui/material/styles';
1+
import { alpha, type Theme } from '@mui/material/styles';
22

33
export type AdBodyStyles = Record<string, Record<string, unknown>>;
44

packages-internal/core-docs/src/ApiPage/ApiPage.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import VerifiedRoundedIcon from '@mui/icons-material/VerifiedRounded';
77
import WarningRoundedIcon from '@mui/icons-material/WarningRounded';
88
import { Ad, AdGuest } from '../Ad';
99
import type { TocItem, LayoutStorageKeys } from './types';
10-
import { Translate, useTranslate, useUserLanguage } from '../i18n';
10+
import { type Translate, useTranslate, useUserLanguage } from '../i18n';
1111
import { HighlightedCode } from '../HighlightedCode';
1212
import { BrandingProvider, BrandingCssVarsProvider } from '../branding';
13-
import { SectionTitle, SectionTitleProps } from '../SectionTitle';
13+
import { SectionTitle, type SectionTitleProps } from '../SectionTitle';
1414
import { MarkdownElement } from '../MarkdownDocs/MarkdownElement';
1515
import { AppLayoutDocs } from '../AppLayout';
1616
import { getPropertiesToc, getPropsApiDefinitions } from './definitions/properties';
1717
import { getClassesToc, getClassApiDefinitions } from './definitions/classes';
1818
import { getSlotsApiDefinitions, getSlotsToc } from './definitions/slots';
19-
import { ApiDisplayLayout, DEFAULT_API_LAYOUT_STORAGE_KEYS } from './sections/ToggleDisplayOption';
19+
import {
20+
type ApiDisplayLayout,
21+
DEFAULT_API_LAYOUT_STORAGE_KEYS,
22+
} from './sections/ToggleDisplayOption';
2023
import { PropertiesSection } from './sections/PropertiesSection';
2124
import { SlotsSection } from './sections/SlotsSection';
2225
import { ClassesSection } from './sections/ClassesSection';

packages-internal/core-docs/src/ApiPage/ComponentsApiContent.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ import * as React from 'react';
33
import type { ComponentApiContent, PropsTranslations } from '@mui/internal-api-docs-builder';
44
import { kebabCase } from 'es-toolkit/string';
55
import { useRouter } from 'next/router';
6-
import { Translate, useTranslate, useUserLanguage } from '../i18n';
7-
import { SectionTitle, SectionTitleProps } from '../SectionTitle';
6+
import { type Translate, useTranslate, useUserLanguage } from '../i18n';
7+
import { SectionTitle, type SectionTitleProps } from '../SectionTitle';
88
import { HighlightedCode } from '../HighlightedCode';
99
import { MarkdownElement } from '../MarkdownDocs/MarkdownElement';
1010
import type { LayoutStorageKeys } from './types';
1111
import { getPropsApiDefinitions } from './definitions/properties';
1212
import { getClassApiDefinitions } from './definitions/classes';
1313
import { getSlotsApiDefinitions } from './definitions/slots';
14-
import { ApiDisplayLayout, DEFAULT_API_LAYOUT_STORAGE_KEYS } from './sections/ToggleDisplayOption';
14+
import {
15+
type ApiDisplayLayout,
16+
DEFAULT_API_LAYOUT_STORAGE_KEYS,
17+
} from './sections/ToggleDisplayOption';
1518
import { PropertiesSection } from './sections/PropertiesSection';
1619
import { SlotsSection } from './sections/SlotsSection';
1720
import { ClassesSection } from './sections/ClassesSection';

packages-internal/core-docs/src/ApiPage/HooksApiContent.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
import * as React from 'react';
33
import type { HookApiContent, HooksTranslations } from '@mui/internal-api-docs-builder';
44
import { kebabCase } from 'es-toolkit/string';
5-
import { Translate, useTranslate, useUserLanguage } from '../i18n';
6-
import { SectionTitle, SectionTitleProps } from '../SectionTitle';
5+
import { type Translate, useTranslate, useUserLanguage } from '../i18n';
6+
import { SectionTitle, type SectionTitleProps } from '../SectionTitle';
77
import type { LayoutStorageKeys } from './types';
88
import { getHookApiDefinitions } from './definitions/properties';
9-
import { ApiDisplayLayout, DEFAULT_API_LAYOUT_STORAGE_KEYS } from './sections/ToggleDisplayOption';
9+
import {
10+
type ApiDisplayLayout,
11+
DEFAULT_API_LAYOUT_STORAGE_KEYS,
12+
} from './sections/ToggleDisplayOption';
1013
import { PropertiesSection } from './sections/PropertiesSection';
1114
import { HighlightedCode } from '../HighlightedCode';
1215
import { MarkdownElement } from '../MarkdownDocs/MarkdownElement';

packages-internal/core-docs/src/ApiPage/list/ClassesList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { styled } from '@mui/material/styles';
33
import { useTranslate } from '../../i18n';
44
import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from '../../branding';
55
import { ApiItemContainer, ExpandableApiItem } from './ExpandableApiItem';
6-
import { ClassDefinition } from '../definitions/types';
6+
import { type ClassDefinition } from '../definitions/types';
77
import { ApiWarningAlert } from '../ApiWarningAlert';
88

99
const StyledApiItem = styled(ExpandableApiItem)(

packages-internal/core-docs/src/ApiPage/list/ExpandableApiItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import clsx from 'clsx';
3-
import { alpha, styled, SxProps } from '@mui/material/styles';
3+
import { alpha, styled, type SxProps } from '@mui/material/styles';
44
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
55
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
66
import Divider from '@mui/material/Divider';

packages-internal/core-docs/src/ApiPage/list/PropertiesList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Tooltip from '@mui/material/Tooltip';
55
import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from '../../branding';
66
import { useTranslate } from '../../i18n';
77
import { ApiItemContainer, ExpandableApiItem } from './ExpandableApiItem';
8-
import { PropertyDefinition } from '../definitions';
8+
import { type PropertyDefinition } from '../definitions';
99
import { ApiWarningAlert } from '../ApiWarningAlert';
1010

1111
const StyledApiItem = styled(ExpandableApiItem)(

packages-internal/core-docs/src/ApiPage/list/SlotsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { alpha, styled } from '@mui/material/styles';
22
import { brandingDarkTheme as darkTheme, brandingLightTheme as lightTheme } from '../../branding';
33
import { useTranslate } from '../../i18n';
4-
import { SlotDefinition } from '../definitions';
4+
import { type SlotDefinition } from '../definitions';
55
import { ApiItemContainer, ExpandableApiItem } from './ExpandableApiItem';
66

77
const StyledApiItem = styled(ExpandableApiItem)(

packages-internal/core-docs/src/ApiPage/sections/ClassesSection.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
/* eslint-disable react/no-danger */
22
import * as React from 'react';
33
import Box from '@mui/material/Box';
4-
import { PropsTranslations, ComponentClassDefinition } from '@mui/internal-api-docs-builder';
4+
import {
5+
type PropsTranslations,
6+
type ComponentClassDefinition,
7+
} from '@mui/internal-api-docs-builder';
58
import { SectionTitle } from '../../SectionTitle';
69
import { useTranslate } from '../../i18n';
710
import type { ClassDefinition } from '../definitions/types';
8-
import { ApiDisplayLayout, ToggleDisplayOption, useApiPageOption } from './ToggleDisplayOption';
11+
import {
12+
type ApiDisplayLayout,
13+
ToggleDisplayOption,
14+
useApiPageOption,
15+
} from './ToggleDisplayOption';
916
import { getClassApiDefinitions } from '../definitions/classes';
1017
import ClassesTable from '../table/ClassesTable';
1118
import ClassesList from '../list/ClassesList';

0 commit comments

Comments
 (0)