@transferwise/components 0.0.0-experimental-c8fc1dc → 0.0.0-experimental-10c3d0b

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.js CHANGED
@@ -7602,42 +7602,34 @@ const InputWithDisplayFormat = props => /*#__PURE__*/jsxRuntime.jsx(WithDisplayF
7602
7602
 
7603
7603
  const InstructionsList = ({
7604
7604
  dos,
7605
- donts,
7606
- overrideCircleFillIcons = false
7605
+ donts
7607
7606
  }) => {
7608
7607
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
7609
7608
  className: "tw-instructions",
7610
- children: [dos && dos.map((doThis, index) => /*#__PURE__*/jsxRuntime.jsx(Instruction
7609
+ children: [dos && dos.map((doThis, index) =>
7610
+ /*#__PURE__*/
7611
7611
  // eslint-disable-next-line react/no-array-index-key
7612
- , {
7612
+ jsxRuntime.jsx(Instruction, {
7613
7613
  item: doThis,
7614
- type: "do",
7615
- overrideCircleFillIcons: overrideCircleFillIcons
7616
- }, index)), donts && donts.map((dont, index) => /*#__PURE__*/jsxRuntime.jsx(Instruction
7614
+ type: "do"
7615
+ }, index)), donts && donts.map((dont, index) =>
7616
+ /*#__PURE__*/
7617
7617
  // eslint-disable-next-line react/no-array-index-key
7618
- , {
7618
+ jsxRuntime.jsx(Instruction, {
7619
7619
  item: dont,
7620
- type: "dont",
7621
- overrideCircleFillIcons: overrideCircleFillIcons
7620
+ type: "dont"
7622
7621
  }, index))]
7623
7622
  });
7624
7623
  };
7625
7624
  function Instruction({
7626
7625
  item,
7627
- type,
7628
- overrideCircleFillIcons
7626
+ type
7629
7627
  }) {
7630
7628
  const isInstructionNode = typeof item === 'object' && item !== null && 'content' in item && 'aria-label' in item;
7631
7629
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
7632
7630
  className: "instruction",
7633
7631
  "aria-label": isInstructionNode ? item['aria-label'] : undefined,
7634
- children: [overrideCircleFillIcons ? type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.Check, {
7635
- size: 24,
7636
- className: type
7637
- }) : /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {
7638
- size: 24,
7639
- className: type
7640
- }) : type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {
7632
+ children: [type === 'do' ? /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {
7641
7633
  size: 24,
7642
7634
  className: type
7643
7635
  }) : /*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {
@@ -12592,16 +12584,16 @@ class Typeahead extends React.Component {
12592
12584
  label: query
12593
12585
  });
12594
12586
  } else {
12595
- switch (event.keyCode) {
12596
- case KeyCodes.DOWN:
12587
+ switch (event.key) {
12588
+ case 'ArrowDown':
12597
12589
  event.preventDefault();
12598
12590
  this.moveFocusedOption(1);
12599
12591
  break;
12600
- case KeyCodes.UP:
12592
+ case 'ArrowUp':
12601
12593
  event.preventDefault();
12602
12594
  this.moveFocusedOption(-1);
12603
12595
  break;
12604
- case KeyCodes.ENTER:
12596
+ case 'Enter':
12605
12597
  event.preventDefault();
12606
12598
  if (options[keyboardFocusedOptionIndex]) {
12607
12599
  this.selectItem(options[keyboardFocusedOptionIndex]);
@@ -12611,7 +12603,7 @@ class Typeahead extends React.Component {
12611
12603
  });
12612
12604
  }
12613
12605
  break;
12614
- case KeyCodes.BACKSPACE:
12606
+ case 'Backspace':
12615
12607
  if (multiple && !query && selected.length > 0) {
12616
12608
  this.updateSelectedValue(selected.slice(0, -1));
12617
12609
  }