@react-md/core 6.1.0 → 6.2.0

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 (168) hide show
  1. package/dist/RootHtml.d.ts +1 -1
  2. package/dist/RootHtml.js.map +1 -1
  3. package/dist/autocomplete/defaults.d.ts +1 -0
  4. package/dist/autocomplete/defaults.js +2 -6
  5. package/dist/autocomplete/defaults.js.map +1 -1
  6. package/dist/autocomplete/types.d.ts +9 -9
  7. package/dist/autocomplete/types.js.map +1 -1
  8. package/dist/avatar/Avatar.d.ts +1 -1
  9. package/dist/avatar/Avatar.js +1 -1
  10. package/dist/avatar/Avatar.js.map +1 -1
  11. package/dist/avatar/styles.d.ts +29 -1
  12. package/dist/avatar/styles.js.map +1 -1
  13. package/dist/box/styles.d.ts +26 -3
  14. package/dist/box/styles.js.map +1 -1
  15. package/dist/button/AsyncButton.d.ts +2 -2
  16. package/dist/button/AsyncButton.js.map +1 -1
  17. package/dist/button/Button.d.ts +1 -1
  18. package/dist/button/Button.js.map +1 -1
  19. package/dist/card/CardHeader.d.ts +1 -1
  20. package/dist/card/CardHeader.js.map +1 -1
  21. package/dist/chip/Chip.d.ts +1 -1
  22. package/dist/chip/Chip.js.map +1 -1
  23. package/dist/dialog/Dialog.d.ts +1 -1
  24. package/dist/dialog/Dialog.js.map +1 -1
  25. package/dist/expansion-panel/ExpansionPanel.d.ts +1 -1
  26. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  27. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +1 -1
  28. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  29. package/dist/files/FileInput.d.ts +1 -1
  30. package/dist/files/FileInput.js.map +1 -1
  31. package/dist/form/FormMessageContainer.d.ts +1 -1
  32. package/dist/form/FormMessageContainer.js.map +1 -1
  33. package/dist/form/InputToggle.d.ts +2 -2
  34. package/dist/form/InputToggle.js.map +1 -1
  35. package/dist/form/NativeSelect.d.ts +1 -1
  36. package/dist/form/NativeSelect.js.map +1 -1
  37. package/dist/form/OptGroup.d.ts +1 -1
  38. package/dist/form/OptGroup.js.map +1 -1
  39. package/dist/form/Password.d.ts +1 -1
  40. package/dist/form/Password.js.map +1 -1
  41. package/dist/form/Select.d.ts +2 -2
  42. package/dist/form/Select.js.map +1 -1
  43. package/dist/form/Slider.d.ts +1 -1
  44. package/dist/form/Slider.js.map +1 -1
  45. package/dist/form/Switch.d.ts +3 -3
  46. package/dist/form/Switch.js.map +1 -1
  47. package/dist/form/SwitchTrack.d.ts +1 -1
  48. package/dist/form/SwitchTrack.js.map +1 -1
  49. package/dist/form/TextArea.d.ts +2 -2
  50. package/dist/form/TextArea.js.map +1 -1
  51. package/dist/form/TextField.d.ts +1 -1
  52. package/dist/form/TextField.js.map +1 -1
  53. package/dist/form/types.d.ts +5 -5
  54. package/dist/form/types.js.map +1 -1
  55. package/dist/layout/LayoutAppBar.d.ts +1 -1
  56. package/dist/layout/LayoutAppBar.js.map +1 -1
  57. package/dist/list/ListItemLink.d.ts +1 -1
  58. package/dist/list/ListItemLink.js.map +1 -1
  59. package/dist/list/ListItemText.d.ts +1 -1
  60. package/dist/list/ListItemText.js.map +1 -1
  61. package/dist/list/ListSubheader.d.ts +1 -1
  62. package/dist/list/ListSubheader.js.map +1 -1
  63. package/dist/list/types.d.ts +2 -2
  64. package/dist/list/types.js.map +1 -1
  65. package/dist/menu/Menu.d.ts +3 -3
  66. package/dist/menu/Menu.js.map +1 -1
  67. package/dist/menu/MenuItemInputToggle.d.ts +2 -2
  68. package/dist/menu/MenuItemInputToggle.js.map +1 -1
  69. package/dist/menu/MenuItemTextField.d.ts +1 -1
  70. package/dist/menu/MenuItemTextField.js.map +1 -1
  71. package/dist/menu/MenuSheet.d.ts +1 -1
  72. package/dist/menu/MenuSheet.js.map +1 -1
  73. package/dist/navigation/CollapsibleNavGroup.d.ts +2 -2
  74. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  75. package/dist/navigation/NavItemLink.d.ts +1 -1
  76. package/dist/navigation/NavItemLink.js.map +1 -1
  77. package/dist/progress/CircularProgress.d.ts +2 -17
  78. package/dist/progress/CircularProgress.js +19 -23
  79. package/dist/progress/CircularProgress.js.map +1 -1
  80. package/dist/progress/LinearProgress.d.ts +5 -1
  81. package/dist/progress/LinearProgress.js +13 -25
  82. package/dist/progress/LinearProgress.js.map +1 -1
  83. package/dist/progress/circularProgressStyles.d.ts +62 -0
  84. package/dist/progress/circularProgressStyles.js +38 -0
  85. package/dist/progress/circularProgressStyles.js.map +1 -0
  86. package/dist/progress/linearProgressStyles.d.ts +38 -0
  87. package/dist/progress/linearProgressStyles.js +38 -0
  88. package/dist/progress/linearProgressStyles.js.map +1 -0
  89. package/dist/searching/caseInsensitive.d.ts +20 -4
  90. package/dist/searching/caseInsensitive.js +5 -1
  91. package/dist/searching/caseInsensitive.js.map +1 -1
  92. package/dist/searching/fuzzy.d.ts +3 -3
  93. package/dist/searching/fuzzy.js +5 -1
  94. package/dist/searching/fuzzy.js.map +1 -1
  95. package/dist/searching/utils.d.ts +2 -1
  96. package/dist/searching/utils.js +11 -2
  97. package/dist/searching/utils.js.map +1 -1
  98. package/dist/snackbar/Toast.d.ts +1 -1
  99. package/dist/snackbar/Toast.js.map +1 -1
  100. package/dist/table/TableCell.d.ts +1 -1
  101. package/dist/table/TableCell.js.map +1 -1
  102. package/dist/table/TableCheckbox.d.ts +1 -1
  103. package/dist/table/TableCheckbox.js.map +1 -1
  104. package/dist/table/TableRadio.d.ts +1 -1
  105. package/dist/table/TableRadio.js.map +1 -1
  106. package/dist/tabs/TabListScrollButton.d.ts +1 -1
  107. package/dist/tabs/TabListScrollButton.js.map +1 -1
  108. package/dist/tree/TreeItem.d.ts +2 -2
  109. package/dist/tree/TreeItem.js.map +1 -1
  110. package/dist/types.d.ts +29 -2
  111. package/dist/types.js +1 -1
  112. package/dist/types.js.map +1 -1
  113. package/dist/utils/alphaNumericSort.d.ts +9 -9
  114. package/dist/utils/alphaNumericSort.js +5 -1
  115. package/dist/utils/alphaNumericSort.js.map +1 -1
  116. package/package.json +6 -6
  117. package/src/RootHtml.tsx +1 -1
  118. package/src/autocomplete/defaults.ts +5 -12
  119. package/src/autocomplete/types.ts +9 -12
  120. package/src/avatar/Avatar.tsx +2 -2
  121. package/src/avatar/styles.ts +53 -1
  122. package/src/box/styles.ts +34 -13
  123. package/src/button/AsyncButton.tsx +2 -2
  124. package/src/button/Button.tsx +1 -1
  125. package/src/card/CardHeader.tsx +1 -1
  126. package/src/chip/Chip.tsx +1 -1
  127. package/src/dialog/Dialog.tsx +1 -4
  128. package/src/expansion-panel/ExpansionPanel.tsx +1 -1
  129. package/src/expansion-panel/ExpansionPanelHeader.tsx +1 -1
  130. package/src/files/FileInput.tsx +1 -4
  131. package/src/form/FormMessageContainer.tsx +1 -1
  132. package/src/form/InputToggle.tsx +2 -5
  133. package/src/form/NativeSelect.tsx +1 -1
  134. package/src/form/OptGroup.tsx +1 -4
  135. package/src/form/Password.tsx +1 -1
  136. package/src/form/Select.tsx +2 -3
  137. package/src/form/Slider.tsx +1 -1
  138. package/src/form/Switch.tsx +3 -3
  139. package/src/form/SwitchTrack.tsx +1 -1
  140. package/src/form/TextArea.tsx +2 -5
  141. package/src/form/TextField.tsx +1 -1
  142. package/src/form/types.ts +5 -15
  143. package/src/layout/LayoutAppBar.tsx +1 -1
  144. package/src/list/ListItemLink.tsx +1 -1
  145. package/src/list/ListItemText.tsx +1 -4
  146. package/src/list/ListSubheader.tsx +1 -1
  147. package/src/list/types.ts +2 -5
  148. package/src/menu/Menu.tsx +3 -4
  149. package/src/menu/MenuItemInputToggle.tsx +2 -2
  150. package/src/menu/MenuItemTextField.tsx +1 -1
  151. package/src/menu/MenuSheet.tsx +1 -1
  152. package/src/navigation/CollapsibleNavGroup.tsx +2 -2
  153. package/src/navigation/NavItemLink.tsx +1 -1
  154. package/src/progress/CircularProgress.tsx +31 -53
  155. package/src/progress/LinearProgress.tsx +27 -40
  156. package/src/progress/circularProgressStyles.ts +114 -0
  157. package/src/progress/linearProgressStyles.ts +90 -0
  158. package/src/searching/caseInsensitive.ts +29 -7
  159. package/src/searching/fuzzy.ts +12 -6
  160. package/src/searching/utils.ts +13 -2
  161. package/src/snackbar/Toast.tsx +1 -1
  162. package/src/table/TableCell.tsx +1 -4
  163. package/src/table/TableCheckbox.tsx +1 -1
  164. package/src/table/TableRadio.tsx +1 -1
  165. package/src/tabs/TabListScrollButton.tsx +1 -1
  166. package/src/tree/TreeItem.tsx +2 -2
  167. package/src/types.ts +44 -2
  168. package/src/utils/alphaNumericSort.ts +17 -11
