@react-md/core 6.3.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_base.scss +1 -1
- package/dist/app-bar/styles.d.ts +0 -2
- package/dist/app-bar/styles.js.map +1 -1
- package/dist/autocomplete/types.d.ts +12 -0
- package/dist/autocomplete/types.js.map +1 -1
- package/dist/avatar/Avatar.d.ts +0 -10
- package/dist/avatar/Avatar.js.map +1 -1
- package/dist/avatar/styles.d.ts +10 -0
- package/dist/avatar/styles.js.map +1 -1
- package/dist/badge/Badge.d.ts +11 -0
- package/dist/badge/Badge.js.map +1 -1
- package/dist/badge/styles.d.ts +0 -8
- package/dist/badge/styles.js.map +1 -1
- package/dist/box/_box.scss +8 -8
- package/dist/box/styles.d.ts +9 -0
- package/dist/box/styles.js.map +1 -1
- package/dist/button/_button.scss +4 -0
- package/dist/button/styles.d.ts +5 -1
- package/dist/button/styles.js.map +1 -1
- package/dist/card/Card.d.ts +0 -7
- package/dist/card/Card.js.map +1 -1
- package/dist/card/styles.d.ts +6 -0
- package/dist/card/styles.js +8 -8
- package/dist/card/styles.js.map +1 -1
- package/dist/chip/Chip.d.ts +6 -13
- package/dist/chip/Chip.js.map +1 -1
- package/dist/chip/styles.d.ts +26 -1
- package/dist/chip/styles.js.map +1 -1
- package/dist/dialog/styles.d.ts +5 -2
- package/dist/dialog/styles.js.map +1 -1
- package/dist/divider/styles.d.ts +1 -1
- package/dist/divider/styles.js.map +1 -1
- package/dist/error-boundary/ErrorBoundary.js.map +1 -1
- package/dist/files/validation.js.map +1 -1
- package/dist/form/InputToggle.js.map +1 -1
- package/dist/form/Label.d.ts +0 -10
- package/dist/form/Label.js.map +1 -1
- package/dist/form/Slider.d.ts +4 -0
- package/dist/form/Slider.js.map +1 -1
- package/dist/form/Switch.js.map +1 -1
- package/dist/form/TextArea.js.map +1 -1
- package/dist/form/TextFieldContainer.d.ts +0 -13
- package/dist/form/TextFieldContainer.js.map +1 -1
- package/dist/form/_select.scss +5 -1
- package/dist/form/_text-area.scss +2 -1
- package/dist/form/_text-field.scss +1 -0
- package/dist/form/types.d.ts +20 -0
- package/dist/form/types.js.map +1 -1
- package/dist/interaction/types.d.ts +5 -1
- package/dist/interaction/types.js.map +1 -1
- package/dist/link/Link.d.ts +0 -7
- package/dist/link/Link.js.map +1 -1
- package/dist/link/styles.d.ts +7 -0
- package/dist/link/styles.js.map +1 -1
- package/dist/list/List.d.ts +5 -20
- package/dist/list/List.js.map +1 -1
- package/dist/list/ListItem.d.ts +4 -38
- package/dist/list/ListItem.js.map +1 -1
- package/dist/list/listItemStyles.d.ts +24 -2
- package/dist/list/listItemStyles.js.map +1 -1
- package/dist/list/listStyles.d.ts +17 -2
- package/dist/list/listStyles.js.map +1 -1
- package/dist/menu/Menu.js.map +1 -1
- package/dist/navigation/NavItem.d.ts +4 -1
- package/dist/navigation/NavItem.js.map +1 -1
- package/dist/navigation/navItemStyles.d.ts +7 -0
- package/dist/navigation/navItemStyles.js.map +1 -1
- package/dist/overlay/Overlay.d.ts +4 -23
- package/dist/overlay/Overlay.js.map +1 -1
- package/dist/overlay/styles.d.ts +26 -8
- package/dist/overlay/styles.js.map +1 -1
- package/dist/progress/LinearProgress.d.ts +4 -9
- package/dist/progress/LinearProgress.js.map +1 -1
- package/dist/progress/circularProgressStyles.d.ts +6 -0
- package/dist/progress/circularProgressStyles.js.map +1 -1
- package/dist/progress/linearProgressStyles.d.ts +20 -5
- package/dist/progress/linearProgressStyles.js.map +1 -1
- package/dist/progress/types.d.ts +0 -9
- package/dist/progress/types.js.map +1 -1
- package/dist/segmented-button/SegmentedButton.d.ts +7 -12
- package/dist/segmented-button/SegmentedButton.js.map +1 -1
- package/dist/segmented-button/segmentedButtonStyles.d.ts +26 -3
- package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
- package/dist/sheet/Sheet.d.ts +0 -12
- package/dist/sheet/Sheet.js.map +1 -1
- package/dist/sheet/styles.d.ts +12 -0
- package/dist/sheet/styles.js.map +1 -1
- package/dist/snackbar/Toast.d.ts +2 -13
- package/dist/snackbar/Toast.js.map +1 -1
- package/dist/snackbar/ToastManager.js.map +1 -1
- package/dist/snackbar/toastStyles.d.ts +17 -2
- package/dist/snackbar/toastStyles.js.map +1 -1
- package/dist/tabs/Tab.d.ts +2 -41
- package/dist/tabs/Tab.js.map +1 -1
- package/dist/tabs/tabStyles.d.ts +45 -4
- package/dist/tabs/tabStyles.js.map +1 -1
- package/dist/test-utils/mocks/IntersectionObserver.js.map +1 -1
- package/dist/test-utils/mocks/ResizeObserver.js.map +1 -1
- package/dist/test-utils/utils/createFileList.js.map +1 -1
- package/dist/theme/_theme.scss +0 -1
- package/dist/theme/getDerivedTheme.d.ts +0 -24
- package/dist/theme/getDerivedTheme.js.map +1 -1
- package/dist/theme/types.d.ts +25 -0
- package/dist/theme/types.js.map +1 -1
- package/dist/tooltip/Tooltip.d.ts +4 -32
- package/dist/tooltip/Tooltip.js.map +1 -1
- package/dist/tooltip/styles.d.ts +38 -1
- package/dist/tooltip/styles.js +1 -1
- package/dist/tooltip/styles.js.map +1 -1
- package/dist/transition/SkeletonPlaceholder.d.ts +0 -7
- package/dist/transition/SkeletonPlaceholder.js.map +1 -1
- package/dist/transition/Slide.js.map +1 -1
- package/dist/transition/skeletonPlaceholderUtils.d.ts +7 -0
- package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
- package/dist/transition/useMaxWidthTransition.d.ts +14 -2
- package/dist/transition/useMaxWidthTransition.js.map +1 -1
- package/dist/transition/useSlideTransition.d.ts +5 -0
- package/dist/transition/useSlideTransition.js.map +1 -1
- package/dist/tree/Tree.d.ts +5 -9
- package/dist/tree/Tree.js.map +1 -1
- package/dist/tree/styles.d.ts +9 -1
- package/dist/tree/styles.js.map +1 -1
- package/dist/typography/Mark.d.ts +4 -1
- package/dist/typography/Mark.js.map +1 -1
- package/dist/typography/TextContainer.d.ts +0 -6
- package/dist/typography/TextContainer.js.map +1 -1
- package/dist/typography/markStyles.d.ts +5 -0
- package/dist/typography/markStyles.js.map +1 -1
- package/dist/typography/textContainerStyles.d.ts +6 -0
- package/dist/typography/textContainerStyles.js.map +1 -1
- package/dist/typography/typographyStyles.d.ts +9 -0
- package/dist/typography/typographyStyles.js.map +1 -1
- package/dist/useResizeObserver.js.map +1 -1
- package/dist/window-splitter/WindowSplitter.d.ts +5 -19
- package/dist/window-splitter/WindowSplitter.js.map +1 -1
- package/dist/window-splitter/styles.d.ts +27 -3
- package/dist/window-splitter/styles.js.map +1 -1
- package/package.json +8 -8
- package/src/app-bar/styles.ts +0 -2
- package/src/autocomplete/types.ts +17 -0
- package/src/avatar/Avatar.tsx +0 -11
- package/src/avatar/styles.ts +11 -0
- package/src/badge/Badge.tsx +12 -0
- package/src/badge/styles.ts +0 -9
- package/src/box/styles.ts +9 -0
- package/src/button/styles.ts +5 -1
- package/src/card/Card.tsx +0 -8
- package/src/card/styles.ts +15 -8
- package/src/chip/Chip.tsx +9 -15
- package/src/chip/styles.ts +29 -1
- package/src/dialog/styles.ts +5 -2
- package/src/divider/styles.ts +1 -1
- package/src/form/InputToggle.tsx +2 -0
- package/src/form/Label.tsx +0 -11
- package/src/form/Slider.tsx +6 -0
- package/src/form/Switch.tsx +2 -0
- package/src/form/TextArea.tsx +2 -0
- package/src/form/TextFieldContainer.tsx +0 -14
- package/src/form/types.ts +29 -0
- package/src/interaction/types.ts +5 -1
- package/src/link/Link.tsx +0 -8
- package/src/link/styles.ts +8 -0
- package/src/list/List.tsx +7 -24
- package/src/list/ListItem.tsx +7 -43
- package/src/list/listItemStyles.ts +26 -2
- package/src/list/listStyles.ts +18 -2
- package/src/menu/Menu.tsx +2 -0
- package/src/navigation/NavItem.tsx +6 -2
- package/src/navigation/navItemStyles.ts +8 -0
- package/src/overlay/Overlay.tsx +4 -26
- package/src/overlay/styles.ts +29 -10
- package/src/progress/LinearProgress.tsx +8 -10
- package/src/progress/circularProgressStyles.ts +7 -0
- package/src/progress/linearProgressStyles.ts +22 -5
- package/src/progress/types.ts +0 -10
- package/src/segmented-button/SegmentedButton.tsx +14 -15
- package/src/segmented-button/segmentedButtonStyles.ts +28 -3
- package/src/sheet/Sheet.tsx +0 -13
- package/src/sheet/styles.ts +13 -0
- package/src/snackbar/Toast.tsx +2 -15
- package/src/snackbar/toastStyles.ts +20 -2
- package/src/tabs/Tab.tsx +4 -49
- package/src/tabs/tabStyles.ts +52 -4
- package/src/theme/getDerivedTheme.ts +0 -26
- package/src/theme/types.ts +26 -0
- package/src/tooltip/Tooltip.tsx +4 -36
- package/src/tooltip/styles.ts +43 -2
- package/src/transition/SkeletonPlaceholder.tsx +0 -8
- package/src/transition/Slide.tsx +2 -0
- package/src/transition/skeletonPlaceholderUtils.ts +8 -0
- package/src/transition/useMaxWidthTransition.ts +17 -2
- package/src/transition/useSlideTransition.ts +8 -0
- package/src/tree/Tree.tsx +5 -10
- package/src/tree/styles.ts +10 -1
- package/src/typography/Mark.tsx +6 -2
- package/src/typography/TextContainer.tsx +0 -7
- package/src/typography/markStyles.ts +6 -0
- package/src/typography/textContainerStyles.ts +7 -0
- package/src/typography/typographyStyles.ts +10 -0
- package/src/window-splitter/WindowSplitter.tsx +9 -22
- package/src/window-splitter/styles.ts +31 -3
package/src/list/ListItem.tsx
CHANGED
|
@@ -7,33 +7,21 @@ import { useElementInteraction } from "../interaction/useElementInteraction.js";
|
|
|
7
7
|
import { useHigherContrastChildren } from "../interaction/useHigherContrastChildren.js";
|
|
8
8
|
import { ListItemChildren } from "./ListItemChildren.js";
|
|
9
9
|
import { getListItemHeight } from "./getListItemHeight.js";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"--rmd-list-item-keyline"?: string | number;
|
|
16
|
-
"--rmd-list-item-padding-h"?: string | number;
|
|
17
|
-
"--rmd-list-item-padding-v"?: string | number;
|
|
18
|
-
"--rmd-list-item-height"?: string | number;
|
|
19
|
-
"--rmd-list-item-medium-height"?: string | number;
|
|
20
|
-
"--rmd-list-item-large-height"?: string | number;
|
|
21
|
-
"--rmd-list-item-extra-large-height"?: string | number;
|
|
22
|
-
"--rmd-list-item-multiline-clamp"?: string | number;
|
|
23
|
-
"--rmd-list-item-multiline-height"?: string | number;
|
|
24
|
-
"--rmd-list-item-media-size"?: string | number;
|
|
25
|
-
"--rmd-list-item-media-spacing"?: string | number;
|
|
26
|
-
"--rmd-list-item-text-multiline-height"?: string | number;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
10
|
+
import {
|
|
11
|
+
type BaseListItemClassNameOptions,
|
|
12
|
+
listItem,
|
|
13
|
+
} from "./listItemStyles.js";
|
|
14
|
+
import { type ListItemChildrenProps } from "./types.js";
|
|
29
15
|
|
|
30
16
|
/**
|
|
31
17
|
* @since 6.0.0 Renamed `threeLines` to `multiline` since it can
|
|
32
18
|
* support more than three lines of text.
|
|
19
|
+
* @since 6.3.1 Extends the BaseListItemClassNameOptions
|
|
33
20
|
*/
|
|
34
21
|
export interface ListItemProps
|
|
35
22
|
extends HTMLAttributes<HTMLLIElement>,
|
|
36
23
|
ListItemChildrenProps,
|
|
24
|
+
BaseListItemClassNameOptions,
|
|
37
25
|
ComponentWithRippleProps {
|
|
38
26
|
/**
|
|
39
27
|
* @defaultValue `"button"`
|
|
@@ -45,30 +33,6 @@ export interface ListItemProps
|
|
|
45
33
|
*/
|
|
46
34
|
tabIndex?: number;
|
|
47
35
|
|
|
48
|
-
/**
|
|
49
|
-
* @see {@link ListItemHeight}
|
|
50
|
-
* @defaultValue `"auto"`
|
|
51
|
-
*/
|
|
52
|
-
height?: ListItemHeight;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @defaultValue `false`
|
|
56
|
-
*/
|
|
57
|
-
multiline?: boolean;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @defaultValue `false`
|
|
61
|
-
*/
|
|
62
|
-
disabled?: boolean;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Note: This does nothing if the `disabled` prop is not enabled.
|
|
66
|
-
*
|
|
67
|
-
* @defaultValue `false`
|
|
68
|
-
* @since 2.4.3
|
|
69
|
-
*/
|
|
70
|
-
disabledOpacity?: boolean;
|
|
71
|
-
|
|
72
36
|
/**
|
|
73
37
|
* Set this to `false` if the list item should not gain the interaction
|
|
74
38
|
* states: hover, focus, press, etc. This is kind of like being disabled
|
|
@@ -10,9 +10,27 @@ import {
|
|
|
10
10
|
|
|
11
11
|
const styles = bem("rmd-list-item");
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
declare module "react" {
|
|
14
|
+
interface CSSProperties {
|
|
15
|
+
"--rmd-list-item-keyline"?: string | number;
|
|
16
|
+
"--rmd-list-item-padding-h"?: string | number;
|
|
17
|
+
"--rmd-list-item-padding-v"?: string | number;
|
|
18
|
+
"--rmd-list-item-height"?: string | number;
|
|
19
|
+
"--rmd-list-item-medium-height"?: string | number;
|
|
20
|
+
"--rmd-list-item-large-height"?: string | number;
|
|
21
|
+
"--rmd-list-item-extra-large-height"?: string | number;
|
|
22
|
+
"--rmd-list-item-multiline-height"?: string | number;
|
|
23
|
+
"--rmd-list-item-media-size"?: string | number;
|
|
24
|
+
"--rmd-list-item-media-spacing"?: string | number;
|
|
25
|
+
"--rmd-list-item-text-multiline-height"?: string | number;
|
|
26
|
+
"--rmd-list-item-multiline-clamp"?: string | number;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** @since 6.3.1 */
|
|
31
|
+
export interface BaseListItemClassNameOptions {
|
|
15
32
|
className?: string;
|
|
33
|
+
|
|
16
34
|
/**
|
|
17
35
|
* @see {@link ListItemHeight}
|
|
18
36
|
* @defaultValue `"auto"`
|
|
@@ -25,7 +43,10 @@ export interface ListItemClassNameOptions {
|
|
|
25
43
|
multiline?: boolean;
|
|
26
44
|
|
|
27
45
|
/**
|
|
46
|
+
* Note: This does nothing if the `disabled` prop is not enabled.
|
|
47
|
+
*
|
|
28
48
|
* @defaultValue `false`
|
|
49
|
+
* @since 2.4.3
|
|
29
50
|
*/
|
|
30
51
|
disabled?: boolean;
|
|
31
52
|
|
|
@@ -36,7 +57,10 @@ export interface ListItemClassNameOptions {
|
|
|
36
57
|
* @since 2.4.3
|
|
37
58
|
*/
|
|
38
59
|
disabledOpacity?: boolean;
|
|
60
|
+
}
|
|
39
61
|
|
|
62
|
+
/** @since 6.0.0 */
|
|
63
|
+
export interface ListItemClassNameOptions extends BaseListItemClassNameOptions {
|
|
40
64
|
/**
|
|
41
65
|
* Set this to `false` if the list item should not gain the interaction
|
|
42
66
|
* states: hover, focus, press, etc. This is kind of like being disabled
|
package/src/list/listStyles.ts
CHANGED
|
@@ -4,14 +4,30 @@ import { bem } from "../utils/bem.js";
|
|
|
4
4
|
|
|
5
5
|
const styles = bem("rmd-list");
|
|
6
6
|
|
|
7
|
+
declare module "react" {
|
|
8
|
+
interface CSSProperties {
|
|
9
|
+
"--rmd-list-padding-h"?: string | number;
|
|
10
|
+
"--rmd-list-padding-v"?: string | number;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
/** @since 6.0.0 */
|
|
8
15
|
export interface ListClassNameOptions {
|
|
9
16
|
className?: string;
|
|
10
17
|
|
|
11
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Set to `true` to decrease the amount of padding and font size within the
|
|
20
|
+
* list.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue `false`
|
|
23
|
+
*/
|
|
12
24
|
dense?: boolean;
|
|
13
25
|
|
|
14
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Set this to `true` to render horizontally instead of vertically.
|
|
28
|
+
*
|
|
29
|
+
* @defaultValue `false`
|
|
30
|
+
*/
|
|
15
31
|
horizontal?: boolean;
|
|
16
32
|
}
|
|
17
33
|
|
package/src/menu/Menu.tsx
CHANGED
|
@@ -40,6 +40,8 @@ import { MenuWidget } from "./MenuWidget.js";
|
|
|
40
40
|
import { useMenuBarContext } from "./useMenuBarProvider.js";
|
|
41
41
|
import { getDefaultAnchor } from "./utils.js";
|
|
42
42
|
|
|
43
|
+
// NOTE: The augmentation is in this file since no types are imported from the
|
|
44
|
+
// `styles` file at this time
|
|
43
45
|
declare module "react" {
|
|
44
46
|
interface CSSProperties {
|
|
45
47
|
"--rmd-menu-background-color"?: string;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type LiHTMLAttributes, type ReactNode, forwardRef } from "react";
|
|
2
2
|
|
|
3
|
-
import { navItem } from "./navItemStyles.js";
|
|
3
|
+
import { type NavItemClassNameOptions, navItem } from "./navItemStyles.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @since 6.0.0
|
|
7
|
+
* @since 6.3.1 Extends NavItemClassNameOptions to allow for CSS properties
|
|
8
|
+
* augmentation.
|
|
7
9
|
*/
|
|
8
|
-
export interface NavItemProps
|
|
10
|
+
export interface NavItemProps
|
|
11
|
+
extends LiHTMLAttributes<HTMLLIElement>,
|
|
12
|
+
NavItemClassNameOptions {
|
|
9
13
|
children: ReactNode;
|
|
10
14
|
}
|
|
11
15
|
|
|
@@ -6,6 +6,14 @@ import { bem } from "../utils/bem.js";
|
|
|
6
6
|
|
|
7
7
|
const styles = bem("rmd-nav-item");
|
|
8
8
|
|
|
9
|
+
declare module "react" {
|
|
10
|
+
interface CSSProperties {
|
|
11
|
+
"--rmd-navigation-border-radius"?: string | number;
|
|
12
|
+
"--rmd-navigation-horizontal-padding"?: string | number;
|
|
13
|
+
"--rmd-navigation-padding-incrementor"?: string | number;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* @since 6.0.0
|
|
11
19
|
*/
|
package/src/overlay/Overlay.tsx
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { type HTMLAttributes, forwardRef } from "react";
|
|
4
4
|
|
|
5
5
|
import { useSsr } from "../SsrProvider.js";
|
|
6
|
-
import { type BoxAlignItems, type BoxJustifyContent } from "../box/styles.js";
|
|
7
6
|
import { Portal } from "../portal/Portal.js";
|
|
8
7
|
import {
|
|
9
8
|
type CSSTransitionComponentProps,
|
|
@@ -11,44 +10,23 @@ import {
|
|
|
11
10
|
} from "../transition/types.js";
|
|
12
11
|
import { useCSSTransition } from "../transition/useCSSTransition.js";
|
|
13
12
|
import {
|
|
13
|
+
type BaseOverlayClassNameOptions,
|
|
14
14
|
DEFAULT_OVERLAY_CLASSNAMES,
|
|
15
15
|
DEFAULT_OVERLAY_TIMEOUT,
|
|
16
16
|
overlay,
|
|
17
17
|
} from "./styles.js";
|
|
18
18
|
|
|
19
|
-
declare module "react" {
|
|
20
|
-
interface CSSProperties {
|
|
21
|
-
"--rmd-overlay-background-color"?: string;
|
|
22
|
-
"--rmd-overlay-z-index"?: number;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
19
|
/**
|
|
27
20
|
* @since 6.0.0 Added `align` and `justify` props.
|
|
28
21
|
* @since 6.0.0 Renamed `hidden` to `noOpacity`.
|
|
22
|
+
* @since 6.3.1 Extends BaseOverlayClassNameOptions for CSSProperties module
|
|
23
|
+
* augmentation.
|
|
29
24
|
*/
|
|
30
25
|
export interface OverlayProps
|
|
31
26
|
extends HTMLAttributes<HTMLSpanElement>,
|
|
27
|
+
BaseOverlayClassNameOptions,
|
|
32
28
|
CSSTransitionComponentProps,
|
|
33
29
|
TransitionActions {
|
|
34
|
-
/**
|
|
35
|
-
* @defaultValue `"center"`
|
|
36
|
-
* @since 6.0.0
|
|
37
|
-
*/
|
|
38
|
-
align?: BoxAlignItems;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @defaultValue `"center"`
|
|
42
|
-
* @since 6.0.0
|
|
43
|
-
*/
|
|
44
|
-
justify?: BoxJustifyContent;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Set this to `true` for when the overlay should be visible. Toggling this
|
|
48
|
-
* value will trigger the enter/exit animation.
|
|
49
|
-
*/
|
|
50
|
-
visible: boolean;
|
|
51
|
-
|
|
52
30
|
/**
|
|
53
31
|
* Set this to `true` if the overlay should be rendered with an `opacity: 0`
|
|
54
32
|
* and disabling the animation. This is useful if you'd like a "close on
|
package/src/overlay/styles.ts
CHANGED
|
@@ -13,26 +13,45 @@ import { bem } from "../utils/bem.js";
|
|
|
13
13
|
|
|
14
14
|
const styles = bem("rmd-overlay");
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
declare module "react" {
|
|
17
|
+
interface CSSProperties {
|
|
18
|
+
"--rmd-overlay-background-color"?: string;
|
|
19
|
+
"--rmd-overlay-z-index"?: number;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface BaseOverlayClassNameOptions {
|
|
18
24
|
className?: string;
|
|
19
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Set this to `true` for when the overlay should be visible. Toggling this
|
|
28
|
+
* value will trigger the enter/exit animation.
|
|
29
|
+
*/
|
|
20
30
|
visible: boolean;
|
|
21
31
|
|
|
22
|
-
/**
|
|
23
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @defaultValue `"center"`
|
|
34
|
+
* @since 6.0.0
|
|
35
|
+
*/
|
|
36
|
+
align?: BoxAlignItems;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @defaultValue `"center"`
|
|
40
|
+
* @since 6.0.0
|
|
41
|
+
*/
|
|
42
|
+
justify?: BoxJustifyContent;
|
|
24
43
|
|
|
25
44
|
/** @defaultValue `false` */
|
|
26
45
|
clickable?: boolean;
|
|
46
|
+
}
|
|
27
47
|
|
|
48
|
+
/** @since 6.0.0 */
|
|
49
|
+
export interface OverlayClassNameOptions extends BaseOverlayClassNameOptions {
|
|
28
50
|
/** @defaultValue `false` */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** @defaultValue `"center"` */
|
|
32
|
-
align?: BoxAlignItems;
|
|
51
|
+
active?: boolean;
|
|
33
52
|
|
|
34
|
-
/** @defaultValue `
|
|
35
|
-
|
|
53
|
+
/** @defaultValue `false` */
|
|
54
|
+
absolute?: boolean;
|
|
36
55
|
}
|
|
37
56
|
|
|
38
57
|
/**
|
|
@@ -8,14 +8,21 @@ import {
|
|
|
8
8
|
import { type LabelRequiredForA11y, type PropsWithRef } from "../types.js";
|
|
9
9
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
10
10
|
import { getPercentage } from "../utils/getPercentage.js";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
type BaseLinearProgressClassNameOptions,
|
|
13
|
+
linearProgress,
|
|
14
|
+
linearProgressBar,
|
|
15
|
+
} from "./linearProgressStyles.js";
|
|
12
16
|
import { type ProgressProps } from "./types.js";
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
19
|
* @since 6.0.0 Added the `theme` prop
|
|
20
|
+
* @since 6.3.1 extends BaseLinearProgressClassNameOptions for CSSProperties
|
|
21
|
+
* module augmentation.
|
|
16
22
|
*/
|
|
17
23
|
export interface LinearProgressProps
|
|
18
24
|
extends Omit<HTMLAttributes<HTMLSpanElement>, "id" | "children">,
|
|
25
|
+
BaseLinearProgressClassNameOptions,
|
|
19
26
|
ProgressProps {
|
|
20
27
|
/**
|
|
21
28
|
* An optional style to apply to the progress bar. This will be merged with
|
|
@@ -44,15 +51,6 @@ export interface LinearProgressProps
|
|
|
44
51
|
*/
|
|
45
52
|
reverse?: boolean;
|
|
46
53
|
|
|
47
|
-
/**
|
|
48
|
-
* Boolean if the progress should be vertical instead of horizontal. When
|
|
49
|
-
* this prop is set, you should also set the `verticalHeight` prop to a height
|
|
50
|
-
* value you want for your progress bar.
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue `false`
|
|
53
|
-
*/
|
|
54
|
-
vertical?: boolean;
|
|
55
|
-
|
|
56
54
|
/**
|
|
57
55
|
* Since there isn't really a good way to have "auto height", you'll need to
|
|
58
56
|
* manually set the progress bar's height with this prop to some pixel value.
|
|
@@ -6,6 +6,13 @@ import { type ProgressTheme } from "./types.js";
|
|
|
6
6
|
|
|
7
7
|
const styles = bem("rmd-circular-progress");
|
|
8
8
|
|
|
9
|
+
declare module "react" {
|
|
10
|
+
interface CSSProperties {
|
|
11
|
+
"--rmd-progress-circular-size"?: string | number;
|
|
12
|
+
"--rmd-progress-circular-stroke-width"?: string | number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
/**
|
|
10
17
|
* @since 6.2.0
|
|
11
18
|
*/
|
|
@@ -6,10 +6,15 @@ import { type ProgressTheme } from "./types.js";
|
|
|
6
6
|
|
|
7
7
|
const styles = bem("rmd-linear-progress");
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
declare module "react" {
|
|
10
|
+
interface CSSProperties {
|
|
11
|
+
"--rmd-progress-background-color"?: string;
|
|
12
|
+
"--rmd-progress-color"?: string;
|
|
13
|
+
"--rmd-progress-linear-size"?: string | number;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BaseLinearProgressClassNameOptions {
|
|
13
18
|
className?: string;
|
|
14
19
|
|
|
15
20
|
/**
|
|
@@ -18,9 +23,21 @@ export interface LinearProgressClassNameOptions {
|
|
|
18
23
|
*/
|
|
19
24
|
theme?: ProgressTheme;
|
|
20
25
|
|
|
21
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Boolean if the progress should be vertical instead of horizontal. When
|
|
28
|
+
* this prop is set, you should also set the `verticalHeight` prop to a height
|
|
29
|
+
* value you want for your progress bar.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue `false`
|
|
32
|
+
*/
|
|
22
33
|
vertical?: boolean;
|
|
34
|
+
}
|
|
23
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @since 6.2.0
|
|
38
|
+
*/
|
|
39
|
+
export interface LinearProgressClassNameOptions
|
|
40
|
+
extends BaseLinearProgressClassNameOptions {
|
|
24
41
|
/** @defaultValue `false` */
|
|
25
42
|
indeterminate?: boolean;
|
|
26
43
|
}
|
package/src/progress/types.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { type ThemeColor } from "../cssUtils.js";
|
|
2
2
|
|
|
3
|
-
declare module "react" {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
"--rmd-progress-background-color"?: string;
|
|
6
|
-
"--rmd-progress-color"?: string;
|
|
7
|
-
"--rmd-progress-circular-size"?: string | number;
|
|
8
|
-
"--rmd-progress-circular-stroke-width"?: number;
|
|
9
|
-
"--rmd-progress-linear-size"?: string | number;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
3
|
/**
|
|
14
4
|
* @since 6.0.0
|
|
15
5
|
*/
|
|
@@ -6,31 +6,30 @@ import { getIcon } from "../icon/config.js";
|
|
|
6
6
|
import { type ComponentWithRippleProps } from "../interaction/types.js";
|
|
7
7
|
import { useElementInteraction } from "../interaction/useElementInteraction.js";
|
|
8
8
|
import { useHigherContrastChildren } from "../interaction/useHigherContrastChildren.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import {
|
|
10
|
+
type BaseMaxWidthTransitionOptions,
|
|
11
|
+
useMaxWidthTransition,
|
|
12
|
+
} from "../transition/useMaxWidthTransition.js";
|
|
13
|
+
import {
|
|
14
|
+
type BaseSegmentedButtonClassNameOptions,
|
|
15
|
+
segmentedButton,
|
|
16
|
+
} from "./segmentedButtonStyles.js";
|
|
11
17
|
|
|
12
18
|
/**
|
|
13
19
|
* @since 6.0.0
|
|
20
|
+
* @since 6.3.1 Extends BaseMaxWidthTransitionOptions for CSS module
|
|
21
|
+
* augmentation.
|
|
22
|
+
* @since 6.3.1 Extends BaseSegmentedButtonClassNameOptions for CSSProperties
|
|
23
|
+
* module augmentation.
|
|
14
24
|
*/
|
|
15
25
|
export interface SegmentedButtonProps
|
|
16
26
|
extends ButtonHTMLAttributes<HTMLButtonElement>,
|
|
27
|
+
BaseMaxWidthTransitionOptions,
|
|
28
|
+
BaseSegmentedButtonClassNameOptions,
|
|
17
29
|
ComponentWithRippleProps {
|
|
18
|
-
/**
|
|
19
|
-
* Set this to `true` to apply selected styles and an optional
|
|
20
|
-
* {@link selectedIcon}
|
|
21
|
-
*
|
|
22
|
-
* @defaultValue `false`
|
|
23
|
-
*/
|
|
24
|
-
selected?: boolean;
|
|
25
|
-
|
|
26
30
|
/** @defaultValue `getIcon("selected")` */
|
|
27
31
|
selectedIcon?: ReactNode;
|
|
28
32
|
|
|
29
|
-
/**
|
|
30
|
-
* An optional className to apply when {@link selected} is `true`.
|
|
31
|
-
*/
|
|
32
|
-
selectedClassName?: string;
|
|
33
|
-
|
|
34
33
|
/**
|
|
35
34
|
* Set this to `true` to not render the {@link selectedIcon} when
|
|
36
35
|
* {@link selected} is `true`.
|
|
@@ -5,20 +5,45 @@ import { bem } from "../utils/bem.js";
|
|
|
5
5
|
|
|
6
6
|
const styles = bem("rmd-segmented-button");
|
|
7
7
|
|
|
8
|
+
declare module "react" {
|
|
9
|
+
interface CSSProperties {
|
|
10
|
+
"--rmd-segmented-button-border-radius"?: string | number;
|
|
11
|
+
"--rmd-segmented-button-min-height"?: string | number;
|
|
12
|
+
"--rmd-segmented-button-min-width"?: string | number;
|
|
13
|
+
"--rmd-segmented-button-outline-width"?: string | number;
|
|
14
|
+
"--rmd-segmented-button-outline-color"?: string | number;
|
|
15
|
+
"--rmd-segmented-button-color"?: string | number;
|
|
16
|
+
"--rmd-segmented-button-selected-background-color"?: string | number;
|
|
17
|
+
"--rmd-segmented-button-selected-color"?: string | number;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
8
21
|
/**
|
|
9
|
-
* @since 6.
|
|
22
|
+
* @since 6.3.1
|
|
10
23
|
*/
|
|
11
|
-
export interface
|
|
24
|
+
export interface BaseSegmentedButtonClassNameOptions {
|
|
12
25
|
className?: string;
|
|
13
26
|
|
|
14
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Set this to `true` to apply selected styles and an optional
|
|
29
|
+
* {@link selectedIcon}
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue `false`
|
|
32
|
+
*/
|
|
15
33
|
selected?: boolean;
|
|
16
34
|
|
|
17
35
|
/**
|
|
18
36
|
* An optional className to apply when {@link selected} is `true`
|
|
19
37
|
*/
|
|
20
38
|
selectedClassName?: string;
|
|
39
|
+
}
|
|
21
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @since 6.0.0
|
|
43
|
+
* @since 6.3.1 Extends BaseSegmentedButtonClassNameOptions
|
|
44
|
+
*/
|
|
45
|
+
export interface SegmentedButtonClassNameOptions
|
|
46
|
+
extends BaseSegmentedButtonClassNameOptions {
|
|
22
47
|
/** @internal */
|
|
23
48
|
pressedClassName?: string;
|
|
24
49
|
}
|
package/src/sheet/Sheet.tsx
CHANGED
|
@@ -11,19 +11,6 @@ import {
|
|
|
11
11
|
sheet,
|
|
12
12
|
} from "./styles.js";
|
|
13
13
|
|
|
14
|
-
declare module "react" {
|
|
15
|
-
interface CSSProperties {
|
|
16
|
-
"--rmd-sheet-height"?: string | number;
|
|
17
|
-
"--rmd-sheet-width"?: string | number;
|
|
18
|
-
"--rmd-sheet-max-height"?: string | number;
|
|
19
|
-
"--rmd-sheet-touch-width"?: string | number;
|
|
20
|
-
"--rmd-sheet-touch-max-height"?: string | number;
|
|
21
|
-
"--rmd-sheet-static-width"?: string | number;
|
|
22
|
-
"--rmd-sheet-transform-offscreen"?: string | number;
|
|
23
|
-
"--rmd-sheet-z-index"?: number;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
14
|
/**
|
|
28
15
|
* @since 6.0.0
|
|
29
16
|
*/
|
package/src/sheet/styles.ts
CHANGED
|
@@ -8,6 +8,19 @@ import {
|
|
|
8
8
|
} from "../transition/types.js";
|
|
9
9
|
import { bem } from "../utils/bem.js";
|
|
10
10
|
|
|
11
|
+
declare module "react" {
|
|
12
|
+
interface CSSProperties {
|
|
13
|
+
"--rmd-sheet-height"?: string | number;
|
|
14
|
+
"--rmd-sheet-width"?: string | number;
|
|
15
|
+
"--rmd-sheet-max-height"?: string | number;
|
|
16
|
+
"--rmd-sheet-touch-width"?: string | number;
|
|
17
|
+
"--rmd-sheet-touch-max-height"?: string | number;
|
|
18
|
+
"--rmd-sheet-static-width"?: string | number;
|
|
19
|
+
"--rmd-sheet-transform-offscreen"?: string | number;
|
|
20
|
+
"--rmd-sheet-z-index"?: number;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
11
24
|
/**
|
|
12
25
|
* @since 6.0.0 Uses `as const satisfies TransitionTimeout`
|
|
13
26
|
*/
|
package/src/snackbar/Toast.tsx
CHANGED
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
} from "react";
|
|
11
11
|
|
|
12
12
|
import { type ButtonProps } from "../button/Button.js";
|
|
13
|
-
import { type BackgroundColor } from "../cssUtils.js";
|
|
14
13
|
import {
|
|
15
14
|
type CSSTransitionClassNames,
|
|
16
15
|
type TransitionCallbacks,
|
|
@@ -22,21 +21,14 @@ import { useEnsuredId } from "../useEnsuredId.js";
|
|
|
22
21
|
import { ToastActionButton } from "./ToastActionButton.js";
|
|
23
22
|
import { ToastCloseButton } from "./ToastCloseButton.js";
|
|
24
23
|
import { ToastContent, type ToastContentProps } from "./ToastContent.js";
|
|
25
|
-
import { toast } from "./toastStyles.js";
|
|
26
|
-
|
|
27
|
-
declare module "react" {
|
|
28
|
-
interface CSSProperties {
|
|
29
|
-
"--rmd-toast-color"?: string;
|
|
30
|
-
"--rmd-toast-background-color"?: string;
|
|
31
|
-
"--rmd-toast-offset"?: string | number;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
24
|
+
import { type BaseToastClasNameOptions, toast } from "./toastStyles.js";
|
|
34
25
|
|
|
35
26
|
/**
|
|
36
27
|
* @since 6.0.0
|
|
37
28
|
*/
|
|
38
29
|
export interface ConfigurableToastProps
|
|
39
30
|
extends HTMLAttributes<HTMLDivElement>,
|
|
31
|
+
BaseToastClasNameOptions,
|
|
40
32
|
TransitionCallbacks {
|
|
41
33
|
/**
|
|
42
34
|
* Note: this default value will only be generated in the `Toast` component.
|
|
@@ -52,11 +44,6 @@ export interface ConfigurableToastProps
|
|
|
52
44
|
*/
|
|
53
45
|
role?: AriaRole;
|
|
54
46
|
|
|
55
|
-
/**
|
|
56
|
-
* @defaultValue `"surface"`
|
|
57
|
-
*/
|
|
58
|
-
theme?: BackgroundColor;
|
|
59
|
-
|
|
60
47
|
/**
|
|
61
48
|
* Set this to `true` to stack the content above the {@link action}. It is not
|
|
62
49
|
* recommended to enable this prop if the {@link closeButton} is enabled.
|
|
@@ -5,11 +5,29 @@ import { bem } from "../utils/bem.js";
|
|
|
5
5
|
|
|
6
6
|
const styles = bem("rmd-toast");
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
declare module "react" {
|
|
9
|
+
interface CSSProperties {
|
|
10
|
+
"--rmd-toast-color"?: string;
|
|
11
|
+
"--rmd-toast-background-color"?: string;
|
|
12
|
+
"--rmd-toast-offset"?: string | number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 6.3.1
|
|
18
|
+
*/
|
|
19
|
+
export interface BaseToastClasNameOptions {
|
|
10
20
|
className?: string;
|
|
21
|
+
|
|
11
22
|
/** @defaultValue `"surface"` */
|
|
12
23
|
theme?: BackgroundColor;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 6.0.0
|
|
28
|
+
* @since 6.3.1 Extends BaseToastClasNameOptions
|
|
29
|
+
*/
|
|
30
|
+
export interface ToastClassNameOptions extends BaseToastClasNameOptions {
|
|
13
31
|
/** @defaultValue `false` */
|
|
14
32
|
action?: boolean;
|
|
15
33
|
/** @defaultValue `false` */
|