@instructure/ui-select 11.7.4-snapshot-132 → 11.7.4-snapshot-135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -1
- package/es/Select/v2/index.js +2 -0
- package/es/Select/v2/props.js +1 -1
- package/lib/Select/v2/index.js +2 -0
- package/lib/Select/v2/props.js +1 -1
- package/package.json +19 -19
- package/src/Select/v2/README.md +3 -4
- package/src/Select/v2/index.tsx +2 -0
- package/src/Select/v2/props.ts +9 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Select/v2/index.d.ts +1 -0
- package/types/Select/v2/index.d.ts.map +1 -1
- package/types/Select/v2/props.d.ts +7 -0
- package/types/Select/v2/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [11.7.4-snapshot-
|
|
6
|
+
## [11.7.4-snapshot-135](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-snapshot-135) (2026-07-24)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
|
@@ -15,6 +15,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
15
15
|
### Features
|
|
16
16
|
|
|
17
17
|
* **many:** support current spacing tokens in the margin prop for v2 components ([1b47c5f](https://github.com/instructure/instructure-ui/commit/1b47c5f23eaa60b532cdfd53c39bd71f0cf51aaa))
|
|
18
|
+
* **ui-text-input,ui-select:** add contentSpacing prop for even wrapped-tag padding in multiple Select ([0969a00](https://github.com/instructure/instructure-ui/commit/0969a007a16c41eb2b5acec5ba1e4722b8ae0ed4))
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
|
package/es/Select/v2/index.js
CHANGED
|
@@ -556,6 +556,7 @@ let Select = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle),
|
|
|
556
556
|
isInline,
|
|
557
557
|
width,
|
|
558
558
|
htmlSize,
|
|
559
|
+
renderBeforeInputElementGap,
|
|
559
560
|
messages,
|
|
560
561
|
renderBeforeInput,
|
|
561
562
|
renderAfterInput,
|
|
@@ -607,6 +608,7 @@ let Select = (_dec = withDeterministicId(), _dec2 = withStyleNew(generateStyle),
|
|
|
607
608
|
size,
|
|
608
609
|
width,
|
|
609
610
|
htmlSize,
|
|
611
|
+
renderBeforeInputElementGap,
|
|
610
612
|
messages,
|
|
611
613
|
value: inputValue,
|
|
612
614
|
inputRef: utils.createChainedFunction(ref, this.handleInputRef),
|
package/es/Select/v2/props.js
CHANGED
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
// These props are directly passed to Popover
|
|
32
32
|
// TODO: import these from Popover once TS types can be imported
|
|
33
33
|
|
|
34
|
-
const allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'visibleOptionsCount', 'isOptionContentAppliedToInput', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap', 'scrollToHighlightedOption', 'layout'];
|
|
34
|
+
const allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'visibleOptionsCount', 'isOptionContentAppliedToInput', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap', 'renderBeforeInputElementGap', 'scrollToHighlightedOption', 'layout'];
|
|
35
35
|
export { allowedProps };
|
package/lib/Select/v2/index.js
CHANGED
|
@@ -567,6 +567,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
567
567
|
isInline,
|
|
568
568
|
width,
|
|
569
569
|
htmlSize,
|
|
570
|
+
renderBeforeInputElementGap,
|
|
570
571
|
messages,
|
|
571
572
|
renderBeforeInput,
|
|
572
573
|
renderAfterInput,
|
|
@@ -618,6 +619,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
|
|
|
618
619
|
size,
|
|
619
620
|
width,
|
|
620
621
|
htmlSize,
|
|
622
|
+
renderBeforeInputElementGap,
|
|
621
623
|
messages,
|
|
622
624
|
value: inputValue,
|
|
623
625
|
inputRef: utils.createChainedFunction(ref, this.handleInputRef),
|
package/lib/Select/v2/props.js
CHANGED
|
@@ -37,4 +37,4 @@ exports.allowedProps = void 0;
|
|
|
37
37
|
// These props are directly passed to Popover
|
|
38
38
|
// TODO: import these from Popover once TS types can be imported
|
|
39
39
|
|
|
40
|
-
const allowedProps = exports.allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'visibleOptionsCount', 'isOptionContentAppliedToInput', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap', 'scrollToHighlightedOption', 'layout'];
|
|
40
|
+
const allowedProps = exports.allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'visibleOptionsCount', 'isOptionContentAppliedToInput', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap', 'renderBeforeInputElementGap', 'scrollToHighlightedOption', 'layout'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-select",
|
|
3
|
-
"version": "11.7.4-snapshot-
|
|
3
|
+
"version": "11.7.4-snapshot-135",
|
|
4
4
|
"description": "A component for select and autocomplete behavior.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,30 +15,30 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/
|
|
19
|
-
"@instructure/shared-types": "11.7.4-snapshot-
|
|
20
|
-
"@instructure/ui-
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/ui-form-field": "11.7.4-snapshot-
|
|
23
|
-
"@instructure/ui-options": "11.7.4-snapshot-
|
|
24
|
-
"@instructure/ui-
|
|
25
|
-
"@instructure/ui-position": "11.7.4-snapshot-
|
|
26
|
-
"@instructure/ui-react-utils": "11.7.4-snapshot-
|
|
27
|
-
"@instructure/ui-text-input": "11.7.4-snapshot-
|
|
28
|
-
"@instructure/ui-
|
|
29
|
-
"@instructure/ui-
|
|
30
|
-
"@instructure/
|
|
31
|
-
"@instructure/
|
|
32
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/emotion": "11.7.4-snapshot-135",
|
|
19
|
+
"@instructure/shared-types": "11.7.4-snapshot-135",
|
|
20
|
+
"@instructure/ui-dom-utils": "11.7.4-snapshot-135",
|
|
21
|
+
"@instructure/ui-icons": "11.7.4-snapshot-135",
|
|
22
|
+
"@instructure/ui-form-field": "11.7.4-snapshot-135",
|
|
23
|
+
"@instructure/ui-options": "11.7.4-snapshot-135",
|
|
24
|
+
"@instructure/ui-selectable": "11.7.4-snapshot-135",
|
|
25
|
+
"@instructure/ui-position": "11.7.4-snapshot-135",
|
|
26
|
+
"@instructure/ui-react-utils": "11.7.4-snapshot-135",
|
|
27
|
+
"@instructure/ui-text-input": "11.7.4-snapshot-135",
|
|
28
|
+
"@instructure/ui-themes": "11.7.4-snapshot-135",
|
|
29
|
+
"@instructure/ui-utils": "11.7.4-snapshot-135",
|
|
30
|
+
"@instructure/ui-view": "11.7.4-snapshot-135",
|
|
31
|
+
"@instructure/uid": "11.7.4-snapshot-135",
|
|
32
|
+
"@instructure/ui-popover": "11.7.4-snapshot-135"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@testing-library/jest-dom": "^6.9.1",
|
|
36
36
|
"@testing-library/react": "16.3.2",
|
|
37
37
|
"@testing-library/user-event": "^14.6.1",
|
|
38
38
|
"vitest": "^4.1.9",
|
|
39
|
-
"@instructure/ui-
|
|
40
|
-
"@instructure/ui-color-utils": "11.7.4-snapshot-
|
|
41
|
-
"@instructure/ui-
|
|
39
|
+
"@instructure/ui-scripts": "11.7.4-snapshot-135",
|
|
40
|
+
"@instructure/ui-color-utils": "11.7.4-snapshot-135",
|
|
41
|
+
"@instructure/ui-babel-preset": "11.7.4-snapshot-135"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": ">=18 <=19"
|
package/src/Select/v2/README.md
CHANGED
|
@@ -340,7 +340,7 @@ type: example
|
|
|
340
340
|
|
|
341
341
|
#### Highlighting and selecting options
|
|
342
342
|
|
|
343
|
-
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.
|
|
343
|
+
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.
|
|
344
344
|
|
|
345
345
|
> **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.
|
|
346
346
|
|
|
@@ -491,9 +491,6 @@ type: example
|
|
|
491
491
|
{getOptionById(id).label}
|
|
492
492
|
</AccessibleContent>
|
|
493
493
|
}
|
|
494
|
-
margin={
|
|
495
|
-
index > 0 ? 'xxx-small xx-small xxx-small 0' : '0 xx-small 0 0'
|
|
496
|
-
}
|
|
497
494
|
onClick={(e) => dismissTag(e, id)}
|
|
498
495
|
/>
|
|
499
496
|
))
|
|
@@ -518,6 +515,7 @@ type: example
|
|
|
518
515
|
renderLabel="Multiple Select"
|
|
519
516
|
aria-label="Multiple Select"
|
|
520
517
|
assistiveText={assistiveText}
|
|
518
|
+
renderBeforeInputElementGap="even"
|
|
521
519
|
inputValue={inputValue}
|
|
522
520
|
isShowingOptions={isShowingOptions}
|
|
523
521
|
inputRef={(el) => {
|
|
@@ -531,6 +529,7 @@ type: example
|
|
|
531
529
|
onRequestSelectOption={handleSelectOption}
|
|
532
530
|
onKeyDown={handleKeyDown}
|
|
533
531
|
renderBeforeInput={selectedOptionId.length > 0 ? renderTags() : null}
|
|
532
|
+
htmlSize={2}
|
|
534
533
|
>
|
|
535
534
|
{filteredOptions.length > 0 ? (
|
|
536
535
|
filteredOptions.map((option, index) => {
|
package/src/Select/v2/index.tsx
CHANGED
|
@@ -703,6 +703,7 @@ class Select extends Component<SelectProps> {
|
|
|
703
703
|
isInline,
|
|
704
704
|
width,
|
|
705
705
|
htmlSize,
|
|
706
|
+
renderBeforeInputElementGap,
|
|
706
707
|
messages,
|
|
707
708
|
renderBeforeInput,
|
|
708
709
|
renderAfterInput,
|
|
@@ -756,6 +757,7 @@ class Select extends Component<SelectProps> {
|
|
|
756
757
|
size,
|
|
757
758
|
width,
|
|
758
759
|
htmlSize,
|
|
760
|
+
renderBeforeInputElementGap,
|
|
759
761
|
messages,
|
|
760
762
|
value: inputValue,
|
|
761
763
|
inputRef: utils.createChainedFunction(ref, this.handleInputRef),
|
package/src/Select/v2/props.ts
CHANGED
|
@@ -248,6 +248,14 @@ type PropsFromTextInput = {
|
|
|
248
248
|
*/
|
|
249
249
|
shouldNotWrap?: boolean
|
|
250
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Whether to apply a gap between the elements rendered via `renderBeforeInput`
|
|
253
|
+
* (a CSS flex container), e.g. tags.
|
|
254
|
+
* - `'default'`: no gap is applied between the elements.
|
|
255
|
+
* - `'even'`: wrapped rows are evenly spaced with a vertical and horizontal gap.
|
|
256
|
+
*/
|
|
257
|
+
renderBeforeInputElementGap?: 'default' | 'even'
|
|
258
|
+
|
|
251
259
|
/**
|
|
252
260
|
* In `stacked` mode the input is below the label.
|
|
253
261
|
*
|
|
@@ -325,6 +333,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
325
333
|
'renderAfterInput',
|
|
326
334
|
'children',
|
|
327
335
|
'shouldNotWrap',
|
|
336
|
+
'renderBeforeInputElementGap',
|
|
328
337
|
'scrollToHighlightedOption',
|
|
329
338
|
'layout'
|
|
330
339
|
]
|