@transferwise/components 46.160.5 → 46.160.6

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.
Files changed (93) hide show
  1. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js +2 -0
  2. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
  3. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +2 -0
  4. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
  5. package/build/ExpressiveMoneyInput/hooks/useInputStyle.js +1 -1
  6. package/build/ExpressiveMoneyInput/hooks/useInputStyle.js.map +1 -1
  7. package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs +1 -1
  8. package/build/ExpressiveMoneyInput/hooks/useInputStyle.mjs.map +1 -1
  9. package/build/Inputs/Input/Input.js +1 -0
  10. package/build/Inputs/Input/Input.js.map +1 -1
  11. package/build/Inputs/Input/Input.mjs +1 -0
  12. package/build/Inputs/Input/Input.mjs.map +1 -1
  13. package/build/Inputs/TextArea/TextArea.js +1 -0
  14. package/build/Inputs/TextArea/TextArea.js.map +1 -1
  15. package/build/Inputs/TextArea/TextArea.mjs +1 -0
  16. package/build/Inputs/TextArea/TextArea.mjs.map +1 -1
  17. package/build/MoneyInput/MoneyInput.js +1 -0
  18. package/build/MoneyInput/MoneyInput.js.map +1 -1
  19. package/build/MoneyInput/MoneyInput.mjs +1 -0
  20. package/build/MoneyInput/MoneyInput.mjs.map +1 -1
  21. package/build/PhoneNumberInput/PhoneNumberInput.js +3 -2
  22. package/build/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
  23. package/build/PhoneNumberInput/PhoneNumberInput.messages.js +3 -0
  24. package/build/PhoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
  25. package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs +3 -0
  26. package/build/PhoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
  27. package/build/PhoneNumberInput/PhoneNumberInput.mjs +3 -2
  28. package/build/PhoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  29. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +50 -20
  30. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
  31. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +50 -20
  32. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
  33. package/build/i18n/en.json +1 -0
  34. package/build/i18n/en.json.js +1 -0
  35. package/build/i18n/en.json.js.map +1 -1
  36. package/build/i18n/en.json.mjs +1 -0
  37. package/build/i18n/en.json.mjs.map +1 -1
  38. package/build/main.css +51 -1
  39. package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
  40. package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
  41. package/build/styles/Inputs/Input/Input.css +19 -0
  42. package/build/styles/Inputs/TextArea/TextArea.css +16 -1
  43. package/build/styles/MoneyInput/MoneyInput.css +3 -0
  44. package/build/styles/PhoneNumberInput/PhoneNumberInput.css +7 -0
  45. package/build/styles/main.css +51 -1
  46. package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
  47. package/build/types/ExpressiveMoneyInput/hooks/useInputStyle.d.ts.map +1 -1
  48. package/build/types/Inputs/Input/Input.d.ts.map +1 -1
  49. package/build/types/Inputs/TextArea/TextArea.d.ts.map +1 -1
  50. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  51. package/build/types/PhoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  52. package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts +5 -0
  53. package/build/types/PhoneNumberInput/PhoneNumberInput.messages.d.ts.map +1 -1
  54. package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts +1 -1
  55. package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
  56. package/build/types/test-utils/index.d.ts +2 -0
  57. package/build/types/test-utils/index.d.ts.map +1 -1
  58. package/package.json +1 -1
  59. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +6 -0
  60. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +7 -0
  61. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +2 -1
  62. package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +6 -0
  63. package/src/ExpressiveMoneyInput/hooks/useInputStyle.ts +1 -2
  64. package/src/Field/_stories/Field.test.story.tsx +27 -0
  65. package/src/Inputs/Input/Input.css +19 -0
  66. package/src/Inputs/Input/Input.less +16 -0
  67. package/src/Inputs/Input/Input.tsx +1 -0
  68. package/src/Inputs/{_stories → InputGroup/_stories}/InputGroup.story.tsx +9 -9
  69. package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +80 -0
  70. package/src/Inputs/{_stories → SearchInput/_stories}/SearchInput.story.tsx +4 -4
  71. package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +38 -0
  72. package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +31 -19
  73. package/src/Inputs/TextArea/TextArea.css +16 -1
  74. package/src/Inputs/TextArea/TextArea.less +6 -1
  75. package/src/Inputs/TextArea/TextArea.tsx +1 -0
  76. package/src/Inputs/{_stories → TextArea/_stories}/TextArea.story.tsx +4 -4
  77. package/src/Inputs/{_stories → TextArea/_stories}/TextArea.test.story.tsx +50 -26
  78. package/src/MoneyInput/MoneyInput.css +3 -0
  79. package/src/MoneyInput/MoneyInput.less +6 -0
  80. package/src/MoneyInput/MoneyInput.tsx +1 -0
  81. package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +14 -10
  82. package/src/PhoneNumberInput/PhoneNumberInput.css +7 -0
  83. package/src/PhoneNumberInput/PhoneNumberInput.less +13 -0
  84. package/src/PhoneNumberInput/PhoneNumberInput.messages.ts +5 -0
  85. package/src/PhoneNumberInput/PhoneNumberInput.tsx +3 -2
  86. package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +15 -7
  87. package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +49 -34
  88. package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +31 -20
  89. package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +90 -57
  90. package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +8 -1
  91. package/src/main.css +51 -1
  92. package/src/Inputs/_stories/InputGroup.test.story.tsx +0 -69
  93. package/src/Inputs/_stories/SearchInput.test.story.tsx +0 -32