@@ -31,6 +31,7 @@ import { type CircularProgressProps } from "../progress/CircularProgress.js";
31
31
  import { type ProgressTheme } from "../progress/types.js";
32
32
  import { type BaseSearchOptions } from "../searching/types.js";
33
33
  import {
34
+ type AutomaticTextExtraction,
34
35
  type PropsWithRef,
35
36
  type TextExtractor,
36
37
  type UseStateInitializer,
@@ -43,15 +44,17 @@ import {
43
44
  *
44
45
  * - `"some value"` -> `"some value"`
45
46
  * - `{ label: "Hello, world", value: 300 }` -> `"Hello, world!"`
47
+ * - `{ name: "Hello, world", value: 300 }` -> `"Hello, world!"`
46
48
  *
47
49
  * @since 6.0.0
50
+ * @deprecated @since 6.2.0 Use `AutomaticTextExtraction` instead.
48
51
  */
49
- export type AutocompleteLabeledOption = string | { label: string };
52
+ export type AutocompleteLabeledOption = AutomaticTextExtraction;
50
53
 
51
54
  /**
52
55
  * @since 6.0.0
53
56
  */
54
- export type AutocompleteOption = AutocompleteLabeledOption | object;
57
+ export type AutocompleteOption = AutomaticTextExtraction | object;
55
58
 
56
59
  /**
57
60
  * @since 6.0.0
@@ -268,13 +271,13 @@ export interface AutocompleteUnknownQueryAndValueOptions<
268
271
 
269
272
  /**
270
273
  * A utility type that makes the `getOptionLabel` required when an option is not
271
- * a {@link AutocompleteLabeledOption}.
274
+ * a {@link AutomaticTextExtraction}.
272
275
  *
273
276
  * @since 6.0.0
274
277
  */
275
278
  export type AutocompleteOptionLabelExtractor<
276
279
  Option extends AutocompleteOption,
277
- > = Option extends AutocompleteLabeledOption
280
+ > = Option extends AutomaticTextExtraction
278
281
  ? AutocompleteGetOptionLabel<Option>
279
282
  : Required<AutocompleteGetOptionLabel<Option>>;
280
283
 
@@ -702,10 +705,7 @@ export interface AutocompleteBaseProps<Option extends AutocompleteOption>
702
705
  /**
703
706
  * Any additional props that should be passed to the `Listbox` component.
704
707
  */
705
- listboxProps?: PropsWithRef<
706
- ConfigurableAutocompleteListboxProps,
707
- HTMLDivElement
708
- >;
708
+ listboxProps?: PropsWithRef<ConfigurableAutocompleteListboxProps>;
709
709
 
710
710
  /**
711
711
  * This can be used to add any custom styling, change the icon, change the
@@ -746,10 +746,7 @@ export interface AutocompleteBaseProps<Option extends AutocompleteOption>
746
746
  /**
747
747
  * This will do nothing if {@link disableClearButton} is `true`.
748
748
  */
749
- clearButtonProps?: PropsWithRef<
750
- ConfigurableAutocompleteClearButtonProps,
751
- HTMLButtonElement
752
- >;
749
+ clearButtonProps?: PropsWithRef<ConfigurableAutocompleteClearButtonProps>;
753
750
 
754
751
  /**
755
752
  * Set to `true` to hide the clear button that appears when hovering an
@@ -77,7 +77,7 @@ export interface AvatarProps
77
77
  *
78
78
  * @since 2.2.0
79
79
  */
80
- imgProps?: PropsWithRef<AvatarImgAttributes, HTMLImageElement>;
80
+ imgProps?: PropsWithRef<AvatarImgAttributes>;
81
81
  }
82
82
 
83
83
  /**
@@ -108,7 +108,7 @@ export const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(
108
108
  src,
109
109
  alt = "",
110
110
  size = "avatar",
111
- color = "",
111
+ color,
112
112
  theme,
113
113
  imgProps,
114
114
  referrerPolicy,
@@ -1,10 +1,62 @@
1
1
  import { cnb } from "cnbuilder";
2
2
 
3
3
  import { type ThemeColor, cssUtils } from "../cssUtils.js";
4
+ import { type OverridableStringUnion } from "../types.js";
4
5
  import { bem } from "../utils/bem.js";
5
6
 
6
7
  const styles = bem("rmd-avatar");
7
8
 
9
+ /**
10
+ * @since 6.2.0
11
+ */
12
+ export interface AvatarColorOverrides {}
13
+
14
+ /**
15
+ * @since 6.2.0
16
+ */
17
+ export type DefaultAvatarColors =
18
+ | "red"
19
+ | "pink"
20
+ | "purple"
21
+ | "deep-purple"
22
+ | "indigo"
23
+ | "blue"
24
+ | "light-blue"
25
+ | "cyan"
26
+ | "teal"
27
+ | "green"
28
+ | "light-green"
29
+ | "lime"
30
+ | "yellow"
31
+ | "amber"
32
+ | "orange"
33
+ | "deep-orange"
34
+ | "brown"
35
+ | "grey"
36
+ | "blue-grey";
37
+
38
+ /**
39
+ * The avatar available colors can be configured using module augmentation:
40
+ *
41
+ * ```ts
42
+ * declare module "@react-md/core/avatar/styles" {
43
+ * interface AvatarColorOverrides {
44
+ * "light-blue": false;
45
+ * brandColor: true;
46
+ * }
47
+ * }
48
+ * ```
49
+ *
50
+ * This would remove the support for the `light-blue` color and enable
51
+ * `brandColor`.
52
+ *
53
+ * @since 6.2.0
54
+ */
55
+ export type AvatarColor = OverridableStringUnion<
56
+ DefaultAvatarColors,
57
+ AvatarColorOverrides
58
+ >;
59
+
8
60
  /** @since 6.0.0 */
9
61
  export interface AvatarClassNameOptions {
10
62
  className?: string;
@@ -19,7 +71,7 @@ export interface AvatarClassNameOptions {
19
71
  * @see {@link theme}
20
72
  * @defaultValue `""`
21
73
  */
22
- color?: string;
74
+ color?: AvatarColor;
23
75
 
24
76
  /**
25
77
  * @defaultValue `"avatar"`
package/src/box/styles.ts CHANGED
@@ -2,6 +2,7 @@ import { cnb } from "cnbuilder";
2
2
  import { type CSSProperties } from "react";
3
3
 
4
4
  import { type DefinedCSSVariableName } from "../theme/types.js";
5
+ import { type IsEmptyObject, type OverridableStringUnion } from "../types.js";
5
6
  import { bem } from "../utils/bem.js";
6
7
 
7
8
  const styles = bem("rmd-box");
@@ -23,25 +24,28 @@ declare module "react" {
23
24
  }
24
25
  }
25
26
 
27
+ /** @since 6.2.0 */
28
+ export interface BoxAlignItemsOverrides {}
29
+ /** @since 6.2.0 */
30
+ export interface BoxJustifyContentOverrides {}
31
+ /** @since 6.2.0 */
32
+ export interface BoxGridNameOverrides {}
33
+
26
34
  /**
27
35
  * @since 6.0.0
28
36
  */
29
- export type BoxAlignItems =
30
- | "start"
31
- | "flex-start"
32
- | "center"
33
- | "end"
34
- | "flex-end"
35
- | "stretch";
37
+ export type BoxAlignItems = OverridableStringUnion<
38
+ "start" | "flex-start" | "center" | "end" | "flex-end" | "stretch",
39
+ BoxAlignItemsOverrides
40
+ >;
36
41
 
37
42
  /**
38
43
  * @since 6.0.0
39
44
  */
40
- export type BoxJustifyContent =
41
- | BoxAlignItems
42
- | "space-around"
43
- | "space-between"
44
- | "space-evenly";
45
+ export type BoxJustifyContent = OverridableStringUnion<
46
+ BoxAlignItems | "space-around" | "space-between" | "space-evenly",
47
+ BoxJustifyContentOverrides
48
+ >;
45
49
 
46
50
  /**
47
51
  * @since 6.0.0
@@ -53,6 +57,14 @@ export type BoxFlexDirection = "row" | "column";
53
57
  */
54
58
  export type BoxGridColumns = "fit" | "fill" | number;
55
59
 
60
+ /**
61
+ * @since 6.2.0
62
+ */
63
+ export type BoxGridName =
64
+ IsEmptyObject<BoxGridNameOverrides> extends true
65
+ ? string
66
+ : OverridableStringUnion<never, BoxGridNameOverrides>;
67
+
56
68
  /**
57
69
  * @since 6.0.0
58
70
  */
@@ -132,11 +144,20 @@ export interface BoxOptions {
132
144
  * );
133
145
  * ```
134
146
  *
147
+ * ```ts
148
+ * declare module "@react-md/core/box/styles" {
149
+ * interface BoxGridNameOverrides {
150
+ * small: true;
151
+ * medium: true;
152
+ * }
153
+ * }
154
+ * ```
155
+ *
135
156
  * The `gridName` should be `"small" | "medium"`.
136
157
  *
137
158
  * @defaultValue `""`
138
159
  */
139
- gridName?: string;
160
+ gridName?: BoxGridName;
140
161
 
141
162
  /**
142
163
  * The default behavior for a grid is to automatically determine the number
@@ -122,13 +122,13 @@ export interface AsyncButtonProps extends ButtonProps {
122
122
  * Any additional props to pass to the `CircularProgress` bar when the
123
123
  * {@link loadingType} is one of the circular types.
124
124
  */
125
- linearProgressProps?: PropsWithRef<LinearProgressProps, HTMLDivElement>;
125
+ linearProgressProps?: PropsWithRef<LinearProgressProps>;
126
126
 
127
127
  /**
128
128
  * Any additional props to pass to the `LinearProgress` bar when the
129
129
  * {@link loadingType} is one of the linear types.
130
130
  */
131
- circularProgressProps?: PropsWithRef<CircularProgressProps, HTMLSpanElement>;
131
+ circularProgressProps?: PropsWithRef<CircularProgressProps>;
132
132
  }
133
133
 
134
134
  /**
@@ -30,7 +30,7 @@ export interface ButtonProps
30
30
  * Any additional props to provide the to `FAB` container element when the
31
31
  * `floating` prop is provided
32
32
  */
33
- floatingProps?: PropsWithRef<FloatingActionButtonProps, HTMLSpanElement>;
33
+ floatingProps?: PropsWithRef<FloatingActionButtonProps>;
34
34
  }
35
35
 
36
36
  /**
@@ -27,7 +27,7 @@ export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
27
27
  * Any props to pass to the `<div>` that surrounds the `children`. This is
28
28
  * generally used to apply custom `style` or `className`.
29
29
  */
30
- contentProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
30
+ contentProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
31
31
  }
32
32
 
33
33
  /**
package/src/chip/Chip.tsx CHANGED
@@ -147,7 +147,7 @@ export interface ChipProps
147
147
  *
148
148
  * @since 6.0.0
149
149
  */
150
- contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
150
+ contentProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
151
151
 
152
152
  /**
153
153
  * This will be ignored if {@link disableContentWrap} is `true`.
@@ -156,10 +156,7 @@ export interface BaseDialogProps
156
156
  * Any additional props that should be passed to the container element when
157
157
  * the `type !== "custom"`.
158
158
  */
159
- containerProps?: PropsWithRef<
160
- ConfigurableDialogContainerProps,
161
- HTMLDivElement
162
- >;
159
+ containerProps?: PropsWithRef<ConfigurableDialogContainerProps>;
163
160
 
164
161
  /**
165
162
  * @see {@link DEFAULT_DIALOG_TIMEOUT}
@@ -128,7 +128,7 @@ export interface ExpansionPanelProps extends CardProps {
128
128
  * @see {@link contentClassName}
129
129
  * @see {@link disableContentPadding}
130
130
  */
131
- contentProps?: PropsWithRef<Omit<CardContentProps, "role">, HTMLDivElement>;
131
+ contentProps?: PropsWithRef<Omit<CardContentProps, "role">>;
132
132
 
133
133
  /**
134
134
  * Convenience prop to apply custom style to the `CardContent` component.
@@ -47,7 +47,7 @@ export interface ExpansionPanelHeaderProps
47
47
  * Any additional props to provide to the heading element that wraps the
48
48
  * expansion panel button.
49
49
  */
50
- headingProps?: PropsWithRef<TypographyProps, HTMLHeadingElement>;
50
+ headingProps?: PropsWithRef<TypographyProps>;
51
51
  iconRotatorProps?: Omit<IconRotatorProps, "rotated" | "disableTransition">;
52
52
 
53
53
  /**
@@ -42,10 +42,7 @@ export interface FileInputProps
42
42
  * most props get passed to the `<input type="file">`. So this would be useful
43
43
  * for inline style or click handlers.
44
44
  */
45
- labelProps?: PropsWithRef<
46
- LabelHTMLAttributes<HTMLLabelElement>,
47
- HTMLLabelElement
48
- >;
45
+ labelProps?: PropsWithRef<LabelHTMLAttributes<HTMLLabelElement>>;
49
46
 
50
47
  /**
51
48
  * An optional icon to display for the file input.
@@ -15,7 +15,7 @@ export interface FormMessageContainerProps
15
15
  * component, these props are optional. It kind of eliminates the whole
16
16
  * purpose of this component though.
17
17
  */
18
- messageProps?: PropsWithRef<FormMessageProps, HTMLDivElement>;
18
+ messageProps?: PropsWithRef<FormMessageProps>;
19
19
  }
20
20
 
21
21
  /**
@@ -53,7 +53,7 @@ export interface ConfigurableInputToggleIconProps {
53
53
  * Any props that should be passed to the `<span>` that surrounds the current
54
54
  * icon element.
55
55
  */
56
- iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
56
+ iconProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
57
57
 
58
58
  /**
59
59
  * Optional style to set on the `<span>` that surrounds the current icon
@@ -101,10 +101,7 @@ export interface InputToggleLabelProps {
101
101
  * }}
102
102
  * ```
103
103
  */
104
- labelProps?: PropsWithRef<
105
- LabelHTMLAttributes<HTMLLabelElement>,
106
- HTMLLabelElement
107
- >;
104
+ labelProps?: PropsWithRef<LabelHTMLAttributes<HTMLLabelElement>>;
108
105
 
109
106
  /**
110
107
  * @see {@link LabelClassNameOptions.gap}
@@ -62,7 +62,7 @@ export interface NativeSelectProps
62
62
  * There probably isn't any real use for this prop other than if you need to
63
63
  * add a `ref` for some DOM behavior.
64
64
  */
65
- containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
65
+ containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
66
66
  }
67
67
 
68
68
  /**
@@ -26,10 +26,7 @@ export interface OptGroupProps extends Omit<ListProps, "role"> {
26
26
  * This can be used to apply any additional props to the `ListSubheader` that
27
27
  * describes the group of options.
28
28
  */
29
- labelProps?: PropsWithRef<
30
- Omit<ListSubheaderProps, "role" | "children">,
31
- HTMLLIElement
32
- >;
29
+ labelProps?: PropsWithRef<Omit<ListSubheaderProps, "role" | "children">>;
33
30
 
34
31
  /**
35
32
  * This should be any `Option`s to display within the group.
@@ -126,7 +126,7 @@ export interface PasswordProps
126
126
  * `id`, `buttonType`, `aria-label`, `aria-pressed`, or `children` are
127
127
  * provided here, they will override the default implementation.
128
128
  */
129
- visibilityProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;
129
+ visibilityProps?: PropsWithRef<ButtonProps>;
130
130
  }
131
131
 
132
132
  /**
@@ -141,7 +141,7 @@ export interface SelectProps<Value extends string>
141
141
  /**
142
142
  * Optional props to pass to the `<span>` that surrounds the {@link label}
143
143
  */
144
- labelProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
144
+ labelProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
145
145
 
146
146
  /**
147
147
  * An optional ref to pass to the hidden `<input type="text" />` element that
@@ -170,8 +170,7 @@ export interface SelectProps<Value extends string>
170
170
  * - `width="min"`
171
171
  */
172
172
  menuProps?: PropsWithRef<
173
- Omit<MenuProps, "visible" | "onRequestClose" | "fixedTo">,
174
- HTMLDivElement
173
+ Omit<MenuProps, "visible" | "onRequestClose" | "fixedTo">
175
174
  >;
176
175
 
177
176
  /**
@@ -90,7 +90,7 @@ export interface BaseSliderProps
90
90
  * This can be used to apply custom styles or a `ref` to the track element if
91
91
  * needed.
92
92
  */
93
- trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
93
+ trackProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
94
94
 
95
95
  /**
96
96
  * This can be used to configure any additional tooltip props like the
@@ -35,12 +35,12 @@ export interface SwitchProps
35
35
  InputToggleLabelProps,
36
36
  FormMessageContainerExtension,
37
37
  FormComponentStates {
38
- containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
39
- trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
38
+ containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
39
+ trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
40
40
  trackStyle?: CSSProperties;
41
41
  trackClassName?: string;
42
42
  ballAddon?: ReactNode;
43
- ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
43
+ ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
44
44
  ballStyle?: CSSProperties;
45
45
  ballClassName?: string;
46
46
  }
@@ -12,7 +12,7 @@ export interface SwitchTrackProps extends HTMLAttributes<HTMLDivElement> {
12
12
  active?: boolean;
13
13
  disabled?: boolean;
14
14
  ballAddon?: ReactNode;
15
- ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
15
+ ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
16
16
  ballStyle?: CSSProperties;
17
17
  ballClassName?: string;
18
18
  }
@@ -92,17 +92,14 @@ export interface TextAreaProps
92
92
  *
93
93
  * This will only be applied when {@link resize} is set to `"auto"`.
94
94
  */
95
- resizeContainerProps?: PropsWithRef<
96
- HTMLAttributes<HTMLDivElement>,
97
- HTMLDivElement
98
- >;
95
+ resizeContainerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
99
96
 
100
97
  /**
101
98
  * Optional props to provide to the {@link TextFieldContainer} component.
102
99
  * There probably isn't any real use for this prop other than if you need to
103
100
  * add a `ref` for some DOM behavior.
104
101
  */
105
- containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
102
+ containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
106
103
  }
