baseui 11.0.1 → 11.1.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 (266) hide show
  1. package/a11y/index.d.ts +1 -1
  2. package/accordion/index.d.ts +25 -28
  3. package/app-nav-bar/app-nav-bar.js +33 -40
  4. package/app-nav-bar/app-nav-bar.js.flow +46 -62
  5. package/app-nav-bar/index.d.ts +9 -8
  6. package/app-nav-bar/styled-components.js +49 -29
  7. package/app-nav-bar/styled-components.js.flow +25 -8
  8. package/app-nav-bar/types.js.flow +2 -0
  9. package/aspect-ratio-box/index.d.ts +2 -4
  10. package/avatar/index.d.ts +6 -12
  11. package/badge/badge.js +109 -0
  12. package/badge/badge.js.flow +91 -0
  13. package/badge/constants.js +54 -0
  14. package/badge/constants.js.flow +52 -0
  15. package/badge/hint-dot.js +96 -0
  16. package/badge/hint-dot.js.flow +68 -0
  17. package/badge/index.d.ts +97 -0
  18. package/badge/index.js +80 -0
  19. package/badge/index.js.flow +20 -0
  20. package/badge/notification-circle.js +103 -0
  21. package/badge/notification-circle.js.flow +81 -0
  22. package/badge/package.json +4 -0
  23. package/badge/styled-components.js +242 -0
  24. package/badge/styled-components.js.flow +325 -0
  25. package/badge/types.js +11 -0
  26. package/badge/types.js.flow +59 -0
  27. package/badge/utils.js +33 -0
  28. package/badge/utils.js.flow +23 -0
  29. package/banner/banner.js +283 -0
  30. package/banner/banner.js.flow +253 -0
  31. package/banner/constants.js +35 -0
  32. package/banner/constants.js.flow +33 -0
  33. package/banner/index.d.ts +75 -0
  34. package/banner/index.js +44 -0
  35. package/banner/index.js.flow +16 -0
  36. package/banner/package.json +4 -0
  37. package/banner/styled-components.js +131 -0
  38. package/banner/styled-components.js.flow +119 -0
  39. package/banner/types.js +11 -0
  40. package/banner/types.js.flow +66 -0
  41. package/block/index.d.ts +4 -4
  42. package/breadcrumbs/breadcrumbs.js +5 -1
  43. package/breadcrumbs/breadcrumbs.js.flow +2 -2
  44. package/breadcrumbs/index.d.ts +5 -5
  45. package/button/button.js +2 -1
  46. package/button/button.js.flow +1 -0
  47. package/button/index.d.ts +19 -29
  48. package/button-group/index.d.ts +18 -24
  49. package/card/index.d.ts +16 -14
  50. package/checkbox/index.d.ts +17 -21
  51. package/combobox/index.d.ts +7 -11
  52. package/data-table/index.d.ts +7 -10
  53. package/datepicker/calendar.js +16 -11
  54. package/datepicker/calendar.js.flow +12 -9
  55. package/datepicker/datepicker.js +58 -58
  56. package/datepicker/datepicker.js.flow +51 -34
  57. package/datepicker/index.d.ts +42 -63
  58. package/datepicker/stateful-calendar.js +6 -1
  59. package/datepicker/stateful-calendar.js.flow +8 -1
  60. package/datepicker/stateful-container.js +23 -2
  61. package/datepicker/stateful-container.js.flow +17 -4
  62. package/datepicker/stateful-datepicker.js +6 -1
  63. package/datepicker/stateful-datepicker.js.flow +7 -1
  64. package/datepicker/types.js.flow +21 -43
  65. package/datepicker/utils/date-helpers.js +1 -1
  66. package/datepicker/utils/date-helpers.js.flow +1 -1
  67. package/dnd-list/index.d.ts +22 -35
  68. package/drawer/index.d.ts +22 -27
  69. package/es/app-nav-bar/app-nav-bar.js +9 -19
  70. package/es/app-nav-bar/styled-components.js +32 -13
  71. package/es/badge/badge.js +70 -0
  72. package/es/badge/constants.js +42 -0
  73. package/es/badge/hint-dot.js +55 -0
  74. package/es/badge/index.js +11 -0
  75. package/es/badge/notification-circle.js +65 -0
  76. package/es/badge/styled-components.js +296 -0
  77. package/es/badge/types.js +8 -0
  78. package/es/badge/utils.js +17 -0
  79. package/es/banner/banner.js +213 -0
  80. package/es/banner/constants.js +24 -0
  81. package/es/banner/index.js +9 -0
  82. package/es/banner/styled-components.js +122 -0
  83. package/es/banner/types.js +8 -0
  84. package/es/breadcrumbs/breadcrumbs.js +5 -1
  85. package/es/button/button.js +1 -0
  86. package/es/datepicker/calendar.js +15 -10
  87. package/es/datepicker/datepicker.js +52 -52
  88. package/es/datepicker/stateful-calendar.js +6 -1
  89. package/es/datepicker/stateful-container.js +22 -2
  90. package/es/datepicker/stateful-datepicker.js +6 -1
  91. package/es/datepicker/utils/date-helpers.js +1 -1
  92. package/es/helper/helper-steps.js +3 -1
  93. package/es/input/base-input.js +18 -11
  94. package/es/input/input.js +15 -10
  95. package/es/input/masked-input.js +5 -2
  96. package/es/input/utils.js +4 -2
  97. package/es/locale/tr_TR.js +115 -0
  98. package/es/notification/notification.js +16 -1
  99. package/es/payment-card/custom-cards.config.js +22 -0
  100. package/es/payment-card/icons/uatp.js +52 -0
  101. package/es/payment-card/payment-card.js +8 -3
  102. package/es/popover/popover.js +2 -1
  103. package/es/popover/stateful-container.js +2 -0
  104. package/es/popover/styled-components.js +2 -1
  105. package/es/progress-steps/numbered-step.js +2 -2
  106. package/es/select/select-component.js +48 -23
  107. package/es/select/utils/default-filter-options.js +1 -1
  108. package/es/snackbar/snackbar-context.js +1 -1
  109. package/es/table-semantic/styled-components.js +14 -0
  110. package/es/table-semantic/table-builder.js +12 -5
  111. package/es/textarea/textarea.js +15 -9
  112. package/es/themes/dark-theme/color-component-tokens.js +8 -0
  113. package/es/themes/light-theme/color-component-tokens.js +8 -0
  114. package/es/tree-view/tree-label.js +9 -1
  115. package/esm/app-nav-bar/app-nav-bar.js +32 -38
  116. package/esm/app-nav-bar/styled-components.js +46 -28
  117. package/esm/badge/badge.js +97 -0
  118. package/esm/badge/constants.js +42 -0
  119. package/esm/badge/hint-dot.js +83 -0
  120. package/esm/badge/index.js +11 -0
  121. package/esm/badge/notification-circle.js +91 -0
  122. package/esm/badge/styled-components.js +235 -0
  123. package/esm/badge/types.js +8 -0
  124. package/esm/badge/utils.js +17 -0
  125. package/esm/banner/banner.js +271 -0
  126. package/esm/banner/constants.js +24 -0
  127. package/esm/banner/index.js +9 -0
  128. package/esm/banner/styled-components.js +113 -0
  129. package/esm/banner/types.js +8 -0
  130. package/esm/breadcrumbs/breadcrumbs.js +5 -1
  131. package/esm/button/button.js +2 -1
  132. package/esm/datepicker/calendar.js +16 -11
  133. package/esm/datepicker/datepicker.js +58 -58
  134. package/esm/datepicker/stateful-calendar.js +6 -1
  135. package/esm/datepicker/stateful-container.js +23 -2
  136. package/esm/datepicker/stateful-datepicker.js +6 -1
  137. package/esm/datepicker/utils/date-helpers.js +1 -1
  138. package/esm/helper/helper-steps.js +3 -1
  139. package/esm/input/base-input.js +18 -11
  140. package/esm/input/input.js +15 -10
  141. package/esm/input/masked-input.js +6 -3
  142. package/esm/input/utils.js +4 -2
  143. package/esm/locale/tr_TR.js +115 -0
  144. package/esm/notification/notification.js +17 -1
  145. package/esm/payment-card/custom-cards.config.js +22 -0
  146. package/esm/payment-card/icons/uatp.js +53 -0
  147. package/esm/payment-card/payment-card.js +9 -7
  148. package/esm/popover/popover.js +2 -1
  149. package/esm/popover/stateful-container.js +2 -0
  150. package/esm/popover/styled-components.js +3 -2
  151. package/esm/progress-steps/numbered-step.js +2 -2
  152. package/esm/select/select-component.js +85 -59
  153. package/esm/select/utils/default-filter-options.js +1 -1
  154. package/esm/snackbar/snackbar-context.js +1 -1
  155. package/esm/table-semantic/styled-components.js +31 -18
  156. package/esm/table-semantic/table-builder.js +34 -23
  157. package/esm/textarea/textarea.js +15 -9
  158. package/esm/themes/dark-theme/color-component-tokens.js +8 -0
  159. package/esm/themes/light-theme/color-component-tokens.js +8 -0
  160. package/esm/tree-view/tree-label.js +10 -2
  161. package/file-uploader/index.d.ts +11 -11
  162. package/flex-grid/index.d.ts +3 -3
  163. package/form-control/index.d.ts +7 -19
  164. package/header-navigation/index.d.ts +8 -9
  165. package/heading/index.d.ts +3 -4
  166. package/helper/helper-steps.js +19 -13
  167. package/helper/helper-steps.js.flow +3 -1
  168. package/helper/index.d.ts +7 -7
  169. package/helpers/base-provider.d.ts +16 -0
  170. package/helpers/overrides.d.ts +23 -0
  171. package/icon/index.d.ts +32 -32
  172. package/index.d.ts +34 -114
  173. package/input/base-input.js +18 -11
  174. package/input/base-input.js.flow +18 -6
  175. package/input/index.d.ts +29 -32
  176. package/input/input.js +15 -10
  177. package/input/input.js.flow +10 -5
  178. package/input/masked-input.js +6 -3
  179. package/input/masked-input.js.flow +3 -0
  180. package/input/types.js.flow +4 -0
  181. package/input/utils.js +4 -2
  182. package/input/utils.js.flow +2 -1
  183. package/layer/index.d.ts +6 -11
  184. package/layout-grid/index.d.ts +25 -7
  185. package/link/index.d.ts +2 -2
  186. package/list/index.d.ts +26 -31
  187. package/{locale.ts → locale/index.d.ts} +8 -0
  188. package/locale/tr_TR.js +123 -0
  189. package/locale/tr_TR.js.flow +124 -0
  190. package/map-marker/index.d.ts +41 -47
  191. package/menu/index.d.ts +27 -37
  192. package/modal/index.d.ts +28 -38
  193. package/notification/index.d.ts +2 -3
  194. package/notification/notification.js +18 -1
  195. package/notification/notification.js.flow +15 -1
  196. package/overrides.ts +2 -22
  197. package/package.json +26 -17
  198. package/pagination/index.d.ts +22 -26
  199. package/payment-card/custom-cards.config.js +30 -0
  200. package/payment-card/custom-cards.config.js.flow +29 -0
  201. package/payment-card/icons/uatp.js +67 -0
  202. package/payment-card/icons/uatp.js.flow +62 -0
  203. package/payment-card/index.d.ts +8 -8
  204. package/payment-card/payment-card.js +12 -7
  205. package/payment-card/payment-card.js.flow +12 -0
  206. package/phone-input/index.d.ts +261 -269
  207. package/pin-code/index.d.ts +11 -18
  208. package/popover/index.d.ts +39 -55
  209. package/popover/popover.js +2 -1
  210. package/popover/popover.js.flow +2 -1
  211. package/popover/stateful-container.js +2 -0
  212. package/popover/stateful-container.js.flow +2 -0
  213. package/popover/styled-components.js +3 -2
  214. package/popover/styled-components.js.flow +2 -1
  215. package/popover/types.js.flow +1 -0
  216. package/progress-bar/index.d.ts +11 -12
  217. package/progress-steps/index.d.ts +16 -16
  218. package/progress-steps/numbered-step.js.flow +2 -2
  219. package/radio/index.d.ts +12 -15
  220. package/rating/index.d.ts +9 -12
  221. package/select/index.d.ts +34 -36
  222. package/select/select-component.js +82 -56
  223. package/select/select-component.js.flow +46 -34
  224. package/select/types.js.flow +1 -0
  225. package/select/utils/default-filter-options.js +1 -1
  226. package/select/utils/default-filter-options.js.flow +1 -1
  227. package/side-navigation/index.d.ts +11 -13
  228. package/skeleton/index.d.ts +1 -1
  229. package/slider/index.d.ts +17 -26
  230. package/snackbar/index.d.ts +8 -8
  231. package/snackbar/snackbar-context.js +1 -1
  232. package/snackbar/snackbar-context.js.flow +1 -1
  233. package/spinner/index.d.ts +4 -3
  234. package/styles/index.d.ts +82 -2
  235. package/table/index.d.ts +16 -16
  236. package/table-grid/index.d.ts +6 -8
  237. package/table-semantic/index.d.ts +26 -32
  238. package/table-semantic/styled-components.js +33 -19
  239. package/table-semantic/styled-components.js.flow +12 -0
  240. package/table-semantic/table-builder.js +38 -22
  241. package/table-semantic/table-builder.js.flow +32 -17
  242. package/table-semantic/types.js.flow +1 -0
  243. package/tabs/index.d.ts +20 -23
  244. package/tabs-motion/index.d.ts +23 -23
  245. package/tag/index.d.ts +14 -18
  246. package/tag/types.js.flow +1 -1
  247. package/textarea/index.d.ts +11 -14
  248. package/textarea/textarea.js +15 -9
  249. package/textarea/textarea.js.flow +11 -5
  250. package/textarea/types.js.flow +1 -0
  251. package/theme.ts +36 -777
  252. package/themes/dark-theme/color-component-tokens.js +8 -0
  253. package/themes/dark-theme/color-component-tokens.js.flow +9 -0
  254. package/themes/index.d.ts +765 -0
  255. package/themes/light-theme/color-component-tokens.js +8 -0
  256. package/themes/light-theme/color-component-tokens.js.flow +9 -0
  257. package/themes/types.js.flow +9 -0
  258. package/timepicker/index.d.ts +5 -8
  259. package/timezonepicker/index.d.ts +5 -8
  260. package/toast/index.d.ts +26 -40
  261. package/tokens/index.d.ts +1 -1
  262. package/tooltip/index.d.ts +7 -9
  263. package/tree-view/index.d.ts +15 -19
  264. package/tree-view/tree-label.js +10 -2
  265. package/tree-view/tree-label.js.flow +4 -4
  266. package/typography/index.d.ts +37 -37
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
- import {StyletronComponent} from 'styletron-react';
3
- import {KIND, ToastProps} from '../toast';
2
+ import { KIND, ToastProps } from '../toast';
4
3
 
