@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.
Files changed (201) hide show
  1. package/dist/_base.scss +1 -1
  2. package/dist/app-bar/styles.d.ts +0 -2
  3. package/dist/app-bar/styles.js.map +1 -1
  4. package/dist/autocomplete/types.d.ts +12 -0
  5. package/dist/autocomplete/types.js.map +1 -1
  6. package/dist/avatar/Avatar.d.ts +0 -10
  7. package/dist/avatar/Avatar.js.map +1 -1
  8. package/dist/avatar/styles.d.ts +10 -0
  9. package/dist/avatar/styles.js.map +1 -1
  10. package/dist/badge/Badge.d.ts +11 -0
  11. package/dist/badge/Badge.js.map +1 -1
  12. package/dist/badge/styles.d.ts +0 -8
  13. package/dist/badge/styles.js.map +1 -1
  14. package/dist/box/_box.scss +8 -8
  15. package/dist/box/styles.d.ts +9 -0
  16. package/dist/box/styles.js.map +1 -1
  17. package/dist/button/_button.scss +4 -0
  18. package/dist/button/styles.d.ts +5 -1
  19. package/dist/button/styles.js.map +1 -1
  20. package/dist/card/Card.d.ts +0 -7
  21. package/dist/card/Card.js.map +1 -1
  22. package/dist/card/styles.d.ts +6 -0
  23. package/dist/card/styles.js +8 -8
  24. package/dist/card/styles.js.map +1 -1
  25. package/dist/chip/Chip.d.ts +6 -13
  26. package/dist/chip/Chip.js.map +1 -1
  27. package/dist/chip/styles.d.ts +26 -1
  28. package/dist/chip/styles.js.map +1 -1
  29. package/dist/dialog/styles.d.ts +5 -2
  30. package/dist/dialog/styles.js.map +1 -1
  31. package/dist/divider/styles.d.ts +1 -1
  32. package/dist/divider/styles.js.map +1 -1
  33. package/dist/error-boundary/ErrorBoundary.js.map +1 -1
  34. package/dist/files/validation.js.map +1 -1
  35. package/dist/form/InputToggle.js.map +1 -1
  36. package/dist/form/Label.d.ts +0 -10
  37. package/dist/form/Label.js.map +1 -1
  38. package/dist/form/Slider.d.ts +4 -0
  39. package/dist/form/Slider.js.map +1 -1
  40. package/dist/form/Switch.js.map +1 -1
  41. package/dist/form/TextArea.js.map +1 -1
  42. package/dist/form/TextFieldContainer.d.ts +0 -13
  43. package/dist/form/TextFieldContainer.js.map +1 -1
  44. package/dist/form/_select.scss +5 -1
  45. package/dist/form/_text-area.scss +2 -1
  46. package/dist/form/_text-field.scss +1 -0
  47. package/dist/form/types.d.ts +20 -0
  48. package/dist/form/types.js.map +1 -1
  49. package/dist/interaction/types.d.ts +5 -1
  50. package/dist/interaction/types.js.map +1 -1
  51. package/dist/link/Link.d.ts +0 -7
  52. package/dist/link/Link.js.map +1 -1
  53. package/dist/link/styles.d.ts +7 -0
  54. package/dist/link/styles.js.map +1 -1
  55. package/dist/list/List.d.ts +5 -20
  56. package/dist/list/List.js.map +1 -1
  57. package/dist/list/ListItem.d.ts +4 -38
  58. package/dist/list/ListItem.js.map +1 -1
  59. package/dist/list/listItemStyles.d.ts +24 -2
  60. package/dist/list/listItemStyles.js.map +1 -1
  61. package/dist/list/listStyles.d.ts +17 -2
  62. package/dist/list/listStyles.js.map +1 -1
  63. package/dist/menu/Menu.js.map +1 -1
  64. package/dist/navigation/NavItem.d.ts +4 -1
  65. package/dist/navigation/NavItem.js.map +1 -1
  66. package/dist/navigation/navItemStyles.d.ts +7 -0
  67. package/dist/navigation/navItemStyles.js.map +1 -1
  68. package/dist/overlay/Overlay.d.ts +4 -23
  69. package/dist/overlay/Overlay.js.map +1 -1
  70. package/dist/overlay/styles.d.ts +26 -8
  71. package/dist/overlay/styles.js.map +1 -1
  72. package/dist/progress/LinearProgress.d.ts +4 -9
  73. package/dist/progress/LinearProgress.js.map +1 -1
  74. package/dist/progress/circularProgressStyles.d.ts +6 -0
  75. package/dist/progress/circularProgressStyles.js.map +1 -1
  76. package/dist/progress/linearProgressStyles.d.ts +20 -5
  77. package/dist/progress/linearProgressStyles.js.map +1 -1
  78. package/dist/progress/types.d.ts +0 -9
  79. package/dist/progress/types.js.map +1 -1
  80. package/dist/segmented-button/SegmentedButton.d.ts +7 -12
  81. package/dist/segmented-button/SegmentedButton.js.map +1 -1
  82. package/dist/segmented-button/segmentedButtonStyles.d.ts +26 -3
  83. package/dist/segmented-button/segmentedButtonStyles.js.map +1 -1
  84. package/dist/sheet/Sheet.d.ts +0 -12
  85. package/dist/sheet/Sheet.js.map +1 -1
  86. package/dist/sheet/styles.d.ts +12 -0
  87. package/dist/sheet/styles.js.map +1 -1
  88. package/dist/snackbar/Toast.d.ts +2 -13
  89. package/dist/snackbar/Toast.js.map +1 -1
  90. package/dist/snackbar/ToastManager.js.map +1 -1
  91. package/dist/snackbar/toastStyles.d.ts +17 -2
  92. package/dist/snackbar/toastStyles.js.map +1 -1
  93. package/dist/tabs/Tab.d.ts +2 -41
  94. package/dist/tabs/Tab.js.map +1 -1
  95. package/dist/tabs/tabStyles.d.ts +45 -4
  96. package/dist/tabs/tabStyles.js.map +1 -1
  97. package/dist/test-utils/mocks/IntersectionObserver.js.map +1 -1
  98. package/dist/test-utils/mocks/ResizeObserver.js.map +1 -1
  99. package/dist/test-utils/utils/createFileList.js.map +1 -1
  100. package/dist/theme/_theme.scss +0 -1
  101. package/dist/theme/getDerivedTheme.d.ts +0 -24
  102. package/dist/theme/getDerivedTheme.js.map +1 -1
  103. package/dist/theme/types.d.ts +25 -0
  104. package/dist/theme/types.js.map +1 -1
  105. package/dist/tooltip/Tooltip.d.ts +4 -32
  106. package/dist/tooltip/Tooltip.js.map +1 -1
  107. package/dist/tooltip/styles.d.ts +38 -1
  108. package/dist/tooltip/styles.js +1 -1
  109. package/dist/tooltip/styles.js.map +1 -1
  110. package/dist/transition/SkeletonPlaceholder.d.ts +0 -7
  111. package/dist/transition/SkeletonPlaceholder.js.map +1 -1
  112. package/dist/transition/Slide.js.map +1 -1
  113. package/dist/transition/skeletonPlaceholderUtils.d.ts +7 -0
  114. package/dist/transition/skeletonPlaceholderUtils.js.map +1 -1
  115. package/dist/transition/useMaxWidthTransition.d.ts +14 -2
  116. package/dist/transition/useMaxWidthTransition.js.map +1 -1
  117. package/dist/transition/useSlideTransition.d.ts +5 -0
  118. package/dist/transition/useSlideTransition.js.map +1 -1
  119. package/dist/tree/Tree.d.ts +5 -9
  120. package/dist/tree/Tree.js.map +1 -1
  121. package/dist/tree/styles.d.ts +9 -1
  122. package/dist/tree/styles.js.map +1 -1
  123. package/dist/typography/Mark.d.ts +4 -1
  124. package/dist/typography/Mark.js.map +1 -1
  125. package/dist/typography/TextContainer.d.ts +0 -6
  126. package/dist/typography/TextContainer.js.map +1 -1
  127. package/dist/typography/markStyles.d.ts +5 -0
  128. package/dist/typography/markStyles.js.map +1 -1
  129. package/dist/typography/textContainerStyles.d.ts +6 -0
  130. package/dist/typography/textContainerStyles.js.map +1 -1
  131. package/dist/typography/typographyStyles.d.ts +9 -0
  132. package/dist/typography/typographyStyles.js.map +1 -1
  133. package/dist/useResizeObserver.js.map +1 -1
  134. package/dist/window-splitter/WindowSplitter.d.ts +5 -19
  135. package/dist/window-splitter/WindowSplitter.js.map +1 -1
  136. package/dist/window-splitter/styles.d.ts +27 -3
  137. package/dist/window-splitter/styles.js.map +1 -1
  138. package/package.json +8 -8
  139. package/src/app-bar/styles.ts +0 -2
  140. package/src/autocomplete/types.ts +17 -0
  141. package/src/avatar/Avatar.tsx +0 -11
  142. package/src/avatar/styles.ts +11 -0
  143. package/src/badge/Badge.tsx +12 -0
  144. package/src/badge/styles.ts +0 -9
  145. package/src/box/styles.ts +9 -0
  146. package/src/button/styles.ts +5 -1
  147. package/src/card/Card.tsx +0 -8
  148. package/src/card/styles.ts +15 -8
  149. package/src/chip/Chip.tsx +9 -15
  150. package/src/chip/styles.ts +29 -1
  151. package/src/dialog/styles.ts +5 -2
  152. package/src/divider/styles.ts +1 -1
  153. package/src/form/InputToggle.tsx +2 -0
  154. package/src/form/Label.tsx +0 -11
  155. package/src/form/Slider.tsx +6 -0
  156. package/src/form/Switch.tsx +2 -0
  157. package/src/form/TextArea.tsx +2 -0
  158. package/src/form/TextFieldContainer.tsx +0 -14
  159. package/src/form/types.ts +29 -0
  160. package/src/interaction/types.ts +5 -1
  161. package/src/link/Link.tsx +0 -8
  162. package/src/link/styles.ts +8 -0
  163. package/src/list/List.tsx +7 -24
  164. package/src/list/ListItem.tsx +7 -43
  165. package/src/list/listItemStyles.ts +26 -2
  166. package/src/list/listStyles.ts +18 -2
  167. package/src/menu/Menu.tsx +2 -0
  168. package/src/navigation/NavItem.tsx +6 -2
  169. package/src/navigation/navItemStyles.ts +8 -0
  170. package/src/overlay/Overlay.tsx +4 -26
  171. package/src/overlay/styles.ts +29 -10
  172. package/src/progress/LinearProgress.tsx +8 -10
  173. package/src/progress/circularProgressStyles.ts +7 -0
  174. package/src/progress/linearProgressStyles.ts +22 -5
  175. package/src/progress/types.ts +0 -10
  176. package/src/segmented-button/SegmentedButton.tsx +14 -15
  177. package/src/segmented-button/segmentedButtonStyles.ts +28 -3
  178. package/src/sheet/Sheet.tsx +0 -13
  179. package/src/sheet/styles.ts +13 -0
  180. package/src/snackbar/Toast.tsx +2 -15
  181. package/src/snackbar/toastStyles.ts +20 -2
  182. package/src/tabs/Tab.tsx +4 -49
  183. package/src/tabs/tabStyles.ts +52 -4
  184. package/src/theme/getDerivedTheme.ts +0 -26
  185. package/src/theme/types.ts +26 -0
  186. package/src/tooltip/Tooltip.tsx +4 -36
  187. package/src/tooltip/styles.ts +43 -2
  188. package/src/transition/SkeletonPlaceholder.tsx +0 -8
  189. package/src/transition/Slide.tsx +2 -0
  190. package/src/transition/skeletonPlaceholderUtils.ts +8 -0
  191. package/src/transition/useMaxWidthTransition.ts +17 -2
  192. package/src/transition/useSlideTransition.ts +8 -0
  193. package/src/tree/Tree.tsx +5 -10
  194. package/src/tree/styles.ts +10 -1
  195. package/src/typography/Mark.tsx +6 -2
  196. package/src/typography/TextContainer.tsx +0 -7
  197. package/src/typography/markStyles.ts +6 -0
  198. package/src/typography/textContainerStyles.ts +7 -0
  199. package/src/typography/typographyStyles.ts +10 -0
  200. package/src/window-splitter/WindowSplitter.tsx +9 -22
  201. package/src/window-splitter/styles.ts +31 -3
