@shopify/ui-extensions 2026.4.1 → 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 +1 -1
- package/build/ts/surfaces/admin/api/generated/generated.d.ts.map +1 -1
- package/build/ts/surfaces/checkout/components/Button.d.ts +10 -0
- package/build/ts/surfaces/checkout/components/Clickable.d.ts +10 -0
- package/build/ts/surfaces/customer-account/api/docs.d.ts +2 -3
- package/build/ts/surfaces/customer-account/api/docs.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/components/Button.d.ts +10 -0
- package/build/ts/surfaces/customer-account/components/Clickable.d.ts +10 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/admin/api/generated/generated.ts +1 -1
- package/src/surfaces/checkout/components/Button.d.ts +10 -0
- package/src/surfaces/checkout/components/Clickable.d.ts +10 -0
- package/src/surfaces/customer-account/api/docs.ts +2 -3
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ type MergeGeneratedIntentResponse<BaseIntents, Variants> =
|
|
|
37
37
|
callback: (value: GeneratedRequest | null) => void,
|
|
38
38
|
) => () => void;
|
|
39
39
|
};
|
|
40
|
-
} & (Variant extends {response
|
|
40
|
+
} & (Variant extends {response?: infer GeneratedResponse}
|
|
41
41
|
? BaseIntents extends {response: infer BaseResponse}
|
|
42
42
|
? {
|
|
43
43
|
response: Omit<NonNullable<BaseResponse>, 'ok'> &
|
|
@@ -42,6 +42,16 @@ declare const tagName = "s-button";
|
|
|
42
42
|
export interface ButtonElementProps extends Pick<ButtonProps$1, 'accessibilityLabel' | 'command' | 'commandFor' | 'disabled' | 'href' | 'id' | 'inlineSize' | 'interestFor' | 'loading' | 'target' | 'tone' | 'type' | 'variant'> {
|
|
43
43
|
target?: Extract<ButtonProps$1['target'], 'auto' | '_blank'>;
|
|
44
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
|
+
*/
|
|
45
55
|
type?: Extract<ButtonProps$1['type'], 'submit' | 'button'>;
|
|
46
56
|
variant?: Extract<ButtonProps$1['variant'], 'auto' | 'primary' | 'secondary'>;
|
|
47
57
|
}
|
|
@@ -65,6 +65,16 @@ export interface ClickableElementProps extends Pick<ClickableProps$1, 'accessibi
|
|
|
65
65
|
borderWidth?: MaybeAllValuesShorthandProperty<ReducedBorderSizeKeyword> | '';
|
|
66
66
|
borderRadius?: MaybeAllValuesShorthandProperty<Extract<ClickableProps$1['borderRadius'], 'none' | 'small-100' | 'small' | 'base' | 'large' | 'large-100' | 'max'>>;
|
|
67
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
|
+
*/
|
|
68
78
|
type?: Extract<ClickableProps$1['type'], 'submit' | 'button'>;
|
|
69
79
|
}
|
|
70
80
|
export interface ClickableEvents extends Pick<ClickableProps$1, 'onBlur' | 'onClick' | 'onFocus'> {
|
|
@@ -97,9 +97,8 @@ interface ButtonProps {
|
|
|
97
97
|
/**
|
|
98
98
|
* The behavior of the button.
|
|
99
99
|
*
|
|
100
|
-
* - `'submit'
|
|
101
|
-
* - `'button'
|
|
102
|
-
* - `'reset'` - Used to indicate the component acts as a reset button, meaning it resets the closest form (returning fields to their default values).
|
|
100
|
+
* - `'submit'`: Submits the nearest containing form.
|
|
101
|
+
* - `'button'`: Performs no default action, relying on the `click` event handler for behavior.
|
|
103
102
|
*
|
|
104
103
|
* This property is ignored if the component supports `href` or `commandFor`/`command` and one of them is set.
|
|
105
104
|
*
|