@@ -10,6 +10,9 @@
10
10
  font-weight: 600;
11
11
  font-weight: var(--font-weight-semi-bold);
12
12
  }
13
+ [dir="rtl"] .tw-money-input .money-input__number-input {
14
+ text-align: end;
15
+ }
13
16
  .tw-money-input .money-input-currency-flag {
14
17
  display: flex;
15
18
  align-items: center;
@@ -5,6 +5,9 @@
5
5
  margin-inline-start: 12px;
6
6
  margin-inline-start: var(--size-12);
7
7
  }
8
+ [dir="rtl"] .tw-telephone__number-input-field {
9
+ text-align: end;
10
+ }
8
11
  .tw-telephone__country-select {
9
12
  flex-basis: 120px;
10
13
  flex-shrink: 0;
@@ -12,6 +15,10 @@
12
15
  .tw-telephone__country-select .np-input-group {
13
16
  inline-size: 100%;
14
17
  }
18
+ [dir="rtl"] .tw-telephone__country-select .np-select-input-content {
19
+ text-align: end;
20
+ direction: ltr;
21
+ }
15
22
  .tw-telephone__country-select--with-input-group-addon-start .np-button-input {
16
23
  padding-inline-start: 48px;
17
24
  padding-inline-start: var(--size-48);
@@ -22607,6 +22607,25 @@ button.np-option {
22607
22607
  color: #768e9c;
22608
22608
  color: var(--color-content-tertiary);
22609
22609
  }
22610
+ [dir="rtl"] .np-input::-moz-placeholder {
22611
+ direction: rtl !important;
22612
+ }
22613
+ [dir="rtl"] .np-input:-moz-placeholder {
22614
+ direction: rtl !important;
22615
+ }
22616
+ [dir="rtl"] .np-input::placeholder,
22617
+ [dir="rtl"] .np-input:placeholder-shown {
22618
+ direction: rtl !important;
22619
+ }
22620
+ [dir="rtl"] .np-input:-moz-placeholder[type="email"], [dir="rtl"] .np-input:-moz-placeholder[type="tel"], [dir="rtl"] .np-input:-moz-placeholder[type="number"], [dir="rtl"] .np-input:-moz-placeholder[type="url"] {
22621
+ direction: ltr !important;
22622
+ }
22623
+ [dir="rtl"] .np-input:placeholder-shown[type="email"],
22624
+ [dir="rtl"] .np-input:placeholder-shown[type="tel"],
22625
+ [dir="rtl"] .np-input:placeholder-shown[type="number"],
22626
+ [dir="rtl"] .np-input:placeholder-shown[type="url"] {
22627
+ direction: ltr !important;
22628
+ }
22610
22629
  .np-input--shape-rectangle {
22611
22630
  border-radius: 10px !important;
22612
22631
  border-radius: var(--radius-small) !important;
@@ -23794,10 +23813,25 @@ button.np-option {
23794
23813
  color: #768e9c;
23795
23814
  color: var(--color-content-tertiary);
23796
23815
  }
23797
- .np-text-area::placeholder {
23816
+ .np-text-area:-moz-placeholder {
23798
23817
  color: #768e9c;
23799
23818
  color: var(--color-content-tertiary);
23800
23819
  }
23820
+ .np-text-area::placeholder,
23821
+ .np-text-area:placeholder-shown {
23822
+ color: #768e9c;
23823
+ color: var(--color-content-tertiary);
23824
+ }
23825
+ [dir="rtl"] .np-text-area::-moz-placeholder {
23826
+ direction: rtl !important;
23827
+ }
23828
+ [dir="rtl"] .np-text-area:-moz-placeholder {
23829
+ direction: rtl !important;
23830
+ }
23831
+ [dir="rtl"] .np-text-area::placeholder,
23832
+ [dir="rtl"] .np-text-area:placeholder-shown {
23833
+ direction: rtl !important;
23834
+ }
23801
23835
  .tw-instructions {
23802
23836
  /* Reset */
23803
23837
  margin: 0;
@@ -24208,6 +24242,9 @@ button.np-link {
24208
24242
  font-weight: 600;
24209
24243
  font-weight: var(--font-weight-semi-bold);
24210
24244
  }
24245
+ [dir="rtl"] .tw-money-input .money-input__number-input {
24246
+ text-align: end;
24247
+ }
24211
24248
  .tw-money-input .money-input-currency-flag {
24212
24249
  display: flex;
24213
24250
  align-items: center;
@@ -24276,6 +24313,10 @@ button.np-link {
24276
24313
  overflow: hidden;
24277
24314
  margin-block-end: 0 !important;
24278
24315
  }
24316
+ [dir="rtl"] .wds-amount-input-input-container {
24317
+ display: inline-grid;
24318
+ grid-template-columns: auto 1fr;
24319
+ }
24279
24320
  @media (prefers-reduced-motion: reduce) {
24280
24321
  .wds-amount-input-input-container {
24281
24322
  transition: none;
@@ -24288,6 +24329,8 @@ button.np-link {
24288
24329
  text-align: end;
24289
24330
  background-color: transparent;
24290
24331
  line-height: inherit;
24332
+ field-sizing: content;
24333
+ block-size: inherit;
24291
24334
  }
24292
24335
  .wds-amount-input-input:focus-visible {
24293
24336
  outline: none;
@@ -24552,6 +24595,9 @@ button.np-link {
24552
24595
  margin-inline-start: 12px;
24553
24596
  margin-inline-start: var(--size-12);
24554
24597
  }
24598
+ [dir="rtl"] .tw-telephone__number-input-field {
24599
+ text-align: end;
24600
+ }
24555
24601
  .tw-telephone__country-select {
24556
24602
  flex-basis: 120px;
24557
24603
  flex-shrink: 0;
@@ -24559,6 +24605,10 @@ button.np-link {
24559
24605
  .tw-telephone__country-select .np-input-group {
24560
24606
  inline-size: 100%;
24561
24607
  }
24608
+ [dir="rtl"] .tw-telephone__country-select .np-select-input-content {
24609
+ text-align: end;
24610
+ direction: ltr;
24611
+ }
24562
24612
  .tw-telephone__country-select--with-input-group-addon-start .np-button-input {
24563
24613
  padding-inline-start: 48px;
24564
24614
  padding-inline-start: var(--size-48);
@@ -1 +1 @@
1
- {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAezE,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,WAAW,GAAI,uFASzB,gBAAgB,gCAkTlB,CAAC"}
1
+ {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAezE,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,WAAW,GAAI,uFASzB,gBAAgB,gCAmTlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useInputStyle.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/hooks/useInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,SAAS,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CAClD,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,yCAAyC,gBAAgB,kBA6BtF,CAAC"}
1
+ {"version":3,"file":"useInputStyle.d.ts","sourceRoot":"","sources":["../../../../src/ExpressiveMoneyInput/hooks/useInputStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,SAAS,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CAClD,GAAG,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE/C,eAAO,MAAM,aAAa,GAAI,yCAAyC,gBAAgB,kBA4BtF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,MAAM,WAAW,UAAW,SAAQ,KAAK,CACvC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACpC;IACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEJ,eAAO,MAAM,KAAK,6HAmBhB,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,MAAM,WAAW,UAAW,SAAQ,KAAK,CACvC,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,EACpC;IACE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACnD,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEJ,eAAO,MAAM,KAAK,6HAoBhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/TextArea/TextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,MAAM,WAAW,aAAc,SAAQ,KAAK,CAC1C,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACvC;IACE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEJ,eAAO,MAAM,QAAQ,mIAmBnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/Inputs/TextArea/TextArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,MAAM,WAAW,aAAc,SAAQ,KAAK,CAC1C,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACvC;IACE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF;CAAG;AAEJ,eAAO,MAAM,QAAQ,mIAoBnB,CAAC;AAEH,eAA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,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB;IACpB,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IACvD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAKD,QAAA,MAAM,gBAAgB,GAAI,gMAevB,qBAAqB,gCAwNvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -11,6 +11,11 @@ declare const _default: {
11
11
  id: string;
12
12
  defaultMessage: string;
13
13
  };
14
+ phoneNumberPrefix: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ description: string;
18
+ };
14
19
  };
15
20
  export default _default;
16
21
  //# sourceMappingURL=PhoneNumberInput.messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneNumberInput.messages.d.ts","sourceRoot":"","sources":["../../../src/PhoneNumberInput/PhoneNumberInput.messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,wBAaG"}
1
+ {"version":3,"file":"PhoneNumberInput.messages.d.ts","sourceRoot":"","sources":["../../../src/PhoneNumberInput/PhoneNumberInput.messages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,wBAkBG"}
@@ -24,7 +24,7 @@ export default class TypeaheadInput<T> extends Component<TypeaheadInputProps<T>,
24
24
  componentDidMount(): void;
25
25
  componentDidUpdate(previousProps: TypeaheadInputProps<T>): void;
26
26
  recalculateWidth: () => void;
27
- renderInput: () => import("react").JSX.Element;
27
+ renderInput: (isRTL: boolean) => import("react").JSX.Element;
28
28
  render(): import("react").JSX.Element;
29
29
  }
30
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TypeaheadInput.d.ts","sourceRoot":"","sources":["../../../../src/Typeahead/TypeaheadInput/TypeaheadInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI/D,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACvD,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,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,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC;AAEpG,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,CAAC,CAAE,SAAQ,SAAS,CACtD,mBAAmB,CAAC,CAAC,CAAC,EACtB,mBAAmB,CACpB;IACC,QAAQ,8CAAiC;IACzC,QAAQ,4CAA+B;gBAE3B,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAQzC,iBAAiB;IAUjB,kBAAkB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAMxD,gBAAgB,aAMd;IAEF,WAAW,GAAI,OAAO,OAAO,iCA6C3B;IAEF,MAAM;CAiCP"}
@@ -45,6 +45,7 @@ declare function customRender(ui: ReactElement, { locale, messages, ...renderOpt
45
45
  "neptune.PhoneNumberInput.SelectInput.placeholder": string;
46
46
  "neptune.PhoneNumberInput.countryCodeLabel": string;
47
47
  "neptune.PhoneNumberInput.phoneNumberLabel": string;
48
+ "neptune.PhoneNumberInput.phoneNumberPrefix": string;
48
49
  "neptune.Select.searchPlaceholder": string;
49
50
  "neptune.SelectInput.noResultsFound": string;
50
51
  "neptune.StatusIcon.iconLabel.error": string;
@@ -138,6 +139,7 @@ declare function customRenderHook(callback: () => unknown, { locale, messages }?
138
139
  "neptune.PhoneNumberInput.SelectInput.placeholder": string;
139
140
  "neptune.PhoneNumberInput.countryCodeLabel": string;
140
141
  "neptune.PhoneNumberInput.phoneNumberLabel": string;
142
+ "neptune.PhoneNumberInput.phoneNumberPrefix": string;
141
143
  "neptune.Select.searchPlaceholder": string;
142
144
  "neptune.SelectInput.noResultsFound": string;
143
145
  "neptune.StatusIcon.iconLabel.error": string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAM,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAc,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAMxD;;;;GAIG;AACH,iBAAS,YAAY,CACnB,EAAE,EAAE,YAAY,EAChB,EAAE,MAAuB,EAAE,QAAa,EAAE,GAAG,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,GAChE,UAAU,CAAC,OAAO,MAAM,CAAC,CAK3B;AAED;;;GAGG;AACH,iBAAS,gBAAgB,CACvB,QAAQ,EAAE,MAAM,OAAO,EACvB,EAAE,MAAuB,EAAE,QAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,uEAKhD;AAED,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,gBAAgB,IAAI,UAAU,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test-utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAM,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,MAAM,EAAc,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAMxD;;;;GAIG;AACH,iBAAS,YAAY,CACnB,EAAE,EAAE,YAAY,EAChB,EAAE,MAAuB,EAAE,QAAa,EAAE,GAAG,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,GAChE,UAAU,CAAC,OAAO,MAAM,CAAC,CAK3B;AAED;;;GAGG;AACH,iBAAS,gBAAgB,CACvB,QAAQ,EAAE,MAAM,OAAO,EACvB,EAAE,MAAuB,EAAE,QAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAK,uEAKhD;AAED,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,gBAAgB,IAAI,UAAU,EAAE,SAAS,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "46.160.5",
3
+ "version": "46.160.6",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -10,6 +10,10 @@
10
10
  overflow: hidden;
11
11
  margin-block-end: 0 !important;
12
12
  }
13
+ [dir="rtl"] .wds-amount-input-input-container {
14
+ display: inline-grid;
15
+ grid-template-columns: auto 1fr;
16
+ }
13
17
  @media (prefers-reduced-motion: reduce) {
14
18
  .wds-amount-input-input-container {
15
19
  transition: none;
@@ -22,6 +26,8 @@
22
26
  text-align: end;
23
27
  background-color: transparent;
24
28
  line-height: inherit;
29
+ field-sizing: content;
30
+ block-size: inherit;
25
31
  }
26
32
  .wds-amount-input-input:focus-visible {
27
33
  outline: none;
@@ -15,6 +15,11 @@
15
15
  color: var(--color-interactive-primary);
16
16
  overflow: hidden;
17
17
  margin-bottom: 0 !important;
18
+
19
+ [dir="rtl"] & {
20
+ display: inline-grid;
21
+ grid-template-columns: auto 1fr;
22
+ }
18
23
  }
19
24
 
20
25
  @media (prefers-reduced-motion: reduce) {
@@ -30,6 +35,8 @@
30
35
  text-align: right;
31
36
  background-color: transparent;
32
37
  line-height: inherit;
38
+ field-sizing: content;
39
+ height: inherit;
33
40
 
34
41
  &:focus-visible {
35
42
  outline: none;
@@ -296,13 +296,14 @@ export const AmountInput = ({
296
296
  });
297
297
 
298
298
  return (
299
- <div className="wds-amount-input-container">
299
+ <div className="wds-amount-input-container" dir="ltr">
300
300
  <div
301
301
  className={clsx('wds-amount-input-input-container', 'np-text-display-large--forced')}
302
302
  style={style}
303
303
  >
304
304
  <input
305
305
  ref={ref}
306
+ dir="auto"
306
307
  className="wds-amount-input-input"
307
308
  id={id}
308
309
  autoComplete="off"
@@ -10,6 +10,10 @@
10
10
  overflow: hidden;
11
11
  margin-block-end: 0 !important;
12
12
  }
13
+ [dir="rtl"] .wds-amount-input-input-container {
14
+ display: inline-grid;
15
+ grid-template-columns: auto 1fr;
16
+ }
13
17
  @media (prefers-reduced-motion: reduce) {
14
18
  .wds-amount-input-input-container {
15
19
  transition: none;
@@ -22,6 +26,8 @@
22
26
  text-align: end;
23
27
  background-color: transparent;
24
28
  line-height: inherit;
29
+ field-sizing: content;
30
+ block-size: inherit;
25
31
  }
26
32
  .wds-amount-input-input:focus-visible {
27
33
  outline: none;
@@ -16,14 +16,13 @@ type InputStyleObject = {
16
16
 
17
17
  export const useInputStyle = ({ value, focus, inputElement, loading }: InputStyleObject) => {
18
18
  const initialRender = !useTimeout(300);
19
- const inputWidth = useFirstDefinedValue(inputElement?.current?.clientWidth, [
19
+ const inputWidth = useFirstDefinedValue(inputElement?.current?.parentElement?.clientWidth, [
20
20
  inputElement?.current,
21
21
  value,
22
22
  ]);
23
23
 
24
24
  const getStyle = useCallback((): CSSProperties => {
25
25
  const fontSize = getFontSize(value, focus, inputWidth);
26
-
27
26
  return {
28
27
  fontSize,
29
28
  height: fontSize,
@@ -62,6 +62,22 @@ export const RTLDiff: Story = {
62
62
  const i18n = useRtlDiffI18n();
63
63
  return (
64
64
  <>
65
+ <Field label="Localised placeholder">
66
+ <Input placeholder={i18n.placeholder_ar} />
67
+ </Field>
68
+
69
+ <Field label="Localised value">
70
+ <Input defaultValue={i18n.value_ar} />
71
+ </Field>
72
+
73
+ <Field label="LTR placeholder (email input)">
74
+ <Input placeholder={i18n.placeholder_en} type="email" />
75
+ </Field>
76
+
77
+ <Field label="LTR value (email input)">
78
+ <Input defaultValue={i18n.value_en} />
79
+ </Field>
80
+
65
81
  <Field label={i18n.requiredLabel}>
66
82
  <Input defaultValue={i18n.inputValue} />
67
83
  </Field>
@@ -95,7 +111,18 @@ export const RTLDiff: Story = {
95
111
  );
96
112
  },
97
113
  ...withRTLDiff({
114
+ width: 'stretch',
98
115
  i18n: {
116
+ placeholder_en: { ltr: 'LTR placeholder...', rtl: 'LTR placeholder...' },
117
+ placeholder_ar: { ltr: 'Localised placeholder...', rtl: 'نص بديل مترجم...' },
118
+ value_en: {
119
+ ltr: 'ltr@value.com',
120
+ rtl: 'ltr@value.com',
121
+ },
122
+ value_ar: {
123
+ ltr: 'localised value',
124
+ rtl: 'قيمة مُكيَّفة محلياً',
125
+ },
99
126
  requiredLabel: { ltr: 'Required field', rtl: 'حقل مطلوب' },
100
127
  optionalLabel: { ltr: 'Optional field', rtl: 'حقل اختياري' },
101
128
  descriptionLabel: { ltr: 'Field with description and message', rtl: 'حقل مع وصف ورسالة' },
@@ -147,6 +147,25 @@
147
147
  color: #768e9c;
148
148
  color: var(--color-content-tertiary);
149
149
  }
150
+ [dir="rtl"] .np-input::-moz-placeholder {
151
+ direction: rtl !important;
152
+ }
153
+ [dir="rtl"] .np-input:-moz-placeholder {
154
+ direction: rtl !important;
155
+ }
156
+ [dir="rtl"] .np-input::placeholder,
157
+ [dir="rtl"] .np-input:placeholder-shown {
158
+ direction: rtl !important;
159
+ }
160
+ [dir="rtl"] .np-input:-moz-placeholder[type="email"], [dir="rtl"] .np-input:-moz-placeholder[type="tel"], [dir="rtl"] .np-input:-moz-placeholder[type="number"], [dir="rtl"] .np-input:-moz-placeholder[type="url"] {
161
+ direction: ltr !important;
162
+ }
163
+ [dir="rtl"] .np-input:placeholder-shown[type="email"],
164
+ [dir="rtl"] .np-input:placeholder-shown[type="tel"],
165
+ [dir="rtl"] .np-input:placeholder-shown[type="number"],
166
+ [dir="rtl"] .np-input:placeholder-shown[type="url"] {
167
+ direction: ltr !important;
168
+ }
150
169
  .np-input--shape-rectangle {
151
170
  border-radius: 10px !important;
152
171
  border-radius: var(--radius-small) !important;
@@ -5,6 +5,22 @@
5
5
  color: var(--color-content-tertiary);
6
6
  }
7
7
 
8
+ &::placeholder,
9
+ &:placeholder-shown{
10
+ [dir="rtl"] & {
11
+ direction: rtl !important;
12
+ }
13
+ }
14
+
15
+ &:placeholder-shown[type="email"],
16
+ &:placeholder-shown[type="tel"],
17
+ &:placeholder-shown[type="number"],
18
+ &:placeholder-shown[type="url"] {
19
+ [dir="rtl"] & {
20
+ direction: ltr !important;
21
+ }
22
+ }
23
+
8
24
  &--shape-rectangle {
9
25
  border-radius: var(--radius-small) !important;
10
26
  }
@@ -26,6 +26,7 @@ export const Input = forwardRef(function Input(
26
26
  return (
27
27
  <input
28
28
  ref={reference}
29
+ dir="auto"
29
30
  className={clsx(className, inputClassNameBase({ size }), 'np-input', {
30
31
  'np-input--shape-rectangle': shape === 'rectangle',
31
32
  'np-input--shape-pill': shape === 'pill',
@@ -1,19 +1,19 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { Search } from '@transferwise/icons';
3
2
  import { useRef, useState } from 'react';
3
+ import { Search } from '@transferwise/icons';
4
+ import { Flag } from '@wise/art';
4
5
 
5
6
  import {
6
7
  createSandboxStory,
7
8
  globalScope,
8
- } from '../../../.storybook/components/sandbox/SandboxEditor';
9
- import Field from '../../Field';
9
+ } from '../../../../.storybook/components/sandbox/SandboxEditor';
10
10
 
11
- import { Input } from '../Input/Input';
12
- import { Flag } from '@wise/art';
13
- import { InputGroup } from '../InputGroup/InputGroup';
14
- import AvatarView from '../../AvatarView';
15
- import PhoneNumberInput from '../../PhoneNumberInput';
16
- import Button from '../../Button';
11
+ import Field from '../../../Field';
12
+ import AvatarView from '../../../AvatarView';
13
+ import PhoneNumberInput from '../../../PhoneNumberInput';
14
+ import Button from '../../../Button';
15
+ import { Input } from '../../Input/Input';
16
+ import { InputGroup } from '../InputGroup';
17
17
 
18
18
  export default {
19
19
  component: InputGroup,
@@ -0,0 +1,80 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { Search } from '@transferwise/icons';
3
+
4
+ import { useRtlDiffI18n, withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
5
+ import Button from '../../../Button';
6
+ import { Input } from '../../Input/Input';
7
+ import { InputGroup } from '../InputGroup';
8
+
9
+ export default {
10
+ component: InputGroup,
11
+ title: 'Forms/InputGroup/Tests',
12
+ tags: ['!autodocs', '!manifest'],
13
+ } satisfies Meta<typeof InputGroup>;
14
+
15
+ type Story = StoryObj<typeof InputGroup>;
16
+
17
+ /**
18
+ * InputGroup positions addons at the logical start or end of an input.
19
+ * In RTL mode the start and end sides are mirrored, so an addonStart icon
20
+ * should appear on the right and an addonEnd button should appear on the left.
21
+ * All three placement combinations are included to verify each case.
22
+ */
23
+ export const RTLDiff: Story = {
24
+ render: () => {
25
+ const i18n = useRtlDiffI18n();
26
+
27
+ return (
28
+ <>
29
+ <InputGroup
30
+ addonStart={{
31
+ content: <Search size={24} />,
32
+ initialContentWidth: 24,
33
+ }}
34
+ >
35
+ <Input placeholder={i18n.placeholder_start} />
36
+ </InputGroup>
37
+
38
+ <InputGroup
39
+ addonEnd={{
40
+ content: (
41
+ <Button v2 size="sm">
42
+ Copy
43
+ </Button>
44
+ ),
45
+ interactive: true,
46
+ padding: 'sm',
47
+ }}
48
+ >
49
+ <Input placeholder={i18n.placeholder_end} />
50
+ </InputGroup>
51
+
52
+ <InputGroup
53
+ addonStart={{
54
+ content: <Search size={24} />,
55
+ initialContentWidth: 24,
56
+ }}
57
+ addonEnd={{
58
+ content: (
59
+ <Button v2 size="sm">
60
+ Clear
61
+ </Button>
62
+ ),
63
+ interactive: true,
64
+ padding: 'sm',
65
+ }}
66
+ >
67
+ <Input placeholder={i18n.placeholder_both} />
68
+ </InputGroup>
69
+ </>
70
+ );
71
+ },
72
+ ...withRTLDiff({
73
+ i18n:{
74
+ placeholder_both: { ltr: 'addonStart and addonEnd', rtl: 'البادئة والنهاية' },
75
+ placeholder_start: { ltr: 'addonStart only', rtl: 'البادئة فقط' },
76
+ placeholder_end: { ltr: 'addonEnd only', rtl: 'النهاية فقط' },
77
+
78
+ }
79
+ }),
80
+ };
@@ -4,11 +4,11 @@ import { useState } from 'react';
4
4
  import {
5
5
  createSandboxStory,
6
6
  globalScope,
7
- } from '../../../.storybook/components/sandbox/SandboxEditor';
8
- import { Size } from '../../common';
9
- import Field from '../../Field';
7
+ } from '../../../../.storybook/components/sandbox/SandboxEditor';
8
+ import { Size } from '../../../common';
9
+ import Field from '../../../Field';
10
10
 
11
- import { SearchInput } from '../SearchInput/SearchInput';
11
+ import { SearchInput } from '../SearchInput';
12
12
 
13
13
  export default {
14
14
  component: SearchInput,
@@ -0,0 +1,38 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+
3
+ import { useRtlDiffI18n, withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
4
+ import { Size } from '../../../common';
5
+ import { SearchInput } from '../SearchInput';
6
+
7
+ export default {
8
+ component: SearchInput,
9
+ title: 'Forms/SearchInput/Tests',
10
+ tags: ['!autodocs', '!manifest'],
11
+ } satisfies Meta<typeof SearchInput>;
12
+
13
+ type Story = StoryObj<typeof SearchInput>;
14
+
15
+ export const RTLDiff: Story = {
16
+ render: () => {
17
+ const i18n = useRtlDiffI18n();
18
+
19
+ return (
20
+ <>
21
+ {/* sm — search icon (addonStart) position flips to trailing side in RTL */}
22
+ <SearchInput size={Size.SMALL} shape="pill" placeholder={i18n.placeholder} />
23
+
24
+ {/* md — search icon (addonStart) position flips to trailing side in RTL */}
25
+ <SearchInput size={Size.MEDIUM} shape="pill" placeholder={i18n.placeholder} />
26
+
27
+ {/* sm rectangle — icon flip with rectangle shape */}
28
+ <SearchInput size={Size.SMALL} shape="rectangle" placeholder={i18n.placeholder} />
29
+
30
+ {/* md rectangle — icon flip with rectangle shape */}
31
+ <SearchInput size={Size.MEDIUM} shape="rectangle" placeholder={i18n.placeholder} />
32
+ </>
33
+ );
34
+ },
35
+ ...withRTLDiff({i18n:{
36
+ placeholder: { ltr: 'Search', rtl: 'بحث' },
37
+ }}),
38
+ };