@entur/dropdown 5.5.0 → 6.0.0-beta.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 +132 -184
- package/package.json +8 -8
|
@@ -1844,13 +1844,24 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1844
1844
|
});
|
|
1845
1845
|
setShowSelectedItem(false);
|
|
1846
1846
|
};
|
|
1847
|
-
return React.createElement(
|
|
1848
|
-
|
|
1849
|
-
|
|
1847
|
+
return React.createElement(form.BaseFormControl, _extends({
|
|
1848
|
+
append: React.createElement(FieldAppend$1, {
|
|
1849
|
+
ariaLabelCloseList: ariaLabelCloseList,
|
|
1850
|
+
ariaLabelOpenList: ariaLabelOpenList,
|
|
1851
|
+
clearable: clearable,
|
|
1852
|
+
labelClearSelectedItems: labelClearSelectedItem,
|
|
1853
|
+
disabled: readOnly || disabled,
|
|
1854
|
+
focusable: false,
|
|
1855
|
+
getToggleButtonProps: getToggleButtonProps,
|
|
1856
|
+
isOpen: isOpen,
|
|
1857
|
+
loading: loading,
|
|
1858
|
+
loadingText: loadingText,
|
|
1859
|
+
onClear: handleOnClear,
|
|
1860
|
+
selectedItems: [selectedItem]
|
|
1861
|
+
}),
|
|
1862
|
+
className: classNames('eds-dropdown', 'eds-dropdown--searchable', className, {
|
|
1863
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
1850
1864
|
}),
|
|
1851
|
-
style: style
|
|
1852
|
-
}, React.createElement(form.BaseFormControl, _extends({
|
|
1853
|
-
className: classNames('eds-dropdown', 'eds-dropdown--searchable'),
|
|
1854
1865
|
disabled: disabled,
|
|
1855
1866
|
disableLabelAnimation: disableLabelAnimation,
|
|
1856
1867
|
feedback: feedback,
|
|
@@ -1866,23 +1877,9 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1866
1877
|
prepend: prepend,
|
|
1867
1878
|
readOnly: readOnly,
|
|
1868
1879
|
ref: refs.setReference,
|
|
1880
|
+
style: style,
|
|
1869
1881
|
variant: variant
|
|
1870
|
-
}, rest, {
|
|
1871
|
-
append: React.createElement(FieldAppend$1, {
|
|
1872
|
-
ariaLabelCloseList: ariaLabelCloseList,
|
|
1873
|
-
ariaLabelOpenList: ariaLabelOpenList,
|
|
1874
|
-
clearable: clearable,
|
|
1875
|
-
labelClearSelectedItems: labelClearSelectedItem,
|
|
1876
|
-
disabled: readOnly || disabled,
|
|
1877
|
-
focusable: false,
|
|
1878
|
-
getToggleButtonProps: getToggleButtonProps,
|
|
1879
|
-
isOpen: isOpen,
|
|
1880
|
-
loading: loading,
|
|
1881
|
-
loadingText: loadingText,
|
|
1882
|
-
onClear: handleOnClear,
|
|
1883
|
-
selectedItems: [selectedItem]
|
|
1884
|
-
})
|
|
1885
|
-
}), React.createElement("span", {
|
|
1882
|
+
}, rest), React.createElement("span", {
|
|
1886
1883
|
className: classNames('eds-dropdown--searchable__selected-item', {
|
|
1887
1884
|
'eds-dropdown--searchable__selected-item--hidden': !showSelectedItem
|
|
1888
1885
|
}),
|
|
@@ -1909,7 +1906,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1909
1906
|
if (selectOnTab && isOpen && e.key === 'Tab') onChange == null ? void 0 : onChange(listItems[highlightedIndex]);
|
|
1910
1907
|
},
|
|
1911
1908
|
ref: inputRef
|
|
1912
|
-
})))
|
|
1909
|
+
}))), React.createElement(DropdownList, {
|
|
1913
1910
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
1914
1911
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
1915
1912
|
isOpen: isOpen,
|
|
@@ -2211,12 +2208,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2211
2208
|
inputValue: inputValue
|
|
2212
2209
|
});
|
|
2213
2210
|
};
|
|
2214
|
-
return React.createElement(
|
|
2215
|
-
className: classNames('eds-dropdown__wrapper', className, {
|
|
2216
|
-
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2217
|
-
}),
|
|
2218
|
-
style: style
|
|
2219
|
-
}, React.createElement(form.BaseFormControl, _extends({
|
|
2211
|
+
return React.createElement(form.BaseFormControl, _extends({
|
|
2220
2212
|
append: React.createElement(FieldAppend$1, {
|
|
2221
2213
|
ariaLabelCloseList: ariaLabelCloseList,
|
|
2222
2214
|
ariaLabelOpenList: ariaLabelOpenList,
|
|
@@ -2231,7 +2223,9 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2231
2223
|
onClear: handleOnClear,
|
|
2232
2224
|
getToggleButtonProps: getToggleButtonProps
|
|
2233
2225
|
}),
|
|
2234
|
-
className: classNames('eds-dropdown', 'eds-dropdown--multiselect'
|
|
2226
|
+
className: classNames('eds-dropdown', 'eds-dropdown--multiselect', className, {
|
|
2227
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
2228
|
+
}),
|
|
2235
2229
|
disabled: disabled,
|
|
2236
2230
|
feedback: feedback,
|
|
2237
2231
|
isFilled: hasSelectedItems || inputValue !== EMPTY_INPUT,
|
|
@@ -2245,6 +2239,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2245
2239
|
},
|
|
2246
2240
|
readOnly: readOnly,
|
|
2247
2241
|
ref: refs.setReference,
|
|
2242
|
+
style: style,
|
|
2248
2243
|
variant: variant
|
|
2249
2244
|
}, rest), React.createElement("div", {
|
|
2250
2245
|
className: classNames('eds-dropdown--multiselect__selected-items-and-input', {
|
|
@@ -2307,7 +2302,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2307
2302
|
preventKeyAction: isOpen,
|
|
2308
2303
|
ref: inputRef,
|
|
2309
2304
|
value: inputValue != null ? inputValue : EMPTY_INPUT
|
|
2310
|
-
}))))))
|
|
2305
|
+
})))))), React.createElement(DropdownList, {
|
|
2311
2306
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
2312
2307
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
2313
2308
|
getItemProps: getItemProps,
|
|
@@ -2405,12 +2400,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2405
2400
|
}),
|
|
2406
2401
|
refs = _useFloating.refs,
|
|
2407
2402
|
floatingStyles = _useFloating.floatingStyles;
|
|
2408
|
-
return React.createElement(
|
|
2409
|
-
className: classNames('eds-dropdown__wrapper', className, {
|
|
2410
|
-
'eds-dropdown__wrapper--has-tooltip': labelTooltip !== undefined
|
|
2411
|
-
}),
|
|
2412
|
-
style: style
|
|
2413
|
-
}, React.createElement(form.BaseFormControl, _extends({
|
|
2403
|
+
return React.createElement(form.BaseFormControl, _extends({
|
|
2414
2404
|
append: React.createElement(FieldAppend$1, {
|
|
2415
2405
|
ariaHiddenToggleButton: true,
|
|
2416
2406
|
ariaLabelCloseList: ariaLabelCloseList,
|
|
@@ -2430,8 +2420,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2430
2420
|
disabled: readOnly || disabled,
|
|
2431
2421
|
selectedItems: [selectedItem]
|
|
2432
2422
|
}),
|
|
2433
|
-
className: classNames('eds-dropdown', {
|
|
2434
|
-
'eds-dropdown--
|
|
2423
|
+
className: classNames('eds-dropdown', className, {
|
|
2424
|
+
'eds-dropdown--has-tooltip': labelTooltip !== undefined
|
|
2435
2425
|
}),
|
|
2436
2426
|
disabled: disabled,
|
|
2437
2427
|
disableLabelAnimation: disableLabelAnimation,
|
|
@@ -2444,6 +2434,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2444
2434
|
prepend: prepend,
|
|
2445
2435
|
readOnly: readOnly,
|
|
2446
2436
|
ref: refs.setReference,
|
|
2437
|
+
style: style,
|
|
2447
2438
|
variant: variant
|
|
2448
2439
|
}, rest), React.createElement("div", _extends({
|
|
2449
2440
|
className: "eds-dropdown__selected-item"
|
|
@@ -2463,7 +2454,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2463
2454
|
className: classNames('eds-dropdown__selected-item__placeholder', {
|
|
2464
2455
|
'eds-dropdown__selected-item__placeholder--readonly': readOnly
|
|
2465
2456
|
})
|
|
2466
|
-
}, placeholder)) != null ? _ref3 : '')
|
|
2457
|
+
}, placeholder)) != null ? _ref3 : ''), React.createElement(DropdownList, {
|
|
2467
2458
|
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
2468
2459
|
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
2469
2460
|
getItemProps: getItemProps,
|