@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,7 +1,3 @@
1
- // Above this header width a long title wraps beside the action corner. At or below it, the title
2
- // only shares a line with the actions while it fits on one line, so it keeps room to read.
3
- @np-header-actions-stack-width: 360px;
4
-
5
1
  .np-header {
6
2
  display: grid;
7
3
  grid-template-columns: 1fr auto;
@@ -17,7 +13,7 @@
17
13
  border-bottom: 1px solid var(--color-border-neutral);
18
14
 
19
15
  &,
20
- .np-header__title {
16
+ .np-header__title{
21
17
  color: var(--color-content-secondary);
22
18
  }
23
19
  }
@@ -28,62 +24,4 @@
28
24
  display: flex;
29
25
  align-items: center;
30
26
  }
31
-
32
- // Button actions are taller than the title, so it centres on them rather than sitting low.
33
- // The actions wrap under the title when they don't fit beside it.
34
- &--with-actions {
35
- --Header-actions-gap: var(--size-8);
36
-
37
- align-items: center;
38
- container-type: inline-size;
39
- display: flex;
40
- flex-wrap: wrap;
41
- row-gap: var(--size-8);
42
-
43
- > .np-header__title {
44
- flex: 1 1 0;
45
-
46
- @container (width <= @np-header-actions-stack-width) {
47
- flex-basis: auto;
48
- }
49
- }
50
- }
51
-
52
- // The title is a `Link`, but keeps the title's typography and colour rather than the link
53
- // text style, and flows inline so the chevron can follow its last word.
54
- &__title-link.np-link {
55
- color: inherit;
56
- display: inline;
57
- font: inherit;
58
- letter-spacing: inherit;
59
- // `Link` renders a button when there is no `href`, which would otherwise centre the title.
60
- text-align: start;
61
- text-decoration: none;
62
-
63
- &:hover,
64
- &:focus-visible {
65
- text-decoration: underline;
66
- }
67
-
68
- .np-header__title-chevron {
69
- white-space: nowrap;
70
-
71
- .tw-icon {
72
- display: inline-block;
73
- margin: 0;
74
- vertical-align: text-bottom;
75
- }
76
- }
77
- }
78
-
79
- &__actions {
80
- // Stays in the top corner when a long title wraps onto more lines.
81
- align-self: start;
82
- align-items: center;
83
- display: flex;
84
- flex: none;
85
- gap: var(--Header-actions-gap);
86
- // Keeps the actions at the inline end once they wrap under the title.
87
- margin-inline-start: auto;
88
- }
89
27
  }
@@ -1,10 +1,6 @@
1
- import { Plus, Settings } from '@transferwise/icons';
2
-
3
- import { mockMatchMedia, render, screen, userEvent } from '../test-utils';
1
+ import { render, screen, userEvent } from '../test-utils';
4
2
  import Header, { HeaderProps } from '.';
5
3
 
