@entur/dropdown 6.0.8 → 6.0.9

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.
@@ -1235,7 +1235,7 @@ function SelectedItemsLabel(items) {
1235
1235
  }).toString() : items.length + " elementer valgt";
1236
1236
  }
1237
1237
 
1238
- var _excluded$5 = ["ariaLabelChosenSingular", "ariaLabelSelectedItem", "getItemProps", "getMenuProps", "inputValue", "isOpen", "highlightedIndex", "listItems", "listStyle", "setListRef", "loading", "loadingText", "noMatchesText", "selectAllCheckboxState", "selectAllItem", "selectedItems", "showSelectAllInList"];
1238
+ var _excluded$5 = ["ariaLabelChosenSingular", "ariaLabelSelectedItem", "getItemProps", "getMenuProps", "inputValue", "isOpen", "highlightedIndex", "listItems", "floatingStyles", "setListRef", "loading", "loadingText", "noMatchesText", "selectAllCheckboxState", "selectAllItem", "selectedItems", "showSelectAllInList"];
1239
1239
  var DropdownList = function DropdownList(_ref) {
1240
1240
  var _listItems$;
1241
1241
  var _ref$ariaLabelChosenS = _ref.ariaLabelChosenSingular,
@@ -1247,7 +1247,7 @@ var DropdownList = function DropdownList(_ref) {
1247
1247
  isOpen = _ref.isOpen,
1248
1248
  highlightedIndex = _ref.highlightedIndex,
1249
1249
  listItems = _ref.listItems,
1250
- listStyle = _ref.listStyle,
1250
+ floatingStyles = _ref.floatingStyles,
1251
1251
  setListRef = _ref.setListRef,
1252
1252
  _ref$loading = _ref.loading,
1253
1253
  loading = _ref$loading === void 0 ? false : _ref$loading,
@@ -1330,16 +1330,17 @@ var DropdownList = function DropdownList(_ref) {
1330
1330
  };
1331
1331
  return (
1332
1332
  // use popover from @entur/tooltip when that package upgrades to floating-ui
1333
- React.createElement("ul", _extends({}, getMenuProps({
1333
+ React.createElement("div", {
1334
+ className: "eds-dropdown__list__floating-container",
1335
+ style: _extends({
1336
+ display: isOpen ? undefined : 'none'
1337
+ }, floatingStyles),
1338
+ ref: setListRef
1339
+ }, React.createElement("ul", _extends({}, getMenuProps({
1334
1340
  'aria-multiselectable': isMultiselect
1335
- }, {
1336
- suppressRefError: true
1337
1341
  }), {
1338
- ref: setListRef,
1339
1342
  className: "eds-dropdown__list",
1340
- style: _extends({
1341
- display: isOpen ? 'inline-block' : 'none'
1342
- }, rest.style, listStyle)
1343
+ style: _extends({}, rest.style)
1343
1344
  }), !loading && listItems.length > 0 && listItems.map(function (item, index) {
1344
1345
  var itemIsSelectAll = item.value === (selectAllItem == null ? void 0 : selectAllItem.value);
1345
1346
  if (itemIsSelectAll && listItems.length <= 2) return null;
@@ -1364,7 +1365,7 @@ var DropdownList = function DropdownList(_ref) {
1364
1365
  }, noMatchesText), loading && React.createElement("li", {
1365
1366
  key: "dropdown-list-loading",
1366
1367
  className: "eds-dropdown__list__item"
1367
- }, loadingText))
1368
+ }, loadingText)))
1368
1369
  );
1369
1370
  };
1370
1371
 
@@ -1889,12 +1890,13 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1889
1890
  }))), React.createElement(DropdownList, {
1890
1891
  ariaLabelChosenSingular: ariaLabelChosenSingular,
1891
1892
  ariaLabelSelectedItem: ariaLabelSelectedItem,
1893
+ floatingStyles: floatingStyles,
1892
1894
  getItemProps: getItemProps,
1893
1895
  getMenuProps: getMenuProps,
1894
1896
  highlightedIndex: highlightedIndex,
1895
1897
  isOpen: isOpen,
1896
1898
  listItems: listItems,
1897
- listStyle: _extends({}, floatingStyles, listStyle),
1899
+ style: listStyle,
1898
1900
  setListRef: refs.setFloating,
1899
1901
  loading: loading,
1900
1902
  loadingText: loadingText,
@@ -1903,7 +1905,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1903
1905
  }));
1904
1906
  };
1905
1907
 
