@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
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/window-splitter/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-window-splitter\");\n\n/**\n * @since 6.0.0\n */\nexport interface WindowSplitterClassNameOptions {\n className?: string;\n dragging?: boolean;\n reversed?: boolean;\n vertical?: boolean;\n disableFixed?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function windowSplitter(\n options: WindowSplitterClassNameOptions = {}\n): string {\n const {\n vertical = false,\n dragging,\n reversed,\n disableFixed,\n className,\n } = options;\n\n return cnb(\n styles({\n h: !vertical,\n hr: !vertical && reversed,\n v: vertical,\n vr: vertical && reversed,\n a: disableFixed,\n dragging,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","windowSplitter","options","vertical","dragging","reversed","disableFixed","className","h","hr","v","vr","a"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAanB;;CAEC,GACD,OAAO,SAASE,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EACJC,WAAW,KAAK,EAChBC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,SAAS,EACV,GAAGL;IAEJ,OAAOJ,IACLE,OAAO;QACLQ,GAAG,CAACL;QACJM,IAAI,CAACN,YAAYE;QACjBK,GAAGP;QACHQ,IAAIR,YAAYE;QAChBO,GAAGN;QACHF;IACF,IACAG;AAEJ"}
1
+ {"version":3,"sources":["../../src/window-splitter/styles.ts"],"sourcesContent":["import { cnb } from \"cnbuilder\";\n\nimport { bem } from \"../utils/bem.js\";\n\nconst styles = bem(\"rmd-window-splitter\");\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-window-splitter-size\"?: string | number;\n \"--rmd-window-splitter-background-size\"?: string | number;\n \"--rmd-window-splitter-x\"?: string | number;\n \"--rmd-window-splitter-y\"?: string | number;\n \"--rmd-window-splitter-z\"?: string | number;\n \"--rmd-window-splitter-position\"?: string | number;\n \"--rmd-window-splitter-backgrond-color\"?: string;\n \"--rmd-window-splitter-opacity\"?: string | number;\n }\n}\n\n/**\n * @since 6.3.1\n */\nexport interface BaseWindowSplitterClassNameOptions {\n className?: string;\n\n /**\n * Set this to `true` if the window splitter should use `position: absolute`\n * instead of `position: fixed`.\n *\n * @defaultValue `false`\n */\n disableFixed?: boolean;\n}\n\n/**\n * @since 6.0.0\n * @since 6.3.1 Extends BaseWindowSplitterClassNameOptions\n */\nexport interface WindowSplitterClassNameOptions\n extends BaseWindowSplitterClassNameOptions {\n dragging?: boolean;\n reversed?: boolean;\n vertical?: boolean;\n}\n\n/**\n * @since 6.0.0\n */\nexport function windowSplitter(\n options: WindowSplitterClassNameOptions = {}\n): string {\n const {\n vertical = false,\n dragging,\n reversed,\n disableFixed,\n className,\n } = options;\n\n return cnb(\n styles({\n h: !vertical,\n hr: !vertical && reversed,\n v: vertical,\n vr: vertical && reversed,\n a: disableFixed,\n dragging,\n }),\n className\n );\n}\n"],"names":["cnb","bem","styles","windowSplitter","options","vertical","dragging","reversed","disableFixed","className","h","hr","v","vr","a"],"mappings":"AAAA,SAASA,GAAG,QAAQ,YAAY;AAEhC,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAMC,SAASD,IAAI;AAyCnB;;CAEC,GACD,OAAO,SAASE,eACdC,UAA0C,CAAC,CAAC;IAE5C,MAAM,EACJC,WAAW,KAAK,EAChBC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EACZC,SAAS,EACV,GAAGL;IAEJ,OAAOJ,IACLE,OAAO;QACLQ,GAAG,CAACL;QACJM,IAAI,CAACN,YAAYE;QACjBK,GAAGP;QACHQ,IAAIR,YAAYE;QAChBO,GAAGN;QACHF;IACF,IACAG;AAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-md/core",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "description": "The core components and functionality for react-md.",
5
5
  "type": "module",
6
6
  "sass": "./dist/_core.scss",
@@ -84,19 +84,19 @@
84
84
  "@microsoft/api-extractor": "^7.52.8",
85
85
  "@mlaursen/eslint-config": "^8.0.1",
86
86
  "@swc/cli": "^0.6.0",
87
- "@swc/core": "^1.11.29",
88
- "@swc/jest": "^0.2.38",
87
+ "@swc/core": "^1.12.11",
88
+ "@swc/jest": "^0.2.39",
89
89
  "@testing-library/dom": "^10.4.0",
90
90
  "@testing-library/jest-dom": "^6.6.3",
91
91
  "@testing-library/react": "^16.3.0",
92
92
  "@testing-library/user-event": "^14.6.1",
93
93
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
94
- "@types/lodash": "^4.17.17",
94
+ "@types/lodash": "^4.17.20",
95
95
  "@types/node": "^22.15.29",
96
96
  "@types/react": "^18.3.12",
97
97
  "@types/react-dom": "^18.3.1",
98
98
  "chokidar": "^4.0.3",
99
- "eslint": "^9.29.0",
99
+ "eslint": "^9.30.1",
100
100
  "filesize": "^10.1.6",
101
101
  "glob": "11.0.3",
102
102
  "jest": "^29.7.0",
@@ -105,8 +105,8 @@
105
105
  "lodash": "^4.17.21",
106
106
  "lz-string": "^1.5.0",
107
107
  "npm-run-all": "^4.1.5",
108
- "prettier": "^3.5.3",
109
- "stylelint": "^16.20.0",
108
+ "prettier": "^3.6.2",
109
+ "stylelint": "^16.21.1",
110
110
  "stylelint-config-prettier-scss": "^1.0.0",
111
111
  "stylelint-config-recommended-scss": "^15.0.1",
112
112
  "stylelint-order": "^7.0.0",
@@ -115,7 +115,7 @@
115
115
  "ts-node": "^10.9.2",
116
116
  "tsx": "^4.20.3",
117
117
  "typescript": "^5.8.3",
118
- "vitest": "^3.2.3"
118
+ "vitest": "^3.2.4"
119
119
  },
