@instructure/ui-select 10.20.2-snapshot-9 → 10.20.2-snapshot-11

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 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
- ## [10.20.2-snapshot-9](https://github.com/instructure/instructure-ui/compare/v10.20.1...v10.20.2-snapshot-9) (2025-06-24)
6
+ ## [10.20.2-snapshot-11](https://github.com/instructure/instructure-ui/compare/v10.20.1...v10.20.2-snapshot-11) (2025-06-25)
7
7
 
8
8
 
9
9
  ### Bug Fixes
@@ -11,6 +11,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
  * **ui-select:** prevent scrolling when last item is hovered in Chrome ([51cd81a](https://github.com/instructure/instructure-ui/commit/51cd81a5360bbbc78d30e7e2489bb0c02b67a470))
12
12
 
13
13
 
14
+ ### Features
15
+
16
+ * **ui-simple-select,ui-select:** add layout prop to Select and SimpleSelect ([94f0a6f](https://github.com/instructure/instructure-ui/commit/94f0a6f99f9e813fe44e6c3111fdb4e5f3708b76))
17
+
18
+
14
19
 
15
20
 
16
21
 
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
2
  const _excluded = ["id", "renderLabel", "children"],
3
- _excluded2 = ["renderLabel", "inputValue", "placeholder", "isRequired", "shouldNotWrap", "size", "isInline", "width", "htmlSize", "messages", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onInputChange", "onRequestHideOptions"],
3
+ _excluded2 = ["renderLabel", "inputValue", "placeholder", "isRequired", "shouldNotWrap", "size", "isInline", "width", "htmlSize", "messages", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onInputChange", "onRequestHideOptions", "layout"],
4
4
  _excluded3 = ["ref"];
5
5
  var _dec, _dec2, _dec3, _class, _Select, _Options$Separator, _Options$Separator2, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
6
6
  /*
@@ -528,6 +528,7 @@ let Select = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gen
528
528
  onBlur = _this$props0.onBlur,
529
529
  onInputChange = _this$props0.onInputChange,
530
530
  onRequestHideOptions = _this$props0.onRequestHideOptions,
531
+ layout = _this$props0.layout,
531
532
  rest = _objectWithoutProperties(_this$props0, _excluded2);
532
533
  const interaction = this.interaction;
533
534
  const passthroughProps = omitProps(rest, Select.allowedProps);
@@ -575,6 +576,7 @@ let Select = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gen
575
576
  : interaction,
576
577
  isRequired,
577
578
  shouldNotWrap,
579
+ layout,
578
580
  display: isInline ? 'inline-block' : 'block',
579
581
  renderBeforeInput: this.handleRenderBeforeInput(),
580
582
  // On iOS VoiceOver, if there is a custom element instead of the changing up and down arrow button
@@ -72,7 +72,8 @@ const propTypes = {
72
72
  renderAfterInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
73
73
  children: ChildrenPropTypes.oneOf([Group, Option]),
74
74
  shouldNotWrap: PropTypes.bool,
75
- scrollToHighlightedOption: PropTypes.bool
75
+ scrollToHighlightedOption: PropTypes.bool,
76
+ layout: PropTypes.oneOf(['stacked', 'inline'])
76
77
  };
77
- 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'];
78
+ 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'];
78
79
  export { propTypes, allowedProps };
@@ -31,7 +31,7 @@ var _Option = require("./Option");
31
31
  var _props = require("./props");
32
32
  var _jsxRuntime = require("@emotion/react/jsx-runtime");
33
33
  const _excluded = ["id", "renderLabel", "children"],
34
- _excluded2 = ["renderLabel", "inputValue", "placeholder", "isRequired", "shouldNotWrap", "size", "isInline", "width", "htmlSize", "messages", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onInputChange", "onRequestHideOptions"],
34
+ _excluded2 = ["renderLabel", "inputValue", "placeholder", "isRequired", "shouldNotWrap", "size", "isInline", "width", "htmlSize", "messages", "renderBeforeInput", "renderAfterInput", "onFocus", "onBlur", "onInputChange", "onRequestHideOptions", "layout"],
35
35
  _excluded3 = ["ref"];
36
36
  var _dec, _dec2, _dec3, _class, _Select, _Options$Separator, _Options$Separator2, _IconArrowOpenUpLine, _IconArrowOpenDownLin;
37
37
  /*
@@ -540,6 +540,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
540
540
  onBlur = _this$props0.onBlur,
541
541
  onInputChange = _this$props0.onInputChange,
542
542
  onRequestHideOptions = _this$props0.onRequestHideOptions,
543
+ layout = _this$props0.layout,
543
544
  rest = (0, _objectWithoutProperties2.default)(_this$props0, _excluded2);
544
545
  const interaction = this.interaction;
545
546
  const passthroughProps = (0, _omitProps.omitProps)(rest, Select.allowedProps);
@@ -587,6 +588,7 @@ let Select = exports.Select = (_dec = (0, _withDeterministicId.withDeterministic
587
588
  : interaction,
588
589
  isRequired,
589
590
  shouldNotWrap,
591
+ layout,
590
592
  display: isInline ? 'inline-block' : 'block',
591
593
  renderBeforeInput: this.handleRenderBeforeInput(),
592
594
  // On iOS VoiceOver, if there is a custom element instead of the changing up and down arrow button
@@ -78,6 +78,7 @@ const propTypes = exports.propTypes = {
78
78
  renderAfterInput: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.func]),
79
79
  children: _Children.Children.oneOf([_Group.Group, _Option.Option]),
80
80
  shouldNotWrap: _propTypes.default.bool,
81
- scrollToHighlightedOption: _propTypes.default.bool
81
+ scrollToHighlightedOption: _propTypes.default.bool,
82
+ layout: _propTypes.default.oneOf(['stacked', 'inline'])
82
83
  };
83
- 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'];
84
+ 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'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-select",
3
- "version": "10.20.2-snapshot-9",
3
+ "version": "10.20.2-snapshot-11",
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",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "10.20.2-snapshot-9",
27
- "@instructure/ui-color-utils": "10.20.2-snapshot-9",
28
- "@instructure/ui-scripts": "10.20.2-snapshot-9",
29
- "@instructure/ui-test-utils": "10.20.2-snapshot-9",
30
- "@instructure/ui-themes": "10.20.2-snapshot-9",
26
+ "@instructure/ui-babel-preset": "10.20.2-snapshot-11",
27
+ "@instructure/ui-color-utils": "10.20.2-snapshot-11",
28
+ "@instructure/ui-scripts": "10.20.2-snapshot-11",
29
+ "@instructure/ui-test-utils": "10.20.2-snapshot-11",
30
+ "@instructure/ui-themes": "10.20.2-snapshot-11",
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "^16.0.1",
33
33
  "@testing-library/user-event": "^14.6.1",
@@ -35,22 +35,22 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.27.6",
38
- "@instructure/emotion": "10.20.2-snapshot-9",
39
- "@instructure/shared-types": "10.20.2-snapshot-9",
40
- "@instructure/ui-dom-utils": "10.20.2-snapshot-9",
41
- "@instructure/ui-form-field": "10.20.2-snapshot-9",
42
- "@instructure/ui-icons": "10.20.2-snapshot-9",
43
- "@instructure/ui-options": "10.20.2-snapshot-9",
44
- "@instructure/ui-popover": "10.20.2-snapshot-9",
45
- "@instructure/ui-position": "10.20.2-snapshot-9",
46
- "@instructure/ui-prop-types": "10.20.2-snapshot-9",
47
- "@instructure/ui-react-utils": "10.20.2-snapshot-9",
48
- "@instructure/ui-selectable": "10.20.2-snapshot-9",
49
- "@instructure/ui-testable": "10.20.2-snapshot-9",
50
- "@instructure/ui-text-input": "10.20.2-snapshot-9",
51
- "@instructure/ui-utils": "10.20.2-snapshot-9",
52
- "@instructure/ui-view": "10.20.2-snapshot-9",
53
- "@instructure/uid": "10.20.2-snapshot-9",
38
+ "@instructure/emotion": "10.20.2-snapshot-11",
39
+ "@instructure/shared-types": "10.20.2-snapshot-11",
40
+ "@instructure/ui-dom-utils": "10.20.2-snapshot-11",
41
+ "@instructure/ui-form-field": "10.20.2-snapshot-11",
42
+ "@instructure/ui-icons": "10.20.2-snapshot-11",
43
+ "@instructure/ui-options": "10.20.2-snapshot-11",
44
+ "@instructure/ui-popover": "10.20.2-snapshot-11",
45
+ "@instructure/ui-position": "10.20.2-snapshot-11",
46
+ "@instructure/ui-prop-types": "10.20.2-snapshot-11",
47
+ "@instructure/ui-react-utils": "10.20.2-snapshot-11",
48
+ "@instructure/ui-selectable": "10.20.2-snapshot-11",
49
+ "@instructure/ui-testable": "10.20.2-snapshot-11",
50
+ "@instructure/ui-text-input": "10.20.2-snapshot-11",
51
+ "@instructure/ui-utils": "10.20.2-snapshot-11",
52
+ "@instructure/ui-view": "10.20.2-snapshot-11",
53
+ "@instructure/uid": "10.20.2-snapshot-11",
54
54
  "prop-types": "^15.8.1"
55
55
  },
56
56
  "peerDependencies": {
@@ -694,6 +694,7 @@ class Select extends Component<SelectProps> {
694
694
  onBlur,
695
695
  onInputChange,
696
696
  onRequestHideOptions,
697
+ layout,
697
698
  ...rest
698
699
  } = this.props
699
700
 
@@ -749,6 +750,7 @@ class Select extends Component<SelectProps> {
749
750
  : interaction,
750
751
  isRequired,
751
752
  shouldNotWrap,
753
+ layout,
752
754
  display: isInline ? 'inline-block' : 'block',
753
755
  renderBeforeInput: this.handleRenderBeforeInput(),
754
756
  // On iOS VoiceOver, if there is a custom element instead of the changing up and down arrow button
@@ -256,6 +256,14 @@ type PropsFromTextInput = {
256
256
  * when available space is exceeded.
257
257
  */
258
258
  shouldNotWrap?: boolean
259
+
260
+ /**
261
+ * In `stacked` mode the input is below the label.
262
+ *
263
+ * In `inline` mode the input is to the right/left (depending on text direction) of the label,
264
+ * and the layout will look like `stacked` for small screens.
265
+ */
266
+ layout?: 'stacked' | 'inline'
259
267
  }
260
268
 
261
269
  // These props are directly passed to Popover
@@ -328,7 +336,8 @@ const propTypes: PropValidators<PropKeys> = {
328
336
  renderAfterInput: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
329
337
  children: ChildrenPropTypes.oneOf([Group, Option]),
330
338
  shouldNotWrap: PropTypes.bool,
331
- scrollToHighlightedOption: PropTypes.bool
339
+ scrollToHighlightedOption: PropTypes.bool,
340
+ layout: PropTypes.oneOf(['stacked', 'inline'])
332
341
  }
333
342
 
334
343
  const allowedProps: AllowedPropKeys = [
@@ -365,7 +374,8 @@ const allowedProps: AllowedPropKeys = [
365
374
  'renderAfterInput',
366
375
  'children',
367
376
  'shouldNotWrap',
368
- 'scrollToHighlightedOption'
377
+ 'scrollToHighlightedOption',
378
+ 'layout'
369
379
  ]
370
380
 
371
381
  export type { SelectProps, SelectOwnProps, SelectStyle }