@transferwise/components 0.0.0-experimental-7089f72 → 0.0.0-experimental-26e03bf

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 (202) hide show
  1. package/build/dateLookup/DateLookup.js +165 -28
  2. package/build/dateLookup/DateLookup.js.map +1 -1
  3. package/build/{calendarInput/CalendarInput.messages.js → dateLookup/DateLookup.messages.js} +1 -1
  4. package/build/dateLookup/DateLookup.messages.js.map +1 -0
  5. package/build/{calendarInput/CalendarInput.messages.mjs → dateLookup/DateLookup.messages.mjs} +1 -1
  6. package/build/dateLookup/DateLookup.messages.mjs.map +1 -0
  7. package/build/dateLookup/DateLookup.mjs +166 -29
  8. package/build/dateLookup/DateLookup.mjs.map +1 -1
  9. package/build/{calendarInput → dateLookup}/dateHeader/DateHeader.js +4 -4
  10. package/build/dateLookup/dateHeader/DateHeader.js.map +1 -0
  11. package/build/{calendarInput → dateLookup}/dateHeader/DateHeader.mjs +1 -1
  12. package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -0
  13. package/build/{calendarInput → dateLookup}/dayCalendar/DayCalendar.js +2 -2
  14. package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -0
  15. package/build/{calendarInput → dateLookup}/dayCalendar/DayCalendar.mjs +1 -1
  16. package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -0
  17. package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -0
  18. package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -0
  19. package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -0
  20. package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -0
  21. package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -0
  22. package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -0
  23. package/build/{calendarInput → dateLookup}/monthCalendar/MonthCalendar.js +2 -2
  24. package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -0
  25. package/build/{calendarInput → dateLookup}/monthCalendar/MonthCalendar.mjs +1 -1
  26. package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -0
  27. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -0
  28. package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -0
  29. package/build/{calendarInput → dateLookup}/tableLink/TableLink.js +2 -2
  30. package/build/dateLookup/tableLink/TableLink.js.map +1 -0
  31. package/build/{calendarInput → dateLookup}/tableLink/TableLink.mjs +1 -1
  32. package/build/dateLookup/tableLink/TableLink.mjs.map +1 -0
  33. package/build/{calendarInput → dateLookup}/yearCalendar/YearCalendar.js +2 -2
  34. package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -0
  35. package/build/{calendarInput → dateLookup}/yearCalendar/YearCalendar.mjs +1 -1
  36. package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -0
  37. package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -0
  38. package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -0
  39. package/build/index.js +0 -2
  40. package/build/index.js.map +1 -1
  41. package/build/index.mjs +0 -1
  42. package/build/index.mjs.map +1 -1
  43. package/build/main.css +29 -20
  44. package/build/prompt/InfoPrompt/InfoPrompt.js +1 -1
  45. package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
  46. package/build/prompt/InfoPrompt/InfoPrompt.mjs +2 -2
  47. package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
  48. package/build/styles/css/neptune.css +11 -11
  49. package/build/styles/dateLookup/DateLookup.css +90 -0
  50. package/build/styles/less/legacy-variables.less +1 -1
  51. package/build/styles/less/neptune-tokens.less +2 -2
  52. package/build/styles/main.css +29 -20
  53. package/build/styles/props/custom-media.css +1 -1
  54. package/build/styles/props/neptune-tokens.css +1 -1
  55. package/build/styles/styles/less/neptune.css +11 -11
  56. package/build/types/dateLookup/DateLookup.d.ts +25 -2
  57. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  58. package/build/types/{calendarInput/CalendarInput.messages.d.ts → dateLookup/DateLookup.messages.d.ts} +1 -1
  59. package/build/types/dateLookup/DateLookup.messages.d.ts.map +1 -0
  60. package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -0
  61. package/build/types/dateLookup/dateHeader/index.d.ts.map +1 -0
  62. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts.map +1 -0
  63. package/build/types/dateLookup/dayCalendar/index.d.ts.map +1 -0
  64. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -0
  65. package/build/types/dateLookup/dayCalendar/table/index.d.ts.map +1 -0
  66. package/build/types/dateLookup/getFocusableTime/getFocusableTime.d.ts.map +1 -0
  67. package/build/types/dateLookup/getStartOfDay/getStartOfDay.d.ts.map +1 -0
  68. package/build/types/dateLookup/getStartOfDay/index.d.ts.map +1 -0
  69. package/build/types/{calendarInput → dateLookup}/monthCalendar/MonthCalendar.d.ts +1 -1
  70. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts.map +1 -0
  71. package/build/types/dateLookup/monthCalendar/index.d.ts.map +1 -0
  72. package/build/types/{calendarInput → dateLookup}/monthCalendar/table/MonthCalendarTable.d.ts +1 -1
  73. package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -0
  74. package/build/types/dateLookup/monthCalendar/table/index.d.ts.map +1 -0
  75. package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -0
  76. package/build/types/dateLookup/tableLink/index.d.ts.map +1 -0
  77. package/build/types/{calendarInput → dateLookup}/yearCalendar/YearCalendar.d.ts +1 -1
  78. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -0
  79. package/build/types/dateLookup/yearCalendar/index.d.ts.map +1 -0
  80. package/build/types/{calendarInput → dateLookup}/yearCalendar/table/YearCalendarTable.d.ts +1 -1
  81. package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -0
  82. package/build/types/dateLookup/yearCalendar/table/index.d.ts.map +1 -0
  83. package/build/types/index.d.ts +0 -2
  84. package/build/types/index.d.ts.map +1 -1
  85. package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts +3 -2
  86. package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -1
  87. package/package.json +3 -3
  88. package/src/dateLookup/DateLookup.css +90 -0
  89. package/src/dateLookup/DateLookup.less +91 -0
  90. package/src/dateLookup/DateLookup.test.tsx +124 -0
  91. package/src/dateLookup/DateLookup.tsx +157 -31
  92. package/src/{calendarInput → dateLookup}/dateHeader/DateHeader.tsx +1 -1
  93. package/src/{calendarInput → dateLookup}/dayCalendar/DayCalendar.tsx +1 -1
  94. package/src/{calendarInput → dateLookup}/monthCalendar/MonthCalendar.tsx +2 -2
  95. package/src/{calendarInput → dateLookup}/monthCalendar/table/MonthCalendarTable.tsx +1 -1
  96. package/src/{calendarInput → dateLookup}/tableLink/TableLink.tsx +1 -1
  97. package/src/{calendarInput → dateLookup}/yearCalendar/YearCalendar.tsx +2 -2
  98. package/src/{calendarInput → dateLookup}/yearCalendar/table/YearCalendarTable.tsx +1 -1
  99. package/src/index.ts +0 -2
  100. package/src/main.css +29 -20
  101. package/src/main.less +0 -1
  102. package/src/prompt/InfoPrompt/InfoPrompt.story.tsx +42 -0
  103. package/src/prompt/InfoPrompt/InfoPrompt.test.tsx +65 -1
  104. package/src/prompt/InfoPrompt/InfoPrompt.tsx +15 -4
  105. package/src/styles/less/neptune.css +11 -11
  106. package/build/calendarInput/CalendarInput.js +0 -159
  107. package/build/calendarInput/CalendarInput.js.map +0 -1
  108. package/build/calendarInput/CalendarInput.messages.js.map +0 -1
  109. package/build/calendarInput/CalendarInput.messages.mjs.map +0 -1
  110. package/build/calendarInput/CalendarInput.mjs +0 -155
  111. package/build/calendarInput/CalendarInput.mjs.map +0 -1
  112. package/build/calendarInput/dateHeader/DateHeader.js.map +0 -1
  113. package/build/calendarInput/dateHeader/DateHeader.mjs.map +0 -1
  114. package/build/calendarInput/dayCalendar/DayCalendar.js.map +0 -1
  115. package/build/calendarInput/dayCalendar/DayCalendar.mjs.map +0 -1
  116. package/build/calendarInput/dayCalendar/table/DayCalendarTable.js.map +0 -1
  117. package/build/calendarInput/dayCalendar/table/DayCalendarTable.mjs.map +0 -1
  118. package/build/calendarInput/getFocusableTime/getFocusableTime.js.map +0 -1
  119. package/build/calendarInput/getFocusableTime/getFocusableTime.mjs.map +0 -1
  120. package/build/calendarInput/getStartOfDay/getStartOfDay.js.map +0 -1
  121. package/build/calendarInput/getStartOfDay/getStartOfDay.mjs.map +0 -1
  122. package/build/calendarInput/monthCalendar/MonthCalendar.js.map +0 -1
  123. package/build/calendarInput/monthCalendar/MonthCalendar.mjs.map +0 -1
  124. package/build/calendarInput/monthCalendar/table/MonthCalendarTable.js.map +0 -1
  125. package/build/calendarInput/monthCalendar/table/MonthCalendarTable.mjs.map +0 -1
  126. package/build/calendarInput/tableLink/TableLink.js.map +0 -1
  127. package/build/calendarInput/tableLink/TableLink.mjs.map +0 -1
  128. package/build/calendarInput/yearCalendar/YearCalendar.js.map +0 -1
  129. package/build/calendarInput/yearCalendar/YearCalendar.mjs.map +0 -1
  130. package/build/calendarInput/yearCalendar/table/YearCalendarTable.js.map +0 -1
  131. package/build/calendarInput/yearCalendar/table/YearCalendarTable.mjs.map +0 -1
  132. package/build/styles/calendarInput/CalendarInput.css +0 -83
  133. package/build/types/calendarInput/CalendarInput.d.ts +0 -13
  134. package/build/types/calendarInput/CalendarInput.d.ts.map +0 -1
  135. package/build/types/calendarInput/CalendarInput.messages.d.ts.map +0 -1
  136. package/build/types/calendarInput/dateHeader/DateHeader.d.ts.map +0 -1
  137. package/build/types/calendarInput/dateHeader/index.d.ts.map +0 -1
  138. package/build/types/calendarInput/dayCalendar/DayCalendar.d.ts.map +0 -1
  139. package/build/types/calendarInput/dayCalendar/index.d.ts.map +0 -1
  140. package/build/types/calendarInput/dayCalendar/table/DayCalendarTable.d.ts.map +0 -1
  141. package/build/types/calendarInput/dayCalendar/table/index.d.ts.map +0 -1
  142. package/build/types/calendarInput/getFocusableTime/getFocusableTime.d.ts.map +0 -1
  143. package/build/types/calendarInput/getStartOfDay/getStartOfDay.d.ts.map +0 -1
  144. package/build/types/calendarInput/getStartOfDay/index.d.ts.map +0 -1
  145. package/build/types/calendarInput/index.d.ts +0 -3
  146. package/build/types/calendarInput/index.d.ts.map +0 -1
  147. package/build/types/calendarInput/monthCalendar/MonthCalendar.d.ts.map +0 -1
  148. package/build/types/calendarInput/monthCalendar/index.d.ts.map +0 -1
  149. package/build/types/calendarInput/monthCalendar/table/MonthCalendarTable.d.ts.map +0 -1
  150. package/build/types/calendarInput/monthCalendar/table/index.d.ts.map +0 -1
  151. package/build/types/calendarInput/tableLink/TableLink.d.ts.map +0 -1
  152. package/build/types/calendarInput/tableLink/index.d.ts.map +0 -1
  153. package/build/types/calendarInput/yearCalendar/YearCalendar.d.ts.map +0 -1
  154. package/build/types/calendarInput/yearCalendar/index.d.ts.map +0 -1
  155. package/build/types/calendarInput/yearCalendar/table/YearCalendarTable.d.ts.map +0 -1
  156. package/build/types/calendarInput/yearCalendar/table/index.d.ts.map +0 -1
  157. package/src/calendarInput/CalendarInput.css +0 -83
  158. package/src/calendarInput/CalendarInput.less +0 -79
  159. package/src/calendarInput/CalendarInput.story.tsx +0 -64
  160. package/src/calendarInput/CalendarInput.test.tsx +0 -140
  161. package/src/calendarInput/CalendarInput.tsx +0 -165
  162. package/src/calendarInput/index.ts +0 -2
  163. /package/build/{calendarInput → dateLookup}/dayCalendar/table/DayCalendarTable.js +0 -0
  164. /package/build/{calendarInput → dateLookup}/dayCalendar/table/DayCalendarTable.mjs +0 -0
  165. /package/build/{calendarInput → dateLookup}/getFocusableTime/getFocusableTime.js +0 -0
  166. /package/build/{calendarInput → dateLookup}/getFocusableTime/getFocusableTime.mjs +0 -0
  167. /package/build/{calendarInput → dateLookup}/getStartOfDay/getStartOfDay.js +0 -0
  168. /package/build/{calendarInput → dateLookup}/getStartOfDay/getStartOfDay.mjs +0 -0
  169. /package/build/{calendarInput → dateLookup}/monthCalendar/table/MonthCalendarTable.js +0 -0
  170. /package/build/{calendarInput → dateLookup}/monthCalendar/table/MonthCalendarTable.mjs +0 -0
  171. /package/build/{calendarInput → dateLookup}/yearCalendar/table/YearCalendarTable.js +0 -0
  172. /package/build/{calendarInput → dateLookup}/yearCalendar/table/YearCalendarTable.mjs +0 -0
  173. /package/build/types/{calendarInput → dateLookup}/dateHeader/DateHeader.d.ts +0 -0
  174. /package/build/types/{calendarInput → dateLookup}/dateHeader/index.d.ts +0 -0
  175. /package/build/types/{calendarInput → dateLookup}/dayCalendar/DayCalendar.d.ts +0 -0
  176. /package/build/types/{calendarInput → dateLookup}/dayCalendar/index.d.ts +0 -0
  177. /package/build/types/{calendarInput → dateLookup}/dayCalendar/table/DayCalendarTable.d.ts +0 -0
  178. /package/build/types/{calendarInput → dateLookup}/dayCalendar/table/index.d.ts +0 -0
  179. /package/build/types/{calendarInput → dateLookup}/getFocusableTime/getFocusableTime.d.ts +0 -0
  180. /package/build/types/{calendarInput → dateLookup}/getStartOfDay/getStartOfDay.d.ts +0 -0
  181. /package/build/types/{calendarInput → dateLookup}/getStartOfDay/index.d.ts +0 -0
  182. /package/build/types/{calendarInput → dateLookup}/monthCalendar/index.d.ts +0 -0
  183. /package/build/types/{calendarInput → dateLookup}/monthCalendar/table/index.d.ts +0 -0
  184. /package/build/types/{calendarInput → dateLookup}/tableLink/TableLink.d.ts +0 -0
  185. /package/build/types/{calendarInput → dateLookup}/tableLink/index.d.ts +0 -0
  186. /package/build/types/{calendarInput → dateLookup}/yearCalendar/index.d.ts +0 -0
  187. /package/build/types/{calendarInput → dateLookup}/yearCalendar/table/index.d.ts +0 -0
  188. /package/src/{calendarInput/CalendarInput.messages.ts → dateLookup/DateLookup.messages.ts} +0 -0
  189. /package/src/{calendarInput → dateLookup}/dateHeader/index.ts +0 -0
  190. /package/src/{calendarInput → dateLookup}/dayCalendar/index.ts +0 -0
  191. /package/src/{calendarInput → dateLookup}/dayCalendar/table/DayCalendarTable.tsx +0 -0
  192. /package/src/{calendarInput → dateLookup}/dayCalendar/table/index.ts +0 -0
  193. /package/src/{calendarInput → dateLookup}/getFocusableTime/getFocusable.test.ts +0 -0
  194. /package/src/{calendarInput → dateLookup}/getFocusableTime/getFocusableTime.tsx +0 -0
  195. /package/src/{calendarInput → dateLookup}/getStartOfDay/getStartOfDay.test.js +0 -0
  196. /package/src/{calendarInput → dateLookup}/getStartOfDay/getStartOfDay.tsx +0 -0
  197. /package/src/{calendarInput → dateLookup}/getStartOfDay/index.ts +0 -0
  198. /package/src/{calendarInput → dateLookup}/monthCalendar/index.ts +0 -0
  199. /package/src/{calendarInput → dateLookup}/monthCalendar/table/index.ts +0 -0
  200. /package/src/{calendarInput → dateLookup}/tableLink/index.ts +0 -0
  201. /package/src/{calendarInput → dateLookup}/yearCalendar/index.ts +0 -0
  202. /package/src/{calendarInput → dateLookup}/yearCalendar/table/index.ts +0 -0