1906
- var _excluded$2 = ["className", "clearable", "clearInputOnSelect", "debounceTimeout", "disabled", "feedback", "hideSelectAll", "items", "itemFilter", "label", "labelAllItemsSelected", "labelClearAllItems", "labelSelectAll", "labelTooltip", "listStyle", "loadingText", "maxChips", "noMatchesText", "onChange", "placeholder", "readOnly", "selectedItems", "selectOnBlur", "selectOnTab", "style", "variant", "ariaLabelChosenSingular", "ariaLabelChosenPlural", "ariaLabelCloseList", "ariaLabelJumpToInput", "ariaLabelOpenList", "ariaLabelRemoveSelected", "ariaLabelSelectedItem"];
1908
+ var _excluded$2 = ["className", "clearable", "clearInputOnSelect", "debounceTimeout", "disabled", "disableLabelAnimation", "feedback", "hideSelectAll", "items", "itemFilter", "label", "labelAllItemsSelected", "labelClearAllItems", "labelSelectAll", "labelTooltip", "listStyle", "loadingText", "maxChips", "noMatchesText", "onChange", "placeholder", "readOnly", "selectedItems", "selectOnBlur", "selectOnTab", "style", "variant", "ariaLabelChosenSingular", "ariaLabelChosenPlural", "ariaLabelCloseList", "ariaLabelJumpToInput", "ariaLabelOpenList", "ariaLabelRemoveSelected", "ariaLabelSelectedItem"];
1907
1909
  var MultiSelect = function MultiSelect(_ref) {
1908
1910
  var className = _ref.className,
1909
1911
  _ref$clearable = _ref.clearable,
@@ -1913,6 +1915,7 @@ var MultiSelect = function MultiSelect(_ref) {
1913
1915
  debounceTimeout = _ref.debounceTimeout,
1914
1916
  _ref$disabled = _ref.disabled,
1915
1917
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1918
+ disableLabelAnimation = _ref.disableLabelAnimation,
1916
1919
  feedback = _ref.feedback,
1917
1920
  _ref$hideSelectAll = _ref.hideSelectAll,
1918
1921
  hideSelectAll = _ref$hideSelectAll === void 0 ? false : _ref$hideSelectAll,
@@ -2192,6 +2195,7 @@ var MultiSelect = function MultiSelect(_ref) {
2192
2195
  'eds-dropdown--has-tooltip': labelTooltip !== undefined
2193
2196
  }),
2194
2197
  disabled: disabled,
2198
+ disableLabelAnimation: disableLabelAnimation,
2195
2199
  feedback: feedback,
2196
2200
  isFilled: hasSelectedItems || inputValue !== EMPTY_INPUT,
2197
2201
  label: label,
@@ -2268,13 +2272,14 @@ var MultiSelect = function MultiSelect(_ref) {
2268
2272
  })))))), React.createElement(DropdownList, {
2269
2273
  ariaLabelChosenSingular: ariaLabelChosenSingular,
2270
2274
  ariaLabelSelectedItem: ariaLabelSelectedItem,
2275
+ floatingStyles: floatingStyles,
2271
2276
  getItemProps: getItemProps,
2272
2277
  getMenuProps: getMenuProps,
2273
2278
  highlightedIndex: highlightedIndex,
2274
2279
  inputValue: inputValue,
2275
2280
  isOpen: isOpen,
2276
2281
  listItems: listItems,
2277
- listStyle: _extends({}, floatingStyles, listStyle),
2282
+ style: listStyle,
2278
2283
  setListRef: refs.setFloating,
2279
2284
  loading: loading,
2280
2285
  loadingText: loadingText,
@@ -2424,12 +2429,13 @@ var Dropdown = function Dropdown(_ref) {
2424
2429
  }, placeholder)) != null ? _ref3 : ''), React.createElement(DropdownList, {
2425
2430
  ariaLabelChosenSingular: ariaLabelChosenSingular,
2426
2431
  ariaLabelSelectedItem: ariaLabelSelectedItem,
2432
+ floatingStyles: floatingStyles,
2427
2433
  getItemProps: getItemProps,
2428
2434
  getMenuProps: getMenuProps,
2429
2435
  highlightedIndex: highlightedIndex,
2430
2436
  isOpen: isOpen,
2431
2437
  listItems: normalizedItems,
2432
- listStyle: _extends({}, floatingStyles, listStyle),
2438
+ style: listStyle,
2433
2439
  setListRef: refs.setFloating,
2434
2440
  loading: loading,
2435
2441
  loadingText: loadingText,