@transferwise/components 46.165.4 → 46.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (417) hide show
  1. package/build/Body/Body.js +2 -2
  2. package/build/Body/Body.js.map +1 -1
  3. package/build/Body/Body.mjs +2 -2
  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/Display/Display.js +3 -1
  18. package/build/Display/Display.js.map +1 -1
  19. package/build/Display/Display.mjs +3 -1
  20. package/build/Display/Display.mjs.map +1 -1
  21. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js +1 -1
  22. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.js.map +1 -1
  23. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs +1 -1
  24. package/build/ExpressiveMoneyInput/AmountInput/AmountInput.mjs.map +1 -1
  25. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js +1 -1
  26. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.js.map +1 -1
  27. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.mjs +1 -1
  28. package/build/FlowNavigation/AnimatedLabel/AnimatedLabel.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 +3 -2
  50. package/build/Stepper/Stepper.js.map +1 -1
  51. package/build/Stepper/Stepper.mjs +3 -2
  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/Title/Title.js +2 -2
  66. package/build/Title/Title.js.map +1 -1
  67. package/build/Title/Title.mjs +2 -2
  68. package/build/Title/Title.mjs.map +1 -1
  69. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +5 -5
  70. package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
  71. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +5 -5
  72. package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
  73. package/build/Typeahead/TypeaheadOption/TypeaheadOption.js +2 -2
  74. package/build/Typeahead/TypeaheadOption/TypeaheadOption.js.map +1 -1
  75. package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs +2 -2
  76. package/build/Typeahead/TypeaheadOption/TypeaheadOption.mjs.map +1 -1
  77. package/build/Upload/Steps/UploadImageStep/UploadImageStep.js +2 -2
  78. package/build/Upload/Steps/UploadImageStep/UploadImageStep.js.map +1 -1
  79. package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs +2 -2
  80. package/build/Upload/Steps/UploadImageStep/UploadImageStep.mjs.map +1 -1
  81. package/build/_deprecated/ActionButton/ActionButton.js +1 -1
  82. package/build/_deprecated/ActionButton/ActionButton.js.map +1 -1
  83. package/build/_deprecated/ActionButton/ActionButton.mjs +1 -1
  84. package/build/_deprecated/ActionButton/ActionButton.mjs.map +1 -1
  85. package/build/_deprecated/Avatar/Avatar.js +1 -1
  86. package/build/_deprecated/Avatar/Avatar.js.map +1 -1
  87. package/build/_deprecated/Avatar/Avatar.mjs +1 -1
  88. package/build/_deprecated/Avatar/Avatar.mjs.map +1 -1
  89. package/build/_deprecated/Select/Select.js +2 -2
  90. package/build/_deprecated/Select/Select.js.map +1 -1
  91. package/build/_deprecated/Select/Select.mjs +2 -2
  92. package/build/_deprecated/Select/Select.mjs.map +1 -1
  93. package/build/common/PropsValues/typography.js +6 -0
  94. package/build/common/PropsValues/typography.js.map +1 -1
  95. package/build/common/PropsValues/typography.mjs +6 -0
  96. package/build/common/PropsValues/typography.mjs.map +1 -1
  97. package/build/main.css +9097 -1964
  98. package/build/styles/Accordion/Accordion.css +7 -6
  99. package/build/styles/Body/Body.css +2 -1
  100. package/build/styles/Calendar/Calendar.css +5 -4
  101. package/build/styles/Calendar/TableLink/TableLink.css +5 -4
  102. package/build/styles/Chips/Chip/Chip.css +5 -3
  103. package/build/styles/Decision/Decision.css +4 -3
  104. package/build/styles/Emphasis/Emphasis.css +1 -1
  105. package/build/styles/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
  106. package/build/styles/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
  107. package/build/styles/Inputs/Input/Input.css +98 -24
  108. package/build/styles/Inputs/TextArea/TextArea.css +98 -24
  109. package/build/styles/Label/Label.css +3 -0
  110. package/build/styles/Markup/Markup.css +2 -2
  111. package/build/styles/MoneyInput/MoneyInput.css +9 -6
  112. package/build/styles/Nudge/Nudge.css +3 -3
  113. package/build/styles/Popover/Popover.css +30 -7
  114. package/build/styles/ProgressBar/ProgressBar.css +3 -2
  115. package/build/styles/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
  116. package/build/styles/Snackbar/Snackbar.css +1 -1
  117. package/build/styles/Table/Table.css +18 -8
  118. package/build/styles/Tabs/Tabs.css +3 -3
  119. package/build/styles/Tag/Tag.css +1 -1
  120. package/build/styles/Tile/Tile.css +4 -3
  121. package/build/styles/Typeahead/Typeahead.css +12 -29
  122. package/build/styles/UploadInput/UploadInput.css +1 -1
  123. package/build/styles/_deprecated/ActionButton/ActionButton.css +3 -4
  124. package/build/styles/_deprecated/Avatar/Avatar.css +2 -2
  125. package/build/styles/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
  126. package/build/styles/_deprecated/Select/Select.css +49 -14
  127. package/build/styles/_deprecated/Summary/Summary.css +2 -2
  128. package/build/styles/common/Circle/Circle.css +1 -1
  129. package/build/styles/common/Option/Option.css +4 -4
  130. package/build/styles/css/accordion.css +53 -11
  131. package/build/styles/css/badge.css +2 -2
  132. package/build/styles/css/button-groups.css +29 -6
  133. package/build/styles/css/buttons.css +35 -11
  134. package/build/styles/css/decision.css +53 -11
  135. package/build/styles/css/dropdowns.css +65 -18
  136. package/build/styles/css/droppable.css +28 -6
  137. package/build/styles/css/footer.css +41 -10
  138. package/build/styles/css/input-groups.css +249 -117
  139. package/build/styles/css/list-group.css +28 -8
  140. package/build/styles/css/modals.css +1 -1
  141. package/build/styles/css/navbar.css +92 -45
  142. package/build/styles/css/navs.css +8 -8
  143. package/build/styles/css/neptune-addons.css +15 -0
  144. package/build/styles/css/neptune-core.css +6230 -525
  145. package/build/styles/css/neptune.css +8790 -1768
  146. package/build/styles/css/panels.css +2 -2
  147. package/build/styles/css/popovers.css +64 -20
  148. package/build/styles/css/progress-bars.css +2 -2
  149. package/build/styles/css/sequences.css +14 -9
  150. package/build/styles/css/table.css +7 -7
  151. package/build/styles/css/tooltip.css +28 -6
  152. package/build/styles/less/legacy-variables.less +3 -3
  153. package/build/styles/less/neptune-tokens.less +0 -48
  154. package/build/styles/main.css +9097 -1964
  155. package/build/styles/props/neptune-tokens.css +805 -3
  156. package/build/styles/styles/less/accordion.css +53 -11
  157. package/build/styles/styles/less/badge.css +2 -2
  158. package/build/styles/styles/less/button-groups.css +29 -6
  159. package/build/styles/styles/less/buttons.css +35 -11
  160. package/build/styles/styles/less/decision.css +53 -11
  161. package/build/styles/styles/less/dropdowns.css +65 -18
  162. package/build/styles/styles/less/droppable.css +28 -6
  163. package/build/styles/styles/less/footer.css +41 -10
  164. package/build/styles/styles/less/forms/bootstrap-forms.css +153 -100
  165. package/build/styles/styles/less/forms/checkbox-radio.css +3 -3
  166. package/build/styles/styles/less/input-groups.css +249 -117
  167. package/build/styles/styles/less/list-group.css +28 -8
  168. package/build/styles/styles/less/modals.css +1 -1
  169. package/build/styles/styles/less/navbar.css +92 -45
  170. package/build/styles/styles/less/navs.css +8 -8
  171. package/build/styles/styles/less/neptune-addons.css +15 -0
  172. package/build/styles/styles/less/neptune-core.css +6230 -525
  173. package/build/styles/styles/less/neptune.css +8790 -1768
  174. package/build/styles/styles/less/panels.css +2 -2
  175. package/build/styles/styles/less/popovers.css +64 -20
  176. package/build/styles/styles/less/progress-bars.css +2 -2
  177. package/build/styles/styles/less/sequences.css +14 -9
  178. package/build/styles/styles/less/table.css +7 -7
  179. package/build/styles/styles/less/tooltip.css +28 -6
  180. package/build/types/Body/Body.d.ts +2 -2
  181. package/build/types/Body/Body.d.ts.map +1 -1
  182. package/build/types/Display/Display.d.ts.map +1 -1
  183. package/build/types/ExpressiveMoneyInput/AmountInput/AmountInput.d.ts.map +1 -1
  184. package/build/types/IconButton/IconButton.d.ts +1 -1
  185. package/build/types/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +1 -1
  186. package/build/types/Inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +1 -1
  187. package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
  188. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  189. package/build/types/Stepper/Stepper.d.ts.map +1 -1
  190. package/build/types/Tabs/Tab/Tab.d.ts.map +1 -1
  191. package/build/types/Title/Title.d.ts +2 -2
  192. package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
  193. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
  194. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts.map +1 -1
  195. package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
  196. package/build/types/_deprecated/Select/Select.d.ts.map +1 -1
  197. package/build/types/common/PropsValues/typography.d.ts +13 -1
  198. package/build/types/common/PropsValues/typography.d.ts.map +1 -1
  199. package/package.json +3 -3
  200. package/src/Accordion/Accordion.css +7 -6
  201. package/src/Accordion/Accordion.less +7 -6
  202. package/src/Body/Body.css +2 -1
  203. package/src/Body/Body.less +2 -1
  204. package/src/Body/Body.test.tsx +13 -4
  205. package/src/Body/Body.tsx +4 -3
  206. package/src/Body/_stories/Body.test.story.tsx +42 -0
  207. package/src/Button/_stories/Button.test.story.tsx +1 -0
  208. package/src/Calendar/Calendar.css +5 -4
  209. package/src/Calendar/DayCalendar/Table/DayCalendarTable.tsx +2 -2
  210. package/src/Calendar/MonthCalendar/Table/MonthCalendarTable.tsx +1 -1
  211. package/src/Calendar/TableLink/TableLink.css +5 -4
  212. package/src/Calendar/TableLink/TableLink.less +5 -4
  213. package/src/Calendar/TableLink/TableLink.tsx +1 -1
  214. package/src/Calendar/_stories/Calendar.test.story.tsx +34 -0
  215. package/src/Chips/Chip/Chip.css +5 -3
  216. package/src/Chips/Chip/Chip.less +3 -2
  217. package/src/CircularButton/_stories/CircularButton.story.tsx +6 -16
  218. package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +46 -0
  219. package/src/DateInput/_stories/DateInput.story.tsx +1 -0
  220. package/src/Decision/Decision.css +4 -3
  221. package/src/Decision/Decision.less +4 -3
  222. package/src/Decision/_stories/Decision.test.story.tsx +1 -0
  223. package/src/DefinitionList/_stories/DefinitionList.story.tsx +1 -1
  224. package/src/DefinitionList/_stories/DefinitionList.test.story.tsx +1 -1
  225. package/src/Display/Display.test.tsx +43 -0
  226. package/src/Display/Display.tsx +11 -1
  227. package/src/Display/_stories/Display.story.tsx +36 -21
  228. package/src/Display/_stories/Display.test.story.tsx +108 -0
  229. package/src/Emphasis/Emphasis.css +1 -1
  230. package/src/Emphasis/Emphasis.less +1 -1
  231. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.css +2 -1
  232. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.less +2 -1
  233. package/src/ExpressiveMoneyInput/AmountInput/AmountInput.tsx +1 -4
  234. package/src/ExpressiveMoneyInput/ExpressiveMoneyInput.css +2 -1
  235. package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +1 -0
  236. package/src/Field/_stories/Field.test.story.tsx +1 -0
  237. package/src/FlowNavigation/AnimatedLabel/AnimatedLabel.tsx +1 -1
  238. package/src/Header/_stories/Header.test.story.tsx +1 -1
  239. package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.test.story.tsx +1 -0
  240. package/src/Inputs/Input/Input.css +98 -24
  241. package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +1 -0
  242. package/src/Inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx +4 -2
  243. package/src/Inputs/SelectInput/Option/SelectInputOption.tsx +1 -1
  244. package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +3 -3
  245. package/src/Inputs/SelectInput/Popover/SelectInputPopover.tsx +6 -2
  246. package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +1 -0
  247. package/src/Inputs/SelectInput/_stories/SelectInput.story.tsx +1 -1
  248. package/src/Inputs/TextArea/TextArea.css +98 -24
  249. package/src/Inputs/TextArea/_stories/TextArea.test.story.tsx +1 -0
  250. package/src/Inputs/_common.less +16 -10
  251. package/src/InstructionsList/_stories/InstructionsList.test.story.tsx +2 -1
  252. package/src/Label/Label.css +3 -0
  253. package/src/Label/Label.less +8 -0
  254. package/src/Label/Label.tsx +1 -1
  255. package/src/Label/_stories/Label.test.story.tsx +1 -0
  256. package/src/ListItem/_stories/ListItem.rtl.test.story.tsx +1 -6
  257. package/src/Markup/Markup.css +2 -2
  258. package/src/Markup/Markup.less +2 -2
  259. package/src/MoneyInput/MoneyInput.css +9 -6
  260. package/src/MoneyInput/MoneyInput.less +10 -7
  261. package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +3 -1
  262. package/src/Nudge/Nudge.css +3 -3
  263. package/src/Nudge/Nudge.less +3 -3
  264. package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +1 -1
  265. package/src/PocketSurface/_stories/PocketSurface.story.tsx +2 -2
  266. package/src/Popover/Popover.css +30 -7
  267. package/src/Popover/Popover.less +2 -2
  268. package/src/ProgressBar/ProgressBar.css +3 -2
  269. package/src/ProgressBar/ProgressBar.less +12 -11
  270. package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +1 -0
  271. package/src/Prompt/ActionPrompt/_stories/ActionPrompt.test.story.tsx +1 -0
  272. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +1 -0
  273. package/src/Prompt/InfoPrompt/_stories/InfoPrompt.test.story.tsx +1 -0
  274. package/src/Prompt/InlinePrompt/_stories/InlinePrompt.test.story.tsx +1 -0
  275. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.css +2 -1
  276. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.less +2 -1
  277. package/src/SentimentSurface/_stories/SentimentSurface.story.tsx +1 -1
  278. package/src/Snackbar/Snackbar.css +1 -1
  279. package/src/Snackbar/Snackbar.less +1 -1
  280. package/src/Stepper/Stepper.tsx +4 -2
  281. package/src/Table/Header/TableHeader.tsx +1 -1
  282. package/src/Table/StatusText/TableStatusText.test.tsx +20 -5
  283. package/src/Table/Table.css +18 -8
  284. package/src/Table/Table.less +20 -9
  285. package/src/Table/_stories/Table.test.story.tsx +24 -13
  286. package/src/Tabs/Tab/Tab.tsx +11 -5
  287. package/src/Tabs/Tabs.css +3 -3
  288. package/src/Tabs/Tabs.less +3 -3
  289. package/src/Tabs/_stories/Tabs.test.story.tsx +1 -1
  290. package/src/Tag/Tag.css +1 -1
  291. package/src/Tag/Tag.less +1 -1
  292. package/src/Tag/Tag.tsx +1 -1
  293. package/src/Tag/_stories/Tag.story.tsx +1 -1
  294. package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +1 -0
  295. package/src/Tile/Tile.css +4 -3
  296. package/src/Tile/Tile.less +4 -3
  297. package/src/Title/Title.test.tsx +22 -3
  298. package/src/Title/Title.tsx +2 -2
  299. package/src/Typeahead/Typeahead.css +12 -29
  300. package/src/Typeahead/Typeahead.less +11 -33
  301. package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +5 -5
  302. package/src/Typeahead/TypeaheadOption/TypeaheadOption.tsx +2 -2
  303. package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +1 -1
  304. package/src/Typeahead/_stories/Typeahead.test.story.tsx +65 -0
  305. package/src/Upload/Steps/UploadImageStep/UploadImageStep.tsx +4 -2
  306. package/src/Upload/_stories/Upload.rtl.test.story.tsx +1 -0
  307. package/src/UploadInput/UploadInput.css +1 -1
  308. package/src/UploadInput/UploadInput.less +7 -4
  309. package/src/UploadInput/_stories/UploadInput.test.story.tsx +1 -0
  310. package/src/_deprecated/ActionButton/ActionButton.css +3 -4
  311. package/src/_deprecated/ActionButton/ActionButton.less +4 -5
  312. package/src/_deprecated/ActionButton/ActionButton.tsx +1 -1
  313. package/src/_deprecated/Avatar/Avatar.css +2 -2
  314. package/src/_deprecated/Avatar/Avatar.less +2 -2
  315. package/src/_deprecated/Avatar/Avatar.tsx +1 -1
  316. package/src/_deprecated/CriticalBanner/CriticalCommsBanner.css +2 -1
  317. package/src/_deprecated/CriticalBanner/CriticalCommsBanner.less +2 -1
  318. package/src/_deprecated/NavigationOption/_stories/NavigationOption.story.tsx +6 -6
  319. package/src/_deprecated/Select/Select.css +49 -14
  320. package/src/_deprecated/Select/Select.less +14 -10
  321. package/src/_deprecated/Select/Select.test.tsx +16 -0
  322. package/src/_deprecated/Select/Select.tsx +6 -1
  323. package/src/_deprecated/Summary/Summary.css +2 -2
  324. package/src/_deprecated/Summary/Summary.less +2 -2
  325. package/src/common/Circle/Circle.css +1 -1
  326. package/src/common/Circle/Circle.less +1 -1
  327. package/src/common/Option/Option.css +4 -4
  328. package/src/common/Option/Option.less +4 -4
  329. package/src/common/PropsValues/typography.ts +20 -1
  330. package/src/main.css +9097 -1964
  331. package/src/main.less +3 -2
  332. package/src/styles/less/accordion.css +53 -11
  333. package/src/styles/less/addons/_background-utilities.less +5 -0
  334. package/src/styles/less/badge.css +2 -2
  335. package/src/styles/less/badge.less +2 -2
  336. package/src/styles/less/button-groups.css +29 -6
  337. package/src/styles/less/button-groups.less +3 -2
  338. package/src/styles/less/buttons.css +35 -11
  339. package/src/styles/less/buttons.less +7 -7
  340. package/src/styles/less/core/_fonts.less +7 -75
  341. package/src/styles/less/core/_scaffolding.less +4 -4
  342. package/src/styles/less/core/_typography-utilities.less +3 -3
  343. package/src/styles/less/core/_typography.less +91 -236
  344. package/src/styles/less/core/fonts/_fonts-ar.less +86 -0
  345. package/src/styles/less/core/fonts/_fonts-base.less +99 -0
  346. package/src/styles/less/core/fonts/_fonts-he.less +8 -0
  347. package/src/styles/less/core/fonts/_fonts-ja.less +4247 -0
  348. package/src/styles/less/core/fonts/_fonts-ko.less +1079 -0
  349. package/src/styles/less/core/fonts/_fonts-th.less +8 -0
  350. package/src/styles/less/core/fonts/_fonts-zh.less +872 -0
  351. package/src/styles/less/decision.css +53 -11
  352. package/src/styles/less/decision.less +2 -2
  353. package/src/styles/less/dropdowns.css +65 -18
  354. package/src/styles/less/dropdowns.less +8 -7
  355. package/src/styles/less/droppable.css +28 -6
  356. package/src/styles/less/droppable.less +4 -4
  357. package/src/styles/less/footer.css +41 -10
  358. package/src/styles/less/footer.less +4 -3
  359. package/src/styles/less/forms/bootstrap-forms.css +153 -100
  360. package/src/styles/less/forms/bootstrap-forms.less +85 -72
  361. package/src/styles/less/forms/checkbox-radio.css +3 -3
  362. package/src/styles/less/forms/checkbox-radio.less +3 -3
  363. package/src/styles/less/input-groups.css +249 -117
  364. package/src/styles/less/input-groups.less +23 -9
  365. package/src/styles/less/list-group.css +28 -8
  366. package/src/styles/less/list-group.less +8 -5
  367. package/src/styles/less/mixins/_reset-text.less +1 -1
  368. package/src/styles/less/mixins/_text-emphasis.less +7 -1
  369. package/src/styles/less/modals.css +1 -1
  370. package/src/styles/less/modals.less +1 -1
  371. package/src/styles/less/navbar.css +92 -45
  372. package/src/styles/less/navbar.less +19 -19
  373. package/src/styles/less/navs.css +8 -8
  374. package/src/styles/less/navs.less +8 -8
  375. package/src/styles/less/neptune-addons.css +15 -0
  376. package/src/styles/less/neptune-core.css +6230 -525
  377. package/src/styles/less/neptune.bundle.less +4 -0
  378. package/src/styles/less/neptune.css +8790 -1768
  379. package/src/styles/less/panels.css +2 -2
  380. package/src/styles/less/panels.less +2 -2
  381. package/src/styles/less/popovers.css +64 -20
  382. package/src/styles/less/popovers.less +7 -7
  383. package/src/styles/less/progress-bars.css +2 -2
  384. package/src/styles/less/progress-bars.less +2 -2
  385. package/src/styles/less/sequences.css +14 -9
  386. package/src/styles/less/sequences.less +15 -10
  387. package/src/styles/less/table.css +7 -7
  388. package/src/styles/less/table.less +7 -7
  389. package/src/styles/less/tooltip.css +28 -6
  390. package/src/styles/less/tooltip.less +1 -1
  391. package/src/styles/variables/legacy-variables.less +3 -3
  392. package/build/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  393. package/build/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  394. package/build/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  395. package/build/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  396. package/build/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  397. package/build/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  398. package/build/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  399. package/build/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
  400. package/build/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
  401. package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
  402. package/build/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
  403. package/build/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
  404. package/build/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
  405. package/src/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
  406. package/src/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
  407. package/src/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
  408. package/src/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
  409. package/src/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
  410. package/src/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
  411. package/src/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
  412. package/src/styles/fonts/rubik/rubik-body-cyrillic-330-normal.woff2 +0 -0
  413. package/src/styles/fonts/rubik/rubik-body-cyrillic-600-normal.woff2 +0 -0
  414. package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-330-normal.woff2 +0 -0
  415. package/src/styles/fonts/rubik/rubik-body-cyrillic-ext-600-normal.woff2 +0 -0
  416. package/src/styles/fonts/rubik/rubik-cyrillic-900-normal.woff2 +0 -0
  417. package/src/styles/fonts/rubik/rubik-cyrillic-ext-900-normal.woff2 +0 -0
