@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.esm.js
CHANGED
|
@@ -1134,12 +1134,6 @@ const Alert = props => {
|
|
|
1134
1134
|
});
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
|
-
function calculateAriaLive() {
|
|
1138
|
-
if ([Sentiment.NEGATIVE, Sentiment.POSITIVE, Sentiment.WARNING].includes(mappedType)) {
|
|
1139
|
-
return 'assertive';
|
|
1140
|
-
}
|
|
1141
|
-
return 'polite';
|
|
1142
|
-
}
|
|
1143
1137
|
const handleTouchStart = () => setShouldFire(true);
|
|
1144
1138
|
const handleTouchMove = () => setShouldFire(false);
|
|
1145
1139
|
const handleTouchEnd = event => {
|
|
@@ -1157,7 +1151,6 @@ const Alert = props => {
|
|
|
1157
1151
|
};
|
|
1158
1152
|
return /*#__PURE__*/jsxs("div", {
|
|
1159
1153
|
role: "alert",
|
|
1160
|
-
"aria-live": calculateAriaLive(),
|
|
1161
1154
|
className: classNames('alert d-flex', `alert-${mappedType}`, className),
|
|
1162
1155
|
onTouchStart: handleTouchStart,
|
|
1163
1156
|
onTouchEnd: handleTouchEnd,
|
|
@@ -7237,16 +7230,12 @@ InputWithDisplayFormat.propTypes = {
|
|
|
7237
7230
|
};
|
|
7238
7231
|
var InputWithDisplayFormat$1 = InputWithDisplayFormat;
|
|
7239
7232
|
|
|
7240
|
-
const InstructionsList =
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
donts
|
|
7247
|
-
} = props;
|
|
7248
|
-
const DontIcon = isModern ? CrossCircleFill : CrossCircle;
|
|
7249
|
-
const DoIcon = isModern ? CheckCircleFill : CheckCircle;
|
|
7233
|
+
const InstructionsList = ({
|
|
7234
|
+
dos,
|
|
7235
|
+
donts,
|
|
7236
|
+
'do-aria-label': doAriaLabel = undefined,
|
|
7237
|
+
'dont-aria-label': dontAriaLabel = undefined
|
|
7238
|
+
}) => {
|
|
7250
7239
|
return /*#__PURE__*/jsxs("div", {
|
|
7251
7240
|
className: "tw-instructions",
|
|
7252
7241
|
children: [dos && dos.map((doThis, index) =>
|
|
@@ -7254,9 +7243,10 @@ const InstructionsList = props => {
|
|
|
7254
7243
|
// eslint-disable-next-line react/no-array-index-key
|
|
7255
7244
|
jsxs("div", {
|
|
7256
7245
|
className: "instruction",
|
|
7257
|
-
children: [/*#__PURE__*/jsx(
|
|
7246
|
+
children: [/*#__PURE__*/jsx(CheckCircleFill, {
|
|
7258
7247
|
size: 24,
|
|
7259
|
-
className: "do"
|
|
7248
|
+
className: "do",
|
|
7249
|
+
title: doAriaLabel
|
|
7260
7250
|
}), /*#__PURE__*/jsx(Body, {
|
|
7261
7251
|
className: "text-primary",
|
|
7262
7252
|
type: Typography.BODY_LARGE,
|
|
@@ -7267,9 +7257,10 @@ const InstructionsList = props => {
|
|
|
7267
7257
|
// eslint-disable-next-line react/no-array-index-key
|
|
7268
7258
|
jsxs("div", {
|
|
7269
7259
|
className: "instruction",
|
|
7270
|
-
children: [/*#__PURE__*/jsx(
|
|
7260
|
+
children: [/*#__PURE__*/jsx(CrossCircleFill, {
|
|
7271
7261
|
size: 24,
|
|
7272
|
-
className: "dont"
|
|
7262
|
+
className: "dont",
|
|
7263
|
+
title: dontAriaLabel
|
|
7273
7264
|
}), /*#__PURE__*/jsx(Body, {
|
|
7274
7265
|
className: "text-primary",
|
|
7275
7266
|
type: Typography.BODY_LARGE,
|