@entur/dropdown 5.0.14 → 5.0.16
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 +13 -2
- package/dist/MultiSelect.d.ts +7 -6
- package/dist/SearchableDropdown.d.ts +14 -1
- package/dist/dropdown.cjs.development.js +18 -8
- 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 +18 -8
- package/dist/dropdown.esm.js.map +1 -1
- package/dist/styles.css +7 -7
- package/package.json +8 -8
package/dist/Dropdown.d.ts
CHANGED
|
@@ -36,7 +36,9 @@ export type DropdownProps = {
|
|
|
36
36
|
feedback?: string;
|
|
37
37
|
/** Tekst eller ikon som kommer før dropdown-en */
|
|
38
38
|
prepend?: React.ReactNode;
|
|
39
|
-
/** En tekst som beskriver hva som skjer når man venter på items
|
|
39
|
+
/** En tekst som beskriver hva som skjer når man venter på items
|
|
40
|
+
* @default 'Laster inn …'
|
|
41
|
+
*/
|
|
40
42
|
loadingText?: string;
|
|
41
43
|
/** Om man skal ha mulighet for å nullstille Dropdown-en
|
|
42
44
|
* @default "fjern valgt"
|
|
@@ -64,5 +66,14 @@ export type DropdownProps = {
|
|
|
64
66
|
* @default "Åpne liste med valg"
|
|
65
67
|
*/
|
|
66
68
|
ariaLabelOpenList?: string;
|
|
69
|
+
/** Ord for at et element er valgt i entall
|
|
70
|
+
* eks. 'Element 1, _valgt_'
|
|
71
|
+
* @default 'valgt'
|
|
72
|
+
*/
|
|
73
|
+
ariaLabelChosenSingular?: string;
|
|
74
|
+
/** Tekst for skjermleser som beskriver statusen til et element som valgt
|
|
75
|
+
* @default ', valgt element, trykk for å fjerne'
|
|
76
|
+
*/
|
|
77
|
+
ariaLabelSelectedItem?: string;
|
|
67
78
|
};
|
|
68
|
-
export declare const Dropdown: ({ ariaLabelCloseList, ariaLabelOpenList, className, clearable, disabled, disableLabelAnimation, feedback, items: initialItems, label, labelClearSelectedItem, listStyle, loadingText, onChange, placeholder, prepend, readOnly, selectedItem, selectOnBlur, selectOnTab, style, variant, ...rest }: DropdownProps) => React.JSX.Element;
|
|
79
|
+
export declare const Dropdown: ({ ariaLabelChosenSingular, ariaLabelCloseList, ariaLabelOpenList, ariaLabelSelectedItem, className, clearable, disabled, disableLabelAnimation, feedback, items: initialItems, label, labelClearSelectedItem, listStyle, loadingText, onChange, placeholder, prepend, readOnly, selectedItem, selectOnBlur, selectOnTab, style, variant, ...rest }: DropdownProps) => React.JSX.Element;
|
package/dist/MultiSelect.d.ts
CHANGED
|
@@ -89,10 +89,6 @@ export type MultiSelectProps = {
|
|
|
89
89
|
* @default "trykk for å fjerne valg"
|
|
90
90
|
*/
|
|
91
91
|
ariaLabelRemoveSelected?: string;
|
|
92
|
-
/** Tekst for skjemleser for å indikere at et element er valgt
|
|
93
|
-
* @default "valgt"
|
|
94
|
-
*/
|
|
95
|
-
ariaLabelChosenSingular?: string;
|
|
96
92
|
/** Tekst for skjemleser for å indikere at et element er valgt
|
|
97
93
|
* @default "valgte"
|
|
98
94
|
*/
|
|
@@ -109,8 +105,13 @@ export type MultiSelectProps = {
|
|
|
109
105
|
* @default `${selectedItems.length} valgte elementer, trykk for å hoppe til tekstfeltet`
|
|
110
106
|
*/
|
|
111
107
|
ariaLabelJumpToInput?: string;
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
108
|
+
/** Ord for at et element er valgt i entall
|
|
109
|
+
* eks. 'Element 1, _valgt_'
|
|
110
|
+
* @default 'valgt'
|
|
111
|
+
*/
|
|
112
|
+
ariaLabelChosenSingular?: string;
|
|
113
|
+
/** Tekst for skjermleser som beskriver statusen til et element som valgt
|
|
114
|
+
* @default ', valgt element, trykk for å fjerne'
|
|
114
115
|
*/
|
|
115
116
|
ariaLabelSelectedItem?: string;
|
|
116
117
|
};
|
|
@@ -40,6 +40,10 @@ export type SearchableDropdownProps = {
|
|
|
40
40
|
*
|
|
41
41
|
* Lar brukeren velge ved å "tab-e" seg ut av komponenten */
|
|
42
42
|
selectOnBlur?: boolean;
|
|
43
|
+
/** Tekst som kommer opp når det ikke er noe treff på filtreringsøket
|
|
44
|
+
* @default "Ingen treff for søket"
|
|
45
|
+
*/
|
|
46
|
+
noMatchesText?: string;
|
|
43
47
|
/** Gjør dropdown-en til å kun kunne leses
|
|
44
48
|
* @default false
|
|
45
49
|
*/
|
|
@@ -72,5 +76,14 @@ export type SearchableDropdownProps = {
|
|
|
72
76
|
* @default "Åpne liste med valg"
|
|
73
77
|
*/
|
|
74
78
|
ariaLabelOpenList?: string;
|
|
79
|
+
/** Ord for at et element er valgt i entall
|
|
80
|
+
* eks. 'Element 1, _valgt_'
|
|
81
|
+
* @default "valgt"
|
|
82
|
+
*/
|
|
83
|
+
ariaLabelChosenSingular?: string;
|
|
84
|
+
/** Tekst for skjermleser som beskriver statusen til et element som valgt
|
|
85
|
+
* @default ", valgt element, trykk for å fjerne"
|
|
86
|
+
*/
|
|
87
|
+
ariaLabelSelectedItem?: string;
|
|
75
88
|
};
|
|
76
|
-
export declare const SearchableDropdown: ({ ariaLabelCloseList, ariaLabelOpenList, className, clearable, debounceTimeout, disabled, disableLabelAnimation, feedback, items: initialItems, itemFilter, label, labelClearSelectedItem, listStyle, loadingText, onChange, placeholder, prepend, readOnly, selectedItem: value, selectOnBlur, selectOnTab, style, variant, ...rest }: SearchableDropdownProps) => React.JSX.Element;
|
|
89
|
+
export declare const SearchableDropdown: ({ ariaLabelChosenSingular, ariaLabelCloseList, ariaLabelOpenList, ariaLabelSelectedItem, className, clearable, debounceTimeout, disabled, disableLabelAnimation, feedback, items: initialItems, itemFilter, label, labelClearSelectedItem, listStyle, loadingText, noMatchesText, onChange, placeholder, prepend, readOnly, selectedItem: value, selectOnBlur, selectOnTab, style, variant, ...rest }: SearchableDropdownProps) => React.JSX.Element;
|
|
@@ -1642,11 +1642,13 @@ var isVoiceOverClick = function isVoiceOverClick(clickEvent) {
|
|
|
1642
1642
|
};
|
|
1643
1643
|
/* end a11y utils */
|
|
1644
1644
|
|
|
1645
|
-
var _excluded$3 = ["ariaLabelCloseList", "ariaLabelOpenList", "className", "clearable", "debounceTimeout", "disabled", "disableLabelAnimation", "feedback", "items", "itemFilter", "label", "labelClearSelectedItem", "listStyle", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
|
|
1645
|
+
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"];
|
|
1646
1646
|
var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
1647
1647
|
var _selectedItem$label;
|
|
1648
|
-
var
|
|
1648
|
+
var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
1649
|
+
ariaLabelCloseList = _ref.ariaLabelCloseList,
|
|
1649
1650
|
ariaLabelOpenList = _ref.ariaLabelOpenList,
|
|
1651
|
+
ariaLabelSelectedItem = _ref.ariaLabelSelectedItem,
|
|
1650
1652
|
className = _ref.className,
|
|
1651
1653
|
_ref$clearable = _ref.clearable,
|
|
1652
1654
|
clearable = _ref$clearable === void 0 ? true : _ref$clearable,
|
|
@@ -1664,6 +1666,7 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1664
1666
|
labelClearSelectedItem = _ref$labelClearSelect === void 0 ? 'fjern valgt' : _ref$labelClearSelect,
|
|
1665
1667
|
listStyle = _ref.listStyle,
|
|
1666
1668
|
loadingText = _ref.loadingText,
|
|
1669
|
+
noMatchesText = _ref.noMatchesText,
|
|
1667
1670
|
_ref$onChange = _ref.onChange,
|
|
1668
1671
|
onChange = _ref$onChange === void 0 ? function () {
|
|
1669
1672
|
return undefined;
|
|
@@ -1864,11 +1867,14 @@ var SearchableDropdown = function SearchableDropdown(_ref) {
|
|
|
1864
1867
|
},
|
|
1865
1868
|
ref: inputRef
|
|
1866
1869
|
})))), React.createElement(DropdownList, {
|
|
1870
|
+
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
1871
|
+
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
1867
1872
|
isOpen: isOpen,
|
|
1868
1873
|
listItems: listItems,
|
|
1869
1874
|
listStyle: listStyle,
|
|
1870
1875
|
loading: loading,
|
|
1871
1876
|
loadingText: loadingText,
|
|
1877
|
+
noMatchesText: noMatchesText,
|
|
1872
1878
|
getItemProps: getItemProps,
|
|
1873
1879
|
getMenuProps: getMenuProps,
|
|
1874
1880
|
highlightedIndex: highlightedIndex,
|
|
@@ -1903,6 +1909,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
1903
1909
|
loadingText = _ref.loadingText,
|
|
1904
1910
|
_ref$maxChips = _ref.maxChips,
|
|
1905
1911
|
maxChips = _ref$maxChips === void 0 ? 10 : _ref$maxChips,
|
|
1912
|
+
noMatchesText = _ref.noMatchesText,
|
|
1906
1913
|
_ref$onChange = _ref.onChange,
|
|
1907
1914
|
onChange = _ref$onChange === void 0 ? function () {
|
|
1908
1915
|
return undefined;
|
|
@@ -1919,8 +1926,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
1919
1926
|
style = _ref.style,
|
|
1920
1927
|
_ref$variant = _ref.variant,
|
|
1921
1928
|
variant = _ref$variant === void 0 ? 'info' : _ref$variant,
|
|
1922
|
-
|
|
1923
|
-
ariaLabelChosenSingular = _ref$ariaLabelChosenS === void 0 ? 'valgt' : _ref$ariaLabelChosenS,
|
|
1929
|
+
ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
1924
1930
|
_ref$ariaLabelChosenP = _ref.ariaLabelChosenPlural,
|
|
1925
1931
|
ariaLabelChosenPlural = _ref$ariaLabelChosenP === void 0 ? 'valgte' : _ref$ariaLabelChosenP,
|
|
1926
1932
|
ariaLabelCloseList = _ref.ariaLabelCloseList,
|
|
@@ -1929,8 +1935,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
1929
1935
|
ariaLabelOpenList = _ref.ariaLabelOpenList,
|
|
1930
1936
|
_ref$ariaLabelRemoveS = _ref.ariaLabelRemoveSelected,
|
|
1931
1937
|
ariaLabelRemoveSelected = _ref$ariaLabelRemoveS === void 0 ? 'trykk for å fjerne valg' : _ref$ariaLabelRemoveS,
|
|
1932
|
-
|
|
1933
|
-
ariaLabelSelectedItem = _ref$ariaLabelSelecte === void 0 ? ', valgt element, trykk for å fjerne' : _ref$ariaLabelSelecte,
|
|
1938
|
+
ariaLabelSelectedItem = _ref.ariaLabelSelectedItem,
|
|
1934
1939
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
1935
1940
|
var _React$useState = React.useState(0),
|
|
1936
1941
|
lastHighlightedIndex = _React$useState[0],
|
|
@@ -2244,17 +2249,20 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
2244
2249
|
listStyle: listStyle,
|
|
2245
2250
|
loading: loading,
|
|
2246
2251
|
loadingText: loadingText,
|
|
2252
|
+
noMatchesText: noMatchesText,
|
|
2247
2253
|
selectAllCheckboxState: selectAllCheckboxState,
|
|
2248
2254
|
selectAllItem: selectAll,
|
|
2249
2255
|
selectedItems: selectedItems
|
|
2250
2256
|
}));
|
|
2251
2257
|
};
|
|
2252
2258
|
|
|
2253
|
-
var _excluded$1 = ["ariaLabelCloseList", "ariaLabelOpenList", "className", "clearable", "disabled", "disableLabelAnimation", "feedback", "items", "label", "labelClearSelectedItem", "listStyle", "loadingText", "onChange", "placeholder", "prepend", "readOnly", "selectedItem", "selectOnBlur", "selectOnTab", "style", "variant"];
|
|
2259
|
+
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"];
|
|
2254
2260
|
var Dropdown = function Dropdown(_ref) {
|
|
2255
2261
|
var _ref3, _selectedItem$label;
|
|
2256
|
-
var
|
|
2262
|
+
var ariaLabelChosenSingular = _ref.ariaLabelChosenSingular,
|
|
2263
|
+
ariaLabelCloseList = _ref.ariaLabelCloseList,
|
|
2257
2264
|
ariaLabelOpenList = _ref.ariaLabelOpenList,
|
|
2265
|
+
ariaLabelSelectedItem = _ref.ariaLabelSelectedItem,
|
|
2258
2266
|
className = _ref.className,
|
|
2259
2267
|
_ref$clearable = _ref.clearable,
|
|
2260
2268
|
clearable = _ref$clearable === void 0 ? false : _ref$clearable,
|
|
@@ -2358,6 +2366,8 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
2358
2366
|
'eds-dropdown__selected-item__placeholder--readonly': readOnly
|
|
2359
2367
|
})
|
|
2360
2368
|
}, placeholder)) != null ? _ref3 : '')), React.createElement(DropdownList, {
|
|
2369
|
+
ariaLabelChosenSingular: ariaLabelChosenSingular,
|
|
2370
|
+
ariaLabelSelectedItem: ariaLabelSelectedItem,
|
|
2361
2371
|
getItemProps: getItemProps,
|
|
2362
2372
|
getMenuProps: getMenuProps,
|
|
2363
2373
|
highlightedIndex: highlightedIndex,
|