@entur/dropdown 5.3.3 → 5.3.5
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/dist/Dropdown.d.ts +3 -1
- package/dist/MultiSelect.d.ts +3 -1
- package/dist/SearchableDropdown.d.ts +3 -1
- package/dist/dropdown.cjs.development.js +19 -6
- package/dist/dropdown.cjs.development.js.map +1 -1
- package/dist/dropdown.cjs.production.min.js +1 -1
- package/dist/dropdown.cjs.production.min.js.map +1 -1
- package/dist/dropdown.esm.js +19 -6
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +145 -541
- package/package.json +11 -11
package/dist/dropdown.esm.js
CHANGED
|
@@ -1382,6 +1382,7 @@ var SelectedItemTag = function SelectedItemTag(_ref) {
|
|
|
1382
1382
|
})) != null ? _getSelectedItemProps : {},
|
|
1383
1383
|
selectedItemProps = _objectWithoutPropertiesLoose(_ref2, _excluded$4);
|
|
1384
1384
|
return React.createElement(TagChip, _extends({
|
|
1385
|
+
size: "small",
|
|
1385
1386
|
className: classNames('eds-dropdown__selected-item-tag', {
|
|
1386
1387
|
'eds-dropdown__selected-item-tag--readonly': readOnly,
|
|
1387
1388
|
'eds-dropdown__selected-item-tag--disabled': disabled
|
|
@@ -1636,7 +1637,7 @@ function getA11yRemovalMessage(options) {
|
|
|
1636
1637
|
}
|
|
1637
1638
|
/* end a11y utils */
|
|
1638
1639
|
|
|
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"];
|
|
1640
|
+
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
1641
|
var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
1641
1642
|
var _document, _selectedItem$label;
|
|
1642
1643
|
var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
@@ -1658,6 +1659,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1658
1659
|
label = _ref.label,
|
|
1659
1660
|
_ref$labelClearSelect = _ref.labelClearSelectedItem,
|
|
1660
1661
|
labelClearSelectedItem = _ref$labelClearSelect === void 0 ? 'fjern valgt' : _ref$labelClearSelect,
|
|
1662
|
+
labelTooltip = _ref.labelTooltip,
|
|
1661
1663
|
listStyle = _ref.listStyle,
|
|
1662
1664
|
loadingText = _ref.loadingText,
|
|
1663
1665
|
noMatchesText = _ref.noMatchesText,
|
|
@@ -1816,7 +1818,9 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1816
1818
|
setShowSelectedItem(false);
|
|
1817
1819
|
};
|
|
1818
1820
|
return React.createElement("div", {
|
|
1819
|
-
className: classNames('eds-dropdown__wrapper', className
|
|
1821
|
+
className: classNames('eds-dropdown__wrapper', className, {
|
|
1822
|
+
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
1823
|
+
}),
|
|
1820
1824
|
style: style
|
|
1821
1825
|
}, React.createElement(BaseFormControl, _extends({
|
|
1822
1826
|
className: classNames('eds-dropdown', 'eds-dropdown--searchable'),
|
|
@@ -1827,6 +1831,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1827
1831
|
label: label,
|
|
1828
1832
|
labelId: getLabelProps().id,
|
|
1829
1833
|
labelProps: getLabelProps(),
|
|
1834
|
+
labelTooltip: labelTooltip,
|
|
1830
1835
|
onClick: function onClick(e) {
|
|
1831
1836
|
var _inputRef$current2;
|
|
1832
1837
|
if (e.target === e.currentTarget) (_inputRef$current2 = inputRef.current) == null ? void 0 : _inputRef$current2.focus();
|
|
@@ -1892,7 +1897,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1892
1897
|
}));
|
|
1893
1898
|
};
|
|
1894
1899
|
|
|
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"];
|
|
1900
|
+
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
1901
|
var MultiSelect = function MultiSelect(_ref) {
|
|
1897
1902
|
var className = _ref.className,
|
|
1898
1903
|
_ref$clearable = _ref.clearable,
|
|
@@ -1915,6 +1920,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
1915
1920
|
labelClearAllItems = _ref$labelClearAllIte === void 0 ? 'Fjern valgte' : _ref$labelClearAllIte,
|
|
1916
1921
|
_ref$labelSelectAll = _ref.labelSelectAll,
|
|
1917
1922
|
labelSelectAll = _ref$labelSelectAll === void 0 ? 'Velg alle' : _ref$labelSelectAll,
|
|
1923
|
+
labelTooltip = _ref.labelTooltip,
|
|
1918
1924
|
listStyle = _ref.listStyle,
|
|
1919
1925
|
loadingText = _ref.loadingText,
|
|
1920
1926
|
_ref$maxChips = _ref.maxChips,
|
|
@@ -2162,7 +2168,9 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2162
2168
|
});
|
|
2163
2169
|
};
|
|
2164
2170
|
return React.createElement("div", {
|
|
2165
|
-
className: classNames('eds-dropdown__wrapper', className
|
|
2171
|
+
className: classNames('eds-dropdown__wrapper', className, {
|
|
2172
|
+
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2173
|
+
}),
|
|
2166
2174
|
style: style
|
|
2167
2175
|
}, React.createElement(BaseFormControl, _extends({
|
|
2168
2176
|
append: React.createElement(FieldAppend$1, {
|
|
@@ -2186,6 +2194,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2186
2194
|
label: label,
|
|
2187
2195
|
labelId: getLabelProps().id,
|
|
2188
2196
|
labelProps: getLabelProps(),
|
|
2197
|
+
labelTooltip: labelTooltip,
|
|
2189
2198
|
onClick: function onClick(e) {
|
|
2190
2199
|
var _inputRef$current4;
|
|
2191
2200
|
if (e.target === e.currentTarget) (_inputRef$current4 = inputRef.current) == null ? void 0 : _inputRef$current4.focus();
|
|
@@ -2272,7 +2281,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2272
2281
|
}));
|
|
2273
2282
|
};
|
|
2274
2283
|
|
|
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"];
|
|
2284
|
+
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
2285
|
var Dropdown = function Dropdown(_ref) {
|
|
2277
2286
|
var _ref3, _selectedItem$label;
|
|
2278
2287
|
var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
@@ -2290,6 +2299,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2290
2299
|
label = _ref.label,
|
|
2291
2300
|
_ref$labelClearSelect = _ref.labelClearSelectedItem,
|
|
2292
2301
|
labelClearSelectedItem = _ref$labelClearSelect === void 0 ? 'fjern valgt' : _ref$labelClearSelect,
|
|
2302
|
+
labelTooltip = _ref.labelTooltip,
|
|
2293
2303
|
listStyle = _ref.listStyle,
|
|
2294
2304
|
loadingText = _ref.loadingText,
|
|
2295
2305
|
onChange = _ref.onChange,
|
|
@@ -2340,7 +2350,9 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2340
2350
|
getToggleButtonProps = _useSelect.getToggleButtonProps,
|
|
2341
2351
|
highlightedIndex = _useSelect.highlightedIndex;
|
|
2342
2352
|
return React.createElement("div", {
|
|
2343
|
-
className: classNames('eds-dropdown__wrapper', className
|
|
2353
|
+
className: classNames('eds-dropdown__wrapper', className, {
|
|
2354
|
+
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2355
|
+
}),
|
|
2344
2356
|
style: style
|
|
2345
2357
|
}, React.createElement(BaseFormControl, _extends({
|
|
2346
2358
|
append: React.createElement(FieldAppend$1, {
|
|
@@ -2372,6 +2384,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2372
2384
|
label: label,
|
|
2373
2385
|
labelId: getLabelProps().id,
|
|
2374
2386
|
labelProps: getLabelProps(),
|
|
2387
|
+
labelTooltip: labelTooltip,
|
|
2375
2388
|
prepend: prepend,
|
|
2376
2389
|
readOnly: readOnly,
|
|
2377
2390
|
variant: variant
|