@shopify/ui-extensions 2025.10.5 → 2025.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +2 -2
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/Announcement/Announcement.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Announcement.d.ts +10 -5
- package/build/ts/surfaces/checkout/components/Banner/Banner.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Banner.d.ts +4 -4
- package/build/ts/surfaces/checkout/components/Button/Button.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Button.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Checkbox/Checkbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Checkbox.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Chip/Chip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ChoiceList/ChoiceList.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ChoiceList.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Clickable/Clickable.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Clickable.d.ts +5 -5
- package/build/ts/surfaces/checkout/components/ClickableChip/ClickableChip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ClickableChip.d.ts +5 -5
- package/build/ts/surfaces/checkout/components/ClipboardItem/ClipboardItem.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ClipboardItem.d.ts +4 -4
- package/build/ts/surfaces/checkout/components/ConsentCheckbox/ConsentCheckbox.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentCheckbox.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/ConsentPhoneField/ConsentPhoneField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/ConsentPhoneField.d.ts +7 -7
- package/build/ts/surfaces/checkout/components/DateField/DateField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DateField.d.ts +8 -8
- package/build/ts/surfaces/checkout/components/DatePicker/DatePicker.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DatePicker.d.ts +7 -7
- package/build/ts/surfaces/checkout/components/Details/Details.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Details.d.ts +9 -4
- package/build/ts/surfaces/checkout/components/DropZone/DropZone.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/DropZone.d.ts +5 -5
- package/build/ts/surfaces/checkout/components/EmailField/EmailField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/EmailField.d.ts +13 -7
- package/build/ts/surfaces/checkout/components/Form/Form.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Form.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Link/Link.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Link.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Map/Map.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Map.d.ts +23 -7
- package/build/ts/surfaces/checkout/components/MapMarker.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/Modal/Modal.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Modal.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/MoneyField/MoneyField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/MoneyField.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/NumberField/NumberField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/NumberField.d.ts +43 -14
- package/build/ts/surfaces/checkout/components/PasswordField/PasswordField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PasswordField.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/PhoneField/PhoneField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PhoneField.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/Popover/Popover.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Popover.d.ts +4 -4
- package/build/ts/surfaces/checkout/components/PressButton/PressButton.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/PressButton.d.ts +5 -5
- package/build/ts/surfaces/checkout/components/QRCode/QRCode.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/QRCode.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/QueryContainer/QueryContainer.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Select/Select.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Select.d.ts +5 -5
- package/build/ts/surfaces/checkout/components/Sheet/Sheet.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Sheet.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/Switch/Switch.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Switch.d.ts +3 -3
- package/build/ts/surfaces/checkout/components/TextArea/TextArea.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextArea.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/TextField/TextField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/TextField.d.ts +7 -7
- package/build/ts/surfaces/checkout/components/UrlField/UrlField.doc.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/UrlField.d.ts +6 -6
- package/build/ts/surfaces/checkout/components/components.d.ts +5 -4
- package/build/ts/surfaces/checkout/helper.docs.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/components/Announcement.d.ts +10 -5
- package/build/ts/surfaces/customer-account/components/Banner.d.ts +4 -4
- package/build/ts/surfaces/customer-account/components/Button.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Checkbox.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/ChoiceList.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Clickable.d.ts +5 -5
- package/build/ts/surfaces/customer-account/components/ClickableChip.d.ts +5 -5
- package/build/ts/surfaces/customer-account/components/ClipboardItem.d.ts +4 -4
- package/build/ts/surfaces/customer-account/components/ConsentCheckbox.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/ConsentPhoneField.d.ts +7 -7
- package/build/ts/surfaces/customer-account/components/DateField.d.ts +8 -8
- package/build/ts/surfaces/customer-account/components/DatePicker.d.ts +7 -7
- package/build/ts/surfaces/customer-account/components/Details.d.ts +9 -4
- package/build/ts/surfaces/customer-account/components/DropZone.d.ts +5 -5
- package/build/ts/surfaces/customer-account/components/EmailField.d.ts +13 -7
- package/build/ts/surfaces/customer-account/components/Form.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Link.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Map.d.ts +23 -7
- package/build/ts/surfaces/customer-account/components/MapMarker.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Modal.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/MoneyField.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/NumberField.d.ts +43 -14
- package/build/ts/surfaces/customer-account/components/PasswordField.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/PhoneField.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/Popover.d.ts +4 -4
- package/build/ts/surfaces/customer-account/components/PressButton.d.ts +5 -5
- package/build/ts/surfaces/customer-account/components/QRCode.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/Select.d.ts +5 -5
- package/build/ts/surfaces/customer-account/components/Sheet.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/Switch.d.ts +3 -3
- package/build/ts/surfaces/customer-account/components/TextArea.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/TextField.d.ts +7 -7
- package/build/ts/surfaces/customer-account/components/UrlField.d.ts +6 -6
- package/build/ts/surfaces/customer-account/components/components.d.ts +5 -4
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +2 -2
- package/src/surfaces/checkout/api/standard/standard.ts +6 -6
- package/src/surfaces/checkout/components/Announcement.d.ts +10 -5
- package/src/surfaces/checkout/components/Banner.d.ts +4 -4
- package/src/surfaces/checkout/components/Button.d.ts +3 -3
- package/src/surfaces/checkout/components/Checkbox.d.ts +3 -3
- package/src/surfaces/checkout/components/ChoiceList/examples/basic-choice-list.example.html +3 -3
- package/src/surfaces/checkout/components/ChoiceList/examples/block-choice-variant.example.html +47 -0
- package/src/surfaces/checkout/components/ChoiceList/examples/grid-choice-variant.example.html +5 -0
- package/src/surfaces/checkout/components/ChoiceList/examples/inline-choice-variant.example.html +6 -0
- package/src/surfaces/checkout/components/ChoiceList/examples/list-choice-variant.example.html +5 -0
- package/src/surfaces/checkout/components/ChoiceList.d.ts +3 -3
- package/src/surfaces/checkout/components/Clickable.d.ts +5 -5
- package/src/surfaces/checkout/components/ClickableChip.d.ts +5 -5
- package/src/surfaces/checkout/components/ClipboardItem.d.ts +4 -4
- package/src/surfaces/checkout/components/ConsentCheckbox.d.ts +3 -3
- package/src/surfaces/checkout/components/ConsentPhoneField.d.ts +7 -7
- package/src/surfaces/checkout/components/DateField.d.ts +8 -8
- package/src/surfaces/checkout/components/DatePicker.d.ts +7 -7
- package/src/surfaces/checkout/components/Details.d.ts +9 -4
- package/src/surfaces/checkout/components/DropZone.d.ts +5 -5
- package/src/surfaces/checkout/components/EmailField.d.ts +13 -7
- package/src/surfaces/checkout/components/Form.d.ts +3 -3
- package/src/surfaces/checkout/components/Icon/examples/basic-icon.example.html +4 -4
- package/src/surfaces/checkout/components/Link.d.ts +3 -3
- package/src/surfaces/checkout/components/Map/examples/map-marker-graphic.example.html +14 -0
- package/src/surfaces/checkout/components/Map/examples/map-marker-popover.example.html +14 -0
- package/src/surfaces/checkout/components/Map.d.ts +23 -7
- package/src/surfaces/checkout/components/MapMarker.d.ts +3 -3
- package/src/surfaces/checkout/components/Modal.d.ts +6 -6
- package/src/surfaces/checkout/components/MoneyField.d.ts +6 -6
- package/src/surfaces/checkout/components/NumberField.d.ts +43 -14
- package/src/surfaces/checkout/components/PasswordField.d.ts +6 -6
- package/src/surfaces/checkout/components/PaymentIcon/examples/basic-payment-icon.example.html +7 -7
- package/src/surfaces/checkout/components/PhoneField.d.ts +6 -6
- package/src/surfaces/checkout/components/Popover.d.ts +4 -4
- package/src/surfaces/checkout/components/PressButton.d.ts +5 -5
- package/src/surfaces/checkout/components/ProductThumbnail/examples/basic-product-thumbnail.example.html +1 -1
- package/src/surfaces/checkout/components/QRCode.d.ts +3 -3
- package/src/surfaces/checkout/components/Select.d.ts +5 -5
- package/src/surfaces/checkout/components/Sheet.d.ts +6 -6
- package/src/surfaces/checkout/components/Switch.d.ts +3 -3
- package/src/surfaces/checkout/components/TextArea.d.ts +6 -6
- package/src/surfaces/checkout/components/TextField.d.ts +7 -7
- package/src/surfaces/checkout/components/UrlField.d.ts +6 -6
- package/src/surfaces/checkout/components/components.d.ts +5 -4
- package/src/surfaces/checkout/helper.docs.ts +1 -67
- package/src/surfaces/checkout/style/examples/style.example.tsx +0 -22
|
@@ -27,8 +27,8 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
27
27
|
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
28
28
|
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
29
29
|
};
|
|
30
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
31
|
-
(event: CallbackEvent<TTagName,
|
|
30
|
+
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
31
|
+
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-sheet";
|
|
@@ -48,19 +48,19 @@ export interface SheetElementEvents {
|
|
|
48
48
|
/**
|
|
49
49
|
* Callback fired when the overlay is hidden **after** any animations to hide the overlay have finished.
|
|
50
50
|
*/
|
|
51
|
-
afterhide?:
|
|
51
|
+
afterhide?: CallbackEventListener<typeof tagName>;
|
|
52
52
|
/**
|
|
53
53
|
* Callback fired when the overlay is shown **after** any animations to show the overlay have finished.
|
|
54
54
|
*/
|
|
55
|
-
aftershow?:
|
|
55
|
+
aftershow?: CallbackEventListener<typeof tagName>;
|
|
56
56
|
/**
|
|
57
57
|
* Callback fired after the overlay is hidden.
|
|
58
58
|
*/
|
|
59
|
-
hide?:
|
|
59
|
+
hide?: CallbackEventListener<typeof tagName>;
|
|
60
60
|
/**
|
|
61
61
|
* Callback fired after the overlay is shown.
|
|
62
62
|
*/
|
|
63
|
-
show?:
|
|
63
|
+
show?: CallbackEventListener<typeof tagName>;
|
|
64
64
|
}
|
|
65
65
|
export interface SheetElementSlots {
|
|
66
66
|
/**
|
|
@@ -21,8 +21,8 @@ export interface BaseElementProps<TClass = HTMLElement> {
|
|
|
21
21
|
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
22
22
|
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
23
23
|
};
|
|
24
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
25
|
-
(event: CallbackEvent<TTagName,
|
|
24
|
+
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
25
|
+
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
26
26
|
}) | null;
|
|
27
27
|
|
|
28
28
|
declare const tagName = "s-switch";
|
|
@@ -37,7 +37,7 @@ export interface SwitchElementEvents {
|
|
|
37
37
|
*
|
|
38
38
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
39
39
|
*/
|
|
40
|
-
change?:
|
|
40
|
+
change?: CallbackEventListener<typeof tagName>;
|
|
41
41
|
}
|
|
42
42
|
export interface SwitchElement extends SwitchElementProps, Omit<HTMLElement, 'id' | 'onchange'> {
|
|
43
43
|
onchange: SwitchEvents['onChange'];
|
|
@@ -21,8 +21,8 @@ export interface BaseElementProps<TClass = HTMLElement> {
|
|
|
21
21
|
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
22
22
|
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
23
23
|
};
|
|
24
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
25
|
-
(event: CallbackEvent<TTagName,
|
|
24
|
+
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
25
|
+
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
26
26
|
}) | null;
|
|
27
27
|
|
|
28
28
|
declare const tagName = "s-text-area";
|
|
@@ -41,25 +41,25 @@ export interface TextAreaElementEvents {
|
|
|
41
41
|
*
|
|
42
42
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
43
43
|
*/
|
|
44
|
-
blur?:
|
|
44
|
+
blur?: CallbackEventListener<typeof tagName>;
|
|
45
45
|
/**
|
|
46
46
|
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
|
|
47
47
|
*
|
|
48
48
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
49
49
|
*/
|
|
50
|
-
change?:
|
|
50
|
+
change?: CallbackEventListener<typeof tagName>;
|
|
51
51
|
/**
|
|
52
52
|
* Callback when the element receives focus.
|
|
53
53
|
*
|
|
54
54
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
|
|
55
55
|
*/
|
|
56
|
-
focus?:
|
|
56
|
+
focus?: CallbackEventListener<typeof tagName>;
|
|
57
57
|
/**
|
|
58
58
|
* Callback when the user makes any changes in the field.
|
|
59
59
|
*
|
|
60
60
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
|
|
61
61
|
*/
|
|
62
|
-
input?:
|
|
62
|
+
input?: CallbackEventListener<typeof tagName>;
|
|
63
63
|
}
|
|
64
64
|
export interface TextAreaElement extends TextAreaElementProps, Omit<HTMLElement, 'id' | 'onblur' | 'onchange' | 'onfocus' | 'oninput'> {
|
|
65
65
|
onblur: TextAreaEvents['onBlur'];
|
|
@@ -34,8 +34,8 @@ export type ReducedIconTypes = (typeof CHECKOUT_AVAILABLE_ICONS)[number];
|
|
|
34
34
|
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
35
35
|
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
36
36
|
};
|
|
37
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
38
|
-
(event: CallbackEvent<TTagName,
|
|
37
|
+
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
38
|
+
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
39
39
|
}) | null;
|
|
40
40
|
|
|
41
41
|
declare const tagName$1 = "s-icon";
|
|
@@ -60,7 +60,7 @@ declare module 'preact' {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
declare const tagName = "s-text-field";
|
|
63
|
-
export interface TextFieldElementProps extends Pick<TextFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | '
|
|
63
|
+
export interface TextFieldElementProps extends Pick<TextFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | 'icon' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'maxLength' | 'minLength' | 'name' | 'prefix' | 'readOnly' | 'required' | 'suffix' | 'value'> {
|
|
64
64
|
icon?: IconProps['type'];
|
|
65
65
|
/**
|
|
66
66
|
* @deprecated Use `label` instead.
|
|
@@ -76,25 +76,25 @@ export interface TextFieldElementEvents {
|
|
|
76
76
|
*
|
|
77
77
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
78
78
|
*/
|
|
79
|
-
blur?:
|
|
79
|
+
blur?: CallbackEventListener<typeof tagName>;
|
|
80
80
|
/**
|
|
81
81
|
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
|
|
82
82
|
*
|
|
83
83
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
84
84
|
*/
|
|
85
|
-
change?:
|
|
85
|
+
change?: CallbackEventListener<typeof tagName>;
|
|
86
86
|
/**
|
|
87
87
|
* Callback when the element receives focus.
|
|
88
88
|
*
|
|
89
89
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
|
|
90
90
|
*/
|
|
91
|
-
focus?:
|
|
91
|
+
focus?: CallbackEventListener<typeof tagName>;
|
|
92
92
|
/**
|
|
93
93
|
* Callback when the user makes any changes in the field.
|
|
94
94
|
*
|
|
95
95
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
|
|
96
96
|
*/
|
|
97
|
-
input?:
|
|
97
|
+
input?: CallbackEventListener<typeof tagName>;
|
|
98
98
|
}
|
|
99
99
|
export interface TextFieldElementSlots {
|
|
100
100
|
/**
|
|
@@ -27,8 +27,8 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
27
27
|
export type CallbackEvent<TTagName extends keyof HTMLElementTagNameMap, TEvent extends Event = Event> = TEvent & {
|
|
28
28
|
currentTarget: HTMLElementTagNameMap[TTagName];
|
|
29
29
|
};
|
|
30
|
-
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
31
|
-
(event: CallbackEvent<TTagName,
|
|
30
|
+
export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap, TData = object> = (EventListener & {
|
|
31
|
+
(event: CallbackEvent<TTagName, Event> & TData): void;
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-url-field";
|
|
@@ -42,25 +42,25 @@ export interface UrlFieldElementEvents {
|
|
|
42
42
|
*
|
|
43
43
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
44
44
|
*/
|
|
45
|
-
blur?:
|
|
45
|
+
blur?: CallbackEventListener<typeof tagName>;
|
|
46
46
|
/**
|
|
47
47
|
* Callback when the user has **finished editing** a field, e.g. once they have blurred the field.
|
|
48
48
|
*
|
|
49
49
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/change_event
|
|
50
50
|
*/
|
|
51
|
-
change?:
|
|
51
|
+
change?: CallbackEventListener<typeof tagName>;
|
|
52
52
|
/**
|
|
53
53
|
* Callback when the element receives focus.
|
|
54
54
|
*
|
|
55
55
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/focus_event
|
|
56
56
|
*/
|
|
57
|
-
focus?:
|
|
57
|
+
focus?: CallbackEventListener<typeof tagName>;
|
|
58
58
|
/**
|
|
59
59
|
* Callback when the user makes any changes in the field.
|
|
60
60
|
*
|
|
61
61
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event
|
|
62
62
|
*/
|
|
63
|
-
input?:
|
|
63
|
+
input?: CallbackEventListener<typeof tagName>;
|
|
64
64
|
}
|
|
65
65
|
export interface UrlFieldElementSlots {
|
|
66
66
|
/**
|
|
@@ -3826,7 +3826,7 @@ declare global {
|
|
|
3826
3826
|
declare module 'preact' {
|
|
3827
3827
|
namespace createElement.JSX {
|
|
3828
3828
|
interface IntrinsicElements {
|
|
3829
|
-
[tagName$K]: ConsentPhoneFieldProps &
|
|
3829
|
+
[tagName$K]: ConsentPhoneFieldProps & BaseElementPropsWithChildren<ConsentPhoneFieldElement>;
|
|
3830
3830
|
}
|
|
3831
3831
|
}
|
|
3832
3832
|
}
|
|
@@ -3984,7 +3984,7 @@ declare global {
|
|
|
3984
3984
|
declare module 'preact' {
|
|
3985
3985
|
namespace createElement.JSX {
|
|
3986
3986
|
interface IntrinsicElements {
|
|
3987
|
-
[tagName$E]: EmailFieldProps &
|
|
3987
|
+
[tagName$E]: EmailFieldProps & BaseElementPropsWithChildren<EmailFieldElement>;
|
|
3988
3988
|
}
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
@@ -4277,7 +4277,8 @@ declare module 'preact' {
|
|
|
4277
4277
|
}
|
|
4278
4278
|
|
|
4279
4279
|
declare const tagName$r = "s-number-field";
|
|
4280
|
-
interface NumberFieldElementProps extends Pick<NumberFieldProps$1, 'autocomplete' | 'controls' | 'defaultValue' | '
|
|
4280
|
+
interface NumberFieldElementProps extends Pick<NumberFieldProps$1, 'autocomplete' | 'controls' | 'defaultValue' | 'disabled' | 'error' | 'icon' | 'inputMode' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'max' | 'min' | 'name' | 'prefix' | 'readOnly' | 'required' | 'step' | 'suffix' | 'value'> {
|
|
4281
|
+
icon?: IconProps['type'];
|
|
4281
4282
|
/**
|
|
4282
4283
|
* @deprecated Use `label` instead.
|
|
4283
4284
|
* @private
|
|
@@ -4830,7 +4831,7 @@ declare module 'preact' {
|
|
|
4830
4831
|
}
|
|
4831
4832
|
|
|
4832
4833
|
declare const tagName$5 = "s-text-field";
|
|
4833
|
-
interface TextFieldElementProps extends Pick<TextFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | '
|
|
4834
|
+
interface TextFieldElementProps extends Pick<TextFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | 'icon' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'maxLength' | 'minLength' | 'name' | 'prefix' | 'readOnly' | 'required' | 'suffix' | 'value'> {
|
|
4834
4835
|
icon?: IconProps['type'];
|
|
4835
4836
|
/**
|
|
4836
4837
|
* @deprecated Use `label` instead.
|
|
@@ -48,15 +48,6 @@ export function getExamples(
|
|
|
48
48
|
|
|
49
49
|
// Add new examples here that can be shared across multiples pages.
|
|
50
50
|
return {
|
|
51
|
-
'ui-components/checkbox-links': {
|
|
52
|
-
description:
|
|
53
|
-
'To provide buyers with additional information or references, couple it with link components seamlessly within checkbox components. This can be done by including links as part of the checkbox label in the checkbox. This will provide an easy way to access relevant content that buyers may need.',
|
|
54
|
-
image: 'checkbox-links.png',
|
|
55
|
-
codeblock: {
|
|
56
|
-
title: 'Embedding links in checkbox components',
|
|
57
|
-
tabs: getExtensionCodeTabs('ui-components/checkbox-links'),
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
51
|
'ui-components/clipboarditem-qrcode': {
|
|
61
52
|
description:
|
|
62
53
|
'When displaying a QR code, include an alternative way for the user to get the content',
|
|
@@ -66,45 +57,6 @@ export function getExamples(
|
|
|
66
57
|
tabs: getExtensionCodeTabs('ui-components/clipboarditem-qrcode'),
|
|
67
58
|
},
|
|
68
59
|
},
|
|
69
|
-
'ui-components/clipboarditem-oncopy': {
|
|
70
|
-
description:
|
|
71
|
-
'Use the onCopy property to display an icon that swaps to a checkmark when the text is copied.',
|
|
72
|
-
image: 'clipboard-oncopy.png',
|
|
73
|
-
codeblock: {
|
|
74
|
-
title: 'Swapping an icon when the text is copied',
|
|
75
|
-
tabs: getExtensionCodeTabs('ui-components/clipboarditem-oncopy'),
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
'ui-components/disclosure-and-alignment': {
|
|
79
|
-
description:
|
|
80
|
-
'Use the Disclosure component to simplify the user experience and reveal interfaces only when the customer requests it. It also demonstrates how a combination of inline and block layout components can improve the readability of information. By employing these strategies, users can easily scan and comprehend the content, making for a better user experience overall.',
|
|
81
|
-
image: 'disclosure-and-alignment.gif',
|
|
82
|
-
codeblock: {
|
|
83
|
-
title:
|
|
84
|
-
'Strategies for simplifying layout and aligning content using Disclosure and Inline/Block Layout components.',
|
|
85
|
-
tabs: getExtensionCodeTabs('ui-components/disclosure-and-alignment'),
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
'ui-components/loading-skeletons': {
|
|
89
|
-
description:
|
|
90
|
-
'When adding content to a layout, incorporate a skeleton loader that renders the approximate size and position of the content during loading. This will provide a seamless transition from skeleton loaders to the content, and prevent any layout shift when the resulting content loads.',
|
|
91
|
-
image: 'loading-skeletons.gif',
|
|
92
|
-
codeblock: {
|
|
93
|
-
title:
|
|
94
|
-
'Using skeleton loaders to prevent layout shifts on content load.',
|
|
95
|
-
tabs: getExtensionCodeTabs('ui-components/loading-skeletons'),
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
'ui-components/togglebuttongroup-time-picking': {
|
|
99
|
-
image: 'togglebuttongroup-time-picking.png',
|
|
100
|
-
description: `The ToggleButtonGroup component is ideal for a small set of options. It allows for easy scanning of available choices. Also the component’s big tap target makes it a good choice for enhanced mobile experience. However, in a grid layout, having more than 6 ToggleButtons can get overwhelming and take up too much vertical space. When there are more than 6 choices, consider using the [Select](/docs/api/checkout-ui-extensions/components/forms/select) component instead. `,
|
|
101
|
-
codeblock: {
|
|
102
|
-
title: 'Displaying a small set of time choices',
|
|
103
|
-
tabs: getExtensionCodeTabs(
|
|
104
|
-
'ui-components/togglebuttongroup-time-picking',
|
|
105
|
-
),
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
60
|
'ui-components/choicelist-survey': {
|
|
109
61
|
description: `The base variant’s flexibility allows for the creation of Likert scales using the ChoiceList component. By utilizing layout components, you can easily structure rows and columns for this purpose.`,
|
|
110
62
|
image: 'choicelist-survey.png',
|
|
@@ -131,7 +83,7 @@ export function getExamples(
|
|
|
131
83
|
},
|
|
132
84
|
'ui-components/sheet-consent': {
|
|
133
85
|
description:
|
|
134
|
-
'The Sheet component can be used to display privacy consent preferences in the Checkout interface. Sheet can be defaulted to open for this use case.\n\n This component requires access to [Customer Privacy API](/docs/api/checkout-ui-extensions/
|
|
86
|
+
'The Sheet component can be used to display privacy consent preferences in the Checkout interface. Sheet can be defaulted to open for this use case.\n\n This component requires access to [Customer Privacy API](/docs/api/checkout-ui-extensions/latest/apis/customer-privacy) to be rendered.',
|
|
135
87
|
codeblock: {
|
|
136
88
|
title: 'Using Sheet to display consent preferences',
|
|
137
89
|
tabs: getExtensionCodeTabs('ui-components/sheet-consent'),
|
|
@@ -168,24 +120,6 @@ export function getExamples(
|
|
|
168
120
|
),
|
|
169
121
|
},
|
|
170
122
|
},
|
|
171
|
-
'ui-components/switch-custom-label': {
|
|
172
|
-
description:
|
|
173
|
-
'This example demonstrates pairing the switch with a custom label and layout while keeping it accessible to screen readers.',
|
|
174
|
-
image: 'switch-custom-label.png',
|
|
175
|
-
codeblock: {
|
|
176
|
-
title: 'Custom label',
|
|
177
|
-
tabs: getExtensionCodeTabs('ui-components/switch-custom-label'),
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
'ui-components/progress-determinate-state': {
|
|
181
|
-
description:
|
|
182
|
-
'In a determinate state, [TextBlock](../titles-and-text/textblock) or [Text](../titles-and-text/text) components can be used to communicate what the progress bar is tracking, and to set clear expectations about the current progress.',
|
|
183
|
-
image: 'progress-determinate.png',
|
|
184
|
-
codeblock: {
|
|
185
|
-
title: 'Determinate state',
|
|
186
|
-
tabs: getExtensionCodeTabs('ui-components/progress-determinate-state'),
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
123
|
'ui-components/qrcode-image': {
|
|
190
124
|
description:
|
|
191
125
|
'The QRCode component can display an image in the center. Adding a logo can increase brand trust and set expectations for the action when scanning.',
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
reactExtension,
|
|
3
|
-
Style,
|
|
4
|
-
View,
|
|
5
|
-
} from '@shopify/ui-extensions-react/checkout';
|
|
6
|
-
|
|
7
|
-
export default reactExtension('purchase.checkout.block.render', () => (
|
|
8
|
-
<Extension />
|
|
9
|
-
));
|
|
10
|
-
|
|
11
|
-
function Extension() {
|
|
12
|
-
return (
|
|
13
|
-
<View
|
|
14
|
-
maxInlineSize={Style.default(200)
|
|
15
|
-
.when({viewportInlineSize: {min: 'small'}}, 300)
|
|
16
|
-
.when({viewportInlineSize: {min: 'medium'}}, 400)
|
|
17
|
-
.when({viewportInlineSize: {min: 'large'}}, 800)}
|
|
18
|
-
>
|
|
19
|
-
Responsive Content
|
|
20
|
-
</View>
|
|
21
|
-
);
|
|
22
|
-
}
|