Skip to content

Commit

Permalink
[Slider] Move to core
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 28, 2019
1 parent b31810d commit cb08d1f
Show file tree
Hide file tree
Showing 28 changed files with 43 additions and 39 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const pages = [
{ pathname: '/components/pickers' },
{ pathname: '/components/radio-buttons' },
{ pathname: '/components/selects' },
{ pathname: '/components/slider' },
{ pathname: '/components/switches' },
{ pathname: '/components/text-fields' },
{ pathname: '/components/transfer-list' },
Expand Down Expand Up @@ -111,7 +112,6 @@ const pages = [
subheader: '/components/lab',
children: [
{ pathname: '/components/about-the-lab' },
{ pathname: '/components/slider' },
{ pathname: '/components/speed-dial' },
{ pathname: '/components/toggle-button' },
],
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/ContinuousSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import VolumeDown from '@material-ui/icons/VolumeDown';
import VolumeUp from '@material-ui/icons/VolumeUp';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/ContinuousSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import VolumeDown from '@material-ui/icons/VolumeDown';
import VolumeUp from '@material-ui/icons/VolumeUp';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/CustomizedSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import Typography from '@material-ui/core/Typography';
import Tooltip from '@material-ui/core/Tooltip';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/CustomizedSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { fade, withStyles, makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import Typography from '@material-ui/core/Typography';
import Tooltip from '@material-ui/core/Tooltip';
import PopperJs from 'popper.js';
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/DiscreteSlider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';

const useStyles = makeStyles(theme => ({
root: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/DiscreteSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/InputSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import Input from '@material-ui/core/Input';
import VolumeUp from '@material-ui/icons/VolumeUp';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/InputSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import Input from '@material-ui/core/Input';
import VolumeUp from '@material-ui/icons/VolumeUp';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/RangeSlider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';

const useStyles = makeStyles({
root: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/RangeSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import Tooltip from '@material-ui/core/Tooltip';

const useStyles = makeStyles({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/VerticalSlider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';

const useStyles = makeStyles({
root: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/slider/VerticalSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';

const useStyles = makeStyles({
root: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/customization/color/ColorTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Tooltip from '@material-ui/core/Tooltip';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
import CheckIcon from '@material-ui/icons/Check';
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
import { capitalize } from '@material-ui/core/utils';
import ColorDemo from './ColorDemo';
import { DispatchContext } from 'docs/src/modules/components/ThemeContext';
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui-lab/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as Slider } from './Slider';
export { default as SpeedDial } from './SpeedDial';
export { default as SpeedDialAction } from './SpeedDialAction';
export { default as SpeedDialIcon } from './SpeedDialIcon';
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui-lab/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as Slider } from './Slider';
export { default as SpeedDial } from './SpeedDial';
export { default as SpeedDialAction } from './SpeedDialAction';
export { default as SpeedDialIcon } from './SpeedDialIcon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { StandardProps } from '@material-ui/core';
import { StandardProps } from '..';

export interface Mark {
value: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { useTheme, withStyles, fade, lighten } from '@material-ui/core/styles';
import { useForkRef, ownerWindow, useIsFocusVisible } from '@material-ui/core/utils';
import { chainPropTypes } from '@material-ui/utils';
import withStyles from '../styles/withStyles';
import useTheme from '../styles/useTheme';
import { fade, lighten } from '../styles/colorManipulator';
import { useIsFocusVisible } from '../utils/focusVisible';
import ownerWindow from '../utils/ownerWindow';
import { useForkRef } from '../utils/reactHelpers';
import ValueLabel from './ValueLabel';

function asc(a, b) {
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/material-ui/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export { default as RadioGroup } from './RadioGroup';
export { default as RootRef } from './RootRef';
export { default as Select } from './Select';
export { default as Slide } from './Slide';
export { default as Slider } from './Slider';
export { default as Snackbar } from './Snackbar';
export { default as SnackbarContent } from './SnackbarContent';
export { default as Step } from './Step';
Expand Down
1 change: 1 addition & 0 deletions packages/material-ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export { default as RadioGroup } from './RadioGroup';
export { default as RootRef } from './RootRef';
export { default as Select } from './Select';
export { default as Slide } from './Slide';
export { default as Slider } from './Slider';
export { default as Snackbar } from './Snackbar';
export { default as SnackbarContent } from './SnackbarContent';
export { default as Step } from './Step';
Expand Down
22 changes: 11 additions & 11 deletions packages/material-ui/src/styles/overrides.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ import { CardClassKey } from '../Card';
import { CardContentClassKey } from '../CardContent';
import { CardHeaderClassKey } from '../CardHeader';
import { CardMediaClassKey } from '../CardMedia';
import { TouchRippleClassKey } from '../ButtonBase/TouchRipple';
import { CheckboxClassKey } from '../Checkbox';
import { ChipClassKey } from '../Chip';
import { CircularProgressClassKey } from '../CircularProgress';
import { CollapseClassKey } from '../Collapse';
import { CssBaselineClassKey } from '../CssBaseline';
import { DialogClassKey } from '../Dialog';
import { DialogActionsClassKey } from '../DialogActions';
import { DialogClassKey } from '../Dialog';
import { DialogContentClassKey } from '../DialogContent';
import { DialogContentTextClassKey } from '../DialogContentText';
import { DialogTitleClassKey } from '../DialogTitle';
import { DividerClassKey } from '../Divider';
import { DrawerClassKey } from '../Drawer';
import { ExpansionPanelClassKey } from '../ExpansionPanel';
import { ExpansionPanelActionsClassKey } from '../ExpansionPanelActions';
import { ExpansionPanelClassKey } from '../ExpansionPanel';
import { ExpansionPanelDetailsClassKey } from '../ExpansionPanelDetails';
import { ExpansionPanelSummaryClassKey } from '../ExpansionPanelSummary';
import { FabClassKey } from '../Fab';
Expand All @@ -42,20 +41,19 @@ import { FormHelperTextClassKey } from '../FormHelperText';
import { FormLabelClassKey } from '../FormLabel';
import { GridClassKey } from '../Grid';
import { GridListClassKey } from '../GridList';
import { GridListTileClassKey } from '../GridListTile';
import { GridListTileBarClassKey } from '../GridListTileBar';
import { IconClassKey } from '../Icon';
import { GridListTileClassKey } from '../GridListTile';
import { IconButtonClassKey } from '../IconButton';
import { InputClassKey } from '../Input';
import { IconClassKey } from '../Icon';
import { InputAdornmentClassKey } from '../InputAdornment';
import { InputBaseClassKey } from '../InputBase';
import { InputClassKey } from '../Input';
import { InputLabelClassKey } from '../InputLabel';
import { SwitchBaseClassKey } from '../internal/SwitchBase';
import { LinearProgressClassKey } from '../LinearProgress';
import { LinkClassKey } from '../Link';
import { ListClassKey } from '../List';
import { ListItemClassKey } from '../ListItem';
import { ListItemAvatarClassKey } from '../ListItemAvatar';
import { ListItemClassKey } from '../ListItem';
import { ListItemIconClassKey } from '../ListItemIcon';
import { ListItemSecondaryActionClassKey } from '../ListItemSecondaryAction';
import { ListItemTextClassKey } from '../ListItemText';
Expand All @@ -70,10 +68,11 @@ import { PaperClassKey } from '../Paper';
import { PopoverClassKey } from '../Popover';
import { RadioClassKey } from '../Radio';
import { SelectClassKey } from '../Select';
import { SliderClassKey } from '../Slider';
import { SnackbarClassKey } from '../Snackbar';
import { SnackbarContentClassKey } from '../SnackbarContent';
import { StepClasskey } from '../Step';
import { StepButtonClasskey } from '../StepButton';
import { StepClasskey } from '../Step';
import { StepConnectorClasskey } from '../StepConnector';
import { StepContentClasskey } from '../StepContent';
import { StepIconClasskey } from '../StepIcon';
Expand All @@ -82,9 +81,9 @@ import { StepperClasskey } from '../Stepper';
import { SvgIconClassKey } from '../SvgIcon';
import { SwitchClassKey } from '../Switch';
import { TabClassKey } from '../Tab';
import { TableClassKey } from '../Table';
import { TableBodyClassKey } from '../TableBody';
import { TableCellClassKey } from '../TableCell';
import { TableClassKey } from '../Table';
import { TableFooterClassKey } from '../TableFooter';
import { TableHeadClassKey } from '../TableHead';
import { TablePaginationClassKey } from '../TablePagination';
Expand All @@ -94,6 +93,7 @@ import { TabsClassKey } from '../Tabs';
import { TextFieldClassKey } from '../TextField';
import { ToolbarClassKey } from '../Toolbar';
import { TooltipClassKey } from '../Tooltip';
import { TouchRippleClassKey } from '../ButtonBase/TouchRipple';
import { TypographyClassKey } from '../Typography';

export type Overrides = {
Expand Down Expand Up @@ -169,6 +169,7 @@ export interface ComponentNameToClassKey {
MuiPopover: PopoverClassKey;
MuiRadio: RadioClassKey;
MuiSelect: SelectClassKey;
MuiSlider: SliderClassKey;
MuiSnackbar: SnackbarClassKey;
MuiSnackbarContent: SnackbarContentClassKey;
MuiStep: StepClasskey;
Expand All @@ -180,7 +181,6 @@ export interface ComponentNameToClassKey {
MuiStepper: StepperClasskey;
MuiSvgIcon: SvgIconClassKey;
MuiSwitch: SwitchClassKey;
MuiSwitchBase: SwitchBaseClassKey;
MuiTab: TabClassKey;
MuiTable: TableClassKey;
MuiTableBody: TableBodyClassKey;
Expand Down
10 changes: 5 additions & 5 deletions packages/material-ui/src/styles/props.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { BottomNavigationActionProps } from '../BottomNavigationAction';
import { BottomNavigationProps } from '../BottomNavigation';
import { BreadcrumbsProps } from '../Breadcrumbs';
import { ButtonBaseProps } from '../ButtonBase';
import { ButtonProps } from '../Button';
import { ButtonGroupProps } from '../ButtonGroup';
import { CardActionsProps } from '../CardActions';
import { ButtonProps } from '../Button';
import { CardActionAreaProps } from '../CardActionArea';
import { CardActionsProps } from '../CardActions';
import { CardContentProps } from '../CardContent';
import { CardHeaderProps } from '../CardHeader';
import { CardMediaProps } from '../CardMedia';
Expand Down Expand Up @@ -64,6 +64,7 @@ import { PopoverProps } from '../Popover';
import { RadioGroupProps } from '../RadioGroup';
import { RadioProps } from '../Radio';
import { SelectProps } from '../Select';
import { SliderProps } from '../Slider';
import { SnackbarContentProps } from '../SnackbarContent';
import { SnackbarProps } from '../Snackbar';
import { StepButtonProps } from '../StepButton';
Expand All @@ -74,7 +75,6 @@ import { StepLabelProps } from '../StepLabel';
import { StepperProps } from '../Stepper';
import { StepProps } from '../Step';
import { SvgIconProps } from '../SvgIcon';
import { SwitchBaseProps } from '../internal/SwitchBase';
import { SwitchProps } from '../Switch';
import { TableBodyProps } from '../TableBody';
import { TableCellProps } from '../TableCell';
Expand Down Expand Up @@ -108,8 +108,8 @@ export interface ComponentsPropsList {
MuiButtonBase: ButtonBaseProps;
MuiButtonGroup: ButtonGroupProps;
MuiCard: CardProps;
MuiCardActions: CardActionsProps;
MuiCardActionArea: CardActionAreaProps;
MuiCardActions: CardActionsProps;
MuiCardContent: CardContentProps;
MuiCardHeader: CardHeaderProps;
MuiCardMedia: CardMediaProps;
Expand Down Expand Up @@ -163,6 +163,7 @@ export interface ComponentsPropsList {
MuiRadio: RadioProps;
MuiRadioGroup: RadioGroupProps;
MuiSelect: SelectProps;
MuiSlider: SliderProps;
MuiSnackbar: SnackbarProps;
MuiSnackbarContent: SnackbarContentProps;
MuiStep: StepProps;
Expand All @@ -174,7 +175,6 @@ export interface ComponentsPropsList {
MuiStepper: StepperProps;
MuiSvgIcon: SvgIconProps;
MuiSwitch: SwitchProps;
MuiSwitchBase: SwitchBaseProps;
MuiTab: TabProps;
MuiTable: TableProps;
MuiTableBody: TableBodyProps;
Expand Down
6 changes: 3 additions & 3 deletions pages/api/slider.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
filename: /packages/material-ui-lab/src/Slider/Slider.js
filename: /packages/material-ui/src/Slider/Slider.js
---

<!--- This documentation is automatically generated, do not try to edit it. -->
Expand All @@ -9,7 +9,7 @@ filename: /packages/material-ui-lab/src/Slider/Slider.js
<p class="description">The API documentation of the Slider React component. Learn more about the properties and the CSS customization points.</p>

```js
import Slider from '@material-ui/lab/Slider';
import Slider from '@material-ui/core/Slider';
```


Expand Down Expand Up @@ -68,7 +68,7 @@ This property accepts the following keys:
| <span class="prop-name">markLabelActive</span> | Styles applied to the mark label element if active (depending on the value).

Have a look at the [overriding styles with classes](/customization/components/#overriding-styles-with-classes) section
and the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui-lab/src/Slider/Slider.js)
and the [implementation of the component](https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/Slider/Slider.js)
for more detail.

If using the `overrides` [key of the theme](/customization/themes/#css),
Expand Down
2 changes: 1 addition & 1 deletion scripts/sizeSnapshot/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function getSizeLimitBundles() {
// vs https://bundlephobia.com/result?p=rc-slider
name: 'Slider',
webpack: true,
path: 'packages/material-ui-lab/build/esm/Slider/index.js',
path: 'packages/material-ui/build/esm/Slider/index.js',
},
{
// vs https://bundlephobia.com/result?p=react-portal
Expand Down

0 comments on commit cb08d1f

Please sign in to comment.