Skip to content

Commit b56a9d5

Browse files
committed
Address review feedback: autocomplete, disabled, checked/selected descriptions
- autocomplete: condensed opening, @see -> Learn more inline link, simplified defaults - disabled: "Disables the field/control" -> "Whether the field/control is disabled" - checked/selected: "active" -> "checked"/"selected" (less ambiguous) - defaultChecked/defaultSelected: same fix Made-with: Cursor
1 parent 8c70cf7 commit b56a9d5

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

packages/ui-extensions/src/surfaces/checkout/components/components-shared.d.ts

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ export interface BaseInputProps {
15031503
*/
15041504
name?: string;
15051505
/**
1506-
* Disables the field, disallowing any interaction.
1506+
* Whether the field is disabled, preventing any user interaction.
15071507
*
15081508
* @default false
15091509
*/
@@ -1729,7 +1729,7 @@ export interface BaseSelectableProps {
17291729
*/
17301730
accessibilityLabel?: string;
17311731
/**
1732-
* Disables the control, disallowing any interaction.
1732+
* Whether the control is disabled, preventing any user interaction.
17331733
*
17341734
* @default false
17351735
*/
@@ -1741,13 +1741,13 @@ export interface BaseSelectableProps {
17411741
}
17421742
export interface BaseOptionProps extends BaseSelectableProps {
17431743
/**
1744-
* Whether the control is active.
1744+
* Whether the control is currently selected.
17451745
*
17461746
* @default false
17471747
*/
17481748
selected?: boolean;
17491749
/**
1750-
* Whether the control is active by default.
1750+
* Whether the control is selected by default.
17511751
*
17521752
* @implementation `defaultSelected` reflects to the `selected` attribute.
17531753
*
@@ -1761,13 +1761,13 @@ export interface BaseCheckableProps extends BaseSelectableProps, InteractionProp
17611761
*/
17621762
label?: string;
17631763
/**
1764-
* Whether the control is active.
1764+
* Whether the control is currently checked.
17651765
*
17661766
* @default false
17671767
*/
17681768
checked?: boolean;
17691769
/**
1770-
* Whether the control is active by default.
1770+
* Whether the control is checked by default.
17711771
*
17721772
* @implementation `defaultChecked` reflects to the `checked` attribute.
17731773
*
@@ -1902,7 +1902,7 @@ interface ChoiceListProps$1 extends GlobalProps, Pick<BasicFieldProps, "label" |
19021902
*/
19031903
children?: ComponentChildren;
19041904
/**
1905-
* Disables the field, disallowing any interaction.
1905+
* Whether the field is disabled, preventing any user interaction.
19061906
*
19071907
* `disabled` on any child choices is ignored when this is true.
19081908
*
@@ -2021,24 +2021,17 @@ interface ClipboardItemProps$1 extends GlobalProps {
20212021
}
20222022
export interface AutocompleteProps<AutocompleteField extends AnyAutocompleteField> {
20232023
/**
2024-
* A hint as to the intended content of the field.
2024+
* A hint about the intended content of the field for browser autofill.
20252025
*
2026-
* When set to `on` (the default), this property indicates that the field should support
2027-
* autofill, but you do not have any more semantic information on the intended
2028-
* contents.
2026+
* When set to `on` (the default), this property indicates that the field should support autofill, but you do not have any more semantic information on the intended contents.
20292027
*
2030-
* When set to `off`, you are indicating that this field contains sensitive
2031-
* information, or contents that are never saved, like one-time codes.
2028+
* When set to `off`, you are indicating that this field contains sensitive information, or contents that are never saved, like one-time codes.
20322029
*
2033-
* Alternatively, you can provide value which describes the
2034-
* specific data you would like to be entered into this field during autofill.
2030+
* Alternatively, you can provide a value which describes the specific data you would like to be entered into this field during autofill.
20352031
*
2036-
* @see Learn more about the set of {@link https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-detail-tokens|autocomplete values} supported in browsers.
2032+
* Learn more about the set of [autocomplete values](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-detail-tokens) supported in browsers.
20372033
*
2038-
* @default 'tel' for PhoneField
2039-
* @default 'email' for EmailField
2040-
* @default 'url' for URLField
2041-
* @default 'on' for everything else
2034+
* @default 'on'
20422035
*/
20432036
autocomplete?: AutocompleteField | `${AutocompleteSection} ${AutocompleteField}` | `${AutocompleteGroup} ${AutocompleteField}` | `${AutocompleteSection} ${AutocompleteGroup} ${AutocompleteField}` | "on" | "off";
20442037
}

0 commit comments

Comments
 (0)