@transferwise/components 41.7.3-next-b40350b9cc.13 → 41.8.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 (241) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/es/no-polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
  3. package/build/es/no-polyfill/actionButton/ActionButton.js +1 -1
  4. package/build/es/no-polyfill/alert/Alert.js +1 -1
  5. package/build/es/no-polyfill/avatar/Avatar.js +1 -1
  6. package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -1
  7. package/build/es/no-polyfill/card/Card.js +1 -1
  8. package/build/es/no-polyfill/checkbox/Checkbox.js +1 -1
  9. package/build/es/no-polyfill/checkboxButton/CheckboxButton.story.js +1 -1
  10. package/build/es/no-polyfill/chips/Chip.js +1 -1
  11. package/build/es/no-polyfill/circularButton/CircularButton.js +1 -1
  12. package/build/es/no-polyfill/common/Option/Option.js +1 -1
  13. package/build/es/no-polyfill/common/bottomSheet/BottomSheet.js +2 -2
  14. package/build/es/no-polyfill/common/closeButton/CloseButton.js +1 -1
  15. package/build/es/no-polyfill/common/index.js +1 -1
  16. package/build/es/no-polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
  17. package/build/es/no-polyfill/common/theme.js +1 -1
  18. package/build/es/no-polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
  19. package/build/es/no-polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +1 -1
  20. package/build/es/no-polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
  21. package/build/es/no-polyfill/dateLookup/tableLink/TableLink.js +1 -1
  22. package/build/es/no-polyfill/drawer/Drawer.js +1 -1
  23. package/build/es/no-polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
  24. package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
  25. package/build/es/no-polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
  26. package/build/es/no-polyfill/header/Header.js +2 -2
  27. package/build/es/no-polyfill/header/Header.story.js +2 -1
  28. package/build/es/no-polyfill/index.js +2 -2
  29. package/build/es/no-polyfill/inlineAlert/InlineAlert.js +1 -1
  30. package/build/es/no-polyfill/instructionsList/InstructionsList.js +3 -3
  31. package/build/es/no-polyfill/link/Link.js +3 -2
  32. package/build/es/no-polyfill/link/Link.story.js +1 -1
  33. package/build/es/no-polyfill/logo/Logo.js +1 -1
  34. package/build/es/no-polyfill/modal/Modal.js +1 -1
  35. package/build/es/no-polyfill/modal/Modal.story.js +1 -1
  36. package/build/es/no-polyfill/moneyInput/MoneyInput.js +1 -1
  37. package/build/es/no-polyfill/nudge/Nudge.js +1 -1
  38. package/build/es/no-polyfill/popover/Popover.js +1 -1
  39. package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -1
  40. package/build/es/no-polyfill/radio/Radio.js +1 -1
  41. package/build/es/no-polyfill/select/Select.js +4 -4
  42. package/build/es/no-polyfill/select/option/Option.js +1 -1
  43. package/build/es/no-polyfill/snackbar/Snackbar.js +1 -1
  44. package/build/es/no-polyfill/stepper/Stepper.js +1 -1
  45. package/build/es/no-polyfill/summary/Summary.js +1 -1
  46. package/build/es/no-polyfill/switch/Switch.js +1 -1
  47. package/build/es/no-polyfill/switch/Switch.story.js +1 -1
  48. package/build/es/no-polyfill/tabs/Tab.js +1 -1
  49. package/build/es/no-polyfill/tile/Tile.js +1 -1
  50. package/build/es/no-polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
  51. package/build/es/no-polyfill/upload/Upload.js +1 -1
  52. package/build/es/no-polyfill/upload/steps/completeStep/completeStep.js +1 -1
  53. package/build/es/no-polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
  54. package/build/es/no-polyfill/upload/steps/processingStep/processingStep.js +1 -1
  55. package/build/es/no-polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  56. package/build/es/no-polyfill/uploadInput/UploadInput.story.js +1 -1
  57. package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
  58. package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
  59. package/build/es/polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
  60. package/build/es/polyfill/actionButton/ActionButton.js +1 -1
  61. package/build/es/polyfill/alert/Alert.js +1 -1
  62. package/build/es/polyfill/avatar/Avatar.js +1 -1
  63. package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -1
  64. package/build/es/polyfill/card/Card.js +1 -1
  65. package/build/es/polyfill/checkbox/Checkbox.js +1 -1
  66. package/build/es/polyfill/checkboxButton/CheckboxButton.story.js +1 -1
  67. package/build/es/polyfill/chips/Chip.js +1 -1
  68. package/build/es/polyfill/circularButton/CircularButton.js +1 -1
  69. package/build/es/polyfill/common/Option/Option.js +1 -1
  70. package/build/es/polyfill/common/bottomSheet/BottomSheet.js +2 -2
  71. package/build/es/polyfill/common/closeButton/CloseButton.js +1 -1
  72. package/build/es/polyfill/common/index.js +1 -1
  73. package/build/es/polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
  74. package/build/es/polyfill/common/theme.js +1 -1
  75. package/build/es/polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
  76. package/build/es/polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +1 -1
  77. package/build/es/polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
  78. package/build/es/polyfill/dateLookup/tableLink/TableLink.js +1 -1
  79. package/build/es/polyfill/drawer/Drawer.js +1 -1
  80. package/build/es/polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
  81. package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
  82. package/build/es/polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
  83. package/build/es/polyfill/header/Header.js +2 -2
  84. package/build/es/polyfill/header/Header.story.js +2 -1
  85. package/build/es/polyfill/index.js +2 -2
  86. package/build/es/polyfill/inlineAlert/InlineAlert.js +1 -1
  87. package/build/es/polyfill/instructionsList/InstructionsList.js +3 -3
  88. package/build/es/polyfill/link/Link.js +3 -2
  89. package/build/es/polyfill/link/Link.story.js +1 -1
  90. package/build/es/polyfill/logo/Logo.js +1 -1
  91. package/build/es/polyfill/modal/Modal.js +1 -1
  92. package/build/es/polyfill/modal/Modal.story.js +1 -1
  93. package/build/es/polyfill/moneyInput/MoneyInput.js +1 -1
  94. package/build/es/polyfill/nudge/Nudge.js +1 -1
  95. package/build/es/polyfill/popover/Popover.js +1 -1
  96. package/build/es/polyfill/progressBar/ProgressBar.js +1 -1
  97. package/build/es/polyfill/radio/Radio.js +1 -1
  98. package/build/es/polyfill/select/Select.js +4 -4
  99. package/build/es/polyfill/select/option/Option.js +1 -1
  100. package/build/es/polyfill/snackbar/Snackbar.js +1 -1
  101. package/build/es/polyfill/stepper/Stepper.js +1 -1
  102. package/build/es/polyfill/summary/Summary.js +1 -1
  103. package/build/es/polyfill/switch/Switch.js +1 -1
  104. package/build/es/polyfill/switch/Switch.story.js +1 -1
  105. package/build/es/polyfill/tabs/Tab.js +1 -1
  106. package/build/es/polyfill/tile/Tile.js +1 -1
  107. package/build/es/polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
  108. package/build/es/polyfill/upload/Upload.js +1 -1
  109. package/build/es/polyfill/upload/steps/completeStep/completeStep.js +1 -1
  110. package/build/es/polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
  111. package/build/es/polyfill/upload/steps/processingStep/processingStep.js +1 -1
  112. package/build/es/polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
  113. package/build/es/polyfill/uploadInput/UploadInput.story.js +1 -1
  114. package/build/es/polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
  115. package/build/es/polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
  116. package/build/main.css +1 -1
  117. package/build/styles/accordion/Accordion.css +1 -1
  118. package/build/styles/actionButton/ActionButton.css +1 -1
  119. package/build/styles/actionOption/ActionOption.css +1 -0
  120. package/build/styles/avatar/Avatar.css +1 -1
  121. package/build/styles/card/Card.css +1 -1
  122. package/build/styles/chips/Chip.css +1 -1
  123. package/build/styles/circularButton/CircularButton.css +1 -1
  124. package/build/styles/common/Option/Option.css +1 -1
  125. package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
  126. package/build/styles/common/closeButton/CloseButton.css +1 -1
  127. package/build/styles/common/panel/Panel.css +1 -1
  128. package/build/styles/dateLookup/DateLookup.css +1 -1
  129. package/build/styles/dimmer/Dimmer.css +1 -1
  130. package/build/styles/drawer/Drawer.css +1 -1
  131. package/build/styles/emphasis/Emphasis.css +1 -1
  132. package/build/styles/flowNavigation/FlowNavigation.css +1 -1
  133. package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -1
  134. package/build/styles/header/Header.css +1 -1
  135. package/build/styles/info/Info.css +1 -1
  136. package/build/styles/instructionsList/InstructionsList.css +1 -1
  137. package/build/styles/lab/mobileNav/MobileNav.css +1 -1
  138. package/build/styles/link/Link.css +1 -1
  139. package/build/styles/main.css +1 -1
  140. package/build/styles/modal/Modal.css +1 -1
  141. package/build/styles/moneyInput/MoneyInput.css +1 -1
  142. package/build/styles/navigationOption/NavigationOption.css +1 -1
  143. package/build/styles/nudge/Nudge.css +1 -1
  144. package/build/styles/overlayHeader/OverlayHeader.css +1 -1
  145. package/build/styles/popover/Popover.css +1 -1
  146. package/build/styles/progress/Progress.css +1 -1
  147. package/build/styles/progressBar/ProgressBar.css +1 -0
  148. package/build/styles/select/Select.css +1 -1
  149. package/build/styles/slidingPanel/SlidingPanel.css +1 -1
  150. package/build/styles/snackbar/Snackbar.css +1 -1
  151. package/build/styles/stepper/Stepper.css +1 -1
  152. package/build/styles/summary/Summary.css +1 -1
  153. package/build/styles/switch/Switch.css +1 -1
  154. package/build/styles/tabs/Tabs.css +1 -1
  155. package/build/styles/tile/Tile.css +1 -1
  156. package/build/styles/typeahead/Typeahead.css +1 -1
  157. package/build/styles/uploadInput/UploadInput.css +1 -1
  158. package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -1
  159. package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -1
  160. package/build/types/accordion/AccordionItem/AccordionItem.d.ts +3 -3
  161. package/build/types/alert/Alert.d.ts +0 -3
  162. package/build/types/common/RadioButton/RadioButton.d.ts +1 -1
  163. package/build/types/common/commonProps.d.ts +2 -0
  164. package/build/types/common/index.d.ts +0 -2
  165. package/build/types/common/panel/Panel.d.ts +1 -1
  166. package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -1
  167. package/build/types/common/theme.d.ts +2 -6
  168. package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +1 -1
  169. package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +1 -1
  170. package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +1 -1
  171. package/build/types/dynamicFieldDefinitionList/FormattedValue/FormattedValue.d.ts +2 -2
  172. package/build/types/header/Header.d.ts +1 -1
  173. package/build/types/header/Header.story.d.ts +2 -1
  174. package/build/types/index.d.ts +2 -5
  175. package/build/types/instructionsList/InstructionsList.d.ts +11 -8
  176. package/build/types/link/Link.d.ts +5 -6
  177. package/build/types/link/Link.story.d.ts +2 -2
  178. package/build/types/provider/Provider.story.d.ts +3 -3
  179. package/build/types/select/searchBox/SearchBox.d.ts +1 -1
  180. package/build/types/tabs/TabPanel.d.ts +3 -3
  181. package/build/types/tile/Tile.d.ts +2 -2
  182. package/build/types/tooltip/Tooltip.story.d.ts +1 -1
  183. package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +2 -2
  184. package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +1 -1
  185. package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +1 -1
  186. package/build/types/withNextPortal/withNextPortal.d.ts +2 -2
  187. package/build/umd/no-polyfill/main.js +1 -1
  188. package/build/umd/polyfill/main.js +1 -1
  189. package/package.json +9 -22
  190. package/scripts/generate-type-declarations.js +1 -0
  191. package/build/es/no-polyfill/body/Body.js +0 -1
  192. package/build/es/no-polyfill/body/Body.spec.js +0 -1
  193. package/build/es/no-polyfill/body/Body.story.js +0 -1
  194. package/build/es/no-polyfill/body/index.js +0 -1
  195. package/build/es/no-polyfill/common/propsValues/typography.js +0 -1
  196. package/build/es/no-polyfill/common/propsValues/variant.js +0 -1
  197. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.js +0 -1
  198. package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +0 -1
  199. package/build/es/no-polyfill/criticalBanner/index.js +0 -1
  200. package/build/es/no-polyfill/display/Display.story.js +0 -1
  201. package/build/es/no-polyfill/logo/svg/logo-business-inverse.svg +0 -1
  202. package/build/es/no-polyfill/logo/svg/logo-business.svg +0 -1
  203. package/build/es/no-polyfill/logo/svg/logo-inverse.svg +0 -1
  204. package/build/es/no-polyfill/logo/svg/logo.svg +0 -1
  205. package/build/es/no-polyfill/title/Title.js +0 -1
  206. package/build/es/no-polyfill/title/Title.spec.js +0 -1
  207. package/build/es/no-polyfill/title/Title.story.js +0 -1
  208. package/build/es/no-polyfill/title/index.js +0 -1
  209. package/build/es/polyfill/body/Body.js +0 -1
  210. package/build/es/polyfill/body/Body.spec.js +0 -1
  211. package/build/es/polyfill/body/Body.story.js +0 -1
  212. package/build/es/polyfill/body/index.js +0 -1
  213. package/build/es/polyfill/common/propsValues/typography.js +0 -1
  214. package/build/es/polyfill/common/propsValues/variant.js +0 -1
  215. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.js +0 -1
  216. package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +0 -1
  217. package/build/es/polyfill/criticalBanner/index.js +0 -1
  218. package/build/es/polyfill/display/Display.story.js +0 -1
  219. package/build/es/polyfill/logo/svg/logo-business-inverse.svg +0 -1
  220. package/build/es/polyfill/logo/svg/logo-business.svg +0 -1
  221. package/build/es/polyfill/logo/svg/logo-inverse.svg +0 -1
  222. package/build/es/polyfill/logo/svg/logo.svg +0 -1
  223. package/build/es/polyfill/title/Title.js +0 -1
  224. package/build/es/polyfill/title/Title.spec.js +0 -1
  225. package/build/es/polyfill/title/Title.story.js +0 -1
  226. package/build/es/polyfill/title/index.js +0 -1
  227. package/build/styles/criticalBanner/CriticalCommsBanner.css +0 -1
  228. package/build/types/body/Body.d.ts +0 -14
  229. package/build/types/body/Body.spec.d.ts +0 -1
  230. package/build/types/body/Body.story.d.ts +0 -8
  231. package/build/types/body/index.d.ts +0 -1
  232. package/build/types/common/propsValues/typography.d.ts +0 -28
  233. package/build/types/common/propsValues/variant.d.ts +0 -4
  234. package/build/types/criticalBanner/CriticalCommsBanner.d.ts +0 -12
  235. package/build/types/criticalBanner/CriticalCommsBanner.story.d.ts +0 -8
  236. package/build/types/criticalBanner/index.d.ts +0 -1
  237. package/build/types/display/Display.story.d.ts +0 -6
  238. package/build/types/title/Title.d.ts +0 -14
  239. package/build/types/title/Title.spec.d.ts +0 -1
  240. package/build/types/title/Title.story.d.ts +0 -8
  241. package/build/types/title/index.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "41.7.3-next-b40350b9cc.13+b40350b9cc",
