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

[Slider] Exclude isRtl from Material UI's Slider props #35564

Merged
merged 1 commit into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/pages/material-ui/api/slider.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"disableSwap": { "type": { "name": "bool" } },
"getAriaLabel": { "type": { "name": "func" } },
"getAriaValueText": { "type": { "name": "func" } },
"isRtl": { "type": { "name": "bool" } },
"marks": {
"type": {
"name": "union",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"disableSwap": "If <code>true</code>, the active thumb doesn&#39;t swap when moving pointer over a thumb while dragging another thumb.",
"getAriaLabel": "Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider. This is important for screen reader users.<br><br><strong>Signature:</strong><br><code>function(index: number) =&gt; string</code><br><em>index:</em> The thumb label&#39;s index to format.",
"getAriaValueText": "Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.<br><br><strong>Signature:</strong><br><code>function(value: number, index: number) =&gt; string</code><br><em>value:</em> The thumb label&#39;s value to format.<br><em>index:</em> The thumb label&#39;s index to format.",
"isRtl": "Indicates whether the theme context has rtl direction. It is set automatically.",
"isRtl": "If <code>true</code> the Slider will be rendered right-to-left (with the lowest value on the right-hand side).",
"marks": "Marks indicate predetermined values to which the user can move the slider. If <code>true</code> the marks are spaced according the value of the <code>step</code> prop. If an array, it should contain objects with <code>value</code> and an optional <code>label</code> keys.",
"max": "The maximum allowed value of the slider. Should not be equal to min.",
"min": "The minimum allowed value of the slider. Should not be equal to max.",
Expand Down
1 change: 0 additions & 1 deletion docs/translations/api-docs/slider/slider.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"disableSwap": "If <code>true</code>, the active thumb doesn&#39;t swap when moving pointer over a thumb while dragging another thumb.",
"getAriaLabel": "Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider. This is important for screen reader users.<br><br><strong>Signature:</strong><br><code>function(index: number) =&gt; string</code><br><em>index:</em> The thumb label&#39;s index to format.",
"getAriaValueText": "Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.<br><br><strong>Signature:</strong><br><code>function(value: number, index: number) =&gt; string</code><br><em>value:</em> The thumb label&#39;s value to format.<br><em>index:</em> The thumb label&#39;s index to format.",
"isRtl": "Indicates whether the theme context has rtl direction. It is set automatically.",
"marks": "Marks indicate predetermined values to which the user can move the slider. If <code>true</code> the marks are spaced according the value of the <code>step</code> prop. If an array, it should contain objects with <code>value</code> and an optional <code>label</code> keys.",
"max": "The maximum allowed value of the slider. Should not be equal to min.",
"min": "The minimum allowed value of the slider. Should not be equal to max.",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/SliderUnstyled/SliderUnstyled.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ SliderUnstyled.propTypes /* remove-proptypes */ = {
*/
getAriaValueText: PropTypes.func,
/**
* Indicates whether the theme context has rtl direction. It is set automatically.
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
* @default false
*/
isRtl: PropTypes.bool,
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-base/src/SliderUnstyled/SliderUnstyled.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface SliderUnstyledOwnProps {
*/
getAriaValueText?: (value: number, index: number) => string;
/**
* Indicates whether the theme context has rtl direction. It is set automatically.
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
* @default false
*/
isRtl?: boolean;
Expand Down Expand Up @@ -254,7 +254,7 @@ export interface SliderUnstyledTypeMap<P = {}, D extends React.ElementType = 'sp
* Utility to create component types that inherit props from SliderUnstyled.
*/
export interface ExtendSliderUnstyledTypeMap<M extends OverridableTypeMap> {
props: M['props'] & SliderUnstyledTypeMap['props'];
props: M['props'] & Omit<SliderUnstyledTypeMap['props'], 'isRtl'>;
defaultComponent: M['defaultComponent'];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ Slider.propTypes /* remove-proptypes */ = {
*/
getAriaValueText: PropTypes.func,
/**
* Indicates whether the theme context has rtl direction. It is set automatically.
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
* @default false
*/
isRtl: PropTypes.bool,
Expand Down
5 changes: 0 additions & 5 deletions packages/mui-material/src/Slider/Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,6 @@ Slider.propTypes /* remove-proptypes */ = {
* @returns {string}
*/
getAriaValueText: PropTypes.func,
/**
* Indicates whether the theme context has rtl direction. It is set automatically.
* @default false
*/
isRtl: PropTypes.bool,
/**
* Marks indicate predetermined values to which the user can move the slider.
* If `true` the marks are spaced according the value of the `step` prop.
Expand Down