Skip to content

Commit

Permalink
[lab] Add use client directive (#40358)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai authored Jan 2, 2024
1 parent 1d4af61 commit 8837023
Show file tree
Hide file tree
Showing 57 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/mui-lab/src/Alert/Alert.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import Alert from '@mui/material/Alert';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/AlertTitle/AlertTitle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import AlertTitle from '@mui/material/AlertTitle';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Autocomplete/Autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import Autocomplete from '@mui/material/Autocomplete';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/AvatarGroup/AvatarGroup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import AvatarGroup from '@mui/material/AvatarGroup';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/CalendarPicker/CalendarPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/ClockPicker/ClockPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/DateTimePicker/DateTimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/LoadingButton/LoadingButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import { chainPropTypes } from '@mui/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';

let warnedOnce = false;
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Masonry/Masonry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import { unstable_composeClasses as composeClasses } from '@mui/base';
import * as ReactDOM from 'react-dom';
import { styled, useThemeProps } from '@mui/material/styles';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/MobileDatePicker/MobileDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/MobileTimePicker/MobileTimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/MonthPicker/MonthPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Pagination/Pagination.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import Pagination from '@mui/material/Pagination';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Pagination/usePagination.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
'use client';
export { default } from '@mui/material/usePagination';
1 change: 1 addition & 0 deletions packages/mui-lab/src/PaginationItem/PaginationItem.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PaginationItem from '@mui/material/PaginationItem';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/PickersDay/PickersDay.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Rating/Rating.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import Rating from '@mui/material/Rating';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Skeleton/Skeleton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import Skeleton from '@mui/material/Skeleton';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/SpeedDial/SpeedDial.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import SpeedDial from '@mui/material/SpeedDial';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/SpeedDialAction/SpeedDialAction.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import SpeedDialAction from '@mui/material/SpeedDialAction';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/SpeedDialIcon/SpeedDialIcon.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import SpeedDialIcon from '@mui/material/SpeedDialIcon';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/StaticDatePicker/StaticDatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/StaticTimePicker/StaticTimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TabContext/TabContext.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TabList/TabList.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import Tabs from '@mui/material/Tabs';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TabPanel/TabPanel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/Timeline/Timeline.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TimelineContent/TimelineContent.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TimelineDot/TimelineDot.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TimelineItem/TimelineItem.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/ToggleButton/ToggleButton.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import ToggleButton from '@mui/material/ToggleButton';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TreeItem/TreeItem.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';

let warnedOnce = false;
Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/TreeView/TreeView.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/YearPicker/YearPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as React from 'react';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/ArrowDropDown.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/ArrowDropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/ArrowLeft.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/ArrowRight.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/Calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/Clock.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/DateRange.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/Pen.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/mui-lab/src/internal/svg-icons/Time.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import * as React from 'react';
import { createSvgIcon } from '@mui/material/utils';

Expand Down
4 changes: 4 additions & 0 deletions packages/rsc-builder/buildRsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const PROJECTS: Project[] = [
additionalPaths: ['custom'],
additionalFiles: ['src/utils/createSvgIcon.js'],
},
{
name: 'lab',
rootPath: path.join(process.cwd(), 'packages/mui-lab'),
},
];

async function processFile(
Expand Down

0 comments on commit 8837023

Please sign in to comment.