3
+ "version": "41.8.0",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./build/umd/polyfill/main.js",
@@ -44,8 +44,7 @@
44
44
  "test:visual": "build-storybook && percy storybook ./storybook-static",
45
45
  "lint:fix": "eslint 'src/**/*.{js,ts,tsx}' --fix",
46
46
  "lintless": "stylelint --allow-empty-input './src/**/*.less'",
47
- "lintless:fix": "yarn lintless --fix",
48
- "build-storybook": "build-storybook"
47
+ "lintless:fix": "yarn lintless --fix"
49
48
  },
50
49
  "bin": {
51
50
  "neptune-upgrade-util": "scripts/neptune-upgrader.js"
@@ -56,40 +55,28 @@
56
55
  "@percy/storybook": "^4.2.0",
57
56
  "@rollup/plugin-babel": "^5.2.2",
58
57
  "@rollup/plugin-commonjs": "^11.0.2",
59
- "@rollup/plugin-image": "^3.0.1",
60
58
  "@rollup/plugin-json": "^4.0.3",
61
59
  "@rollup/plugin-node-resolve": "^7.1.3",
62
- "@storybook/addon-a11y": "^6.4.19",
63
- "@storybook/addon-actions": "^6.4.19",
64
- "@storybook/addon-contexts": "^5.3.21",
65
- "@storybook/addon-essentials": "^6.4.19",
66
- "@storybook/addon-interactions": "^6.4.19",
67
- "@storybook/addon-links": "^6.4.19",
68
- "@transferwise/icons": "^3.2.1",
60
+ "@transferwise/icons": "^3.0.6",
69
61
  "@transferwise/less-config": "^3.0.6",
70
- "@transferwise/neptune-css": "^12.5.11-next-b40350b9cc.22+b40350b9cc",
71
- "@transferwise/neptune-tokens": "8.0.0-next.20",
62
+ "@transferwise/neptune-css": "^12.5.10",
63
+ "@transferwise/neptune-tokens": "7.0.0",
72
64
  "@transferwise/test-config": "^5.0.0",
73
65
  "@types/jest": "^26.0.20",
74
66
  "@types/jscodeshift": "^0.11.0",
75
67
  "@types/node": "^14.14.31",
76
68
  "@types/react-transition-group": "4.4.4",
77
- "@wise/components-theming": "^0.1.2-next-b40350b9cc.24+b40350b9cc",
78
- "babel-plugin-inline-react-svg": "^2.0.1",
79
69
  "html-loader": "^1.3.2",
80
70
  "lodash.times": "^4.3.2",
81
71
  "npm-watch": "^0.11.0",
82
72
  "react-intl": "^5.10.0",
83
73
  "rollup": "^2.34.0",
84
- "rollup-plugin-uglify": "^6.0.4",
85
- "storybook-addon-themes": "^6.1.0",
86
- "storybook-dark-mode": "^1.0.9"
74
+ "rollup-plugin-uglify": "^6.0.4"
87
75
  },
