@transferwise/components 46.111.0 → 46.112.0

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 (170) hide show
  1. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  2. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  3. package/build/avatarView/AvatarView.js +27 -29
  4. package/build/avatarView/AvatarView.js.map +1 -1
  5. package/build/avatarView/AvatarView.mjs +27 -29
  6. package/build/avatarView/AvatarView.mjs.map +1 -1
  7. package/build/avatarView/{NotificationDot.js → Dot.js} +14 -12
  8. package/build/avatarView/Dot.js.map +1 -0
  9. package/build/avatarView/{NotificationDot.mjs → Dot.mjs} +14 -12
  10. package/build/avatarView/Dot.mjs.map +1 -0
  11. package/build/badge/BadgeAssets.js.map +1 -1
  12. package/build/badge/BadgeAssets.mjs.map +1 -1
  13. package/build/common/panel/Panel.js +1 -0
  14. package/build/common/panel/Panel.js.map +1 -1
  15. package/build/common/panel/Panel.mjs +1 -0
  16. package/build/common/panel/Panel.mjs.map +1 -1
  17. package/build/common/responsivePanel/ResponsivePanel.js +6 -1
  18. package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
  19. package/build/common/responsivePanel/ResponsivePanel.mjs +6 -1
  20. package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
  21. package/build/dateInput/DateInput.js +46 -24
  22. package/build/dateInput/DateInput.js.map +1 -1
  23. package/build/dateInput/DateInput.mjs +48 -26
  24. package/build/dateInput/DateInput.mjs.map +1 -1
  25. package/build/dateLookup/DateLookup.js +5 -2
  26. package/build/dateLookup/DateLookup.js.map +1 -1
  27. package/build/dateLookup/DateLookup.mjs +5 -2
  28. package/build/dateLookup/DateLookup.mjs.map +1 -1
  29. package/build/dateLookup/dateTrigger/DateTrigger.js +2 -0
  30. package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
  31. package/build/dateLookup/dateTrigger/DateTrigger.mjs +2 -0
  32. package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
  33. package/build/field/Field.js +7 -2
  34. package/build/field/Field.js.map +1 -1
  35. package/build/field/Field.mjs +13 -8
  36. package/build/field/Field.mjs.map +1 -1
  37. package/build/inputs/InputGroup.js +1 -1
  38. package/build/inputs/InputGroup.js.map +1 -1
  39. package/build/inputs/InputGroup.mjs +2 -2
  40. package/build/inputs/InputGroup.mjs.map +1 -1
  41. package/build/inputs/SelectInput.js +54 -5
  42. package/build/inputs/SelectInput.js.map +1 -1
  43. package/build/inputs/SelectInput.mjs +54 -5
  44. package/build/inputs/SelectInput.mjs.map +1 -1
  45. package/build/inputs/contexts.js +8 -4
  46. package/build/inputs/contexts.js.map +1 -1
  47. package/build/inputs/contexts.mjs +7 -4
  48. package/build/inputs/contexts.mjs.map +1 -1
  49. package/build/label/Label.js +14 -8
  50. package/build/label/Label.js.map +1 -1
  51. package/build/label/Label.mjs +14 -8
  52. package/build/label/Label.mjs.map +1 -1
  53. package/build/listItem/Prompt/ListItemPrompt.js +1 -1
  54. package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
  55. package/build/listItem/Prompt/ListItemPrompt.mjs +1 -1
  56. package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
  57. package/build/main.css +180 -164
  58. package/build/moneyInput/MoneyInput.js +6 -5
  59. package/build/moneyInput/MoneyInput.js.map +1 -1
  60. package/build/moneyInput/MoneyInput.mjs +6 -5
  61. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  62. package/build/phoneNumberInput/PhoneNumberInput.js +25 -3
  63. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  64. package/build/phoneNumberInput/PhoneNumberInput.mjs +27 -5
  65. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  66. package/build/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.js +23 -23
  67. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -0
  68. package/build/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.mjs +23 -23
  69. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -0
  70. package/build/styles/avatarView/AvatarView.css +17 -11
  71. package/build/styles/avatarView/Dot.css +26 -0
  72. package/build/styles/inputs/Input.css +5 -0
  73. package/build/styles/inputs/TextArea.css +5 -0
  74. package/build/styles/listItem/ListItem.css +5 -153
  75. package/build/styles/listItem/Prompt/ListItemPrompt.css +0 -153
  76. package/build/styles/main.css +180 -164
  77. package/build/types/avatarLayout/AvatarLayout.d.ts +1 -1
  78. package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
  79. package/build/types/avatarView/AvatarView.d.ts +1 -2
  80. package/build/types/avatarView/AvatarView.d.ts.map +1 -1
  81. package/build/types/avatarView/Dot.d.ts +8 -0
  82. package/build/types/avatarView/Dot.d.ts.map +1 -0
  83. package/build/types/badge/BadgeAssets.d.ts +1 -1
  84. package/build/types/badge/BadgeAssets.d.ts.map +1 -1
  85. package/build/types/common/panel/Panel.d.ts +2 -0
  86. package/build/types/common/panel/Panel.d.ts.map +1 -1
  87. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -0
  88. package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
  89. package/build/types/dateInput/DateInput.d.ts +2 -2
  90. package/build/types/dateInput/DateInput.d.ts.map +1 -1
  91. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  92. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +1 -0
  93. package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
  94. package/build/types/field/Field.d.ts.map +1 -1
  95. package/build/types/inputs/InputGroup.d.ts.map +1 -1
  96. package/build/types/inputs/SelectInput.d.ts +27 -1
  97. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  98. package/build/types/inputs/contexts.d.ts +6 -1
  99. package/build/types/inputs/contexts.d.ts.map +1 -1
  100. package/build/types/label/Label.d.ts +5 -15
  101. package/build/types/label/Label.d.ts.map +1 -1
  102. package/build/types/listItem/Prompt/ListItemPrompt.d.ts +1 -1
  103. package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
  104. package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
  105. package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
  106. package/build/types/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.d.ts +1 -1
  107. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -0
  108. package/build/types/prompt/InlinePrompt/index.d.ts.map +1 -0
  109. package/build/types/prompt/index.d.ts +3 -0
  110. package/build/types/prompt/index.d.ts.map +1 -0
  111. package/package.json +1 -1
  112. package/src/DisabledComponents.story.tsx +156 -0
  113. package/src/avatarLayout/AvatarLayout.tsx +1 -1
  114. package/src/avatarView/AvatarView.css +17 -11
  115. package/src/avatarView/AvatarView.less +1 -1
  116. package/src/avatarView/AvatarView.story.tsx +92 -36
  117. package/src/avatarView/AvatarView.tsx +35 -30
  118. package/src/avatarView/Dot.css +26 -0
  119. package/src/avatarView/Dot.less +31 -0
  120. package/src/avatarView/Dot.tsx +42 -0
  121. package/src/badge/BadgeAssets.tsx +1 -1
  122. package/src/common/panel/Panel.tsx +2 -0
  123. package/src/common/responsivePanel/ResponsivePanel.tsx +7 -1
  124. package/src/dateInput/DateInput.spec.tsx +45 -7
  125. package/src/dateInput/DateInput.story.tsx +2 -0
  126. package/src/dateInput/DateInput.tsx +65 -30
  127. package/src/dateLookup/DateLookup.spec.tsx +16 -0
  128. package/src/dateLookup/DateLookup.tsx +6 -3
  129. package/src/dateLookup/dateTrigger/DateTrigger.tsx +3 -0
  130. package/src/field/Field.tsx +6 -5
  131. package/src/inputs/Input.css +5 -0
  132. package/src/inputs/InputGroup.tsx +3 -4
  133. package/src/inputs/SelectInput.story.tsx +101 -0
  134. package/src/inputs/SelectInput.tsx +113 -5
  135. package/src/inputs/TextArea.css +5 -0
  136. package/src/inputs/_common.less +5 -0
  137. package/src/inputs/contexts.tsx +12 -3
  138. package/src/label/Label.tsx +26 -20
  139. package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +89 -25
  140. package/src/listItem/ListItem.css +5 -153
  141. package/src/listItem/ListItem.less +5 -0
  142. package/src/listItem/Prompt/ListItemPrompt.css +0 -153
  143. package/src/listItem/Prompt/ListItemPrompt.less +0 -2
  144. package/src/listItem/Prompt/ListItemPrompt.tsx +1 -1
  145. package/src/main.css +180 -164
  146. package/src/main.less +1 -0
  147. package/src/moneyInput/MoneyInput.spec.tsx +16 -1
  148. package/src/moneyInput/MoneyInput.tsx +7 -6
  149. package/src/phoneNumberInput/PhoneNumberInput.spec.tsx +32 -0
  150. package/src/phoneNumberInput/PhoneNumberInput.tsx +32 -11
  151. package/src/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.spec.tsx +2 -2
  152. package/src/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.tsx +4 -4
  153. package/src/prompt/index.ts +6 -0
  154. package/build/avatarView/NotificationDot.js.map +0 -1
  155. package/build/avatarView/NotificationDot.mjs.map +0 -1
  156. package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js.map +0 -1
  157. package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs.map +0 -1
  158. package/build/styles/avatarView/NotificationDot.css +0 -20
  159. package/build/types/avatarView/NotificationDot.d.ts +0 -8
  160. package/build/types/avatarView/NotificationDot.d.ts.map +0 -1
  161. package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts.map +0 -1
  162. package/build/types/listItem/Prompt/InlinePrompt/index.d.ts.map +0 -1
  163. package/src/avatarView/NotificationDot.css +0 -20
  164. package/src/avatarView/NotificationDot.less +0 -24
  165. package/src/avatarView/NotificationDot.tsx +0 -35
  166. /package/build/styles/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.css +0 -0
  167. /package/build/types/{listItem/Prompt → prompt}/InlinePrompt/index.d.ts +0 -0
  168. /package/src/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.css +0 -0
  169. /package/src/{listItem/Prompt → prompt}/InlinePrompt/InlinePrompt.less +0 -0
  170. /package/src/{listItem/Prompt → prompt}/InlinePrompt/index.ts +0 -0
