@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/i18n/en.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
26
26
|
"neptune.SelectOption.action.label": "Choose",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
27
28
|
"neptune.Summary.statusDone": "Item done",
|
|
28
29
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
29
30
|
"neptune.Summary.statusPending": "Item pending",
|
package/build/index.js
CHANGED
|
@@ -1160,6 +1160,9 @@ function withInputAttributes(Component, args) {
|
|
|
1160
1160
|
var messages$c = reactIntl.defineMessages({
|
|
1161
1161
|
actionLabel: {
|
|
1162
1162
|
id: "neptune.SelectOption.action.label"
|
|
1163
|
+
},
|
|
1164
|
+
selectedActionLabel: {
|
|
1165
|
+
id: "neptune.SelectOption.selected.action.label"
|
|
1163
1166
|
}
|
|
1164
1167
|
});
|
|
1165
1168
|
|
|
@@ -1993,31 +1996,24 @@ function SelectOption({
|
|
|
1993
1996
|
className: classNames__default.default({
|
|
1994
1997
|
'np-select-option-list': isLargeScreen
|
|
1995
1998
|
}),
|
|
1996
|
-
children: options.map(optionsSection =>
|
|
1997
|
-
|
|
1998
|
-
// eslint-disable-next-line react/jsx-key
|
|
1999
|
-
jsxRuntime.jsxs(Section, {
|
|
2000
|
-
className: classNames__default.default('np-select-option-section', {
|
|
1999
|
+
children: options.map((optionsSection, index) => /*#__PURE__*/jsxRuntime.jsxs(Section, {
|
|
2000
|
+
className: classNames__default.default({
|
|
2001
2001
|
'p-x-2 p-y-1': isLargeScreen
|
|
2002
2002
|
}),
|
|
2003
2003
|
children: [optionsSection.title && /*#__PURE__*/jsxRuntime.jsx(Header, {
|
|
2004
2004
|
title: optionsSection.title
|
|
2005
2005
|
}), /*#__PURE__*/jsxRuntime.jsx(NavigationOptionList, {
|
|
2006
|
-
children: optionsSection.options.map(option => {
|
|
2007
|
-
return (
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
onClick: handleOnChange(option),
|
|
2015
|
-
...option
|
|
2016
|
-
})
|
|
2017
|
-
);
|
|
2006
|
+
children: optionsSection.options.map((option, index) => {
|
|
2007
|
+
return /*#__PURE__*/jsxRuntime.jsx(NavigationOption, {
|
|
2008
|
+
isContainerAligned: !isLargeScreen,
|
|
2009
|
+
showMediaCircle: true,
|
|
2010
|
+
showMediaAtAllSizes: true,
|
|
2011
|
+
onClick: handleOnChange(option),
|
|
2012
|
+
...option
|
|
2013
|
+
}, index);
|
|
2018
2014
|
})
|
|
2019
2015
|
})]
|
|
2020
|
-
}))
|
|
2016
|
+
}, index))
|
|
2021
2017
|
});
|
|
2022
2018
|
}
|
|
2023
2019
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -2043,7 +2039,7 @@ function SelectOption({
|
|
|
2043
2039
|
"aria-label": hasSelected ? undefined : props['aria-label'],
|
|
2044
2040
|
onClick: handleOnClick(true),
|
|
2045
2041
|
children: hasSelected ? /*#__PURE__*/jsxRuntime.jsx(icons.ChevronDown, {
|
|
2046
|
-
title: intl.formatMessage(messages$c.
|
|
2042
|
+
title: intl.formatMessage(messages$c.selectedActionLabel)
|
|
2047
2043
|
}) : placeholder.actionLabel || intl.formatMessage(messages$c.actionLabel)
|
|
2048
2044
|
})
|
|
2049
2045
|
}), /*#__PURE__*/jsxRuntime.jsx(ResponsivePanel, {
|
|
@@ -5064,20 +5060,17 @@ function InlineAlert({
|
|
|
5064
5060
|
className,
|
|
5065
5061
|
children
|
|
5066
5062
|
}) {
|
|
5067
|
-
return /*#__PURE__*/jsxRuntime.
|
|
5063
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
5068
5064
|
role: "alert",
|
|
5069
5065
|
id: id,
|
|
5070
5066
|
className: classNames__default.default('alert alert-detach', `alert-${type === exports.Sentiment.NEGATIVE || type === exports.Sentiment.ERROR ? 'danger' : type}`, className),
|
|
5071
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
children: children
|
|
5079
|
-
})]
|
|
5080
|
-
})
|
|
5067
|
+
children: [type !== exports.Sentiment.NEUTRAL && type !== exports.Sentiment.PENDING && /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
5068
|
+
sentiment: type,
|
|
5069
|
+
size: exports.Size.SMALL
|
|
5070
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
5071
|
+
className: "np-text-body-default",
|
|
5072
|
+
children: children
|
|
5073
|
+
})]
|
|
5081
5074
|
});
|
|
5082
5075
|
}
|
|
5083
5076
|
|
|
@@ -9553,6 +9546,7 @@ var en = {
|
|
|
9553
9546
|
"neptune.Select.searchPlaceholder": "Search...",
|
|
9554
9547
|
"neptune.SelectInput.noResultsFound": "No results found",
|
|
9555
9548
|
"neptune.SelectOption.action.label": "Choose",
|
|
9549
|
+
"neptune.SelectOption.selected.action.label": "Change chosen option",
|
|
9556
9550
|
"neptune.Summary.statusDone": "Item done",
|
|
9557
9551
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
9558
9552
|
"neptune.Summary.statusPending": "Item pending",
|