Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into revert-overrideprops
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Jul 25, 2023
2 parents f3323b5 + 08272d7 commit 0da0d4c
Show file tree
Hide file tree
Showing 192 changed files with 3,579 additions and 1,206 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
steps:
- run:
name: Should not have any git not staged
command: git diff --exit-code
command: git add -A && git diff --exit-code --staged
- run:
name: Check for duplicated packages
command: yarn deduplicate
Expand Down Expand Up @@ -222,35 +222,35 @@ jobs:
command: yarn proptypes
- run:
name: '`yarn proptypes` changes committed?'
command: git diff --exit-code
command: git add -A && git diff --exit-code --staged
- run:
name: 'Write "use client" directive'
command: yarn rsc:build
- run:
name: '`yarn rsc:build` changes detected, "use client" missing from exports'
command: git diff --exit-code
command: git add -A && git diff --exit-code --staged
- run:
name: Generate the documentation
command: yarn docs:api
- run:
name: '`yarn docs:api` changes committed?'
command: git diff --exit-code
command: git add -A && git diff --exit-code --staged
- run:
name: Update the navigation translations
command: yarn docs:i18n
- run:
name: '`yarn docs:i18n` changes committed?'
command: git diff --exit-code
command: git add -A && git diff --exit-code --staged
- run:
name: '`yarn extract-error-codes` changes committed?'
command: |
yarn extract-error-codes
git diff --exit-code
git add -A && git diff --exit-code --staged
- run:
name: '`yarn docs:link-check` changes committed?'
command: |
yarn docs:link-check
git diff --exit-code
git add -A && git diff --exit-code --staged
test_types:
<<: *defaults
resource_class: 'medium+'
Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ If you're reading this, you're awesome! Thank you for helping us make this proje
- [Coding style](#coding-style)
- [How to add a new demo in the documentation](#how-to-add-a-new-demo-in-the-documentation)
- [How can I use a change that wasn't released yet?](#how-can-i-use-a-change-that-wasnt-released-yet)
- [Translations](#translations)
- [Roadmap](#roadmap)
- [License](#license)

Expand Down Expand Up @@ -345,13 +344,6 @@ $test-project> npm i ./path-to-file/mui-material-x.x.x.tar.gz
> If you have already installed this package, your changes will not be reflected when you reinstall it.
> As a quick fix, you can temporarily bump the version number in your `package.json` before running `yarn build`.
## Translations

Translations are handled via [Crowdin](https://translate.mui.com).
You don't need to apply any changes to localized versions of our markdown files
i.e. files having a `-locale` suffix. Crowdin automatically takes care of syncing
these changes across the localized versions.

## Roadmap

To get a sense of where MUI is heading, or for ideas on where you could contribute, take a look at the [roadmap](https://mui.com/material-ui/discover-more/roadmap/).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Diamond Sponsors are those who have pledged \$1,500/month or more to MUI.
via [OpenCollective](https://opencollective.com/mui) or via [Patreon](https://www.patreon.com/oliviertassinari)

<p>
<a href="https://tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://avatars.githubusercontent.com/u/30204434?s=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
<a href="https://www.tidelift.com/subscription/pkg/npm-material-ui?utm_source=npm-material-ui&utm_medium=referral&utm_campaign=homepage" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://avatars.githubusercontent.com/u/30204434?s=192" alt="tidelift.com" title="Enterprise-ready open-source software" loading="lazy" /></a>
<a href="https://www.text-em-all.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img src="https://avatars.githubusercontent.com/u/1262264?s=192" alt="text-em-all.com" title="Mass Text Messaging & Automated Calling" height="96" width="96" loading="lazy"></a>
<a href="https://open.spotify.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://images.opencollective.com/spotify/f37ea28/logo/192.png" alt="Spotify" title="Music service to access to millions of songs" loading="lazy" /></a>
<a href="https://megafamous.com/?utm_source=MUI&utm_medium=referral&utm_content=readme" rel="noopener sponsored" target="_blank"><img height="96" width="96" src="https://mui.com/static/sponsors/megafamous.png" alt="megafamous.com" title="The best place to buy Instagram followers & likes." loading="lazy" /></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function UnstyledButtonsSimple() {
Button
</Button>
<Button
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-6 py-2 border-none disabled:opacity-50"
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-4 py-2 border-none disabled:opacity-50"
disabled
>
Disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function UnstyledButtonsSimple() {
Button
</Button>
<Button
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-6 py-2 border-none disabled:opacity-50"
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-4 py-2 border-none disabled:opacity-50"
disabled
>
Disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Button
</Button>
<Button
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-6 py-2 border-none disabled:opacity-50"
className="cursor-pointer disabled:cursor-not-allowed text-sm bg-violet-500 text-white rounded-md font-semibold px-4 py-2 border-none disabled:opacity-50"
disabled
>
Disabled
Expand Down
121 changes: 121 additions & 0 deletions docs/data/base/components/tabs/UnstyledTabsCustomized/css/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import * as React from 'react';
import { useTheme } from '@mui/system';
import Tabs from '@mui/base/Tabs';
import TabsList from '@mui/base/TabsList';
import TabPanel from '@mui/base/TabPanel';
import { buttonClasses } from '@mui/base/Button';
import Tab, { tabClasses } from '@mui/base/Tab';

export default function UnstyledTabsCustomized() {
return (
<React.Fragment>
<Tabs defaultValue={1}>
<TabsList className="CustomTabsList">
<Tab className="CustomTab" value={1}>
One
</Tab>
<Tab className="CustomTab" value={2}>
Two
</Tab>
<Tab className="CustomTab" value={3}>
Three
</Tab>
</TabsList>
<TabPanel className="CustomTabPanel" value={1}>
First page
</TabPanel>
<TabPanel className="CustomTabPanel" value={2}>
Second page
</TabPanel>
<TabPanel className="CustomTabPanel" value={3}>
Third page
</TabPanel>
</Tabs>
<Styles />
</React.Fragment>
);
}

const cyan = {
50: '#E9F8FC',
100: '#BDEBF4',
200: '#99D8E5',
300: '#66BACC',
400: '#1F94AD',
500: '#0D5463',
600: '#094855',
700: '#063C47',
800: '#043039',
900: '#022127',
};

function useIsDarkMode() {
const theme = useTheme();
return theme.palette.mode === 'dark';
}

function Styles() {
// Replace this with your app logic for determining dark mode
const isDarkMode = useIsDarkMode();
return (
<style>
{`
.CustomTabsList {
min-width: 400px;
background-color: ${cyan[500]};
border-radius: 12px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: center;
align-content: space-between;
box-shadow: 0px 4px 6px ${
isDarkMode ? 'rgba(0,0,0, 0.4)' : 'rgba(0,0,0, 0.2)'
};
}
.CustomTab {
font-family: 'IBM Plex Sans', sans-serif;
color: white;
cursor: pointer;
font-size: 0.875rem;
font-weight: bold;
background-color: transparent;
width: 100%;
line-height: 1.5;
padding: 8px 12px;
margin: 6px;
border: none;
border-radius: 8px;
display: flex;
justify-content: center;
}
.CustomTab:hover {
background-color: ${cyan[400]};
}
.CustomTab:focus {
color: #fff;
outline: 3px solid ${cyan[200]};
}
.CustomTab.${tabClasses.selected} {
background-color: #fff;
color: ${cyan[600]};
}
.CustomTab.${buttonClasses.disabled} {
opacity: 0.5;
cursor: not-allowed;
}
.CustomTabPanel {
width: 100%;
font-family: 'IBM Plex Sans', sans-serif;
font-size: 0.875rem;
}
`}
</style>
);
}
121 changes: 121 additions & 0 deletions docs/data/base/components/tabs/UnstyledTabsCustomized/css/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import * as React from 'react';
import { useTheme } from '@mui/system';
import Tabs from '@mui/base/Tabs';
import TabsList from '@mui/base/TabsList';
import TabPanel from '@mui/base/TabPanel';
import { buttonClasses } from '@mui/base/Button';
import Tab, { tabClasses } from '@mui/base/Tab';

export default function UnstyledTabsCustomized() {
return (
<React.Fragment>
<Tabs defaultValue={1}>
<TabsList className="CustomTabsList">
<Tab className="CustomTab" value={1}>
One
</Tab>
<Tab className="CustomTab" value={2}>
Two
</Tab>
<Tab className="CustomTab" value={3}>
Three
</Tab>
</TabsList>
<TabPanel className="CustomTabPanel" value={1}>
First page
</TabPanel>
<TabPanel className="CustomTabPanel" value={2}>
Second page
</TabPanel>
<TabPanel className="CustomTabPanel" value={3}>
Third page
</TabPanel>
</Tabs>
<Styles />
</React.Fragment>
);
}

const cyan = {
50: '#E9F8FC',
100: '#BDEBF4',
200: '#99D8E5',
300: '#66BACC',
400: '#1F94AD',
500: '#0D5463',
600: '#094855',
700: '#063C47',
800: '#043039',
900: '#022127',
};

function useIsDarkMode() {
const theme = useTheme();
return theme.palette.mode === 'dark';
}

function Styles() {
// Replace this with your app logic for determining dark mode
const isDarkMode = useIsDarkMode();
return (
<style>
{`
.CustomTabsList {
min-width: 400px;
background-color: ${cyan[500]};
border-radius: 12px;
margin-bottom: 16px;
display: flex;
align-items: center;
justify-content: center;
align-content: space-between;
box-shadow: 0px 4px 6px ${
isDarkMode ? 'rgba(0,0,0, 0.4)' : 'rgba(0,0,0, 0.2)'
};
}
.CustomTab {
font-family: 'IBM Plex Sans', sans-serif;
color: white;
cursor: pointer;
font-size: 0.875rem;
font-weight: bold;
background-color: transparent;
width: 100%;
line-height: 1.5;
padding: 8px 12px;
margin: 6px;
border: none;
border-radius: 8px;
display: flex;
justify-content: center;
}
.CustomTab:hover {
background-color: ${cyan[400]};
}
.CustomTab:focus {
color: #fff;
outline: 3px solid ${cyan[200]};
}
.CustomTab.${tabClasses.selected} {
background-color: #fff;
color: ${cyan[600]};
}
.CustomTab.${buttonClasses.disabled} {
opacity: 0.5;
cursor: not-allowed;
}
.CustomTabPanel {
width: 100%;
font-family: 'IBM Plex Sans', sans-serif;
font-size: 0.875rem;
}
`}
</style>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@ const blue = {
900: '#003A75',
};

const grey = {
50: '#f6f8fa',
100: '#eaeef2',
200: '#d0d7de',
300: '#afb8c1',
400: '#8c959f',
500: '#6e7781',
600: '#57606a',
700: '#424a53',
800: '#32383f',
900: '#24292f',
};

const StyledTab = styled(Tab)`
font-family: 'IBM Plex Sans', sans-serif;
color: white;
Expand All @@ -55,10 +42,11 @@ const StyledTab = styled(Tab)`
font-weight: bold;
background-color: transparent;
width: 100%;
padding: 12px;
line-height: 1.5;
padding: 8px 12px;
margin: 6px;
border: none;
border-radius: 7px;
border-radius: 8px;
display: flex;
justify-content: center;
Expand Down Expand Up @@ -98,6 +86,8 @@ const StyledTabsList = styled(TabsList)(
align-items: center;
justify-content: center;
align-content: space-between;
box-shadow: 0px 4px 8px ${theme.palette.mode === 'dark' ? grey[900] : grey[200]};
box-shadow: 0px 4px 6px ${
theme.palette.mode === 'dark' ? 'rgba(0,0,0, 0.4)' : 'rgba(0,0,0, 0.2)'
};
`,
);
Loading

0 comments on commit 0da0d4c

Please sign in to comment.