@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/tabs/Tab.tsx
CHANGED
|
@@ -13,36 +13,16 @@ import { useHigherContrastChildren } from "../interaction/useHigherContrastChild
|
|
|
13
13
|
import { type CustomLinkComponent } from "../link/Link.js";
|
|
14
14
|
import { useKeyboardMovementContext } from "../movement/useKeyboardMovementProvider.js";
|
|
15
15
|
import { useEnsuredId } from "../useEnsuredId.js";
|
|
16
|
-
|
|
17
|
-
import { type TabListProps } from "./TabList.js";
|
|
18
|
-
import { tab } from "./tabStyles.js";
|
|
16
|
+
import { type BaseTabClassNameOptions, tab } from "./tabStyles.js";
|
|
19
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
18
|
import { type useTabs } from "./useTabs.js";
|
|
21
19
|
|
|
22
|
-
declare module "react" {
|
|
23
|
-
interface CSSProperties {
|
|
24
|
-
"--rmd-tab-color"?: string;
|
|
25
|
-
"--rmd-tab-active-color"?: string;
|
|
26
|
-
"--rmd-tab-inactive-color"?: string;
|
|
27
|
-
"--rmd-tab-disabled-color"?: string;
|
|
28
|
-
|
|
29
|
-
"--rmd-tab-size"?: string;
|
|
30
|
-
"--rmd-tab-offset"?: string | number;
|
|
31
|
-
"--rmd-tab-min-width"?: string;
|
|
32
|
-
"--rmd-tab-max-width"?: string;
|
|
33
|
-
"--rmd-tab-min-height"?: string;
|
|
34
|
-
"--rmd-tab-stacked-height"?: string;
|
|
35
|
-
"--rmd-tab-stacked-width"?: string;
|
|
36
|
-
"--rmd-tab-padding"?: string | number;
|
|
37
|
-
"--rmd-tab-stacked-padding"?: string | number;
|
|
38
|
-
"--rmd-tab-indicator-background"?: string;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
20
|
/**
|
|
43
21
|
* @since 6.0.0
|
|
44
22
|
*/
|
|
45
|
-
export interface BaseTabProps
|
|
23
|
+
export interface BaseTabProps
|
|
24
|
+
extends ComponentWithRippleProps,
|
|
25
|
+
BaseTabClassNameOptions {
|
|
46
26
|
/**
|
|
47
27
|
* Set this to `true` if the tab is currently active.
|
|
48
28
|
*
|
|
@@ -50,23 +30,6 @@ export interface BaseTabProps extends ComponentWithRippleProps {
|
|
|
50
30
|
*/
|
|
51
31
|
active: boolean;
|
|
52
32
|
|
|
53
|
-
/**
|
|
54
|
-
* Set this to `true` if the {@link TabListProps.disableTransition} prop has
|
|
55
|
-
* also been set to `true` to disable an active indicator below the tab when
|
|
56
|
-
* {@link active} is `true`.
|
|
57
|
-
*
|
|
58
|
-
* @defaultValue `false`
|
|
59
|
-
*/
|
|
60
|
-
activeIndicator?: boolean;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Set this to `true` when rendering the tabs vertically and
|
|
64
|
-
* {@link activeIndicator} has been enabled.
|
|
65
|
-
*
|
|
66
|
-
* @defaultValue !false
|
|
67
|
-
*/
|
|
68
|
-
verticalActiveIndicator?: boolean;
|
|
69
|
-
|
|
70
33
|
/**
|
|
71
34
|
* An optional icon to render with the with the {@link children}. The default
|
|
72
35
|
* behavior will render this icon before the children.
|
|
@@ -82,14 +45,6 @@ export interface BaseTabProps extends ComponentWithRippleProps {
|
|
|
82
45
|
* @defaultValue `false`
|
|
83
46
|
*/
|
|
84
47
|
iconAfter?: boolean;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Set this to `true` to render the {@link icon} and {@link children} stacked
|
|
88
|
-
* instead of horizontally.
|
|
89
|
-
*
|
|
90
|
-
* @defaultValue `false`
|
|
91
|
-
*/
|
|
92
|
-
stacked?: boolean;
|
|
93
48
|
}
|
|
94
49
|
|
|
95
50
|
/**
|
package/src/tabs/tabStyles.ts
CHANGED
|
@@ -2,20 +2,68 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
|
|
3
3
|
import { cssUtils } from "../cssUtils.js";
|
|
4
4
|
import { bem } from "../utils/bem.js";
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
import { type TabListProps } from "./TabList.js";
|
|
5
7
|
import { tabIndicator } from "./tabIndicatorStyles.js";
|
|
6
8
|
|
|
7
9
|
const styles = bem("rmd-tab");
|
|
8
10
|
|
|
11
|
+
declare module "react" {
|
|
12
|
+
interface CSSProperties {
|
|
13
|
+
"--rmd-tab-color"?: string;
|
|
14
|
+
"--rmd-tab-active-color"?: string;
|
|
15
|
+
"--rmd-tab-inactive-color"?: string;
|
|
16
|
+
"--rmd-tab-disabled-color"?: string;
|
|
17
|
+
"--rmd-tab-indicator-background"?: string;
|
|
18
|
+
"--rmd-tab-min-height"?: string;
|
|
19
|
+
"--rmd-tab-min-width"?: string;
|
|
20
|
+
"--rmd-tab-max-width"?: string;
|
|
21
|
+
"--rmd-tab-stacked-height"?: string;
|
|
22
|
+
"--rmd-tab-stacked-width"?: string;
|
|
23
|
+
"--rmd-tab-padding"?: string | number;
|
|
24
|
+
"--rmd-tab-stacked-padding"?: string | number;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
9
28
|
/**
|
|
10
|
-
* @since 6.
|
|
29
|
+
* @since 6.3.1
|
|
11
30
|
*/
|
|
12
|
-
export interface
|
|
31
|
+
export interface BaseTabClassNameOptions {
|
|
13
32
|
className?: string;
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Set this to `true` if the {@link TabListProps.disableTransition} prop has
|
|
36
|
+
* also been set to `true` to disable an active indicator below the tab when
|
|
37
|
+
* {@link active} is `true`.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `false`
|
|
40
|
+
*/
|
|
16
41
|
activeIndicator?: boolean;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Set this to `true` when rendering the tabs vertically and
|
|
45
|
+
* {@link activeIndicator} has been enabled.
|
|
46
|
+
*
|
|
47
|
+
* @defaultValue !false
|
|
48
|
+
*/
|
|
17
49
|
verticalActiveIndicator?: boolean;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Set this to `true` to render the {@link icon} and {@link children} stacked
|
|
53
|
+
* instead of horizontally.
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue `false`
|
|
56
|
+
*/
|
|
18
57
|
stacked?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @since 6.0.0
|
|
62
|
+
* @since 6.3.1 Extends BaseTabClassNameOptions
|
|
63
|
+
*/
|
|
64
|
+
export interface TabClassNameOptions extends BaseTabClassNameOptions {
|
|
65
|
+
active?: boolean;
|
|
66
|
+
isLink?: boolean;
|
|
19
67
|
reversed?: boolean;
|
|
20
68
|
disabled?: boolean;
|
|
21
69
|
}
|
|
@@ -17,32 +17,6 @@ import {
|
|
|
17
17
|
} from "./cssVars.js";
|
|
18
18
|
import { type ConfigurableThemeColors } from "./types.js";
|
|
19
19
|
|
|
20
|
-
declare module "react" {
|
|
21
|
-
interface CSSProperties {
|
|
22
|
-
"--rmd-background-color"?: string;
|
|
23
|
-
"--rmd-on-background-color"?: string;
|
|
24
|
-
"--rmd-surface-color"?: string;
|
|
25
|
-
"--rmd-primary-color"?: string;
|
|
26
|
-
"--rmd-on-primary-color"?: string;
|
|
27
|
-
"--rmd-secondary-color"?: string;
|
|
28
|
-
"--rmd-on-secondary-color"?: string;
|
|
29
|
-
"--rmd-warning-color"?: string;
|
|
30
|
-
"--rmd-on-warning-color"?: string;
|
|
31
|
-
"--rmd-error-color"?: string;
|
|
32
|
-
"--rmd-on-error-color"?: string;
|
|
33
|
-
"--rmd-success-color"?: string;
|
|
34
|
-
"--rmd-on-success-color"?: string;
|
|
35
|
-
"--rmd-text-primary-color"?: string;
|
|
36
|
-
"--rmd-text-secondary-color"?: string;
|
|
37
|
-
"--rmd-text-hint-color"?: string;
|
|
38
|
-
"--rmd-text-disabled-color"?: string;
|
|
39
|
-
|
|
40
|
-
"--rmd-outline-width"?: string | number;
|
|
41
|
-
"--rmd-outline-color"?: string;
|
|
42
|
-
"--rmd-outline-grey-color"?: string;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
20
|
/** @since 6.0.0 */
|
|
47
21
|
export const getDerivedTheme = (
|
|
48
22
|
container: Element = document.documentElement
|
package/src/theme/types.ts
CHANGED
|
@@ -2,6 +2,32 @@ import { type CSSProperties } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { type UseStateSetter } from "../types.js";
|
|
4
4
|
|
|
5
|
+
declare module "react" {
|
|
6
|
+
interface CSSProperties {
|
|
7
|
+
"--rmd-background-color"?: string;
|
|
8
|
+
"--rmd-on-background-color"?: string;
|
|
9
|
+
"--rmd-surface-color"?: string;
|
|
10
|
+
"--rmd-primary-color"?: string;
|
|
11
|
+
"--rmd-on-primary-color"?: string;
|
|
12
|
+
"--rmd-secondary-color"?: string;
|
|
13
|
+
"--rmd-on-secondary-color"?: string;
|
|
14
|
+
"--rmd-success-color"?: string;
|
|
15
|
+
"--rmd-on-success-color"?: string;
|
|
16
|
+
"--rmd-warning-color"?: string;
|
|
17
|
+
"--rmd-on-warning-color"?: string;
|
|
18
|
+
"--rmd-error-color"?: string;
|
|
19
|
+
"--rmd-on-error-color"?: string;
|
|
20
|
+
"--rmd-text-primary-color"?: string;
|
|
21
|
+
"--rmd-text-secondary-color"?: string;
|
|
22
|
+
"--rmd-text-hint-color"?: string;
|
|
23
|
+
"--rmd-text-disabled-color"?: string;
|
|
24
|
+
"--rmd-outline-width"?: string | number;
|
|
25
|
+
"--rmd-outline-color"?: string;
|
|
26
|
+
"--rmd-outline-grey-color"?: string;
|
|
27
|
+
"--rmd-inverse-color"?: string;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
5
31
|
/**
|
|
6
32
|
* @since 6.0.0
|
|
7
33
|
*/
|
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { type HTMLAttributes, forwardRef } from "react";
|
|
4
4
|
|
|
5
|
-
import { type TextOverflow } from "../cssUtils.js";
|
|
6
5
|
import { Portal } from "../portal/Portal.js";
|
|
7
|
-
import { type SimplePosition } from "../positioning/types.js";
|
|
8
6
|
import {
|
|
9
7
|
type CSSTransitionClassNames,
|
|
10
8
|
type CSSTransitionComponentProps,
|
|
@@ -19,15 +17,7 @@ import {
|
|
|
19
17
|
DEFAULT_TOOLTIP_POSITION,
|
|
20
18
|
DEFAULT_TOOLTIP_TIMEOUT,
|
|
21
19
|
} from "./constants.js";
|
|
22
|
-
import { tooltip } from "./styles.js";
|
|
23
|
-
|
|
24
|
-
declare module "react" {
|
|
25
|
-
interface CSSProperties {
|
|
26
|
-
"--rmd-tooltip-background-color"?: string;
|
|
27
|
-
"--rmd-tooltip-color"?: string;
|
|
28
|
-
"--rmd-tooltip-spacing"?: string | number;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
20
|
+
import { type TooltipClassNameOptions, tooltip } from "./styles.js";
|
|
31
21
|
|
|
32
22
|
/**
|
|
33
23
|
* The base props for the `Tooltip` component. This can be extended when
|
|
@@ -38,45 +28,23 @@ declare module "react" {
|
|
|
38
28
|
* @since 6.0.0 Removed `lineWrap` for `textOverflow`
|
|
39
29
|
* @since 6.0.0 No longer supports the `RenderConditionalPortalProps` other than
|
|
40
30
|
* `portal` with the `disablePortal` prop.
|
|
31
|
+
* @since 6.3.1 Extends TooltipClassNameOptions for CSSProperties module
|
|
32
|
+
* augmentation.
|
|
41
33
|
*/
|
|
42
34
|
export interface TooltipProps
|
|
43
35
|
extends HTMLAttributes<HTMLSpanElement>,
|
|
36
|
+
TooltipClassNameOptions,
|
|
44
37
|
CSSTransitionComponentProps,
|
|
45
38
|
SSRTransitionOptions,
|
|
46
39
|
TransitionActions {
|
|
47
40
|
visible: boolean;
|
|
48
41
|
|
|
49
|
-
/**
|
|
50
|
-
* Set this to `true` to use a smaller font size and padding on the tooltip
|
|
51
|
-
* and a smaller gap between the tooltip and tooltipped element.
|
|
52
|
-
*
|
|
53
|
-
* @defaultValue `false`
|
|
54
|
-
*/
|
|
55
|
-
dense?: boolean;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @defaultValue `"below"`
|
|
59
|
-
*/
|
|
60
|
-
position?: SimplePosition;
|
|
61
|
-
|
|
62
42
|
/**
|
|
63
43
|
* @see {@link CSSTransitionComponentProps.temporary}
|
|
64
44
|
* @defaultValue `true`
|
|
65
45
|
*/
|
|
66
46
|
temporary?: boolean;
|
|
67
47
|
|
|
68
|
-
/**
|
|
69
|
-
* Set this to `"nowrap"` for tooltips that are positioned near the edge of
|
|
70
|
-
* the viewport that have a position of `"above"` or `"below"` so that the
|
|
71
|
-
* tooltip no longer aligns to the center of the tooltipped element.
|
|
72
|
-
*
|
|
73
|
-
* Set this to `"ellipsis"` if the tooltip should only show a single line of
|
|
74
|
-
* text and ellipsis once it has reached the max tooltip width.
|
|
75
|
-
*
|
|
76
|
-
* @defaultValue `"allow"`
|
|
77
|
-
*/
|
|
78
|
-
textOverflow?: TextOverflow;
|
|
79
|
-
|
|
80
48
|
/**
|
|
81
49
|
* @see {@link CSSTransitionComponentProps.timeout}
|
|
82
50
|
* @defaultValue `DEFAULT_TOOLTIP_TIMEOUT`
|
package/src/tooltip/styles.ts
CHANGED
|
@@ -6,13 +6,54 @@ import { bem } from "../utils/bem.js";
|
|
|
6
6
|
|
|
7
7
|
const styles = bem("rmd-tooltip");
|
|
8
8
|
|
|
9
|
+
declare module "react" {
|
|
10
|
+
interface CSSProperties {
|
|
11
|
+
"--rmd-tooltip-background-color"?: string;
|
|
12
|
+
"--rmd-tooltip-border-radius"?: string | number;
|
|
13
|
+
"--rmd-tooltip-color"?: string;
|
|
14
|
+
"--rmd-tooltip-spacing"?: string | number;
|
|
15
|
+
"--rmd-tooltip-z-index"?: string | number;
|
|
16
|
+
"--rmd-tooltip-horizontal-padding"?: string | number;
|
|
17
|
+
"--rmd-tooltip-vertical-padding"?: string | number;
|
|
18
|
+
"--rmd-tooltip-min-height"?: string | number;
|
|
19
|
+
"--rmd-tooltip-max-width"?: string | number;
|
|
20
|
+
"--rmd-tooltip-dense-horizontal-padding"?: string | number;
|
|
21
|
+
"--rmd-tooltip-dense-vertical-padding"?: string | number;
|
|
22
|
+
"--rmd-tooltip-dense-min-height"?: string | number;
|
|
23
|
+
"--rmd-tooltip-transition-distance"?: string | number;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
9
27
|
/**
|
|
10
28
|
* @since 6.0.0
|
|
29
|
+
* @since 6.3.1 Allow `position` to be optional
|
|
11
30
|
*/
|
|
12
31
|
export interface TooltipClassNameOptions {
|
|
13
32
|
className?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Set this to `true` to use a smaller font size and padding on the tooltip
|
|
36
|
+
* and a smaller gap between the tooltip and tooltipped element.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue `false`
|
|
39
|
+
*/
|
|
14
40
|
dense?: boolean;
|
|
15
|
-
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @defaultValue `"below"`
|
|
44
|
+
*/
|
|
45
|
+
position?: SimplePosition;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Set this to `"nowrap"` for tooltips that are positioned near the edge of
|
|
49
|
+
* the viewport that have a position of `"above"` or `"below"` so that the
|
|
50
|
+
* tooltip no longer aligns to the center of the tooltipped element.
|
|
51
|
+
*
|
|
52
|
+
* Set this to `"ellipsis"` if the tooltip should only show a single line of
|
|
53
|
+
* text and ellipsis once it has reached the max tooltip width.
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue `"allow"`
|
|
56
|
+
*/
|
|
16
57
|
textOverflow?: TextOverflow;
|
|
17
58
|
}
|
|
18
59
|
|
|
@@ -20,7 +61,7 @@ export interface TooltipClassNameOptions {
|
|
|
20
61
|
* @since 6.0.0
|
|
21
62
|
*/
|
|
22
63
|
export function tooltip(options: TooltipClassNameOptions): string {
|
|
23
|
-
const { dense, position, className, textOverflow } = options;
|
|
64
|
+
const { dense, position = "below", className, textOverflow } = options;
|
|
24
65
|
|
|
25
66
|
return cnb(
|
|
26
67
|
styles({
|
|
@@ -12,14 +12,6 @@ import {
|
|
|
12
12
|
useSkeletonPlaceholder,
|
|
13
13
|
} from "./useSkeletonPlaceholder.js";
|
|
14
14
|
|
|
15
|
-
declare module "react" {
|
|
16
|
-
interface CSSProperties {
|
|
17
|
-
"--rmd-skeleton-placeholder-background-color"?: string;
|
|
18
|
-
"--rmd-skeleton-placeholder-height"?: string | number;
|
|
19
|
-
"--rmd-skeleton-placeholder-width"?: string | number;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
/** @since 6.0.0 */
|
|
24
16
|
export interface SkeletonPlaceholderProps
|
|
25
17
|
extends HTMLAttributes<HTMLDivElement>,
|
package/src/transition/Slide.tsx
CHANGED
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
useSlideTransition,
|
|
13
13
|
} from "./useSlideTransition.js";
|
|
14
14
|
|
|
15
|
+
// NOTE: Tis is in both `useSlideTransition` and `Slide` since there are no
|
|
16
|
+
// reusable types between these two files.
|
|
15
17
|
declare module "react" {
|
|
16
18
|
interface CSSProperties {
|
|
17
19
|
"--rmd-slide-duration"?: string | number;
|
|
@@ -3,6 +3,14 @@ import { type CSSProperties } from "react";
|
|
|
3
3
|
import { bem } from "../utils/bem.js";
|
|
4
4
|
import { randomInt } from "../utils/randomInt.js";
|
|
5
5
|
|
|
6
|
+
declare module "react" {
|
|
7
|
+
interface CSSProperties {
|
|
8
|
+
"--rmd-skeleton-placeholder-background-color"?: string;
|
|
9
|
+
"--rmd-skeleton-placeholder-height"?: string | number;
|
|
10
|
+
"--rmd-skeleton-placeholder-width"?: string | number;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
6
14
|
/**
|
|
7
15
|
* @since 6.0.0
|
|
8
16
|
*/
|
|
@@ -6,14 +6,29 @@ import { Children, cloneElement, isValidElement } from "react";
|
|
|
6
6
|
|
|
7
7
|
import { maxWidthTransition } from "./maxWidthTransition.js";
|
|
8
8
|
|
|
9
|
+
declare module "react" {
|
|
10
|
+
interface CSSProperites {
|
|
11
|
+
"--rmd-max-width"?: string | number;
|
|
12
|
+
"--rmd-max-width-gap"?: string | number;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 6.3.1
|
|
18
|
+
*/
|
|
19
|
+
export interface BaseMaxWidthTransitionOptions {
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
9
23
|
/**
|
|
10
24
|
* @since 6.0.0
|
|
25
|
+
* @since 6.3.1 Extends BaseMaxWidthTransitionOptions
|
|
11
26
|
*/
|
|
12
|
-
export interface MaxWidthTransitionOptions
|
|
27
|
+
export interface MaxWidthTransitionOptions
|
|
28
|
+
extends BaseMaxWidthTransitionOptions {
|
|
13
29
|
element: ReactNode;
|
|
14
30
|
transitionIn: boolean;
|
|
15
31
|
|
|
16
|
-
className?: string;
|
|
17
32
|
disabled?: boolean;
|
|
18
33
|
disableTransition?: boolean;
|
|
19
34
|
}
|
|
@@ -10,6 +10,14 @@ import {
|
|
|
10
10
|
} from "./types.js";
|
|
11
11
|
import { useCSSTransition } from "./useCSSTransition.js";
|
|
12
12
|
|
|
13
|
+
// NOTE: Tis is in both `useSlideTransition` and `Slide` since there are no
|
|
14
|
+
// reusable types between these two files.
|
|
15
|
+
declare module "react" {
|
|
16
|
+
interface CSSProperties {
|
|
17
|
+
"--rmd-slide-duration"?: string | number;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
/** @since 6.0.0 */
|
|
14
22
|
export const DEFAULT_SLIDE_TRANSITION_TIMEOUT =
|
|
15
23
|
150 as const satisfies TransitionTimeout;
|
package/src/tree/Tree.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { RenderRecursively } from "../utils/RenderRecursively.js";
|
|
|
17
17
|
import { identity } from "../utils/identity.js";
|
|
18
18
|
import { DefaultTreeItemRenderer } from "./DefaultTreeItemRenderer.js";
|
|
19
19
|
import { type TreeExpansionMode, TreeProvider } from "./TreeProvider.js";
|
|
20
|
-
import { tree } from "./styles.js";
|
|
20
|
+
import { type TreeClassNameOptions, tree } from "./styles.js";
|
|
21
21
|
import {
|
|
22
22
|
type TreeData,
|
|
23
23
|
type TreeItemNode,
|
|
@@ -29,15 +29,6 @@ import { useTreeItems } from "./useTreeItems.js";
|
|
|
29
29
|
import { useTreeMovement } from "./useTreeMovement.js";
|
|
30
30
|
import { type TreeSelection } from "./useTreeSelection.js";
|
|
31
31
|
|
|
32
|
-
declare module "react" {
|
|
33
|
-
interface CSSProperties {
|
|
34
|
-
"--rmd-tree-depth"?: number;
|
|
35
|
-
"--rmd-tree-item-padding"?: string | number;
|
|
36
|
-
"--rmd-tree-item-padding-base"?: string | number;
|
|
37
|
-
"--rmd-tree-item-padding-incrementor"?: string | number;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
32
|
/**
|
|
42
33
|
* @since 6.0.0
|
|
43
34
|
*/
|
|
@@ -55,9 +46,13 @@ export type TreeHTMLAttributes = Omit<
|
|
|
55
46
|
* - `getItemLabel`
|
|
56
47
|
* - `getItemValue`
|
|
57
48
|
* - `getItemProps`
|
|
49
|
+
*
|
|
50
|
+
* @since 6.3.1 Extends TreeClassNameOptions for CSSProperties module
|
|
51
|
+
* augmentation.
|
|
58
52
|
*/
|
|
59
53
|
export interface TreeProps<T extends TreeItemNode>
|
|
60
54
|
extends TreeHTMLAttributes,
|
|
55
|
+
TreeClassNameOptions,
|
|
61
56
|
TreeExpansion,
|
|
62
57
|
TreeSelection {
|
|
63
58
|
/** @see {@link TreeData} */
|
package/src/tree/styles.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cnb } from "cnbuilder";
|
|
2
2
|
|
|
3
|
-
import type
|
|
3
|
+
import { type InternalListItemClassNameOptions } from "../list/listItemStyles.js";
|
|
4
4
|
import { listItem } from "../list/listItemStyles.js";
|
|
5
5
|
import { bem } from "../utils/bem.js";
|
|
6
6
|
|
|
@@ -8,6 +8,15 @@ const treeStyles = bem("rmd-tree");
|
|
|
8
8
|
const treeItemStyles = bem("rmd-tree-item");
|
|
9
9
|
const treeGroupStyles = bem("rmd-tree-group");
|
|
10
10
|
|
|
11
|
+
declare module "react" {
|
|
12
|
+
interface CSSProperties {
|
|
13
|
+
"--rmd-tree-depth"?: number;
|
|
14
|
+
"--rmd-tree-item-padding"?: string | number;
|
|
15
|
+
"--rmd-tree-item-padding-base"?: string | number;
|
|
16
|
+
"--rmd-tree-item-padding-incrementor"?: string | number;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
11
20
|
/** @since 6.0.0 */
|
|
12
21
|
export interface TreeClassNameOptions {
|
|
13
22
|
className?: string;
|
package/src/typography/Mark.tsx
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode, forwardRef } from "react";
|
|
2
2
|
|
|
3
|
-
import { mark } from "./markStyles.js";
|
|
3
|
+
import { type MarkClassNameOptions, mark } from "./markStyles.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @since 6.0.0
|
|
7
|
+
* @since 6.3.1 Extends MarkClassNameOptions for CSSProperties module
|
|
8
|
+
* augmentation.
|
|
7
9
|
*/
|
|
8
|
-
export interface MarkProps
|
|
10
|
+
export interface MarkProps
|
|
11
|
+
extends HTMLAttributes<HTMLElement>,
|
|
12
|
+
MarkClassNameOptions {
|
|
9
13
|
children: ReactNode;
|
|
10
14
|
}
|
|
11
15
|
|
|
@@ -5,13 +5,6 @@ import {
|
|
|
5
5
|
textContainer,
|
|
6
6
|
} from "./textContainerStyles.js";
|
|
7
7
|
|
|
8
|
-
declare module "react" {
|
|
9
|
-
interface CSSProperties {
|
|
10
|
-
"--rmd-line-length"?: string | number;
|
|
11
|
-
"--rmd-text-container-padding"?: string | number;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
/**
|
|
16
9
|
* @since 6.0.0 Removed the `size` option since there is no longer a
|
|
17
10
|
* different line-length for mobile and desktop.
|
|
@@ -4,6 +4,13 @@ import { bem } from "../utils/bem.js";
|
|
|
4
4
|
|
|
5
5
|
const styles = bem("rmd-text-container");
|
|
6
6
|
|
|
7
|
+
declare module "react" {
|
|
8
|
+
interface CSSProperties {
|
|
9
|
+
"--rmd-line-length"?: string | number;
|
|
10
|
+
"--rmd-text-container-padding"?: string | number;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
/**
|
|
8
15
|
* @since 6.0.0
|
|
9
16
|
*/
|
|
@@ -2,6 +2,16 @@ import { cnb } from "cnbuilder";
|
|
|
2
2
|
|
|
3
3
|
import { type TextCssUtilsOptions, cssUtils } from "../cssUtils.js";
|
|
4
4
|
|
|
5
|
+
declare module "react" {
|
|
6
|
+
interface CSSProperties {
|
|
7
|
+
"--rmd-font-size"?: string;
|
|
8
|
+
"--rmd-font-family"?: string;
|
|
9
|
+
"--rmd-font-weight"?: string | number;
|
|
10
|
+
"--rmd-font-height"?: string | number;
|
|
11
|
+
"--rmd-font-line-height"?: string | number;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
/**
|
|
6
16
|
* A union of all the material design provided typography styles. When used with
|
|
7
17
|
* the Typography component, this will generate the correct typography className
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { type ButtonHTMLAttributes, forwardRef } from "react";
|
|
2
2
|
|
|
3
3
|
import { type LabelRequiredForA11y } from "../types.js";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
type BaseWindowSplitterClassNameOptions,
|
|
6
|
+
windowSplitter,
|
|
7
|
+
} from "./styles.js";
|
|
5
8
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
9
|
import { type useWindowSplitter } from "./useWindowSplitter.js";
|
|
7
10
|
|
|
8
|
-
declare module "react" {
|
|
9
|
-
interface CSSProperties {
|
|
10
|
-
"--rmd-window-splitter-top"?: number | string;
|
|
11
|
-
"--rmd-window-splitter-right"?: number | string;
|
|
12
|
-
"--rmd-window-splitter-bottom"?: number | string;
|
|
13
|
-
"--rmd-window-splitter-left"?: number | string;
|
|
14
|
-
"--rmd-window-splitter-opacity"?: number | string;
|
|
15
|
-
"--rmd-window-splitter-position"?: number | string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
11
|
/**
|
|
20
|
-
* @since 6.0.0
|
|
21
12
|
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/}
|
|
13
|
+
* @since 6.0.0
|
|
14
|
+
* @since 6.3.1 Extends BaseWindowSplitterClassNameOptions for CSSProperties
|
|
15
|
+
* module augmentation.
|
|
22
16
|
*/
|
|
23
17
|
export interface BaseWindowSplitterProps
|
|
24
|
-
extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"
|
|
18
|
+
extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children">,
|
|
19
|
+
BaseWindowSplitterClassNameOptions {
|
|
25
20
|
/**
|
|
26
21
|
* This will be provided by the {@link useWindowSplitter} hook.
|
|
27
22
|
*/
|
|
@@ -36,14 +31,6 @@ export interface BaseWindowSplitterProps
|
|
|
36
31
|
* This will be provided by the {@link useWindowSplitter} hook.
|
|
37
32
|
*/
|
|
38
33
|
reversed: boolean;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Set this to `true` if the window splitter should use `position: absolute`
|
|
42
|
-
* instead of `position: fixed`.
|
|
43
|
-
*
|
|
44
|
-
* @defaultValue `false`
|
|
45
|
-
*/
|
|
46
|
-
disableFixed?: boolean;
|
|
47
34
|
}
|
|
48
35
|
|
|
49
36
|
/**
|