5
4
  export class Notification extends React.Component<ToastProps> {}
6
- export {KIND};
5
+ export { KIND };
@@ -11,6 +11,8 @@ var React = _interopRequireWildcard(require("react"));
11
11
 
12
12
  var _index = require("../toast/index.js");
13
13
 
14
+ var _overrides = require("../helpers/overrides.js");
15
+
14
16
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
15
17
 
16
18
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -53,9 +55,24 @@ var Notification = /*#__PURE__*/function (_React$Component) {
53
55
  _createClass(Notification, [{
54
56
  key: "render",
55
57
  value: function render() {
58
+ var overrides = (0, _overrides.mergeOverrides)({
59
+ Body: {
60
+ style: function style(_ref) {
61
+ var $theme = _ref.$theme;
62
+ return {
63
+ marginTop: $theme.sizing.scale600,
64
+ marginRight: $theme.sizing.scale600,
65
+ marginBottom: $theme.sizing.scale600,
66
+ marginLeft: $theme.sizing.scale600
67
+ };
68
+ }
69
+ }
70
+ }, this.props.overrides);
56
71
  return /*#__PURE__*/React.createElement(_index.Toast, _extends({
57
72
  "data-baseweb": "notification"
58
- }, this.props));
73
+ }, this.props, {
74
+ overrides: overrides
75
+ }));
59
76
  }
60
77
  }]);