@@ -1,20 +0,0 @@
1
- .np-notification-dot {
2
- --np-notification-dot-size: 14px;
3
- position: relative;
4
- display: inline-block;
5
- }
6
- .np-notification-dot-mask {
7
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
8
- mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
9
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
10
- mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
11
- }
12
- .np-notification-dot-badge {
13
- position: absolute;
14
- width: var(--np-notification-dot-size);
15
- height: var(--np-notification-dot-size);
16
- background-color: var(--color-sentiment-negative);
17
- border-radius: 9999px;
18
- border-radius: var(--radius-full);
19
- right: 0;
20
- }
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { Props as AvatarViewProps } from './AvatarView';
3
- type Props = Pick<HTMLAttributes<HTMLDivElement>, 'children'> & {
4
- avatarSize?: AvatarViewProps['size'];
5
- };
6
- export default function NotificationDot({ children, avatarSize }: Props): import("react").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=NotificationDot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationDot.d.ts","sourceRoot":"","sources":["../../../src/avatarView/NotificationDot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAExD,KAAK,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAAG;IAC9D,UAAU,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAeF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,UAAe,EAAE,EAAE,KAAK,+BAc3E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../../src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAO5C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IACjG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,6DAO1B,iBAAiB,gCA4BnB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/listItem/Prompt/InlinePrompt/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,20 +0,0 @@
1
- .np-notification-dot {
2
- --np-notification-dot-size: 14px;
3
- position: relative;
4
- display: inline-block;
5
- }
6
- .np-notification-dot-mask {
7
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
8
- mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-notification-dot-size) / 2)) left calc(100% - (var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
9
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
10
- mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2)) left calc(100% - calc(var(--np-notification-dot-size) / 2)), transparent 0, transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)), black 0);
11
- }
12
- .np-notification-dot-badge {
13
- position: absolute;
14
- width: var(--np-notification-dot-size);
15
- height: var(--np-notification-dot-size);
16
- background-color: var(--color-sentiment-negative);
17
- border-radius: 9999px;
18
- border-radius: var(--radius-full);
19
- right: 0;
20
- }
@@ -1,24 +0,0 @@
1
- .np-notification-dot {
2
- --np-notification-dot-size: 14px;
3
- position: relative;
4
- display: inline-block;
5
-
6
- &-mask {
7
- mask-image: radial-gradient(
8
- circle at bottom calc(100% - calc(var(--np-notification-dot-size) / 2))
9
- left calc(100% - calc(var(--np-notification-dot-size) / 2)),
10
- transparent 0,
11
- transparent calc(var(--np-notification-dot-size) / 2 + var(--np-notification-dot-offset)),
12
- black 0
13
- );
14
- }
15
-
16
- &-badge {
17
- position: absolute;
18
- width: var(--np-notification-dot-size);
19
- height: var(--np-notification-dot-size);
20
- background-color: var(--color-sentiment-negative);
21
- border-radius: var(--radius-full);
22
- right: 0;
23
- }
24
- }
@@ -1,35 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { Props as AvatarViewProps } from './AvatarView';
3
-
4
- type Props = Pick<HTMLAttributes<HTMLDivElement>, 'children'> & {
5
- avatarSize?: AvatarViewProps['size'];
6
- };
7
-
8
- /**
9
- * Depending on avatar size, notifcation dot size and offset are different
10
- */
11
- const MAP_STYLE_CONFIG = {
12
- 16: { size: 6, offset: 1 },
13
- 24: { size: 8, offset: 2 },
14
- 32: { size: 10, offset: 2 },
15
- 40: { size: 10, offset: 2 },
16
- 48: { size: 14, offset: 2 },
17
- 56: { size: 16, offset: 3 },
18
- 72: { size: 20, offset: 3 },
19
- };
20
-
21
- export default function NotificationDot({ children, avatarSize = 48 }: Props) {
22
- return (
23
- <div
24
- className="np-notification-dot"
25
- style={{
26
- // @ts-expect-error CSS custom props allowed
27
- '--np-notification-dot-size': `${MAP_STYLE_CONFIG[avatarSize].size}px`,
28
- '--np-notification-dot-offset': `${MAP_STYLE_CONFIG[avatarSize].offset}px`,
29
- }}
30
- >
31
- <div className="np-notification-dot-badge" />
32
- <div className="np-notification-dot-mask">{children}</div>
33
- </div>
34
- );
35
- }