diff --git a/packages/@mantine/core/src/components/Loader/Loader.test.tsx b/packages/@mantine/core/src/components/Loader/Loader.test.tsx
index b49f0ed7e6..af8d3adf54 100644
--- a/packages/@mantine/core/src/components/Loader/Loader.test.tsx
+++ b/packages/@mantine/core/src/components/Loader/Loader.test.tsx
@@ -4,6 +4,7 @@ import { defaultLoaders, Loader, LoaderProps, LoaderStylesNames } from './Loader
import { MantineLoaderComponent } from './Loader.types';
const customLoader: MantineLoaderComponent = forwardRef(() =>
);
+customLoader.displayName = 'CustomLoader';
const defaultProps: LoaderProps = {};
diff --git a/packages/@mantine/core/src/components/Loader/loaders/Bars.tsx b/packages/@mantine/core/src/components/Loader/loaders/Bars.tsx
index 84171970b0..1daee2e163 100644
--- a/packages/@mantine/core/src/components/Loader/loaders/Bars.tsx
+++ b/packages/@mantine/core/src/components/Loader/loaders/Bars.tsx
@@ -11,3 +11,5 @@ export const Bars: MantineLoaderComponent = forwardRef(({ className, ...others }
));
+
+Bars.displayName = '@mantine/core/Bars';
diff --git a/packages/@mantine/core/src/components/Loader/loaders/Dots.tsx b/packages/@mantine/core/src/components/Loader/loaders/Dots.tsx
index c9830101a1..f8bb009833 100644
--- a/packages/@mantine/core/src/components/Loader/loaders/Dots.tsx
+++ b/packages/@mantine/core/src/components/Loader/loaders/Dots.tsx
@@ -11,3 +11,5 @@ export const Dots: MantineLoaderComponent = forwardRef(({ className, ...others }
));
+
+Dots.displayName = '@mantine/core/Dots';
diff --git a/packages/@mantine/core/src/components/Loader/loaders/Oval.tsx b/packages/@mantine/core/src/components/Loader/loaders/Oval.tsx
index 8f2aebfe79..4ca7e2b31a 100644
--- a/packages/@mantine/core/src/components/Loader/loaders/Oval.tsx
+++ b/packages/@mantine/core/src/components/Loader/loaders/Oval.tsx
@@ -7,3 +7,5 @@ import classes from '../Loader.module.css';
export const Oval: MantineLoaderComponent = forwardRef(({ className, ...others }, ref) => (
));
+
+Oval.displayName = '@mantine/core/Oval';
diff --git a/packages/@mantine/core/src/components/Menu/Menu.test.tsx b/packages/@mantine/core/src/components/Menu/Menu.test.tsx
index 6614082901..46bacae394 100644
--- a/packages/@mantine/core/src/components/Menu/Menu.test.tsx
+++ b/packages/@mantine/core/src/components/Menu/Menu.test.tsx
@@ -34,7 +34,7 @@ const expectOpened = () => expect(screen.getByRole('menu')).toBeInTheDocument();
const getControl = () => screen.getByRole('button');
describe('@mantine/core/Menu', () => {
- tests.axe([
]);
+ tests.axe([
]);
tests.itHasExtend({ component: Menu });
tests.itHasClasses({ component: Menu });
tests.itRendersChildren({ component: Menu, props: {} });
@@ -199,7 +199,7 @@ describe('@mantine/core/Menu', () => {
expect(onChange).toHaveBeenLastCalledWith(false);
});
- it('correctly calls callbacks when opening and closing the controlled menu only via prop', async () => {
+ it('correctly calls callbacks when opening and closing the controlled menu only via prop', () => {
const onOpen = jest.fn();
const onClose = jest.fn();
const onChange = jest.fn();
diff --git a/packages/@mantine/core/src/components/Menu/Menu.tsx b/packages/@mantine/core/src/components/Menu/Menu.tsx
index 86f488e5a1..b4cd303e2f 100644
--- a/packages/@mantine/core/src/components/Menu/Menu.tsx
+++ b/packages/@mantine/core/src/components/Menu/Menu.tsx
@@ -82,7 +82,7 @@ export interface MenuProps extends __PopoverProps, StylesApiProps
{
/** Events that trigger outside clicks */
clickOutsideEvents?: string[];
- /** id base to create accessibility connections */
+ /** Id base to create accessibility connections */
id?: string;
/** Set the `tabindex` on all menu items. Defaults to -1 */
diff --git a/packages/@mantine/core/src/components/Menu/MenuDropdown/MenuDropdown.tsx b/packages/@mantine/core/src/components/Menu/MenuDropdown/MenuDropdown.tsx
index 678d968ef7..69534c74ca 100644
--- a/packages/@mantine/core/src/components/Menu/MenuDropdown/MenuDropdown.tsx
+++ b/packages/@mantine/core/src/components/Menu/MenuDropdown/MenuDropdown.tsx
@@ -1,4 +1,3 @@
-/* eslint-disable jsx-a11y/no-static-element-interactions */
import { useRef } from 'react';
import { useMergedRef } from '@mantine/hooks';
import {
diff --git a/packages/@mantine/core/src/components/ModalBase/ModalBase.tsx b/packages/@mantine/core/src/components/ModalBase/ModalBase.tsx
index e353709120..be6d993008 100644
--- a/packages/@mantine/core/src/components/ModalBase/ModalBase.tsx
+++ b/packages/@mantine/core/src/components/ModalBase/ModalBase.tsx
@@ -150,3 +150,5 @@ export const ModalBase = forwardRef(
);
}
);
+
+ModalBase.displayName = '@mantine/core/ModalBase';
diff --git a/packages/@mantine/core/src/components/ModalBase/ModalBaseContent.tsx b/packages/@mantine/core/src/components/ModalBase/ModalBaseContent.tsx
index 7be5929b78..3ead27f149 100644
--- a/packages/@mantine/core/src/components/ModalBase/ModalBaseContent.tsx
+++ b/packages/@mantine/core/src/components/ModalBase/ModalBaseContent.tsx
@@ -60,3 +60,5 @@ export const ModalBaseContent = forwardRef {
tests.axe([
- ,
- ,
- ,
- ,
- ,
- ,
+ ,
+ ,
+ ,
+ ,
+ ,
+ ,
]);
tests.itSupportsSystemProps({
diff --git a/packages/@mantine/core/src/components/NativeSelect/NativeSelect.test.tsx b/packages/@mantine/core/src/components/NativeSelect/NativeSelect.test.tsx
index 221c96221e..0dc0540564 100644
--- a/packages/@mantine/core/src/components/NativeSelect/NativeSelect.test.tsx
+++ b/packages/@mantine/core/src/components/NativeSelect/NativeSelect.test.tsx
@@ -15,11 +15,11 @@ const defaultProps: NativeSelectProps = {
describe('@mantine/core/NativeSelect', () => {
tests.axe([
- ,
- ,
- ,
- ,
- ,
+ ,
+ ,
+ ,
+ ,
+ ,
]);
tests.itSupportsSystemProps({
diff --git a/packages/@mantine/core/src/components/NavLink/NavLink.story.tsx b/packages/@mantine/core/src/components/NavLink/NavLink.story.tsx
index d3f6be88d7..b133482859 100644
--- a/packages/@mantine/core/src/components/NavLink/NavLink.story.tsx
+++ b/packages/@mantine/core/src/components/NavLink/NavLink.story.tsx
@@ -118,6 +118,7 @@ export function DynamicNestedItems() {
.fill(0)
.map((_, index) => (
}
/>
diff --git a/packages/@mantine/core/src/components/Notification/Notification.test.tsx b/packages/@mantine/core/src/components/Notification/Notification.test.tsx
index fcaadf80b5..fc99c17441 100644
--- a/packages/@mantine/core/src/components/Notification/Notification.test.tsx
+++ b/packages/@mantine/core/src/components/Notification/Notification.test.tsx
@@ -10,7 +10,7 @@ const defaultProps: NotificationProps = {
};
describe('@mantine/core/Notification', () => {
- tests.axe([]);
+ tests.axe([]);
tests.itSupportsSystemProps({
component: Notification,
diff --git a/packages/@mantine/core/src/components/NumberInput/NumberInput.test.tsx b/packages/@mantine/core/src/components/NumberInput/NumberInput.test.tsx
index 23f0b52c0d..14c389c6ea 100644
--- a/packages/@mantine/core/src/components/NumberInput/NumberInput.test.tsx
+++ b/packages/@mantine/core/src/components/NumberInput/NumberInput.test.tsx
@@ -28,11 +28,11 @@ const focusInput = () => fireEvent.focus(getInput());
describe('@mantine/core/NumberInput', () => {
tests.axe([
- ,
- ,
- ,
- ,
- ,
+ ,
+ ,
+ ,
+ ,
+ ,
]);
tests.itSupportsSystemProps({
diff --git a/packages/@mantine/core/src/components/NumberInput/NumberInput.tsx b/packages/@mantine/core/src/components/NumberInput/NumberInput.tsx
index d10077d8d7..9b3fad88e5 100644
--- a/packages/@mantine/core/src/components/NumberInput/NumberInput.tsx
+++ b/packages/@mantine/core/src/components/NumberInput/NumberInput.tsx
@@ -20,11 +20,11 @@ import { UnstyledButton } from '../UnstyledButton';
import { NumberInputChevron } from './NumberInputChevron';
import classes from './NumberInput.module.css';
-// re for negative -0, -0., -0.0, -0.00, -0.000 ... strings
-// and for positive 0., 0.0, 0.00, 0.000 ... strings
+// Re for negative -0, -0., -0.0, -0.00, -0.000 ... strings
+// And for positive 0., 0.0, 0.00, 0.000 ... strings
const leadingDecimalZeroPattern = /^(0\.0*|-0(\.0*)?)$/;
-// re for 01, 006, 00.02, -0010, -000.293 ... and negative counterparts
+// Re for 01, 006, 00.02, -0010, -000.293 ... and negative counterparts
const leadingZerosPattern = /^-?0\d+(\.\d+)?\.?$/;
export interface NumberInputHandlers {
diff --git a/packages/@mantine/core/src/components/Pagination/Pagination.test.tsx b/packages/@mantine/core/src/components/Pagination/Pagination.test.tsx
index 207da18995..df29534a38 100644
--- a/packages/@mantine/core/src/components/Pagination/Pagination.test.tsx
+++ b/packages/@mantine/core/src/components/Pagination/Pagination.test.tsx
@@ -7,7 +7,7 @@ const defaultProps: PaginationProps = {
};
describe('@mantine/core/Pagination', () => {
- tests.axe([]);
+ tests.axe([]);
tests.itSupportsSystemProps({
component: Pagination,
diff --git a/packages/@mantine/core/src/components/PasswordInput/PasswordInput.test.tsx b/packages/@mantine/core/src/components/PasswordInput/PasswordInput.test.tsx
index 4dc75396b3..e75e7e1afe 100644
--- a/packages/@mantine/core/src/components/PasswordInput/PasswordInput.test.tsx
+++ b/packages/@mantine/core/src/components/PasswordInput/PasswordInput.test.tsx
@@ -11,23 +11,31 @@ describe('@mantine/core/PasswordInput', () => {
,
+ ,
- ,
,
,
,
]);
diff --git a/packages/@mantine/core/src/components/Pill/Pill.test.tsx b/packages/@mantine/core/src/components/Pill/Pill.test.tsx
index 87ffc27cdb..2a6bece751 100644
--- a/packages/@mantine/core/src/components/Pill/Pill.test.tsx
+++ b/packages/@mantine/core/src/components/Pill/Pill.test.tsx
@@ -7,7 +7,7 @@ const defaultProps: PillProps = {
};
describe('@mantine/core/Pill', () => {
- tests.axe([]);
+ tests.axe([]);
tests.itSupportsSystemProps({
component: Pill,
diff --git a/packages/@mantine/core/src/components/PillsInput/PillsInput.test.tsx b/packages/@mantine/core/src/components/PillsInput/PillsInput.test.tsx
index 7973a416e7..e9d808f418 100644
--- a/packages/@mantine/core/src/components/PillsInput/PillsInput.test.tsx
+++ b/packages/@mantine/core/src/components/PillsInput/PillsInput.test.tsx
@@ -8,19 +8,19 @@ const defaultProps: PillsInputProps = {
describe('@mantine/core/PillsInput', () => {
tests.axe([
-
+
,
-
+
,
-
+
,
-
+
,
]);
diff --git a/packages/@mantine/core/src/components/PinInput/PinInput.tsx b/packages/@mantine/core/src/components/PinInput/PinInput.tsx
index 91d313bbbd..dcc667a690 100644
--- a/packages/@mantine/core/src/components/PinInput/PinInput.tsx
+++ b/packages/@mantine/core/src/components/PinInput/PinInput.tsx
@@ -345,7 +345,9 @@ export const PinInput = factory((props, ref) => {
};
useEffect(() => {
- if (_valueToString.length !== length) return;
+ if (_valueToString.length !== length) {
+ return;
+ }
onComplete?.(_valueToString);
}, [length, _valueToString]);
diff --git a/packages/@mantine/core/src/components/Popover/Popover.test.tsx b/packages/@mantine/core/src/components/Popover/Popover.test.tsx
index 44fea4a229..b752501c12 100644
--- a/packages/@mantine/core/src/components/Popover/Popover.test.tsx
+++ b/packages/@mantine/core/src/components/Popover/Popover.test.tsx
@@ -28,7 +28,7 @@ function TestContainer(props: Partial) {
}
describe('@mantine/core/Popover', () => {
- tests.axe([, ]);
+ tests.axe([, ]);
tests.itHasExtend({ component: Popover });
tests.itRendersChildren({ component: Popover, props: defaultProps });
tests.itSupportsStylesApi({
diff --git a/packages/@mantine/core/src/components/Popover/Popover.tsx b/packages/@mantine/core/src/components/Popover/Popover.tsx
index aef87122c0..c0685495bf 100644
--- a/packages/@mantine/core/src/components/Popover/Popover.tsx
+++ b/packages/@mantine/core/src/components/Popover/Popover.tsx
@@ -133,7 +133,7 @@ export interface PopoverProps extends __PopoverProps, StylesApiProps {
- tests.axe([]);
+ tests.axe([]);
tests.itSupportsSystemProps({
component: Progress,
diff --git a/packages/@mantine/core/src/components/Progress/ProgressSection/ProgressSection.test.tsx b/packages/@mantine/core/src/components/Progress/ProgressSection/ProgressSection.test.tsx
index 288ac8d55e..d5569031aa 100644
--- a/packages/@mantine/core/src/components/Progress/ProgressSection/ProgressSection.test.tsx
+++ b/packages/@mantine/core/src/components/Progress/ProgressSection/ProgressSection.test.tsx
@@ -13,7 +13,7 @@ const defaultProps: ProgressSectionProps = {
};
describe('@mantine/core/ProgressSection', () => {
- tests.axe([]);
+ tests.axe([]);
tests.itSupportsSystemProps({
component: TestContainer,
diff --git a/packages/@mantine/core/src/components/Radio/RadioCard/RadioCard.test.tsx b/packages/@mantine/core/src/components/Radio/RadioCard/RadioCard.test.tsx
index e7f0daf1a0..e665da372c 100644
--- a/packages/@mantine/core/src/components/Radio/RadioCard/RadioCard.test.tsx
+++ b/packages/@mantine/core/src/components/Radio/RadioCard/RadioCard.test.tsx
@@ -4,7 +4,12 @@ import { RadioCard, RadioCardProps, RadioCardStylesNames } from './RadioCard';
const defaultProps: RadioCardProps = {};
describe('@mantine/core/RadioCard', () => {
- tests.axe([Label, Label]);
+ tests.axe([
+ Label,
+
+ Label
+ ,
+ ]);
tests.itSupportsSystemProps({
component: RadioCard,
diff --git a/packages/@mantine/core/src/components/Radio/RadioGroup/RadioGroup.test.tsx b/packages/@mantine/core/src/components/Radio/RadioGroup/RadioGroup.test.tsx
index 8c3fd885ef..8aadd62434 100644
--- a/packages/@mantine/core/src/components/Radio/RadioGroup/RadioGroup.test.tsx
+++ b/packages/@mantine/core/src/components/Radio/RadioGroup/RadioGroup.test.tsx
@@ -16,7 +16,7 @@ const defaultProps: RadioGroupProps = {
describe('@mantine/core/RadioGroup', () => {
tests.axe([
-
+
diff --git a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.tsx b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.tsx
index bae0fb727d..0a296da214 100644
--- a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.tsx
+++ b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.tsx
@@ -37,3 +37,5 @@ export const ScrollAreaScrollbar = forwardRef {
- if (context.viewport) context.viewport.scrollLeft = scrollPos;
+ if (context.viewport) {
+ context.viewport.scrollLeft = scrollPos;
+ }
}}
onDragScroll={(pointerPos) => {
if (context.viewport) {
@@ -96,10 +98,14 @@ export const ScrollAreaScrollbarVisible = forwardRef<
}
}}
onWheelScroll={(scrollPos) => {
- if (context.viewport) context.viewport.scrollTop = scrollPos;
+ if (context.viewport) {
+ context.viewport.scrollTop = scrollPos;
+ }
}}
onDragScroll={(pointerPos) => {
- if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);
+ if (context.viewport) {
+ context.viewport.scrollTop = getScrollPosition(pointerPos);
+ }
}}
/>
);
@@ -107,3 +113,5 @@ export const ScrollAreaScrollbarVisible = forwardRef<
return null;
});
+
+ScrollAreaScrollbarVisible.displayName = '@mantine/core/ScrollAreaScrollbarVisible';
diff --git a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.tsx b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.tsx
index c08ca93d2a..f869cb8fdc 100644
--- a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.tsx
+++ b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.tsx
@@ -58,7 +58,9 @@ export const Scrollbar = forwardRef((props, forw
const handleWheel = (event: WheelEvent) => {
const element = event.target as HTMLElement;
const isScrollbarWheel = scrollbar?.contains(element);
- if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
+ if (isScrollbarWheel) {
+ handleWheelScroll(event, maxScrollPos);
+ }
};
document.addEventListener('wheel', handleWheel, { passive: false });
return () => document.removeEventListener('wheel', handleWheel, { passive: false } as any);
diff --git a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.tsx b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.tsx
index c312936bad..9eda799ac0 100644
--- a/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.tsx
+++ b/packages/@mantine/core/src/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.tsx
@@ -14,7 +14,9 @@ export const ScrollAreaScrollbarX = forwardRef {
- if (ref.current) setComputedStyle(getComputedStyle(ref.current));
+ if (ref.current) {
+ setComputedStyle(getComputedStyle(ref.current));
+ }
}, [ref]);
return (
@@ -55,3 +57,5 @@ export const ScrollAreaScrollbarX = forwardRef((props, forwardedRef
);
});
+Thumb.displayName = '@mantine/core/ScrollAreaThumb';
+
interface ScrollAreaThumbProps extends ThumbProps {
forceMount?: true;
}
@@ -77,3 +79,5 @@ export const ScrollAreaThumb = forwardRef(
return null;
}
);
+
+ScrollAreaThumb.displayName = '@mantine/core/ScrollAreaThumb';
diff --git a/packages/@mantine/core/src/components/ScrollArea/utils/add-unlinked-scroll-listener.tsx b/packages/@mantine/core/src/components/ScrollArea/utils/add-unlinked-scroll-listener.tsx
index 8822123bc8..c869a4237b 100644
--- a/packages/@mantine/core/src/components/ScrollArea/utils/add-unlinked-scroll-listener.tsx
+++ b/packages/@mantine/core/src/components/ScrollArea/utils/add-unlinked-scroll-listener.tsx
@@ -5,7 +5,9 @@ export function addUnlinkedScrollListener(node: HTMLElement, handler = () => {})
const position = { left: node.scrollLeft, top: node.scrollTop };
const isHorizontalScroll = prevPosition.left !== position.left;
const isVerticalScroll = prevPosition.top !== position.top;
- if (isHorizontalScroll || isVerticalScroll) handler();
+ if (isHorizontalScroll || isVerticalScroll) {
+ handler();
+ }
prevPosition = position;
rAF = window.requestAnimationFrame(loop);
})();
diff --git a/packages/@mantine/core/src/components/ScrollArea/utils/linear-scale.ts b/packages/@mantine/core/src/components/ScrollArea/utils/linear-scale.ts
index 7da13f094a..5bddae0c8f 100644
--- a/packages/@mantine/core/src/components/ScrollArea/utils/linear-scale.ts
+++ b/packages/@mantine/core/src/components/ScrollArea/utils/linear-scale.ts
@@ -1,6 +1,8 @@
export function linearScale(input: readonly [number, number], output: readonly [number, number]) {
return (value: number) => {
- if (input[0] === input[1] || output[0] === output[1]) return output[0];
+ if (input[0] === input[1] || output[0] === output[1]) {
+ return output[0];
+ }
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
return output[0] + ratio * (value - input[0]);
};
diff --git a/packages/@mantine/core/src/components/SegmentedControl/SegmentedControl.test.tsx b/packages/@mantine/core/src/components/SegmentedControl/SegmentedControl.test.tsx
index 85dcf09b2e..432ac135c8 100644
--- a/packages/@mantine/core/src/components/SegmentedControl/SegmentedControl.test.tsx
+++ b/packages/@mantine/core/src/components/SegmentedControl/SegmentedControl.test.tsx
@@ -12,8 +12,8 @@ const defaultProps: SegmentedControlProps = {
describe('@mantine/core/SegmentedControl', () => {
tests.axe([
- ,
- ,
+ ,
+ ,
]);
tests.itSupportsSystemProps({
diff --git a/packages/@mantine/core/src/components/Select/Select.story.tsx b/packages/@mantine/core/src/components/Select/Select.story.tsx
index e08ff0f9c4..af5a38ea75 100644
--- a/packages/@mantine/core/src/components/Select/Select.story.tsx
+++ b/packages/@mantine/core/src/components/Select/Select.story.tsx
@@ -102,7 +102,7 @@ export function WithinForm() {