oa-componentbook 0.17.24 → 0.17.26

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.
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
15
15
  var _styles = require("./styles");
16
- const _excluded = ["className", "disabled", "onClick", "iconConfig", "size", "label", "type"];
16
+ const _excluded = ["className", "disabled", "onClick", "iconConfig", "size", "label", "htmlType", "type"];
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
19
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
@@ -28,6 +28,7 @@ function CustomButton(_ref) {
28
28
  iconConfig,
29
29
  size,
30
30
  label,
31
+ htmlType,
31
32
  type
32
33
  } = _ref,
33
34
  domProps = _objectWithoutProperties(_ref, _excluded);
@@ -37,6 +38,7 @@ function CustomButton(_ref) {
37
38
  disabled: disabled,
38
39
  onClick: disabled ? null : onClick,
39
40
  type: "button",
41
+ htmlType: htmlType,
40
42
  size: size
41
43
  }, domProps), /*#__PURE__*/_react.default.createElement("div", {
42
44
  className: "text-container"
@@ -55,7 +57,8 @@ CustomButton.propTypes = {
55
57
  style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
56
58
  }),
57
59
  label: _propTypes.default.string,
58
- type: _propTypes.default.oneOf(['primary', 'secondary', 'text-only', 'danger-primary', 'danger-secondary', 'danger-text-only'])
60
+ type: _propTypes.default.oneOf(['primary', 'secondary', 'text-only', 'danger-primary', 'danger-secondary', 'danger-text-only']),
61
+ htmlType: _propTypes.default.oneOf(['button', 'submit', 'reset'])
59
62
  };
60
63
  CustomButton.defaultProps = {
61
64
  className: '',
@@ -63,7 +66,8 @@ CustomButton.defaultProps = {
63
66
  iconConfig: {},
64
67
  label: '',
65
68
  size: 'medium',
66
- type: 'primary'
69
+ type: 'primary',
70
+ htmlType: 'button'
67
71
  };
68
72
  var _default = CustomButton;
69
73
  exports.default = _default;
@@ -20,6 +20,6 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
20
20
 
21
21
  // TODO: Figure out a way to make this work with storybook.
22
22
  // Can be used to wrap the entire application, to make these styles available to every component
23
- const Typographies = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');\n\n * {\n font-family: 'Roboto';\n }\n\n .type-d1-500 {\n font-size: 56px;\n font-weight: 500;\n line-height: 68px;\n }\n \n .type-d2-500 {\n font-size: 40px;\n font-weight: 500;\n line-height: 52px;\n }\n \n .type-h1-500 {\n font-size: 32px;\n font-weight: 500;\n line-height: 40px;\n }\n \n .type-h2-500 {\n font-size: 28px;\n font-weight: 600;\n line-height: 36px;\n }\n \n .type-h3-500 {\n font-size: 24px;\n font-weight: 600;\n line-height: 32px;\n }\n\n .type-t1-500 {\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n }\n \n .type-t2-700 {\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n \n .type-b1-400 {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n \n .type-b2-400 {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n \n .type-b3-400 {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n }\n \n .type-button-500 {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n }\n \n .type-sl1-700 {\n font-size: 12px;\n font-weight: 700;\n line-height: 16px;\n letter-spacing: 0.24px;\n text-transform: uppercase;\n } \n"])));
23
+ const Typographies = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');\n\n * {\n font-family: 'Roboto', sans-serif;\n }\n\n .type-d1-500 {\n font-size: 56px;\n font-weight: 500;\n line-height: 68px;\n }\n \n .type-d2-500 {\n font-size: 40px;\n font-weight: 500;\n line-height: 52px;\n }\n \n .type-h1-500 {\n font-size: 32px;\n font-weight: 500;\n line-height: 40px;\n }\n \n .type-h2-500 {\n font-size: 28px;\n font-weight: 600;\n line-height: 36px;\n }\n \n .type-h3-500 {\n font-size: 24px;\n font-weight: 600;\n line-height: 32px;\n }\n\n .type-t1-500 {\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n }\n \n .type-t2-700 {\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n }\n \n .type-b1-400 {\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n }\n \n .type-b2-400 {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n }\n \n .type-b3-400 {\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n }\n \n .type-button-500 {\n font-size: 14px;\n font-weight: 600;\n line-height: 20px;\n }\n \n .type-sl1-700 {\n font-size: 12px;\n font-weight: 700;\n line-height: 16px;\n letter-spacing: 0.24px;\n text-transform: uppercase;\n } \n"])));
24
24
  var _default = Typographies;
25
25
  exports.default = _default;
@@ -52,6 +52,8 @@ function CloseClaim(_ref) {
52
52
  };
53
53
  const handleCancel = () => {
54
54
  onCancel();
55
+ form.resetFields();
56
+ setIsFraud(false);
55
57
  };
56
58
  return /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
57
59
  title: "Close Claim",
@@ -142,6 +142,6 @@ ViewPreviousDescription.defaultProps = {
142
142
  currentDescription: {},
143
143
  previousDescriptions: [],
144
144
  onClose: () => {},
145
- onTranslate: () => {},
145
+ onTranslate: null,
146
146
  open: true
147
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.17.24",
3
+ "version": "0.17.26",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",