Skip to content

Commit

Permalink
Merge branch 'master' into stepcontent-slots
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 authored Dec 17, 2024
2 parents 3dc1b68 + 17026fc commit 1f6d8c6
Show file tree
Hide file tree
Showing 51 changed files with 1,166 additions and 959 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2.1
orbs:
aws-cli: circleci/aws-cli@5.1.1
aws-cli: circleci/aws-cli@5.1.2
aws-s3: circleci/aws-s3@4.1.0

parameters:
Expand Down
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*/

const path = require('path');
const a11yBase = require('eslint-config-airbnb/rules/react-a11y');

const controlHasAssociatedLabelConfig = a11yBase.rules['jsx-a11y/control-has-associated-label'];

const controlHasAssociatedLabelOptions =
typeof controlHasAssociatedLabelConfig[1] === 'object' ? controlHasAssociatedLabelConfig[1] : {};

const OneLevelImportMessage = [
'Prefer one level nested imports to avoid bundling everything in dev mode or breaking CJS/ESM split.',
Expand Down Expand Up @@ -158,6 +164,16 @@ module.exports = /** @type {Config} */ ({
],
// We are a library, we need to support it too
'jsx-a11y/no-autofocus': 'off',
// Remove when issues are fixed
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/959
// https://github.com/airbnb/javascript/issues/3069
'jsx-a11y/control-has-associated-label': [
'error',
{
...controlHasAssociatedLabelOptions,
ignoreElements: [...(controlHasAssociatedLabelOptions.ignoreElements || []), 'th', 'td'],
},
],

'material-ui/docgen-ignore-before-comment': 'error',
'material-ui/rules-of-use-theme-variants': 'error',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
languages: typescript
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -30,4 +30,4 @@ jobs:
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
sarif_file: results.sarif
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# [Versions](https://mui.com/versions/)

## 6.2.1

<!-- generated comparing v6.2.0..master -->

_Dec 17, 2024_

A big thanks to the 10 contributors who made this release possible.

### `@mui/material@6.2.1`

- Update `overridesResolver` return from object to array of styles (#44752) @siddhantantil39
- [Pagination] Use correct `aria-current` value (#44753) @jacklaurencegaray
- [Select] Set `aria-required` & `aria-invalid` on `combobox` instead of hidden input (#44731) @ben-pomelo

### `@mui/system@6.2.1`

- Warns if the hex color contains trailing space (#44538) @siriwatknp

### Docs

- [material-ui][Dialog] Fix crashing of DraggableDialog demo (#44747) @sai6855
- [material-ui][TextField] Update `react-number-format` demo to use the recommended prop (#44743) @siriwatknp
- [material-ui][TextField] Add size default prop to api docs (#44714) @sai6855
- [material-ui][TextField] Add suffix shrink demo (#44744) @siriwatknp

### Core

- [api-docs-builder] Preserve multiline prop descriptions with `rawDescriptions` option (#44737) @vladmoroz
- Fix running mocha related scripts on Windows locally (#44664) @ChristopherJamesL
- Update `eslint-plugin-jsx-a11y` (#44701) @ZeeshanTamboli
- Add documentation to `useThemeProps`, `deepmerge` and `composeClasses` functions (#44703) @JCQuintas
- [examples] Add Theme Mode Switch to Next.js TS example (#43576) @TurtIeSocks

All contributors of this release in alphabetical order: @ben-pomelo, @ChristopherJamesL, @jacklaurencegaray, @JCQuintas, @sai6855, @siddhantantil39, @siriwatknp, @TurtIeSocks, @vladmoroz, @ZeeshanTamboli

## 6.2.0

<!-- generated comparing v6.1.10..master -->
Expand Down
6 changes: 3 additions & 3 deletions apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.28",
"@types/node": "^20.17.9",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/node": "^20.17.10",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"eslint": "^8.57.1",
"typescript": "^5.7.2"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@pigment-css/vite-plugin": "0.0.28",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-react": "^4.3.4",
"postcss": "^8.4.49",
Expand Down
44 changes: 6 additions & 38 deletions docs/data/material/components/text-fields/FormattedInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,6 @@ TextMaskCustom.propTypes = {
onChange: PropTypes.func.isRequired,
};

const NumericFormatCustom = React.forwardRef(
function NumericFormatCustom(props, ref) {
const { onChange, ...other } = props;

return (
<NumericFormat
{...other}
getInputRef={ref}
onValueChange={(values) => {
onChange({
target: {
name: props.name,
value: values.value,
},
});
}}
thousandSeparator
valueIsNumericString
prefix="$"
/>
);
},
);

NumericFormatCustom.propTypes = {
name: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
};

export default function FormattedInputs() {
const [values, setValues] = React.useState({
textmask: '(100) 000-0000',
Expand All @@ -83,18 +54,15 @@ export default function FormattedInputs() {
inputComponent={TextMaskCustom}
/>
</FormControl>
<TextField
label="react-number-format"
<NumericFormat
value={values.numberformat}
onChange={handleChange}
name="numberformat"
id="formatted-numberformat-input"
slotProps={{
input: {
inputComponent: NumericFormatCustom,
},
}}
customInput={TextField}
thousandSeparator
valueIsNumericString
prefix="$"
variant="standard"
label="react-number-format"
/>
</Stack>
);
Expand Down
41 changes: 7 additions & 34 deletions docs/data/material/components/text-fields/FormattedInputs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { IMaskInput } from 'react-imask';
import { NumericFormat, NumericFormatProps } from 'react-number-format';
import { NumericFormat } from 'react-number-format';
import Stack from '@mui/material/Stack';
import Input from '@mui/material/Input';
import InputLabel from '@mui/material/InputLabel';
Expand Down Expand Up @@ -30,30 +30,6 @@ const TextMaskCustom = React.forwardRef<HTMLInputElement, CustomProps>(
},
);

const NumericFormatCustom = React.forwardRef<NumericFormatProps, CustomProps>(
function NumericFormatCustom(props, ref) {
const { onChange, ...other } = props;

return (
<NumericFormat
{...other}
getInputRef={ref}
onValueChange={(values) => {
onChange({
target: {
name: props.name,
value: values.value,
},
});
}}
thousandSeparator
valueIsNumericString
prefix="$"
/>
);
},
);

export default function FormattedInputs() {
const [values, setValues] = React.useState({
textmask: '(100) 000-0000',
Expand All @@ -79,18 +55,15 @@ export default function FormattedInputs() {
inputComponent={TextMaskCustom as any}
/>
</FormControl>
<TextField
label="react-number-format"
<NumericFormat
value={values.numberformat}
onChange={handleChange}
name="numberformat"
id="formatted-numberformat-input"
slotProps={{
input: {
inputComponent: NumericFormatCustom as any,
},
}}
customInput={TextField}
thousandSeparator
valueIsNumericString
prefix="$"
variant="standard"
label="react-number-format"
/>
</Stack>
);
Expand Down
97 changes: 97 additions & 0 deletions docs/data/material/components/text-fields/InputSuffixShrink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import { filledInputClasses } from '@mui/material/FilledInput';
import { inputBaseClasses } from '@mui/material/InputBase';
import TextField from '@mui/material/TextField';
import InputAdornment from '@mui/material/InputAdornment';

export default function InputSuffixShrink() {
return (
<Box
component="form"
sx={{ '& > :not(style)': { m: 1, width: '25ch' } }}
noValidate
autoComplete="off"
>
<TextField
id="outlined-suffix-shrink"
label="Outlined"
variant="outlined"
slotProps={{
input: {
endAdornment: (
<InputAdornment
position="end"
sx={{
opacity: 0,
pointerEvents: 'none',
[`[data-shrink=true] ~ .${inputBaseClasses.root} > &`]: {
opacity: 1,
},
}}
>
lbs
</InputAdornment>
),
},
}}
/>
<TextField
id="filled-suffix-shrink"
label="Filled"
variant="filled"
slotProps={{
input: {
endAdornment: (
<InputAdornment
position="end"
sx={{
alignSelf: 'flex-end',
opacity: 0,
pointerEvents: 'none',
[`.${filledInputClasses.root} &`]: {
marginBottom: '7.5px',
},
[`[data-shrink=true] ~ .${inputBaseClasses.root} > &`]: {
opacity: 1,
},
}}
>
days
</InputAdornment>
),
},
}}
/>
<TextField
id="standard-suffix-shrink"
label="Standard"
variant="standard"
slotProps={{
htmlInput: {
sx: { textAlign: 'right' },
},
input: {
endAdornment: (
<InputAdornment
position="end"
sx={{
alignSelf: 'flex-end',
margin: 0,
marginBottom: '5px',
opacity: 0,
pointerEvents: 'none',
[`[data-shrink=true] ~ .${inputBaseClasses.root} > &`]: {
opacity: 1,
},
}}
>
@gmail.com
</InputAdornment>
),
},
}}
/>
</Box>
);
}
Loading

0 comments on commit 1f6d8c6

Please sign in to comment.