@entur/dropdown 2.2.2 → 2.3.0

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,22 @@
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
+ # [2.3.0](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@2.2.4...@entur/dropdown@2.3.0) (2022-03-14)
7
+
8
+ ### Features
9
+
10
+ - **dropdown:** add ref forwarding to dropdown and searchable dropdown ([af4cae7](https://bitbucket.org/enturas/design-system/commits/af4cae7bb5fe83c5d1c2f58462c3ba6e77f2e1b8))
11
+
12
+ ## [2.2.4](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@2.2.3...@entur/dropdown@2.2.4) (2022-03-01)
13
+
14
+ **Note:** Version bump only for package @entur/dropdown
15
+
16
+ ## [2.2.3](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@2.2.2...@entur/dropdown@2.2.3) (2022-02-16)
17
+
18
+ ### Bug Fixes
19
+
20
+ - **dropdown:** add missing styling for truncating searchable dropdown input ([c628982](https://bitbucket.org/enturas/design-system/commits/c628982588035720aab68745c2fbe6f612ec4fde))
21
+
6
22
  ## [2.2.2](https://bitbucket.org/enturas/design-system/compare/@entur/dropdown@2.2.1...@entur/dropdown@2.2.2) (2022-02-09)
7
23
 
8
24
  ### Bug Fixes
@@ -321,7 +321,7 @@ var Appendix$1 = function Appendix(_ref3) {
321
321
  };
322
322
 
323
323
  var _excluded$4 = ["disabled", "placeholder", "selectOnTab", "openOnFocus", "listStyle", "items", "label", "disableLabelAnimation", "loading", "loadingText", "className", "clearable"];
324
- var RegularDropdown = function RegularDropdown(_ref) {
324
+ var RegularDropdown = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
325
325
  var disabled = _ref.disabled,
326
326
  _ref$placeholder = _ref.placeholder,
327
327
  placeholder = _ref$placeholder === void 0 ? 'Vennligst velg' : _ref$placeholder,
@@ -397,8 +397,10 @@ var RegularDropdown = function RegularDropdown(_ref) {
397
397
  !isOpen && openMenu();
398
398
  }
399
399
  }
400
- }, rest))), selectedItem ? selectedItem.label : placeholder));
401
- };
400
+ }, rest)), {
401
+ ref: ref
402
+ }), selectedItem ? selectedItem.label : placeholder));
403
+ });
402
404
 
403
405
  var _excluded$3 = ["disabled", "className", "items", "loading", "loadingText", "readOnly", "prepend", "selectOnTab", "openOnFocus", "listStyle", "clearable", "itemFilter", "label", "disableLabelAnimation", "placeholder"];
404
406
 
@@ -412,7 +414,7 @@ function LowerCaseFilterTest(item, input) {
412
414
  return inputRegex.test(item.label);
413
415
  }
414
416
 
415
- var SearchableDropdown = function SearchableDropdown(_ref) {
417
+ var SearchableDropdown = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
416
418
  var _ref$disabled = _ref.disabled,
417
419
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
418
420
  className = _ref.className,
@@ -480,8 +482,10 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
480
482
  }
481
483
  },
482
484
  placeholder: selectedItem ? undefined : placeholder
483
- }, rest)))));
484
- };
485
+ }, rest)), {
486
+ ref: ref
487
+ })));
488
+ });
485
489
 
486
490
  var DropdownInputGroup = function DropdownInputGroup(_ref) {
487
491
  var children = _ref.children,
@@ -1366,7 +1370,7 @@ debounceTimeout) {
1366
1370
  };
1367
1371
 
1368
1372
  var _excluded$2 = ["highlightFirstItemOnOpen", "debounceTimeout", "disabled", "feedback", "items", "label", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "searchable", "selectOnTab", "openOnFocus", "variant", "value", "clearable", "className", "style", "listStyle", "itemFilter", "disableLabelAnimation"];
1369
- var Dropdown = function Dropdown(_ref) {
1373
+ var Dropdown = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
1370
1374
  var highlightFirstItemOnOpen = _ref.highlightFirstItemOnOpen,
1371
1375
  debounceTimeout = _ref.debounceTimeout,
1372
1376
  disabled = _ref.disabled,
@@ -1437,9 +1441,10 @@ var Dropdown = function Dropdown(_ref) {
1437
1441
  openOnFocus: openOnFocus,
1438
1442
  listStyle: listStyle,
1439
1443
  clearable: clearable,
1440
- disableLabelAnimation: disableLabelAnimation
1444
+ disableLabelAnimation: disableLabelAnimation,
1445
+ ref: ref
1441
1446
  }, searchAbleProps))));
1442
- };
1447
+ });
1443
1448
 
1444
1449
  var _excluded$1 = ["className", "disabled", "readOnly", "items", "loadingText", "prepend", "style", "label", "variant", "feedback", "disableLabelAnimation"];
1445
1450
  var NativeDropdown = function NativeDropdown(_ref) {