diff --git a/.yarn-offline-mirror/carbon-components-9.84.16.tgz b/.yarn-offline-mirror/carbon-components-9.84.16.tgz deleted file mode 100644 index 56cafc0530..0000000000 Binary files a/.yarn-offline-mirror/carbon-components-9.84.16.tgz and /dev/null differ diff --git a/.yarn-offline-mirror/carbon-components-9.84.21.tgz b/.yarn-offline-mirror/carbon-components-9.84.21.tgz new file mode 100644 index 0000000000..bf3a9e5bdd Binary files /dev/null and b/.yarn-offline-mirror/carbon-components-9.84.21.tgz differ diff --git a/package.json b/package.json index 0f7757ecbe..a675b64907 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "babel-plugin-dev-expression": "^0.2.1", "babel-plugin-react-docgen": "^2.0.0", "bowser": "^1.6.1", - "carbon-components": "^9.84.16", + "carbon-components": "^9.84.18", "carbon-icons": "^7.0.5", "chalk": "^2.3.0", "cli-table": "^0.3.0", diff --git a/src/components/Select/Select.js b/src/components/Select/Select.js index 425f3a405f..f842232b2e 100644 --- a/src/components/Select/Select.js +++ b/src/components/Select/Select.js @@ -13,6 +13,7 @@ import { settings } from 'carbon-components'; import Icon from '../Icon'; import { componentsX } from '../../internal/FeatureFlags'; import ChevronDownGlyph from '@carbon/icons-react/lib/chevron--down/index'; +import WarningFilled16 from '@carbon/icons-react/lib/warning--filled/16'; const { prefix } = settings; @@ -39,10 +40,12 @@ const Select = React.forwardRef( [`${prefix}--select`]: true, [`${prefix}--select--inline`]: inline, [`${prefix}--select--light`]: light, + [`${prefix}--select--invalid`]: invalid, [className]: className, }); const labelClasses = classNames(`${prefix}--label`, { [`${prefix}--visually-hidden`]: hideLabel, + [`${prefix}--label--disabled`]: disabled, }); const errorId = `${id}-error-msg`; const error = invalid ? ( @@ -50,20 +53,19 @@ const Select = React.forwardRef( {invalidText} ) : null; + const helperTextClasses = classNames(`${prefix}--form__helper-text`, { + [`${prefix}--form__helper-text--disabled`]: disabled, + }); const helper = helperText ? ( -
{helperText}
+
{helperText}
) : null; const ariaProps = {}; if (invalid) { ariaProps['aria-describedby'] = errorId; } - return ( -
-
- - {componentsX && !inline && helper} + const input = (() => { + return ( + <>