@@ -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 { listItem } from "./listItemStyles.js";
11
- import { type ListItemChildrenProps, type ListItemHeight } from "./types.js";
12
-
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-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
- /** @since 6.0.0 */
14
- export interface ListItemClassNameOptions {
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
@@ -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
- /** @defaultValue `false` */
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
- /** @defaultValue `false` */
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 extends LiHTMLAttributes<HTMLLIElement> {
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
  */
@@ -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
@@ -13,26 +13,45 @@ import { bem } from "../utils/bem.js";
13
13
 
14
14
  const styles = bem("rmd-overlay");
15
15
 
16
- /** @since 6.0.0 */
17
- export interface OverlayClassNameOptions {
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
- /** @defaultValue `false` */
23
- active?: boolean;
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
- absolute?: boolean;
30
-
31
- /** @defaultValue `"center"` */
32
- align?: BoxAlignItems;
51
+ active?: boolean;
33
52
 
34
- /** @defaultValue `"center"` */
35
- justify?: BoxJustifyContent;
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 { linearProgress, linearProgressBar } from "./linearProgressStyles.js";
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
- * @since 6.2.0
11
- */
12
- export interface LinearProgressClassNameOptions {
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
- /** @defaultValue `false` */
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
  }
@@ -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 { useMaxWidthTransition } from "../transition/useMaxWidthTransition.js";
10
- import { segmentedButton } from "./segmentedButtonStyles.js";
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.0.0
22
+ * @since 6.3.1
10
23
  */
11
- export interface SegmentedButtonClassNameOptions {
24
+ export interface BaseSegmentedButtonClassNameOptions {
12
25
  className?: string;
13
26
 
14
- /** @defaultValue `false` */
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
  }
@@ -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
  */
@@ -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
  */
@@ -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
- /** @since 6.0.0 */
9
- export interface ToastClassNameOptions {
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` */