120
120
  "peerDependencies": {
121
121
  "@jest/globals": "^29.7.0",
@@ -8,8 +8,6 @@ import { bem } from "../utils/bem.js";
8
8
  declare module "react" {
9
9
  interface CSSProperties {
10
10
  "--rmd-app-bar-height"?: string | number;
11
- "--rmd-app-bar-background-color"?: string;
12
- "--rmd-app-bar-color"?: string;
13
11
  "--rmd-app-bar-surface-background-color"?: string;
14
12
  "--rmd-app-bar-surface-color"?: string;
15
13
  }
@@ -37,6 +37,23 @@ import {
37
37
  type UseStateInitializer,
38
38
  } from "../types.js";
39
39
 
40
+ // NOTE: The augmentation appears in this file since both
41
+ // the `Autocomplete` and `autocompleteStyles` import this
42
+ // file. The augmentation only works if a type definition
43
+ // exists in the compiled `*.d.ts`
44
+ declare module "react" {
45
+ interface CSSProperties {
46
+ "--rmd-autocomplete-clear-button-size"?: string;
47
+ "--rmd-autocomplete-dropdown-button-size"?: string;
48
+ "--rmd-autocomplete-circular-progress-size"?: string;
49
+ "--rmd-autocomplete-inline-gap"?: string;
50
+ "--rmd-autocomplete-inline-min-width"?: string;
51
+ "--rmd-autocomplete-addon-gap"?: string;
52
+ "--rmd-autocomplete-gap-count"?: string;
53
+ "--rmd-autocomplete-addon-spacing"?: string;
54
+ }
55
+ }
56
+
40
57
  /**
41
58
  * If a autocomplete value is one of these types, no additional code is required
42
59
  * to display a label in the input/chip for the autocomplete once the value has
@@ -8,17 +8,6 @@ import {
8
8
  import { type PropsWithRef } from "../types.js";
9
9
  import { type AvatarClassNameOptions, avatar, avatarImage } from "./styles.js";
10
10
 
11
- declare module "react" {
12
- interface CSSProperties {
13
- "--rmd-avatar-background-color"?: string;
14
- "--rmd-avatar-color"?: string;
15
- "--rmd-avatar-border-color"?: string;
16
- "--rmd-avatar-border-radius"?: string | number;
17
- "--rmd-avatar-size"?: string | number;
18
- "--rmd-avatar-font-size"?: string | number;
19
- }
20
- }
21
-
22
11
  export type AvatarImgAttributes = ImgHTMLAttributes<HTMLImageElement>;
23
12
 
24
13
  /**
@@ -4,6 +4,17 @@ import { type ThemeColor, cssUtils } from "../cssUtils.js";
4
4
  import { type OverridableStringUnion } from "../types.js";
5
5
  import { bem } from "../utils/bem.js";
6
6
 
7
+ declare module "react" {
8
+ interface CSSProperties {
9
+ "--rmd-avatar-background-color"?: string;
10
+ "--rmd-avatar-color"?: string;
11
+ "--rmd-avatar-border-color"?: string;
12
+ "--rmd-avatar-border-radius"?: string | number;
13
+ "--rmd-avatar-size"?: string | number;
14
+ "--rmd-avatar-font-size"?: string | number;
15
+ }
16
+ }
17
+
7
18
  const styles = bem("rmd-avatar");
8
19
 
9
20
  /**
@@ -2,6 +2,18 @@ import { type HTMLAttributes, type ReactNode, forwardRef } from "react";
2
2
 
3
3
  import { type BadgeTheme, badge } from "./styles.js";
4
4
 
5
+ declare module "react" {
6
+ interface CSSProperties {
7
+ "--rmd-badge-border-radius"?: string | number;
8
+ "--rmd-badge-greyscale-background-color"?: string;
9
+ "--rmd-badge-greyscale-color"?: string;
10
+ "--rmd-badge-size"?: string | number;
11
+ "--rmd-badge-offset"?: string | number;
12
+ "--rmd-badge-offset-top"?: string | number;
13
+ "--rmd-badge-offset-right"?: string | number;
14
+ }
15
+ }
16
+
5
17
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
6
18
  /** @defaultValue `"greyscale"` */
7
19
  theme?: BadgeTheme;
@@ -3,15 +3,6 @@ import { cnb } from "cnbuilder";
3
3
  import { type BackgroundColor, cssUtils } from "../cssUtils.js";
4
4
  import { bem } from "../utils/bem.js";
5
5
 
6
- declare module "react" {
7
- interface CSSProperties {
8
- "--rmd-badge-size"?: string | number;
9
- "--rmd-badge-offset"?: string | number;
10
- "--rmd-badge-offset-top"?: string | number;
11
- "--rmd-badge-offset-right"?: string | number;
12
- }
13
- }
14
-
15
6
  const styles = bem("rmd-badge");
16
7
 
17
8
  /**
package/src/box/styles.ts CHANGED
@@ -11,16 +11,25 @@ declare module "react" {
11
11
  interface CSSProperties {
12
12
  "--rmd-box-gap"?: string | number;
13
13
  "--rmd-box-padding"?: string | number;
14
+ "--rmd-box-padding-h"?: string | number;
15
+ "--rmd-box-padding-v"?: string | number;
14
16
  "--rmd-box-item-min-size"?: string | number;
17
+ "--rmd-box-item-min-height"?: string | number;
15
18
  "--rmd-box-columns"?: string | number;
19
+ "--rmd-box-row-max-height"?: string;
20
+ "--rmd-box-auto-rows-height"?: string;
16
21
  "--rmd-box-phone-columns"?: number | string;
22
+ "--rmd-box-phone-item-min-height"?: number | string;
17
23
  "--rmd-box-phone-item-min-size"?: number | string;
18
24
  "--rmd-box-tablet-columns"?: number | string;
19
25
  "--rmd-box-tablet-item-min-size"?: number | string;
26
+ "--rmd-box-tablet-item-min-height"?: number | string;
20
27
  "--rmd-box-desktop-columns"?: number | string;
21
28
  "--rmd-box-desktop-item-min-size"?: number | string;
29
+ "--rmd-box-desktop-item-min-height"?: number | string;
22
30
  "--rmd-box-large-desktop-columns"?: number | string;
23
31
  "--rmd-box-large-desktop-item-min-size"?: number | string;
32
+ "--rmd-box-large-desktop-item-min-height"?: number | string;
24
33
  }
25
34
  }
26
35
 
@@ -19,8 +19,12 @@ declare module "react" {
19
19
  "--rmd-button-text-vertical-padding"?: string | number;
20
20
  "--rmd-button-text-min-height"?: string | number;
21
21
  "--rmd-button-text-min-width"?: string | number;
22
+ "--rmd-button-text-border-radius"?: string | number;
22
23
  "--rmd-button-icon-size"?: string | number;
23
- "--rmd-button-icon-radius"?: string | number;
24
+ "--rmd-button-icon-padding"?: string | number;
25
+ "--rmd-button-icon-font-size"?: string | number;
26
+ "--rmd-button-icon-border-radius"?: string | number;
27
+ "--rmd-button-icon-square-border-radius"?: string | number;
24
28
  }
25
29
  }
26
30
 
package/src/card/Card.tsx CHANGED
@@ -4,14 +4,6 @@ import { Box } from "../box/Box.js";
4
4
  import { type BoxAlignItems, type BoxOptions } from "../box/styles.js";
5
5
  import { type CardClassNameOptions, card } from "./styles.js";
6
6
 
7
- declare module "react" {
8
- interface CSSProperties {
9
- "--rmd-card-background-color"?: string;
10
- "--rmd-card-color"?: string;
11
- "--rmd-card-secondary-color"?: string;
12
- }
13
- }
14
-
15
7
  /**
16
8
  * @since 6.0.0 Extends the {@link CardClassNameOptions} and removed the
17
9
  * deprecated `raiseable` prop
@@ -3,7 +3,14 @@ import { cnb } from "cnbuilder";
3
3
  import { cssUtils } from "../cssUtils.js";
4
4
  import { bem } from "../utils/bem.js";
5
5
 
6
- const cardStyles = bem("rmd-card");
6
+ const styles = bem("rmd-card");
7
+
8
+ declare module "react" {
9
+ interface CSSProperties {
10
+ "--rmd-card-background-color"?: string;
11
+ "--rmd-card-color"?: string;
12
+ }
13
+ }
7
14
 
8
15
  /** @since 6.0.0 */
9
16
  export interface CardClassNameOptions {
@@ -42,7 +49,7 @@ export function card(options: CardClassNameOptions = {}): string {
42
49
  const { className, bordered, raisable, interactable } = options;
43
50
 
44
51
  return cnb(
45
- cardStyles({
52
+ styles({
46
53
  bordered,
47
54
  shadowed: !bordered,
48
55
  raisable: !bordered && raisable,
@@ -70,7 +77,7 @@ export function cardHeader(options: CardHeaderClassNameOptions = {}): string {
70
77
  const { className, addonAfter = false, addonBefore = false } = options;
71
78
 
72
79
  return cnb(
73
- cardStyles("header", {
80
+ styles("header", {
74
81
  "addon-after": addonAfter && !addonBefore,
75
82
  "addon-before": addonBefore && !addonAfter,
76
83
  surrounded: addonAfter && addonBefore,
@@ -92,7 +99,7 @@ export function cardHeaderContent(
92
99
  ): string {
93
100
  const { className } = options;
94
101
 
95
- return cnb(cardStyles("header-content"), className);
102
+ return cnb(styles("header-content"), className);
96
103
  }
97
104
 
98
105
  /** @since 6.0.0 */
@@ -106,7 +113,7 @@ export interface CardTitleClassNameOptions {
106
113
  export function cardTitle(options: CardTitleClassNameOptions = {}): string {
107
114
  const { className } = options;
108
115
 
109
- return cnb(cardStyles("title"), className);
116
+ return cnb(styles("title"), className);
110
117
  }
111
118
 
112
119
  /** @since 6.0.0 */
@@ -122,7 +129,7 @@ export function cardSubtitle(
122
129
  ): string {
123
130
  const { className } = options;
124
131
 
125
- return cnb(cardStyles("subtitle"), className);
132
+ return cnb(styles("subtitle"), className);
126
133
  }
127
134
 
128
135
  /** @since 6.0.0 */
@@ -165,7 +172,7 @@ export function cardContent(options: CardContentClassNameOptions = {}): string {
165
172
  } = options;
166
173
 
167
174
  return cnb(
168
- cardStyles("content", {
175
+ styles("content", {
169
176
  padded: !disablePadding,
170
177
  "padding-bottom": !disableLastChildPadding,
171
178
  }),
@@ -187,5 +194,5 @@ export interface CardFooterClassNameOptions {
187
194
  export function cardFooter(options: CardFooterClassNameOptions = {}): string {
188
195
  const { className } = options;
189
196
 
190
- return cnb(cardStyles("footer"), className);
197
+ return cnb(styles("footer"), className);
191
198
  }
package/src/chip/Chip.tsx CHANGED
@@ -14,33 +14,27 @@ import { getIcon } from "../icon/config.js";
14
14
  import { type ComponentWithRippleProps } from "../interaction/types.js";
15
15
  import { useElementInteraction } from "../interaction/useElementInteraction.js";
16
16
  import { useHigherContrastChildren } from "../interaction/useHigherContrastChildren.js";
17
- import { useMaxWidthTransition } from "../transition/useMaxWidthTransition.js";
17
+ import {
18
+ type BaseMaxWidthTransitionOptions,
19
+ useMaxWidthTransition,
20
+ } from "../transition/useMaxWidthTransition.js";
18
21
  import { type PropsWithRef } from "../types.js";
19
- import { chip, chipContent } from "./styles.js";
20
-
21
- declare module "react" {
22
- interface CSSProperties {
23
- "--rmd-chip-solid-background-color"?: string;
24
- "--rmd-chip-solid-disabled-background-color"?: string;
25
- "--rmd-chip-solid-color"?: string;
26
- "--rmd-chip-theme-background-color"?: string;
27
- "--rmd-chip-theme-color"?: string;
28
- "--rmd-chip-outline-background-color"?: string;
29
- "--rmd-chip-outline-color"?: string;
30
- }
31
- }
22
+ import { type ChipTheme, chip, chipContent } from "./styles.js";
32
23
 
33
24
  /**
34
25
  * @since 6.0.0 Renamed the `noninteractive` prop to
35
26
  * `noninteractable`.
27
+ * @since 6.3.1 Extends BaseMaxWidthTransitionOptions for CSSProperties module
28
+ * augmentation.
36
29
  */
37
30
  export interface ChipProps
38
31
  extends ButtonHTMLAttributes<HTMLButtonElement>,
32
+ BaseMaxWidthTransitionOptions,
39
33
  ComponentWithRippleProps {
40
34
  /**
41
35
  * @defaultValue `"solid"`
42
36
  */
43
- theme?: "outline" | "solid";
37
+ theme?: ChipTheme;
44
38
 
45
39
  /**
46
40
  * Set this to `true` if the chip should gain additional box shadow while the
@@ -5,6 +5,30 @@ import { bem } from "../utils/bem.js";
5
5
 
6
6
  const styles = bem("rmd-chip");
7
7
 
8
+ declare module "react" {
9
+ interface CSSProperties {
10
+ "--rmd-chip-gap"?: string;
11
+ "--rmd-chip-height"?: string;
12
+ "--rmd-chip-border-radius"?: string | number;
13
+ "--rmd-chip-horizontal-padding"?: string | number;
14
+ "--rmd-chip-vertical-padding"?: string | number;
15
+ "--rmd-chip-solid-background-color"?: string;
16
+ "--rmd-chip-solid-disabled-background-color"?: string;
17
+ "--rmd-chip-solid-color"?: string;
18
+ "--rmd-chip-theme-background-color"?: string;
19
+ "--rmd-chip-theme-color"?: string;
20
+ "--rmd-chip-outline-color"?: string;
21
+ "--rmd-chip-outline-width"?: string | number;
22
+ "--rmd-chip-outline-background-color"?: string;
23
+ "--rmd-chip-outline-text-color"?: string;
24
+ }
25
+ }
26
+
27
+ /**
28
+ * @since 6.3.1
29
+ */
30
+ export type ChipTheme = "outline" | "solid";
31
+
8
32
  /**
9
33
  * @since 6.0.0
10
34
  *
@@ -39,10 +63,14 @@ const styles = bem("rmd-chip");
39
63
  */
40
64
  export interface ChipClassNameOptions {
41
65
  className?: string;
66
+
67
+ /**
68
+ * An optional className to provide only while {@link selected} is `true`.
69
+ */
42
70
  selectedClassName?: string;
43
71
 
44
72
  /** @defaultValue `"solid"` */
45
- theme?: "outline" | "solid";
73
+ theme?: ChipTheme;
46
74
 
47
75
  backgroundColor?: BackgroundColor;
48
76
 
@@ -9,8 +9,6 @@ import { DISPLAY_NONE_CLASS } from "../utils/isElementVisible.js";
9
9
 
10
10
  declare module "react" {
11
11
  interface CSSProperties {
12
- "--rmd-dialog-background-color"?: string;
13
- "--rmd-dialog-color"?: string;
14
12
  "--rmd-dialog-min-width"?: string | number;
15
13
  "--rmd-dialog-horizontal-margin"?: string | number;
16
14
  "--rmd-dialog-vertical-margin"?: string | number;
@@ -19,6 +17,11 @@ declare module "react" {
19
17
  "--rmd-dialog-header-padding-bottom"?: string | number;
20
18
  "--rmd-dialog-content-padding"?: string | number;
21
19
  "--rmd-dialog-footer-padding"?: string | number;
20
+ "--rmd-dialog-width"?: string | number;
21
+ "--rmd-dialog-small-width"?: string | number;
22
+ "--rmd-dialog-medium-width"?: string | number;
23
+ "--rmd-dialog-large-width"?: string | number;
24
+ "--rmd-dialog-extra-large-width"?: string | number;
22
25
  }
23
26
  }
24
27
 
@@ -5,7 +5,7 @@ import { bem } from "../utils/bem.js";
5
5
  declare module "react" {
6
6
  interface CSSProperties {
7
7
  "--rmd-divider-size"?: string | number;
8
- "--rmd-divider-vertical-size"?: string | number;
8
+ "--rmd-divider-border-size"?: string | number;
9
9
  "--rmd-divider-color"?: string;
10
10
  "--rmd-divider-spacing"?: string | number;
11
11
  "--rmd-divider-vertical-spacing"?: string | number;
@@ -18,6 +18,8 @@ import { FormMessageContainer } from "./FormMessageContainer.js";
18
18
  import { InputToggleIcon } from "./InputToggleIcon.js";
19
19
  import { Label } from "./Label.js";
20
20
  import { type InputToggleSize } from "./inputToggleStyles.js";
21
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
+ import { type LabelClassNameOptions } from "./types.js";
21
23
  import {
22
24
  type FormComponentStates,
23
25
  type FormMessageContainerExtension,
@@ -3,17 +3,6 @@ import { forwardRef } from "react";
3
3
  import { label } from "./labelStyles.js";
4
4
  import { type LabelProps } from "./types.js";
5
5
 
6
- declare module "react" {
7
- interface CSSProperties {
8
- "--rmd-label-floating-x"?: string | number;
9
- "--rmd-label-floating-y"?: string | number;
10
- "--rmd-label-floating-active-x"?: string | number;
11
- "--rmd-label-floating-active-y"?: string | number;
12
- "--rmd-label-active-padding"?: string | number;
13
- "--rmd-label-active-background-color"?: string;
14
- }
15
- }
16
-
17
6
  /**
18
7
  * Most of the form components already use this `Label` internally when a
19
8
  * `label` prop has been provided. You should generally use this component if
@@ -33,6 +33,8 @@ import { type RangeSliderState } from "./useRangeSlider.js";
33
33
  import { type SliderState, type SliderValueOptions } from "./useSlider.js";
34
34
  import { useSliderDraggable } from "./useSliderDraggable.js";
35
35
 
36
+ // NOTE: The augmentation appears in this file since no type definitions are
37
+ // ever imported from the `sliderStyles` file.
36
38
  declare module "react" {
37
39
  interface CSSProperties {
38
40
  "--rmd-slider-color"?: string;
@@ -47,6 +49,10 @@ declare module "react" {
47
49
  "--rmd-slider-tooltip-scale"?: string | number;
48
50
  "--rmd-slider-tooltip-translate"?: string | number;
49
51
  "--rmd-slider-mark-offset"?: string;
52
+ "--rmd-slider-mark-active-color"?: string;
53
+ "--rmd-slider-mark-active-opacity"?: string | number;
54
+ "--rmd-slider-mark-inactive-color"?: string;
55
+ "--rmd-slider-mark-inactive-opacity"?: string | number;
50
56
  }
51
57
  }
52
58
 
@@ -19,6 +19,8 @@ import {
19
19
  type FormMessageContainerExtension,
20
20
  } from "./types.js";
21
21
 
22
+ // NOTE: The augmentation appears in this file since no type definitions are
23
+ // ever imported from the `switchStyles` file.
22
24
  declare module "react" {
23
25
  interface CSSProperties {
24
26
  "--rmd-switch-track-background-color"?: string;
@@ -22,6 +22,8 @@ import {
22
22
  useResizingTextArea,
23
23
  } from "./useResizingTextArea.js";
24
24
 
25
+ // NOTE: The augmentation appears in this file since no type definitions are
26
+ // ever imported from the `textAreaStylesStyles` file.
25
27
  declare module "react" {
26
28
  interface CSSProperties {
27
29
  "--rmd-text-area-height"?: string | number;
@@ -7,20 +7,6 @@ import { getFormConfig } from "./formConfig.js";
7
7
  import { textFieldContainer } from "./textFieldContainerStyles.js";
8
8
  import { type TextFieldContainerOptions } from "./types.js";
9
9
 
10
- declare module "react" {
11
- interface CSSProperties {
12
- "--rmd-text-field-height"?: string | number;
13
- "--rmd-text-field-padding-left"?: string | number;
14
- "--rmd-text-field-padding-right"?: string | number;
15
- "--rmd-text-field-padding-top"?: string | number;
16
- "--rmd-text-field-border-color"?: string;
17
- "--rmd-text-field-hover-border-color"?: string;
18
- "--rmd-text-field-filled-color"?: string;
19
- "--rmd-form-addon-top"?: string | number;
20
- "--rmd-form-addon-margin-top"?: string | number;
21
- }
22
- }
23
-
24
10
  export interface TextFieldContainerProps
25
11
  extends HTMLAttributes<HTMLDivElement>,
26
12
  TextFieldContainerOptions {
package/src/form/types.ts CHANGED
@@ -12,6 +12,35 @@ declare module "react" {
12
12
  interface CSSProperties {
13
13
  "--rmd-form-active-color"?: string;
14
14
  "--rmd-form-focus-color"?: string;
15
+
16
+ // NOTE: The label properties are in this file since all label types are
17
+ // in this file. If they are able to be moved to labelStyles or Label and
18
+ // the compiled `.d.ts` includes the types from those files, this can be
19
+ // moved.
20
+ "--rmd-label-floating-x"?: string | number;
21
+ "--rmd-label-floating-y"?: string | number;
22
+ "--rmd-label-floating-active-x"?: string | number;
23
+ "--rmd-label-floating-active-y"?: string | number;
24
+ "--rmd-label-active-padding"?: string | number;
25
+ "--rmd-label-active-background-color"?: string;
26
+
27
+ // NOTE: The text field properties are in this file since there are no
28
+ // typedefs included from `TextFieldContainer` or
29
+ // `textFieldContainerStyles`.
30
+ "--rmd-text-field-addon-top"?: string | number;
31
+ "--rmd-text-field-addon-spacing"?: string | number;
32
+ "--rmd-text-field-addon-margin-top"?: string | number;
33
+ "--rmd-text-field-addon-left-offset"?: string | number;
34
+ "--rmd-text-field-height"?: string | number;
35
+ "--rmd-text-field-padding-left"?: string | number;
36
+ "--rmd-text-field-padding-right"?: string | number;
37
+ "--rmd-text-field-padding-top"?: string | number;
38
+ "--rmd-text-field-border-color"?: string;
39
+ "--rmd-text-field-hover-border-color"?: string;
40
+ "--rmd-text-field-filled-color"?: string;
41
+ "--rmd-text-field-filled-padding"?: string | number;
42
+ "--rmd-text-field-outlined-padding"?: string | number;
43
+ "--rmd-text-field-underlined-padding"?: string | number;
15
44
  }
16
45
  }
17
46
 
@@ -8,7 +8,6 @@ import type {
8
8
 
9
9
  declare module "react" {
10
10
  interface CSSProperties {
11
- "--rmd-ripple-background-color"?: string;
12
11
  "--rmd-interaction-background-color"?: string;
13
12
  "--rmd-hover-background-color"?: string;
14
13
  "--rmd-focus-background-color"?: string;
@@ -16,6 +15,11 @@ declare module "react" {
16
15
  "--rmd-selected-background-color"?: string;
17
16
  "--rmd-focus-color"?: string;
18
17
  "--rmd-focus-width"?: string | number;
18
+ "--rmd-ripple-inset"?: string | number;
19
+ "--rmd-ripple-border-radius"?: string | number;
20
+ "--rmd-ripple-background-color"?: string;
21
+ "--rmd-surface-inset"?: string | number;
22
+ "--rmd-surface-border-radius"?: string | number;
19
23
  }
20
24
  }
21
25
 
package/src/link/Link.tsx CHANGED
@@ -6,14 +6,6 @@ import {
6
6
 
7
7
  import { type LinkClassNameOptions, link } from "./styles.js";
8
8
 
9
- declare module "react" {
10
- interface CSSProperties {
11
- "--rmd-link-color"?: string;
12
- "--rmd-link-visited-color"?: string;
13
- "--rmd-link-hover-color"?: string;
14
- }
15
- }
16
-
17
9
  /**
18
10
  * @since 6.0.0
19
11
  */
@@ -4,6 +4,14 @@ import { bem } from "../utils/bem.js";
4
4
 
5
5
  const styles = bem("rmd-link");
6
6
 
7
+ declare module "react" {
8
+ interface CSSProperties {
9
+ "--rmd-link-color"?: string;
10
+ "--rmd-link-visited-color"?: string;
11
+ "--rmd-link-hover-color"?: string;
12
+ }
13
+ }
14
+
7
15
  /** @since 6.0.0 */
8
16
  export interface LinkClassNameOptions {
9
17
  className?: string;
package/src/list/List.tsx CHANGED
@@ -1,30 +1,20 @@
1
1
  import { type HTMLAttributes, forwardRef } from "react";
2
2
 
3
- import { list } from "./listStyles.js";
4
-
5
- declare module "react" {
6
- interface CSSProperties {
7
- "--rmd-list-padding-h"?: string | number;
8
- "--rmd-list-padding-v"?: string | number;
9
- }
10
- }
3
+ import { type ListClassNameOptions, list } from "./listStyles.js";
11
4
 
12
5
  export type ListElement = HTMLUListElement | HTMLOListElement;
13
6
 
14
- export interface ListProps extends HTMLAttributes<ListElement> {
7
+ /**
8
+ * @since 6.3.1 Extends the ListClassNameOptions
9
+ */
10
+ export interface ListProps
11
+ extends HTMLAttributes<ListElement>,
12
+ ListClassNameOptions {
15
13
  /**
16
14
  * @defaultValue `"none"`
17
15
  */
18
16
  role?: HTMLAttributes<ListElement>["role"];
19
17
 
20
- /**
21
- * Set to `true` to decrease the amount of padding and font size within the
22
- * list.
23
- *
24
- * @defaultValue `false`
25
- */
26
- dense?: boolean;
27
-
28
18
  /**
29
19
  * Set this to `true` to render as `<ol>` instead of `<ul>` when the children
30
20
  * are in a specific order. For example: steps within a recipe.
@@ -32,13 +22,6 @@ export interface ListProps extends HTMLAttributes<ListElement> {
32
22
  * @defaultValue `false`
33
23
  */
34
24
  ordered?: boolean;
35
-
36
- /**
37
- * Set this to `true` to render horizontally instead of vertically.
38
- *
39
- * @defaultValue `false`
40
- */
41
- horizontal?: boolean;
42
25
  }
43
26
 
44
27
  /**