diff --git a/packages/ui-extensions-react/src/surfaces/customer-account/components/Badge/examples/basic-badge.example.tsx b/packages/ui-extensions-react/src/surfaces/customer-account/components/Badge/examples/basic-badge.example.tsx
new file mode 100644
index 0000000000..7b6e57335e
--- /dev/null
+++ b/packages/ui-extensions-react/src/surfaces/customer-account/components/Badge/examples/basic-badge.example.tsx
@@ -0,0 +1,13 @@
+import {
+ reactExtension,
+ Badge,
+} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension(
+ 'customer-account.page.render',
+ () =>
"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: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Banner/examples/basic-banner.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Banner/examples/basic-banner.example.ts
new file mode 100644
index 0000000000..830efd0b29
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Banner/examples/basic-banner.example.ts
@@ -0,0 +1,11 @@
+import {extension, Banner} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const banner = root.createComponent(Banner, {
+ status: 'critical',
+ title:
+ 'Your payment details couldn’t be verified. Check your card details and try again.',
+ });
+
+ root.appendChild(banner);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/BlockLayout.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/BlockLayout.doc.ts
new file mode 100644
index 0000000000..b97797defe
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/BlockLayout.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ 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: 'BlockLayoutProps',
+ description: '',
+ type: 'BlockLayoutProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'blocklayout-default.png',
+ codeblock: {
+ title: 'Basic BlockLayout',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/BlockLayout/examples/basic-blocklayout.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-blocklayout.example.ts',
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/examples/basic-blocklayout.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/examples/basic-blocklayout.example.ts
new file mode 100644
index 0000000000..995d94f748
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockLayout/examples/basic-blocklayout.example.ts
@@ -0,0 +1,16 @@
+import {extension, BlockLayout, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const blockLayout = root.createComponent(
+ BlockLayout,
+ {
+ rows: [60, 'fill'],
+ },
+ [
+ root.createComponent(View, {border: 'base', padding: 'base'}, '60'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'fill'),
+ ],
+ );
+
+ root.appendChild(blockLayout);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/BlockSpacer.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/BlockSpacer.doc.ts
new file mode 100644
index 0000000000..b44eb23e03
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/BlockSpacer.doc.ts
@@ -0,0 +1,47 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ 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',
+ },
+ {
+ 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',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'blockspacer-default.png',
+ codeblock: {
+ title: 'Basic BlockSpacer',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/BlockSpacer/examples/basic-blockspacer.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-blockspacer.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/examples/basic-blockspacer.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/examples/basic-blockspacer.example.ts
new file mode 100644
index 0000000000..c938c45eab
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockSpacer/examples/basic-blockspacer.example.ts
@@ -0,0 +1,11 @@
+import {extension, BlockSpacer, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const blockSpacer = root.createComponent(View, undefined, [
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(BlockSpacer, {spacing: 'loose'}),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ ]);
+
+ root.appendChild(blockSpacer);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/BlockStack.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/BlockStack.doc.ts
new file mode 100644
index 0000000000..cc2998a9ab
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/BlockStack.doc.ts
@@ -0,0 +1,67 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const disclosureAndAlignment = getExample(
+ 'ui-components/disclosure-and-alignment',
+ ['jsx', 'js'],
+);
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'BlockStack',
+ description: 'BlockStack is used to vertically stack elements.',
+ thumbnail: 'blockstack-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'BlockStackProps',
+ description: '',
+ type: 'BlockStackProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'blockstack-default.png',
+ codeblock: {
+ title: 'Basic BlockStack',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/BlockStack/examples/basic-blockstack.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-blockstack.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ examples: {
+ description: '',
+ examples: [disclosureAndAlignment],
+ },
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/examples/basic-blockstack.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/examples/basic-blockstack.example.ts
new file mode 100644
index 0000000000..7e48a27fe1
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/BlockStack/examples/basic-blockstack.example.ts
@@ -0,0 +1,11 @@
+import {extension, BlockStack, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const blockStack = root.createComponent(BlockStack, undefined, [
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ ]);
+
+ root.appendChild(blockStack);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Button/Button.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Button/Button.doc.ts
new file mode 100644
index 0000000000..2d6f871288
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Button/Button.doc.ts
@@ -0,0 +1,64 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ 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',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Actions',
+ defaultExample: {
+ image: 'button-default.png',
+ codeblock: {
+ title: 'Basic Button',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Button/examples/basic-button.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-button.example.ts',
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Button/examples/basic-button.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Button/examples/basic-button.example.ts
new file mode 100644
index 0000000000..4d8191fb7d
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Button/examples/basic-button.example.ts
@@ -0,0 +1,11 @@
+import {extension, Button} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const button = root.createComponent(
+ Button,
+ {onPress: () => console.log('onPress event')},
+ 'Pay now',
+ );
+
+ root.appendChild(button);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Card/Card.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Card/Card.doc.ts
index 05349256ec..b8dcb5688c 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/Card/Card.doc.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Card/Card.doc.ts
@@ -15,7 +15,8 @@ const data: ReferenceEntityTemplateSchema = {
type: 'CardProps',
},
],
- category: 'components',
+ category: 'UI components',
+ subCategory: 'Layout and structure',
defaultExample: {
image: 'card-preview.png',
altText:
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Chat/Chat.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/Chat.doc.ts
new file mode 100644
index 0000000000..4fbe6edd61
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/Chat.doc.ts
@@ -0,0 +1,208 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Chat',
+ description: `
+Use the Chat component to create real-time chat applications.
+`,
+ 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',
+ },
+ {
+ title: 'App Bridge for checkout',
+ description: `
+The 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.
+
+After 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:
+ `,
+ type: 'AppBridge',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Overlays',
+ defaultExample: {
+ image: 'chat-component-minimized.png',
+ codeblock: {
+ title: 'Basic Chat',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Chat/examples/basic-chat.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-chat.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'src-and-query-parameters',
+ title: 'Chat source and query parameters',
+ sectionContent: `
+The \`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.
+
+#### id_token
+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 retrieve merchants information on the backend as well as ensure that requests came from a Shopify authenticated source. See the [ID Token documentation](https://shopify.dev/docs/apps/build/authentication-authorization/session-tokens) for more information.
+
+#### locale
+The 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\`.
+
+#### handle
+The unique handle name of the UI extension as defined by the developer. This information is also available in the \`shopify\` global variable under \`extension\`.
+`,
+ codeblock: {
+ title: 'Chat source',
+ tabs: [
+ {
+ title: 'shopify.extension.toml',
+ code: './examples/shopify-extension-toml.example.toml',
+ language: 'toml',
+ },
+ ],
+ },
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'chat-dimensions',
+ title: 'Chat dimensions',
+ image: 'chat-component-iframe-clipping.png',
+ sectionContent: `
+To 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.
+
+The \`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.
+
+Your 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.
+`,
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'about-app-bridge',
+ title: 'Getting started with App Bridge for checkout',
+ sectionContent: `
+You 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.
+ `,
+ codeblock: {
+ title: 'Hosted chat application',
+ tabs: [
+ {
+ code: './examples/include-app-bridge.example.html',
+ language: 'html',
+ },
+ ],
+ },
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'global-variable',
+ title: 'App Bridge\u2019s global variable',
+ sectionContent: `
+After 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.
+
+The [reference](#app%20bridge%20for%20checkout) above list all the available methods and properties.
+
+Alternatively, to explore all the functionality available on the \`shopify\` global variable:
+
+* Open the Chrome developer console while in checkout.
+* Switch the frame context to your app's iframe.
+* Enter \`shopify\` in the console.
+`,
+ codeblock: {
+ title: 'shopify',
+ tabs: [
+ {
+ title: 'config',
+ code: './examples/app-bridge-shopify-config.example.js',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'app-bridge-css-api',
+ title: 'App Bridge\u2019s CSS API',
+ sectionContent: `
+Since 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.
+
+To 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.
+`,
+ codeblock: {
+ title: 'App Bridge CSS API',
+ tabs: [
+ {
+ title: 'Custom properties',
+ code: './examples/app-bridge-css.example.css',
+ language: 'css',
+ },
+ {
+ title: 'style.css',
+ code: './examples/chat-custom-properties-css.example.css',
+ 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: './examples/app-bridge-resize.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'Hosted chat application',
+ code: './examples/app-bridge-resize.example.html',
+ language: 'html',
+ },
+ ],
+ },
+ },
+ {
+ description: `
+Information 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.
+ `,
+ codeblock: {
+ title:
+ 'Communicate information between the hosted application and the UI extension',
+ tabs: [
+ {
+ title: 'UI Extension',
+ code: './examples/app-bridge-communication.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'Hosted chat application',
+ code: './examples/app-bridge-communication.example.js',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ ],
+ },
+
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.js b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.js
new file mode 100644
index 0000000000..8451403216
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.js
@@ -0,0 +1,18 @@
+// Create a variable to store the buyer's first name.
+// We'll be able to use this to personalize the chat experience.
+let buyerFirstName;
+
+// In the hosted application Javascript, listen for messages from the UI extension.
+shopify.extension.port.onmessage = async (event) => {
+ // if the message's data has a ping action, respond with a pong
+ if (event.data.action === 'ping') {
+ buyerFirstName = event.data.buyer.firstName;
+
+ await shopify.extension.port.postMessage({
+ action: 'pong',
+ });
+ }
+};
+
+// Ensure the messagePort is ready to start sending and receiving messages.
+shopify.extension.port.start();
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.tsx b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.tsx
new file mode 100644
index 0000000000..ac1b154899
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Chat/examples/app-bridge-communication.example.tsx
@@ -0,0 +1,34 @@
+import {
+ reactExtension,
+ Chat,
+} from '@shopify/ui-extensions-react/customer-account';
+import {retain} from '@remote-ui/rpc';
+import type {ReadyEvent} from '@shopify/ui-extensions-react/customer-account';
+
+export default reactExtension('customer-account.page.render', () => (
+
+
### Minimum size
-To prevent cut-off text and spacing issues, the minimum size of a Dropzone should be 100px x 100px.
+To prevent cut-off text and spacing issues, the minimum size of a Dropzone should be 100px by 100px.
-
+
`,
},
],
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/DropZone/examples/basic-DropZone-js.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/DropZone/examples/basic-DropZone-js.example.ts
index b59c045669..9a0d33c63e 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/DropZone/examples/basic-DropZone-js.example.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/DropZone/examples/basic-DropZone-js.example.ts
@@ -1,13 +1,9 @@
import {DropZone, extension} from '@shopify/ui-extensions/customer-account';
-export default extension('customer-account.page.render', (root, api) => {
- renderApp(root, api);
-});
-
-async function renderApp(root, api) {
+export default extension('customer-account.page.render', (root) => {
const dropZone = root.createComponent(DropZone, {
accept: 'image/*',
});
- root.append(dropZone);
-}
+ root.appendChild(dropZone);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Form/Form.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Form/Form.doc.ts
new file mode 100644
index 0000000000..549dbe6c2b
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Form/Form.doc.ts
@@ -0,0 +1,50 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Form',
+ description:
+ 'The form component should be used to wrap one or more form controls. This component provides an "implicit submit" behavior, where customers can submit the form from any input by pressing "Enter" on their keyboards. This behavior is widely expected, and should be respected as often as possible.\n\nUnlike an HTML `form` element, this component does not support configuring the descendant fields to be submitted via HTTP automatically. Instead, you must provide an `onSubmit` callback that will perform the necessary HTTP requests in JavaScript.',
+ thumbnail: 'form-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'FormProps',
+ description: '',
+ type: 'FormProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'form-default.png',
+ codeblock: {
+ title: 'Basic Form',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Form/examples/basic-form.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-form.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Wrap around all form input elements.\n\n- Forms can have only one submit button and it must be at the end of the form.',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Form/examples/basic-form.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Form/examples/basic-form.example.ts
new file mode 100644
index 0000000000..15a53c7c99
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Form/examples/basic-form.example.ts
@@ -0,0 +1,48 @@
+import {
+ extension,
+ BlockSpacer,
+ Button,
+ Form,
+ Grid,
+ GridItem,
+ TextField,
+ View,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const fields = root.createComponent(
+ Grid,
+ {columns: ['50%', '50%'], spacing: 'base'},
+ [
+ root.createComponent(
+ View,
+ undefined,
+ root.createComponent(TextField, {label: 'First name'}),
+ ),
+ root.createComponent(
+ View,
+ undefined,
+ root.createComponent(TextField, {label: 'Last name'}),
+ ),
+ root.createComponent(
+ GridItem,
+ {columnSpan: 2},
+ root.createComponent(TextField, {label: 'Company'}),
+ ),
+ ],
+ );
+ const spacer = root.createComponent(BlockSpacer, {spacing: 'base'});
+ const button = root.createComponent(
+ Button,
+ {accessibilityRole: 'submit'},
+ 'Submit',
+ );
+
+ const form = root.createComponent(
+ Form,
+ {onSubmit: () => console.log('onSubmit event')},
+ [fields, spacer, button],
+ );
+
+ root.appendChild(form);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Grid/Grid.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Grid/Grid.doc.ts
new file mode 100644
index 0000000000..0cb43e6b12
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Grid/Grid.doc.ts
@@ -0,0 +1,63 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Grid',
+ description:
+ 'Grid is used to lay out content in a matrix of rows and columns.',
+ thumbnail: 'grid-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'GridProps',
+ description: '',
+ type: 'GridProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'grid-default.png',
+ codeblock: {
+ title: 'Basic Grid',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-grid.example.ts',
+ 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: [
+ {
+ name: 'GridItem',
+ subtitle: 'Component',
+ url: 'grid',
+ type: 'Component',
+ },
+ {
+ subtitle: 'Utility',
+ name: 'StyleHelper',
+ url: '/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper',
+ type: 'utility',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.ts
new file mode 100644
index 0000000000..90425a8b0c
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Grid/examples/basic-grid.example.ts
@@ -0,0 +1,45 @@
+import {extension, Grid, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const grid = root.createComponent(
+ Grid,
+ {
+ columns: ['20%', 'fill', 'auto'],
+ rows: [300, 'auto'],
+ },
+ [
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ '20% / 300',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'fill / 300',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'auto / 300',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ '20% / auto',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'fill / auto',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'auto / auto',
+ ),
+ ],
+ );
+
+ root.appendChild(grid);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/GridItem.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/GridItem.doc.ts
new file mode 100644
index 0000000000..d72271df6e
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/GridItem.doc.ts
@@ -0,0 +1,63 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'GridItem',
+ description:
+ 'GridItem can be used as children of Grid.\n\nIt offers a way to span the element across a number of columns and rows.',
+ thumbnail: 'griditem-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'GridItemProps',
+ description: '',
+ type: 'GridItemProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'griditem-default.png',
+ codeblock: {
+ title: 'Basic GridItem',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-griditem.example.ts',
+ 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: [
+ {
+ name: 'Grid',
+ subtitle: 'Component',
+ url: 'grid',
+ type: 'Component',
+ },
+ {
+ subtitle: 'Utility',
+ name: 'StyleHelper',
+ url: '/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper',
+ type: 'utility',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.ts
new file mode 100644
index 0000000000..25e49ca0b4
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/GridItem/examples/basic-griditem.example.ts
@@ -0,0 +1,42 @@
+import {extension, Grid, GridItem, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const grid = root.createComponent(
+ Grid,
+ {
+ columns: ['20%', 'fill', 'auto'],
+ rows: [300, 'auto'],
+ },
+ [
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ '20% / 300',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'fill / 300',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'auto / 300',
+ ),
+ root.createComponent(GridItem, {columnSpan: 2}, [
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ '20% + fill / auto',
+ ),
+ ]),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'auto / auto',
+ ),
+ ],
+ );
+
+ root.appendChild(grid);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Heading/Heading.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Heading/Heading.doc.ts
new file mode 100644
index 0000000000..74475a799f
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Heading/Heading.doc.ts
@@ -0,0 +1,69 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Heading',
+ description:
+ 'Headings control the visual style of headings. Use headings to introduce major sections, like Contact information, Shipping address, or Shipping method.\n\nUnlike HTML headings, you don’t explicitly specify the position of the heading in the document outline. Nest headings within the heading group component to control the document outline structure used by assistive technologies.',
+ thumbnail: 'heading-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'HeadingProps',
+ description: '',
+ type: 'HeadingProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'heading-default.png',
+ codeblock: {
+ title: 'Basic Heading',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-heading.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Add a heading at the top of each section that clearly describe what’s below.\n\n- Use the heading to highlight the most important concepts or pieces of information that customers need to know.',
+ },
+ ],
+ related: [
+ {
+ name: 'HeadingGroup',
+ subtitle: 'Component',
+ url: 'headinggroup',
+ type: 'Component',
+ },
+ {
+ name: 'Text',
+ subtitle: 'Component',
+ url: 'text',
+ type: 'Component',
+ },
+ {
+ name: 'TextBlock',
+ subtitle: 'Component',
+ url: 'textblock',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.ts
new file mode 100644
index 0000000000..1fc7da6afc
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Heading/examples/basic-heading.example.ts
@@ -0,0 +1,7 @@
+import {extension, Heading} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const heading = root.createComponent(Heading, undefined, 'Store name');
+
+ root.appendChild(heading);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/HeadingGroup.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/HeadingGroup.doc.ts
new file mode 100644
index 0000000000..9e5976c19c
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/HeadingGroup.doc.ts
@@ -0,0 +1,63 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'HeadingGroup',
+ description:
+ 'Heading group controls the heading level of headings nested within it, like H1, H2, H3.\n\nUse a heading group whenever you use a heading to ensure the experience is the same for screen reader users. When using a heading, any children related to that heading should be nested within the same heading group.',
+ thumbnail: 'headinggroup-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'headinggroup-default.png',
+ codeblock: {
+ title: 'Basic HeadingGroup',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-headinggroup.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Use this component to create a content hierarchy within the document outline.',
+ },
+ ],
+ related: [
+ {
+ name: 'Heading',
+ subtitle: 'Component',
+ url: 'heading',
+ type: 'Component',
+ },
+ {
+ name: 'Text',
+ subtitle: 'Component',
+ url: 'text',
+ type: 'Component',
+ },
+ {
+ name: 'TextBlock',
+ subtitle: 'Component',
+ url: 'textblock',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.ts
new file mode 100644
index 0000000000..d36be5ec4f
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/HeadingGroup/examples/basic-headinggroup.example.ts
@@ -0,0 +1,20 @@
+import {
+ extension,
+ HeadingGroup,
+ Heading,
+ View,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const headingGroup = root.createComponent(View, undefined, [
+ root.createComponent(Heading, undefined, 'Heading "accent" | Conveys emphasis and draws attention to the element. |\n| "interactive" | Conveys that the element is pressable, hoverable or otherwise interactive. |\n| "subdued" | Conveys a subdued or disabled state for the element. |\n| "info" | Conveys that the element is informative or has information. |\n| "success" | Convey a successful interaction. |\n| "warning" | Convey something needs attention or an action needs to be taken. |\n| "critical" | Conveys a problem has arisen. |\n| "monochrome" | Takes the color of its parent.|',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.ts
new file mode 100644
index 0000000000..9330733970
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Icon/examples/basic-icon.example.ts
@@ -0,0 +1,7 @@
+import {extension, Icon} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const icon = root.createComponent(Icon, {source: 'discount'});
+
+ root.appendChild(icon);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Image/Image.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Image/Image.doc.ts
new file mode 100644
index 0000000000..f1ee095ebd
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Image/Image.doc.ts
@@ -0,0 +1,49 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Image',
+ description: 'Image is used for large format, responsive images.',
+ thumbnail: 'image-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ImageProps',
+ description: '',
+ type: 'ImageProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'image-default.png',
+ codeblock: {
+ title: 'Basic Image',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Image/examples/basic-image.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-image.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'loading',
+ title: 'Loading',
+ sectionContent:
+ '| Value | Description |\n| --- | --- |\n| "eager" | Image is loaded immediately, regardless of whether or not the image is currently within the visible viewport. |\n| "lazy" | Image is loaded when it’s within the visible viewport. |',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Image/examples/basic-image.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Image/examples/basic-image.example.ts
new file mode 100644
index 0000000000..515747665a
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Image/examples/basic-image.example.ts
@@ -0,0 +1,9 @@
+import {extension, Image} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const image = root.createComponent(Image, {
+ source: 'https://cdn.shopify.com/YOUR_IMAGE_HERE',
+ });
+
+ root.appendChild(image);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ImageGroup/ImageGroup.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ImageGroup/ImageGroup.doc.ts
index 61ec3b877c..73ea208b69 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/ImageGroup/ImageGroup.doc.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ImageGroup/ImageGroup.doc.ts
@@ -15,7 +15,8 @@ const data: ReferenceEntityTemplateSchema = {
type: 'ImageGroupProps',
},
],
- category: 'components',
+ category: 'UI components',
+ subCategory: 'Media and visuals',
defaultExample: {
image: 'imagegroup-preview.png',
altText:
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/InlineLayout.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/InlineLayout.doc.ts
new file mode 100644
index 0000000000..411908fccf
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/InlineLayout.doc.ts
@@ -0,0 +1,68 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const disclosureAndAlignment = getExample(
+ 'ui-components/disclosure-and-alignment',
+ ['jsx', 'js'],
+);
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'InlineLayout',
+ description:
+ 'InlineLayout is used to lay out content over multiple columns.\n\nBy default, all columns are of equal size and fill the available inline space. Content does not wrap on new rows when not enough columns have been explicitly set, instead they are added as new column and fill the remaining inline space.',
+ thumbnail: 'inlinelayout-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'InlineLayoutProps',
+ description: '',
+ type: 'InlineLayoutProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'inlinelayout-default.png',
+ codeblock: {
+ title: 'Basic InlineLayout',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-inlinelayout.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ examples: {
+ description: '',
+ examples: [disclosureAndAlignment],
+ },
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.ts
new file mode 100644
index 0000000000..903b79f4fb
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineLayout/examples/basic-inlinelayout.example.ts
@@ -0,0 +1,16 @@
+import {extension, InlineLayout, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const inlineLayout = root.createComponent(
+ InlineLayout,
+ {
+ columns: ['20%', 'fill'],
+ },
+ [
+ root.createComponent(View, {border: 'base', padding: 'base'}, '20%'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'fill'),
+ ],
+ );
+
+ root.appendChild(inlineLayout);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/InlineSpacer.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/InlineSpacer.doc.ts
new file mode 100644
index 0000000000..b08d62fce5
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/InlineSpacer.doc.ts
@@ -0,0 +1,41 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'InlineSpacer',
+ description:
+ 'InlineSpacer is used to create empty inline space, typically when variable spacing is needed between multiple elements.\n\nNote that you should favor InlineStack when spacing between all elements is the same.',
+ isVisualComponent: true,
+ thumbnail: 'inlinespacer-thumbnail.png',
+ requires: '',
+ type: '',
+ definitions: [
+ {
+ title: 'InlineSpacerProps',
+ description: '',
+ type: 'InlineSpacerProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'inlinespacer-default.png',
+ codeblock: {
+ title: 'Basic InlineSpacer',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-inlinespacer.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.ts
new file mode 100644
index 0000000000..c901e9c7a2
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineSpacer/examples/basic-inlinespacer.example.ts
@@ -0,0 +1,20 @@
+import {
+ extension,
+ InlineSpacer,
+ InlineStack,
+ View,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const inlineSpacer = root.createComponent(InlineStack, {spacing: 'none'}, [
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(InlineSpacer, {spacing: 'loose'}),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(InlineSpacer, {spacing: 'tight'}),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(InlineSpacer, {spacing: 'base'}),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ ]);
+
+ root.appendChild(inlineSpacer);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/InlineStack.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/InlineStack.doc.ts
new file mode 100644
index 0000000000..8e27a1a60b
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/InlineStack.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'InlineStack',
+ description:
+ 'InlineStack is used to lay out a horizontal row of elements. Elements always wrap.',
+ isVisualComponent: true,
+ thumbnail: 'inlinestack-thumbnail.png',
+ requires: '',
+ type: '',
+ definitions: [
+ {
+ title: 'InlineStackProps',
+ description: '',
+ type: 'InlineStackProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'inlinestack-default.png',
+ codeblock: {
+ title: 'Basic InlineStack',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-inlinestack.example.ts',
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.ts
new file mode 100644
index 0000000000..19371d66c4
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/InlineStack/examples/basic-inlinestack.example.ts
@@ -0,0 +1,18 @@
+import {extension, InlineStack, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const inlineStack = root.createComponent(
+ InlineStack,
+ {
+ spacing: 'base',
+ },
+ [
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ root.createComponent(View, {border: 'base', padding: 'base'}, 'View'),
+ ],
+ );
+
+ root.appendChild(inlineStack);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Link/Link.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Link/Link.doc.ts
new file mode 100644
index 0000000000..ab61bcb80a
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Link/Link.doc.ts
@@ -0,0 +1,64 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Link',
+ description:
+ 'Link makes text interactive so customers can perform an action, such as navigating to another location.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'link-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'LinkProps',
+ description: '',
+ type: 'LinkProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Actions',
+ defaultExample: {
+ image: 'link-default.png',
+ codeblock: {
+ title: 'Basic Link',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Link/examples/basic-link.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-link.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'appearance',
+ title: 'Appearance',
+ sectionContent:
+ '| Value | Description |\n| --- | --- |\n| "monochrome" | Takes the color of its parent.|',
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- If the link isn’t in a paragraph, then consider using a plain button instead for a larger hit area.\n\n- Use links primarily for navigation and use buttons primarily for actions.\n\n- The HTML that renders for the Button and `Link` components includes style and accessibility information. Use these components intentionally and consistently to provide a more inclusive experience for assistive technology users and a more cohesive visual experience for sighted users.',
+ },
+ ],
+ related: [
+ {
+ name: 'Button',
+ subtitle: 'Component',
+ url: 'button',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Link/examples/basic-link.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Link/examples/basic-link.example.ts
new file mode 100644
index 0000000000..3f723344f1
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Link/examples/basic-link.example.ts
@@ -0,0 +1,11 @@
+import {extension, Link} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const link = root.createComponent(
+ Link,
+ {to: 'https://www.shopify.ca/climate/sustainability-fund'},
+ 'Sustainability fund',
+ );
+
+ root.appendChild(link);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/List/List.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/List/List.doc.ts
new file mode 100644
index 0000000000..794c12e59e
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/List/List.doc.ts
@@ -0,0 +1,58 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'List',
+ description:
+ 'Lists display a set of related content. Each list item usually begins with a bullet or a number.',
+
+ requires: '',
+ thumbnail: 'list-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ListProps',
+ description: '',
+ type: 'ListProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'list-default.png',
+ codeblock: {
+ title: 'Basic List',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/List/examples/basic-list.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-list.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Use lists to break up chunks of related content to make the information easier for customers to scan.\n\n- Phrase list items consistently. Try to start each item with a noun or a verb and be consistent with each item.\n\n- Use bullets for a text-only list of related items that don’t need to be in a specific order.\n\n- Use numbers for a text-only list of related items when you need to communicate order, priority, or sequence.\n\n- Don’t use a marker when only the semantic value of a list matters, such as with a list of links.',
+ },
+ ],
+ related: [
+ {
+ name: 'ListItem',
+ subtitle: 'Component',
+ url: 'listItem',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/List/examples/basic-list.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/List/examples/basic-list.example.ts
new file mode 100644
index 0000000000..3a28e41ec6
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/List/examples/basic-list.example.ts
@@ -0,0 +1,11 @@
+import {extension, List, ListItem} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const list = root.createComponent(List, undefined, [
+ root.createComponent(ListItem, undefined, '100% organic cotton'),
+ root.createComponent(ListItem, undefined, 'Made in Canada'),
+ root.createComponent(ListItem, undefined, 'Machine washable'),
+ ]);
+
+ root.appendChild(list);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/ListItem.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/ListItem.doc.ts
new file mode 100644
index 0000000000..0519f82686
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/ListItem.doc.ts
@@ -0,0 +1,42 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'ListItem',
+ description:
+ 'List items are used as children of the `List` component.\n\nThey usually begins with a bullet or a number.',
+ requires: '',
+ thumbnail: 'listitem-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'listitem-default.png',
+ codeblock: {
+ title: 'Basic ListItem',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-listitem.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [
+ {
+ name: 'List',
+ subtitle: 'Component',
+ url: 'list',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.ts
new file mode 100644
index 0000000000..28d8a96f6e
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ListItem/examples/basic-listitem.example.ts
@@ -0,0 +1,9 @@
+import {extension, List, ListItem} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const list = root.createComponent(List, undefined, [
+ root.createComponent(ListItem, undefined, '100% organic cotton'),
+ ]);
+
+ root.appendChild(list);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Map/Map.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Map/Map.doc.ts
new file mode 100644
index 0000000000..bcd066554e
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Map/Map.doc.ts
@@ -0,0 +1,54 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Map',
+ description:
+ 'Use the Map component to provide visual representation of geographic data such as verifying address, package or pickup locations.\n\nPlease note that the merchant or partner has to provide an API key and a set of allowed domains where the map would render.\n\nThe 3 necessary domains needed are:\n\n- `https://*.[MERCHANT-DOMAIN].com`\n\n- `https://shop.app`\n\n- `https://shopify.com` \n\n Where `*` is a wildcard. Learn more about [match patterns](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns).\n\n Please refer to the [Google Maps Platform documentation](https://developers.google.com/maps/documentation/javascript/get-api-key) for more details on how to get an API key.',
+ requires: '',
+ thumbnail: 'map-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'MapProps',
+ description: '',
+ type: 'MapProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'map-default.png',
+ codeblock: {
+ title: 'Basic Map',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Map/examples/basic-map.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-map.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [
+ {
+ name: 'MapMarker',
+ subtitle: 'Component',
+ url: 'mapmarker',
+ type: 'Component',
+ },
+ {
+ name: 'MapPopover',
+ subtitle: 'Component',
+ url: 'mappopover',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Map/examples/basic-map.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Map/examples/basic-map.example.ts
new file mode 100644
index 0000000000..7b90b1a1cd
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Map/examples/basic-map.example.ts
@@ -0,0 +1,13 @@
+import {extension, Map} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const map = root.createComponent(Map, {
+ apiKey: 'YOUR_API_KEY',
+ accessibilityLabel: 'Map showing pickup locations',
+ latitude: -28.024,
+ longitude: 140.887,
+ zoom: 4,
+ });
+
+ root.appendChild(map);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/MapMarker.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/MapMarker.doc.ts
new file mode 100644
index 0000000000..7f648d32e7
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/MapMarker.doc.ts
@@ -0,0 +1,62 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'MapMarker',
+ description:
+ 'MapMarker represents a specific location or point of interest on a map.',
+ requires: '',
+ thumbnail: 'mapmarker-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'MapMarkerProps',
+ description: '',
+ type: 'MapMarkerProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'mapmarker-default.png',
+ codeblock: {
+ title: 'Basic MapMarker',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-mapmarker.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent: `- If your markers are interactive, make sure that the selected marker's icon is different from the rest of the non-selected markers.\n\n- If there are a large number of markers obscuring important features of the map, set the markers to clusterable to help increase the readability of the map.`,
+ },
+ ],
+ related: [
+ {
+ name: 'Map',
+ subtitle: 'Component',
+ url: 'map',
+ type: 'Component',
+ },
+ {
+ name: 'MapPopover',
+ subtitle: 'Component',
+ url: 'mappopover',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.ts
new file mode 100644
index 0000000000..dae5d1d4ca
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/MapMarker/examples/basic-mapmarker.example.ts
@@ -0,0 +1,23 @@
+import {extension, Map, MapMarker} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const map = root.createComponent(
+ Map,
+ {
+ apiKey: 'YOUR_API_KEY',
+ accessibilityLabel: 'Map',
+ latitude: -28.024,
+ longitude: 140.887,
+ zoom: 4,
+ },
+ [
+ root.createComponent(MapMarker, {
+ latitude: -28.024,
+ longitude: 140.887,
+ accessibilityLabel: 'Map marker for Innamincka, Australia',
+ }),
+ ],
+ );
+
+ root.appendChild(map);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/MapPopover.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/MapPopover.doc.ts
new file mode 100644
index 0000000000..3609a287df
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/MapPopover.doc.ts
@@ -0,0 +1,62 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'MapPopover',
+ description:
+ 'MapPopover provides additional information or context about a specific location or point of interest on a map.',
+ requires: '',
+ thumbnail: 'mappopover-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'MapPopoverProps',
+ description: '',
+ type: 'MapPopoverProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'mappopover-default.png',
+ codeblock: {
+ title: 'Basic MapPopover',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-mappopover.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent: `- Use to display relevant details such as the name, address, description, or other pertinent information related to the location.\n\n- Ensure that the content displayed in the map popover is brief, relevant, and easy to understand.\n\n- Maintain visual consistency with the overall design of the checkout. `,
+ },
+ ],
+ related: [
+ {
+ name: 'Map',
+ subtitle: 'Component',
+ url: 'map',
+ type: 'Component',
+ },
+ {
+ name: 'MapMarker',
+ subtitle: 'Component',
+ url: 'mapmarker',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.ts
new file mode 100644
index 0000000000..42f238effb
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/MapPopover/examples/basic-mappopover.example.ts
@@ -0,0 +1,36 @@
+import {
+ extension,
+ Map,
+ MapMarker,
+ MapPopover,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const popoverFragment = root.createFragment();
+ const popover = root.createComponent(
+ MapPopover,
+ {},
+ 'Blue Mountains National Park store',
+ );
+ popoverFragment.appendChild(popover);
+ const map = root.createComponent(
+ Map,
+ {
+ apiKey: 'YOUR_API_KEY',
+ accessibilityLabel: 'Map',
+ latitude: -28.024,
+ longitude: 140.887,
+ zoom: 4,
+ },
+ [
+ root.createComponent(MapMarker, {
+ latitude: -28.024,
+ longitude: 140.887,
+ accessibilityLabel: 'Map marker for Innamincka, Australia',
+ overlay: popoverFragment,
+ }),
+ ],
+ );
+
+ root.appendChild(map);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Menu/Menu.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Menu/Menu.doc.ts
index 09a2356db4..2a3be1108e 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/Menu/Menu.doc.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Menu/Menu.doc.ts
@@ -22,7 +22,8 @@ const data: ReferenceEntityTemplateSchema = {
type: 'Docs_Menu_Button_Action',
},
],
- category: 'components',
+ category: 'UI components',
+ subCategory: 'Actions',
defaultExample: {
image: 'menu-default.png',
altText: 'An example of a Menu with three actions.',
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Modal/Modal.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Modal/Modal.doc.ts
new file mode 100644
index 0000000000..116c5b01d8
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Modal/Modal.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Modal',
+ description:
+ 'Modals are a special type of overlay that shift focus towards a specific action/set of information before the main flow can proceed. They must be specified inside the `overlay` prop of an activator component (`Button`, `Link` or `Pressable`).\n\nThe library automatically applies the [WAI-ARIA Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) to both the activator and the modal content.',
+ requires: '',
+ thumbnail: 'modal-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ModalProps',
+ description: '',
+ type: 'ModalProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Overlays',
+ defaultExample: {
+ image: 'modal-default.png',
+ codeblock: {
+ title: 'Basic Modal',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-modal.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ 'Use modals if:\n\n- The information needed to be shown is not critical in completing the checkout process and information cannot be condensed into one sentence.\n\n- The information the buyer is entering requires less than two rows of input fields.\n\n- The information the buyer is entering is not reliant on information on the page (which is underneath the modal and not visible to them).',
+ },
+ ],
+ related: [
+ {
+ name: 'Ui',
+ subtitle: 'API',
+ url: 'ui',
+ type: 'API',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.ts
new file mode 100644
index 0000000000..9074774ff1
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Modal/examples/basic-modal.example.ts
@@ -0,0 +1,44 @@
+import {
+ extension,
+ Button,
+ Link,
+ Modal,
+ TextBlock,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root, {ui}) => {
+ const modalFragment = root.createFragment();
+ const modal = root.createComponent(
+ Modal,
+ {id: 'my-modal', title: 'Return policy', padding: true},
+ [
+ root.createComponent(
+ TextBlock,
+ undefined,
+ 'We have a 30-day return policy, which means you have 30 days after receiving your item to request a return.',
+ ),
+ root.createComponent(
+ TextBlock,
+ undefined,
+ '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.',
+ ),
+ root.createComponent(
+ Button,
+ {
+ onPress() {
+ ui.overlay.close('my-modal');
+ },
+ },
+ 'Close',
+ ),
+ ],
+ );
+ modalFragment.appendChild(modal);
+ const link = root.createComponent(
+ Link,
+ {overlay: modalFragment},
+ 'Return policy',
+ );
+
+ root.appendChild(link);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Page/Page.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Page/Page.doc.ts
index 1a82081f62..a56964b358 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/Page/Page.doc.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Page/Page.doc.ts
@@ -27,7 +27,8 @@ const data: ReferenceEntityTemplateSchema = {
type: 'Docs_Page_Button_SecondaryAction',
},
],
- category: 'components',
+ category: 'UI components',
+ subCategory: 'Layout and structure',
defaultExample: {
image: 'page-preview.png',
altText:
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/PaymentIcon.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/PaymentIcon.doc.ts
new file mode 100644
index 0000000000..61125c6c24
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/PaymentIcon.doc.ts
@@ -0,0 +1,55 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'PaymentIcon',
+ description:
+ 'Payment icons can be used for displaying payment-related information or features such as a user’s saved or available payment methods.',
+ thumbnail: 'paymenticon-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'PaymentIconProps',
+ description: '',
+ type: 'PaymentIconProps',
+ },
+ {
+ title: 'PaymentMethod',
+ description: '',
+ type: 'PaymentMethod',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'paymenticon-default.png',
+ codeblock: {
+ title: 'Basic PaymentIcon',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-paymenticon.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Maintain the interior appearance of the SVG. The branded portion of the payment icon as provided meets the brand guidelines of the payment provider.\n\n- Maintain the border property of the payment icon. It is designed to adapt to merchant branding in Checkout and ensures a consistent appearance across the customer experience.\n\n- The icon size is designed to be displayed consistently across checkout.',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.ts
new file mode 100644
index 0000000000..2643bdfee8
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/PaymentIcon/examples/basic-paymenticon.example.ts
@@ -0,0 +1,7 @@
+import {extension, PaymentIcon} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const paymentIcon = root.createComponent(PaymentIcon, {name: 'shop-pay'});
+
+ root.appendChild(paymentIcon);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/PhoneField.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/PhoneField.doc.ts
new file mode 100644
index 0000000000..b6b1b21c41
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/PhoneField.doc.ts
@@ -0,0 +1,41 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'PhoneField',
+ description:
+ 'A PhoneField is an input field that merchants can type into optimized for phone numbers with a country code base auto-formatting. The country code is required for the initial render of the field but it can be overriden later by the user either by selecting a country in the country selection dropdown or by manually editing the country phone code directly in the text field.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'phonefield-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'PhoneFieldProps',
+ description: '',
+ type: 'PhoneFieldProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'phonefield-default.png',
+ codeblock: {
+ title: 'Basic PhoneField',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-phonefield.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.ts
new file mode 100644
index 0000000000..6ac80d2c21
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/PhoneField/examples/basic-phonefield.example.ts
@@ -0,0 +1,10 @@
+import {extension, PhoneField} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const phoneField = root.createComponent(PhoneField, {
+ label: 'Phone',
+ value: '1 (555) 555-5555',
+ });
+
+ root.appendChild(phoneField);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Popover/Popover.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Popover/Popover.doc.ts
new file mode 100644
index 0000000000..cc74332c28
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Popover/Popover.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Popover',
+ description:
+ 'Popovers are similar to tooltips. They are small overlays that open on demand after a user interaction. The difference is that the popover can contain more content, without cluttering the page. They must be specified inside the `overlay` prop of an activator component (`Button`, `Link` or `Pressable`).\n\nThe library automatically applies the WAI-ARIA Popover Widget pattern to both the activator and the popover content.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'popover-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'PopoverProps',
+ description: '',
+ type: 'PopoverProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Overlays',
+ defaultExample: {
+ image: 'popover-default.png',
+ codeblock: {
+ title: 'Basic Popover',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-popover.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ 'Use popovers if:\n\n- The intent is to ask the customer for information.\n\n- It’s possible to use at most two rows of input fields to get the information.',
+ },
+ ],
+ related: [
+ {
+ name: 'Ui',
+ subtitle: 'API',
+ url: 'ui',
+ type: 'API',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.ts
new file mode 100644
index 0000000000..cb4657fbab
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Popover/examples/basic-popover.example.ts
@@ -0,0 +1,30 @@
+import {
+ extension,
+ Pressable,
+ Popover,
+ View,
+ TextBlock,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const popoverFragment = root.createFragment();
+ const popover = root.createComponent(Popover, {}, [
+ root.createComponent(View, {maxInlineSize: 200, padding: 'base'}, [
+ root.createComponent(TextBlock, {}, 'A thoughtful way to pay'),
+ root.createComponent(TextBlock, {}, 'Tap don’t type'),
+ root.createComponent(
+ TextBlock,
+ {},
+ 'Shop Pay remembers your important details, so you can fill carts, not forms. And everything is encrypted so you can speed safely through checkout.',
+ ),
+ ]),
+ ]);
+ popoverFragment.appendChild(popover);
+ const pressable = root.createComponent(
+ Pressable,
+ {overlay: popoverFragment},
+ 'More info',
+ );
+
+ root.appendChild(pressable);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/Pressable.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/Pressable.doc.ts
new file mode 100644
index 0000000000..54921145fe
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/Pressable.doc.ts
@@ -0,0 +1,48 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Pressable',
+ description:
+ 'Pressable is a generic interactive component. It shares the same styling properties as View but also adds pressable behavior, meaning that you can execute some logic in response to user interaction. Use this component for creating interactive elements without the default styling that comes with `Button` and `Link`.',
+ requires: '',
+ thumbnail: 'pressable-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'PressableProps',
+ description: '',
+ type: 'PressableProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Actions',
+ defaultExample: {
+ image: 'pressable-default.png',
+ codeblock: {
+ title: 'Basic Pressable',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-pressable.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [
+ {
+ subtitle: 'Utility',
+ name: 'StyleHelper',
+ url: '/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper',
+ type: 'utility',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.ts
new file mode 100644
index 0000000000..8f99d2017a
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Pressable/examples/basic-pressable.example.ts
@@ -0,0 +1,27 @@
+import {
+ extension,
+ Icon,
+ InlineLayout,
+ Pressable,
+ Text,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const pressable = root.createComponent(
+ Pressable,
+ {
+ border: 'base',
+ cornerRadius: 'base',
+ padding: 'base',
+ onPress: () => console.log('onPress event'),
+ },
+ [
+ root.createComponent(InlineLayout, {columns: ['fill', 'auto']}, [
+ root.createComponent(Text, {}, 'Details'),
+ root.createComponent(Icon, {source: 'chevronDown', size: 'small'}),
+ ]),
+ ],
+ );
+
+ root.appendChild(pressable);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/ProductThumbnail.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/ProductThumbnail.doc.ts
new file mode 100644
index 0000000000..2b3a13fa66
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/ProductThumbnail.doc.ts
@@ -0,0 +1,50 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'ProductThumbnail',
+ description:
+ 'Product thumbnail is a representation of a product image. It provides a visual preview of the item, so buyers can quickly identify products.',
+ thumbnail: 'productthumbnail-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ProductThumbnailProps',
+ description: '',
+ type: 'ProductThumbnailProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'productthumbnail-default.png',
+ codeblock: {
+ title: 'Basic ProductThumbnail',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-productthumbnail.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '**High-quality images and consistent aspect ratio**\n\n- Use optimized product images that ensure visual clarity and loading speed. Maintain a consistent aspect ratio for product thumbnails to avoid distortion or stretching of the images.\n\n**Consistent visual style and appropriate sizes**\n\n- Keep a consistent visual style for product thumbnails throughout your store. Use appropriate size for product thumbnails depending on the layout and use case. This consistency helps buyers recognize and associate the thumbnails with your product offerings.\n\n**Accessibility considerations**\n\n- Ensure product thumbnails are accessible with descriptive alternative text (alt text).',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.ts
new file mode 100644
index 0000000000..72007cab4b
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ProductThumbnail/examples/basic-productthumbnail.example.ts
@@ -0,0 +1,11 @@
+import {extension, ProductThumbnail} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const paymentIcon = root.createComponent(ProductThumbnail, {
+ source:
+ 'https://shopify.dev/assets/api/checkout-extensions/checkout/components/product-thumbnail-example-code.png',
+ badge: 2,
+ });
+
+ root.appendChild(paymentIcon);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Progress/Progress.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Progress/Progress.doc.ts
new file mode 100644
index 0000000000..e8e1f41d43
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Progress/Progress.doc.ts
@@ -0,0 +1,89 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Progress',
+ description: 'Use to visually represent the completion of a task or process.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'progress-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'ProgressProps',
+ description: '',
+ type: 'ProgressProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Feedback and status indicators',
+ defaultExample: {
+ image: 'progress-indeterminate.gif',
+ codeblock: {
+ title: 'Indeterminate state',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-progress.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent: `
+Use components like [TextBlock](../titles-and-text/textblock) or [Text](../titles-and-text/text), along with the Progress component, to display text indicating the status of the progress bar.
+
+### Loading states
+
+For loading states, add text to reassure the user that the progress bar is not frozen.
+
+
+
+### Error states
+
+For error states, add text or a [Banner](./banner) to describe the error and next steps. Use the \`critical\` tone property to convey urgency.
+
+
+
+### Visualize a goal
+
+Use the Progress component to visualize a goal that's valuable to the customer.
+
+Here's an example of using a progress bar to show a customer's progress toward the next rewards tier:
+
+
+
+Here's an example of using a progress bar to show how much more a customer needs to spend to get free shipping:
+
+
+ `,
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [
+ getExample('ui-components/progress-determinate-state', ['jsx', 'js']),
+ ],
+ },
+ related: [
+ {
+ name: 'Spinner',
+ subtitle: 'Component',
+ url: 'spinner',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.ts
new file mode 100644
index 0000000000..28c38d7604
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Progress/examples/basic-progress.example.ts
@@ -0,0 +1,9 @@
+import {extension, Progress} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const baseProgress = root.createComponent(Progress, {
+ accessibilityLabel: 'Loading',
+ });
+
+ root.appendChild(baseProgress);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/QRCode.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/QRCode.doc.ts
new file mode 100644
index 0000000000..9a3dcb5b4a
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/QRCode.doc.ts
@@ -0,0 +1,71 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'QRCode',
+ description: 'Used to quickly access scannable data.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'qrcode-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'QRCodeProps',
+ description: '',
+ type: 'QRCodeProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'qrcode-default.png',
+ codeblock: {
+ title: 'Basic QR Code',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-qrcode.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent: `
+- Always test that the QR code is scannable from a smartphone.
+- Include a square logo if that’s what your customers are familiar with.
+- Increase usability by adding a text description of what the QR code does.
+- Always provide an alternate method for customers to access the content of the QR code.
+ - If the content is a URL, provide a [\`Link\`](/docs/api/checkout-ui-extensions/components/link) nearby.
+ - If the content is data, provide a [\`Button\`](/docs/api/checkout-ui-extensions/components/button) to copy the data to the clipboard, or show the data in a readonly [\`TextField\`](/docs/api/checkout-ui-extensions/components/textfield).`,
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [
+ getExample('ui-components/qrcode-image', ['jsx', 'js']),
+ getExample('ui-components/qrcode-fill-size', ['jsx', 'js']),
+ getExample('ui-components/clipboarditem-qrcode', ['jsx', 'js']),
+ ],
+ },
+ related: [
+ {
+ name: 'ClipboardItem',
+ subtitle: 'Component',
+ url: 'clipboarditem',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.ts
new file mode 100644
index 0000000000..ac2268fb94
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/QRCode/examples/basic-qrcode.example.ts
@@ -0,0 +1,20 @@
+import {
+ extension,
+ Link,
+ QRCode,
+ TextBlock,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const qrCode = root.createComponent(QRCode, {
+ content: 'https://shopify.com',
+ });
+
+ const textBlock = root.createComponent(TextBlock, null, [
+ 'Scan to visit ',
+ root.createComponent(Link, {to: 'https://shopify.com'}, 'Shopify.com'),
+ ]);
+
+ root.appendChild(qrCode);
+ root.appendChild(textBlock);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ResourceItem/ResourceItem.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ResourceItem/ResourceItem.doc.ts
index 304a1632cc..e6ed951833 100644
--- a/packages/ui-extensions/src/surfaces/customer-account/components/ResourceItem/ResourceItem.doc.ts
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ResourceItem/ResourceItem.doc.ts
@@ -21,7 +21,8 @@ const data: ReferenceEntityTemplateSchema = {
type: 'Docs_ResourceItem_Button_Action',
},
],
- category: 'components',
+ category: 'UI components',
+ subCategory: 'Actions',
defaultExample: {
image: 'resourceitem-preview.png',
altText:
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/ScrollView.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/ScrollView.doc.ts
new file mode 100644
index 0000000000..d6d18b96bd
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/ScrollView.doc.ts
@@ -0,0 +1,48 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'ScrollView',
+ description:
+ 'ScrollView is a container for long form content, such as order summary line items, that allows for scrolling so customers can expose more content as they view.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'scrollview-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'ScrollViewProps',
+ description: '',
+ type: 'ScrollViewProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'scrollview-default.png',
+ codeblock: {
+ title: 'Basic Scrollview',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-scrollview.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [
+ {
+ subtitle: 'Utility',
+ name: 'StyleHelper',
+ url: '/docs/api/checkout-ui-extensions/unstable/components/utilities/stylehelper',
+ type: 'utility',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.ts
new file mode 100644
index 0000000000..98c4b61c4c
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ScrollView/examples/basic-scrollview.example.ts
@@ -0,0 +1,38 @@
+import {extension, ScrollView, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const scrollView = root.createComponent(ScrollView, {maxBlockSize: 400}, [
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ root.createComponent(
+ View,
+ {border: 'base', padding: 'base', minBlockSize: 50},
+ 'View',
+ ),
+ ]);
+
+ root.appendChild(scrollView);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Select/Select.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Select/Select.doc.ts
new file mode 100644
index 0000000000..d341d9df54
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Select/Select.doc.ts
@@ -0,0 +1,76 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Select',
+ description:
+ 'Selects let buyers choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.',
+ requires: '',
+ thumbnail: 'select-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'SelectProps',
+ description: '',
+ type: 'SelectProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'select-default.png',
+ codeblock: {
+ title: 'Basic Select',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Select/examples/basic-select.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-select.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Use this component when customers need to choose between four or more predefined options.\n\n- Have a default option selected whenever possible. Use Select as placeholder text if there’s no logical default option.',
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [
+ {
+ image: 'select-time-picking.png',
+ description:
+ 'The Select component is a great choice for displaying a long list of time choices, as it helps conserve valuable space. If the number of options is less than or equal to 5, we recommend using the [ChoiceList](/docs/api/checkout-ui-extensions/components/forms/choicelist) component. This allows buyers to see all options immediately without the need for clicking into the select.',
+ codeblock: {
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/time-picking-select.example.ts',
+ language: 'js',
+ },
+ ],
+ title:
+ 'Using the Select component to display a long list of time choices',
+ },
+ },
+ ],
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/basic-select.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/basic-select.example.ts
new file mode 100644
index 0000000000..8efc62a811
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/basic-select.example.ts
@@ -0,0 +1,36 @@
+import {extension, Select} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const select = root.createComponent(Select, {
+ label: 'Country',
+ value: '2',
+ options: [
+ {
+ value: '1',
+ label: 'Australia',
+ },
+ {
+ value: '2',
+ label: 'Canada',
+ },
+ {
+ value: '3',
+ label: 'France',
+ },
+ {
+ value: '4',
+ label: 'Japan',
+ },
+ {
+ value: '5',
+ label: 'Nigeria',
+ },
+ {
+ value: '6',
+ label: 'United States',
+ },
+ ],
+ });
+
+ root.appendChild(select);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.ts
new file mode 100644
index 0000000000..9dffa4107a
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Select/examples/time-picking-select.example.ts
@@ -0,0 +1,36 @@
+import {extension, Select} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const select = root.createComponent(Select, {
+ label: 'Pickup time',
+ value: '1',
+ options: [
+ {
+ value: '1',
+ label: '9:00 AM',
+ },
+ {
+ value: '2',
+ label: '9:30 AM',
+ },
+ {
+ value: '3',
+ label: '10:00 AM',
+ },
+ {
+ value: '4',
+ label: '10:30 AM',
+ },
+ {
+ value: '5',
+ label: '11:00 AM',
+ },
+ {
+ value: '6',
+ label: '11:30 AM',
+ },
+ ],
+ });
+
+ root.appendChild(select);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/Sheet.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/Sheet.doc.ts
new file mode 100644
index 0000000000..a5e4c5338f
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/Sheet.doc.ts
@@ -0,0 +1,76 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Sheet',
+ description:
+ 'The Sheet component displays essential information for customers at the bottom of the screen, appearing above other elements. Use it sparingly to avoid distracting customers during checkout. This component requires access to [Customer Privacy API](/docs/api/checkout-ui-extensions/unstable/configuration#collect-buyer-consent) to be rendered. \n\nThe library automatically applies the [WAI-ARIA Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) to both the activator and the sheet content.',
+ requires:
+ 'configuration of the [Customer Privacy](/docs/api/checkout-ui-extensions/unstable/configuration#collect-buyer-consent) capability to be rendered.',
+ thumbnail: 'sheet-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'SheetProps',
+ description: '',
+ type: 'SheetProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Overlays',
+ defaultExample: {
+ image: 'sheet-default.png',
+ codeblock: {
+ title: 'Basic Sheet',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-sheet.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'shopify-controlled-surfaces',
+ title: 'Shopify-controlled surfaces',
+ sectionContent:
+ 'To prevent disruptions during checkout, we maintain strict design control over key areas of the Sheet component. These Shopify-controlled elements include: \n\n
\n\n
\n\n
\n\n
\n\n
\n\nWhen content pushes the sheet to exceed this limit, the following UI behaviors are triggered:\n\n
\n\n
\n\n
',
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'privacy-consent-requirements',
+ title: 'Privacy consent requirements',
+ sectionContent:
+ '
\n\nVarious strategies can be employed to avoid content scrolling.\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
\n\n
',
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [
+ getExample('ui-components/sheet-consent', ['jsx', 'js']),
+ getExample('ui-components/sheet-description-preferences', ['jsx', 'js']),
+ getExample('ui-components/sheet-icon-button-preferences', ['jsx', 'js']),
+ getExample('ui-components/sheet-layout-content', ['jsx', 'js']),
+ ],
+ },
+ related: [
+ {
+ name: 'Ui',
+ subtitle: 'API',
+ url: 'ui',
+ type: 'API',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.ts
new file mode 100644
index 0000000000..be863e0d13
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Sheet/examples/basic-sheet.example.ts
@@ -0,0 +1,29 @@
+import {
+ extension,
+ Link,
+ Sheet,
+ TextBlock,
+} from '@shopify/ui-extensions/customer-account';
+
+// This component requires access to Customer Privacy API to be rendered.
+
+export default extension('customer-account.page.render', (root) => {
+ const sheetFragment = root.createFragment();
+ const sheet = root.createComponent(
+ Sheet,
+ {
+ id: 'basic-sheet',
+ heading: 'Basic Sheet',
+ accessibilityLabel: 'A sheet with text content',
+ },
+ [root.createComponent(TextBlock, undefined, 'Basic Sheet Content')],
+ );
+ sheetFragment.appendChild(sheet);
+ const link = root.createComponent(
+ Link,
+ {overlay: sheetFragment},
+ 'Open sheet',
+ );
+
+ root.appendChild(link);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/SkeletonImage.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/SkeletonImage.doc.ts
new file mode 100644
index 0000000000..720e684789
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/SkeletonImage.doc.ts
@@ -0,0 +1,52 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const loadingSkeletons = getExample('ui-components/loading-skeletons', [
+ 'jsx',
+ 'js',
+]);
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'SkeletonImage',
+ description:
+ 'SkeletonImage is used to provide a low fidelity representation of an image before it appears on the page.',
+ requires: '',
+ thumbnail: 'skeletonimage-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'SkeletonImageProps',
+ description: '',
+ type: 'SkeletonImageProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Media and visuals',
+ defaultExample: {
+ image: 'skeletonimage-default.png',
+ codeblock: {
+ title: 'Basic SkeletonImage',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-skeletonimage.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ examples: {
+ description: '',
+ examples: [loadingSkeletons],
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.ts
new file mode 100644
index 0000000000..f5536f764b
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonImage/examples/basic-skeletonimage.example.ts
@@ -0,0 +1,10 @@
+import {extension, SkeletonImage} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const skeletonImage = root.createComponent(SkeletonImage, {
+ inlineSize: 300,
+ blockSize: 300,
+ });
+
+ root.appendChild(skeletonImage);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/SkeletonText.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/SkeletonText.doc.ts
new file mode 100644
index 0000000000..4e66ec7738
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/SkeletonText.doc.ts
@@ -0,0 +1,52 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const loadingSkeletons = getExample('ui-components/loading-skeletons', [
+ 'jsx',
+ 'js',
+]);
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'SkeletonText',
+ description:
+ 'SkeletonText is used to provide a low fidelity representation of text content before it appears on the page. \n\nOptionally you can use any text content inside `SkeletonText` to be used as a base for the rendered skeleton',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'skeletontext-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'SkeletonTextProps',
+ description: '',
+ type: 'SkeletonTextProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'skeletontext-default.png',
+ codeblock: {
+ title: 'Basic SkeletonText',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-skeletontext.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ examples: {
+ description: '',
+ examples: [loadingSkeletons],
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.ts
new file mode 100644
index 0000000000..e43cddcad6
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonText/examples/basic-skeletontext.example.ts
@@ -0,0 +1,7 @@
+import {extension, SkeletonText} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const skeletonText = root.createComponent(SkeletonText);
+
+ root.appendChild(skeletonText);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/SkeletonTextBlock.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/SkeletonTextBlock.doc.ts
new file mode 100644
index 0000000000..506885a27f
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/SkeletonTextBlock.doc.ts
@@ -0,0 +1,41 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'SkeletonTextBlock',
+ description:
+ 'SkeletonTextBlock is used to provide a low fidelity representation of a block of text before it appears on the page. \n\nOptionally you can use any text content inside `SkeletonTextBlock` to be used as a base for the rendered skeleton',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'skeletontextblock-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'SkeletonTextBlockProps',
+ description: '',
+ type: 'SkeletonTextBlockProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'skeletontextblock-default.png',
+ codeblock: {
+ title: 'Basic SkeletonTextBlock',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-skeletontextblock.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts
new file mode 100644
index 0000000000..ec1563a888
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/SkeletonTextBlock/examples/basic-skeletontextblock.example.ts
@@ -0,0 +1,7 @@
+import {extension, SkeletonTextBlock} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const skeletonTextBlock = root.createComponent(SkeletonTextBlock);
+
+ root.appendChild(skeletonTextBlock);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/Spinner.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/Spinner.doc.ts
new file mode 100644
index 0000000000..3502132375
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/Spinner.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Spinner',
+ description:
+ 'Spinner is used to notify buyers that their action is being processed. The Spinner is usually used when sending or receiving data from a server.',
+ requires: '',
+ thumbnail: 'spinner-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'SpinnerProps',
+ description: '',
+ type: 'SpinnerProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Feedback and status indicators',
+ defaultExample: {
+ image: 'spinner-default.png',
+ codeblock: {
+ title: 'Basic Spinner',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-spinner.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'appearance',
+ title: 'Appearance',
+ sectionContent:
+ '| Value | Description |\n| --- | --- |\n| "accent" | Conveys emphasis and draws attention to the element. |\n| "monochrome" | Takes the color of its parent.|',
+ },
+ ],
+ related: [
+ {
+ name: 'Progress',
+ subtitle: 'Component',
+ url: 'progress',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.ts
new file mode 100644
index 0000000000..6c28a6168f
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Spinner/examples/basic-spinner.example.ts
@@ -0,0 +1,7 @@
+import {extension, Spinner} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const spinner = root.createComponent(Spinner);
+
+ root.appendChild(spinner);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/Stepper.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/Stepper.doc.ts
new file mode 100644
index 0000000000..1bdfa74dcd
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/Stepper.doc.ts
@@ -0,0 +1,50 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Stepper',
+ description:
+ 'Use a stepper to increase or decrease a value, like changing the quantity from 1 to 2.',
+ requires: '',
+ thumbnail: 'stepper-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'StepperProps',
+ description: '',
+ type: 'StepperProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'stepper-default.png',
+ codeblock: {
+ title: 'Basic Stepper',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-stepper.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Use this component when customers are likely to choose a number within a small range, such as when changing a quantity from one to three.\n\n- If there’s no default number, then consider choosing another component such as a TextField or Select.',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.ts
new file mode 100644
index 0000000000..e38824e127
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Stepper/examples/basic-stepper.example.ts
@@ -0,0 +1,10 @@
+import {extension, Stepper} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const stepper = root.createComponent(Stepper, {
+ label: 'Quantity',
+ value: 1,
+ });
+
+ root.appendChild(stepper);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Switch/Switch.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Switch/Switch.doc.ts
new file mode 100644
index 0000000000..ea89f2c1d0
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Switch/Switch.doc.ts
@@ -0,0 +1,80 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Switch',
+ description:
+ 'Use a switch to represent an on or off state that takes effect immediately when tapped.',
+ requires: '',
+ isVisualComponent: true,
+ thumbnail: 'switch-thumbnail.png',
+ type: '',
+ definitions: [
+ {
+ title: 'SwitchProps',
+ description: '',
+ type: 'SwitchProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'switch-default.png',
+ codeblock: {
+ title: 'Basic Switch',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-switch.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent: `
+- The outcome of a switch should take effect immediately when tapped.
+- Use for independent settings, like turning on a stand-alone feature.
+- Most of the time no call-to-action should be needed as the switch should take effect immediately, but if the experience needs one, use “done” instead of “submit” or “apply”.
+
+### Content
+The label should be a noun. Try explaining the setting out loud to test the name. The name should make sense when you insert it into these statements:
+
+- You can turn [setting_label] on or off in settings.
+- [setting_label] is on.
+- [setting_label] is off.
+
+### Switch vs checkbox
+- If the experience requires multiple connected inputs, like a survey, use a checkbox instead of a switch.
+- If the experience requires an error state, like agreeing to terms and conditions, use a checkbox instead of a switch. Both on and off options for a switch should always be valid.
+- If you’re unsure, default to a checkbox as it’s the more familiar web pattern.
+
+
+ `,
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [getExample('ui-components/switch-custom-label', ['jsx', 'js'])],
+ },
+ related: [
+ {
+ name: 'Checkbox',
+ subtitle: 'Component',
+ url: 'checkbox',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.ts
new file mode 100644
index 0000000000..79f1e23b09
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Switch/examples/basic-switch.example.ts
@@ -0,0 +1,9 @@
+import {extension, Switch} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const baseSwitch = root.createComponent(Switch, {
+ accessibilityLabel: 'my-switch',
+ });
+
+ root.appendChild(baseSwitch);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Tag/Tag.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Tag/Tag.doc.ts
new file mode 100644
index 0000000000..88e7b51547
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Tag/Tag.doc.ts
@@ -0,0 +1,41 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Tag',
+ description:
+ 'A Tag is used to help label, organize or categorize objects. It is commonly used in Checkout to display the discounts applied to a cart.',
+ requires: '',
+ thumbnail: 'tag-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'TagProps',
+ description: '',
+ type: 'TagProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'tag-default.png',
+ codeblock: {
+ title: 'Basic Tag',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-tag.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.ts
new file mode 100644
index 0000000000..4f2dbd21dc
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Tag/examples/basic-tag.example.ts
@@ -0,0 +1,7 @@
+import {extension, Tag} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const tag = root.createComponent(Tag, {icon: 'discount'}, 'SPRING');
+
+ root.appendChild(tag);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Text/Text.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Text/Text.doc.ts
new file mode 100644
index 0000000000..1b1b41f099
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Text/Text.doc.ts
@@ -0,0 +1,76 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Text',
+ description:
+ 'Text is used to visually style and provide semantic value for a small piece of text content.',
+ requires: '',
+ thumbnail: 'text-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'TextProps',
+ description: '',
+ type: 'TextProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'text-default.png',
+ codeblock: {
+ title: 'Basic Text',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Text/examples/basic-text.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-text.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'appearance',
+ title: 'Appearance',
+ sectionContent:
+ '| Value | Description |\n| --- | --- |\n| "accent" | Conveys emphasis and draws attention to the element. |\n| "subdued" | Conveys a subdued or disabled state for the element. |\n| "info" | Conveys that the element is informative or has information. |\n| "success" | Convey a successful interaction. |\n| "warning" | Convey something needs attention or an action needs to be taken. |\n| "critical" | Conveys a problem has arisen. |',
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Use larger text to emphasize content that’s not a heading, such as a price total.\n\n- Create contrast between more and less important text with properties such as `size` and `subdued`.',
+ },
+ ],
+ related: [
+ {
+ name: 'Heading',
+ subtitle: 'Component',
+ url: 'heading',
+ type: 'Component',
+ },
+ {
+ name: 'HeadingGroup',
+ subtitle: 'Component',
+ url: 'headinggroup',
+ type: 'Component',
+ },
+ {
+ name: 'TextBlock',
+ subtitle: 'Component',
+ url: 'textblock',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Text/examples/basic-text.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Text/examples/basic-text.example.ts
new file mode 100644
index 0000000000..63a0a65717
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Text/examples/basic-text.example.ts
@@ -0,0 +1,14 @@
+import {extension, Text, BlockStack} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const text = root.createComponent(BlockStack, undefined, [
+ root.createComponent(Text, {size: 'extraSmall'}, 'Total'),
+ root.createComponent(Text, {size: 'small'}, 'Total'),
+ root.createComponent(Text, {size: 'base'}, 'Total'),
+ root.createComponent(Text, {size: 'medium'}, 'Total'),
+ root.createComponent(Text, {size: 'large'}, 'Total'),
+ root.createComponent(Text, {size: 'extraLarge'}, 'Total'),
+ ]);
+
+ root.appendChild(text);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/TextBlock.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/TextBlock.doc.ts
new file mode 100644
index 0000000000..ec33c46a27
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/TextBlock.doc.ts
@@ -0,0 +1,76 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'TextBlock',
+ description:
+ 'Text block is used to render a block of text that occupies the full width available, like a paragraph.',
+ requires: '',
+ thumbnail: 'textblock-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'TextBlockProps',
+ description: '',
+ type: 'TextBlockProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Typography and content',
+ defaultExample: {
+ image: 'textblock-default.png',
+ codeblock: {
+ title: 'Basic TextBlock',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-textblock.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'appearance',
+ title: 'Appearance',
+ sectionContent:
+ '| Value | Description |\n| --- | --- |\n| "accent" | Conveys emphasis and draws attention to the element. |\n| "subdued" | Conveys a subdued or disabled state for the element. |\n| "info" | Conveys that the element is informative or has information. |\n| "success" | Convey a successful interaction. |\n| "warning" | Convey something needs attention or an action needs to be taken. |\n| "critical" | Conveys a problem has arisen. |',
+ },
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Create contrast between more and less important text with properties such as `size`, `emphasis`, and `appearance`.',
+ },
+ ],
+ related: [
+ {
+ name: 'Heading',
+ subtitle: 'Component',
+ url: 'heading',
+ type: 'Component',
+ },
+ {
+ name: 'HeadingGroup',
+ subtitle: 'Component',
+ url: 'headinggroup',
+ type: 'Component',
+ },
+ {
+ name: 'Text',
+ subtitle: 'Component',
+ url: 'text',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.ts
new file mode 100644
index 0000000000..ce9438bd24
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/TextBlock/examples/basic-textblock.example.ts
@@ -0,0 +1,22 @@
+import {
+ extension,
+ TextBlock,
+ BlockStack,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const textBlock = root.createComponent(BlockStack, undefined, [
+ root.createComponent(
+ TextBlock,
+ undefined,
+ 'We have a 30-day return policy, which means you have 30 days after receiving your item to request a return.',
+ ),
+ root.createComponent(
+ TextBlock,
+ undefined,
+ '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.',
+ ),
+ ]);
+
+ root.appendChild(textBlock);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/TextField/TextField.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/TextField/TextField.doc.ts
new file mode 100644
index 0000000000..02cd6ce70c
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/TextField/TextField.doc.ts
@@ -0,0 +1,49 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'TextField',
+ description: 'Use a text field to get text input from a customer.',
+ requires: '',
+ thumbnail: 'textfield-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'TextFieldProps',
+ description: '',
+ type: 'TextFieldProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'textfield-default.png',
+ codeblock: {
+ title: 'Basic TextField',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-textfield.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ '- Clearly label text fields so that it’s obvious what customers should enter.\n\n- Label text fields as Optional when input isn’t required. For example, use the label First name (optional).\n\n- Don’t have optional fields pass true to the required property.',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.ts
new file mode 100644
index 0000000000..2b09e28ed1
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/TextField/examples/basic-textfield.example.ts
@@ -0,0 +1,9 @@
+import {extension, TextField} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const textfield = root.createComponent(TextField, {
+ label: 'Last name',
+ });
+
+ root.appendChild(textfield);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/ToggleButton.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/ToggleButton.doc.ts
new file mode 100644
index 0000000000..f021ec6cb3
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/ToggleButton.doc.ts
@@ -0,0 +1,48 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'ToggleButton',
+ description:
+ 'Options inside a [ToggleButtonGroup](/docs/api/checkout-ui-extensions/components/forms/togglebuttongroup).',
+ thumbnail: 'togglebutton-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ToggleButtonProps',
+ description: '',
+ type: 'ToggleButtonProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'togglebutton-default.png',
+ codeblock: {
+ title: 'Basic ToggleButton',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-togglebutton.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ related: [
+ {
+ name: 'ToggleButtonGroup',
+ subtitle: 'Component',
+ url: 'togglebuttongroup',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.ts
new file mode 100644
index 0000000000..7e9a950734
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButton/examples/basic-togglebutton.example.ts
@@ -0,0 +1,20 @@
+import {
+ extension,
+ ToggleButtonGroup,
+ ToggleButton,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const toggleButtonGroup = root.createComponent(
+ ToggleButtonGroup,
+ {
+ value: 'none',
+ onChange: (value) => {
+ console.log(`onChange event with value: ${value}`);
+ },
+ },
+ [root.createComponent(ToggleButton, {id: 'none'}, 'None')],
+ );
+
+ root.appendChild(toggleButtonGroup);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/ToggleButtonGroup.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/ToggleButtonGroup.doc.ts
new file mode 100644
index 0000000000..693e28a72c
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/ToggleButtonGroup.doc.ts
@@ -0,0 +1,80 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+import {getExample} from '../../helper.docs';
+
+const togglebuttongroupTimePicking = getExample(
+ 'ui-components/togglebuttongroup-time-picking',
+ ['jsx', 'js'],
+);
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'ToggleButtonGroup',
+ description:
+ '`ToggleButtonGroup` allows you to make a single choice out of the number of options provided. This is similar to the [ChoiceList](/docs/api/checkout-ui-extensions/components/forms/choicelist) component, but without controls such as checkbox or radio button.\n\nYou can utilize our layout components to arrange `ToggleButtonGroup`.',
+ thumbnail: 'togglebuttongroup-thumbnail.png',
+ requires: '',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ToggleButtonGroupProps',
+ description: '',
+ type: 'ToggleButtonGroupProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Forms',
+ defaultExample: {
+ image: 'togglebuttongroup-default.png',
+ codeblock: {
+ title: 'Basic ToggleButtonGroup',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-togglebuttongroup.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ 'ToggleButtonGroup is a component designed for streamlined single-choice selection, without any additional details associated with the selection. If you need to allow multiple selections or present associated details, it is recommended to use [ChoiceList](/docs/api/checkout-ui-extensions/components/forms/choicelist) instead.',
+ sectionSubContent: [
+ {
+ title: 'Label and order',
+ sectionContent:
+ 'Use descriptive and concise labels for each Toggle button, and maintain consistency in the terminology used across options. Arrange the Toggle buttons in a logical order that makes sense to users. Consider factors such as alphabetical order, chronological order, or order of importance, depending on the context.',
+ },
+ {
+ title: 'Number of Toggle buttons',
+ sectionContent:
+ 'Avoid overwhelming users with too many Toggle buttons. Ideally, limit the number of choices to a manageable amount, typically between 2 and 7, to prevent decision fatigue and maintain clarity.',
+ },
+ ],
+ },
+ ],
+ examples: {
+ description: '',
+ examples: [togglebuttongroupTimePicking],
+ },
+ related: [
+ {
+ name: 'ToggleButton',
+ subtitle: 'Component',
+ url: 'togglebutton',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.ts
new file mode 100644
index 0000000000..94470c5625
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/ToggleButtonGroup/examples/basic-togglebuttongroup.example.ts
@@ -0,0 +1,76 @@
+import {
+ extension,
+ ToggleButtonGroup,
+ ToggleButton,
+ InlineLayout,
+ View,
+ BlockStack,
+ Text,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const toggleButtonGroup = root.createComponent(
+ ToggleButtonGroup,
+ {
+ value: 'none',
+ onChange: (value) => {
+ console.log(`onChange event with value: ${value}`);
+ },
+ },
+ [
+ root.createComponent(InlineLayout, {spacing: 'base'}, [
+ root.createComponent(
+ ToggleButton,
+ {id: 'none'},
+ root.createComponent(
+ View,
+ {
+ blockAlignment: 'center',
+ inlineAlignment: 'center',
+ minBlockSize: 'fill',
+ },
+ 'None',
+ ),
+ ),
+ root.createComponent(
+ ToggleButton,
+ {id: 'points-100'},
+ root.createComponent(
+ BlockStack,
+ {inlineAlignment: 'center', spacing: 'none'},
+ [
+ root.createComponent(Text, undefined, '100'),
+ root.createComponent(Text, {appearance: 'subdued'}, 'points'),
+ ],
+ ),
+ ),
+ root.createComponent(
+ ToggleButton,
+ {id: 'points-200'},
+ root.createComponent(
+ BlockStack,
+ {inlineAlignment: 'center', spacing: 'none'},
+ [
+ root.createComponent(Text, undefined, '200'),
+ root.createComponent(Text, {appearance: 'subdued'}, 'points'),
+ ],
+ ),
+ ),
+ root.createComponent(
+ ToggleButton,
+ {id: 'points-300'},
+ root.createComponent(
+ BlockStack,
+ {inlineAlignment: 'center', spacing: 'none'},
+ [
+ root.createComponent(Text, undefined, '300'),
+ root.createComponent(Text, {appearance: 'subdued'}, 'points'),
+ ],
+ ),
+ ),
+ ]),
+ ],
+ );
+
+ root.appendChild(toggleButtonGroup);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/Tooltip.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/Tooltip.doc.ts
new file mode 100644
index 0000000000..666c006cfb
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/Tooltip.doc.ts
@@ -0,0 +1,50 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'Tooltip',
+ description:
+ 'Tooltips are floating labels that briefly explain the function of a user interface element. They must be specified inside the `overlay` prop of an activator component. Currently, activator components are `Button`, `Link`, and `Pressable`.\n\nThe library automatically applies the [WAI-ARIA Tooltip Widget pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/) to both the activator and the tooltip content. Expect screen readers to read the tooltip content when the user focuses the activator.',
+ requires: '',
+ thumbnail: 'tooltip-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'TooltipProps',
+ description: '',
+ type: 'TooltipProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Overlays',
+ defaultExample: {
+ image: 'tooltip-default.png',
+ codeblock: {
+ title: 'Basic Tooltip',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-tooltip.example.ts',
+ language: 'js',
+ },
+ ],
+ },
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'best-practices',
+ title: 'Best Practices',
+ sectionContent:
+ 'Use tooltips if:\n\n- It’s used for showing information only.\n\n- The information contained in it is not needed by someone to complete their checkout.\n\n- The information can be written in a sentence.',
+ },
+ ],
+ related: [],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.ts
new file mode 100644
index 0000000000..2d0591ad84
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/Tooltip/examples/basic-tooltip.example.ts
@@ -0,0 +1,23 @@
+import {
+ extension,
+ Icon,
+ Pressable,
+ Tooltip,
+} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const tooltipFragment = root.createFragment();
+ const tooltip = root.createComponent(
+ Tooltip,
+ {},
+ 'In case we need to contact you about your order',
+ );
+ tooltipFragment.appendChild(tooltip);
+ const pressable = root.createComponent(
+ Pressable,
+ {overlay: tooltipFragment},
+ [root.createComponent(Icon, {source: 'questionFill'})],
+ );
+
+ root.appendChild(pressable);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/View/View.doc.ts b/packages/ui-extensions/src/surfaces/customer-account/components/View/View.doc.ts
new file mode 100644
index 0000000000..a89b014045
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/View/View.doc.ts
@@ -0,0 +1,57 @@
+import type {ReferenceEntityTemplateSchema} from '@shopify/generate-docs';
+
+const data: ReferenceEntityTemplateSchema = {
+ name: 'View',
+ description:
+ 'View is a generic container component. Its contents will always be their “natural” size, so this component can be useful in layout components (like `Grid`, `BlockStack`, `InlineStack`) that would otherwise stretch their children to fit.',
+ requires: '',
+ thumbnail: 'view-thumbnail.png',
+ isVisualComponent: true,
+ type: '',
+ definitions: [
+ {
+ title: 'ViewProps',
+ description: '',
+ type: 'ViewProps',
+ },
+ ],
+ category: 'UI components',
+ subCategory: 'Layout and structure',
+ defaultExample: {
+ image: 'view-default.png',
+ codeblock: {
+ title: 'Basic View',
+ tabs: [
+ {
+ title: 'React',
+ code: '../../../../../../ui-extensions-react/src/surfaces/customer-account/components/View/examples/basic-view.example.tsx',
+ language: 'tsx',
+ },
+ {
+ title: 'JS',
+ code: './examples/basic-view.example.ts',
+ 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',
+ },
+ ],
+};
+
+export default data;
diff --git a/packages/ui-extensions/src/surfaces/customer-account/components/View/examples/basic-view.example.ts b/packages/ui-extensions/src/surfaces/customer-account/components/View/examples/basic-view.example.ts
new file mode 100644
index 0000000000..9ed27629ff
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/components/View/examples/basic-view.example.ts
@@ -0,0 +1,11 @@
+import {extension, View} from '@shopify/ui-extensions/customer-account';
+
+export default extension('customer-account.page.render', (root) => {
+ const view = root.createComponent(
+ View,
+ {border: 'base', padding: 'base'},
+ 'View',
+ );
+
+ root.appendChild(view);
+});
diff --git a/packages/ui-extensions/src/surfaces/customer-account/helper.docs.ts b/packages/ui-extensions/src/surfaces/customer-account/helper.docs.ts
new file mode 100644
index 0000000000..c17a7e7594
--- /dev/null
+++ b/packages/ui-extensions/src/surfaces/customer-account/helper.docs.ts
@@ -0,0 +1,232 @@
+import type {CodeTabType, ExampleType} from '@shopify/generate-docs';
+
+const examplePath = '../../../../../docs/surfaces/checkout/reference/examples';
+
+type NonEmptyArraysmall breakpoint.",
+ codeblock: {
+ title: 'Default Style With Conditions',
+ tabs: [
+ {
+ title: 'React',
+ code: './examples/defaultstyle.example.tsx',
+ language: 'tsx',
+ },
+ ],
+ },
+ },
+ {
+ description:
+ "Using simple conditional styling enables you to specify a styling change when a condition is met. In this example, the View's padding will be loose on hover.",
+ codeblock: {
+ title: 'Simple Condition',
+ tabs: [
+ {
+ title: 'React',
+ code: './examples/simplecondition.example.tsx',
+ language: 'tsx',
+ },
+ ],
+ },
+ },
+ {
+ description:
+ 'Using the `display` property with conditional styles enables you to hide content for certain viewport sizes. In this example, the View will be hidden on small and above screen sizes.',
+ codeblock: {
+ title: 'Conditionally hiding content',
+ tabs: [
+ {
+ title: 'React',
+ code: './examples/hiding.example.tsx',
+ language: 'tsx',
+ },
+ ],
+ },
+ },
+ ],
+ },
+ subSections: [
+ {
+ type: 'Generic',
+ anchorLink: 'conditions',
+ title: 'Conditions',
+ sectionContent:
+ 'The following conditions are supported for conditional styles.\n\nMultiple conditions can be set on the same `when` method.\n\n \n\n| Name | Type | Description |\n| --- | --- | --- |\n| "hover" | true | This condition is met when an element is hovered on with the cursor (mouse pointer). |\n| "focus" | true | This condition is met when an element is clicked, tapped on or selected using the Tab key.|\n| viewportInlineSize | {min: "small" | "medium" | "large"} | This condition is met when the device matches the minimum width.|',
+ },
+ ],
+ related: [
+ {
+ name: 'BlockLayout',
+ subtitle: 'Component',
+ url: 'blocklayout',
+ type: 'Component',
+ },
+ {
+ name: 'BlockSpacer',
+ subtitle: 'Component',
+ url: 'blockspacer',
+ type: 'Component',
+ },
+ {
+ name: 'BlockStack',
+ subtitle: 'Component',
+ url: 'blockstack',
+ type: 'Component',
+ },
+ {
+ name: 'Grid',
+ subtitle: 'Component',
+ url: 'grid',
+ type: 'Component',
+ },
+ {
+ name: 'GridItem',
+ subtitle: 'Component',
+ url: 'griditem',
+ type: 'Component',
+ },
+ {
+ name: 'Image',
+ subtitle: 'Component',
+ url: 'image',
+ type: 'Component',
+ },
+ {
+ name: 'InlineLayout',
+ subtitle: 'Component',
+ url: 'inlinelayout',
+ type: 'Component',
+ },
+ {
+ name: 'InlineSpacer',
+ subtitle: 'Component',
+ url: 'inlinespacer',
+ type: 'Component',
+ },
+ {
+ name: 'InlineStack',
+ subtitle: 'Component',
+ url: 'inlinestack',
+ type: 'Component',
+ },
+ {
+ name: 'List',
+ subtitle: 'Component',
+ url: 'list',
+ type: 'Component',
+ },
+ {
+ name: 'Pressable',
+ subtitle: 'Component',
+ url: 'pressable',
+ type: 'Component',
+ },
+ {
+ name: 'ScrollView',
+ subtitle: 'Component',
+ url: 'scrollview',
+ type: 'Component',
+ },
+ {
+ name: 'SkeletonImage',
+ subtitle: 'Component',
+ url: 'skeletonimage',
+ type: 'Component',
+ },
+ {
+ name: 'View',
+ subtitle: 'Component',
+ url: 'view',
+ type: 'Component',
+ },
+ ],
+};
+
+export default data;