107
104
 
108
105
  /**
@@ -88,7 +88,7 @@ export interface TextFieldProps
88
88
  * There probably isn't any real use for this prop other than if you need to
89
89
  * add a `ref` for some DOM behavior.
90
90
  */
91
- containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
91
+ containerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
92
92
  }
93
93
 
94
94
  /**
package/src/form/types.ts CHANGED
@@ -335,8 +335,7 @@ export interface FormMessageContainerExtension {
335
335
  * purpose of this component though.
336
336
  */
337
337
  messageProps?: PropsWithRef<
338
- FormMessageProps & Partial<FormMessageInputLengthCounterProps>,
339
- HTMLDivElement
338
+ FormMessageProps & Partial<FormMessageInputLengthCounterProps>
340
339
  >;
341
340
 
342
341
  /**
@@ -346,10 +345,7 @@ export interface FormMessageContainerExtension {
346
345
  * Note: This will not be used if the `messageProps` are not provided since
347
346
  * only the `children` will be returned without the container.
348
347
  */
349
- messageContainerProps?: PropsWithRef<
350
- HTMLAttributes<HTMLDivElement>,
351
- HTMLDivElement
352
- >;
348
+ messageContainerProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
353
349
  }
354
350
 
355
351
  /** @since 6.0.0 */
