You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removes use of placeholder in combobox and adds guidelines to explain
why it should not be used.
Updates docs page to use documentation template.
Also makes adjustments to combobox template so that value and menu args
can be passed.
CSS-41
* Comboboxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.
10
+
*
11
+
* ## Usage notes
12
+
*
13
+
* ### General notes
14
+
*
15
+
* - Combobox uses `.spectrum-PickerButton` instead of a `.spectrum-Picker`
16
+
* - The following classes must be added:
17
+
* - `.spectrum-Combobox-textfield` is required on the Textfield outer element (`.spectrum-Textfield`)
18
+
* - `.spectrum-Combobox-input` is required on the `<input>` element inside of Textfields (`.spectrum-Textfield-input`)
19
+
* - `.spectrum-Combobox-button` is required on the FieldButton (`.spectrum-ActionButton spectrum-ActionButton--sizeM`)
20
+
*
21
+
* ### Indicating validity and focus
22
+
*
23
+
* Validity and focus must be bubbled up to the parent so descendants siblings can be styled. Implementations should add the following classes to the `.spectrum-Combobox` parent class in the following situations:
24
+
*
25
+
* - `.is-focused` - when the input or button is focused with the mouse
26
+
* - `.is-keyboardFocused` - when the input or button is focused with the keyboard
27
+
* - `.is-valid` - when the input has an explicit valid state
28
+
* - `.is-invalid` - when the input has an explicit invalid state
29
+
* - `.is-disabled` - when the control is disabled; should also add to the `.spectrum-Combobox-textfield` and include a `[disabled]` attribute to the `.spectrum-Combobox-button`
30
+
* - `.is-loading` - when the progress circle is being shown
31
+
*
32
+
* ### Don't use placeholder text
33
+
* Putting instructions for how to complete an input, requirements, or any other essential information into placeholder text is not accessible. Once a value is entered, placeholder text is no longer viewable; if someone is using an automatic form filler, they will never get the information in the placeholder text.
34
+
*
35
+
* Instead of placeholder text, use the [help text](/docs/components-help-text--docs) description to convey requirements or to show any formatting examples that would help user comprehension. If there's placeholder text and help text at the same time, it becomes redundant and distracting, especially if they're communicating the same thing.
10
36
*/
11
37
exportdefault{
12
38
title: "Combobox",
@@ -50,6 +76,16 @@ export default {
50
76
control: "select",
51
77
if: {arg: "showFieldLabel",truthy: true},
52
78
},
79
+
value: {
80
+
name: "Value",
81
+
description: "The value shows the option that a user has selected.",
0 commit comments