@transferwise/components 0.0.0-experimental-32cf8db → 0.0.0-experimental-68c810c
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 +31 -30
- package/build/index.esm.js.map +1 -1
- package/build/index.js +31 -30
- 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/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts +3 -0
- package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +3 -4
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +10 -3
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/common/polymorphicWithOverrides/PolymorphicWithOverrides.tsx +3 -0
- package/src/index.ts +3 -0
- package/src/inputs/SelectInput.tsx +3 -3
- package/src/instructionsList/InstructionList.story.tsx +39 -0
- package/src/instructionsList/InstructionsList.css +1 -1
- package/src/instructionsList/InstructionsList.less +3 -15
- package/src/instructionsList/InstructionsList.spec.tsx +35 -0
- package/src/instructionsList/InstructionsList.tsx +40 -25
- package/src/main.css +1 -1
- package/src/instructionsList/InstructionList.story.js +0 -27
- package/src/instructionsList/InstructionsList.spec.js +0 -29
package/build/index.js
CHANGED
|
@@ -7489,47 +7489,48 @@ InputWithDisplayFormat.propTypes = {
|
|
|
7489
7489
|
};
|
|
7490
7490
|
var InputWithDisplayFormat$1 = InputWithDisplayFormat;
|
|
7491
7491
|
|
|
7492
|
-
const InstructionsList =
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
const {
|
|
7497
|
-
dos,
|
|
7498
|
-
donts
|
|
7499
|
-
} = props;
|
|
7500
|
-
const DontIcon = isModern ? icons.CrossCircleFill : icons.CrossCircle;
|
|
7501
|
-
const DoIcon = isModern ? icons.CheckCircleFill : icons.CheckCircle;
|
|
7492
|
+
const InstructionsList = ({
|
|
7493
|
+
dos,
|
|
7494
|
+
donts
|
|
7495
|
+
}) => {
|
|
7502
7496
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7503
7497
|
className: "tw-instructions",
|
|
7504
7498
|
children: [dos && dos.map((doThis, index) =>
|
|
7505
7499
|
/*#__PURE__*/
|
|
7506
7500
|
// eslint-disable-next-line react/no-array-index-key
|
|
7507
|
-
jsxRuntime.
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
size: 24,
|
|
7511
|
-
className: "do"
|
|
7512
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
7513
|
-
className: "text-primary",
|
|
7514
|
-
type: exports.Typography.BODY_LARGE,
|
|
7515
|
-
children: doThis
|
|
7516
|
-
})]
|
|
7501
|
+
jsxRuntime.jsx(Instruction, {
|
|
7502
|
+
item: doThis,
|
|
7503
|
+
type: "do"
|
|
7517
7504
|
}, index)), donts && donts.map((dont, index) =>
|
|
7518
7505
|
/*#__PURE__*/
|
|
7519
7506
|
// eslint-disable-next-line react/no-array-index-key
|
|
7520
|
-
jsxRuntime.
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
size: 24,
|
|
7524
|
-
className: "dont"
|
|
7525
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
7526
|
-
className: "text-primary",
|
|
7527
|
-
type: exports.Typography.BODY_LARGE,
|
|
7528
|
-
children: dont
|
|
7529
|
-
})]
|
|
7507
|
+
jsxRuntime.jsx(Instruction, {
|
|
7508
|
+
item: dont,
|
|
7509
|
+
type: "dont"
|
|
7530
7510
|
}, index))]
|
|
7531
7511
|
});
|
|
7532
7512
|
};
|
|
7513
|
+
function Instruction({
|
|
7514
|
+
item,
|
|
7515
|
+
type
|
|
7516
|
+
}) {
|
|
7517
|
+
const isInstructionNode = typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;
|
|
7518
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7519
|
+
className: "instruction",
|
|
7520
|
+
"aria-label": isInstructionNode ? item['aria-label'] : undefined,
|
|
7521
|
+
children: [type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {
|
|
7522
|
+
size: 24,
|
|
7523
|
+
className: type
|
|
7524
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {
|
|
7525
|
+
size: 24,
|
|
7526
|
+
className: type
|
|
7527
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
7528
|
+
className: "text-primary",
|
|
7529
|
+
type: exports.Typography.BODY_LARGE,
|
|
7530
|
+
children: isInstructionNode ? item.content : item
|
|
7531
|
+
})]
|
|
7532
|
+
});
|
|
7533
|
+
}
|
|
7533
7534
|
var InstructionsList$1 = InstructionsList;
|
|
7534
7535
|
|
|
7535
7536
|
const Loader = ({
|