@@ -507,10 +503,7 @@ export interface TextFieldContainerOptions
507
503
  *
508
504
  * @since 6.0.0
509
505
  */
510
- leftAddonProps?: PropsWithRef<
511
- ConfigurableTextFieldAddonProps,
512
- HTMLSpanElement
513
- >;
506
+ leftAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps>;
514
507
 
515
508
  /**
516
509
  * @see {@link TextFieldAddonProps.disabled}
@@ -530,10 +523,7 @@ export interface TextFieldContainerOptions
530
523
  *
531
524
  * @since 6.0.0
532
525
  */
533
- rightAddonProps?: PropsWithRef<
534
- ConfigurableTextFieldAddonProps,
535
- HTMLSpanElement
536
- >;
526
+ rightAddonProps?: PropsWithRef<ConfigurableTextFieldAddonProps>;
537
527
 
538
528
  /**
539
529
  * @see {@link TextFieldAddonProps.disabled}
@@ -569,7 +559,7 @@ export interface FormFieldOptions
569
559
  * }}
570
560
  * ```
571
561
  */
572
- labelProps?: PropsWithRef<LabelProps, HTMLLabelElement>;
562
+ labelProps?: PropsWithRef<LabelProps>;
573
563
 
574
564
  /**
575
565
  * A convenience prop to apply a custom style to a label. This is equivalent
@@ -29,7 +29,7 @@ export interface LayoutAppBarProps extends AppBarProps {
29
29
  /**
30
30
  * Any additional props to pass to the {@link SkipToMainContent} component.
31
31
  */
