Skip to content

Commit 2c9a6e7

Browse files
authored
Merge pull request #4287 from Shopify/typography-web-components-2025-07
Update Typography and Content component descriptions (2025-07)
2 parents cc9d56a + 656ae38 commit 2c9a6e7

File tree

19 files changed

+122
-82
lines changed

19 files changed

+122
-82
lines changed

packages/ui-extensions/src/surfaces/checkout/components/Badge/Badge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import type {IconSource} from '../Icon/Icon';
77
* The available tone values for the badge.
88
*
99
* - `default`: General information without specific intent.
10-
* - `subdued`: Reduced visual emphasis for less prominent badges.
1110
* - `critical`: Urgent problems or destructive actions requiring immediate attention.
11+
* - `subdued`: Reduced visual emphasis for less prominent badges.
1212
*/
1313
type Tone = 'default' | 'critical' | 'subdued';
1414

packages/ui-extensions/src/surfaces/checkout/components/Chat/AppBridge.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ interface AppBridge {
2525
/**
2626
* 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)
2727
* with a TTL of 5 minutes. It can be used to ensure that requests came from a Shopify authenticated user.
28-
* See the [ID Token documentation](https://shopify.dev/docs/apps/build/authentication-authorization/session-tokens) for more information.
29-
*
30-
* @see https://shopify.dev/docs/api/checkout-ui-extensions/latest/apis/session-token
31-
* @see https://shopify.dev/docs/apps/build/authentication-authorization/session-tokens
28+
* See the [ID Token documentation](https://shopify.dev/docs/apps/build/authentication-authorization/session-tokens) and the [session token API](https://shopify.dev/docs/api/checkout-ui-extensions/latest/apis/session-token) for more information.
3229
*/
3330
idToken?: () => Promise<string>;
3431

packages/ui-extensions/src/surfaces/checkout/components/Disclosure/Disclosure.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import type {MaybeResponsiveConditionalStyle} from '../../style/types';
44
import type {DisclosureOpen} from '../shared';
55

66
/**
7-
* Disclosure is an optionally controlled component used to put long sections of information under content blocks that users can expand or collapse by pressing an activator. The activator can be specified as children using an action component (`Button`, `Link` or `Pressable`) or a form control (`Checkbox` or `Switch`) component. The content blocks can be specified as children inside a structure component (`View`, `InlineLayout`, `BlockStack`, `Grid`, etc.).
8-
9-
The library automatically applies the [WAI-ARIA Accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) to both the activator and the toggled content.
7+
* Configure the following properties on the disclosure component.
108
* @publicDocs
119
*/
1210
export interface DisclosureProps {
@@ -27,7 +25,7 @@ export interface DisclosureProps {
2725
*/
2826
open?: DisclosureOpen;
2927
/**
30-
* Callback fired when the open state of the disclosure changes.
28+
* A callback fired when the open state of the disclosure changes.
3129
*/
3230
onToggle?(open: string[]): void;
3331
/**

packages/ui-extensions/src/surfaces/checkout/components/DropZone/DropZone.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface DropZoneProps extends IdProps {
4444
*
4545
* If left empty, the dropzone will accept all files.
4646
*
47-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
47+
* Learn more about the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) attribute.
4848
*/
4949
accept?: string;
5050

@@ -64,7 +64,8 @@ export interface DropZoneProps extends IdProps {
6464

6565
/**
6666
* A callback fired when files are dropped or selected.
67-
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event
67+
*
68+
* Learn more about the [`drop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/drop_event) event.
6869
*/
6970
onInput?(files: File[]): void;
7071

packages/ui-extensions/src/surfaces/checkout/components/Heading/Heading.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,32 @@ import type {InlineAlignment, AccessibilityRole} from '../shared';
55
type Level = 1 | 2 | 3 | 4;
66

77
/**
8-
* Headings control the visual style of headings. Use headings to introduce major sections, like Contact information, Shipping address, or Shipping method.
9-
10-
Unlike 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.
8+
* Configure the following properties on the heading component.
119
* @publicDocs
1210
*/
1311
export interface HeadingProps {
1412
/**
15-
* Unique identifier.
13+
* A unique identifier for the component.
1614
* Typically used to make the heading a target that another component
1715
* can refer to in order to provide an alternative accessibility label.
1816
*/
1917
id?: string;
2018
/**
2119
* The visual level of the heading. When not set, the heading will use
22-
* its automatic heading level, which is determined by the level of nesting
20+
* its "automatic" heading level, which is determined by the level of nesting
2321
* within ancestor `HeadingGroup`s. No matter what value you provide here,
2422
* the semantic level (e.g., how the heading contributes to the document outline)
25-
* is determined exclusively by the automatic heading level.
23+
* is determined exclusively by the "automatic" heading level.
2624
*/
2725
level?: Level;
2826
/**
29-
* Sets the semantic meaning of the component’s content. When set,
30-
* the role will be used by assistive technologies to help buyers
31-
* navigate the page.
27+
* Sets the semantic meaning of the heading for assistive technologies. When set, the role overrides the default heading semantics.
28+
*
29+
* - `presentation`: Strips the heading level, preventing the element's implicit ARIA semantics from being exposed to the accessibility tree.
3230
*/
3331
accessibilityRole?: Extract<AccessibilityRole, 'presentation'>;
3432
/**
35-
* Align text along the main axis.
33+
* Aligns the heading text along the inline axis (horizontal in standard writing modes).
3634
*/
3735
inlineAlignment?: InlineAlignment;
3836
}
@@ -41,7 +39,7 @@ export interface HeadingProps {
4139
* Headings control the visual style of headings. Use headings to introduce major
4240
* sections, like Contact information, Shipping address, or Shipping method.
4341
*
44-
* Unlike HTML headings, you dont explicitly specify the position of the heading in the
42+
* Unlike HTML headings, you don't explicitly specify the position of the heading in the
4543
* document outline. Nest headings within the heading group component to control
4644
* the document outline structure used by assistive technologies.
4745
*/

packages/ui-extensions/src/surfaces/checkout/components/HeadingGroup/HeadingGroup.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import {createRemoteComponent} from '@remote-ui/core';
22

33
/**
4-
* Heading group controls the heading level of headings nested within it, like H1, H2, H3.
5-
6-
Use 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.
4+
* Configure the following properties on the heading group component.
75
* @publicDocs
86
*/
97
export interface HeadingGroupProps {}

packages/ui-extensions/src/surfaces/checkout/components/Icon/Icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ export interface IconProps extends IdProps {
102102
*
103103
* - `extraSmall`: The smallest available icon size.
104104
* - `small`: A compact icon size, smaller than the default.
105-
* - `large`: A larger icon for increased visual prominence.
106105
* - `base`: Renders the icon at its standard size.
106+
* - `large`: A larger icon for increased visual prominence.
107107
* - `fill`: Stretches the icon to fill the available space in its
108108
* container while preserving its aspect ratio.
109109
*

packages/ui-extensions/src/surfaces/checkout/components/List/List.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@ import type {MaybeResponsiveConditionalStyle} from '../../style/types';
66
export type Marker = 'none' | 'bullet' | 'number';
77

88
/**
9-
* Lists display a set of related content. Each list item usually begins with a bullet or a number.
9+
* Configure the following properties on the list component.
1010
* @publicDocs
1111
*/
1212
export interface ListProps extends IdProps {
1313
/**
14-
* Adjust spacing between list items
14+
* Adjusts the vertical spacing between list items. Use a design system spacing keyword to control the density of the list.
1515
*
1616
* @defaultValue 'base'
1717
*/
1818
spacing?: MaybeResponsiveConditionalStyle<Spacing>;
1919
/**
20-
* Type of marker to display
20+
* The type of marker displayed before each list item.
21+
*
22+
* - `none`: No marker is displayed.
23+
* - `bullet`: A bullet point marker for unordered lists.
24+
* - `number`: A number marker for ordered lists.
2125
*
2226
* @defaultValue 'bullet'
2327
*/
2428
marker?: Marker;
2529
/**
26-
* A label that describes the purpose or contents of the list. When set,
27-
* it will be announced to buyers using assistive technologies and will
28-
* provide them with more context.
30+
* A label that describes the purpose or contents of the list. When set, it will be announced to users of assistive technologies such as screen readers to provide additional context.
2931
*/
3032
accessibilityLabel?: string;
3133
}

packages/ui-extensions/src/surfaces/checkout/components/ListItem/ListItem.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ import {createRemoteComponent} from '@remote-ui/core';
33
import type {IdProps} from '../shared';
44

55
/**
6-
* List items are used as children of the `List` component.
7-
8-
They usually begins with a bullet or a number.
6+
* Configure the following properties on the list item component.
97
* @publicDocs
108
*/
119
export interface ListItemProps extends IdProps {}
1210

1311
/**
1412
* List items are used as children of the `List` component.
1513
*
16-
* They usually begins with a bullet or a number.
14+
* They usually begin with a bullet or a number.
1715
*/
1816
export const ListItem = createRemoteComponent<'ListItem', ListItemProps>(
1917
'ListItem',

packages/ui-extensions/src/surfaces/checkout/components/ProductThumbnail/ProductThumbnail.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export interface ProductThumbnailProps {
1717
* with the HTML specification. When both are specified,
1818
* `accessibilityLabel` takes precedence.
1919
*
20-
* Learn more about [writing effective alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204).
21-
*
22-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt
20+
* Learn more about [writing effective alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204) and the [`alt`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt) attribute.
2321
*/
2422
alt?: string;
2523

@@ -32,10 +30,9 @@ export interface ProductThumbnailProps {
3230
* HTML specification. When both are specified, `accessibilityLabel`
3331
* takes precedence.
3432
*
35-
* Learn more about [writing effective alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204).
33+
* Learn more about [writing effective alternative text](https://ux.shopify.com/considerations-when-writing-alt-text-a9c1985a8204) and the [`alt`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt) attribute.
3634
*
3735
* @defaultValue `''`
38-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt
3936
*/
4037
accessibilityLabel?: string;
4138

@@ -45,7 +42,7 @@ export interface ProductThumbnailProps {
4542
* A `src` property is available as an alias for this for compatibility with the HTML
4643
* specification. When both are specified, `source` takes precedence.
4744
*
48-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src
45+
* Learn more about the [`src`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src) attribute.
4946
*/
5047
source?: MaybeConditionalStyle<string, ResolutionCondition>;
5148

@@ -55,7 +52,7 @@ export interface ProductThumbnailProps {
5552
* This property is available as an alias for `source` for compatibility with the HTML
5653
* specification. When both are specified, `source` takes precedence.
5754
*
58-
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src
55+
* Learn more about the [`src`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#src) attribute.
5956
*/
6057
src?: MaybeConditionalStyle<string, ResolutionCondition>;
6158

@@ -68,8 +65,8 @@ export interface ProductThumbnailProps {
6865
/**
6966
* The size of the product thumbnail image.
7067
*
71-
* - `small`: A compact thumbnail for tighter layouts.
7268
* - `base`: Renders the thumbnail at its standard size.
69+
* - `small`: A compact thumbnail for tighter layouts.
7370
*
7471
* @defaultValue 'base'
7572
*/

0 commit comments

Comments
 (0)