6
- mockMatchMedia();
7
-
8
4
  describe('Header', () => {
9
5
  const defaultProps: HeaderProps = {
10
6
  title: 'Header title',
@@ -114,132 +110,4 @@ describe('Header', () => {
114
110
  await userEvent.click(button);
115
111
  expect(callback).toHaveBeenCalledTimes(1);
116
112
  });
117
-
118
- describe('titleAction', () => {
119
- it('renders the title as a link inside the heading', () => {
120
- renderHeader({ as: 'h3', titleAction: { href: '/cards' } });
121
- const link = screen.getByRole('link', { name: 'Header title' });
122
- expect(link).toHaveAttribute('href', '/cards');
123
- expect(screen.getByRole('heading', { level: 3 })).toContainElement(link);
124
- });
125
-
126
- it('calls the titleAction onClick handler', async () => {
127
- const onClick = jest.fn();
128
- renderHeader({ titleAction: { href: '/cards', onClick } });
129
- await userEvent.click(screen.getByRole('link', { name: 'Header title' }));
130
- expect(onClick).toHaveBeenCalledTimes(1);
131
- });
132
-
133
- it('renders the title as a button when titleAction has only onClick', async () => {
134
- const onClick = jest.fn();
135
- renderHeader({ titleAction: { onClick } });
136
- await userEvent.click(screen.getByRole('button', { name: 'Header title' }));
137
- expect(onClick).toHaveBeenCalledTimes(1);
138
- });
139
-
140
- it('marks a title link that opens in a new tab', () => {
141
- renderHeader({ titleAction: { href: '/cards', target: '_blank' } });
142
- expect(screen.getByRole('link', { name: /Header title/u })).toHaveAttribute(
143
- 'rel',
144
- 'noreferrer',
145
- );
146
- });
147
-
148
- it('keeps the title link alongside actions', () => {
149
- renderHeader({ titleAction: { href: '/cards' }, action: { label: 'Order card' } });
150
- expect(screen.getByRole('link', { name: 'Header title' })).toBeInTheDocument();
151
- expect(screen.getByRole('button', { name: 'Order card' })).toBeInTheDocument();
152
- });
153
- });
154
-
155
- describe('action buttons', () => {
156
- it('still renders a text action as a link-styled action', () => {
157
- renderHeader({ action: { text: 'View all', href: '#' } });
158
- const link = screen.getByRole('link', { name: 'View all' });
159
- expect(link).toHaveClass('np-header__action-button');
160
- expect(link.closest('.np-header')).not.toHaveClass('np-header--with-actions');
161
- });
162
-
163
- it('renders a labelled action as a button', () => {
164
- renderHeader({ action: { label: 'Order card' } });
165
- expect(screen.getByRole('button', { name: 'Order card' })).toBeInTheDocument();
166
- });
167
-
168
- it('renders a labelled action with an href as a link', () => {
169
- renderHeader({ action: { label: 'Order card', href: '/cards/order' } });
170
- expect(screen.getByRole('link', { name: 'Order card' })).toHaveAttribute(
171
- 'href',
172
- '/cards/order',
173
- );
174
- });
175
-
176
- it('names an unlabelled action from its aria-label', () => {
177
- renderHeader({ action: { 'aria-label': 'Card settings', icon: <Settings size={16} /> } });
178
- expect(screen.getByRole('button', { name: 'Card settings' })).toBeInTheDocument();
179
- });
180
-
181
- it('calls the action onClick handler', async () => {
182
- const onClick = jest.fn();
183
- renderHeader({ action: { label: 'Order card', onClick } });
184
- await userEvent.click(screen.getByRole('button', { name: 'Order card' }));
185
- expect(onClick).toHaveBeenCalledTimes(1);
186
- });
187
-
188
- it('does not call onClick when disabled', async () => {
189
- const onClick = jest.fn();
190
- renderHeader({ action: { label: 'Order card', disabled: true, onClick } });
191
- await userEvent.click(screen.getByRole('button', { name: 'Order card' }));
192
- expect(onClick).not.toHaveBeenCalled();
193
- });
194
-
195
- it('renders actionSecondary before action in the DOM', () => {
196
- renderHeader({ action: { label: 'Order card' }, actionSecondary: { label: 'Manage' } });
197
- const [first, second] = screen.getAllByRole('button');
198
- expect(first).toHaveAccessibleName('Manage');
199
- expect(second).toHaveAccessibleName('Order card');
200
- });
201
-
202
- it('takes button priority from the slot the action is passed to', () => {
203
- renderHeader({ action: { label: 'Order card' }, actionSecondary: { label: 'Manage' } });
204
- expect(screen.getByRole('button', { name: 'Order card' })).toHaveClass(
205
- 'wds-Button--secondary',
206
- );
207
- expect(screen.getByRole('button', { name: 'Manage' })).toHaveClass(
208
- 'wds-Button--secondary-neutral',
209
- );
210
- });
211
-
212
- it('takes icon button priority from the slot the action is passed to', () => {
213
- renderHeader({
214
- action: { 'aria-label': 'Add', icon: <Plus size={16} /> },
215
- actionSecondary: { 'aria-label': 'Settings', icon: <Settings size={16} /> },
216
- });
217
- expect(screen.getByRole('button', { name: 'Add' })).toHaveClass(
218
- 'np-icon-button-secondary-default',
219
- );
220
- expect(screen.getByRole('button', { name: 'Settings' })).toHaveClass(
221
- 'np-icon-button-tertiary-default',
222
- );
223
- });
224
-
225
- it('keeps the lower emphasis when actionSecondary is used on its own', () => {
226
- renderHeader({ actionSecondary: { label: 'Manage' } });
227
- expect(screen.getByRole('button', { name: 'Manage' })).toHaveClass(
228
- 'wds-Button--secondary-neutral',
229
- );
230
- });
231
-
232
- it('renders an arbitrary node in place of the action buttons', () => {
233
- renderHeader({ action: <span>Custom node</span> });
234
- expect(screen.getByText('Custom node')).toBeInTheDocument();
235
- expect(screen.queryByRole('button')).not.toBeInTheDocument();
236
- });
237
-
238
- it('renders an element as given, even when it has a label prop', () => {
239
- const CustomAction = ({ label }: { label: string }) => <span>{label}</span>;
240
- renderHeader({ action: <CustomAction label="Custom action" /> });
241
- expect(screen.getByText('Custom action')).toBeInTheDocument();
242
- expect(screen.queryByRole('button')).not.toBeInTheDocument();
243
- });
244
- });
245
113
  });
@@ -1,16 +1,9 @@
1
- import { ChevronEnd } from '@transferwise/icons';
2
1
  import { clsx } from 'clsx';
3
2
 
4
3
  import { AriaLabelProperty, CommonProps, Heading, LinkProps, Typography } from '../common';
5
- import Link, { type LinkProps as LinkComponentProps } from '../Link';
4
+ import Link from '../Link';
6
5
  import Title from '../Title';
7
- import React, { useEffect, useRef, FunctionComponent, ReactNode, isValidElement } from 'react';
8
-
9
- import HeaderActionButtonComponent, {
10
- isHeaderActionButton,
11
- type HeaderActionButton,
12
- type HeaderActionSlot,
13
- } from './HeaderActionButton';
6
+ import React, { useEffect, useRef, FunctionComponent, ReactNode } from 'react';
14
7
 
15
8
  type ActionProps = AriaLabelProperty & {
16
9
  text: string;
@@ -21,38 +14,12 @@ type ActionProps = AriaLabelProperty & {
21
14
  type ButtonActionProps = ActionProps;
22
15
  type LinkActionProps = ActionProps & LinkProps;
23
16
 
24
- /**
25
- * Props passed to the [Link](https://storybook.wise.design/?path=/docs/typography-link--docs)
26
- * that the title is rendered as. A trailing chevron is rendered automatically, so do not put one
27
- * in `title`.
28
- */
29
- export type HeaderTitleAction = Pick<LinkComponentProps, 'href' | 'target' | 'onClick'>;
30
-
31
17
  export interface HeaderProps extends CommonProps {
32
18
  /**
33
- * Optional prop to define the action for the header.
34
- *
35
- * - An object with `text` renders a `Link` (or a link-styled button without `href`).
36
- * - A `HeaderActionButton` object (with a `label` or an `icon`) renders a small button that
37
- * carries the visual emphasis, anchored to the inline end.
38
- * - Any other node is rendered as given.
39
- * @default undefined
40
- */
41
- action?: ButtonActionProps | LinkActionProps | HeaderActionButton | ReactNode;
42
-
43
- /**
44
- * Second action, at a lower emphasis, rendered before `action`. Two is the maximum, to keep
45
- * the title legible. Takes a `HeaderActionButton` object or any other node, and keeps its lower
46
- * emphasis when used on its own.
47
- * @default undefined
19
+ * Optional prop to define the action for the header. If the `href` property
20
+ * is provided, a `Link` will be rendered instead of a `Button`.
48
21
  */
49
- actionSecondary?: HeaderActionButton | ReactNode;
50
-
51
- /**
52
- * Makes the title a link with a trailing chevron.
53
- * @default undefined
54
- */
55
- titleAction?: HeaderTitleAction;
22
+ action?: ButtonActionProps | LinkActionProps;
56
23
 
57
24
  /**
58
25
  * Option prop to specify DOM render element of the title
@@ -106,27 +73,8 @@ const HeaderAction = React.forwardRef<
106
73
 
107
74
  HeaderAction.displayName = 'HeaderAction';
108
75
 
109
- const isHeaderTextAction = (value: unknown): value is ButtonActionProps | LinkActionProps =>
110
- typeof value === 'object' &&
111
- value !== null &&
112
- !isValidElement(value) &&
113
- !Array.isArray(value) &&
114
- 'text' in value;
115
-
116
- const renderAction = (action: HeaderProps['action'], slot: HeaderActionSlot) => {
117
- if (isHeaderTextAction(action)) {
118
- return <HeaderAction action={action} />;
119
- }
120
- if (isHeaderActionButton(action)) {
121
- return <HeaderActionButtonComponent action={action} slot={slot} />;
122
- }
123
- return action;
124
- };
125
-
126
76
  /**
127
- * @param {ButtonActionProps | LinkActionProps | HeaderActionButton | ReactNode} [action] - Optional prop to specify the action link, button or custom node.
128
- * @param {HeaderActionButton | ReactNode} [actionSecondary] - Optional second action, at a lower emphasis.
129
- * @param {HeaderTitleAction} [titleAction] - Optional prop to make the title a link with a trailing chevron.
77
+ * @param {ButtonActionProps | LinkActionProps} [action] - Optional prop to specify the action button or link.
130
78
  * @param {Heading | 'legend'} [as='h5'] - Optional prop to override the heading element rendered for the title.
131
79
  * @param {string} title - Required prop to set the title of the section header.
132
80
  * @param {'group' | 'section'} [level='group'] - Optional prop to specify the level of the section header.
@@ -138,26 +86,14 @@ const renderAction = (action: HeaderProps['action'], slot: HeaderActionSlot) =>
138
86
  */
139
87
  const Header: FunctionComponent<HeaderProps> = React.forwardRef(
140
88
  (
141
- {
142
- as = 'h5',
143
- action,
144
- actionSecondary,
145
- titleAction,
146
- className,
147
- testId,
148
- title,
149
- level = 'group',
150
- ...props
151
- },
89
+ { as = 'h5', action, className, testId, title, level = 'group', ...props },
152
90
  ref: React.Ref<HTMLDivElement | HTMLHeadingElement | HTMLLegendElement>,
153
91
  ) => {
154
92
  const internalRef = useRef<HTMLLegendElement>(null);
155
93
  const levelTypography =
156
94
  level === 'group' ? Typography.TITLE_GROUP : Typography.TITLE_SUBSECTION;
157
- const hasActionCorner = Boolean(actionSecondary) || (!!action && !isHeaderTextAction(action));
158
95
  const headerClasses = clsx('np-header', className, {
159
96
  'np-header--group': level === 'group',
160
- 'np-header--with-actions': hasActionCorner,
161
97
  });
162
98
 
163
99
  const commonProps = {
@@ -176,52 +112,20 @@ const Header: FunctionComponent<HeaderProps> = React.forwardRef(
176
112
  }
177
113
  }, [as]);
178
114
 
179
- const titleContent = titleAction ? (
180
- <Link
181
- href={titleAction.href}
182
- target={titleAction.target}
183
- className="np-header__title-link"
184
- onClick={titleAction.onClick}
185
- >
186
- {title}
187
- {/* The word joiner keeps the chevron on the title's last line instead of wrapping alone. */}
188
- <span className="np-header__title-chevron" aria-hidden>
189
- {'\u2060'}
190
- <ChevronEnd size={16} />
191
- </span>
192
- </Link>
193
- ) : (
194
- title
195
- );
196
-
197
- if (!action && !actionSecondary) {
115
+ if (!action) {
198
116
  return (
199
117
  <Title ref={internalRef} as={as} type={levelTypography} {...commonProps} {...props}>
200
- {titleContent}
118
+ {title}
201
119
  </Title>
202
120
  );
203
121
  }
204
122
 
205
- if (!hasActionCorner) {
206
- return (
207
- <div {...commonProps} {...props} ref={ref}>
208
- <Title as={as} type={levelTypography} className="np-header__title">
209
- {titleContent}
210
- </Title>
211
- {renderAction(action, 'action')}
212
- </div>
213
- );
214
- }
215
-
216
123
  return (
217
124
  <div {...commonProps} {...props} ref={ref}>
218
125
  <Title as={as} type={levelTypography} className="np-header__title">
219
- {titleContent}
126
+ {title}
220
127
  </Title>
221
- <div className="np-header__actions">
222
- {actionSecondary && renderAction(actionSecondary, 'actionSecondary')}
223
- {action && renderAction(action, 'action')}
224
- </div>
128
+ <HeaderAction action={action} />
225
129
  </div>
226
130
  );
227
131
  },
@@ -1,7 +1,4 @@
1
- import { Plus, Settings } from '@transferwise/icons';
2
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
3
- import Body from '../../Body';
4
- import { Typography } from '../../common';
5
2
  import Header, { HeaderProps } from '..';
6
3
  import {
7
4
  createSandboxStory,
@@ -56,29 +53,10 @@ const meta: Meta<typeof Header> = {
56
53
  action: {
57
54
  table: {
58
55
  type: {
59
- summary: 'HeaderAction | HeaderActionButton | ReactNode',
56
+ summary: 'HeaderAction',
60
57
  },
61
58
  },
62
- description:
63
- 'Defines an optional action associated with the header: a `text` link, a `HeaderActionButton` (`label` or `icon`) rendered as a button, or any other node.',
64
- },
65
- actionSecondary: {
66
- control: false,
67
- table: {
68
- type: {
69
- summary: 'HeaderActionButton | ReactNode',
70
- },
71
- },
72
- description: 'A second action, at a lower emphasis, rendered before `action`.',
73
- },
74
- titleAction: {
75
- control: false,
76
- table: {
77
- type: {
78
- summary: 'HeaderTitleAction',
79
- },
80
- },
81
- description: 'Makes the title a link with a trailing chevron.',
59
+ description: 'Defines an optional action (e.g., button or link) associated with the header.',
82
60
  },
83
61
  },
84
62
  args: {
@@ -192,76 +170,3 @@ export const SectionLevel: Story = {
192
170
  },
193
171
  argTypes: hideControls(['action', 'as', 'className', 'title', 'testId']),
194
172
  };
195
-
196
- /**
197
- * `titleAction` turns the title into a link to its own screen and appends a chevron, which stays
198
- * on the title's last line when it wraps.
199
- */
200
- export const TitleAction: Story = {
201
- args: {
202
- title: 'Cards',
203
- titleAction: { href: '#cards' },
204
- },
205
- argTypes: hideControls(['action', 'actionSecondary', 'as', 'className', 'testId']),
206
- };
207
-
208
- /**
209
- * A `HeaderActionButton` (an object with a `label` or an `icon`) renders as a small button.
210
- * Emphasis comes from the slot: `action` is the louder one, anchored to the inline end, and
211
- * `actionSecondary` sits before it at a lower emphasis. An icon-only action requires an
212
- * `aria-label`.
213
- */
214
- export const ActionButtons: Story = {
215
- render: (args) => (
216
- <div style={{ display: 'flex', flexDirection: 'column', gap: '24px', width: '480px' }}>
217
- <Header
218
- {...args}
219
- title="Leading action"
220
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
221
- />
222
- <Header {...args} title="Secondary action only" actionSecondary={{ label: 'Manage' }} />
223
- <Header
224
- {...args}
225
- title="Both actions"
226
- titleAction={{ href: '#cards' }}
227
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
228
- actionSecondary={{ 'aria-label': 'Card settings', icon: <Settings size={16} /> }}
229
- />
230
- </div>
231
- ),
232
- argTypes: hideControls([
233
- 'action',
234
- 'actionSecondary',
235
- 'titleAction',
236
- 'title',
237
- 'className',
238
- 'testId',
239
- ]),
240
- };
241
-
242
- /**
243
- * Either action slot also takes any node, rendered as given in place of the action buttons.
244
- */
245
- export const CustomAction: Story = {
246
- render: (args) => (
247
- <div style={{ width: '480px' }}>
248
- <Header
249
- {...args}
250
- title="Balance"
251
- action={
252
- <Body as="span" type={Typography.BODY_DEFAULT_BOLD}>
253
- £1,240.00
254
- </Body>
255
- }
256
- />
257
- </div>
258
- ),
259
- argTypes: hideControls([
260
- 'action',
261
- 'actionSecondary',
262
- 'titleAction',
263
- 'title',
264
- 'className',
265
- 'testId',
266
- ]),
267
- };
@@ -1,4 +1,3 @@
1
- import { Plus, Settings } from '@transferwise/icons';
2
1
  import { Meta, StoryObj } from '@storybook/react-webpack5';
3
2
  import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
4
3
  import Header, { type HeaderProps } from '../Header';
@@ -121,26 +120,6 @@ export const AllVariants: Story = {
121
120
  href: 'https://wise.com',
122
121
  }}
123
122
  />
124
- {(['section', 'group'] as const).map((level) => (
125
- <Header
126
- key={`title-link-${level}`}
127
- as="h2"
128
- level={level}
129
- title={`Header level ${level} with title link`}
130
- titleAction={{ href: '#target' }}
131
- />
132
- ))}
133
- {(['section', 'group'] as const).map((level) => (
134
- <Header
135
- key={`buttons-${level}`}
136
- as="h2"
137
- level={level}
138
- title={`Header level ${level} with action buttons`}
139
- titleAction={{ href: '#target' }}
140
- action={{ label: 'Order card', icon: <Plus size={16} /> }}
141
- actionSecondary={{ 'aria-label': 'Settings', icon: <Settings size={16} /> }}
142
- />
143
- ))}
144
123
  </div>
145
124
  ),
146
125
  };
@@ -168,13 +147,6 @@ export const RTLDiff: Story = {
168
147
  level="section"
169
148
  action={{ 'aria-label': i18n.learnMore, text: i18n.learnMore, href: '#' }}
170
149
  />
171
- <Header
172
- title={i18n.groupWithButtons}
173
- level="group"
174
- titleAction={{ href: '#' }}
175
- action={{ label: i18n.viewAll, icon: <Plus size={16} /> }}
176
- actionSecondary={{ 'aria-label': i18n.learnMore, icon: <Settings size={16} /> }}
177
- />
178
150
  </div>
179
151
  );
180
152
  },
@@ -185,10 +157,6 @@ export const RTLDiff: Story = {
185
157
  groupWithAction: { en: 'Group level with action', ar: 'مستوى المجموعة مع إجراء' },
186
158
  sectionWithoutAction: { en: 'Section level without action', ar: 'مستوى القسم بدون إجراء' },
187
159
  sectionWithAction: { en: 'Section level with action', ar: 'مستوى القسم مع إجراء' },
188
- groupWithButtons: {
189
- en: 'Group level with action buttons',
190
- ar: 'مستوى المجموعة مع أزرار الإجراءات',
191
- },
192
160
  viewAll: { en: 'View all', ar: 'عرض الكل' },
193
161
  learnMore: { en: 'Learn more', ar: 'اعرف المزيد' },
194
162
  },
@@ -1,3 +1,2 @@
1
1
  export { default } from './Header';
2
- export type { HeaderProps, HeaderTitleAction } from './Header';
3
- export type { HeaderActionButton } from './HeaderActionButton';
2
+ export type { HeaderProps } from './Header';