32
- skipProps?: PropsWithRef<SkipToMainContentProps, HTMLAnchorElement>;
32
+ skipProps?: PropsWithRef<SkipToMainContentProps>;
33
33
  }
34
34
 
35
35
  /**
@@ -39,7 +39,7 @@ export interface ListItemLinkProps
39
39
  * Any additional props to provide the wrapping `<li>` element such as
40
40
  * `style`, `className`, and `ref`.
41
41
  */
42
- liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;
42
+ liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>>;
43
43
 
44
44
  /**
45
45
  * @defaultValue `disabled ? -1 : undefined`
@@ -8,10 +8,7 @@ import { listItemText } from "./listItemStyles.js";
8
8
  */
9
9
  export interface ListItemTextProps extends HTMLAttributes<HTMLSpanElement> {
10
10
  secondaryText?: ReactNode;
11
- secondaryTextProps?: PropsWithRef<
12
- HTMLAttributes<HTMLSpanElement>,
13
- HTMLSpanElement
14
- >;
11
+ secondaryTextProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
15
12
 
16
13
  /** @defaultValue `false` */
17
14
  secondaryTextClamped?: boolean;
@@ -45,7 +45,7 @@ export interface ListSubheaderProps
45
45
  /**
46
46
  * @since 6.0.0
47
47
  */
48
- textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
48
+ textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
49
49
  }
