@shopify/ui-extensions 2025.10.1 → 2025.10.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/README.md +16 -34
- package/build/ts/surfaces/admin/components/Avatar/Avatar.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Badge/Badge.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Chip/Chip.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Heading/Heading.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Icon/Icon.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Image/Image.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Paragraph/Paragraph.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Text/Text.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.doc.d.ts.map +1 -1
- package/build/ts/surfaces/admin/docs-types.d.ts +26 -10
- package/build/ts/surfaces/admin/docs-types.d.ts.map +1 -1
- package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +1 -1
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +0 -11
- package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +12 -5
- package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
- package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts +13 -4
- package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/surfaces/admin/components/Avatar/examples/basic-usage.html +1 -0
- package/src/surfaces/admin/components/Avatar/examples/color-consistency-demo.html +7 -0
- package/src/surfaces/admin/components/Avatar/examples/default-avatar-no-props.html +1 -0
- package/src/surfaces/admin/components/Avatar/examples/default.html +1 -4
- package/src/surfaces/admin/components/Avatar/examples/error-handling-example.html +6 -0
- package/src/surfaces/admin/components/Avatar/examples/fulfillment-partner-avatars.html +14 -0
- package/src/surfaces/admin/components/Avatar/examples/in-customer-list-context.html +24 -0
- package/src/surfaces/admin/components/Avatar/examples/long-initials-handling.html +5 -0
- package/src/surfaces/admin/components/Avatar/examples/size-variations.html +7 -0
- package/src/surfaces/admin/components/Avatar/examples/staff-member-profiles.html +10 -0
- package/src/surfaces/admin/components/Avatar/examples/with-image-source-and-fallback.html +6 -0
- package/src/surfaces/admin/components/Avatar/examples/with-section-component.html +17 -0
- package/src/surfaces/admin/components/Badge/examples/different-sizes-for-emphasis.html +4 -0
- package/src/surfaces/admin/components/Badge/examples/order-status-badges.html +6 -0
- package/src/surfaces/admin/components/Badge/examples/status-indicators-with-icons.html +15 -0
- package/src/surfaces/admin/components/Badge/examples/within-table-context.html +18 -0
- package/src/surfaces/admin/components/Chip/examples/basic-usage.html +3 -0
- package/src/surfaces/admin/components/Chip/examples/color-variants.html +12 -0
- package/src/surfaces/admin/components/Chip/examples/product-status.html +8 -0
- package/src/surfaces/admin/components/Chip/examples/text-truncation.html +12 -0
- package/src/surfaces/admin/components/Chip/examples/with-icon-graphic.html +4 -0
- package/src/surfaces/admin/components/Heading/examples/basic-heading.html +1 -0
- package/src/surfaces/admin/components/Heading/examples/heading-with-custom-accessibility.html +3 -0
- package/src/surfaces/admin/components/Heading/examples/heading-with-line-clamping.html +5 -0
- package/src/surfaces/admin/components/Heading/examples/heading-within-section-hierarchy.html +12 -0
- package/src/surfaces/admin/components/Icon/examples/basic-usage.html +7 -0
- package/src/surfaces/admin/components/Icon/examples/in-badge-components.html +4 -0
- package/src/surfaces/admin/components/Icon/examples/in-button-components.html +6 -0
- package/src/surfaces/admin/components/Icon/examples/small-size.html +1 -0
- package/src/surfaces/admin/components/Icon/examples/subdued-color.html +1 -0
- package/src/surfaces/admin/components/Icon/examples/with-id-property.html +1 -0
- package/src/surfaces/admin/components/Icon/examples/with-interest-relationship.html +1 -0
- package/src/surfaces/admin/components/Icon/examples/with-semantic-tone.html +6 -0
- package/src/surfaces/admin/components/Image/examples/auto-sized-image.html +5 -0
- package/src/surfaces/admin/components/Image/examples/basic-usage.html +1 -0
- package/src/surfaces/admin/components/Image/examples/decorative-image.html +7 -0
- package/src/surfaces/admin/components/Image/examples/responsive-images-with-srcset.html +9 -0
- package/src/surfaces/admin/components/Image/examples/responsive-layout-with-aspect-ratio.html +7 -0
- package/src/surfaces/admin/components/Image/examples/with-border-styling.html +12 -0
- package/src/surfaces/admin/components/Image/examples/within-layout-components.html +26 -0
- package/src/surfaces/admin/components/Paragraph/examples/admin-ui-patterns.html +21 -0
- package/src/surfaces/admin/components/Paragraph/examples/basic-usage.html +3 -0
- package/src/surfaces/admin/components/Paragraph/examples/line-clamping.html +8 -0
- package/src/surfaces/admin/components/Paragraph/examples/rtl-support.html +1 -0
- package/src/surfaces/admin/components/Paragraph/examples/screen-reader-text.html +3 -0
- package/src/surfaces/admin/components/Paragraph/examples/tabular-numbers.html +3 -0
- package/src/surfaces/admin/components/Paragraph/examples/with-tone-and-color.html +9 -0
- package/src/surfaces/admin/components/Text/examples/accessibility-hidden-text.html +1 -0
- package/src/surfaces/admin/components/Text/examples/basic-usage.html +1 -0
- package/src/surfaces/admin/components/Text/examples/interest-for-association.html +6 -0
- package/src/surfaces/admin/components/Text/examples/right-to-left-text.html +1 -0
- package/src/surfaces/admin/components/Text/examples/semantic-address.html +1 -0
- package/src/surfaces/admin/components/Text/examples/status-tones.html +5 -0
- package/src/surfaces/admin/components/Text/examples/strong-text.html +1 -0
- package/src/surfaces/admin/components/Text/examples/subdued-color.html +1 -0
- package/src/surfaces/admin/components/Text/examples/tabular-numbers.html +1 -0
- package/src/surfaces/admin/components/Thumbnail/examples/basic-usage.html +5 -0
- package/src/surfaces/admin/components/Thumbnail/examples/different-sizes.html +17 -0
- package/src/surfaces/admin/components/Thumbnail/examples/empty-state.html +1 -0
- package/src/surfaces/admin/components/Thumbnail/examples/with-event-handling.html +6 -0
- package/src/surfaces/admin/docs-types.ts +33 -12
- package/src/surfaces/customer-account/api/standard-api/standard-api.ts +1 -1
- package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +0 -18
- package/src/surfaces/point-of-sale/api/pin-pad-api.ts +12 -5
- package/src/surfaces/point-of-sale/types/pin-pad.ts +13 -4
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import {PinPadOptions, PinValidationResult} from '../types/pin-pad';
|
|
2
2
|
|
|
3
3
|
export interface PinPadApiContent {
|
|
4
|
-
/** Shows a
|
|
4
|
+
/** Shows a PIN pad to the user in a modal dialog.
|
|
5
|
+
*
|
|
6
|
+
* `onSubmit` is called when the PIN is submitted for validation by the user. The callback
|
|
7
|
+
* should validate the PIN and accept or reject it.
|
|
8
|
+
*
|
|
9
|
+
* If the PIN is accepted, the modal will be dismissed and the `onDismissed` callback
|
|
10
|
+
* (provided via `options`) will be called. It is recommended that any post-validation
|
|
11
|
+
* navigation is performed in this callback rather than in `onSubmit`.
|
|
12
|
+
*
|
|
13
|
+
* If the PIN is rejected, the optional `errorMessage` will be displayed to the user and the modal
|
|
14
|
+
* will not be dismissed.
|
|
5
15
|
*
|
|
6
|
-
* @param onSubmit the function to be called when the PIN is submitted.
|
|
7
|
-
* The callback should be used to validate the PIN and return `accept` or `reject`.
|
|
8
|
-
* @param options the options for the pin pad
|
|
9
16
|
*/
|
|
10
17
|
showPinPad(
|
|
11
18
|
onSubmit: (
|
|
@@ -16,7 +23,7 @@ export interface PinPadApiContent {
|
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
/**
|
|
19
|
-
* Access the
|
|
26
|
+
* Access the PIN Pad API for PIN pad functionality in a modal.
|
|
20
27
|
*/
|
|
21
28
|
export interface PinPadApi {
|
|
22
29
|
pinPad: PinPadApiContent;
|
|
@@ -26,27 +26,34 @@ export interface PinPadActionType {
|
|
|
26
26
|
|
|
27
27
|
export interface PinPadOptions {
|
|
28
28
|
/**
|
|
29
|
-
* The function to be called
|
|
29
|
+
* The function to be called whenever the entered PIN is updated
|
|
30
30
|
*/
|
|
31
31
|
onPinEntry?: (pin: number[]) => void;
|
|
32
32
|
/**
|
|
33
|
-
* The function to be called when the
|
|
33
|
+
* The function to be called when the PIN pad modal is dismissed
|
|
34
34
|
*/
|
|
35
35
|
onDismissed?: (result: PinPadResult) => void;
|
|
36
36
|
/**
|
|
37
|
-
* The content for the prompt on the
|
|
37
|
+
* The content for the prompt on the PIN pad. This will be overridden by any
|
|
38
|
+
* `errorMessage` provided when rejecting a PIN from the `onSubmit` callback.
|
|
38
39
|
*/
|
|
39
40
|
label?: string;
|
|
40
41
|
/**
|
|
41
42
|
* Whether the entered PIN should be masked
|
|
43
|
+
*
|
|
44
|
+
* @default true
|
|
42
45
|
*/
|
|
43
46
|
masked?: boolean;
|
|
44
47
|
/**
|
|
45
48
|
* The minimum length of the PIN
|
|
49
|
+
*
|
|
50
|
+
* @default 4
|
|
46
51
|
*/
|
|
47
52
|
minPinLength?: PinLength;
|
|
48
53
|
/**
|
|
49
54
|
* The maximum length of the PIN
|
|
55
|
+
*
|
|
56
|
+
* @default 6
|
|
50
57
|
*/
|
|
51
58
|
maxPinLength?: PinLength;
|
|
52
59
|
/**
|
|
@@ -58,7 +65,9 @@ export interface PinPadOptions {
|
|
|
58
65
|
*/
|
|
59
66
|
title?: string;
|
|
60
67
|
/**
|
|
61
|
-
* Whether the
|
|
68
|
+
* Whether the PIN should be automatically submitted when the user has entered the maximum PIN length
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
62
71
|
*/
|
|
63
72
|
autoSubmit?: boolean;
|
|
64
73
|
}
|