@shopify/ui-extensions 2026.4.0 → 2026.4.2
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/admin/api/generated/generated.d.ts +62 -0
- package/build/ts/surfaces/admin/api/generated/generated.d.ts.map +1 -0
- package/build/ts/surfaces/admin/api.d.ts +1 -0
- package/build/ts/surfaces/admin/api.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/api/address-autocomplete/standard.d.ts +1 -1
- package/build/ts/surfaces/checkout/api/standard/standard.d.ts +2 -2
- package/build/ts/surfaces/checkout/components/Abbreviation.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Announcement.d.ts +2 -6
- package/build/ts/surfaces/checkout/components/Badge.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Banner.d.ts +2 -6
- package/build/ts/surfaces/checkout/components/Box.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Button.d.ts +12 -8
- package/build/ts/surfaces/checkout/components/Checkbox.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/Chip.d.ts +3 -11
- package/build/ts/surfaces/checkout/components/Choice.d.ts +2 -8
- package/build/ts/surfaces/checkout/components/ChoiceList.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/Clickable.d.ts +12 -8
- package/build/ts/surfaces/checkout/components/ClickableChip.d.ts +4 -15
- package/build/ts/surfaces/checkout/components/ClipboardItem.d.ts +2 -8
- package/build/ts/surfaces/checkout/components/ConsentCheckbox.d.ts +8 -9
- package/build/ts/surfaces/checkout/components/ConsentPhoneField.d.ts +9 -14
- package/build/ts/surfaces/checkout/components/DateField.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/DatePicker.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/Details.d.ts +7 -16
- package/build/ts/surfaces/checkout/components/DropZone.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/EmailField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/Form.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/Grid.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/GridItem.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Heading.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Link.d.ts +2 -8
- package/build/ts/surfaces/checkout/components/ListItem.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/MapMarker.d.ts +3 -6
- package/build/ts/surfaces/checkout/components/MoneyField.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/NumberField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/Option.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/OrderedList.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Paragraph.d.ts +12 -4
- package/build/ts/surfaces/checkout/components/PasswordField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/PhoneField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/PressButton.d.ts +2 -8
- package/build/ts/surfaces/checkout/components/Progress.d.ts +3 -5
- package/build/ts/surfaces/checkout/components/ScrollBox.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Select.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/SkeletonParagraph.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Spinner.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Stack.d.ts +1 -3
- package/build/ts/surfaces/checkout/components/Summary.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/Switch.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/Text.d.ts +18 -5
- package/build/ts/surfaces/checkout/components/TextArea.d.ts +2 -9
- package/build/ts/surfaces/checkout/components/TextField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/Time.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/UnorderedList.d.ts +1 -4
- package/build/ts/surfaces/checkout/components/UrlField.d.ts +3 -14
- package/build/ts/surfaces/checkout/components/components-shared.d.ts +126 -127
- package/build/ts/surfaces/checkout/components/components.d.ts +9 -11
- package/build/ts/surfaces/customer-account/api/docs.d.ts +12 -19
- package/build/ts/surfaces/customer-account/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts +7 -9
- package/build/ts/surfaces/customer-account/api/order-status/order-status.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/shared.d.ts +1 -2
- package/build/ts/surfaces/customer-account/api/shared.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/components/Abbreviation.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/Announcement.d.ts +2 -6
- package/build/ts/surfaces/customer-account/components/Badge.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Banner.d.ts +2 -6
- package/build/ts/surfaces/customer-account/components/Box.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Button.d.ts +12 -8
- package/build/ts/surfaces/customer-account/components/Checkbox.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/Chip.d.ts +3 -11
- package/build/ts/surfaces/customer-account/components/Choice.d.ts +2 -8
- package/build/ts/surfaces/customer-account/components/ChoiceList.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/Clickable.d.ts +12 -8
- package/build/ts/surfaces/customer-account/components/ClickableChip.d.ts +4 -15
- package/build/ts/surfaces/customer-account/components/ClipboardItem.d.ts +2 -8
- package/build/ts/surfaces/customer-account/components/ConsentCheckbox.d.ts +8 -9
- package/build/ts/surfaces/customer-account/components/ConsentPhoneField.d.ts +9 -14
- package/build/ts/surfaces/customer-account/components/DateField.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/DatePicker.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/Details.d.ts +7 -16
- package/build/ts/surfaces/customer-account/components/DropZone.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/EmailField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/Form.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/Grid.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/GridItem.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Heading.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/Link.d.ts +2 -8
- package/build/ts/surfaces/customer-account/components/ListItem.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/MapMarker.d.ts +3 -6
- package/build/ts/surfaces/customer-account/components/MoneyField.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/NumberField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/Option.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/OrderedList.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/Paragraph.d.ts +12 -4
- package/build/ts/surfaces/customer-account/components/PasswordField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/PhoneField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/PressButton.d.ts +2 -8
- package/build/ts/surfaces/customer-account/components/Progress.d.ts +3 -5
- package/build/ts/surfaces/customer-account/components/ScrollBox.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Select.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/SkeletonParagraph.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/Spinner.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Stack.d.ts +1 -3
- package/build/ts/surfaces/customer-account/components/Summary.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/Switch.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/Text.d.ts +18 -5
- package/build/ts/surfaces/customer-account/components/TextArea.d.ts +2 -9
- package/build/ts/surfaces/customer-account/components/TextField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/Time.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/UnorderedList.d.ts +1 -4
- package/build/ts/surfaces/customer-account/components/UrlField.d.ts +3 -14
- package/build/ts/surfaces/customer-account/components/components-shared.d.ts +126 -127
- package/build/ts/surfaces/customer-account/components/components.d.ts +9 -11
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/admin/api/generated/generated.ts +76 -0
- package/src/surfaces/admin/api.ts +6 -0
- package/src/surfaces/checkout/api/address-autocomplete/standard.ts +1 -1
- package/src/surfaces/checkout/api/standard/standard.ts +2 -2
- package/src/surfaces/checkout/components/Abbreviation.d.ts +1 -4
- package/src/surfaces/checkout/components/Announcement.d.ts +2 -6
- package/src/surfaces/checkout/components/Badge.d.ts +1 -3
- package/src/surfaces/checkout/components/Banner.d.ts +2 -6
- package/src/surfaces/checkout/components/Box.d.ts +1 -3
- package/src/surfaces/checkout/components/Button.d.ts +12 -8
- package/src/surfaces/checkout/components/Checkbox.d.ts +2 -9
- package/src/surfaces/checkout/components/Chip.d.ts +3 -11
- package/src/surfaces/checkout/components/Choice.d.ts +2 -8
- package/src/surfaces/checkout/components/ChoiceList.d.ts +2 -9
- package/src/surfaces/checkout/components/Clickable.d.ts +12 -8
- package/src/surfaces/checkout/components/ClickableChip.d.ts +4 -15
- package/src/surfaces/checkout/components/ClipboardItem.d.ts +2 -8
- package/src/surfaces/checkout/components/ConsentCheckbox.d.ts +8 -9
- package/src/surfaces/checkout/components/ConsentPhoneField.d.ts +9 -14
- package/src/surfaces/checkout/components/DateField.d.ts +2 -9
- package/src/surfaces/checkout/components/DatePicker.d.ts +2 -9
- package/src/surfaces/checkout/components/Details.d.ts +7 -16
- package/src/surfaces/checkout/components/DropZone.d.ts +2 -9
- package/src/surfaces/checkout/components/EmailField.d.ts +3 -14
- package/src/surfaces/checkout/components/Form.d.ts +2 -9
- package/src/surfaces/checkout/components/Grid.d.ts +1 -3
- package/src/surfaces/checkout/components/GridItem.d.ts +1 -3
- package/src/surfaces/checkout/components/Heading.d.ts +1 -4
- package/src/surfaces/checkout/components/Link.d.ts +2 -8
- package/src/surfaces/checkout/components/ListItem.d.ts +1 -4
- package/src/surfaces/checkout/components/MapMarker.d.ts +3 -6
- package/src/surfaces/checkout/components/MoneyField.d.ts +2 -9
- package/src/surfaces/checkout/components/NumberField.d.ts +3 -14
- package/src/surfaces/checkout/components/Option.d.ts +1 -4
- package/src/surfaces/checkout/components/OrderedList.d.ts +1 -4
- package/src/surfaces/checkout/components/Paragraph.d.ts +12 -4
- package/src/surfaces/checkout/components/PasswordField.d.ts +3 -14
- package/src/surfaces/checkout/components/PhoneField.d.ts +3 -14
- package/src/surfaces/checkout/components/PressButton.d.ts +2 -8
- package/src/surfaces/checkout/components/Progress.d.ts +3 -5
- package/src/surfaces/checkout/components/ScrollBox.d.ts +1 -3
- package/src/surfaces/checkout/components/Select.d.ts +2 -9
- package/src/surfaces/checkout/components/SkeletonParagraph.d.ts +1 -4
- package/src/surfaces/checkout/components/Spinner.d.ts +1 -3
- package/src/surfaces/checkout/components/Stack.d.ts +1 -3
- package/src/surfaces/checkout/components/Summary.d.ts +1 -4
- package/src/surfaces/checkout/components/Switch.d.ts +2 -9
- package/src/surfaces/checkout/components/Text.d.ts +18 -5
- package/src/surfaces/checkout/components/TextArea.d.ts +2 -9
- package/src/surfaces/checkout/components/TextField.d.ts +3 -14
- package/src/surfaces/checkout/components/Time.d.ts +1 -4
- package/src/surfaces/checkout/components/UnorderedList.d.ts +1 -4
- package/src/surfaces/checkout/components/UrlField.d.ts +3 -14
- package/src/surfaces/checkout/components/components-shared.d.ts +126 -127
- package/src/surfaces/checkout/components/components.d.ts +9 -11
- package/src/surfaces/customer-account/api/docs.ts +12 -19
- package/src/surfaces/customer-account/api/order-status/order-status.ts +7 -9
- package/src/surfaces/customer-account/api/shared.ts +1 -2
package/package.json
CHANGED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** Response handle on `shopify.intents.response` with a typed `ok` payload. */
|
|
2
|
+
export interface ShopifyGeneratedIntentResponse<Data = unknown> {
|
|
3
|
+
ok(data?: Data): Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ShopifyGeneratedIntentVariant<
|
|
7
|
+
Request = unknown,
|
|
8
|
+
ResponseData = unknown,
|
|
9
|
+
> {
|
|
10
|
+
request: Request;
|
|
11
|
+
response?: ShopifyGeneratedIntentResponse<ResponseData>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Replaces `value`/`subscribe` on a signal-like object while preserving other keys.
|
|
15
|
+
type ReplaceSubscribableValue<Base, Value> = Base extends {
|
|
16
|
+
value: unknown;
|
|
17
|
+
subscribe: (callback: (value: infer _) => void) => () => void;
|
|
18
|
+
}
|
|
19
|
+
? Omit<Base, 'value' | 'subscribe'> & {
|
|
20
|
+
readonly value: Value;
|
|
21
|
+
subscribe: (callback: (value: Value) => void) => () => void;
|
|
22
|
+
}
|
|
23
|
+
: {
|
|
24
|
+
readonly value: Value;
|
|
25
|
+
subscribe: (callback: (value: Value) => void) => () => void;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
type MergeGeneratedIntentResponse<BaseIntents, Variants> =
|
|
29
|
+
Variants extends infer Variant
|
|
30
|
+
? Variant extends {request: infer GeneratedRequest}
|
|
31
|
+
? Omit<Variant, 'request' | 'response'> & {
|
|
32
|
+
request: BaseIntents extends {request: infer BaseRequest}
|
|
33
|
+
? ReplaceSubscribableValue<BaseRequest, GeneratedRequest | null>
|
|
34
|
+
: {
|
|
35
|
+
readonly value: GeneratedRequest | null;
|
|
36
|
+
subscribe: (
|
|
37
|
+
callback: (value: GeneratedRequest | null) => void,
|
|
38
|
+
) => () => void;
|
|
39
|
+
};
|
|
40
|
+
} & (Variant extends {response?: infer GeneratedResponse}
|
|
41
|
+
? BaseIntents extends {response: infer BaseResponse}
|
|
42
|
+
? {
|
|
43
|
+
response: Omit<NonNullable<BaseResponse>, 'ok'> &
|
|
44
|
+
NonNullable<GeneratedResponse>;
|
|
45
|
+
}
|
|
46
|
+
: {response: NonNullable<GeneratedResponse>}
|
|
47
|
+
: unknown)
|
|
48
|
+
: Variant
|
|
49
|
+
: never;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Merges generated intent variants into a target's base `Api`. Narrows
|
|
53
|
+
* `intents.request` to the union and specialises `intents.response.ok`;
|
|
54
|
+
* introduces `intents` if the base has none.
|
|
55
|
+
*/
|
|
56
|
+
export type WithGeneratedIntents<Api, Variants> = Api extends {
|
|
57
|
+
intents?: infer BaseIntents;
|
|
58
|
+
}
|
|
59
|
+
? Omit<Api, 'intents'> & {
|
|
60
|
+
intents: Omit<NonNullable<BaseIntents>, 'request' | 'response'> &
|
|
61
|
+
MergeGeneratedIntentResponse<NonNullable<BaseIntents>, Variants>;
|
|
62
|
+
}
|
|
63
|
+
: Api & {intents: Variants};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Merges generated tool registrations into a target's base `Api`. Replaces
|
|
67
|
+
* `tools.register` with the typed overloads in `Tools`; introduces `tools` if
|
|
68
|
+
* the base has none.
|
|
69
|
+
*/
|
|
70
|
+
export type WithGeneratedTools<Api, Tools> = Api extends {
|
|
71
|
+
tools?: infer BaseTools;
|
|
72
|
+
}
|
|
73
|
+
? Omit<Api, 'tools'> & {
|
|
74
|
+
tools: Omit<NonNullable<BaseTools>, 'register'> & Tools;
|
|
75
|
+
}
|
|
76
|
+
: Api & {tools: Tools};
|
|
@@ -16,3 +16,9 @@ export type {ValidationSettingsApi} from './api/checkout-rules/validation-settin
|
|
|
16
16
|
export type {PurchaseOptionsCardConfigurationApi} from './api/purchase-options-card-action';
|
|
17
17
|
export type {DiscountFunctionSettingsApi} from './api/discount-function-settings/discount-function-settings';
|
|
18
18
|
export type {IntentRenderApi} from './api/intents/intent-render';
|
|
19
|
+
export type {
|
|
20
|
+
ShopifyGeneratedIntentResponse,
|
|
21
|
+
ShopifyGeneratedIntentVariant,
|
|
22
|
+
WithGeneratedIntents,
|
|
23
|
+
WithGeneratedTools,
|
|
24
|
+
} from './api/generated/generated';
|
|
@@ -110,7 +110,7 @@ export interface AddressAutocompleteStandardApi<
|
|
|
110
110
|
*
|
|
111
111
|
* If the previous token expires, this value will reflect a new session token with a new signature and expiry.
|
|
112
112
|
*
|
|
113
|
-
*
|
|
113
|
+
* Learn more about [session tokens](/docs/apps/build/authentication-authorization/session-tokens).
|
|
114
114
|
*/
|
|
115
115
|
sessionToken: SessionToken;
|
|
116
116
|
|
|
@@ -737,7 +737,7 @@ export interface StandardApi<Target extends ExtensionTarget = ExtensionTarget> {
|
|
|
737
737
|
*
|
|
738
738
|
* If the previous token expires, this value reflects a new session token with a new signature and expiry.
|
|
739
739
|
*
|
|
740
|
-
*
|
|
740
|
+
* Learn more about [session tokens](/docs/apps/build/authentication-authorization/session-tokens).
|
|
741
741
|
*/
|
|
742
742
|
sessionToken: SessionToken;
|
|
743
743
|
|
|
@@ -1456,7 +1456,7 @@ export type Interceptor = (
|
|
|
1456
1456
|
*/
|
|
1457
1457
|
export interface Customer {
|
|
1458
1458
|
/**
|
|
1459
|
-
*
|
|
1459
|
+
* An identifier for the customer in the format `gid://shopify/Customer/<id>`. This value is unique per shop.
|
|
1460
1460
|
*
|
|
1461
1461
|
* {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).
|
|
1462
1462
|
*
|
|
@@ -26,10 +26,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare const tagName = "s-abbreviation";
|
|
29
|
-
/**
|
|
30
|
-
* The element props interface for the Abbreviation component.
|
|
31
|
-
* @publicDocs
|
|
32
|
-
*/
|
|
29
|
+
/** @publicDocs */
|
|
33
30
|
export interface AbbreviationElementProps extends Pick<AbbreviationProps$1, 'title' | 'id'> {
|
|
34
31
|
}
|
|
35
32
|
export interface AbbreviationElement extends AbbreviationElementProps, Omit<HTMLElement, 'id' | 'title'> {
|
|
@@ -60,9 +60,7 @@ export interface ToggleArgumentsEvent {
|
|
|
60
60
|
declare const tagName = "s-announcement";
|
|
61
61
|
export interface AnnouncementEvents extends Pick<AnnouncementProps$1, 'onAfterToggle' | 'onDismiss' | 'onToggle'> {
|
|
62
62
|
}
|
|
63
|
-
/**
|
|
64
|
-
* @publicDocs
|
|
65
|
-
*/
|
|
63
|
+
/** @publicDocs */
|
|
66
64
|
export interface AnnouncementElementEvents {
|
|
67
65
|
/**
|
|
68
66
|
* A callback that fires when the element state changes, after any toggle animations have finished.
|
|
@@ -104,9 +102,7 @@ export interface AnnouncementMethods {
|
|
|
104
102
|
*/
|
|
105
103
|
dismiss: () => void;
|
|
106
104
|
}
|
|
107
|
-
/**
|
|
108
|
-
* @publicDocs
|
|
109
|
-
*/
|
|
105
|
+
/** @publicDocs */
|
|
110
106
|
export interface AnnouncementElementMethods {
|
|
111
107
|
/**
|
|
112
108
|
* Programmatically dismisses the announcement. This triggers the `dismiss` event callback.
|
|
@@ -35,9 +35,7 @@ declare const CHECKOUT_AVAILABLE_ICONS: readonly ["alert-circle", "alert-triangl
|
|
|
35
35
|
export type ReducedIconTypes = (typeof CHECKOUT_AVAILABLE_ICONS)[number];
|
|
36
36
|
|
|
37
37
|
declare const tagName = "s-badge";
|
|
38
|
-
/**
|
|
39
|
-
* @publicDocs
|
|
40
|
-
*/
|
|
38
|
+
/** @publicDocs */
|
|
41
39
|
export interface BadgeElementProps extends Pick<BadgeProps$1, 'color' | 'icon' | 'iconPosition' | 'id' | 'size' | 'tone'> {
|
|
42
40
|
/**
|
|
43
41
|
* The size of the badge.
|
|
@@ -38,9 +38,7 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
38
38
|
}) | null;
|
|
39
39
|
|
|
40
40
|
declare const tagName = "s-banner";
|
|
41
|
-
/**
|
|
42
|
-
* @publicDocs
|
|
43
|
-
*/
|
|
41
|
+
/** @publicDocs */
|
|
44
42
|
export interface BannerElementProps extends Pick<BannerProps$1, 'collapsible' | 'dismissible' | 'heading' | 'hidden' | 'id' | 'tone'> {
|
|
45
43
|
/**
|
|
46
44
|
* Whether the banner content can be collapsed and expanded by the user. A collapsible banner conceals child elements initially, allowing the user to expand the banner to reveal them.
|
|
@@ -93,9 +91,7 @@ export interface BannerElementProps extends Pick<BannerProps$1, 'collapsible' |
|
|
|
93
91
|
}
|
|
94
92
|
export interface BannerEvents extends Pick<BannerProps$1, 'onAfterHide' | 'onDismiss'> {
|
|
95
93
|
}
|
|
96
|
-
/**
|
|
97
|
-
* @publicDocs
|
|
98
|
-
*/
|
|
94
|
+
/** @publicDocs */
|
|
99
95
|
export interface BannerElementEvents {
|
|
100
96
|
/**
|
|
101
97
|
* A callback that fires when the banner has fully hidden, including after any hide animations have completed.
|
|
@@ -46,9 +46,7 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
declare const tagName = "s-box";
|
|
49
|
-
/**
|
|
50
|
-
* @publicDocs
|
|
51
|
-
*/
|
|
49
|
+
/** @publicDocs */
|
|
52
50
|
export interface BoxElementProps extends Pick<BoxProps$1, 'accessibilityLabel' | 'accessibilityRole' | 'accessibilityVisibility' | 'background' | 'blockSize' | 'border' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'display' | 'id' | 'inlineSize' | 'maxBlockSize' | 'maxInlineSize' | 'minBlockSize' | 'minInlineSize' | 'overflow' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart'> {
|
|
53
51
|
/**
|
|
54
52
|
* The background color of the box.
|
|
@@ -38,22 +38,26 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
38
38
|
}) | null;
|
|
39
39
|
|
|
40
40
|
declare const tagName = "s-button";
|
|
41
|
-
/**
|
|
42
|
-
* Configure the following properties on the button component.
|
|
43
|
-
* @publicDocs
|
|
44
|
-
*/
|
|
41
|
+
/** @publicDocs */
|
|
45
42
|
export interface ButtonElementProps extends Pick<ButtonProps$1, 'accessibilityLabel' | 'command' | 'commandFor' | 'disabled' | 'href' | 'id' | 'inlineSize' | 'interestFor' | 'loading' | 'target' | 'tone' | 'type' | 'variant'> {
|
|
46
43
|
target?: Extract<ButtonProps$1['target'], 'auto' | '_blank'>;
|
|
47
44
|
tone?: Extract<ButtonProps$1['tone'], 'auto' | 'neutral' | 'critical'>;
|
|
45
|
+
/**
|
|
46
|
+
* The behavioral type of the button component, which determines what action it performs when activated.
|
|
47
|
+
*
|
|
48
|
+
* - `submit`: Submits the nearest containing form.
|
|
49
|
+
* - `button`: Performs no default action, relying on the `click` event handler for behavior.
|
|
50
|
+
*
|
|
51
|
+
* This property is ignored if `href` or `commandFor`/`command` is set.
|
|
52
|
+
*
|
|
53
|
+
* @default 'button'
|
|
54
|
+
*/
|
|
48
55
|
type?: Extract<ButtonProps$1['type'], 'submit' | 'button'>;
|
|
49
56
|
variant?: Extract<ButtonProps$1['variant'], 'auto' | 'primary' | 'secondary'>;
|
|
50
57
|
}
|
|
51
58
|
export interface ButtonEvents extends Pick<ButtonProps$1, 'onClick'> {
|
|
52
59
|
}
|
|
53
|
-
/**
|
|
54
|
-
* The button component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
55
|
-
* @publicDocs
|
|
56
|
-
*/
|
|
60
|
+
/** @publicDocs */
|
|
57
61
|
export interface ButtonElementEvents {
|
|
58
62
|
/**
|
|
59
63
|
* A callback fired when the button is clicked. This will be called before the action indicated by `type`.
|
|
@@ -32,20 +32,13 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-checkbox";
|
|
35
|
-
/**
|
|
36
|
-
* Configure the following properties on the checkbox component.
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
35
|
+
/** @publicDocs */
|
|
39
36
|
export interface CheckboxElementProps extends Pick<CheckboxProps$1, 'accessibilityLabel' | 'checked' | 'command' | 'commandFor' | 'defaultChecked' | 'disabled' | 'error' | 'id' | 'label' | 'name' | 'required' | 'value'> {
|
|
40
37
|
command?: Extract<CheckboxProps$1['command'], '--auto' | '--show' | '--hide' | '--toggle'>;
|
|
41
38
|
}
|
|
42
39
|
export interface CheckboxEvents extends Pick<CheckboxProps$1, 'onChange'> {
|
|
43
40
|
}
|
|
44
|
-
/**
|
|
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
|
-
*
|
|
47
|
-
* @publicDocs
|
|
48
|
-
*/
|
|
41
|
+
/** @publicDocs */
|
|
49
42
|
export interface CheckboxElementEvents {
|
|
50
43
|
/**
|
|
51
44
|
* A callback fired when the checkbox value changes.
|
|
@@ -26,21 +26,13 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare const tagName = "s-chip";
|
|
29
|
-
/**
|
|
30
|
-
* Configure the following properties on the chip component.
|
|
31
|
-
* @publicDocs
|
|
32
|
-
*/
|
|
29
|
+
/** @publicDocs */
|
|
33
30
|
export interface ChipElementProps extends Pick<ChipProps$1, 'accessibilityLabel' | 'id'> {
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
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).
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
32
|
+
/** @publicDocs */
|
|
39
33
|
export interface ChipElementSlots {
|
|
40
34
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* Only `s-icon` element and its `type` attribute are supported.
|
|
35
|
+
* An optional graphic displayed at the start of the chip, such as an icon to visually reinforce the chip's label. Only the `s-icon` element and its `type` attribute are supported.
|
|
44
36
|
*/
|
|
45
37
|
graphic?: HTMLElement;
|
|
46
38
|
}
|
|
@@ -26,16 +26,10 @@ export interface BaseElementPropsWithChildren<TClass = HTMLElement> extends Base
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare const tagName = "s-choice";
|
|
29
|
-
/**
|
|
30
|
-
* Configure the following properties on the choice component.
|
|
31
|
-
* @publicDocs
|
|
32
|
-
*/
|
|
29
|
+
/** @publicDocs */
|
|
33
30
|
export interface ChoiceElementProps extends Pick<ChoiceProps$1, 'accessibilityLabel' | 'defaultSelected' | 'disabled' | 'id' | 'selected' | 'error' | 'value'> {
|
|
34
31
|
}
|
|
35
|
-
/**
|
|
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).
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
32
|
+
/** @publicDocs */
|
|
39
33
|
export interface ChoiceElementSlots {
|
|
40
34
|
/**
|
|
41
35
|
* Additional text to provide context or guidance for the input.
|
|
@@ -38,19 +38,12 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
38
38
|
}) | null;
|
|
39
39
|
|
|
40
40
|
declare const tagName = "s-choice-list";
|
|
41
|
-
/**
|
|
42
|
-
* Configure the following properties on the choice list component.
|
|
43
|
-
* @publicDocs
|
|
44
|
-
*/
|
|
41
|
+
/** @publicDocs */
|
|
45
42
|
export interface ChoiceListElementProps extends Pick<ChoiceListProps$1, 'disabled' | 'error' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'multiple' | 'name' | 'values' | 'variant'> {
|
|
46
43
|
}
|
|
47
44
|
export interface ChoiceListEvents extends Pick<ChoiceListProps$1, 'onChange'> {
|
|
48
45
|
}
|
|
49
|
-
/**
|
|
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
|
-
*
|
|
52
|
-
* @publicDocs
|
|
53
|
-
*/
|
|
46
|
+
/** @publicDocs */
|
|
54
47
|
export interface ChoiceListElementEvents {
|
|
55
48
|
/**
|
|
56
49
|
* A callback fired when the choice list value changes.
|
|
@@ -58,24 +58,28 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
58
58
|
}) | null;
|
|
59
59
|
|
|
60
60
|
declare const tagName = "s-clickable";
|
|
61
|
-
/**
|
|
62
|
-
* Configure the following properties on the clickable component.
|
|
63
|
-
* @publicDocs
|
|
64
|
-
*/
|
|
61
|
+
/** @publicDocs */
|
|
65
62
|
export interface ClickableElementProps extends Pick<ClickableProps$1, 'accessibilityLabel' | 'accessibilityVisibility' | 'background' | 'blockSize' | 'border' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'command' | 'commandFor' | 'disabled' | 'display' | 'href' | 'id' | 'inlineSize' | 'interestFor' | 'lang' | 'loading' | 'maxBlockSize' | 'maxInlineSize' | 'minBlockSize' | 'minInlineSize' | 'overflow' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'target' | 'type'> {
|
|
66
63
|
background?: Extract<ClickableProps$1['background'], 'transparent' | 'subdued' | 'base'>;
|
|
67
64
|
border?: BorderShorthand;
|
|
68
65
|
borderWidth?: MaybeAllValuesShorthandProperty<ReducedBorderSizeKeyword> | '';
|
|
69
66
|
borderRadius?: MaybeAllValuesShorthandProperty<Extract<ClickableProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>>;
|
|
70
67
|
target?: Extract<ClickableProps$1['target'], 'auto' | '_blank'>;
|
|
68
|
+
/**
|
|
69
|
+
* The behavioral type of the clickable component, which determines what action it performs when activated.
|
|
70
|
+
*
|
|
71
|
+
* - `submit`: Submits the nearest containing form.
|
|
72
|
+
* - `button`: Performs no default action, relying on the `click` event handler for behavior.
|
|
73
|
+
*
|
|
74
|
+
* This property is ignored if `href` or `commandFor`/`command` is set.
|
|
75
|
+
*
|
|
76
|
+
* @default 'button'
|
|
77
|
+
*/
|
|
71
78
|
type?: Extract<ClickableProps$1['type'], 'submit' | 'button'>;
|
|
72
79
|
}
|
|
73
80
|
export interface ClickableEvents extends Pick<ClickableProps$1, 'onBlur' | 'onClick' | 'onFocus'> {
|
|
74
81
|
}
|
|
75
|
-
/**
|
|
76
|
-
* The clickable component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
77
|
-
* @publicDocs
|
|
78
|
-
*/
|
|
82
|
+
/** @publicDocs */
|
|
79
83
|
export interface ClickableElementEvents {
|
|
80
84
|
/**
|
|
81
85
|
* A callback fired when the component loses focus.
|
|
@@ -38,18 +38,12 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
38
38
|
}) | null;
|
|
39
39
|
|
|
40
40
|
declare const tagName = "s-clickable-chip";
|
|
41
|
-
/**
|
|
42
|
-
* Configure the following properties on the clickable chip component.
|
|
43
|
-
* @publicDocs
|
|
44
|
-
*/
|
|
41
|
+
/** @publicDocs */
|
|
45
42
|
export interface ClickableChipElementProps extends Pick<ClickableChipProps$1, 'accessibilityLabel' | 'disabled' | 'hidden' | 'href' | 'id' | 'removable'> {
|
|
46
43
|
}
|
|
47
44
|
export interface ClickableChipEvents extends Pick<ClickableChipProps$1, 'onAfterHide' | 'onClick' | 'onRemove'> {
|
|
48
45
|
}
|
|
49
|
-
/**
|
|
50
|
-
* The clickable chip component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
51
|
-
* @publicDocs
|
|
52
|
-
*/
|
|
46
|
+
/** @publicDocs */
|
|
53
47
|
export interface ClickableChipElementEvents {
|
|
54
48
|
/**
|
|
55
49
|
* A callback fired after the chip is hidden. The `hidden` property will be `true` when this event fires.
|
|
@@ -66,15 +60,10 @@ export interface ClickableChipElementEvents {
|
|
|
66
60
|
*/
|
|
67
61
|
remove?: CallbackEventListener<typeof tagName>;
|
|
68
62
|
}
|
|
69
|
-
/**
|
|
70
|
-
* The clickable chip component supports slots for additional content placement. Learn more about [using slots](/docs/api/polaris/using-polaris-web-components#slots).
|
|
71
|
-
* @publicDocs
|
|
72
|
-
*/
|
|
63
|
+
/** @publicDocs */
|
|
73
64
|
export interface ClickableChipElementSlots {
|
|
74
65
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Only `s-icon` element and its `type` attribute are supported.
|
|
66
|
+
* An optional graphic displayed at the start of the chip, such as an icon to visually reinforce the chip's label. Only the `s-icon` element and its `type` attribute are supported.
|
|
78
67
|
*/
|
|
79
68
|
graphic?: HTMLElement;
|
|
80
69
|
}
|
|
@@ -32,18 +32,12 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-clipboard-item";
|
|
35
|
-
/**
|
|
36
|
-
* Configure the following properties on the clipboard item component.
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
35
|
+
/** @publicDocs */
|
|
39
36
|
export interface ClipboardItemElementProps extends Pick<ClipboardItemProps$1, 'id' | 'text'> {
|
|
40
37
|
}
|
|
41
38
|
export interface ClipboardItemEvents extends Pick<ClipboardItemProps$1, 'onCopy' | 'onCopyError'> {
|
|
42
39
|
}
|
|
43
|
-
/**
|
|
44
|
-
* The clipboard item component provides event callbacks for handling copy interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
45
|
-
* @publicDocs
|
|
46
|
-
*/
|
|
40
|
+
/** @publicDocs */
|
|
47
41
|
export interface ClipboardItemElementEvents {
|
|
48
42
|
/**
|
|
49
43
|
* A callback fired when the text is successfully copied to the clipboard. Use this to show a confirmation message or update the UI.
|
|
@@ -56,20 +56,19 @@ declare module 'preact' {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
declare const tagName = "s-consent-checkbox";
|
|
59
|
-
/**
|
|
60
|
-
* Configure the following properties on the consent checkbox component.
|
|
61
|
-
* @publicDocs
|
|
62
|
-
*/
|
|
59
|
+
/** @publicDocs */
|
|
63
60
|
export interface ConsentCheckboxElementProps extends Pick<ConsentCheckboxProps$1, 'accessibilityLabel' | 'checked' | 'command' | 'commandFor' | 'defaultChecked' | 'disabled' | 'error' | 'id' | 'label' | 'name' | 'policy' | 'value'> {
|
|
64
61
|
command?: Extract<ConsentCheckboxProps$1['command'], '--auto' | '--show' | '--hide' | '--toggle'>;
|
|
62
|
+
/**
|
|
63
|
+
* The policy for which buyer consent is being collected. Used by the [consent checkbox](/docs/api/{API_NAME}/{API_VERSION}/web-components/forms/consent-checkbox) and [consent phone field](/docs/api/{API_NAME}/{API_VERSION}/web-components/forms/consent-phone-field) components to identify the type of marketing permission requested.
|
|
64
|
+
*
|
|
65
|
+
* - `sms-marketing`: Represents the policy for SMS marketing consent.
|
|
66
|
+
*/
|
|
67
|
+
policy?: ConsentCheckboxProps$1['policy'];
|
|
65
68
|
}
|
|
66
69
|
export interface ConsentCheckboxEvents extends Pick<CheckboxEvents, 'onChange'> {
|
|
67
70
|
}
|
|
68
|
-
/**
|
|
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
|
-
*
|
|
71
|
-
* @publicDocs
|
|
72
|
-
*/
|
|
71
|
+
/** @publicDocs */
|
|
73
72
|
export interface ConsentCheckboxElementEvents {
|
|
74
73
|
/**
|
|
75
74
|
* A callback fired when the consent checkbox value changes.
|
|
@@ -69,24 +69,23 @@ declare module 'preact' {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
declare const tagName = "s-consent-phone-field";
|
|
72
|
-
/**
|
|
73
|
-
* Configure the following properties on the consent phone field component.
|
|
74
|
-
* @publicDocs
|
|
75
|
-
*/
|
|
72
|
+
/** @publicDocs */
|
|
76
73
|
export interface ConsentPhoneFieldElementProps extends Pick<ConsentPhoneFieldProps$1, 'autocomplete' | 'defaultValue' | 'disabled' | 'error' | 'id' | 'label' | 'labelAccessibilityVisibility' | 'name' | 'policy' | 'readOnly' | 'required' | 'type' | 'value'> {
|
|
77
74
|
/**
|
|
78
75
|
* @deprecated Use `label` instead.
|
|
79
76
|
* @private
|
|
80
77
|
*/
|
|
81
78
|
placeholder?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The policy for which buyer consent is being collected. Used by the [consent checkbox](/docs/api/{API_NAME}/{API_VERSION}/web-components/forms/consent-checkbox) and [consent phone field](/docs/api/{API_NAME}/{API_VERSION}/web-components/forms/consent-phone-field) components to identify the type of marketing permission requested.
|
|
81
|
+
*
|
|
82
|
+
* - `sms-marketing`: Represents the policy for SMS marketing consent.
|
|
83
|
+
*/
|
|
84
|
+
policy?: ConsentPhoneFieldProps$1['policy'];
|
|
82
85
|
}
|
|
83
86
|
export interface ConsentPhoneFieldEvents extends Pick<PhoneFieldEvents, 'onBlur' | 'onChange' | 'onFocus' | 'onInput'> {
|
|
84
87
|
}
|
|
85
|
-
/**
|
|
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
|
-
*
|
|
88
|
-
* @publicDocs
|
|
89
|
-
*/
|
|
88
|
+
/** @publicDocs */
|
|
90
89
|
export interface ConsentPhoneFieldElementEvents {
|
|
91
90
|
/**
|
|
92
91
|
* A callback fired when the consent phone field loses focus.
|
|
@@ -119,11 +118,7 @@ export interface ConsentPhoneFieldElement extends ConsentPhoneFieldElementProps,
|
|
|
119
118
|
onfocus: ConsentPhoneFieldEvents['onFocus'];
|
|
120
119
|
oninput: ConsentPhoneFieldEvents['onInput'];
|
|
121
120
|
}
|
|
122
|
-
/**
|
|
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
|
-
*
|
|
125
|
-
* @publicDocs
|
|
126
|
-
*/
|
|
121
|
+
/** @publicDocs */
|
|
127
122
|
export interface ConsentPhoneFieldElementSlots {
|
|
128
123
|
/**
|
|
129
124
|
* 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.
|
|
@@ -32,10 +32,7 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-date-field";
|
|
35
|
-
/**
|
|
36
|
-
* Configure the following properties on the date field component.
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
35
|
+
/** @publicDocs */
|
|
39
36
|
export interface DateFieldElementProps extends Pick<DateFieldProps$1, 'allow' | 'allowDays' | 'autocomplete' | 'defaultValue' | 'defaultView' | 'disabled' | 'disallow' | 'disallowDays' | 'error' | 'id' | 'label' | 'name' | 'readOnly' | 'required' | 'value' | 'view'> {
|
|
40
37
|
/**
|
|
41
38
|
* @deprecated Use `label` instead.
|
|
@@ -45,11 +42,7 @@ export interface DateFieldElementProps extends Pick<DateFieldProps$1, 'allow' |
|
|
|
45
42
|
}
|
|
46
43
|
export interface DateFieldEvents extends Pick<DateFieldProps$1, 'onBlur' | 'onChange' | 'onFocus' | 'onInput' | 'onInvalid' | 'onViewChange'> {
|
|
47
44
|
}
|
|
48
|
-
/**
|
|
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
|
-
*
|
|
51
|
-
* @publicDocs
|
|
52
|
-
*/
|
|
45
|
+
/** @publicDocs */
|
|
53
46
|
export interface DateFieldElementEvents {
|
|
54
47
|
/**
|
|
55
48
|
* A callback fired when the date field loses focus.
|
|
@@ -32,19 +32,12 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-date-picker";
|
|
35
|
-
/**
|
|
36
|
-
* Configure the following properties on the date picker component.
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
35
|
+
/** @publicDocs */
|
|
39
36
|
export interface DatePickerElementProps extends Pick<DatePickerProps$1, 'allow' | 'allowDays' | 'defaultValue' | 'defaultView' | 'disabled' | 'disallow' | 'disallowDays' | 'id' | 'name' | 'type' | 'value' | 'view'> {
|
|
40
37
|
}
|
|
41
38
|
export interface DatePickerEvents extends Pick<DatePickerProps$1, 'onBlur' | 'onChange' | 'onFocus' | 'onInput' | 'onViewChange'> {
|
|
42
39
|
}
|
|
43
|
-
/**
|
|
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
|
-
*
|
|
46
|
-
* @publicDocs
|
|
47
|
-
*/
|
|
40
|
+
/** @publicDocs */
|
|
48
41
|
export interface DatePickerElementEvents {
|
|
49
42
|
/**
|
|
50
43
|
* A callback fired when the date picker loses focus.
|
|
@@ -43,42 +43,33 @@ export interface ToggleArgumentsEvent {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
declare const tagName = "s-details";
|
|
46
|
-
/**
|
|
47
|
-
* The element props interface for the Details component.
|
|
48
|
-
* @publicDocs
|
|
49
|
-
*/
|
|
46
|
+
/** @publicDocs */
|
|
50
47
|
export interface DetailsElementProps extends Pick<DetailsProps$1, 'defaultOpen' | 'id' | 'open' | 'toggleTransition'> {
|
|
51
48
|
}
|
|
52
49
|
export interface DetailsEvents extends Pick<DetailsProps$1, 'onToggle' | 'onAfterToggle'> {
|
|
53
50
|
}
|
|
54
|
-
/**
|
|
55
|
-
* The events interface for the Details component.
|
|
56
|
-
* @publicDocs
|
|
57
|
-
*/
|
|
51
|
+
/** @publicDocs */
|
|
58
52
|
export interface DetailsElementEvents {
|
|
59
53
|
/**
|
|
60
|
-
*
|
|
54
|
+
* A callback fired immediately when the element state changes, before any animations.
|
|
61
55
|
*
|
|
62
56
|
* - If the element is transitioning from hidden to showing, the `oldState` property will be set to `closed` and the
|
|
63
57
|
* `newState` property will be set to `open`.
|
|
64
|
-
* - If the element is transitioning from showing to hidden, then `oldState` property will be set to `open` and the
|
|
58
|
+
* - If the element is transitioning from showing to hidden, then the `oldState` property will be set to `open` and the
|
|
65
59
|
* `newState` will be `closed`.
|
|
66
60
|
*
|
|
67
|
-
*
|
|
68
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState
|
|
69
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState
|
|
61
|
+
* Learn more about the [`toggle` event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event), and the [`newState`](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState) and [`oldState`](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState) properties.
|
|
70
62
|
*/
|
|
71
63
|
toggle?: CallbackEventListener<typeof tagName, ToggleArgumentsEvent>;
|
|
72
64
|
/**
|
|
73
|
-
*
|
|
65
|
+
* A callback fired when the element state changes, after any toggle animations have finished.
|
|
74
66
|
*
|
|
75
67
|
* - If the element transitioned from hidden to showing, the `oldState` property will be set to `closed` and the
|
|
76
68
|
* `newState` property will be set to `open`.
|
|
77
69
|
* - If the element transitioned from showing to hidden, the `oldState` property will be set to `open` and the
|
|
78
70
|
* `newState` will be `closed`.
|
|
79
71
|
*
|
|
80
|
-
*
|
|
81
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState
|
|
72
|
+
* Learn more about the [`newState` property](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/newState) and [`oldState` property](https://developer.mozilla.org/en-US/docs/Web/API/ToggleEvent/oldState).
|
|
82
73
|
*/
|
|
83
74
|
aftertoggle?: CallbackEventListener<typeof tagName, ToggleArgumentsEvent>;
|
|
84
75
|
}
|
|
@@ -32,19 +32,12 @@ export type CallbackEventListener<TTagName extends keyof HTMLElementTagNameMap,
|
|
|
32
32
|
}) | null;
|
|
33
33
|
|
|
34
34
|
declare const tagName = "s-drop-zone";
|
|
35
|
-
/**
|
|
36
|
-
* Configure the following properties on the drop zone component.
|
|
37
|
-
* @publicDocs
|
|
38
|
-
*/
|
|
35
|
+
/** @publicDocs */
|
|
39
36
|
export interface DropZoneElementProps extends Pick<DropZoneProps$1, 'accept' | 'accessibilityLabel' | 'disabled' | 'error' | 'id' | 'label' | 'multiple' | 'name' | 'required' | 'value'> {
|
|
40
37
|
}
|
|
41
38
|
export interface DropZoneEvents extends Pick<DropZoneProps$1, 'onDropRejected' | 'onInput' | 'onChange'> {
|
|
42
39
|
}
|
|
43
|
-
/**
|
|
44
|
-
* The drop zone component provides event callbacks for handling user interactions. Learn more about [handling events](/docs/api/polaris/using-polaris-web-components#handling-events).
|
|
45
|
-
*
|
|
46
|
-
* @publicDocs
|
|
47
|
-
*/
|
|
40
|
+
/** @publicDocs */
|
|
48
41
|
export interface DropZoneElementEvents {
|
|
49
42
|
/**
|
|
50
43
|
* A callback fired when files are rejected based on the `accept` prop.
|