@entur/dropdown 6.0.10 → 6.0.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.
@@ -43,6 +43,10 @@ export type DropdownProps<ValueType> = {
43
43
  * @default 'Laster inn …'
44
44
  */
45
45
  loadingText?: string;
46
+ /** Tekst som kommer opp når det ikke er noe elementer å vise
47
+ * @default "Ingen tilgjengelige valg …"
48
+ */
49
+ noMatchesText?: string;
46
50
  /** Om man skal ha mulighet for å nullstille Dropdown-en
47
51
  * @default "fjern valgt"
48
52
  */
@@ -81,5 +85,5 @@ export type DropdownProps<ValueType> = {
81
85
  */
82
86
  ariaLabelSelectedItem?: string;
83
87
  };
84
- export declare const Dropdown: <ValueType extends unknown>({ ariaLabelChosenSingular, ariaLabelCloseList, ariaLabelOpenList, ariaLabelSelectedItem, className, clearable, disabled, disableLabelAnimation, feedback, items: initialItems, label, labelClearSelectedItem, labelTooltip, listStyle, loadingText, onChange, placeholder, prepend, readOnly, selectedItem, selectOnBlur, selectOnTab, style, variant, ...rest }: DropdownProps<ValueType>) => React.JSX.Element;
88
+ export declare const Dropdown: <ValueType extends unknown>({ ariaLabelChosenSingular, ariaLabelCloseList, ariaLabelOpenList, ariaLabelSelectedItem, className, clearable, disabled, disableLabelAnimation, feedback, items: initialItems, label, labelClearSelectedItem, labelTooltip, listStyle, loadingText, noMatchesText, onChange, placeholder, prepend, readOnly, selectedItem, selectOnBlur, selectOnTab, style, variant, ...rest }: DropdownProps<ValueType>) => React.JSX.Element;
85
89
  export {};
@@ -2294,7 +2294,7 @@ var MultiSelect = function MultiSelect(_ref) {
2294
2294
  }));
2295
2295
  };
2296
2296
 
2297
- 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"];
2297
+ var _excluded$1 = ["ariaLabelChosenSingular", "ariaLabelCloseList", "ariaLabelOpenList", "ariaLabelSelectedItem", "className", "clearable", "disabled", "disableLabelAnimation", "feedback", "items", "label", "labelClearSelectedItem", "labelTooltip", "listStyle", "loadingText", "noMatchesText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
2298
2298
  var Dropdown = function Dropdown(_ref) {
2299
2299
  var _ref3, _selectedItem$label;
2300
2300
  var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
@@ -2315,6 +2315,8 @@ var Dropdown = function Dropdown(_ref) {
2315
2315
  labelTooltip = _ref.labelTooltip,
2316
2316
  listStyle = _ref.listStyle,
2317
2317
  loadingText = _ref.loadingText,
2318
+ _ref$noMatchesText = _ref.noMatchesText,
2319
+ noMatchesText = _ref$noMatchesText === void 0 ? 'Ingen tilgjengelige valg …' : _ref$noMatchesText,
2318
2320
  onChange = _ref.onChange,
2319
2321
  placeholder = _ref.placeholder,
2320
2322
  prepend = _ref.prepend,
@@ -2439,6 +2441,7 @@ var Dropdown = function Dropdown(_ref) {
2439
2441
  highlightedIndex: highlightedIndex,
2440
2442
  isOpen: isOpen,
2441
2443
  listItems: normalizedItems,
2444
+ noMatchesText: noMatchesText,
2442
2445
  style: listStyle,
2443
2446
  setListRef: refs.setFloating,
2444
2447
  loading: loading,