Skip to content

Commit 0724634

Browse files
authored
Merge pull request #4409 from Shopify/cleanup-jsdoc-3-components-2026-04
Add JSDoc for component properties (2026-04)
2 parents 4882b86 + eac1630 commit 0724634

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,8 @@ interface BadgeProps$1 extends GlobalProps {
822822
/**
823823
* An icon displayed inside the badge to provide additional visual context or reinforce the badge's meaning. Set to an empty string to display no icon.
824824
*
825+
* Always positioned relative to the text content. Independent positioning isn't supported.
826+
*
825827
* @default ''
826828
*/
827829
icon?: IconType | AnyString;
@@ -1410,6 +1412,8 @@ export interface LinkBehaviorProps extends InteractionProps, FocusEventProps {
14101412
export interface InteractionProps {
14111413
/**
14121414
* The ID of the component to control when this component is activated. Pair with the `command` property to specify what action to perform on the target component. Learn more about the [`commandFor` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#commandfor).
1415+
*
1416+
* When both `commandFor` and `href` are set, `commandFor` takes precedence. The command runs and the link doesn't navigate.
14131417
*/
14141418
commandFor?: string;
14151419
/**
@@ -1537,6 +1541,8 @@ export interface MultipleInputProps extends BaseInputProps {
15371541
* An array of `value` attributes for the currently selected options.
15381542
*
15391543
* This is a convenience prop for setting the `selected` prop on child options.
1544+
*
1545+
* Form data captures the selected value strings only. Complex nested content inside choices is for display purposes and isn't included in form submissions.
15401546
*/
15411547
values?: string[];
15421548
}
@@ -1805,6 +1811,8 @@ interface CheckboxProps$1 extends GlobalProps, BaseCheckableProps, FieldErrorPro
18051811
* If you want to present an error when this field is empty, you can do
18061812
* so with the `error` property.
18071813
*
1814+
* Adds semantic meaning for accessibility. Doesn't trigger automatic validation or display an error. Implement validation logic yourself and use the `error` prop to show results.
1815+
*
18081816
* @default false
18091817
*/
18101818
required?: boolean;
@@ -1906,6 +1914,8 @@ interface ChoiceListProps$1 extends GlobalProps, Pick<BasicFieldProps, "label" |
19061914
* - `block`: The choices are displayed on the block axis.
19071915
* - `grid`: The choices are displayed in a grid.
19081916
*
1917+
* The selected content slot is supported only in the default (stacked) variant. `inline` and `grid` ignore it.
1918+
*
19091919
* @implementation The `block`, `inline` and `grid` variants are more suitable for button looking choices, but it's at the
19101920
* discretion of each surface.
19111921
*
@@ -1969,6 +1979,8 @@ interface ClickableChipProps$1 extends ChipProps$1, GlobalProps {
19691979
*
19701980
* If the chip is not `removable`, it can still be hidden by setting this property.
19711981
*
1982+
* When using the `removable` variant, keep `hidden` synced with your app state. If `hidden` isn't updated after the chip is removed, the chip can become permanently hidden.
1983+
*
19721984
* @default false
19731985
*/
19741986
hidden?: boolean;
@@ -2051,6 +2063,8 @@ export type ConsentPolicy = "sms-marketing";
20512063
interface ConsentCheckboxProps$1 extends GlobalProps, CheckboxProps$1 {
20522064
/**
20532065
* The policy for which user consent is being collected.
2066+
*
2067+
* Only `sms-marketing` is supported. Other consent policy types aren't available through this component.
20542068
*/
20552069
policy?: ConsentPolicy;
20562070
}
@@ -2059,13 +2073,17 @@ interface PhoneFieldProps$1 extends GlobalProps, BaseTextFieldProps, Pick<FieldD
20592073
/**
20602074
* The type of phone number to collect. Specific styling may be applied to each type to provide extra guidance to users. No additional validation is performed based on the type.
20612075
*
2076+
* Styling hint for the input keyboard. Doesn't validate the phone number format. Implement validation in your extension and use the `error` prop to show results.
2077+
*
20622078
* @default ''
20632079
*/
20642080
type?: "mobile" | "";
20652081
}
20662082
interface ConsentPhoneFieldProps$1 extends GlobalProps, PhoneFieldProps$1 {
20672083
/**
20682084
* The policy for which user consent is being collected.
2085+
*
2086+
* Only `sms-marketing` is supported.
20692087
*/
20702088
policy?: ConsentPolicy;
20712089
}
@@ -2119,6 +2137,8 @@ interface DatePickerProps$1 extends GlobalProps, InputProps, FocusEventProps {
21192137
* So `--2024` is equivalent to `--2024-12-31`.
21202138
* - Whitespace is allowed either side of `--`.
21212139
*
2140+
* Comma-separated list of allowed dates in `YYYY-MM-DD` format.
2141+
*
21222142
* @default ""
21232143
*
21242144
* @example
@@ -2146,6 +2166,8 @@ interface DatePickerProps$1 extends GlobalProps, InputProps, FocusEventProps {
21462166
* So `--2024` is equivalent to `--2024-12-31`.
21472167
* - Whitespace is allowed either side of `--`.
21482168
*
2169+
* Comma-separated list of disallowed dates in `YYYY-MM-DD` format.
2170+
*
21492171
* @default ""
21502172
*
21512173
* @example
@@ -2210,6 +2232,8 @@ interface DatePickerProps$1 extends GlobalProps, InputProps, FocusEventProps {
22102232
* - If `type="multiple"`, this is a comma-separated list of dates in `YYYY-MM-DD` format.
22112233
* - If `type="range"`, this is a range in `YYYY-MM-DD--YYYY-MM-DD` format. The range is inclusive.
22122234
*
2235+
* Single dates use ISO 8601 format (`YYYY-MM-DD`); ranges use `YYYY-MM-DD--YYYY-MM-DD`. Locale-specific formats aren't supported.
2236+
*
22132237
* @default ""
22142238
*/
22152239
value?: string;
@@ -2327,6 +2351,9 @@ interface DropZoneProps$1 extends GlobalProps, FileInputProps, BasicFieldProps {
23272351
*/
23282352
onDropRejected?: (event: Event) => void;
23292353
}
2354+
/**
2355+
* Doesn't perform automatic format validation. Implement validation logic yourself and use the `error` prop to display results.
2356+
*/
23302357
interface EmailFieldProps$1 extends GlobalProps, BaseTextFieldProps, MinMaxLengthProps, AutocompleteProps<EmailAutocompleteField> {
23312358
}
23322359
export type EmailAutocompleteField = ExtractStrict<AnyAutocompleteField, "email" | `${AutocompleteAddressGroup} email`>;

0 commit comments

Comments
 (0)