You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `fill`: fills the remaining available space. When multiple elements are set to `fill`, the remaining space is shared equally.
21
-
*
22
-
* `` `${number}%` ``: size in percentages.
23
-
*
24
-
* `` `${number}fr` ``: size in fractions.
25
-
*
26
-
* `number`: size in pixels.
27
-
*
28
-
*
29
-
* - When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.
30
-
*
31
-
* - When the size of an element is not explicitly set, it will fill the remaining space available.
12
+
* The sizes for each row of the layout.
32
13
*
33
-
* - When only one size is set and outside of an array, all elements of the layout will take that size.
14
+
* - `auto`: The intrinsic size of the element.
15
+
* - `fill`: Fills the remaining available space. When multiple elements use `fill`, the space is shared equally.
16
+
* - `` `${number}%` ``: A percentage of the container's block size.
17
+
* - `` `${number}fr` ``: A fractional unit of the available space.
18
+
* - `number`: A fixed size in pixels.
34
19
*
20
+
* When the sum of defined sizes exceeds the available space, elements shrink to avoid overflow. Elements without an explicit size fill the remaining space. A single value outside an array applies to all rows.
35
21
*
36
22
* @defaultValue 'fill'
37
23
*/
38
24
rows?: MaybeResponsiveConditionalStyle<Rows>;
39
25
}
40
26
41
27
/**
42
-
* BlockLayout is used to lay out content over multiple rows.
43
-
*
44
-
* By default, all rows fill the available block space, sharing it equally.
28
+
* BlockLayout arranges content over multiple rows. By default, all rows
29
+
* fill the available block space, sharing it equally.
* Sets the semantic meaning of the component’s content. When set,
39
-
* the role will be used by assistive technologies to help buyers
40
-
* navigate the page.
41
-
*
42
-
*
43
-
* For example:
44
-
*
45
-
* - In an HTML host a `['listItem', 'separator']` tuple will render: `<li role='separator'>`
46
-
*
47
-
* - In an HTML host a `listItem` string will render: `<li>`
37
+
* The semantic meaning of the component's content. When set, assistive technologies use this role to help users navigate the page. Accepts a single role or a tuple of two roles (for example, `['listItem', 'separator']`).
48
38
*/
49
39
accessibilityRole?: ViewLikeAccessibilityRole;
50
40
/**
51
-
* A label that describes the purpose or contents of the element. When set,
52
-
* it will be announced to buyers using assistive technologies and will
53
-
* provide them with more context.
41
+
* A label announced by assistive technologies that describes the purpose or contents of the element. Only set this when the element's visible content doesn't provide enough context on its own.
54
42
*/
55
43
accessibilityLabel?: string;
56
44
/**
57
-
* Sets the overflow behavior of the element.
58
-
*
59
-
* `hidden`: clips the content when it is larger than the element’s container.
60
-
* The element will not be scrollable and the users will not be able
61
-
* to access the clipped content by dragging or using a scroll wheel.
45
+
* The overflow behavior of the element.
62
46
*
63
-
* `visible`: the content that extends beyond the element’s container is visible.
47
+
* - `visible`: Content that extends beyond the container is visible.
48
+
* - `hidden`: Content that extends beyond the container is clipped and not scrollable.
64
49
*
65
50
* @default 'visible'
66
51
*/
67
52
overflow?: 'hidden'|'visible';
68
53
/**
69
-
* Changes the display of the component.
54
+
* The display mode of the component. Learn more about [`display`](https://developer.mozilla.org/en-US/docs/Web/CSS/display).
70
55
*
71
-
* `auto` the component's initial value. The actual value depends on the component and context.
72
-
*
73
-
* `none` hides the component and removes it from the accessibility tree, making it invisible to screen readers.
Copy file name to clipboardExpand all lines: packages/ui-extensions/src/surfaces/checkout/components/Grid/Grid.ts
+25-68Lines changed: 25 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ import type {
17
17
}from'../shared';
18
18
19
19
/**
20
-
* Grid is used to lay out content in a matrix of rows and columns.
21
20
* @publicDocs
22
21
*/
23
22
exportinterfaceGridProps
@@ -28,115 +27,73 @@ export interface GridProps
28
27
SizingProps,
29
28
SpacingProps{
30
29
/**
31
-
* Sizes for each column of the layout.
30
+
* The sizes for each column of the grid.
32
31
*
32
+
* - `auto`: The intrinsic size of the content.
33
+
* - `fill`: Fills the remaining available space. When multiple columns use `fill`, the space is shared equally.
34
+
* - `` `${number}%` ``: A percentage of the container's inline size.
35
+
* - `` `${number}fr` ``: A fractional unit of the available space.
36
+
* - `number`: A fixed size in pixels.
33
37
*
34
-
* `auto`: intrinsic size of the content.
35
-
*
36
-
* `fill`: fills the remaining available space. When multiple columns are set to `fill`, the remaining space is shared equally.
37
-
*
38
-
* `` `${number}%` ``: size in percentages.
39
-
*
40
-
* `` `${number}fr` ``: size in fractions.
41
-
*
42
-
* `number`: size in pixels.
43
-
*
44
-
*
45
-
* - When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.
46
-
* - Except when in scrollview, where the grid will fill the space with the defined sizes.
47
-
*
48
-
* - When only one size is set and outside of an array, the grid will have one column of that size.
38
+
* When the sum of defined sizes exceeds the available space, elements shrink to avoid overflow (except inside a ScrollView). A single value outside an array creates one column of that size.
* `fill`: fills the remaining available space. When multiple rows are set to `fill`, the remaining space is shared equally.
60
-
*
61
-
* `` `${number}%` ``: size in percentages.
62
-
*
63
-
* `` `${number}fr` ``: size in fractions.
64
-
*
65
-
* `number`: size in pixels.
44
+
* The sizes for each row of the grid.
66
45
*
46
+
* - `auto`: The intrinsic size of the content.
47
+
* - `fill`: Fills the remaining available space. When multiple rows use `fill`, the space is shared equally.
48
+
* - `` `${number}%` ``: A percentage of the container's block size.
49
+
* - `` `${number}fr` ``: A fractional unit of the available space.
50
+
* - `number`: A fixed size in pixels.
67
51
*
68
-
* - When the sum of the defined sizes is larger than the available space, elements will shrink to avoid overflow.
69
-
*
70
-
* - When only one size is set and outside of an array, the grid will have one row of that size.
52
+
* When the sum of defined sizes exceeds the available space, elements shrink to avoid overflow. A single value outside an array creates one row of that size.
71
53
*
72
54
* @defaultValue 'fill'
73
55
*/
74
56
rows?: MaybeResponsiveConditionalStyle<Rows>;
75
57
/**
76
-
* Adjust spacing between children.
77
-
*
78
-
* - `base` means the space between rows and columns is `base`.
79
-
*
80
-
* - [`base`, `none`] means the space between rows is `base`, space between columns is `none`.
58
+
* The spacing between child elements. A single value applies to both the row and column axes. A pair of values (for example, `['base', 'none']`) sets the row and column spacing independently.
* Sets the semantic meaning of the component’s content. When set,
95
-
* the role will be used by assistive technologies to help buyers
96
-
* navigate the page.
97
-
*
98
-
*
99
-
* For example:
100
-
*
101
-
* - In an HTML host a `['listItem', 'separator']` tuple will render: `<li role='separator'>`
102
-
*
103
-
* - In an HTML host a `listItem` string will render: `<li>`
72
+
* The semantic meaning of the component's content. When set, assistive technologies use this role to help users navigate the page. Accepts a single role or a tuple of two roles (for example, `['listItem', 'separator']`).
104
73
*/
105
74
accessibilityRole?: ViewLikeAccessibilityRole;
106
75
/**
107
-
* A label that describes the purpose or contents of the element. When set,
108
-
* it will be announced to buyers using assistive technologies and will
109
-
* provide them with more context.
76
+
* A label announced by assistive technologies that describes the purpose or contents of the element. Only set this when the element's visible content doesn't provide enough context on its own.
110
77
*/
111
78
accessibilityLabel?: string;
112
79
/**
113
-
* Sets the overflow behavior of the element.
80
+
* The overflow behavior of the element.
114
81
*
115
-
* `hidden`: clips the content when it is larger than the element’s container.
116
-
* The element will not be scrollable and the users will not be able
117
-
* to access the clipped content by dragging or using a scroll wheel.
118
-
*
119
-
* `visible`: the content that extends beyond the element’s container is visible.
82
+
* - `visible`: Content that extends beyond the container is visible.
83
+
* - `hidden`: Content that extends beyond the container is clipped and not scrollable.
120
84
*
121
85
* @default 'visible'
122
86
*/
123
87
overflow?: 'hidden'|'visible';
124
88
/**
125
-
* Changes the display of the component.
126
-
*
127
-
*
128
-
* `auto` the component's initial value. The actual value depends on the component and context.
89
+
* The display mode of the component. Learn more about [`display`](https://developer.mozilla.org/en-US/docs/Web/CSS/display).
129
90
*
130
-
* `none` hides the component and removes it from the accessibility tree, making it invisible to screen readers.
0 commit comments