@entur/dropdown 5.5.1 → 6.0.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/dist/dropdown.cjs.development.js +31 -40
- 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 +31 -40
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +26 -78
- package/package.json +8 -8
package/dist/dropdown.esm.js
CHANGED
|
@@ -1840,13 +1840,24 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1840
1840
|
});
|
|
1841
1841
|
setShowSelectedItem(false);
|
|
1842
1842
|
};
|
|
1843
|
-
return React.createElement(
|
|
1844
|
-
|
|
1845
|
-
|
|
1843
|
+
return React.createElement(BaseFormControl, _extends({
|
|
1844
|
+
append: React.createElement(FieldAppend$1, {
|
|
1845
|
+
ariaLabelCloseList: ariaLabelCloseList,
|
|
1846
|
+
ariaLabelOpenList: ariaLabelOpenList,
|
|
1847
|
+
clearable: clearable,
|
|
1848
|
+
labelClearSelectedItems: labelClearSelectedItem,
|
|
1849
|
+
disabled: readOnly || disabled,
|
|
1850
|
+
focusable: false,
|
|
1851
|
+
getToggleButtonProps: getToggleButtonProps,
|
|
1852
|
+
isOpen: isOpen,
|
|
1853
|
+
loading: loading,
|
|
1854
|
+
loadingText: loadingText,
|
|
1855
|
+
onClear: handleOnClear,
|
|
1856
|
+
selectedItems: [selectedItem]
|
|
1857
|
+
}),
|
|
1858
|
+
className: classNames('eds-dropdown', 'eds-dropdown--searchable', className, {
|
|
1859
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
1846
1860
|
}),
|
|
1847
|
-
style: style
|
|
1848
|
-
}, React.createElement(BaseFormControl, _extends({
|
|
1849
|
-
className: classNames('eds-dropdown', 'eds-dropdown--searchable'),
|
|
1850
1861
|
disabled: disabled,
|
|
1851
1862
|
disableLabelAnimation: disableLabelAnimation,
|
|
1852
1863
|
feedback: feedback,
|
|
@@ -1862,23 +1873,9 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1862
1873
|
prepend: prepend,
|
|
1863
1874
|
readOnly: readOnly,
|
|
1864
1875
|
ref: refs.setReference,
|
|
1876
|
+
style: style,
|
|
1865
1877
|
variant: variant
|
|
1866
|
-
}, rest, {
|
|
1867
|
-
append: React.createElement(FieldAppend$1, {
|
|
1868
|
-
ariaLabelCloseList: ariaLabelCloseList,
|
|
1869
|
-
ariaLabelOpenList: ariaLabelOpenList,
|
|
1870
|
-
clearable: clearable,
|
|
1871
|
-
labelClearSelectedItems: labelClearSelectedItem,
|
|
1872
|
-
disabled: readOnly || disabled,
|
|
1873
|
-
focusable: false,
|
|
1874
|
-
getToggleButtonProps: getToggleButtonProps,
|
|
1875
|
-
isOpen: isOpen,
|
|
1876
|
-
loading: loading,
|
|
1877
|
-
loadingText: loadingText,
|
|
1878
|
-
onClear: handleOnClear,
|
|
1879
|
-
selectedItems: [selectedItem]
|
|
1880
|
-
})
|
|
1881
|
-
}), React.createElement("span", {
|
|
1878
|
+
}, rest), React.createElement("span", {
|
|
1882
1879
|
className: classNames('eds-dropdown--searchable__selected-item', {
|
|
1883
1880
|
'eds-dropdown--searchable__selected-item--hidden': !showSelectedItem
|
|
1884
1881
|
}),
|
|
@@ -1905,7 +1902,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1905
1902
|
if (selectOnTab && isOpen && e.key === 'Tab') onChange == null ? void 0 : onChange(listItems[highlightedIndex]);
|
|
1906
1903
|
},
|
|
1907
1904
|
ref: inputRef
|
|
1908
|
-
})))
|
|
1905
|
+
}))), React.createElement(DropdownList, {
|
|
1909
1906
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
1910
1907
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
1911
1908
|
isOpen: isOpen,
|
|
@@ -2207,12 +2204,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2207
2204
|
inputValue: inputValue
|
|
2208
2205
|
});
|
|
2209
2206
|
};
|
|
2210
|
-
return React.createElement(
|
|
2211
|
-
className: classNames('eds-dropdown__wrapper', className, {
|
|
2212
|
-
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2213
|
-
}),
|
|
2214
|
-
style: style
|
|
2215
|
-
}, React.createElement(BaseFormControl, _extends({
|
|
2207
|
+
return React.createElement(BaseFormControl, _extends({
|
|
2216
2208
|
append: React.createElement(FieldAppend$1, {
|
|
2217
2209
|
ariaLabelCloseList: ariaLabelCloseList,
|
|
2218
2210
|
ariaLabelOpenList: ariaLabelOpenList,
|
|
@@ -2227,7 +2219,9 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2227
2219
|
onClear: handleOnClear,
|
|
2228
2220
|
getToggleButtonProps: getToggleButtonProps
|
|
2229
2221
|
}),
|
|
2230
|
-
className: classNames('eds-dropdown', 'eds-dropdown--multiselect'
|
|
2222
|
+
className: classNames('eds-dropdown', 'eds-dropdown--multiselect', className, {
|
|
2223
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
2224
|
+
}),
|
|
2231
2225
|
disabled: disabled,
|
|
2232
2226
|
feedback: feedback,
|
|
2233
2227
|
isFilled: hasSelectedItems || inputValue !== EMPTY_INPUT,
|
|
@@ -2241,6 +2235,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2241
2235
|
},
|
|
2242
2236
|
readOnly: readOnly,
|
|
2243
2237
|
ref: refs.setReference,
|
|
2238
|
+
style: style,
|
|
2244
2239
|
variant: variant
|
|
2245
2240
|
}, rest), React.createElement("div", {
|
|
2246
2241
|
className: classNames('eds-dropdown--multiselect__selected-items-and-input', {
|
|
@@ -2303,7 +2298,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2303
2298
|
preventKeyAction: isOpen,
|
|
2304
2299
|
ref: inputRef,
|
|
2305
2300
|
value: inputValue != null ? inputValue : EMPTY_INPUT
|
|
2306
|
-
}))))))
|
|
2301
|
+
})))))), React.createElement(DropdownList, {
|
|
2307
2302
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
2308
2303
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
2309
2304
|
getItemProps: getItemProps,
|
|
@@ -2401,12 +2396,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2401
2396
|
}),
|
|
2402
2397
|
refs = _useFloating.refs,
|
|
2403
2398
|
floatingStyles = _useFloating.floatingStyles;
|
|
2404
|
-
return React.createElement(
|
|
2405
|
-
className: classNames('eds-dropdown__wrapper', className, {
|
|
2406
|
-
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2407
|
-
}),
|
|
2408
|
-
style: style
|
|
2409
|
-
}, React.createElement(BaseFormControl, _extends({
|
|
2399
|
+
return React.createElement(BaseFormControl, _extends({
|
|
2410
2400
|
append: React.createElement(FieldAppend$1, {
|
|
2411
2401
|
ariaHiddenToggleButton: true,
|
|
2412
2402
|
ariaLabelCloseList: ariaLabelCloseList,
|
|
@@ -2426,8 +2416,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2426
2416
|
disabled: readOnly || disabled,
|
|
2427
2417
|
selectedItems: [selectedItem]
|
|
2428
2418
|
}),
|
|
2429
|
-
className: classNames('eds-dropdown', {
|
|
2430
|
-
'eds-dropdown--
|
|
2419
|
+
className: classNames('eds-dropdown', className, {
|
|
2420
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
2431
2421
|
}),
|
|
2432
2422
|
disabled: disabled,
|
|
2433
2423
|
disableLabelAnimation: disableLabelAnimation,
|
|
@@ -2440,6 +2430,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2440
2430
|
prepend: prepend,
|
|
2441
2431
|
readOnly: readOnly,
|
|
2442
2432
|
ref: refs.setReference,
|
|
2433
|
+
style: style,
|
|
2443
2434
|
variant: variant
|
|
2444
2435
|
}, rest), React.createElement("div", _extends({
|
|
2445
2436
|
className: "eds-dropdown__selected-item"
|
|
@@ -2459,7 +2450,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2459
2450
|
className: classNames('eds-dropdown__selected-item__placeholder', {
|
|
2460
2451
|
'eds-dropdown__selected-item__placeholder--readonly': readOnly
|
|
2461
2452
|
})
|
|
2462
|
-
}, placeholder)) != null ? _ref3 : '')
|
|
2453
|
+
}, placeholder)) != null ? _ref3 : ''), React.createElement(DropdownList, {
|
|
2463
2454
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
2464
2455
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
2465
2456
|
getItemProps: getItemProps,
|