88
76
  "peerDependencies": {
89
- "@transferwise/icons": "^3.2.1",
77
+ "@transferwise/icons": "^3.0.6",
90
78
  "@transferwise/neptune-css": "^12",
91
- "@wise/components-theming": "^0.1.1",
92
- "currency-flags": "4.0.0-beta.14",
79
+ "currency-flags": "^2.1.1",
93
80
  "prop-types": "^15.7.2",
94
81
  "react": ">=16.14",
95
82
  "react-dom": ">=16.14",
@@ -134,5 +121,5 @@
134
121
  "**/chokidar/glob-parent": "5.1.2",
135
122
  "**/fast-glob/glob-parent": "5.1.2"
136
123
  },
137
- "gitHead": "b40350b9cc2fb57637e42b997ffef1a7fc083667"
124
+ "gitHead": "1621f8c38da74b2bd059db97e13087f20c3cc812"
138
125
  }
@@ -27,6 +27,7 @@ const jsFiles = [
27
27
  { filename: 'DateLookup', folder: 'dateLookup' },
28
28
  { filename: 'PhoneNumberInput', folder: 'phoneNumberInput' },
29
29
  { filename: 'DateInput', folder: 'dateInput' },
30
+ { filename: 'InstructionsList', folder: 'instructionsList' },
30
31
  { filename: 'ProcessIndicator', folder: 'processIndicator' },
31
32
  { filename: 'Upload', folder: 'upload' },
32
33
  { filename: 'DefinitionList', folder: 'definitionList' },
@@ -1 +0,0 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","type","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{Typography}from"../common/propsValues/typography";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.BODY_DEFAULT,bodyTypes=new Set([Typography.BODY_DEFAULT,Typography.BODY_DEFAULT_BOLD,Typography.BODY_LARGE,Typography.BODY_LARGE_BOLD]);function Body(a){var b=a.as,c=void 0===b?"span":b,d=a.type,e=void 0===d?DEFAULT_TYPE:d,f=a.className,g=_objectWithoutProperties(a,_excluded),h=bodyTypes.has(e);return/*#__PURE__*/_jsx(c,_objectSpread(_objectSpread({},g),{},{className:classNames("np-text-".concat(h?e:DEFAULT_TYPE),f)}))}export default Body;
@@ -1 +0,0 @@
1
- import{Typography}from"../common";import{render,screen}from"../test-utils";import Body from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Body",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Body,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Body,{as:"p",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("P"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Body,{id:"test-id",role:"banner",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a).toHaveAttribute("id","test-id"),expect(a).toHaveAttribute("role","banner")}),it("handles unsupported typography type",function(){render(/*#__PURE__*/_jsx(Body,{type:Typography.TITLE_SCREEN,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))})});
@@ -1 +0,0 @@
1
- import{Typography}from"../common/propsValues/typography";import Title from"../title";import Body from"./Body";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:Body,title:"Typography | Body"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs(Title,{type:Typography.TITLE_SUBSECTION,children:["Copy Example without ",/*#__PURE__*/_jsx("code",{children:"<Body />"})," component"]}),/*#__PURE__*/_jsx("p",{children:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Copy Example without any HTML tag"}),"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"]})};
@@ -1 +0,0 @@
1
- export{default}from"./Body";
@@ -1 +0,0 @@
1
- export var Typography;(function(a){a.TITLE_SCREEN="title-screen",a.TITLE_SECTION="title-section",a.TITLE_SUBSECTION="title-subsection",a.TITLE_BODY="title-body",a.TITLE_GROUP="title-group",a.BODY_LARGE="body-large",a.BODY_DEFAULT="body-default",a.BODY_DEFAULT_BOLD="body-default-bold",a.BODY_LARGE_BOLD="body-large-bold",a.LINK_LARGE="link-large",a.LINK_DEFAULT="link-default"})(Typography||(Typography={}));
@@ -1 +0,0 @@
1
- export var Variant;(function(a){a.DESKTOP="desktop",a.MOBILE="mobile"})(Variant||(Variant={}));
@@ -1 +0,0 @@
1
- import{Alert as DangerIcon,AlertCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Avatar,{AvatarType}from"../avatar";import Body from"../body";import Button from"../button";import{ControlType,Priority,Size,Typography}from"../common";import Title from"../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function CriticalCommsBanner(a){var b=a.title,c=a.subtitle,d=a.action,e=a.className,f=useTheme(),g=f.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("critical-comms",e),children:[/*#__PURE__*/_jsx(Avatar,{size:Size.MEDIUM,type:AvatarType.ICON,className:"m-r-1",backgroundColor:g?"var(--color-sentiment-negative)":"var(--color-background-negative)",children:g?/*#__PURE__*/_jsx(AlertCircleFill,{}):/*#__PURE__*/_jsx(DangerIcon,{size:24})}),/*#__PURE__*/_jsxs("div",{className:"critical-comms-content d-flex align-items-center flex-grow-1",children:[/*#__PURE__*/_jsxs("div",{className:classNames("flex-grow-1",{"p-x-2":!g}),children:[/*#__PURE__*/_jsx(Title,{type:g?Typography.TITLE_BODY:Typography.TITLE_GROUP,className:"critical-comms--title",children:b}),/*#__PURE__*/_jsx(Body,{className:"critical-comms--subtitle",children:c})]}),d?/*#__PURE__*/_jsx("div",{className:"critical-comms--cta",children:/*#__PURE__*/_jsx(Button,{block:g,size:g?Size.MEDIUM:Size.SMALL,type:ControlType.NEGATIVE,priority:g?Priority.SECONDARY:Priority.PRIMARY,className:"cta-btn",onClick:function onClick(){d&&(window.location.href=d.href)},children:d.label})}):null]})]})}export default CriticalCommsBanner;
@@ -1 +0,0 @@
1
- import{text}from"@storybook/addon-knobs";import CriticalCommsBanner from".";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:CriticalCommsBanner,title:"CriticalCommsBanner"};export var Basic=function(){var a=text("title","Your account is overdrawn"),b=text("subtitle","Add money within the next 30 days");return/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(CriticalCommsBanner,{title:a,subtitle:b,action:{label:"Take action",href:"https://wise.com"}})})};
@@ -1 +0,0 @@
1
- export{default}from"./CriticalCommsBanner";
@@ -1 +0,0 @@
1
- /* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Typography | Display"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Display Number"}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1050.6,currency:"UAH"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:10.17,currency:"JPY"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:.01,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"GBP"})})]})};
@@ -1 +0,0 @@
1
- <svg width="180" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M119.48 8.004h-2.403v14.557h2.403V8.004zM37.642 22.561l2.655-14.557h3.508l-2.656 14.557h-3.507zM17.549 8.004h3.407l1.103 10.524 4.459-10.524H29.9l1.178 10.624 4.31-10.624h3.382l-6.164 14.557h-3.858L27.496 12.54l-4.26 10.022h-3.733L17.55 8.004z" fill="#9fe870"/><path d="M2.574 8.004l2.27 3.86-4.043 3.865h6.877l.718-1.684h-3.48l2.177-2.177-1.269-2.18h5.905L6.283 22.562h2.045l6.164-14.557H2.574z" fill="#9fe870"/><path d="M78.501 9.87c-2.685 0-4.946 2.43-4.946 5.455 0 2.968 2.261 5.399 4.946 5.399 2.714 0 4.862-2.431 4.862-5.399 0-3.024-2.148-5.455-4.862-5.455zm0 13.059c-2.148 0-4.013-1.216-5.03-2.714v2.346h-2.319V1.531h2.403v8.678c1.046-1.413 2.855-2.572 4.946-2.572 4.184 0 7.265 3.448 7.265 7.66s-3.081 7.632-7.265 7.632zM100.037 22.561h-2.318v-1.583c-.989 1.187-2.459 1.922-4.24 1.922-3.56 0-5.596-2.544-5.596-6.133V8.004h2.374v8.876c0 2.318 1.272 3.844 3.59 3.844 2.148 0 3.788-1.611 3.788-3.788V8.004h2.402v14.557zM108.711 22.929c-3.534 0-6.106-1.894-6.502-4.975h2.431c.311 1.696 1.979 2.742 4.071 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.534-.509-5.682-1.357-5.682-4.098 0-2.092 1.809-4.325 5.71-4.325 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.345-3.505-2.345-1.922 0-3.307.904-3.307 2.035 0 1.045.82 1.413 3.674 1.865 3.223.509 5.88 1.13 5.88 4.438 0 2.911-2.488 4.749-5.964 4.749zM134.659 22.561h-2.374v-8.847c0-2.233-1.244-3.872-3.562-3.872-2.205 0-3.816 1.639-3.816 3.815v8.904h-2.402V8.004h2.317v1.583c.99-1.215 2.488-1.95 4.24-1.95 3.562 0 5.597 2.544 5.597 6.162v8.762zM148.538 13.77c-.594-2.374-2.573-3.957-4.693-3.957-2.006 0-4.126 1.47-4.748 3.957h9.441zm2.317 4.269c-1.017 3.109-3.505 4.861-6.868 4.861-4.184 0-7.462-3.335-7.462-7.603 0-4.212 3.278-7.66 7.32-7.66 3.76 0 7.378 3.109 7.35 8.282h-12.24c.311 3.024 2.629 4.805 5.032 4.805 2.063 0 3.533-.99 4.324-2.685h2.544zM159.249 22.929c-3.533 0-6.106-1.894-6.501-4.975h2.431c.31 1.696 1.978 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.533-.509-5.682-1.357-5.682-4.098 0-2.092 1.809-4.325 5.71-4.325 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.345-3.505-2.345-1.922 0-3.307.904-3.307 2.035 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438 0 2.911-2.487 4.749-5.964 4.749zM172.901 22.929c-3.533 0-6.105-1.894-6.501-4.975h2.431c.311 1.696 1.979 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.395-1.78-3.957-2.261-3.533-.509-5.681-1.357-5.681-4.098 0-2.092 1.809-4.325 5.71-4.325 3.363 0 5.624 1.696 5.935 4.55h-2.43c-.34-1.554-1.725-2.345-3.505-2.345-1.923 0-3.308.904-3.308 2.035 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438-.001 2.911-2.487 4.749-5.964 4.749zM57.207 13.867c.352-1.804 2.105-3.233 4.21-3.233 1.83 0 3.207 1.329 3.207 3.233h-7.417zm10.9.45c0-3.909-2.73-6.665-6.54-6.665-4.86 0-8.118 3.534-8.118 8.57 0 3.932 2.756 6.664 6.64 6.664 3.533 0 6.163-1.703 7.24-4.435h-3.933c-.526.853-1.628 1.378-2.982 1.378-2.079 0-3.382-1.378-3.508-3.332H67.88c.152-.725.227-1.377.227-2.18zM42.903 22.536l.701-3.758c2.156.425 2.48-.777 3.032-3.709l.275-1.453c.778-4.084 2.355-6.113 6.865-5.562l-.701 3.758c-2.156-.426-2.53 1.202-3.006 3.732l-.276 1.453c-.776 4.135-2.405 6.09-6.89 5.539z" fill="#9fe870"/></svg>
@@ -1 +0,0 @@
1
- <svg width="180" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M119.48 8.004h-2.403v14.557h2.403V8.004zM37.642 22.561l2.655-14.557h3.508l-2.656 14.557h-3.507zM17.549 8.004h3.407l1.103 10.524 4.459-10.524H29.9l1.178 10.624 4.31-10.624h3.382l-6.164 14.557h-3.858L27.496 12.54l-4.26 10.021h-3.733L17.55 8.004z" fill="#163300"/><path d="M2.574 8.004l2.27 3.86-4.043 3.865h6.877l.718-1.684h-3.48l2.177-2.177-1.269-2.18h5.905L6.283 22.562h2.045l6.164-14.557H2.574z" fill="#163300"/><path d="M78.501 9.87c-2.685 0-4.946 2.43-4.946 5.455 0 2.968 2.261 5.399 4.946 5.399 2.714 0 4.862-2.431 4.862-5.399 0-3.024-2.148-5.455-4.862-5.455zm0 13.059c-2.148 0-4.013-1.216-5.03-2.714v2.346h-2.319V1.531h2.403v8.678c1.046-1.413 2.855-2.572 4.946-2.572 4.184 0 7.265 3.448 7.265 7.66s-3.081 7.632-7.265 7.632zM100.037 22.561h-2.318v-1.583c-.989 1.188-2.459 1.922-4.24 1.922-3.56 0-5.596-2.544-5.596-6.133V8.004h2.374v8.876c0 2.318 1.272 3.844 3.59 3.844 2.148 0 3.788-1.611 3.788-3.788V8.004h2.402v14.557zM108.711 22.929c-3.534 0-6.106-1.894-6.502-4.975h2.431c.311 1.696 1.979 2.742 4.071 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.534-.509-5.682-1.357-5.682-4.099 0-2.091 1.809-4.324 5.71-4.324 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.346-3.505-2.346-1.922 0-3.307.905-3.307 2.036 0 1.045.82 1.413 3.674 1.865 3.223.509 5.88 1.13 5.88 4.438 0 2.911-2.488 4.749-5.964 4.749zM134.659 22.561h-2.374v-8.847c0-2.233-1.244-3.873-3.562-3.873-2.205 0-3.816 1.64-3.816 3.816v8.904h-2.402V8.004h2.317v1.583c.99-1.215 2.488-1.95 4.24-1.95 3.562 0 5.597 2.544 5.597 6.162v8.762zM148.538 13.77c-.594-2.374-2.573-3.957-4.693-3.957-2.007 0-4.127 1.47-4.748 3.957h9.441zm2.317 4.269c-1.017 3.109-3.505 4.861-6.868 4.861-4.184 0-7.463-3.335-7.463-7.603 0-4.212 3.279-7.66 7.321-7.66 3.76 0 7.378 3.109 7.35 8.282h-12.24c.311 3.024 2.629 4.805 5.032 4.805 2.063 0 3.533-.99 4.324-2.685h2.544zM159.249 22.929c-3.533 0-6.106-1.894-6.501-4.975h2.431c.31 1.696 1.978 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.533-.509-5.682-1.357-5.682-4.099 0-2.091 1.809-4.324 5.71-4.324 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.346-3.505-2.346-1.922 0-3.307.905-3.307 2.036 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438 0 2.911-2.487 4.749-5.964 4.749zM172.901 22.929c-3.533 0-6.105-1.894-6.501-4.975h2.431c.311 1.696 1.979 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.395-1.78-3.957-2.261-3.533-.509-5.681-1.357-5.681-4.099 0-2.091 1.809-4.324 5.71-4.324 3.363 0 5.624 1.696 5.935 4.55h-2.43c-.34-1.554-1.725-2.346-3.505-2.346-1.923 0-3.308.905-3.308 2.036 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438-.001 2.911-2.487 4.749-5.964 4.749zM57.207 13.867c.352-1.804 2.105-3.233 4.21-3.233 1.83 0 3.207 1.329 3.207 3.233h-7.417zm10.9.45c0-3.909-2.73-6.665-6.54-6.665-4.86 0-8.118 3.533-8.118 8.57 0 3.932 2.756 6.664 6.64 6.664 3.533 0 6.163-1.703 7.24-4.435h-3.933c-.526.852-1.628 1.378-2.982 1.378-2.079 0-3.382-1.378-3.508-3.332H67.88c.152-.725.227-1.377.227-2.18zM42.903 22.536l.701-3.758c2.156.425 2.48-.777 3.032-3.709l.275-1.453c.778-4.084 2.355-6.114 6.865-5.562l-.701 3.758c-2.156-.426-2.53 1.202-3.006 3.732l-.276 1.453c-.776 4.135-2.405 6.09-6.89 5.539z" fill="#163300"/></svg>
@@ -1 +0,0 @@
1
- <svg width="95" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M93.669 10.69c0-5.382-3.75-9.167-9.007-9.167-6.692 0-11.177 4.862-11.177 11.805 0 5.418 3.786 9.167 9.132 9.167 4.862 0 8.486-2.35 9.975-6.1h-5.4c-.718 1.167-2.243 1.902-4.108 1.902-2.871 0-4.665-1.902-4.827-4.593h15.107c.197-1.022.305-1.901.305-3.014zm-14.999-.628c.484-2.475 2.889-4.449 5.795-4.449 2.512 0 4.413 1.83 4.413 4.45H78.67zM58.971 22.01l.969-5.166c2.96.592 3.409-1.077 4.18-5.095l.377-1.992c1.076-5.615 3.247-8.414 9.455-7.66l-.97 5.167c-2.96-.592-3.48 1.65-4.143 5.13l-.377 1.992c-1.077 5.687-3.32 8.378-9.49 7.625zM51.723 22.029l3.66-20.022h4.826l-3.642 20.022h-4.844zM24.076 2.007h4.683l1.525 14.478L36.42 2.007h4.646L42.7 16.629l5.92-14.622h4.665l-8.486 20.022h-5.31L37.765 8.25 31.9 22.03h-5.131L24.076 2.007z" fill="#9fe870"/><path d="M6.584 7.317l-5.561 5.31h9.454l.987-2.313h-4.79L9.67 7.317 7.93 4.321h8.127l-7.5 17.708h2.817L19.86 2.007H3.463l3.121 5.31z" fill="#9fe870"/></svg>
@@ -1 +0,0 @@
1
- <svg width="95" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M93.668 10.69c0-5.382-3.75-9.167-9.006-9.167-6.692 0-11.177 4.862-11.177 11.805 0 5.418 3.786 9.167 9.132 9.167 4.862 0 8.486-2.35 9.975-6.1h-5.4c-.718 1.167-2.243 1.902-4.109 1.902-2.87 0-4.664-1.902-4.826-4.593h15.106c.198-1.022.305-1.901.305-3.014zm-14.998-.628c.484-2.475 2.888-4.449 5.795-4.449 2.511 0 4.413 1.83 4.413 4.45H78.67zM58.971 22.01l.969-5.166c2.96.592 3.409-1.077 4.18-5.095l.377-1.992c1.076-5.615 3.247-8.414 9.455-7.66l-.97 5.167c-2.96-.592-3.48 1.65-4.143 5.13l-.377 1.992c-1.077 5.687-3.32 8.378-9.49 7.625zM51.723 22.029l3.66-20.022h4.826l-3.642 20.022h-4.844zM24.076 2.007h4.683l1.525 14.478L36.42 2.007h4.646L42.7 16.629l5.92-14.622h4.665l-8.486 20.022h-5.31L37.764 8.25 31.9 22.03h-5.132l-2.69-20.022z" fill="#163300"/><path d="M6.584 7.317l-5.561 5.31h9.454l.987-2.314h-4.79L9.67 7.317 7.93 4.321h8.127l-7.5 17.708h2.817L19.86 2.007H3.463l3.121 5.31z" fill="#163300"/></svg>
@@ -1 +0,0 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _titleTypeMapping,_excluded=["as","type","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.TITLE_GROUP,titleTypeMapping=(_titleTypeMapping={},_defineProperty(_titleTypeMapping,Typography.TITLE_SCREEN,"h1"),_defineProperty(_titleTypeMapping,Typography.TITLE_SECTION,"h2"),_defineProperty(_titleTypeMapping,Typography.TITLE_SUBSECTION,"h3"),_defineProperty(_titleTypeMapping,Typography.TITLE_BODY,"h4"),_defineProperty(_titleTypeMapping,Typography.TITLE_GROUP,"h5"),_titleTypeMapping);function Title(a){var b=a.as,c=a.type,d=void 0===c?DEFAULT_TYPE:c,e=a.className,f=_objectWithoutProperties(a,_excluded),g=titleTypeMapping[d];if(g!==void 0){var i=null!==b&&void 0!==b?b:"".concat(g);return/*#__PURE__*/_jsx(i,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(d),e)}))}var h=null!==b&&void 0!==b?b:"".concat(titleTypeMapping[DEFAULT_TYPE]);return/*#__PURE__*/_jsx(h,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(DEFAULT_TYPE),e)}))}export default Title;
@@ -1 +0,0 @@
1
- import{Typography}from"../common";import{render,screen}from"../test-utils";import Title from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Title",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Title,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Title,{as:"span",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Title,{id:"test-id",role:"banner",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a).toHaveAttribute("id","test-id"),expect(a).toHaveAttribute("role","banner")}),it("handles unsupported typography type",function(){render(/*#__PURE__*/_jsx(Title,{type:Typography.BODY_LARGE_BOLD,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))})});
@@ -1 +0,0 @@
1
- import{Typography}from"../common/propsValues/typography";import Title from"./Title";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Title,title:"Typography | Title"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Screen Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,className:"m-t-3",children:"Section Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,className:"m-t-3",children:"Subsection Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:"m-t-3",children:"Body Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_GROUP,className:"m-t-3",children:"Group Title"})]})};
@@ -1 +0,0 @@
1
- export{default}from"./Title";
@@ -1 +0,0 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["as","type","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.iterator.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.set.js";import"core-js/modules/es.string.iterator.js";import"core-js/modules/web.dom-collections.iterator.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import classNames from"classnames";import{Typography}from"../common/propsValues/typography";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.BODY_DEFAULT,bodyTypes=new Set([Typography.BODY_DEFAULT,Typography.BODY_DEFAULT_BOLD,Typography.BODY_LARGE,Typography.BODY_LARGE_BOLD]);function Body(a){var b=a.as,c=void 0===b?"span":b,d=a.type,e=void 0===d?DEFAULT_TYPE:d,f=a.className,g=_objectWithoutProperties(a,_excluded),h=bodyTypes.has(e);return/*#__PURE__*/_jsx(c,_objectSpread(_objectSpread({},g),{},{className:classNames("np-text-".concat(h?e:DEFAULT_TYPE),f)}))}export default Body;
@@ -1 +0,0 @@
1
- import{Typography}from"../common";import{render,screen}from"../test-utils";import Body from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Body",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Body,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Body,{as:"p",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("P"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Body,{id:"test-id",role:"banner",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a).toHaveAttribute("id","test-id"),expect(a).toHaveAttribute("role","banner")}),it("handles unsupported typography type",function(){render(/*#__PURE__*/_jsx(Body,{type:Typography.TITLE_SCREEN,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.BODY_DEFAULT))})});
@@ -1 +0,0 @@
1
- import{Typography}from"../common/propsValues/typography";import Title from"../title";import Body from"./Body";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:Body,title:"Typography | Body"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Default Bold"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs("div",{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Body Large"}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["We\u2019re building the world's most ",/*#__PURE__*/_jsx("strong",{children:"international account"}),". We\u2019re building the world's most ",/*#__PURE__*/_jsx("b",{children:"international account"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448 ",/*#__PURE__*/_jsx("strong",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),". \u041C\u0438 \u0431\u0443\u0434\u0443\u0454\u043C\u043E \u043D\u0430\u0439\u0431\u0456\u043B\u044C\u0448"," ",/*#__PURE__*/_jsx("b",{children:"\u043C\u0456\u0436\u043D\u0430\u0440\u043E\u0434\u043D\u0438\u0439 \u0440\u0430\u0445\u0443\u043D\u043E\u043A \u0443 \u0441\u0432\u0456\u0442\u0456"}),"."]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("strong",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})," ","\u79C1\u305F\u3061\u306F\u4E16\u754C\u3067\u6700\u3082\u56FD\u969B\u7684\u306A\u30A2\u30AB\u30A6\u30F3",/*#__PURE__*/_jsx("b",{children:"\u30C8\u3092\u69CB\u7BC9\u3057\u3066\u3044\u307E\u3059"})]}),/*#__PURE__*/_jsxs(Body,{as:"p",type:Typography.BODY_LARGE,children:["Wir bauen den internationalen ",/*#__PURE__*/_jsx("strong",{children:"Bericht der Welt auf"}),". Wir bauen den internationalen ",/*#__PURE__*/_jsx("b",{children:"Bericht der Welt auf"}),"."]})]}),/*#__PURE__*/_jsxs(Title,{type:Typography.TITLE_SUBSECTION,children:["Copy Example without ",/*#__PURE__*/_jsx("code",{children:"<Body />"})," component"]}),/*#__PURE__*/_jsx("p",{children:"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,children:"Copy Example without any HTML tag"}),"Lorem ipsum dolor sit amet consectetur adipisicing elit. Explicabo saepe repellendus accusantium eveniet temporibus perspiciatis iure ut, pariatur nihil totam iusto, delectus, modi possimus soluta. Et iusto odio autem debitis!"]})};
@@ -1 +0,0 @@
1
- export{default}from"./Body";
@@ -1 +0,0 @@
1
- export var Typography;(function(a){a.TITLE_SCREEN="title-screen",a.TITLE_SECTION="title-section",a.TITLE_SUBSECTION="title-subsection",a.TITLE_BODY="title-body",a.TITLE_GROUP="title-group",a.BODY_LARGE="body-large",a.BODY_DEFAULT="body-default",a.BODY_DEFAULT_BOLD="body-default-bold",a.BODY_LARGE_BOLD="body-large-bold",a.LINK_LARGE="link-large",a.LINK_DEFAULT="link-default"})(Typography||(Typography={}));
@@ -1 +0,0 @@
1
- export var Variant;(function(a){a.DESKTOP="desktop",a.MOBILE="mobile"})(Variant||(Variant={}));
@@ -1 +0,0 @@
1
- import{Alert as DangerIcon,AlertCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Avatar,{AvatarType}from"../avatar";import Body from"../body";import Button from"../button";import{ControlType,Priority,Size,Typography}from"../common";import Title from"../title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function CriticalCommsBanner(a){var b=a.title,c=a.subtitle,d=a.action,e=a.className,f=useTheme(),g=f.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("critical-comms",e),children:[/*#__PURE__*/_jsx(Avatar,{size:Size.MEDIUM,type:AvatarType.ICON,className:"m-r-1",backgroundColor:g?"var(--color-sentiment-negative)":"var(--color-background-negative)",children:g?/*#__PURE__*/_jsx(AlertCircleFill,{}):/*#__PURE__*/_jsx(DangerIcon,{size:24})}),/*#__PURE__*/_jsxs("div",{className:"critical-comms-content d-flex align-items-center flex-grow-1",children:[/*#__PURE__*/_jsxs("div",{className:classNames("flex-grow-1",{"p-x-2":!g}),children:[/*#__PURE__*/_jsx(Title,{type:g?Typography.TITLE_BODY:Typography.TITLE_GROUP,className:"critical-comms--title",children:b}),/*#__PURE__*/_jsx(Body,{className:"critical-comms--subtitle",children:c})]}),d?/*#__PURE__*/_jsx("div",{className:"critical-comms--cta",children:/*#__PURE__*/_jsx(Button,{block:g,size:g?Size.MEDIUM:Size.SMALL,type:ControlType.NEGATIVE,priority:g?Priority.SECONDARY:Priority.PRIMARY,className:"cta-btn",onClick:function onClick(){d&&(window.location.href=d.href)},children:d.label})}):null]})]})}export default CriticalCommsBanner;
@@ -1 +0,0 @@
1
- import{text}from"@storybook/addon-knobs";import CriticalCommsBanner from".";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:CriticalCommsBanner,title:"CriticalCommsBanner"};export var Basic=function(){var a=text("title","Your account is overdrawn"),b=text("subtitle","Add money within the next 30 days");return/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(CriticalCommsBanner,{title:a,subtitle:b,action:{label:"Take action",href:"https://wise.com"}})})};
@@ -1 +0,0 @@
1
- export{default}from"./CriticalCommsBanner";
@@ -1 +0,0 @@
1
- /* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Typography | Display"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Display Number"}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1050.6,currency:"UAH"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:10.17,currency:"JPY"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:.01,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("h1",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"GBP"})})]})};
@@ -1 +0,0 @@
1
- <svg width="180" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M119.48 8.004h-2.403v14.557h2.403V8.004zM37.642 22.561l2.655-14.557h3.508l-2.656 14.557h-3.507zM17.549 8.004h3.407l1.103 10.524 4.459-10.524H29.9l1.178 10.624 4.31-10.624h3.382l-6.164 14.557h-3.858L27.496 12.54l-4.26 10.022h-3.733L17.55 8.004z" fill="#9fe870"/><path d="M2.574 8.004l2.27 3.86-4.043 3.865h6.877l.718-1.684h-3.48l2.177-2.177-1.269-2.18h5.905L6.283 22.562h2.045l6.164-14.557H2.574z" fill="#9fe870"/><path d="M78.501 9.87c-2.685 0-4.946 2.43-4.946 5.455 0 2.968 2.261 5.399 4.946 5.399 2.714 0 4.862-2.431 4.862-5.399 0-3.024-2.148-5.455-4.862-5.455zm0 13.059c-2.148 0-4.013-1.216-5.03-2.714v2.346h-2.319V1.531h2.403v8.678c1.046-1.413 2.855-2.572 4.946-2.572 4.184 0 7.265 3.448 7.265 7.66s-3.081 7.632-7.265 7.632zM100.037 22.561h-2.318v-1.583c-.989 1.187-2.459 1.922-4.24 1.922-3.56 0-5.596-2.544-5.596-6.133V8.004h2.374v8.876c0 2.318 1.272 3.844 3.59 3.844 2.148 0 3.788-1.611 3.788-3.788V8.004h2.402v14.557zM108.711 22.929c-3.534 0-6.106-1.894-6.502-4.975h2.431c.311 1.696 1.979 2.742 4.071 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.534-.509-5.682-1.357-5.682-4.098 0-2.092 1.809-4.325 5.71-4.325 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.345-3.505-2.345-1.922 0-3.307.904-3.307 2.035 0 1.045.82 1.413 3.674 1.865 3.223.509 5.88 1.13 5.88 4.438 0 2.911-2.488 4.749-5.964 4.749zM134.659 22.561h-2.374v-8.847c0-2.233-1.244-3.872-3.562-3.872-2.205 0-3.816 1.639-3.816 3.815v8.904h-2.402V8.004h2.317v1.583c.99-1.215 2.488-1.95 4.24-1.95 3.562 0 5.597 2.544 5.597 6.162v8.762zM148.538 13.77c-.594-2.374-2.573-3.957-4.693-3.957-2.006 0-4.126 1.47-4.748 3.957h9.441zm2.317 4.269c-1.017 3.109-3.505 4.861-6.868 4.861-4.184 0-7.462-3.335-7.462-7.603 0-4.212 3.278-7.66 7.32-7.66 3.76 0 7.378 3.109 7.35 8.282h-12.24c.311 3.024 2.629 4.805 5.032 4.805 2.063 0 3.533-.99 4.324-2.685h2.544zM159.249 22.929c-3.533 0-6.106-1.894-6.501-4.975h2.431c.31 1.696 1.978 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.533-.509-5.682-1.357-5.682-4.098 0-2.092 1.809-4.325 5.71-4.325 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.345-3.505-2.345-1.922 0-3.307.904-3.307 2.035 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438 0 2.911-2.487 4.749-5.964 4.749zM172.901 22.929c-3.533 0-6.105-1.894-6.501-4.975h2.431c.311 1.696 1.979 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.395-1.78-3.957-2.261-3.533-.509-5.681-1.357-5.681-4.098 0-2.092 1.809-4.325 5.71-4.325 3.363 0 5.624 1.696 5.935 4.55h-2.43c-.34-1.554-1.725-2.345-3.505-2.345-1.923 0-3.308.904-3.308 2.035 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438-.001 2.911-2.487 4.749-5.964 4.749zM57.207 13.867c.352-1.804 2.105-3.233 4.21-3.233 1.83 0 3.207 1.329 3.207 3.233h-7.417zm10.9.45c0-3.909-2.73-6.665-6.54-6.665-4.86 0-8.118 3.534-8.118 8.57 0 3.932 2.756 6.664 6.64 6.664 3.533 0 6.163-1.703 7.24-4.435h-3.933c-.526.853-1.628 1.378-2.982 1.378-2.079 0-3.382-1.378-3.508-3.332H67.88c.152-.725.227-1.377.227-2.18zM42.903 22.536l.701-3.758c2.156.425 2.48-.777 3.032-3.709l.275-1.453c.778-4.084 2.355-6.113 6.865-5.562l-.701 3.758c-2.156-.426-2.53 1.202-3.006 3.732l-.276 1.453c-.776 4.135-2.405 6.09-6.89 5.539z" fill="#9fe870"/></svg>
@@ -1 +0,0 @@
1
- <svg width="180" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M119.48 8.004h-2.403v14.557h2.403V8.004zM37.642 22.561l2.655-14.557h3.508l-2.656 14.557h-3.507zM17.549 8.004h3.407l1.103 10.524 4.459-10.524H29.9l1.178 10.624 4.31-10.624h3.382l-6.164 14.557h-3.858L27.496 12.54l-4.26 10.021h-3.733L17.55 8.004z" fill="#163300"/><path d="M2.574 8.004l2.27 3.86-4.043 3.865h6.877l.718-1.684h-3.48l2.177-2.177-1.269-2.18h5.905L6.283 22.562h2.045l6.164-14.557H2.574z" fill="#163300"/><path d="M78.501 9.87c-2.685 0-4.946 2.43-4.946 5.455 0 2.968 2.261 5.399 4.946 5.399 2.714 0 4.862-2.431 4.862-5.399 0-3.024-2.148-5.455-4.862-5.455zm0 13.059c-2.148 0-4.013-1.216-5.03-2.714v2.346h-2.319V1.531h2.403v8.678c1.046-1.413 2.855-2.572 4.946-2.572 4.184 0 7.265 3.448 7.265 7.66s-3.081 7.632-7.265 7.632zM100.037 22.561h-2.318v-1.583c-.989 1.188-2.459 1.922-4.24 1.922-3.56 0-5.596-2.544-5.596-6.133V8.004h2.374v8.876c0 2.318 1.272 3.844 3.59 3.844 2.148 0 3.788-1.611 3.788-3.788V8.004h2.402v14.557zM108.711 22.929c-3.534 0-6.106-1.894-6.502-4.975h2.431c.311 1.696 1.979 2.742 4.071 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.534-.509-5.682-1.357-5.682-4.099 0-2.091 1.809-4.324 5.71-4.324 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.346-3.505-2.346-1.922 0-3.307.905-3.307 2.036 0 1.045.82 1.413 3.674 1.865 3.223.509 5.88 1.13 5.88 4.438 0 2.911-2.488 4.749-5.964 4.749zM134.659 22.561h-2.374v-8.847c0-2.233-1.244-3.873-3.562-3.873-2.205 0-3.816 1.64-3.816 3.816v8.904h-2.402V8.004h2.317v1.583c.99-1.215 2.488-1.95 4.24-1.95 3.562 0 5.597 2.544 5.597 6.162v8.762zM148.538 13.77c-.594-2.374-2.573-3.957-4.693-3.957-2.007 0-4.127 1.47-4.748 3.957h9.441zm2.317 4.269c-1.017 3.109-3.505 4.861-6.868 4.861-4.184 0-7.463-3.335-7.463-7.603 0-4.212 3.279-7.66 7.321-7.66 3.76 0 7.378 3.109 7.35 8.282h-12.24c.311 3.024 2.629 4.805 5.032 4.805 2.063 0 3.533-.99 4.324-2.685h2.544zM159.249 22.929c-3.533 0-6.106-1.894-6.501-4.975h2.431c.31 1.696 1.978 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.396-1.78-3.957-2.261-3.533-.509-5.682-1.357-5.682-4.099 0-2.091 1.809-4.324 5.71-4.324 3.364 0 5.625 1.696 5.936 4.55h-2.431c-.339-1.554-1.724-2.346-3.505-2.346-1.922 0-3.307.905-3.307 2.036 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438 0 2.911-2.487 4.749-5.964 4.749zM172.901 22.929c-3.533 0-6.105-1.894-6.501-4.975h2.431c.311 1.696 1.979 2.742 4.07 2.742 2.261 0 3.646-1.103 3.646-2.375 0-1.017-.395-1.78-3.957-2.261-3.533-.509-5.681-1.357-5.681-4.099 0-2.091 1.809-4.324 5.71-4.324 3.363 0 5.624 1.696 5.935 4.55h-2.43c-.34-1.554-1.725-2.346-3.505-2.346-1.923 0-3.308.905-3.308 2.036 0 1.045.82 1.413 3.675 1.865 3.222.509 5.879 1.13 5.879 4.438-.001 2.911-2.487 4.749-5.964 4.749zM57.207 13.867c.352-1.804 2.105-3.233 4.21-3.233 1.83 0 3.207 1.329 3.207 3.233h-7.417zm10.9.45c0-3.909-2.73-6.665-6.54-6.665-4.86 0-8.118 3.533-8.118 8.57 0 3.932 2.756 6.664 6.64 6.664 3.533 0 6.163-1.703 7.24-4.435h-3.933c-.526.852-1.628 1.378-2.982 1.378-2.079 0-3.382-1.378-3.508-3.332H67.88c.152-.725.227-1.377.227-2.18zM42.903 22.536l.701-3.758c2.156.425 2.48-.777 3.032-3.709l.275-1.453c.778-4.084 2.355-6.114 6.865-5.562l-.701 3.758c-2.156-.426-2.53 1.202-3.006 3.732l-.276 1.453c-.776 4.135-2.405 6.09-6.89 5.539z" fill="#163300"/></svg>
@@ -1 +0,0 @@
1
- <svg width="95" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M93.669 10.69c0-5.382-3.75-9.167-9.007-9.167-6.692 0-11.177 4.862-11.177 11.805 0 5.418 3.786 9.167 9.132 9.167 4.862 0 8.486-2.35 9.975-6.1h-5.4c-.718 1.167-2.243 1.902-4.108 1.902-2.871 0-4.665-1.902-4.827-4.593h15.107c.197-1.022.305-1.901.305-3.014zm-14.999-.628c.484-2.475 2.889-4.449 5.795-4.449 2.512 0 4.413 1.83 4.413 4.45H78.67zM58.971 22.01l.969-5.166c2.96.592 3.409-1.077 4.18-5.095l.377-1.992c1.076-5.615 3.247-8.414 9.455-7.66l-.97 5.167c-2.96-.592-3.48 1.65-4.143 5.13l-.377 1.992c-1.077 5.687-3.32 8.378-9.49 7.625zM51.723 22.029l3.66-20.022h4.826l-3.642 20.022h-4.844zM24.076 2.007h4.683l1.525 14.478L36.42 2.007h4.646L42.7 16.629l5.92-14.622h4.665l-8.486 20.022h-5.31L37.765 8.25 31.9 22.03h-5.131L24.076 2.007z" fill="#9fe870"/><path d="M6.584 7.317l-5.561 5.31h9.454l.987-2.313h-4.79L9.67 7.317 7.93 4.321h8.127l-7.5 17.708h2.817L19.86 2.007H3.463l3.121 5.31z" fill="#9fe870"/></svg>
@@ -1 +0,0 @@
1
- <svg width="95" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M93.668 10.69c0-5.382-3.75-9.167-9.006-9.167-6.692 0-11.177 4.862-11.177 11.805 0 5.418 3.786 9.167 9.132 9.167 4.862 0 8.486-2.35 9.975-6.1h-5.4c-.718 1.167-2.243 1.902-4.109 1.902-2.87 0-4.664-1.902-4.826-4.593h15.106c.198-1.022.305-1.901.305-3.014zm-14.998-.628c.484-2.475 2.888-4.449 5.795-4.449 2.511 0 4.413 1.83 4.413 4.45H78.67zM58.971 22.01l.969-5.166c2.96.592 3.409-1.077 4.18-5.095l.377-1.992c1.076-5.615 3.247-8.414 9.455-7.66l-.97 5.167c-2.96-.592-3.48 1.65-4.143 5.13l-.377 1.992c-1.077 5.687-3.32 8.378-9.49 7.625zM51.723 22.029l3.66-20.022h4.826l-3.642 20.022h-4.844zM24.076 2.007h4.683l1.525 14.478L36.42 2.007h4.646L42.7 16.629l5.92-14.622h4.665l-8.486 20.022h-5.31L37.764 8.25 31.9 22.03h-5.132l-2.69-20.022z" fill="#163300"/><path d="M6.584 7.317l-5.561 5.31h9.454l.987-2.314h-4.79L9.67 7.317 7.93 4.321h8.127l-7.5 17.708h2.817L19.86 2.007H3.463l3.121 5.31z" fill="#163300"/></svg>
@@ -1 +0,0 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";var _titleTypeMapping,_excluded=["as","type","className"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var DEFAULT_TYPE=Typography.TITLE_GROUP,titleTypeMapping=(_titleTypeMapping={},_defineProperty(_titleTypeMapping,Typography.TITLE_SCREEN,"h1"),_defineProperty(_titleTypeMapping,Typography.TITLE_SECTION,"h2"),_defineProperty(_titleTypeMapping,Typography.TITLE_SUBSECTION,"h3"),_defineProperty(_titleTypeMapping,Typography.TITLE_BODY,"h4"),_defineProperty(_titleTypeMapping,Typography.TITLE_GROUP,"h5"),_titleTypeMapping);function Title(a){var b=a.as,c=a.type,d=void 0===c?DEFAULT_TYPE:c,e=a.className,f=_objectWithoutProperties(a,_excluded),g=titleTypeMapping[d];if(g!==void 0){var i=null!==b&&void 0!==b?b:"".concat(g);return/*#__PURE__*/_jsx(i,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(d),e)}))}var h=null!==b&&void 0!==b?b:"".concat(titleTypeMapping[DEFAULT_TYPE]);return/*#__PURE__*/_jsx(h,_objectSpread(_objectSpread({},f),{},{className:classNames("np-text-".concat(DEFAULT_TYPE),e)}))}export default Title;
@@ -1 +0,0 @@
1
- import{Typography}from"../common";import{render,screen}from"../test-utils";import Title from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Title",function(){it("testing default state",function(){render(/*#__PURE__*/_jsx(Title,{children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("enforces tag via `as` prop",function(){render(/*#__PURE__*/_jsx(Title,{as:"span",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("SPAN"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))}),it("supports native HTML attrs",function(){render(/*#__PURE__*/_jsx(Title,{id:"test-id",role:"banner",children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a).toHaveAttribute("id","test-id"),expect(a).toHaveAttribute("role","banner")}),it("handles unsupported typography type",function(){render(/*#__PURE__*/_jsx(Title,{type:Typography.BODY_LARGE_BOLD,children:"Test"}));var a=screen.getByText("Test");expect(a).toBeInTheDocument(),expect(a.tagName).toBe("H5"),expect(a).toHaveClass("np-text-".concat(Typography.TITLE_GROUP))})});
@@ -1 +0,0 @@
1
- import{Typography}from"../common/propsValues/typography";import Title from"./Title";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Title,title:"Typography | Title"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Screen Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,className:"m-t-3",children:"Section Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SUBSECTION,className:"m-t-3",children:"Subsection Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:"m-t-3",children:"Body Title"}),/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_GROUP,className:"m-t-3",children:"Group Title"})]})};
@@ -1 +0,0 @@
1
- export{default}from"./Title";
@@ -1 +0,0 @@
1
- div.critical-comms{--critical-comms-background-color:var(--color-background-negative);--critical-comms-title-color:var(--color-content-negative);--critical-comms-subtitle-color:var(--color-content-secondary);--critical-comms-subtitle-color-padding-left:var(--size-16);background-color:var(--critical-comms-background-color);display:flex}.np-theme-personal div.critical-comms{--critical-comms-background-color:var(--color-sentiment-negative);--critical-comms-title-color:var(--color-contrast);--critical-comms-subtitle-color:var(--color-contrast);--critical-comms-subtitle-color-padding-left:0;padding:24px;padding:var(--padding-medium)}.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill{color:var(--color-contrast)}.np-theme-personal div.critical-comms .tw-icon-alert-circle-fill svg{height:48px;width:48px}.np-theme-personal div.critical-comms .cta-btn{background-color:var(--color-contrast)}@media (max-width:767px){div.critical-comms{display:initial}}div.critical-comms .critical-comms--title{color:var(--critical-comms-title-color)}div.critical-comms .critical-comms--subtitle{color:var(--critical-comms-subtitle-color)}div.critical-comms .critical-comms--cta{padding-left:0}@media (max-width:767px){div.critical-comms .critical-comms--cta{min-width:100%;padding-left:var(--critical-comms-subtitle-color-padding-left);padding-top:8px;padding-top:var(--size-8)}div.critical-comms .critical-comms-content{flex-wrap:wrap;padding-top:8px;padding-top:var(--size-8)}}
@@ -1,14 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { BodyTypes } from '../common/propsValues/typography';
3
- declare type Props = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> & {
4
- /**
5
- * Default value: {@link DEFAULT_TYPE}
6
- */
7
- type?: BodyTypes;
8
- /**
9
- * Default value: `span`
10
- */
11
- as?: 'span' | 'p';
12
- };
13
- declare function Body({ as: Element, type, className, ...props }: Props): JSX.Element;
14
- export default Body;
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import Body from './Body';
3
- declare const _default: {
4
- component: typeof Body;
5
- title: string;
6
- };
7
- export default _default;
8
- export declare const Basic: () => JSX.Element;
@@ -1 +0,0 @@
1
- export { default } from './Body';
@@ -1,28 +0,0 @@
1
- export declare enum Typography {
2
- TITLE_SCREEN = "title-screen",
3
- TITLE_SECTION = "title-section",
4
- TITLE_SUBSECTION = "title-subsection",
5
- TITLE_BODY = "title-body",
6
- TITLE_GROUP = "title-group",
7
- BODY_LARGE = "body-large",
8
- BODY_DEFAULT = "body-default",
9
- BODY_DEFAULT_BOLD = "body-default-bold",
10
- BODY_LARGE_BOLD = "body-large-bold",
11
- LINK_LARGE = "link-large",
12
- LINK_DEFAULT = "link-default"
13
- }
14
- export declare type TitleScreen = 'title-screen';
15
- export declare type TitleSection = 'title-section';
16
- export declare type TitleSubsection = 'title-subsection';
17
- export declare type TitleBody = 'title-body';
18
- export declare type TitleGroup = 'title-group';
19
- export declare type TitleTypes = TitleScreen | TitleSection | TitleSubsection | TitleBody | TitleGroup;
20
- export declare type BodyDefault = 'body-default';
21
- export declare type BodyLargeBold = 'body-large-bold';
22
- export declare type BodyDefaultBold = 'body-default-bold';
23
- export declare type BodyLarge = 'body-large';
24
- export declare type BodyTypes = BodyLargeBold | BodyDefault | BodyLarge | BodyDefaultBold;
25
- export declare type LinkDefault = 'link-default';
26
- export declare type LinkLarge = 'link-large';
27
- export declare type LinkTypes = LinkDefault | LinkLarge;
28
- export declare type TypographyTypes = TitleScreen | TitleSection | TitleSubsection | TitleBody | TitleGroup | BodyDefault | BodyLargeBold | BodyDefaultBold | BodyLarge | LinkDefault | LinkLarge;
@@ -1,4 +0,0 @@
1
- export declare enum Variant {
2
- DESKTOP = "desktop",
3
- MOBILE = "mobile"
4
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type CriticalCommsBannerProps = {
3
- title: string;
4
- subtitle?: string;
5
- action?: {
6
- label: string;
7
- href: string;
8
- };
9
- className?: string;
10
- };
11
- declare function CriticalCommsBanner({ title, subtitle, action, className }: CriticalCommsBannerProps): JSX.Element;
12
- export default CriticalCommsBanner;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import CriticalCommsBanner from '.';
3
- declare const _default: {
4
- component: typeof CriticalCommsBanner;
5
- title: string;
6
- };
7
- export default _default;
8
- export declare const Basic: () => JSX.Element;
@@ -1 +0,0 @@
1
- export { default } from './CriticalCommsBanner';
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const Basic: () => JSX.Element;
@@ -1,14 +0,0 @@
1
- import { LabelHTMLAttributes, LiHTMLAttributes } from 'react';
2
- import { TitleTypes, Heading } from '../common';
3
- declare type Props = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElement | HTMLLabelElement> & LiHTMLAttributes<HTMLLIElement> & {
4
- /**
5
- * Default value will based one `type` prop
6
- */
7
- as?: 'span' | 'label' | 'li' | Heading;
8
- /**
9
- * Default value: {@link DEFAULT_TYPE}
10
- */
11
- type?: TitleTypes;
12
- };
13
- declare function Title({ as, type, className, ...props }: Props): JSX.Element;
14
- export default Title;
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import Title from './Title';
3
- declare const _default: {
4
- component: typeof Title;
5
- title: string;
6
- };
7
- export default _default;
8
- export declare const Basic: () => JSX.Element;
@@ -1 +0,0 @@
1
- export { default } from './Title';