@transferwise/components 0.0.0-experimental-db6cf60 → 0.0.0-experimental-4678400

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 (405) hide show
  1. package/build/Body/Body.js +1 -1
  2. package/build/Body/Body.js.map +1 -1
  3. package/build/Body/Body.mjs +1 -1
  4. package/build/Body/Body.mjs.map +1 -1
  5. package/build/Calendar/DayCalendar/Table/DayCalendarTable.js +1 -1
  6. package/build/Calendar/DayCalendar/Table/DayCalendarTable.js.map +1 -1
  7. package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs +1 -1
  8. package/build/Calendar/DayCalendar/Table/DayCalendarTable.mjs.map +1 -1
  9. package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js +1 -1
  10. package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.js.map +1 -1
  11. package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs +1 -1
  12. package/build/Calendar/MonthCalendar/Table/MonthCalendarTable.mjs.map +1 -1
  13. package/build/Calendar/TableLink/TableLink.js +1 -1
  14. package/build/Calendar/TableLink/TableLink.js.map +1 -1
  15. package/build/Calendar/TableLink/TableLink.mjs +1 -1
  16. package/build/Calendar/TableLink/TableLink.mjs.map +1 -1
  17. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js +1 -1
  18. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
  19. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +1 -1
  20. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
  21. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js +1 -1
  22. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js.map +1 -1
  23. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs +1 -1
  24. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs.map +1 -1
  25. package/build/Header/Header.js +8 -57
  26. package/build/Header/Header.js.map +1 -1
  27. package/build/Header/Header.mjs +9 -58
  28. package/build/Header/Header.mjs.map +1 -1
  29. package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js +2 -2
  30. package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +1 -1
  31. package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs +2 -2
  32. package/build/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +1 -1
  33. package/build/Inputs/SelectInput/Option/SelectInputOption.js +1 -1
  34. package/build/Inputs/SelectInput/Option/SelectInputOption.js.map +1 -1
  35. package/build/Inputs/SelectInput/Option/SelectInputOption.mjs +1 -1
  36. package/build/Inputs/SelectInput/Option/SelectInputOption.mjs.map +1 -1
  37. package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js +3 -3
  38. package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -1
  39. package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +3 -3
  40. package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -1
  41. package/build/Inputs/SelectInput/Popover/SelectInputPopover.js +2 -2
  42. package/build/Inputs/SelectInput/Popover/SelectInputPopover.js.map +1 -1
  43. package/build/Inputs/SelectInput/Popover/SelectInputPopover.mjs +2 -2
  44. package/build/Inputs/SelectInput/Popover/SelectInputPopover.mjs.map +1 -1
  45. package/build/Label/Label.js +1 -1
  46. package/build/Label/Label.js.map +1 -1
  47. package/build/Label/Label.mjs +1 -1
  48. package/build/Label/Label.mjs.map +1 -1
  49. package/build/Stepper/Stepper.js +1 -1
  50. package/build/Stepper/Stepper.js.map +1 -1
  51. package/build/Stepper/Stepper.mjs +1 -1
  52. package/build/Stepper/Stepper.mjs.map +1 -1
  53. package/build/Table/Header/TableHeader.js +1 -1
  54. package/build/Table/Header/TableHeader.js.map +1 -1
  55. package/build/Table/Header/TableHeader.mjs +1 -1
  56. package/build/Table/Header/TableHeader.mjs.map +1 -1
  57. package/build/Tabs/Tab/Tab.js +1 -1
  58. package/build/Tabs/Tab/Tab.js.map +1 -1
  59. package/build/Tabs/Tab/Tab.mjs +1 -1
  60. package/build/Tabs/Tab/Tab.mjs.map +1 -1
  61. package/build/Tag/Tag.js +1 -1
  62. package/build/Tag/Tag.js.map +1 -1
  63. package/build/Tag/Tag.mjs +1 -1
  64. package/build/Tag/Tag.mjs.map +1 -1
  65. package/build/Typeahead/TypeaheadOption/TypeaheadOption.js +2 -2
  66. package/build/Typeahead/TypeaheadOption/TypeaheadOption.js.map +1 -1
  67. package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs +2 -2
  68. package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs.map +1 -1
  69. package/build/Upload/Steps/UploadImageStep/UploadImageStep.js +2 -2
  70. package/build/Upload/Steps/UploadImageStep/UploadImageStep.js.map +1 -1
  71. package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs +2 -2
  72. package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs.map +1 -1
  73. package/build/_deprecated/ActionButton/ActionButton.js +1 -1
  74. package/build/_deprecated/ActionButton/ActionButton.js.map +1 -1
  75. package/build/_deprecated/ActionButton/ActionButton.mjs +1 -1
  76. package/build/_deprecated/ActionButton/ActionButton.mjs.map +1 -1
  77. package/build/_deprecated/Avatar/Avatar.js +1 -1
  78. package/build/_deprecated/Avatar/Avatar.js.map +1 -1
  79. package/build/_deprecated/Avatar/Avatar.mjs +1 -1
  80. package/build/_deprecated/Avatar/Avatar.mjs.map +1 -1
  81. package/build/_deprecated/Select/Select.js +2 -2
  82. package/build/_deprecated/Select/Select.js.map +1 -1
  83. package/build/_deprecated/Select/Select.mjs +2 -2
  84. package/build/_deprecated/Select/Select.mjs.map +1 -1
  85. package/build/common/PropsValues/typography.js +6 -0
  86. package/build/common/PropsValues/typography.js.map +1 -1
  87. package/build/common/PropsValues/typography.mjs +6 -0
  88. package/build/common/PropsValues/typography.mjs.map +1 -1
  89. package/build/index.js +0 -2
  90. package/build/index.js.map +1 -1
  91. package/build/index.mjs +0 -1
  92. package/build/index.mjs.map +1 -1
  93. package/build/main.css +8673 -2355
  94. package/build/styles/Accordion/Accordion.css +7 -6
  95. package/build/styles/Body/Body.css +1 -1
  96. package/build/styles/Calendar/Calendar.css +11 -4
  97. package/build/styles/Calendar/TableLink/TableLink.css +11 -4
  98. package/build/styles/Chips/Chip/Chip.css +5 -3
  99. package/build/styles/Decision/Decision.css +4 -3
  100. package/build/styles/Emphasis/Emphasis.css +1 -1
  101. package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
  102. package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
  103. package/build/styles/Header/Header.css +0 -46
  104. package/build/styles/Inputs/Input/Input.css +69 -57
  105. package/build/styles/Inputs/TextArea/TextArea.css +69 -57
  106. package/build/styles/Label/Label.css +3 -0
  107. package/build/styles/Markup/Markup.css +2 -2
  108. package/build/styles/MoneyInput/MoneyInput.css +9 -6
  109. package/build/styles/Nudge/Nudge.css +3 -3
  110. package/build/styles/Popover/Popover.css +4 -43
  111. package/build/styles/ProgressBar/ProgressBar.css +3 -2
  112. package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
  113. package/build/styles/Snackbar/Snackbar.css +1 -1
  114. package/build/styles/Table/Table.css +18 -8
  115. package/build/styles/Tabs/Tabs.css +3 -3
  116. package/build/styles/Tag/Tag.css +1 -1
  117. package/build/styles/Tile/Tile.css +4 -3
  118. package/build/styles/Typeahead/Typeahead.css +4 -2
  119. package/build/styles/UploadInput/UploadInput.css +1 -1
  120. package/build/styles/_deprecated/ActionButton/ActionButton.css +3 -4
  121. package/build/styles/_deprecated/Avatar/Avatar.css +2 -2
  122. package/build/styles/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
  123. package/build/styles/_deprecated/Select/Select.css +49 -14
  124. package/build/styles/_deprecated/Summary/Summary.css +2 -2
  125. package/build/styles/common/Circle/Circle.css +1 -1
  126. package/build/styles/common/Option/Option.css +4 -4
  127. package/build/styles/css/accordion.css +22 -44
  128. package/build/styles/css/badge.css +2 -2
  129. package/build/styles/css/button-groups.css +29 -6
  130. package/build/styles/css/buttons.css +35 -11
  131. package/build/styles/css/decision.css +22 -44
  132. package/build/styles/css/dropdowns.css +39 -54
  133. package/build/styles/css/droppable.css +28 -6
  134. package/build/styles/css/footer.css +41 -10
  135. package/build/styles/css/input-groups.css +205 -162
  136. package/build/styles/css/list-group.css +1 -42
  137. package/build/styles/css/modals.css +1 -1
  138. package/build/styles/css/navbar.css +66 -81
  139. package/build/styles/css/navs.css +8 -8
  140. package/build/styles/css/neptune-addons.css +15 -0
  141. package/build/styles/css/neptune-core.css +5887 -524
  142. package/build/styles/css/neptune.css +8348 -1945
  143. package/build/styles/css/panels.css +2 -2
  144. package/build/styles/css/popovers.css +39 -56
  145. package/build/styles/css/progress-bars.css +2 -2
  146. package/build/styles/css/sequences.css +14 -9
  147. package/build/styles/css/table.css +7 -7
  148. package/build/styles/css/tooltip.css +28 -6
  149. package/build/styles/less/legacy-variables.less +3 -3
  150. package/build/styles/less/neptune-tokens.less +0 -48
  151. package/build/styles/main.css +8673 -2355
  152. package/build/styles/props/neptune-tokens.css +805 -3
  153. package/build/styles/styles/less/accordion.css +22 -44
  154. package/build/styles/styles/less/badge.css +2 -2
  155. package/build/styles/styles/less/button-groups.css +29 -6
  156. package/build/styles/styles/less/buttons.css +35 -11
  157. package/build/styles/styles/less/decision.css +22 -44
  158. package/build/styles/styles/less/dropdowns.css +39 -54
  159. package/build/styles/styles/less/droppable.css +28 -6
  160. package/build/styles/styles/less/footer.css +41 -10
  161. package/build/styles/styles/less/forms/bootstrap-forms.css +153 -100
  162. package/build/styles/styles/less/forms/checkbox-radio.css +3 -3
  163. package/build/styles/styles/less/input-groups.css +205 -162
  164. package/build/styles/styles/less/list-group.css +1 -42
  165. package/build/styles/styles/less/modals.css +1 -1
  166. package/build/styles/styles/less/navbar.css +66 -81
  167. package/build/styles/styles/less/navs.css +8 -8
  168. package/build/styles/styles/less/neptune-addons.css +15 -0
  169. package/build/styles/styles/less/neptune-core.css +5887 -524
  170. package/build/styles/styles/less/neptune.css +8348 -1945
  171. package/build/styles/styles/less/panels.css +2 -2
  172. package/build/styles/styles/less/popovers.css +39 -56
  173. package/build/styles/styles/less/progress-bars.css +2 -2
  174. package/build/styles/styles/less/sequences.css +14 -9
  175. package/build/styles/styles/less/table.css +7 -7
  176. package/build/styles/styles/less/tooltip.css +28 -6
  177. package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
  178. package/build/types/Header/Header.d.ts +4 -31
  179. package/build/types/Header/Header.d.ts.map +1 -1
  180. package/build/types/Header/index.d.ts +1 -2
  181. package/build/types/Header/index.d.ts.map +1 -1
  182. package/build/types/common/PropsValues/typography.d.ts +13 -1
  183. package/build/types/common/PropsValues/typography.d.ts.map +1 -1
  184. package/build/types/index.d.ts +1 -3
  185. package/build/types/index.d.ts.map +1 -1
  186. package/package.json +2 -2
  187. package/src/Accordion/Accordion.css +7 -6
  188. package/src/Accordion/Accordion.less +7 -6
  189. package/src/Body/Body.css +1 -1
  190. package/src/Body/Body.less +1 -1
  191. package/src/Body/Body.test.tsx +4 -4
  192. package/src/Body/Body.tsx +2 -2
  193. package/src/Calendar/Calendar.css +11 -4
  194. package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +2 -2
  195. package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +1 -1
  196. package/src/Calendar/TableLink/TableLink.css +11 -4
  197. package/src/Calendar/TableLink/TableLink.less +14 -4
  198. package/src/Calendar/TableLink/TableLink.tsx +1 -1
  199. package/src/Chips/Chip/Chip.css +5 -3
  200. package/src/Chips/Chip/Chip.less +3 -2
  201. package/src/CircularButton/_stories/CircularButton.story.tsx +6 -16
  202. package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +46 -0
  203. package/src/Decision/Decision.css +4 -3
  204. package/src/Decision/Decision.less +4 -3
  205. package/src/DefinitionList/_stories/DefinitionList.story.tsx +1 -1
  206. package/src/Display/_stories/Display.story.tsx +20 -6
  207. package/src/Emphasis/Emphasis.css +1 -1
  208. package/src/Emphasis/Emphasis.less +1 -1
  209. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
  210. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +2 -1
  211. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +1 -4
  212. package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
  213. package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx +1 -1
  214. package/src/Header/Header.css +0 -46
  215. package/src/Header/Header.less +1 -63
  216. package/src/Header/Header.test.tsx +1 -133
  217. package/src/Header/Header.tsx +11 -107
  218. package/src/Header/_stories/Header.story.tsx +2 -97
  219. package/src/Header/_stories/Header.test.story.tsx +0 -32
  220. package/src/Header/index.ts +1 -2
  221. package/src/Inputs/Input/Input.css +69 -57
  222. package/src/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx +2 -2
  223. package/src/Inputs/SelectInput/Option/SelectInputOption.tsx +1 -1
  224. package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +3 -3
  225. package/src/Inputs/SelectInput/Popover/SelectInputPopover.tsx +2 -2
  226. package/src/Inputs/SelectInput/_stories/SelectInput.story.tsx +1 -1
  227. package/src/Inputs/TextArea/TextArea.css +69 -57
  228. package/src/Inputs/_common.less +16 -10
  229. package/src/Label/Label.css +3 -0
  230. package/src/Label/Label.less +8 -0
  231. package/src/Label/Label.tsx +1 -1
  232. package/src/Markup/Markup.css +2 -2
  233. package/src/Markup/Markup.less +2 -2
  234. package/src/MoneyInput/MoneyInput.css +9 -6
  235. package/src/MoneyInput/MoneyInput.less +10 -7
  236. package/src/Nudge/Nudge.css +3 -3
  237. package/src/Nudge/Nudge.less +3 -3
  238. package/src/PocketSurface/_stories/PocketSurface.story.tsx +2 -2
  239. package/src/Popover/Popover.css +4 -43
  240. package/src/Popover/Popover.less +2 -2
  241. package/src/ProgressBar/ProgressBar.css +3 -2
  242. package/src/ProgressBar/ProgressBar.less +12 -11
  243. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
  244. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +2 -1
  245. package/src/SentimentSurface/_stories/SentimentSurface.story.tsx +1 -1
  246. package/src/Snackbar/Snackbar.css +1 -1
  247. package/src/Snackbar/Snackbar.less +1 -1
  248. package/src/Stepper/Stepper.tsx +1 -1
  249. package/src/Table/Header/TableHeader.tsx +1 -1
  250. package/src/Table/StatusText/TableStatusText.test.tsx +5 -5
  251. package/src/Table/Table.css +18 -8
  252. package/src/Table/Table.less +20 -9
  253. package/src/Tabs/Tab/Tab.tsx +1 -1
  254. package/src/Tabs/Tabs.css +3 -3
  255. package/src/Tabs/Tabs.less +3 -3
  256. package/src/Tag/Tag.css +1 -1
  257. package/src/Tag/Tag.less +1 -1
  258. package/src/Tag/Tag.tsx +1 -1
  259. package/src/Tag/_stories/Tag.story.tsx +1 -1
  260. package/src/Tile/Tile.css +4 -3
  261. package/src/Tile/Tile.less +4 -3
  262. package/src/Typeahead/Typeahead.css +4 -2
  263. package/src/Typeahead/Typeahead.less +2 -1
  264. package/src/Typeahead/TypeaheadOption/TypeaheadOption.tsx +2 -2
  265. package/src/Upload/Steps/UploadImageStep/UploadImageStep.tsx +2 -2
  266. package/src/UploadInput/UploadInput.css +1 -1
  267. package/src/UploadInput/UploadInput.less +7 -4
  268. package/src/_deprecated/ActionButton/ActionButton.css +3 -4
  269. package/src/_deprecated/ActionButton/ActionButton.less +4 -5
  270. package/src/_deprecated/ActionButton/ActionButton.tsx +1 -1
  271. package/src/_deprecated/Avatar/Avatar.css +2 -2
  272. package/src/_deprecated/Avatar/Avatar.less +2 -2
  273. package/src/_deprecated/Avatar/Avatar.tsx +1 -1
  274. package/src/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
  275. package/src/_deprecated/CriticalBanner/CriticalCommsBanner.less +2 -1
  276. package/src/_deprecated/NavigationOption/_stories/NavigationOption.story.tsx +6 -6
  277. package/src/_deprecated/Select/Select.css +49 -14
  278. package/src/_deprecated/Select/Select.less +14 -10
  279. package/src/_deprecated/Select/Select.tsx +2 -2
  280. package/src/_deprecated/Summary/Summary.css +2 -2
  281. package/src/_deprecated/Summary/Summary.less +2 -2
  282. package/src/common/Circle/Circle.css +1 -1
  283. package/src/common/Circle/Circle.less +1 -1
  284. package/src/common/Option/Option.css +4 -4
  285. package/src/common/Option/Option.less +4 -4
  286. package/src/common/PropsValues/typography.ts +20 -1
  287. package/src/index.ts +1 -3
  288. package/src/main.css +8673 -2355
  289. package/src/main.less +3 -3
  290. package/src/styles/less/accordion.css +22 -44
  291. package/src/styles/less/addons/_background-utilities.less +5 -0
  292. package/src/styles/less/badge.css +2 -2
  293. package/src/styles/less/badge.less +2 -2
  294. package/src/styles/less/button-groups.css +29 -6
  295. package/src/styles/less/button-groups.less +3 -2
  296. package/src/styles/less/buttons.css +35 -11
  297. package/src/styles/less/buttons.less +7 -7
  298. package/src/styles/less/core/_fonts.less +7 -75
  299. package/src/styles/less/core/_scaffolding.less +4 -4
  300. package/src/styles/less/core/_typography-utilities.less +3 -3
  301. package/src/styles/less/core/_typography.less +81 -235
  302. package/src/styles/less/core/fonts/_fonts-ar.less +86 -0
  303. package/src/styles/less/core/fonts/_fonts-base.less +99 -0
  304. package/src/styles/less/core/fonts/_fonts-he.less +8 -0
  305. package/src/styles/less/core/fonts/_fonts-ja.less +4247 -0
  306. package/src/styles/less/core/fonts/_fonts-ko.less +1079 -0
  307. package/src/styles/less/core/fonts/_fonts-th.less +8 -0
  308. package/src/styles/less/core/fonts/_fonts-zh.less +872 -0
  309. package/src/styles/less/decision.css +22 -44
  310. package/src/styles/less/decision.less +2 -2
  311. package/src/styles/less/dropdowns.css +39 -54
  312. package/src/styles/less/dropdowns.less +8 -7
  313. package/src/styles/less/droppable.css +28 -6
  314. package/src/styles/less/droppable.less +4 -4
  315. package/src/styles/less/footer.css +41 -10
  316. package/src/styles/less/footer.less +4 -3
  317. package/src/styles/less/forms/bootstrap-forms.css +153 -100
  318. package/src/styles/less/forms/bootstrap-forms.less +85 -72
  319. package/src/styles/less/forms/checkbox-radio.css +3 -3
  320. package/src/styles/less/forms/checkbox-radio.less +3 -3
  321. package/src/styles/less/input-groups.css +205 -162
  322. package/src/styles/less/input-groups.less +23 -9
  323. package/src/styles/less/list-group.css +1 -42
  324. package/src/styles/less/list-group.less +8 -5
  325. package/src/styles/less/mixins/_reset-text.less +1 -1
  326. package/src/styles/less/mixins/_text-emphasis.less +7 -1
  327. package/src/styles/less/modals.css +1 -1
  328. package/src/styles/less/modals.less +1 -1
  329. package/src/styles/less/navbar.css +66 -81
  330. package/src/styles/less/navbar.less +19 -19
  331. package/src/styles/less/navs.css +8 -8
  332. package/src/styles/less/navs.less +8 -8
  333. package/src/styles/less/neptune-addons.css +15 -0
  334. package/src/styles/less/neptune-core.css +5887 -524
  335. package/src/styles/less/neptune.bundle.less +4 -0
  336. package/src/styles/less/neptune.css +8348 -1945
  337. package/src/styles/less/panels.css +2 -2
  338. package/src/styles/less/panels.less +2 -2
  339. package/src/styles/less/popovers.css +39 -56
  340. package/src/styles/less/popovers.less +7 -7
  341. package/src/styles/less/progress-bars.css +2 -2
  342. package/src/styles/less/progress-bars.less +2 -2
  343. package/src/styles/less/sequences.css +14 -9
  344. package/src/styles/less/sequences.less +15 -10
  345. package/src/styles/less/table.css +7 -7
  346. package/src/styles/less/table.less +7 -7
  347. package/src/styles/less/tooltip.css +28 -6
  348. package/src/styles/less/tooltip.less +1 -1
  349. package/src/styles/variables/legacy-variables.less +3 -3
  350. package/build/CardContainer/CardContainer.js +0 -30
  351. package/build/CardContainer/CardContainer.js.map +0 -1
  352. package/build/CardContainer/CardContainer.mjs +0 -26
  353. package/build/CardContainer/CardContainer.mjs.map +0 -1
  354. package/build/Header/HeaderActionButton.js +0 -70
  355. package/build/Header/HeaderActionButton.js.map +0 -1
  356. package/build/Header/HeaderActionButton.mjs +0 -65
  357. package/build/Header/HeaderActionButton.mjs.map +0 -1
  358. package/build/styles/CardContainer/CardContainer.css +0 -78
  359. package/build/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  360. package/build/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  361. package/build/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  362. package/build/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  363. package/build/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  364. package/build/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  365. package/build/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  366. package/build/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
  367. package/build/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
  368. package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
  369. package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
  370. package/build/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
  371. package/build/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
  372. package/build/types/CardContainer/CardContainer.d.ts +0 -8
  373. package/build/types/CardContainer/CardContainer.d.ts.map +0 -1
  374. package/build/types/CardContainer/CardContainer.types.d.ts +0 -32
  375. package/build/types/CardContainer/CardContainer.types.d.ts.map +0 -1
  376. package/build/types/CardContainer/_stories/helpers.d.ts +0 -3
  377. package/build/types/CardContainer/_stories/helpers.d.ts.map +0 -1
  378. package/build/types/CardContainer/index.d.ts +0 -3
  379. package/build/types/CardContainer/index.d.ts.map +0 -1
  380. package/build/types/Header/HeaderActionButton.d.ts +0 -53
  381. package/build/types/Header/HeaderActionButton.d.ts.map +0 -1
  382. package/src/CardContainer/CardContainer.css +0 -78
  383. package/src/CardContainer/CardContainer.less +0 -111
  384. package/src/CardContainer/CardContainer.test.tsx +0 -103
  385. package/src/CardContainer/CardContainer.tsx +0 -36
  386. package/src/CardContainer/CardContainer.types.ts +0 -36
  387. package/src/CardContainer/_stories/CardContainer.story.tsx +0 -99
  388. package/src/CardContainer/_stories/CardContainer.test.story.tsx +0 -375
  389. package/src/CardContainer/_stories/CardContainer.withHeader.story.tsx +0 -149
  390. package/src/CardContainer/_stories/helpers.tsx +0 -50
  391. package/src/CardContainer/index.ts +0 -2
  392. package/src/Header/HeaderActionButton.tsx +0 -125
  393. package/src/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  394. package/src/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  395. package/src/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  396. package/src/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  397. package/src/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  398. package/src/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  399. package/src/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  400. package/src/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
  401. package/src/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
  402. package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
  403. package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
  404. package/src/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
  405. package/src/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
