Skip to content

Commit 19340be

Browse files
committed
Improve Forms component descriptions to match admin quality
- Update event/slot interface descriptions with Polaris handling-events and using-slots links - Align event member descriptions to admin pattern: "A callback fired when..." with MDN links - Update shared InputProps/MultipleInputProps/FileInputProps/FocusEventProps descriptions - Use lowercase friendly names for all component references in prose Made-with: Cursor
1 parent 45466e5 commit 19340be

24 files changed

Lines changed: 3352 additions & 3325 deletions

packages/ui-extensions/docs/surfaces/checkout/generated/generated_docs_data_v2.json

Lines changed: 2191 additions & 2191 deletions
Large diffs are not rendered by default.

packages/ui-extensions/docs/surfaces/customer-account/generated/customer_account_ui_extensions/2026-04-rc/generated_docs_data_v2.json

Lines changed: 939 additions & 939 deletions
Large diffs are not rendered by default.

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
3333

3434
declare const tagName = "s-checkbox";
3535
/**
36-
* The element props interface for the Checkbox component.
36+
* Configure the following properties on the checkbox component.
3737
* @publicDocs
3838
*/
3939
export interface CheckboxElementProps extends Pick<CheckboxProps$1, 'accessibilityLabel' | 'checked' | 'command' | 'commandFor' | 'defaultChecked' | 'disabled' | 'error' | 'id' | 'label' | 'name' | 'required' | 'value'> {
@@ -42,14 +42,15 @@ export interface CheckboxElementProps extends Pick<CheckboxProps$1, 'accessibili
4242
export interface CheckboxEvents extends Pick<CheckboxProps$1, 'onChange'> {
4343
}
4444
/**
45-
* The events interface for the Checkbox component.
45+
* The checkbox component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
46+
*
4647
* @publicDocs
4748
*/
4849
export interface CheckboxElementEvents {
4950
/**
50-
* A callback that is run whenever the control is changed.
51+
* A callback fired when the checkbox value changes.
5152
*
52-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
53+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
5354
*/
5455
change?: CallbackEventListener<typeof tagName>;
5556
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
2727

2828
declare const tagName = "s-chip";
2929
/**
30-
* The element props interface for the Chip component.
30+
* Configure the following properties on the chip component.
3131
* @publicDocs
3232
*/
3333
export interface ChipElementProps extends Pick<ChipProps$1, 'accessibilityLabel' | 'id'> {
3434
}
3535
/**
36-
* The slots interface for the Chip component.
36+
* The chip component supports slots for additional content placement within the component. Learn more about [using slots](/docs/api/polaris/using-polaris-web-components#slots).
3737
* @publicDocs
3838
*/
3939
export interface ChipElementSlots {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
2727

2828
declare const tagName = "s-choice";
2929
/**
30-
* The element props interface for the Choice component.
30+
* Configure the following properties on the choice component.
3131
* @publicDocs
3232
*/
3333
export interface ChoiceElementProps extends Pick<ChoiceProps$1, 'accessibilityLabel' | 'defaultSelected' | 'disabled' | 'id' | 'selected' | 'error' | 'value'> {
3434
}
3535
/**
36-
* The slots interface for the Choice component.
36+
* The choice component supports slots for additional content placement within the component. Learn more about [using slots](/docs/api/polaris/using-polaris-web-components#slots).
3737
* @publicDocs
3838
*/
3939
export interface ChoiceElementSlots {

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,23 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
3939

4040
declare const tagName = "s-choice-list";
4141
/**
42-
* The element props interface for the ChoiceList component.
42+
* Configure the following properties on the choice list component.
4343
* @publicDocs
4444
*/
4545
export interface ChoiceListElementProps extends Pick<ChoiceListProps$1, 'disabled' | 'error' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'multiple' | 'name' | 'values' | 'variant'> {
4646
}
4747
export interface ChoiceListEvents extends Pick<ChoiceListProps$1, 'onChange'> {
4848
}
4949
/**
50-
* The events interface for the ChoiceList component.
50+
* The choice list component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
51+
*
5152
* @publicDocs
5253
*/
5354
export interface ChoiceListElementEvents {
5455
/**
55-
* A callback that is run whenever the control is changed.
56+
* A callback fired when the choice list value changes.
5657
*
57-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
58+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
5859
*/
5960
change?: CallbackEventListener<typeof tagName>;
6061
}

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ declare module 'preact' {
5757

5858
declare const tagName = "s-consent-checkbox";
5959
/**
60-
* The element props interface for the ConsentCheckbox component.
60+
* Configure the following properties on the consent checkbox component.
6161
* @publicDocs
6262
*/
6363
export interface ConsentCheckboxElementProps extends Pick<ConsentCheckboxProps$1, 'accessibilityLabel' | 'checked' | 'command' | 'commandFor' | 'defaultChecked' | 'disabled' | 'error' | 'id' | 'label' | 'name' | 'policy' | 'value'> {
@@ -66,14 +66,15 @@ export interface ConsentCheckboxElementProps extends Pick<ConsentCheckboxProps$1
6666
export interface ConsentCheckboxEvents extends Pick<CheckboxEvents, 'onChange'> {
6767
}
6868
/**
69-
* The events interface for the ConsentCheckbox component.
69+
* The consent checkbox component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
70+
*
7071
* @publicDocs
7172
*/
7273
export interface ConsentCheckboxElementEvents {
7374
/**
74-
* A callback that is run whenever the control is changed.
75+
* A callback fired when the consent checkbox value changes.
7576
*
76-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
77+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
7778
*/
7879
change?: CallbackEventListener<typeof tagName>;
7980
}

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ declare module 'preact' {
7070

7171
declare const tagName = "s-consent-phone-field";
7272
/**
73-
* The element props interface for the ConsentPhoneField component.
73+
* Configure the following properties on the consent phone field component.
7474
* @publicDocs
7575
*/
7676
export interface ConsentPhoneFieldElementProps extends Pick<ConsentPhoneFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'name' | 'policy' | 'readOnly' | 'required' | 'type' | 'value'> {
@@ -83,32 +83,33 @@ export interface ConsentPhoneFieldElementProps extends Pick<ConsentPhoneFieldPro
8383
export interface ConsentPhoneFieldEvents extends Pick<PhoneFieldEvents, 'onBlur' | 'onChange' | 'onFocus' | 'onInput'> {
8484
}
8585
/**
86-
* The events interface for the ConsentPhoneField component.
86+
* The consent phone field component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
87+
*
8788
* @publicDocs
8889
*/
8990
export interface ConsentPhoneFieldElementEvents {
9091
/**
91-
* Callback when the element loses focus.
92+
* A callback fired when the consent phone field loses focus.
9293
*
93-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
94+
* Learn more about the [blur event](https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event).
9495
*/
9596
blur?: CallbackEventListener<typeof tagName>;
9697
/**
97-
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
98+
* A callback fired when the consent phone field value changes.
9899
*
99-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
100+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
100101
*/
101102
change?: CallbackEventListener<typeof tagName>;
102103
/**
103-
* Callback when the element receives focus.
104+
* A callback fired when the consent phone field receives focus.
104105
*
105-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
106+
* Learn more about the [focus event](https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event).
106107
*/
107108
focus?: CallbackEventListener<typeof tagName>;
108109
/**
109-
* Callback when the user makes any changes in the field.
110+
* A callback fired when the user inputs data into the consent phone field.
110111
*
111-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
112+
* Learn more about the [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
112113
*/
113114
input?: CallbackEventListener<typeof tagName>;
114115
}
@@ -119,13 +120,13 @@ export interface ConsentPhoneFieldElement extends ConsentPhoneFieldElementProps,
119120
oninput: ConsentPhoneFieldEvents['onInput'];
120121
}
121122
/**
122-
* The slots interface for the ConsentPhoneField component.
123+
* The consent phone field component supports slots for additional content placement within the component. Learn more about [using slots](/docs/api/polaris/using-polaris-web-components#slots).
124+
*
123125
* @publicDocs
124126
*/
125127
export interface ConsentPhoneFieldElementSlots {
126128
/**
127-
* Additional content to be displayed in the field.
128-
* Commonly used to display an icon that activates a tooltip providing more information.
129+
* Additional interactive content displayed within the field. Accepts button and clickable components with text content only. Other component types or complex layouts are not supported.
129130
*/
130131
accessory?: HTMLElement;
131132
}

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

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
3333

3434
declare const tagName = "s-date-field";
3535
/**
36-
* The element props interface for the DateField component.
36+
* Configure the following properties on the date field component.
3737
* @publicDocs
3838
*/
3939
export interface DateFieldElementProps extends Pick<DateFieldProps$1, 'allow' | 'allowDays' | 'autocomplete' | 'defaultValue' | 'defaultView' | 'disabled' | 'disallow' | 'disallowDays' | 'error' | 'id' | 'label' | 'name' | 'readOnly' | 'required' | 'value' | 'view'> {
@@ -46,32 +46,43 @@ export interface DateFieldElementProps extends Pick<DateFieldProps$1, 'allow' |
4646
export interface DateFieldEvents extends Pick<DateFieldProps$1, 'onBlur' | 'onChange' | 'onFocus' | 'onInput' | 'onInvalid' | 'onViewChange'> {
4747
}
4848
/**
49-
* The events interface for the DateField component.
49+
* The date field component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
50+
*
5051
* @publicDocs
5152
*/
5253
export interface DateFieldElementEvents {
5354
/**
54-
* Callback when the element loses focus.
55+
* A callback fired when the date field loses focus.
56+
*
57+
* Learn more about the [blur event](https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event).
5558
*/
5659
blur?: CallbackEventListener<typeof tagName>;
5760
/**
58-
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
61+
* A callback fired when the date field value changes.
62+
*
63+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
5964
*/
6065
change?: CallbackEventListener<typeof tagName>;
6166
/**
62-
* Callback when the element receives focus.
67+
* A callback fired when the date field receives focus.
68+
*
69+
* Learn more about the [focus event](https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event).
6370
*/
6471
focus?: CallbackEventListener<typeof tagName>;
6572
/**
66-
* Callback when the user makes any changes in the field.
73+
* A callback fired when the user inputs data into the date field.
74+
*
75+
* Learn more about the [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
6776
*/
6877
input?: CallbackEventListener<typeof tagName>;
6978
/**
70-
* Callback when the user enters an invalid date.
79+
* A callback fired when the date field value is invalid.
80+
*
81+
* Learn more about the [invalid event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/invalid_event).
7182
*/
7283
invalid?: CallbackEventListener<typeof tagName>;
7384
/**
74-
* Callback when the view changes.
85+
* A callback fired when the calendar view changes, such as when navigating between months.
7586
*/
7687
viewChange?: CallbackEventListener<typeof tagName>;
7788
}

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,45 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
3333

3434
declare const tagName = "s-date-picker";
3535
/**
36-
* The element props interface for the DatePicker component.
36+
* Configure the following properties on the date picker component.
3737
* @publicDocs
3838
*/
3939
export interface DatePickerElementProps extends Pick<DatePickerProps$1, 'allow' | 'allowDays' | 'defaultValue' | 'defaultView' | 'disabled' | 'disallow' | 'disallowDays' | 'id' | 'name' | 'type' | 'value' | 'view'> {
4040
}
4141
export interface DatePickerEvents extends Pick<DatePickerProps$1, 'onBlur' | 'onChange' | 'onFocus' | 'onInput' | 'onViewChange'> {
4242
}
4343
/**
44-
* The events interface for the DatePicker component.
44+
* The date picker component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
45+
*
4546
* @publicDocs
4647
*/
4748
export interface DatePickerElementEvents {
4849
/**
49-
* Callback when the element loses focus.
50+
* A callback fired when the date picker loses focus.
51+
*
52+
* Learn more about the [blur event](https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event).
5053
*/
5154
blur?: CallbackEventListener<typeof tagName>;
5255
/**
53-
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
56+
* A callback fired when the date picker value changes.
57+
*
58+
* Learn more about the [change event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event).
5459
*/
5560
change?: CallbackEventListener<typeof tagName>;
5661
/**
57-
* Callback when the element receives focus.
62+
* A callback fired when the date picker receives focus.
63+
*
64+
* Learn more about the [focus event](https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event).
5865
*/
5966
focus?: CallbackEventListener<typeof tagName>;
6067
/**
61-
* Callback when the user makes any changes in the field.
68+
* A callback fired when the user inputs data into the date picker.
69+
*
70+
* Learn more about the [input event](https://developer.mozilla.org/en-US/docs/Web/API/Element/input_event).
6271
*/
6372
input?: CallbackEventListener<typeof tagName>;
6473
/**
65-
* Callback when the view changes.
74+
* A callback fired when the calendar view changes, such as when navigating between months.
6675
*/
6776
viewChange?: CallbackEventListener<typeof tagName>;
6877
}

0 commit comments

Comments
 (0)