@mui/material 9.0.0-alpha.4 → 9.0.0-beta.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 (308) hide show
  1. package/Accordion/Accordion.d.mts +1 -1
  2. package/Accordion/Accordion.d.ts +1 -1
  3. package/AccordionSummary/AccordionSummary.js +1 -0
  4. package/AccordionSummary/AccordionSummary.mjs +1 -0
  5. package/Backdrop/Backdrop.d.mts +1 -1
  6. package/Backdrop/Backdrop.d.ts +1 -1
  7. package/BottomNavigationAction/BottomNavigationAction.js +1 -0
  8. package/BottomNavigationAction/BottomNavigationAction.mjs +1 -0
  9. package/Breadcrumbs/BreadcrumbCollapsed.js +5 -1
  10. package/Breadcrumbs/BreadcrumbCollapsed.mjs +5 -1
  11. package/Button/Button.js +1 -0
  12. package/Button/Button.mjs +1 -0
  13. package/ButtonBase/ButtonBase.d.mts +5 -0
  14. package/ButtonBase/ButtonBase.d.ts +5 -0
  15. package/ButtonBase/ButtonBase.js +84 -85
  16. package/ButtonBase/ButtonBase.mjs +84 -85
  17. package/ButtonBase/useButtonBase.d.mts +91 -0
  18. package/ButtonBase/useButtonBase.d.ts +91 -0
  19. package/ButtonBase/useButtonBase.js +174 -0
  20. package/ButtonBase/useButtonBase.mjs +167 -0
  21. package/ButtonGroup/ButtonGroup.js +1 -9
  22. package/ButtonGroup/ButtonGroup.mjs +1 -9
  23. package/ButtonGroup/buttonGroupClasses.d.mts +0 -68
  24. package/ButtonGroup/buttonGroupClasses.d.ts +0 -68
  25. package/ButtonGroup/buttonGroupClasses.js +1 -1
  26. package/ButtonGroup/buttonGroupClasses.mjs +1 -1
  27. package/CHANGELOG.md +119 -4
  28. package/CardActionArea/CardActionArea.js +1 -0
  29. package/CardActionArea/CardActionArea.mjs +1 -0
  30. package/CardHeader/CardHeader.d.mts +13 -21
  31. package/CardHeader/CardHeader.d.ts +13 -21
  32. package/CardHeader/CardHeader.js +3 -21
  33. package/CardHeader/CardHeader.mjs +3 -21
  34. package/Checkbox/Checkbox.js +1 -7
  35. package/Checkbox/Checkbox.mjs +1 -7
  36. package/Chip/Chip.d.mts +7 -0
  37. package/Chip/Chip.d.ts +7 -0
  38. package/Chip/Chip.js +66 -55
  39. package/Chip/Chip.mjs +66 -55
  40. package/Chip/chipClasses.d.mts +0 -104
  41. package/Chip/chipClasses.d.ts +0 -104
  42. package/Chip/chipClasses.js +1 -1
  43. package/Chip/chipClasses.mjs +1 -1
  44. package/Dialog/Dialog.d.mts +8 -22
  45. package/Dialog/Dialog.d.ts +8 -22
  46. package/Dialog/Dialog.js +43 -72
  47. package/Dialog/Dialog.mjs +43 -72
  48. package/Dialog/dialogClasses.d.mts +0 -8
  49. package/Dialog/dialogClasses.d.ts +0 -8
  50. package/Dialog/dialogClasses.js +1 -1
  51. package/Dialog/dialogClasses.mjs +1 -1
  52. package/Divider/Divider.js +2 -10
  53. package/Divider/Divider.mjs +2 -10
  54. package/Divider/dividerClasses.d.mts +0 -4
  55. package/Divider/dividerClasses.d.ts +0 -4
  56. package/Divider/dividerClasses.js +1 -1
  57. package/Divider/dividerClasses.mjs +1 -1
  58. package/Drawer/Drawer.d.mts +1 -13
  59. package/Drawer/Drawer.d.ts +1 -13
  60. package/Drawer/Drawer.js +6 -40
  61. package/Drawer/Drawer.mjs +6 -40
  62. package/Drawer/drawerClasses.d.mts +0 -32
  63. package/Drawer/drawerClasses.d.ts +0 -32
  64. package/Drawer/drawerClasses.js +1 -1
  65. package/Drawer/drawerClasses.mjs +1 -1
  66. package/Fab/Fab.js +1 -0
  67. package/Fab/Fab.mjs +1 -0
  68. package/FilledInput/FilledInput.js +4 -33
  69. package/FilledInput/FilledInput.mjs +4 -33
  70. package/Grid/Grid.d.mts +8 -3
  71. package/Grid/Grid.d.ts +8 -3
  72. package/Grid/Grid.js +8 -3
  73. package/Grid/Grid.mjs +8 -3
  74. package/Grid/gridClasses.js +1 -1
  75. package/Grid/gridClasses.mjs +1 -1
  76. package/IconButton/IconButton.js +1 -0
  77. package/IconButton/IconButton.mjs +1 -0
  78. package/ImageListItemBar/ImageListItemBar.js +4 -17
  79. package/ImageListItemBar/ImageListItemBar.mjs +4 -17
  80. package/ImageListItemBar/imageListItemBarClasses.d.mts +0 -16
  81. package/ImageListItemBar/imageListItemBarClasses.d.ts +0 -16
  82. package/ImageListItemBar/imageListItemBarClasses.js +1 -1
  83. package/ImageListItemBar/imageListItemBarClasses.mjs +1 -1
  84. package/Input/Input.js +4 -33
  85. package/Input/Input.mjs +4 -33
  86. package/Input/inputClasses.d.mts +0 -16
  87. package/Input/inputClasses.d.ts +0 -16
  88. package/InputAdornment/inputAdornmentClasses.d.mts +2 -2
  89. package/InputAdornment/inputAdornmentClasses.d.ts +2 -2
  90. package/InputBase/InputBase.d.mts +0 -27
  91. package/InputBase/InputBase.d.ts +0 -27
  92. package/InputBase/InputBase.js +6 -35
  93. package/InputBase/InputBase.mjs +6 -35
  94. package/InputBase/inputBaseClasses.d.mts +0 -20
  95. package/InputBase/inputBaseClasses.d.ts +0 -20
  96. package/InputBase/inputBaseClasses.js +1 -1
  97. package/InputBase/inputBaseClasses.mjs +1 -1
  98. package/InputLabel/InputLabel.js +1 -1
  99. package/InputLabel/InputLabel.mjs +1 -1
  100. package/LinearProgress/LinearProgress.js +6 -18
  101. package/LinearProgress/LinearProgress.mjs +6 -18
  102. package/LinearProgress/linearProgressClasses.d.mts +0 -36
  103. package/LinearProgress/linearProgressClasses.d.ts +0 -36
  104. package/LinearProgress/linearProgressClasses.js +1 -1
  105. package/LinearProgress/linearProgressClasses.mjs +1 -1
  106. package/Link/Link.d.mts +1 -1
  107. package/Link/Link.d.ts +1 -1
  108. package/ListItem/ListItem.d.mts +2 -36
  109. package/ListItem/ListItem.d.ts +2 -36
  110. package/ListItem/ListItem.js +27 -152
  111. package/ListItem/ListItem.mjs +27 -152
  112. package/ListItem/listItemClasses.d.mts +2 -4
  113. package/ListItem/listItemClasses.d.ts +2 -4
  114. package/ListItem/listItemClasses.js +1 -1
  115. package/ListItem/listItemClasses.mjs +1 -1
  116. package/ListItemButton/ListItemButton.d.mts +1 -2
  117. package/ListItemButton/ListItemButton.d.ts +1 -2
  118. package/ListItemButton/ListItemButton.js +2 -2
  119. package/ListItemButton/ListItemButton.mjs +2 -2
  120. package/ListItemIcon/ListItemIcon.js +1 -1
  121. package/ListItemIcon/ListItemIcon.mjs +1 -1
  122. package/ListItemSecondaryAction/ListItemSecondaryAction.d.mts +10 -6
  123. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +10 -6
  124. package/ListItemSecondaryAction/ListItemSecondaryAction.js +7 -2
  125. package/ListItemSecondaryAction/ListItemSecondaryAction.mjs +7 -2
  126. package/ListItemText/ListItemText.d.mts +12 -20
  127. package/ListItemText/ListItemText.d.ts +12 -20
  128. package/ListItemText/ListItemText.js +2 -20
  129. package/ListItemText/ListItemText.mjs +2 -20
  130. package/ListSubheader/ListSubheader.js +0 -3
  131. package/ListSubheader/ListSubheader.mjs +0 -3
  132. package/Menu/Menu.d.mts +1 -1
  133. package/Menu/Menu.d.ts +1 -1
  134. package/Menu/Menu.js +15 -32
  135. package/Menu/Menu.mjs +15 -32
  136. package/MenuItem/MenuItem.js +36 -26
  137. package/MenuItem/MenuItem.mjs +34 -26
  138. package/MenuList/MenuList.js +136 -101
  139. package/MenuList/MenuList.mjs +135 -100
  140. package/MenuList/MenuListContext.d.mts +11 -0
  141. package/MenuList/MenuListContext.d.ts +11 -0
  142. package/MenuList/MenuListContext.js +25 -0
  143. package/MenuList/MenuListContext.mjs +19 -0
  144. package/Modal/Modal.d.mts +1 -41
  145. package/Modal/Modal.d.ts +1 -41
  146. package/Modal/Modal.js +5 -58
  147. package/Modal/Modal.mjs +5 -58
  148. package/OutlinedInput/OutlinedInput.js +2 -14
  149. package/OutlinedInput/OutlinedInput.mjs +2 -14
  150. package/OutlinedInput/outlinedInputClasses.d.mts +0 -16
  151. package/OutlinedInput/outlinedInputClasses.d.ts +0 -16
  152. package/PaginationItem/PaginationItem.d.mts +5 -15
  153. package/PaginationItem/PaginationItem.d.ts +5 -15
  154. package/PaginationItem/PaginationItem.js +9 -24
  155. package/PaginationItem/PaginationItem.mjs +9 -24
  156. package/PaginationItem/paginationItemClasses.d.mts +0 -16
  157. package/PaginationItem/paginationItemClasses.d.ts +0 -16
  158. package/PaginationItem/paginationItemClasses.js +1 -1
  159. package/PaginationItem/paginationItemClasses.mjs +1 -1
  160. package/PigmentGrid/PigmentGrid.d.mts +1 -1
  161. package/PigmentGrid/PigmentGrid.d.ts +1 -1
  162. package/PigmentGrid/PigmentGrid.js +1 -1
  163. package/PigmentGrid/PigmentGrid.mjs +1 -1
  164. package/Popover/Popover.d.mts +1 -1
  165. package/Popover/Popover.d.ts +1 -1
  166. package/Popover/Popover.js +19 -7
  167. package/Popover/Popover.mjs +18 -6
  168. package/Radio/Radio.js +1 -13
  169. package/Radio/Radio.mjs +1 -13
  170. package/Rating/Rating.d.mts +0 -9
  171. package/Rating/Rating.d.ts +0 -9
  172. package/Rating/Rating.js +1 -17
  173. package/Rating/Rating.mjs +1 -17
  174. package/Select/SelectInput.js +2 -3
  175. package/Select/SelectInput.mjs +2 -3
  176. package/Select/selectClasses.d.mts +0 -12
  177. package/Select/selectClasses.d.ts +0 -12
  178. package/Select/selectClasses.js +1 -1
  179. package/Select/selectClasses.mjs +1 -1
  180. package/Slider/Slider.d.mts +0 -5
  181. package/Slider/Slider.d.ts +0 -5
  182. package/Slider/Slider.js +2 -8
  183. package/Slider/Slider.mjs +2 -8
  184. package/Slider/sliderClasses.d.mts +0 -28
  185. package/Slider/sliderClasses.d.ts +0 -28
  186. package/Slider/sliderClasses.js +1 -1
  187. package/Slider/sliderClasses.mjs +1 -1
  188. package/Snackbar/Snackbar.d.mts +1 -1
  189. package/Snackbar/Snackbar.d.ts +1 -1
  190. package/SpeedDial/SpeedDial.d.mts +1 -1
  191. package/SpeedDial/SpeedDial.d.ts +1 -1
  192. package/Stack/Stack.d.mts +2 -2
  193. package/Stack/Stack.d.ts +2 -2
  194. package/StepButton/StepButton.js +44 -14
  195. package/StepButton/StepButton.mjs +44 -14
  196. package/StepConnector/StepConnector.js +2 -8
  197. package/StepConnector/StepConnector.mjs +2 -8
  198. package/StepConnector/stepConnectorClasses.d.mts +0 -8
  199. package/StepConnector/stepConnectorClasses.d.ts +0 -8
  200. package/StepConnector/stepConnectorClasses.js +1 -1
  201. package/StepConnector/stepConnectorClasses.mjs +1 -1
  202. package/StepContent/StepContent.d.mts +2 -17
  203. package/StepContent/StepContent.d.ts +2 -17
  204. package/StepContent/StepContent.js +3 -22
  205. package/StepContent/StepContent.mjs +3 -22
  206. package/StepLabel/StepLabel.d.mts +0 -22
  207. package/StepLabel/StepLabel.d.ts +0 -22
  208. package/StepLabel/StepLabel.js +2 -31
  209. package/StepLabel/StepLabel.mjs +2 -31
  210. package/Stepper/Stepper.js +54 -22
  211. package/Stepper/Stepper.mjs +54 -22
  212. package/Stepper/StepperContext.d.mts +0 -5
  213. package/Stepper/StepperContext.d.ts +0 -5
  214. package/Stepper/StepperContext.js +1 -2
  215. package/Stepper/StepperContext.mjs +0 -1
  216. package/SvgIcon/createSvgIcon.d.mts +2 -0
  217. package/SvgIcon/createSvgIcon.d.ts +2 -0
  218. package/SvgIcon/createSvgIcon.js +31 -0
  219. package/SvgIcon/createSvgIcon.mjs +26 -0
  220. package/SvgIcon/index.d.mts +1 -0
  221. package/SvgIcon/index.d.ts +1 -0
  222. package/SvgIcon/index.js +8 -0
  223. package/SvgIcon/index.mjs +1 -0
  224. package/SwipeableDrawer/SwipeableDrawer.d.mts +0 -5
  225. package/SwipeableDrawer/SwipeableDrawer.d.ts +0 -5
  226. package/SwipeableDrawer/SwipeableDrawer.js +6 -37
  227. package/SwipeableDrawer/SwipeableDrawer.mjs +6 -37
  228. package/Switch/Switch.js +0 -11
  229. package/Switch/Switch.mjs +0 -11
  230. package/Tab/Tab.js +18 -4
  231. package/Tab/Tab.mjs +18 -4
  232. package/Tab/tabClasses.d.mts +0 -4
  233. package/Tab/tabClasses.d.ts +0 -4
  234. package/Tab/tabClasses.js +1 -1
  235. package/Tab/tabClasses.mjs +1 -1
  236. package/TabScrollButton/TabScrollButton.d.mts +1 -1
  237. package/TabScrollButton/TabScrollButton.d.ts +1 -1
  238. package/TabScrollButton/TabScrollButton.js +6 -2
  239. package/TabScrollButton/TabScrollButton.mjs +6 -2
  240. package/TablePagination/TablePagination.d.mts +0 -24
  241. package/TablePagination/TablePagination.d.ts +0 -24
  242. package/TablePagination/TablePagination.js +1 -29
  243. package/TablePagination/TablePagination.mjs +1 -29
  244. package/TablePaginationActions/TablePaginationActions.d.mts +0 -10
  245. package/TablePaginationActions/TablePaginationActions.d.ts +0 -10
  246. package/TablePaginationActions/TablePaginationActions.js +2 -14
  247. package/TablePaginationActions/TablePaginationActions.mjs +2 -14
  248. package/TableSortLabel/TableSortLabel.js +6 -8
  249. package/TableSortLabel/TableSortLabel.mjs +6 -8
  250. package/TableSortLabel/tableSortLabelClasses.d.mts +0 -8
  251. package/TableSortLabel/tableSortLabelClasses.d.ts +0 -8
  252. package/TableSortLabel/tableSortLabelClasses.js +1 -1
  253. package/TableSortLabel/tableSortLabelClasses.mjs +1 -1
  254. package/Tabs/Tabs.js +33 -24
  255. package/Tabs/Tabs.mjs +32 -23
  256. package/Tabs/tabsClasses.d.mts +0 -6
  257. package/Tabs/tabsClasses.d.ts +0 -6
  258. package/Tabs/tabsClasses.js +1 -1
  259. package/Tabs/tabsClasses.mjs +1 -1
  260. package/ToggleButton/ToggleButton.js +1 -0
  261. package/ToggleButton/ToggleButton.mjs +1 -0
  262. package/ToggleButtonGroup/ToggleButtonGroup.js +1 -4
  263. package/ToggleButtonGroup/ToggleButtonGroup.mjs +1 -4
  264. package/ToggleButtonGroup/toggleButtonGroupClasses.d.mts +0 -8
  265. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +0 -8
  266. package/ToggleButtonGroup/toggleButtonGroupClasses.js +1 -1
  267. package/ToggleButtonGroup/toggleButtonGroupClasses.mjs +1 -1
  268. package/Tooltip/Tooltip.d.mts +1 -1
  269. package/Tooltip/Tooltip.d.ts +1 -1
  270. package/Typography/Typography.d.mts +3 -3
  271. package/Typography/Typography.d.ts +3 -3
  272. package/Typography/Typography.js +2 -24
  273. package/Typography/Typography.mjs +3 -25
  274. package/index.js +1 -1
  275. package/index.mjs +1 -1
  276. package/internal/SwitchBase.d.mts +2 -12
  277. package/internal/SwitchBase.d.ts +2 -12
  278. package/internal/SwitchBase.js +6 -17
  279. package/internal/SwitchBase.mjs +6 -17
  280. package/locale/psAF.js +1 -1
  281. package/locale/psAF.mjs +1 -1
  282. package/package.json +7 -7
  283. package/styles/createThemeWithVars.js +10 -9
  284. package/styles/createThemeWithVars.mjs +10 -9
  285. package/styles/stringifyTheme.js +1 -1
  286. package/styles/stringifyTheme.mjs +1 -1
  287. package/useAutocomplete/useAutocomplete.js +8 -0
  288. package/useAutocomplete/useAutocomplete.mjs +8 -0
  289. package/utils/createSvgIcon.d.mts +4 -2
  290. package/utils/createSvgIcon.d.ts +4 -2
  291. package/utils/createSvgIcon.js +6 -24
  292. package/utils/createSvgIcon.mjs +2 -24
  293. package/utils/focusWithVisible.js +24 -0
  294. package/utils/focusWithVisible.mjs +19 -0
  295. package/utils/index.d.mts +0 -1
  296. package/utils/index.d.ts +0 -1
  297. package/utils/index.js +0 -7
  298. package/utils/index.mjs +0 -1
  299. package/utils/useFocusableWhenDisabled.d.mts +30 -0
  300. package/utils/useFocusableWhenDisabled.d.ts +30 -0
  301. package/utils/useFocusableWhenDisabled.js +47 -0
  302. package/utils/useFocusableWhenDisabled.mjs +41 -0
  303. package/utils/useRovingTabIndex.d.mts +1 -2
  304. package/utils/useRovingTabIndex.d.ts +1 -2
  305. package/utils/useRovingTabIndex.js +25 -4
  306. package/utils/useRovingTabIndex.mjs +1 -2
  307. package/version/index.js +2 -2
  308. package/version/index.mjs +2 -2
