@transferwise/components 0.0.0-experimental-8a06fb3 → 0.0.0-experimental-0985009
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/build/i18n/en.json +1 -0
- package/build/index.js +24 -30
- package/build/index.js.map +1 -1
- package/build/index.mjs +24 -30
- package/build/index.mjs.map +1 -1
- package/build/main.css +11 -6
- package/build/styles/main.css +11 -6
- package/build/styles/selectOption/SelectOption.css +11 -6
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/selectOption/SelectOption.d.ts.map +1 -1
- package/build/types/selectOption/SelectOption.messages.d.ts +4 -0
- package/build/types/selectOption/SelectOption.messages.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/i18n/en.json +1 -0
- package/src/inlineAlert/InlineAlert.tsx +4 -6
- package/src/main.css +11 -6
- package/src/selectOption/SelectOption.css +11 -6
- package/src/selectOption/SelectOption.less +11 -6
- package/src/selectOption/SelectOption.messages.ts +4 -0
- package/src/selectOption/SelectOption.tsx +5 -8
package/build/index.mjs
CHANGED
|
@@ -1131,6 +1131,9 @@ function withInputAttributes(Component, args) {
|
|
|
1131
1131
|
var messages$c = defineMessages({
|
|
1132
1132
|
actionLabel: {
|
|
1133
1133
|
id: "neptune.SelectOption.action.label"
|
|
1134
|
+
},
|
|
1135
|
+
selectedActionLabel: {
|
|
1136
|
+
id: "neptune.SelectOption.selected.action.label"
|
|
1134
1137
|
}
|
|
1135
1138
|
});
|
|
1136
1139
|
|
|
@@ -1964,31 +1967,24 @@ function SelectOption({
|
|
|
1964
1967
|
className: classNames({
|
|
1965
1968
|
'np-select-option-list': isLargeScreen
|
|
1966
1969
|
}),
|
|
1967
|
-
children: options.map(optionsSection =>
|
|
1968
|
-
|
|
1969
|
-
// eslint-disable-next-line react/jsx-key
|
|
1970
|
-
jsxs(Section, {
|
|
1971
|
-
className: classNames('np-select-option-section', {
|
|
1970
|
+
children: options.map((optionsSection, index) => /*#__PURE__*/jsxs(Section, {
|
|
1971
|
+
className: classNames({
|
|
1972
1972
|
'p-x-2 p-y-1': isLargeScreen
|
|
1973
1973
|
}),
|
|
1974
1974
|
children: [optionsSection.title && /*#__PURE__*/jsx(Header, {
|
|
1975
1975
|
title: optionsSection.title
|
|
1976
1976
|
}), /*#__PURE__*/jsx(NavigationOptionList, {
|
|
1977
|
-
children: optionsSection.options.map(option => {
|
|
1978
|
-
return (
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
onClick: handleOnChange(option),
|
|
1986
|
-
...option
|
|
1987
|
-
})
|
|
1988
|
-
);
|
|
1977
|
+
children: optionsSection.options.map((option, index) => {
|
|
1978
|
+
return /*#__PURE__*/jsx(NavigationOption, {
|
|
1979
|
+
isContainerAligned: !isLargeScreen,
|
|
1980
|
+
showMediaCircle: true,
|
|
1981
|
+
showMediaAtAllSizes: true,
|
|
1982
|
+
onClick: handleOnChange(option),
|
|
1983
|
+
...option
|
|
1984
|
+
}, index);
|
|
1989
1985
|
})
|
|
1990
1986
|
})]
|
|
1991
|
-
}))
|
|
1987
|
+
}, index))
|
|
1992
1988
|
});
|
|
1993
1989
|
}
|
|
1994
1990
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -2014,7 +2010,7 @@ function SelectOption({
|
|
|
2014
2010
|
"aria-label": hasSelected ? undefined : props['aria-label'],
|
|
2015
2011
|
onClick: handleOnClick(true),
|
|
2016
2012
|
children: hasSelected ? /*#__PURE__*/jsx(ChevronDown, {
|
|
2017
|
-
title: intl.formatMessage(messages$c.
|
|
2013
|
+
title: intl.formatMessage(messages$c.selectedActionLabel)
|
|
2018
2014
|
}) : placeholder.actionLabel || intl.formatMessage(messages$c.actionLabel)
|
|
2019
2015
|
})
|
|
2020
2016
|
}), /*#__PURE__*/jsx(ResponsivePanel, {
|
|
@@ -5035,20 +5031,17 @@ function InlineAlert({
|
|
|
5035
5031
|
className,
|
|
5036
5032
|
children
|
|
5037
5033
|
}) {
|
|
5038
|
-
return /*#__PURE__*/
|
|
5034
|
+
return /*#__PURE__*/jsxs("div", {
|
|
5039
5035
|
role: "alert",
|
|
5040
5036
|
id: id,
|
|
5041
5037
|
className: classNames('alert alert-detach', `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`, className),
|
|
5042
|
-
children: /*#__PURE__*/
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
children: children
|
|
5050
|
-
})]
|
|
5051
|
-
})
|
|
5038
|
+
children: [type !== Sentiment.NEUTRAL && type !== Sentiment.PENDING && /*#__PURE__*/jsx(StatusIcon, {
|
|
5039
|
+
sentiment: type,
|
|
5040
|
+
size: Size.SMALL
|
|
5041
|
+
}), /*#__PURE__*/jsx("div", {
|
|
5042
|
+
className: "np-text-body-default",
|
|
5043
|
+
children: children
|
|
5044
|
+
})]
|
|
5052
5045
|
});
|
|
5053
5046
|
}
|
|
5054
5047
|
|
|
@@ -9524,6 +9517,7 @@ var en = {
|
|
|
9524
9517
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
9525
9518
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
9526
9519
|
"neptune.SelectOption.action.label": "Choose",
|
|
9520
|
+
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
9527
9521
|
"neptune.Summary.statusDone": "Item done",
|
|
9528
9522
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
9529
9523
|
"neptune.Summary.statusPending": "Item pending",
|