From 53797e0c59281ebe39d0c16d73438a719d248c2c Mon Sep 17 00:00:00 2001 From: Nitinkumar19 Date: Sat, 21 Oct 2023 19:20:56 +0530 Subject: [PATCH 1/3] fix: language prop added for HighlightedCode component --- docs/data/joy/components/accordion/AccordionTransition.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/data/joy/components/accordion/AccordionTransition.js b/docs/data/joy/components/accordion/AccordionTransition.js index 2f5f074ed35a5d..de2d4476fcba53 100644 --- a/docs/data/joy/components/accordion/AccordionTransition.js +++ b/docs/data/joy/components/accordion/AccordionTransition.js @@ -76,6 +76,7 @@ export default function AccordionTransition() { }}` : `"${transition}"` }>`} + language="jsx" /> From 4dbcbd8ae8c1e097f10961ee33623bb29d48d45c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 23 Jan 2024 17:39:08 +0530 Subject: [PATCH 2/3] fix: [MUI-base] Replace Array API with ReadOnlyArray --- packages/mui-base/src/Unstable_Popup/Popup.types.ts | 2 +- packages/mui-base/src/useSlider/useSlider.ts | 4 ++-- packages/mui-base/src/useSlider/useSlider.types.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mui-base/src/Unstable_Popup/Popup.types.ts b/packages/mui-base/src/Unstable_Popup/Popup.types.ts index 78e755feda5672..4b13fb97da7029 100644 --- a/packages/mui-base/src/Unstable_Popup/Popup.types.ts +++ b/packages/mui-base/src/Unstable_Popup/Popup.types.ts @@ -57,7 +57,7 @@ export interface PopupOwnProps { * * @see https://floating-ui.com/docs/computePosition#middleware */ - middleware?: Array; + middleware?: ReadonlyArray; /** * Distance between a popup and the trigger element. * This prop is ignored when custom `middleware` is provided. diff --git a/packages/mui-base/src/useSlider/useSlider.ts b/packages/mui-base/src/useSlider/useSlider.ts index 219d18666c51df..206ed904faca65 100644 --- a/packages/mui-base/src/useSlider/useSlider.ts +++ b/packages/mui-base/src/useSlider/useSlider.ts @@ -142,8 +142,8 @@ function focusThumb({ } function areValuesEqual( - newValue: number | Array, - oldValue: number | Array, + newValue: number | Readonly | Array, + oldValue: number | Readonly | Array, ): boolean { if (typeof newValue === 'number' && typeof oldValue === 'number') { return newValue === oldValue; diff --git a/packages/mui-base/src/useSlider/useSlider.types.ts b/packages/mui-base/src/useSlider/useSlider.types.ts index 0319f6384b9c8a..ef9c0bd0670493 100644 --- a/packages/mui-base/src/useSlider/useSlider.types.ts +++ b/packages/mui-base/src/useSlider/useSlider.types.ts @@ -99,7 +99,7 @@ export interface UseSliderParameters { * The value of the slider. * For ranged sliders, provide an array with two values. */ - value?: number | number[]; + value?: number | Readonly; } export interface Mark { From 4c466a6d9431dde7f26ce9f28a75456f7de1a2ac Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 23 Jan 2024 17:44:13 +0530 Subject: [PATCH 3/3] Update AccordionTransition.js Signed-off-by: Nitin Kumar --- docs/data/joy/components/accordion/AccordionTransition.js | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/data/joy/components/accordion/AccordionTransition.js b/docs/data/joy/components/accordion/AccordionTransition.js index de2d4476fcba53..2f5f074ed35a5d 100644 --- a/docs/data/joy/components/accordion/AccordionTransition.js +++ b/docs/data/joy/components/accordion/AccordionTransition.js @@ -76,7 +76,6 @@ export default function AccordionTransition() { }}` : `"${transition}"` }>`} - language="jsx" />