Skip to content

Commit 0d31f07

Browse files
authored
Merge pull request #520 from AnnMarieW/mantne-7.17
Update for Mantine 17.0
2 parents 43722c7 + 44fe4bc commit 0d31f07

File tree

6 files changed

+11
-26
lines changed

6 files changed

+11
-26
lines changed

CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
# [Unreleased]
44

5+
### Added
6+
- Added `middlewares` prop to `Tooltip` and `overscrollBehavior` prop to `ScrollArea` (New props as of Manitine 7.17). #520 by @AnnMarie
7+
58
### Changed
6-
- `notification` will now automatically set its `action` to `hide` when closed, this avoids issues where a `callback` error would re-trigger the component.
9+
- `notification` will now automatically set its `action` to `hide` when closed, this avoids issues where a `callback` error would re-trigger the component. #523 by @BSd3v
10+
- Removed `draggable` and `speed` prop from `Carousel` since these props are not supported in Embla Carousel V8. #520 by @AnnMarieW
711

812
# 1.0.0rc2
913

@@ -18,7 +22,7 @@
1822
- Upgraded to latest Mantine (7.17.0)
1923

2024
### Fixed
21-
- Corrected an error in the `Alert` component when the `duration` prop prop was set when using dash>=3 #516 by @AnnMarieW
25+
- Corrected an error in the `Alert` component when the `duration` prop was set when using dash>=3 #516 by @AnnMarieW
2226

2327
# 1.0.0rc1
2428

src/ts/components/core/ScrollArea.tsx

-17
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@ import React from "react";
55
import { getLoadingState } from "../../utils/dash3";
66

77
interface Props extends ScrollAreaProps, DashBaseProps {
8-
/** Scrollbar size, any valid CSS value for width/height, numbers are converted to rem, default value is 0.75rem */
9-
scrollbarSize?: number | string;
10-
/**
11-
* Defines scrollbars behavior, `hover` by default
12-
* - `hover` – scrollbars are visible when mouse is over the scroll area
13-
* - `scroll` – scrollbars are visible when the scroll area is scrolled
14-
* - `always` – scrollbars are always visible
15-
* - `never` – scrollbars are always hidden
16-
* - `auto` – similar to `overflow: auto` – scrollbars are always visible when the content is overflowing
17-
* */
18-
type?: "auto" | "always" | "scroll" | "hover" | "never";
19-
/** Scroll hide delay in ms, applicable only when type is set to `hover` or `scroll`, `1000` by default */
20-
scrollHideDelay?: number;
21-
/** Axis at which scrollbars must be rendered, `'xy'` by default */
22-
scrollbars?: "x" | "y" | "xy" | false;
23-
/** Determines whether scrollbars should be offset with padding on given axis, `false` by default */
24-
offsetScrollbars?: boolean | "x" | "y";
258
/** Content */
269
children?: React.ReactNode;
2710
}

src/ts/components/core/tooltip/Tooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface Props extends TooltipBaseProps, DashBaseProps {
1919
closeDelay?: number;
2020
/** Controlled opened state */
2121
opened?: boolean;
22-
/** Space between target element and tooltip in px, `5` by default */
22+
/** Space between target element and tooltip in px, `5` by default. Number or FloatingAxesOffsets. */
2323
offset?: number | FloatingAxesOffsets;
2424
/** Determines whether the tooltip should have an arrow, `false` by default */
2525
withArrow?: boolean;

src/ts/components/extensions/carousel/Carousel.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,10 @@ interface Props extends BoxProps, StylesApiProps, DashBaseProps {
3131
slidesToScroll?: number | "auto";
3232
/** Determines whether gap between slides should be treated as part of the slide size, `true` by default */
3333
includeGapInSize?: boolean;
34-
/** Determines whether the carousel can be scrolled with mouse and touch interactions, `true` by default */
35-
draggable?: boolean;
3634
/** Determines whether momentum scrolling should be enabled, `false` by default */
3735
dragFree?: boolean;
3836
/** Enables infinite looping. `true` by default, automatically falls back to `false` if slide content isn't enough to loop. */
3937
loop?: boolean;
40-
/** Adjusts scroll speed when triggered by any of the methods. Higher numbers enables faster scrolling. */
41-
speed?: number;
4238
/** Index of initial slide */
4339
initialSlide?: number;
4440
/** Choose a fraction representing the percentage portion of a slide that needs to be visible in order to be considered in view. For example, 0.5 equals 50%. */

src/ts/props/scrollarea.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ export interface ScrollAreaProps extends BoxProps, StylesApiProps {
2020
scrollbars?: "x" | "y" | "xy" | false;
2121
/** Determines whether scrollbars should be offset with padding on given axis, `false` by default */
2222
offsetScrollbars?: boolean | "x" | "y";
23-
/** Content */
24-
children?: React.ReactNode;
23+
/** Defines `overscroll-behavior` of the viewport. https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior */
24+
overscrollBehavior?: React.CSSProperties['overscrollBehavior'];
2525
}

src/ts/props/tooltip.ts

+2
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ export interface TooltipBaseProps extends BoxProps, StylesApiProps {
2323
disabled?: boolean;
2424
/** Props to pass down to the portal when withinPortal is true */
2525
portalProps?: object;
26+
/** Floating ui middlewares to configure position handling, `{ flip: true, shift: true, inline: false }` by default */
27+
middlewares?: object;
2628
}

0 commit comments

Comments
 (0)