@@ -1,149 +0,0 @@
1
- import { Plus, Settings } from '@transferwise/icons';
2
- import { Meta, StoryObj } from '@storybook/react-webpack5';
3
-
4
- import Body from '../../Body';
5
- import { Typography } from '../../common';
6
- import Header from '../../Header';
7
- import CardContainer from '..';
8
- import type { CardContainerSpotlight } from '..';
9
- import { CardsList, SampleContent } from './helpers';
10
-
11
- /**
12
- * A `Header` composed as the card's first child gives up its own group border and spacing, so the
13
- * card's padding places it. Use the `Header`'s `titleAction`, `action` and `actionSecondary` props
14
- * for the title link and the action corner.
15
- */
16
- const meta: Meta<typeof CardContainer> = {
17
- component: CardContainer,
18
- title: 'Layouts/CardContainer/With Header',
19
- parameters: { controls: { disable: true } },
20
- };
21
-
22
- export default meta;
23
-
24
- type Story = StoryObj<typeof CardContainer>;
25
-
26
- /** `titleAction` turns the title into a link to the card's own screen and appends a chevron. */
27
- export const TitleLink: Story = {
28
- render: () => (
29
- <CardContainer>
30
- <Header as="h3" title="Cards" titleAction={{ href: '#cards' }} />
31
- <SampleContent />
32
- </CardContainer>
33
- ),
34
- };
35
-
36
- /**
37
- * `actionSecondary` renders before `action` at a lower emphasis; two actions is the maximum, to
38
- * keep the title legible. When the header is 360px wide or narrower, the actions move under a
39
- * title that doesn't fit beside them on one line.
40
- */
41
- export const Actions: Story = {
42
- render: () => (
43
- <div style={{ display: 'flex', flexDirection: 'column', gap: '24px', maxWidth: '480px' }}>
44
- <CardContainer>
45
- <Header
46
- as="h3"
47
- title="Cards"
48
- titleAction={{ href: '#cards' }}
49
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
50
- actionSecondary={{ 'aria-label': 'Card settings', icon: <Settings size={16} /> }}
51
- />
52
- <SampleContent />
53
- </CardContainer>
54
-
55
- <div style={{ width: '320px' }}>
56
- <CardContainer>
57
- <Header
58
- as="h3"
59
- title="Cards"
60
- titleAction={{ href: '#cards' }}
61
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
62
- actionSecondary={{ 'aria-label': 'Card settings', icon: <Settings size={16} /> }}
63
- />
64
- <SampleContent />
65
- </CardContainer>
66
- </div>
67
- </div>
68
- ),
69
- };
70
-
71
- /**
72
- * Inside a card, a title too long for its line wraps. A linked title keeps its chevron after its
73
- * last word.
74
- */
75
- export const LongTitle: Story = {
76
- render: () => (
77
- <div style={{ display: 'flex', flexDirection: 'column', gap: '24px', maxWidth: '480px' }}>
78
- <CardContainer>
79
- <Header as="h3" title="Cards, accounts and everything else you hold with us" />
80
- <SampleContent />
81
- </CardContainer>
82
-
83
- <CardContainer>
84
- <Header
85
- as="h3"
86
- title="Cards, accounts and everything else you hold with us"
87
- titleAction={{ href: '#cards' }}
88
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
89
- actionSecondary={{ 'aria-label': 'Card settings', icon: <Settings size={16} /> }}
90
- />
91
- <SampleContent />
92
- </CardContainer>
93
- </div>
94
- ),
95
- };
96
-
97
- /** The `Header`'s action slots also take any node, for content the button actions do not cover. */
98
- export const CustomAction: Story = {
99
- render: () => (
100
- <CardContainer>
101
- <Header
102
- as="h3"
103
- title="Balance"
104
- action={
105
- <Body as="span" type={Typography.BODY_DEFAULT_BOLD}>
106
- £1,240.00
107
- </Body>
108
- }
109
- />
110
- <SampleContent />
111
- </CardContainer>
112
- ),
113
- };
114
-
115
- /** A `Header` followed by a list, as in a dashboard's cards module. */
116
- export const WithList: Story = {
117
- render: () => (
118
- <CardContainer>
119
- <Header
120
- as="h3"
121
- title="Cards"
122
- titleAction={{ href: '#cards' }}
123
- action={{ label: 'New card', icon: <Plus size={16} /> }}
124
- />
125
- <CardsList />
126
- </CardContainer>
127
- ),
128
- };
129
-
130
- /** The same `Header` on each spotlight. */
131
- export const Spotlight: Story = {
132
- render: () => (
133
- <div style={{ display: 'flex', flexDirection: 'column', gap: '24px', maxWidth: '480px' }}>
134
- {([undefined, 'active', 'inactive'] as (CardContainerSpotlight | undefined)[]).map(
135
- (spotlight) => (
136
- <CardContainer key={spotlight ?? 'none'} spotlight={spotlight}>
137
- <Header
138
- as="h3"
139
- title={`Spotlight: ${spotlight ?? 'not set'}`}
140
- titleAction={{ href: '#cards' }}
141
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
142
- />
143
- <SampleContent />
144
- </CardContainer>
145
- ),
146
- )}
147
- </div>
148
- ),
149
- };
@@ -1,50 +0,0 @@
1
- import { Card, Jar, Travel } from '@transferwise/icons';
2
-
3
- import Body from '../../Body';
4
- import List from '../../List';
5
- import ListItem from '../../ListItem';
6
-
7
- export const SampleContent = () => (
8
- <>
9
- <Body>Your virtual card is ready to use.</Body>
10
- <Body>Spend in 40+ currencies with the real exchange rate.</Body>
11
- </>
12
- );
13
-
14
- export const CardsList = () => (
15
- <List>
16
- <ListItem
17
- title="•••• 1582"
18
- subtitle="Current account"
19
- valueTitle="£0 spent"
20
- media={
21
- <ListItem.AvatarView>
22
- <Card />
23
- </ListItem.AvatarView>
24
- }
25
- control={<ListItem.Navigation href="#card-1582" />}
26
- />
27
- <ListItem
28
- title="•••• 9982"
29
- subtitle="Jar"
30
- valueTitle="£410 / £500 day"
31
- media={
32
- <ListItem.AvatarView>
33
- <Jar />
34
- </ListItem.AvatarView>
35
- }
36
- control={<ListItem.Navigation href="#card-9982" />}
37
- />
38
- <ListItem
39
- title="•••• 5507"
40
- subtitle="Travel"
41
- valueTitle="£200 / £500 day"
42
- media={
43
- <ListItem.AvatarView>
44
- <Travel />
45
- </ListItem.AvatarView>
46
- }
47
- control={<ListItem.Navigation href="#card-5507" />}
48
- />
49
- </List>
50
- );
@@ -1,2 +0,0 @@
1
- export { default } from './CardContainer';
2
- export type { CardContainerProps, CardContainerSpotlight } from './CardContainer.types';
@@ -1,125 +0,0 @@
1
- import { isValidElement, type MouseEventHandler, type ReactNode } from 'react';
2
-
3
- import Button from '../Button';
4
- import type { ButtonPriority, ButtonProps } from '../Button/Button.types';
5
- import IconButton, { type IconButtonProps } from '../IconButton';
6
-
7
- /** The action slot a `HeaderActionButton` was passed to, which is what determines its emphasis. */
8
- export type HeaderActionSlot = 'action' | 'actionSecondary';
9
-
10
- type HeaderActionButtonBase = Pick<ButtonProps, 'href' | 'target' | 'disabled'> & {
11
- /**
12
- * `HTMLElement` rather than a narrower target, because an action is a `button` or an `a`
13
- * depending on whether `href` is set.
14
- * @default undefined
15
- */
16
- onClick?: MouseEventHandler<HTMLElement>;
17
-
18
- /**
19
- * Rendered after `label`, or as the only content of an unlabelled action.
20
- * Size it yourself — 16px is expected in both cases.
21
- * @default undefined
22
- */
23
- icon?: ReactNode;
24
- 'data-testid'?: string;
25
- };
26
-
27
- /** An action with a visible label, rendered as a small button. */
28
- type HeaderLabelledActionButton = HeaderActionButtonBase & {
29
- label: ButtonProps['children'];
30
- /** @default undefined */
31
- 'aria-label'?: string;
32
- };
33
-
34
- /**
35
- * An action with no visible label, rendered as a 32px icon button. The icon is
36
- * the only thing on screen and `aria-label` is the only accessible name, so
37
- * both are required.
38
- */
39
- type HeaderIconActionButton = HeaderActionButtonBase & {
40
- label?: never;
41
- icon: ReactNode;
42
- 'aria-label': string;
43
- };
44
-
45
- /**
46
- * An action the `Header` renders as a button. With a `label` it is a small `Button`; without
47
- * one, a 32px `IconButton`, which requires both an `icon` and an `aria-label`. Emphasis is not
48
- * part of the object — it comes from the slot the action is passed to.
49
- */
50
- export type HeaderActionButton = HeaderLabelledActionButton | HeaderIconActionButton;
51
-
52
- const BUTTON_PRIORITY = {
53
- action: 'secondary',
54
- actionSecondary: 'secondary-neutral',
55
- } as const satisfies Record<HeaderActionSlot, ButtonPriority>;
56
-
57
- const ICON_BUTTON_PRIORITY = {
58
- action: 'secondary',
59
- actionSecondary: 'tertiary',
60
- } as const satisfies Record<HeaderActionSlot, IconButtonProps['priority']>;
61
-
62
- /**
63
- * Tells a `HeaderActionButton` object apart from any other node passed to an action slot.
64
- * Every button action has a `label` or an `icon`, which no React element, portal or array does.
65
- */
66
- export const isHeaderActionButton = (value: unknown): value is HeaderActionButton =>
67
- typeof value === 'object' &&
68
- value !== null &&
69
- !isValidElement(value) &&
70
- !Array.isArray(value) &&
71
- ('label' in value || 'icon' in value);
72
-
73
- /** Renders a `HeaderActionButton` at the emphasis of the slot it was passed to. */
74
- const HeaderActionButtonComponent = function HeaderActionButton({
75
- action: {
76
- label,
77
- icon,
78
- 'aria-label': ariaLabel,
79
- 'data-testid': dataTestId,
80
- href,
81
- target,
82
- onClick,
83
- disabled,
84
- },
85
- slot,
86
- }: {
87
- action: HeaderActionButton;
88
- slot: HeaderActionSlot;
89
- }) {
90
- if (label === undefined) {
91
- return (
92
- <IconButton
93
- size={32}
94
- priority={ICON_BUTTON_PRIORITY[slot]}
95
- aria-label={ariaLabel}
96
- href={href}
97
- target={target}
98
- disabled={disabled}
99
- data-testid={dataTestId}
100
- onClick={onClick}
101
- >
102
- {icon}
103
- </IconButton>
104
- );
105
- }
106
-
107
- return (
108
- <Button
109
- v2
110
- size="sm"
111
- priority={BUTTON_PRIORITY[slot]}
112
- aria-label={ariaLabel}
113
- href={href}
114
- target={target}
115
- disabled={disabled}
116
- addonEnd={icon ? { type: 'icon', value: icon } : undefined}
117
- data-testid={dataTestId}
118
- onClick={onClick}
119
- >
120
- {label}
121
- </Button>
122
- );
123
- };
124
-
125
- export default HeaderActionButtonComponent;