Skip to content

Commit

Permalink
Try fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Aug 5, 2024
1 parent 6134015 commit db1bbba
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 342 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ jobs:
name: Tests TypeScript definitions
command: pnpm typescript:ci
environment:
NODE_OPTIONS: --max-old-space-size=1536
NODE_OPTIONS: --max-old-space-size=3584
test_e2e:
<<: *default-job
docker:
Expand Down
68 changes: 2 additions & 66 deletions docs/data/date-pickers/adapters-locale/PickersRTL.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import Box from '@mui/material/Box';
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { DateRangeCalendar } from '@mui/x-date-pickers-pro/DateRangeCalendar';
import { MultiSectionDigitalClock } from '@mui/x-date-pickers/MultiSectionDigitalClock';

// Create rtl cache
const cacheRtl = createCache({
key: 'pickers-rtl-demo',
stylisPlugins: [prefixer, rtlPlugin],
});

export default function PickersRTL() {
// Inherit the theme from the docs site (dark/light mode)
const existingTheme = useTheme();

const theme = React.useMemo(
() =>
createTheme({}, existingTheme, {
direction: 'rtl',
}),
[existingTheme],
);

return (
<CacheProvider value={cacheRtl}>
<ThemeProvider theme={theme}>
<div dir="rtl">
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer
components={[
'DatePicker',
'DateRangeCalendar',
'MultiSectionDigitalClock',
]}
>
<DatePicker
// Setting `dir="rtl"` on the paper is needed if the `<div dir="rtl />` does not contain the portaled element.
// If you set `dir="rtl"` on the `<body />`, you can skip it.
slotProps={{
desktopPaper: {
dir: 'rtl',
},
mobilePaper: {
dir: 'rtl',
},
}}
/>
<DateRangeCalendar />
<Box sx={{ width: 56 * 3 }}>
<MultiSectionDigitalClock />
</Box>
</DemoContainer>
</LocalizationProvider>
</div>
</ThemeProvider>
</CacheProvider>
);
export function PickersRTL() {
return null;
}
68 changes: 2 additions & 66 deletions docs/data/date-pickers/adapters-locale/PickersRTL.tsx
Original file line number Diff line number Diff line change
@@ -1,67 +1,3 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import Box from '@mui/material/Box';
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { DatePicker } from '@mui/x-date-pickers/DatePicker';
import { DateRangeCalendar } from '@mui/x-date-pickers-pro/DateRangeCalendar';
import { MultiSectionDigitalClock } from '@mui/x-date-pickers/MultiSectionDigitalClock';

// Create rtl cache
const cacheRtl = createCache({
key: 'pickers-rtl-demo',
stylisPlugins: [prefixer, rtlPlugin],
});

export default function PickersRTL() {
// Inherit the theme from the docs site (dark/light mode)
const existingTheme = useTheme();

const theme = React.useMemo(
() =>
createTheme({}, existingTheme, {
direction: 'rtl',
}),
[existingTheme],
);

return (
<CacheProvider value={cacheRtl}>
<ThemeProvider theme={theme}>
<div dir="rtl">
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DemoContainer
components={[
'DatePicker',
'DateRangeCalendar',
'MultiSectionDigitalClock',
]}
>
<DatePicker
// Setting `dir="rtl"` on the paper is needed if the `<div dir="rtl />` does not contain the portaled element.
// If you set `dir="rtl"` on the `<body />`, you can skip it.
slotProps={{
desktopPaper: {
dir: 'rtl',
},
mobilePaper: {
dir: 'rtl',
},
}}
/>
<DateRangeCalendar />
<Box sx={{ width: 56 * 3 }}>
<MultiSectionDigitalClock />
</Box>
</DemoContainer>
</LocalizationProvider>
</div>
</ThemeProvider>
</CacheProvider>
);
export function PickersRTL() {
return null;
}
5 changes: 2 additions & 3 deletions docs/data/date-pickers/calendar-systems/AdapterHijri.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import moment from 'moment-hijri';
Expand All @@ -11,8 +10,8 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';

// Create rtl cache
const cacheRtl = createCache({
key: 'adapter-hijri-demo',
stylisPlugins: [prefixer, rtlPlugin],
key: 'data-grid-rtl-demo',
stylisPlugins: [prefixer],
});

export default function AdapterHijri() {
Expand Down
5 changes: 2 additions & 3 deletions docs/data/date-pickers/calendar-systems/AdapterHijri.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import moment from 'moment-hijri';
Expand All @@ -11,8 +10,8 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';

// Create rtl cache
const cacheRtl = createCache({
key: 'adapter-hijri-demo',
stylisPlugins: [prefixer, rtlPlugin],
key: 'data-grid-rtl-demo',
stylisPlugins: [prefixer],
});

export default function AdapterHijri() {
Expand Down
51 changes: 2 additions & 49 deletions docs/data/date-pickers/calendar-systems/AdapterJalali.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';

// Create rtl cache
const cacheRtl = createCache({
key: 'adapter-jalali-demo',
stylisPlugins: [prefixer, rtlPlugin],
});

export default function AdapterJalali() {
// Inherit the theme from the docs site (dark/light mode)
const existingTheme = useTheme();

const theme = React.useMemo(
() => createTheme(existingTheme, { direction: 'rtl' }),
[existingTheme],
);

return (
<CacheProvider value={cacheRtl}>
<ThemeProvider theme={theme}>
<div dir="rtl">
<LocalizationProvider dateAdapter={AdapterDateFnsJalali}>
<DateTimePicker
label="AdapterDateFnsJalali"
defaultValue={new Date(2022, 1, 1, 12)}
// Setting `dir="rtl"` on the paper is needed if the `<div dir="rtl />` does not contain the portaled element.
// If you set `dir="rtl"` on the `<body />`, you can skip it.
slotProps={{
desktopPaper: {
dir: 'rtl',
},
mobilePaper: {
dir: 'rtl',
},
}}
/>
</LocalizationProvider>
</div>
</ThemeProvider>
</CacheProvider>
);
export function PickersRTL() {
return null;
}
51 changes: 2 additions & 49 deletions docs/data/date-pickers/calendar-systems/AdapterJalali.tsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,3 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';

// Create rtl cache
const cacheRtl = createCache({
key: 'adapter-jalali-demo',
stylisPlugins: [prefixer, rtlPlugin],
});

export default function AdapterJalali() {
// Inherit the theme from the docs site (dark/light mode)
const existingTheme = useTheme();

const theme = React.useMemo(
() => createTheme(existingTheme, { direction: 'rtl' }),
[existingTheme],
);

return (
<CacheProvider value={cacheRtl}>
<ThemeProvider theme={theme}>
<div dir="rtl">
<LocalizationProvider dateAdapter={AdapterDateFnsJalali}>
<DateTimePicker
label="AdapterDateFnsJalali"
defaultValue={new Date(2022, 1, 1, 12)}
// Setting `dir="rtl"` on the paper is needed if the `<div dir="rtl />` does not contain the portaled element.
// If you set `dir="rtl"` on the `<body />`, you can skip it.
slotProps={{
desktopPaper: {
dir: 'rtl',
},
mobilePaper: {
dir: 'rtl',
},
}}
/>
</LocalizationProvider>
</div>
</ThemeProvider>
</CacheProvider>
);
export function PickersRTL() {
return null;
}
54 changes: 2 additions & 52 deletions docs/data/date-pickers/calendar-systems/AdapterMomentJalali.js
Original file line number Diff line number Diff line change
@@ -1,53 +1,3 @@
import * as React from 'react';
import { prefixer } from 'stylis';
import rtlPlugin from 'stylis-plugin-rtl';
import createCache from '@emotion/cache';
import { CacheProvider } from '@emotion/react';
import moment from 'moment-jalaali';
import { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';

// Create rtl cache
const cacheRtl = createCache({
key: 'adapter-moment-jalali-demo',
stylisPlugins: [prefixer, rtlPlugin],
});

export default function AdapterMomentJalali() {
moment.loadPersian({ dialect: 'persian-modern' });

// Inherit the theme from the docs site (dark/light mode)
const existingTheme = useTheme();

const theme = React.useMemo(
() => createTheme(existingTheme, { direction: 'rtl' }),
[existingTheme],
);

return (
<CacheProvider value={cacheRtl}>
<ThemeProvider theme={theme}>
<div dir="rtl">
<LocalizationProvider dateAdapter={AdapterMomentJalaali}>
<DateTimePicker
label="AdapterMomentJalaali"
defaultValue={moment('2022-02-01T12:00:00')}
// Setting `dir="rtl"` on the paper is needed if the `<div dir="rtl />` does not contain the portaled element.
// If you set `dir="rtl"` on the `<body />`, you can skip it.
slotProps={{
desktopPaper: {
dir: 'rtl',
},
mobilePaper: {
dir: 'rtl',
},
}}
/>
</LocalizationProvider>
</div>
</ThemeProvider>
</CacheProvider>
);
export function PickersRTL() {
return null;
}
Loading

0 comments on commit db1bbba

Please sign in to comment.