@transferwise/components 0.0.0-experimental-991400c → 0.0.0-experimental-fb447f5
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/index.esm.js +12 -21
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -21
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/instructionsList/InstructionsList.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +9 -1
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/alert/Alert.js +0 -8
- package/src/alert/Alert.spec.js +0 -9
- package/src/instructionsList/InstructionList.story.js +31 -0
- package/src/instructionsList/InstructionsList.css +1 -1
- package/src/instructionsList/InstructionsList.less +3 -15
- package/src/instructionsList/InstructionsList.spec.tsx +50 -0
- package/src/instructionsList/InstructionsList.tsx +17 -10
- package/src/main.css +1 -1
- package/src/instructionsList/InstructionsList.spec.js +0 -29
package/build/index.js
CHANGED
|
@@ -1167,12 +1167,6 @@ const Alert = props => {
|
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
function calculateAriaLive() {
|
|
1171
|
-
if ([exports.Sentiment.NEGATIVE, exports.Sentiment.POSITIVE, exports.Sentiment.WARNING].includes(mappedType)) {
|
|
1172
|
-
return 'assertive';
|
|
1173
|
-
}
|
|
1174
|
-
return 'polite';
|
|
1175
|
-
}
|
|
1176
1170
|
const handleTouchStart = () => setShouldFire(true);
|
|
1177
1171
|
const handleTouchMove = () => setShouldFire(false);
|
|
1178
1172
|
const handleTouchEnd = event => {
|
|
@@ -1190,7 +1184,6 @@ const Alert = props => {
|
|
|
1190
1184
|
};
|
|
1191
1185
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1192
1186
|
role: "alert",
|
|
1193
|
-
"aria-live": calculateAriaLive(),
|
|
1194
1187
|
className: classNames__default.default('alert d-flex', `alert-${mappedType}`, className),
|
|
1195
1188
|
onTouchStart: handleTouchStart,
|
|
1196
1189
|
onTouchEnd: handleTouchEnd,
|
|
@@ -7270,16 +7263,12 @@ InputWithDisplayFormat.propTypes = {
|
|
|
7270
7263
|
};
|
|
7271
7264
|
var InputWithDisplayFormat$1 = InputWithDisplayFormat;
|
|
7272
7265
|
|
|
7273
|
-
const InstructionsList =
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
donts
|
|
7280
|
-
} = props;
|
|
7281
|
-
const DontIcon = isModern ? icons.CrossCircleFill : icons.CrossCircle;
|
|
7282
|
-
const DoIcon = isModern ? icons.CheckCircleFill : icons.CheckCircle;
|
|
7266
|
+
const InstructionsList = ({
|
|
7267
|
+
dos,
|
|
7268
|
+
donts,
|
|
7269
|
+
'do-aria-label': doAriaLabel = undefined,
|
|
7270
|
+
'dont-aria-label': dontAriaLabel = undefined
|
|
7271
|
+
}) => {
|
|
7283
7272
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7284
7273
|
className: "tw-instructions",
|
|
7285
7274
|
children: [dos && dos.map((doThis, index) =>
|
|
@@ -7287,9 +7276,10 @@ const InstructionsList = props => {
|
|
|
7287
7276
|
// eslint-disable-next-line react/no-array-index-key
|
|
7288
7277
|
jsxRuntime.jsxs("div", {
|
|
7289
7278
|
className: "instruction",
|
|
7290
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
7279
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {
|
|
7291
7280
|
size: 24,
|
|
7292
|
-
className: "do"
|
|
7281
|
+
className: "do",
|
|
7282
|
+
title: doAriaLabel
|
|
7293
7283
|
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
7294
7284
|
className: "text-primary",
|
|
7295
7285
|
type: exports.Typography.BODY_LARGE,
|
|
@@ -7300,9 +7290,10 @@ const InstructionsList = props => {
|
|
|
7300
7290
|
// eslint-disable-next-line react/no-array-index-key
|
|
7301
7291
|
jsxRuntime.jsxs("div", {
|
|
7302
7292
|
className: "instruction",
|
|
7303
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
7293
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {
|
|
7304
7294
|
size: 24,
|
|
7305
|
-
className: "dont"
|
|
7295
|
+
className: "dont",
|
|
7296
|
+
title: dontAriaLabel
|
|
7306
7297
|
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
7307
7298
|
className: "text-primary",
|
|
7308
7299
|
type: exports.Typography.BODY_LARGE,
|