50
50
 
51
51
  /**
package/src/list/types.ts CHANGED
@@ -160,7 +160,7 @@ export interface ListItemChildrenTextProps {
160
160
  *
161
161
  * @since 6.0.0
162
162
  */
163
- textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
163
+ textProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
164
164
 
165
165
  /**
166
166
  * An optional className to apply to the `<span>` that surrounds the
@@ -206,10 +206,7 @@ export interface ListItemChildrenTextProps {
206
206
  *
207
207
  * @since 6.0.0
208
208
  */
209
- secondaryTextProps?: PropsWithRef<
210
- HTMLAttributes<HTMLSpanElement>,
211
- HTMLSpanElement
212
- >;
209
+ secondaryTextProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
213
210
 
214
211
  /**
215
212
  * Set this to `true` to allow the {@link secondaryText} to span multiple
package/src/menu/Menu.tsx CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  import { type FloatingActionButtonPosition } from "../button/FloatingActionButton.js";
13
13
  import { useFocusContainer } from "../focus/useFocusContainer.js";
14
14
  import { useUserInteractionMode } from "../interaction/UserInteractionModeProvider.js";
15
- import { type ListElement, type ListProps } from "../list/List.js";
15
+ import { type ListProps } from "../list/List.js";
16
16
  import { useAppSize } from "../media-queries/AppSizeProvider.js";
17
17
  import { type GetDefaultFocusedIndex } from "../movement/types.js";
18
18
  import { Portal } from "../portal/Portal.js";
@@ -149,7 +149,7 @@ export interface MenuListConvenienceProps {
149
149
  * Any additional props to pass to the `List` component that surrounds the
150
150
  * `Menu`'s `MenuItem`s.
151
151
  */
