@mui/material 5.11.5 → 5.11.6
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/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Box/Box.d.ts +3 -2
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +0 -2
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +74 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +37 -37
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/Slider.d.ts +215 -35
- package/Slider/Slider.js +7 -7
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.js +3 -0
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/index.d.ts +2 -0
- package/Slider/index.js +2 -1
- package/Slider/sliderClasses.d.ts +58 -29
- package/Slider/sliderClasses.js +5 -3
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/SwipeableDrawer/SwipeableDrawer.d.ts +15 -0
- package/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Button/Button.js +0 -2
- package/legacy/Slider/Slider.js +7 -7
- package/legacy/Slider/SliderValueLabel.js +3 -0
- package/legacy/Slider/index.js +2 -1
- package/legacy/Slider/sliderClasses.js +5 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +50 -17
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +75 -75
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Button/Button.js +0 -2
- package/modern/Slider/Slider.js +7 -7
- package/modern/Slider/SliderValueLabel.js +3 -0
- package/modern/Slider/index.js +2 -1
- package/modern/Slider/sliderClasses.js +5 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +47 -17
- package/modern/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Button/Button.js +0 -2
- package/node/Slider/Slider.js +6 -6
- package/node/Slider/SliderValueLabel.js +3 -0
- package/node/Slider/index.js +12 -2
- package/node/Slider/sliderClasses.js +6 -3
- package/node/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/node/index.js +1 -1
- package/package.json +3 -3
- package/styles/CssVarsProvider.d.ts +16 -16
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +63 -33
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -134,6 +134,8 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
134
134
|
hideBackdrop = props.hideBackdrop,
|
|
135
135
|
_props$hysteresis = props.hysteresis,
|
|
136
136
|
hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,
|
|
137
|
+
_props$allowSwipeInCh = props.allowSwipeInChildren,
|
|
138
|
+
allowSwipeInChildren = _props$allowSwipeInCh === void 0 ? false : _props$allowSwipeInCh,
|
|
137
139
|
_props$minFlingVeloci = props.minFlingVelocity,
|
|
138
140
|
minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,
|
|
139
141
|
_props$ModalProps = props.ModalProps;
|
|
@@ -153,7 +155,7 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
153
155
|
transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,
|
|
154
156
|
_props$variant = props.variant,
|
|
155
157
|
variant = _props$variant === void 0 ? 'temporary' : _props$variant,
|
|
156
|
-
other = _objectWithoutProperties(props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]);
|
|
158
|
+
other = _objectWithoutProperties(props, ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"]);
|
|
157
159
|
var _React$useState = React.useState(false),
|
|
158
160
|
maybeSwiping = _React$useState[0],
|
|
159
161
|
setMaybeSwiping = _React$useState[1];
|
|
@@ -261,6 +263,31 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
261
263
|
});
|
|
262
264
|
}
|
|
263
265
|
});
|
|
266
|
+
var startMaybeSwiping = function startMaybeSwiping() {
|
|
267
|
+
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
268
|
+
if (!maybeSwiping) {
|
|
269
|
+
// on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.
|
|
270
|
+
// this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.
|
|
271
|
+
// so do this change on first touchmove instead of touchstart
|
|
272
|
+
if (force || !(disableDiscovery && allowSwipeInChildren)) {
|
|
273
|
+
flushSync(function () {
|
|
274
|
+
setMaybeSwiping(true);
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
var horizontalSwipe = isHorizontal(anchor);
|
|
278
|
+
if (!open && paperRef.current) {
|
|
279
|
+
// The ref may be null when a parent component updates while swiping.
|
|
280
|
+
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
281
|
+
changeTransition: false
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
swipeInstance.current.velocity = 0;
|
|
285
|
+
swipeInstance.current.lastTime = null;
|
|
286
|
+
swipeInstance.current.lastTranslate = null;
|
|
287
|
+
swipeInstance.current.paperHit = false;
|
|
288
|
+
touchDetected.current = true;
|
|
289
|
+
}
|
|
290
|
+
};
|
|
264
291
|
var handleBodyTouchMove = useEventCallback(function (nativeEvent) {
|
|
265
292
|
// the ref may be null when a parent component updates while swiping
|
|
266
293
|
if (!paperRef.current || !touchDetected.current) {
|
|
@@ -271,6 +298,7 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
271
298
|
if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {
|
|
272
299
|
return;
|
|
273
300
|
}
|
|
301
|
+
startMaybeSwiping(true);
|
|
274
302
|
var anchorRtl = getAnchor(theme, anchor);
|
|
275
303
|
var horizontalSwipe = isHorizontal(anchor);
|
|
276
304
|
var currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
@@ -381,7 +409,12 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
381
409
|
var currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
382
410
|
var currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));
|
|
383
411
|
if (!open) {
|
|
384
|
-
|
|
412
|
+
var _paperRef$current;
|
|
413
|
+
// logic for if swipe should be ignored:
|
|
414
|
+
// if disableSwipeToOpen
|
|
415
|
+
// if target != swipeArea, and target is not a child of paper ref
|
|
416
|
+
// if is a child of paper ref, and `allowSwipeInChildren` does not allow it
|
|
417
|
+
if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {
|
|
385
418
|
return;
|
|
386
419
|
}
|
|
387
420
|
if (horizontalSwipe) {
|
|
@@ -396,20 +429,7 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
396
429
|
claimedSwipeInstance = null;
|
|
397
430
|
swipeInstance.current.startX = currentX;
|
|
398
431
|
swipeInstance.current.startY = currentY;
|
|
399
|
-
|
|
400
|
-
setMaybeSwiping(true);
|
|
401
|
-
});
|
|
402
|
-
if (!open && paperRef.current) {
|
|
403
|
-
// The ref may be null when a parent component updates while swiping.
|
|
404
|
-
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
405
|
-
changeTransition: false
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
swipeInstance.current.velocity = 0;
|
|
409
|
-
swipeInstance.current.lastTime = null;
|
|
410
|
-
swipeInstance.current.lastTranslate = null;
|
|
411
|
-
swipeInstance.current.paperHit = false;
|
|
412
|
-
touchDetected.current = true;
|
|
432
|
+
startMaybeSwiping();
|
|
413
433
|
});
|
|
414
434
|
React.useEffect(function () {
|
|
415
435
|
if (variant === 'temporary') {
|
|
@@ -459,7 +479,7 @@ var SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inP
|
|
|
459
479
|
hideBackdrop: hideBackdrop,
|
|
460
480
|
PaperProps: _extends({}, PaperProps, {
|
|
461
481
|
style: _extends({
|
|
462
|
-
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
|
|
482
|
+
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
463
483
|
}, PaperProps.style),
|
|
464
484
|
ref: handleRef
|
|
465
485
|
}),
|
|
@@ -481,6 +501,19 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
481
501
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
482
502
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
483
503
|
// ----------------------------------------------------------------------
|
|
504
|
+
/**
|
|
505
|
+
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
|
|
506
|
+
* This can be useful in scenarios where the drawer is partially visible.
|
|
507
|
+
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
|
|
508
|
+
* (for example, to ignore other elements that handle touch move events, like sliders).
|
|
509
|
+
*
|
|
510
|
+
* @param {TouchEvent} event The 'touchstart' event
|
|
511
|
+
* @param {HTMLDivElement} swipeArea The swipe area element
|
|
512
|
+
* @param {HTMLDivElement} paper The drawer's paper element
|
|
513
|
+
*
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
516
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
484
517
|
/**
|
|
485
518
|
* @ignore
|
|
486
519
|
*/
|
package/legacy/index.js
CHANGED
package/locale/index.d.ts
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
-
export interface Localization {
|
|
3
|
-
components?: {
|
|
4
|
-
MuiAlert?: {
|
|
5
|
-
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
-
};
|
|
7
|
-
MuiBreadcrumbs?: {
|
|
8
|
-
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
-
};
|
|
10
|
-
MuiTablePagination?: {
|
|
11
|
-
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
-
};
|
|
13
|
-
MuiRating?: {
|
|
14
|
-
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
-
};
|
|
16
|
-
MuiAutocomplete?: {
|
|
17
|
-
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
-
};
|
|
19
|
-
MuiPagination?: {
|
|
20
|
-
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const amET: Localization;
|
|
25
|
-
export declare const arEG: Localization;
|
|
26
|
-
export declare const arSA: Localization;
|
|
27
|
-
export declare const arSD: Localization;
|
|
28
|
-
export declare const azAZ: Localization;
|
|
29
|
-
export declare const bnBD: Localization;
|
|
30
|
-
export declare const beBY: Localization;
|
|
31
|
-
export declare const bgBG: Localization;
|
|
32
|
-
export declare const caES: Localization;
|
|
33
|
-
export declare const csCZ: Localization;
|
|
34
|
-
export declare const daDK: Localization;
|
|
35
|
-
export declare const deDE: Localization;
|
|
36
|
-
export declare const elGR: Localization;
|
|
37
|
-
export declare const enUS: Localization;
|
|
38
|
-
export declare const esES: Localization;
|
|
39
|
-
export declare const etEE: Localization;
|
|
40
|
-
export declare const faIR: Localization;
|
|
41
|
-
export declare const fiFI: Localization;
|
|
42
|
-
export declare const frFR: Localization;
|
|
43
|
-
export declare const heIL: Localization;
|
|
44
|
-
export declare const hiIN: Localization;
|
|
45
|
-
export declare const hrHR: Localization;
|
|
46
|
-
export declare const huHU: Localization;
|
|
47
|
-
export declare const hyAM: Localization;
|
|
48
|
-
export declare const idID: Localization;
|
|
49
|
-
export declare const isIS: Localization;
|
|
50
|
-
export declare const itIT: Localization;
|
|
51
|
-
export declare const jaJP: Localization;
|
|
52
|
-
export declare const khKH: Localization;
|
|
53
|
-
export declare const koKR: Localization;
|
|
54
|
-
export declare const kuLatn: Localization;
|
|
55
|
-
export declare const kkKZ: Localization;
|
|
56
|
-
export declare const mkMK: Localization;
|
|
57
|
-
export declare const nbNO: Localization;
|
|
58
|
-
export declare const nlNL: Localization;
|
|
59
|
-
export declare const plPL: Localization;
|
|
60
|
-
export declare const ptBR: Localization;
|
|
61
|
-
export declare const ptPT: Localization;
|
|
62
|
-
export declare const roRO: Localization;
|
|
63
|
-
export declare const srRS: Localization;
|
|
64
|
-
export declare const ruRU: Localization;
|
|
65
|
-
export declare const siLK: Localization;
|
|
66
|
-
export declare const skSK: Localization;
|
|
67
|
-
export declare const svSE: Localization;
|
|
68
|
-
export declare const thTH: Localization;
|
|
69
|
-
export declare const trTR: Localization;
|
|
70
|
-
export declare const ukUA: Localization;
|
|
71
|
-
export declare const urPK: Localization;
|
|
72
|
-
export declare const viVN: Localization;
|
|
73
|
-
export declare const zhCN: Localization;
|
|
74
|
-
export declare const zhHK: Localization;
|
|
75
|
-
export declare const zhTW: Localization;
|
|
1
|
+
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
+
export interface Localization {
|
|
3
|
+
components?: {
|
|
4
|
+
MuiAlert?: {
|
|
5
|
+
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
+
};
|
|
7
|
+
MuiBreadcrumbs?: {
|
|
8
|
+
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
+
};
|
|
10
|
+
MuiTablePagination?: {
|
|
11
|
+
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
+
};
|
|
13
|
+
MuiRating?: {
|
|
14
|
+
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
+
};
|
|
16
|
+
MuiAutocomplete?: {
|
|
17
|
+
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
+
};
|
|
19
|
+
MuiPagination?: {
|
|
20
|
+
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const amET: Localization;
|
|
25
|
+
export declare const arEG: Localization;
|
|
26
|
+
export declare const arSA: Localization;
|
|
27
|
+
export declare const arSD: Localization;
|
|
28
|
+
export declare const azAZ: Localization;
|
|
29
|
+
export declare const bnBD: Localization;
|
|
30
|
+
export declare const beBY: Localization;
|
|
31
|
+
export declare const bgBG: Localization;
|
|
32
|
+
export declare const caES: Localization;
|
|
33
|
+
export declare const csCZ: Localization;
|
|
34
|
+
export declare const daDK: Localization;
|
|
35
|
+
export declare const deDE: Localization;
|
|
36
|
+
export declare const elGR: Localization;
|
|
37
|
+
export declare const enUS: Localization;
|
|
38
|
+
export declare const esES: Localization;
|
|
39
|
+
export declare const etEE: Localization;
|
|
40
|
+
export declare const faIR: Localization;
|
|
41
|
+
export declare const fiFI: Localization;
|
|
42
|
+
export declare const frFR: Localization;
|
|
43
|
+
export declare const heIL: Localization;
|
|
44
|
+
export declare const hiIN: Localization;
|
|
45
|
+
export declare const hrHR: Localization;
|
|
46
|
+
export declare const huHU: Localization;
|
|
47
|
+
export declare const hyAM: Localization;
|
|
48
|
+
export declare const idID: Localization;
|
|
49
|
+
export declare const isIS: Localization;
|
|
50
|
+
export declare const itIT: Localization;
|
|
51
|
+
export declare const jaJP: Localization;
|
|
52
|
+
export declare const khKH: Localization;
|
|
53
|
+
export declare const koKR: Localization;
|
|
54
|
+
export declare const kuLatn: Localization;
|
|
55
|
+
export declare const kkKZ: Localization;
|
|
56
|
+
export declare const mkMK: Localization;
|
|
57
|
+
export declare const nbNO: Localization;
|
|
58
|
+
export declare const nlNL: Localization;
|
|
59
|
+
export declare const plPL: Localization;
|
|
60
|
+
export declare const ptBR: Localization;
|
|
61
|
+
export declare const ptPT: Localization;
|
|
62
|
+
export declare const roRO: Localization;
|
|
63
|
+
export declare const srRS: Localization;
|
|
64
|
+
export declare const ruRU: Localization;
|
|
65
|
+
export declare const siLK: Localization;
|
|
66
|
+
export declare const skSK: Localization;
|
|
67
|
+
export declare const svSE: Localization;
|
|
68
|
+
export declare const thTH: Localization;
|
|
69
|
+
export declare const trTR: Localization;
|
|
70
|
+
export declare const ukUA: Localization;
|
|
71
|
+
export declare const urPK: Localization;
|
|
72
|
+
export declare const viVN: Localization;
|
|
73
|
+
export declare const zhCN: Localization;
|
|
74
|
+
export declare const zhHK: Localization;
|
|
75
|
+
export declare const zhTW: Localization;
|
|
File without changes
|
package/modern/Button/Button.js
CHANGED
|
@@ -111,8 +111,6 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
111
111
|
color: (theme.vars || theme).palette.action.disabled
|
|
112
112
|
}, ownerState.variant === 'outlined' && {
|
|
113
113
|
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
114
|
-
}, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
115
|
-
border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
116
114
|
}, ownerState.variant === 'contained' && {
|
|
117
115
|
color: (theme.vars || theme).palette.action.disabled,
|
|
118
116
|
boxShadow: (theme.vars || theme).shadows[0],
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -6,15 +6,15 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { chainPropTypes } from '@mui/utils';
|
|
8
8
|
import { isHostComponent, useSlotProps, unstable_composeClasses as composeClasses } from '@mui/base';
|
|
9
|
-
import { useSlider
|
|
9
|
+
import { useSlider } from '@mui/base/SliderUnstyled';
|
|
10
10
|
import { alpha, lighten, darken } from '@mui/system';
|
|
11
11
|
import useThemeProps from '../styles/useThemeProps';
|
|
12
12
|
import styled, { slotShouldForwardProp } from '../styles/styled';
|
|
13
13
|
import useTheme from '../styles/useTheme';
|
|
14
14
|
import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
|
|
15
15
|
import capitalize from '../utils/capitalize';
|
|
16
|
-
import
|
|
17
|
-
import sliderClasses from './sliderClasses';
|
|
16
|
+
import SliderValueLabel from './SliderValueLabel';
|
|
17
|
+
import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
|
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
const valueToPercent = (value, min, max) => (value - min) * 100 / (max - min);
|
|
@@ -261,7 +261,7 @@ process.env.NODE_ENV !== "production" ? SliderThumb.propTypes /* remove-proptype
|
|
|
261
261
|
children: PropTypes.node
|
|
262
262
|
} : void 0;
|
|
263
263
|
export { SliderThumb };
|
|
264
|
-
const
|
|
264
|
+
const StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
265
265
|
name: 'MuiSlider',
|
|
266
266
|
slot: 'ValueLabel',
|
|
267
267
|
overridesResolver: (props, styles) => styles.valueLabel
|
|
@@ -319,7 +319,7 @@ const SliderValueLabel = styled(SliderValueLabelComponent, {
|
|
|
319
319
|
fontSize: theme.typography.pxToRem(12),
|
|
320
320
|
padding: '0.25rem 0.5rem'
|
|
321
321
|
}));
|
|
322
|
-
process.env.NODE_ENV !== "production" ?
|
|
322
|
+
process.env.NODE_ENV !== "production" ? StyledSliderValueLabel.propTypes /* remove-proptypes */ = {
|
|
323
323
|
// ----------------------------- Warning --------------------------------
|
|
324
324
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
325
325
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -329,7 +329,7 @@ process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes /* remove-pro
|
|
|
329
329
|
*/
|
|
330
330
|
children: PropTypes.node
|
|
331
331
|
} : void 0;
|
|
332
|
-
export { SliderValueLabel };
|
|
332
|
+
export { StyledSliderValueLabel as SliderValueLabel };
|
|
333
333
|
const SliderMark = styled('span', {
|
|
334
334
|
name: 'MuiSlider',
|
|
335
335
|
slot: 'Mark',
|
|
@@ -522,7 +522,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
522
522
|
const RailSlot = slots?.rail ?? components.Rail ?? SliderRail;
|
|
523
523
|
const TrackSlot = slots?.track ?? components.Track ?? SliderTrack;
|
|
524
524
|
const ThumbSlot = slots?.thumb ?? components.Thumb ?? SliderThumb;
|
|
525
|
-
const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ??
|
|
525
|
+
const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ?? StyledSliderValueLabel;
|
|
526
526
|
const MarkSlot = slots?.mark ?? components.Mark ?? SliderMark;
|
|
527
527
|
const MarkLabelSlot = slots?.markLabel ?? components.MarkLabel ?? SliderMarkLabel;
|
|
528
528
|
const InputSlot = slots?.input ?? components.Input ?? 'input';
|
|
@@ -26,6 +26,9 @@ export default function SliderValueLabel(props) {
|
|
|
26
26
|
value
|
|
27
27
|
} = props;
|
|
28
28
|
const classes = useValueLabelClasses(props);
|
|
29
|
+
if (!children) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
29
32
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
30
33
|
className: clsx(children.props.className)
|
|
31
34
|
}, /*#__PURE__*/_jsxs(React.Fragment, {
|
package/modern/Slider/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import generateUtilityClass from '../generateUtilityClass';
|
|
3
|
+
export function getSliderUtilityClass(slot) {
|
|
4
|
+
return generateUtilityClass('MuiSlider', slot);
|
|
5
|
+
}
|
|
6
|
+
const sliderClasses = generateUtilityClasses('MuiSlider', ['root', 'active', 'colorPrimary', 'colorSecondary', 'disabled', 'dragging', 'focusVisible', 'mark', 'markActive', 'marked', 'markLabel', 'markLabelActive', 'rail', 'sizeSmall', 'thumb', 'thumbColorPrimary', 'thumbColorSecondary', 'track', 'trackInverted', 'trackFalse', 'thumbSizeSmall', 'valueLabel', 'valueLabelOpen', 'valueLabelCircle', 'valueLabelLabel', 'vertical']);
|
|
5
7
|
export default sliderClasses;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["BackdropProps"],
|
|
4
|
-
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
4
|
+
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { flushSync } from 'react-dom';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -133,6 +133,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
133
133
|
disableSwipeToOpen = iOS,
|
|
134
134
|
hideBackdrop,
|
|
135
135
|
hysteresis = 0.52,
|
|
136
|
+
allowSwipeInChildren = false,
|
|
136
137
|
minFlingVelocity = 450,
|
|
137
138
|
ModalProps: {
|
|
138
139
|
BackdropProps
|
|
@@ -252,6 +253,30 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
252
253
|
});
|
|
253
254
|
}
|
|
254
255
|
});
|
|
256
|
+
const startMaybeSwiping = (force = false) => {
|
|
257
|
+
if (!maybeSwiping) {
|
|
258
|
+
// on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.
|
|
259
|
+
// this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.
|
|
260
|
+
// so do this change on first touchmove instead of touchstart
|
|
261
|
+
if (force || !(disableDiscovery && allowSwipeInChildren)) {
|
|
262
|
+
flushSync(() => {
|
|
263
|
+
setMaybeSwiping(true);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
const horizontalSwipe = isHorizontal(anchor);
|
|
267
|
+
if (!open && paperRef.current) {
|
|
268
|
+
// The ref may be null when a parent component updates while swiping.
|
|
269
|
+
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
270
|
+
changeTransition: false
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
swipeInstance.current.velocity = 0;
|
|
274
|
+
swipeInstance.current.lastTime = null;
|
|
275
|
+
swipeInstance.current.lastTranslate = null;
|
|
276
|
+
swipeInstance.current.paperHit = false;
|
|
277
|
+
touchDetected.current = true;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
255
280
|
const handleBodyTouchMove = useEventCallback(nativeEvent => {
|
|
256
281
|
// the ref may be null when a parent component updates while swiping
|
|
257
282
|
if (!paperRef.current || !touchDetected.current) {
|
|
@@ -262,6 +287,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
262
287
|
if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {
|
|
263
288
|
return;
|
|
264
289
|
}
|
|
290
|
+
startMaybeSwiping(true);
|
|
265
291
|
const anchorRtl = getAnchor(theme, anchor);
|
|
266
292
|
const horizontalSwipe = isHorizontal(anchor);
|
|
267
293
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
@@ -372,7 +398,11 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
372
398
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
373
399
|
const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));
|
|
374
400
|
if (!open) {
|
|
375
|
-
|
|
401
|
+
// logic for if swipe should be ignored:
|
|
402
|
+
// if disableSwipeToOpen
|
|
403
|
+
// if target != swipeArea, and target is not a child of paper ref
|
|
404
|
+
// if is a child of paper ref, and `allowSwipeInChildren` does not allow it
|
|
405
|
+
if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || paperRef.current?.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {
|
|
376
406
|
return;
|
|
377
407
|
}
|
|
378
408
|
if (horizontalSwipe) {
|
|
@@ -387,20 +417,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
387
417
|
claimedSwipeInstance = null;
|
|
388
418
|
swipeInstance.current.startX = currentX;
|
|
389
419
|
swipeInstance.current.startY = currentY;
|
|
390
|
-
|
|
391
|
-
setMaybeSwiping(true);
|
|
392
|
-
});
|
|
393
|
-
if (!open && paperRef.current) {
|
|
394
|
-
// The ref may be null when a parent component updates while swiping.
|
|
395
|
-
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
396
|
-
changeTransition: false
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
swipeInstance.current.velocity = 0;
|
|
400
|
-
swipeInstance.current.lastTime = null;
|
|
401
|
-
swipeInstance.current.lastTranslate = null;
|
|
402
|
-
swipeInstance.current.paperHit = false;
|
|
403
|
-
touchDetected.current = true;
|
|
420
|
+
startMaybeSwiping();
|
|
404
421
|
});
|
|
405
422
|
React.useEffect(() => {
|
|
406
423
|
if (variant === 'temporary') {
|
|
@@ -448,7 +465,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
448
465
|
hideBackdrop: hideBackdrop,
|
|
449
466
|
PaperProps: _extends({}, PaperProps, {
|
|
450
467
|
style: _extends({
|
|
451
|
-
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
|
|
468
|
+
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
452
469
|
}, PaperProps.style),
|
|
453
470
|
ref: handleRef
|
|
454
471
|
}),
|
|
@@ -470,6 +487,19 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
470
487
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
471
488
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
472
489
|
// ----------------------------------------------------------------------
|
|
490
|
+
/**
|
|
491
|
+
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
|
|
492
|
+
* This can be useful in scenarios where the drawer is partially visible.
|
|
493
|
+
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
|
|
494
|
+
* (for example, to ignore other elements that handle touch move events, like sliders).
|
|
495
|
+
*
|
|
496
|
+
* @param {TouchEvent} event The 'touchstart' event
|
|
497
|
+
* @param {HTMLDivElement} swipeArea The swipe area element
|
|
498
|
+
* @param {HTMLDivElement} paper The drawer's paper element
|
|
499
|
+
*
|
|
500
|
+
* @default false
|
|
501
|
+
*/
|
|
502
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
473
503
|
/**
|
|
474
504
|
* @ignore
|
|
475
505
|
*/
|
package/modern/index.js
CHANGED
|
File without changes
|
package/node/Button/Button.js
CHANGED
|
@@ -121,8 +121,6 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
121
121
|
color: (theme.vars || theme).palette.action.disabled
|
|
122
122
|
}, ownerState.variant === 'outlined' && {
|
|
123
123
|
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
124
|
-
}, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
125
|
-
border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
126
124
|
}, ownerState.variant === 'contained' && {
|
|
127
125
|
color: (theme.vars || theme).palette.action.disabled,
|
|
128
126
|
boxShadow: (theme.vars || theme).shadows[0],
|
package/node/Slider/Slider.js
CHANGED
|
@@ -20,7 +20,7 @@ var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
|
20
20
|
var _shouldSpreadAdditionalProps = _interopRequireDefault(require("../utils/shouldSpreadAdditionalProps"));
|
|
21
21
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
22
22
|
var _SliderValueLabel = _interopRequireDefault(require("./SliderValueLabel"));
|
|
23
|
-
var _sliderClasses =
|
|
23
|
+
var _sliderClasses = _interopRequireWildcard(require("./sliderClasses"));
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -269,7 +269,7 @@ process.env.NODE_ENV !== "production" ? SliderThumb.propTypes /* remove-proptype
|
|
|
269
269
|
*/
|
|
270
270
|
children: _propTypes.default.node
|
|
271
271
|
} : void 0;
|
|
272
|
-
const
|
|
272
|
+
const StyledSliderValueLabel = (0, _styled.default)(_SliderValueLabel.default, {
|
|
273
273
|
name: 'MuiSlider',
|
|
274
274
|
slot: 'ValueLabel',
|
|
275
275
|
overridesResolver: (props, styles) => styles.valueLabel
|
|
@@ -327,8 +327,8 @@ const SliderValueLabel = (0, _styled.default)(_SliderValueLabel.default, {
|
|
|
327
327
|
fontSize: theme.typography.pxToRem(12),
|
|
328
328
|
padding: '0.25rem 0.5rem'
|
|
329
329
|
}));
|
|
330
|
-
exports.SliderValueLabel =
|
|
331
|
-
process.env.NODE_ENV !== "production" ?
|
|
330
|
+
exports.SliderValueLabel = StyledSliderValueLabel;
|
|
331
|
+
process.env.NODE_ENV !== "production" ? StyledSliderValueLabel.propTypes /* remove-proptypes */ = {
|
|
332
332
|
// ----------------------------- Warning --------------------------------
|
|
333
333
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
334
334
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -443,7 +443,7 @@ const useUtilityClasses = ownerState => {
|
|
|
443
443
|
disabled: ['disabled'],
|
|
444
444
|
focusVisible: ['focusVisible']
|
|
445
445
|
};
|
|
446
|
-
return (0, _base.unstable_composeClasses)(slots,
|
|
446
|
+
return (0, _base.unstable_composeClasses)(slots, _sliderClasses.getSliderUtilityClass, classes);
|
|
447
447
|
};
|
|
448
448
|
const Forward = ({
|
|
449
449
|
children
|
|
@@ -531,7 +531,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
531
531
|
const RailSlot = (_ref2 = (_slots$rail = slots == null ? void 0 : slots.rail) != null ? _slots$rail : components.Rail) != null ? _ref2 : SliderRail;
|
|
532
532
|
const TrackSlot = (_ref3 = (_slots$track = slots == null ? void 0 : slots.track) != null ? _slots$track : components.Track) != null ? _ref3 : SliderTrack;
|
|
533
533
|
const ThumbSlot = (_ref4 = (_slots$thumb = slots == null ? void 0 : slots.thumb) != null ? _slots$thumb : components.Thumb) != null ? _ref4 : SliderThumb;
|
|
534
|
-
const ValueLabelSlot = (_ref5 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref5 :
|
|
534
|
+
const ValueLabelSlot = (_ref5 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref5 : StyledSliderValueLabel;
|
|
535
535
|
const MarkSlot = (_ref6 = (_slots$mark = slots == null ? void 0 : slots.mark) != null ? _slots$mark : components.Mark) != null ? _ref6 : SliderMark;
|
|
536
536
|
const MarkLabelSlot = (_ref7 = (_slots$markLabel = slots == null ? void 0 : slots.markLabel) != null ? _slots$markLabel : components.MarkLabel) != null ? _ref7 : SliderMarkLabel;
|
|
537
537
|
const InputSlot = (_ref8 = (_slots$input = slots == null ? void 0 : slots.input) != null ? _slots$input : components.Input) != null ? _ref8 : 'input';
|
|
@@ -34,6 +34,9 @@ function SliderValueLabel(props) {
|
|
|
34
34
|
value
|
|
35
35
|
} = props;
|
|
36
36
|
const classes = useValueLabelClasses(props);
|
|
37
|
+
if (!children) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
37
40
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
38
41
|
className: (0, _clsx.default)(children.props.className)
|
|
39
42
|
}, /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
package/node/Slider/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -31,6 +30,17 @@ Object.keys(_Slider).forEach(function (key) {
|
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
});
|
|
34
|
-
var _sliderClasses =
|
|
33
|
+
var _sliderClasses = _interopRequireWildcard(require("./sliderClasses"));
|
|
34
|
+
Object.keys(_sliderClasses).forEach(function (key) {
|
|
35
|
+
if (key === "default" || key === "__esModule") return;
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
37
|
+
if (key in exports && exports[key] === _sliderClasses[key]) return;
|
|
38
|
+
Object.defineProperty(exports, key, {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () {
|
|
41
|
+
return _sliderClasses[key];
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
35
45
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
46
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
|
|
8
|
+
exports.getSliderUtilityClass = getSliderUtilityClass;
|
|
9
9
|
var _utils = require("@mui/utils");
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityClass"));
|
|
11
|
+
function getSliderUtilityClass(slot) {
|
|
12
|
+
return (0, _generateUtilityClass.default)('MuiSlider', slot);
|
|
13
|
+
}
|
|
14
|
+
const sliderClasses = (0, _utils.unstable_generateUtilityClasses)('MuiSlider', ['root', 'active', 'colorPrimary', 'colorSecondary', 'disabled', 'dragging', 'focusVisible', 'mark', 'markActive', 'marked', 'markLabel', 'markLabelActive', 'rail', 'sizeSmall', 'thumb', 'thumbColorPrimary', 'thumbColorSecondary', 'track', 'trackInverted', 'trackFalse', 'thumbSizeSmall', 'valueLabel', 'valueLabelOpen', 'valueLabelCircle', 'valueLabelLabel', 'vertical']);
|
|
12
15
|
var _default = sliderClasses;
|
|
13
16
|
exports.default = _default;
|