Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Joy] Add slots/slotProps props to the typing of all components and apply useSlot to all components #34997

Merged
merged 147 commits into from Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from 108 commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
ee3091f
use getBy for better DX
siriwatknp Nov 18, 2022
ae5629c
move Material UI components test
siriwatknp Nov 18, 2022
52df009
fix Alert
siriwatknp Nov 18, 2022
397c96d
update conformance
siriwatknp Nov 18, 2022
842cf9b
Revert "use getBy for better DX"
siriwatknp Nov 18, 2022
fc8a694
update Autocomplete
siriwatknp Nov 18, 2022
3fa5754
fix AvatarGroup
siriwatknp Nov 18, 2022
3a6b30a
rename to components
siriwatknp Nov 18, 2022
a0771dd
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Nov 21, 2022
e14e4fb
add comment
siriwatknp Nov 21, 2022
bd95b34
fix misused variables
siriwatknp Nov 21, 2022
1005da0
remove outdated tests
siriwatknp Nov 21, 2022
97713b2
add comment
siriwatknp Nov 21, 2022
5585d42
fix pagination tests
siriwatknp Nov 21, 2022
ecbdb3d
mark components and slots as optional
siriwatknp Nov 21, 2022
b56ab74
[CircularProgress] Apply useSlot()
hbjORbj Oct 31, 2022
063d2e7
Apply useSlot to LinearProgress
hbjORbj Nov 1, 2022
a68cac3
Apply useSlot to Chip
hbjORbj Nov 1, 2022
74e63a3
Apply useSlot to ChipDelete
hbjORbj Nov 1, 2022
4ae13c3
[Chip] Add optional component prop to each slot in ComponentsProps
hbjORbj Nov 1, 2022
bc5b30b
[Tooltip] Improve the typing of components and componentsProps
hbjORbj Nov 1, 2022
c8bd681
Apply useSlot to Tooltip
hbjORbj Nov 1, 2022
ddec72d
[Chip, CircularProgress] Add components prop to API docs
hbjORbj Nov 1, 2022
69da1d6
[ChipDelete, LinearProgress] Keep API doc for component
hbjORbj Nov 1, 2022
3b30500
[Chip, ChipDelete, LinearProgress, CircularProgress] Ensure API doc o…
hbjORbj Nov 1, 2022
109fa4a
Apply useSlot to Avatar and pass className prop to the root
hbjORbj Nov 1, 2022
ea89935
[SvgIcon] Remove classes prop and apply useSlot
hbjORbj Nov 1, 2022
9aa71e8
[Slider] Add input class and apply useSlot
hbjORbj Nov 1, 2022
6b457e2
[SvgIcon] Remove classes prop from API doc
hbjORbj Nov 1, 2022
2e2266f
[Slider] Add components prop
hbjORbj Nov 1, 2022
ae7c289
Rename componentsProps to slotProps and components to slots
hbjORbj Nov 2, 2022
4387e71
Apply useSlot to more components & Rename components to slots, compon…
hbjORbj Nov 2, 2022
0005956
Fix Joy useSlot() test
hbjORbj Nov 2, 2022
9343bce
Apple useSlot to more components
hbjORbj Nov 3, 2022
dbe766d
Apply useSlot, add slots prop, rename componentsProps to slotProps fo…
hbjORbj Nov 5, 2022
0fd81f0
Replace componentsProps with slotProps in all Joy demos
hbjORbj Nov 7, 2022
415e9c0
Replace components with slots in all Joy demos
hbjORbj Nov 7, 2022
39f01a6
Add startDecorator and endDecorator classes to Alert
hbjORbj Nov 7, 2022
5ffc2f3
Test slots of Alert
hbjORbj Nov 7, 2022
bfa5ccd
Test slots of AspectRatio
hbjORbj Nov 7, 2022
3358f31
Test slots of Avatar, AvatarGroup and Badge
hbjORbj Nov 7, 2022
1ee303f
Test slots of Breadcrumbs, Button,Card
hbjORbj Nov 9, 2022
0ed9bee
Test slots of CardContent, CardCover, CardOverflow, Checkbox
hbjORbj Nov 9, 2022
780f905
Test slots of Chip, ChipDelete, CircularProgress, Divider
hbjORbj Nov 9, 2022
d171e41
Test slots of FormControl, FormHelperText, FormLabel, Grid, IconButto…
hbjORbj Nov 9, 2022
e9432ff
Remove unneeded classes from LinearProgress
hbjORbj Nov 9, 2022
9396b0d
Test slots of LinearProgress
hbjORbj Nov 9, 2022
f679a18
Prettier
hbjORbj Nov 9, 2022
88e5960
Test slots of more components
hbjORbj Nov 9, 2022
dd2ffc8
Add backdrop class to Modal
hbjORbj Nov 9, 2022
d5db0f3
Test slots of Menu, MenuItem, MenuList, Modal
hbjORbj Nov 9, 2022
56c9830
Test slots of more components
hbjORbj Nov 9, 2022
08b82b7
Add slot tests to the rest of Joy components
hbjORbj Nov 10, 2022
9390a14
Format docs
hbjORbj Nov 10, 2022
d83191e
Improve test of Alert
hbjORbj Nov 10, 2022
8c88f4e
Apply correct classname for endDecorator slot in Alert
hbjORbj Nov 10, 2022
391ade6
Skip some tests for joy components in conformance test
hbjORbj Nov 10, 2022
255e230
muiName could be undefined
hbjORbj Nov 10, 2022
0e6d0f7
Improve Breadcrumbs test
hbjORbj Nov 15, 2022
a6d205a
Skip more tests for Joy components in conformance test suite
hbjORbj Nov 15, 2022
6fa6667
Typo in aria prop in SvgIcon
hbjORbj Nov 15, 2022
a43fea9
Fix errors in Chip
hbjORbj Nov 15, 2022
5b4c575
Fix errors in Link and its tests
hbjORbj Nov 15, 2022
4a0e042
Fix LinearProgress test
hbjORbj Nov 15, 2022
b6d4471
[MenuList] Fix test
hbjORbj Nov 15, 2022
c8f81db
[ListDivider] Fix errors
hbjORbj Nov 15, 2022
1c99eba
[Checkbox] Pass inheritComponent to conformance test suite
hbjORbj Nov 15, 2022
cf3dfea
[Select] Fix implementation
hbjORbj Nov 15, 2022
797c6b2
Ensure Select test passes
hbjORbj Nov 15, 2022
a22bc04
[ListDivider] Run proptypes
hbjORbj Nov 15, 2022
a7cce30
[Typography] Fix endDecorator slot
hbjORbj Nov 15, 2022
324dfdf
[Switch, Textarea, Input] Fix endDecorator slot
hbjORbj Nov 15, 2022
69d0d42
[Tooltip] Refactor
hbjORbj Nov 15, 2022
f1dc124
[TextField] Improve test
hbjORbj Nov 15, 2022
61cf5f6
[TextField] Fix slot errors
hbjORbj Nov 15, 2022
c659455
[Menu] Fix test
hbjORbj Nov 15, 2022
1fb6285
[Chip] Fix test
hbjORbj Nov 15, 2022
f9fcb8e
[Breadcrumbs] Fix test
hbjORbj Nov 15, 2022
3283459
[Grid] Do not pass slots to conformance test suite
hbjORbj Nov 15, 2022
7409ad7
Format docs
hbjORbj Nov 15, 2022
5d3599b
Fix tests
hbjORbj Nov 17, 2022
128fc4c
[Tooltip] Improve test
hbjORbj Nov 17, 2022
3e788b3
final elementType should pass to appendOwnerState
siriwatknp Nov 18, 2022
d79f007
add data-testid="custom"
siriwatknp Nov 18, 2022
7a86534
ref should be null
siriwatknp Nov 18, 2022
37028bd
simplify Tooltip tests
siriwatknp Nov 18, 2022
9bef057
only pass the className
siriwatknp Nov 18, 2022
379d211
exclude slot tests from TextField
siriwatknp Nov 18, 2022
9911b40
skip test?
siriwatknp Nov 18, 2022
281e318
skip element tests
siriwatknp Nov 18, 2022
8c1883a
only pass ownerState for non host element
siriwatknp Nov 18, 2022
8eb3aec
fix Select
siriwatknp Nov 18, 2022
f76f3ad
Fix format / lint errors
hbjORbj Nov 22, 2022
c1f1694
Fix errors
hbjORbj Nov 22, 2022
f0a43d9
Merge branch 'master' of https://github.com/mui/material-ui into test…
siriwatknp Nov 23, 2022
200986d
fix lint
siriwatknp Nov 23, 2022
36ec85a
Merge branch 'test/use-components' into joy/apply-useSlot
siriwatknp Nov 23, 2022
7c93fa3
test slotProps as a function
siriwatknp Nov 23, 2022
755640c
fix Menu forwarded component
siriwatknp Nov 23, 2022
be42289
update component
siriwatknp Nov 23, 2022
b91e8e3
restore components with only root slot
siriwatknp Nov 23, 2022
8772417
fix MenuList name
siriwatknp Nov 23, 2022
c8e23ae
[Menu] Fix ref instsance test
hbjORbj Nov 23, 2022
9df9797
fix Avatar tests
siriwatknp Nov 23, 2022
199e05e
remove testStateOverrides
siriwatknp Nov 24, 2022
2cc5281
Merge branch 'joy/apply-useSlot' of github.com:hbjORbj/material-ui in…
siriwatknp Nov 24, 2022
bb63e5e
run proptypes
siriwatknp Nov 24, 2022
ba310d1
fix regression
siriwatknp Nov 24, 2022
6148c4d
Create SlotComponentProps type for Joy UI and use it for typing of Jo…
hbjORbj Nov 25, 2022
10fc03d
Improve API docs for slots prop
hbjORbj Nov 25, 2022
20f7257
Run prettier
hbjORbj Nov 26, 2022
42de4f3
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Nov 29, 2022
5a30f27
add tests
siriwatknp Nov 29, 2022
98c630f
Fix types for Alert
siriwatknp Nov 29, 2022
a69a676
[Autocomplete] Fix types
hbjORbj Nov 29, 2022
1ff5c9b
Update prop types for Alert
hbjORbj Nov 29, 2022
157b3fd
[AspectRatio] Fix types and add spec test
hbjORbj Nov 29, 2022
3de1087
Remove RootSlotProps and Rename OtherSlotProps to SlotProps
hbjORbj Nov 29, 2022
cff7d46
[Autocomplete] Improve types and spec test
hbjORbj Nov 29, 2022
ba1d106
[Avatar] Fix types and add spec test
hbjORbj Nov 29, 2022
3238336
[Alert] Improve types
hbjORbj Nov 29, 2022
4c7d643
[AspectRatio] Improve types
hbjORbj Nov 29, 2022
f619d3d
[Badge] improve types
hbjORbj Nov 29, 2022
890bf19
[Breadcrumbs] Fix types and add spec test
hbjORbj Nov 29, 2022
61287ff
[Badge] Update prop types and add spec test
hbjORbj Nov 29, 2022
eae5f42
[Button] Fix types and add spec test
hbjORbj Nov 29, 2022
ea52b18
Fix types for all Joy UI components and add spec tests
hbjORbj Nov 29, 2022
e70bd45
Fix prop typs
hbjORbj Nov 29, 2022
6d34417
Fix useSlot test
hbjORbj Nov 29, 2022
778d508
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Nov 30, 2022
2c01680
revert Material UI changes
siriwatknp Nov 30, 2022
4a3b0e1
fix Tooltip
siriwatknp Nov 30, 2022
740485d
fix test
siriwatknp Nov 30, 2022
96e7f71
update Avatar
siriwatknp Nov 30, 2022
999f9fa
update Badge
siriwatknp Nov 30, 2022
e590744
update breadcrumbs
siriwatknp Nov 30, 2022
e4f5722
update components
siriwatknp Nov 30, 2022
8ebc521
fix slider props
siriwatknp Nov 30, 2022
7a830f3
Craete codemod for Joy renaming components and componentsProps to slo…
hbjORbj Dec 1, 2022
60ea322
prettier
hbjORbj Dec 1, 2022
25e2e76
Fix codemod
hbjORbj Dec 4, 2022
c3b09f7
Improve codemod test
hbjORbj Dec 4, 2022
ef9722c
Run proptypes
hbjORbj Dec 4, 2022
f53ee69
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Dec 5, 2022
04728f7
fix duplicate
siriwatknp Dec 5, 2022
05203d7
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Dec 5, 2022
715d72d
add joy-rename-components-to-slots to readme
siriwatknp Dec 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/CountrySelect.js
Expand Up @@ -10,7 +10,7 @@ export default function CountrySelect() {
<Autocomplete
id="country-select-demo"
placeholder="Choose a country"
componentsProps={{
slotProps={{
input: {
autoComplete: 'new-password', // disable autocomplete and autofill
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/CountrySelect.tsx
Expand Up @@ -10,7 +10,7 @@ export default function CountrySelect() {
<Autocomplete
id="country-select-demo"
placeholder="Choose a country"
componentsProps={{
slotProps={{
input: {
autoComplete: 'new-password', // disable autocomplete and autofill
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/GitHubLabel.js
Expand Up @@ -134,7 +134,7 @@ export default function GitHubLabel() {
multiple
size="sm"
placeholder="Filter labels"
components={{ listbox: Listbox }}
slots={{ listbox: Listbox }}
onClose={(event, reason) => {
if (reason === 'escape') {
handleClose();
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/GitHubLabel.tsx
Expand Up @@ -134,7 +134,7 @@ export default function GitHubLabel() {
multiple
size="sm"
placeholder="Filter labels"
components={{ listbox: Listbox }}
slots={{ listbox: Listbox }}
onClose={(event, reason) => {
if (reason === 'escape') {
handleClose();
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/Virtualize.js
Expand Up @@ -121,7 +121,7 @@ export default function Virtualize() {
sx={{ width: 300 }}
disableListWrap
placeholder="Type to search"
components={{
slots={{
listbox: ListboxComponent,
}}
options={OPTIONS}
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/autocomplete/Virtualize.tsx
Expand Up @@ -121,7 +121,7 @@ export default function Virtualize() {
sx={{ width: 300 }}
disableListWrap
placeholder="Type to search"
components={{
slots={{
listbox: ListboxComponent,
}}
options={OPTIONS}
Expand Down
Expand Up @@ -4,7 +4,7 @@
sx={{ width: 300 }}
disableListWrap
placeholder="Type to search"
components={{
slots={{
listbox: ListboxComponent,
}}
options={OPTIONS}
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/components/autocomplete/autocomplete.md
Expand Up @@ -301,7 +301,7 @@ In the event you want the avoid autofill, you can try the following:

```jsx
<Autocomplete
componentsProps={{
slotProps={{
input: {
autoComplete: 'new-password',
},
Expand All @@ -318,7 +318,7 @@ You can work around the issue with the `disablePortal` prop.

```jsx
<Autocomplete
componentsProps={{
slotProps={{
listbox: {
disablePortal: true,
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/checkbox/ExampleButtonCheckbox.js
Expand Up @@ -54,7 +54,7 @@ export default function ExampleButtonCheckbox() {
setValue((val) => val.filter((text) => text !== item));
}
}}
componentsProps={{
slotProps={{
action: ({ checked }) => ({
sx: {
bgcolor: checked ? 'background.surface' : 'transparent',
Expand Down
Expand Up @@ -52,7 +52,7 @@ export default function ExampleChoiceChipCheckbox() {
setValue((val) => val.filter((text) => text !== item));
}
}}
componentsProps={{
slotProps={{
action: ({ checked }) => ({
sx: checked
? {
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/components/checkbox/FocusCheckbox.js
Expand Up @@ -9,14 +9,14 @@ export default function FocusCheckbox() {
label="Label"
defaultChecked
// to demonstrate the focus outline
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
/>
<Checkbox
label="Label"
defaultChecked
sx={{ [`& > .${checkboxClasses.checkbox}`]: { position: 'relative' } }}
// to demonstrate the focus outline
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
/>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/checkbox/HoverCheckbox.js
Expand Up @@ -7,7 +7,7 @@ export default function HoverCheckbox() {
<Checkbox
uncheckedIcon={<Done />}
label="Label"
componentsProps={{
slotProps={{
root: ({ checked, focusVisible }) => ({
sx: !checked
? {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/checkbox/OverlayCheckbox.js
Expand Up @@ -22,7 +22,7 @@ export default function OverlayCheckbox() {
label="Focus outline covers the parent!"
overlay
// Force the outline to appear in the demo. Usually, you don't need this in your project.
componentsProps={{ action: { className: checkboxClasses.focusVisible } }}
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
/>
</Sheet>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/chip/LinkChip.js
Expand Up @@ -3,7 +3,7 @@ import Chip from '@mui/joy/Chip';

export default function ClickableChip() {
return (
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
Anchor chip
</Chip>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/chip/LinkChip.tsx
Expand Up @@ -3,7 +3,7 @@ import Chip from '@mui/joy/Chip';

export default function ClickableChip() {
return (
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
Anchor chip
</Chip>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/chip/LinkChip.tsx.preview
@@ -1,3 +1,3 @@
<Chip componentsProps={{ action: { component: 'a', href: '#as-link' } }}>
<Chip slotProps={{ action: { component: 'a', href: '#as-link' } }}>
Anchor chip
</Chip>
2 changes: 1 addition & 1 deletion docs/data/joy/components/menu/MenuIconSideNavExample.js
Expand Up @@ -89,7 +89,7 @@ function MenuButton({ children, menu, open, onOpen, onLeaveMenu, label, ...props
actions: menuActions,
anchorEl: buttonRef.current,
modifiers,
componentsProps: {
slotProps: {
listbox: {
id: `nav-example-menu-${label}`,
'aria-label': label,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/menu/MenuToolbarExample.js
Expand Up @@ -51,7 +51,7 @@ const MenuButton = React.forwardRef(
open,
actions: menuActions,
anchorEl: buttonRef.current,
componentsProps: {
slotProps: {
listbox: {
id: `toolbar-example-menu-${children}`,
'aria-label': children,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/menu/MenuUsage.js
Expand Up @@ -78,7 +78,7 @@ export default function MenuUsage() {
anchorEl={anchorEl}
open={open}
onClose={handleClose}
componentsProps={{
slotProps={{
listbox: {
'aria-labelledby': 'menu-usage-button',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/modal/FadeModalDialog.js
Expand Up @@ -18,7 +18,7 @@ export default function FadeModalDialog() {
keepMounted
open={!['exited', 'exiting'].includes(state)}
onClose={() => setOpen(false)}
componentsProps={{
slotProps={{
backdrop: {
sx: {
opacity: 0,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/ExampleAlignmentButtons.js
Expand Up @@ -55,7 +55,7 @@ export default function ExampleAlignmentButtons() {
}[item]
}
variant={alignment === item ? 'solid' : 'plain'}
componentsProps={{
slotProps={{
input: { 'aria-label': item },
action: {
sx: { borderRadius: 0, transition: 'none' },
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/ExampleProductAttributes.js
Expand Up @@ -48,7 +48,7 @@ export default function ExampleProductAttributes() {
color={color}
checkedIcon={<Done fontSize="xl2" />}
value={color}
componentsProps={{
slotProps={{
input: { 'aria-label': color },
radio: {
sx: {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/ExampleSegmentedControls.js
Expand Up @@ -38,7 +38,7 @@ export default function ExampleSegmentedControls() {
px: 2,
alignItems: 'center',
}}
componentsProps={{
slotProps={{
action: ({ checked }) => ({
sx: {
...(checked && {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/IconlessRadio.js
Expand Up @@ -41,7 +41,7 @@ export default function IconlessRadio() {
overlay
disableIcon
value={value}
componentsProps={{
slotProps={{
label: ({ checked }) => ({
sx: {
fontWeight: 'lg',
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/components/radio/RadioButtons.js
Expand Up @@ -16,14 +16,14 @@ export default function RadioButtons() {
onChange={handleChange}
value="a"
name="radio-buttons"
componentsProps={{ input: { 'aria-label': 'A' } }}
slotProps={{ input: { 'aria-label': 'A' } }}
/>
<Radio
checked={selectedValue === 'b'}
onChange={handleChange}
value="b"
name="radio-buttons"
componentsProps={{ input: { 'aria-label': 'B' } }}
slotProps={{ input: { 'aria-label': 'B' } }}
/>
</Box>
);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/RadioPositionEnd.js
Expand Up @@ -34,7 +34,7 @@ export default function RadioPositionEnd() {
value={item}
label={item}
sx={{ flexGrow: 1, flexDirection: 'row-reverse' }}
componentsProps={{
slotProps={{
action: ({ checked }) => ({
sx: (theme) => ({
...(checked && {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/radio-pt.md
Expand Up @@ -98,7 +98,7 @@ Here are a few tips to make sure you have an accessible radio button component:
```jsx
<Radio
value="radioA"
componentsProps={{
slotProps={{
input: {
'aria-label': 'Radio A',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/radio-zh.md
Expand Up @@ -98,7 +98,7 @@ Here are a few tips to make sure you have an accessible radio button component:
```jsx
<Radio
value="radioA"
componentsProps={{
slotProps={{
input: {
'aria-label': 'Radio A',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/radio/radio.md
Expand Up @@ -119,7 +119,7 @@ Here are a few tips to make sure you have an accessible radio button component:
```jsx
<Radio
value="radioA"
componentsProps={{
slotProps={{
input: {
'aria-label': 'Radio A',
},
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/SelectCustomOption.js
Expand Up @@ -9,7 +9,7 @@ export default function SelectCustomOption() {
return (
<Select
defaultValue="1"
componentsProps={{
slotProps={{
listbox: {
sx: {
'--List-decorator-size': '44px',
Expand Down
Expand Up @@ -21,7 +21,7 @@ export default function SelectCustomValueAppearance() {
return (
<Select
defaultValue="Eric"
componentsProps={{
slotProps={{
listbox: {
sx: {
'--List-decorator-size': '48px',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/SelectFieldDemo.js
Expand Up @@ -13,7 +13,7 @@ export default function SelectFieldDemo() {
</FormLabel>
<Select
defaultValue="dog"
componentsProps={{
slotProps={{
button: {
id: 'select-field-demo-button',
// TODO: Material UI set aria-labelledby correctly & automatically
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/SelectFieldDemo.tsx
Expand Up @@ -13,7 +13,7 @@ export default function SelectFieldDemo() {
</FormLabel>
<Select
defaultValue="dog"
componentsProps={{
slotProps={{
button: {
id: 'select-field-demo-button',
// TODO: Material UI set aria-labelledby correctly & automatically
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/SelectGroupedOptions.js
Expand Up @@ -25,7 +25,7 @@ export default function SelectGroupedOptions() {
return (
<Select
placeholder="Choose your animal"
componentsProps={{
slotProps={{
listbox: {
component: 'div',
sx: {
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/select-pt.md
Expand Up @@ -122,7 +122,7 @@ To create a [listbox with grouped options](https://www.w3.org/WAI/ARIA/apg/examp

```jsx
<Select
componentsProps={{
slotProps={{
listbox: {
sx: {
maxHeight: 300,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/select/select-zh.md
Expand Up @@ -122,7 +122,7 @@ To create a [listbox with grouped options](https://www.w3.org/WAI/ARIA/apg/examp

```jsx
<Select
componentsProps={{
slotProps={{
listbox: {
sx: {
maxHeight: 300,
Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/components/select/select.md
Expand Up @@ -127,7 +127,7 @@ That way, you'll have a consistent height and will be able to leverage nested CS

```jsx
<Select
componentsProps={{
slotProps={{
listbox: {
sx: {
maxHeight: 300,
Expand All @@ -153,7 +153,7 @@ Alternatively, you can do it manually by targeting the button slot:
```jsx
<label htmlFor="select-button" id="select-label">Label</label>
<Select
componentsProps={{
slotProps={{
button: {
id: 'select-button',
'aria-labelledby': 'select-label select-button',
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/switch/ExampleThumbChild.js
Expand Up @@ -5,7 +5,7 @@ import DarkMode from '@mui/icons-material/DarkMode';
export default function ExampleThumbChild() {
return (
<Switch
componentsProps={{
slotProps={{
input: { 'aria-label': 'Dark mode' },
thumb: {
children: <DarkMode />,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/switch/ExampleTrackChild.js
Expand Up @@ -5,7 +5,7 @@ import Typography from '@mui/joy/Typography';
export default function ExampleTrackChild() {
return (
<Switch
componentsProps={{
slotProps={{
track: {
children: (
<React.Fragment>
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/switch/SwitchControl.js
Expand Up @@ -22,7 +22,7 @@ export default function SwitchLabel() {
color={checked ? 'success' : 'neutral'}
variant="outlined"
endDecorator={checked ? 'On' : 'Off'}
componentsProps={{
slotProps={{
endDecorator: {
sx: {
minWidth: 24,
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/switch/SwitchDecorators.js
Expand Up @@ -8,7 +8,7 @@ export default function SwitchDecorators() {
return (
<Switch
color={dark ? 'primary' : 'danger'}
componentsProps={{ input: { 'aria-label': 'dark mode' } }}
slotProps={{ input: { 'aria-label': 'dark mode' } }}
startDecorator={
<LocalFireDepartmentRoundedIcon
sx={{ color: dark ? 'text.tertiary' : 'danger.600' }}
Expand Down