152
- listProps?: PropsWithRef<Omit<ListProps, "horizontal">, ListElement>;
152
+ listProps?: PropsWithRef<Omit<ListProps, "horizontal">>;
153
153
  }
154
154
 
155
155
  /**
@@ -186,8 +186,7 @@ export interface MenuConvenienceProps extends MenuConfigurationProps {
186
186
  | "visible"
187
187
  | "onRequestClose"
188
188
  | "getDefaultFocusedIndex"
189
- >,
190
- HTMLDivElement
189
+ >
191
190
  >;
192
191
 
193
192
  /**
@@ -108,10 +108,10 @@ export type MenuItemRadioProps = BaseMenuItemInputToggleProps;
108
108
  * @since 6.0.0 Added additional props for styling the track and ball.
109
109
  */
110
110
  export interface MenuItemSwitchProps extends BaseMenuItemInputToggleProps {
111
- trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
111
+ trackProps?: PropsWithRef<HTMLAttributes<HTMLDivElement>>;
112
112
  trackStyle?: CSSProperties;
113
113
  trackClassName?: string;
114
- ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
114
+ ballProps?: PropsWithRef<HTMLAttributes<HTMLSpanElement>>;
115
115
  ballStyle?: CSSProperties;
116
116
  ballClassName?: string;
117
117
  }
@@ -13,7 +13,7 @@ export interface MenuItemTextFieldProps extends TextFieldProps {
13
13
  /**
14
14
  * Any additional props or a `ref` to apply to the surrounding `<li>` element.
15
15
  */
16
- liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>, HTMLLIElement>;
16
+ liProps?: PropsWithRef<HTMLAttributes<HTMLLIElement>>;
17
17
 
18
18
  /** @defaultValue `true` */
19
19
  stretch?: boolean;