Skip to content

Commit 5020763

Browse files
committed
Deploying to gh-pages from @ efee2e1 🚀
1 parent 2884673 commit 5020763

9 files changed

Lines changed: 31 additions & 31 deletions

File tree

latest/docs/v11_6/markdown-and-sources-data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

latest/docs/v11_7/Select.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

latest/docs/v11_7/TextInput.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

latest/docs/v11_7/markdown-and-sources-data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

latest/main.js

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

latest/markdown-and-sources-data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

latest/markdowns/Select.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ type: example
339339
340340
#### Highlighting and selecting options
341341
342-
To mark an option as "highlighted", use the option's `isHighlighted` prop. Note that only one highlighted option is permitted. Similarly, use `isSelected` to mark an option or multiple options as "selected". When allowing multiple selections, it's best to render a [Tag](Tag) with [AccessibleContent](AccessibleContent) for each selected option via the `renderBeforeInput` prop.
342+
To mark an option as "highlighted", use the option's `isHighlighted` prop. Note that only one highlighted option is permitted. Similarly, use `isSelected` to mark an option or multiple options as "selected". When allowing multiple selections, it's best to render a [Tag](Tag) with [AccessibleContent](AccessibleContent) for each selected option via the `renderBeforeInput` prop. Set `renderBeforeInputElementGap="even"` so wrapped tags are evenly spaced even as they wrap to multiple rows.
343343
344344
> **Accessibility:** set an explicit `aria-label` on the `Select` (matching `renderLabel`) and list the selected options in the `assistiveText` (e.g. `"Alaska Selected, …"`), as the example below does. This keeps the combobox's accessible name limited to the field label, while screen reader users still hear which options are selected. Each pill's `"Remove …"` label is only announced when that pill receives focus.
345345
@@ -490,9 +490,6 @@ type: example
490490
{getOptionById(id).label}
491491
</AccessibleContent>
492492
}
493-
margin={
494-
index > 0 ? 'xxx-small xx-small xxx-small 0' : '0 xx-small 0 0'
495-
}
496493
onClick={(e) => dismissTag(e, id)}
497494
/>
498495
))
@@ -517,6 +514,7 @@ type: example
517514
renderLabel="Multiple Select"
518515
aria-label="Multiple Select"
519516
assistiveText={assistiveText}
517+
renderBeforeInputElementGap="even"
520518
inputValue={inputValue}
521519
isShowingOptions={isShowingOptions}
522520
inputRef={(el) => {
@@ -530,6 +528,7 @@ type: example
530528
onRequestSelectOption={handleSelectOption}
531529
onKeyDown={handleKeyDown}
532530
renderBeforeInput={selectedOptionId.length > 0 ? renderTags() : null}
531+
htmlSize={2}
533532
>
534533
{filteredOptions.length > 0 ? (
535534
filteredOptions.map((option, index) => {
@@ -1319,6 +1318,7 @@ type: embed
13191318
| Select | renderBeforeInput | `Renderable` | No | - | Content to display before the text input. This will commonly be an icon or tags to show multiple selections. |
13201319
| Select | renderAfterInput | `Renderable` | No | - | Content to display after the text input. This content will replace the default arrow icons. |
13211320
| Select | shouldNotWrap | `boolean` | No | `false` | Prevents the default behavior of wrapping the input and rendered content when available space is exceeded. |
1321+
| Select | renderBeforeInputElementGap | `'default' \| 'even'` | No | - | Whether to apply a gap between the elements rendered via `renderBeforeInput` (a CSS flex container), e.g. tags. - `'default'`: no gap is applied between the elements. - `'even'`: wrapped rows are evenly spaced with a vertical and horizontal gap. |
13221322
| Select | layout | `'stacked' \| 'inline'` | No | - | In `stacked` mode the input is below the label. In `inline` mode the input is to the right/left (depending on text direction) of the label, and the layout will look like `stacked` for small screens. |
13231323
| Select | placement | `PlacementPropValues` | No | `'bottom stretch'` | The placement of the options list. |
13241324
| Select | constrain | `PositionConstraint` | No | `'window'` | The parent in which to constrain the placement. |

latest/markdowns/TextInput.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ type: example
9696

9797
TextInput accepts focusable and non-focusable content before and/or after
9898
the input text. A common use case is adding an icon or avatar to the input.
99-
Focusable content will be focused separately from the input itself.
99+
Focusable content will be focused separately from the input itself. When
100+
rendering multiple elements before the input (such as tags), set
101+
`renderBeforeInputElementGap="even"` to evenly space them, including as they
102+
wrap to multiple rows.
100103

101104
```js
102105
---
@@ -120,33 +123,29 @@ type: example
120123
renderLabel="What are Paula Panda's favorite ice cream flavors?"
121124
value={this.state.value}
122125
onChange={this.handleChange}
126+
renderBeforeInputElementGap="even"
123127
renderBeforeInput={
124128
<>
125129
{this.state.value !== '' && (
126130
<Tag
127131
text={this.state.value}
128-
margin="general.space2xs general.spaceXs general.space2xs none"
129132
onClick={() => console.log(this.state.value)}
130133
/>
131134
)}
132135
<Tag
133136
text="Rocky road"
134-
margin="general.space2xs general.spaceXs general.space2xs none"
135137
onClick={() => console.log('Rocky road')}
136138
/>
137139
<Tag
138140
text="Vanilla"
139-
margin="general.space2xs general.spaceXs general.space2xs none"
140141
onClick={() => console.log('Vanilla')}
141142
/>
142143
<Tag
143144
text="Coffee"
144-
margin="general.space2xs general.spaceXs general.space2xs none"
145145
onClick={() => console.log('Coffee')}
146146
/>
147147
<Tag
148148
text="Strawberry"
149-
margin="general.space2xs general.spaceXs general.space2xs none"
150149
onClick={() => console.log('Strawberry')}
151150
/>
152151
</>
@@ -365,6 +364,7 @@ type: embed
365364
| TextInput | htmlSize | `number` | No | - | The width of the input (integer value 0 or higher), if a width is not explicitly provided via the `width` prop. Only applicable if `display="inline-block"`. For more see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size |
366365
| TextInput | display | `'inline-block' \| 'block'` | No | `'block'` | The display of the root element. |
367366
| TextInput | shouldNotWrap | `boolean` | No | `false` | Prevents the default behavior of wrapping the input and rendered content when available space is exceeded. |
367+
| TextInput | renderBeforeInputElementGap | `'default' \| 'even'` | No | `'default'` | Whether to apply a gap between the elements rendered via `renderBeforeInput` (a CSS flex container), e.g. tags. - `'default'`: no gap is applied between the elements. - `'even'`: wrapped rows are evenly spaced with a vertical and horizontal gap. |
368368
| TextInput | placeholder | `string` | No | - | Html placeholder text to display when the input has no value. This should be hint text, not a label replacement. |
369369
| TextInput | isRequired | `boolean` | No | `false` | Whether or not the text input is required. |
370370
| TextInput | elementRef | `(element: Element \| null) => void` | No | - | provides a reference to the underlying html root element |

latest/markdowns/documentation.zip

310 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)