@@ -0,0 +1,91 @@
1
+ import * as React from 'react';
2
+ export interface UseButtonBaseParameters {
3
+ /**
4
+ * Whether the root should be treated as a native `<button>` for render-time semantics.
5
+ */
6
+ nativeButton: boolean;
7
+ /**
8
+ * The explicit `nativeButton` value provided by the caller, if any.
9
+ */
10
+ nativeButtonProp?: boolean | undefined;
11
+ /**
12
+ * Whether the default rendered element is expected to be a native button when
13
+ * `nativeButton` was not explicitly provided.
14
+ * @default nativeButton
15
+ */
16
+ internalNativeButton?: boolean | undefined;
17
+ /**
18
+ * Whether to perform additional checks in dev mode on whether the resolved element
19
+ * matches the default native or non-native button expectation.
20
+ * Set to `true` to allow hook callers bypass this check, e.g. when the `component`
21
+ * prop is a string.
22
+ * @default false
23
+ */
24
+ allowInferredHostMismatch?: boolean | undefined;
25
+ /**
26
+ * The disabled state of the component.
27
+ */
28
+ disabled: boolean;
29
+ /**
30
+ * The `type` attribute for the element.
31
+ */
32
+ type?: string | undefined;
33
+ /**
34
+ * Whether the element has a `formAction` attribute. When true, the hook
35
+ * will not default `type` to `'button'` for native buttons so the browser
36
+ * can use its natural submit behaviour.
37
+ * @default false
38
+ */
39
+ hasFormAction?: boolean | undefined;
40
+ /**
41
+ * The `tabIndex` attribute for the element.
42
+ * @default 0
43
+ */
44
+ tabIndex?: number | undefined;
45
+ /**
46
+ * When `true`, a disabled root can remain focusable.
47
+ * When `undefined`, the feature is not enabled.
48
+ */
49
+ focusableWhenDisabled?: boolean | undefined;
50
+ /**
51
+ * When `true`, calls `event.stopPropagation()` on click before the disabled guard runs.
52
+ * @default false
53
+ */
54
+ stopEventPropagation?: boolean | undefined;
55
+ /**
56
+ * An additional function that will run before the user's `onKeyDown`, e.g.
57
+ * to trigger the ripple effect in `<ButtonBase>`.
58
+ */
59
+ onBeforeKeyDown?: React.KeyboardEventHandler<HTMLElement> | undefined;
60
+ /**
61
+ * An additional function that will run before the user's `onKeyUp`, e.g.
62
+ * to control the ripple effect in `<ButtonBase>`.
63
+ */
64
+ onBeforeKeyUp?: React.KeyboardEventHandler<HTMLElement> | undefined;
65
+ }
66
+ export interface ButtonBaseButtonProps {
67
+ role?: string | undefined;
68
+ 'aria-disabled'?: boolean | undefined;
69
+ type?: string | undefined;
70
+ disabled?: boolean | undefined;
71
+ tabIndex: number;
72
+ }
73
+ export interface ButtonBaseExternalProps extends React.HTMLAttributes<any> {
74
+ 'aria-disabled'?: boolean | undefined;
75
+ disabled?: boolean | undefined;
76
+ type?: string | undefined;
77
+ }
78
+ export interface ButtonBaseEventHandlers {
79
+ onClick: React.MouseEventHandler<HTMLElement>;
80
+ onKeyDown: React.KeyboardEventHandler<HTMLElement>;
81
+ onKeyUp: React.KeyboardEventHandler<HTMLElement>;
82
+ }
83
+ export interface UseButtonBaseReturnValue {
84
+ /**
85
+ * @param externalProps additional props for the button
86
+ * @returns props that should be spread on the button
87
+ */
88
+ getButtonProps: <ExternalProps extends ButtonBaseExternalProps = ButtonBaseExternalProps>(externalProps?: ExternalProps) => Omit<ExternalProps, keyof ButtonBaseEventHandlers> & ButtonBaseButtonProps & ButtonBaseEventHandlers;
89
+ rootRef: React.RefObject<HTMLElement | null>;
90
+ }
91
+ export default function useButtonBase(parameters: UseButtonBaseParameters): UseButtonBaseReturnValue;
@@ -0,0 +1,91 @@
1
+ import * as React from 'react';
2
+ export interface UseButtonBaseParameters {
3
+ /**
4
+ * Whether the root should be treated as a native `<button>` for render-time semantics.
5
+ */
6
+ nativeButton: boolean;
7
+ /**
8
+ * The explicit `nativeButton` value provided by the caller, if any.
9
+ */
10
+ nativeButtonProp?: boolean | undefined;
11
+ /**
12
+ * Whether the default rendered element is expected to be a native button when
13
+ * `nativeButton` was not explicitly provided.
14
+ * @default nativeButton
15
+ */
16
+ internalNativeButton?: boolean | undefined;
17
+ /**
18
+ * Whether to perform additional checks in dev mode on whether the resolved element
19
+ * matches the default native or non-native button expectation.
20
+ * Set to `true` to allow hook callers bypass this check, e.g. when the `component`
21
+ * prop is a string.
22
+ * @default false
23
+ */
24
+ allowInferredHostMismatch?: boolean | undefined;
25
+ /**
26
+ * The disabled state of the component.
27
+ */
28
+ disabled: boolean;
29
+ /**
30
+ * The `type` attribute for the element.
31
+ */
32
+ type?: string | undefined;
33
+ /**
34
+ * Whether the element has a `formAction` attribute. When true, the hook
35
+ * will not default `type` to `'button'` for native buttons so the browser
36
+ * can use its natural submit behaviour.
37
+ * @default false
38
+ */
39
+ hasFormAction?: boolean | undefined;
40
+ /**
41
+ * The `tabIndex` attribute for the element.
42
+ * @default 0
43
+ */
44
+ tabIndex?: number | undefined;
45
+ /**
46
+ * When `true`, a disabled root can remain focusable.
47
+ * When `undefined`, the feature is not enabled.
48
+ */
49
+ focusableWhenDisabled?: boolean | undefined;
50
+ /**
51
+ * When `true`, calls `event.stopPropagation()` on click before the disabled guard runs.
52
+ * @default false
53
+ */
54
+ stopEventPropagation?: boolean | undefined;
55
+ /**
56
+ * An additional function that will run before the user's `onKeyDown`, e.g.
57
+ * to trigger the ripple effect in `<ButtonBase>`.
58
+ */
59
+ onBeforeKeyDown?: React.KeyboardEventHandler<HTMLElement> | undefined;
60
+ /**
61
+ * An additional function that will run before the user's `onKeyUp`, e.g.
62
+ * to control the ripple effect in `<ButtonBase>`.
63
+ */
64
+ onBeforeKeyUp?: React.KeyboardEventHandler<HTMLElement> | undefined;
65
+ }
66
+ export interface ButtonBaseButtonProps {
67
+ role?: string | undefined;
68
+ 'aria-disabled'?: boolean | undefined;
69
+ type?: string | undefined;
70
+ disabled?: boolean | undefined;
71
+ tabIndex: number;
72
+ }
73
+ export interface ButtonBaseExternalProps extends React.HTMLAttributes<any> {
74
+ 'aria-disabled'?: boolean | undefined;
75
+ disabled?: boolean | undefined;
76
+ type?: string | undefined;
77
+ }
78
+ export interface ButtonBaseEventHandlers {
79
+ onClick: React.MouseEventHandler<HTMLElement>;
80
+ onKeyDown: React.KeyboardEventHandler<HTMLElement>;
81
+ onKeyUp: React.KeyboardEventHandler<HTMLElement>;
82
+ }
83
+ export interface UseButtonBaseReturnValue {
84
+ /**
85
+ * @param externalProps additional props for the button
86
+ * @returns props that should be spread on the button
87
+ */
88
+ getButtonProps: <ExternalProps extends ButtonBaseExternalProps = ButtonBaseExternalProps>(externalProps?: ExternalProps) => Omit<ExternalProps, keyof ButtonBaseEventHandlers> & ButtonBaseButtonProps & ButtonBaseEventHandlers;
89
+ rootRef: React.RefObject<HTMLElement | null>;
90
+ }
91
+ export default function useButtonBase(parameters: UseButtonBaseParameters): UseButtonBaseReturnValue;
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.default = useButtonBase;
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _useFocusableWhenDisabled = _interopRequireDefault(require("../utils/useFocusableWhenDisabled"));
12
+ const EMPTY = {};
13
+ function useButtonBase(parameters) {
14
+ const {
15
+ nativeButton,
16
+ nativeButtonProp,
17
+ internalNativeButton = nativeButton,
18
+ allowInferredHostMismatch = false,
19
+ disabled,
20
+ type,
21
+ hasFormAction = false,
22
+ tabIndex = 0,
23
+ focusableWhenDisabled: focusableWhenDisabledParam,
24
+ stopEventPropagation = false,
25
+ onBeforeKeyDown,
26
+ onBeforeKeyUp
27
+ } = parameters;
28
+ const rootRef = React.useRef(null);
29
+ const focusableWhenDisabled = focusableWhenDisabledParam === true;
30
+ const focusableWhenDisabledProps = (0, _useFocusableWhenDisabled.default)({
31
+ focusableWhenDisabled,
32
+ disabled,
33
+ isNativeButton: nativeButton,
34
+ tabIndex
35
+ });
36
+ if (process.env.NODE_ENV !== 'production') {
37
+ // eslint-disable-next-line react-hooks/rules-of-hooks
38
+ React.useEffect(() => {
39
+ const root = rootRef.current;
40
+ if (root == null) {
41
+ return;
42
+ }
43
+ const isButtonTag = root.tagName === 'BUTTON';
44
+ if (nativeButtonProp !== undefined) {
45
+ if (nativeButtonProp && !isButtonTag) {
46
+ const message = 'MUI: A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Render a real <button> ' + 'or set `nativeButton` to `false`.';
47
+ console.error(message);
48
+ }
49
+ if (!nativeButtonProp && isButtonTag) {
50
+ const message = 'MUI: A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while additionally applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set ' + '`nativeButton` to `true`.';
51
+ console.error(message);
52
+ }
53
+ return;
54
+ }
55
+ if (allowInferredHostMismatch) {
56
+ return;
57
+ }
58
+
59
+ // warn when expecting a native <button> element but a non-string `component` prop resolved to a non-button element
60
+ if (internalNativeButton && !isButtonTag) {
61
+ const message = 'MUI: A component rendering a native <button> resolved to a non-<button> element, ' + 'but `nativeButton={false}` was not specified and the resolved root is a non-<button>. ' + 'When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element.';
62
+ console.error(message);
63
+ }
64
+
65
+ // warn when expecting a non-button but a non-string `component` prop resolved to a native <button> element
66
+ if (!internalNativeButton && isButtonTag) {
67
+ const message = 'MUI: A component that acts as a non-native button resolved to a native <button> element, ' + 'but `nativeButton={true}` was not specified. ' + 'When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element.';
68
+ console.error(message);
69
+ }
70
+ }, [allowInferredHostMismatch, internalNativeButton, nativeButtonProp]);
71
+ }
72
+
73
+ // A helper for event handlers to determine whether to use browser-defined keyboard activation
74
+ // for native elements like <button> and <a href>, or synthesize Enter/Space clicks for non-native
75
+ // elements like `<div role="button">`.
76
+ // This is UNSAFE TO USE outside of event handers, e.g. in render.
77
+ const hasNativeKeyboardActivation = React.useCallback(() => {
78
+ const root = rootRef.current;
79
+ if (root == null) {
80
+ return nativeButton;
81
+ }
82
+ if (root.tagName === 'BUTTON') {
83
+ return true;
84
+ }
85
+
86
+ // Although this hook is not intended for links, this check is for
87
+ // backward compatibility with `<ButtonBase href="#" />` since ButtonBase
88
+ // uses the returned event handlers.
89
+ return Boolean(root.tagName === 'A' && root.href);
90
+ }, [nativeButton]);
91
+ const buttonProps = React.useMemo(() => {
92
+ const resolvedButtonProps = focusableWhenDisabled ? {} : {
93
+ tabIndex: disabled ? -1 : tabIndex
94
+ };
95
+ if (nativeButton) {
96
+ resolvedButtonProps.type = type === undefined && !hasFormAction ? 'button' : type;
97
+ if (!focusableWhenDisabled) {
98
+ resolvedButtonProps.disabled = disabled;
99
+ }
100
+ } else {
101
+ resolvedButtonProps.role = 'button';
102
+ if (!focusableWhenDisabled && disabled) {
103
+ resolvedButtonProps['aria-disabled'] = disabled;
104
+ }
105
+ }
106
+ if (focusableWhenDisabled) {
107
+ return {
108
+ ...resolvedButtonProps,
109
+ ...focusableWhenDisabledProps
110
+ };
111
+ }
112
+ return resolvedButtonProps;
113
+ }, [disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasFormAction, nativeButton, tabIndex, type]);
114
+ const getButtonProps = React.useCallback((externalProps = EMPTY) => {
115
+ const {
116
+ onClick: externalOnClick,
117
+ onKeyDown: externalOnKeyDown,
118
+ onKeyUp: externalOnKeyUp,
119
+ ...otherExternalProps
120
+ } = externalProps;
121
+ const handleClick = event => {
122
+ if (stopEventPropagation) {
123
+ event.stopPropagation();
124
+ }
125
+ if (disabled) {
126
+ event.preventDefault();
127
+ return;
128
+ }
129
+ externalOnClick?.(event);
130
+ };
131
+ const handleKeyDown = event => {
132
+ if (focusableWhenDisabled) {
133
+ focusableWhenDisabledProps.onKeyDown(event);
134
+ }
135
+ if (disabled) {
136
+ return;
137
+ }
138
+ onBeforeKeyDown?.(event);
139
+ externalOnKeyDown?.(event);
140
+ if (event.target !== event.currentTarget || hasNativeKeyboardActivation()) {
141
+ return;
142
+ }
143
+ if (event.key === ' ') {
144
+ event.preventDefault();
145
+ return;
146
+ }
147
+ if (event.key === 'Enter') {
148
+ event.preventDefault();
149
+ event.currentTarget.click();
150
+ }
151
+ };
152
+ const handleKeyUp = event => {
153
+ if (disabled) {
154
+ return;
155
+ }
156
+ onBeforeKeyUp?.(event);
157
+ externalOnKeyUp?.(event);
158
+ if (event.target === event.currentTarget && !hasNativeKeyboardActivation() && event.key === ' ' && !event.defaultPrevented) {
159
+ event.currentTarget.click();
160
+ }
161
+ };
162
+ return {
163
+ ...buttonProps,
164
+ ...otherExternalProps,
165
+ onClick: handleClick,
166
+ onKeyDown: handleKeyDown,
167
+ onKeyUp: handleKeyUp
168
+ };
169
+ }, [buttonProps, disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasNativeKeyboardActivation, onBeforeKeyDown, onBeforeKeyUp, stopEventPropagation]);
170
+ return {
171
+ getButtonProps,
172
+ rootRef
173
+ };
174
+ }
@@ -0,0 +1,167 @@
1
+ 'use client';
2
+
3
+ import * as React from 'react';
4
+ import useFocusableWhenDisabled from "../utils/useFocusableWhenDisabled.mjs";
5
+ const EMPTY = {};
6
+ export default function useButtonBase(parameters) {
7
+ const {
8
+ nativeButton,
9
+ nativeButtonProp,
10
+ internalNativeButton = nativeButton,
11
+ allowInferredHostMismatch = false,
12
+ disabled,
13
+ type,
14
+ hasFormAction = false,
15
+ tabIndex = 0,
16
+ focusableWhenDisabled: focusableWhenDisabledParam,
17
+ stopEventPropagation = false,
18
+ onBeforeKeyDown,
19
+ onBeforeKeyUp
20
+ } = parameters;
21
+ const rootRef = React.useRef(null);
22
+ const focusableWhenDisabled = focusableWhenDisabledParam === true;
23
+ const focusableWhenDisabledProps = useFocusableWhenDisabled({
24
+ focusableWhenDisabled,
25
+ disabled,
26
+ isNativeButton: nativeButton,
27
+ tabIndex
28
+ });
29
+ if (process.env.NODE_ENV !== 'production') {
30
+ // eslint-disable-next-line react-hooks/rules-of-hooks
31
+ React.useEffect(() => {
32
+ const root = rootRef.current;
33
+ if (root == null) {
34
+ return;
35
+ }
36
+ const isButtonTag = root.tagName === 'BUTTON';
37
+ if (nativeButtonProp !== undefined) {
38
+ if (nativeButtonProp && !isButtonTag) {
39
+ const message = 'MUI: A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Render a real <button> ' + 'or set `nativeButton` to `false`.';
40
+ console.error(message);
41
+ }
42
+ if (!nativeButtonProp && isButtonTag) {
43
+ const message = 'MUI: A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while additionally applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Render a non-<button> such as <div>, or set ' + '`nativeButton` to `true`.';
44
+ console.error(message);
45
+ }
46
+ return;
47
+ }
48
+ if (allowInferredHostMismatch) {
49
+ return;
50
+ }
51
+
52
+ // warn when expecting a native <button> element but a non-string `component` prop resolved to a non-button element
53
+ if (internalNativeButton && !isButtonTag) {
54
+ const message = 'MUI: A component rendering a native <button> resolved to a non-<button> element, ' + 'but `nativeButton={false}` was not specified and the resolved root is a non-<button>. ' + 'When rendering a custom component, set `nativeButton={false}` explicitly or render a <button> element.';
55
+ console.error(message);
56
+ }
57
+
58
+ // warn when expecting a non-button but a non-string `component` prop resolved to a native <button> element
59
+ if (!internalNativeButton && isButtonTag) {
60
+ const message = 'MUI: A component that acts as a non-native button resolved to a native <button> element, ' + 'but `nativeButton={true}` was not specified. ' + 'When rendering a custom component, set `nativeButton={true}` explicitly or render a non-<button> element.';
61
+ console.error(message);
62
+ }
63
+ }, [allowInferredHostMismatch, internalNativeButton, nativeButtonProp]);
64
+ }
65
+
66
+ // A helper for event handlers to determine whether to use browser-defined keyboard activation
67
+ // for native elements like <button> and <a href>, or synthesize Enter/Space clicks for non-native
68
+ // elements like `<div role="button">`.
69
+ // This is UNSAFE TO USE outside of event handers, e.g. in render.
70
+ const hasNativeKeyboardActivation = React.useCallback(() => {
71
+ const root = rootRef.current;
72
+ if (root == null) {
73
+ return nativeButton;
74
+ }
75
+ if (root.tagName === 'BUTTON') {
76
+ return true;
77
+ }
78
+
79
+ // Although this hook is not intended for links, this check is for
80
+ // backward compatibility with `<ButtonBase href="#" />` since ButtonBase
81
+ // uses the returned event handlers.
82
+ return Boolean(root.tagName === 'A' && root.href);
83
+ }, [nativeButton]);
84
+ const buttonProps = React.useMemo(() => {
85
+ const resolvedButtonProps = focusableWhenDisabled ? {} : {
86
+ tabIndex: disabled ? -1 : tabIndex
87
+ };
88
+ if (nativeButton) {
89
+ resolvedButtonProps.type = type === undefined && !hasFormAction ? 'button' : type;
90
+ if (!focusableWhenDisabled) {
91
+ resolvedButtonProps.disabled = disabled;
92
+ }
93
+ } else {
94
+ resolvedButtonProps.role = 'button';
95
+ if (!focusableWhenDisabled && disabled) {
96
+ resolvedButtonProps['aria-disabled'] = disabled;
97
+ }
98
+ }
99
+ if (focusableWhenDisabled) {
100
+ return {
101
+ ...resolvedButtonProps,
102
+ ...focusableWhenDisabledProps
103
+ };
104
+ }
105
+ return resolvedButtonProps;
106
+ }, [disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasFormAction, nativeButton, tabIndex, type]);
107
+ const getButtonProps = React.useCallback((externalProps = EMPTY) => {
108
+ const {
109
+ onClick: externalOnClick,
110
+ onKeyDown: externalOnKeyDown,
111
+ onKeyUp: externalOnKeyUp,
112
+ ...otherExternalProps
113
+ } = externalProps;
114
+ const handleClick = event => {
115
+ if (stopEventPropagation) {
116
+ event.stopPropagation();
117
+ }
118
+ if (disabled) {
119
+ event.preventDefault();
120
+ return;
121
+ }
122
+ externalOnClick?.(event);
123
+ };
124
+ const handleKeyDown = event => {
125
+ if (focusableWhenDisabled) {
126
+ focusableWhenDisabledProps.onKeyDown(event);
127
+ }
128
+ if (disabled) {
129
+ return;
130
+ }
131
+ onBeforeKeyDown?.(event);
132
+ externalOnKeyDown?.(event);
133
+ if (event.target !== event.currentTarget || hasNativeKeyboardActivation()) {
134
+ return;
135
+ }
136
+ if (event.key === ' ') {
137
+ event.preventDefault();
138
+ return;
139
+ }
140
+ if (event.key === 'Enter') {
141
+ event.preventDefault();
142
+ event.currentTarget.click();
143
+ }
144
+ };
145
+ const handleKeyUp = event => {
146
+ if (disabled) {
147
+ return;
148
+ }
149
+ onBeforeKeyUp?.(event);
150
+ externalOnKeyUp?.(event);
151
+ if (event.target === event.currentTarget && !hasNativeKeyboardActivation() && event.key === ' ' && !event.defaultPrevented) {
152
+ event.currentTarget.click();
153
+ }
154
+ };
155
+ return {
156
+ ...buttonProps,
157
+ ...otherExternalProps,
158
+ onClick: handleClick,
159
+ onKeyDown: handleKeyDown,
160
+ onKeyUp: handleKeyUp
161
+ };
162
+ }, [buttonProps, disabled, focusableWhenDisabled, focusableWhenDisabledProps, hasNativeKeyboardActivation, onBeforeKeyDown, onBeforeKeyUp, stopEventPropagation]);
163
+ return {
164
+ getButtonProps,
165
+ rootRef
166
+ };
167
+ }
@@ -27,14 +27,6 @@ const overridesResolver = (props, styles) => {
27
27
  } = props;
