@rmwc/select
Advanced tools
Comparing version 2.2.0 to 3.0.0
@@ -15,3 +15,3 @@ [ | ||
"name": "intersection", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Makes the Select have a visual box. */\n box?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n} & SimpleTagPropsT &\n //$FlowFixMe\n React.InputHTMLAttributes<HTMLInputElement>", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n} & SimpleTagPropsT &\n //$FlowFixMe\n React.InputHTMLAttributes<HTMLInputElement>", | ||
"elements": [ | ||
@@ -21,3 +21,3 @@ { | ||
"type": "object", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Makes the Select have a visual box. */\n box?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n}", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n}", | ||
"signature": { | ||
@@ -107,9 +107,2 @@ "properties": [ | ||
{ | ||
"key": "box", | ||
"value": { | ||
"name": "boolean", | ||
"required": false | ||
} | ||
}, | ||
{ | ||
"key": "rootProps", | ||
@@ -194,3 +187,3 @@ "value": { | ||
"name": "intersection", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Makes the Select have a visual box. */\n box?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n} & SimpleTagPropsT &\n React.InputHTMLAttributes<HTMLInputElement>", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n} & SimpleTagPropsT &\n React.InputHTMLAttributes<HTMLInputElement>", | ||
"elements": [ | ||
@@ -200,3 +193,3 @@ { | ||
"type": "object", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Makes the Select have a visual box. */\n box?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n}", | ||
"raw": "{\n /** The value for a controlled select. */\n value?: mixed,\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?: string[] | { [value: string]: string } | any[],\n /** A label for the form control. */\n label?: string,\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string,\n /** Makes the select outlined. */\n outlined?: boolean,\n /** Disables the form control. */\n disabled?: boolean,\n /** Props for the root element. By default, additional props spread to the native select element. */\n rootProps?: Object,\n /** A className for the root element. */\n className?: string\n}", | ||
"signature": { | ||
@@ -286,9 +279,2 @@ "properties": [ | ||
{ | ||
"key": "box", | ||
"value": { | ||
"name": "boolean", | ||
"required": false | ||
} | ||
}, | ||
{ | ||
"key": "rootProps", | ||
@@ -412,9 +398,2 @@ "value": { | ||
}, | ||
"box": { | ||
"flowType": { | ||
"name": "boolean" | ||
}, | ||
"required": false, | ||
"description": "Makes the Select have a visual box." | ||
}, | ||
"rootProps": { | ||
@@ -421,0 +400,0 @@ "flowType": { |
@@ -18,4 +18,2 @@ import { SimpleTagPropsT } from '@rmwc/base'; | ||
disabled?: boolean; | ||
/** Makes the Select have a visual box. */ | ||
box?: boolean; | ||
/** Props for the root element. By default, additional props spread to the native select element. */ | ||
@@ -22,0 +20,0 @@ rootProps?: Object; |
11
index.js
@@ -40,7 +40,6 @@ 'use strict'; | ||
return ['mdc-select', { | ||
'mdc-select--outlined': props.outlined, | ||
'mdc-select--box': props.box | ||
'mdc-select--outlined': props.outlined | ||
}]; | ||
}, | ||
consumeProps: ['box', 'outlined'], | ||
consumeProps: ['outlined'], | ||
defaultProps: { | ||
@@ -143,3 +142,2 @@ role: 'listbox' | ||
options = _props$options === undefined ? [] : _props$options, | ||
box = _props.box, | ||
className = _props.className, | ||
@@ -149,3 +147,3 @@ _props$rootProps = _props.rootProps, | ||
apiRef = _props.apiRef, | ||
rest = _objectWithoutProperties(_props, ['placeholder', 'children', 'value', 'outlined', 'label', 'options', 'box', 'className', 'rootProps', 'apiRef']); | ||
rest = _objectWithoutProperties(_props, ['placeholder', 'children', 'value', 'outlined', 'label', 'options', 'className', 'rootProps', 'apiRef']); | ||
@@ -159,3 +157,2 @@ var root_ = this.foundationRefs.root_; | ||
Object.assign({}, rootProps, { | ||
box: box, | ||
outlined: outlined, | ||
@@ -169,3 +166,3 @@ elementRef: root_, | ||
value: value, | ||
defaultValue: value !== undefined ? undefined : '' | ||
defaultValue: value !== undefined ? undefined : this.props.defaultValue || '' | ||
}), | ||
@@ -172,0 +169,0 @@ (!!placeholder || placeholder === '') && React.createElement( |
{ | ||
"name": "@rmwc/select", | ||
"version": "2.2.0", | ||
"version": "3.0.0", | ||
"description": "RMWC Select component", | ||
@@ -29,8 +29,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"@material/select": "~0.39.0", | ||
"@rmwc/base": "^2.2.0", | ||
"@rmwc/floating-label": "^2.2.0", | ||
"@rmwc/line-ripple": "^2.2.0", | ||
"@rmwc/notched-outline": "^2.2.0" | ||
"@material/select": "~0.40.0", | ||
"@rmwc/base": "^3.0.0", | ||
"@rmwc/floating-label": "^3.0.0", | ||
"@rmwc/line-ripple": "^3.0.0", | ||
"@rmwc/notched-outline": "^3.0.0" | ||
} | ||
} |
@@ -24,9 +24,2 @@ # Select Menus | ||
<Select | ||
label="Boxed" | ||
box | ||
placeholder="" | ||
options={['Cookies', 'Pizza', 'Icecream']} | ||
/> | ||
<Select | ||
label="Outlined" | ||
@@ -178,3 +171,3 @@ outlined | ||
```jsx renderOnly | ||
import { DocumentComponent } from '@rmwc/base/utils/DocumentComponent'; | ||
import { DocumentComponent } from '@rmwc/base/utils/document-component'; | ||
import * as docs from './docgen.json'; | ||
@@ -181,0 +174,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38757
705
175
+ Added@material/animation@0.40.1(transitive)
+ Added@material/base@0.40.1(transitive)
+ Added@material/floating-label@0.40.1(transitive)
+ Added@material/line-ripple@0.40.1(transitive)
+ Added@material/notched-outline@0.40.1(transitive)
+ Added@material/ripple@0.40.1(transitive)
+ Added@material/rtl@0.40.1(transitive)
+ Added@material/select@0.40.1(transitive)
+ Added@material/shape@0.40.1(transitive)
+ Added@material/theme@0.40.1(transitive)
+ Added@material/typography@0.40.1(transitive)
+ Added@rmwc/base@3.0.11(transitive)
+ Added@rmwc/floating-label@3.0.11(transitive)
+ Added@rmwc/line-ripple@3.0.11(transitive)
+ Added@rmwc/notched-outline@3.0.11(transitive)
- Removed@material/animation@0.39.0(transitive)
- Removed@material/base@0.39.0(transitive)
- Removed@material/floating-label@0.39.1(transitive)
- Removed@material/line-ripple@0.39.3(transitive)
- Removed@material/notched-outline@0.39.1(transitive)
- Removed@material/ripple@0.39.3(transitive)
- Removed@material/rtl@0.39.1(transitive)
- Removed@material/select@0.39.3(transitive)
- Removed@material/theme@0.39.1(transitive)
- Removed@material/typography@0.39.0(transitive)
- Removed@rmwc/base@2.2.0(transitive)
- Removed@rmwc/floating-label@2.2.0(transitive)
- Removed@rmwc/line-ripple@2.2.0(transitive)
- Removed@rmwc/notched-outline@2.2.0(transitive)
Updated@material/select@~0.40.0
Updated@rmwc/base@^3.0.0
Updated@rmwc/floating-label@^3.0.0
Updated@rmwc/line-ripple@^3.0.0
Updated@rmwc/notched-outline@^3.0.0