@@ -17,7 +17,8 @@
17
17
 
18
18
  &.np-accordion-item--dark {
19
19
  .media-body,
20
- .np-text-title-body {
20
+ .np-text-title-body,
21
+ .wds-text-title-body {
21
22
  color: @color-navy-content-primary;
22
23
  }
23
24
  }
@@ -35,7 +36,7 @@
35
36
 
36
37
  .np-option {
37
38
  .np-option__title {
38
- font-weight: var(--font-weight-semi-bold);
39
+ font-weight: var(--wds-font-weight-body-bold);
39
40
  }
40
41
  }
41
42
 
@@ -57,15 +58,15 @@
57
58
  }
58
59
 
59
60
  .decision__title {
60
- font-size: var(--font-size-18);
61
+ font-size: var(--wds-font-size-title-body);
61
62
  }
62
63
 
63
64
  .np-option {
64
65
  .np-option__title {
65
66
  margin-bottom: 0;
66
- font-size: var(--font-size-18);
67
- letter-spacing: var(--letter-spacing-negative-xs);
68
- line-height: var(--line-height-24);
67
+ font-size: var(--wds-font-size-title-body);
68
+ letter-spacing: var(--wds-letter-spacing-title-body);
69
+ line-height: var(--wds-line-height-title-body);
69
70
  }
70
71
 
71
72
  .circle-sm {
package/src/Body/Body.css CHANGED
@@ -1,3 +1,4 @@
1
- .np-text--pre-line {
1
+ .np-text--pre-line,
2
+ .wds-text--pre-line {
2
3
  white-space: pre-line;
3
4
  }
@@ -1,3 +1,4 @@
1
- .np-text--pre-line {
1
+ .np-text--pre-line,
2
+ .wds-text--pre-line {
2
3
  white-space: pre-line;
3
4
  }
@@ -9,7 +9,10 @@ describe('Body', () => {
9
9
  const copy = screen.getByText('Test');
10
10
  expect(copy).toBeInTheDocument();
11
11
  expect(copy.tagName).toBe('DIV');
12
- expect(copy).toHaveClass(`np-text-${Typography.BODY_DEFAULT}`);
12
+ expect(copy).toHaveClass(
13
+ `np-text-${Typography.BODY_DEFAULT}`,
14
+ `wds-text-${Typography.BODY_DEFAULT}`,
15
+ );
13
16
  });
14
17
 
15
18
  it('enforces tag via `as` prop', () => {
@@ -17,7 +20,10 @@ describe('Body', () => {
17
20
  const copy = screen.getByText('Test');
18
21
  expect(copy).toBeInTheDocument();
19
22
  expect(copy.tagName).toBe('P');
20
- expect(copy).toHaveClass(`np-text-${Typography.BODY_DEFAULT}`);
23
+ expect(copy).toHaveClass(
24
+ `np-text-${Typography.BODY_DEFAULT}`,
25
+ `wds-text-${Typography.BODY_DEFAULT}`,
26
+ );
21
27
  });
22
28
 
23
29
  it('supports native HTML attrs', () => {
@@ -35,7 +41,7 @@ describe('Body', () => {
35
41
  it('renders newlines as line breaks when preserveNewlines is true', () => {
36
42
  render(<Body preserveNewlines>{'Line 1.\nLine 2'}</Body>);
37
43
  const copy = screen.getByText(/Line 1\.\s*Line 2/);
38
- expect(copy).toHaveClass('np-text--pre-line');
44
+ expect(copy).toHaveClass('np-text--pre-line', 'wds-text--pre-line');
39
45
  expect(copy).toHaveTextContent('Line 1.');
40
46
  expect(copy).toHaveTextContent('Line 2');
41
47
  });
@@ -47,6 +53,9 @@ describe('Body', () => {
47
53
  const copy = screen.getByText('Test');
48
54
  expect(copy).toBeInTheDocument();
49
55
  expect(copy.tagName).toBe('DIV');
50
- expect(copy).toHaveClass(`np-text-${Typography.BODY_DEFAULT}`);
56
+ expect(copy).toHaveClass(
57
+ `np-text-${Typography.BODY_DEFAULT}`,
58
+ `wds-text-${Typography.BODY_DEFAULT}`,
59
+ );
51
60
  });
52
61
  });
package/src/Body/Body.tsx CHANGED
@@ -33,7 +33,7 @@ const Body = forwardRef(function Body(
33
33
  | null
34
34
  >,
35
35
  ) {
36
- const isTypeSupported = bodyTypes.has(type);
36
+ const bodyType = bodyTypes.has(type) ? type : DEFAULT_TYPE;
37
37
  return (
38
38
  <Element
39
39
  {...props}
@@ -41,8 +41,9 @@ const Body = forwardRef(function Body(
41
41
  // See: https://fettblog.eu/typescript-react-generic-forward-refs/
42
42
  ref={reference}
43
43
  className={clsx(
44
- `np-text-${isTypeSupported ? type : DEFAULT_TYPE}`,
45
- preserveNewlines && 'np-text--pre-line',
44
+ `np-text-${bodyType}`,
45
+ `wds-text-${bodyType}`,
46
+ preserveNewlines && 'np-text--pre-line wds-text--pre-line',
46
47
  className,
47
48
  )}
48
49
  />
@@ -5,6 +5,7 @@ import Container from '../../Container';
5
5
  import Title from '../../Title';
6
6
  import { Typography } from '../../common/PropsValues/typography';
7
7
  import { withVariantConfig } from '../../../.storybook/helpers';
8
+ import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
8
9
 
9
10
  export default {
10
11
  title: 'Typography/Body/Tests',
@@ -88,3 +89,44 @@ export const HyphenationMobile: Story = {
88
89
  ...HyphenationTest,
89
90
  ...withVariantConfig(['mobile'], HyphenationTest),
90
91
  };
92
+
93
+ const rtlDiffBodyLarge = withRTLDiff({
94
+ i18n: {
95
+ secondParagraph: {
96
+ en: "Set up a transfer in a few minutes from your phone or computer. We'll keep you updated at every step, so you always know where your money is.",
97
+ ar: 'أعدّ تحويلك في بضع دقائق من هاتفك أو حاسوبك. سنبقيك على اطلاع في كل خطوة، لتعرف دائمًا أين أموالك.',
98
+ he: 'הגדירו העברה תוך כמה דקות מהטלפון או מהמחשב. נעדכן אתכם בכל שלב, כך שתמיד תדעו איפה הכסף שלכם.',
99
+ },
100
+ paragraph: {
101
+ en: "Send money abroad at the real exchange rate, with low, transparent fees. You'll always see what you pay upfront, and your recipient gets the money quickly and securely.",
102
+ ar: 'أرسل الأموال إلى الخارج بسعر الصرف الحقيقي ومع رسوم منخفضة وشفافة. سترى دائمًا ما تدفعه مقدمًا، ويحصل المستلم على أمواله بسرعة وأمان.',
103
+ he: 'שלחו כסף לחו״ל בשער החליפין האמיתי, עם עמלות נמוכות ושקופות. תמיד תראו מראש כמה אתם משלמים, והנמען יקבל את הכסף במהירות ובבטחה.',
104
+ },
105
+ },
106
+ });
107
+
108
+ /**
109
+ * Two body large paragraphs in RTL and LTR, for the RTL Typography docs page.
110
+ * Hidden from the sidebar, tests and Chromatic.
111
+ */
112
+ export const RTLDiffBodyLarge: Story = {
113
+ tags: ['!dev', '!test'],
114
+ render: function Render() {
115
+ const i18n = useRtlDiffI18n();
116
+ return (
117
+ <>
118
+ <Body as="p" type={Typography.BODY_LARGE}>
119
+ {i18n.paragraph}
120
+ </Body>
121
+ <Body as="p" type={Typography.BODY_LARGE}>
122
+ {i18n.secondParagraph}
123
+ </Body>
124
+ </>
125
+ );
126
+ },
127
+ ...rtlDiffBodyLarge,
128
+ parameters: {
129
+ ...rtlDiffBodyLarge.parameters,
130
+ chromatic: { ...rtlDiffBodyLarge.parameters.chromatic, disableSnapshot: true },
131
+ },
132
+ };
@@ -250,6 +250,7 @@ export const RTLDiff: Story = {
250
250
  );
251
251
  },
252
252
  ...withRTLDiff({
253
+ fixedRows: { heights: 'auto' },
253
254
  i18n: {
254
255
  startIcon: { en: 'Start icon', ar: 'أيقونة البداية' },
255
256
  endIcon: { en: 'End icon', ar: 'أيقونة النهاية' },
@@ -7,7 +7,7 @@
7
7
  border: transparent;
8
8
  border-radius: var(--radius-small);
9
9
  background-color: transparent;
10
- font-weight: var(--font-weight-semi-bold);
10
+ font-weight: var(--wds-font-weight-title-screen);
11
11
  color: var(--color-content-primary);
12
12
  }
13
13
  @media (max-width: 320px) {
@@ -89,10 +89,11 @@
89
89
  text-decoration-color: var(--color-content-tertiary);
90
90
  }
91
91
  .wds-Calendar__option--day {
92
- block-size: var(--size-40);
92
+ --circleSize: var(--size-40);
93
+ block-size: var(--circleSize);
94
+ line-height: var(--circleSize);
95
+ inline-size: var(--circleSize);
93
96
  border-radius: var(--radius-full);
94
- line-height: var(--size-40);
95
- inline-size: var(--size-40);
96
97
  padding: 0;
97
98
  display: inline-flex;
98
99
  align-items: center;
@@ -134,8 +134,8 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
134
134
  key={day}
135
135
  className={
136
136
  index > 4
137
- ? 'text-xs-center np-text-body-default'
138
- : 'text-xs-center np-text-body-default-bold'
137
+ ? 'text-xs-center np-text-body-default wds-text-body-default'
138
+ : 'text-xs-center np-text-body-default-bold wds-text-body-default-bold'
139
139
  }
140
140
  >
141
141
  <span className="hidden-xs">
@@ -76,7 +76,7 @@ const MonthCalendarTable = ({
76
76
  })();
77
77
 
78
78
  return (
79
- <table className="table table-condensed table-bordered tw-date-lookup-calendar np-text-body-default-bold m-b-0">
79
+ <table className="table table-condensed table-bordered tw-date-lookup-calendar np-text-body-default-bold wds-text-body-default-bold m-b-0">
80
80
  <thead className="sr-only">
81
81
  <tr>
82
82
  <th colSpan={COLS}>{placeholder}</th>
@@ -7,7 +7,7 @@
7
7
  border: transparent;
8
8
  border-radius: var(--radius-small);
9
9
  background-color: transparent;
10
- font-weight: var(--font-weight-semi-bold);
10
+ font-weight: var(--wds-font-weight-title-screen);
11
11
  color: var(--color-content-primary);
12
12
  }
13
13
  @media (max-width: 320px) {
@@ -89,10 +89,11 @@
89
89
  text-decoration-color: var(--color-content-tertiary);
90
90
  }
91
91
  .wds-Calendar__option--day {
92
- block-size: var(--size-40);
92
+ --circleSize: var(--size-40);
93
+ block-size: var(--circleSize);
94
+ line-height: var(--circleSize);
95
+ inline-size: var(--circleSize);
93
96
  border-radius: var(--radius-full);
94
- line-height: var(--size-40);
95
- inline-size: var(--size-40);
96
97
  padding: 0;
97
98
  display: inline-flex;
98
99
  align-items: center;
@@ -11,7 +11,7 @@
11
11
  border: transparent;
12
12
  border-radius: var(--radius-small);
13
13
  background-color: transparent;
14
- font-weight: var(--font-weight-semi-bold);
14
+ font-weight: var(--wds-font-weight-title-screen);
15
15
  color: var(--color-content-primary);
16
16
 
17
17
  &:focus {
@@ -51,10 +51,11 @@
51
51
  }
52
52
 
53
53
  .wds-Calendar__option--day {
54
- height: var(--size-40);
54
+ --circleSize: var(--size-40);
55
+ height: var(--circleSize);
56
+ line-height: var(--circleSize);
57
+ width: var(--circleSize);
55
58
  border-radius: var(--radius-full);
56
- line-height: var(--size-40);
57
- width: var(--size-40);
58
59
  padding: 0;
59
60
  display: inline-flex;
60
61
  align-items: center;
@@ -96,7 +96,7 @@ const TableLink = ({
96
96
  aria-pressed={active}
97
97
  className={clsx(
98
98
  `wds-Calendar__option--${type}`,
99
- `tw-date-lookup-${type}-option np-text-body-default-bold`,
99
+ `tw-date-lookup-${type}-option np-text-body-default-bold wds-text-body-default-bold`,
100
100
  { active: !!active },
101
101
  { today: !!today },
102
102
  { disabled: !!isUnavailable },
@@ -166,6 +166,7 @@ export const RTLDiff: Story = {
166
166
  });
167
167
  },
168
168
  ...withRTLDiff({
169
+ fixedRows: { heights: 'auto' },
169
170
  i18n: {
170
171
  disabledReason: {
171
172
  en: 'Weekends and specific dates are unavailable.',
@@ -174,3 +175,36 @@ export const RTLDiff: Story = {
174
175
  },
175
176
  }),
176
177
  };
178
+
179
+ const rtlDiffDayView = withRTLDiff({
180
+ i18n: {
181
+ disabledReason: {
182
+ en: 'Weekends and specific dates are unavailable.',
183
+ ar: 'عطلات نهاية الأسبوع وتواريخ محددة غير متاحة.',
184
+ },
185
+ },
186
+ });
187
+
188
+ /**
189
+ * Day view only, for the RTL Layout docs page. Hidden from the sidebar, tests and Chromatic,
190
+ * as `RTLDiff` already covers it.
191
+ */
192
+ export const RTLDiffDayView: Story = {
193
+ tags: ['!dev', '!test'],
194
+ render: () => {
195
+ const i18n = useRtlDiffI18n();
196
+ return (
197
+ <Calendar
198
+ value={selectedDate}
199
+ min={minDate}
200
+ max={maxDate}
201
+ disabledRules={{ ...disabledRulesRtl, reason: i18n.disabledReason }}
202
+ />
203
+ );
204
+ },
205
+ ...rtlDiffDayView,
206
+ parameters: {
207
+ ...rtlDiffDayView.parameters,
208
+ chromatic: { ...rtlDiffDayView.parameters.chromatic, disableSnapshot: true },
209
+ },
210
+ };
@@ -70,7 +70,7 @@
70
70
  border-color: var(--color-sentiment-negative-active) !important;
71
71
  }
72
72
  .np-theme-personal .np-chip {
73
- font-weight: var(--font-weight-semi-bold);
73
+ font-weight: var(--wds-font-weight-body-bold);
74
74
  color: var(--color-interactive-primary);
75
75
  padding-block: 0;
76
76
  padding-inline: var(--size-16);
@@ -114,11 +114,13 @@
114
114
  .np-theme-personal .np-chip.np-chip--removable {
115
115
  position: relative;
116
116
  }
117
- .np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold {
117
+ .np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold,
118
+ .np-theme-personal .np-chip.np-chip--removable .wds-text-body-default-bold {
118
119
  padding-inline-end: var(--size-24);
119
120
  }
120
121
  @media (max-width: 320px) {
121
- .np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold {
122
+ .np-theme-personal .np-chip.np-chip--removable .np-text-body-default-bold,
123
+ .np-theme-personal .np-chip.np-chip--removable .wds-text-body-default-bold {
122
124
  padding-inline-end: var(--size-48);
123
125
  }
124
126
  }
@@ -90,7 +90,7 @@
90
90
  }
91
91
 
92
92
  .np-theme-personal & {
93
- font-weight: var(--font-weight-semi-bold);
93
+ font-weight: var(--wds-font-weight-body-bold);
94
94
  color: var(--color-interactive-primary);
95
95
  padding: 0 var(--size-16);
96
96
  border-color: var(--color-interactive-secondary);
@@ -137,7 +137,8 @@
137
137
  &.np-chip--removable {
138
138
  position: relative;
139
139
 
140
- .np-text-body-default-bold {
140
+ .np-text-body-default-bold,
141
+ .wds-text-body-default-bold {
141
142
  padding-right: var(--size-24);
142
143
 
143
144
  @media (--screen-400-zoom) {
@@ -232,13 +232,8 @@ export const SentimentAwareness: Story = {
232
232
  style={{ display: 'flex', alignItems: 'center', padding: '8px 0', gap: '8px' }}
233
233
  >
234
234
  <div
235
- style={{
236
- width: '120px',
237
- fontSize: '11px',
238
- fontWeight: 'bold',
239
- textAlign: 'left',
240
- paddingLeft: '8px',
241
- }}
235
+ className="wds-text-body-default-bold p-l-1 text-align-left"
236
+ style={{ width: '12ch' }}
242
237
  >
243
238
  {sentiment} (base)
244
239
  </div>
@@ -246,7 +241,7 @@ export const SentimentAwareness: Story = {
246
241
  <div
247
242
  key={button.label}
248
243
  style={{
249
- width: '100px',
244
+ width: '13ch',
250
245
  display: 'flex',
251
246
  justifyContent: 'center',
252
247
  }}
@@ -270,13 +265,8 @@ export const SentimentAwareness: Story = {
270
265
  style={{ display: 'flex', alignItems: 'center', padding: '8px 0', gap: '8px' }}
271
266
  >
272
267
  <div
273
- style={{
274
- width: '120px',
275
- fontSize: '11px',
276
- fontWeight: 'bold',
277
- textAlign: 'left',
278
- paddingLeft: '8px',
279
- }}
268
+ className="wds-text-body-default-bold p-l-1 text-align-left"
269
+ style={{ width: '12ch' }}
280
270
  >
281
271
  {sentiment} (elevated)
282
272
  </div>
@@ -284,7 +274,7 @@ export const SentimentAwareness: Story = {
284
274
  <div
285
275
  key={button.label}
286
276
  style={{
287
- width: '100px',
277
+ width: '13ch',
288
278
  display: 'flex',
289
279
  justifyContent: 'center',
290
280
  }}
@@ -49,6 +49,52 @@ export const Sizes: Story = {
49
49
  },
50
50
  ...withRTLDiff({
51
51
  renderAs: 'iframe',
52
+ fixedRows: { heights: [6, 7, 9] },
53
+ i18n: {
54
+ dayLabel: { en: 'Day', ar: 'اليوم' },
55
+ monthLabel: { en: 'Month', ar: 'الشهر' },
56
+ yearLabel: { en: 'Year', ar: 'السنة' },
57
+ },
58
+ }),
59
+ };
60
+ export const MobileSizes: Story = {
61
+ render: () => {
62
+ const i18n = useRtlDiffI18n();
63
+ return (
64
+ <>
65
+ <DateInput
66
+ size="sm"
67
+ dayLabel={i18n.dayLabel}
68
+ monthLabel={i18n.monthLabel}
69
+ yearLabel={i18n.yearLabel}
70
+ onChange={fn()}
71
+ />
72
+ <DateInput
73
+ size="md"
74
+ dayLabel={i18n.dayLabel}
75
+ monthLabel={i18n.monthLabel}
76
+ yearLabel={i18n.yearLabel}
77
+ onChange={fn()}
78
+ />
79
+ <DateInput
80
+ size="lg"
81
+ dayLabel={i18n.dayLabel}
82
+ monthLabel={i18n.monthLabel}
83
+ yearLabel={i18n.yearLabel}
84
+ onChange={fn()}
85
+ />
86
+ <DateInput
87
+ mode="month-year"
88
+ monthLabel={i18n.monthLabel}
89
+ yearLabel={i18n.yearLabel}
90
+ onChange={fn()}
91
+ />
92
+ </>
93
+ );
94
+ },
95
+ ...withRTLDiff({
96
+ viewport: 'smallMobile',
97
+ fixedRows: { heights: [13, 16, 21] },
52
98
  i18n: {
53
99
  dayLabel: { en: 'Day', ar: 'اليوم' },
54
100
  monthLabel: { en: 'Month', ar: 'الشهر' },
@@ -37,5 +37,6 @@ export const Basic: Story = {
37
37
  onChange: fn(),
38
38
  onBlur: fn(),
39
39
  onFocus: fn(),
40
+ size: 'lg',
40
41
  },
41
42
  } satisfies Story;
@@ -1,9 +1,10 @@
1
1
  .np-decision .decision {
2
2
  display: flex;
3
3
  }
4
- .np-decision__tile--small .np-text-title-subsection {
5
- font-size: var(--font-size-16);
6
- line-height: var(--line-height-title);
4
+ .np-decision__tile--small .np-text-title-subsection,
5
+ .np-decision__tile--small .wds-text-title-subsection {
6
+ font-size: var(--wds-font-size-body-large);
7
+ line-height: var(--wds-line-height-body-large);
7
8
  }
8
9
  .np-decision:not(.flex-column) {
9
10
  gap: var(--size-24);
@@ -4,9 +4,10 @@
4
4
  }
5
5
 
6
6
  &__tile--small {
7
- .np-text-title-subsection {
8
- font-size: var(--font-size-16);
9
- line-height: var(--line-height-title);
7
+ .np-text-title-subsection,
8
+ .wds-text-title-subsection {
9
+ font-size: var(--wds-font-size-body-large);
10
+ line-height: var(--wds-line-height-body-large);
10
11
  }
11
12
  }
12
13
 
@@ -84,6 +84,7 @@ export const RTLDiff: Story = {
84
84
  );
85
85
  },
86
86
  ...withRTLDiff({
87
+ fixedRows: { heights: 'auto' },
87
88
  i18n: {
88
89
  sendTitle: { en: 'Send money', ar: 'إرسال الأموال' },
89
90
  sendDescription: { en: 'Fast international transfers.', ar: 'تحويلات دولية سريعة.' },
@@ -32,7 +32,7 @@ const definitions = [
32
32
  },
33
33
  {
34
34
  title: 'Use wrapper elements to style',
35
- value: <span className="np-text-title-subsection">89.45GBP</span>,
35
+ value: <span className="wds-text-title-subsection">89.45GBP</span>,
36
36
  key: 'second',
37
37
  },
38
38
  {
@@ -222,7 +222,7 @@ export const RTLDiff: Story = {
222
222
  );
223
223
  },
224
224
  ...withRTLDiff({
225
- fixedRows: { heights: [8, 11, 8, 8, 8, 10, 12, 8, 8, 8] },
225
+ fixedRows: { heights: 'auto' },
226
226
  i18n: {
227
227
  fullName: { en: 'Full name', ar: 'الاسم الكامل' },
228
228
  customerName: { en: 'Alice Smith', ar: 'أليس سميث' },
@@ -0,0 +1,43 @@
1
+ import { Typography } from '../common';
2
+ import { render, screen } from '../test-utils';
3
+
4
+ import Display from '.';
5
+
6
+ describe('Display', () => {
7
+ it('testing default state', () => {
8
+ render(<Display>Test</Display>);
9
+ const copy = screen.getByText('Test');
10
+ expect(copy.tagName).toBe('H1');
11
+ expect(copy).toHaveClass(
12
+ 'np-display',
13
+ `np-text-${Typography.DISPLAY_LARGE}`,
14
+ `wds-text-${Typography.DISPLAY_LARGE}`,
15
+ );
16
+ });
17
+
18
+ it('renders both typography classes for the given type', () => {
19
+ render(<Display type={Typography.DISPLAY_NUMBER_MEDIUM}>Test</Display>);
20
+ expect(screen.getByText('Test')).toHaveClass(
21
+ `np-text-${Typography.DISPLAY_NUMBER_MEDIUM}`,
22
+ `wds-text-${Typography.DISPLAY_NUMBER_MEDIUM}`,
23
+ );
24
+ });
25
+
26
+ it('renders only the legacy class for display-extra-large, which has no locale-aware style', () => {
27
+ render(<Display type={Typography.DISPLAY_EXTRA_LARGE}>Test</Display>);
28
+ const copy = screen.getByText('Test');
29
+ expect(copy).toHaveClass(`np-text-${Typography.DISPLAY_EXTRA_LARGE}`);
30
+ expect(copy).not.toHaveClass(`wds-text-${Typography.DISPLAY_EXTRA_LARGE}`);
31
+ });
32
+
33
+ it('enforces tag via `as` prop and merges `className`', () => {
34
+ render(
35
+ <Display as="h3" className="custom">
36
+ Test
37
+ </Display>,
38
+ );
39
+ const copy = screen.getByText('Test');
40
+ expect(copy.tagName).toBe('H3');
41
+ expect(copy).toHaveClass('custom', `wds-text-${Typography.DISPLAY_LARGE}`);
42
+ });
43
+ });
@@ -18,7 +18,17 @@ function Display({
18
18
  id,
19
19
  }: DisplayProps) {
20
20
  return (
21
- <Heading id={id} className={clsx('np-display', `np-text-${type}`, 'text-primary', className)}>
21
+ <Heading
22
+ id={id}
23
+ className={clsx(
24
+ 'np-display',
25
+ `np-text-${type}`,
26
+ // display-extra-large has no locale-aware equivalent
27
+ type !== Typography.DISPLAY_EXTRA_LARGE && `wds-text-${type}`,
28
+ 'text-primary',
29
+ className,
30
+ )}
31
+ >
22
32
  {children}
23
33
  </Heading>
24
34
  );