@@ -2,7 +2,7 @@ import { formatDate } from '@transferwise/formatting';
2
2
  import { PureComponent } from 'react';
3
3
  import { injectIntl, WrappedComponentProps } from 'react-intl';
4
4
 
5
- import messages from '../CalendarInput.messages';
5
+ import messages from '../DateLookup.messages';
6
6
  import DateHeader from '../dateHeader';
7
7
 
8
8
  import MonthCalendarTable from './table';
@@ -12,7 +12,7 @@ interface MonthCalendarProps extends WrappedComponentProps {
12
12
  min: Date | null;
13
13
  max: Date | null;
14
14
  viewYear: number;
15
- placeholder?: string;
15
+ placeholder: string;
16
16
  onSelect: () => void;
17
17
  onLabelClick: () => void;
18
18
  onViewDateUpdate: (date: { year?: number; month?: number }) => void;
@@ -9,7 +9,7 @@ interface MonthCalendarTableProps {
9
9
  min: Date | null;
10
10
  max: Date | null;
11
11
  viewYear: number;
12
- placeholder?: string;
12
+ placeholder: string;
13
13
  onSelect: (date: number) => void;
14
14
  }
15
15
 
@@ -2,7 +2,7 @@ import { clsx } from 'clsx';
2
2
  import { useEffect, useRef } from 'react';
3
3
  import { useIntl } from 'react-intl';
4
4
 
5
- import messages from '../CalendarInput.messages';
5
+ import messages from '../DateLookup.messages';
6
6
 
7
7
  interface TableLinkProps {
8
8
  item: number;
@@ -1,7 +1,7 @@
1
1
  import { PureComponent } from 'react';
2
2
  import { injectIntl, WrappedComponentProps } from 'react-intl';
3
3
 
4
- import messages from '../CalendarInput.messages';
4
+ import messages from '../DateLookup.messages';
5
5
  import DateHeader from '../dateHeader';
6
6
 
7
7
  import YearCalendarTable from './table';
@@ -11,7 +11,7 @@ interface YearCalendarProps extends WrappedComponentProps {
11
11
  min: Date | null;
12
12
  max: Date | null;
13
13
  viewYear: number;
14
- placeholder?: string;
14
+ placeholder: string;
15
15
  onSelect: () => void;
16
16
  onViewDateUpdate: (date: { year: number }) => void;
17
17
  }
@@ -9,7 +9,7 @@ interface YearCalendarTableProps {
9
9
  min: Date | null;
10
10
  max: Date | null;
11
11
  viewYear: number;
12
- placeholder?: string;
12
+ placeholder: string;
13
13
  onSelect: (year: number) => void;
14
14
  }
15
15
 
package/src/index.ts CHANGED
@@ -29,7 +29,6 @@ export type {
29
29
  export type { BottomSheetProps } from './common/bottomSheet';
30
30
  export type { DateInputProps } from './dateInput';
31
31
  export type { DateLookupProps } from './dateLookup';
32
- export type { CalendarInputProps } from './calendarInput';
33
32
  export type { DecisionProps } from './decision/Decision';
34
33
  export type { DefinitionListProps, DefinitionListDefinition } from './definitionList';
35
34
  export type { DimmerProps } from './dimmer';
@@ -164,7 +163,6 @@ export { default as CriticalCommsBanner } from './criticalBanner';
164
163
  export type { CriticalCommsBannerProps } from './criticalBanner';
165
164
  export { default as DateInput } from './dateInput';
166
165
  export { default as DateLookup } from './dateLookup';
167
- export { default as CalendarInput } from './calendarInput';
168
166
  export { default as Decision } from './decision';
169
167
  export { default as DefinitionList } from './definitionList';
170
168
  export { default as Dimmer } from './dimmer';
package/src/main.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly, this file was auto-generated.
3
- * Generated on Thu, 14 May 2026 16:11:43 GMT
3
+ * Generated on Wed, 27 May 2026 15:50:09 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -144,7 +144,7 @@
144
144
 
145
145
  /**
146
146
  * Do not edit directly, this file was auto-generated.
147
- * Generated on Thu, 14 May 2026 16:11:44 GMT
147
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
148
148
  */
149
149
 
150
150
  .np-theme-personal {
@@ -328,7 +328,7 @@
328
328
 
329
329
  /**
330
330
  * Do not edit directly, this file was auto-generated.
331
- * Generated on Thu, 14 May 2026 16:11:44 GMT
331
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
332
332
  */
333
333
 
334
334
  .np-theme-personal--forest-green {
@@ -512,7 +512,7 @@
512
512
 
513
513
  /**
514
514
  * Do not edit directly, this file was auto-generated.
515
- * Generated on Thu, 14 May 2026 16:11:44 GMT
515
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
516
516
  */
517
517
 
518
518
  .np-theme-personal--bright-green {
@@ -696,7 +696,7 @@
696
696
 
697
697
  /**
698
698
  * Do not edit directly, this file was auto-generated.
699
- * Generated on Thu, 14 May 2026 16:11:44 GMT
699
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
700
700
  */
701
701
 
702
702
  .np-theme-personal--dark {
@@ -880,7 +880,7 @@
880
880
 
881
881
  /**
882
882
  * Do not edit directly, this file was auto-generated.
883
- * Generated on Thu, 14 May 2026 16:11:44 GMT
883
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
884
884
  */
885
885
 
886
886
  .np-theme-platform {
@@ -1064,7 +1064,7 @@
1064
1064
 
1065
1065
  /**
1066
1066
  * Do not edit directly, this file was auto-generated.
1067
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1067
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1068
1068
  */
1069
1069
 
1070
1070
  .np-theme-platform--forest-green {
@@ -1248,7 +1248,7 @@
1248
1248
 
1249
1249
  /**
1250
1250
  * Do not edit directly, this file was auto-generated.
1251
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1251
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1252
1252
  */
1253
1253
 
1254
1254
  .np-theme-business {
@@ -1433,7 +1433,7 @@
1433
1433
 
1434
1434
  /**
1435
1435
  * Do not edit directly, this file was auto-generated.
1436
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1436
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1437
1437
  */
1438
1438
 
1439
1439
  .np-theme-business--dark {
@@ -1618,7 +1618,7 @@
1618
1618
 
1619
1619
  /**
1620
1620
  * Do not edit directly, this file was auto-generated.
1621
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1621
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1622
1622
  */
1623
1623
 
1624
1624
  .np-theme-business--forest-green {
@@ -1803,7 +1803,7 @@
1803
1803
 
1804
1804
  /**
1805
1805
  * Do not edit directly, this file was auto-generated.
1806
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1806
+ * Generated on Wed, 27 May 2026 15:50:11 GMT
1807
1807
  */
1808
1808
 
1809
1809
  .np-theme-business--bright-green {
@@ -28313,26 +28313,23 @@ button.np-option {
28313
28313
  }
28314
28314
  }
28315
28315
 
28316
+ .tw-date-lookup-menu {
28317
+ width: 400px;
28318
+ }
28319
+
28316
28320
  .tw-date-lookup-calendar {
28317
28321
  min-width: 300px;
28318
28322
  text-align: center;
28319
28323
  table-layout: fixed;
28320
- border: none;
28321
28324
  background-color: inherit;
28322
28325
  }
28323
28326
 
28324
- .tw-date-lookup-calendar thead {
28325
- background-color: transparent;
28326
- background-color: initial;
28327
- }
28328
-
28329
28327
  .tw-date-lookup-calendar > tbody > tr > td.weekend button {
28330
28328
  color: #5d7079;
28331
28329
  color: var(--color-content-secondary);
28332
28330
  }
28333
28331
 
28334
28332
  .tw-date-lookup-calendar > tbody > tr > td {
28335
- border: none;
28336
28333
  padding: 4px;
28337
28334
  padding: var(--size-4);
28338
28335
  }
@@ -28410,8 +28407,20 @@ button.np-option {
28410
28407
  display: inline;
28411
28408
  }
28412
28409
 
28413
- .tw-date-lookup-menu {
28414
- width: 400px;
28410
+ .np-theme-personal.tw-date-lookup-menu .table-bordered,
28411
+ .np-theme-personal .tw-date-lookup-menu .table-bordered {
28412
+ border: none;
28413
+ }
28414
+
28415
+ .np-theme-personal.tw-date-lookup-menu thead,
28416
+ .np-theme-personal .tw-date-lookup-menu thead {
28417
+ background-color: transparent;
28418
+ background-color: initial;
28419
+ }
28420
+
28421
+ .np-theme-personal.tw-date-lookup-menu td,
28422
+ .np-theme-personal .tw-date-lookup-menu td {
28423
+ border: none;
28415
28424
  }
28416
28425
 
28417
28426
  .np-date-trigger {
package/src/main.less CHANGED
@@ -30,7 +30,6 @@
30
30
  @import "./common/panel/Panel.less";
31
31
  @import "./common/RadioButton/RadioButton.less";
32
32
  @import "./dateInput/DateInput.less";
33
- @import "./calendarInput/CalendarInput.less";
34
33
  @import "./dateLookup/DateLookup.less";
35
34
  @import "./dateLookup/dateTrigger/DateTrigger.less";
36
35
  @import "./decision/Decision.less";
@@ -6,6 +6,7 @@ import { Confetti, GiftBox, Star, Suitcase, Briefcase, Plane } from '@transferwi
6
6
  import { lorem10, lorem20 } from '../../test-utils';
7
7
  import Button from '../../button';
8
8
  import Title from '../../title';
9
+ import Link from '../../link';
9
10
  import { InfoPrompt, InfoPromptProps, InfoPromptMedia } from './InfoPrompt';
10
11
 
11
12
  const withComponentGrid =
@@ -232,6 +233,47 @@ export const WithAction: StoryObj<InfoPromptProps> = {
232
233
  ),
233
234
  };
234
235
 
236
+ /**
237
+ * The `description` prop accepts rich content (ReactNode), allowing inline interactive elements
238
+ * such as links that can trigger a popover.
239
+ *
240
+ * **Important**: If the description contains an interactive element, do not use the `action` prop
241
+ * simultaneously — InfoPrompt should have at most one interaction.
242
+ */
243
+ export const WithRichDescription: StoryObj<InfoPromptProps> = {
244
+ render: (args: InfoPromptProps) => (
245
+ <>
246
+ <InfoPrompt
247
+ {...args}
248
+ sentiment="neutral"
249
+ description={
250
+ <>
251
+ Your transfer is subject to our{' '}
252
+ <Link href="/fees" target="_blank" type="link-default">
253
+ fee schedule
254
+ </Link>
255
+ .
256
+ </>
257
+ }
258
+ />
259
+ <InfoPrompt
260
+ {...args}
261
+ sentiment="warning"
262
+ title="Verification Required"
263
+ description={
264
+ <>
265
+ Please{' '}
266
+ <Link href="/verify" type="link-default">
267
+ verify your identity
268
+ </Link>{' '}
269
+ to continue sending money.
270
+ </>
271
+ }
272
+ />
273
+ </>
274
+ ),
275
+ };
276
+
235
277
  /**
236
278
  * When `onDismiss` is provided, a close button appears allowing users to dismiss the prompt.
237
279
  * Note: The component itself is not automatically removed - you must handle state management.
@@ -1,4 +1,5 @@
1
- import { fireEvent, mockMatchMedia, render, screen, userEvent, waitFor } from '../../test-utils';
1
+ import { act, fireEvent, mockMatchMedia, render, screen, userEvent } from '../../test-utils';
2
+ import { WDS_LIVE_REGION_DELAY_MS } from '../../common/constants';
2
3
  import { resetLiveRegionAnnouncementQueue } from '../../common/liveRegion/LiveRegion';
3
4
  import { InfoPrompt, InfoPromptProps } from './InfoPrompt';
4
5
 
@@ -15,11 +16,74 @@ describe('InfoPrompt', () => {
15
16
  resetLiveRegionAnnouncementQueue();
16
17
  });
17
18
 
19
+ afterEach(() => {
20
+ jest.clearAllTimers();
21
+ jest.useRealTimers();
22
+ });
23
+
18
24
  it('renders description', () => {
19
25
  render(<InfoPrompt {...defaultProps} />);
20
26
  expect(screen.getByText('Prompt description')).toBeInTheDocument();
21
27
  });
22
28
 
29
+ it('renders rich-content description (ReactNode)', () => {
30
+ render(
31
+ <InfoPrompt
32
+ description={
33
+ <>
34
+ See our <a href="/fees">fee schedule</a>.
35
+ </>
36
+ }
37
+ />,
38
+ );
39
+ expect(screen.getByRole('link', { name: 'fee schedule', hidden: true })).toBeInTheDocument();
40
+ expect(screen.getByRole('link', { name: 'fee schedule', hidden: true })).toHaveAttribute(
41
+ 'href',
42
+ '/fees',
43
+ );
44
+ });
45
+
46
+ it('re-announces when rich-content description text changes', () => {
47
+ jest.useFakeTimers();
48
+
49
+ const { rerender } = render(
50
+ <InfoPrompt
51
+ description={
52
+ <>
53
+ See our <a href="/fees">fee schedule</a>.
54
+ </>
55
+ }
56
+ />,
57
+ );
58
+
59
+ act(() => {
60
+ jest.advanceTimersByTime(WDS_LIVE_REGION_DELAY_MS);
61
+ });
62
+
63
+ const liveRegion = screen.getByRole('status');
64
+ expect(liveRegion.firstElementChild).not.toHaveAttribute('aria-hidden');
65
+ expect(liveRegion).toHaveTextContent('See our fee schedule.');
66
+
67
+ rerender(
68
+ <InfoPrompt
69
+ description={
70
+ <>
71
+ Read the updated <a href="/fees">pricing guide</a>.
72
+ </>
73
+ }
74
+ />,
75
+ );
76
+
77
+ expect(liveRegion.firstElementChild).toHaveAttribute('aria-hidden', 'true');
78
+
79
+ act(() => {
80
+ jest.advanceTimersByTime(WDS_LIVE_REGION_DELAY_MS);
81
+ });
82
+
83
+ expect(liveRegion.firstElementChild).not.toHaveAttribute('aria-hidden');
84
+ expect(liveRegion).toHaveTextContent('Read the updated pricing guide.');
85
+ });
86
+
23
87
  it('renders title when provided', () => {
24
88
  render(<InfoPrompt {...defaultProps} title="Test Title" />);
25
89
  expect(screen.getByText('Test Title')).toBeInTheDocument();
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode, useState } from 'react';
1
+ import { Children, HTMLAttributes, ReactNode, isValidElement, useState } from 'react';
2
2
  import { LiveRegion, Sentiment, Typography } from '../../common';
3
3
  import type { AriaLive } from '../../common';
4
4
  import { GiftBox } from '@transferwise/icons';
@@ -50,9 +50,10 @@ export type InfoPromptProps = Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'ar
50
50
  */
51
51
  title?: string;
52
52
  /**
53
- * Description text for the prompt (required)
53
+ * Description content for the prompt (required). Accepts plain text or rich content (ReactNode).
54
+ * If the description contains an interactive element, the `action` prop must not be used simultaneously.
54
55
  */
55
- description: string;
56
+ description: ReactNode;
56
57
  className?: string;
57
58
  /**
58
59
  * Sets the ARIA live region politeness level.
@@ -86,7 +87,17 @@ export const InfoPrompt = ({
86
87
  ...restProps
87
88
  }: InfoPromptProps) => {
88
89
  const [shouldFire, setShouldFire] = useState<boolean>();
89
- const announceOnChange = [title, description, action?.label].filter(Boolean).join('|');
90
+ const announceOnChange = [
91
+ title,
92
+ Children.toArray(description)
93
+ .map((child) =>
94
+ isValidElement<{ children?: ReactNode }>(child) ? child.props.children : child,
95
+ )
96
+ .join(''),
97
+ action?.label,
98
+ ]
99
+ .filter(Boolean)
100
+ .join('|');
90
101
  const statusIconSentiment =
91
102
  sentiment === 'success'
92
103
  ? Sentiment.POSITIVE
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly, this file was auto-generated.
3
- * Generated on Thu, 14 May 2026 16:11:43 GMT
3
+ * Generated on Wed, 27 May 2026 15:50:09 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -144,7 +144,7 @@
144
144
 
145
145
  /**
146
146
  * Do not edit directly, this file was auto-generated.
147
- * Generated on Thu, 14 May 2026 16:11:44 GMT
147
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
148
148
  */
149
149
 
150
150
  .np-theme-personal {
@@ -328,7 +328,7 @@
328
328
 
329
329
  /**
330
330
  * Do not edit directly, this file was auto-generated.
331
- * Generated on Thu, 14 May 2026 16:11:44 GMT
331
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
332
332
  */
333
333
 
334
334
  .np-theme-personal--forest-green {
@@ -512,7 +512,7 @@
512
512
 
513
513
  /**
514
514
  * Do not edit directly, this file was auto-generated.
515
- * Generated on Thu, 14 May 2026 16:11:44 GMT
515
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
516
516
  */
517
517
 
518
518
  .np-theme-personal--bright-green {
@@ -696,7 +696,7 @@
696
696
 
697
697
  /**
698
698
  * Do not edit directly, this file was auto-generated.
699
- * Generated on Thu, 14 May 2026 16:11:44 GMT
699
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
700
700
  */
701
701
 
702
702
  .np-theme-personal--dark {
@@ -880,7 +880,7 @@
880
880
 
881
881
  /**
882
882
  * Do not edit directly, this file was auto-generated.
883
- * Generated on Thu, 14 May 2026 16:11:44 GMT
883
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
884
884
  */
885
885
 
886
886
  .np-theme-platform {
@@ -1064,7 +1064,7 @@
1064
1064
 
1065
1065
  /**
1066
1066
  * Do not edit directly, this file was auto-generated.
1067
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1067
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1068
1068
  */
1069
1069
 
1070
1070
  .np-theme-platform--forest-green {
@@ -1248,7 +1248,7 @@
1248
1248
 
1249
1249
  /**
1250
1250
  * Do not edit directly, this file was auto-generated.
1251
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1251
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1252
1252
  */
1253
1253
 
1254
1254
  .np-theme-business {
@@ -1433,7 +1433,7 @@
1433
1433
 
1434
1434
  /**
1435
1435
  * Do not edit directly, this file was auto-generated.
1436
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1436
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1437
1437
  */
1438
1438
 
1439
1439
  .np-theme-business--dark {
@@ -1618,7 +1618,7 @@
1618
1618
 
1619
1619
  /**
1620
1620
  * Do not edit directly, this file was auto-generated.
1621
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1621
+ * Generated on Wed, 27 May 2026 15:50:10 GMT
1622
1622
  */
1623
1623
 
1624
1624
  .np-theme-business--forest-green {
@@ -1803,7 +1803,7 @@
1803
1803
 
1804
1804
  /**
1805
1805
  * Do not edit directly, this file was auto-generated.
1806
- * Generated on Thu, 14 May 2026 16:11:44 GMT
1806
+ * Generated on Wed, 27 May 2026 15:50:11 GMT
1807
1807
  */
1808
1808
 
1809
1809
  .np-theme-business--bright-green {
@@ -1,159 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
- require('../common/theme.js');
7
- require('../common/direction.js');
8
- require('@transferwise/neptune-tokens');
9
- require('../common/propsValues/control.js');
10
- require('../common/propsValues/size.js');
11
- require('../common/propsValues/typography.js');
12
- require('../common/propsValues/width.js');
13
- require('../common/propsValues/type.js');
14
- require('../common/propsValues/dateMode.js');
15
- var monthFormat = require('../common/propsValues/monthFormat.js');
16
- require('../common/propsValues/position.js');
17
- require('../common/propsValues/layouts.js');
18
- require('../common/propsValues/status.js');
19
- require('../common/propsValues/sentiment.js');
20
- require('../common/propsValues/profileType.js');
21
- require('../common/propsValues/variant.js');
22
- require('../common/propsValues/scroll.js');
23
- require('../common/propsValues/markdownNodeType.js');
24
- require('../common/fileType.js');
25
- require('@transferwise/formatting');
26
- require('@transferwise/icons');
27
- require('clsx');
28
- require('react-intl');
29
- require('../common/closeButton/CloseButton.messages.js');
30
- var jsxRuntime = require('react/jsx-runtime');
31
- var moveToWithinRange = require('../common/dateUtils/moveToWithinRange/moveToWithinRange.js');
32
- var isWithinRange = require('../common/dateUtils/isWithinRange/isWithinRange.js');
33
- var getDateView = require('../common/dateUtils/getDateView/getDateView.js');
34
- var DayCalendar = require('./dayCalendar/DayCalendar.js');
35
- var getStartOfDay = require('./getStartOfDay/getStartOfDay.js');
36
- var MonthCalendar = require('./monthCalendar/MonthCalendar.js');
37
- var YearCalendar = require('./yearCalendar/YearCalendar.js');
38
-
39
- const CalendarInput = ({
40
- value,
41
- min: minProp = null,
42
- max: maxProp = null,
43
- monthFormat: monthFormat$1 = monthFormat.MonthFormat.LONG,
44
- placeholder,
45
- onChange,
46
- onSelect
47
- }) => {
48
- const selectedDate = getStartOfDay.getStartOfDay(value);
49
- const min = getStartOfDay.getStartOfDay(minProp);
50
- const max = getStartOfDay.getStartOfDay(maxProp);
51
- React.useEffect(() => {
52
- if (selectedDate && !isWithinRange.isWithinRange(selectedDate, min, max)) {
53
- onChange(moveToWithinRange.moveToWithinRange(selectedDate, min, max));
54
- }
55
- }, [selectedDate?.getTime(), min?.getTime(), max?.getTime(), onChange]); // eslint-disable-line react-hooks/exhaustive-deps
56
- const dateView = getDateView.returnDateView(selectedDate, min, max);
57
- const [viewMonth, setViewMonth] = React.useState(dateView.getMonth());
58
- const [viewYear, setViewYear] = React.useState(dateView.getFullYear());
59
- const [mode, setMode] = React.useState('day');
60
- React.useEffect(() => {
61
- const view = getDateView.returnDateView(selectedDate, min, max);
62
- // eslint-disable-next-line react-hooks/set-state-in-effect
63
- setViewMonth(view.getMonth());
64
- setViewYear(view.getFullYear());
65
- }, [selectedDate?.getTime(), min?.getTime(), max?.getTime()]); // eslint-disable-line react-hooks/exhaustive-deps
66
- const handleViewDateUpdate = React.useCallback(
67
- // eslint-disable-next-line react-hooks/preserve-manual-memoization
68
- ({
69
- month,
70
- year
71
- }) => {
72
- if (month !== undefined) setViewMonth(month);
73
- if (year !== undefined) setViewYear(year);
74
- }, []);
75
- const switchToDays = React.useCallback(() => setMode('day'), []);
76
- const switchToMonths = React.useCallback(() => setMode('month'), []);
77
- const switchToYears = React.useCallback(() => setMode('year'), []);
78
- const handleSelectedDateUpdate = React.useCallback(date => {
79
- if (onSelect) {
80
- onSelect(date);
81
- } else {
82
- onChange(date);
83
- }
84
- }, [onChange, onSelect]);
85
- const adjustDate = React.useCallback((daysToAdd, monthsToAdd, yearsToAdd) => {
86
- let date;
87
- if (selectedDate) {
88
- date = new Date(mode === 'year' ? selectedDate.getFullYear() + yearsToAdd : selectedDate.getFullYear(), mode === 'month' ? selectedDate.getMonth() + monthsToAdd : selectedDate.getMonth(), mode === 'day' ? selectedDate.getDate() + daysToAdd : selectedDate.getDate());
89
- } else {
90
- date = getStartOfDay.getStartOfDay(new Date());
91
- }
92
- date &&= moveToWithinRange.moveToWithinRange(date, min, max);
93
- if (date?.getTime() !== selectedDate?.getTime()) {
94
- onChange(date);
95
- }
96
- }, [selectedDate, min, max, mode, onChange]);
97
- const handleKeyDown = React.useCallback(event => {
98
- switch (event.key) {
99
- case 'ArrowLeft':
100
- adjustDate(-1, -1, -1);
101
- event.preventDefault();
102
- break;
103
- case 'ArrowUp':
104
- adjustDate(-7, -4, -4);
105
- event.preventDefault();
106
- break;
107
- case 'ArrowRight':
108
- adjustDate(1, 1, 1);
109
- event.preventDefault();
110
- break;
111
- case 'ArrowDown':
112
- adjustDate(7, 4, 4);
113
- event.preventDefault();
114
- break;
115
- }
116
- }, [adjustDate]);
117
- return (
118
- /*#__PURE__*/
119
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
120
- jsxRuntime.jsxs("div", {
121
- onKeyDown: handleKeyDown,
122
- children: [mode === 'day' && /*#__PURE__*/jsxRuntime.jsx(DayCalendar.default, {
123
- selectedDate: selectedDate,
124
- min: min,
125
- max: max,
126
- viewMonth: viewMonth,
127
- viewYear: viewYear,
128
- monthFormat: monthFormat$1,
129
- onSelect: handleSelectedDateUpdate,
130
- onLabelClick: switchToYears,
131
- onViewDateUpdate: handleViewDateUpdate
132
- }), mode === 'month' && /*#__PURE__*/jsxRuntime.jsx(MonthCalendar.default, {
133
- selectedDate: selectedDate,
134
- min: min,
135
- max: max,
136
- viewYear: viewYear,
137
- ...(placeholder != null && {
138
- placeholder
139
- }),
140
- onSelect: switchToDays,
141
- onLabelClick: switchToYears,
142
- onViewDateUpdate: handleViewDateUpdate
143
- }), mode === 'year' && /*#__PURE__*/jsxRuntime.jsx(YearCalendar.default, {
144
- selectedDate: selectedDate,
145
- min: min,
146
- max: max,
147
- viewYear: viewYear,
148
- ...(placeholder != null && {
149
- placeholder
150
- }),
151
- onSelect: switchToMonths,
152
- onViewDateUpdate: handleViewDateUpdate
153
- })]
154
- })
155
- );
156
- };
157
-
158
- exports.default = CalendarInput;
159
- //# sourceMappingURL=CalendarInput.js.map