@entur/dropdown 5.3.2 → 5.3.4

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.
@@ -1636,7 +1636,7 @@ function getA11yRemovalMessage(options) {
1636
1636
  }
1637
1637
  /* end a11y utils */
1638
1638
 
1639
- var _excluded$3 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "debounceTimeout", "disabled", "disableLabelAnimation", "feedback", "items", "itemFilter", "label", "labelClearSelectedItem", "listStyle", "loadingText", "noMatchesText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
1639
+ var _excluded$3 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "debounceTimeout", "disabled", "disableLabelAnimation", "feedback", "items", "itemFilter", "label", "labelClearSelectedItem", "labelTooltip", "listStyle", "loadingText", "noMatchesText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
1640
1640
  var SearchableDropdown = function SearchableDropdown(_ref) {
1641
1641
  var _document, _selectedItem$label;
1642
1642
  var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
@@ -1658,6 +1658,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1658
1658
  label = _ref.label,
1659
1659
  _ref$labelClearSelect = _ref.labelClearSelectedItem,
1660
1660
  labelClearSelectedItem = _ref$labelClearSelect === void 0 ? 'fjern valgt' : _ref$labelClearSelect,
1661
+ labelTooltip = _ref.labelTooltip,
1661
1662
  listStyle = _ref.listStyle,
1662
1663
  loadingText = _ref.loadingText,
1663
1664
  noMatchesText = _ref.noMatchesText,
@@ -1816,7 +1817,9 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1816
1817
  setShowSelectedItem(false);
1817
1818
  };
1818
1819
  return React.createElement("div", {
1819
- className: classNames('eds-dropdown__wrapper', className),
1820
+ className: classNames('eds-dropdown__wrapper', className, {
1821
+ 'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
1822
+ }),
1820
1823
  style: style
1821
1824
  }, React.createElement(BaseFormControl, _extends({
1822
1825
  className: classNames('eds-dropdown', 'eds-dropdown--searchable'),
@@ -1827,6 +1830,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1827
1830
  label: label,
1828
1831
  labelId: getLabelProps().id,
1829
1832
  labelProps: getLabelProps(),
1833
+ labelTooltip: labelTooltip,
1830
1834
  onClick: function onClick(e) {
1831
1835
  var _inputRef$current2;
1832
1836
  if (e.target === e.currentTarget) (_inputRef$current2 = inputRef.current) == null ? void 0 : _inputRef$current2.focus();
@@ -1892,7 +1896,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
1892
1896
  }));
1893
1897
  };
1894
1898
 
1895
- var _excluded$2 = ["className", "clearable", "clearInputOnSelect", "debounceTimeout", "disabled", "feedback", "hideSelectAll", "items", "itemFilter", "label", "labelAllItemsSelected", "labelClearAllItems", "labelSelectAll", "listStyle", "loadingText", "maxChips", "noMatchesText", "onChange", "placeholder", "readOnly", "selectedItems", "selectOnBlur", "selectOnTab", "style", "variant", "ariaLabelChosenSingular", "ariaLabelChosenPlural", "ariaLabelCloseList", "ariaLabelJumpToInput", "ariaLabelOpenList", "ariaLabelRemoveSelected", "ariaLabelSelectedItem"];
1899
+ 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"];
1896
1900
  var MultiSelect = function MultiSelect(_ref) {
1897
1901
  var className = _ref.className,
1898
1902
  _ref$clearable = _ref.clearable,
@@ -1915,6 +1919,7 @@ var MultiSelect = function MultiSelect(_ref) {
1915
1919
  labelClearAllItems = _ref$labelClearAllIte === void 0 ? 'Fjern valgte' : _ref$labelClearAllIte,
1916
1920
  _ref$labelSelectAll = _ref.labelSelectAll,
1917
1921
  labelSelectAll = _ref$labelSelectAll === void 0 ? 'Velg alle' : _ref$labelSelectAll,
1922
+ labelTooltip = _ref.labelTooltip,
1918
1923
  listStyle = _ref.listStyle,
1919
1924
  loadingText = _ref.loadingText,
1920
1925
  _ref$maxChips = _ref.maxChips,
@@ -2162,7 +2167,9 @@ var MultiSelect = function MultiSelect(_ref) {
2162
2167
  });
2163
2168
  };
2164
2169
  return React.createElement("div", {
2165
- className: classNames('eds-dropdown__wrapper', className),
2170
+ className: classNames('eds-dropdown__wrapper', className, {
2171
+ 'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
2172
+ }),
2166
2173
  style: style
2167
2174
  }, React.createElement(BaseFormControl, _extends({
2168
2175
  append: React.createElement(FieldAppend$1, {
@@ -2186,6 +2193,7 @@ var MultiSelect = function MultiSelect(_ref) {
2186
2193
  label: label,
2187
2194
  labelId: getLabelProps().id,
2188
2195
  labelProps: getLabelProps(),
2196
+ labelTooltip: labelTooltip,
2189
2197
  onClick: function onClick(e) {
2190
2198
  var _inputRef$current4;
2191
2199
  if (e.target === e.currentTarget) (_inputRef$current4 = inputRef.current) == null ? void 0 : _inputRef$current4.focus();
@@ -2272,7 +2280,7 @@ var MultiSelect = function MultiSelect(_ref) {
2272
2280
  }));
2273
2281
  };
2274
2282
 
2275
- var _excluded$1 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "disabled", "disableLabelAnimation", "feedback", "items", "label", "labelClearSelectedItem", "listStyle", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
2283
+ var _excluded$1 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "disabled", "disableLabelAnimation", "feedback", "items", "label", "labelClearSelectedItem", "labelTooltip", "listStyle", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
2276
2284
  var Dropdown = function Dropdown(_ref) {
2277
2285
  var _ref3, _selectedItem$label;
2278
2286
  var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
@@ -2290,6 +2298,7 @@ var Dropdown = function Dropdown(_ref) {
2290
2298
  label = _ref.label,
2291
2299
  _ref$labelClearSelect = _ref.labelClearSelectedItem,
2292
2300
  labelClearSelectedItem = _ref$labelClearSelect === void 0 ? 'fjern valgt' : _ref$labelClearSelect,
2301
+ labelTooltip = _ref.labelTooltip,
2293
2302
  listStyle = _ref.listStyle,
2294
2303
  loadingText = _ref.loadingText,
2295
2304
  onChange = _ref.onChange,
@@ -2340,7 +2349,9 @@ var Dropdown = function Dropdown(_ref) {
2340
2349
  getToggleButtonProps = _useSelect.getToggleButtonProps,
2341
2350
  highlightedIndex = _useSelect.highlightedIndex;
2342
2351
  return React.createElement("div", {
2343
- className: classNames('eds-dropdown__wrapper', className),
2352
+ className: classNames('eds-dropdown__wrapper', className, {
2353
+ 'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
2354
+ }),
2344
2355
  style: style
2345
2356
  }, React.createElement(BaseFormControl, _extends({
2346
2357
  append: React.createElement(FieldAppend$1, {
@@ -2372,6 +2383,7 @@ var Dropdown = function Dropdown(_ref) {
2372
2383
  label: label,
2373
2384
  labelId: getLabelProps().id,
2374
2385
  labelProps: getLabelProps(),
2386
+ labelTooltip: labelTooltip,
2375
2387
  prepend: prepend,
2376
2388
  readOnly: readOnly,
2377
2389
  variant: variant