28
28
  return [{
29
29
  [`& .${_buttonGroupClasses.default.grouped}`]: styles.grouped
30
- }, {
31
- [`& .${_buttonGroupClasses.default.grouped}`]: styles[`grouped${(0, _capitalize.default)(ownerState.orientation)}`]
32
- }, {
33
- [`& .${_buttonGroupClasses.default.grouped}`]: styles[`grouped${(0, _capitalize.default)(ownerState.variant)}`]
34
- }, {
35
- [`& .${_buttonGroupClasses.default.grouped}`]: styles[`grouped${(0, _capitalize.default)(ownerState.variant)}${(0, _capitalize.default)(ownerState.orientation)}`]
36
- }, {
37
- [`& .${_buttonGroupClasses.default.grouped}`]: styles[`grouped${(0, _capitalize.default)(ownerState.variant)}${(0, _capitalize.default)(ownerState.color)}`]
38
30
  }, {
39
31
  [`& .${_buttonGroupClasses.default.firstButton}`]: styles.firstButton
40
32
  }, {
@@ -55,7 +47,7 @@ const useUtilityClasses = ownerState => {
55
47
  } = ownerState;
56
48
  const slots = {
57
49
  root: ['root', variant, orientation, fullWidth && 'fullWidth', disableElevation && 'disableElevation', `color${(0, _capitalize.default)(color)}`],
58
- grouped: ['grouped', `grouped${(0, _capitalize.default)(orientation)}`, `grouped${(0, _capitalize.default)(variant)}`, `grouped${(0, _capitalize.default)(variant)}${(0, _capitalize.default)(orientation)}`, `grouped${(0, _capitalize.default)(variant)}${(0, _capitalize.default)(color)}`, disabled && 'disabled'],
50
+ grouped: ['grouped', disabled && 'disabled'],
59
51
  firstButton: ['firstButton'],
60
52
  lastButton: ['lastButton'],
61
53
  middleButton: ['middleButton']
@@ -20,14 +20,6 @@ const overridesResolver = (props, styles) => {
20
20
  } = props;
21
21
  return [{
22
22
  [`& .${buttonGroupClasses.grouped}`]: styles.grouped
23
- }, {
24
- [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.orientation)}`]
25
- }, {
26
- [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}`]
27
- }, {
28
- [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.orientation)}`]
29
- }, {
30
- [`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.color)}`]
31
23
  }, {
32
24
  [`& .${buttonGroupClasses.firstButton}`]: styles.firstButton
33
25
  }, {
@@ -48,7 +40,7 @@ const useUtilityClasses = ownerState => {
48
40
  } = ownerState;
49
41
  const slots = {
50
42
  root: ['root', variant, orientation, fullWidth && 'fullWidth', disableElevation && 'disableElevation', `color${capitalize(color)}`],
51
- grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled'],
43
+ grouped: ['grouped', disabled && 'disabled'],
52
44
  firstButton: ['firstButton'],
53
45
  lastButton: ['lastButton'],
54
46
  middleButton: ['middleButton']
@@ -25,74 +25,6 @@ export interface ButtonGroupClasses {
25
25
  colorPrimary: string;
26
26
  /** Styles applied to the root element if `color="secondary"` */
27
27
  colorSecondary: string;
28
- /** Styles applied to the children if `orientation="horizontal"`.
29
- * @deprecated Combine the [.MuiButtonGroup-horizontal](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-horizontal) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
30
- */
31
- groupedHorizontal: string;
32
- /** Styles applied to the children if `orientation="vertical"`.
33
- * @deprecated Combine the [.MuiButtonGroup-vertical](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-vertical) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
34
- */
35
- groupedVertical: string;
36
- /** Styles applied to the children if `variant="text"`.
37
- * @deprecated Combine the [.MuiButtonGroup-text](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-text) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
38
- */
39
- groupedText: string;
40
- /** Styles applied to the children if `variant="text"` and `orientation="horizontal"`.
41
- * @deprecated Combine the [.MuiButtonGroup-text](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-text) , [.MuiButtonGroup-horizontal](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-horizontal) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
42
- */
43
- groupedTextHorizontal: string;
44
- /** Styles applied to the children if `variant="text"` and `orientation="vertical"`.
45
- * @deprecated Combine the [.MuiButtonGroup-text](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-text) , [.MuiButtonGroup-vertical](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-vertical) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
46
- */
47
- groupedTextVertical: string;
48
- /** Styles applied to the children if `variant="text"` and `color="primary"`.
49
- * @deprecated Combine the [.MuiButtonGroup-text](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-text) , [.MuiButtonGroup-colorPrimary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorPrimary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
50
- */
51
- groupedTextPrimary: string;
52
- /** Styles applied to the children if `variant="text"` and `color="secondary"`.
53
- * @deprecated Combine the [.MuiButtonGroup-text](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-text) , [.MuiButtonGroup-colorSecondary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorSecondary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
54
- */
55
- groupedTextSecondary: string;
56
- /** Styles applied to the children if `variant="outlined"`.
57
- * @deprecated Combine the [.MuiButtonGroup-outlined](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-outlined) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
58
- */
59
- groupedOutlined: string;
60
- /** Styles applied to the children if `variant="outlined"` and `orientation="horizontal"`.
61
- * @deprecated Combine the [.MuiButtonGroup-outlined](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-outlined) , [.MuiButtonGroup-horizontal](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-horizontal) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
62
- */
63
- groupedOutlinedHorizontal: string;
64
- /** Styles applied to the children if `variant="outlined"` and `orientation="vertical"`.
65
- * @deprecated Combine the [.MuiButtonGroup-outlined](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-outlined) , [.MuiButtonGroup-vertical](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-vertical) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
66
- */
67
- groupedOutlinedVertical: string;
68
- /** Styles applied to the children if `variant="outlined"` and `color="primary"`.
69
- * @deprecated Combine the [.MuiButtonGroup-outlined](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-outlined) , [.MuiButtonGroup-colorPrimary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorPrimary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
70
- */
71
- groupedOutlinedPrimary: string;
72
- /** Styles applied to the children if `variant="outlined"` and `color="secondary"`.
73
- * @deprecated Combine the [.MuiButtonGroup-outlined](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-outlined) , [.MuiButtonGroup-colorSecondary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorSecondary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
74
- */
75
- groupedOutlinedSecondary: string;
76
- /** Styles applied to the children if `variant="contained"`.
77
- * @deprecated Combine the [.MuiButtonGroup-contained](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-contained) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
78
- */
79
- groupedContained: string;
80
- /** Styles applied to the children if `variant="contained"` and `orientation="horizontal"`.
81
- * @deprecated Combine the [.MuiButtonGroup-contained](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-contained) , [.MuiButtonGroup-horizontal](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-horizontal) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
82
- */
83
- groupedContainedHorizontal: string;
84
- /** Styles applied to the children if `variant="contained"` and `orientation="vertical"`.
85
- * @deprecated Combine the [.MuiButtonGroup-contained](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-contained) , [.MuiButtonGroup-vertical](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-vertical) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
86
- */
87
- groupedContainedVertical: string;
88
- /** Styles applied to the children if `variant="contained"` and `color="primary"`.
89
- * @deprecated Combine the [.MuiButtonGroup-contained](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-contained) , [.MuiButtonGroup-colorPrimary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorPrimary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
90
- */
91
- groupedContainedPrimary: string;
92
- /** Styles applied to the children if `variant="contained"` and `color="secondary"`.
93
- * @deprecated Combine the [.MuiButtonGroup-contained](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-contained) , [.MuiButtonGroup-colorSecondary](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-colorSecondary) and [.MuiButtonGroup-grouped](/material-ui/api/button-group/#button-group-classes-MuiButtonGroup-grouped) classes instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
94
- */
95
- groupedContainedSecondary: string;
96
28
  /** Styles applied to the last button in the button group. */
97
29
  lastButton: string;
98
30
  /** Styles applied to buttons in the middle of the button group. */