+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.tsx
new file mode 100644
index 0000000000..9a28f21de5
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.tsx
@@ -0,0 +1,39 @@
+import {
+ reactExtension,
+ Grid,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ 20% / 300
+
+
+ fill / 300
+
+
+ auto / 300
+
+
+ 20% / auto
+
+
+ fill / auto
+
+
+ auto / auto
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.tsx
new file mode 100644
index 0000000000..0f8f5762e2
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.tsx
@@ -0,0 +1,39 @@
+import {
+ reactExtension,
+ Grid,
+ GridItem,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ 20% / 300
+
+
+ fill / 300
+
+
+ auto / 300
+
+
+
+ 20% + fill / auto
+
+
+
+ auto / auto
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.tsx
new file mode 100644
index 0000000000..302fe93755
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Heading,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return Store name;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.tsx
new file mode 100644
index 0000000000..a79f759a51
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.tsx
@@ -0,0 +1,26 @@
+import {
+ reactExtension,
+ HeadingGroup,
+ Heading,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+ <>
+ Heading <h1>
+
+
+ Heading <h2>
+
+
+ Heading <h3>
+
+
+ >
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.tsx
new file mode 100644
index 0000000000..68685c5f79
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Icon,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Image/examples/basic-image.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Image/examples/basic-image.example.tsx
new file mode 100644
index 0000000000..12798cb2f1
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Image/examples/basic-image.example.tsx
@@ -0,0 +1,15 @@
+import {
+ reactExtension,
+ Image,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.tsx
new file mode 100644
index 0000000000..c3dcda016b
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.tsx
@@ -0,0 +1,23 @@
+import {
+ reactExtension,
+ InlineLayout,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ 20%
+
+
+ fill
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.tsx
new file mode 100644
index 0000000000..84e54dd4e0
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.tsx
@@ -0,0 +1,33 @@
+import {
+ reactExtension,
+ InlineSpacer,
+ InlineStack,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ View
+
+
+
+ View
+
+
+
+ View
+
+
+
+ View
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.tsx
new file mode 100644
index 0000000000..702a053d75
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.tsx
@@ -0,0 +1,29 @@
+import {
+ reactExtension,
+ InlineStack,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ View
+
+
+ View
+
+
+ View
+
+
+ View
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Link/examples/basic-link.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Link/examples/basic-link.example.tsx
new file mode 100644
index 0000000000..3e2504ce52
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Link/examples/basic-link.example.tsx
@@ -0,0 +1,17 @@
+import {
+ reactExtension,
+ Link,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ Sustainability fund
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/List/examples/basic-list.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/List/examples/basic-list.example.tsx
new file mode 100644
index 0000000000..f6a3681fbf
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/List/examples/basic-list.example.tsx
@@ -0,0 +1,20 @@
+import {
+ reactExtension,
+ List,
+ ListItem,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ 100% organic cotton
+ Made in Canada
+ Machine washable
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.tsx
new file mode 100644
index 0000000000..56e18f61f6
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.tsx
@@ -0,0 +1,18 @@
+import {
+ reactExtension,
+ List,
+ ListItem,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ 100% organic cotton
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Map/examples/basic-map.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Map/examples/basic-map.example.tsx
new file mode 100644
index 0000000000..e7bb2cc93d
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Map/examples/basic-map.example.tsx
@@ -0,0 +1,21 @@
+import {
+ reactExtension,
+ Map,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.tsx
new file mode 100644
index 0000000000..55943f749f
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.tsx
@@ -0,0 +1,28 @@
+import {
+ reactExtension,
+ Map,
+ MapMarker,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.tsx
new file mode 100644
index 0000000000..27562f8f85
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.tsx
@@ -0,0 +1,34 @@
+import {
+ reactExtension,
+ Map,
+ MapMarker,
+ MapPopover,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.tsx
new file mode 100644
index 0000000000..06cdbf0148
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.tsx
@@ -0,0 +1,52 @@
+import {
+ reactExtension,
+ useApi,
+ Button,
+ Link,
+ Modal,
+ TextBlock,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ const {ui} = useApi();
+
+ return (
+
+
+ We have a 30-day return policy, which
+ means you have 30 days after receiving
+ your item to request a return.
+
+
+ To be eligible for a return, your item
+ must be in the same condition that you
+ received it, unworn or unused, with
+ tags, and in its original packaging.
+ You’ll also need the receipt or proof
+ of purchase.
+
+
+
+ }
+ >
+ Return policy
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.tsx
new file mode 100644
index 0000000000..84f3a83815
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ PaymentIcon,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.tsx
new file mode 100644
index 0000000000..091603bc7b
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.tsx
@@ -0,0 +1,18 @@
+import {
+ reactExtension,
+ PhoneField,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.tsx
new file mode 100644
index 0000000000..1f77beca94
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.tsx
@@ -0,0 +1,41 @@
+import {
+ reactExtension,
+ Pressable,
+ Popover,
+ View,
+ TextBlock,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+
+ A thoughtful way to pay
+
+ Tap don’t type
+
+ Shop Pay remembers your important
+ details, so you can fill carts, not
+ forms. And everything is encrypted
+ so you can speed safely through
+ checkout.
+
+
+
+ }
+ >
+ More info
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.tsx
new file mode 100644
index 0000000000..0f4ea8b827
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.tsx
@@ -0,0 +1,27 @@
+import {
+ reactExtension,
+ Icon,
+ InlineLayout,
+ Pressable,
+ Text,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ Details
+
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.tsx
new file mode 100644
index 0000000000..76e714261c
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.tsx
@@ -0,0 +1,18 @@
+import {
+ reactExtension,
+ ProductThumbnail,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.tsx
new file mode 100644
index 0000000000..1f70769795
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.tsx
@@ -0,0 +1,15 @@
+import {
+ reactExtension,
+ Progress,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.tsx
new file mode 100644
index 0000000000..8ffc4ca350
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.tsx
@@ -0,0 +1,26 @@
+import {
+ reactExtension,
+ Link,
+ QRCode,
+ TextBlock,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+ <>
+
+
+
+ Scan to visit{' '}
+
+ Shopify.com
+
+
+ >
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.tsx
new file mode 100644
index 0000000000..4b4387f822
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.tsx
@@ -0,0 +1,52 @@
+import {
+ reactExtension,
+ ScrollView,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ View
+
+
+ View
+
+
+ View
+
+
+ View
+
+
+ View
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/basic-select.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/basic-select.example.tsx
new file mode 100644
index 0000000000..f6e97cfcaa
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/basic-select.example.tsx
@@ -0,0 +1,44 @@
+import {
+ reactExtension,
+ Select,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.tsx
new file mode 100644
index 0000000000..acd8e7bea8
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.tsx
@@ -0,0 +1,44 @@
+import {
+ reactExtension,
+ Select,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.tsx
new file mode 100644
index 0000000000..f7b6414b9e
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.tsx
@@ -0,0 +1,33 @@
+import {
+ reactExtension,
+ Link,
+ Sheet,
+ TextBlock,
+} from '@shopify/ui-extensions-react/customer-account';
+
+// This component requires access to Customer Privacy API to be rendered.
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ Basic Sheet Content
+
+
+ }
+ >
+ Open sheet
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.tsx
new file mode 100644
index 0000000000..5734f9e61c
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.tsx
@@ -0,0 +1,18 @@
+import {
+ reactExtension,
+ SkeletonImage,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.tsx
new file mode 100644
index 0000000000..d1a738aef7
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ SkeletonText,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.tsx
new file mode 100644
index 0000000000..51ed9625c2
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ SkeletonTextBlock,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.tsx
new file mode 100644
index 0000000000..e373970af7
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Spinner,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.tsx
new file mode 100644
index 0000000000..51b42d446b
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Stepper,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.tsx
new file mode 100644
index 0000000000..26218780fb
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.tsx
@@ -0,0 +1,15 @@
+import {
+ reactExtension,
+ Switch,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.tsx
new file mode 100644
index 0000000000..d827ac139b
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Tag,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return SPRING;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Text/examples/basic-text.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Text/examples/basic-text.example.tsx
new file mode 100644
index 0000000000..493039f444
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Text/examples/basic-text.example.tsx
@@ -0,0 +1,23 @@
+import {
+ reactExtension,
+ Text,
+ BlockStack,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ Total
+ Total
+ Total
+ Total
+ Total
+ Total
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.tsx
new file mode 100644
index 0000000000..5d55316e2d
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.tsx
@@ -0,0 +1,29 @@
+import {
+ reactExtension,
+ TextBlock,
+ BlockStack,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+
+ We have a 30-day return policy, which
+ means you have 30 days after receiving
+ your item to request a return.
+
+
+ To be eligible for a return, your item
+ must be in the same condition that you
+ received it, unworn or unused, with tags,
+ and in its original packaging. You’ll also
+ need the receipt or proof of purchase.
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.tsx
new file mode 100644
index 0000000000..c425e76e02
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ TextField,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return ;
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.tsx
new file mode 100644
index 0000000000..9246000cd3
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.tsx
@@ -0,0 +1,25 @@
+import {
+ reactExtension,
+ ToggleButton,
+ ToggleButtonGroup,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+ {
+ console.log(
+ `onChange event with value: ${value}`,
+ );
+ }}
+ >
+ None
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.tsx
new file mode 100644
index 0000000000..e0d0513857
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.tsx
@@ -0,0 +1,72 @@
+import {
+ reactExtension,
+ BlockStack,
+ InlineLayout,
+ Text,
+ ToggleButton,
+ ToggleButtonGroup,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+ {
+ console.log(
+ `onChange event with value: ${value}`,
+ );
+ }}
+ >
+
+
+
+ None
+
+
+
+
+ 100
+
+ points
+
+
+
+
+
+ 200
+
+ points
+
+
+
+
+
+ 300
+
+ points
+
+
+
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.tsx
new file mode 100644
index 0000000000..22de26c56e
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.tsx
@@ -0,0 +1,26 @@
+import {
+ reactExtension,
+ Icon,
+ Pressable,
+ Tooltip,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ In case we need to contact you about
+ your order
+
+ }
+ >
+
+
+ );
+}
diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/View/examples/basic-view.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/View/examples/basic-view.example.tsx
new file mode 100644
index 0000000000..5965b263db
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/View/examples/basic-view.example.tsx
@@ -0,0 +1,17 @@
+import {
+ reactExtension,
+ View,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () => ,
+);
+
+function Extension() {
+ return (
+
+ View
+
+ );
+}
diff --git a/packages/ui-extensions/docs/surfaces/build-doc-shared.mjs b/packages/ui-extensions/docs/surfaces/build-doc-shared.mjs
new file mode 100644
index 0000000000..4d8e594b7f
--- /dev/null
+++ b/packages/ui-extensions/docs/surfaces/build-doc-shared.mjs
@@ -0,0 +1,72 @@
+/* eslint-disable no-undef, no-console */
+import childProcess from 'child_process';
+import fs from 'fs/promises';
+import {existsSync} from 'fs';
+import path from 'path';
+
+export const replaceFileContent = async ({
+ filePaths,
+ searchValue,
+ replaceValue,
+}) => {
+ const files = Array.isArray(filePaths) ? filePaths : [filePaths];
+ for (const filePath of files) {
+ const content = await fs.readFile(filePath, 'utf8');
+ // @ts-ignore -- TS should know this is a string but it doesn't
+ const replacedContent = content.replaceAll(searchValue, replaceValue);
+ await fs.writeFile(filePath, replacedContent);
+ }
+};
+
+export const generateFiles = async ({
+ scripts,
+ outputDir,
+ rootPath,
+ generatedDocsDataFile,
+ generatedStaticPagesFile,
+ transformJson,
+}) => {
+ scripts.forEach((script) => childProcess.execSync(script, {stdio: 'pipe'}));
+
+ const srcFiles = await fs.readdir(rootPath, {recursive: true});
+ const builtFiles = srcFiles.filter((file) => file.endsWith('.ts'));
+ await Promise.all(
+ builtFiles.map((file) => {
+ const jsFilePath = path.join(rootPath, file.replace('.ts', '.js'));
+ return existsSync(jsFilePath) ? fs.rm(jsFilePath) : Promise.resolve();
+ }),
+ );
+
+ const generatedFiles = [path.join(outputDir, generatedDocsDataFile)];
+ if (generatedStaticPagesFile) {
+ generatedFiles.push(path.join(outputDir, generatedStaticPagesFile));
+ }
+
+ // Make sure https://shopify.dev URLs are relative so they work in Spin.
+ // See https://github.com/Shopify/generate-docs/issues/181
+ await replaceFileContent({
+ filePaths: generatedFiles,
+ searchValue: 'https://shopify.dev',
+ replaceValue: '',
+ });
+
+ if (transformJson) {
+ await transformJson(path.join(outputDir, generatedDocsDataFile));
+ }
+};
+
+export const copyGeneratedToShopifyDev = async ({
+ generatedDocsPath,
+ shopifyDevPath,
+ shopifyDevDBPath,
+}) => {
+ const shopifyDevExists = existsSync(shopifyDevPath);
+ if (!shopifyDevExists) {
+ console.log(
+ `Not copying docs to shopify-dev because it was not found at ${shopifyDevPath}.`,
+ );
+ process.exit();
+ }
+
+ await fs.cp(generatedDocsPath, shopifyDevDBPath, {recursive: true});
+};
diff --git a/packages/ui-extensions/docs/surfaces/customer-account/build-docs.mjs b/packages/ui-extensions/docs/surfaces/customer-account/build-docs.mjs
new file mode 100644
index 0000000000..5825f71acb
--- /dev/null
+++ b/packages/ui-extensions/docs/surfaces/customer-account/build-docs.mjs
@@ -0,0 +1,288 @@
+/* eslint-disable no-undef, no-console */
+import {exec as execCb, execSync} from 'child_process';
+import fs from 'fs/promises';
+import {existsSync} from 'fs';
+import path from 'path';
+import {fileURLToPath} from 'url';
+import {promisify} from 'util';
+
+import {
+ copyGeneratedToShopifyDev,
+ replaceFileContent,
+} from '../build-doc-shared.mjs';
+
+const execAsync = promisify(execCb);
+
+const EXTENSIONS_API_VERSION = process.argv[2] || 'unstable';
+
+const __filename = fileURLToPath(import.meta.url);
+const __dirname = path.dirname(__filename);
+
+const rootPath = path.join(__dirname, '../../..');
+const docsRelativePath = 'docs/surfaces/customer-account';
+const docsGeneratedRelativePath = 'docs/surfaces/customer-account/generated';
+const srcRelativePath = 'src/surfaces/customer-account';
+const reactSrcRelativePath = `../ui-extensions-react/${srcRelativePath}`;
+const checkoutSrcRelativePath = 'src/surfaces/checkout';
+const checkoutComponentsRelativePath = `${checkoutSrcRelativePath}/components`;
+const docsPath = path.join(rootPath, docsRelativePath);
+const srcPath = path.join(rootPath, srcRelativePath);
+const checkoutSrcPath = path.join(rootPath, checkoutSrcRelativePath);
+const checkoutComponentsDir = path.join(checkoutSrcPath, 'components');
+const generatedDocsPath = path.join(docsPath, 'generated');
+const shopifyDevPath = path.join(rootPath, '../../../shopify-dev');
+const shopifyDevDBPath = path.join(
+ shopifyDevPath,
+ 'areas/platforms/shopify-dev/db/data/docs/templated_apis',
+);
+
+const generatedDocsDataFile = 'generated_docs_data.json';
+const generatedStaticPagesFile = 'generated_static_pages.json';
+
+const componentDefs = path.join(srcPath, 'components.d.ts');
+const tempComponentDefs = path.join(srcPath, 'components.ts');
+
+const tsconfig = 'tsconfig.docs.json';
+
+const maxBuffer = 50 * 1024 * 1024;
+
+const copyCheckoutTypesToTemp = async () => {
+ const files = await fs.readdir(checkoutComponentsDir);
+ return Promise.all(
+ files
+ .filter(
+ (file) => file.endsWith('.d.ts') && file !== 'components-shared.d.ts',
+ )
+ .map(async (file) => {
+ const srcFile = path.join(checkoutComponentsDir, file);
+ const tempFile = path.join(
+ checkoutComponentsDir,
+ file.replace('.d.ts', '.ts'),
+ );
+ await fs.copyFile(srcFile, tempFile);
+ return tempFile;
+ }),
+ );
+};
+
+const cleanupTempFiles = async (tempFiles) => {
+ await Promise.all(
+ tempFiles
+ .filter((file) => existsSync(file))
+ .map((file) => fs.rm(file)),
+ );
+};
+
+const cleanupGeneratedJsFiles = async (directories) => {
+ await Promise.all(
+ directories.map(async (dir) => {
+ if (!existsSync(dir)) return;
+ const files = await fs.readdir(dir, {recursive: true});
+ await Promise.all(
+ files
+ .filter((file) => file.endsWith('.js'))
+ .map((file) => {
+ const jsPath = path.join(dir, file);
+ const tsPath = path.join(dir, file.replace(/\.js$/, '.ts'));
+ return existsSync(tsPath) ? fs.rm(jsPath) : Promise.resolve();
+ }),
+ );
+ }),
+ );
+};
+
+const generateExtensionsDocs = async () => {
+ console.log(
+ `Building Customer Account UI Extensions docs for ${EXTENSIONS_API_VERSION} version`,
+ );
+
+ if (EXTENSIONS_API_VERSION === 'unstable') {
+ console.log(
+ "You can add a calver version argument (e.g. 'yarn docs:customer-account 2024-07') to generate the docs for a stable version.",
+ );
+ }
+
+ const outputDir = `${docsGeneratedRelativePath}/customer_account_ui_extensions/${EXTENSIONS_API_VERSION}`;
+ const tempRefOutputDir = `${outputDir}/_temp_ref`;
+ const tempCompOutputDir = `${outputDir}/_temp_comp`;
+
+ await fs.mkdir(outputDir, {recursive: true});
+ await fs.mkdir(tempRefOutputDir, {recursive: true});
+ await fs.mkdir(tempCompOutputDir, {recursive: true});
+
+ // Single tsc step — tsconfig.docs.json already covers all .doc.ts files
+ // (reference, staticPages, categories, and component docs)
+ console.log('Compiling TypeScript...');
+ execSync(
+ `yarn tsc --project ${docsRelativePath}/${tsconfig} --moduleResolution node --target esNext --module CommonJS`,
+ {stdio: 'pipe'},
+ );
+
+ // Split generate-docs into independent parallel commands.
+ // Internally, generate-docs creates a TypeScript program for every
+ // --typesInput directory × every --input directory. Splitting reference
+ // docs from component docs avoids redundant type parsing:
+ // - Reference docs (APIs/targets) only need customer-account types
+ // - Component docs only need checkout component types
+ // (customer-account types are included automatically as the base path)
+ console.log('Generating docs in parallel...');
+ const overridePath = `./${docsRelativePath}/typeOverride.json`;
+ await Promise.all([
+ execAsync(
+ `yarn generate-docs --overridePath ${overridePath} --input ./${docsRelativePath}/reference --typesInput ./${srcRelativePath} ./${reactSrcRelativePath} --output ./${tempRefOutputDir}`,
+ {maxBuffer},
+ ),
+ execAsync(
+ `yarn generate-docs --overridePath ${overridePath} --input ./${srcRelativePath} --typesInput ./${srcRelativePath} ./${checkoutSrcRelativePath} --output ./${tempCompOutputDir}`,
+ {maxBuffer},
+ ),
+ execAsync(
+ `yarn generate-docs --isLandingPage --input ./${docsRelativePath}/staticPages --output ./${outputDir}`,
+ {maxBuffer},
+ ),
+ ]);
+
+ // Merge the two generated_docs_data.json files
+ const [refData, compData] = await Promise.all([
+ fs
+ .readFile(path.join(tempRefOutputDir, generatedDocsDataFile), 'utf8')
+ .then(JSON.parse),
+ fs
+ .readFile(path.join(tempCompOutputDir, generatedDocsDataFile), 'utf8')
+ .then(JSON.parse),
+ ]);
+ const mergedData = [...refData, ...compData].filter(Boolean);
+ await fs.writeFile(
+ path.join(outputDir, generatedDocsDataFile),
+ JSON.stringify(mergedData, null, 2),
+ );
+
+ // Clean up temp directories
+ await Promise.all([
+ fs.rm(tempRefOutputDir, {recursive: true}),
+ fs.rm(tempCompOutputDir, {recursive: true}),
+ ]);
+
+ // Clean up .js files only in directories where tsc output lands
+ await cleanupGeneratedJsFiles([
+ path.join(rootPath, docsRelativePath),
+ path.join(rootPath, srcRelativePath),
+ path.join(rootPath, 'src/docs/shared'),
+ ]);
+
+ const generatedFiles = [path.join(outputDir, generatedDocsDataFile)];
+ if (generatedStaticPagesFile) {
+ generatedFiles.push(path.join(outputDir, generatedStaticPagesFile));
+ }
+
+ // Make sure https://shopify.dev URLs are relative so they work in Spin
+ await replaceFileContent({
+ filePaths: generatedFiles,
+ searchValue: 'https://shopify.dev',
+ replaceValue: '',
+ });
+
+ // Replace 'unstable' with the exact API version in relative doc links
+ await replaceFileContent({
+ filePaths: path.join(outputDir, generatedDocsDataFile),
+ searchValue: '/docs/api//unstable/',
+ replaceValue: `/docs/api/customer-account-ui-extensions/${EXTENSIONS_API_VERSION}`,
+ });
+
+ await fs.cp(
+ path.join(docsPath, 'screenshots'),
+ path.join(
+ shopifyDevPath,
+ 'areas/platforms/shopify-dev/content/assets/images/templated-apis-screenshots/customer-account-ui-extensions',
+ EXTENSIONS_API_VERSION,
+ ),
+ {recursive: true},
+ );
+};
+
+const surfaceFiles = [
+ path.join(rootPath, 'src/surfaces/checkout.ts'),
+ path.join(rootPath, 'src/surfaces/admin.ts'),
+ path.join(rootPath, 'src/surfaces/point-of-sale.ts'),
+ path.join(rootPath, '../ui-extensions-react/src/surfaces/checkout.ts'),
+ path.join(rootPath, '../ui-extensions-react/src/surfaces/admin.ts'),
+ path.join(rootPath, '../ui-extensions-react/src/surfaces/point-of-sale.ts'),
+];
+
+const blankSurfaces = async () => {
+ const originals = new Map();
+ for (const file of surfaceFiles) {
+ if (existsSync(file)) {
+ originals.set(file, await fs.readFile(file, 'utf8'));
+ await fs.writeFile(file, 'export {}\n');
+ }
+ }
+ return originals;
+};
+
+const restoreSurfaces = async (originals) => {
+ for (const [file, content] of originals) {
+ await fs.writeFile(file, content);
+ }
+};
+
+let checkoutTempFiles = [];
+let surfaceOriginals = new Map();
+try {
+ if (existsSync(generatedDocsPath)) {
+ await fs.rm(generatedDocsPath, {recursive: true});
+ }
+ if (existsSync(componentDefs)) {
+ await fs.copyFile(componentDefs, tempComponentDefs);
+ await replaceFileContent({
+ filePaths: tempComponentDefs,
+ searchValue: /typeof globalThis\.HTMLElement/g,
+ replaceValue: 'any',
+ });
+ }
+
+ console.log('Blanking other surface files to avoid type conflicts...');
+ surfaceOriginals = await blankSurfaces();
+
+ console.log('Copying checkout .d.ts files to temporary .ts files...');
+ checkoutTempFiles = await copyCheckoutTypesToTemp();
+
+ await generateExtensionsDocs();
+
+ // Generate targets.json
+ console.log('Generating targets.json...');
+ try {
+ execSync(`node ${path.join(docsPath, 'build-docs-targets-json.mjs')} ${EXTENSIONS_API_VERSION}`, {
+ stdio: 'inherit',
+ cwd: rootPath,
+ });
+ console.log('✅ Generated targets.json');
+ } catch (targetsError) {
+ console.warn(
+ 'Warning: Failed to generate targets.json:',
+ targetsError.message,
+ );
+ }
+
+ await copyGeneratedToShopifyDev({
+ generatedDocsPath,
+ shopifyDevPath,
+ shopifyDevDBPath,
+ });
+
+ if (existsSync(tempComponentDefs)) {
+ await fs.rm(tempComponentDefs);
+ }
+ await cleanupTempFiles(checkoutTempFiles);
+ await restoreSurfaces(surfaceOriginals);
+} catch (error) {
+ await cleanupTempFiles(checkoutTempFiles);
+ if (existsSync(tempComponentDefs)) {
+ await fs.rm(tempComponentDefs);
+ }
+ await restoreSurfaces(surfaceOriginals);
+ console.error(error);
+ console.log(error.stdout?.toString?.() ?? '');
+ console.log(error.stderr?.toString?.() ?? '');
+ process.exit(1);
+}
diff --git a/packages/ui-extensions/docs/surfaces/customer-account/categories/components.doc.ts b/packages/ui-extensions/docs/surfaces/customer-account/categories/components.doc.ts
deleted file mode 100644
index b5494702d1..0000000000
--- a/packages/ui-extensions/docs/surfaces/customer-account/categories/components.doc.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import {CategoryTemplateSchema} from '@shopify/generate-docs';
-
-const data: CategoryTemplateSchema = {
- category: 'components',
- sections: [
- {
- type: 'Generic',
- anchorLink: 'additional-components',
- title: 'Additional components',
- sectionContent:
- 'In addition to the components below, you can also use checkout components to build customer account UI extensions.',
- sectionCard: [
- {
- type: 'blocks',
- name: 'Checkout components',
- subtitle: 'More components',
- url: '/docs/api/checkout-ui-extensions/components',
- },
- ],
- },
- ],
-};
-
-export default data;
diff --git a/packages/ui-extensions/docs/surfaces/customer-account/generated/generated_docs_data.json b/packages/ui-extensions/docs/surfaces/customer-account/generated/customer_account_ui_extensions/2025-07/generated_docs_data.json
similarity index 80%
rename from packages/ui-extensions/docs/surfaces/customer-account/generated/generated_docs_data.json
rename to packages/ui-extensions/docs/surfaces/customer-account/generated/customer_account_ui_extensions/2025-07/generated_docs_data.json
index 52ad7fdce1..d1b0493ec0 100644
--- a/packages/ui-extensions/docs/surfaces/customer-account/generated/generated_docs_data.json
+++ b/packages/ui-extensions/docs/surfaces/customer-account/generated/customer_account_ui_extensions/2025-07/generated_docs_data.json
@@ -64,7 +64,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -86,7 +86,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -531,7 +531,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -594,7 +594,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -690,7 +690,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -712,7 +712,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -1392,7 +1392,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -1536,7 +1536,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -1571,7 +1571,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -4203,7 +4203,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -4232,7 +4232,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -4261,7 +4261,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -4335,7 +4335,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -4431,7 +4431,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -4741,7 +4741,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -4770,7 +4770,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -4799,7 +4799,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -4873,7 +4873,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -4969,7 +4969,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -5281,7 +5281,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -5310,7 +5310,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -5339,7 +5339,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -5413,7 +5413,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -5509,7 +5509,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -5819,7 +5819,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -5848,7 +5848,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -5877,7 +5877,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -5951,7 +5951,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -6047,7 +6047,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -6588,7 +6588,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -6658,7 +6658,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -6687,7 +6687,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -6758,7 +6758,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -6828,7 +6828,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -6857,7 +6857,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -9292,7 +9292,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -9314,7 +9314,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -9338,7 +9338,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -9401,7 +9401,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -9497,7 +9497,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -9519,7 +9519,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -9957,7 +9957,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -11349,7 +11349,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -11378,7 +11378,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -11407,7 +11407,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -11546,7 +11546,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -11704,7 +11704,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -11800,7 +11800,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -12371,7 +12371,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -12393,7 +12393,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -12417,7 +12417,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -12480,7 +12480,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -12576,7 +12576,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -12598,7 +12598,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -13036,7 +13036,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -13514,7 +13514,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -13536,7 +13536,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -13560,7 +13560,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -13623,7 +13623,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -13719,7 +13719,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -13741,7 +13741,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -14179,7 +14179,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -15570,7 +15570,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -15599,7 +15599,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -15628,7 +15628,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -15767,7 +15767,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -15925,7 +15925,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -16021,7 +16021,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -16592,7 +16592,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -16614,7 +16614,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -16638,7 +16638,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -16701,7 +16701,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -16797,7 +16797,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -16819,7 +16819,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -17257,7 +17257,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -18601,7 +18601,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -18630,7 +18630,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -18659,7 +18659,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -18798,7 +18798,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -18956,7 +18956,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -19052,7 +19052,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -19623,7 +19623,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -19645,7 +19645,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -19669,7 +19669,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -19732,7 +19732,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -19828,7 +19828,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -19850,7 +19850,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -20288,7 +20288,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -20774,7 +20774,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -20803,7 +20803,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -20832,7 +20832,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -20906,7 +20906,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -21002,7 +21002,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -22165,7 +22165,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -22194,7 +22194,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -22223,7 +22223,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -22362,7 +22362,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -22520,7 +22520,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -22616,7 +22616,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -23187,7 +23187,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -23209,7 +23209,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -23233,7 +23233,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -23296,7 +23296,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -23392,7 +23392,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -23414,7 +23414,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -23852,7 +23852,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -25189,7 +25189,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -25218,7 +25218,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -25247,7 +25247,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -25386,7 +25386,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -25544,7 +25544,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -25640,7 +25640,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -26211,7 +26211,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -26233,7 +26233,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -26257,7 +26257,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -26320,7 +26320,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -26416,7 +26416,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -26438,7 +26438,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -26876,7 +26876,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -28213,7 +28213,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -28242,7 +28242,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -28271,7 +28271,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -28410,7 +28410,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -28568,7 +28568,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -28664,7 +28664,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -29235,7 +29235,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -29257,7 +29257,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -29281,7 +29281,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -29344,7 +29344,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -29440,7 +29440,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -29462,7 +29462,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -29900,7 +29900,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -31237,7 +31237,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -31266,7 +31266,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -31295,7 +31295,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -31434,7 +31434,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -31592,7 +31592,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -31688,7 +31688,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -32259,7 +32259,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -32281,7 +32281,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -32305,7 +32305,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -32368,7 +32368,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -32464,7 +32464,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -32486,7 +32486,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -32924,7 +32924,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -34283,7 +34283,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -34312,7 +34312,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -34341,7 +34341,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -34480,7 +34480,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -34638,7 +34638,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -34734,7 +34734,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -35305,7 +35305,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -35327,7 +35327,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -35351,7 +35351,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -35414,7 +35414,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -35510,7 +35510,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -35532,7 +35532,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -35970,7 +35970,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -37307,7 +37307,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -37336,7 +37336,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -37365,7 +37365,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -37504,7 +37504,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -37662,7 +37662,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -37758,7 +37758,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -38329,7 +38329,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -38351,7 +38351,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -38375,7 +38375,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -38438,7 +38438,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -38534,7 +38534,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -38556,7 +38556,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -38994,7 +38994,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -40331,7 +40331,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -40360,7 +40360,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -40389,7 +40389,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -40528,7 +40528,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -40686,7 +40686,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -40782,7 +40782,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -41353,7 +41353,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -41375,7 +41375,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -41399,7 +41399,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -41462,7 +41462,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -41558,7 +41558,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -41580,7 +41580,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -42018,7 +42018,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -42536,7 +42536,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -42558,7 +42558,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -42582,7 +42582,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -42645,7 +42645,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -42741,7 +42741,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -42763,7 +42763,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -43201,7 +43201,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -43482,7 +43482,7 @@
"filePath": "src/surfaces/customer-account/api/docs.ts",
"syntaxKind": "PropertySignature",
"name": "appearance",
- "value": "Extract",
+ "value": "'critical' | 'monochrome'",
"description": "Specify the color treatment of the Button.",
"isOptional": true
},
@@ -43529,13 +43529,6 @@
}
],
"value": "export interface Docs_OrderActionMenu_Button\n extends Pick<\n ButtonProps,\n | 'onPress'\n | 'loading'\n | 'loadingLabel'\n | 'disabled'\n | 'accessibilityLabel'\n | 'appearance'\n > {\n /**\n * Destination URL to link to.\n *\n * E.g. `extension:/` to navigate to the Full-page extension.\n */\n to: ButtonProps['to'];\n}"
- },
- "Appearance": {
- "filePath": "src/surfaces/checkout/components/shared.ts",
- "syntaxKind": "TypeAliasDeclaration",
- "name": "Appearance",
- "value": "'base' | 'accent' | 'decorative' | 'interactive' | 'subdued' | 'info' | 'success' | 'warning' | 'critical' | 'monochrome'",
- "description": ""
}
}
}
@@ -43794,7 +43787,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -43816,7 +43809,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -43840,7 +43833,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -43903,7 +43896,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -43999,7 +43992,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -44021,7 +44014,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -44459,7 +44452,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -45907,7 +45900,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"code\"",
+ "value": "'code'",
"description": "The type of the code discount"
}
],
@@ -45936,7 +45929,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"automatic\"",
+ "value": "'automatic'",
"description": "The type of the automatic discount"
}
],
@@ -45965,7 +45958,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"custom\"",
+ "value": "'custom'",
"description": "The type of the custom discount"
}
],
@@ -46104,7 +46097,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -46262,7 +46255,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"bundle\"",
+ "value": "'bundle'",
"description": ""
}
],
@@ -46358,7 +46351,7 @@
"filePath": "src/surfaces/customer-account/api/order-status/order-status.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"variant\"",
+ "value": "'variant'",
"description": ""
}
]
@@ -46929,7 +46922,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -46951,7 +46944,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -46975,7 +46968,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -47038,7 +47031,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -47134,7 +47127,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -47156,7 +47149,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -47594,7 +47587,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -48193,7 +48186,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -48215,7 +48208,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -48239,7 +48232,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -48302,7 +48295,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -48398,7 +48391,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -48420,7 +48413,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -48858,7 +48851,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -49327,7 +49320,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -49349,7 +49342,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -49373,7 +49366,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -49436,7 +49429,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -49532,7 +49525,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -49554,7 +49547,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -49992,7 +49985,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -50516,7 +50509,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -50538,7 +50531,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -50562,7 +50555,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -50625,7 +50618,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -50721,7 +50714,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -50743,7 +50736,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -51181,7 +51174,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -51657,7 +51650,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -51679,7 +51672,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -51703,7 +51696,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -51766,7 +51759,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -51862,7 +51855,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -51884,7 +51877,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -52322,7 +52315,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -52791,7 +52784,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -52813,7 +52806,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -52837,7 +52830,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -52900,7 +52893,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -52996,7 +52989,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -53018,7 +53011,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -53456,7 +53449,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -53947,7 +53940,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -53969,7 +53962,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -53993,7 +53986,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -54056,7 +54049,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -54152,7 +54145,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -54174,7 +54167,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -54612,7 +54605,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -55103,7 +55096,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -55125,7 +55118,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -55149,7 +55142,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -55212,7 +55205,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -55308,7 +55301,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -55330,7 +55323,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -55768,7 +55761,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -56259,7 +56252,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "Indicates that the visitor information was validated and submitted."
}
],
@@ -56281,7 +56274,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property."
}
],
@@ -56305,7 +56298,7 @@
"name": "Promise",
"value": "Promise"
},
- "value": "export type ApplyTrackingConsentChangeType = (\n visitorConsent: VisitorConsentChange,\n) => Promise;"
+ "value": "(\n visitorConsent: VisitorConsentChange,\n) => Promise"
},
"VisitorConsentChange": {
"filePath": "src/surfaces/customer-account/api/shared.ts",
@@ -56368,7 +56361,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"changeVisitorConsent\"",
+ "value": "'changeVisitorConsent'",
"description": ""
}
],
@@ -56464,7 +56457,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"success\"",
+ "value": "'success'",
"description": "The type of the `TrackingConsentChangeResultSuccess` API."
}
],
@@ -56486,7 +56479,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"error\"",
+ "value": "'error'",
"description": "The type of the `TrackingConsentChangeResultError` API."
}
],
@@ -56924,7 +56917,7 @@
"filePath": "src/surfaces/customer-account/api/shared.ts",
"syntaxKind": "PropertySignature",
"name": "type",
- "value": "\"checkout\"",
+ "value": "'checkout'",
"description": "Indicates whether the extension is rendering in the checkout editor."
}
],
@@ -57248,7 +57241,7 @@
"filePath": "src/surfaces/customer-account/components/Avatar/Avatar.ts",
"syntaxKind": "PropertySignature",
"name": "size",
- "value": "Extract",
+ "value": "",
"description": "Size of the avatar.",
"isOptional": true,
"defaultValue": "'base'"
@@ -57263,18 +57256,12 @@
}
],
"value": "export interface AvatarProps extends IdProps {\n /**\n * Initials to display in the avatar.\n */\n initials?: string;\n\n /**\n * The URL or path to the image.\n *\n * Initials will be rendered as a fallback if `src` is not provided, fails to load or does not load quickly.\n */\n src?: string;\n\n /**\n * Invoked when load of provided image completes successfully.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload\n */\n onLoad?(): void;\n\n /**\n * Invoked on load error of provided image.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror\n */\n onError?(): void;\n\n /**\n * Size of the avatar.\n *\n * @default 'base'\n */\n size?: Extract;\n\n /**\n * An alternative text description that describe the image for the reader\n * to understand what it is about or identify the user the avatar belongs to.\n */\n alt?: string;\n}"
- },
- "Size": {
- "filePath": "src/surfaces/checkout/components/shared.ts",
- "syntaxKind": "TypeAliasDeclaration",
- "name": "Size",
- "value": "'extraSmall' | 'small' | 'base' | 'large' | 'extraLarge' | 'fill'",
- "description": ""
}
}
}
],
- "category": "components",
+ "category": "UI components",
+ "subCategory": "Media and visuals",
"defaultExample": {
"image": "avatar-preview.png",
"altText": "An example of the avatar with two variants: one with initials and the other with an icon.",
@@ -57305,347 +57292,257 @@
"related": []
},
{
- "name": "Card",
- "description": "Group related content and functionality together in a familiar and consistent style, for customers to scan, read, and get things done.",
- "thumbnail": "card-thumbnail.png",
- "requires": "",
+ "name": "Badge",
+ "description": "Use badges to highlight contextual information, like a label or a status, about an object. An object can be anything that has a status or label attributed to it, like an order or subscription.",
"isVisualComponent": true,
- "type": "",
- "definitions": [
- {
- "title": "CardProps",
- "description": "",
- "type": "CardProps",
- "typeDefinitions": {
- "CardProps": {
- "filePath": "src/surfaces/customer-account/components/Card/Card.ts",
- "name": "CardProps",
- "description": "",
- "members": [
- {
- "filePath": "src/surfaces/customer-account/components/Card/Card.ts",
- "syntaxKind": "PropertySignature",
- "name": "padding",
- "value": "boolean",
- "description": "Adjust the padding of all edges.\n\n`true` applies a default padding that is appropriate for the component.",
- "isOptional": true
- }
- ],
- "value": "export interface CardProps {\n /**\n * Adjust the padding of all edges.\n *\n * `true` applies a default padding that is appropriate for the component.\n */\n padding?: boolean;\n}"
- }
- }
- }
- ],
- "category": "components",
- "defaultExample": {
- "image": "card-preview.png",
- "altText": "An example of the card component shows a header that says \"Addresses\", and a button in the upper-right corner that says \"+Add\". Under the header, there is a full mailing address labeled as the default address, with a pencil icon for editing it.",
- "codeblock": {
- "title": "Basic Card",
- "tabs": [
- {
- "title": "React",
- "code": "import {\n Card,\n Grid,\n BlockStack,\n Heading,\n Text,\n TextBlock,\n View,\n Icon,\n InlineLayout,\n reactExtension,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <App />,\n);\n\nfunction App() {\n return (\n <Card padding>\n <Grid\n columns={['fill', 'auto']}\n spacing=\"base\"\n minInlineSize=\"fill\"\n blockAlignment=\"start\"\n >\n <BlockStack spacing=\"loose\">\n <Heading>Addresses</Heading>\n <BlockStack spacing=\"base\">\n <Text appearance=\"subdued\">\n Default address\n </Text>\n <BlockStack spacing=\"extraTight\">\n <TextBlock>\n Kristin Watson\n </TextBlock>\n <TextBlock>\n 1655 Island Pkwy\n </TextBlock>\n <TextBlock>\n Kamloops BC M7G 672\n </TextBlock>\n <TextBlock>Canada</TextBlock>\n </BlockStack>\n </BlockStack>\n </BlockStack>\n <BlockStack spacing=\"loose\">\n <InlineLayout blockAlignment=\"center\">\n <Icon\n source=\"plus\"\n size=\"small\"\n appearance=\"accent\"\n />\n <Text appearance=\"accent\">Add</Text>\n </InlineLayout>\n <View inlineAlignment=\"end\">\n <Icon\n source=\"pen\"\n size=\"small\"\n appearance=\"accent\"\n />\n </View>\n </BlockStack>\n </Grid>\n </Card>\n );\n}\n",
- "language": "tsx"
- },
- {
- "title": "JS",
- "code": "import {\n Card,\n Grid,\n extension,\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.page.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nfunction renderApp(root, api) {\n const card = root.createComponent(\n Card,\n {padding: true},\n [\n root.createComponent(Grid, {columns: ['1fr', 'auto'],\n spacing: \"base\",\n minInlineSize: \"fill\",\n blockAlignment: \"start\"}, [\n root.createComponent('BlockStack', {spacing: 'loose'}, [\n root.createComponent('Heading', undefined, 'Addresses'),\n root.createComponent('BlockStack', {spacing: 'base'}, [\n root.createComponent('Text', {appearance: \"subdued\"}, 'Default address'),\n root.createComponent('BlockStack', {spacing: 'extraTight'}, [\n root.createComponent('TextBlock',{}, 'Kristin Watson'),\n root.createComponent('TextBlock', {}, '1655 Island Pkwy'),\n root.createComponent('TextBlock', {}, 'Kamloops BC M7G 672'),\n root.createComponent('TextBlock', {}, 'Canada'),\n ]),\n ]),\n ]),\n root.createComponent('BlockStack', {spacing: 'loose'}, [\n root.createComponent('InlineLayout', {blockAlignment: \"center\"}, [\n root.createComponent('Icon', {source: \"plus\", size: \"small\", appearance: \"accent\"}),\n root.createComponent('Text', {appearance: \"accent\"}, 'Add'),\n ]),\n root.createComponent('View', {inlineAlignment: \"end\"}, [\n root.createComponent('Icon', {source: \"pen\", size: \"small\", appearance: \"accent\"}),\n ]),\n ]),\n ]),\n ])\n root.append(card);\n}\n",
- "language": "js"
- }
- ]
- }
- },
- "subSections": [
- {
- "type": "Generic",
- "anchorLink": "best-practices",
- "title": "Best Practices",
- "sectionContent": "\n- Group related information.\n- Use headings that set clear expectations about the card’s purpose.\n- Display information in a way that emphasizes and prioritizes what the customer needs to know first.\n"
- }
- ],
- "related": []
- },
- {
- "name": "CustomerAccountAction",
- "description": "A modal to complete an order action flow. This component can only be used to populate the [customer-account.order.action.render](/docs/api/customer-account-ui-extensions/unstable/targets/order-action-menu/customer-account-order-action-render) extension target, which renders as a result of the customer clicking the order action button rendered via the [customer-account.order.action.menu-item.render](/docs/api/customer-account-ui-extensions/unstable/targets/order-action-menu/customer-account-order-action-menu-item-render) extension target.",
- "thumbnail": "customeraccountaction-thumbnail.png",
+ "thumbnail": "badge-thumbnail.png",
"requires": "",
- "isVisualComponent": true,
"type": "",
"definitions": [
{
- "title": "CustomerAccountActionProps",
+ "title": "BadgeProps",
"description": "",
- "type": "CustomerAccountActionProps",
+ "type": "BadgeProps",
"typeDefinitions": {
- "CustomerAccountActionProps": {
- "filePath": "src/surfaces/customer-account/components/CustomerAccountAction/CustomerAccountAction.ts",
- "name": "CustomerAccountActionProps",
+ "BadgeProps": {
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
+ "name": "BadgeProps",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/components/CustomerAccountAction/CustomerAccountAction.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "primaryAction",
- "value": "RemoteFragment",
- "description": "Sets the Primary action button of the container. This component must be a button component.",
+ "name": "accessibilityLabel",
+ "value": "string",
+ "description": "A label that describes the purpose or contents of the element. When set, it will announced to buyers using assistive technologies.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/CustomerAccountAction/CustomerAccountAction.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "secondaryAction",
- "value": "RemoteFragment",
- "description": "Sets the Secondary action button of the container. This component must be a button component.",
+ "name": "accessibilityVisibility",
+ "value": "AccessibilityVisibility",
+ "description": "Changes the visibility of the element to assistive technologies.\n\n`hidden` hides the component from assistive technology (for example, a screen reader) but remains visually visible.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/CustomerAccountAction/CustomerAccountAction.ts",
- "syntaxKind": "PropertySignature",
- "name": "title",
- "value": "string",
- "description": "Sets the title of the Action container."
- }
- ],
- "value": "export interface CustomerAccountActionProps {\n /**\n * Sets the title of the Action container.\n */\n title: string;\n /**\n * Sets the Primary action button of the container. This component must be a button component.\n */\n primaryAction?: RemoteFragment;\n /**\n * Sets the Secondary action button of the container. This component must be a button component.\n */\n secondaryAction?: RemoteFragment;\n}"
- }
- }
- },
- {
- "title": "ButtonProps primaryAction",
- "description": "Supported props for Buttons used inside CustomerAccountAction `primaryAction` prop.
`children` only support text.",
- "type": "Docs_CustomerAccountAction_Button_PrimaryAction",
- "typeDefinitions": {
- "Docs_CustomerAccountAction_Button_PrimaryAction": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_CustomerAccountAction_Button_PrimaryAction",
- "description": "",
- "members": [
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "name": "icon",
+ "value": "IconSource",
+ "description": "The name of the icon to be displayed in the badge.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityRole",
- "value": "ButtonAccessibilityRole",
- "description": "The role of the button that will be rendered.\n\n`button`: renders a regular button.\n\n`submit`: renders a button that submits a form.",
+ "name": "iconPosition",
+ "value": "'start' | 'end'",
+ "description": "The position of the icon in relation to the text.",
"isOptional": true,
- "defaultValue": "'button'"
+ "defaultValue": "'start'"
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "disabled",
- "value": "boolean",
- "description": "Disables the button, disallowing any interaction.",
+ "name": "size",
+ "value": "'small' | 'base'",
+ "description": "The size of the badge being rendered.",
"isOptional": true,
- "defaultValue": "false"
+ "defaultValue": "'base'"
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Replaces content with a loading indicator.",
+ "name": "tone",
+ "value": "Tone",
+ "description": "The tone of the badge being rendered. Indicates its level of importance, where subdued provides the least emphasis, while critical indicates the highest level of urgency.",
"isOptional": true,
- "defaultValue": "false"
+ "defaultValue": "'default'"
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
"syntaxKind": "PropertySignature",
- "name": "loadingLabel",
- "value": "string",
- "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
- "isOptional": true
- },
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
+ "name": "visibility",
+ "value": "Visibility",
+ "description": "Changes the visibility of the element.\n\n`hidden` visually hides the component while keeping it accessible to assistive technology, such as screen readers. Hidden elements don't take any visual space contrary to CSS visibility: hidden;",
"isOptional": true
}
],
- "value": "export interface Docs_CustomerAccountAction_Button_PrimaryAction\n extends Pick<\n ButtonProps,\n | 'onPress'\n | 'loading'\n | 'loadingLabel'\n | 'disabled'\n | 'accessibilityLabel'\n | 'accessibilityRole'\n > {}"
+ "value": "export interface BadgeProps extends VisibilityProps {\n /**\n * The tone of the badge being rendered. Indicates its level of importance,\n * where subdued provides the least emphasis, while critical indicates the highest level of urgency.\n *\n * @default 'default'\n */\n tone?: Tone;\n /**\n * The size of the badge being rendered.\n *\n * @default 'base'\n */\n size?: Extract;\n /**\n * A label that describes the purpose or contents of the element. When set,\n * it will announced to buyers using assistive technologies.\n */\n accessibilityLabel?: string;\n /**\n * The name of the icon to be displayed in the badge.\n */\n icon?: IconSource;\n /**\n * The position of the icon in relation to the text.\n *\n * @default 'start'\n */\n iconPosition?: 'start' | 'end';\n}"
},
- "ButtonAccessibilityRole": {
+ "AccessibilityVisibility": {
"filePath": "src/surfaces/checkout/components/shared.ts",
"syntaxKind": "TypeAliasDeclaration",
- "name": "ButtonAccessibilityRole",
- "value": "'button' | 'submit'",
+ "name": "AccessibilityVisibility",
+ "value": "'hidden'",
+ "description": ""
+ },
+ "IconSource": {
+ "filePath": "src/surfaces/checkout/components/Icon/Icon.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "IconSource",
+ "value": "'arrowLeft' | 'arrowRight' | 'arrowUp' | 'arrowUpRight' | 'arrowDown' | 'bag' | 'bullet' | 'calendar' | 'camera' | 'caretDown' | 'cart' | 'cashDollar' | 'categories' | 'checkmark' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'chevronDown' | 'clipboard' | 'clock' | 'close' | 'creditCard' | 'critical' | 'delete' | 'delivered' | 'delivery' | 'disabled' | 'discount' | 'email' | 'error' | 'errorFill' | 'external' | 'filter' | 'geolocation' | 'gift' | 'giftFill' | 'grid' | 'hamburger' | 'hollowCircle' | 'horizontalDots' | 'image' | 'info' | 'infoFill' | 'list' | 'lock' | 'magnify' | 'map' | 'marker' | 'minus' | 'mobile' | 'note' | 'orderBox' | 'pen' | 'plus' | 'profile' | 'question' | 'questionFill' | 'reorder' | 'reset' | 'return' | 'savings' | 'settings' | 'star' | 'starFill' | 'starHalf' | 'store' | 'success' | 'truck' | 'upload' | 'verticalDots' | 'warning' | 'warningFill'",
+ "description": ""
+ },
+ "Tone": {
+ "filePath": "src/surfaces/checkout/components/Badge/Badge.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Tone",
+ "value": "'default' | 'critical' | 'subdued'",
+ "description": ""
+ },
+ "Visibility": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Visibility",
+ "value": "'hidden'",
"description": ""
- }
- }
- },
- {
- "title": "ButtonProps secondaryAction",
- "description": "Supported props for Button used inside CustomerAccountAction `secondaryAction` prop.
`children` only support text.",
- "type": "Docs_CustomerAccountAction_Button_SecondaryAction",
- "typeDefinitions": {
- "Docs_CustomerAccountAction_Button_SecondaryAction": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_CustomerAccountAction_Button_SecondaryAction",
- "description": "",
- "members": [
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
- "isOptional": true
- },
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "PropertySignature",
- "name": "disabled",
- "value": "boolean",
- "description": "Disables the button, disallowing any interaction.",
- "isOptional": true,
- "defaultValue": "false"
- },
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Replaces content with a loading indicator.",
- "isOptional": true,
- "defaultValue": "false"
- },
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "PropertySignature",
- "name": "loadingLabel",
- "value": "string",
- "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
- "isOptional": true
- },
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
- "isOptional": true
- }
- ],
- "value": "export interface Docs_CustomerAccountAction_Button_SecondaryAction\n extends Pick<\n ButtonProps,\n 'onPress' | 'loading' | 'loadingLabel' | 'disabled' | 'accessibilityLabel'\n > {}"
}
}
}
],
- "category": "components",
+ "category": "UI components",
+ "subCategory": "Feedback and status indicators",
"defaultExample": {
- "image": "customeraccountaction-preview.png",
- "altText": "An example of the CustomerAccountAction component shows a dismissible modal with a header that says \"Edit order\", a field for adjusting quantities, and a Save button.",
+ "image": "badge-default.png",
"codeblock": {
- "title": "Basic CustomerAccountAction",
+ "title": "Basic Badge",
"tabs": [
{
"title": "React",
- "code": "import {\n Button,\n CustomerAccountAction,\n TextBlock,\n reactExtension,\n useApi,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension('customer-account.order.action.render', () => (\n <App />\n));\n\nfunction App() {\n const api = useApi<'customer-account.order.action.render'>();\n\n return (\n <CustomerAccountAction\n title=\"Extension title\"\n primaryAction={\n <Button\n onPress={() => {\n api.close();\n }}\n >\n Click to close\n </Button>\n }\n >\n <TextBlock>Extension content</TextBlock>\n </CustomerAccountAction>\n );\n}\n",
+ "code": "import {\n reactExtension,\n Badge,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return <Badge>Available</Badge>;\n}\n",
"language": "tsx"
},
{
"title": "JS",
- "code": "import {\n Button,\n CustomerAccountAction,\n extension\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.order.action.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nasync function renderApp(root, api) {\n const primaryAction = root.createFragment();\n await primaryAction.append(root.createComponent(Button, {onPress: () => {api.close()}}, 'Click to close'));\n\n const customerAccountAction = root.createComponent(\n CustomerAccountAction,\n {\n title: 'Extension title',\n primaryAction,\n },\n root.createComponent('TextBlock', {}, 'Extension content')\n );\n root.append(customerAccountAction);\n}\n",
+ "code": "import {extension, Badge} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const badge = root.createComponent(Badge, undefined, 'Available');\n\n root.appendChild(badge);\n});\n",
"language": "js"
}
]
}
},
+ "examples": {
+ "description": "",
+ "examples": [
+ {
+ "image": "badge-status.png",
+ "codeblock": {
+ "title": "Using the Badge component as a status indicator",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n reactExtension,\n Badge,\n BlockStack,\n Text,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <BlockStack\n border=\"base\"\n padding=\"large200\"\n spacing=\"base\"\n borderRadius=\"large\"\n >\n <BlockStack spacing=\"none\">\n <Text size=\"large\" emphasis=\"bold\">\n Subscription\n </Text>\n <Text>Mini garden seeds</Text>\n </BlockStack>\n <BlockStack\n spacing=\"none\"\n inlineAlignment=\"start\"\n >\n <Text emphasis=\"bold\">\n $35.00 monthly\n </Text>\n <Badge tone=\"subdued\">Paused</Badge>\n </BlockStack>\n </BlockStack>\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {\n extension,\n Badge,\n BlockStack,\n Text,\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const container = root.createComponent(\n BlockStack,\n {\n border: 'base',\n padding: 'large200',\n spacing: 'base',\n borderRadius: 'large',\n },\n [\n root.createComponent(BlockStack, {spacing: 'none'}, [\n root.createComponent(\n Text,\n {size: 'large', emphasis: 'bold'},\n 'Subscription',\n ),\n root.createComponent(Text, undefined, 'Mini garden seeds'),\n ]),\n\n root.createComponent(\n BlockStack,\n {spacing: 'none', inlineAlignment: 'start'},\n [\n root.createComponent(Text, {emphasis: 'bold'}, '$35.00 monthly'),\n root.createComponent(Badge, {tone: 'subdued'}, 'Paused'),\n ],\n ),\n ],\n );\n\n root.appendChild(container);\n});\n",
+ "language": "js"
+ }
+ ]
+ }
+ }
+ ]
+ },
"subSections": [
{
"type": "Generic",
"anchorLink": "best-practices",
"title": "Best Practices",
- "sectionContent": "\n- Use CustomerAccountAction to shift focus toward information and functionality needed to confirm or complete an order action.\n- If the order action experience you’re building requires complex forms or large amounts of information, consider building a full-page extension instead.\n- See Polaris for more best practices and content guidelines for designing [Modals](https://polaris.shopify.com/components/overlays/modal#best-practices).\n"
+ "sectionContent": "- Aim for one word per badge.\n\n- For complex states that require 2 words, use sentence case.\n\n- For status badge labels, use an adjective (for example, \"Available\" or \"Complete\") or a verb in the past tense (for example, \"Delivered\" or \"Delayed\")\n\n- Use the tone prop to indicate the level of importance. `subdued` provides the least emphasis, while `critical` indicates the highest level of urgency.\n\n- Write a useful `accessibilityLabel` so that customers using assistive technology can access the full meaning of the badge in context. For badges with the `critical` tone, include information that conveys the urgency of the badge (for example, \"Warning\" or \"Alert\").\n\n- A badge should always be attributed to an object on the page."
}
],
"related": []
},
{
- "name": "ImageGroup",
- "description": "Display up to 4 images in a grid or stacked layout. For example, images of products in a wishlist or subscription. When there are more than 4 images, the component indicates how many more images are not displayed.",
- "thumbnail": "imagegroup-thumbnail.png",
- "requires": "",
+ "name": "Banner",
+ "description": "Use banners to communicate important messages to customers in a prominent way.",
"isVisualComponent": true,
+ "thumbnail": "banner-thumbnail.png",
+ "requires": "",
"type": "",
"definitions": [
{
- "title": "ImageGroupProps",
+ "title": "BannerProps",
"description": "",
- "type": "ImageGroupProps",
+ "type": "BannerProps",
"typeDefinitions": {
- "ImageGroupProps": {
- "filePath": "src/surfaces/customer-account/components/ImageGroup/ImageGroup.ts",
- "name": "ImageGroupProps",
+ "BannerProps": {
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
+ "name": "BannerProps",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/components/ImageGroup/ImageGroup.ts",
- "syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label that describes the purpose or contents of the image group. When set, it will be announced to users using assistive technologies and will provide them with more context.",
- "isOptional": true
- },
- {
- "filePath": "src/surfaces/customer-account/components/ImageGroup/ImageGroup.ts",
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
+ "name": "collapsible",
"value": "boolean",
- "description": "Indicates that the image group is in a loading state.\n\nWhen `true`, the image group show a loading indicator.",
+ "description": "Makes the content collapsible. A collapsible banner will conceal child elements initially, but allow the user to expand the banner to see them.",
"isOptional": true,
"defaultValue": "false"
},
{
- "filePath": "src/surfaces/customer-account/components/ImageGroup/ImageGroup.ts",
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
"syntaxKind": "PropertySignature",
- "name": "totalItems",
- "value": "number",
- "description": "Indicates the total number of items that could be displayed in the image group. It is used to determine the remaining number to show when all the available image slots have been filled.",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the component.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/ImageGroup/ImageGroup.ts",
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
+ "syntaxKind": "MethodSignature",
+ "name": "onDismiss",
+ "value": "() => void",
+ "description": "Callback when banner is dismissed. This component is [controlled](https://reactjs.org/docs/forms.html#controlled-components), so you must manage the visibility of the banner in state by using the onDismiss callback.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
"syntaxKind": "PropertySignature",
- "name": "variant",
- "value": "'grid' | 'inline-stack'",
- "description": "Changes the layout of the images.",
+ "name": "status",
+ "value": "Status",
+ "description": "Sets the status of the banner.",
"isOptional": true,
- "defaultValue": "\"grid\""
+ "defaultValue": "'info'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Banner/Banner.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "title",
+ "value": "string",
+ "description": "Banners have an optional title. Use a title to grab the buyer’s attention with a short, concise message. Banners with no title should have child elements to convey the banner’s purpose to the buyer.",
+ "isOptional": true
}
],
- "value": "export interface ImageGroupProps {\n /**\n * Changes the layout of the images.\n *\n * @default \"grid\"\n */\n variant?: 'grid' | 'inline-stack';\n\n /**\n * A label that describes the purpose or contents of the image group. When set,\n * it will be announced to users using assistive technologies and will\n * provide them with more context.\n */\n accessibilityLabel?: string;\n\n /**\n * Indicates that the image group is in a loading state.\n *\n * When `true`, the image group show a loading indicator.\n *\n * @defaultValue false\n */\n loading?: boolean;\n\n /**\n * Indicates the total number of items that could be displayed in the image group. It is used to determine the remaining number to show when all the available image slots have been filled.\n */\n totalItems?: number;\n}"
+ "value": "export interface BannerProps extends IdProps {\n /**\n * Banners have an optional title. Use a title to grab the buyer’s attention\n * with a short, concise message. Banners with no title should have child elements\n * to convey the banner’s purpose to the buyer.\n */\n title?: string;\n /**\n * Sets the status of the banner.\n *\n * @defaultValue 'info'\n */\n status?: Status;\n /**\n * Makes the content collapsible. A collapsible banner will conceal child\n * elements initially, but allow the user to expand the banner to see them.\n *\n * @defaultValue false\n */\n collapsible?: boolean;\n /**\n * Callback when banner is dismissed. This component is\n * [controlled](https://reactjs.org/docs/forms.html#controlled-components),\n * so you must manage the visibility of the banner in state by using\n * the onDismiss callback.\n */\n onDismiss?(): void;\n}"
+ },
+ "Status": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Status",
+ "value": "'info' | 'success' | 'warning' | 'critical'",
+ "description": ""
}
}
}
],
- "category": "components",
+ "category": "UI components",
+ "subCategory": "Feedback and status indicators",
"defaultExample": {
- "image": "imagegroup-preview.png",
- "altText": "An example of the ImageGroup component shows 3 circular images of plants displayed in a row, each one slightly overlapping the previous image—in a horizontal stacked pattern. To the right, there is another group of 3 images of plants, arranged in a 2x2 grid. There is one square image in the upper-left quadrant, one square image in the lower-left quadrant, and the entire right half of the grid is occupied by one image.",
+ "image": "banner-default.png",
"codeblock": {
- "title": "Basic ImageGroup",
+ "title": "Basic Banner",
"tabs": [
{
"title": "React",
- "code": "import {\n Image,\n ImageGroup,\n View,\n reactExtension,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension('customer-account.page.render', () => <App />);\n\nfunction App() {\n return (\n <View maxInlineSize={300}>\n <ImageGroup>\n <Image source=\"../assets/flower.jpg\" />\n <Image source=\"../assets/flower.jpg\" />\n <Image source=\"../assets/flower.jpg\" />\n </ImageGroup>\n </View>\n );\n}\n",
+ "code": "import {\n reactExtension,\n Banner,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <Banner\n status=\"critical\"\n title=\"Your payment details couldn’t be verified. Check your card details and try again.\"\n />\n );\n}\n",
"language": "tsx"
},
{
"title": "JS",
- "code": "import {\n Image,\n ImageGroup,\n View,\n extension,\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.page.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nfunction renderApp(root, api) {\n const firstImage = root.createComponent(Image, {\n source: \"../assets/flower.jpg\"\n });\n\n const secondeImage = root.createComponent(Image, {\n source: \"../assets/flower.jpg\"\n });\n\n const thirdImage = root.createComponent(Image, {\n source: \"../assets/flower.jpg\"\n });\n\n const imageGroup = root.createComponent(ImageGroup);\n\n imageGroup.append(firstImage);\n imageGroup.append(secondeImage);\n imageGroup.append(thirdImage);\n\n const view = root.createComponent(View, {maxInlineSize: 300});\n view.append(imageGroup);\n\n root.append(view);\n}\n",
+ "code": "import {extension, Banner} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const banner = root.createComponent(Banner, {\n status: 'critical',\n title:\n 'Your payment details couldn’t be verified. Check your card details and try again.',\n });\n\n root.appendChild(banner);\n});\n",
"language": "js"
}
]
@@ -57656,129 +57553,112 @@
"type": "Generic",
"anchorLink": "best-practices",
"title": "Best Practices",
- "sectionContent": "\n- Use with the [ResourceItem](/docs/api/customer-account-ui-extension/unstable/components/resourceitem) component\n- Optimize image file sizes and consider lazy loading for performance.\n"
+ "sectionContent": "- Use banners thoughtfully and sparingly, and only for the most important information. Too many banners distract customers from completing checkout.\n\n- Banners are typically displayed at the top of a page or a section, if they relate to specific content. Place banners below the relevant page or section header.\n\n- Include a Button component with next steps when possible.\n\n- Make banners dismissible, unless they contain critical information or an important step that customers need to take.\n\n- Use the `info` banner to update customers about a change or to give them advice.\n\n- Use the `warning` banner to display information that needs attention or that customers need to take action on. Warning banners can be stressful for customers, so be cautious about using them.\n\n- Use the `critical` banner to communicate problems that customers need to resolve immediately to complete checkout."
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "status",
+ "title": "Status",
+ "sectionContent": "| Value | Description |\n| --- | --- |\n| \"info\" | Convey general information or actions that aren’t critical or tied to a particular action.. |\n| \"success\" | Use rarely, only if you need additional visual confirmation that a non-standard action has been completed successfully, for example adding an item to an order as an upsell. |\n| \"warning\" | Display information that needs attention or that customers should take action on. Seeing these banners can be stressful for customers so be cautious about using them. Should not block progress to next step. |\n| \"critical\" | Communicate problems that have to be resolved immediately for customers to complete a task. For example, using a different payment method if card details couldn’t be processed. Seeing these banners can be stressful for customers so be cautious about using them. |"
}
],
"related": []
},
{
- "name": "Menu",
- "description": "Use a menu to display a list of actions in a popover. Actions can open a modal, trigger an event, or link to an external page.",
- "thumbnail": "menu-thumbnail.png",
- "requires": "",
+ "name": "BlockLayout",
+ "description": "BlockLayout is used to lay out content over multiple rows.\n\nBy default, all rows fill the available block space, sharing it equally.",
+ "thumbnail": "blocklayout-thumbnail.png",
"isVisualComponent": true,
+ "requires": "",
"type": "",
"definitions": [
{
- "title": "MenuProps",
+ "title": "BlockLayoutProps",
"description": "",
- "type": "MenuProps",
+ "type": "BlockLayoutProps",
"typeDefinitions": {
- "MenuProps": {
- "filePath": "src/surfaces/customer-account/components/Menu/Menu.ts",
- "name": "MenuProps",
+ "BlockLayoutProps": {
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
+ "name": "BlockLayoutProps",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/components/Menu/Menu.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
"name": "accessibilityLabel",
"value": "string",
- "description": "A label to describe the purpose of the menu that is announced by screen readers.",
+ "description": "A label that describes the purpose or contents of the element. When set, it will be announced to buyers using assistive technologies and will provide them with more context.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/Menu/Menu.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "id",
- "value": "string",
- "description": "A unique identifier for the component.",
+ "name": "accessibilityRole",
+ "value": "ViewLikeAccessibilityRole",
+ "description": "Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help buyers navigate the page.\n\n\nFor example:\n\n- In an HTML host a `['listItem', 'separator']` tuple will render: `
`\n\n- In an HTML host a `listItem` string will render: `
`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/Menu/Menu.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "onClose",
- "value": "() => void",
- "description": "Callback to run when the Menu is closed",
- "isOptional": true
+ "name": "background",
+ "value": "MaybeConditionalStyle",
+ "description": "Adjust the background.",
+ "isOptional": true,
+ "defaultValue": "'transparent'"
},
{
- "filePath": "src/surfaces/customer-account/components/Menu/Menu.ts",
- "syntaxKind": "PropertySignature",
- "name": "onOpen",
- "value": "() => void",
- "description": "Callback to run when the Menu is opened",
- "isOptional": true
- }
- ],
- "value": "export interface MenuProps extends IdProps {\n /**\n * A label to describe the purpose of the menu that is announced by screen readers.\n */\n accessibilityLabel?: string;\n /**\n * Callback to run when the Menu is opened\n */\n onOpen?: () => void;\n /**\n * Callback to run when the Menu is closed\n */\n onClose?: () => void;\n}"
- }
- }
- },
- {
- "title": "ButtonProps children",
- "description": "The Menu component exclusively accepts Button elements with restricted props as its children. The `appearance` prop will always be set to monochrome by default.",
- "type": "Docs_Menu_Button_Action",
- "typeDefinitions": {
- "Docs_Menu_Button_Action": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_Menu_Button_Action",
- "description": "",
- "members": [
- {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "name": "blockAlignment",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Position children along the cross axis.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityRole",
- "value": "ButtonAccessibilityRole",
- "description": "The role of the button that will be rendered.\n\n`button`: renders a regular button.\n\n`submit`: renders a button that submits a form.",
- "isOptional": true,
- "defaultValue": "'button'"
+ "name": "border",
+ "value": "MaybeResponsiveConditionalStyle>",
+ "description": "Adjust the border style.\n\nTo shorten the code, it is possible to specify all the border style properties in one property.\n\nFor example:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart border styles are `base`\n\n- `['base', 'none']` means blockStart and blockEnd border styles are `base`, inlineStart and inlineEnd border styles are `none`\n\n- `['base', 'none', 'dotted', 'base']` means blockStart border style is `base`, inlineEnd border style is `none`, blockEnd border style is `dotted` and blockStart border style is `base`",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "activateAction",
- "value": "'auto' | 'copy'",
- "description": "Sets the action the `activateTarget` should take when this pressable is activated.\n\nSupported actions by component:\n\n| Component | Supported Actions | Default ('auto') |\n|---------------|-------------------|-------------------|\n| [`ClipboardItem`](/docs/api/checkout-ui-extensions/latest/clipboarditem) | 'copy' | 'copy' |",
+ "name": "borderRadius",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "",
"isOptional": true,
- "defaultValue": "'auto' - a default action for the target component."
+ "isPrivate": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "activateTarget",
- "value": "string",
- "description": "ID of a component that should respond to activations (e.g. clicks) on this pressable.\n\nSee `activateAction` for how to control the behavior of the target.",
+ "name": "borderWidth",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "Adjust the border width.\n\nTo shorten the code, it is possible to specify all the border width properties in one property.\n\nFor example:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart border widths are `base`\n\n- `['base', 'medium']` means blockStart and blockEnd border widths are `base`, inlineStart and inlineEnd border widths are `medium`\n\n- `['base', 'medium', 'medium', 'base']` means blockStart border width is `base`, inlineEnd border width is `medium`, blockEnd border width is `medium` and blockStart border width is `base`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "appearance",
- "value": "Extract",
- "description": "Specify the color treatment of the Button.",
+ "name": "cornerRadius",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "Adjust the corner radius.\n\nProvide a single value to apply the same corner radius to all four corners, two values to apply different corner radii to opposing corners, or four values to apply different corner radii to each individual corner.\n\nFor example:\n\n- `base` means all 4 corner radii are `base`\n\n- `['base', 'none']` means the StartStart and EndEnd corner radii are `base`, StartEnd and EndStart corner radii are `none`. When the context’s language direction is left to right, StartStart and EndEnd corners are the top left and bottom right corners\n while StartEnd and EndStart corners are the top right and bottom left corners.\n\n- `['base', 'none', 'small', 'base']` means StartStart corner radius is `base`, StartEnd corner radius is `none`, EndEnd corner radius is `small` and EndStart corner radius is `base`\n\nA `borderRadius` alias is available for this property. When both are specified, `cornerRadius` takes precedence.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "disabled",
- "value": "boolean",
- "description": "Disables the button, disallowing any interaction.",
+ "name": "display",
+ "value": "MaybeResponsiveConditionalStyle<'auto' | 'none'>",
+ "description": "Changes the display of the component.\n\n\n`auto` the component's initial value. The actual value depends on the component and context.\n\n`none` hides the component and removes it from the accessibility tree, making it invisible to screen readers.",
"isOptional": true,
- "defaultValue": "false"
+ "defaultValue": "'auto'"
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
"name": "id",
"value": "string",
@@ -57786,536 +57666,13053 @@
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Replaces content with a loading indicator.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "inlineAlignment",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Position children along the main axis.",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "loadingLabel",
- "value": "string",
- "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
+ "name": "maxBlockSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the maximum block size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of maxBlockSize](https://developer.mozilla.org/en-US/docs/Web/CSS/max-block-size).",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "maxInlineSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the maximum inline size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of maxInlineSize](https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size).",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "overlay",
- "value": "RemoteFragment",
- "description": "An overlay component to render when the user interacts with the component.",
+ "name": "minBlockSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the block size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of minBlockSize](https://developer.mozilla.org/en-US/docs/Web/CSS/min-block-size).",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "submit",
- "value": "boolean",
- "description": "Allows the button to submit a form.",
+ "name": "minInlineSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the minimum inline size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\\\n\nSee [MDN explanation of minInlineSize](https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "overflow",
+ "value": "'hidden' | 'visible'",
+ "description": "Sets the overflow behavior of the element.\n\n`hidden`: clips the content when it is larger than the element’s container. The element will not be scrollable and the users will not be able to access the clipped content by dragging or using a scroll wheel.\n\n`visible`: the content that extends beyond the element’s container is visible.",
"isOptional": true,
- "deprecationMessage": "use `accessibilityRole=\"submit\"` instead"
+ "defaultValue": "'visible'"
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "to",
- "value": "string",
- "description": "Destination URL to link to.",
+ "name": "padding",
+ "value": "MaybeResponsiveConditionalStyle>",
+ "description": "Adjust the padding.\n\nTo shorten the code, it is possible to specify all the padding properties in one property.\n\n\nExamples:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart paddings are `base`\n\n- [`base`, `none`] means blockStart and blockEnd paddings are `base`, inlineStart and inlineEnd paddings are `none`\n\n- [`base`, `none`, `loose`, `tight`] means blockStart padding is `base`, inlineEnd padding is `none`, blockEnd padding is `loose` and blockStart padding is `tight`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
"syntaxKind": "PropertySignature",
- "name": "toggles",
- "value": "string",
- "description": "The component's identifier whose visibility will be toggled when this component is actioned.",
- "isOptional": true
+ "name": "rows",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Sizes for each row of the layout.\n\n\n`auto`: intrinsic size of the element.\n\n`fill`: fills the remaining available space. When multiple elements are set to `fill`, the remaining space is shared equally.\n\n`` `${number}%` ``: size in percentages.\n\n`` `${number}fr` ``: size in fractions.\n\n`number`: size in pixels.\n\n\n- When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.\n\n- When the size of an element is not explicitly set, it will fill the remaining space available.\n\n- When only one size is set and outside of an array, all elements of the layout will take that size.",
+ "isOptional": true,
+ "defaultValue": "'fill'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/BlockLayout/BlockLayout.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "spacing",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Adjust spacing between children.\n\n- `base` means the space between rows and columns is `base`.\n\n- [`base`, `none`] means the space between rows is `base`, space between columns is `none`.",
+ "isOptional": true,
+ "defaultValue": "'none'"
}
],
- "value": "export interface Docs_Menu_Button_Action\n extends Omit<\n ButtonProps,\n 'kind' | 'textDecoration' | 'inlineAlignment' | 'inlineSize' | 'size'\n > {}"
+ "value": "export interface BlockLayoutProps extends Omit {\n /**\n * Sizes for each row of the layout.\n *\n *\n * `auto`: intrinsic size of the element.\n *\n * `fill`: fills the remaining available space. When multiple elements are set to `fill`, the remaining space is shared equally.\n *\n * `` `${number}%` ``: size in percentages.\n *\n * `` `${number}fr` ``: size in fractions.\n *\n * `number`: size in pixels.\n *\n *\n * - When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.\n *\n * - When the size of an element is not explicitly set, it will fill the remaining space available.\n *\n * - When only one size is set and outside of an array, all elements of the layout will take that size.\n *\n *\n * @defaultValue 'fill'\n */\n rows?: MaybeResponsiveConditionalStyle;\n}"
},
- "ButtonAccessibilityRole": {
+ "ViewLikeAccessibilityRole": {
"filePath": "src/surfaces/checkout/components/shared.ts",
"syntaxKind": "TypeAliasDeclaration",
- "name": "ButtonAccessibilityRole",
- "value": "'button' | 'submit'",
+ "name": "ViewLikeAccessibilityRole",
+ "value": "NonPresentationalAccessibilityRole | [NonPresentationalAccessibilityRole, NonPresentationalAccessibilityRole]",
"description": ""
},
- "Appearance": {
+ "NonPresentationalAccessibilityRole": {
"filePath": "src/surfaces/checkout/components/shared.ts",
"syntaxKind": "TypeAliasDeclaration",
- "name": "Appearance",
- "value": "'base' | 'accent' | 'decorative' | 'interactive' | 'subdued' | 'info' | 'success' | 'warning' | 'critical' | 'monochrome'",
+ "name": "NonPresentationalAccessibilityRole",
+ "value": "'main' | 'header' | 'footer' | 'section' | 'complementary' | 'navigation' | 'orderedList' | 'listItem' | 'unorderedList' | 'separator' | 'status' | 'alert'",
"description": ""
- }
- }
- }
- ],
- "category": "components",
- "defaultExample": {
- "image": "menu-default.png",
- "altText": "An example of a Menu with three actions.",
- "codeblock": {
- "title": "Basic Menu",
- "tabs": [
- {
- "title": "React",
- "code": "import {\n reactExtension,\n Button,\n Menu,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <App />,\n);\n\nfunction App() {\n return (\n <Button\n overlay={\n <Menu>\n <Button\n onPress={() =>\n console.log('Submit problem')\n }\n >\n Submit problem\n </Button>\n <Button to=\"https://shopify.com\">\n Request return\n </Button>\n <Button appearance=\"critical\">\n Cancel order\n </Button>\n </Menu>\n }\n >\n Manage\n </Button>\n );\n}\n",
- "language": "tsx"
},
- {
- "title": "JS",
- "code": "import {Menu, Button, extension} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root, api) => {\n renderApp(root, api);\n});\n\nasync function renderApp(root, api) {\n const menuFragment = root.createFragment();\n const menu = root.createComponent(Menu, {}, [\n root.createComponent(\n Button,\n {onPress: () => console.log('Submit problem')},\n 'Submit problem',\n ),\n root.createComponent(Button, {to: 'https://shopify.com'}, 'Request return'),\n root.createComponent(Button, {appearance: 'critical'}, 'Cancel order'),\n ]);\n menuFragment.appendChild(menu);\n const button = root.createComponent(\n Button,\n {overlay: menuFragment},\n 'Manage',\n );\n\n root.appendChild(button);\n}\n",
- "language": "js"
- }
- ]
- }
- },
- "subSections": [
- {
- "type": "Generic",
- "anchorLink": "best-practices",
- "title": "Best Practices",
- "sectionContent": "\n### Consolidate actions into one menu\n\n- Use the menu component in the upper-right corner of full-page extensions, to be consistent with the **Order status** page.\n- Use menus to consolidate page-level actions, instead of adding multiple buttons around the page.\n\n\n\n### Content guidelines\n\nWhen writing button labels:\n- Aim for 2 words (verb and noun).\n- Lead with a strong verb that encourages action.\n- Avoid unnecessary words and articles such as “the,” “an,” or “a.”\n- Use sentence case.\n\n\n"
- }
- ],
- "related": [
- {
- "name": "Popover",
- "subtitle": "Component",
- "url": "../../../checkout-ui-extensions/unstable/components/overlays/popover",
- "type": "Component"
- }
- ]
- },
- {
- "name": "Page",
- "description": "The outer wrapper of the page—including the page title, subtitle, and page-level actions—displayed in a familiar and consistent style that sets expectations about the purpose of the page.",
- "thumbnail": "page-thumbnail.png",
- "requires": "",
- "isVisualComponent": true,
- "type": "",
- "definitions": [
- {
- "title": "PageProps",
- "description": "",
- "type": "PageProps",
- "typeDefinitions": {
- "PageProps": {
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
- "name": "PageProps",
+ "MaybeConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeConditionalStyle",
+ "value": "T | ConditionalStyle",
+ "description": "A type that represents a value that can be a conditional style. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.\n\nTo learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation."
+ },
+ "ConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalStyle",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Indicates that the page is in a loading state.\n\nWhen `true`, the page shows loading indicators for the UI elements that it is owns. The page is not responsible for the loading indicators of any content that is passed as `children`.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "conditionals",
+ "value": "ConditionalValue[]",
+ "description": "An array of conditional values."
},
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "primaryAction",
- "value": "RemoteFragment",
- "description": "The action grouping, provided as button(s), that is placed in the primary position of the page.",
+ "name": "default",
+ "value": "T",
+ "description": "The default value applied when none of the conditional values specified in `conditionals` are met.",
"isOptional": true
- },
+ }
+ ],
+ "value": "export interface ConditionalStyle<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The default value applied when none of the conditional values\n * specified in `conditionals` are met.\n */\n default?: T;\n /**\n * An array of conditional values.\n */\n conditionals: ConditionalValue[];\n}"
+ },
+ "ConditionalValue": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalValue",
+ "description": "",
+ "members": [
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "primaryActionAccessibilityLabel",
- "value": "string",
- "description": "Accessibility label for the primary action grouping. If an accessibility label is not provided, default text is used.",
- "isOptional": true,
- "defaultValue": "\"More actions\""
+ "name": "conditions",
+ "value": "AcceptedConditions",
+ "description": "The conditions that must be met for the value to be applied. At least one condition must be specified."
},
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "primaryActionLabel",
- "value": "string",
- "description": "Label for the primary action grouping. If a label is not provided, default text is used.",
- "isOptional": true,
- "defaultValue": "\"More actions\""
- },
+ "name": "value",
+ "value": "T",
+ "description": "The value that will be applied if the conditions are met."
+ }
+ ],
+ "value": "export interface ConditionalValue<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The conditions that must be met for the value to be applied. At least one\n * condition must be specified.\n */\n conditions: AcceptedConditions;\n /**\n * The value that will be applied if the conditions are met.\n */\n value: T;\n}"
+ },
+ "Background": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Background",
+ "value": "'transparent' | 'base' | 'subdued'",
+ "description": ""
+ },
+ "MaybeResponsiveConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeResponsiveConditionalStyle",
+ "value": "T | ConditionalStyle",
+ "description": "A type that represents a value that can be a conditional style. The conditions are based on the viewport size. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.\n\nTo learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation."
+ },
+ "ViewportSizeCondition": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ViewportSizeCondition",
+ "description": "",
+ "members": [
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "secondaryAction",
- "value": "RemoteFragment",
- "description": "The action grouping, provided as button(s), that is placed in the secondary position of the page.",
+ "name": "viewportInlineSize",
+ "value": "{ min: T; }",
+ "description": ""
+ }
+ ],
+ "value": "export interface ViewportSizeCondition {\n viewportInlineSize: {min: T};\n}"
+ },
+ "BlockAlignment": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "BlockAlignment",
+ "value": "Alignment | 'baseline'",
+ "description": ""
+ },
+ "Alignment": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Alignment",
+ "value": "'start' | 'center' | 'end'",
+ "description": ""
+ },
+ "MaybeShorthandProperty": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeShorthandProperty",
+ "value": "T | ShorthandProperty",
+ "description": ""
+ },
+ "ShorthandProperty": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "ShorthandProperty",
+ "value": "[T, T] | [T, T, T, T]",
+ "description": ""
+ },
+ "BorderStyle": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "BorderStyle",
+ "value": "'base' | 'dashed' | 'dotted' | 'none'",
+ "description": ""
+ },
+ "CornerRadius": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "CornerRadius",
+ "value": "'base' | 'small' | 'large' | 'fullyRounded' | 'none' | CornerRadiusDeprecated",
+ "description": ""
+ },
+ "CornerRadiusDeprecated": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "CornerRadiusDeprecated",
+ "value": "'tight' | 'loose'",
+ "description": ""
+ },
+ "BorderWidth": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "BorderWidth",
+ "value": "'base' | 'medium' | 'thick'",
+ "description": ""
+ },
+ "InlineAlignment": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "InlineAlignment",
+ "value": "'start' | 'center' | 'end'",
+ "description": ""
+ },
+ "Spacing": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Spacing",
+ "value": "'none' | 'extraTight' | 'tight' | 'base' | 'loose' | 'extraLoose'",
+ "description": ""
+ },
+ "Rows": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Rows",
+ "value": "GridItemSize[] | GridItemSize",
+ "description": ""
+ },
+ "GridItemSize": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "GridItemSize",
+ "value": "'auto' | 'fill' | number | `${number}fr` | `${number}%`",
+ "description": ""
+ }
+ }
+ }
+ ],
+ "category": "UI components",
+ "subCategory": "Layout and structure",
+ "defaultExample": {
+ "image": "blocklayout-default.png",
+ "codeblock": {
+ "title": "Basic BlockLayout",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n reactExtension,\n BlockLayout,\n View,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <BlockLayout rows={[60, 'fill']}>\n <View border=\"base\" padding=\"base\">\n 60\n </View>\n <View border=\"base\" padding=\"base\">\n fill\n </View>\n </BlockLayout>\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {extension, BlockLayout, View} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const blockLayout = root.createComponent(\n BlockLayout,\n {\n rows: [60, 'fill'],\n },\n [\n root.createComponent(View, {border: 'base', padding: 'base'}, '60'),\n root.createComponent(View, {border: 'base', padding: 'base'}, 'fill'),\n ],\n );\n\n root.appendChild(blockLayout);\n});\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ "subSections": [
+ {
+ "type": "Generic",
+ "anchorLink": "accessibility-roles",
+ "title": "Accessibility roles",
+ "sectionContent": "| Value | Description |\n| --- | --- |\n| \"main\" | Used to indicate the primary content. |\n| \"header\" | Used to indicate the component is a header. |\n| \"footer\" | Used to display information such as copyright information, navigation links, and privacy statements. |\n| \"section\" | Used to indicate a generic section. |\n| \"complementary\" | Used to designate a supporting section that relates to the main content. |\n| \"navigation\" | Used to identify major groups of links used for navigating. |\n| \"orderedList\" | Used to identify a list of ordered items. |\n| \"listItem\" | Used to identify an item inside a list of items. |\n| \"unorderedList\" | Used to identify a list of unordered items. |\n| \"separator\" | Used to indicates the component acts as a divider that separates and distinguishes sections of content. |\n| \"status\" | Used to define a live region containing advisory information for the user that is not important enough to be an alert. |\n| \"alert\" | Used for important, and usually time-sensitive, information. |"
+ }
+ ],
+ "related": [
+ {
+ "subtitle": "Utility",
+ "name": "StyleHelper",
+ "url": "/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper",
+ "type": "utility"
+ }
+ ]
+ },
+ {
+ "name": "BlockSpacer",
+ "description": "BlockSpacer is used to create empty block space, typically when variable spacing is needed between multiple elements.\n\nNote that you should favor BlockStack when spacing between all elements is the same.",
+ "isVisualComponent": true,
+ "thumbnail": "blockspacer-thumbnail.png",
+ "requires": "",
+ "type": "",
+ "definitions": [
+ {
+ "title": "BlockSpacerProps",
+ "description": "",
+ "type": "BlockSpacerProps",
+ "typeDefinitions": {
+ "BlockSpacerProps": {
+ "filePath": "src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts",
+ "name": "BlockSpacerProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the component.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/components/BlockSpacer/BlockSpacer.ts",
"syntaxKind": "PropertySignature",
- "name": "subtitle",
- "value": "string",
- "description": "The text to be used as subtitle.",
+ "name": "spacing",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Adjust size of the spacer",
+ "isOptional": true,
+ "defaultValue": "'base'"
+ }
+ ],
+ "value": "export interface BlockSpacerProps extends IdProps {\n /**\n * Adjust size of the spacer\n *\n * @defaultValue 'base'\n **/\n spacing?: MaybeResponsiveConditionalStyle;\n}"
+ },
+ "MaybeResponsiveConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeResponsiveConditionalStyle",
+ "value": "T | ConditionalStyle",
+ "description": "A type that represents a value that can be a conditional style. The conditions are based on the viewport size. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.\n\nTo learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation."
+ },
+ "ConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalStyle",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditionals",
+ "value": "ConditionalValue[]",
+ "description": "An array of conditional values."
+ },
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "default",
+ "value": "T",
+ "description": "The default value applied when none of the conditional values specified in `conditionals` are met.",
"isOptional": true
+ }
+ ],
+ "value": "export interface ConditionalStyle<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The default value applied when none of the conditional values\n * specified in `conditionals` are met.\n */\n default?: T;\n /**\n * An array of conditional values.\n */\n conditionals: ConditionalValue[];\n}"
+ },
+ "ConditionalValue": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalValue",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditions",
+ "value": "AcceptedConditions",
+ "description": "The conditions that must be met for the value to be applied. At least one condition must be specified."
},
{
- "filePath": "src/surfaces/customer-account/components/Page/Page.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "title",
- "value": "string",
- "description": "The text to be used as title."
+ "name": "value",
+ "value": "T",
+ "description": "The value that will be applied if the conditions are met."
}
],
- "value": "export interface PageProps {\n /**\n * The text to be used as title.\n */\n title: string;\n\n /**\n * The text to be used as subtitle.\n */\n subtitle?: string;\n\n /**\n * The action grouping, provided as button(s), that is placed in the primary position of the page.\n */\n primaryAction?: RemoteFragment;\n\n /**\n * Label for the primary action grouping. If a label is not provided, default text is used.\n *\n * @defaultValue \"More actions\"\n */\n primaryActionLabel?: string;\n\n /**\n * Accessibility label for the primary action grouping. If an accessibility label is not provided,\n * default text is used.\n *\n * @defaultValue \"More actions\"\n */\n primaryActionAccessibilityLabel?: string;\n\n /**\n * The action grouping, provided as button(s), that is placed in the secondary position of the page.\n */\n secondaryAction?: RemoteFragment;\n\n /**\n * Indicates that the page is in a loading state.\n *\n * When `true`, the page shows loading indicators for the UI elements that it is owns.\n * The page is not responsible for the loading indicators of any content that is passed as `children`.\n *\n * @defaultValue false\n */\n loading?: boolean;\n}"
+ "value": "export interface ConditionalValue<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The conditions that must be met for the value to be applied. At least one\n * condition must be specified.\n */\n conditions: AcceptedConditions;\n /**\n * The value that will be applied if the conditions are met.\n */\n value: T;\n}"
+ },
+ "ViewportSizeCondition": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ViewportSizeCondition",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "viewportInlineSize",
+ "value": "{ min: T; }",
+ "description": ""
+ }
+ ],
+ "value": "export interface ViewportSizeCondition {\n viewportInlineSize: {min: T};\n}"
+ },
+ "Spacing": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Spacing",
+ "value": "'none' | 'extraTight' | 'tight' | 'base' | 'loose' | 'extraLoose'",
+ "description": ""
}
}
},
{
- "title": "ButtonProps primaryAction",
- "description": "Supported props for Buttons used inside Page `primaryAction` prop.
`children` only support text.",
- "type": "Docs_Page_Button_PrimaryAction",
+ "title": "StyleHelper",
+ "description": "Style is a helper for authoring conditional values for prop styles.\n\nWrite complex conditional styles based on one or more conditions, such as viewport sizes and interactive states, in a concise and expressive way.",
+ "type": "DocsStyle",
"typeDefinitions": {
- "Docs_Page_Button_PrimaryAction": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_Page_Button_PrimaryAction",
+ "DocsStyle": {
+ "filePath": "src/surfaces/checkout/style/style.ts",
+ "name": "DocsStyle",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/style.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
- "isOptional": true
+ "name": "default",
+ "value": "(defaultValue: T) => StylesConditionalStyle",
+ "description": "Sets an optional default value to use when no other condition is met."
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/style.ts",
"syntaxKind": "PropertySignature",
- "name": "disabled",
- "value": "boolean",
- "description": "Disables the button, disallowing any interaction.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "when",
+ "value": "(conditions: StylesConditions, value: T) => StylesConditionalStyle",
+ "description": "Adjusts the style based on different conditions. All conditions, expressed as a literal object, must be met for the associated value to be applied.\n\nThe `when` method can be chained together to build more complex styles."
+ }
+ ],
+ "value": "export interface DocsStyle {\n /**\n * Sets an optional default value to use when no other condition is met.\n *\n * @param defaultValue The default value\n * @returns The chainable condition style\n */\n default: (defaultValue: T) => StylesConditionalStyle;\n /**\n * Adjusts the style based on different conditions. All conditions, expressed\n * as a literal object, must be met for the associated value to be applied.\n *\n * The `when` method can be chained together to build more complex styles.\n *\n * @param conditions The condition(s)\n * @param value The conditional value that can be applied if the conditions are met\n * @returns The chainable condition style\n */\n when: (\n conditions: StylesConditions,\n value: T,\n ) => StylesConditionalStyle;\n}"
+ },
+ "StylesConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "StylesConditionalStyle",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditionals",
+ "value": "StylesConditionalValue[]",
+ "description": "An array of conditional values."
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Replaces content with a loading indicator.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "default",
+ "value": "T",
+ "description": "The default value applied when none of the conditional values specified in `conditionals` are met.",
+ "isOptional": true
+ }
+ ],
+ "value": "export interface StylesConditionalStyle<\n T,\n AcceptedConditions extends StylesBaseConditions = StylesBaseConditions,\n> {\n /**\n * The default value applied when none of the conditional values\n * specified in `conditionals` are met.\n */\n default?: T;\n /**\n * An array of conditional values.\n */\n conditionals: StylesConditionalValue[];\n}"
+ },
+ "StylesConditionalValue": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "StylesConditionalValue",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditions",
+ "value": "AcceptedConditions",
+ "description": "The conditions that must be met for the value to be applied. At least one condition must be specified."
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "loadingLabel",
- "value": "string",
- "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
+ "name": "value",
+ "value": "T",
+ "description": "The value that will be applied if the conditions are met."
+ }
+ ],
+ "value": "export interface StylesConditionalValue<\n T,\n AcceptedConditions extends StylesBaseConditions = StylesBaseConditions,\n> {\n /**\n * The conditions that must be met for the value to be applied. At least one\n * condition must be specified.\n */\n conditions: AcceptedConditions;\n /**\n * The value that will be applied if the conditions are met.\n */\n value: T;\n}"
+ },
+ "StylesBaseConditions": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "StylesBaseConditions",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "focus",
+ "value": "true",
+ "description": "",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "hover",
+ "value": "true",
+ "description": "",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "overlay",
- "value": "RemoteFragment",
- "description": "An overlay component to render when the user interacts with the component.",
+ "name": "resolution",
+ "value": "1 | 1.3 | 1.5 | 2 | 2.6 | 3 | 3.5 | 4",
+ "description": "",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "to",
- "value": "string",
- "description": "Destination URL to link to.",
+ "name": "viewportInlineSize",
+ "value": "{ min: ViewportInlineSize; }",
+ "description": "",
"isOptional": true
}
],
- "value": "export interface Docs_Page_Button_PrimaryAction\n extends Pick<\n ButtonProps,\n | 'onPress'\n | 'overlay'\n | 'to'\n | 'loading'\n | 'loadingLabel'\n | 'disabled'\n | 'accessibilityLabel'\n > {}"
- }
- }
- },
- {
- "title": "ButtonProps secondaryAction",
- "description": "Supported props for Button used inside Page `secondaryAction` prop.
`children` are not supported. Use `accessibilityLabel` instead.",
- "type": "Docs_Page_Button_SecondaryAction",
- "typeDefinitions": {
- "Docs_Page_Button_SecondaryAction": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_Page_Button_SecondaryAction",
+ "value": "export interface StylesBaseConditions {\n viewportInlineSize?: {min: ViewportInlineSize};\n hover?: true;\n focus?: true;\n resolution?: 1 | 1.3 | 1.5 | 2 | 2.6 | 3 | 3.5 | 4;\n}"
+ },
+ "ViewportInlineSize": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "ViewportInlineSize",
+ "value": "'extraSmall' | 'small' | 'medium' | 'large'",
+ "description": ""
+ },
+ "StylesConditions": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "StylesConditions",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
- "value": "string",
- "description": "A label used for buyers using assistive technologies. Needed because `children` passed to this component will be discarded."
+ "name": "focus",
+ "value": "true",
+ "description": "",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "hover",
+ "value": "true",
+ "description": "",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/style/types.ts",
"syntaxKind": "PropertySignature",
- "name": "to",
- "value": "string",
- "description": "Destination URL to link to.",
+ "name": "viewportInlineSize",
+ "value": "{ min: ViewportInlineSize; }",
+ "description": "",
"isOptional": true
}
],
- "value": "export interface Docs_Page_Button_SecondaryAction\n extends Pick {\n /**\n * A label used for buyers using assistive technologies. Needed because `children` passed to this component will be discarded.\n */\n accessibilityLabel: ButtonProps['accessibilityLabel'];\n}"
+ "value": "export interface StylesConditions {\n viewportInlineSize?: {min: ViewportInlineSize};\n hover?: true;\n focus?: true;\n}"
}
}
}
],
- "category": "components",
+ "category": "UI components",
+ "subCategory": "Layout and structure",
"defaultExample": {
- "image": "page-preview.png",
- "altText": "An example of how the Page component is used to structure the page title, description, order action buttons on the Order status page.",
+ "image": "blockspacer-default.png",
"codeblock": {
- "title": "Basic Page",
+ "title": "Basic BlockSpacer",
"tabs": [
{
"title": "React",
- "code": "import {\n Page,\n Button,\n reactExtension,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension('customer-account.page.render', () => <App />);\n\nfunction App() {\n return (\n <Page\n title=\"Order #1411\"\n subtitle=\"Confirmed Oct 5\"\n secondaryAction={<Button accessibilityLabel=\"Button\" onPress={() => {}}/>}\n primaryActionLabel=\"Manage\"\n primaryAction={\n <>\n <Button onPress={() => {}}>Buy again</Button>\n <Button onPress={() => {}}>Second action</Button>\n <Button onPress={() => {}}>Third action</Button>\n </>\n }\n >\n Content\n </Page>\n );\n}\n",
+ "code": "import {\n reactExtension,\n BlockSpacer,\n View,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <>\n <View border=\"base\" padding=\"base\">\n View\n </View>\n <BlockSpacer spacing=\"loose\" />\n <View border=\"base\" padding=\"base\">\n View\n </View>\n </>\n );\n}\n",
"language": "tsx"
},
{
"title": "JS",
- "code": "import {\n Page,\n Button,\n extension\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.page.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nasync function renderApp(root, api) {\n const primaryAction = root.createFragment();\n await primaryAction.append(root.createComponent(Button, {onPress: () => {console.log(\"primary action 1\")}}, 'Buy again primary 1'));\n await primaryAction.append(root.createComponent(Button, {onPress: () => {console.log(\"primary action 2\")}}, 'Buy again primary 2'));\n await primaryAction.append(root.createComponent(Button, {onPress: () => {console.log(\"primary action 3\")}}, 'Buy again primary 3'));\n\n const secondaryAction = root.createFragment();\n await secondaryAction.append(root.createComponent(Button, {accessibilityLabel: 'Button', onPress: () => {}}))\n\n const page = root.createComponent(\n Page,\n {\n title: \"Order #1411\",\n subtitle: \"Confirmed Oct 5\",\n primaryAction,\n primaryActionLabel: \"Manage\",\n secondaryAction,\n },\n root.createComponent('View', {}, \"Content\")\n )\n root.append(page);\n}\n",
+ "code": "import {extension, BlockSpacer, View} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const blockSpacer = root.createComponent(View, undefined, [\n root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),\n root.createComponent(BlockSpacer, {spacing: 'loose'}),\n root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),\n ]);\n\n root.appendChild(blockSpacer);\n});\n",
"language": "js"
}
]
}
},
- "subSections": [
- {
- "type": "Generic",
- "anchorLink": "best-practices",
- "title": "Best Practices",
- "sectionContent": "\n**Title**\n- Set clear expectations about the purpose and main topic of the page.\n- Aim for 1-3 words.\n- Use sentence case.\n\n**Subtitle**\n- Use to provide additional context or information that enhances the customer’s understanding of the page.\n- Use subtitles sparingly and only when they add useful information that is distinct from the title.\n\n**Buttons**\n- Use for page-level actions only.\n- If there is a single primary action for the page, display it as a primary button. Display all other page-level actions as secondary buttons.\n- See [UX guidelines](/docs/apps/customer-accounts/order-action-menu-extensions/ux-guidelines) to learn more about the button logic for order actions.\n"
- }
- ],
"related": []
},
{
- "name": "ResourceItem",
- "description": "Use to represent a specific object within a collection, that a customer can take action on. For example, a list of active subscriptions or redeemable offers, in a style consistent with the order index page.",
- "thumbnail": "resourceitem-thumbnail.png",
+ "name": "BlockStack",
+ "description": "BlockStack is used to vertically stack elements.",
+ "thumbnail": "blockstack-thumbnail.png",
"requires": "",
"isVisualComponent": true,
"type": "",
"definitions": [
{
- "title": "ResourceItemProps",
+ "title": "BlockStackProps",
"description": "",
- "type": "ResourceItemProps",
+ "type": "BlockStackProps",
"typeDefinitions": {
- "ResourceItemProps": {
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
- "name": "ResourceItemProps",
+ "BlockStackProps": {
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
+ "name": "BlockStackProps",
"description": "",
"members": [
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
"name": "accessibilityLabel",
"value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "description": "A label that describes the purpose or contents of the element. When set, it will be announced to buyers using assistive technologies and will provide them with more context.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "action",
- "value": "RemoteFragment",
- "description": "The action grouping for the item, provided as buttons.",
+ "name": "accessibilityRole",
+ "value": "ViewLikeAccessibilityRole",
+ "description": "Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help buyers navigate the page.\n\n\nFor example:\n\n- In an HTML host a `['listItem', 'separator']` tuple will render: `
`\n\n- In an HTML host a `listItem` string will render: `
`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "actionAccessibilityLabel",
- "value": "string",
- "description": "Accessibility label for the action grouping. If an accessibility label is not provided, default text is used.",
+ "name": "background",
+ "value": "MaybeConditionalStyle",
+ "description": "Adjust the background.",
"isOptional": true,
- "defaultValue": "\"More actions\""
+ "defaultValue": "'transparent'"
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "actionLabel",
- "value": "string",
- "description": "Label for the action grouping. If a label is not provided, default text is used.",
- "isOptional": true,
- "defaultValue": "\"More actions\""
+ "name": "border",
+ "value": "MaybeResponsiveConditionalStyle>",
+ "description": "Adjust the border style.\n\nTo shorten the code, it is possible to specify all the border style properties in one property.\n\nFor example:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart border styles are `base`\n\n- `['base', 'none']` means blockStart and blockEnd border styles are `base`, inlineStart and inlineEnd border styles are `none`\n\n- `['base', 'none', 'dotted', 'base']` means blockStart border style is `base`, inlineEnd border style is `none`, blockEnd border style is `dotted` and blockStart border style is `base`",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Indicates that the item is in a loading state.\n\nWhen `true`, the item shows loading indicators for the UI elements that it is owns. The item is not responsible for the loading indicators of any content that is passed as `children`.",
+ "name": "borderRadius",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "",
"isOptional": true,
- "defaultValue": "false"
+ "isPrivate": true
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback when pressed. If `to` is set, it will execute the callback and then navigate to the location specified by `to`.",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "borderWidth",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "Adjust the border width.\n\nTo shorten the code, it is possible to specify all the border width properties in one property.\n\nFor example:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart border widths are `base`\n\n- `['base', 'medium']` means blockStart and blockEnd border widths are `base`, inlineStart and inlineEnd border widths are `medium`\n\n- `['base', 'medium', 'medium', 'base']` means blockStart border width is `base`, inlineEnd border width is `medium`, blockEnd border width is `medium` and blockStart border width is `base`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/components/ResourceItem/ResourceItem.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "to",
- "value": "string",
- "description": "Destination to navigate to. You must provide either this property, `onPress`, or both.",
+ "name": "cornerRadius",
+ "value": "MaybeResponsiveConditionalStyle<\n MaybeShorthandProperty\n >",
+ "description": "Adjust the corner radius.\n\nProvide a single value to apply the same corner radius to all four corners, two values to apply different corner radii to opposing corners, or four values to apply different corner radii to each individual corner.\n\nFor example:\n\n- `base` means all 4 corner radii are `base`\n\n- `['base', 'none']` means the StartStart and EndEnd corner radii are `base`, StartEnd and EndStart corner radii are `none`. When the context’s language direction is left to right, StartStart and EndEnd corners are the top left and bottom right corners\n while StartEnd and EndStart corners are the top right and bottom left corners.\n\n- `['base', 'none', 'small', 'base']` means StartStart corner radius is `base`, StartEnd corner radius is `none`, EndEnd corner radius is `small` and EndStart corner radius is `base`\n\nA `borderRadius` alias is available for this property. When both are specified, `cornerRadius` takes precedence.",
"isOptional": true
- }
- ],
- "value": "export interface ResourceItemProps\n extends Pick {\n /**\n * The action grouping for the item, provided as buttons.\n */\n action?: RemoteFragment;\n\n /**\n * Label for the action grouping. If a label is not provided, default text is used.\n *\n * @defaultValue \"More actions\"\n */\n actionLabel?: string;\n\n /**\n * Accessibility label for the action grouping. If an accessibility label is not provided,\n * default text is used.\n *\n * @defaultValue \"More actions\"\n */\n actionAccessibilityLabel?: string;\n\n /**\n * Indicates that the item is in a loading state.\n *\n * When `true`, the item shows loading indicators for the UI elements that it is owns.\n * The item is not responsible for the loading indicators of any content that is passed as `children`.\n *\n * @defaultValue false\n */\n loading?: boolean;\n}"
- }
- }
- },
- {
- "title": "ButtonProps action",
- "description": "Supported props for Buttons used inside ResourceItem `action` prop.
`children` only support text.",
- "type": "Docs_ResourceItem_Button_Action",
- "typeDefinitions": {
- "Docs_ResourceItem_Button_Action": {
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "name": "Docs_ResourceItem_Button_Action",
- "description": "",
- "members": [
+ },
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "accessibilityLabel",
+ "name": "display",
+ "value": "MaybeResponsiveConditionalStyle<'auto' | 'none'>",
+ "description": "Changes the display of the component.\n\n`auto` the component's initial value. The actual value depends on the component and context.\n\n`none` hides the component and removes it from the accessibility tree, making it invisible to screen readers.",
+ "isOptional": true,
+ "defaultValue": "'auto'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
"value": "string",
- "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "description": "A unique identifier for the component.",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "disabled",
- "value": "boolean",
- "description": "Disables the button, disallowing any interaction.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "inlineAlignment",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Position children along the main axis",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "kind",
- "value": "'primary' | 'secondary' | 'plain'",
- "description": "The type of button that will be rendered. The visual presentation of the button type is controlled by merchants through the Branding API.\n\n\n`primary`: button used for main actions. For example: \"Continue to next step\".\n\n`secondary`: button used for secondary actions not blocking user progress. For example: \"Download Shop app\".\n\n`plain`: renders a button that visually looks like a link.",
- "isOptional": true,
- "defaultValue": "'primary'"
+ "name": "maxBlockSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the maximum block size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of maxBlockSize](https://developer.mozilla.org/en-US/docs/Web/CSS/max-block-size).",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "loading",
- "value": "boolean",
- "description": "Replaces content with a loading indicator.",
- "isOptional": true,
- "defaultValue": "false"
+ "name": "maxInlineSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the maximum inline size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of maxInlineSize](https://developer.mozilla.org/en-US/docs/Web/CSS/max-inline-size).",
+ "isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "loadingLabel",
- "value": "string",
- "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
+ "name": "minBlockSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the block size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\n\nSee [MDN explanation of minBlockSize](https://developer.mozilla.org/en-US/docs/Web/CSS/min-block-size).",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
- "syntaxKind": "MethodSignature",
- "name": "onPress",
- "value": "() => void",
- "description": "Callback that is run when the button is pressed.",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "minInlineSize",
+ "value": "MaybeResponsiveConditionalStyle<\n number | `${number}%` | 'fill'\n >",
+ "description": "Adjust the minimum inline size.\n\n`number`: size in pixels.\n\n`` `${number}%` ``: size in percentages.\n\n`fill`: takes all the available space.\\\n\nSee [MDN explanation of minInlineSize](https://developer.mozilla.org/en-US/docs/Web/CSS/min-inline-size).",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "overlay",
- "value": "RemoteFragment",
- "description": "An overlay component to render when the user interacts with the component.",
+ "name": "overflow",
+ "value": "'hidden' | 'visible'",
+ "description": "Sets the overflow behavior of the element.\n\n`hidden`: clips the content when it is larger than the element’s container. The element will not be scrollable and the users will not be able to access the clipped content by dragging or using a scroll wheel.\n\n`visible`: the content that extends beyond the element’s container is visible.",
+ "isOptional": true,
+ "defaultValue": "'visible'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "padding",
+ "value": "MaybeResponsiveConditionalStyle>",
+ "description": "Adjust the padding.\n\nTo shorten the code, it is possible to specify all the padding properties in one property.\n\n\nExamples:\n\n- `base` means blockStart, inlineEnd, blockEnd and inlineStart paddings are `base`\n\n- [`base`, `none`] means blockStart and blockEnd paddings are `base`, inlineStart and inlineEnd paddings are `none`\n\n- [`base`, `none`, `loose`, `tight`] means blockStart padding is `base`, inlineEnd padding is `none`, blockEnd padding is `loose` and blockStart padding is `tight`",
"isOptional": true
},
{
- "filePath": "src/surfaces/customer-account/api/docs.ts",
+ "filePath": "src/surfaces/checkout/components/BlockStack/BlockStack.ts",
"syntaxKind": "PropertySignature",
- "name": "to",
- "value": "string",
- "description": "Destination URL to link to.",
+ "name": "spacing",
+ "value": "MaybeResponsiveConditionalStyle",
+ "description": "Adjust spacing between children",
+ "isOptional": true,
+ "defaultValue": "'base'"
+ }
+ ],
+ "value": "export interface BlockStackProps\n extends Pick,\n BorderProps,\n CornerProps,\n IdProps,\n SizingProps,\n SpacingProps {\n /**\n * Position children along the main axis\n */\n inlineAlignment?: MaybeResponsiveConditionalStyle;\n /**\n * Adjust spacing between children\n *\n * @defaultValue 'base'\n */\n spacing?: MaybeResponsiveConditionalStyle;\n /**\n * Sets the semantic meaning of the component’s content. When set,\n * the role will be used by assistive technologies to help buyers\n * navigate the page.\n *\n *\n * For example:\n *\n * - In an HTML host a `['listItem', 'separator']` tuple will render: `
`\n *\n * - In an HTML host a `listItem` string will render: `
`\n */\n accessibilityRole?: ViewLikeAccessibilityRole;\n /**\n * A label that describes the purpose or contents of the element. When set,\n * it will be announced to buyers using assistive technologies and will\n * provide them with more context.\n */\n accessibilityLabel?: string;\n /**\n * Sets the overflow behavior of the element.\n *\n * `hidden`: clips the content when it is larger than the element’s container.\n * The element will not be scrollable and the users will not be able\n * to access the clipped content by dragging or using a scroll wheel.\n *\n * `visible`: the content that extends beyond the element’s container is visible.\n *\n * @default 'visible'\n */\n overflow?: 'hidden' | 'visible';\n /**\n * Changes the display of the component.\n *\n * `auto` the component's initial value. The actual value depends on the component and context.\n *\n * `none` hides the component and removes it from the accessibility tree, making it invisible to screen readers.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display\n *\n * @defaultValue 'auto'\n */\n display?: MaybeResponsiveConditionalStyle<'auto' | 'none'>;\n}"
+ },
+ "ViewLikeAccessibilityRole": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "ViewLikeAccessibilityRole",
+ "value": "NonPresentationalAccessibilityRole | [NonPresentationalAccessibilityRole, NonPresentationalAccessibilityRole]",
+ "description": ""
+ },
+ "NonPresentationalAccessibilityRole": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "NonPresentationalAccessibilityRole",
+ "value": "'main' | 'header' | 'footer' | 'section' | 'complementary' | 'navigation' | 'orderedList' | 'listItem' | 'unorderedList' | 'separator' | 'status' | 'alert'",
+ "description": ""
+ },
+ "MaybeConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeConditionalStyle",
+ "value": "T | ConditionalStyle",
+ "description": "A type that represents a value that can be a conditional style. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.\n\nTo learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation."
+ },
+ "ConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalStyle",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditionals",
+ "value": "ConditionalValue[]",
+ "description": "An array of conditional values."
+ },
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "default",
+ "value": "T",
+ "description": "The default value applied when none of the conditional values specified in `conditionals` are met.",
"isOptional": true
}
],
- "value": "export interface Docs_ResourceItem_Button_Action\n extends Pick<\n ButtonProps,\n | 'onPress'\n | 'overlay'\n | 'to'\n | 'loading'\n | 'loadingLabel'\n | 'disabled'\n | 'accessibilityLabel'\n | 'kind'\n > {}"
+ "value": "export interface ConditionalStyle<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The default value applied when none of the conditional values\n * specified in `conditionals` are met.\n */\n default?: T;\n /**\n * An array of conditional values.\n */\n conditionals: ConditionalValue[];\n}"
+ },
+ "ConditionalValue": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ConditionalValue",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "conditions",
+ "value": "AcceptedConditions",
+ "description": "The conditions that must be met for the value to be applied. At least one condition must be specified."
+ },
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "value",
+ "value": "T",
+ "description": "The value that will be applied if the conditions are met."
+ }
+ ],
+ "value": "export interface ConditionalValue<\n T,\n AcceptedConditions extends BaseConditions = Conditions,\n> {\n /**\n * The conditions that must be met for the value to be applied. At least one\n * condition must be specified.\n */\n conditions: AcceptedConditions;\n /**\n * The value that will be applied if the conditions are met.\n */\n value: T;\n}"
+ },
+ "Background": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Background",
+ "value": "'transparent' | 'base' | 'subdued'",
+ "description": ""
+ },
+ "MaybeResponsiveConditionalStyle": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeResponsiveConditionalStyle",
+ "value": "T | ConditionalStyle",
+ "description": "A type that represents a value that can be a conditional style. The conditions are based on the viewport size. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.\n\nTo learn more check out the [conditional styles](/api/checkout-ui-extensions/components/utilities/stylehelper) documentation."
+ },
+ "ViewportSizeCondition": {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "name": "ViewportSizeCondition",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/style/types.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "viewportInlineSize",
+ "value": "{ min: T; }",
+ "description": ""
+ }
+ ],
+ "value": "export interface ViewportSizeCondition {\n viewportInlineSize: {min: T};\n}"
+ },
+ "MaybeShorthandProperty": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "MaybeShorthandProperty",
+ "value": "T | ShorthandProperty",
+ "description": ""
+ },
+ "ShorthandProperty": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "ShorthandProperty",
+ "value": "[T, T] | [T, T, T, T]",
+ "description": ""
+ },
+ "BorderStyle": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "BorderStyle",
+ "value": "'base' | 'dashed' | 'dotted' | 'none'",
+ "description": ""
+ },
+ "CornerRadius": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "CornerRadius",
+ "value": "'base' | 'small' | 'large' | 'fullyRounded' | 'none' | CornerRadiusDeprecated",
+ "description": ""
+ },
+ "CornerRadiusDeprecated": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "CornerRadiusDeprecated",
+ "value": "'tight' | 'loose'",
+ "description": ""
+ },
+ "BorderWidth": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "BorderWidth",
+ "value": "'base' | 'medium' | 'thick'",
+ "description": ""
+ },
+ "InlineAlignment": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "InlineAlignment",
+ "value": "'start' | 'center' | 'end'",
+ "description": ""
+ },
+ "Spacing": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "Spacing",
+ "value": "'none' | 'extraTight' | 'tight' | 'base' | 'loose' | 'extraLoose'",
+ "description": ""
}
}
}
],
- "category": "components",
+ "category": "UI components",
+ "subCategory": "Layout and structure",
"defaultExample": {
- "image": "resourceitem-preview.png",
- "altText": "An example of how the ResourceItem component is used to represent one order in the grid view of the Order index page.",
+ "image": "blockstack-default.png",
"codeblock": {
- "title": "ResourceItem",
+ "title": "Basic BlockStack",
"tabs": [
{
"title": "React",
- "code": "import {\n ResourceItem,\n Button,\n Text,\n View,\n reactExtension,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <App />,\n);\n\nfunction App() {\n return (\n <View maxInlineSize={300}>\n <ResourceItem\n accessibilityLabel=\"Resource Item\"\n onPress={() => {}}\n actionLabel=\"Manage\"\n action={\n <>\n <Button\n kind=\"primary\"\n onPress={() => {}}\n >\n Pay now\n </Button>\n <Button onPress={() => {}}>\n Second action\n </Button>\n <Button onPress={() => {}}>\n Third action\n </Button>\n </>\n }\n >\n Resource item content\n </ResourceItem>\n </View>\n );\n}\n",
+ "code": "import {\n reactExtension,\n BlockStack,\n View,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <BlockStack>\n <View border=\"base\" padding=\"base\">\n View\n </View>\n <View border=\"base\" padding=\"base\">\n View\n </View>\n <View border=\"base\" padding=\"base\">\n View\n </View>\n </BlockStack>\n );\n}\n",
"language": "tsx"
},
{
"title": "JS",
- "code": "import {\n ResourceItem,\n Button,\n View,\n extension,\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.page.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nfunction renderApp(root, api) {\n\n const actionFragment = root.createFragment();\n\n const primaryButton = root.createComponent(Button, {\n kind: 'primary',\n onPress: () => {},\n });\n\n primaryButton.append(root.createText('Pay now'))\n\n const secondButton = root.createComponent(Button, {\n kind: 'secondary',\n onPress: () => {},\n });\n\n secondButton.append(root.createText('Second button'))\n\n const thirdButton = root.createComponent(Button, {\n kind: 'secondary',\n onPress: () => {},\n });\n\n thirdButton.append(root.createText('Third button'))\n\n actionFragment.append(primaryButton);\n actionFragment.append(secondButton);\n actionFragment.append(thirdButton);\n\n const resourceItem = root.createComponent(\n ResourceItem,\n {\n accessibilityLabel: 'Resource Item',\n onPress: () => {},\n actionLabel: 'Manage',\n action: actionFragment,\n },\n 'Content',\n );\n\n const view = root.createComponent(View, {maxInlineSize: 300});\n view.append(resourceItem);\n\n root.append(view);\n}\n",
+ "code": "import {extension, BlockStack, View} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const blockStack = root.createComponent(BlockStack, undefined, [\n root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),\n root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),\n root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),\n ]);\n\n root.appendChild(blockStack);\n});\n",
"language": "js"
}
]
}
},
+ "examples": {
+ "description": "",
+ "examples": [
+ {
+ "description": "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.",
+ "image": "disclosure-and-alignment.gif",
+ "codeblock": {
+ "title": "Strategies for simplifying layout and aligning content using Disclosure and Inline/Block Layout components.",
+ "tabs": [
+ {
+ "code": "import {\n reactExtension,\n View,\n Image,\n Icon,\n Pressable,\n Disclosure,\n InlineLayout,\n BlockStack,\n Text,\n Form,\n TextField,\n Button,\n Divider,\n InlineStack,\n} from '@shopify/ui-extensions-react/checkout';\n\nexport default reactExtension(\n 'purchase.checkout.block.render',\n () => <DisclosureAndAlignment />,\n);\n\nexport const DisclosureAndAlignment = () => {\n const openIds = ['one'];\n return (\n <View\n maxInlineSize={400}\n cornerRadius=\"large\"\n border=\"base\"\n >\n <BlockStack spacing=\"none\">\n <Disclosure\n defaultOpen=\"one\"\n onToggle={(open) =>\n console.log('onToggle event', open)\n }\n >\n <Pressable toggles=\"one\" padding=\"base\">\n <InlineLayout\n blockAlignment=\"center\"\n spacing=\"base\"\n columns={['auto', 'fill', 'auto']}\n >\n <Icon\n source=\"gift\"\n appearance=\"subdued\"\n />\n Gift message\n <Icon\n source={\n openIds.includes('one')\n ? 'chevronUp'\n : 'chevronDown'\n }\n appearance=\"subdued\"\n />\n </InlineLayout>\n </Pressable>\n <View\n id=\"one\"\n padding={[\n 'none',\n 'base',\n 'base',\n 'base',\n ]}\n >\n <Form\n onSubmit={() =>\n console.log('onSubmit event')\n }\n >\n <BlockStack>\n <InlineLayout\n columns={['fill', 'fill']}\n spacing=\"base\"\n >\n <TextField\n label=\"From\"\n name=\"from0\"\n id=\"from0\"\n />\n <TextField\n label=\"To\"\n name=\"to0\"\n id=\"to0\"\n />\n </InlineLayout>\n <TextField\n label=\"Message\"\n name=\"message0\"\n id=\"message0\"\n />\n <View>\n <Button\n accessibilityRole=\"submit\"\n kind=\"secondary\"\n >\n Save\n </Button>\n </View>\n </BlockStack>\n </Form>\n </View>\n </Disclosure>\n <Divider />\n <InlineLayout\n blockAlignment=\"baseline\"\n spacing=\"base\"\n columns={['auto', 'fill', 'auto']}\n padding=\"base\"\n >\n <Icon\n source=\"profile\"\n appearance=\"subdued\"\n />\n <BlockStack spacing=\"none\">\n <InlineStack blockAlignment=\"center\">\n <Text>Verify with</Text>\n <Image source=\"https://via.placeholder.com/50x15\" />\n </InlineStack>\n <Text\n appearance=\"subdued\"\n size=\"small\"\n >\n 15% savings for students and\n military\n </Text>\n </BlockStack>\n <Pressable to=\"https://www.shopify.com\">\n <Icon\n source=\"external\"\n appearance=\"subdued\"\n />\n </Pressable>\n </InlineLayout>\n </BlockStack>\n </View>\n );\n};\n",
+ "language": "jsx",
+ "title": "React"
+ },
+ {
+ "code": "import {\n extension,\n BlockStack,\n View,\n InlineLayout,\n InlineStack,\n Image,\n Pressable,\n Icon,\n Text,\n TextField,\n Form,\n Button,\n Disclosure,\n Divider,\n} from '@shopify/ui-extensions/checkout';\n\nexport default extension(\n 'purchase.checkout.block.render',\n (root) => {\n const openIds = ['one'];\n\n const pressable = root.createComponent(\n Pressable,\n {\n toggles: 'one',\n padding: 'base',\n },\n [\n root.createComponent(\n InlineLayout,\n {\n blockAlignment: 'center',\n spacing: 'base',\n columns: ['auto', 'fill', 'auto'],\n },\n [\n root.createComponent(Icon, {\n source: 'gift',\n appearance: 'subdued',\n }),\n 'Gift message',\n root.createComponent(Icon, {\n source: openIds.includes('one')\n ? 'chevronUp'\n : 'chevronDown',\n size: 'small',\n }),\n ],\n ),\n ],\n );\n\n const disclosureView = root.createComponent(\n View,\n {\n id: 'one',\n padding: ['none', 'base', 'base', 'base'],\n },\n [\n root.createComponent(\n Form,\n {\n onSubmit: () =>\n console.log('onSubmit event'),\n },\n [\n root.createComponent(BlockStack, {}, [\n root.createComponent(\n InlineLayout,\n {\n columns: ['fill', 'fill'],\n spacing: 'base',\n },\n [\n root.createComponent(\n TextField,\n {\n label: 'From',\n name: 'from0',\n id: 'from0',\n },\n ),\n root.createComponent(\n TextField,\n {\n label: 'To',\n name: 'to0',\n id: 'to0',\n },\n ),\n ],\n ),\n root.createComponent(TextField, {\n label: 'Message',\n name: 'message0',\n id: 'message0',\n }),\n root.createComponent(View, {}, [\n root.createComponent(\n Button,\n {\n accessibilityRole: 'submit',\n kind: 'secondary',\n },\n 'Save',\n ),\n ]),\n ]),\n ],\n ),\n ],\n );\n\n const disclosure = root.createComponent(\n Disclosure,\n {\n defaultOpen: 'one',\n onToggle: (open) =>\n console.log('onToggle event', open),\n },\n [pressable, disclosureView],\n );\n\n const inlineLayout = root.createComponent(\n InlineLayout,\n {\n blockAlignment: 'baseline',\n spacing: 'base',\n columns: ['auto', 'fill', 'auto'],\n padding: 'base',\n },\n [\n root.createComponent(Icon, {\n source: 'profile',\n appearance: 'subdued',\n }),\n root.createComponent(\n BlockStack,\n {\n spacing: 'none',\n },\n [\n root.createComponent(\n InlineStack,\n {\n blockAlignment: 'center',\n },\n [\n root.createComponent(\n Text,\n {},\n 'Verify with',\n ),\n root.createComponent(Image, {\n source:\n 'https://via.placeholder.com/50x15',\n }),\n ],\n ),\n root.createComponent(\n Text,\n {\n appearance: 'subdued',\n size: 'small',\n },\n '15% savings for students and military',\n ),\n ],\n ),\n root.createComponent(\n Pressable,\n {\n to: 'https://www.shopify.com',\n },\n [\n root.createComponent(Icon, {\n source: 'external',\n appearance: 'subdued',\n }),\n ],\n ),\n ],\n );\n const view = root.createComponent(\n View,\n {\n maxInlineSize: 400,\n cornerRadius: 'large',\n border: 'base',\n },\n [\n root.createComponent(\n BlockStack,\n {\n spacing: 'none',\n },\n [\n disclosure,\n root.createComponent(Divider),\n inlineLayout,\n ],\n ),\n ],\n );\n\n root.appendChild(view);\n },\n);\n",
+ "language": "js",
+ "title": "JavaScript"
+ }
+ ]
+ }
+ }
+ ]
+ },
"subSections": [
{
"type": "Generic",
- "anchorLink": "best-practices",
- "title": "Best Practices",
- "sectionContent": "\n- Group related information.\n- Structure your content so it’s easy for customers to scan to the most important information.\n- Use images to complement text content.\n- If there is a single primary action for the object, display it as a primary button. Display other object-level actions as secondary buttons.\n- See [UX guidelines](/docs/apps/customer-accounts/order-action-menu-extensions/ux-guidelines) to learn more about the button logic for order actions.\n"
+ "anchorLink": "accessibility-roles",
+ "title": "Accessibility roles",
+ "sectionContent": "| Value | Description |\n| --- | --- |\n| \"main\" | Used to indicate the primary content. |\n| \"header\" | Used to indicate the component is a header. |\n| \"footer\" | Used to display information such as copyright information, navigation links, and privacy statements. |\n| \"section\" | Used to indicate a generic section. |\n| \"complementary\" | Used to designate a supporting section that relates to the main content. |\n| \"navigation\" | Used to identify major groups of links used for navigating. |\n| \"orderedList\" | Used to identify a list of ordered items. |\n| \"listItem\" | Used to identify an item inside a list of items. |\n| \"unorderedList\" | Used to identify a list of unordered items. |\n| \"separator\" | Used to indicates the component acts as a divider that separates and distinguishes sections of content. |\n| \"status\" | Used to define a live region containing advisory information for the user that is not important enough to be an alert. |\n| \"alert\" | Used for important, and usually time-sensitive, information. |"
}
],
- "related": []
+ "related": [
+ {
+ "subtitle": "Utility",
+ "name": "StyleHelper",
+ "url": "/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper",
+ "type": "utility"
+ }
+ ]
+ },
+ {
+ "name": "Button",
+ "description": "Buttons are used for actions, such as “Add”, “Continue”, “Pay now”, or “Save”.",
+ "thumbnail": "button-thumbnail.png",
+ "requires": "",
+ "isVisualComponent": true,
+ "type": "",
+ "definitions": [
+ {
+ "title": "ButtonProps",
+ "description": "",
+ "type": "ButtonProps",
+ "typeDefinitions": {
+ "ButtonProps": {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "name": "ButtonProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "accessibilityLabel",
+ "value": "string",
+ "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "accessibilityRole",
+ "value": "ButtonAccessibilityRole",
+ "description": "The role of the button that will be rendered.\n\n`button`: renders a regular button.\n\n`submit`: renders a button that submits a form.",
+ "isOptional": true,
+ "defaultValue": "'button'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "activateAction",
+ "value": "'auto' | 'copy'",
+ "description": "Sets the action the `activateTarget` should take when this pressable is activated.\n\nSupported actions by component:\n\n| Component | Supported Actions | Default ('auto') |\n|---------------|-------------------|-------------------|\n| [`ClipboardItem`](/docs/api/checkout-ui-extensions/latest/clipboarditem) | 'copy' | 'copy' |",
+ "isOptional": true,
+ "defaultValue": "'auto' - a default action for the target component."
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "activateTarget",
+ "value": "string",
+ "description": "ID of a component that should respond to activations (e.g. clicks) on this pressable.\n\nSee `activateAction` for how to control the behavior of the target.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "appearance",
+ "value": "'critical' | 'monochrome'",
+ "description": "Specify the color treatment of the Button.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "disabled",
+ "value": "boolean",
+ "description": "Disables the button, disallowing any interaction.",
+ "isOptional": true,
+ "defaultValue": "false"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the component.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "inlineAlignment",
+ "value": "InlineAlignment",
+ "description": "Specifies the inline alignment of the content.",
+ "isOptional": true,
+ "defaultValue": "'center'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "kind",
+ "value": "'primary' | 'secondary' | 'plain'",
+ "description": "The type of button that will be rendered. The visual presentation of the button type is controlled by merchants through the Branding API.\n\n\n`primary`: button used for main actions. For example: \"Continue to next step\".\n\n`secondary`: button used for secondary actions not blocking user progress. For example: \"Download Shop app\".\n\n`plain`: renders a button that visually looks like a link.",
+ "isOptional": true,
+ "defaultValue": "'primary'"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "loading",
+ "value": "boolean",
+ "description": "Replaces content with a loading indicator.",
+ "isOptional": true,
+ "defaultValue": "false"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "loadingLabel",
+ "value": "string",
+ "description": "Accessible label for the loading indicator when user prefers reduced motion. This value is only used if `loading` is true.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "MethodSignature",
+ "name": "onPress",
+ "value": "() => void",
+ "description": "Callback that is run when the button is pressed.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "overlay",
+ "value": "RemoteFragment",
+ "description": "An overlay component to render when the user interacts with the component.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "submit",
+ "value": "boolean",
+ "description": "Allows the button to submit a form.",
+ "isOptional": true,
+ "deprecationMessage": "use `accessibilityRole=\"submit\"` instead"
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "to",
+ "value": "string",
+ "description": "Destination URL to link to.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Button/Button.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "toggles",
+ "value": "string",
+ "description": "The component's identifier whose visibility will be toggled when this component is actioned.",
+ "isOptional": true
+ }
+ ],
+ "value": "export interface ButtonProps\n extends OverlayActivatorProps,\n DisclosureActivatorProps,\n InteractionProps,\n IdProps {\n /**\n * The type of button that will be rendered. The visual presentation of the button type\n * is controlled by merchants through the Branding API.\n *\n *\n * `primary`: button used for main actions. For example: \"Continue to next step\".\n *\n * `secondary`: button used for secondary actions not blocking user progress. For example: \"Download Shop app\".\n *\n * `plain`: renders a button that visually looks like a link.\n *\n *\n * @defaultValue 'primary'\n */\n kind?: 'primary' | 'secondary' | 'plain';\n /**\n * Specify the color treatment of the Button.\n */\n appearance?: Extract;\n /**\n * Allows the button to submit a form.\n * @deprecated use `accessibilityRole=\"submit\"` instead\n */\n submit?: boolean;\n /**\n * Destination URL to link to.\n */\n to?: string;\n /**\n * Specifies the inline alignment of the content.\n *\n * @defaultValue 'center'\n */\n inlineAlignment?: InlineAlignment;\n /**\n * Replaces content with a loading indicator.\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * Accessible label for the loading indicator when user prefers reduced motion. This value is\n * only used if `loading` is true.\n */\n loadingLabel?: string;\n /**\n * A label used for buyers using assistive technologies. When set, any\n * `children` supplied to this component will not be announced to screen reader users.\n */\n accessibilityLabel?: string;\n /**\n * The role of the button that will be rendered.\n *\n * `button`: renders a regular button.\n *\n * `submit`: renders a button that submits a form.\n *\n * @defaultValue 'button'\n */\n accessibilityRole?: ButtonAccessibilityRole;\n /**\n * Disables the button, disallowing any interaction.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Callback that is run when the button is pressed.\n */\n onPress?(): void;\n}"
+ },
+ "ButtonAccessibilityRole": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "ButtonAccessibilityRole",
+ "value": "'button' | 'submit'",
+ "description": ""
+ },
+ "InlineAlignment": {
+ "filePath": "src/surfaces/checkout/components/shared.ts",
+ "syntaxKind": "TypeAliasDeclaration",
+ "name": "InlineAlignment",
+ "value": "'start' | 'center' | 'end'",
+ "description": ""
+ }
+ }
+ }
+ ],
+ "category": "UI components",
+ "subCategory": "Actions",
+ "defaultExample": {
+ "image": "button-default.png",
+ "codeblock": {
+ "title": "Basic Button",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n reactExtension,\n Button,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <Button\n onPress={() => {\n console.log('onPress event');\n }}\n >\n Pay now\n </Button>\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {extension, Button} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const button = root.createComponent(\n Button,\n {onPress: () => console.log('onPress event')},\n 'Pay now',\n );\n\n root.appendChild(button);\n});\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ "subSections": [
+ {
+ "type": "Generic",
+ "anchorLink": "appearance",
+ "title": "Appearance",
+ "sectionContent": "| Value | Description |\n| --- | --- |\n| \"critical\" | Conveys a problem has arisen. |\n| \"monochrome\" | Takes the color of its parent.|"
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "best-practices",
+ "title": "Best Practices",
+ "sectionContent": "**Content Best Practices**\n\n- Clearly label each button to accurately represent the action associated with it.\n\n- Use strong actionable verbs at the beginning of button text to make it clear to the user what action will occur when the button is clicked.\n\n**Hierarchy Best Practices**\n\n- Establish a visual hierarchy between buttons to minimize confusion and help users understand which actions are most important.\n\n- Use only one high-emphasis button (primary button) per context to make it clear that other buttons have less importance.\n\n- Use lower-emphasis buttons for secondary calls to action.\n\n- Use primary buttons for actions that progress users through checkout such as “Pay now” or for concluding an action in a modal such as “Apply”.\n\n- Use secondary buttons to provide alternative actions to the primary button, without disrupting the primary flow such as “Track your order”.\n\n- Use plain buttons for least prominent, non-critical actions such as “Login to your account”.\n\n**When to Use Buttons**\n\n- Use buttons to communicate actions the user can take.\n\n- Use buttons to allow users to interact with the page.\n\n**When Not to Use Buttons**\n\n- Don’t use buttons as navigational elements. Use links instead when the desired action is to take the user to a new page."
+ }
+ ],
+ "related": [
+ {
+ "name": "Link",
+ "subtitle": "Component",
+ "url": "link",
+ "type": "Component"
+ }
+ ]
+ },
+ {
+ "name": "Card",
+ "description": "Group related content and functionality together in a familiar and consistent style, for customers to scan, read, and get things done.",
+ "thumbnail": "card-thumbnail.png",
+ "requires": "",
+ "isVisualComponent": true,
+ "type": "",
+ "definitions": [
+ {
+ "title": "CardProps",
+ "description": "",
+ "type": "CardProps",
+ "typeDefinitions": {
+ "CardProps": {
+ "filePath": "src/surfaces/customer-account/components/Card/Card.ts",
+ "name": "CardProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/customer-account/components/Card/Card.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "padding",
+ "value": "boolean",
+ "description": "Adjust the padding of all edges.\n\n`true` applies a default padding that is appropriate for the component.",
+ "isOptional": true
+ }
+ ],
+ "value": "export interface CardProps {\n /**\n * Adjust the padding of all edges.\n *\n * `true` applies a default padding that is appropriate for the component.\n */\n padding?: boolean;\n}"
+ }
+ }
+ }
+ ],
+ "category": "UI components",
+ "subCategory": "Layout and structure",
+ "defaultExample": {
+ "image": "card-preview.png",
+ "altText": "An example of the card component shows a header that says \"Addresses\", and a button in the upper-right corner that says \"+Add\". Under the header, there is a full mailing address labeled as the default address, with a pencil icon for editing it.",
+ "codeblock": {
+ "title": "Basic Card",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n Card,\n Grid,\n BlockStack,\n Heading,\n Text,\n TextBlock,\n View,\n Icon,\n InlineLayout,\n reactExtension,\n} from '@shopify/ui-extensions-react/customer-account';\nimport React from 'react';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <App />,\n);\n\nfunction App() {\n return (\n <Card padding>\n <Grid\n columns={['fill', 'auto']}\n spacing=\"base\"\n minInlineSize=\"fill\"\n blockAlignment=\"start\"\n >\n <BlockStack spacing=\"loose\">\n <Heading>Addresses</Heading>\n <BlockStack spacing=\"base\">\n <Text appearance=\"subdued\">\n Default address\n </Text>\n <BlockStack spacing=\"extraTight\">\n <TextBlock>\n Kristin Watson\n </TextBlock>\n <TextBlock>\n 1655 Island Pkwy\n </TextBlock>\n <TextBlock>\n Kamloops BC M7G 672\n </TextBlock>\n <TextBlock>Canada</TextBlock>\n </BlockStack>\n </BlockStack>\n </BlockStack>\n <BlockStack spacing=\"loose\">\n <InlineLayout blockAlignment=\"center\">\n <Icon\n source=\"plus\"\n size=\"small\"\n appearance=\"accent\"\n />\n <Text appearance=\"accent\">Add</Text>\n </InlineLayout>\n <View inlineAlignment=\"end\">\n <Icon\n source=\"pen\"\n size=\"small\"\n appearance=\"accent\"\n />\n </View>\n </BlockStack>\n </Grid>\n </Card>\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {\n Card,\n Grid,\n extension,\n} from '@shopify/ui-extensions/customer-account';\n\nexport default extension(\n 'customer-account.page.render',\n (root, api) => {\n renderApp(root, api);\n },\n)\n\nfunction renderApp(root, api) {\n const card = root.createComponent(\n Card,\n {padding: true},\n [\n root.createComponent(Grid, {columns: ['1fr', 'auto'],\n spacing: \"base\",\n minInlineSize: \"fill\",\n blockAlignment: \"start\"}, [\n root.createComponent('BlockStack', {spacing: 'loose'}, [\n root.createComponent('Heading', undefined, 'Addresses'),\n root.createComponent('BlockStack', {spacing: 'base'}, [\n root.createComponent('Text', {appearance: \"subdued\"}, 'Default address'),\n root.createComponent('BlockStack', {spacing: 'extraTight'}, [\n root.createComponent('TextBlock',{}, 'Kristin Watson'),\n root.createComponent('TextBlock', {}, '1655 Island Pkwy'),\n root.createComponent('TextBlock', {}, 'Kamloops BC M7G 672'),\n root.createComponent('TextBlock', {}, 'Canada'),\n ]),\n ]),\n ]),\n root.createComponent('BlockStack', {spacing: 'loose'}, [\n root.createComponent('InlineLayout', {blockAlignment: \"center\"}, [\n root.createComponent('Icon', {source: \"plus\", size: \"small\", appearance: \"accent\"}),\n root.createComponent('Text', {appearance: \"accent\"}, 'Add'),\n ]),\n root.createComponent('View', {inlineAlignment: \"end\"}, [\n root.createComponent('Icon', {source: \"pen\", size: \"small\", appearance: \"accent\"}),\n ]),\n ]),\n ]),\n ])\n root.append(card);\n}\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ "subSections": [
+ {
+ "type": "Generic",
+ "anchorLink": "best-practices",
+ "title": "Best Practices",
+ "sectionContent": "\n- Group related information.\n- Use headings that set clear expectations about the card’s purpose.\n- Display information in a way that emphasizes and prioritizes what the customer needs to know first.\n"
+ }
+ ],
+ "related": []
+ },
+ {
+ "name": "Chat",
+ "description": "\nUse the Chat component to create real-time chat applications.\n",
+ "thumbnail": "chat-thumbnail.png",
+ "requires": "access to the **Chat in checkout extensions** scope. Request access in the Partner Dashboard.",
+ "isVisualComponent": true,
+ "type": "component",
+ "definitions": [
+ {
+ "title": "ChatProps",
+ "description": "",
+ "type": "ChatProps",
+ "typeDefinitions": {
+ "ChatProps": {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "name": "ChatProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "accessibilityLabel",
+ "value": "string",
+ "description": "A label that describes the purpose or contents of the component. When set, it will be announced to users using assistive technologies and will provide them with more context.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "blockSize",
+ "value": "number",
+ "description": "Adjust the block size.\n\nCheckout imposes [sizing restrictions](/docs/apps/build/checkout/chat#component-states) for the component, therefore the size set may not be the actual size rendered.\n\n`number`: size in pixels.\n\nLearn more about [block size on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/block-size).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the component.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "inlineSize",
+ "value": "number",
+ "description": "Adjust the inline size.\n\nCheckout imposes [sizing restrictions](/docs/apps/build/checkout/chat#component-states) for the component, therefore the size set may not be the actual size rendered.\n\n`number`: size in pixels.\n\nLearn more about [inline size on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "onMessage",
+ "value": "(event: MessageEvent) => void",
+ "description": "Callback when the embedded page sends a message.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "onReady",
+ "value": "(event: ReadyEvent) => void",
+ "description": "Callback when the embedded page is ready and a message port has been created to communicate with the host page.",
+ "isOptional": true
+ }
+ ],
+ "value": "export interface ChatProps extends IdProps {\n /**\n * Adjust the inline size.\n *\n * Checkout imposes [sizing restrictions](/docs/apps/build/checkout/chat#component-states) for the component, therefore the size set\n * may not be the actual size rendered.\n *\n * `number`: size in pixels.\n *\n * Learn more about [inline size on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/inline-size).\n */\n inlineSize?: number;\n\n /**\n * Adjust the block size.\n *\n * Checkout imposes [sizing restrictions](/docs/apps/build/checkout/chat#component-states) for the component, therefore the size set\n * may not be the actual size rendered.\n *\n * `number`: size in pixels.\n *\n * Learn more about [block size on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/block-size).\n */\n blockSize?: number;\n\n /**\n * A label that describes the purpose or contents of the component. When set,\n * it will be announced to users using assistive technologies and will\n * provide them with more context.\n */\n accessibilityLabel?: string;\n\n /**\n * Callback when the embedded page sends a message.\n */\n onMessage?: (event: MessageEvent) => void;\n\n /**\n * Callback when the embedded page is ready and a message port has been created to\n * communicate with the host page.\n */\n onReady?: (event: ReadyEvent) => void;\n}"
+ },
+ "MessageEvent": {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "name": "MessageEvent",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "data",
+ "value": "any",
+ "description": "The data sent by the message emitter (the embedded page).\n\nLearn more about [MessageEvent data on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "origin",
+ "value": "string",
+ "description": "A string representing the origin of the message emitter (the embedded page).\n\nLearn more about [MessageEvent origin on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin)."
+ }
+ ],
+ "value": "interface MessageEvent {\n /**\n * The data sent by the message emitter (the embedded page).\n *\n * Learn more about [MessageEvent data on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data).\n */\n data?: any;\n\n /**\n * A string representing the origin of the message emitter (the embedded page).\n *\n * Learn more about [MessageEvent origin on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/origin).\n */\n origin: string;\n}"
+ },
+ "ReadyEvent": {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "name": "ReadyEvent",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/Chat.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "postMessage",
+ "value": "(message: any) => void",
+ "description": "A function to send messages to the embedded page.\n\nLearn more about [postMessage on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/postMessage)."
+ }
+ ],
+ "value": "export interface ReadyEvent {\n /**\n * A function to send messages to the embedded page.\n *\n * Learn more about [postMessage on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/postMessage).\n */\n postMessage: (message: any) => void;\n}"
+ }
+ }
+ },
+ {
+ "title": "App Bridge for checkout",
+ "description": "\nThe App Bridge script for checkout provides APIs that enables a secure communication channel between the Shopify checkout and the embedded application within the Chat iframe. It also offers convenient methods to perform common actions like resizing the iframe from within the application.\n\nAfter App Bridge is [set up](#about-app-bridge) in your app, you have access to the `shopify` global variable. This variable exposes the following App Bridge functionalities and configuration information:\n ",
+ "type": "AppBridge",
+ "typeDefinitions": {
+ "AppBridge": {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "name": "AppBridge",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "config",
+ "value": "Config",
+ "description": "The static configuration values that will not change during runtime.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "extension",
+ "value": "Extension",
+ "description": "The references and APIs to the UI extension that helped bootstrap the iframe.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "idToken",
+ "value": "() => Promise",
+ "description": "The ID token providing a set of claims as a signed [JSON Web Token (JWT)](https://openid.net/specs/openid-connect-core-1_0.html#IDToken%5C) with a TTL of 5 minutes. It can be used to ensure that requests came from a Shopify authenticated user. See the [ID Token documentation](/docs/apps/build/authentication-authorization/session-tokens) for more information.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "platform",
+ "value": "'browser' | 'shop-app' | 'pos'",
+ "description": "The platform or application that the app is embedded within.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "surface",
+ "value": "'checkout'",
+ "description": "The Shopify surface that the app is embedded within.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "visitor",
+ "value": "() => Promise",
+ "description": "Information about the current visitor.",
+ "isOptional": true
+ }
+ ],
+ "value": "interface AppBridge {\n /**\n * The static configuration values that will not change during runtime.\n */\n config?: Config;\n\n /**\n * The Shopify surface that the app is embedded within.\n */\n surface?: 'checkout';\n\n /**\n * The platform or application that the app is embedded within.\n */\n platform?: 'browser' | 'shop-app' | 'pos';\n\n /**\n * The ID token providing a set of claims as a signed [JSON Web Token (JWT)](https://openid.net/specs/openid-connect-core-1_0.html#IDToken%5C)\n * with a TTL of 5 minutes. It can be used to ensure that requests came from a Shopify authenticated user.\n * See the [ID Token documentation](/docs/apps/build/authentication-authorization/session-tokens) for more information.\n *\n * @see /docs/api/checkout-ui-extensions/latest/apis/session-token\n * @see /docs/apps/build/authentication-authorization/session-tokens\n */\n idToken?: () => Promise;\n\n /**\n * The references and APIs to the UI extension that helped bootstrap the iframe.\n */\n extension?: Extension;\n\n /**\n * Information about the current visitor.\n *\n * @ignore async via our RPC endpoints to ensure a secure handshake between\n * host and client is established.\n */\n visitor?: () => Promise;\n}"
+ },
+ "Config": {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "name": "Config",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "locale",
+ "value": "string",
+ "description": "The locale of the shop that’s embedding the app.",
+ "isOptional": true
+ }
+ ],
+ "value": "interface Config {\n /**\n * The locale of the shop that’s embedding the app.\n */\n locale?: string;\n}"
+ },
+ "Extension": {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "name": "Extension",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "handle",
+ "value": "string",
+ "description": "The unique handle name of the UI extension as defined by the developer.\n\nLearn more about [extension configuration](/docs/api/checkout-ui-extensions/latest/configuration#how-it-works).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "port",
+ "value": "MessagePort",
+ "description": "A MessagePort instance for communicating directly to and from the UI Extension that created the iframe. It will need to be started to begin receiving messages.\n\nLearn more about [MessagePort on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort).",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "resizeTo",
+ "value": "(width: number, height: number) => void",
+ "description": "Set an iframe’s size. Depending on the context, the host page may decide to apply or ignore the new sizes. For example, if the iframe is meant to fill its parent container the host would ignore the request. Conversely, if the parent container allows the iframe to fill it the host would apply the new size.\n\nAlias to `window.resizeTo()`, available here for feature discovery by the embedding app.\n\nLearn more about [resizeTo() on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/resizeTo).",
+ "isOptional": true
+ }
+ ],
+ "value": "interface Extension {\n /**\n * The unique handle name of the UI extension as defined by the developer.\n *\n * Learn more about [extension configuration](/docs/api/checkout-ui-extensions/latest/configuration#how-it-works).\n */\n handle?: string;\n\n /**\n * A MessagePort instance for communicating directly to and from the UI\n * Extension that created the iframe. It will need to be started to begin\n * receiving messages.\n *\n * Learn more about [MessagePort on MDN](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort).\n */\n port?: MessagePort;\n\n /**\n * Set an iframe’s size. Depending on the context, the host page may decide\n * to apply or ignore the new sizes. For example, if the iframe is meant to\n * fill its parent container the host would ignore the request. Conversely,\n * if the parent container allows the iframe to fill it the host would\n * apply the new size.\n *\n * Alias to `window.resizeTo()`, available here for feature discovery by the\n * embedding app.\n *\n * Learn more about [resizeTo() on MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/resizeTo).\n */\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n resizeTo?: Window['resizeTo'];\n}"
+ },
+ "Visitor": {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "name": "Visitor",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Chat/AppBridge.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "The unique token of a given user across all surfaces in a shop, present if processing permission is provided.",
+ "isOptional": true
+ }
+ ],
+ "value": "interface Visitor {\n /**\n * The unique token of a given user across all surfaces in a shop,\n * present if processing permission is provided.\n *\n * @ignore this maps to the _shopify_y cookie which Trekkie refers to as a\n * uniqToken.\n */\n id?: string;\n}"
+ }
+ }
+ }
+ ],
+ "category": "UI components",
+ "subCategory": "Overlays",
+ "defaultExample": {
+ "image": "chat-component-minimized.png",
+ "codeblock": {
+ "title": "Basic Chat",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n reactExtension,\n Chat,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\n// This component requires the configuration of the `extensions.targeting.preloads.chat` in the extensions configuration file.\n// Its value will be used as the `src` attribute of the Chat component.\n\nfunction Extension() {\n return <Chat inlineSize={100} blockSize={50} />;\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {extension, Chat} from '@shopify/ui-extensions/customer-account';\n\n// This component requires the configuration of the `extensions.targeting.preloads.chat` in the extensions configuration file.\n// Its value will be used as the `src` attribute of the Chat component.\n\nexport default extension('customer-account.page.render', (root) => {\n const chat = root.createComponent(Chat, {\n inlineSize: 100,\n blockSize: 50,\n });\n\n root.appendChild(chat);\n});\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ "subSections": [
+ {
+ "type": "Generic",
+ "anchorLink": "src-and-query-parameters",
+ "title": "Chat source and query parameters",
+ "sectionContent": "\nThe `src` of the iframe rendered by Chat is provided by the `preloads` `chat` key in the extension configuration file. Shopify automatically appends query parameters to the URL which allows developers to verify the authenticity of the request and the identity of the merchant. We guarantee these tokens are valid and signed by Shopify.\n\n#### id_token\nThe ID token providing a set of claims as a signed [JSON Web Token (JWT)](https://openid.net/specs/openid-connect-core-1_0.html#IDToken%5C) with a TTL of 5 minutes. It can be used to retrieve merchants information on the backend as well as ensure that requests came from a Shopify authenticated source. See the [ID Token documentation](/docs/apps/build/authentication-authorization/session-tokens) for more information.\n\n#### locale\nThe locale of the shop that's embedding the app, i.e. `en-CA`. This information is also available in the `shopify` global variable under `config`.\n\n#### handle\nThe unique handle name of the UI extension as defined by the developer. This information is also available in the `shopify` global variable under `extension`.\n",
+ "codeblock": {
+ "title": "Chat source",
+ "tabs": [
+ {
+ "title": "shopify.extension.toml",
+ "code": "[[extensions.targeting]]\ntarget = \"purchase.checkout.chat.render\"\n\n [extensions.targeting.preloads]\n chat = \"https://my-chat-application.com\"\n",
+ "language": "toml"
+ }
+ ]
+ }
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "chat-dimensions",
+ "title": "Chat dimensions",
+ "image": "chat-component-iframe-clipping.png",
+ "sectionContent": "\nTo provide developers with the most flexibility when it comes to responsive changes, the iframe rendered in the page by `Chat` takes the full width and height of the browser window. Only a specific part of the iframe is visible, the rest is clipped.\n\nThe `inlineSize` and `blockSize` values set on the Chat component or changed through the App Bridge `resizeTo()` method dictates the bounding box of the visible part. That box is fixed and positioned in the bottom right corner of the iframe.\n\nYour application can rely on the window's dimension to change styles or apply specific behaviors to different window sizes. This allow developers to style their app as if as if the application would be outside an iframe. For example, CSS media queries can now work within the iframe.\n"
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "about-app-bridge",
+ "title": "Getting started with App Bridge for checkout",
+ "sectionContent": "\nYou must add App Bridge to your hosted chat application by including the script tag pointing to the `app-bridge-checkout.js` as the first script in the `` section as seen in the example. The script loads directly from Shopify and keeps itself up-to-date.\n ",
+ "codeblock": {
+ "title": "Hosted chat application",
+ "tabs": [
+ {
+ "code": "<head>\n <script src=\"https://cdn.shopify.com/shopifycloud/checkout-web/assets/app-bridge-checkout.js\"></script>\n</head>\n",
+ "language": "html"
+ }
+ ]
+ }
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "global-variable",
+ "title": "App Bridge’s global variable",
+ "sectionContent": "\nAfter App Bridge is set up in your app, you have access to the `shopify` global variable. This variable exposes various App Bridge functionalities, such as resizing the iframe or retrieving details of the shop.\n\nThe [reference](#app%20bridge%20for%20checkout) above list all the available methods and properties.\n\nAlternatively, to explore all the functionality available on the `shopify` global variable:\n\n* Open the Chrome developer console while in checkout.\n* Switch the frame context to your app's iframe.\n* Enter `shopify` in the console.\n",
+ "codeblock": {
+ "title": "shopify",
+ "tabs": [
+ {
+ "title": "config",
+ "code": "shopify.config.locale;\n// => 'en-CA'\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ {
+ "type": "Generic",
+ "anchorLink": "app-bridge-css-api",
+ "title": "App Bridge’s CSS API",
+ "sectionContent": "\nSince the Chat iframe is clipped and fills the whole window as seen in the previous section, using percentage based sizes for its UI elements will most likely resolves in clipped content. As mentioned in the UX guidelines, Chat is constraint to specific [maximum sizes on large and small screens](/docs/apps/build/checkout/chat/ux-for-chat#build-within-the-chat-component-dimensions) set by Shopify. Setting a 100% width on an element will not be constraint to the visible size of the iframe, but to the whole window.\n\nTo remediate this issue, through App Bridge we offer a set of [CSS custom properties](https://developer.mozilla.org/en-US/docs/Web/CSS/--*) with all the maximum dimensions defined in our UX guidelines. You can use these custom properties whether in Javascript or in the CSS of you application to set protections against overflowing content while using percentage based sizes. Using these properties will also reduce regressions if Shopify ever changes the maximum dimensions.\n",
+ "codeblock": {
+ "title": "App Bridge CSS API",
+ "tabs": [
+ {
+ "title": "Custom properties",
+ "code": ":root {\n --shopify-checkout-chat-minimized-max-inline-size: 224px;\n --shopify-checkout-chat-minimized-max-block-size: 72px;\n --shopify-checkout-chat-maximized-max-inline-size: 415px;\n --shopify-checkout-chat-maximized-max-block-size: 700px;\n\n @media screen and (max-width: 569px) {\n --shopify-checkout-chat-maximized-max-inline-size: 100dvi;\n --shopify-checkout-chat-maximized-max-block-size: 93dvb;\n\n @supports not (inline-size: 100dvi) {\n --shopify-checkout-chat-maximized-max-inline-size: 100vi;\n --shopify-checkout-chat-maximized-max-block-size: 93vb;\n }\n }\n}\n",
+ "language": "css"
+ },
+ {
+ "title": "style.css",
+ "code": ".activator {\n inline-size: 100%;\n max-inline-size: var(--shopify-checkout-chat-minimized-max-inline-size);\n}\n\n.dialog {\n inline-size: 100%;\n max-inline-size: var(--shopify-checkout-chat-maximized-max-inline-size);\n}\n",
+ "language": "css"
+ }
+ ]
+ }
+ }
+ ],
+ "examples": {
+ "description": "",
+ "examples": [
+ {
+ "description": "A very common action in your application will be to request a resize of the iframe. This is done through the App Bridge `resizeTo()` method. The following example resizes the iframe following the click of an activator button to show a dialog window.",
+ "codeblock": {
+ "title": "Resize the Chat iframe from the hosted application",
+ "tabs": [
+ {
+ "title": "UI Extension",
+ "code": "import {reactExtension, Chat} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension('customer-account.page.render', () => (\n <Extension />\n));\n\nfunction Extension() {\n return <Chat inlineSize={150} blockSize={50} />;\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "Hosted chat application",
+ "code": "<!doctype html>\n<html lang=\"en\">\n <head>\n <script src=\"https://cdn.shopify.com/shopifycloud/checkout-web/assets/app-bridge-checkout.js\"></script>\n <style>\n .dialog {\n display: none;\n }\n .visible {\n display: block;\n }\n </style>\n </head>\n <body>\n <dialog class=\"dialog\">\n How can we help you today?\n <button class=\"btn-close\">Close</button>\n </dialog>\n <button class=\"btn-activator\">Chat with us</button>\n\n <script type=\"text/javascript\">\n const btnActivator = document.querySelector('.btn-activator');\n const btnClose = document.querySelector('.btn-close');\n const dialog = document.querySelector('.dialog');\n\n // bind actions to the buttons\n btnActivator.addEventListener('click', toggleDialog);\n btnClose.addEventListener('click', toggleDialog);\n\n function toggleDialog() {\n // if the dialog is visible,\n // - hide the dialog\n // - resize the iframe to the button's size\n if (dialog.classList.contains('visible')) {\n dialog.classList.remove('visible');\n shopify !== undefined && window.resizeTo(150, 50);\n\n // if the dialog is not visible,\n // - resize the iframe to the desired dialog's size\n // - then show the dialog\n } else {\n shopify !== undefined && window.resizeTo(415, 700);\n dialog.classList.add('visible');\n }\n }\n </script>\n </body>\n</html>\n",
+ "language": "html"
+ }
+ ]
+ }
+ },
+ {
+ "description": "\nInformation can be passed between the hosted application and the UI extension through App Bridge. [Extensions API](/docs/api/customer-account-ui-extensions/unstable#extension-apis) are available in the UI extension and can be shared through that method.\n ",
+ "codeblock": {
+ "title": "Communicate information between the hosted application and the UI extension",
+ "tabs": [
+ {
+ "title": "UI Extension",
+ "code": "import {\n reactExtension,\n Chat,\n} from '@shopify/ui-extensions-react/customer-account';\nimport {retain} from '@remote-ui/rpc';\nimport type {ReadyEvent} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension('customer-account.page.render', () => (\n <Extension />\n));\n\nfunction Extension() {\n let postMessage;\n\n return (\n <Chat\n inlineSize={150}\n blockSize={50}\n onReady={({postMessage: postMessageParam}: ReadyEvent) => {\n postMessage = postMessageParam;\n retain(postMessage);\n\n postMessage({\n action: 'ping',\n });\n }}\n onMessage={(event: Event) => {\n if (event.data.action === 'pong') {\n console.log('Messaging channel successful');\n }\n }}\n />\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "Hosted chat application",
+ "code": "// Create a variable to store the buyer's first name.\n// We'll be able to use this to personalize the chat experience.\nlet buyerFirstName;\n\n// In the hosted application Javascript, listen for messages from the UI extension.\nshopify.extension.port.onmessage = async (event) => {\n // if the message's data has a ping action, respond with a pong\n if (event.data.action === 'ping') {\n buyerFirstName = event.data.buyer.firstName;\n\n await shopify.extension.port.postMessage({\n action: 'pong',\n });\n }\n};\n\n// Ensure the messagePort is ready to start sending and receiving messages.\nshopify.extension.port.start();\n",
+ "language": "js"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "related": []
+ },
+ {
+ "name": "Checkbox",
+ "description": "Use checkboxes to give customers a single binary option, such as signing up for marketing, or agreeing to terms and conditions.",
+ "thumbnail": "checkbox-thumbnail.png",
+ "requires": "",
+ "isVisualComponent": true,
+ "type": "",
+ "definitions": [
+ {
+ "title": "CheckboxProps",
+ "description": "",
+ "type": "CheckboxProps",
+ "typeDefinitions": {
+ "CheckboxProps": {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "name": "CheckboxProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "accessibilityLabel",
+ "value": "string",
+ "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "checked",
+ "value": "boolean",
+ "description": "Whether the checkbox is active.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "disabled",
+ "value": "boolean",
+ "description": "Whether the checkbox can be changed.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "error",
+ "value": "string",
+ "description": "Indicate an error to the user. The field will be given a specific stylistic treatment to communicate problems that have to be resolved immediately.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the field. When no `id` is set, a globally unique value will be used instead.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "name",
+ "value": "string",
+ "description": "An identifier for the field that is unique within the nearest containing `Form` component.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "MethodSignature",
+ "name": "onChange",
+ "value": "(value: boolean) => void",
+ "description": "A callback that is run whenever the checkbox is changed. This callback is called with a boolean indicating whether the checkbox should now be active or inactive. This component is [controlled](https://reactjs.org/docs/forms.html#controlled-components), so you must store this value in state and reflect it back in the `checked` or `value` props.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "toggles",
+ "value": "string",
+ "description": "The component's identifier whose visibility will be toggled when this component is actioned.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Checkbox/Checkbox.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "value",
+ "value": "boolean",
+ "description": "Whether the checkbox is active. This prop is an alias for `checked`, and can be useful in form libraries that provide a normalized API for dealing with both `boolean` and `string` values. If both `value` and `checked` are set, `checked` takes precedence.",
+ "isOptional": true
+ }
+ ],
+ "value": "export interface CheckboxProps extends DisclosureActivatorProps {\n /**\n * A unique identifier for the field. When no `id` is set,\n * a globally unique value will be used instead.\n */\n id?: string;\n\n /**\n * An identifier for the field that is unique within the nearest\n * containing `Form` component.\n */\n name?: string;\n\n /**\n * Whether the checkbox is active. This prop is an alias for `checked`,\n * and can be useful in form libraries that provide a normalized API for\n * dealing with both `boolean` and `string` values. If both `value` and\n * `checked` are set, `checked` takes precedence.\n */\n value?: boolean;\n\n /**\n * Whether the checkbox is active.\n */\n checked?: boolean;\n\n /**\n * Whether the checkbox can be changed.\n */\n disabled?: boolean;\n\n /**\n * Indicate an error to the user. The field will be given a specific stylistic treatment\n * to communicate problems that have to be resolved immediately.\n */\n error?: string;\n\n /**\n * A label used for buyers using assistive technologies. When set, any\n * `children` supplied to this component will not be announced to screen reader users.\n */\n accessibilityLabel?: string;\n\n /**\n * A callback that is run whenever the checkbox is changed. This callback\n * is called with a boolean indicating whether the checkbox should now be\n * active or inactive. This component is [controlled](https://reactjs.org/docs/forms.html#controlled-components),\n * so you must store this value in state and reflect it back in the\n * `checked` or `value` props.\n */\n onChange?(value: boolean): void;\n}"
+ }
+ }
+ }
+ ],
+ "category": "UI components",
+ "subCategory": "Forms",
+ "defaultExample": {
+ "image": "checkbox-default.png",
+ "codeblock": {
+ "title": "Basic Checkbox",
+ "tabs": [
+ {
+ "title": "React",
+ "code": "import {\n reactExtension,\n Checkbox,\n} from '@shopify/ui-extensions-react/customer-account';\n\nexport default reactExtension(\n 'customer-account.page.render',\n () => <Extension />,\n);\n\nfunction Extension() {\n return (\n <Checkbox id=\"checkbox\" name=\"checkbox\">\n Save this information for next time\n </Checkbox>\n );\n}\n",
+ "language": "tsx"
+ },
+ {
+ "title": "JS",
+ "code": "import {extension, Checkbox} from '@shopify/ui-extensions/customer-account';\n\nexport default extension('customer-account.page.render', (root) => {\n const checkbox = root.createComponent(\n Checkbox,\n {id: 'checkbox', name: 'checkbox'},\n 'Save this information for next time',\n );\n\n root.appendChild(checkbox);\n});\n",
+ "language": "js"
+ }
+ ]
+ }
+ },
+ "examples": {
+ "description": "",
+ "examples": [
+ {
+ "description": "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.",
+ "image": "checkbox-links.png",
+ "codeblock": {
+ "title": "Embedding links in checkbox components",
+ "tabs": [
+ {
+ "code": "import {\n reactExtension,\n Checkbox,\n Link,\n} from '@shopify/ui-extensions-react/checkout';\n\nexport default reactExtension(\n 'purchase.checkout.block.render',\n () => <CheckBoxLinks />,\n);\n\nexport const CheckBoxLinks = () => {\n return (\n <Checkbox\n id=\"checkbox1\"\n name=\"checkboxchoices\"\n >\n I agree to the{' '}\n <Link to=\"https://www.shopify.com\">\n terms and conditions\n </Link>{' '}\n and{' '}\n <Link to=\"https://www.shopify.com\">\n privacy policy\n </Link>{' '}\n of the store related to pricing, payment,\n shipping, returns, and liability set forth\n by Ride Sports\n </Checkbox>\n );\n};\n",
+ "language": "jsx",
+ "title": "React"
+ },
+ {
+ "code": "import {\n extension,\n Checkbox,\n Link,\n} from '@shopify/ui-extensions/checkout';\n\nexport default extension(\n 'purchase.checkout.block.render',\n (root) => {\n const checkbox = root.createComponent(\n Checkbox,\n {\n id: 'checkbox1',\n name: 'checkboxchoices',\n },\n [\n ' I agree to the ',\n root.createComponent(\n Link,\n {to: 'https://www.shopify.com'},\n 'terms and conditions',\n ),\n ' and ',\n root.createComponent(\n Link,\n {to: 'https://www.shopify.com'},\n 'privacy policy',\n ),\n ' of the store related to pricing, payment, shipping, returns, and liability set forth by Ride Sports.',\n ],\n );\n\n root.appendChild(checkbox);\n },\n);\n",
+ "language": "js",
+ "title": "JavaScript"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "related": []
+ },
+ {
+ "name": "Choice",
+ "description": "Options inside a `ChoiceList`.\n\nThe wrapping `ChoiceList` component will dictate if the choice renders as radio buttons or checkboxes.",
+ "thumbnail": "choice-thumbnail.png",
+ "requires": "",
+ "isVisualComponent": true,
+ "type": "",
+ "definitions": [
+ {
+ "title": "ChoiceProps",
+ "description": "",
+ "type": "ChoiceProps",
+ "typeDefinitions": {
+ "ChoiceProps": {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "name": "ChoiceProps",
+ "description": "",
+ "members": [
+ {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "accessibilityLabel",
+ "value": "string",
+ "description": "A label used for buyers using assistive technologies. When set, any `children` supplied to this component will not be announced to screen reader users.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "details",
+ "value": "string | RemoteFragment",
+ "description": "Additional content to be revealed when selected.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "disabled",
+ "value": "boolean",
+ "description": "Whether the choice can be changed.",
+ "isOptional": true
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "id",
+ "value": "string",
+ "description": "A unique identifier for the choice."
+ },
+ {
+ "filePath": "src/surfaces/checkout/components/Choice/Choice.ts",
+ "syntaxKind": "PropertySignature",
+ "name": "primaryContent",
+ "value": "string | RemoteFragment",
+ "description": "The primary content for a choice. Rendered below `