61
78
 
@@ -9,6 +9,7 @@ import * as React from 'react';
9
9
 
10
10
  import { Toast, TYPE } from '../toast/index.js';
11
11
  import type { ToastPropsT, ToastPropsShapeT } from '../toast/types.js';
12
+ import { mergeOverrides } from '../helpers/overrides.js';
12
13
 
13
14
  export default class Notification extends React.Component<ToastPropsT> {
14
15
  static defaultProps: ToastPropsShapeT = {
@@ -17,7 +18,20 @@ export default class Notification extends React.Component<ToastPropsT> {
17
18
  };
18
19
 
19
20
  render() {
20
- return <Toast data-baseweb="notification" {...this.props} />;
21
+ const overrides = mergeOverrides(
22
+ {
23
+ Body: {
24
+ style: ({ $theme }) => ({
25
+ marginTop: $theme.sizing.scale600,
26
+ marginRight: $theme.sizing.scale600,
27
+ marginBottom: $theme.sizing.scale600,
28
+ marginLeft: $theme.sizing.scale600,
29
+ }),
30
+ },
31
+ },
32
+ this.props.overrides
33
+ );
34
+ return <Toast data-baseweb="notification" {...this.props} overrides={overrides} />;
21
35
  }
22
36
  }
23
37
 
package/overrides.ts CHANGED
@@ -1,23 +1,3 @@
1
- import * as React from 'react';
2
- import {StyleObject} from 'styletron-react';
3
- import {Theme} from './theme';
1
+ import type { Override, Overrides } from './helpers/overrides';
4
2
 
5
- type StyleOverride<T> =
6
- | StyleObject
7
- | ((props: {$theme: Theme} & React.PropsWithChildren<T>) => StyleObject);
8
-
9
- type ComponentOverride<T> =
10
- | React.ComponentType<T>
11
- | React.RefForwardingComponent<T>;
12
-
13
- interface OverrideObject<T> {
14
- component?: ComponentOverride<T>;
15
- props?: any;
16
- style?: StyleOverride<T>;
17
- }
18
-
19
- export type Override<T> = OverrideObject<T> | React.ComponentType<T>;
20
-
21
- export interface Overrides<T> {
22
- [key: string]: Override<T>;
23
- }
3
+ export type { Override, Overrides };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "11.0.1",
3
+ "version": "11.1.0",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",
@@ -24,23 +24,23 @@
24
24
  "build:copy-files": "shx cp README.md dist/README.md",
25
25
  "build:copy-flow-files": "node ./scripts/flow-copy-src.js",
26
26
  "build:copy-ts-files": "node ./scripts/ts-copy.js",
27
- "build:package-json": "shx cp package.json dist/package.json && node ./scripts/build-package-json.js",
27
+ "build:package-json": "shx cp package.json dist/package.json && shx cp .npmrc dist/.npmrc && node ./scripts/build-package-json.js",
28
28
  "build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs babel ./src --out-dir ./dist --ignore **.test.js,**/__tests__/**,**/e2e.js,**/template-component/**,**/test/**",
29
29
  "build:esm": "cross-env NODE_ENV=production BABEL_ENV=esm babel ./src --out-dir ./dist/esm --ignore **.test.js,**/__tests__/**,**/e2e.js,**/template-component/**,**/test/**",
30
30
  "build:es": "cross-env NODE_ENV=production BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore **.test.js,**/__tests__/**,**/e2e.js,**/template-component/**,**/test/**",
31
31
  "build": "yarn build:cjs && yarn build:esm && yarn build:es && yarn build:copy-files && yarn build:copy-flow-files && yarn build:copy-ts-files && yarn build:package-json",
32
- "build:docs-and-ladle": "yarn documentation:build && yarn ladle build --base-url /ladle/ && mv build public/ladle",
32
+ "build:docs-and-ladle": "yarn documentation:build && yarn ladle build && mv build public/ladle",
33
33
  "build:documentation-site-files": "node ./scripts/build-documentation-site-files.js",
34
34
  "unit-test": "yarn jest --coverage",
35
- "e2e:build": "yarn ladle build --out build-ladle",
35
+ "e2e:build": "yarn ladle build --outDir build-ladle",
36
36
  "e2e:serve": "static-server build-ladle --port 8080",
37
- "e2e:test": "jest --runInBand -c jest.e2e.config.js",
38
- "e2e:test:ci": "PUPPETEER_TARGET_URL=http://e2e-server:8080 jest -c jest.e2e.config.js",
39
- "vrt": "jest -c jest.vrt.config.js",
37
+ "e2e:test": "playwright test",
38
+ "e2e:test:ci": "PUPPETEER_TARGET_URL=http://e2e-server:8080 yarn e2e:test",
39
+ "vrt": "playwright test --config playwright-vrt.config.js",
40
40
  "vrt:docker:run": "docker-compose run e2e-test bash -c 'PUPPETEER_TARGET_URL=http://e2e-server:8080 yarn vrt'",
41
- "vrt:docker:update": "docker-compose run e2e-test bash -c 'PUPPETEER_TARGET_URL=http://e2e-server:8080 yarn vrt -u'",
41
+ "vrt:docker:update": "docker-compose run e2e-test bash -c 'PUPPETEER_TARGET_URL=http://e2e-server:8080 yarn vrt --update'",
42
42
  "vrt:ci": "PUPPETEER_TARGET_URL=http://e2e-server:8080 node ./vrt/ci.js",
43
- "vrt:reset": "shx rm -rf vrt/__image_snapshots__",
43
+ "vrt:reset": "shx rm -rf vrt/tests.vrt.js-snapshots",
44
44
  "icon:generate": "node ./src/icon/build-icons.js",
45
45
  "thumbs:generate": "svgr --template ./documentation-site/components/thumbs/template.js --replace-attr-values \"#F6F6F6={props.colors[0]}\" --replace-attr-values \"#E2E2E2={props.colors[1]}\" --replace-attr-values \"#CBCBCB={props.colors[2]}\" -d ./documentation-site/components/thumbs/components ./documentation-site/components/thumbs/svg",
46
46
  "install": "node -e \"console.log('If you are using Webpack, please make sure to update to version ^4.32.0, as this Base Web version depends on a webpack fix delivered in that version. If you are using Fusion.js make sure to upgrade fusion-cli to ^2.4.2 as it has the Webpack upgrade.')\"",
@@ -55,12 +55,13 @@
55
55
  "next:dev": "next dev documentation-site",
56
56
  "next:build": "NODE_OPTIONS=--max_old_space_size=4096 next build documentation-site",
57
57
  "next:export": "next export documentation-site -o public",
58
- "tsc": "tsc --skipLibCheck",
58
+ "tsc": "tsc",
59
59
  "validate:examples": "node ./scripts/validate-examples.js"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/cli": "^7.6.0",
63
63
  "@babel/core": "^7.8.4",
64
+ "@babel/generator": "^7.17.3",
64
65
  "@babel/helper-builder-react-jsx": "^7.12.13",
65
66
  "@babel/parser": "^7.7.3",
66
67
  "@babel/plugin-external-helpers": "^7.2.0",
@@ -76,15 +77,18 @@
76
77
  "@babel/preset-flow": "^7.0.0",
77
78
  "@babel/preset-react": "^7.0.0",
78
79
  "@babel/preset-typescript": "^7.13.0",
80
+ "@babel/template": "^7.16.7",
79
81
  "@babel/traverse": "^7.7.0",
80
82
  "@babel/types": "^7.7.1",
81
83
  "@commitlint/cli": "^8.0.0",
82
84
  "@commitlint/config-conventional": "^8.0.0",
83
85
  "@date-io/luxon": "^2.7.0",
84
86
  "@date-io/moment": "^2.7.0",
85
- "@ladle/react": "^0.10.2",
87
+ "@dubstep/core": "^3.5.3",
88
+ "@ladle/react": "^1.0.1",
86
89
  "@mdx-js/tag": "^0.20.0",
87
90
  "@octokit/rest": "^16.33.1",
91
+ "@playwright/test": "^1.22.2",
88
92
  "@svgr/cli": "^4.3.2",
89
93
  "@testing-library/jest-dom": "^5.16.3",
90
94
  "@testing-library/react": "^12.1.4",
@@ -105,9 +109,12 @@
105
109
  "@types/react-dom": "^16.8.4",
106
110
  "@types/react-virtualized": "^9.21.3",
107
111
  "@types/react-window": "^1.8.1",
108
- "@types/styletron-engine-atomic": "^1.1.0",
109
- "@types/styletron-react": "^5.0.1",
110
- "@types/styletron-standard": "^2.0.0",
112
+ "@types/styletron-engine-atomic": "^1.1.1",
113
+ "@types/styletron-react": "^5.0.3",
114
+ "@types/styletron-standard": "^2.0.2",
115
+ "@types/webpack": "^4.41.32",
116
+ "@typescript-eslint/eslint-plugin": "^5.26.0",
117
+ "@typescript-eslint/parser": "^5.26.0",
111
118
  "@zeit/next-css": "^1.0.1",
112
119
  "@zeit/next-mdx": "^1.2.0",
113
120
  "axe-core": "^4.2.2",
@@ -139,6 +146,7 @@
139
146
  "extract-react-types": "^0.26.0",
140
147
  "extract-react-types-loader": "^0.3.13",
141
148
  "flow-bin": "0.131.0",
149
+ "flow-remove-types": "^2.179.0",
142
150
  "globby": "^10.0.1",
143
151
  "husky": "^3.0.0",
144
152
  "isomorphic-fetch": "^2.2.1",
@@ -148,7 +156,6 @@
148
156
  "jest-environment-jsdom-global": "1.2.1",
149
157
  "jest-image-snapshot": "^2.11.0",
150
158
  "jest-matcher-utils": "^26.6.1",
151
- "jest-puppeteer": "^5.0.4",
152
159
  "jscodeshift": "^0.6.4",
153
160
  "just-omit": "^1.1.0",
154
161
  "just-pick": "^2.1.0",
@@ -162,11 +169,11 @@
162
169
  "node-fetch": "^2.6.1",
163
170
  "now": "16.5.2",
164
171
  "npm-run-all": "^4.1.5",
172
+ "playwright": "^1.22.2",
165
173
  "prettier": "^2.5.1",
166
174
  "pretty-proptypes": "^1.0.5",
167
175
  "pretty-quick": "^1.4.1",
168
176
  "prism-react-renderer": "^1.0.1",
169
- "puppeteer": "^9.1.1",
170
177
  "query-string": "^6.14.0",
171
178
  "raw-loader": "^3.1.0",
172
179
  "react": "^17.0.2",
@@ -177,10 +184,12 @@
177
184
  "react-icons": "^3.8.0",
178
185
  "react-map-gl": "^5.3.19",
179
186
  "react-markdown": "^4.0.3",
187
+ "react-simple-code-editor": "^0.10.0",
180
188
  "react-twitter-embed": "^2.0.8",
181
189
  "react-view": "^2.3.3",
182
190
  "react-vis": "^1.11.6",
183
191
  "remove-flow-types-loader": "^1.1.0",
192
+ "rollup-pluginutils": "^2.8.2",
184
193
  "semver": "^6.2.0",
185
194
  "shx": "^0.3.2",
186
195
  "static-server": "^2.2.1",
@@ -189,7 +198,7 @@
189
198
  "styletron-standard": "^3.0.3",
190
199
  "tar": "^5.0.0",
191
200
  "tsconfig-paths": "^3.9.0",
192
- "typescript": "^3.8.0",
201
+ "typescript": "^4.7.2",
193
202
  "universal-cookie": "^4.0.2",
194
203
  "webpack": "^4.17.1",
195
204
  "webpack-bundle-analyzer": "^3.5.0",
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
- import {StyletronComponent} from 'styletron-react';
3
- import {Override} from '../overrides';
4
- import {Locale} from '../locale';
5
- import {SIZE} from '../input';
2
+ import { StyletronComponent } from 'styletron-react';
3
+ import { Override } from '../overrides';
4
+ import { Locale } from '../locale';
5
+ import { SIZE } from '../input';
6
6
 
7
- export {SIZE};
7
+ export { SIZE };
8
8
 
9
- export interface STATE_CHANGE_TYPE {
9
+ export declare const STATE_CHANGE_TYPE: {
10
10
  change: 'change';
11
- }
11
+ };
12
12
 
13
13
  export interface Labels {
14
14
  prevButton?: string;
@@ -21,9 +21,9 @@ export interface State {
21
21
  }
22
22
 
23
23
  export type StateReducer = (
24
- changeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
24
+ changeType: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE],
25
25
  changes: State,
26
- currentState: State,
26
+ currentState: State
27
27
  ) => State;
28
28
 
29
29
  export interface PaginationOverrides {
@@ -36,9 +36,9 @@ export interface PaginationOverrides {
36
36
  }
37
37
 
38
38
  export interface Callbacks {
39
- onPrevClick?: (args: {event: any}) => any;
40
- onNextClick?: (args: {event: any}) => any;
41
- onPageChange?: (args: {nextPage: number; prevPage: number}) => any;
39
+ onPrevClick?: (args: { event: any }) => any;
40
+ onNextClick?: (args: { event: any }) => any;
41
+ onPageChange?: (args: { nextPage: number; prevPage: number }) => any;
42
42
  }
43
43
 
44
44
  export interface PaginationProps extends Callbacks {
@@ -46,7 +46,7 @@ export interface PaginationProps extends Callbacks {
46
46
  currentPage: number;
47
47
  labels?: Labels;
48
48
  overrides?: PaginationOverrides;
49
- size?: SIZE[keyof SIZE];
49
+ size?: typeof SIZE[keyof typeof SIZE];
50
50
  }
51
51
 
52
52
  export interface PageOption {
@@ -55,7 +55,7 @@ export interface PageOption {
55
55
 
56
56
  export class Pagination extends React.PureComponent<PaginationProps> {
57
57
  getMenuOptions(numPages: number): [];
58
- onMenuItemSelect(data: {value: ReadonlyArray<PageOption>}): void;
58
+ onMenuItemSelect(data: { value: ReadonlyArray<PageOption> }): void;
59
59
  onPrevClick(event: React.SyntheticEvent<any>): void;
60
60
  onNextClick(event: React.SyntheticEvent<any>): void;
61
61
  constructAriaWayfinderLabel(locale: Locale, prefix: string): string;
@@ -69,7 +69,7 @@ export interface StatefulPaginationProps extends Callbacks {
69
69
  overrides?: PaginationOverrides;
70
70
  }
71
71
 
72
- export const StatefulPagination: React.FC<StatefulPaginationProps>;
72
+ export declare const StatefulPagination: React.FC<StatefulPaginationProps>;
73
73
 
74
74
  export interface StatefulContainerProps {
75
75
  children: React.ReactNode;
@@ -79,18 +79,14 @@ export interface StatefulContainerProps {
79
79
  onPageChange?: Callbacks['onPageChange'];
80
80
  }
81
81
 
82
- export class StatefulContainer extends React.Component<
83
- StatefulContainerProps,
84
- State
85
- > {
82
+ export class StatefulContainer extends React.Component<StatefulContainerProps, State> {
86
83
  internalSetState(
87
- changeType: STATE_CHANGE_TYPE[keyof STATE_CHANGE_TYPE],
88
- changes: State,
84
+ changeType: typeof STATE_CHANGE_TYPE[keyof typeof STATE_CHANGE_TYPE],
85
+ changes: State
89
86
  ): void;
90
- onPageChange(args: {nextPage: number}): void;
87
+ onPageChange(args: { nextPage: number }): void;
91
88
  }
92
89
 
93
- export const StyledRoot: StyletronComponent<any>;
94
- export const StyledMaxLabel: StyletronComponent<any>;
95
- export const StyledDropdownContainer: StyletronComponent<any>;
96
- export const STATE_CHANGE_TYPE: STATE_CHANGE_TYPE;
90
+ export declare const StyledRoot: StyletronComponent<any>;
91
+ export declare const StyledMaxLabel: StyletronComponent<any>;
92
+ export declare const StyledDropdownContainer: StyletronComponent<any>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CUSTOM_CARDS_CONFIGURATION = void 0;
7
+
8
+ /*
9
+ Copyright (c) Uber Technologies, Inc.
10
+
11
+ This source code is licensed under the MIT license found in the
12
+ LICENSE file in the root directory of this source tree.
13
+ */
14
+
15
+ /*
16
+ This file should be used for adding new card type configuration
17
+ */
18
+ var UATP_CARD_TYPE_CONFIG = {
19
+ niceType: 'Uatp',
20
+ type: 'uatp',
21
+ patterns: [[1001, 1999]],
22
+ gaps: [4, 9],
23
+ lengths: [15],
24
+ code: {
25
+ name: 'CVV',
26
+ size: 0
27
+ }
28
+ };
29
+ var CUSTOM_CARDS_CONFIGURATION = [UATP_CARD_TYPE_CONFIG];
30
+ exports.CUSTOM_CARDS_CONFIGURATION = CUSTOM_CARDS_CONFIGURATION;
@@ -0,0 +1,29 @@
1
+ /*
2
+ Copyright (c) Uber Technologies, Inc.
3
+
4
+ This source code is licensed under the MIT license found in the
5
+ LICENSE file in the root directory of this source tree.
6
+ */
7
+ //@flow
8
+
9
+ /*
10
+ This file should be used for adding new card type configuration
11
+ */
12
+
13
+ const UATP_CARD_TYPE_CONFIG = {
14
+ niceType: 'Uatp',
15
+ type: 'uatp',
16
+ patterns: [[1001, 1999]],
17
+ gaps: [4, 9],
18
+ lengths: [15],
19
+ code: {
20
+ name: 'CVV',
21
+ size: 0,
22
+ },
23
+ };
24
+
25
+ export const CUSTOM_CARDS_CONFIGURATION = [UATP_CARD_TYPE_CONFIG];
26
+
27
+ declare var __DEV__: boolean;
28
+ declare var __NODE__: boolean;
29
+ declare var __BROWSER__: boolean;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
13
+
14
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+
16
+ /*
17
+ Copyright (c) Uber Technologies, Inc.
18
+
19
+ This source code is licensed under the MIT license found in the
20
+ LICENSE file in the root directory of this source tree.
21
+ */
22
+ var UatpIcon = function UatpIcon(_ref) {
23
+ var size = _ref.size;
24
+ return /*#__PURE__*/React.createElement("svg", {
25
+ width: size,
26
+ height: size,
27
+ viewBox: "0 0 24 24",
28
+ fill: "none",
29
+ xmlns: "http://www.w3.org/2000/svg"
30
+ }, /*#__PURE__*/React.createElement("path", {
31
+ d: "M23 4H1V20H23V4Z",
32
+ fill: "#F0F0F0"
33
+ }), /*#__PURE__*/React.createElement("g", {
34
+ clipPath: "url(#clip0_90345_28085)"
35
+ }, /*#__PURE__*/React.createElement("path", {
36
+ d: "M10.5057 9.64723H10.1817H9.70679V10.9659L10.3044 12.6255L11.4708 12.133L10.5057 9.64723Z",
37
+ fill: "#0A2C1B"
38
+ }), /*#__PURE__*/React.createElement("path", {
39
+ d: "M6.34592 14.6471L6.34001 9.64723H5.07682V13.7451C4.94173 13.7928 4.80176 13.8253 4.65948 13.8421C4.38337 13.8743 3.9371 13.9265 3.60459 13.6339C3.27002 13.3394 3.26507 12.8846 3.26655 12.7802V9.64723H2.00336V12.7802C1.96122 13.7182 2.32658 14.1754 2.45948 14.3209C3.17638 15.1058 4.54287 14.9387 5.39513 14.8345C5.71171 14.7958 6.02491 14.7331 6.33204 14.6471L6.32786 14.6427L6.34592 14.6471Z",
40
+ fill: "#0A2C1B"
41
+ }), /*#__PURE__*/React.createElement("path", {
42
+ d: "M21.999 11.453C21.9951 11.2269 21.9447 10.4929 21.3738 10.0162C21.1483 9.82795 20.9283 9.75218 20.7469 9.6897C20.5867 9.63455 20.2633 9.54148 19.3754 9.58086C18.9585 9.59952 18.5429 9.64148 18.1306 9.70653V14.8388H19.3938V13.3179C19.4958 13.3263 19.6189 13.3331 19.7586 13.3337C19.9448 13.3351 20.1309 13.325 20.3158 13.3033C20.4802 13.2817 21.266 13.1786 21.709 12.5414C22.0104 12.1079 22.0024 11.6443 21.999 11.453ZM20.5118 11.9928C20.3546 12.1594 20.1557 12.1903 19.9414 12.2236C19.7608 12.2514 19.5768 12.2484 19.3972 12.2148V10.7433C19.4924 10.7303 19.5885 10.7245 19.6845 10.7259C19.9706 10.73 20.2799 10.7344 20.4943 10.9523C20.6881 11.1491 20.6983 11.4123 20.699 11.4747C20.6996 11.5392 20.6985 11.7948 20.5118 11.9928Z",
43
+ fill: "#0A2C1B"
44
+ }), /*#__PURE__*/React.createElement("path", {
45
+ d: "M10.4995 13.1673L11.1015 14.8388H12.5212L11.6926 12.7045C11.3054 12.8761 10.9077 13.0304 10.4995 13.1673Z",
46
+ fill: "#0A2C1B"
47
+ }), /*#__PURE__*/React.createElement("path", {
48
+ d: "M6.60772 13.6849C6.59882 13.6856 6.59 13.6828 6.58303 13.6773C6.57607 13.6717 6.57148 13.6637 6.57019 13.6548C6.56891 13.646 6.57102 13.637 6.5761 13.6297C6.58119 13.6223 6.58887 13.6172 6.59759 13.6153C7.44534 13.4378 8.27682 13.1899 9.08338 12.8742C12.0436 11.7142 12.5355 10.4597 14.7222 9.60822C17.2224 8.63467 19.7225 9.06335 20.7271 9.30762C20.7338 9.30921 20.7396 9.31329 20.7433 9.31903C20.7471 9.32476 20.7485 9.3317 20.7473 9.33844C20.746 9.34518 20.7423 9.35119 20.7368 9.35525C20.7313 9.35931 20.7244 9.3611 20.7176 9.36026C19.7189 9.24529 18.7085 9.28396 17.7216 9.47491C15.1767 9.96677 14.237 11.2345 11.9094 12.341C10.7268 12.9032 8.98995 13.517 6.60772 13.6849Z",
49
+ fill: "#3EB54A"
50
+ }), /*#__PURE__*/React.createElement("path", {
51
+ d: "M16.9918 9.64723H12.6013V10.7793H14.1649V14.8388H15.4281V10.7793H16.9918V9.64723Z",
52
+ fill: "#0A2C1B"
53
+ }), /*#__PURE__*/React.createElement("path", {
54
+ d: "M9.23192 9.64723H8.95198L6.93652 14.8388H8.31211L9.70682 10.9659V9.64723H9.23192Z",
55
+ fill: "#0A2C1B"
56
+ })), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
57
+ id: "clip0_90345_28085"
58
+ }, /*#__PURE__*/React.createElement("rect", {
59
+ width: "20",
60
+ height: "5.92493",
61
+ fill: "white",
62
+ transform: "translate(2 9)"
63
+ }))));
64
+ };
65
+
66
+ var _default = UatpIcon;
67
+ exports.default = _default;
@@ -0,0 +1,62 @@
1
+ /*
2
+ Copyright (c) Uber Technologies, Inc.
3
+
4
+ This source code is licensed under the MIT license found in the
5
+ LICENSE file in the root directory of this source tree.
6
+ */
7
+ // @flow
8
+
9
+ import * as React from 'react';
10
+
11
+ const UatpIcon = ({ size }: { size: string }) => (
12
+ <svg
13
+ width={size}
14
+ height={size}
15
+ viewBox="0 0 24 24"
16
+ fill="none"
17
+ xmlns="http://www.w3.org/2000/svg"
18
+ >
19
+ <path d="M23 4H1V20H23V4Z" fill="#F0F0F0" />
20
+ <g clipPath="url(#clip0_90345_28085)">
21
+ <path
22
+ d="M10.5057 9.64723H10.1817H9.70679V10.9659L10.3044 12.6255L11.4708 12.133L10.5057 9.64723Z"
23
+ fill="#0A2C1B"
24
+ />
25
+ <path
26
+ d="M6.34592 14.6471L6.34001 9.64723H5.07682V13.7451C4.94173 13.7928 4.80176 13.8253 4.65948 13.8421C4.38337 13.8743 3.9371 13.9265 3.60459 13.6339C3.27002 13.3394 3.26507 12.8846 3.26655 12.7802V9.64723H2.00336V12.7802C1.96122 13.7182 2.32658 14.1754 2.45948 14.3209C3.17638 15.1058 4.54287 14.9387 5.39513 14.8345C5.71171 14.7958 6.02491 14.7331 6.33204 14.6471L6.32786 14.6427L6.34592 14.6471Z"
27
+ fill="#0A2C1B"
28
+ />
29
+ <path
30
+ d="M21.999 11.453C21.9951 11.2269 21.9447 10.4929 21.3738 10.0162C21.1483 9.82795 20.9283 9.75218 20.7469 9.6897C20.5867 9.63455 20.2633 9.54148 19.3754 9.58086C18.9585 9.59952 18.5429 9.64148 18.1306 9.70653V14.8388H19.3938V13.3179C19.4958 13.3263 19.6189 13.3331 19.7586 13.3337C19.9448 13.3351 20.1309 13.325 20.3158 13.3033C20.4802 13.2817 21.266 13.1786 21.709 12.5414C22.0104 12.1079 22.0024 11.6443 21.999 11.453ZM20.5118 11.9928C20.3546 12.1594 20.1557 12.1903 19.9414 12.2236C19.7608 12.2514 19.5768 12.2484 19.3972 12.2148V10.7433C19.4924 10.7303 19.5885 10.7245 19.6845 10.7259C19.9706 10.73 20.2799 10.7344 20.4943 10.9523C20.6881 11.1491 20.6983 11.4123 20.699 11.4747C20.6996 11.5392 20.6985 11.7948 20.5118 11.9928Z"
31
+ fill="#0A2C1B"
32
+ />
33
+ <path
34
+ d="M10.4995 13.1673L11.1015 14.8388H12.5212L11.6926 12.7045C11.3054 12.8761 10.9077 13.0304 10.4995 13.1673Z"
35
+ fill="#0A2C1B"
36
+ />
37
+ <path
38
+ d="M6.60772 13.6849C6.59882 13.6856 6.59 13.6828 6.58303 13.6773C6.57607 13.6717 6.57148 13.6637 6.57019 13.6548C6.56891 13.646 6.57102 13.637 6.5761 13.6297C6.58119 13.6223 6.58887 13.6172 6.59759 13.6153C7.44534 13.4378 8.27682 13.1899 9.08338 12.8742C12.0436 11.7142 12.5355 10.4597 14.7222 9.60822C17.2224 8.63467 19.7225 9.06335 20.7271 9.30762C20.7338 9.30921 20.7396 9.31329 20.7433 9.31903C20.7471 9.32476 20.7485 9.3317 20.7473 9.33844C20.746 9.34518 20.7423 9.35119 20.7368 9.35525C20.7313 9.35931 20.7244 9.3611 20.7176 9.36026C19.7189 9.24529 18.7085 9.28396 17.7216 9.47491C15.1767 9.96677 14.237 11.2345 11.9094 12.341C10.7268 12.9032 8.98995 13.517 6.60772 13.6849Z"
39
+ fill="#3EB54A"
40
+ />
41
+ <path
42
+ d="M16.9918 9.64723H12.6013V10.7793H14.1649V14.8388H15.4281V10.7793H16.9918V9.64723Z"
43
+ fill="#0A2C1B"
44
+ />
45
+ <path
46
+ d="M9.23192 9.64723H8.95198L6.93652 14.8388H8.31211L9.70682 10.9659V9.64723H9.23192Z"
47
+ fill="#0A2C1B"
48
+ />
49
+ </g>
50
+ <defs>
51
+ <clipPath id="clip0_90345_28085">
52
+ <rect width="20" height="5.92493" fill="white" transform="translate(2 9)" />
53
+ </clipPath>
54
+ </defs>
55
+ </svg>
56
+ );
57
+
58
+ export default UatpIcon;
59
+
60
+ declare var __DEV__: boolean;
61
+ declare var __NODE__: boolean;
62
+ declare var __BROWSER__: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import {StyletronComponent} from 'styletron-react';
2
+ import { StyletronComponent } from 'styletron-react';
3
3
  import * as valid from 'card-validator';
4
- import {Override} from '../overrides';
4
+ import { Override } from '../overrides';
5
5
  import {
6
6
  SIZE,
7
7
  StatefulContainer,
@@ -10,19 +10,19 @@ import {
10
10
  StatefulContainerProps,
11
11
  } from '../input';
12
12
 
13
- export {SIZE, StatefulContainer};
13
+ export { SIZE, StatefulContainer };
14
14
 
15
- export {valid};
15
+ export { valid };
16
16
 
17
17
  export type PaymentCardOverrides = InputOverrides & {
18
18
  IconWrapper?: Override<any>;
19
19
  };
20
20
 
21
- export type PaymentCardProps = InputProps & {overrides?: PaymentCardOverrides};
21
+ export type PaymentCardProps = InputProps & { overrides?: PaymentCardOverrides };
22
22
  export type StatefulPaymentCardProps = InputProps &
23
- StatefulContainerProps & {children?: never; overrides?: PaymentCardOverrides};
23
+ StatefulContainerProps & { children?: never; overrides?: PaymentCardOverrides };
24
24
 
25
- export const StatefulPaymentCard: React.FC<StatefulPaymentCardProps>;
25
+ export declare const StatefulPaymentCard: React.FC<StatefulPaymentCardProps>;
26
26
  export class PaymentCard extends React.Component<PaymentCardProps> {}
27
27
 
28
- export const StyledIconWrapper: StyletronComponent<any>;
28
+ export declare const StyledIconWrapper: StyletronComponent<any>;
@@ -39,8 +39,12 @@ var _unionpay = _interopRequireDefault(require("./icons/unionpay.js"));
39
39
 
40
40
  var _visa = _interopRequireDefault(require("./icons/visa.js"));
41
41
 
42
+ var _uatp = _interopRequireDefault(require("./icons/uatp.js"));
43
+
42
44
  var _styledComponents = require("./styled-components.js");
43
45
 
46
+ var _customCardsConfig = require("./custom-cards.config.js");
47
+
44
48
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
45
49
 
46
50
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
@@ -101,7 +105,8 @@ var CardTypeToComponent = {
101
105
  unionpay: _unionpay.default,
102
106
  maestro: _maestro.default,
103
107
  elo: _elo.default,
104
- generic: _generic.default
108
+ generic: _generic.default,
109
+ uatp: _uatp.default
105
110
  };
106
111
 
107
112
  var PaymentCard = /*#__PURE__*/function (_React$Component) {
@@ -109,21 +114,21 @@ var PaymentCard = /*#__PURE__*/function (_React$Component) {
109
114
 
110
115
  var _super = _createSuper(PaymentCard);
111
116
 
112
- function PaymentCard() {
117
+ function PaymentCard(props) {
113
118
  var _this;
114
119
 
115
120
  _classCallCheck(this, PaymentCard);
116
121
 
117
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
118
- args[_key] = arguments[_key];
119
- }
120
-
121
- _this = _super.call.apply(_super, [this].concat(args));
122
+ _this = _super.call(this, props); // For adding new custom card type, add card config to custom-cards.config.js
122
123
 
123
124
  _defineProperty(_assertThisInitialized(_this), "caretPosition", 0);
124
125
 
125
126
  _defineProperty(_assertThisInitialized(_this), "inRef", null);
126
127
 
128
+ _customCardsConfig.CUSTOM_CARDS_CONFIGURATION.forEach(function (cardTypeConfig) {
129
+ return valid.creditCardType.addCard(cardTypeConfig);
130
+ });
131
+
127
132
  return _this;
128
133
  }
129
134