Skip to content

Commit e984fc1

Browse files
authored
[Slider] Exclude isRtl from Material UI's Slider props (#35564)
1 parent 0aca7e5 commit e984fc1

File tree

7 files changed

+5
-12
lines changed

7 files changed

+5
-12
lines changed

docs/pages/material-ui/api/slider.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"disableSwap": { "type": { "name": "bool" } },
3333
"getAriaLabel": { "type": { "name": "func" } },
3434
"getAriaValueText": { "type": { "name": "func" } },
35-
"isRtl": { "type": { "name": "bool" } },
3635
"marks": {
3736
"type": {
3837
"name": "union",

docs/translations/api-docs/slider-unstyled/slider-unstyled.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"disableSwap": "If <code>true</code>, the active thumb doesn&#39;t swap when moving pointer over a thumb while dragging another thumb.",
1212
"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.",
1313
"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.",
14-
"isRtl": "Indicates whether the theme context has rtl direction. It is set automatically.",
14+
"isRtl": "If <code>true</code> the Slider will be rendered right-to-left (with the lowest value on the right-hand side).",
1515
"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.",
1616
"max": "The maximum allowed value of the slider. Should not be equal to min.",
1717
"min": "The minimum allowed value of the slider. Should not be equal to max.",

docs/translations/api-docs/slider/slider.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"disableSwap": "If <code>true</code>, the active thumb doesn&#39;t swap when moving pointer over a thumb while dragging another thumb.",
1414
"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.",
1515
"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.",
16-
"isRtl": "Indicates whether the theme context has rtl direction. It is set automatically.",
1716
"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.",
1817
"max": "The maximum allowed value of the slider. Should not be equal to min.",
1918
"min": "The minimum allowed value of the slider. Should not be equal to max.",

packages/mui-base/src/SliderUnstyled/SliderUnstyled.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ SliderUnstyled.propTypes /* remove-proptypes */ = {
383383
*/
384384
getAriaValueText: PropTypes.func,
385385
/**
386-
* Indicates whether the theme context has rtl direction. It is set automatically.
386+
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
387387
* @default false
388388
*/
389389
isRtl: PropTypes.bool,

packages/mui-base/src/SliderUnstyled/SliderUnstyled.types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export interface SliderUnstyledOwnProps {
8181
*/
8282
getAriaValueText?: (value: number, index: number) => string;
8383
/**
84-
* Indicates whether the theme context has rtl direction. It is set automatically.
84+
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
8585
* @default false
8686
*/
8787
isRtl?: boolean;
@@ -254,7 +254,7 @@ export interface SliderUnstyledTypeMap<P = {}, D extends React.ElementType = 'sp
254254
* Utility to create component types that inherit props from SliderUnstyled.
255255
*/
256256
export interface ExtendSliderUnstyledTypeMap<M extends OverridableTypeMap> {
257-
props: M['props'] & SliderUnstyledTypeMap['props'];
257+
props: M['props'] & Omit<SliderUnstyledTypeMap['props'], 'isRtl'>;
258258
defaultComponent: M['defaultComponent'];
259259
}
260260

packages/mui-joy/src/Slider/Slider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ Slider.propTypes /* remove-proptypes */ = {
712712
*/
713713
getAriaValueText: PropTypes.func,
714714
/**
715-
* Indicates whether the theme context has rtl direction. It is set automatically.
715+
* If `true` the Slider will be rendered right-to-left (with the lowest value on the right-hand side).
716716
* @default false
717717
*/
718718
isRtl: PropTypes.bool,

packages/mui-material/src/Slider/Slider.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,6 @@ Slider.propTypes /* remove-proptypes */ = {
706706
* @returns {string}
707707
*/
708708
getAriaValueText: PropTypes.func,
709-
/**
710-
* Indicates whether the theme context has rtl direction. It is set automatically.
711-
* @default false
712-
*/
713-
isRtl: PropTypes.bool,
714709
/**
715710
* Marks indicate predetermined values to which the user can move the slider.
716711
* If `true` the marks are spaced according the value of the `step` prop.

0 commit comments

Comments
 (0)