@shopify/ui-extensions 2025.10.0 → 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.
Files changed (86) hide show
  1. package/README.md +16 -34
  2. package/build/ts/surfaces/admin/components/Avatar/Avatar.doc.d.ts.map +1 -1
  3. package/build/ts/surfaces/admin/components/Badge/Badge.doc.d.ts.map +1 -1
  4. package/build/ts/surfaces/admin/components/Chip/Chip.doc.d.ts.map +1 -1
  5. package/build/ts/surfaces/admin/components/Heading/Heading.doc.d.ts.map +1 -1
  6. package/build/ts/surfaces/admin/components/Icon/Icon.doc.d.ts.map +1 -1
  7. package/build/ts/surfaces/admin/components/Image/Image.doc.d.ts.map +1 -1
  8. package/build/ts/surfaces/admin/components/Paragraph/Paragraph.doc.d.ts.map +1 -1
  9. package/build/ts/surfaces/admin/components/Text/Text.doc.d.ts.map +1 -1
  10. package/build/ts/surfaces/admin/components/Thumbnail/Thumbnail.doc.d.ts.map +1 -1
  11. package/build/ts/surfaces/admin/docs-types.d.ts +26 -10
  12. package/build/ts/surfaces/admin/docs-types.d.ts.map +1 -1
  13. package/build/ts/surfaces/customer-account/api/standard-api/standard-api.d.ts +1 -1
  14. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts +0 -11
  15. package/build/ts/surfaces/point-of-sale/api/navigation-api/navigation-api.d.ts.map +1 -1
  16. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts +12 -5
  17. package/build/ts/surfaces/point-of-sale/api/pin-pad-api.d.ts.map +1 -1
  18. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts +13 -4
  19. package/build/ts/surfaces/point-of-sale/types/pin-pad.d.ts.map +1 -1
  20. package/build/tsconfig.tsbuildinfo +1 -1
  21. package/package.json +1 -1
  22. package/src/surfaces/admin/components/Avatar/examples/basic-usage.html +1 -0
  23. package/src/surfaces/admin/components/Avatar/examples/color-consistency-demo.html +7 -0
  24. package/src/surfaces/admin/components/Avatar/examples/default-avatar-no-props.html +1 -0
  25. package/src/surfaces/admin/components/Avatar/examples/default.html +1 -4
  26. package/src/surfaces/admin/components/Avatar/examples/error-handling-example.html +6 -0
  27. package/src/surfaces/admin/components/Avatar/examples/fulfillment-partner-avatars.html +14 -0
  28. package/src/surfaces/admin/components/Avatar/examples/in-customer-list-context.html +24 -0
  29. package/src/surfaces/admin/components/Avatar/examples/long-initials-handling.html +5 -0
  30. package/src/surfaces/admin/components/Avatar/examples/size-variations.html +7 -0
  31. package/src/surfaces/admin/components/Avatar/examples/staff-member-profiles.html +10 -0
  32. package/src/surfaces/admin/components/Avatar/examples/with-image-source-and-fallback.html +6 -0
  33. package/src/surfaces/admin/components/Avatar/examples/with-section-component.html +17 -0
  34. package/src/surfaces/admin/components/Badge/examples/different-sizes-for-emphasis.html +4 -0
  35. package/src/surfaces/admin/components/Badge/examples/order-status-badges.html +6 -0
  36. package/src/surfaces/admin/components/Badge/examples/status-indicators-with-icons.html +15 -0
  37. package/src/surfaces/admin/components/Badge/examples/within-table-context.html +18 -0
  38. package/src/surfaces/admin/components/Chip/examples/basic-usage.html +3 -0
  39. package/src/surfaces/admin/components/Chip/examples/color-variants.html +12 -0
  40. package/src/surfaces/admin/components/Chip/examples/product-status.html +8 -0
  41. package/src/surfaces/admin/components/Chip/examples/text-truncation.html +12 -0
  42. package/src/surfaces/admin/components/Chip/examples/with-icon-graphic.html +4 -0
  43. package/src/surfaces/admin/components/Heading/examples/basic-heading.html +1 -0
  44. package/src/surfaces/admin/components/Heading/examples/heading-with-custom-accessibility.html +3 -0
  45. package/src/surfaces/admin/components/Heading/examples/heading-with-line-clamping.html +5 -0
  46. package/src/surfaces/admin/components/Heading/examples/heading-within-section-hierarchy.html +12 -0
  47. package/src/surfaces/admin/components/Icon/examples/basic-usage.html +7 -0
  48. package/src/surfaces/admin/components/Icon/examples/in-badge-components.html +4 -0
  49. package/src/surfaces/admin/components/Icon/examples/in-button-components.html +6 -0
  50. package/src/surfaces/admin/components/Icon/examples/small-size.html +1 -0
  51. package/src/surfaces/admin/components/Icon/examples/subdued-color.html +1 -0
  52. package/src/surfaces/admin/components/Icon/examples/with-id-property.html +1 -0
  53. package/src/surfaces/admin/components/Icon/examples/with-interest-relationship.html +1 -0
  54. package/src/surfaces/admin/components/Icon/examples/with-semantic-tone.html +6 -0
  55. package/src/surfaces/admin/components/Image/examples/auto-sized-image.html +5 -0
  56. package/src/surfaces/admin/components/Image/examples/basic-usage.html +1 -0
  57. package/src/surfaces/admin/components/Image/examples/decorative-image.html +7 -0
  58. package/src/surfaces/admin/components/Image/examples/responsive-images-with-srcset.html +9 -0
  59. package/src/surfaces/admin/components/Image/examples/responsive-layout-with-aspect-ratio.html +7 -0
  60. package/src/surfaces/admin/components/Image/examples/with-border-styling.html +12 -0
  61. package/src/surfaces/admin/components/Image/examples/within-layout-components.html +26 -0
  62. package/src/surfaces/admin/components/Paragraph/examples/admin-ui-patterns.html +21 -0
  63. package/src/surfaces/admin/components/Paragraph/examples/basic-usage.html +3 -0
  64. package/src/surfaces/admin/components/Paragraph/examples/line-clamping.html +8 -0
  65. package/src/surfaces/admin/components/Paragraph/examples/rtl-support.html +1 -0
  66. package/src/surfaces/admin/components/Paragraph/examples/screen-reader-text.html +3 -0
  67. package/src/surfaces/admin/components/Paragraph/examples/tabular-numbers.html +3 -0
  68. package/src/surfaces/admin/components/Paragraph/examples/with-tone-and-color.html +9 -0
  69. package/src/surfaces/admin/components/Text/examples/accessibility-hidden-text.html +1 -0
  70. package/src/surfaces/admin/components/Text/examples/basic-usage.html +1 -0
  71. package/src/surfaces/admin/components/Text/examples/interest-for-association.html +6 -0
  72. package/src/surfaces/admin/components/Text/examples/right-to-left-text.html +1 -0
  73. package/src/surfaces/admin/components/Text/examples/semantic-address.html +1 -0
  74. package/src/surfaces/admin/components/Text/examples/status-tones.html +5 -0
  75. package/src/surfaces/admin/components/Text/examples/strong-text.html +1 -0
  76. package/src/surfaces/admin/components/Text/examples/subdued-color.html +1 -0
  77. package/src/surfaces/admin/components/Text/examples/tabular-numbers.html +1 -0
  78. package/src/surfaces/admin/components/Thumbnail/examples/basic-usage.html +5 -0
  79. package/src/surfaces/admin/components/Thumbnail/examples/different-sizes.html +17 -0
  80. package/src/surfaces/admin/components/Thumbnail/examples/empty-state.html +1 -0
  81. package/src/surfaces/admin/components/Thumbnail/examples/with-event-handling.html +6 -0
  82. package/src/surfaces/admin/docs-types.ts +33 -12
  83. package/src/surfaces/customer-account/api/standard-api/standard-api.ts +1 -1
  84. package/src/surfaces/point-of-sale/api/navigation-api/navigation-api.ts +0 -18
  85. package/src/surfaces/point-of-sale/api/pin-pad-api.ts +12 -5
  86. 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 pin pad to the user in a modal dialog.
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 Pin Pad API for pin pad functionality in a modal.
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 when a pin is entered
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 pin pad modal is dismissed
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 pin pad
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 pin should be automatically submitted when the user has entered the maximum PIN length
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
  }