@mui/material 9.0.0-alpha.3 → 9.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.mts +0 -14
- package/Accordion/Accordion.d.ts +0 -14
- package/Accordion/Accordion.js +3 -25
- package/Accordion/Accordion.mjs +3 -25
- package/AccordionSummary/AccordionSummary.js +1 -1
- package/AccordionSummary/AccordionSummary.mjs +1 -1
- package/AccordionSummary/accordionSummaryClasses.d.mts +0 -5
- package/AccordionSummary/accordionSummaryClasses.d.ts +0 -5
- package/AccordionSummary/accordionSummaryClasses.js +1 -1
- package/AccordionSummary/accordionSummaryClasses.mjs +1 -1
- package/Alert/Alert.d.mts +0 -23
- package/Alert/Alert.d.ts +0 -23
- package/Alert/Alert.js +4 -36
- package/Alert/Alert.mjs +4 -36
- package/Alert/alertClasses.d.mts +0 -72
- package/Alert/alertClasses.d.ts +0 -72
- package/Alert/alertClasses.js +1 -1
- package/Alert/alertClasses.mjs +1 -1
- package/Autocomplete/Autocomplete.d.mts +10 -60
- package/Autocomplete/Autocomplete.d.ts +10 -60
- package/Autocomplete/Autocomplete.js +33 -99
- package/Autocomplete/Autocomplete.mjs +33 -99
- package/Avatar/Avatar.d.mts +0 -8
- package/Avatar/Avatar.d.ts +0 -8
- package/Avatar/Avatar.js +13 -35
- package/Avatar/Avatar.mjs +13 -35
- package/AvatarGroup/AvatarGroup.d.mts +0 -15
- package/AvatarGroup/AvatarGroup.d.ts +0 -15
- package/AvatarGroup/AvatarGroup.js +1 -18
- package/AvatarGroup/AvatarGroup.mjs +1 -18
- package/Backdrop/Backdrop.d.mts +1 -31
- package/Backdrop/Backdrop.d.ts +1 -31
- package/Backdrop/Backdrop.js +2 -42
- package/Backdrop/Backdrop.mjs +2 -42
- package/Badge/Badge.d.mts +0 -20
- package/Badge/Badge.d.ts +0 -20
- package/Badge/Badge.js +2 -35
- package/Badge/Badge.mjs +2 -35
- package/Button/Button.js +6 -6
- package/Button/Button.mjs +6 -6
- package/Button/buttonClasses.d.mts +0 -132
- package/Button/buttonClasses.d.ts +0 -132
- package/Button/buttonClasses.js +1 -1
- package/Button/buttonClasses.mjs +1 -1
- package/ButtonBase/ButtonBase.js +16 -2
- package/ButtonBase/ButtonBase.mjs +16 -2
- package/CHANGELOG.md +154 -0
- package/CircularProgress/CircularProgress.js +2 -2
- package/CircularProgress/CircularProgress.mjs +2 -2
- package/CircularProgress/circularProgressClasses.d.mts +0 -8
- package/CircularProgress/circularProgressClasses.d.ts +0 -8
- package/CircularProgress/circularProgressClasses.js +1 -1
- package/CircularProgress/circularProgressClasses.mjs +1 -1
- package/Divider/Divider.d.mts +0 -6
- package/Divider/Divider.d.ts +0 -6
- package/Divider/Divider.js +2 -18
- package/Divider/Divider.mjs +2 -18
- package/Divider/dividerClasses.d.mts +0 -4
- package/Divider/dividerClasses.d.ts +0 -4
- package/Divider/dividerClasses.js +1 -1
- package/Divider/dividerClasses.mjs +1 -1
- package/FormControlLabel/FormControlLabel.d.mts +1 -14
- package/FormControlLabel/FormControlLabel.d.ts +1 -14
- package/FormControlLabel/FormControlLabel.js +1 -13
- package/FormControlLabel/FormControlLabel.mjs +1 -13
- package/Input/Input.js +2 -1
- package/Input/Input.mjs +2 -1
- package/Menu/Menu.d.mts +0 -13
- package/Menu/Menu.d.ts +0 -13
- package/Menu/Menu.js +5 -44
- package/Menu/Menu.mjs +5 -44
- package/MenuItem/MenuItem.js +21 -1
- package/MenuItem/MenuItem.mjs +23 -1
- package/MenuList/MenuList.js +2 -4
- package/MenuList/MenuList.mjs +2 -4
- package/MobileStepper/MobileStepper.d.mts +0 -5
- package/MobileStepper/MobileStepper.d.ts +0 -5
- package/MobileStepper/MobileStepper.js +1 -10
- package/MobileStepper/MobileStepper.mjs +1 -10
- package/Popover/Popover.d.mts +4 -48
- package/Popover/Popover.d.ts +4 -48
- package/Popover/Popover.js +4 -64
- package/Popover/Popover.mjs +4 -64
- package/Popper/Popper.d.mts +0 -17
- package/Popper/Popper.d.ts +0 -17
- package/Popper/Popper.js +2 -26
- package/Popper/Popper.mjs +2 -26
- package/Popper/index.d.mts +1 -0
- package/Popper/index.d.ts +1 -0
- package/Popper/index.js +11 -2
- package/Popper/index.mjs +1 -0
- package/Select/SelectInput.js +50 -55
- package/Select/SelectInput.mjs +47 -52
- package/Select/index.d.mts +1 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +12 -0
- package/Select/index.mjs +1 -0
- package/Select/utils/SelectFocusSourceContext.d.mts +4 -0
- package/Select/utils/SelectFocusSourceContext.d.ts +4 -0
- package/Select/utils/SelectFocusSourceContext.js +19 -0
- package/Select/utils/SelectFocusSourceContext.mjs +13 -0
- package/Select/utils/areEqualValues.d.mts +1 -0
- package/Select/utils/areEqualValues.d.ts +1 -0
- package/Select/utils/areEqualValues.js +14 -0
- package/Select/utils/areEqualValues.mjs +8 -0
- package/Select/utils/getOpenInteractionType.d.mts +1 -0
- package/Select/utils/getOpenInteractionType.d.ts +1 -0
- package/Select/utils/getOpenInteractionType.js +18 -0
- package/Select/utils/getOpenInteractionType.mjs +12 -0
- package/Select/utils/index.d.mts +4 -0
- package/Select/utils/index.d.ts +4 -0
- package/Select/utils/index.js +40 -0
- package/Select/utils/index.mjs +4 -0
- package/Select/utils/isEmpty.d.mts +1 -0
- package/Select/utils/isEmpty.d.ts +1 -0
- package/Select/utils/isEmpty.js +9 -0
- package/Select/utils/isEmpty.mjs +3 -0
- package/Slider/Slider.d.mts +109 -77
- package/Slider/Slider.d.ts +109 -77
- package/Slider/Slider.js +42 -119
- package/Slider/Slider.mjs +42 -119
- package/Slider/sliderClasses.d.mts +7 -7
- package/Slider/sliderClasses.d.ts +7 -7
- package/Slider/useSlider.js +50 -14
- package/Slider/useSlider.mjs +50 -14
- package/Snackbar/Snackbar.d.mts +1 -27
- package/Snackbar/Snackbar.d.ts +1 -27
- package/Snackbar/Snackbar.js +5 -58
- package/Snackbar/Snackbar.mjs +5 -58
- package/SpeedDial/SpeedDial.d.mts +0 -13
- package/SpeedDial/SpeedDial.d.ts +0 -13
- package/SpeedDial/SpeedDial.js +15 -40
- package/SpeedDial/SpeedDial.mjs +15 -40
- package/SpeedDialAction/SpeedDialAction.d.mts +0 -28
- package/SpeedDialAction/SpeedDialAction.d.ts +0 -28
- package/SpeedDialAction/SpeedDialAction.js +5 -46
- package/SpeedDialAction/SpeedDialAction.mjs +5 -46
- package/TablePagination/TablePagination.d.mts +1 -1
- package/TablePagination/TablePagination.d.ts +1 -1
- package/TablePagination/TablePagination.js +4 -2
- package/TablePagination/TablePagination.mjs +4 -2
- package/Tabs/Tabs.d.mts +2 -33
- package/Tabs/Tabs.d.ts +2 -33
- package/Tabs/Tabs.js +8 -38
- package/Tabs/Tabs.mjs +8 -38
- package/TextField/TextField.d.mts +6 -49
- package/TextField/TextField.d.ts +6 -49
- package/TextField/TextField.js +18 -53
- package/TextField/TextField.mjs +18 -53
- package/Tooltip/Tooltip.d.mts +1 -55
- package/Tooltip/Tooltip.d.ts +1 -55
- package/Tooltip/Tooltip.js +9 -87
- package/Tooltip/Tooltip.mjs +9 -87
- package/Typography/Typography.d.mts +0 -6
- package/Typography/Typography.d.ts +0 -6
- package/Typography/Typography.js +3 -19
- package/Typography/Typography.mjs +3 -19
- package/Typography/typographyClasses.d.mts +0 -5
- package/Typography/typographyClasses.d.ts +0 -5
- package/Typography/typographyClasses.js +1 -1
- package/Typography/typographyClasses.mjs +1 -1
- package/index.d.mts +0 -2
- package/index.d.ts +0 -2
- package/index.js +1 -9
- package/index.mjs +1 -2
- package/locale/amET.js +4 -1
- package/locale/amET.mjs +3 -1
- package/locale/arEG.js +4 -1
- package/locale/arEG.mjs +3 -1
- package/locale/arSA.js +4 -1
- package/locale/arSA.mjs +3 -1
- package/locale/arSD.js +4 -1
- package/locale/arSD.mjs +3 -1
- package/locale/beBY.js +4 -1
- package/locale/beBY.mjs +3 -1
- package/locale/bnBD.js +4 -1
- package/locale/bnBD.mjs +3 -1
- package/locale/caES.js +4 -1
- package/locale/caES.mjs +3 -1
- package/locale/csCZ.js +4 -1
- package/locale/csCZ.mjs +3 -1
- package/locale/daDK.js +4 -1
- package/locale/daDK.mjs +3 -1
- package/locale/deDE.js +4 -1
- package/locale/deDE.mjs +3 -1
- package/locale/elGR.js +4 -1
- package/locale/elGR.mjs +3 -1
- package/locale/esES.js +4 -1
- package/locale/esES.mjs +3 -1
- package/locale/etEE.js +4 -1
- package/locale/etEE.mjs +3 -1
- package/locale/faIR.js +4 -1
- package/locale/faIR.mjs +3 -1
- package/locale/fiFI.js +4 -1
- package/locale/fiFI.mjs +3 -1
- package/locale/frFR.js +4 -1
- package/locale/frFR.mjs +3 -1
- package/locale/heIL.js +4 -1
- package/locale/heIL.mjs +3 -1
- package/locale/hiIN.js +4 -1
- package/locale/hiIN.mjs +3 -1
- package/locale/hrHR.js +5 -1
- package/locale/hrHR.mjs +4 -1
- package/locale/isIS.js +4 -1
- package/locale/isIS.mjs +3 -1
- package/locale/itIT.js +4 -1
- package/locale/itIT.mjs +3 -1
- package/locale/jaJP.js +4 -1
- package/locale/jaJP.mjs +3 -1
- package/locale/khKH.js +4 -1
- package/locale/khKH.mjs +3 -1
- package/locale/kkKZ.js +4 -1
- package/locale/kkKZ.mjs +3 -1
- package/locale/koKR.js +4 -1
- package/locale/koKR.mjs +3 -1
- package/locale/kuCKB.js +4 -1
- package/locale/kuCKB.mjs +3 -1
- package/locale/kuLatn.js +4 -1
- package/locale/kuLatn.mjs +3 -1
- package/locale/mkMK.js +5 -1
- package/locale/mkMK.mjs +4 -1
- package/locale/msMS.js +5 -1
- package/locale/msMS.mjs +4 -1
- package/locale/myMY.js +5 -1
- package/locale/myMY.mjs +4 -1
- package/locale/nbNO.js +4 -1
- package/locale/nbNO.mjs +3 -1
- package/locale/neNP.js +5 -1
- package/locale/neNP.mjs +4 -1
- package/locale/nlNL.js +4 -1
- package/locale/nlNL.mjs +3 -1
- package/locale/nnNO.js +4 -1
- package/locale/nnNO.mjs +3 -1
- package/locale/plPL.js +4 -1
- package/locale/plPL.mjs +3 -1
- package/locale/psAF.js +4 -1
- package/locale/psAF.mjs +3 -1
- package/locale/ptBR.js +4 -1
- package/locale/ptBR.mjs +3 -1
- package/locale/ptPT.js +4 -1
- package/locale/ptPT.mjs +3 -1
- package/locale/roRO.js +4 -1
- package/locale/roRO.mjs +3 -1
- package/locale/ruRU.js +4 -1
- package/locale/ruRU.mjs +3 -1
- package/locale/siLK.js +4 -1
- package/locale/siLK.mjs +3 -1
- package/locale/skSK.js +4 -1
- package/locale/skSK.mjs +3 -1
- package/locale/srRS.js +5 -1
- package/locale/srRS.mjs +4 -1
- package/locale/svSE.js +4 -1
- package/locale/svSE.mjs +3 -1
- package/locale/thTH.js +4 -1
- package/locale/thTH.mjs +3 -1
- package/locale/tlTL.js +5 -1
- package/locale/tlTL.mjs +4 -1
- package/locale/trTR.js +4 -1
- package/locale/trTR.mjs +3 -1
- package/locale/ukUA.js +4 -1
- package/locale/ukUA.mjs +3 -1
- package/locale/urPK.js +4 -1
- package/locale/urPK.mjs +3 -1
- package/locale/utils/buildFormatNumber.d.mts +2 -0
- package/locale/utils/buildFormatNumber.d.ts +2 -0
- package/locale/utils/buildFormatNumber.js +23 -0
- package/locale/utils/buildFormatNumber.mjs +17 -0
- package/locale/viVN.js +4 -1
- package/locale/viVN.mjs +3 -1
- package/locale/zhCN.js +4 -1
- package/locale/zhCN.mjs +3 -1
- package/locale/zhHK.js +4 -1
- package/locale/zhHK.mjs +3 -1
- package/locale/zhTW.js +4 -1
- package/locale/zhTW.mjs +3 -1
- package/package.json +6 -20
- package/styles/components.d.mts +0 -5
- package/styles/components.d.ts +0 -5
- package/styles/overrides.d.mts +0 -2
- package/styles/overrides.d.ts +0 -2
- package/styles/props.d.mts +0 -2
- package/styles/props.d.ts +0 -2
- package/useAutocomplete/useAutocomplete.d.mts +0 -12
- package/useAutocomplete/useAutocomplete.d.ts +0 -12
- package/useAutocomplete/useAutocomplete.js +29 -28
- package/useAutocomplete/useAutocomplete.mjs +29 -28
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- package/GridLegacy/GridLegacy.d.mts +0 -160
- package/GridLegacy/GridLegacy.d.ts +0 -160
- package/GridLegacy/GridLegacy.js +0 -601
- package/GridLegacy/GridLegacy.mjs +0 -588
- package/GridLegacy/GridLegacyContext.js +0 -17
- package/GridLegacy/GridLegacyContext.mjs +0 -12
- package/GridLegacy/gridLegacyClasses.d.mts +0 -48
- package/GridLegacy/gridLegacyClasses.d.ts +0 -48
- package/GridLegacy/gridLegacyClasses.js +0 -27
- package/GridLegacy/gridLegacyClasses.mjs +0 -19
- package/GridLegacy/index.d.mts +0 -4
- package/GridLegacy/index.d.ts +0 -4
- package/GridLegacy/index.js +0 -35
- package/GridLegacy/index.mjs +0 -3
package/SpeedDial/SpeedDial.js
CHANGED
|
@@ -176,8 +176,6 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
176
176
|
openIcon,
|
|
177
177
|
slots = {},
|
|
178
178
|
slotProps = {},
|
|
179
|
-
TransitionComponent: TransitionComponentProp,
|
|
180
|
-
TransitionProps: TransitionPropsProp,
|
|
181
179
|
transitionDuration = defaultTransitionDuration,
|
|
182
180
|
...other
|
|
183
181
|
} = props;
|
|
@@ -226,15 +224,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
226
224
|
* Is called before the original ref callback for Button that was set in buttonProps
|
|
227
225
|
*
|
|
228
226
|
* @param dialActionIndex {number}
|
|
229
|
-
* @param origButtonRef {React.RefObject?}
|
|
230
227
|
* @param fabSlotOrigButtonRef {React.RefObject?}
|
|
231
228
|
*/
|
|
232
|
-
const createHandleSpeedDialActionButtonRef = (dialActionIndex,
|
|
229
|
+
const createHandleSpeedDialActionButtonRef = (dialActionIndex, fabSlotOrigButtonRef) => {
|
|
233
230
|
return buttonRef => {
|
|
234
231
|
actions.current[dialActionIndex + 1] = buttonRef;
|
|
235
|
-
if (origButtonRef) {
|
|
236
|
-
origButtonRef(buttonRef);
|
|
237
|
-
}
|
|
238
232
|
if (fabSlotOrigButtonRef) {
|
|
239
233
|
fabSlotOrigButtonRef(buttonRef);
|
|
240
234
|
}
|
|
@@ -352,11 +346,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
352
346
|
});
|
|
353
347
|
const children = allItems.map((child, index) => {
|
|
354
348
|
const {
|
|
355
|
-
|
|
356
|
-
ref: origButtonRef
|
|
357
|
-
} = {},
|
|
358
|
-
slotProps: childSlotProps = {},
|
|
359
|
-
tooltipPlacement: tooltipPlacementProp
|
|
349
|
+
slotProps: childSlotProps = {}
|
|
360
350
|
} = child.props;
|
|
361
351
|
const {
|
|
362
352
|
fab: {
|
|
@@ -365,32 +355,30 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
365
355
|
} = {},
|
|
366
356
|
...restOfSlotProps
|
|
367
357
|
} = childSlotProps;
|
|
368
|
-
const
|
|
358
|
+
const defaultPlacement = getOrientation(direction) === 'vertical' ? 'left' : 'top';
|
|
369
359
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
370
360
|
slotProps: {
|
|
361
|
+
...restOfSlotProps,
|
|
371
362
|
fab: {
|
|
372
363
|
...fabSlotProps,
|
|
373
|
-
ref: createHandleSpeedDialActionButtonRef(index,
|
|
364
|
+
ref: createHandleSpeedDialActionButtonRef(index, fabSlotOrigButtonRef)
|
|
374
365
|
},
|
|
375
|
-
|
|
366
|
+
tooltip: typeof restOfSlotProps.tooltip === 'function' ? state => ({
|
|
367
|
+
placement: defaultPlacement,
|
|
368
|
+
...restOfSlotProps.tooltip(state)
|
|
369
|
+
}) : {
|
|
370
|
+
placement: defaultPlacement,
|
|
371
|
+
...restOfSlotProps.tooltip
|
|
372
|
+
}
|
|
376
373
|
},
|
|
377
374
|
delay: 30 * (open ? index : allItems.length - index),
|
|
378
375
|
open,
|
|
379
|
-
tooltipPlacement,
|
|
380
376
|
id: `${id}-action-${index}`
|
|
381
377
|
});
|
|
382
378
|
});
|
|
383
|
-
const backwardCompatibleSlots = {
|
|
384
|
-
transition: TransitionComponentProp,
|
|
385
|
-
...slots
|
|
386
|
-
};
|
|
387
|
-
const backwardCompatibleSlotProps = {
|
|
388
|
-
transition: TransitionPropsProp,
|
|
389
|
-
...slotProps
|
|
390
|
-
};
|
|
391
379
|
const externalForwardedProps = {
|
|
392
|
-
slots
|
|
393
|
-
slotProps
|
|
380
|
+
slots,
|
|
381
|
+
slotProps
|
|
394
382
|
};
|
|
395
383
|
const [RootSlot, rootSlotProps] = (0, _useSlot.default)('root', {
|
|
396
384
|
elementType: SpeedDialRoot,
|
|
@@ -569,13 +557,6 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
569
557
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
570
558
|
*/
|
|
571
559
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
572
|
-
/**
|
|
573
|
-
* The component used for the transition.
|
|
574
|
-
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
575
|
-
* @default Zoom
|
|
576
|
-
* * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
577
|
-
*/
|
|
578
|
-
TransitionComponent: _propTypes.default.elementType,
|
|
579
560
|
/**
|
|
580
561
|
* The duration for the transition, in milliseconds.
|
|
581
562
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
@@ -588,12 +569,6 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
588
569
|
appear: _propTypes.default.number,
|
|
589
570
|
enter: _propTypes.default.number,
|
|
590
571
|
exit: _propTypes.default.number
|
|
591
|
-
})])
|
|
592
|
-
/**
|
|
593
|
-
* Props applied to the transition element.
|
|
594
|
-
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
595
|
-
* @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
596
|
-
*/
|
|
597
|
-
TransitionProps: _propTypes.default.object
|
|
572
|
+
})])
|
|
598
573
|
} : void 0;
|
|
599
574
|
var _default = exports.default = SpeedDial;
|
package/SpeedDial/SpeedDial.mjs
CHANGED
|
@@ -169,8 +169,6 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
169
169
|
openIcon,
|
|
170
170
|
slots = {},
|
|
171
171
|
slotProps = {},
|
|
172
|
-
TransitionComponent: TransitionComponentProp,
|
|
173
|
-
TransitionProps: TransitionPropsProp,
|
|
174
172
|
transitionDuration = defaultTransitionDuration,
|
|
175
173
|
...other
|
|
176
174
|
} = props;
|
|
@@ -219,15 +217,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
219
217
|
* Is called before the original ref callback for Button that was set in buttonProps
|
|
220
218
|
*
|
|
221
219
|
* @param dialActionIndex {number}
|
|
222
|
-
* @param origButtonRef {React.RefObject?}
|
|
223
220
|
* @param fabSlotOrigButtonRef {React.RefObject?}
|
|
224
221
|
*/
|
|
225
|
-
const createHandleSpeedDialActionButtonRef = (dialActionIndex,
|
|
222
|
+
const createHandleSpeedDialActionButtonRef = (dialActionIndex, fabSlotOrigButtonRef) => {
|
|
226
223
|
return buttonRef => {
|
|
227
224
|
actions.current[dialActionIndex + 1] = buttonRef;
|
|
228
|
-
if (origButtonRef) {
|
|
229
|
-
origButtonRef(buttonRef);
|
|
230
|
-
}
|
|
231
225
|
if (fabSlotOrigButtonRef) {
|
|
232
226
|
fabSlotOrigButtonRef(buttonRef);
|
|
233
227
|
}
|
|
@@ -345,11 +339,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
345
339
|
});
|
|
346
340
|
const children = allItems.map((child, index) => {
|
|
347
341
|
const {
|
|
348
|
-
|
|
349
|
-
ref: origButtonRef
|
|
350
|
-
} = {},
|
|
351
|
-
slotProps: childSlotProps = {},
|
|
352
|
-
tooltipPlacement: tooltipPlacementProp
|
|
342
|
+
slotProps: childSlotProps = {}
|
|
353
343
|
} = child.props;
|
|
354
344
|
const {
|
|
355
345
|
fab: {
|
|
@@ -358,32 +348,30 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
358
348
|
} = {},
|
|
359
349
|
...restOfSlotProps
|
|
360
350
|
} = childSlotProps;
|
|
361
|
-
const
|
|
351
|
+
const defaultPlacement = getOrientation(direction) === 'vertical' ? 'left' : 'top';
|
|
362
352
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
363
353
|
slotProps: {
|
|
354
|
+
...restOfSlotProps,
|
|
364
355
|
fab: {
|
|
365
356
|
...fabSlotProps,
|
|
366
|
-
ref: createHandleSpeedDialActionButtonRef(index,
|
|
357
|
+
ref: createHandleSpeedDialActionButtonRef(index, fabSlotOrigButtonRef)
|
|
367
358
|
},
|
|
368
|
-
|
|
359
|
+
tooltip: typeof restOfSlotProps.tooltip === 'function' ? state => ({
|
|
360
|
+
placement: defaultPlacement,
|
|
361
|
+
...restOfSlotProps.tooltip(state)
|
|
362
|
+
}) : {
|
|
363
|
+
placement: defaultPlacement,
|
|
364
|
+
...restOfSlotProps.tooltip
|
|
365
|
+
}
|
|
369
366
|
},
|
|
370
367
|
delay: 30 * (open ? index : allItems.length - index),
|
|
371
368
|
open,
|
|
372
|
-
tooltipPlacement,
|
|
373
369
|
id: `${id}-action-${index}`
|
|
374
370
|
});
|
|
375
371
|
});
|
|
376
|
-
const backwardCompatibleSlots = {
|
|
377
|
-
transition: TransitionComponentProp,
|
|
378
|
-
...slots
|
|
379
|
-
};
|
|
380
|
-
const backwardCompatibleSlotProps = {
|
|
381
|
-
transition: TransitionPropsProp,
|
|
382
|
-
...slotProps
|
|
383
|
-
};
|
|
384
372
|
const externalForwardedProps = {
|
|
385
|
-
slots
|
|
386
|
-
slotProps
|
|
373
|
+
slots,
|
|
374
|
+
slotProps
|
|
387
375
|
};
|
|
388
376
|
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
389
377
|
elementType: SpeedDialRoot,
|
|
@@ -562,13 +550,6 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
562
550
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
563
551
|
*/
|
|
564
552
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
565
|
-
/**
|
|
566
|
-
* The component used for the transition.
|
|
567
|
-
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
568
|
-
* @default Zoom
|
|
569
|
-
* * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
570
|
-
*/
|
|
571
|
-
TransitionComponent: PropTypes.elementType,
|
|
572
553
|
/**
|
|
573
554
|
* The duration for the transition, in milliseconds.
|
|
574
555
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
@@ -581,12 +562,6 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
581
562
|
appear: PropTypes.number,
|
|
582
563
|
enter: PropTypes.number,
|
|
583
564
|
exit: PropTypes.number
|
|
584
|
-
})])
|
|
585
|
-
/**
|
|
586
|
-
* Props applied to the transition element.
|
|
587
|
-
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
588
|
-
* @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
589
|
-
*/
|
|
590
|
-
TransitionProps: PropTypes.object
|
|
565
|
+
})])
|
|
591
566
|
} : void 0;
|
|
592
567
|
export default SpeedDial;
|
|
@@ -59,12 +59,6 @@ export interface SpeedDialActionProps extends Omit<StandardProps<Partial<Tooltip
|
|
|
59
59
|
* Override or extend the styles applied to the component.
|
|
60
60
|
*/
|
|
61
61
|
classes?: Partial<SpeedDialActionClasses> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) component.
|
|
64
|
-
* @default {}
|
|
65
|
-
* @deprecated Use `slotProps.fab` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
66
|
-
*/
|
|
67
|
-
FabProps?: Partial<FabProps> | undefined;
|
|
68
62
|
/**
|
|
69
63
|
* Adds a transition delay, to allow a series of SpeedDialActions to be animated.
|
|
70
64
|
* @default 0
|
|
@@ -78,28 +72,6 @@ export interface SpeedDialActionProps extends Omit<StandardProps<Partial<Tooltip
|
|
|
78
72
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
79
73
|
*/
|
|
80
74
|
sx?: SxProps<Theme> | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* `classes` prop applied to the [`Tooltip`](https://mui.com/material-ui/api/tooltip/) element.
|
|
83
|
-
* @deprecated Use `slotProps.tooltip.classes` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
84
|
-
*/
|
|
85
|
-
TooltipClasses?: TooltipProps['classes'] | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Placement of the tooltip.
|
|
88
|
-
* @default 'left'
|
|
89
|
-
* @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
90
|
-
*/
|
|
91
|
-
tooltipPlacement?: TooltipProps['placement'] | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Label to display in the tooltip.
|
|
94
|
-
* @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
95
|
-
*/
|
|
96
|
-
tooltipTitle?: React.ReactNode;
|
|
97
|
-
/**
|
|
98
|
-
* Make the tooltip always visible when the SpeedDial is open.
|
|
99
|
-
* @default false
|
|
100
|
-
* @deprecated Use `slotProps.tooltip.open` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
101
|
-
*/
|
|
102
|
-
tooltipOpen?: boolean | undefined;
|
|
103
75
|
}
|
|
104
76
|
|
|
105
77
|
/**
|
|
@@ -59,12 +59,6 @@ export interface SpeedDialActionProps extends Omit<StandardProps<Partial<Tooltip
|
|
|
59
59
|
* Override or extend the styles applied to the component.
|
|
60
60
|
*/
|
|
61
61
|
classes?: Partial<SpeedDialActionClasses> | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) component.
|
|
64
|
-
* @default {}
|
|
65
|
-
* @deprecated Use `slotProps.fab` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
66
|
-
*/
|
|
67
|
-
FabProps?: Partial<FabProps> | undefined;
|
|
68
62
|
/**
|
|
69
63
|
* Adds a transition delay, to allow a series of SpeedDialActions to be animated.
|
|
70
64
|
* @default 0
|
|
@@ -78,28 +72,6 @@ export interface SpeedDialActionProps extends Omit<StandardProps<Partial<Tooltip
|
|
|
78
72
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
79
73
|
*/
|
|
80
74
|
sx?: SxProps<Theme> | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* `classes` prop applied to the [`Tooltip`](https://mui.com/material-ui/api/tooltip/) element.
|
|
83
|
-
* @deprecated Use `slotProps.tooltip.classes` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
84
|
-
*/
|
|
85
|
-
TooltipClasses?: TooltipProps['classes'] | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Placement of the tooltip.
|
|
88
|
-
* @default 'left'
|
|
89
|
-
* @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
90
|
-
*/
|
|
91
|
-
tooltipPlacement?: TooltipProps['placement'] | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* Label to display in the tooltip.
|
|
94
|
-
* @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
95
|
-
*/
|
|
96
|
-
tooltipTitle?: React.ReactNode;
|
|
97
|
-
/**
|
|
98
|
-
* Make the tooltip always visible when the SpeedDial is open.
|
|
99
|
-
* @default false
|
|
100
|
-
* @deprecated Use `slotProps.tooltip.open` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
101
|
-
*/
|
|
102
|
-
tooltipOpen?: boolean | undefined;
|
|
103
75
|
}
|
|
104
76
|
|
|
105
77
|
/**
|
|
@@ -21,7 +21,6 @@ var _Tooltip = _interopRequireDefault(require("../Tooltip"));
|
|
|
21
21
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
22
22
|
var _speedDialActionClasses = _interopRequireWildcard(require("./speedDialActionClasses"));
|
|
23
23
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
24
|
-
var _utils = require("../utils");
|
|
25
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
25
|
const useUtilityClasses = ownerState => {
|
|
27
26
|
const {
|
|
@@ -147,18 +146,15 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
147
146
|
const {
|
|
148
147
|
className,
|
|
149
148
|
delay = 0,
|
|
150
|
-
FabProps = {},
|
|
151
149
|
icon,
|
|
152
150
|
id,
|
|
153
151
|
open,
|
|
154
|
-
TooltipClasses,
|
|
155
|
-
tooltipOpen: tooltipOpenProp = false,
|
|
156
|
-
tooltipPlacement = 'left',
|
|
157
|
-
tooltipTitle,
|
|
158
152
|
slots = {},
|
|
159
153
|
slotProps = {},
|
|
160
154
|
...other
|
|
161
155
|
} = props;
|
|
156
|
+
const resolvedTooltipSlotProps = typeof slotProps.tooltip === 'function' ? slotProps.tooltip(props) : slotProps.tooltip ?? {};
|
|
157
|
+
const tooltipPlacement = resolvedTooltipSlotProps.placement ?? 'left';
|
|
162
158
|
const ownerState = {
|
|
163
159
|
...props,
|
|
164
160
|
tooltipPlacement
|
|
@@ -166,18 +162,9 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
166
162
|
const classes = useUtilityClasses(ownerState);
|
|
167
163
|
const externalForwardedProps = {
|
|
168
164
|
slots,
|
|
169
|
-
slotProps
|
|
170
|
-
fab: FabProps,
|
|
171
|
-
...slotProps,
|
|
172
|
-
tooltip: (0, _utils.mergeSlotProps)(typeof slotProps.tooltip === 'function' ? slotProps.tooltip(ownerState) : slotProps.tooltip, {
|
|
173
|
-
title: tooltipTitle,
|
|
174
|
-
open: tooltipOpenProp,
|
|
175
|
-
placement: tooltipPlacement,
|
|
176
|
-
classes: TooltipClasses
|
|
177
|
-
})
|
|
178
|
-
}
|
|
165
|
+
slotProps
|
|
179
166
|
};
|
|
180
|
-
const [tooltipOpen, setTooltipOpen] = React.useState(
|
|
167
|
+
const [tooltipOpen, setTooltipOpen] = React.useState(resolvedTooltipSlotProps.open ?? false);
|
|
181
168
|
const handleTooltipClose = () => {
|
|
182
169
|
setTooltipOpen(false);
|
|
183
170
|
};
|
|
@@ -288,12 +275,6 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
|
|
|
288
275
|
* @default 0
|
|
289
276
|
*/
|
|
290
277
|
delay: _propTypes.default.number,
|
|
291
|
-
/**
|
|
292
|
-
* Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) component.
|
|
293
|
-
* @default {}
|
|
294
|
-
* @deprecated Use `slotProps.fab` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
295
|
-
*/
|
|
296
|
-
FabProps: _propTypes.default.object,
|
|
297
278
|
/**
|
|
298
279
|
* The icon to display in the SpeedDial Fab.
|
|
299
280
|
*/
|
|
@@ -330,28 +311,6 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
|
|
|
330
311
|
/**
|
|
331
312
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
332
313
|
*/
|
|
333
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
334
|
-
/**
|
|
335
|
-
* `classes` prop applied to the [`Tooltip`](https://mui.com/material-ui/api/tooltip/) element.
|
|
336
|
-
* @deprecated Use `slotProps.tooltip.classes` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
337
|
-
*/
|
|
338
|
-
TooltipClasses: _propTypes.default.object,
|
|
339
|
-
/**
|
|
340
|
-
* Make the tooltip always visible when the SpeedDial is open.
|
|
341
|
-
* @default false
|
|
342
|
-
* @deprecated Use `slotProps.tooltip.open` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
343
|
-
*/
|
|
344
|
-
tooltipOpen: _propTypes.default.bool,
|
|
345
|
-
/**
|
|
346
|
-
* Placement of the tooltip.
|
|
347
|
-
* @default 'left'
|
|
348
|
-
* @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
349
|
-
*/
|
|
350
|
-
tooltipPlacement: _propTypes.default.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
351
|
-
/**
|
|
352
|
-
* Label to display in the tooltip.
|
|
353
|
-
* @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
354
|
-
*/
|
|
355
|
-
tooltipTitle: _propTypes.default.node
|
|
314
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
356
315
|
} : void 0;
|
|
357
316
|
var _default = exports.default = SpeedDialAction;
|
|
@@ -14,7 +14,6 @@ import Tooltip from "../Tooltip/index.mjs";
|
|
|
14
14
|
import capitalize from "../utils/capitalize.mjs";
|
|
15
15
|
import speedDialActionClasses, { getSpeedDialActionUtilityClass } from "./speedDialActionClasses.mjs";
|
|
16
16
|
import useSlot from "../utils/useSlot.mjs";
|
|
17
|
-
import { mergeSlotProps } from "../utils/index.mjs";
|
|
18
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
18
|
const useUtilityClasses = ownerState => {
|
|
20
19
|
const {
|
|
@@ -140,18 +139,15 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
140
139
|
const {
|
|
141
140
|
className,
|
|
142
141
|
delay = 0,
|
|
143
|
-
FabProps = {},
|
|
144
142
|
icon,
|
|
145
143
|
id,
|
|
146
144
|
open,
|
|
147
|
-
TooltipClasses,
|
|
148
|
-
tooltipOpen: tooltipOpenProp = false,
|
|
149
|
-
tooltipPlacement = 'left',
|
|
150
|
-
tooltipTitle,
|
|
151
145
|
slots = {},
|
|
152
146
|
slotProps = {},
|
|
153
147
|
...other
|
|
154
148
|
} = props;
|
|
149
|
+
const resolvedTooltipSlotProps = typeof slotProps.tooltip === 'function' ? slotProps.tooltip(props) : slotProps.tooltip ?? {};
|
|
150
|
+
const tooltipPlacement = resolvedTooltipSlotProps.placement ?? 'left';
|
|
155
151
|
const ownerState = {
|
|
156
152
|
...props,
|
|
157
153
|
tooltipPlacement
|
|
@@ -159,18 +155,9 @@ const SpeedDialAction = /*#__PURE__*/React.forwardRef(function SpeedDialAction(i
|
|
|
159
155
|
const classes = useUtilityClasses(ownerState);
|
|
160
156
|
const externalForwardedProps = {
|
|
161
157
|
slots,
|
|
162
|
-
slotProps
|
|
163
|
-
fab: FabProps,
|
|
164
|
-
...slotProps,
|
|
165
|
-
tooltip: mergeSlotProps(typeof slotProps.tooltip === 'function' ? slotProps.tooltip(ownerState) : slotProps.tooltip, {
|
|
166
|
-
title: tooltipTitle,
|
|
167
|
-
open: tooltipOpenProp,
|
|
168
|
-
placement: tooltipPlacement,
|
|
169
|
-
classes: TooltipClasses
|
|
170
|
-
})
|
|
171
|
-
}
|
|
158
|
+
slotProps
|
|
172
159
|
};
|
|
173
|
-
const [tooltipOpen, setTooltipOpen] = React.useState(
|
|
160
|
+
const [tooltipOpen, setTooltipOpen] = React.useState(resolvedTooltipSlotProps.open ?? false);
|
|
174
161
|
const handleTooltipClose = () => {
|
|
175
162
|
setTooltipOpen(false);
|
|
176
163
|
};
|
|
@@ -281,12 +268,6 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
|
|
|
281
268
|
* @default 0
|
|
282
269
|
*/
|
|
283
270
|
delay: PropTypes.number,
|
|
284
|
-
/**
|
|
285
|
-
* Props applied to the [`Fab`](https://mui.com/material-ui/api/fab/) component.
|
|
286
|
-
* @default {}
|
|
287
|
-
* @deprecated Use `slotProps.fab` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
288
|
-
*/
|
|
289
|
-
FabProps: PropTypes.object,
|
|
290
271
|
/**
|
|
291
272
|
* The icon to display in the SpeedDial Fab.
|
|
292
273
|
*/
|
|
@@ -323,28 +304,6 @@ process.env.NODE_ENV !== "production" ? SpeedDialAction.propTypes /* remove-prop
|
|
|
323
304
|
/**
|
|
324
305
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
325
306
|
*/
|
|
326
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
327
|
-
/**
|
|
328
|
-
* `classes` prop applied to the [`Tooltip`](https://mui.com/material-ui/api/tooltip/) element.
|
|
329
|
-
* @deprecated Use `slotProps.tooltip.classes` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
330
|
-
*/
|
|
331
|
-
TooltipClasses: PropTypes.object,
|
|
332
|
-
/**
|
|
333
|
-
* Make the tooltip always visible when the SpeedDial is open.
|
|
334
|
-
* @default false
|
|
335
|
-
* @deprecated Use `slotProps.tooltip.open` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
336
|
-
*/
|
|
337
|
-
tooltipOpen: PropTypes.bool,
|
|
338
|
-
/**
|
|
339
|
-
* Placement of the tooltip.
|
|
340
|
-
* @default 'left'
|
|
341
|
-
* @deprecated Use `slotProps.tooltip.placement` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
342
|
-
*/
|
|
343
|
-
tooltipPlacement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
344
|
-
/**
|
|
345
|
-
* Label to display in the tooltip.
|
|
346
|
-
* @deprecated Use `slotProps.tooltip.title` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
347
|
-
*/
|
|
348
|
-
tooltipTitle: PropTypes.node
|
|
307
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
349
308
|
} : void 0;
|
|
350
309
|
export default SpeedDialAction;
|
|
@@ -162,7 +162,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
162
162
|
*
|
|
163
163
|
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
164
164
|
* @default function defaultLabelDisplayedRows({ from, to, count }) {
|
|
165
|
-
* return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
165
|
+
* return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
166
166
|
* }
|
|
167
167
|
*/
|
|
168
168
|
labelDisplayedRows?: ((paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
|
|
@@ -162,7 +162,7 @@ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
|
|
|
162
162
|
*
|
|
163
163
|
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
164
164
|
* @default function defaultLabelDisplayedRows({ from, to, count }) {
|
|
165
|
-
* return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
165
|
+
* return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
166
166
|
* }
|
|
167
167
|
*/
|
|
168
168
|
labelDisplayedRows?: ((paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
|
|
@@ -26,8 +26,10 @@ var _TablePaginationActions = _interopRequireDefault(require("../TablePagination
|
|
|
26
26
|
var _useId = _interopRequireDefault(require("../utils/useId"));
|
|
27
27
|
var _tablePaginationClasses = _interopRequireWildcard(require("./tablePaginationClasses"));
|
|
28
28
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
29
|
+
var _buildFormatNumber = _interopRequireDefault(require("../locale/utils/buildFormatNumber"));
|
|
29
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
31
|
var _InputBase;
|
|
32
|
+
const formatNumber = (0, _buildFormatNumber.default)('en-US');
|
|
31
33
|
const TablePaginationRoot = (0, _zeroStyled.styled)(_TableCell.default, {
|
|
32
34
|
name: 'MuiTablePagination',
|
|
33
35
|
slot: 'Root'
|
|
@@ -121,7 +123,7 @@ function defaultLabelDisplayedRows({
|
|
|
121
123
|
to,
|
|
122
124
|
count
|
|
123
125
|
}) {
|
|
124
|
-
return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
126
|
+
return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
125
127
|
}
|
|
126
128
|
function defaultGetAriaLabel(type) {
|
|
127
129
|
return `Go to ${type} page`;
|
|
@@ -369,7 +371,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
369
371
|
*
|
|
370
372
|
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
371
373
|
* @default function defaultLabelDisplayedRows({ from, to, count }) {
|
|
372
|
-
* return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
374
|
+
* return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
373
375
|
* }
|
|
374
376
|
*/
|
|
375
377
|
labelDisplayedRows: _propTypes.default.func,
|
|
@@ -19,8 +19,10 @@ import TablePaginationActions from "../TablePaginationActions/index.mjs";
|
|
|
19
19
|
import useId from "../utils/useId.mjs";
|
|
20
20
|
import tablePaginationClasses, { getTablePaginationUtilityClass } from "./tablePaginationClasses.mjs";
|
|
21
21
|
import useSlot from "../utils/useSlot.mjs";
|
|
22
|
+
import buildFormatNumber from "../locale/utils/buildFormatNumber.mjs";
|
|
22
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
import { createElement as _createElement } from "react";
|
|
25
|
+
const formatNumber = buildFormatNumber('en-US');
|
|
24
26
|
const TablePaginationRoot = styled(TableCell, {
|
|
25
27
|
name: 'MuiTablePagination',
|
|
26
28
|
slot: 'Root'
|
|
@@ -114,7 +116,7 @@ function defaultLabelDisplayedRows({
|
|
|
114
116
|
to,
|
|
115
117
|
count
|
|
116
118
|
}) {
|
|
117
|
-
return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
119
|
+
return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
118
120
|
}
|
|
119
121
|
function defaultGetAriaLabel(type) {
|
|
120
122
|
return `Go to ${type} page`;
|
|
@@ -362,7 +364,7 @@ process.env.NODE_ENV !== "production" ? TablePagination.propTypes /* remove-prop
|
|
|
362
364
|
*
|
|
363
365
|
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
364
366
|
* @default function defaultLabelDisplayedRows({ from, to, count }) {
|
|
365
|
-
* return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
367
|
+
* return `${formatNumber(from)}–${formatNumber(to)} of ${count !== -1 ? formatNumber(count) : `more than ${formatNumber(to)}`}`;
|
|
366
368
|
* }
|
|
367
369
|
*/
|
|
368
370
|
labelDisplayedRows: PropTypes.func,
|
package/Tabs/Tabs.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { SxProps } from '@mui/system';
|
|
|
3
3
|
import { OverridableStringUnion } from '@mui/types';
|
|
4
4
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
5
5
|
import { Theme } from "../styles/index.mjs";
|
|
6
|
-
import TabScrollButton
|
|
6
|
+
import TabScrollButton from "../TabScrollButton/index.mjs";
|
|
7
7
|
import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.mjs";
|
|
8
8
|
import { TabsClasses } from "./tabsClasses.mjs";
|
|
9
9
|
import SvgIcon from "../SvgIcon/index.mjs";
|
|
@@ -102,18 +102,7 @@ export type TabsSlotsAndSlotProps = CreateSlotsAndSlotProps<TabsSlots, {
|
|
|
102
102
|
* By default, the available props are based on the [SvgIcon](https://mui.com/material-ui/api/svg-icon/#props) component.
|
|
103
103
|
*/
|
|
104
104
|
endScrollButtonIcon: SlotProps<typeof SvgIcon, TabsEndScrollButtonIconSlotPropsOverrides, TabsOwnerState>;
|
|
105
|
-
}
|
|
106
|
-
slots?: {
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated Use `slots.startScrollButtonIcon` instead.
|
|
109
|
-
*/
|
|
110
|
-
StartScrollButtonIcon?: React.ElementType | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* @deprecated Use `slots.endScrollButtonIcon` instead.
|
|
113
|
-
*/
|
|
114
|
-
EndScrollButtonIcon?: React.ElementType | undefined;
|
|
115
|
-
} | undefined;
|
|
116
|
-
};
|
|
105
|
+
}>;
|
|
117
106
|
export interface TabsOwnerState extends Omit<TabsProps, 'slots' | 'slotProps'> {
|
|
118
107
|
vertical: boolean;
|
|
119
108
|
fixed: boolean;
|
|
@@ -178,12 +167,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
|
|
|
178
167
|
* @default 'horizontal'
|
|
179
168
|
*/
|
|
180
169
|
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
181
|
-
/**
|
|
182
|
-
* The component used to render the scroll buttons.
|
|
183
|
-
* @deprecated use the `slots.scrollButtons` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
184
|
-
* @default TabScrollButton
|
|
185
|
-
*/
|
|
186
|
-
ScrollButtonComponent?: React.ElementType | undefined;
|
|
187
170
|
/**
|
|
188
171
|
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
189
172
|
*
|
|
@@ -201,20 +184,6 @@ export interface TabsOwnProps extends TabsSlotsAndSlotProps {
|
|
|
201
184
|
* changes on activation.
|
|
202
185
|
*/
|
|
203
186
|
selectionFollowsFocus?: boolean | undefined;
|
|
204
|
-
/**
|
|
205
|
-
* Props applied to the tab indicator element.
|
|
206
|
-
* @deprecated use the `slotProps.indicator` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
207
|
-
* @default {}
|
|
208
|
-
*/
|
|
209
|
-
TabIndicatorProps?: (React.HTMLAttributes<HTMLDivElement> & {
|
|
210
|
-
sx?: SxProps<Theme> | undefined;
|
|
211
|
-
}) | undefined;
|
|
212
|
-
/**
|
|
213
|
-
* Props applied to the [`TabScrollButton`](https://mui.com/material-ui/api/tab-scroll-button/) element.
|
|
214
|
-
* @deprecated use the `slotProps.scrollButtons` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
215
|
-
* @default {}
|
|
216
|
-
*/
|
|
217
|
-
TabScrollButtonProps?: Partial<TabScrollButtonProps> | undefined;
|
|
218
187
|
/**
|
|
219
188
|
* Determines the color of the `Tab`.
|
|
220
189
|
* @default 'primary'
|