diff --git a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-item.ts b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-item.ts
index 45c307b28752..8b80f9baa5d7 100644
--- a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-item.ts
+++ b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-item.ts
@@ -9,7 +9,7 @@
import { customElement } from 'lit/decorators.js';
import { prefix } from '../../globals/settings';
-import BXDropdownItem from '../dropdown/dropdown-item';
+import CDSDropdownItem from '../dropdown/dropdown-item';
import styles from './combo-box.scss';
/**
@@ -18,8 +18,8 @@ import styles from './combo-box.scss';
* @element cds-combo-box-item
*/
@customElement(`${prefix}-combo-box-item`)
-class BXComboBoxItem extends BXDropdownItem {
+class CDSComboBoxItem extends CDSDropdownItem {
static styles = styles;
}
-export default BXComboBoxItem;
+export default CDSComboBoxItem;
diff --git a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.mdx b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.mdx
index f281da46c784..b93b1f7ef32f 100644
--- a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.mdx
+++ b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.mdx
@@ -9,13 +9,7 @@ import { cdnJs, cdnCss } from '../../globals/internal/storybook-cdn';
[](https://codesandbox.io/s/github/carbon-design-system/carbon-for-ibm-dotcom/tree/main/packages/carbon-web-components/examples/codesandbox/basic/components/combo-box)
-Combo box realizes a notion of "filterable dropdown". By default, the dropdown
-displays a label when closed. When the user hovers over the label area, a text
-cursor will appear. The drawer opens on click (anywhere in the field) and the
-user can type to filter through the list of options below. Once the user begins
-typing, the close (X) icon will appear to the right of the label. This will
-clear any user-inputted text. Selecting an item from the dropdown will close the
-drawer and the selected option will replace the default label.
+A combobox allows the user to make a selection from a predefined list of options and is typically used when there are a large amount of options to choose from.
## Getting started
@@ -34,9 +28,9 @@ import '@carbon/web-components/es/components/combo-box/index.js';
```html
Option 1Option 2
@@ -49,6 +43,36 @@ import '@carbon/web-components/es/components/combo-box/index.js';
```
+## Disabled
+
+A disabled combobox is available but should not be used as the sole means of conveying information.
+For example, if the user must complete a previous form input before moving on to the combobox,
+make sure to make that clear to the user via an error state on the previous form element in addition
+to disabling the next element.
+
+```html
+
+ Option 1
+ Option 2
+ Option 3
+ Option 4
+ Option 5
+ Option 6
+ Option 7
+ Option 8
+
+```
+
+## Labels and Helper Texts
+The label is not a replacement for a helper or title text under any circumstances including space restraints.
+A label should be used to provide additive information regarding the format of the input.
+In all cases a helper text is required in addition to a placeholder.
+
## Selection
When user attempts to select a combo box item, `cds-combo-box-beingselected`
diff --git a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.ts b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.ts
index 97908ce36163..ae6a88546adc 100644
--- a/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.ts
+++ b/web-components/packages/carbon-web-components/src/components/combo-box/combo-box-story.ts
@@ -9,138 +9,177 @@
import { html } from 'lit';
import { ifDefined } from 'lit/directives/if-defined.js';
-import { action } from '@storybook/addon-actions';
-import { boolean, select, text } from '@storybook/addon-knobs';
-import {
- DROPDOWN_COLOR_SCHEME,
- DROPDOWN_SIZE,
- DROPDOWN_TYPE,
-} from './combo-box';
+import { boolean, select } from '@storybook/addon-knobs';
+import { DROPDOWN_DIRECTION, DROPDOWN_SIZE } from './combo-box';
import './combo-box-item';
import storyDocs from './combo-box-story.mdx';
import { prefix } from '../../globals/settings';
+import textNullable from '../../../.storybook/knob-text-nullable';
-const colorSchemes = {
- [`Regular`]: null,
- [`Light (${DROPDOWN_COLOR_SCHEME.LIGHT})`]: DROPDOWN_COLOR_SCHEME.LIGHT,
-};
+const items = [
+ {
+ value: 'option-0',
+ text: 'An example option that is really long to show what should be done to handle long text',
+ },
+ {
+ value: 'option-1',
+ text: 'Option 1',
+ },
+ {
+ value: 'option-2',
+ text: 'Option 2',
+ },
+ {
+ value: 'option-3',
+ text: 'Option 3 - a disabled item',
+ disabled: true,
+ },
+ {
+ value: 'option-4',
+ text: 'Option 4',
+ },
+ {
+ value: 'option-5',
+ text: 'Option 5',
+ },
+];
-const types = {
- Regular: null,
- [`Inline (${DROPDOWN_TYPE.INLINE})`]: DROPDOWN_TYPE.INLINE,
+const directionOptions = {
+ [`Top`]: DROPDOWN_DIRECTION.TOP,
+ [`Bottom`]: DROPDOWN_DIRECTION.BOTTOM,
};
const sizes = {
- 'Regular size': null,
[`Small size (${DROPDOWN_SIZE.SMALL})`]: DROPDOWN_SIZE.SMALL,
- [`Extra large size (${DROPDOWN_SIZE.EXTRA_LARGE})`]:
- DROPDOWN_SIZE.EXTRA_LARGE,
+ 'Regular size': null,
+ [`Large size (${DROPDOWN_SIZE.LARGE})`]: DROPDOWN_SIZE.LARGE,
+};
+
+export const Default = () => {
+ return html`
+
+ ${items.map(
+ (elem) => html`
+ ${elem.text}
+ `
+ )}
+
+ `;
+};
+
+export const WithLayer = () => {
+ return html`
+
+