@instructure/ui-selectable 10.11.0 → 10.11.1-pr-snapshot-1741369431545

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,6 +3,14 @@
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.11.1-pr-snapshot-1741369431545](https://github.com/instructure/instructure-ui/compare/v10.11.0...v10.11.1-pr-snapshot-1741369431545) (2025-03-07)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-selectable
9
+
10
+
11
+
12
+
13
+
6
14
  # [10.11.0](https://github.com/instructure/instructure-ui/compare/v10.10.0...v10.11.0) (2025-02-03)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-selectable
@@ -7,11 +7,11 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.Selectable = void 0;
8
8
  var _react = require("react");
9
9
  var _keycode = _interopRequireDefault(require("keycode"));
10
- var _isActiveElement = require("@instructure/ui-dom-utils/lib/isActiveElement.js");
11
- var _createChainedFunction = require("@instructure/ui-utils/lib/createChainedFunction.js");
10
+ var _uiDomUtils = require("@instructure/ui-dom-utils");
11
+ var _uiUtils = require("@instructure/ui-utils");
12
12
  var _console = require("@instructure/console");
13
13
  var _props = require("./props");
14
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
14
+ var _uiReactUtils = require("@instructure/ui-react-utils");
15
15
  var _dec, _class, _Selectable;
16
16
  /*
17
17
  * The MIT License (MIT)
@@ -42,7 +42,7 @@ category: components
42
42
  tags: autocomplete, typeahead, combobox, dropdown, search
43
43
  ---
44
44
  **/
45
- let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec(_class = (_Selectable = class Selectable extends _react.Component {
45
+ let Selectable = exports.Selectable = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec(_class = (_Selectable = class Selectable extends _react.Component {
46
46
  constructor(...args) {
47
47
  super(...args);
48
48
  this._id = this.props.id || this.props.deterministicId();
@@ -65,7 +65,7 @@ let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeter
65
65
  if (isShowingOptions) {
66
66
  onRequestHideOptions === null || onRequestHideOptions === void 0 ? void 0 : onRequestHideOptions(event);
67
67
  } else {
68
- if (!(0, _isActiveElement.isActiveElement)(this._trigger)) {
68
+ if (!(0, _uiDomUtils.isActiveElement)(this._trigger)) {
69
69
  ;
70
70
  this._trigger.focus();
71
71
  }
@@ -164,7 +164,7 @@ let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeter
164
164
  ...rest
165
165
  } = {}) => {
166
166
  return {
167
- onMouseDown: (0, _createChainedFunction.createChainedFunction)(event => {
167
+ onMouseDown: (0, _uiUtils.createChainedFunction)(event => {
168
168
  // if we call preventDefault, label can't be selected and copied, so we only call it when the options are shown
169
169
  if (event.target !== this._trigger && isShowingOptions) {
170
170
  event.preventDefault(); // prevent trigger from losing focus
@@ -188,15 +188,15 @@ let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeter
188
188
  } = {}) => {
189
189
  return {
190
190
  id: this._id,
191
- ref: (0, _createChainedFunction.createChainedFunction)(ref, el => this._trigger = el),
191
+ ref: (0, _uiUtils.createChainedFunction)(ref, el => this._trigger = el),
192
192
  'aria-haspopup': 'listbox',
193
193
  'aria-expanded': isShowingOptions,
194
194
  'aria-controls': isShowingOptions ? this._listId : void 0,
195
195
  'aria-describedby': this._descriptionId,
196
196
  'aria-activedescendant': isShowingOptions ? highlightedOptionId : void 0,
197
- onKeyDown: (0, _createChainedFunction.createChainedFunction)(this.handleKeyDown, onKeyDown),
198
- onKeyUp: (0, _createChainedFunction.createChainedFunction)(this.handleKeyUp, onKeyUp),
199
- onClick: (0, _createChainedFunction.createChainedFunction)(this.handleOpenClose, onClick),
197
+ onKeyDown: (0, _uiUtils.createChainedFunction)(this.handleKeyDown, onKeyDown),
198
+ onKeyUp: (0, _uiUtils.createChainedFunction)(this.handleKeyUp, onKeyUp),
199
+ onClick: (0, _uiUtils.createChainedFunction)(this.handleOpenClose, onClick),
200
200
  ...rest
201
201
  };
202
202
  },
@@ -220,10 +220,10 @@ let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeter
220
220
  return {
221
221
  id: this._listId,
222
222
  role: 'listbox',
223
- onMouseDown: (0, _createChainedFunction.createChainedFunction)(event => {
223
+ onMouseDown: (0, _uiUtils.createChainedFunction)(event => {
224
224
  event.preventDefault(); // prevent trigger from losing focus
225
225
  }, onMouseDown),
226
- onClick: (0, _createChainedFunction.createChainedFunction)(event => {
226
+ onClick: (0, _uiUtils.createChainedFunction)(event => {
227
227
  // prevent synthetic event from firing on the document
228
228
  // this event could inadvertently close a parent dialog
229
229
  event.stopPropagation();
@@ -243,12 +243,12 @@ let Selectable = exports.Selectable = (_dec = (0, _withDeterministicId.withDeter
243
243
  id,
244
244
  role: 'option',
245
245
  'aria-selected': this.isSelectedOption(id) ? 'true' : 'false',
246
- onClick: (0, _createChainedFunction.createChainedFunction)(event => {
246
+ onClick: (0, _uiUtils.createChainedFunction)(event => {
247
247
  onRequestSelectOption === null || onRequestSelectOption === void 0 ? void 0 : onRequestSelectOption(event, {
248
248
  id
249
249
  });
250
250
  }, onClick),
251
- onMouseOver: (0, _createChainedFunction.createChainedFunction)(event => {
251
+ onMouseOver: (0, _uiUtils.createChainedFunction)(event => {
252
252
  onRequestHighlightOption === null || onRequestHighlightOption === void 0 ? void 0 : onRequestHighlightOption(event, {
253
253
  id
254
254
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-selectable",
3
- "version": "10.11.0",
3
+ "version": "10.11.1-pr-snapshot-1741369431545",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,17 +23,17 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "10.11.0",
27
- "@instructure/ui-test-utils": "10.11.0"
26
+ "@instructure/ui-babel-preset": "10.11.1-pr-snapshot-1741369431545",
27
+ "@instructure/ui-test-utils": "10.11.1-pr-snapshot-1741369431545"
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.26.0",
31
- "@instructure/console": "10.11.0",
32
- "@instructure/shared-types": "10.11.0",
33
- "@instructure/ui-dom-utils": "10.11.0",
34
- "@instructure/ui-react-utils": "10.11.0",
35
- "@instructure/ui-testable": "10.11.0",
36
- "@instructure/ui-utils": "10.11.0",
31
+ "@instructure/console": "10.11.1-pr-snapshot-1741369431545",
32
+ "@instructure/shared-types": "10.11.1-pr-snapshot-1741369431545",
33
+ "@instructure/ui-dom-utils": "10.11.1-pr-snapshot-1741369431545",
34
+ "@instructure/ui-react-utils": "10.11.1-pr-snapshot-1741369431545",
35
+ "@instructure/ui-testable": "10.11.1-pr-snapshot-1741369431545",
36
+ "@instructure/ui-utils": "10.11.1-pr-snapshot-1741369431545",
37
37
  "keycode": "^2",
38
38
  "prop-types": "^15.8.1"
39
39
  },