diff --git a/components/dash-core-components/src/components/Checklist.react.js b/components/dash-core-components/src/components/Checklist.react.js deleted file mode 100644 index eb0c6c344b..0000000000 --- a/components/dash-core-components/src/components/Checklist.react.js +++ /dev/null @@ -1,230 +0,0 @@ -import PropTypes from 'prop-types'; -import {append, includes, without} from 'ramda'; -import React, {Component} from 'react'; - -import {sanitizeOptions} from '../utils/optionTypes'; -import LoadingElement from '../utils/LoadingElement'; - -/** - * Checklist is a component that encapsulates several checkboxes. - * The values and labels of the checklist are specified in the `options` - * property and the checked items are specified with the `value` property. - * Each checkbox is rendered as an input with a surrounding label. - */ -export default class Checklist extends Component { - render() { - const { - className, - id, - inputClassName, - inputStyle, - labelClassName, - labelStyle, - options, - setProps, - style, - value, - inline, - } = this.props; - return ( - - {sanitizeOptions(options).map(option => { - return ( - - ); - })} - - ); - } -} - -Checklist.propTypes = { - /** - * An array of options - */ - options: PropTypes.oneOfType([ - /** - * Array of options where the label and the value are the same thing - [string|number|bool] - */ - PropTypes.arrayOf( - PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - PropTypes.bool, - ]) - ), - /** - * Simpler `options` representation in dictionary format. The order is not guaranteed. - * {`value1`: `label1`, `value2`: `label2`, ... } - * which is equal to - * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...] - */ - PropTypes.object, - /** - * An array of options {label: [string|number], value: [string|number]}, - * an optional disabled field can be used for each option - */ - PropTypes.arrayOf( - PropTypes.exact({ - /** - * The option's label - */ - label: PropTypes.node.isRequired, - - /** - * The value of the option. This value - * corresponds to the items specified in the - * `value` property. - */ - value: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - PropTypes.bool, - ]).isRequired, - - /** - * If true, this option is disabled and cannot be selected. - */ - disabled: PropTypes.bool, - - /** - * The HTML 'title' attribute for the option. Allows for - * information on hover. For more information on this attribute, - * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title - */ - title: PropTypes.string, - }) - ), - ]), - - /** - * The currently selected value - */ - value: PropTypes.arrayOf( - PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - PropTypes.bool, - ]) - ), - - /** - * Indicates whether the options labels should be displayed inline (true=horizontal) - * or in a block (false=vertical). - */ - inline: PropTypes.bool, - - /** - * The class of the container (div) - */ - className: PropTypes.string, - - /** - * The style of the container (div) - */ - style: PropTypes.object, - - /** - * The style of the checkbox element - */ - inputStyle: PropTypes.object, - - /** - * The class of the checkbox element - */ - inputClassName: PropTypes.string, - - /** - * The style of the